http://stackoverflow.com/a/27823620
upvote count: 4
has body: I think your probably looking at a slightly outdated tutorial like I was. I dug into the the Firebase docs a little bit and came up with these for the new Authentication and Status code. Basically they have an $onAuth listener that you can just use now. Authentication: myApp.factory('Authentication',function($firebase,$firebaseAuth,$location,FIREBASE_URL, $rootScope){ var ref = new Firebase(FIREBASE_URL); var simpleLogin = $firebaseAuth(ref); var myObject = { login : function(user){ return simpleLogin.$authWithPassword({ email: user.email, password: user.password }) },//login logout: function(){ console.log("calling unauth"); return simpleLogin.$unauth(); } }//myObject return myObject; }); Status: myApp.controller('StatusController', function($scope, $rootScope,$firebaseAuth, FIREBASE_URL, $location, Authentication){ var ref = new Firebase(FIREBASE_URL); var authObj = $firebaseAuth(ref); $scope.logout = function(){ Authentication.logout(); $location.path('/login'); } authObj.$onAuth(function(authData) { if (authData) { console.log("Logged in as:", authData.password.email); $scope.userEmail = authData.password.email; } else { console.log("Logged out"); $scope.userEmail = null; } }); });
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/27051669

http://stackoverflow.com/comment/42802964
type: QuestionComment
comment on: http://stackoverflow.com/q/27138174
has text: Thank you for your replies. I like to use a script to prevent search engines follow the links... but I'm thinking now that search engines does not follow POST forms. I'm right?
score: 0
type: Comment

http://stackoverflow.com/comment/42689499
has text: Yeah, you have to change them.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27091416
score: 0

http://stackoverflow.com/comment/42527329
score: 0
comment on: http://stackoverflow.com/q/26997867
type: QuestionComment
type: Comment
has text: Even sites that process credit cards and handle sensitive information know that altering the browser behavior is just a bad idea. Put warnings on the page, use nagware in the onunload, but for crying out loud express to your business analysts in clear terms that it is **BAD** to mess with accepted user interface in this way.

http://stackoverflow.com/q/27139326
type: Question
tagged with: content-security-policy
has comment: http://stackoverflow.com/comment/42776747
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27139650
has answer: http://stackoverflow.com/a/44450721
has answer: http://stackoverflow.com/a/30567882
downvote count: 0
tagged with: websocket
has answer: http://stackoverflow.com/a/33849666
favorite count: 0
has comment: http://stackoverflow.com/comment/42780909
answer count: 5
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42816014
possible better answer: http://stackoverflow.com/a/27306916
has answer: http://stackoverflow.com/a/27139650
score: 17
has title: node.js - correct content security policy for socket.io (web sockets) using helmet
has answer: http://stackoverflow.com/a/27306916
has body: I am trying to implement content security policies (CSP) in a node server, and am having trouble setting up socket.io. It looks like I am setting up the connectSrc incorrectly in the code below. Could someone suggest the correct way to set up helmet so that web socket connections are allowed by the browser? Thanks in advance! I am using helmet module for generation of CSP; the following is the code that sets up CSP: securitySetup = function(app) { var connectSources, helmet, scriptSources, styleSources; helmet = require("helmet"); app.use(helmet()); app.use(helmet.hidePoweredBy()); app.use(helmet.noSniff()); app.use(helmet.crossdomain()); scriptSources = ["'self'", "'unsafe-inline'", "'unsafe-eval'", "ajax.googleapis.com"]; styleSources = ["'self'", "'unsafe-inline'", "ajax.googleapis.com"]; connectSources = ["'self'"]; return app.use(helmet.contentSecurityPolicy({ defaultSrc: ["'self'"], scriptSrc: scriptSources, styleSrc: styleSources, connectSrc: connectSources, reportUri: '/report-violation', reportOnly: false, setAllHeaders: false, safari5: false })); }; This works fine for all HTTP/AJAX traffic, but fails for ws:// protocol. I get this error in chrome debugger when socket.io connection is made: Refused to connect to 'ws://localhost:3000/socket.io/1/websocket/ubexeZHZiAHwAV53WQ7u' because it violates the following Content Security Policy directive: "connect-src 'self'".
tagged with: socket.io
upvote count: 17

jquery-cookie
tags question: http://stackoverflow.com/q/27065527
tag name: jquery-cookie
tags question: http://stackoverflow.com/q/26993251
type: Tag

http://stackoverflow.com/q/27113747
has comment: http://stackoverflow.com/comment/42730479
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27129173
tagged with: image
has comment: http://stackoverflow.com/comment/42731069
tagged with: captions
type: Question
has comment: http://stackoverflow.com/comment/42730364
answer count: 2
possible better answer: http://stackoverflow.com/a/27114021
tagged with: lightbox
has answer: http://stackoverflow.com/a/27114021
tagged with: javascript
has comment: http://stackoverflow.com/comment/42730799
tagged with: http://stackoverflow.com/tag/html
has title: Using Javascript, how to make individual captions for each of my lightbox gallery images?
has answer: http://stackoverflow.com/a/27129173
has comment: http://stackoverflow.com/comment/42734120
has body: I understand this is probably extremely simple but I can't get my head around it. As it stands, I have my lightbox gallery fully working, images popping up when thumbnail selected and then when clicked off returning to main page. What javascripting code am I missing to make my individual images have individual captions? Here is part of my html body: My Photo Gallery Caption One I have four images. At the moment under my 'fore' DIV they all have the same caption "Caption One". For the purpose of yer examples I will call the four captions, "Caption One", "Caption Two.. and so fort :) My javascript: If you can help me out it would be greatly appreciated!! I think I gave enough code for ye to work with but if not please let me know :) Here's my fiddle, the lightbox didnt work on it for me but might for ye, it works for me outside of jsfiddle :) http://jsfiddle.net/5anutL1e/
score: 0

http://stackoverflow.com/comment/42778373
has text: Thanks Larry. The code executed "if (data.id > 0) {}". txtaction, txtfixed_item_id, txtport, txtport_name, txttradelane_id has the correct data and it's attribute is set correctly After this, the subsequent fields (txtcharge_id, txtshipment_type, txtloading_type, txtbooking_type, txttypesize, txtsales_cost, txtfeeder_operator, txtagent_code, txtagent_name) are not populate with data and it's not set to disabled. It looks like execution stop halfway. It happens randomly. I have to refresh for a few times to make it display properly. Anyway I'll try to recheck all my codings again.
type: Comment
comment on: http://stackoverflow.com/a/27104624
type: AnswerComment
score: 0

http://stackoverflow.com/q/26999270
has answer: http://stackoverflow.com/a/27001967
accepted answer: http://stackoverflow.com/a/27001967
type: Question
has title: dijit dialog wont open in custom widget
answer count: 1
tagged with: javascript
score: 0
has body: I'm trying to open a dijit dialog in a custom widget but the dialog wont open. What could I be doing wrong? The plunker code is here: &lt;http://plnkr.co/edit/bpsQ4GHpzxIQzF4sh65z&gt; Thanks
tagged with: dojo
type: AnsweredQuestion

http://stackoverflow.com/q/27021789
has answer: http://stackoverflow.com/a/27023733
tagged with: javascript
linked to: http://stackoverflow.com/q/1707840
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42568794
favorite count: 0
type: UnansweredQuestion
has title: Sorting time hh:mm:ss with tablesorter plugin
downvote count: 0
tagged with: tablesorter
score: 1
has comment: http://stackoverflow.com/comment/42567942
has comment: http://stackoverflow.com/comment/42568076
has body: I'm using the tablesorter plugin and I have a column to sort in the format hh:mm:ss. sorter: 'time' does not work. Is there a way to sort this column? Thanks I have tried it like this but it does not sort the colum ts.addParser({ id: "customDate", is: function(s) { return false; }, format: function(s) { s = s.replace(/:/g," "); s = s.split(" "); return $.tablesorter.formatFloat(new Date(s[0], s[1]-1, s[2]).getTime()+parseInt(s[3])); }, type: "numeric" });
type: Question

http://stackoverflow.com/comment/42684434
comment on: http://stackoverflow.com/q/27075238
has text: I think loop or foreach can solved my above problem. I read many article and example but can't do here, any one can help me please.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27130615
has body: I don't know why you want like this but there is a way to achieve this. JS function onClickHandler() { var ele = document.getElementById("main"); angular.element(ele).scope().template='page1'; angular.element(ele).scope().$apply(); } If you are using jQuery then directly you can use $("#main") instead of angular.element. In angular.element, we need to use DOM element only. we can't use ID selector or class selector as it has been removed from jqlite by angular. Updated Code
score: 0
answers question: http://stackoverflow.com/q/27130049
type: Answer

http://stackoverflow.com/q/27056123
favorite count: 0
has answer: http://stackoverflow.com/a/27096999
has comment: http://stackoverflow.com/comment/42628216
has title: Loading multiple Highcharts with jquery.load
upvote count: 6
type: AnsweredQuestion
has body: I have a master page which calls in other web pages using jquery.load, for example $("#loading").show(); $("#arena").load('Project.prx?PID=' + dataReport); $("#loading").hide(); (Project.prx is in an in-house CGI language like ColdFusion, and it's pumping out HTML and JavaScript.) In the browser debugger I get error messages like the following every time I click on a link, viz Uncaught Highcharts error #16: www.highcharts.com/errors/16 Highcharts website says of this error: Highcharts Error #16 Highcharts already defined in the page This error happens the second time Highcharts or Highstock is loaded in the same page, so the Highcharts namespace is already defined. Keep in mind that the Highcharts.Chart constructor and all features of Highcharts are included in Highstock, so if you are running Chart and StockChart in combination, you only need to load the highstock.js file. As I'm using jquery's load() and targeting a div in the current document, it is a fair call for Highcharts to claim that I'm loading a second instance of the namespace. Nevertheless, this is what I want to do. So any idea how to load other Highcharts pages into one with an existing instance of the Highcharts namespace? LATER I have had some success with not putting highcharts in the controller and only in the targets and issuing $("#loading").show(); $("#arena").empty(); delete(Highcharts); $("#arena").load('Project.prx?PID=' + dataReport); $("#loading").hide(); However, this has not proved successful in every instance.
score: 6
has answer: http://stackoverflow.com/a/27206057
type: Question
has answer: http://stackoverflow.com/a/27152100
tagged with: javascript
answer count: 3
tagged with: highcharts
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27152100
possible better answer: http://stackoverflow.com/a/27096999

http://stackoverflow.com/a/57133346
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27003883
has body: Run this example of IndexedDB transaction in the console of your browser let db; dbName = "Jokes"; dbVersion = 5; const request = indexedDB.open(dbName, dbVersion); request.onupgradeneeded = e =&gt; { db = e.target.result console.log(db); const jstore = db.createObjectStore("JokeStore", { keyPath: "title" }); const mstore = db.createObjectStore("MockStore", { keyPath: "title" }); alert("upgrade"); } request.onsuccess = e =&gt; { db = e.target.result console.log(db); alert("success"); } request.onerror = e =&gt; { alert("error" + e.target.error); } const tx = db.transaction("JokeStore", "readwrite"); tx.onerror = e =&gt; alert(e.target.error); const jstoretx = tx.objectStore("JokeStore"); jstoretx.add({ title: "Knock Knock", text: "Who's there? There is a place." }); It creates an entry in the database store.

http://stackoverflow.com/comment/42607496
comment on: http://stackoverflow.com/q/27044270
score: 0
type: Comment
type: QuestionComment
has text: The value would still be returning, are you trying to check for "bb" and that's failing?

http://stackoverflow.com/comment/42632825
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27058834
has text: Change the order.. angular.module("cryptlib", [ 'ngRoute', 'ngSanitize','angularFileUpload', 'cryptlib_controllers', 'cryptlib_directives', 'cryptlib_services' ]);

http://stackoverflow.com/a/27088801
answers question: http://stackoverflow.com/q/27087900
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27087900
type: Answer
downvote count: 0
score: 1
has body: Your problem is not just changing the x value, you have to re-render the template every time you change the x. var main_template = document.getElementById('mainTemplate').innerHTML; function changePost(x) { main.post_id = x; document.getElementById('main').innerHTML = T(main_template, main); } Here's the fiddle: http://jsfiddle.net/bcq7580s/5/ Alternative would be to render all the post, hide them all via css, and then when the user clicks the link, hide all visible posts, and then show just the one the user picked.

http://stackoverflow.com/q/27084528
has comment: http://stackoverflow.com/comment/42678016
downvote count: 1
type: Question
has body: if (gold &gt;= 5 || (item1 = false) ) { item1 = true; gold = gold - 5; } This will keep going even if item1 is true. I'd like for the function to not run if either of those are not met. Thank you
tagged with: if-statement
has answer: http://stackoverflow.com/a/27084555
tagged with: javascript
answer count: 3
has title: Multiple Conditions in an If statement
tagged with: multiple-conditions
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27084574
has answer: http://stackoverflow.com/a/27084569
has comment: http://stackoverflow.com/comment/42678274
upvote count: 2
score: 1

http://stackoverflow.com/a/27148078
has body: A bit clearer is to bind the events on to each other.. for example: var longTouch = false; $(this).mousedown(function() { timeout = setTimeout(function() { longTouch = true; }, 500); }).mouseup(function() { clearTimeout(timeout); if (longTouch &amp;&amp; longTouch == true) { // do whatever you want if it was longer than 500ms } else { //else do click actions } }); longTouch = false; This way around the mouseup event interrupts the mousedown or if it was longer than the interval specified then it does the other action. I hope it's clear enough. I've made a jsFiddle to demonstrate.
has comment: http://stackoverflow.com/comment/42792746
has comment: http://stackoverflow.com/comment/42793127
has comment: http://stackoverflow.com/comment/42792690
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42859607
type: Answer
answers question: http://stackoverflow.com/q/27147017
has comment: http://stackoverflow.com/comment/42792215
has comment: http://stackoverflow.com/comment/42791978
accepted answer of: http://stackoverflow.com/q/27147017
score: 0
has comment: http://stackoverflow.com/comment/42793319

http://stackoverflow.com/comment/42770569
has text: "console.log is only suitable for live debugging and behaves differently in Firefox, Chrome and IE (in IE it will display the same text as the alert)." I guess it depends on the situation...
comment on: http://stackoverflow.com/a/27135901
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42620525
type: Comment
score: 0
type: AnswerComment
has text: Yeah I figured it out, I was missing the () from one of the sub modules which is using the raw constructor :-) .. I modified my post to reflect the correct property ("variable").
comment on: http://stackoverflow.com/a/27050355

http://stackoverflow.com/comment/42605818
type: QuestionComment
comment on: http://stackoverflow.com/q/27043007
score: 0
type: Comment
has text: @MattSmith I didn't see the `;`. You mean like this `selected: cell.isSelected && winner: cell.isWinner` <= but without `&&`?

css
tags question: http://stackoverflow.com/q/27123584
tags question: http://stackoverflow.com/q/27102441
tags question: http://stackoverflow.com/q/27081710
tags question: http://stackoverflow.com/q/27125168
tags question: http://stackoverflow.com/q/27023814
tags question: http://stackoverflow.com/q/27124876
tags question: http://stackoverflow.com/q/27113580
tags question: http://stackoverflow.com/q/27047871
tags question: http://stackoverflow.com/q/27100303
tags question: http://stackoverflow.com/q/27068115
tags question: http://stackoverflow.com/q/27040981
tags question: http://stackoverflow.com/q/27016271
tags question: http://stackoverflow.com/q/27097680
tags question: http://stackoverflow.com/q/27142628
tags question: http://stackoverflow.com/q/27056975
tags question: http://stackoverflow.com/q/27082386
tags question: http://stackoverflow.com/q/27006239
tags question: http://stackoverflow.com/q/27086812
tags question: http://stackoverflow.com/q/27133333
tags question: http://stackoverflow.com/q/27065150
tags question: http://stackoverflow.com/q/27098687
tags question: http://stackoverflow.com/q/27083997
tags question: http://stackoverflow.com/q/27150874
tags question: http://stackoverflow.com/q/27117659
tags question: http://stackoverflow.com/q/27130722
tags question: http://stackoverflow.com/q/27096121
tags question: http://stackoverflow.com/q/27091678
tags question: http://stackoverflow.com/q/27032125
tags question: http://stackoverflow.com/q/27092078
tags question: http://stackoverflow.com/q/27066470
tags question: http://stackoverflow.com/q/27117105
tags question: http://stackoverflow.com/q/27045131
tags question: http://stackoverflow.com/q/27078814
tags question: http://stackoverflow.com/q/26995477
tags question: http://stackoverflow.com/q/27126178
tags question: http://stackoverflow.com/q/27084744
tags question: http://stackoverflow.com/q/26999469
tags question: http://stackoverflow.com/q/27030308
tags question: http://stackoverflow.com/q/27114396
tags question: http://stackoverflow.com/q/27034368
tags question: http://stackoverflow.com/q/27131503
tags question: http://stackoverflow.com/q/27124975
tags question: http://stackoverflow.com/q/27032046
tags question: http://stackoverflow.com/q/27015141
tags question: http://stackoverflow.com/q/27118838
tags question: http://stackoverflow.com/q/27136553
tags question: http://stackoverflow.com/q/27144512
tags question: http://stackoverflow.com/q/27140828
tags question: http://stackoverflow.com/q/27055696
tags question: http://stackoverflow.com/q/27101588
tags question: http://stackoverflow.com/q/27021031
tags question: http://stackoverflow.com/q/27081795
tags question: http://stackoverflow.com/q/27033903
tags question: http://stackoverflow.com/q/27018689
tags question: http://stackoverflow.com/q/27020979
tags question: http://stackoverflow.com/q/27088828
tags question: http://stackoverflow.com/q/27134704
tags question: http://stackoverflow.com/q/27047611
tags question: http://stackoverflow.com/q/27126562
tags question: http://stackoverflow.com/q/27036843
tags question: http://stackoverflow.com/q/27086876
tags question: http://stackoverflow.com/q/27062140
tags question: http://stackoverflow.com/q/27079854
tags question: http://stackoverflow.com/q/27142485
tags question: http://stackoverflow.com/q/27074417
tags question: http://stackoverflow.com/q/27147654
tags question: http://stackoverflow.com/q/27041835
tags question: http://stackoverflow.com/q/27059648
tags question: http://stackoverflow.com/q/27102674
tags question: http://stackoverflow.com/q/27143240
tags question: http://stackoverflow.com/q/27084411
tags question: http://stackoverflow.com/q/27098227
tags question: http://stackoverflow.com/q/26992090
tags question: http://stackoverflow.com/q/27130435
tags question: http://stackoverflow.com/q/27140556
tags question: http://stackoverflow.com/q/26993481
tags question: http://stackoverflow.com/q/27006588
tags question: http://stackoverflow.com/q/27150480
tags question: http://stackoverflow.com/q/27148562
tags question: http://stackoverflow.com/q/27043170

twitter-bootstrap
tags question: http://stackoverflow.com/q/27150913
tags question: http://stackoverflow.com/q/27148672
tags question: http://stackoverflow.com/q/27114747
tags question: http://stackoverflow.com/q/27120809
tags question: http://stackoverflow.com/q/27014449
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/27149274
tags question: http://stackoverflow.com/q/27086307
tags question: http://stackoverflow.com/q/27037723
tags question: http://stackoverflow.com/q/27060474
tags question: http://stackoverflow.com/q/27133631
tags question: http://stackoverflow.com/q/27066969
tags question: http://stackoverflow.com/q/27119608
tags question: http://stackoverflow.com/q/27037565
tags question: http://stackoverflow.com/q/27028165
tags question: http://stackoverflow.com/q/27066470
tags question: http://stackoverflow.com/q/27143058
tags question: http://stackoverflow.com/q/27095734
tags question: http://stackoverflow.com/q/26999985
tags question: http://stackoverflow.com/q/27066245
tags question: http://stackoverflow.com/q/27144422
tags question: http://stackoverflow.com/q/27144512
tags question: http://stackoverflow.com/q/27146258
tags question: http://stackoverflow.com/q/27031512
tags question: http://stackoverflow.com/q/27151448
tags question: http://stackoverflow.com/q/27094333
tags question: http://stackoverflow.com/q/26996670
tags question: http://stackoverflow.com/q/27091305
tags question: http://stackoverflow.com/q/27071543
tags question: http://stackoverflow.com/q/27122686
tags question: http://stackoverflow.com/q/27073248
tags question: http://stackoverflow.com/q/27150902
tags question: http://stackoverflow.com/q/27072187
tags question: http://stackoverflow.com/q/27097755
tags question: http://stackoverflow.com/q/26999052
tags question: http://stackoverflow.com/q/27011984
tags question: http://stackoverflow.com/q/27017528
tags question: http://stackoverflow.com/q/27074534
tags question: http://stackoverflow.com/q/27108979
tags question: http://stackoverflow.com/q/27008920
tags question: http://stackoverflow.com/q/27046708
tags question: http://stackoverflow.com/q/27001686
tags question: http://stackoverflow.com/q/27018459
tags question: http://stackoverflow.com/q/27064190
tags question: http://stackoverflow.com/q/27140861
tags question: http://stackoverflow.com/q/27026518
tags question: http://stackoverflow.com/q/27097464
tags question: http://stackoverflow.com/q/27072856
tags question: http://stackoverflow.com/q/27121389
tags question: http://stackoverflow.com/q/27081018
tags question: http://stackoverflow.com/q/27093155
type: Tag
tags question: http://stackoverflow.com/q/27082528
tags question: http://stackoverflow.com/q/27108308
tags question: http://stackoverflow.com/q/27071265
tags question: http://stackoverflow.com/q/27042121
tags question: http://stackoverflow.com/q/27120579
tags question: http://stackoverflow.com/q/27093307
tags question: http://stackoverflow.com/q/27047620
tags question: http://stackoverflow.com/q/27114739
tags question: http://stackoverflow.com/q/27056592
tags question: http://stackoverflow.com/q/27019369
tags question: http://stackoverflow.com/q/27143209
tags question: http://stackoverflow.com/q/27101658
tags question: http://stackoverflow.com/q/27008987
tags question: http://stackoverflow.com/q/27123976
tags question: http://stackoverflow.com/q/27122199
tags question: http://stackoverflow.com/q/27135571
tags question: http://stackoverflow.com/q/27108397
tags question: http://stackoverflow.com/q/27010892
tags question: http://stackoverflow.com/q/27026949
tags question: http://stackoverflow.com/q/27001964
tags question: http://stackoverflow.com/q/27060417
tags question: http://stackoverflow.com/q/27113733
tags question: http://stackoverflow.com/q/27145123
tags question: http://stackoverflow.com/q/27139963
tags question: http://stackoverflow.com/q/27085330
tags question: http://stackoverflow.com/q/27147629
tags question: http://stackoverflow.com/q/27053972
tags question: http://stackoverflow.com/q/27055875

http://stackoverflow.com/q/27141607
answer count: 1
downvote count: 0
tagged with: javascript
has title: AngularJS 0x800a139e - JavaScript runtime error: [$injector:modulerr]
tagged with: angularjs
has answer: http://stackoverflow.com/a/27141703
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has body: I am attempting to use routing to load a few views using Angular, but keep getting the error: 0x800a139e - JavaScript runtime error: [$injector:modulerr] from angular.minl.js. I am also using a bootstrap template to run testing. My directory structure is as follows: assets images multimedia css bootstrap.min.css jumbotron.css js controllers directives libs angular-route.min.js angular.min.js bootstrap.min.js jquery-2.1.0.min.js services app.js views home.html categories.html index.html Here is my test HTML: &lt;!DOCTYPE html&gt; &lt;html lang="en" data-ng-app="pfcModule"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;link rel="shortcut icon" href="../../assets/ico/favicon.ico"&gt; &lt;title&gt;Jumbotron Template for Bootstrap&lt;/title&gt; &lt;!-- Bootstrap core CSS --&gt; &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt; &lt;!-- Custom styles for this template --&gt; &lt;link href="css/jumbotron.css" rel="stylesheet"&gt; &lt;!-- Just for debugging purposes. Don't actually copy this line! --&gt; &lt;!--[if lt IE 9]&gt;&lt;script src="../../assets/js/ie8-responsive-file-warning.js"&gt;&lt;/script&gt;&lt;![endif] --&gt; &lt;!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --&gt; &lt;!--[if lt IE 9]&gt; &lt;script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"&gt;&lt;/script&gt; &lt;script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="navbar navbar-inverse navbar-fixed-top" role="navigation"&gt; &lt;div class="container"&gt; &lt;div class="navbar-header"&gt; &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"&gt; &lt;span class="sr-only"&gt;Toggle navigat…
accepted answer: http://stackoverflow.com/a/27141703
score: 1
type: Question

http://stackoverflow.com/comment/42755032
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27102419
has text: I tried but Im not aloud to do it yet, need 15 reputation. Sorry! I will try came back here when Im reached that!

http://stackoverflow.com/q/27090477
has answer: http://stackoverflow.com/a/27090590
has comment: http://stackoverflow.com/comment/42687996
has comment: http://stackoverflow.com/comment/42688207
type: Question
has comment: http://stackoverflow.com/comment/42688084
has body: I have a bunch of controls in the form which includes several input type='file' boxes. I want to validate all file inputs and ensure file is selected. Due to some other problems I cannot use 'required' attribute. I though of serialize the data of all file boxes and convert to an array and then validate the array. If any of the file box doesn't have a value I can point the user to select a file. I am trying to put the code as below and it returns empty. var dataString = $("#adminForm").find('input[type="file"]').serialize(); Can someone please advice how to serialize only the file boxes Update 1 By seeing the answers I understand serialize is not the right way to validate forms. I added a separate class 'filebox' for each file box and able to do the validation as below. $('.filebox').each(function(i, obj) { if($('#'+obj.id).val() == 0) { /*raise error*/ return; } });
tagged with: javascript
score: 0
answer count: 2
has title: Serialize only type=file in a form using jQuery
has comment: http://stackoverflow.com/comment/42688120
tagged with: jquery
has comment: http://stackoverflow.com/comment/42688185
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27090818

http://stackoverflow.com/q/27152127
has answer: http://stackoverflow.com/a/27163720
answer count: 1
has title: asp.net Post & Submit Form to another site
accepted answer: http://stackoverflow.com/a/27163720
tagged with: javascript
tagged with: post
type: AnsweredQuestion
tagged with: asp.net
type: Question
has body: I am tring send data to another website's form from my 'Web Form' and submit it. But I couldn't achive it so far. I tried add id's bodyContent_ tag but still no progress. Can you detect where I am doing it wrong ? Thank You protected void btnSend_Click(object sender, System.EventArgs e) { Response.Write(PostForm().ToString()); this.PostScript(Page); } public string PostForm() { string PostUrl = "http://www.teknobilsoft.com/Contact.aspx"; string Method = "post"; string name = "John"; string email = "john@doe.com"; string subject = "Mesaj"; string message = "some messages"; StringBuilder ppForm = new StringBuilder(); ppForm.AppendFormat("&lt;form id='form1' action='{0}' method='{1}'&gt;", PostUrl, Method); ppForm.AppendFormat("&lt;input id='txtName' value='{0}'&gt;", name); ppForm.AppendFormat("&lt;input id='txtEmail' value='{0}'&gt;", email); ppForm.AppendFormat("&lt;input id='ddlSubject' value='{0}'&gt;", subject); ppForm.AppendFormat("&lt;textarea id='txtMessage' value='{0}'&gt;&lt;/textarea&gt;", message); ppForm.Append("&lt;/form&gt;"); return ppForm.ToString(); } private void PostScript(System.Web.UI.Page Page) { StringBuilder strScript = new StringBuilder(); strScript.Append("&lt;script language='javascript'&gt;"); strScript.Append("var ctlForm = document.getElementById('form1');"); strScript.Append("ctlForm.submit();"); strScript.Append("&lt;/script&gt;"); ClientScript.RegisterClientScriptBlock(this.GetType(), "btnSendMessage", strScript.ToString()); }
score: 0
tagged with: forms

http://stackoverflow.com/a/27124279
has comment: http://stackoverflow.com/comment/42749716
has comment: http://stackoverflow.com/comment/42749408
has body: In general you can iterate over properties of an object in this way: for (var k in o) { if (o.hasOwnProperty(k)) { console.log('k: ' + k + ', v: ' + o[k]) } } so you can use recursion to go deeper than one level function hasproperty(o) { if (typeof o === 'object') { for (var k in o) { if (o.hasOwnProperty(k)) { return true; } } } return false; }; function iterate(o) { for (var k in o) { if (o.hasOwnProperty(k)) { if (hasproperty(o[k])) { console.log('within ' + k); iterate(o[k]); console.log('exit ' + k); } else { console.log('K: ' + k + ', V:' + o[k]); } } } };
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27123911
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42750171

bootstrap-tour
tags question: http://stackoverflow.com/q/27106349
tag name: bootstrap-tour
type: Tag

http://stackoverflow.com/comment/42724475
type: QuestionComment
has text: This post is about debugging your code and might be considered [off topic](http://stackoverflow.com/help/on-topic).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27110691

http://stackoverflow.com/a/26996720
upvote count: 1
has body: try using Jquery .hasClass() if ($(this).hasClass("yourclass")) { //Do something }
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/26996670
type: Answer

http://stackoverflow.com/q/27007551
has comment: http://stackoverflow.com/comment/42592431
type: UnansweredQuestion
type: Question
tagged with: zend-framework
tagged with: javascript
has body: I want to delete a row of user table when I press a delete button. But it's error code in deleteAction public function deleteAction(){ $this-&gt;view-&gt;Title = 'Member :: Group manager :: Delete'; $this-&gt;view-&gt;headTitle($this-&gt;view-&gt;Title,true); $tblGroup = new Default_Model_UserGroup(); $tblGroup-&gt;deleteItem($this-&gt;_arrParam,array('task'=&gt;'admin-delete')); $this-&gt;_redirect($this-&gt;_actionMain); } code in file jquery function DeleteGroup(element,id) { jConfirm('Are you sure you want to delete this Group?', 'Delete Group', function(r) { if (r) $.ajax({ type: "GET", url: "&lt;?= $this-&gt;baseUrl($this-&gt;currentController. '/delete/id')?&gt;" + id, data: '', success: function(response){ $(element).parents('tr').remove(); $.jGrowl('Group deleted'); } }); }); } link &lt;a href="#" onclick="DeleteGroup(this,21)"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt;&lt;/a&gt;
has comment: http://stackoverflow.com/comment/42600384
score: 0
has title: Using Ajax Jquery to delete an Item in Zend
tagged with: jquery
has comment: http://stackoverflow.com/comment/42544061
has comment: http://stackoverflow.com/comment/42552776
tagged with: ajax
has comment: http://stackoverflow.com/comment/42592921
tagged with: php
answer count: 0

http://stackoverflow.com/a/48231434
downvote count: 0
score: 1
has body: You need to clone the send() method just like you did open, then inspect the arguments: var clone = window.XMLHttpRequest.prototype.send; window.XMLHttpRequest.prototype.send = function() { // console.log(arguments); // Continue the send clone.apply(this, arguments); };
upvote count: 1
answers question: http://stackoverflow.com/q/27001784
type: Answer

http://stackoverflow.com/comment/42587285
type: Comment
type: QuestionComment
has text: *Replacing* an image source will always immediately remove the current image and start loading (or showing if cached) the next one. If you have *two* image tags, load next image in the hidden one, then increase its opacity while decreasing the opacity of the shown one (whether in JS, or with CSS transitions, both are possible).
comment on: http://stackoverflow.com/q/27032916
score: 0

http://stackoverflow.com/comment/42526290
score: 2
comment on: http://stackoverflow.com/q/26997867
has text: No. No. No. From a usability perspective, disabling the back button on a webpage is a bad idea. It promotes behaviour like @Phil mentioned, and just comes off as annoying. What are you trying to do that you need to disable the back button?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27024587
has comment: http://stackoverflow.com/comment/42572897
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42573005
has comment: http://stackoverflow.com/comment/42573167
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42573158
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27024456
answers question: http://stackoverflow.com/q/27024456
upvote count: 2
has body: Your var $ is being hoisted (the declaration is moved to the top of function), shadowing the global $ to be undefined (when it gets passed into the self executing function) until its actual assignment in var $ = new$. The easiest solution is to pass jquery into your module. var testFunction = (function ($) { // Global to local/lexical: var XMLHttpRequest = undefined; var eval = undefined; var setTimeout = undefined; var setInterval = undefined; var Function = undefined; var window = undefined; // Can't set directly to var $? var $new = (function ($old) { if ($old) { var newjq = function (s, c) { // Reroute main function return $old(s, c); }; var jQueryBlacklist = { // Initialize blacklist "ajax": true, "post": true, "get": true, "getJSON": true, "getScript": true }; for (i in $old) // Reconstruct Object if ($old.hasOwnProperty(i) &amp;&amp; !jQueryBlacklist[i]) newjq[i] = $old[i]; return newjq; } }($)); // Line below only affects the object reference passed in to this module // Doesn't affect jQuery outside of this function: $ = $new; if (!$new) alert("$new is undefined"); // Real testFunction() below: return function () { // AJAX-forbidden code if (!$) alert("$ is undefined"); else alert("jQuery is working"); // alert($.ajax); // $.ajax should be undefined } }(jQuery)); testFunction(); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;

http://stackoverflow.com/q/27056940
answer count: 2
downvote count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42629943
favorite count: 0
has body: I know how to get sortable to work when each row is a specific item. But I'm curious how I would do it with a table where each row contains cells that have the specific items. I can't seem to get the items to switch properly. Within a certain row the items switch fine. But if I move an item between rows the row just grows horizontally. Any ideas? I'm currently calling sortable on table with item being td. But like I said, when I move an item between rows the row just grows horizontally and the item doesn't switch to the other tr properly. Current Code (coffeescript): $( "tbody" ).sortable items: 'td'
has comment: http://stackoverflow.com/comment/42629574
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42629694
type: Question
tagged with: jquery-ui-sortable
tagged with: jquery-ui
score: -2
has answer: http://stackoverflow.com/a/27057469
has answer: http://stackoverflow.com/a/27057049
has title: How do I get jQuery Sortable to work with Table cells?

http://stackoverflow.com/a/27070566
type: Answer
has comment: http://stackoverflow.com/comment/42655197
answers question: http://stackoverflow.com/q/27070345
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42655226
upvote count: 1
has body: Have you looked at Apple's Documentation? https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW5 document.unload should work but is deprecated. document.pagehide is recommended.

http://stackoverflow.com/a/27086761
has body: use JsonEncode in .php file &lt;?php $data=Array ( [0] =&gt; "Butter noob", 26375 [1] =&gt; "Crab Vermecilli", 0 [2] =&gt; "Salted Egg Yolk Crab", 0 ) ;?&gt; &lt;script&gt; series: [{ name: 'Delivered amount', data: JSON.parse(&lt;?php echo(json_encode($data));?&gt;); }] &lt;/script&gt;
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/42681960
has comment: http://stackoverflow.com/comment/42682392
answers question: http://stackoverflow.com/q/27086691
has comment: http://stackoverflow.com/comment/42681995
has comment: http://stackoverflow.com/comment/42682122
score: 2
downvote count: 0

http://stackoverflow.com/q/27128888
answer count: 1
downvote count: 0
tagged with: asp.net-web-api
tagged with: javascript
linked to: http://stackoverflow.com/q/14220321
favorite count: 0
has title: Loop through angular js array in javascript
tagged with: angularjs
tagged with: angularjs-factory
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27129502
has comment: http://stackoverflow.com/comment/42757902
has comment: http://stackoverflow.com/comment/42757629
has comment: http://stackoverflow.com/comment/42756990
upvote count: 1
type: Question
score: 1
has body: I have a web api that returns List&lt;KeyValuePair&lt;string, byte&gt;&gt; to an angular js factory. I then present it in an select using -> &lt;select ng-model="survey.surveyType" class="form-control" id="surveyType"&gt; &lt;option ng-repeat="surveyType in surveyTypes" value="{{surveyType.value}}"&gt;{{surveyType.key}}&lt;/option&gt; &lt;/select&gt; This works fine. Angular loops and displays the object correctly. When talking to the web api method I have configured it like this -> app.factory('Survey', ['$resource', function ($resource) { return $resource('http://localhost:52133/api/surveyapi/:id', null, { 'update': { method: 'PUT' }, 'getSurveyTypesAsDictionary': { method: 'GET', isArray: true, url: 'http://localhost:52133/api/surveyapi/GetSurveyTypesAsDictionary' } }); }]); // fetching the values in my controller var surveyTypes = Survey.getSurveyTypesAsDictionary(); Now my problem is this. I can't loop the result. In the console the object looks like this -> But if I try to get the values inside my angular array there's nothing there. For instance surveyTypes.length is 0. Question. How can I consume the array using JavaScript? Thanks! EDIT: I tried to return only Dictionary&lt;string, byte&gt; from the web api but I didn't get it to work at all. EDIT, comment to Sergiu: var promise = Survey.getSurveyTypesAsDictionary(); promise.$promise.then(function (response) { console.log(response.length); }); to make your suggestion work I have to get $promise from the object. Is this correct or do I need to configure my factory to make it work the way your syntax is written?
has comment: http://stackoverflow.com/comment/42757012

http://stackoverflow.com/a/49843328
answers question: http://stackoverflow.com/q/27145014
score: 0
has body: At the moment there is no straightforward way to do this. But some workarounds can be found. For example, since Processing's python mode is using Jython language (Python on JVM) you can do the following: Compile the Jython code to Java bytecode Decompile Java bytecode to real Java code Use processing.js to make the sketch run in a webpage Of course, there are chances that the generated Java code will not be 100% Processing code, thus will not be converted to Javascript by the processing.js library.
type: Answer

http://stackoverflow.com/a/27045286
has body: .parentDiv:first-child or .parentDiv:first or .parentDiv:nth-child(1) or even .firstChild:first-of-type
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27043020

http://stackoverflow.com/comment/42781118
comment on: http://stackoverflow.com/q/27141841
has text: let me tell you, I know how to deal with behind the ajax(i mean the servlet), but my issue is how to trigger ajax with these parameter using keypress(Enter) and data from server get changes the current row. please your answer is helpful for me. thanks brothers.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42541205
has text: I do not see any error messages related to that line - http://jsfiddle.net/mso7ssz6/, but if `obj[i].Name` has spaces or letters - it could create a problem due to the absence of quotes around the argument of the js function.
score: 0
comment on: http://stackoverflow.com/q/27006025
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27019941
tagged with: cordova
type: UnansweredQuestion
answer count: 0
downvote count: 0
tagged with: device-orientation
score: 1
type: Question
tagged with: ios
has title: Set iPhone native popup's orientation
tagged with: javascript
upvote count: 1
tagged with: native-code
favorite count: 0
has body: I've built a PhoneGap app for iPhone. In specific cases, landscape design and support was required, and so I've listened to device orientation notifications, and had my JS app add a '.landscape' css class which rotated the main container by 90 or -90 degrees. This JS orientation handling was easy and quick, but the problem is the native interface is always portrait-oriented. When native popups are shown, they're always in portrait mode, even if the device is tilted to landscape. Is there any way to set the orientation of native popups, without having to change the interface orientation (which is basically what I do in JS)? Or do I have to rebuild the whole thing with proper native landscape orientation?

http://stackoverflow.com/q/27095805
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27118059
tagged with: bookmarklet
tagged with: tinybox2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42700671
has title: Using Tinybox in a JS bookmarklet
has body: im trying to create a JavaScript bookmarklet that essentially contacts a server I own, gets a 6 digit code replied, and use Tinybox and Google Chart's API to generate a QR code of the code replied from my server. I have used Tinybox and Google Chats QR API Prior in a static HTML page and it worked like a charm. Im using a JS library to pull-in the tinybox.js and its style sheet that I renamed to tinystyle.css. I get no errors when I run it but nothing shows up when its activated! Any help with my issue would be greatly appreciated! Below is my bookmarklet code:(Iv replaced any instances where it points to my server with 'www.myserver.com') javascript:(function(){function callback(){ScriptLoader.load([{file:"http://www.myserver.com/tinybox/tinystyle.css",type:"css"},{file:"http://www.myserver.com/tinybox/tinybox.js",type:"js"}], success, null);function success() {console.log('BMUS Scripts...OK!');(function(){function callback(){var xmlHttp = null;xmlHttp = new XMLHttpRequest();xmlHttp.open( "GET", "http://bmus.esy.es/create.php?url="+encodeURIComponent(document.location.href), false );xmlHttp.send( null );TINY.box.show({image:'https://chart.googleapis.com/chart?cht=qr&amp;chs=700x400&amp;chl='+xmlHttp.responseText,width:700,height:400});}});}}var s=document.createElement("script");s.src="http://asimishaq.com/uploads/script-loader.js";if(s.addEventListener){s.addEventListener("load",callback,false)}else if(s.readyState){s.onreadystatechange=callback}document.body.appendChild(s);})()
type: Question
accepted answer: http://stackoverflow.com/a/27118059
tagged with: css
has comment: http://stackoverflow.com/comment/42738130
score: 0

express
tags question: http://stackoverflow.com/q/27141546
tags question: http://stackoverflow.com/q/27103124
tags question: http://stackoverflow.com/q/27098251
tags question: http://stackoverflow.com/q/27119464
tags question: http://stackoverflow.com/q/27095275
tags question: http://stackoverflow.com/q/27105352
tags question: http://stackoverflow.com/q/27093512
tags question: http://stackoverflow.com/q/27073955
tags question: http://stackoverflow.com/q/27045849
tags question: http://stackoverflow.com/q/27083797
tags question: http://stackoverflow.com/q/27031194
tags question: http://stackoverflow.com/q/27052480
tags question: http://stackoverflow.com/q/27150592
tags question: http://stackoverflow.com/q/27044459
tags question: http://stackoverflow.com/q/27032468
tags question: http://stackoverflow.com/q/27081341
tags question: http://stackoverflow.com/q/27058516
tags question: http://stackoverflow.com/q/27051458
tags question: http://stackoverflow.com/q/27114454
tags question: http://stackoverflow.com/q/26996333
tags question: http://stackoverflow.com/q/27085824
tags question: http://stackoverflow.com/q/27044742
tags question: http://stackoverflow.com/q/27137007
tags question: http://stackoverflow.com/q/27096590
tags question: http://stackoverflow.com/q/27030827
tags question: http://stackoverflow.com/q/27062675
tags question: http://stackoverflow.com/q/27006735
tags question: http://stackoverflow.com/q/27085069
tags question: http://stackoverflow.com/q/27138405
tags question: http://stackoverflow.com/q/27135531
tags question: http://stackoverflow.com/q/27083313
tags question: http://stackoverflow.com/q/27096371
tag name: express
tags question: http://stackoverflow.com/q/27111731
tags question: http://stackoverflow.com/q/27046456
tags question: http://stackoverflow.com/q/27005764
type: Tag
tags question: http://stackoverflow.com/q/27117337
tags question: http://stackoverflow.com/q/27045598
tags question: http://stackoverflow.com/q/27138112
tags question: http://stackoverflow.com/q/27136985
tags question: http://stackoverflow.com/q/27025169
tags question: http://stackoverflow.com/q/27042600
tags question: http://stackoverflow.com/q/27074732
tags question: http://stackoverflow.com/q/27049904
tags question: http://stackoverflow.com/q/27081887
tags question: http://stackoverflow.com/q/27141711
tags question: http://stackoverflow.com/q/27054503
tags question: http://stackoverflow.com/q/27135120

http://stackoverflow.com/a/27043734
downvote count: 0
answers question: http://stackoverflow.com/q/27042600
accepted answer of: http://stackoverflow.com/q/27042600
type: Answer
has body: Use the async library: https://github.com/caolan/async var fileList = [].concat(req.files.userFile); var minified = []; async.each(fileList, function(fileItem, done){ var imagemin = new Imagemin() .src(fileItem.path) .use(Imagemin.jpegtran({progressive: true})) .use(Imagemin.pngquant()); imagemin.run(function (err, files) { if(err){ console.log('Error on optmization!' + err); return done(err); } if(files &amp;&amp; files.length){ minified.push(files[0]); } done(); }); }, function(err){ if(err){ console.log('error during minfication', err) return next(err); //assumes you're using express with a next parameter } TaskModel.findById(taskId, function (err, tmpTask) { if(err){ console.log('unknown taxk', err); return next(err); } for (var x = 0; x &lt; minified.length; x++) { var f = minified[x] var base64Image = new Buffer(f.contents).toString('base64'); tmpTask.imgs.push({bin:base64Image}); } tmpTask.save(function (err) { if (!err) { console.log("Image compressed and task updated"); } else { console.log(err); return next(err); } }); }); });
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/42608819
has text: Yup...that worked. Don't know why I didn't do that. Want to answer the question and get some points?
type: Comment
comment on: http://stackoverflow.com/q/27044426
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42687186
comment on: http://stackoverflow.com/q/27089968
has text: I think AngularJS is more suitable to your case. This [answer](http://stackoverflow.com/questions/9682092/databinding-in-angularjs#answer-9693933) might help you
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27114460
duplicate of: http://stackoverflow.com/q/26349894
accepted answer: http://stackoverflow.com/a/27114501
upvote count: 0
score: -2
linked to: http://stackoverflow.com/q/24383788
has title: Why does "1" - - "1" return 2?
answer count: 1
tagged with: javascript
favorite count: 0
has body: Why does alert("1" - - "1") return 2? I'm not entirely sure what is going on here to create the result as 2? I came across the problem here: http://davidshariff.com/js-quiz
has comment: http://stackoverflow.com/comment/42731686
downvote count: 2
has answer: http://stackoverflow.com/a/27114501
has comment: http://stackoverflow.com/comment/42731693
has comment: http://stackoverflow.com/comment/42731677
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42731685
has comment: http://stackoverflow.com/comment/42731666
linked to: http://stackoverflow.com/q/26349894
has comment: http://stackoverflow.com/comment/42731680
has comment: http://stackoverflow.com/comment/42731689
has comment: http://stackoverflow.com/comment/42731687

http://stackoverflow.com/comment/42547360
comment on: http://stackoverflow.com/q/27009161
has text: I'm keeping some of links as href="#" , because in future I'm willing to add more redirections , such as href="@Url.Action("Registeration", "HEC")" , if I remove e.preventDefault(); will it effect to them also ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42596607
type: Comment
comment on: http://stackoverflow.com/a/27036983
has text: OP didn't mention the use of JQuery. You haven't explained that you are using it. You have invalid code: `("#hasil")`
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42794616
has text: So will it be enough if I whitelist the link I use to access the XML data?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27149703

http://stackoverflow.com/comment/42555537
type: AnswerComment
score: 1
type: Comment
has text: yup thats the purpose of the `$('.hideme').hide();` add it on `document.ready` if you have one
comment on: http://stackoverflow.com/a/27014543

http://stackoverflow.com/comment/42538243
score: 0
type: Comment
type: QuestionComment
has text: may be 1 and 0 should be a better option
comment on: http://stackoverflow.com/q/27004430

http://stackoverflow.com/a/27089397
has body: You are reloading the parent page too soon. You should wait for the form submit to finish first before reloading the parent page. You can submit the form via ajax, wait for the request to complete, and only then reload the parent page and close the popup. $('#addpayment').submit(function(e) { e.preventDefault(); return $.ajax({ type: "POST", url: this.getAttribute('action'), data: $(this).serialize(), dataType: 'json' }).always(function(data){ window.opener.location.href="http://localhost:5000/editsupplement/10"; window.close(); }); }) Here is a fiddle: http://jsfiddle.net/tyb2gy2d/3/
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27088156
type: Answer
accepted answer of: http://stackoverflow.com/q/27088156
score: 0

http://stackoverflow.com/comment/42608001
type: Comment
comment on: http://stackoverflow.com/q/27041758
score: 0
has text: Ok. I undertand! Thanks! `data = d3.csv.parse(headers +"\n"+ data);`
type: QuestionComment

http://stackoverflow.com/q/27008958
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27017891
score: 1
upvote count: 1
type: Question
has body: i have a pie chart code,just coping that code to our web page is easy and the result will start showing. but my question is that i want to save that code in .js file separately and want to link that file with my web page to show that code. can any body suggest me what should i need to do? here is the code - http://jsbin.com/zocewinoye/2/edit?html,output I just want to save that code in separate file and link that to my HTML page.
tagged with: javascript
tagged with: jquery
has title: How to make seperate .js file pie chart in d3.js?
answer count: 1
downvote count: 0
favorite count: 0
tagged with: d3.js
type: UnansweredQuestion

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/27019155
type: Tag
tags question: http://stackoverflow.com/q/27049625
tags question: http://stackoverflow.com/q/27144479

http://stackoverflow.com/q/27129043
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/12458444
score: 0
answer count: 1
tagged with: angularjs
has body: I have an asp.net mvc5 (with Angular) website installed in IIS on a Win 2008 R2 Ent server, and everything runs fine while running the site on the server itself. As soon as we access the site from outside the server, I'm getting CORS related errors : Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/api/init?space=razor_RAGE&amp;environment=razor_RAGE&amp;clariteConfig=E:\razor_RAGE\master\bin\clarite_config.xml. This can be fixed by moving the resource to the same domain or enabling CORS. I thought the solution was to add the proper headers to the http request : 'Access-Control-Allow-Origin': 'true' however it doesn't seem to be solving the CORS issues. Here's an example of a request I'm making from JavaScript (all good on the server, but will not work outside the server) : this.getRazorInitParams = function () { var deferred = $q.defer(); deferred.notify("Getting init parameters..."); var razorEnvParams = []; $http({ method: 'GET', encoding: 'JSON', headers: { 'Access-Control-Allow-Origin': 'true' }, url: 'breeze/Rage/GetRazorEnv' }).success(function (data, status, headers, config) { razorEnvParams = data; deferred.resolve(razorEnvParams); }).error(function (data, status, headers, config) { console.log("Error in userContext.js, getRazorInitParams " + status); }); return deferred.promise; } Here's a snipet from the c# api layer : public class initController : ApiController { public HttpResponseMessage Get() { // space, env, dom, cConf vars all defined here.. string resp = DynAggrClientAPI.initApp( space, env, dom, cConf ); var response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent(resp, Encoding.UTF8, "application/json"); return response; } } I'm searching around for the right solution. Is there anything I'm missing here ? thanks in advance, Bob
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27129272
has title: access-control-header issues making an http request
tagged with: http

http://stackoverflow.com/comment/42574549
has text: @Invent-Animate: You're welcome. And if you wanted to hide the other `p` elements, then do this: `$("p").hide().next("a").prev().show().css("color", "red");`
comment on: http://stackoverflow.com/a/27025507
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27025534
has comment: http://stackoverflow.com/comment/42574987
upvote count: 2
has comment: http://stackoverflow.com/comment/42574813
has comment: http://stackoverflow.com/comment/42574776
has body: For a Single Page App (Angulars bread and butter) it's quite common to have a single server side route handler that will serve the exact same content regardless of what page the user lands on. At that point Angular can take over and work out what controller/view is required (via route handler) and show it there. Corroborating answer - not in node sorry - How to use ASP.NET MVC and AngularJS routing? Now, when I navigate to http://www.example.com/Application1/view[x] it routes to the Application1 MVC controller, Index action, and then Angularjs takes over routes to the different views, all while having the HTML5 routing construct in the URL.
accepted answer of: http://stackoverflow.com/q/27025469
has comment: http://stackoverflow.com/comment/42575671
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27025469
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42574569
has comment: http://stackoverflow.com/comment/42574938
score: 2

unit-testing
tags question: http://stackoverflow.com/q/27078386
tags question: http://stackoverflow.com/q/27112008
tags question: http://stackoverflow.com/q/27039196
tags question: http://stackoverflow.com/q/27048392
tags question: http://stackoverflow.com/q/27005614
tags question: http://stackoverflow.com/q/27046123
tags question: http://stackoverflow.com/q/27136744
tags question: http://stackoverflow.com/q/27029797
tags question: http://stackoverflow.com/q/27036611
tags question: http://stackoverflow.com/q/27134375
tags question: http://stackoverflow.com/q/27032343
tags question: http://stackoverflow.com/q/27022628
tags question: http://stackoverflow.com/q/27114408
tags question: http://stackoverflow.com/q/27026561
tags question: http://stackoverflow.com/q/27140292
type: Tag
tags question: http://stackoverflow.com/q/27082634
tags question: http://stackoverflow.com/q/27035823
tag name: unit-testing
tags question: http://stackoverflow.com/q/27114893
tags question: http://stackoverflow.com/q/27085963
tags question: http://stackoverflow.com/q/27127509
tags question: http://stackoverflow.com/q/27029785
tags question: http://stackoverflow.com/q/27032207

http://stackoverflow.com/comment/42641448
type: QuestionComment
comment on: http://stackoverflow.com/q/27063519
type: Comment
has text: See also http://stackoverflow.com/questions/17025600/h-264-video-encoder-in-javascript
score: 0

http://stackoverflow.com/q/27059286
has comment: http://stackoverflow.com/comment/42635582
has comment: http://stackoverflow.com/comment/42637357
has comment: http://stackoverflow.com/comment/42633510
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27061039
has title: How to call HTML file with css, js and images?
has comment: http://stackoverflow.com/comment/42635457
type: Question
tagged with: nsurl
linked to: http://stackoverflow.com/q/26799493
upvote count: 0
tagged with: ios
answer count: 1
tagged with: javascript
score: -1
has body: I am downloading zip file from server. In NSCachesDirectory I have the html file and I would like to know how to run html file with their source files, I have pasted my code. please help me NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *documentsPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"/Lesson-file/Lesson%d",[str_lsn_id integerValue]]]; NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"story_html5" ofType:@"html" inDirectory:documentsPath]]; [lsn_play_webview loadRequest:[NSURLRequest requestWithURL:url]];
accepted answer: http://stackoverflow.com/a/27061039
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: http://stackoverflow.com/tag/zip

http://stackoverflow.com/comment/42700979
type: Comment
comment on: http://stackoverflow.com/a/27097930
has text: please see comments below the question. I'm implementing a wire format, so the other side expects 4 bytes. I can't just send 8 bytes. And, floats are precise to 7 digits past the decimal (vs. 17 for doubles). I've only got 5 digits past the decimal, so I still don't buy into this "doubles are more accurate" argument.
score: 1
type: AnswerComment

http://stackoverflow.com/q/27147980
has comment: http://stackoverflow.com/comment/42794512
has title: Screen capture from jsfiddle using phantom js
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42794251
tagged with: jsfiddle
tagged with: javascript
has answer: http://stackoverflow.com/a/27150342
type: AnsweredQuestion
has body: I have to capture a generated chart's screenshot from jsfiddle.net to show someone. I'm using phantomjsfor this purpose. Now here is the code I'm using page.open(modifiedUrl.url, function() { setTimeout(function(){ //http://fiddle.jshell.net/fusioncharts/B2t38/show/light/ console.log("created " + modifiedUrl.unique_str+".png"); page.render(modifiedUrl.unique_str+".png"); counter+=1; startRender(); }, 30000); }); The url is given in the comment line. Now what happening is I'm getting a trimmed image always with a scroller. But when i'm hitting the url directly there is no sign of scroller. Is there any way to get the scroller free untrimmed image. I have tried with view port setting functionality which is not working also I tried using clipRect property which is not also working.
type: Question
has comment: http://stackoverflow.com/comment/42791245
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27150342
tagged with: phantomjs

http://stackoverflow.com/comment/42875694
comment on: http://stackoverflow.com/q/27144245
has text: Maybe you can use the same mechanism like mobile apps are using, to register events in Google Analytics, but maybe that will require compiling some library to work with Google SDK
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27136294
linked to: http://stackoverflow.com/q/4755158
has title: Detecting hash change using pure javascript?
tagged with: javascript
upvote count: 1
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/42770825
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42771109
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42770838
duplicate of: http://stackoverflow.com/q/4755158
has body: I want to call a function when the hash changes using pure JavaScript. I tried putting this function on document.ready but it didn't work. function hashHandler(){ this.oldHash = window.location.hash; this.Check; var that = this; var detect = function(){ if(that.oldHash!=window.location.hash){ alert("HASH CHANGED - new has" + window.location.hash); that.oldHash = window.location.hash; } }; this.Check = setInterval(function(){ detect() }, 100); }
type: Question

http://stackoverflow.com/comment/42780079
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27141195
type: QuestionComment
has text: Encode the character and then compare..

client-side
tags question: http://stackoverflow.com/q/27061122
type: Tag
tag name: client-side
tags question: http://stackoverflow.com/q/27067382
tags question: http://stackoverflow.com/q/27100596
tags question: http://stackoverflow.com/q/27115890

http://stackoverflow.com/comment/42769620
comment on: http://stackoverflow.com/q/27133864
type: Comment
type: QuestionComment
has text: @Blazemonger, i can't loop through rec, because it has properties that i can't write into table, only properties contained in columns can.
score: 0

http://stackoverflow.com/q/27090367
has body: There is a variable with a serialized strung: var formData = $(th).closest('form').serialize(); How add param 'url' : 'true' to formData?
has answer: http://stackoverflow.com/a/27090416
possible better answer: http://stackoverflow.com/a/27090419
has answer: http://stackoverflow.com/a/27090419
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27103306
has title: How to add param to serialized object?
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/27090416

http://stackoverflow.com/q/27138811
has comment: http://stackoverflow.com/comment/42775618
type: Question
has body: I'm trying to apply a like button to reactions in my website. So the value of likes has to be updated, when someone hits the "like button". I watched several tutorials and searched the whole web for a solution, but I can't find it. My database don't update. heres my code: mysqli_query($db_conx, "UPDATE status SET like='$like' WHERE osid='$statusid' LIMIT 1");
has answer: http://stackoverflow.com/a/27138880
tagged with: database
has answer: http://stackoverflow.com/a/27139058
tagged with: javascript
has title: update SQL database with PHP
has comment: http://stackoverflow.com/comment/42775593
score: 0
answer count: 3
tagged with: sql-update
tagged with: sql
possible better answer: http://stackoverflow.com/a/27138880
tagged with: php
has answer: http://stackoverflow.com/a/27142484
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27142484

http://stackoverflow.com/comment/42591333
has text: It's look like [tag:c#]
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27035274
type: QuestionComment

http://stackoverflow.com/comment/42795687
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27150168
has text: please make a jsfiddle or provide all the relevant code
score: 0

plot
tags question: http://stackoverflow.com/q/27003650
tag name: plot
type: Tag

http://stackoverflow.com/comment/42602754
type: AnswerComment
has text: Thanks for reply, Can you please share with me any tutorials where I can learn about these states, begin('TEXT'), popState()
type: Comment
comment on: http://stackoverflow.com/a/27041261
score: 0

http://stackoverflow.com/q/27131217
has body: I'm writing a pure Javascript library to solve a particular problem. I'll be working with potentially large arrays of identical objects. I need to traverse each object to perform actions on the values. I also have to specifically target an older version of Firefox with Spidermonkey. As a simplified overview of how I'm currently doing this: //entry point function doStuff(objArray){ var funcTree = {}; traverse(objArray[0], funcTree); var len = objArray.length; var results = []; for (var i = 0; i &lt; len; i++){ funcTree(objArray[i], results); } } //For the sake of brevity, the traverse() function will traverse the object, //typecheck field values, and set the next function, ie, if it's an array, //it sets tree.next = procArray, or an object gets tree.funcList = [], and for //each field it pushes {next: procFunction, field: [field name]}. It recurses //into arrays/objects to map them function traverse(){} function procObj(obj, tree, results){ for (var i = 0; i &lt; tree.fieldFunctions.length; i++){ tree.fieldFunctions[i].next(obj[tree.fieldFunctions[i].field], tree.fieldFunctions[i].next); } } function procArray(arr, tree, results){ for (var i = 0; i &lt; arr.length; i++){ tree.next.func(arr[i], tree.next, results); } } function procPrimitive(prim, tree, results){ //Do stuff here, place in results, do not recurse or return } Like I said, that's a very simplified version (there are other things going on), but you get the idea. I'm testing this on an array of several thousand simple objects, although it could be much bigger. In Firefox 33, I'm getting 20-25ms. In the older version, 60-65ms. Given that this is a simple test and the data going in could be even larger and more complex, I'd like to crunch that down further, but I'm not sure how. In profiling this, the bulk of the time is spent within the function tree. I've cut that down by splitting procPrimitive into separate methods for each type (string, boolean, number), but that results in a lot of duplicate code, and …
tagged with: performance
score: 0
has comment: http://stackoverflow.com/comment/42761772
has comment: http://stackoverflow.com/comment/42762766
has answer: http://stackoverflow.com/a/27135999
tagged with: firefox
tagged with: javascript
type: UnansweredQuestion
tagged with: optimization
has comment: http://stackoverflow.com/comment/42762036
has title: Javascript optimization: traversing N objects, varying types
tagged with: types
has comment: http://stackoverflow.com/comment/42762561
type: Question
answer count: 1

http://stackoverflow.com/comment/42678302
comment on: http://stackoverflow.com/a/27084634
has text: I totally forgot about closing the Path. You are totally right c: Thank you. And I will take your advice and just avoid it!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27116755
has comment: http://stackoverflow.com/comment/42735937
upvote count: 1
has comment: http://stackoverflow.com/comment/42735961
answers question: http://stackoverflow.com/q/27116748
has comment: http://stackoverflow.com/comment/42735952
downvote count: 0
has comment: http://stackoverflow.com/comment/42735930
has comment: http://stackoverflow.com/comment/42736026
has body: Get rid of target="_blank" &lt;form name="leds" id="ledSend" method="get" action=""&gt;
type: Answer
has comment: http://stackoverflow.com/comment/42736036
has comment: http://stackoverflow.com/comment/42735964
has comment: http://stackoverflow.com/comment/42735973
has comment: http://stackoverflow.com/comment/42735941
score: 1

http://stackoverflow.com/a/27149416
downvote count: 0
has comment: http://stackoverflow.com/comment/42793580
type: Answer
accepted answer of: http://stackoverflow.com/q/27148851
score: 1
answers question: http://stackoverflow.com/q/27148851
has body: I don't know much about mocha but would this work? describe('util', function () { it('should ...', function () { var logg = console.log; console.log = function(m){}; expect(util({})).to.be.true; console.log = logg; }); });
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27041156
has comment: http://stackoverflow.com/comment/42601631
tagged with: ajax
score: 0
has title: Data in table to appear horizontal rather than vertical
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42602774
has comment: http://stackoverflow.com/comment/42631344
type: Question
tagged with: html-table
has answer: http://stackoverflow.com/a/27041281
tagged with: javascript
has body: <!Doctype html? Your guide, to your TV Monday Tuesday Wednesday Thursday Friday Saturday Sunday Daily 1 07.00 08.00 09.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 00.00 Content1 Content2 Content3 Content4 Content5 Content6 Please see above code. The data is being read from an external XML file. The data is currently appearing in a vertical list, but I would like it to appear horizontally in the table. (i.e. Programme Name Specifically to appear in a horizontal list) Any help would be appreciated.
tagged with: jquery

http://stackoverflow.com/comment/42529587
has text: @BarryT.Smith your answer is correct, Kevin was just making things more clear
type: Comment
comment on: http://stackoverflow.com/a/26999617
score: 2
type: AnswerComment

http://stackoverflow.com/comment/42647401
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27066067
has text: No, the javascript is put into the body tag and it displays the links which I am getting from ticket network.
type: AnswerComment

http://stackoverflow.com/comment/42790308
has text: Been off SO for a while and this is the first time I've seen a code snippet! Awesome!!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27147454

http://stackoverflow.com/q/27012823
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has title: jstree plugin & stopPropagation issue
tagged with: jstree
downvote count: 0
score: 1
has body: I am using jstree 3.0.8 for the first time and I have an issue about stopPropagation. When I click on span.nodeInfo, despite the stopPropagation, it stills trigger the event of the parent link. you can see an exemple on jsfiddle : http://jsfiddle.net/CloughyLow/7p0xq698/29/ 1. What I wanna do : I need to put a button on some parts of my tree to trigger an action. Here i use an alert for the tests (at least it would be a dialog). (? in the html below) I want to disable select (deselect_node(data.node) in the js below) And then trigger open/colse on the parents nodes (toggle_node(data.node) on the js below) the last two points of this list are ok. But i can't make the first one work without trigger the third one caus the stopPropagation doesn't seem to work. Do you have an idea about what I'm doing wrong ? 2. What I've done: HTML div id="myTreeview"> title ? My file My file My file title ? My file My file My file JS $('#myTreeview').jstree({}); $('#myTreeview').on('select_node.jstree', function (e, data) { // avoid selection $('#myTreeview').jstree(true).deselect_node(data.node); // trigger open close if (data.node.children.length > 0) { $('#myTreeview').jstree(true).toggle_node(data.node); } //restore links else { var href = data.node.a_attr.href; window.open( href,'_blank' ); } }); // ------------------DOESNT SEEM TO WORK --------------------- //stop propagation for nodeInfo DOESNT SEEM TO WORK $('body').on('click','.nodeInfo', function(event){ event.stopPropagation(); alert('test'); }); you can see an exemple on jsfiddle : http://jsfiddle.net/CloughyLow/7p0xq698/29/ Hope my explanation is ok. Thanks for your help.
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27018449
tagged with: jquery-plugins
tagged with: stoppropagation
has answer: http://stackoverflow.com/a/30686154

http://stackoverflow.com/q/27034240
has comment: http://stackoverflow.com/comment/42589352
type: Question
has title: unable to get div width after append
has body: i have a following structure my append operation like this var container = this._id; var templateContainer = $(" ").attr('id', "template_group_", container); var cloneNode = $("#item").clone(); $(cloneNode).attr("#item" + '_' + "left"); var $cloneNode = $(cloneNode); $cloneNode.css("position", "absolute"); $cloneNode.css("display", "block").appendTo($(templateContainer)); var c = $("#item_left").width();// here i am getting null $(templateContainer).appendTo('#' + container); var d = $("#item_left").width(); // here i am getting 0 var top = 10; $cloneNode.css("top", top).css('cursor', 'pointer'); var a = $("#item" + '_' + "left").width(); // here i am getting 0 here i didn't get the width of the div.. while append the div i unable to get the width but after append if i click or drag that div(item_left) i get the exact width.but, how can i get the width of the div in first time(after append)?
score: -1
has comment: http://stackoverflow.com/comment/42590254
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42589700
favorite count: 0
has answer: http://stackoverflow.com/a/27039387
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42589325
tagged with: css
type: UnansweredQuestion
downvote count: 1

node.js
tags question: http://stackoverflow.com/q/27038798
tags question: http://stackoverflow.com/q/27116473
tags question: http://stackoverflow.com/q/27142487
tags question: http://stackoverflow.com/q/27004272
tags question: http://stackoverflow.com/q/27006363
tags question: http://stackoverflow.com/q/27093512
tags question: http://stackoverflow.com/q/27086483
tags question: http://stackoverflow.com/q/27133757
tags question: http://stackoverflow.com/q/27002486
tags question: http://stackoverflow.com/q/27059555
tags question: http://stackoverflow.com/q/27105351
tags question: http://stackoverflow.com/q/27004960
tags question: http://stackoverflow.com/q/27026227
tags question: http://stackoverflow.com/q/27042058
tags question: http://stackoverflow.com/q/27116978
tags question: http://stackoverflow.com/q/27135613
tags question: http://stackoverflow.com/q/27119394
tags question: http://stackoverflow.com/q/27139988
tags question: http://stackoverflow.com/q/27092601
tags question: http://stackoverflow.com/q/27151993
tags question: http://stackoverflow.com/q/27007445
tags question: http://stackoverflow.com/q/27084822
tags question: http://stackoverflow.com/q/27085269
tags question: http://stackoverflow.com/q/27151774
tags question: http://stackoverflow.com/q/27144918
tags question: http://stackoverflow.com/q/27120430
tags question: http://stackoverflow.com/q/27121510
tags question: http://stackoverflow.com/q/27071545
tags question: http://stackoverflow.com/q/27088876
tags question: http://stackoverflow.com/q/27081759
tags question: http://stackoverflow.com/q/27046500
tags question: http://stackoverflow.com/q/27114454
tags question: http://stackoverflow.com/q/27049241
tags question: http://stackoverflow.com/q/27117104
tags question: http://stackoverflow.com/q/27142657
tags question: http://stackoverflow.com/q/27131613
tags question: http://stackoverflow.com/q/26996333
tags question: http://stackoverflow.com/q/27023181
tags question: http://stackoverflow.com/q/27111552
tags question: http://stackoverflow.com/q/27045849
tags question: http://stackoverflow.com/q/27139326
tags question: http://stackoverflow.com/q/27124531
tags question: http://stackoverflow.com/q/27097547
tags question: http://stackoverflow.com/q/27080653
tags question: http://stackoverflow.com/q/27140372
tags question: http://stackoverflow.com/q/27083797
tags question: http://stackoverflow.com/q/27137007
tags question: http://stackoverflow.com/q/27008999
tags question: http://stackoverflow.com/q/27043616
tags question: http://stackoverflow.com/q/27115729
tags question: http://stackoverflow.com/q/27032953
tags question: http://stackoverflow.com/q/27147115
tags question: http://stackoverflow.com/q/27062274
tags question: http://stackoverflow.com/q/27123152
tags question: http://stackoverflow.com/q/27070733
tags question: http://stackoverflow.com/q/27031194
tags question: http://stackoverflow.com/q/27026062
tags question: http://stackoverflow.com/q/27062066
tags question: http://stackoverflow.com/q/27010978
tags question: http://stackoverflow.com/q/27052480
tags question: http://stackoverflow.com/q/27081866
tags question: http://stackoverflow.com/q/27044459
tags question: http://stackoverflow.com/q/26998033
tags question: http://stackoverflow.com/q/27124110
tags question: http://stackoverflow.com/q/27009401
tags question: http://stackoverflow.com/q/27032468
tags question: http://stackoverflow.com/q/27036790
tags question: http://stackoverflow.com/q/27102639
tags question: http://stackoverflow.com/q/27081341
tags question: http://stackoverflow.com/q/27123264
tags question: http://stackoverflow.com/q/27051116
tags question: http://stackoverflow.com/q/27058516
tags question: http://stackoverflow.com/q/27120815
tags question: http://stackoverflow.com/q/27101240
tags question: http://stackoverflow.com/q/27138594
tags question: http://stackoverflow.com/q/27030159
tags question: http://stackoverflow.com/q/27150256
tags question: http://stackoverflow.com/q/27072671
tags question: http://stackoverflow.com/q/27023988
tags question: http://stackoverflow.com/q/26993067

http://stackoverflow.com/q/27106494
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27107773
answer count: 1
downvote count: 0
favorite count: 0
has body: hi i try to run the basic example of jspanel 2 but the weight is overflow this is the code: jsPanel Try it this is the pluggin http://jspanel.de/ any jsfiddle example?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27107773
score: 1
upvote count: 1
has title: simple example jspanel 2

http://stackoverflow.com/comment/42679390
has text: This doesn't appear to continually update like I want. Does the method get destroyed after it renders?
score: 0
comment on: http://stackoverflow.com/a/27084476
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27138570
score: 1
upvote count: 1
has body: Variables can store references to functions in Javascript. So I would have function1 set some internal variable that would be checked when you close the modal: var calledBy; function1 () { calledBy = function1; //open modal } function2 () { calledBy = function2; //open modal } $("closeButton").on("click", function () { if(calledBy === function1) { //... } else if(calledBy === function2) { //... } }); But as hyperstack pointed out, it's better organization to have one function for opening the modal and pass in an argument. I would have an object for the modal: var modal = { //... calledBy: null, open: functio (calledBy) { this.calledBy = calledBy; } };
downvote count: 0
answers question: http://stackoverflow.com/q/27138484
type: Answer

http://stackoverflow.com/comment/42747701
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27123584
score: 0
has text: Without max-width it works fine?

http://stackoverflow.com/a/37640399
answers question: http://stackoverflow.com/q/27099028
upvote count: 5
has body: The decoupling via Command pattern is essential in the static typed languages like Java, c++, c#. But it is not so important in the dynamic typed languages like JavaScript because we can pass around any methods quite freely. So I also don't see advantages regarding this. But Command has other characteristics that weren't mentioned in the book for example Command can serve as single source of truth for actions in the system and we can log what is going on in the system, we can create possibility for graceful rollback mechanics, create queues for commands if needed etc. By the way whole Redux architecture is actually Command pattern where: The Store = The Receiver The Action = The Command Dispatch = Executor P.S. I found it useful to read Addy's book along GoF book.
type: Answer
downvote count: 0
score: 5

http://stackoverflow.com/q/27136662
possible better answer: http://stackoverflow.com/a/30626240
has answer: http://stackoverflow.com/a/30626240
tagged with: javascript
has answer: http://stackoverflow.com/a/27137784
tagged with: image
has answer: http://stackoverflow.com/a/27136765
has comment: http://stackoverflow.com/comment/42772232
has answer: http://stackoverflow.com/a/27137468
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27152840
has title: How can count all images on a page with JavaScript (including CSS and img)
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has body: It's trivial to get the &lt;img&gt; elements on a page with JavaScript: document.images document.getElementsByTagName('img') But is there a (reasonably easy) way to get all images loaded on the page? I've considered looping through all elements using querySelectorAll('*') and checking their style.background and style.backgroundImage properties for url, then combining that with the html image elements. Is that approach my only choice? Will that catch everything? I imagine there are edge cases with images loaded by JavaScript, new HTML5 image elements (picture, ...). I'm not yet sure how I want to handle data-uri images or SVG, but if an answer covered that, it'd probably be a good thing.
tagged with: css
has comment: http://stackoverflow.com/comment/42772402
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/27152840
type: Question

http://stackoverflow.com/q/27135559
tagged with: javascript
has comment: http://stackoverflow.com/comment/42769369
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/42769471
has comment: http://stackoverflow.com/comment/42769362
answer count: 1
has comment: http://stackoverflow.com/comment/42769510
has answer: http://stackoverflow.com/a/27135911
has title: Java servlet doGet() not refreshing after first call
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/42769449
has comment: http://stackoverflow.com/comment/42769413
accepted answer: http://stackoverflow.com/a/27135911
tagged with: servlets
has comment: http://stackoverflow.com/comment/42769382
type: Question
has body: I am making AJAX calls to a Java servlet at a set interval. Inside the doGet it querys a DB, puts the results in JSON format, and returns them. This works great on the first try (when the page is first loaded or refreshed) but at every ajax call after it returns the same data as the first call even if things were added. Servlet: @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("in"); Connection con = null; Statement stmt = null; try { Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection( DB_URL, USER, PASS); stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("Select * from chatroom"); JSONObject jsonPosts = new JSONObject(); JSONArray postList = new JSONArray(); JSONObject post; while (rs.next()) { post = new JSONObject(); post.put("user", rs.getString("user")); post.put("text", rs.getString("text")); post.put("time", rs.getString("time")); postList.add(post); } System.out.println(postList.toString()); response.setContentType("application/json"); response.getWriter().write(postList.toString()); stmt.close(); con.close(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch (SQLException sqe) { sqe.printStackTrace(); } } Javascript: setInterval(function () { getChat(); }, 6000); function getChat() { var posts; $.ajax({ type: "GET", url: "getChat", data: "position=hi", datatype: "json", success: function (data) { for (var i = 0; i &lt; data.length; i++) { $("#chatWindow").append(data[i].text + "&lt;br/&gt;"); } } }); }

http://stackoverflow.com/comment/42650422
score: 0
type: AnswerComment
type: Comment
has text: Thanks for replying @AlexisPeters This works, it changes my font color with one button. But how can I make the button change to the name "Red" when the text goes green?
comment on: http://stackoverflow.com/a/27068468

http://stackoverflow.com/a/27053794
accepted answer of: http://stackoverflow.com/q/27053182
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27053182
has comment: http://stackoverflow.com/comment/42624764
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: perhaps simpler solution http://jsfiddle.net/goqqosf8/2/ $(document).ready(function(){ $('#movies div').hide(); //hides movie content in the beginning $('input[type="checkbox"]').click(function(){ select() }) }); function select() { $('#movies div').hide(); var $div=$('#movies div'); var check=false; $('input[type="checkbox"]:checked').each(function(){ var css=$(this).val(); $div=$div.filter('.'+css); check=true; }) if(check==true) $div.show(); }

http://stackoverflow.com/q/27101326
type: AnsweredQuestion
tagged with: authentication
has answer: http://stackoverflow.com/a/27101404
accepted answer: http://stackoverflow.com/a/27101404
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: facebook-graph-api
has body: I want to make a Google and Facebook authentication on my application. I am using AngularJS on my front-end and node.js on my server. Here is my Facebook authentication function on my node.js server: var User = require('./user.js'), request = require('request'), env = process.env.NODE_ENV = process.env.NODE_ENV || 'development', config = require('./config.js')[env], createSendToken = require('./jwt.js'), qs = require('querystring'); module.exports = function (req, res) { var accessTokenUrl = 'https://graph.facebook.com/oauth/access_token'; var graphApiUrl = 'https://graph.facebook.com/me'; var params = { client_id: req.body.clientId, redirect_uri: req.body.redirectUri, client_secret: config.facebookAuth.clientSecret, code: req.body.code }; console.log(req.body.code); request.get({ url: accessTokenUrl, qs: params }, function (err, response, accessToken) { accessToken = qs.parse(accessToken); request.get({ url: graphApiUrl, qs: accessToken, json: true }, function (err, response, profile) { User.findOne({ facebookId: profile.id // &lt;-- fails here }, function (err, existingUser) { if (existingUser) return createSendToken(existingUser, res); var newUser = new User(); newUser.facebookId = profile.id; newUser.displayName = profile.name; newUser.email = profile.email; newUser.save(function (err) { createSendToken(newUser, res); }) }) }); }); } Then assigns to this post: app.post('/auth/facebook', facebookAuth); Front-end is working correctly ( I'm using satellizer ). I did almost the same thing with Google+ and it works fine but with Facebook it isn't. My Facebook app is configured correctly ( I have added http://localhost:3030/ to website URL and mobile website URL ). Now when I run my app and press Facebook button, I get the following error on the server: facebookId: profile.id ^ TypeError: Cannot read property 'id' of undefined So that means that profile is undefined: }, function (err, response, profile) { Why did Facebook returned me an undefined profile? How can I fi…
tagged with: angularjs
has title: Node.js: Facebook returns me undefined instead of profile?
tagged with: node.js

http://stackoverflow.com/q/27123110
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has comment: http://stackoverflow.com/comment/42747038
linked to: http://stackoverflow.com/q/5404775
type: Question
has comment: http://stackoverflow.com/comment/42746975
tagged with: hover
has answer: http://stackoverflow.com/a/27123257
accepted answer: http://stackoverflow.com/a/27126736
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27123544
has comment: http://stackoverflow.com/comment/42746898
has answer: http://stackoverflow.com/a/27123280
has answer: http://stackoverflow.com/a/27126736
has title: Switching between two spans in a div on hover
has comment: http://stackoverflow.com/comment/42750588
tagged with: function
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42746943
has answer: http://stackoverflow.com/a/27123544
duplicate of: http://stackoverflow.com/q/5404775
score: 0
has body: What i try to achieve is as follows: I have a div with inserted two span's. span A and span B. By default I want span A to be visible and span B to be invisible. When you hover over the div I want span A to be replaced by span B. See the following: Plnkr 20 80% $(".answer").hover(function(){ $(".b").toggleClass(".visible"); });

http://stackoverflow.com/a/66469426
score: 1
upvote count: 1
has body: Sometimes it works after using $(window).on("load",()=>{ $("#lightslider").lightSlider({}) } Otherwise the elements with .clone class are not rendered properly.
answers question: http://stackoverflow.com/q/27140556
downvote count: 0
type: Answer

http://stackoverflow.com/a/27140715
has body: How about using localStorage ?? $("#expandiconup").click(function () { localStorage.setItem("tabvisible", false); }); $("#expandicondown").click(function () { localStorage.setItem("tabvisible", true); }); Then on load of the new page, verify for this value if (localStorage.getItem("tabvisible") == true) { //display header } else { //hide header }
has comment: http://stackoverflow.com/comment/42815151
accepted answer of: http://stackoverflow.com/q/27139973
score: 0
has comment: http://stackoverflow.com/comment/42816178
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27139973
type: Answer

arrays
tags question: http://stackoverflow.com/q/27063140
tags question: http://stackoverflow.com/q/27105631
tags question: http://stackoverflow.com/q/27097757
tags question: http://stackoverflow.com/q/27046587
tags question: http://stackoverflow.com/q/27004743
tags question: http://stackoverflow.com/q/27151323
tags question: http://stackoverflow.com/q/27116696
tags question: http://stackoverflow.com/q/27057582
tags question: http://stackoverflow.com/q/27140838
tags question: http://stackoverflow.com/q/27053633
tags question: http://stackoverflow.com/q/27026567
tags question: http://stackoverflow.com/q/26993348
tags question: http://stackoverflow.com/q/27149601
tags question: http://stackoverflow.com/q/26992706
tags question: http://stackoverflow.com/q/27143720
tags question: http://stackoverflow.com/q/27034034
tags question: http://stackoverflow.com/q/27009112
type: Tag
tags question: http://stackoverflow.com/q/27026684
tags question: http://stackoverflow.com/q/27142767
tags question: http://stackoverflow.com/q/27113329
tags question: http://stackoverflow.com/q/27124001
tags question: http://stackoverflow.com/q/27078668
tags question: http://stackoverflow.com/q/27117752
tags question: http://stackoverflow.com/q/27135966
tags question: http://stackoverflow.com/q/27008997
tags question: http://stackoverflow.com/q/27092688
tags question: http://stackoverflow.com/q/27146214
tags question: http://stackoverflow.com/q/27071042
tags question: http://stackoverflow.com/q/27146231
tags question: http://stackoverflow.com/q/27023870
tags question: http://stackoverflow.com/q/27132449
tags question: http://stackoverflow.com/q/27002184
tags question: http://stackoverflow.com/q/27066785
tags question: http://stackoverflow.com/q/27095437
tags question: http://stackoverflow.com/q/27018949
tags question: http://stackoverflow.com/q/27091754
tags question: http://stackoverflow.com/q/27103533
tags question: http://stackoverflow.com/q/27137919
tags question: http://stackoverflow.com/q/27147105
tags question: http://stackoverflow.com/q/27096820
tags question: http://stackoverflow.com/q/27033763
tags question: http://stackoverflow.com/q/27057567
tags question: http://stackoverflow.com/q/27056109
tags question: http://stackoverflow.com/q/27107563
tags question: http://stackoverflow.com/q/27110699
tags question: http://stackoverflow.com/q/27090868
tags question: http://stackoverflow.com/q/27063269
tags question: http://stackoverflow.com/q/27024000
tags question: http://stackoverflow.com/q/26993273
tags question: http://stackoverflow.com/q/27120664
tags question: http://stackoverflow.com/q/27139880
tags question: http://stackoverflow.com/q/27002871
tags question: http://stackoverflow.com/q/27129982
tags question: http://stackoverflow.com/q/26999747
tags question: http://stackoverflow.com/q/27051376
tags question: http://stackoverflow.com/q/27018468
tags question: http://stackoverflow.com/q/27011366
tags question: http://stackoverflow.com/q/27069900
tags question: http://stackoverflow.com/q/27009002
tags question: http://stackoverflow.com/q/27027808
tags question: http://stackoverflow.com/q/27071942
tags question: http://stackoverflow.com/q/27041149
tags question: http://stackoverflow.com/q/27012705
tags question: http://stackoverflow.com/q/27031289
tags question: http://stackoverflow.com/q/27044618
tags question: http://stackoverflow.com/q/27115283
tags question: http://stackoverflow.com/q/27071720
tags question: http://stackoverflow.com/q/27121510
tags question: http://stackoverflow.com/q/27088876
tags question: http://stackoverflow.com/q/27086691
tags question: http://stackoverflow.com/q/27003183
tags question: http://stackoverflow.com/q/27138332
tags question: http://stackoverflow.com/q/27105536
tags question: http://stackoverflow.com/q/27123511
tags question: http://stackoverflow.com/q/27140934
tags question: http://stackoverflow.com/q/27113200
tags question: http://stackoverflow.com/q/27091427
tags question: http://stackoverflow.com/q/27054487
tags question: http://stackoverflow.com/q/27133645

http://stackoverflow.com/q/27021624
score: 0
linked to: http://stackoverflow.com/q/9371195
type: Question
tagged with: ember-data
tagged with: javascript
has answer: http://stackoverflow.com/a/27022343
answer count: 1
has title: Ember js, URL state for group edit
has comment: http://stackoverflow.com/comment/42568645
type: UnansweredQuestion
tagged with: ember.js
linked to: http://stackoverflow.com/q/4541338
has body: As says Ember's ideology: "Every application state should be shown in url". And I don't have an idea how to represent state in url for group actions on models? As example I have edit action for song, url for this is: http://myapplication.com/song/123/edit But I need to have functionality for group edit. How it should represent in url? May be something like this? http://myapplication.com/song/123,124,125,126/edit Thanks a lot for any suggestion

http://stackoverflow.com/a/27005061
has comment: http://stackoverflow.com/comment/42539331
answers question: http://stackoverflow.com/q/27004921
has body: Try using the full URL path in the src attribute value. src="http://domain.com/path/to/images/Panel/Sayfalar/UstBanner/..." Instead of using a relative URI. Additionally ensure you have uploaded the images to their respective directories and they have a 644 permission bit (publicly accessible). You can also validate the existence of the image path prior to echoing it. while($y = mysql_fetch_object($sor)){ if(false === is_file('/path/to/images/Panel/Sayfalar/UstBanner/' . $y-&gt;resim){ continue; } //put your echo or other function if the file exists here. }
upvote count: 2
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/42539709
downvote count: 1

http://stackoverflow.com/comment/42589024
comment on: http://stackoverflow.com/q/27033170
type: Comment
type: QuestionComment
has text: $.each(file, function(key, value) { formData.append(key, value); });
score: 0

http://stackoverflow.com/comment/42828303
type: Comment
has text: LOL, I solved the problem, it was a javascript library that is conflicting thks
score: 0
comment on: http://stackoverflow.com/q/27148712
type: QuestionComment

http://stackoverflow.com/a/27222192
has comment: http://stackoverflow.com/comment/42954397
score: 1
has comment: http://stackoverflow.com/comment/42957521
has comment: http://stackoverflow.com/comment/42956794
upvote count: 1
has comment: http://stackoverflow.com/comment/42983223
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27113512
has body: Load angular-animate.min.js in your HTML. Add ngAnimate into your module dependencies. Add a class to your payment directive element: e.g. &lt;payment class="my-animation" ...&gt;&lt;/payment&gt;. Add the following CSS (referencing your class in step 3): .my-animation.ng-leave { opacity: 1; transition: opacity 300ms linear; } .my-animation.ng-leave.ng-leave-active { opacity: 0; transition: opacity 300ms linear; } Celebrate
has comment: http://stackoverflow.com/comment/42939020

http://stackoverflow.com/q/27069822
has comment: http://stackoverflow.com/comment/42721069
has comment: http://stackoverflow.com/comment/42721213
type: AnsweredQuestion
upvote count: 0
has body: I had an array in PHP vars = array('Date','Name','Number'); Using the "vars" array I could create more arrays using the names in the list: for($i = 0; $i &lt; count($vars); $i++){ ${$vars[$i]} = "Something"; } Now, I have an array in JavaScript and I want to do the same: create variables using a list' names in a loop. This variables are going to be arrays and I just can't use a common array for all the variables. What can I do? I know it's possible to do "variable" variables in JavaScript: var obj = {} obj.foo = 42; var bar = 'foo'; console.log(obj[bar]); But I don't know how to use it in a loop from another array
linked to: http://stackoverflow.com/q/5117127
tagged with: php
possible better answer: http://stackoverflow.com/a/27109090
type: Question
has answer: http://stackoverflow.com/a/27109090
has comment: http://stackoverflow.com/comment/42720847
score: -2
has comment: http://stackoverflow.com/comment/42721793
linked to: http://stackoverflow.com/q/6645067
accepted answer: http://stackoverflow.com/a/27109066
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42720920
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42721579
has comment: http://stackoverflow.com/comment/42720878
favorite count: 0
has answer: http://stackoverflow.com/a/27109066
has title: Create variables in a JavaScript loop
linked to: http://stackoverflow.com/q/5187530

http://stackoverflow.com/q/26996072
has answer: http://stackoverflow.com/a/26996147
has answer: http://stackoverflow.com/a/26996136
type: AnsweredQuestion
score: 2
has title: Why keep project dependencies current?
type: Question
possible better answer: http://stackoverflow.com/a/26996452
has answer: http://stackoverflow.com/a/26996452
downvote count: 0
accepted answer: http://stackoverflow.com/a/26996136
tagged with: javascript
answer count: 3
has body: I've seen https://david-dm.org/ tags on github repos, and I noticed some of my projects have really out of date dependencies, but technically my code is fine without updating. What are some solid reasons for keeping your dependencies current?
favorite count: 0
tagged with: npm
upvote count: 2

javascript
tags question: http://stackoverflow.com/q/27151668
tags question: http://stackoverflow.com/q/27045911
tags question: http://stackoverflow.com/q/27111414
tags question: http://stackoverflow.com/q/27041460
tags question: http://stackoverflow.com/q/27110375
tags question: http://stackoverflow.com/q/27093943
tags question: http://stackoverflow.com/q/27093557
tags question: http://stackoverflow.com/q/27032463
tags question: http://stackoverflow.com/q/27043273
tags question: http://stackoverflow.com/q/27036937
tags question: http://stackoverflow.com/q/27070533
tags question: http://stackoverflow.com/q/27011001
tags question: http://stackoverflow.com/q/27087902
tags question: http://stackoverflow.com/q/27104884
tags question: http://stackoverflow.com/q/27110701
tags question: http://stackoverflow.com/q/27133852
tags question: http://stackoverflow.com/q/27070717
tags question: http://stackoverflow.com/q/27106999
tags question: http://stackoverflow.com/q/27140639
tags question: http://stackoverflow.com/q/27116069
tags question: http://stackoverflow.com/q/27145572
tags question: http://stackoverflow.com/q/27109783
tags question: http://stackoverflow.com/q/27139331
tags question: http://stackoverflow.com/q/27027699
tags question: http://stackoverflow.com/q/27042683
tags question: http://stackoverflow.com/q/27088058
tags question: http://stackoverflow.com/q/27043230
tags question: http://stackoverflow.com/q/26997409
tags question: http://stackoverflow.com/q/27111611
tags question: http://stackoverflow.com/q/27038492
tags question: http://stackoverflow.com/q/27026642
tags question: http://stackoverflow.com/q/27108725
tags question: http://stackoverflow.com/q/27019010
tags question: http://stackoverflow.com/q/27031042
tags question: http://stackoverflow.com/q/27037147
tags question: http://stackoverflow.com/q/27125634
tags question: http://stackoverflow.com/q/27035113
tags question: http://stackoverflow.com/q/27043911
tags question: http://stackoverflow.com/q/27117071
tags question: http://stackoverflow.com/q/27151774
tags question: http://stackoverflow.com/q/27048368
tags question: http://stackoverflow.com/q/27059272
tags question: http://stackoverflow.com/q/27073285
tags question: http://stackoverflow.com/q/27127087
tags question: http://stackoverflow.com/q/27141817
tags question: http://stackoverflow.com/q/27052624
tags question: http://stackoverflow.com/q/27078758
tags question: http://stackoverflow.com/q/27070677
tags question: http://stackoverflow.com/q/27001309
tags question: http://stackoverflow.com/q/27026629
tags question: http://stackoverflow.com/q/27136796
tags question: http://stackoverflow.com/q/27105092
tags question: http://stackoverflow.com/q/27093062
tags question: http://stackoverflow.com/q/27007367
tags question: http://stackoverflow.com/q/27075638
tags question: http://stackoverflow.com/q/27132952
tags question: http://stackoverflow.com/q/27053755
tags question: http://stackoverflow.com/q/27109639
tags question: http://stackoverflow.com/q/27086280
tags question: http://stackoverflow.com/q/27110144
tags question: http://stackoverflow.com/q/27018022
tags question: http://stackoverflow.com/q/27097975
tags question: http://stackoverflow.com/q/27017270
tags question: http://stackoverflow.com/q/27087453
tags question: http://stackoverflow.com/q/26995042
tags question: http://stackoverflow.com/q/27068667
tags question: http://stackoverflow.com/q/27111211
tags question: http://stackoverflow.com/q/27142137
tags question: http://stackoverflow.com/q/27078039
tags question: http://stackoverflow.com/q/27034580
tags question: http://stackoverflow.com/q/27007698
tags question: http://stackoverflow.com/q/27113512
tags question: http://stackoverflow.com/q/27085700
tags question: http://stackoverflow.com/q/27039502
tags question: http://stackoverflow.com/q/27116138
tags question: http://stackoverflow.com/q/27085213
tags question: http://stackoverflow.com/q/27121320
tags question: http://stackoverflow.com/q/27109692
tags question: http://stackoverflow.com/q/27010499
tags question: http://stackoverflow.com/q/27109039

http://stackoverflow.com/q/27037378
has comment: http://stackoverflow.com/comment/42594865
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/27041758
has answer: http://stackoverflow.com/a/27038509
has title: How to merge two .csv files in javascript?
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/42595881
favorite count: 0
linked to: http://stackoverflow.com/q/15700658
type: Question
tagged with: http://stackoverflow.com/tag/csv
accepted answer: http://stackoverflow.com/a/27038509
has body: I have two .csv files like that example: date,type,brand,model,price 2014-11-27, electric, tesla, model s , 100000 2014-11-27, diesel, bmw, m3, 90000 2014-12-13, hybrid, toyota, yaris , 20000 How can I merge these files for make only one object? Two files has the first row with names of columns, it's possible to delete? Or add it if I get the files without that first row?
tagged with: d3.js

http://stackoverflow.com/q/27012556
type: Question
has comment: http://stackoverflow.com/comment/42551532
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/27012954
upvote count: 10
has body: I wanna synchronized functions just like jQuery's $.ajax({ .., async: false, .. });. function A() { lalala .. }; function B() { dadada .. }; function C() { .. }; , those all including some effect like fadeIn, Out, slide... etc. However I just found if those functions called like below.. A(); B(); C(); All effect start at almost same time. In my understanding, this happens because the function called synchronously but it doesn't mean that function B() started after function A() was completely finished.. right? Then, how can I make those functions work in order? I found a way use callback function but it's not enough for me..
has title: Make synchronous function in javascript?
has comment: http://stackoverflow.com/comment/42551597
downvote count: 0
has answer: http://stackoverflow.com/a/27012831
accepted answer: http://stackoverflow.com/a/27012831
duplicate of: http://stackoverflow.com/q/5187968
type: AnsweredQuestion
tagged with: synchronous
possible better answer: http://stackoverflow.com/a/27012954
score: 10
linked to: http://stackoverflow.com/q/5187968
has comment: http://stackoverflow.com/comment/42551605
has answer: http://stackoverflow.com/a/27012672

http://stackoverflow.com/q/27105168
tagged with: javascript
has title: Downloads with redirect with CasperJS?
downvote count: 0
has body: Behind an Extranet website, which requires login, I need to download a statistical report that's generated by a php url with parameters https://extranet.com/report.php?date_start=AAAAMMJJ&amp;date_end=AAAAMMJJ This launches another URL that gives the file : https://extranet.com/export.php?f=Report_datetime.xlsx But this URL only exist just to get the excel file. If I relaunch that export url, it's blank I had no problem to login with CasperJS I did this casper.thenOpen('https://extranet.com/report.php?date_start=AAAAMMJJ&amp;date_end=AAAAMMJJ', function() { casper.download('https://extranet.com/export.php?f=Report_datetime.xlsx','report.xlsx'); }); But this results in a blank file I also tried casper.download('https://extranet.com/report.php?date_start=AAAAMMJJ&amp;date_end=AAAAMMJJ', 'report.xlsx'); Which resulted in a file containing only the headers. I'm stuck. I wish CasperJS had a default_download folder where it would download file automatically like a browser.
favorite count: 0
tagged with: download
has comment: http://stackoverflow.com/comment/42842240
type: UnansweredQuestion
score: 2
tagged with: casperjs
answer count: 0
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/42740255

http://stackoverflow.com/comment/42574987
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27025534
has text: So should I create a sitemap on the server side and then make the request from the angular end to get the next link?
score: 0

http://stackoverflow.com/q/27107806
accepted answer: http://stackoverflow.com/a/27122945
tagged with: php
type: AnsweredQuestion
has title: How to show a box for comment reply with id
has body: My reply only work in last/new comment. if i reply others comment its show a blank space only in text area. Test case: If I REPLACE REPLY FORM AT THE END of wall.php page, apply css display:block to show it always, click a reply button for parent id and submit after write any text then it work but click to reply button cannot open to it's own reply form. How to open my reply form with each comment if I replace it at end of page? wall.php (current case: as above link which not save any textarea data of old comments) script type='text/javascript'> $(function(){ $("a.reply").click(function() { var id = $(this).attr("id"); $("#parent_id").attr("value", id); }); }); global $dbh; $results = mysqli_query($dbh,"SELECT * FROM comments_lite WHERE qazi_id='$tutid' ORDER BY id DESC LIMIT 5") or die(mysqli_error($dbh)); //find the number of comments list($commentNum) = mysqli_fetch_array(mysqli_query($dbh,"SELECT COUNT(*) FROM comments_lite WHERE qazi_id='$tutid'")); echo' <comment>'; while($rows = mysqli_fetch_array($results)) { $id = $rows['id']; $qazi_id = $rows['qazi_id']; $likes = $rows['likes']; $username = $rows['username']; $img = $rows['img']; $description = $rows['description']; $url = $rows['url']; $parent_id = $rows['parent_id']; $date = $rows['date']; echo' '; if ($url=="") { echo' '.$username.' Says: '; } else echo' '.$username.' Says: '; echo''.$date.' '; if ($description=="") {echo '';} else echo''.htmlentities($description).' '; echo ' '; //reply echo' Reply '; //Likes echo' '; // Only Reply $query = "SELECT * FROM comments_reply WHERE parent_id ='".$id."' ORDER BY id DESC"; $res = mysqli_query($dbh,$query); while($row = mysqli_fetch_array($res)){ $id = $row['id']; $qazi_id = $row['qazi_id']; $likes = $row['likes']; $username = $row['username']; $img = $row['img']; $description = $row['description']; $url = $row['url']; $parent_id = $row['parent_id']; $date = $row['date']; echo' <replycomment> '; if ($url=="") { echo' '.$username.' Says: '; } else echo' '.$usern…
possible better answer: http://stackoverflow.com/a/27108585
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27108585
has answer: http://stackoverflow.com/a/27122945
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27146901
has answer: http://stackoverflow.com/a/27147099
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27147110
has answer: http://stackoverflow.com/a/27147110
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: setinterval
answer count: 4
has title: setInverval runs only once
favorite count: 0
has answer: http://stackoverflow.com/a/27147114
upvote count: 1
accepted answer: http://stackoverflow.com/a/27147114
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27147698
has body: I have a problem with my setInterval. I am working on somesort of news thingy which shows the next news item every x seconds. I am using a setInterval for that. My problem is the following: I have set an interval inside a function. When the DOM is loaded, I run that function. The interval, inside the function, starts to run. When I put something like an alert or a log inside the interval, everything is just fine. But when I put something else in it, the interval only runs once. This is the the whole function: var initNews = function () { var captions = $('#newsContainer').find('.newsCaptionContainer .caption'), newsImages = $('#newsContainer').find('.newsImageContainer .newsImage'), newsCount = captions.length, selectedNews = $('#newsContainer').find('.newsCaptionContainer li.selected'), firstNews = captions.first(); var triggerNextNewsitem = function () { if((selectedNews.prev().index() + 1) == newsCount) { firstNews.trigger('click'); } else { selectedNews.next().trigger("click"); } }; var interval = setInterval(triggerNextNewsitem, 5000); captions.on('click', function () { if($(this).hasClass('selected')) { return; } else { captions.removeClass('selected'); } $(this).addClass('selected'); }); $('#newsContainer').on('mouseover', function () { clearInterval(interval); console.log('Interval disabled'); }).on('mouseleave', function () { setInterval(triggerNextNewsitem, 5000) console.log('Interval enabled'); }); }; Basically, I have a few divs with the class "caption". The first div has the class "selected" by default (given inside my html doc). The interval has to be ran every 5 seconds to find the next div.caption and that one has to be clicked to show a new newsitem (the interval only does this once). When #newsContainer is hovered, the interval stops so the next newsitem won't show automatically. The interval works with an alert or something. Does anyone know why this is happening with this code? Tips are welcome how I can improve the code (I am not that good in jQ…
score: 1
type: Question

http://stackoverflow.com/comment/42741768
type: Comment
has text: Again, thanks for your help @twain. Will try that as I am not much into programming :(
comment on: http://stackoverflow.com/a/27119995
type: AnswerComment
score: 0

http://stackoverflow.com/q/27113512
has answer: http://stackoverflow.com/a/27221412
favorite count: 0
has answer: http://stackoverflow.com/a/27240466
tagged with: angularjs
answer count: 3
has comment: http://stackoverflow.com/comment/42921217
has answer: http://stackoverflow.com/a/27222192
tagged with: animation
has title: Angular way to do an Element Directive animation when Object is deleted?
has comment: http://stackoverflow.com/comment/42957391
score: 2
tagged with: ng-animate
upvote count: 3
accepted answer: http://stackoverflow.com/a/27240466
has comment: http://stackoverflow.com/comment/42920900
downvote count: 1
type: AnsweredQuestion
has body: I'm rendering an scoped Array of Objects(payments in this case), and passing each one to a payment Directive like this: This works really well! So when I delete an element from the scoped Array from the controller like this: app.controller('PaymentsController', function($scope) { //The Payments Array(each object passed to a Directive) $scope.payments = [ { id: 1, amount: 10 }, { id: 2, amount: 15 } ]; $scope.deletePayment = function(index) { //This deletes the Array Element and removes associated //Directive template from the DOM $scope.payments.splice(index, 1); } }); The CSS (uses compass mixins for simplicity) .payment.ng-enter { @include transition(all 2s ease-out); opacity: 0; } .payment.ng-enter-active { opacity: 1; } .payment.ng-leave { @include transition(all 2s ease-out); } .payment.ng-leave-active { opacity: 0; } Again, the above works as expected, I delete an element from the payments Array and the directive-template/view corresponding to the deleted Array element is removed from the DOM, This is PERFECT, except for the fact it's removed instantly! EDIT: The reason the animations like fadeOut don't work and the result is that the ( < payment > ) is removed instantly(after a specified time in the CSS) is that the animation is acting over the ( < payment >) custom tag, which is just a wrapper for the actual element. Directive JS definition: (function() { var app = angular.module('paymentDirectives', []); app.directive('payment', function() { return { restrict: 'E', scope: { payment: '=data' }, templateUrl: 'partials/payment.html' }; }); })(); The animation should act on the template referenced/wrapped by the directive custom tag( < payment > ) partials/payment.html {{payment.amount}} In this case it would be the div with class="a-payment" of course and when the animation is complete it should then remove the payment tag element What is the Angular way(for the latest version) to do an animation for this case(ie. Element Directive is removed from the DOM)? Th…
has comment: http://stackoverflow.com/comment/42954072
type: Question
has comment: http://stackoverflow.com/comment/42956752
possible better answer: http://stackoverflow.com/a/27221412
has comment: http://stackoverflow.com/comment/42957576
tagged with: javascript
has comment: http://stackoverflow.com/comment/42983051

http://stackoverflow.com/comment/42926629
type: QuestionComment
has text: @DhirajBodicherla I am using v0.11.1-linux-x64 node-webkit and I node is v0.10.33
comment on: http://stackoverflow.com/q/27120815
score: 0
type: Comment

http://stackoverflow.com/comment/42610455
comment on: http://stackoverflow.com/a/27045187
score: 1
type: AnswerComment
type: Comment
has text: well in every chain you are returning a promise, it could be in a state of resolved, not resolved and rejected, once you resolve a promise you can pass the data within the resolve itself that way you are going to be able to get it in the appropriate 'then' (which is the even that get fired when you resolve your promise), just be careful to don't over do promises you can get trapped into an antipattern

http://stackoverflow.com/a/27121164
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27121085
has body: As the elements are created in while loop may be your class='start' element remains undetected. Try this.. $(document).ready(function(){ $(document).on('click','.start',function(){ $(this).removeClass("start"); return false; }); });

http://stackoverflow.com/a/27087482
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27087396
upvote count: 2
type: Answer
score: 1
downvote count: 1
has body: Try changing to onclick=\"editRow('" + item.id + "')\"/&gt;
accepted answer of: http://stackoverflow.com/q/27087396

http://stackoverflow.com/q/27012217
accepted answer: http://stackoverflow.com/a/27012259
score: 0
has comment: http://stackoverflow.com/comment/42565264
possible better answer: http://stackoverflow.com/a/27012284
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42550995
has answer: http://stackoverflow.com/a/27012284
type: Question
answer count: 2
tagged with: javascript
has title: Javascript popover loop not displaying
tagged with: popover
has answer: http://stackoverflow.com/a/27012259
has body: I'm trying to make a loop, to display some link with popover javascript. This is what i have accueil_hover.js $(document).ready(function(){ $('#popoverOption').popover({ trigger: "hover" }); }); accueil_blade.php (assuming the data passed as argument are OK) @for ($i = 0 ; $i < count($etablissements); $i ++) code_etablissement}}" data-placement="bottom" href="{{ URL::to('dashboard_etablissement/' . $etablissements[$i]->code_etablissement)}}">{{$etablissements[$i]->nom}} @endfor But the popover won't show. I guess this is because all my links are having the same ID But how can i make it different for javascript to understand ? something like : popoverOption.$i ?

http://stackoverflow.com/q/27027649
score: 0
tagged with: android-4.4-kitkat
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/27244001
has body: I have faced with Android 4.4.2 stock browser &lt;input type="file"&gt; issue in my ASP.Net MVC web application. Found solution here HTML file input in android webview (android 4.4, kitkat) but this is acceptable only for Android WebView app. Also found that file could be uploaded using ajax request File Upload without Form, but can't figure out how to get pictureInput.files[0] object in this case without &lt;input type="file"&gt; tag. Is there any way to get this work or workaround this Android 4.4.2 stock browser issue for Webpage?
tagged with: asp.net
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28289642
has comment: http://stackoverflow.com/comment/44932971
has comment: http://stackoverflow.com/comment/44950272
type: Question
accepted answer: http://stackoverflow.com/a/28289642
has title: Webpage to choose and upload file for Android 4.4.2 stock browser
linked to: http://stackoverflow.com/q/19617996
tagged with: javascript
linked to: http://stackoverflow.com/q/19882331

http://stackoverflow.com/q/27087540
type: Question
has comment: http://stackoverflow.com/comment/42702088
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42685050
tagged with: d3.js
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/csv
tagged with: http://stackoverflow.com/tag/html
has title: Plotting graphs with csv file using D3
answer count: 0
has body: So I am beginning learning d3 and stuck on how to use the CSV file to implement a bar chart with it. For instance I want to plot a bar chart that shows shows grouped by seasons or shows grouped by seasons. How would I go about doing that? D3 Page Template The CSV file that I am using: Shows Episodes Seasons Simpsons 1 6 Star Wars 15 2 Lost 2 1 King of Queens 3 8 WWE 1 10

ember.js
tags question: http://stackoverflow.com/q/27042145
tags question: http://stackoverflow.com/q/27110041
tags question: http://stackoverflow.com/q/27097642
tags question: http://stackoverflow.com/q/27085422
tags question: http://stackoverflow.com/q/27151485
tags question: http://stackoverflow.com/q/27136310
tags question: http://stackoverflow.com/q/27110441
tags question: http://stackoverflow.com/q/27030126
tags question: http://stackoverflow.com/q/27006099
tags question: http://stackoverflow.com/q/27097203
tags question: http://stackoverflow.com/q/27148706
type: Tag
tags question: http://stackoverflow.com/q/27078310
tag name: ember.js
tags question: http://stackoverflow.com/q/27102861
tags question: http://stackoverflow.com/q/27128693
tags question: http://stackoverflow.com/q/26999557
tags question: http://stackoverflow.com/q/27049670
tags question: http://stackoverflow.com/q/27111211
tags question: http://stackoverflow.com/q/27001064
tags question: http://stackoverflow.com/q/27082749
tags question: http://stackoverflow.com/q/27150006
tags question: http://stackoverflow.com/q/27081231
tags question: http://stackoverflow.com/q/27074462
tags question: http://stackoverflow.com/q/27085123
tags question: http://stackoverflow.com/q/27110714
tags question: http://stackoverflow.com/q/27024489
tags question: http://stackoverflow.com/q/27138311
tags question: http://stackoverflow.com/q/27099650
tags question: http://stackoverflow.com/q/27046466
tags question: http://stackoverflow.com/q/27029299
tags question: http://stackoverflow.com/q/27151823
tags question: http://stackoverflow.com/q/27010331
tags question: http://stackoverflow.com/q/27134053
tags question: http://stackoverflow.com/q/27066997
tags question: http://stackoverflow.com/q/27119165
tags question: http://stackoverflow.com/q/26996612
tags question: http://stackoverflow.com/q/27053115
tags question: http://stackoverflow.com/q/27026518
tags question: http://stackoverflow.com/q/27129589
tags question: http://stackoverflow.com/q/27132343
tags question: http://stackoverflow.com/q/26999600
tags question: http://stackoverflow.com/q/27021624
tags question: http://stackoverflow.com/q/27075200
tags question: http://stackoverflow.com/q/27041859
tags question: http://stackoverflow.com/q/27074074

firefox-addon-sdk
tags question: http://stackoverflow.com/q/27048876
type: Tag
tag name: firefox-addon-sdk
tags question: http://stackoverflow.com/q/27050682
tags question: http://stackoverflow.com/q/27043023
tags question: http://stackoverflow.com/q/27090626
tags question: http://stackoverflow.com/q/27067723
tags question: http://stackoverflow.com/q/27048624
tags question: http://stackoverflow.com/q/27005963

http://stackoverflow.com/comment/42574330
has text: i agree, i need to get in an code it. i'll be back with solution and see if anyone has a way to make it better
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27009146

http://stackoverflow.com/q/27085657
has title: JavaScript - Function constructor works without the 'new' keyword
tagged with: function
accepted answer: http://stackoverflow.com/a/27085669
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/42680336
has comment: http://stackoverflow.com/comment/42680168
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/24062933
tagged with: constructor
has answer: http://stackoverflow.com/a/27085764
upvote count: 2
linked to: http://stackoverflow.com/q/4832096
has answer: http://stackoverflow.com/a/27085669
duplicate of: http://stackoverflow.com/q/24062933
possible better answer: http://stackoverflow.com/a/27085764
score: 2
type: AnsweredQuestion
tagged with: oop
duplicate of: http://stackoverflow.com/q/4832096
has body: We all know that it's bad to call a JavaScript constructor function without the 'new' keyword. So why does this: Function("a", "b", "return a + b")(1, 1); // returns "2" Return the same value as this?: new Function("a", "b", "return a + b")(1, 1); // Also returns "2" And is there any harm (or benefit) in omitting the 'new' key word in this instance?
tagged with: new-operator
type: Question

http://stackoverflow.com/q/27071265
tagged with: javascript
tagged with: jquery
score: 13
answer count: 3
has answer: http://stackoverflow.com/a/61224512
has comment: http://stackoverflow.com/comment/42993209
has comment: http://stackoverflow.com/comment/42664367
accepted answer: http://stackoverflow.com/a/27261372
favorite count: 0
possible better answer: http://stackoverflow.com/a/61224512
tagged with: twitter-bootstrap
has title: bootstrap tooltip not considering data-placement parameter
has comment: http://stackoverflow.com/comment/42655760
tagged with: css
has answer: http://stackoverflow.com/a/41630497
upvote count: 13
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42655153
type: Question
has answer: http://stackoverflow.com/a/27261372
has comment: http://stackoverflow.com/comment/42665562
has body: I have added bootstrap tooltip parameters as follows on my element : I also have added the following script : $('[data-toggle="tooltip"]').tooltip(); Well, the tooltip is displaying but it is not respecting the data-placement parameter : it's always at the bottom of the control. I have seen there was some issues with positioning but all i found was from long ago and I have now bootstrap 3.3.1. Any clue on how to resolve this ? Edit: Here is a sample code with the same librairies I am using. Still not working test
tagged with: tooltip
downvote count: 0

http://stackoverflow.com/comment/42657735
comment on: http://stackoverflow.com/q/27072826
score: 1
has text: include html and css please
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42827591
comment on: http://stackoverflow.com/a/27153154
score: 0
type: AnswerComment
has text: It works. Based on your code I finally managed to do it in for loop. Thanks!
type: Comment

http://stackoverflow.com/a/27021113
upvote count: 2
has body: I would recommend looking here If you scroll to the bottom it shows how to do DOM manipulation with event handling as well. My guess is that when the user clicked on the link you would change the CSS of the sub menu: var location = { left: element[0].left, top: element[0].top }; var subMenu = angular.element('.subMenu'); subMenu.css({ position: 'absolute', top: location.top + 50 + "px", left: location.left + "px", cursor: 'pointer' }); Obviously this isn't a complete solution, but thats for you to figure ;), hopefully I have pointed you in the right direction!
answers question: http://stackoverflow.com/q/27019755
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/q/27057952
has title: creating svg media controls buttons
type: Question
accepted answer: http://stackoverflow.com/a/27059192
has body: I am new to js. Is there a way that i could create play pause and resume button using svg? i tried to create them using svg polygon. but figuring out the co ordinates seem to be a pain. var poly= svg.append("polygon") .attr("points" ,"20 3, 60,50 60, 40") .attr("fill", "brown"); poly.on('click', poly_click) function poly_click() { console.log("hello"); } i am intending to have separate function handlers for play, pause and stop buttons. Any ideas?
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
score: 0
has answer: http://stackoverflow.com/a/27059192
type: AnsweredQuestion

http://stackoverflow.com/q/27138746
tagged with: javascript
type: UnansweredQuestion
has title: Windows Phone tilt effect using CSS3 and 3d transform?
has answer: http://stackoverflow.com/a/27139124
has body: Windows Phone has a nice "tilt" effect when you press a control. It tilts the control toward that point you clicked/touched The effect is described here: http://blogs.msdn.com/b/ptorr/archive/2010/03/23/tilt-effect-for-windows-phone-controls.aspx http://blogs.msdn.com/b/ptorr/archive/2010/08/11/updated-tilt-effect.aspx I wonder if such effect could be also done via CSS3 3D transformations with a little help of javascript (to find out the touched location)?
tagged with: http://stackoverflow.com/tag/html
type: Question
score: 0
answer count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/42776426
has answer: http://stackoverflow.com/a/27141006

http://stackoverflow.com/q/27141817
accepted answer: http://stackoverflow.com/a/30796157
type: AnsweredQuestion
upvote count: 5
tagged with: twitter
has title: Why does this Twitter library delay the assignment of its object properties?
type: Question
score: 5
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/30796157
favorite count: 0
answer count: 1
has body: The Twitter widget library exposes a global variable twttr. I'd like to modularize this library on the fly using webpack with exports-loader. The problem is that, while the twttr variable is immediately exposed, its properties are still undefined when accessing it synchronously. console.log(twttr.widgets); // undefined setTimeout(function() { console.log(twttr); // now defined }); Live Demo So, var twttr = require('exports?twttr!./path/to/twitter') will return an object that isn't actually ready to be used. While the Twitter docs suggest that this is only necessary when loading the library asynchronously, I doubt the widget functions can be used unless wrapped in twttr.ready. At least webpack offers a nicer way of loading the library and accessing twttr. I suspect the odd behavior is due to this script coming from a time when module systems were non-existent and SRP was neglected. Nonetheless, I'm quite curious what the developers have done to cause this behavior, and my attempt to read the beautified, minified source code has proven folly.

http://stackoverflow.com/q/27090429
type: AnsweredQuestion
score: 0
type: Question
tagged with: jquery-ui
tagged with: javascript
has comment: http://stackoverflow.com/comment/42687715
accepted answer: http://stackoverflow.com/a/27090710
has title: How to change the contents of a div from old data to new data using slideshow effect using jQuery?
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: Let's say I have a div A, and I have an array of text data. At t=0, div A will show $data[0]. After every n seconds, I want the div to show the next record available in the array. I would like to create a transition effect similar to this slideshow effect. In this transition effect, user should be able to see that $data[n] is slowly sliding from the center of the div to the bottom, while $data[n+1] is slowing sliding from the top to the center of the div. Is it possible to do this using jQuery?
tagged with: css
has answer: http://stackoverflow.com/a/27090710
has comment: http://stackoverflow.com/comment/42687810

http://stackoverflow.com/comment/42603905
comment on: http://stackoverflow.com/q/27042355
score: 0
type: Comment
type: QuestionComment
has text: @Nit yes I know, i was pointing out he hasn't stated a requirement between the string and the array. I could infer what it is, but my solution still fits his stated problem which was an array size four with values 0,3,6,9.

http://stackoverflow.com/comment/42682638
score: 0
type: AnswerComment
has text: You're welcome :) - just take care that transition (css answer) may not work in non-css3 supporting browsers. That is where this will help. Cheers.
type: Comment
comment on: http://stackoverflow.com/a/27086962

http://stackoverflow.com/q/27149274
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/35340394
tagged with: jasny-bootstrap
score: 2
has body: I am using Jasny Bootstrap Offcanvas. I want to initially set autohide option to false, however when I do that, the corresponding offcanvas shows, which I want to avoid. How can I set autohide to false and prevent offcanvas from being shown?
type: Question
downvote count: 0
tagged with: javascript
has title: jasny bootstrap off canvas - how to set autohide and not showing offcanvas initially
answer count: 1
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/42562772
comment on: http://stackoverflow.com/q/27019010
has text: Welcome to SO. Please post the code in context.
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/a/27000637
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27000552
has body: It's not as simple to pass files and other data, such as text, together in the same POST request. The only way to achieve that is making multipart/form-data request. http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2

http://stackoverflow.com/q/27038366
accepted answer: http://stackoverflow.com/a/27039993
score: 0
answer count: 1
tagged with: elasticsearch
tagged with: backbone.js
has body: I would like to define the model and el properties of a SearchApp (which extends Backbone.view) so as to search within 3 distinct ElasticSearch indices. However, I would like each of these results to be displayed into separate divs, a distinct one for each model. What I have now is: var searchApp = new SearchApp({model: [searchModel1, searchModel2, searchModel3], el: $("#results1")}); but what I would ideally want to have is var searchApp = new SearchApp({model: [searchModel1, searchModel2, searchModel3], el: [$("#results1"),$("#results2"),$("#results3")]}); so that the data returned by searchModel1 is displayed inside div results1, the data returned by searchModel2 is displayed inside div results2, and the data returned by searchModel3 is displayed inside div results3. However, this is not working for me, I cannot define el with a list. Is there any workaround for this, or is this even possible? Many thanks!
type: AnsweredQuestion
tagged with: backbone-views
type: Question
tagged with: javascript
tagged with: jquery
has title: Backbone.js - is it possible to define multiple el values for a model?
has answer: http://stackoverflow.com/a/27039993

http://stackoverflow.com/a/31016450
type: Answer
score: 0
has body: https://github.com/desmosinc/scrubber Simple, attractive html+js scrubber control. Tested in recent versions of Firefox, Chrome, Safari, and IE9+. Works with mouse events and touch events.
answers question: http://stackoverflow.com/q/27028054

http://stackoverflow.com/a/27007879
upvote count: 1
has comment: http://stackoverflow.com/comment/42545556
has comment: http://stackoverflow.com/comment/42545786
has comment: http://stackoverflow.com/comment/42545681
accepted answer of: http://stackoverflow.com/q/27007147
has comment: http://stackoverflow.com/comment/42545610
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27007147
score: 1
type: Answer
has body: Fixed it now, added input pattern to make sure only digits aswell as req'd on tags.Again I can't format the code in an answer so I'm adding another as I'd be here all night function val(){ var missingFields = false; var strFields = ""; var mileage=document.getElementById("mile").value; var location=document.getElementById("loc").value; if(mileage=='' || isNaN(mileage)) { missingFields = true; strFields += " Please enter your Google Map's mileage\n in Numbers only\n"; } if(location=='') { missingFields = true; strFields += " Please enter your business location and address.\n"; } if( missingFields ) { alert( "I'm sorry, but you must provide the following field(s) before continuing:\n" + strFields ); return false; } return true; } Submit

http://stackoverflow.com/q/27150913
has answer: http://stackoverflow.com/a/27151172
has body: html: Toggle navigation Support Download Blog Papers Gallery Document License Problem Videos FAQ jQuery: $(document).on('click','#menu_scroll',function(e){ event.preventDefault(); $('.navbar-collapse.in').animate({scrollTop: 100}, 250); }) As in above am using jquery for scroll.when i click a menu item(bootstrap mobile - toggle button) in my header of website...its working fine in chrome but in firefox its not working(scroll is not happening).any help would be appreciated..
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Animate scroll not working in firefox?
has comment: http://stackoverflow.com/comment/42796636
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42796738

http://stackoverflow.com/comment/42639513
comment on: http://stackoverflow.com/a/27062751
score: 0
type: Comment
has text: Polluting the `gameOver` domain logic with DOM logic is not quite appealing. Just call `off` after calling `gameOver`.
type: AnswerComment

http://stackoverflow.com/a/59390266
downvote count: 10
answers question: http://stackoverflow.com/q/27101240
type: Answer
upvote count: 2
score: -8
has body: TypeError: Converting circular structure to JSON in nodejs: This error can be seen on Arangodb when using it with Node.js, because storage is missing in your database. If the archive is created under your database, check in the Aurangobi web interface.

http://stackoverflow.com/comment/42637965
has text: No solution so far. Rolled back to vs2013.3. Sigh
comment on: http://stackoverflow.com/q/27023303
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27066476
type: UnansweredQuestion
tagged with: jsdoc
has title: How to display Javascript methods in a 'group' in JSDOC?
score: 12
type: Question
upvote count: 12
answer count: 1
downvote count: 0
tagged with: javascript
has body: Is there are possibility to 'group' functions within a class (AMD/RequireJS Module) ? My classes have sometimes over 20+ functions which actually belong to a specific 'interface implementation' and sometimes they just need to be grouped for better readability. I checked the available jsDoc tags but none of them seem to provide this, in Doxygen there are number of tags... Any ideas?
favorite count: 0
has answer: http://stackoverflow.com/a/32831989

jquery
tags question: http://stackoverflow.com/q/27083539
tags question: http://stackoverflow.com/q/27119463
tags question: http://stackoverflow.com/q/27102591
tags question: http://stackoverflow.com/q/27143582
tags question: http://stackoverflow.com/q/27102105
tags question: http://stackoverflow.com/q/27116351
tags question: http://stackoverflow.com/q/27099016
tags question: http://stackoverflow.com/q/27001686
tags question: http://stackoverflow.com/q/27066237
tags question: http://stackoverflow.com/q/27107915
tags question: http://stackoverflow.com/q/27138517
tags question: http://stackoverflow.com/q/27137274
tags question: http://stackoverflow.com/q/27119710
tags question: http://stackoverflow.com/q/27143058
tags question: http://stackoverflow.com/q/27024489
tags question: http://stackoverflow.com/q/27096548
tags question: http://stackoverflow.com/q/27046268
tags question: http://stackoverflow.com/q/27143096
tags question: http://stackoverflow.com/q/27065430
tags question: http://stackoverflow.com/q/27049726
tags question: http://stackoverflow.com/q/27029533
tags question: http://stackoverflow.com/q/26997538
tags question: http://stackoverflow.com/q/27009619
tags question: http://stackoverflow.com/q/27095734
tags question: http://stackoverflow.com/q/27008960
tags question: http://stackoverflow.com/q/27109550
tags question: http://stackoverflow.com/q/27083082
tags question: http://stackoverflow.com/q/27106929
tags question: http://stackoverflow.com/q/26999985
tags question: http://stackoverflow.com/q/27121085
tags question: http://stackoverflow.com/q/27142504
tags question: http://stackoverflow.com/q/27090368
tags question: http://stackoverflow.com/q/27103756
tags question: http://stackoverflow.com/q/27089784
tags question: http://stackoverflow.com/q/27040338
tags question: http://stackoverflow.com/q/27070996
tags question: http://stackoverflow.com/q/27112527
tags question: http://stackoverflow.com/q/27100030
tags question: http://stackoverflow.com/q/27148189
tags question: http://stackoverflow.com/q/27004386
tags question: http://stackoverflow.com/q/27036130
tags question: http://stackoverflow.com/q/27013645
tags question: http://stackoverflow.com/q/27111127
tags question: http://stackoverflow.com/q/27007136
tags question: http://stackoverflow.com/q/27090692
tags question: http://stackoverflow.com/q/27091071
tags question: http://stackoverflow.com/q/27096555
tags question: http://stackoverflow.com/q/27073486
tags question: http://stackoverflow.com/q/27070934
tags question: http://stackoverflow.com/q/27066245
tags question: http://stackoverflow.com/q/27075226
tags question: http://stackoverflow.com/q/27055749
tags question: http://stackoverflow.com/q/27130835
tags question: http://stackoverflow.com/q/27003230
tags question: http://stackoverflow.com/q/27030961
tags question: http://stackoverflow.com/q/27074982
tags question: http://stackoverflow.com/q/27018073
tags question: http://stackoverflow.com/q/27095413
tags question: http://stackoverflow.com/q/27036862
tags question: http://stackoverflow.com/q/27040241
tags question: http://stackoverflow.com/q/27120254
tags question: http://stackoverflow.com/q/27097974
tags question: http://stackoverflow.com/q/27098582
tags question: http://stackoverflow.com/q/27143369
tags question: http://stackoverflow.com/q/27026625
tags question: http://stackoverflow.com/q/27040090
tags question: http://stackoverflow.com/q/27134879
tags question: http://stackoverflow.com/q/27135705
tags question: http://stackoverflow.com/q/27120896
tags question: http://stackoverflow.com/q/26992763
tags question: http://stackoverflow.com/q/26992002
tags question: http://stackoverflow.com/q/27059961
tags question: http://stackoverflow.com/q/27043654
tags question: http://stackoverflow.com/q/27119920
tags question: http://stackoverflow.com/q/27028596
tags question: http://stackoverflow.com/q/27123419
tags question: http://stackoverflow.com/q/27007155
tags question: http://stackoverflow.com/q/27094345
tags question: http://stackoverflow.com/q/27098984
tags question: http://stackoverflow.com/q/27016810

multidimensional-array
tags question: http://stackoverflow.com/q/27147105
type: Tag
tags question: http://stackoverflow.com/q/27110375
tags question: http://stackoverflow.com/q/27102507
tags question: http://stackoverflow.com/q/27087503
tag name: multidimensional-array

http://stackoverflow.com/a/27060068
accepted answer of: http://stackoverflow.com/q/27060027
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27060027
has body: JSON.stringify({ "ID": ar,"Name":$('#tmname').val() }), This should do it. Since you are creating an object on the go and not doing string concatenation, you need not use '+' to create a JSON string. JSON.stringify will gladly do that for you.
type: Answer

php
tags question: http://stackoverflow.com/q/26998945
tags question: http://stackoverflow.com/q/27007551
tags question: http://stackoverflow.com/q/27076976
tags question: http://stackoverflow.com/q/27061322
tags question: http://stackoverflow.com/q/27057285
tags question: http://stackoverflow.com/q/27120565
tags question: http://stackoverflow.com/q/27092801
tags question: http://stackoverflow.com/q/27069306
tags question: http://stackoverflow.com/q/27062851
tags question: http://stackoverflow.com/q/27106287
tags question: http://stackoverflow.com/q/27056542
tags question: http://stackoverflow.com/q/27092284
tags question: http://stackoverflow.com/q/27144479
tags question: http://stackoverflow.com/q/27111386
tags question: http://stackoverflow.com/q/26992009
tags question: http://stackoverflow.com/q/27036014
tags question: http://stackoverflow.com/q/27006681
tags question: http://stackoverflow.com/q/27107806
tags question: http://stackoverflow.com/q/27124878
tags question: http://stackoverflow.com/q/27086724
tags question: http://stackoverflow.com/q/27013005
tags question: http://stackoverflow.com/q/27150138
tags question: http://stackoverflow.com/q/27142686
tags question: http://stackoverflow.com/q/27058461
tags question: http://stackoverflow.com/q/27024770
tags question: http://stackoverflow.com/q/27040789
tags question: http://stackoverflow.com/q/27116748
tags question: http://stackoverflow.com/q/27083749
tags question: http://stackoverflow.com/q/26995938
tags question: http://stackoverflow.com/q/26993567
tags question: http://stackoverflow.com/q/27097907
tags question: http://stackoverflow.com/q/27062304
tags question: http://stackoverflow.com/q/27103533
tags question: http://stackoverflow.com/q/27041711
tags question: http://stackoverflow.com/q/27012038
tags question: http://stackoverflow.com/q/27006520
tags question: http://stackoverflow.com/q/27119029
tags question: http://stackoverflow.com/q/27136743
tags question: http://stackoverflow.com/q/27065942
tags question: http://stackoverflow.com/q/27036004
tags question: http://stackoverflow.com/q/27147105
tags question: http://stackoverflow.com/q/27113194
tags question: http://stackoverflow.com/q/27019104
tags question: http://stackoverflow.com/q/26992367
tags question: http://stackoverflow.com/q/27141528
tags question: http://stackoverflow.com/q/27067310
tags question: http://stackoverflow.com/q/27115950
tags question: http://stackoverflow.com/q/27033836
tags question: http://stackoverflow.com/q/27088440
tags question: http://stackoverflow.com/q/27108831
tags question: http://stackoverflow.com/q/27006119
tags question: http://stackoverflow.com/q/27129375
tags question: http://stackoverflow.com/q/26995958
tags question: http://stackoverflow.com/q/27041697
tags question: http://stackoverflow.com/q/27022392
tags question: http://stackoverflow.com/q/27107563
tags question: http://stackoverflow.com/q/26994352
tags question: http://stackoverflow.com/q/27039668
tags question: http://stackoverflow.com/q/27064778
tags question: http://stackoverflow.com/q/27151749
tags question: http://stackoverflow.com/q/27093936
tags question: http://stackoverflow.com/q/27004171
tags question: http://stackoverflow.com/q/27022567
tags question: http://stackoverflow.com/q/27095894
tags question: http://stackoverflow.com/q/26994151
tags question: http://stackoverflow.com/q/27097233
tags question: http://stackoverflow.com/q/27040426
tags question: http://stackoverflow.com/q/27113027
tags question: http://stackoverflow.com/q/27071799
tags question: http://stackoverflow.com/q/26993855
tags question: http://stackoverflow.com/q/27099285
tags question: http://stackoverflow.com/q/26999766
tags question: http://stackoverflow.com/q/27135350
tags question: http://stackoverflow.com/q/27076287
tags question: http://stackoverflow.com/q/27058997
tags question: http://stackoverflow.com/q/27013960
tags question: http://stackoverflow.com/q/27120664
tags question: http://stackoverflow.com/q/26996775
tags question: http://stackoverflow.com/q/27001458
tags question: http://stackoverflow.com/q/27116166

http://stackoverflow.com/comment/42769941
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27135799
score: 0
has text: you sure are trying to accomplish a lot here in a single method.. also what the heck is going on in these lines `GridView1.DataSource = dt; GridView1.DataBind();` you're binding looks off format the code too

http://stackoverflow.com/comment/42718608
comment on: http://stackoverflow.com/q/27107604
score: 1
has text: Add error reporting to the top of your file(s) right after your opening `<?php tag error_reporting(E_ALL); ini_set('display_errors', 1);` In addition add error reporting for your MySQL functions.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27074531
type: Answer
score: 1
upvote count: 1
has body: Try this: $('input[type="checkbox"]').change(function(){ var count = $('input[type="checkbox"]:not("#chkselectall"):checked').length; }); Demo: http://jsfiddle.net/Lbs39h97/
downvote count: 0
answers question: http://stackoverflow.com/q/27074476

http://stackoverflow.com/comment/42723660
has text: @user4199704, if you are getting your data from a database, are yo then able to modify whether or not the data is rendered/written as markup in the first place?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27109039

http://stackoverflow.com/comment/42562210
comment on: http://stackoverflow.com/q/27018638
type: QuestionComment
type: Comment
score: 0
has text: I try to gave a new color for nextbutton on last slide

http://stackoverflow.com/comment/42755835
comment on: http://stackoverflow.com/a/27109984
score: 0
type: AnswerComment
type: Comment
has text: Okay I think there is a problem in GWT SDM the Scheduler works different on desktop and mobile here is a demo project for that: https://github.com/confile/GWT-2.7-Scheduler-Test

http://stackoverflow.com/comment/42574938
score: 0
type: AnswerComment
has text: So right now, on my backend (node), I have a route that serves my index.html to any requests made to the server and express hosts all the public files (angularjs, css and html for fronted). My route handler is currently configured to serve a specific template into my ngview based on the URL from certain button clicks (through hrefs). Is that right?
type: Comment
comment on: http://stackoverflow.com/a/27025534

http://stackoverflow.com/comment/42825548
has text: You can always check out some of my other answers. (I have a couple of under-appreciated ones) ;)
comment on: http://stackoverflow.com/a/27152751
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42591517
comment on: http://stackoverflow.com/q/27035124
type: QuestionComment
type: Comment
score: 0
has text: @barmar you are right. was just my first shot, before digging deeper into the issue ;)

http://stackoverflow.com/q/27143585
favorite count: 0
has answer: http://stackoverflow.com/a/27157131
type: UnansweredQuestion
has body: I have installed node.js on my Windows-7 PC. I am not able to create websocket connection to a remote server. I tried to load modeule "ws" in my script : var WebSocket = require('ws') It gave an error : cannot find module 'ws' So I followed instructions over here : node.js websocket module installed but won't work in scripts Execute cmd as Administrator (Right click cmd icon-> Run as Administrator) Then type in cmd: c:\Node Instalation Dir\> npm install -g express c:\Node Instalation Dir\> npm install websocket --force Then run my script :-- D:\My Script Folder \> node myscript.js Again same error. What could be the problem ? cannot find module 'ws'
linked to: http://stackoverflow.com/q/9704660
upvote count: 16
tagged with: node.js
answer count: 4
score: 16
type: Question
linked to: http://stackoverflow.com/q/19874582
has answer: http://stackoverflow.com/a/70604425
has answer: http://stackoverflow.com/a/73002080
tagged with: javascript
linked to: http://stackoverflow.com/q/14152635
has comment: http://stackoverflow.com/comment/42784117
has title: Node.js, getting cannot find module 'ws' error
downvote count: 0
has comment: http://stackoverflow.com/comment/42783919
has answer: http://stackoverflow.com/a/27143653

http://stackoverflow.com/comment/42746855
score: 0
type: Comment
has text: On right-clicking, when the option menu opens, is it in the same window or is it in a frame ? Also, in the modal dialog box are you entering and/or retrieving something?
type: QuestionComment
comment on: http://stackoverflow.com/q/27122881

http://stackoverflow.com/comment/42706519
has text: Yeah I was tripped up a bit because the link i went on didn't include var and i was under the assumption that javascript is pretty much identical to java
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27101174

http://stackoverflow.com/comment/42578531
comment on: http://stackoverflow.com/a/27027200
score: 0
type: AnswerComment
type: Comment
has text: each time after scrolling call $('.comment-textarea').autosize();

http://stackoverflow.com/comment/42733639
score: 1
type: AnswerComment
type: Comment
has text: Thanks for the help, that example put me on the right track. Though when I implemented it in Ember CLI. I had to make some mods to the _comment template. The first iteration values are wrapped up in a model object `{{model.author}}` but all subsequent iterations are accessed like `{{author}}` when I finish my example fully I'll add an edit to my original question
comment on: http://stackoverflow.com/a/27084336

http://stackoverflow.com/a/46547616
downvote count: 0
answers question: http://stackoverflow.com/q/27108082
has body: I know this question is a bit older, but in ES2015 there is a new data structure called map that is much more similar to a dictionary that you would use in C#. So now you don't have to fake one as an object, or as an array. The MDN covers it pretty well. ES2015 Map
type: Answer
upvote count: 14
score: 14
has comment: http://stackoverflow.com/comment/94379693

http://stackoverflow.com/comment/42713373
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27087235
type: Comment
has text: Shlomo, so how do we implement reloading specific tabs and injecting scripts in IE? I updated my code with your answer (you can see my updated question) but both don't work in IE with CrossRider.

http://stackoverflow.com/q/27146258
has answer: http://stackoverflow.com/a/27146382
accepted answer: http://stackoverflow.com/a/27146382
has body: Im making a page where you can check a few lines in a table, and then export them. Here is the code http://www.bootply.com/Hrll6yz0c1 Code for adding lines to modal export menu works great, but code that deletes lines inside modal doesn't work. Code for deleting $('button#delB').click(function() { $(this).parent().parent().remove(); }); For this generated table $('button#addB').click(function() { var toAdd = $(this).parent().parent().find("#sub_id").html(); var toAdd2 = $(this).parent().parent().find("#val1").html(); var toAdd3 = $(this).parent().parent().find("#val2").html(); $('#tblGrid').append(" "+toAdd+" "+toAdd2+" "+toAdd3+" "); }); I tried deleting outside modal with the same code and it's working.
type: AnsweredQuestion
has title: Bootstrap, jQuery in modal doesn't work
type: Question
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42788095
answer count: 1
tagged with: bootstrap-modal
has comment: http://stackoverflow.com/comment/42788214
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/42788249
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42788172

http://stackoverflow.com/a/27018832
upvote count: 1
has comment: http://stackoverflow.com/comment/42586142
answers question: http://stackoverflow.com/q/27018689
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27018689
has body: For this, you should use jQuery's queue function: $('.one').fadeOut(500, queue:false); $('.two').fadeIn(500, queue:false); Putting queue:false, jQuery will execute the two function (almost) simultaneously. In your code, you have: $('.slideshowimage').fadeOut(500,function({slideshowFadeIn();$(this).remove()}); Here you are queueing: First execute the .fadeOut on .slideshowimage After doing that: fadeIn the new one: ,function({slideshowFadeIn();$(this).remove()} So you are explicitly queueing the events: the fadeIn will only happen after the fadeOut. To dequeue your code, try this: // Executing both fadeOut and fadeIn at the same time: $('.slideshowimage').fadeOut(500, function() { $(this).remove() }); slideshowFadeIn(); And substitute it for this line of code in your snippet: $('.slideshowimage').fadeOut(500,function({slideshowFadeIn();$(this).remove()});
type: AcceptedAnswer
type: Answer
score: 1

http://stackoverflow.com/a/27095800
has comment: http://stackoverflow.com/comment/42699746
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27095656
type: AcceptedAnswer
downvote count: 0
has body: One solution is using Session. When the date changes you'd call Session.set('dateCreated', newDate). The template helper for dateCreated would simply return Session.get('dateCreated').
accepted answer of: http://stackoverflow.com/q/27095656

http://stackoverflow.com/a/60392299
has body: Adding an id field to the data, and then refrencing that id field for delete and update, works for us "index":{"_index":"esIndex","_type":"document","_id":"23d68f060118fbeee699d14eff044a1f"}} {"text":"vision zero","id":"23d68f060118fbeee699d14eff044a1f","suggest":{"input":"vision zero","payload":{"entity_id":"23d68f060118fbeee699d14eff044a1f"}},"type":"Content"} Something like the above bulk query data, notice the id field in the data. If we don't put it, we face same issue that after deleting document, it still show up in suggestions.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27074593

http://stackoverflow.com/a/27007439
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27002108
has body: I fixed it, there was a huge conflict between the jQuery and Prototype libraries. I updated prototype to the latest version and it seems to be working now, hopefully I didn't break anything.
answers question: http://stackoverflow.com/q/27002108
has comment: http://stackoverflow.com/comment/42760555
score: 0

http://stackoverflow.com/comment/42725766
has text: Check webkit. I think it's the best way to do it.
comment on: http://stackoverflow.com/a/27102731
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/q/27055159
tagged with: java
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42626804
has comment: http://stackoverflow.com/comment/42626772
score: 0
linked to: http://stackoverflow.com/q/13110716
has comment: http://stackoverflow.com/comment/42626686
has comment: http://stackoverflow.com/comment/42627314
type: UnansweredQuestion
has title: open a file with windows default program when a user clicks a link to text file on webpage
has body: I am writing a web application in java. When a user clicks on a link on my web page, I want that the file should be opened in default program of user. I dont want that file to be opened in browser. till now, when i click link, the file downloads. here is my code : Click here to download
answer count: 0

http://stackoverflow.com/q/27109877
has body: I'm saving a bunch of videos to IndexedDB, then displaying them again for an offline version of an app. I have an issue however where occasionally one blob video file will become corrupt. My investigation so far has revealed: the video file is not corrupt because it's been re-rendered and is rendered in the same way as the other videos the issue is when saving to the DB rather than retrieving from the DB the issue occurs when running through both my local server and a remote server, it happens on the remote server more however the issue seems to happen randomly i.e. I do not change any other variables to cause this issue So I'm a bit stuck now, anyone have any ideas as to what the problem may be? Thanks in advance :)
upvote count: 2
has answer: http://stackoverflow.com/a/27110322
type: AnsweredQuestion
score: 2
tagged with: indexeddb
type: Question
accepted answer: http://stackoverflow.com/a/27110322
tagged with: javascript
answer count: 1
has title: IndexedDB video binary file is corrupt
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/27019625
tagged with: autocomplete
tagged with: javascript
has title: Search form with arabic letters
has body: I have an autocomplete search form with cities name and I want to make it compatible with arabic letters(arabic keyboard).Is there a way to interpret the letters as latin letters in the moment they are writen or is there any other way to do this? An example of that is on google,if I put my keyboard on ARABIC and type london(مخىيخى) the autocomplete from google shows london.
answer count: 1
has comment: http://stackoverflow.com/comment/42564192
downvote count: 0
tagged with: arabic
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/27019994
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/q/27113366
possible better answer: http://stackoverflow.com/a/27113429
type: Question
has answer: http://stackoverflow.com/a/27113429
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27113411
score: 0
has comment: http://stackoverflow.com/comment/42729479
answer count: 3
tagged with: jquery
has body: So I'm appending a row in a table and then upon clicking a button I want to remove that row. However I can't do it in a way that seems natural, like: $(".usun").on("click", function(){ $(this).parent().parent().remove(); }); where .usun is a class of buttons that remove a row in a table. Of course this fragment of code is inside of $(document).ready(.... What seems to work for me is this: $(this).on("click", ".usun", function(){ $(this).parent().parent().remove(); }); and I don't understand why. Could someone explain me this?
favorite count: 0
has title: .on() doesn't work on appended element(jQuery)
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42729812
has comment: http://stackoverflow.com/comment/42729472
has answer: http://stackoverflow.com/a/27113977
has answer: http://stackoverflow.com/a/27113411
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/42798931
comment on: http://stackoverflow.com/a/27151695
score: 0
type: AnswerComment
has text: yep you are correct, I tested it from within the run code snippet option and it seemed to work.
type: Comment

http://stackoverflow.com/q/27043882
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27044687
accepted answer: http://stackoverflow.com/a/27044296
type: AnsweredQuestion
has title: Combo Select using json
possible better answer: http://stackoverflow.com/a/27044687
score: 0
type: Question
has body: The country and state will be sent as json { "data": [ { "country": "USA", "states": [ "Alabama", "Alaska", "Arizona" ] }, { "country": "India", "states": [ "TN", "AP", "Mumbai" ] } ] } There will be two select tags (country and state). How do I populate the states based on the country selected? I am looking for a solution similar to http://www.datatables.net/examples/api/row_details.html where the row.data() returns the data set of a particular row.
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27044296
answer count: 2

http://stackoverflow.com/a/45229538
score: 4
has comment: http://stackoverflow.com/comment/77915605
has comment: http://stackoverflow.com/comment/131817451
upvote count: 4
has comment: http://stackoverflow.com/comment/77910819
has comment: http://stackoverflow.com/comment/77759980
downvote count: 0
has comment: http://stackoverflow.com/comment/77957428
type: Answer
answers question: http://stackoverflow.com/q/27034897
has comment: http://stackoverflow.com/comment/131812960
has body: It is pretty simple Init section JavaScriptInterface jsInterface = new JavaScriptInterface(this); webView.getSettings().setJavaScriptEnabled(true); webView.addJavascriptInterface(jsInterface, "JSInterface"); JavaScriptInterface public class JavaScriptInterface { private Activity activity; public JavaScriptInterface(Activity activiy) { this.activity = activiy; } @JavascriptInterface public void putData(byte[] bytes){ //do whatever } } Js section &lt;script&gt; function putAnyBinaryArray(arr) { var uint8 = Uint8Array.from(arr); window.JSInterface.putData(uint8); }; &lt;/script&gt; TypedArray.from polyfill if need : https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from
has comment: http://stackoverflow.com/comment/77759986
has comment: http://stackoverflow.com/comment/77926135
has comment: http://stackoverflow.com/comment/77895900

http://stackoverflow.com/comment/42541049
type: AnswerComment
comment on: http://stackoverflow.com/a/27001367
score: 0
type: Comment
has text: In the end though - I ended up using this method for ajax because otherwise I could not access wordpress APIs: http://codex.wordpress.org/AJAX_in_Plugins

http://stackoverflow.com/a/27058263
answers question: http://stackoverflow.com/q/27055362
has comment: http://stackoverflow.com/comment/42650170
has comment: http://stackoverflow.com/comment/42643747
has comment: http://stackoverflow.com/comment/42651794
upvote count: 1
has comment: http://stackoverflow.com/comment/42654729
has comment: http://stackoverflow.com/comment/42654955
type: Answer
downvote count: 0
score: 1
has body: AJAX = Asynchronous Javascipt And Xml try this or make it synchron Take care, if you would use this, you block/lock all other processings until its done... Same like doing a endless while in PHP. So if you request doesnt ends.. this will cause a little problem :)

http://stackoverflow.com/comment/42605633
type: Comment
comment on: http://stackoverflow.com/a/27043258
has text: `this` seems totally offtopic. As I understand the question, it deals with variable visibility and scopes, not object properties and function call context.
score: 1
type: AnswerComment

http://stackoverflow.com/q/27083997
has comment: http://stackoverflow.com/comment/42678034
type: UnansweredQuestion
has title: How to make a JQuery CSS menu item clickable
type: Question
has comment: http://stackoverflow.com/comment/42690589
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42677406
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: menu
has comment: http://stackoverflow.com/comment/42677137
has body: I have a css menu that I'm trying to use. When you click a main menu item that has a sub item the menu will expand to show the sub items. The menu works great except for one thing. When you click the main menu items that have sub items it will not open the requested link. It will only expand the menu. How can I edit the jquery so if the main menu item has a href that the menu will expand and open the link for the main menu item? Here's the code. Here's the code I'm using... $(document).ready(function(){ $('.menu > ul > li:has(ul)').addClass("has-sub"); $('.menu > ul > li > a').each( function(){ $(this.firstChild).wrap(''); }); $('.menu > ul > li > a').click(function(){ var checkElement = $(this).next(); $('.menu li').removeClass('active'); $(this).closest('li').addClass('active'); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { $(this).closest('li').removeClass('active'); checkElement.slideUp('normal'); } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('.menu ul ul:visible').slideUp('normal'); checkElement.slideDown('normal'); } if (checkElement.is('ul')) { return false; } else { return true; } }); }); .menu, .menu ul, .menu li, .menu a { margin: 0; padding: 0; border: 0; list-style: none; font-weight: normal; text-decoration: none; line-height: 1; font-size: 1.05em; position: relative; } .menu { width: 250px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .menu a { line-height: 1.3; } .menu > ul > li:first-child { background: #66665e; background: -moz-linear-gradient(#66665e 0%, #45463d 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #66665e), color-stop(100%, #45463d)); background: -webkit-linear-gradient(#66665e 0%, #45463d 100%); background: linear-gradient(#66665e 0%, #45463d 100%); -webkit-border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; } .menu > ul > li:first-child > a { padding: 12px 10px; background: url(menu_images/pattern…
answer count: 0

http://stackoverflow.com/comment/43067037
type: Comment
comment on: http://stackoverflow.com/a/27148174
has text: yes.. I have made a vote for it.. thank you again :)
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42760805
score: 0
comment on: http://stackoverflow.com/a/27130914
type: Comment
has text: You look new. If this solved your question you should mark it with the check mark right below up/down vote buttons on the left.
type: AnswerComment

http://stackoverflow.com/a/27113447
answers question: http://stackoverflow.com/q/27109929
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/27109929
type: AcceptedAnswer
downvote count: 0
has body: After two days of looks through web searches, Trail and Error, and few choice words I posted to this forum and three hours later my question was answered by myself. ie.Document.getElementsByName("").Item(0).click This allowed me to click the open the drop down list.

http://stackoverflow.com/comment/82281763
type: AnswerComment
type: Comment
has text: Great solution, far better than using froogaloop
comment on: http://stackoverflow.com/a/27148400
score: 0

http://stackoverflow.com/comment/42608455
has text: I'm not familiar enough with simplehtmldom to be much help with that. Best bet is probably to write up another question showing the problematic code and the results of running it.
type: Comment
comment on: http://stackoverflow.com/q/27026082
type: QuestionComment
score: 0

http://stackoverflow.com/a/26994596
has body: You can use the group name as span's class name to clear the values of the group after group's button clicked. Take a look here: http://jsfiddle.net/e59ogp8a/3/ $('.views-exposed-widget').find('.form-type-radio').on('click', function(){ var a = $(this).closest('.form-type-radio').find('label[class="option"]').text(); var groupName= $(this).find('.dls-radio').attr("name"); console.log($('.views-widget-sort-by').prev('.'+groupName).text('')); $('.views-widget-sort-by').before('&lt;span class="'+groupName+'"&gt;'+a+'&lt;/span&gt;'); });
answers question: http://stackoverflow.com/q/26993704
score: 0
type: Answer

http://stackoverflow.com/q/27073437
has comment: http://stackoverflow.com/comment/42658833
tagged with: jquery
favorite count: 0
upvote count: 2
type: UnansweredQuestion
downvote count: 1
has body: I'm having a problem here. In the beginning of my game it asks "Ready" and if you click it, it will reset everything just in case the game glitched out and it would play the appropriate level that the user selected in the beginning of the game (main menu). I tried to make booleans for each level so I could tell what level he or she is playing this is what I tried and received no luck. var playingLevel1 = false; var playingLevel2 = false; $('#level1Button').click(function() { playingLevel1 = true; }); $('#level2Button').click(function() { playingLevel2 = true; }); $('#ready').click(function() { if(playingLvl2) { startLvl1(); //and that would reset and start the level one } if(playingLvl2) { startLvl2(); //and that would reset and start the level two } }); You would think that would work? But it doesn't. I don't think I'm using booleans right maybe? I just typed up that sample code but it's pretty identical to what my original code is like. Ok so I decided to use an integer but that still wont work here is what i got var currentLevel = 0; $('#level1').click(function () { currentLevel = 1; $("#mainMenu").hide(); levelOne(); }); $('#level2').click(function () { currentLevel = 2; $("#mainMenu").hide(); levelTwo(); }); function startLvl1() { $("#levelOne").css('margin-top', '-1520px'); $("#player").css('border', 'solid 1px green'); $("#player").css('margin-left', '223px'); $('#levelComplete').hide(); $('#levelOne').animate({ 'margin-top': '+=1520px' }, speed); handleCollisions(); } function startLvl2() { $("#levelOne").css('margin-top', '-4560px'); $("#player").css('border', 'solid 1px green'); $("#player").css('margin-left', '223px'); $('#levelComplete').hide(); $('#levelOne').animate({ 'margin-top': '+=4560px' }, speed); handleCollisions(); } $('#yes').click(function () { if (currentLevel == 1) { startLvl1(); }else if (currentLevel == 2) { startLvl2(); }
score: 1
has answer: http://stackoverflow.com/a/27073505
type: Question
has answer: http://stackoverflow.com/a/27073461
answer count: 2
has title: Boolean logic misunderstanding
tagged with: javascript

http://stackoverflow.com/a/27095674
has comment: http://stackoverflow.com/comment/122595818
upvote count: 2
has body: The 3 rules for semicolon insertion can be found in section 7.9.1 of the ECMAScript 5.1 standard I think rules 1 and 2 from the standard can be handled with semantic lookahead. void PossiblyInsertedSemicolon() {} { LOOKAHEAD( {semicolonNeedsInserting()} ) {} | ";" } So when does a semicolon need inserting? When one of these is true When the next token is not a semicolon and is on another line (getToken(1).kind != SEMICOLON &amp;&amp; getToken(0).endLine &lt; getToken(1).beginLine) When the next token is a right brace. When the next token is EOF So we need boolean semicolonNeedsInserting() { return (`getToken(1).kind != SEMICOLON &amp;&amp; getToken(0).endLine &lt; getToken(1).beginLine`) || getToken(1).kind == RBRACE || getToken(1).kind == EOF ; } That takes care of rules 1 and 2 of the standard. For rule 3 (restricted productions) , as mentioned in my answer to this question, you could do the following void returnStatement() {} { "return" [ // Parse an expression unless either the next token is a ";", "}" or EOF, or the next token is on another line. LOOKAHEAD( { getToken(1).kind != SEMICOLON &amp;&amp; getToken(1).kind != RBRACE &amp;&amp; getToken(1).kind != EOF &amp;&amp; getToken(0).endLine == getToken(1).beginLine} ) Expression() ] PossiblyInsertedSemicolon() }
has comment: http://stackoverflow.com/comment/122596527
has comment: http://stackoverflow.com/comment/42715488
has comment: http://stackoverflow.com/comment/42705136
has comment: http://stackoverflow.com/comment/42766948
has comment: http://stackoverflow.com/comment/122472358
downvote count: 0
has comment: http://stackoverflow.com/comment/122596387
has comment: http://stackoverflow.com/comment/42718414
type: Answer
has comment: http://stackoverflow.com/comment/42718461
answers question: http://stackoverflow.com/q/27069755
score: 2

http://stackoverflow.com/q/27120929
has comment: http://stackoverflow.com/comment/42742865
score: -1
possible better answer: http://stackoverflow.com/a/27121062
has answer: http://stackoverflow.com/a/27121062
has comment: http://stackoverflow.com/comment/42742862
answer count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/27121168
has body: This is the html file conent: TODO supply a title TODO write content I'm calling both files the css and javascript. java_script.js and vertical_slide.css If i'm adding the javascript to the html file inside script tags it will work fine. But once i moved the javascript to a new file( java_script.js ) it's not working the jquery i see thei mages not in places and nothing is working. I did inspect elements and it dosn't show any errors but it's not working. This is the javascript file content: (function test() { ('#carousel').carouFredSel({ responsive: true, circular: false, auto: false, items: { visible: 1, width: 200, height: '56%' }, scroll: { fx: 'directscroll' } }); ('#thumbs').carouFredSel({ responsive: true, circular: false, infinite: false, auto: false, prev: '#prev', next: '#next', items: { visible: { min: 2, max: 6 }, width: 150, height: '66%' } }); ('#thumbs a').click(function() { ('#carousel').trigger('slideTo', '#' + this.href.split('#').pop() ); ('#thumbs a').removeClass('selected'); (this).addClass('selected'); return false; }); }); I added to the function the word test. Before it, it was only (function () { Also in the javascript file all the functions had a $ before but i removed them all since i got errors on them saying $ not defined. And last the css file: html, body { height: 100%; padding: 0; margin: 0; } body { //background: url(img/gui/bg_glare.png) top center no-repeat #bcc; } html > body { min-height: 600px; } body * { font-family: Arial, Geneva, SunSans-Regular, sans-serif; font-size: 14px; color: #333; line-height: 22px; } #wrapper { position: absolute; width: 50%; left: 25%; top: 150px; } #carousel-wrapper { padding-bottom: 10px; position: relative; } #carousel, #thumbs { overflow: hidden; } #carousel-wrapper .caroufredsel_wrapper { border-radius: 10px; box-shadow: 0 0 5px #899; } #carousel span, #carousel img, #thumbs a, #thumbs img { display: block; float: left; } #carousel span, #carousel a, #thumbs span, #thumbs a { position: relative;…
accepted answer: http://stackoverflow.com/a/27121169
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has title: How do i run/call javascript function in javascript file from html file?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27121169

closures
tags question: http://stackoverflow.com/q/27070922
tags question: http://stackoverflow.com/q/27085269
tags question: http://stackoverflow.com/q/27046914
tags question: http://stackoverflow.com/q/27069332
tags question: http://stackoverflow.com/q/27101874
tag name: closures
tags question: http://stackoverflow.com/q/26999233
type: Tag
tags question: http://stackoverflow.com/q/27006545

http://stackoverflow.com/comment/42671515
type: Comment
type: QuestionComment
has text: Oh I guess I figured you had too, since that is the right syntax, I guess JavaScript is very forgiving
score: 0
comment on: http://stackoverflow.com/q/27080965

http://stackoverflow.com/q/27123717
possible better answer: http://stackoverflow.com/a/27123867
has answer: http://stackoverflow.com/a/27123878
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42748042
has comment: http://stackoverflow.com/comment/42747867
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42747774
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27123867
has title: How Can i make a table section hidden and display after click
tagged with: css
has answer: http://stackoverflow.com/a/27123990
accepted answer: http://stackoverflow.com/a/27123990
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42747879
has body: Here is what i am doing.. its categorized table where when clicked to button shows detail regarding otherwise remain hidden, CSS is working good for me, problem is when i click on button to display tbody nothing happens, can't get what's wrong with it. have a look on my code.. css for make him hidden unless he is not clicked, .down1 { display: none; } $(document).ready(function(){ $("#show1").click(function(){ $(".down1").toggle(); }); }); Day Monday 9:00 -10:00 (time) 9:00 -10:00 (time) 9:00 -10:00 (time) 9:00 -10:00 (time) 9:00 -10:00 (time)

http://stackoverflow.com/a/27036576
upvote count: 1
answers question: http://stackoverflow.com/q/27036265
downvote count: 0
has body: If you want to make your elements centred using margin-right and margin-left try this: /* just change the element tag you want to center */ p{ margin-left:10%; margin-right:10%; } That will make all your &lt;p&gt; elements centred, and you can apply it to any element. Take a look at this Demo.
type: Answer
score: 1

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/27021410
tags question: http://stackoverflow.com/q/27079854
tags question: http://stackoverflow.com/q/27125217
tags question: http://stackoverflow.com/q/27062930
tags question: http://stackoverflow.com/q/27071097
tags question: http://stackoverflow.com/q/27102711
tags question: http://stackoverflow.com/q/27142485
tags question: http://stackoverflow.com/q/27029897
tags question: http://stackoverflow.com/q/27088967
tags question: http://stackoverflow.com/q/27074417
tags question: http://stackoverflow.com/q/27141481
tags question: http://stackoverflow.com/q/27095754
tags question: http://stackoverflow.com/q/27144544
tags question: http://stackoverflow.com/q/27102674
tags question: http://stackoverflow.com/q/27104613
tags question: http://stackoverflow.com/q/27126343
tags question: http://stackoverflow.com/q/27134846
tags question: http://stackoverflow.com/q/27057984
tags question: http://stackoverflow.com/q/27084411
tags question: http://stackoverflow.com/q/26993161
tags question: http://stackoverflow.com/q/27090638
tags question: http://stackoverflow.com/q/27098227
tags question: http://stackoverflow.com/q/27100846
tags question: http://stackoverflow.com/q/26992090
tags question: http://stackoverflow.com/q/27070328
tags question: http://stackoverflow.com/q/27039535
tags question: http://stackoverflow.com/q/27071903
tags question: http://stackoverflow.com/q/27130435
tags question: http://stackoverflow.com/q/27088170
tags question: http://stackoverflow.com/q/27140556
tags question: http://stackoverflow.com/q/27057202
tags question: http://stackoverflow.com/q/26993481
tags question: http://stackoverflow.com/q/27150480
tags question: http://stackoverflow.com/q/27054109
tags question: http://stackoverflow.com/q/27138472
tags question: http://stackoverflow.com/q/27039277
tags question: http://stackoverflow.com/q/27142123
tags question: http://stackoverflow.com/q/27119011
tags question: http://stackoverflow.com/q/27148562
tags question: http://stackoverflow.com/q/26995035
tags question: http://stackoverflow.com/q/27133690
tags question: http://stackoverflow.com/q/27098699
tags question: http://stackoverflow.com/q/27025711
tags question: http://stackoverflow.com/q/27014440
tags question: http://stackoverflow.com/q/27146258
tags question: http://stackoverflow.com/q/27043170
tags question: http://stackoverflow.com/q/27139508
tags question: http://stackoverflow.com/q/27029597
tags question: http://stackoverflow.com/q/27142475
tags question: http://stackoverflow.com/q/27079596
tags question: http://stackoverflow.com/q/27113743
tags question: http://stackoverflow.com/q/27085120
tags question: http://stackoverflow.com/q/27120929
tags question: http://stackoverflow.com/q/27014842
tags question: http://stackoverflow.com/q/27136043
tags question: http://stackoverflow.com/q/27142214
tags question: http://stackoverflow.com/q/27107224
tags question: http://stackoverflow.com/q/27133395
tags question: http://stackoverflow.com/q/27029560
tags question: http://stackoverflow.com/q/27014448
tags question: http://stackoverflow.com/q/26996412
tags question: http://stackoverflow.com/q/27025354
tags question: http://stackoverflow.com/q/27015356
tags question: http://stackoverflow.com/q/27125189
tags question: http://stackoverflow.com/q/27003911
tags question: http://stackoverflow.com/q/27063747
tags question: http://stackoverflow.com/q/27009540
tags question: http://stackoverflow.com/q/27092976
tags question: http://stackoverflow.com/q/27100341
tags question: http://stackoverflow.com/q/27064739
tags question: http://stackoverflow.com/q/27078850
tags question: http://stackoverflow.com/q/27131403
tags question: http://stackoverflow.com/q/27142954
tags question: http://stackoverflow.com/q/27009120
tags question: http://stackoverflow.com/q/27010061
tags question: http://stackoverflow.com/q/27148673
tags question: http://stackoverflow.com/q/26997895
tags question: http://stackoverflow.com/q/27083088
tags question: http://stackoverflow.com/q/27108698
tags question: http://stackoverflow.com/q/27039179

http://stackoverflow.com/comment/42691256
type: QuestionComment
comment on: http://stackoverflow.com/q/27090445
score: 0
has text: Try this http://stackoverflow.com/a/20786836/1771795 and see if does any difference.
type: Comment

http://stackoverflow.com/comment/42702843
comment on: http://stackoverflow.com/q/27099028
type: Comment
type: QuestionComment
has text: I don't personally see any advantage of `.execute()` over just calling the desired method directly. As you point out, there's still just as much coupling and it's going to be slower.
score: 1

http://stackoverflow.com/q/27003194
has comment: http://stackoverflow.com/comment/42536718
has comment: http://stackoverflow.com/comment/42536859
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42536804
has comment: http://stackoverflow.com/comment/42551836
has comment: http://stackoverflow.com/comment/42536012
type: Question
has answer: http://stackoverflow.com/a/27003675
accepted answer: http://stackoverflow.com/a/27003675
has body: In javascript I would like to convert this string: '0x7f, 0x88, 0x88, 0x88, 0x88, 0x7f' to an object that look like this: ['B00000000','B01111111','B10001000','B10001000','B10001000','B10001000','B01111111','B00000000'] Both are displaying char A on a 8*8 Led matrix. How to do this in Javascript?
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42536745
tagged with: converters
downvote count: 1
answer count: 1
tagged with: parsing
favorite count: 0
tagged with: hex
tagged with: binary
has comment: http://stackoverflow.com/comment/42536662
has title: Convert a byte for char A

http://stackoverflow.com/comment/42657286
has text: and BTW, why adding `require('http')` if you are using `express`, you already called the `http` module by calling `express` here is a simple example https://github.com/abdelouahabb/express-as-tornado
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27072319

recursion
type: Tag
tag name: recursion
tags question: http://stackoverflow.com/q/27095275
tags question: http://stackoverflow.com/q/27139436
tags question: http://stackoverflow.com/q/27062675
tags question: http://stackoverflow.com/q/27039677
tags question: http://stackoverflow.com/q/27125613
tags question: http://stackoverflow.com/q/27088739
tags question: http://stackoverflow.com/q/27108175

http://stackoverflow.com/q/27005023
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/27005055
has comment: http://stackoverflow.com/comment/42540500
possible better answer: http://stackoverflow.com/a/27005055
accepted answer: http://stackoverflow.com/a/27005371
answer count: 2
has body: I am using Angular to get output from controller and displaying with ng-bind. but I have a completely separate javascript which would need to use a value returned from angular. In the code below the TestAppCtrl is called and the output shows correctly in the DOM but when I try to show in the alert box in the second script, it shows as undefined. I have tried multiple things even in my second script getting by element and getting inner html, etc but its always undefined.
upvote count: 1
has title: How to retrieve data returned from AngularJS in another javascript script
tagged with: javascript
has answer: http://stackoverflow.com/a/27005371
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/a/27069634
has comment: http://stackoverflow.com/comment/42653071
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/63990328
has body: How about Ember.Route.extend({ actions: { willTransition: function(transition) { if (transition.get('targetName').indexOf(this.get('routeName')) === false) { // moving to a sibling or higger route } } } }); May need adjustments according to your route names.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27066997

http://stackoverflow.com/comment/42783254
type: Comment
type: QuestionComment
has text: a simple google search would have given you this. Plus please also mention in the question what you have tried.
comment on: http://stackoverflow.com/q/27143342
score: 0

http://stackoverflow.com/q/26997545
tagged with: ajax
has answer: http://stackoverflow.com/a/26997689
type: Question
possible better answer: http://stackoverflow.com/a/26997687
accepted answer: http://stackoverflow.com/a/26997689
score: 0
answer count: 2
tagged with: c#
has comment: http://stackoverflow.com/comment/42525612
has title: Passing a value with Ajax to code behind in ASP.NET
tagged with: javascript
has comment: http://stackoverflow.com/comment/42525799
has body: I'm trying to pass a set of values using Ajax to a code-behind method and inserting passed data into a database table. But all I get are empty strings for string variables and 0 for int variable. I guess that my Ajax code is not working properly, but since I'm totally new to this does anybody sees what I'm doing wrong and why I can not pass values from textboxes to my C# method. This is a HTML code: Create new team member Name: Hours per week: Username: Email: Status: Inactive: Active: Role: Admin: Worker: Invite team member This is my JS code: And this is code-behind: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static string InsertMember(string Name, string UserName, string HoursPerWeek, string Email) { string retMessage = string.Empty; string ConnectionString = "Data Source=PRACTICE-001;Initial Catalog=n.mosorinski;User ID=n.mosorinski;Password=n.mosorinski;MultipleActiveResultSets=True;Application Name=EntityFramework"; using (SqlConnection con = new SqlConnection(ConnectionString)) { string Query = "insert into TeamMember(Name, UserName, HoursPerWeek, Email) values(@Name,@UserName,@HoursPerWeek,@Email)"; using (SqlCommand cmd = new SqlCommand(Query, con)) { con.Open(); cmd.Parameters.Add("@Name", Name); cmd.Parameters.Add("@UserName", UserName); cmd.Parameters.Add("@HoursPerWeek", HoursPerWeek); cmd.Parameters.Add("@Email", Email); int AffectedRow = cmd.ExecuteNonQuery(); if (AffectedRow == 1) { retMessage = "true"; } else { retMessage = "false"; } } return retMessage; } } So the problem is that I got empty strings and 0 (for HoursPerWeek) instead of values from textboxes.
type: AnsweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/26997687
tagged with: asp.net

http://stackoverflow.com/a/27025506
has body: I believe what you're doing is trying to hide options inside a select might not be the best approach , try creating one select for each day of the week and show them accordingly like: else if (dayName == "Friday") { hideAll(); // hide all the selects $('#fridaySelect').show(); // only shows friday select with all its valid options
answers question: http://stackoverflow.com/q/27024772
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/42575010

http://stackoverflow.com/a/27102914
answers question: http://stackoverflow.com/q/27102591
score: 0
type: Answer
has body: here is the same using jquery http://jsfiddle.net/h9h5858L/1/

http://stackoverflow.com/comment/63142067
comment on: http://stackoverflow.com/a/37840220
type: Comment
has text: the result of lastdigit(1.2) will be 1.2, not 2 like the OP said
score: 0
type: AnswerComment

http://stackoverflow.com/q/27110691
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42724963
has body: I'm trying to change a set of images by clicking on them with a fade transition. But the code is not working. I'm not really sure why is not working. Am I missing something? or is there anything I should remove from the code? Thanks in advance CSS3 fade transition demo - jsFiddle demo by arunberti
tagged with: css
has title: fade transition JavaScript and HTML5
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42724537
has comment: http://stackoverflow.com/comment/42724475
type: Question
score: 0
tagged with: javascript

http://stackoverflow.com/comment/42706243
comment on: http://stackoverflow.com/a/27100987
score: 0
type: AnswerComment
has text: @sanojoverflow, did it worked for you here? did you wrapped your code inside $(document).ready(function(){/* to do here */}) or $(function(){/* to do here */})?
type: Comment

http://stackoverflow.com/comment/42646693
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27066274
has text: Perhaps this one is more on point: http://stackoverflow.com/questions/20086473/table-with-fixed-and-scrolling-columns
type: Comment

http://stackoverflow.com/q/27003488
has comment: http://stackoverflow.com/comment/42536842
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42536771
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42536856
has comment: http://stackoverflow.com/comment/42536612
tagged with: javascript
tagged with: ajax
has body: I'm building a search results page. Inside this page, when I trigger a re-search, it sends an ajax call and returns a search result id, once front end has this id returned, it will trigger a redirect with the following code: window.location.href = '/results/?search_results_id=' + search_results_id; Where basically it's doing a page reload with an updated search_results_id. But for some reason it's not always doing a reload, sometimes it refreshes the whole page with the updated results but sometimes it's reloading the old results. In short, the flow of the re-search is, send an ajax call to the backend with search params, backend connects with a third party api to grab the results, stored in memcache, and returns a cache id to frontend, when loading the search results page, the app uses the cache id from the url to load data from memcache and returns to front end for displaying. My problems is when the search is triggered from the search results page, this essentially will be a page reload with an updated search result id on the url. And when it reloads, browser is loading the cached page with no request being sent to backend for new results.
score: 0
has title: How to reload current page with updated query string and disable cache with javascript?

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

http://stackoverflow.com/q/27116134
has answer: http://stackoverflow.com/a/27126286
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27126286
tagged with: javascript
has body: How do I show relative time on the x-axis in a Highstocks chart? From my understanding, the datetime type is only used to format dates, not edit them in any way. The data structure that I am trying to display is sorted by unix timestamps and looks like the following, but can be changed if needed: [ // [timestamp, value] [1416478472, 1], [1416478473, 1], [1416478474, 0.5], [1416478475, 0.25] ... ] My goal is to have the x-axis use appropriate labels that shows time elapsed since the first entry, such as this when zoomed in: 00.05 00.10 00.15 00.20 00.25 // hours.minutes and this when zoomed out: 01.00 02.00 03.00 04.00 05.00 // hours.minutes In other words, just like the default behaviour, but with the time being relative instead of absolute.
tagged with: highcharts
answer count: 1
downvote count: 0
favorite count: 0
has title: Relative time in Highstocks chart

http://stackoverflow.com/q/27116725
favorite count: 0
tagged with: ruby
accepted answer: http://stackoverflow.com/a/27117804
possible better answer: http://stackoverflow.com/a/27116962
has answer: http://stackoverflow.com/a/27116962
tagged with: ruby-on-rails
has title: How to decode Chinese hex string into Chinese characters or JavaScript?
type: AnsweredQuestion
type: Question
score: 5
tagged with: encoding
has answer: http://stackoverflow.com/a/27117804
upvote count: 5
tagged with: javascript
has body: I am working on a Rails app. I am using an API that returns some Chinese provinces. The API returns the provinces in hex strings, for example: { "\xE5\x8C\x97\xE4\xBA\xAC" =&gt; "some data" } My JavaScript calls a controller that returns this hash. I put all the province strings into a dropdown but the strings show up as a black diamond with a question mark in the middle. I am wondering how do I convert the Ruby hex string into actual Chinese characters, 北京? Or if possible, can I convert the hex string in JavaScript into Chinese characters?
answer count: 2
downvote count: 0
tagged with: string

google-places-api
tags question: http://stackoverflow.com/q/27069920
type: Tag
tags question: http://stackoverflow.com/q/27072844
tags question: http://stackoverflow.com/q/27000493
tag name: google-places-api

http://stackoverflow.com/q/27024487
tagged with: jquery-ui
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: droppable
has title: How can I initialize a draggable on a droppable in Jquery?
type: Question
tagged with: draggable
has body: I am making a puzzle game in jquery and am using draggable and droppable. The puzzle starts with 6 pieces in the queue and I want to be able to move pieces from the puzzle board back to the queue but right now I can only move them to the board. I am working on solving this by adding a droppable to the queue but I don't know how to drop the draggable pieces into the droppable queue on initialization. Thanks in advance! Jsfiddle: http://jsfiddle.net/p8tpn5e6/ Below is the queue droppable creation and then the pieces creation. I want to drop the pieces into the queue on-load. function init() { // Create Queue for ( var i=0; i&lt;6; i++ ) { $('&lt;div&gt;' + 'q' + [i] + '&lt;/div&gt;').attr( 'id', 'queue'+numbers[i] ).appendTo( '#queuePile' ).droppable( { accept: '#tilePile div', hoverClass: 'hovered', drop: handleTileDrop, } ); } // Create the pile of tiles for ( var i=0; i&lt;6; i++ ) { $('&lt;div&gt;' + numbers[i] + '&lt;/div&gt;').data( 'number', numbers[i] ).attr( 'id', 'card'+numbers[i] ).appendTo( '#tilePile' ).draggable( { containment: '#content', stack: '#tilePile div', cursor: 'move', revert: 'invalid' } ); }
score: 0
has answer: http://stackoverflow.com/a/27031837
answer count: 1

http://stackoverflow.com/comment/42582748
comment on: http://stackoverflow.com/q/27030159
type: QuestionComment
type: Comment
score: 3
has text: How are you trying to run it? It works perfectly well: `var Example = require('./example.js'); new Example().run();`

http://stackoverflow.com/a/27098001
answers question: http://stackoverflow.com/q/27097922
type: Answer
score: 1
upvote count: 1
has body: try this $(function () { var array = []; $(".entry").each(function () { array.push($(this).data("name")); }); console.log(array); });
downvote count: 0

http://stackoverflow.com/a/27067519
has comment: http://stackoverflow.com/comment/42714586
type: AcceptedAnswer
score: 18
has comment: http://stackoverflow.com/comment/44436152
type: Answer
answers question: http://stackoverflow.com/q/27065230
has body: Canvas can do this using the clipping version of context.drawImage. context.drawImage allows you to clip your 9 sub-pieces from the original image and then draw them anywhere on the canvas. The clipping version of drawImage takes these arguments: the image to be clipped: img the [clipLeft, clipTop] in the original image where clipping starts the [clipWidth, clipHeight] size of the sub-image to be clipped from the original image the [drawLeft, drawTop] on the Canvas where the clipped sub-image will start drawing the [drawWidth, drawHeight] is scaled size of the sub-image to be drawn on the canvas If drawWidth==clipWidth and drawHeight==clipHeight, the sub-image will be drawn at the same size clipped from the original. If drawWidth!==clipWidth and drawHeight!==clipHeight, the sub-image will be scaled and then drawn. Here's example code and a Demo that randomly draws the clipped pieces onto the canvas. It shuffles an array to define random positions for the pieces and then draws those pieces using drawImage. var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw=canvas.width; var ch=canvas.height; var rows=3; var cols=3; var img=new Image(); img.onload=start; img.src="https://dl.dropboxusercontent.com/u/139992952/multple/sailboat.png"; function start(){ var iw=canvas.width=img.width; var ih=canvas.height=img.height; var pieceWidth=iw/cols; var pieceHeight=ih/rows; var pieces = [ {col:0,row:0}, {col:1,row:0}, {col:2,row:0}, {col:0,row:1}, {col:1,row:1}, {col:2,row:1}, {col:0,row:2}, {col:1,row:2}, {col:2,row:2}, ] shuffle(pieces); var i=0; for(var y=0;y&lt;rows;y++){ for(var x=0;x&lt;cols;x++){ var p=pieces[i++]; ctx.drawImage( // from the original image img, // take the next x,y piece x*pieceWidth, y*pieceHeight, pieceWidth, pieceHeight, // draw it on canvas based on the shuffled pieces[] array p.col*pieceWidth, p.row*pieceHeight, pieceWidth, pieceHeight ); }} } function shuffle(a){ for(var j, x, i = a.length; i; j = Math.floor(Math.rando…
accepted answer of: http://stackoverflow.com/q/27065230
downvote count: 0
upvote count: 18

http://stackoverflow.com/q/27079583
type: Question
tagged with: video
has comment: http://stackoverflow.com/comment/42669311
has title: Drawing video on canvas
tagged with: canvas
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4429440
has answer: http://stackoverflow.com/a/27082519
type: UnansweredQuestion
has body: I'm trying to draw a video from video element on canvas. I wrote the following JS code: $(function () { var video = $("#video"); video.bind("loadedmetadata", function () { var vw = this.videoWidth; var vh = this.videoHeight; var canvas = $('#canvas'); canvas.width(vw).height(vh); var context = canvas.getContext("2d"); video.addEventListener("play", function () { draw(video, context, vw, vh); }, false); }); }); function draw(video, context, vw, vh) { if (video.paused || video.ended) { return false; } context.drawImage(video, 0, 0, vw, vh); setTimeout(draw, 20, video, context, vw, vh); } This is my HTML: &lt;body&gt; &lt;video id="video" autoplay controls&gt; &lt;source src="src1.avi" /&gt; &lt;source src="src2.mov" /&gt; &lt;source src="src3.ogg" /&gt; &lt;source src="src4.avi" /&gt; &lt;/video&gt; &lt;canvas id="canvas"&gt; Please update your browser. &lt;/canvas&gt; JSFiddle here I can see the video playing, but it's not being redrawn onto the canvas. Where's my mistake?

http://stackoverflow.com/comment/42547233
type: AnswerComment
has text: Actually Bootstrap will do this for you. I used ` `on 2 differents ` ` so bootstrap will make they width 50% (left and right column) [Grid documentation](http://getbootstrap.com/css/#grid). Then, when you click on any of the 2 buttons, I make an AJAX call to `getAnimal.php` to get the information I need then I'm outputting this information in the ` `. I hope it helps a little bit more
score: 0
comment on: http://stackoverflow.com/a/27009028
type: Comment

http://stackoverflow.com/a/27057393
has comment: http://stackoverflow.com/comment/42630233
upvote count: 0
has body: { Latitude: -0.020223, Longitude: 51.504859, Addresses: [ {"Abbey Offices Ltd, 1 Canada Square, LONDON"}, { "B B V A, 1 Canada Square, LONDON"}, { "B P R Interiors Ltd, 1 Canada Square, LONDON"}, { "Citihub Ltd, 1 Canada Square, LONDON"}, { "Coutts &amp; Co, 1 Canada Square, LONDON"} ] } Above should be the response from request query. Use @XMLRootElement before Class Address if your Address is a Bean/Model instance
type: Answer
score: -1
has comment: http://stackoverflow.com/comment/42633609
answers question: http://stackoverflow.com/q/27057285
downvote count: 1
has comment: http://stackoverflow.com/comment/42640936

http://stackoverflow.com/comment/42749472
comment on: http://stackoverflow.com/a/27123797
type: Comment
has text: @xtrman: it's just an example. I have no idea what the rest of your code looks like.
score: 2
type: AnswerComment

http://stackoverflow.com/comment/42773726
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27137462
has text: Ok. When I get to a computer I'll post an answer for you

http://stackoverflow.com/q/27102432
score: 1
tagged with: asynchronous
has body: Suppose we have these two async functions: function myfu(f) { setTimeout(function(){ f(true) }, 200) } function myfu2(x, f) { setTimeout(function(){ f(500 + x) }, 200) } I was thinking about this syntax: if (myfu.()) { var d = myfu2.(55) console.log(d) // outputs 555 } which is amazingly simpler to type and read that this: myfu(function (DOTCALL1) { if (DOTCALL1) { myfu2(55, function (DOTCALL2) { d = DOTCALL2 console.log(d) // outputs 555 }) } }) The conversion from .( syntax could be easily implemented by means of search/replace/regex. I noticed that most of the time the result of my asynchronous functions is not used, and after it was called, the upper functions also exits immediately. Although sometimes the upper function can do something after it called the first async(callback), usually it does nothing. Sometimes the asynchronous function could return something useful, but most of the time it just returns undefined and real stuff is returned with callback(result). So I thought that maybe I could modify the code some how to make it easier to type and read. Which is illustrated by the example above. My question is sipmle: is there already similar solution? I do not want to reinvent the wheel (if it is already invented). Or, if there is no such project, why not, why this approach, which seems so easy to implement and supposed to simplify development significantly is not used? Please do not respond with the suggestion to "take a look at async.js". I am not asking about asynchronous programming patterns, asynchronous programming in general, not about arrow function notation =>, not about coffeScript. I am asking about a code conversion on the text level from proposed original syntax form to well known async ladder, aka "callback hell" notation.
favorite count: 0
has title: Automatic callback ladder creator
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27114971
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27102833
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27102833
downvote count: 0
accepted answer: http://stackoverflow.com/a/27114971

http://stackoverflow.com/a/27094000
answers question: http://stackoverflow.com/q/27092323
has comment: http://stackoverflow.com/comment/42768274
has comment: http://stackoverflow.com/comment/42768107
has body: Assuming you are returned an array of objects with id, name and email. You would just iterate the array, create listitem markup and append it to the existing listview DOM element, e.g.: function redrawUi(mydb) { var itemsHTML = ''; for (var i=0; i&lt;mydb.length; i++){ itemsHTML += '&lt;li&gt;' + mydb[i].name + ' - ' + mydb[i].email + '&lt;/li&gt;'; } $("#list").empty().append(itemsHTML).listview("refresh"); }
score: 0
accepted answer of: http://stackoverflow.com/q/27092323
has comment: http://stackoverflow.com/comment/42798055
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42780526

http://stackoverflow.com/comment/42601187
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27040721
has text: how the popover is closed after a button click ? Is there is any external functions to do that ???
type: AnswerComment

http://stackoverflow.com/comment/105165153
type: Comment
has text: filter: {name: $select.search, email: $select.search}.... Working fine for me..
comment on: http://stackoverflow.com/a/27147101
score: 1
type: AnswerComment

http://stackoverflow.com/q/27016821
has answer: http://stackoverflow.com/a/27017154
accepted answer: http://stackoverflow.com/a/27017154
has title: How to set infowindow for all markers in google map using JavaScript?
type: AnsweredQuestion
score: 0
type: Question
has body: I created stop point markers for where truck stopped.But I need some help for open infowindow when clicked all stop point. My js codes : var ImageStop = '/images/StopPoint.gif'; var infoWindowTrcukStop = new google.maps.InfoWindow(); var json = result.d; obj = JSON.parse(json); for (var i = 0; i &lt; obj.length - 1; i++) { if(parseInt(obj[i].Speed)==0) { var LatLngStop = new google.maps.LatLng(obj[i].Lat, obj[i].Lng); markerStopTruck = new google.maps.Marker({ position: LatLngStop, draggable: true, animation: google.maps.Animation.DROP, map: map, title: 'Stopped Here', icon: ImageStop, }); google.maps.event.addListener(markerStopTruck, 'click', function (e) { infoWindowTruckStop.setContent(this.title); infoWindowTruckStop.open(map, markerStopTruck); }); markerStopTruck.setMap(map); } }
tagged with: javascript
tagged with: google-maps-api-3
answer count: 1

http://stackoverflow.com/q/27049577
score: 0
has title: JavaScript and HTML form validation
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27049678
accepted answer: http://stackoverflow.com/a/27049678
has comment: http://stackoverflow.com/comment/42616759
has body: I tried to do a simple validation on a button, but when I click the button without entering anything it still goes to testValidation1.html instead of popping up the alert window. Parameter1 :
has comment: http://stackoverflow.com/comment/42617118
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42616996
has comment: http://stackoverflow.com/comment/42617087
type: Question
has comment: http://stackoverflow.com/comment/42616717
has comment: http://stackoverflow.com/comment/42616803
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27022559
type: Answer
answers question: http://stackoverflow.com/q/27022527
upvote count: 4
has body: You're looking for navigator.userAgent.
downvote count: 0
score: 4

http://stackoverflow.com/q/27134568
answer count: 3
accepted answer: http://stackoverflow.com/a/27134652
tagged with: javascript
has comment: http://stackoverflow.com/comment/42768299
favorite count: 0
has comment: http://stackoverflow.com/comment/42769008
has answer: http://stackoverflow.com/a/27134652
possible better answer: http://stackoverflow.com/a/27134730
upvote count: 1
has comment: http://stackoverflow.com/comment/42769048
has comment: http://stackoverflow.com/comment/42768543
has body: I'm fairly new to Javascript and I'm trying to achieve something extremely simple but it seems impossible (at least the way I want it). Basically, I've got a HTML file with an image that I want to change to a different one every time I click on a button. I've got 4 images in total and the initial image in the HTML file is "1.jpg". The problem is, I can only change the initial "1.jpg" to "2.jpg" and any further attempts to change "2.jpg" to "3.jpg" and so on fail. Here's the code function changepicture() { var a = ["1.jpg" , "2.jpg" , "3.jpg" , "4.jpg"]; if (document.getElementById('img1').src=a[0]) { document.getElementById('img1').src=a[1]; } else if (document.getElementById('img1').src=a[1]) { document.getElementById('img1').src=a[2]; } else if (document.getElementById('img1').src=a[2]) { document.getElementById('img1').src=a[3]; } else { document.getElementById('img1').src=a[0]; } } The thing is, I can get it to work if I change the code to: var i=0; function changepicture() { i++; if (i&gt;3) { i=0; } var a = ["1.jpg" , "2.jpg" , "3.jpg" , "4.jpg"]; document.getElementById('img1').src=a[i]; } But, in spite of having a working alternative, I'm still not satisfied as I am convinced the first method should also work.
type: Question
has answer: http://stackoverflow.com/a/27134923
has comment: http://stackoverflow.com/comment/42767570
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42768211
score: -2
downvote count: 3
has answer: http://stackoverflow.com/a/27134730
has title: if...else if...else statement not working as intended

http://stackoverflow.com/q/27016412
has body: Is it possible to traverse the DOM subtree when I am using a Polymer element custom-element like Bar Hello I want to be able to parameterize my Polymer element using the markup that's wrapped by it.
has title: Traverse DOM tree of Polymer element
type: AnsweredQuestion
score: 0
type: Question
tagged with: polymer
accepted answer: http://stackoverflow.com/a/27019629
tagged with: javascript
answer count: 1
tagged with: shadow-dom
has answer: http://stackoverflow.com/a/27019629

http://stackoverflow.com/comment/42520138
has text: `obj.newarray = [];`?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/26994785
type: Comment

http://stackoverflow.com/a/27153754
accepted answer of: http://stackoverflow.com/q/27137834
answers question: http://stackoverflow.com/q/27137834
type: Answer
score: 22
has body: The component binding doesn't happen magically: it happens when you call ko.applyBindings();. At this moment, the bound HTML is searched for components, and they are bound. Later on, when you dynamically add a new component to the page, it's not bound, unless you explicitly bind it. So, in your code, the component is fully ignored. As stated, what you need to do is to explicitly bind it. But you must take into account that you cannot bind nodes that have already been bound. However it's extremely easy to create a node with jquery, append it to the DOM, and bind it. There is a syntax to specify the viewmodel and the node to which you want to bind it: ko.applyBindings(viewModel, node); Here you have a full working sample in jsfiddle. This is the code in that fiddle: HTML: Here's a widget, declared inline: Add a new widget to the grey box: Widgets will be appended here JavaScript: ko.components.register('like-widget', { template: ' This is the widget ' }); ko.applyBindings() $('#btnAdd').on('click', function() { // Create your widget node var $newWidget = $('<like-widget>'); // Append it to your "append area" $('#addZone').append($newWidget); // Apply bindings to the newly added node ko.applyBindings({}, $newWidget[0]); }); NOTE: when calling apply bindings I pass an empty objet: don't pass a null, or you'll get an error. If your template includes a viewmodel, it will be used independently of the passed view model. NOTE: $newWidget is a jquery object. $newWidget[0] is the first (and only, in this case) DOM element of the jQuery object, as required by applyBindings
has comment: http://stackoverflow.com/comment/42825739
has comment: http://stackoverflow.com/comment/42814672
upvote count: 22
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42583394
type: AnswerComment
score: 0
type: Comment
has text: Well let me clear one thing. Does the div #rowcounter exist from the beginging or you appened after page load
comment on: http://stackoverflow.com/a/27023266

http://stackoverflow.com/q/27014005
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27036648
has answer: http://stackoverflow.com/a/27014597
downvote count: 3
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/42554344
has title: JS doesnt work in Chrome Extension
tagged with: javascript
has comment: http://stackoverflow.com/comment/42554300
answer count: 2
upvote count: 0
has body: My Javascript doesn't work in my Google Chrome extension. I never worked with Google Chrome extensions before and I don't know how to handle this problem. I want to embed JS in my HTML, but it just doesn't work. We see the calculator, but the buttons do anything. Even if we type in some numbers and press enter, the numbers will be deleted and nothing happens. Here my HTML and JS: Home HTML AFMO Calculator <id="Links"> </id> linked HTML Taschenrechner JS function Check (Eingabe) { var nur_das = "0123456789[]()-+*%/."; for (var i = 0; i < Eingabe.length; i++) if (nur_das.indexOf(Eingabe.charAt(i)) < 0) return false; return true; } function Ergebnis () { var x = 0; if (Check(window.document.Rechner.Display.value)) x = eval(window.document.Rechner.Display.value); window.document.Rechner.Display.value = x; } function Hinzufuegen (Zeichen) { window.document.Rechner.Display.value = window.document.Rechner.Display.value + Zeichen; } function Sonderfunktion (Funktion) { if (Check(window.document.Rechner.Display.value)) { if (Funktion == "sqrt") { var x = 0; x = eval(window.document.Rechner.Display.value); window.document.Rechner.Display.value = Math.sqrt(x); } if (Funktion == "pow") { var x = 0; x = eval(window.document.Rechner.Display.value); window.document.Rechner.Display.value = x * x; } if (Funktion == "ln") { var x = 0; x = eval(window.document.Rechner.Display.value); window.document.Rechner.Display.value = Math.log(x); } } else window.document.Rechner.Display.value = 0} Some more Info: This is our own Chrome app. We just copied the calculator, but we wont release this app, so i guess this doesnt matter. EDIT This comes in the console when i press any number on the calculator. Refused to execute inline event handler because it violates the following ""SEE BELOW"" Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. I …
favorite count: 0
type: UnansweredQuestion
score: -3

http://stackoverflow.com/q/27005729
has body: I have just experienced this mind boggling thing. I was coding in my javascript project, when suddenly after the refresh I get a Uncaught SyntaxError: Unexpected token ILLEGAL for every line 1 of every javascript file. (Even the minified ones which I have NEVER touched) What are these characters? random 特⁶㈮ㄮ〠簠⡣⤠㈰. This literally happened from one second to the other. Now, I deleted the contents of one of my javascript files completely and the error dissapears. As soon as I write "va" I get Uncaught ReferenceError: 癡 is not defined It seems that my javascript files are interpreted with the wrong character encoding? I checked all my files and they are UTF-8 encoded. What is going on. Please help :/ P.s. This happens on Safari and Chrome Thanks, Marc
score: 0
has comment: http://stackoverflow.com/comment/42540777
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42570627
has comment: http://stackoverflow.com/comment/42540913
has title: Suddenly every javascript file line 1: Chinese characters in browser console
tagged with: character-encoding
type: Question
has comment: http://stackoverflow.com/comment/42572228
tagged with: javascript

http://stackoverflow.com/q/27056394
has body: I am aware that you can use a closure and an anonymous function to pass arguments to an event handler, such as in: function addClick(el, a, b) { el.addEventListener('click', function(e) { //a and b are available here }); } But the problem is, when you do it this way, you can't remove the event listener since it's anonymous. Might need to both be able to pass arguments and remove the handler at some point, so I was wondering if this is possible in some way, or if there is another method to achieve the same end. Only thing I can think of is to add properties to the handler and access them that way: var handler = function() { console.log(handler.a); console.log(handler.b); } handler.a = 'argument1'; handler.b = 'argument2'; el.addEventListener('click', handler);
downvote count: 0
tagged with: dom-events
favorite count: 0
answer count: 0
linked to: http://stackoverflow.com/q/5660131
upvote count: 2
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4305196
score: 2
has comment: http://stackoverflow.com/comment/42628690
has comment: http://stackoverflow.com/comment/42644360
has comment: http://stackoverflow.com/comment/128741540
type: Question
tagged with: javascript
has title: How to pass arguments to a named event handler
tagged with: event-handling

http://stackoverflow.com/comment/42573005
comment on: http://stackoverflow.com/a/27024587
score: 0
type: AnswerComment
type: Comment
has text: Also, I can't omit the "var" declaration as that would overwrite the global variable. I just want to override it. Is there another solution you could think of maybe? I'm all out of ideas at the moment. Lol

http://stackoverflow.com/comment/42676676
score: 0
has text: so what have you tried?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27083790

http://stackoverflow.com/q/27068720
has body: I'm trying to follow this simple tutorial regarding the standard grey out/popup display used in many website. Ironically enough, this looks decent enough in IE but in Chrome I can't quite get the look I want. Right now everything, including the pop up, is greyed out. How can I alter the jquery/css so everything on the screen is greyed out except the fancybox pop up? Fiddle: http://jsfiddle.net/Lc0q57nz/ jQuery $(document).ready(function () { $('body').css({ opacity: 0.5, 'width':$(document).width(),'height':$(document).height()}); //Determine which links to show in navbar window.onload = function() { $.ajax({ type: 'GET', url: '@Url.Action("CheckSecurity", "Home")', dataType: 'json', success: function(data) { if (data == "viewer" || data == "NA") { $('#Review').hide(); $('.Admin').hide(); } else if (data == "modifier") { $('.Admin').hide(); } } }); }; var display = " Monet has moved! " + " Click the link below if you are not redirected momentarily. To add the new page as a bookmark please click here " + "Click here "; $.fancybox(display, { fitToView: false, autoScale: true, autoDimension: true, closeClick: true, openEffect: 'fade', closeEffect: 'fade', closeBtn: true, openSpeed: 'fast', closeSpeed: 'fast' }).css({ 'display': 'block', 'z-index': '-1' }); }); function BookmarkMe() { var bookmarkUrl = "http://insideshared.symetra.com/Monet/"; var bookmarkTitle = this.title; if (/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())) { //For Chrome alert('Chrome does not support this function. Please bookmark the page once redirected.'); return false; } else if (window.sidebar) { // For Mozilla Firefox Bookmark window.sidebar.addPanel(bookmarkTitle, bookmarkUrl, ""); } else if (window.external || document.all) { // For IE Favorite window.external.AddFavorite(bookmarkUrl, bookmarkTitle); } else if (window.opera) { // For Opera Browsers $("#bookmarkme").attr("href", bookmarkUrl); $("#bookmarkme").attr("title", bookmarkTitle); $("#bookmarkme").attr("rel", "sidebar"); } els…
type: Question
has comment: http://stackoverflow.com/comment/42653844
has comment: http://stackoverflow.com/comment/42653618
has comment: http://stackoverflow.com/comment/42653758
has title: Grey out everything but fancybox popup
has comment: http://stackoverflow.com/comment/42651722
has comment: http://stackoverflow.com/comment/42653172
has comment: http://stackoverflow.com/comment/42650574
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42650862
has comment: http://stackoverflow.com/comment/42653358
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42740554
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27119291
type: Comment
has text: can you make a jsfiddle or something like that ??

http://stackoverflow.com/comment/42690358
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27088925
type: AnswerComment
has text: I'm not sure I understand how to use it. For example, `[1, 2, 3].indexOf(1)` returns `0` while `[{a: 1}, {a: 2}].indexOf({a: 1})` returns `-1`. How should I use `indexOf` to find index of non-primitive within array?

http://stackoverflow.com/q/27033968
has body: Searched but did not get a proper solution. I have a json string which is coming from the server. I want to convert the string to javascript array so that I can sort the data based on "hotel_name", 'minPrice', 'hotel_star'. Here is the JSON string. { "00001065": { "hotel_id": "00001065", "hotel_name": "The Infantry Hotel", "hotel_star": "3", "image": "", "location": "Infantry Road", "minPrice": "2,497", "RoomTypes": [ { "RoomTypeName": "Deluxe King / Twin Double", "AvailableQuantity": "4", "RatePlanInclusions": "Complimentary Wi-Fi Internet", "price": "2,497" }, { "RoomTypeName": "Superior Double", "AvailableQuantity": "2", "RatePlanInclusions": "Breakfast", "price": "3,496" } ] }, "00001080": { "hotel_id": "00001080", "hotel_name": "Hotel Ramanashree", "hotel_star": "3", "image": "", "location": "Richmond Road", "minPrice": "3,879", "RoomTypes": [ { "RoomTypeName": "Executive Room", "AvailableQuantity": "25", "RatePlanInclusions": "Breakfast", "price": "3,879" }, { "RoomTypeName": "Club Room", "AvailableQuantity": "25", "RatePlanInclusions": "Breakfast", "price": "4,604" } ] }, "00003757": { "hotel_id": "00003757", "hotel_name": "The Paul ", "hotel_star": "5", "image": "", "location": "Domlur Layout", "minPrice": "6,216", "RoomTypes": [ { "RoomTypeName": "Executive Suite - Two Bedrooms Suite", "AvailableQuantity": "4", "RatePlanInclusions": "Complimentary Wi-Fi Internet, Breakfast", "price": "8,942" }, { "RoomTypeName": "Premier Suite - Two Bedrooms Suite", "AvailableQuantity": "2", "RatePlanInclusions": "Complimentary Wi-Fi Internet, Breakfast", "price": "10,718" }, { "RoomTypeName": "Studio Suite - One Bedroom Suite", "AvailableQuantity": "4", "RatePlanInclusions": "Complimentary Wi-Fi Internet, Breakfast", "price": "6,216" } ] } }
has comment: http://stackoverflow.com/comment/42589114
score: -2
has title: How to convert json string to a javascript array?
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42589067
has answer: http://stackoverflow.com/a/27035449
has answer: http://stackoverflow.com/a/27034009
tagged with: arrays
has answer: http://stackoverflow.com/a/27035847
linked to: http://stackoverflow.com/q/4935632
downvote count: 5
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7306669
has comment: http://stackoverflow.com/comment/42588890
answer count: 4
has comment: http://stackoverflow.com/comment/42588974
has comment: http://stackoverflow.com/comment/42589362
favorite count: 0
has answer: http://stackoverflow.com/a/27034054
has comment: http://stackoverflow.com/comment/42589440
type: Question

leap-motion
tags question: http://stackoverflow.com/q/27049650
tag name: leap-motion
type: Tag
tags question: http://stackoverflow.com/q/27139914

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

http://stackoverflow.com/q/26998592
has comment: http://stackoverflow.com/comment/42527817
type: Question
tagged with: asp-classic
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27043110
score: 0
has title: classic asp code in .js file
has body: I have some old code that I am supposed to touch up, and it appears someone included classic asp code inside a .js file in order to render a javascript function based on some session variable values, but i receive a 'syntax error' when rendering the page, which i am trying to resolve. the code is as follows; &lt;% if Session("Money_Guide_Pro_Application_Granted") = "Y" then %&gt; function OpenMGP() { var oNewWindow = "MGP"; window.open("https://" + "&lt;%=Request.ServerVariables("SERVER_NAME")%&gt;" + "/applications/commlink/MGPRO/MGProRepSelect.aspx",oNewWindow,"height=600,width=667,status=no,toolbar=no,scrollbars=yes,menubar=yes,resizable=yes,location=no"); } &lt;% else %&gt; function OpenMGP() { var oNewWindow = "MGP"; window.open("https://" + "&lt;%=Request.ServerVariables("SERVER_NAME")%&gt;" + "/backoffice/Planning/MGPNoSub.asp", oNewWindow,"height=400,width=500,status=no,toolbar=no,scrollbars=yes,menubar=yes,resizable=yes,location=no"); } &lt;% end if %&gt; basically to use a different url when opening up the window depending on the users permissions that are set. I thought this wasn't possible because classic asp is server side and all .js is client side so I figured once the client hit this .js file it wouldn't be able to parse server side code. any help would be appreciated.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42529757
has answer: http://stackoverflow.com/a/27002499
has comment: http://stackoverflow.com/comment/42528153

http://stackoverflow.com/comment/42651368
type: QuestionComment
has text: Why regex? Why not simple string manipulation like `split()` or a parsing approach?
score: 0
comment on: http://stackoverflow.com/q/27069036
type: Comment

http://stackoverflow.com/a/27034978
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42591005
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27034959
has comment: http://stackoverflow.com/comment/42591240
has comment: http://stackoverflow.com/comment/42591126
accepted answer of: http://stackoverflow.com/q/27034959
has body: angular.module('RateRequestApp', [ 'RateRequestApp.services', 'RateRequestApp.controllers' ]); You needed to have the services loaded before the controllers in your app.js! There is also a spelling error in your controller: controller('ReadOnlyController', function ($scope, rateRequestApIservice) { rateRequestApIservice &lt;-- wrong You may want a simpler name! rateRequestApIservice.getDrivers() The above function doesn't exist in your service! Just a note on your code , I suggest organising your service like below to help you understand the service when you come back to it later on. angular.module('rateRequestApp.services', []). factory('rateRequestService', ['$http', rateRequestService]); function rateRequestService($http) { var service = { getData: getData }; return service; function getData() { return $http({ method: 'Get', url: '../services/getratesws.aspx?fn=parcellookupData' }); } } So bit by bit I will discuss why. angular.module('rateRequestApp.services', []). factory('rateRequestService', ['$http', rateRequestService]); You can see the dependency injection working ['$http', ...] so you know exactly what your service needs from the first instance - i.e. when you first look at it. var service = { getData: getData }; return service; This bit easily shows you what functions your service has. Its so quick and easy to decipher what your service can do, without seeing any code! These two bits of code simplification makes it really easy for you to see from a quick glance, at the top of your file, what it is your service is trying to achieve! Please also note the naming conventions I'm using, I use camel casing to format names as well. If you can pick up a consistent approach this will prevent the second error in your code!

http://stackoverflow.com/q/27063739
answer count: 0
has comment: http://stackoverflow.com/comment/42642124
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42642727
score: 0
has body: I'm trying to build an onboarding form similar to the one AirBnB uses for their hosts. (https://www.airbnb.com/rooms/new) In particular, I want to let users select a text_field value from 5 options via custom buttons, much like AirBnB's "Home Type". So far, I've got a hidden_field in my Rails form, like so: <%= f.hidden_field :provider_type_id, :id => "account_provider_type_id", :value => @account.provider_type_id %> I'd like the user to be able to select :provider_type_id from among ["1", "2", "3", "4", "5"]. I've also got a button-group consisting of five buttons. Here's an example of one: Helpful Hobbyist I'm hoping to use the data-attribute data-provider-type-id here to set the value of :provider_type_id in my hidden_field using javascript. Here's what I have so far for the javascript/jQuery (at top of the view template for now): The console doesn't show any javascript errors when I load the page. When I submit the form, other parameters are passed successfully, as evidenced in the development log, but the provider_type_id shows up as "" in the params no matter which button I click. Started POST "/providers" for 127.0.0.1 at 2014-11-21 08:22:35 -0600 Processing by ProvidersController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"CTNddtfybyj/TvWY1nwTFlEq7kq/+tBydLjO50g54aE=", "account"=>{"provider_type_id"=>"", "contact_address_1"=>"", "contact_city"=>"", "contact_state"=>"", "contact_zip"=>"", "contact_country"=>""}, "new_provider"=>"Continue"} Any suggestions on how I might go about diagnosing the problem? [I don't really know how to use the javascript console to step through what's happening here.) Is the data-attribute approach basically sound? Any other counsel on the general concept of using javascript to set the value of a hidden_field? Thanks very much, Dean Richardson
has title: How does AirBnB's host onboarding form use javascript to let a button set a text_field value?
type: UnansweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/42641746
tagged with: hidden-field

http://stackoverflow.com/q/26995938
has answer: http://stackoverflow.com/a/26996048
upvote count: 0
has comment: http://stackoverflow.com/comment/42522493
has body: I want to get the result of a sql query to javascript. Therefore I found many solutions which suggest to use the json_encode method. I wrote this code: $sql = "SELECT idDozent FROM Dozent;"; $rows = array(); $result = $con-&gt;query($sql); while($row = $result-&gt;fetch_array()) { $rows[] = $row; } Now in my javascript code I wrote: var jsonarray = &lt;?php echo json_encode($rows); ?&gt;; My table looks like this: idDozent | Name 7 | ... 8 | ... But the array contains: [{"0":"7","idDozent":"7"},{"0":"8","idDozent":"8"}] What am I doing wrong? And how can I access one record of the array? Thanks
has comment: http://stackoverflow.com/comment/42522653
has title: json_encode of mysqli query strange array result
favorite count: 0
accepted answer: http://stackoverflow.com/a/26996048
possible better answer: http://stackoverflow.com/a/26996006
has answer: http://stackoverflow.com/a/26996006
score: -2
tagged with: php
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 2
tagged with: mysql
has comment: http://stackoverflow.com/comment/42549813
type: Question
has comment: http://stackoverflow.com/comment/42522480
tagged with: javascript
has comment: http://stackoverflow.com/comment/42522693
answer count: 2

http://stackoverflow.com/q/27150746
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42796290
has comment: http://stackoverflow.com/comment/42796176
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: how to upload file and store in folder in html java script
has comment: http://stackoverflow.com/comment/42796418
tagged with: http://stackoverflow.com/tag/html
tagged with: file-upload
has body: how to upload file using html, get that file using java script and it will store in to local folder? Another question is, we have upload file using html, that file name is display in browser, now is that file stored in the temp folder or somewhere?
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/42796397
has comment: http://stackoverflow.com/comment/42796218
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/27016910
linked to: http://stackoverflow.com/q/10193085
has title: Getting page source from remote location almost works - just need to get the result into a variable
has comment: http://stackoverflow.com/comment/42609841
has answer: http://stackoverflow.com/a/27056894
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27017149
has comment: http://stackoverflow.com/comment/42559442
has answer: http://stackoverflow.com/a/27017118
accepted answer: http://stackoverflow.com/a/27017118
type: Question
possible better answer: http://stackoverflow.com/a/27017149
tagged with: javascript
has body: Having worked through previous postings and results of other searches, I seem to be able to get what I want but it appears to be a data object rather than text that I can assign to a variable. I am limited to javascript in the environment I am working in and what I want to do is to use string functions on the returned data so that I can search for certain terms. This is the url format that returns the data object - the result is that you get asked to open or save a text file: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20%3D%20%22http://www.redrag.info/index.htm%22%20and%20xpath%3D%22*%22&amp;format=xml&amp;callback=cbfunc (you can replace my url - http://www.redrag.info/index.htm - within the example above with one of your own if you wish) Instead of opening the text file, can I use some javascript document functions to assign this output to a variable? Thanks.
linked to: http://stackoverflow.com/q/6132796
score: 0
answer count: 3

http://stackoverflow.com/q/27020054
tagged with: jquery
has body: I'm trying to find images larger than a specific size in an HTML page, but the following code does not work correctly: function findImages(url) { $.ajax({ url: url, dataType: "html", success: function (data) { var html = $.parseHTML( data ), imgs = $(html).find("img").filter(function() { return ($(this).width() &gt; 50) &amp;&amp; ($(this).height() &gt; 50) }); len = imgs.length; if( len &gt; 0 ){ $.each(imgs, function(index, img) { console.log(img.width); }); } else { console.log("Image not found"); } }, }); }; I expect the filter part to return images whose width and height is larger than 50, but it does not seem to work for me. What am I doing wrong here?
accepted answer: http://stackoverflow.com/a/27021072
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/45564611
has comment: http://stackoverflow.com/comment/42565584
favorite count: 0
possible better answer: http://stackoverflow.com/a/45564611
has comment: http://stackoverflow.com/comment/42565404
upvote count: 1
has comment: http://stackoverflow.com/comment/42565082
has comment: http://stackoverflow.com/comment/42565028
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27021072
tagged with: html-parsing
has title: How to filter images of specific size with jQuery?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42565111
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27089562
answers question: http://stackoverflow.com/q/27078766
type: Answer
upvote count: 1
score: 1
has body: Use valueAsDate or valueAsNumber. Try the following code. function get_now_datetime() { var myField = document.getElementById("my_date"); var now = new Date(); myField.valueAsNumber = now.getTime() - now.getTimezoneOffset() * 60000; }
downvote count: 0

http://stackoverflow.com/q/26999360
has title: highcharts drilldown not run on django,
tagged with: django
has comment: http://stackoverflow.com/comment/42563589
type: AnsweredQuestion
tagged with: django-templates
has comment: http://stackoverflow.com/comment/42598754
has body: I've tried other graphics and if they work, but the drilldown not run. Url: http://aicapitals.cl/grafico/ In my template I have: {% block javascript %} //here the code http://jsfiddle.net/yw4Vh/ {% endblock javascript %} {% block content %} {% endblock content %} the div id="container2" not show the graphs
type: Question
tagged with: highcharts
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27072713
answer count: 1
accepted answer: http://stackoverflow.com/a/27072713
has comment: http://stackoverflow.com/comment/42556457

http://stackoverflow.com/a/27142011
upvote count: 1
has comment: http://stackoverflow.com/comment/42782114
has comment: http://stackoverflow.com/comment/42781283
answers question: http://stackoverflow.com/q/27141841
downvote count: 0
has comment: http://stackoverflow.com/comment/42781510
has comment: http://stackoverflow.com/comment/42781321
type: Answer
has body: A small correction in your JS code is needed. Actually while getting the name first time, you are trying to find td inside the INPUT itself and I guess you want to find first TD of that TR for the same. The problem is, you are declaring the var name again. Though it should work fine as it's written. Well here is the udated code: $(document).ready(function () { $('.name1').keypress(function (event) { var keycode = (event.keyCode ? event.keyCode : event.which); if (keycode == '13') { var kwd = $(this).val(); var name = $(this).closest("tr").find('td:eq(0)').text(); $.get('showRate', { name : name, kwd : kwd }, function (responseJson) { if (responseJson != null) { $.each(responseJson, function (key, value) { alert(responseJson); }); } }); } }); }); If still not work, there would be some issue with the ajax URL. You can check the same on Network in browser inspector.
score: 1

http://stackoverflow.com/a/27000707
has comment: http://stackoverflow.com/comment/42532208
has comment: http://stackoverflow.com/comment/42531814
has comment: http://stackoverflow.com/comment/42531880
score: 0
answers question: http://stackoverflow.com/q/27000552
type: Answer
has comment: http://stackoverflow.com/comment/42531759
has comment: http://stackoverflow.com/comment/42531569
has body: You can use FormData to pass the File. and processData,contentType set to false compulsory. because you are not going to process file in client side. // Create a formdata object and add the files var data = new FormData(); $.each(files, function(key, value) { data.append('myFile', value); //No I18N }); $.ajax({ url: '/your-url', type: 'POST', data: data, cache: false, dataType: 'json', //No I18N processData: false, // Don't process the files contentType: false, // Set content type to false as jQuery will tell the server its a query string request success: function(data, textStatus, jqXHR) { // do something }, error: function(jqXHR, textStatus, errorThrown) { // Handle errors here } }); OR you can send file with data as following: $( '#formId' ) .submit( function( e ) { e.preventDefault(); $.ajax({ url: '/your-url', type: 'POST', data: new FormData( this ), cache: false, dataType: 'json', //No I18N processData: false, // Don't process the files contentType: false, // Set content type to false as jQuery will tell the server its a query string request success: function(data, textStatus, jqXHR) { // do something }, error: function(jqXHR, textStatus, errorThrown) { // Handle errors here } }); });
has comment: http://stackoverflow.com/comment/42531737

http://stackoverflow.com/a/27096855
type: Answer
has body: well you are not removing the classes at all.. at some point you have both fa-angle-down and fa-angle-up on the same element. according to jQuery docs the only signature that might suit you case is: $( "#foo" ).toggleClass( className, addOrRemove ); which is equivalent to: if ( addOrRemove ) { $( "#foo" ).addClass( className ); } else { $( "#foo" ).removeClass( className ); } i preffer the old-fashion way: $(".panel-title").click(function() { if ($(this).hasClass("fa-angle-up")) { $(this).removeClass("fa-angle-up").addClass("fa-angle-down"); } else { $(this).removeClass("fa-angle-down").addClass("fa-angle-up"); } });
score: 0
answers question: http://stackoverflow.com/q/27095734

http://stackoverflow.com/comment/42750763
has text: they dont want error message they want to block the text from entering.this is my requirement and any suggestion to solve it.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27125268

http://stackoverflow.com/a/27161894
has comment: http://stackoverflow.com/comment/46811193
downvote count: 0
has body: I provided insufficient information: there is some logic in Application_PostRequestHandlerExecute method which wrotes some tags directly to response stream (is needed for js). I noticed that tags which were written directly in response stream with bundling is being written actually in the end of minificated js file.Thus, syntax is broken and js file doesn't work (Without bundling my approach works fine). Solution: transferred my logic from Application_PostRequestHandlerExecute to Application_AuthorizeRequest method, where it should was located initially. UPDATE Well, tag generating logic was entirely removed from Application_PostRequestHandlerExecute method, cause only now i understand that this is absolutely wrong idea.
score: 1
accepted answer of: http://stackoverflow.com/q/27141157
answers question: http://stackoverflow.com/q/27141157
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/27138594
tagged with: node.js
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27138794
type: Question
tagged with: mongodb
has title: How can I follow an _id in Mongoose.js to find an item and process it?
has comment: http://stackoverflow.com/comment/42775186
tagged with: mongoose
tagged with: javascript
answer count: 2
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42776177
has comment: http://stackoverflow.com/comment/42776038
type: UnansweredQuestion
has body: I am new to databases and these MongoDB/Mongoose.js async functions have annoyed the hell out of me over the last few hours. I have written and rewritten this bit so many times: router.get('/districts', function(req, res) { districtNames = []; // I'm using mongoose-simpledb, so db.District refers to the districts collection db.District.find(function(err, found) { found.forEach(function(element) { findParentProv(element, districtNames); }); res.render('districts', {title: "Districts page", district_list: districtNames}); }) }); function findParentProv(element, namesArray) { db.Province.findById(element.parent, function(err, found) { console.log(found.name); namesArray.push(element.name + " " + found.name); }); } I want to get all items in the districts collection, follow their parent field (which contains an ObjectID), find that item from the provinces collection and push both their names as a string into districtNames. How should I do this?
has answer: http://stackoverflow.com/a/27138783

http://stackoverflow.com/comment/42770827
comment on: http://stackoverflow.com/q/27116473
has text: Waow... I spent hours browsing google to find my error... Thank you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42749725
comment on: http://stackoverflow.com/a/27123915
type: AnswerComment
type: Comment
score: 3
has text: Note the last paragraph. The controller is like any other controller, you inject references to things into it using angular's dependency injection. How would the injector know which instance of the parent directive's controller to inject (remember there is one per directive instance) if you haven't bound the child directive to a scope yet (happens in the linking function, and **defines** the directive's parent). In other words, the official answer is "do the directive to directive communications in the linking function".

http://stackoverflow.com/a/27035979
answers question: http://stackoverflow.com/q/27035488
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: For pure JS - this would post parameter post with value post123 var formTest = document.createElement('form'); formTest.setAttribute("method", "post"); formTest.setAttribute("action", ""); var post = document.createElement("input"); post.setAttribute("type", "hidden"); post.setAttribute("name", "post"); post.setAttribute("value", "post123"); formTest.appendChild(post); document.body.appendChild(formTest); formTest.submit(); If you want you can use short and nice AJAX calls which require jQuery

http://stackoverflow.com/a/27118983
upvote count: 1
answers question: http://stackoverflow.com/q/27118900
has body: Regular expressions are your friend. var ok = phNum.search(/^\(?\d{3}\D*\d{3}\D*\d{4}$/); if (ok==0) { var parts = phNum.match(/^\(?(\d{3})\D*(\d{3})\D*(\d{4})$/); output.value='('+parts[1]+') '+parts[2]+'-'+parts[3]; } Accepts: 404-555-1234, 4045551234, (404) 555-1234, etc. Returns: (404) 555-1234
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/27070426
has comment: http://stackoverflow.com/comment/42653697
has body: I have a problem with loading the .json file: [ [ [ "2014-11-19 06:00:00", "1.1" ], [ "2014-11-19 14:00:00", "4.9" ], [ "2014-11-19 15:00:00", "4.9" ], [ "2014-11-19 16:00:00", "4.9" ], [ "2014-11-19 17:00:00", "4.9" ], [ "2014-11-19 18:00:00", "4.9" ] ], [ [ "2014-11-13 23:00:00", "194" ], [ "2014-11-14 00:00:00", "195" ], [ "2014-11-14 01:00:00", "187" ], [ "2014-11-14 02:00:00", "191" ], [ "2014-11-14 03:00:00", "218" ], [ "2014-11-14 04:00:00", "170" ] ] ] values: [[data, valueTemperature],[data,WindMax]] I tried in this way, but does not work: $(document).ready(function () { var options = { chart: { renderTo: 'container', type: 'spline', zoomType: 'xy' }, title: { text: 'Temperatura' }, subtitle: { text: '5 dni' }, xAxis: { type: 'datetime', }, yAxis: [{ // Primary yAxis labels: { format: '{value}°C', style: { color: Highcharts.getOptions().colors[1] } }, title: { text: 'Temperature', style: { color: Highcharts.getOptions().colors[1] } }, min: -25, max: 25, }, { // Secondary yAxis title: { text: 'Prędkość wiatru', style: { color: Highcharts.getOptions().colors[0] } }, labels: { format: '{value} m/s', style: { color: Highcharts.getOptions().colors[0] } }, min: 0, max: 15, opposite: true }], tooltip: { shared: true }, series: [{}] }; var chart; $.getJSON('test.json', function (data) { options.series[0].data = data; chart = new Highcharts.Chart(options); }); }); How to correctly write it for a data type?
answer count: 1
has title: Loading a custom json file - highcharts.js
accepted answer: http://stackoverflow.com/a/27071254
type: AnsweredQuestion
score: 0
type: Question
tagged with: highcharts
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42653766
has answer: http://stackoverflow.com/a/27071254

http://stackoverflow.com/q/27080878
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/42671466
has comment: http://stackoverflow.com/comment/42671336
type: Question
score: 0
has body: In my controller I am calling a service with the following code: Service.updateData(data).then(function (result) { console.log(result); }); In my service I am using $q to get multiple HTTP requests. $rootScope.http_1 = $http.get(); $rootScope.http_2 = $http.get(); $q.all([$rootScope.http_1, $rootScope.http_2]).then(function(result) { console.log(result[0], result[1]); return result[0], result[1]; }); The code actually works as the http requests are successfully made. However, I get an error in the controller which says: TypeError: Cannot read property 'then' of undefined. I believe this is due the service not returning the promise in the correct way. Any ideas on how to resolve this would be much appreciated?
answer count: 1
has answer: http://stackoverflow.com/a/27080991
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27080991
has title: Multiple service http calls using AngularJS

http://stackoverflow.com/comment/42826633
has text: Updated question with jsfiddle...
comment on: http://stackoverflow.com/q/27151907
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27123632
has body: this seemed to do the trick: this.fields.tags.on('autosize', function(tags){ tags.ownerCt.doLayout(); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27123277
score: 0
answers question: http://stackoverflow.com/q/27123277
type: Answer

http://stackoverflow.com/q/27009838
has comment: http://stackoverflow.com/comment/42547148
has comment: http://stackoverflow.com/comment/42547179
has answer: http://stackoverflow.com/a/27010054
score: 2
has answer: http://stackoverflow.com/a/27009929
type: AnsweredQuestion
has body: So I know I can call a function like this: var groupSetter = function(){ console.log('asdfasdf'); }; //I want to remove this next line groupSetter(); And recall it from like so: $( window ).resize(function() { // this call is fine groupSetter(); }); I know this looks silly but more like this. (function(){ var groupSetter = function(){ console.log('asdfasdf'); }; })(); Is it possible to make var groupSetter an anonymous function but still recall it on window resize? UPDATE: var groupSetter = (function(){ var currentPage = Carousel.pageData[scope.page.pageindex - 1]; scope.containerStyles = { width: currentPage.size.updated.width + 'px', height: currentPage.size.updated.height + 'px' }; })(); angular.element($window) .on('resize', function (e) { groupSetter; });
accepted answer: http://stackoverflow.com/a/27009929
type: Question
has comment: http://stackoverflow.com/comment/42547155
has comment: http://stackoverflow.com/comment/42547150
tagged with: javascript
has title: Is it possible to re-init an anonymous function by name?
upvote count: 2
has comment: http://stackoverflow.com/comment/42547199
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42547132
favorite count: 0
possible better answer: http://stackoverflow.com/a/27010054
tagged with: angularjs

http://stackoverflow.com/a/27084971
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: A slightly faster version of openorclose's answer: function solution(array) { return array.filter(function(value, index) { return array.indexOf(value, index + 1) &gt; -1; }); }
answers question: http://stackoverflow.com/q/27084818

http://stackoverflow.com/a/27111187
type: Answer
score: 2
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27111065
has body: Here is a Jquery Plugin for setting and reading cookies. You can even define the expiration time. https://github.com/carhartl/jquery-cookie To set the cookie from the select do something like this: $(function(){ var background = $.cookie('background') || false; function changeBackground(background){ if(background !== false){ $('body').addClass(background); $.cookie('background', background); } } changeBackground(background); $('body').on('change', '#settingBackground', function(){ changeBackground($(this).val()); }); });

http://stackoverflow.com/q/27092263
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27092324
type: Question
tagged with: canvas
tagged with: javascript
tagged with: jquery
has body: I've created a: JSFiddle Question: How can I get the offset position to register onClick of a canvas Tag? Problem: Click on Image tag console.log works fine. Click on canvas and nothing :c HTML: &lt;img id="rando" src="http://lorempixel.com/400/200/sports/" alt="" &gt; &lt;canvas id="myCanvas" &gt;&lt;/canvas&gt; JS var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); var img = document.getElementById("rando"); var pos = {}; c.width = 400; c.height = 200; ctx.drawImage(img, 0, 0); $('img').click(function(e) { var posX = $(this).offset().left, posY = $(this).offset().top; console.log((e.pageX - posX)+ ' , ' + (e.pageY - posY)); }); $('c').click(function(e) { var posX = $(this).offset().left, posY = $(this).offset().top; alert((e.pageX - posX)+ ' , ' + (e.pageY - posY)); });
tagged with: click
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Is it possible to add a click event to a canvas tag?
tagged with: offset

http://stackoverflow.com/a/27134652
type: Answer
has comment: http://stackoverflow.com/comment/42768310
has comment: http://stackoverflow.com/comment/42768792
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27134568
answers question: http://stackoverflow.com/q/27134568
type: AcceptedAnswer
has body: It appears you're using = where you mean to use == or ===. Edit: To be more clear, I mean in the parenthesis of the if statements themselves, like this: if (document.getElementById('img1').src == a[0]) { Double edit: I believe I found another issue. It's in the logic of the if statements: document.getElementById('img1').src Doesn't just equal what's in the html, like '1.jpg'. It returns the WHOLE url. Check out the console logs on this quick fiddle I made: http://jsfiddle.net/71t4axv0/1/ First, it'll complain about that image not really being an image. Then you can see the actual logic: 'http://fiddle.jshell.net/_display/2.jpg', of course, does not equal 2.jpg
downvote count: 0

http://stackoverflow.com/q/27093788
has comment: http://stackoverflow.com/comment/42693792
tagged with: javascript
has answer: http://stackoverflow.com/a/27094223
has comment: http://stackoverflow.com/comment/42693432
answer count: 3
has comment: http://stackoverflow.com/comment/42694314
has comment: http://stackoverflow.com/comment/42693585
has title: Make nulls always last when sorting
has comment: http://stackoverflow.com/comment/42693724
favorite count: 0
has comment: http://stackoverflow.com/comment/42694136
has comment: http://stackoverflow.com/comment/42693837
has answer: http://stackoverflow.com/a/27093985
possible better answer: http://stackoverflow.com/a/27093989
has comment: http://stackoverflow.com/comment/108297434
downvote count: 2
linked to: http://stackoverflow.com/q/29829205
has answer: http://stackoverflow.com/a/27093989
upvote count: 7
has body: I am using underscore to sort an array. Is there a way to make nulls always last whether ascending or descending? For example: [ { name: 'a', age: 1 }, { name: 'z', age: 5 }, { name: '', age: 1 }, { name: 'v', age: 7 } ] Will produce [ { name: 'a', age: 1 }, { name: 'v', age: 7 }, { name: 'z', age: 5 }, { name: '', age: 1 } ] and descending will produce: [ { name: 'z', age: 5 }, { name: 'v', age: 7 }, { name: 'a', age: 1 }, { name: '', age: 1 } ] My real array is an array of objects so i have to pluck values out.
has comment: http://stackoverflow.com/comment/42693610
has comment: http://stackoverflow.com/comment/42693545
type: AnsweredQuestion
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/42693632
accepted answer: http://stackoverflow.com/a/27093985
type: Question
score: 5

http://stackoverflow.com/comment/42749224
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27106206
has text: Got it now. As `paper-dialog` gets created as shadow DOM under the shadow root of `core-overlay`, Jquery doesn't work on it.
type: Comment

http://stackoverflow.com/a/27055150
score: 0
has body: In your query check data type of all column then as data type you need to set column value with quotes if datatype like string,date. otherwise not need to set quotes for good practice. and in your update query you write table name wrong so first update this. after check
answers question: http://stackoverflow.com/q/27054754
type: Answer

http://stackoverflow.com/a/27039689
has comment: http://stackoverflow.com/comment/76668806
type: AcceptedAnswer
score: 18
has body: Use ng-show Instead of ng-if. That should work. Fiddle
has comment: http://stackoverflow.com/comment/42598918
type: Answer
has comment: http://stackoverflow.com/comment/42599289
has comment: http://stackoverflow.com/comment/42598936
answers question: http://stackoverflow.com/q/27039631
has comment: http://stackoverflow.com/comment/42599591
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27039631
upvote count: 19

http://stackoverflow.com/comment/42640272
has text: When you don't know any funky magical way, just write a 2 lines loop...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27063140

http://stackoverflow.com/a/27065182
has comment: http://stackoverflow.com/comment/42644756
score: 1
has comment: http://stackoverflow.com/comment/42644349
downvote count: 0
answers question: http://stackoverflow.com/q/27065010
has body: You could make it more modular by creating a new function to iterate through the arrays like this: this.notInModel = function (tab1, tab2) { function nim(t1,t2) { for (var i = 1; i &lt;= t1.length - 1; i++) { if (!t1[i].inModel) { for (var j = 1; j &lt;= t2.length - 1; j++) { if(t1[i].name === t2[j].name) t2.splice(j, 1); } } } } nim(tab1,tab2); nim(tab2,tab1); }
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42611874
type: Comment
has text: _“So how can i catch the information i need after javascript has been executed?”_ – for that you would first of all get the code into an environment that does build a DOM and executes JS on it … which cURL does not.
score: 0
comment on: http://stackoverflow.com/q/27046545
type: QuestionComment

http://stackoverflow.com/comment/42665591
has text: No sure why you do not validate all 3 parts of the date - year, month and date? bits[0] could be any number no?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27075178
type: Comment

http://stackoverflow.com/comment/42668459
comment on: http://stackoverflow.com/a/27078467
type: Comment
type: AnswerComment
has text: @nnnnnn The `$` is kind of a shortcut to `document.querySelector`. [Read this.](http://stackoverflow.com/a/22244912/4267501)
score: 0

http://stackoverflow.com/comment/42744754
type: Comment
has text: http://stackoverflow.com/questions/4935632/parse-json-in-javascript
type: QuestionComment
comment on: http://stackoverflow.com/q/27121898
score: 0

json-rpc
tag name: json-rpc
type: Tag
tags question: http://stackoverflow.com/q/27003148

ajax
tags question: http://stackoverflow.com/q/27006122
tags question: http://stackoverflow.com/q/27021672
tags question: http://stackoverflow.com/q/27076431
tags question: http://stackoverflow.com/q/27110568
tags question: http://stackoverflow.com/q/27015750
tags question: http://stackoverflow.com/q/27047419
tags question: http://stackoverflow.com/q/27003488
tags question: http://stackoverflow.com/q/27034802
tags question: http://stackoverflow.com/q/27149647
tags question: http://stackoverflow.com/q/27063799
tags question: http://stackoverflow.com/q/27033000
tags question: http://stackoverflow.com/q/27075165
tags question: http://stackoverflow.com/q/27063461
tags question: http://stackoverflow.com/q/27017274
tags question: http://stackoverflow.com/q/27106589
tags question: http://stackoverflow.com/q/27107563
tags question: http://stackoverflow.com/q/27061783
tags question: http://stackoverflow.com/q/27121327
tags question: http://stackoverflow.com/q/26994112
tags question: http://stackoverflow.com/q/27096371
tags question: http://stackoverflow.com/q/27000343
tags question: http://stackoverflow.com/q/27143404
tags question: http://stackoverflow.com/q/27103756
tags question: http://stackoverflow.com/q/27013862
tags question: http://stackoverflow.com/q/27023543
tags question: http://stackoverflow.com/q/27090692
tags question: http://stackoverflow.com/q/27026082
tags question: http://stackoverflow.com/q/27013960
tags question: http://stackoverflow.com/q/27104457
tags question: http://stackoverflow.com/q/27047552
tags question: http://stackoverflow.com/q/27141777
tags question: http://stackoverflow.com/q/27008530
tags question: http://stackoverflow.com/q/27014446
tags question: http://stackoverflow.com/q/27141841
tags question: http://stackoverflow.com/q/27133767
tags question: http://stackoverflow.com/q/27008564
tags question: http://stackoverflow.com/q/27052741
tags question: http://stackoverflow.com/q/27128403
tags question: http://stackoverflow.com/q/27031739
tags question: http://stackoverflow.com/q/27007567
tags question: http://stackoverflow.com/q/27027132
tags question: http://stackoverflow.com/q/27058373
tags question: http://stackoverflow.com/q/27096956
tags question: http://stackoverflow.com/q/27075582
tags question: http://stackoverflow.com/q/27065988
tags question: http://stackoverflow.com/q/27000017
tags question: http://stackoverflow.com/q/26997545
tags question: http://stackoverflow.com/q/27084970
tags question: http://stackoverflow.com/q/27140040
type: Tag
tags question: http://stackoverflow.com/q/27099971
tags question: http://stackoverflow.com/q/27007551
tags question: http://stackoverflow.com/q/27092801
tags question: http://stackoverflow.com/q/27076981
tags question: http://stackoverflow.com/q/27062851
tags question: http://stackoverflow.com/q/27106287
tags question: http://stackoverflow.com/q/27001711
tags question: http://stackoverflow.com/q/27021811
tags question: http://stackoverflow.com/q/27098239
tags question: http://stackoverflow.com/q/27112727
tags question: http://stackoverflow.com/q/27138193
tags question: http://stackoverflow.com/q/27007286
tags question: http://stackoverflow.com/q/26997514
tags question: http://stackoverflow.com/q/27144249
tags question: http://stackoverflow.com/q/27030631
tags question: http://stackoverflow.com/q/27119687
tags question: http://stackoverflow.com/q/27150138
tags question: http://stackoverflow.com/q/27021239
tags question: http://stackoverflow.com/q/27142686
tags question: http://stackoverflow.com/q/27000142
tags question: http://stackoverflow.com/q/27111218
tags question: http://stackoverflow.com/q/27073108
tags question: http://stackoverflow.com/q/27039245
tags question: http://stackoverflow.com/q/27124345
tags question: http://stackoverflow.com/q/27004103
tags question: http://stackoverflow.com/q/27050737
tags question: http://stackoverflow.com/q/27107333
tags question: http://stackoverflow.com/q/27124963
tags question: http://stackoverflow.com/q/27145896
tags question: http://stackoverflow.com/q/27118867

global
type: Tag
tag name: global
tags question: http://stackoverflow.com/q/27106008
tags question: http://stackoverflow.com/q/27001630
tags question: http://stackoverflow.com/q/27089647

http://stackoverflow.com/comment/42628216
has text: The problem is not that you are loading two graphs, but two highcharts codes... What I'd do is strip the script tag from Project.prx to avoid that. If you need to display Project.prx on a page by itself, then only add the script tag if the request is not an AJAX call...
score: 5
comment on: http://stackoverflow.com/q/27056123
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27121484
type: Answer
has body: I think you need smth like this: HTML: 0 1 2 JS: $('#mySelect').change(function(){ //brand new array each time var foo = []; //fills the array foo = $("option:selected", this).map(function(){ return $(this).val() }).get(); //fills input with vals, as strings of course $("input[name='myObjecttype']").val(foo); //logs an array, if needed console.log($("input[name='myObjecttype']").val().split(',')); }); Don't forget hidden input can't store array-/object- data, only strings. But you can easily make array. See working jsfiddle: http://jsfiddle.net/sfvx5Loj/1/
answers question: http://stackoverflow.com/q/27120935
score: 0

http://stackoverflow.com/comment/42777571
comment on: http://stackoverflow.com/q/27139880
score: 0
has text: `var value = jsondatawhatevername.virus` ?
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27018063
has body: I would like to be able to use live page validation instead of the VALID or INVALID message showing after pressing submit, my code validates an email address and when the submit is clicked the input displays below followed by valid or invalid, if valid it will be in green and if invalid it is in red. Here is my code: Email Validation Enter an email address: Submit
has title: Live validation instead of on button click validation
has answer: http://stackoverflow.com/a/27018182
score: 0
type: Question
has answer: http://stackoverflow.com/a/27018104
tagged with: javascript
has answer: http://stackoverflow.com/a/27018295
has answer: http://stackoverflow.com/a/27018319
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27018172

http://stackoverflow.com/q/27033938
score: 1
tagged with: codeigniter
tagged with: mysql
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42588858
has title: Prevent Sql Injection but show posted data as it is on the page
tagged with: javascript
has answer: http://stackoverflow.com/a/27034193
has answer: http://stackoverflow.com/a/27034191
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4545
tagged with: php
has body: I am building this application in Codeigniter PHP where i have many forms and grids. But Issue right now i am facing is very critical regarding security. When i post data using Ajax, i usually try to get it in controller like this $this-&gt;input-&gt;post('someInputValueName'); but with the above statement anyone can write this below script and that script can be saved in the database as it is. &lt;script type="javascript"&gt; alert('Hello World'); &lt;/script&gt; So when that data is shown in page, this above script is not shown as it is, instead it gets executed?? So i tried like this mysql_real_escape_string($this-&gt;input-&gt;post('someInputValueName'); but with the above mysql method, \ slashes are added to the " and ', so this is the final result that is added to database and is shown in pages. &lt;script type=\"javascript\"&gt; alert(\'Hello World\'); &lt;/script&gt; Cuz of which in the grid i start getting error, and my grid stopped populating cuz jquery thought it is error. Now Coming to my Question, How is it possible that whatever user writes to input in database that input data should be saved as it is(or anyother way dosent matter) but when that data is called to show on grid or in page it should show as it is and should not be executed or try to execute on page? Like in facebook comments if i post the above script line, it don't gets executed. it just displays as it is in the comment without any additional slashes.

http://stackoverflow.com/comment/42535185
type: Comment
has text: `showVideo2` without `()` is just a function *reference*, not an executing call to the function. You either want `setTimeout(showVideo2, 40000)` which passes the function reference to `setTimeout` for calling later, or `setTimeout(function(){ showVideo2() }, 40000)` which passes the anonymous function by reference to `setTimeout` and when that anon func is executed it will in turn execute `showVideo2`.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27002712

indy
type: Tag
tag name: indy
tags question: http://stackoverflow.com/q/27125796

http://stackoverflow.com/a/27036074
has comment: http://stackoverflow.com/comment/42600709
has comment: http://stackoverflow.com/comment/42593534
answers question: http://stackoverflow.com/q/27034368
has comment: http://stackoverflow.com/comment/42593592
type: AcceptedAnswer
downvote count: 0
has body: Hope this might help you . Try this @charset "utf-8"; /* Preloader */ #preloader { position:absolute; top:0; left:0; right:0; bottom:0; background-color:#fff; /* change if the mask should have another color then white */ z-index:99; /* makes sure it stays on top */ } #status { width:200px; height:200px; position:absolute; left:50%; /* centers the loading animation horizontally one the screen */ top:50%; /* centers the loading animation vertically one the screen */ background-image:url(http://1.bp.blogspot.com/-IdPZAIYB_38/UAsThCuCjcI/AAAAAAAABK0/wzErRGy13NU/s1600/loading.gif); /* path to your loading animation */ background-repeat:no-repeat; background-position:center; margin:-100px 0 0 -100px; /* is width and height divided by two */ } &lt;body&gt; &lt;!-- Preloader --&gt; &lt;div id="preloader"&gt; &lt;div id="status"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; &lt;!-- Your Website Content --&gt; &lt;div&gt; This is your website content &lt;img src="http://newsxpressmedia.com/files/radar-simulation-files/radar002407.Gif" /&gt; &lt;/div&gt; &lt;!-- jQuery Plugin --&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"&gt;&lt;/script&gt; &lt;!-- Preloader --&gt; &lt;script type="text/javascript"&gt; //&lt;![CDATA[ $(window).load(function() { // makes sure the whole site is loaded $("#status").fadeOut(); // will first fade out the loading animation $("#preloader").delay(350).fadeOut("slow"); // will fade out the white DIV that covers the website. }) //]]&gt; &lt;/script&gt; &lt;/body&gt;
has comment: http://stackoverflow.com/comment/42600380
has comment: http://stackoverflow.com/comment/42599622
type: Answer
has comment: http://stackoverflow.com/comment/42597277
has comment: http://stackoverflow.com/comment/42600159
score: 1
accepted answer of: http://stackoverflow.com/q/27034368
upvote count: 1

http://stackoverflow.com/a/27064647
upvote count: 1
has body: Looks like the following CSS will get rid of the underlines for you: ul[data-role=listview] a { text-decoration: none; } All that's doing is telling the page to remove the underline from anchor links in your listviews. Hope that helps. Update I understand the problem now. Okay, so you're just missing some of the classes that are being applied by jQuery Mobile. If you change this line of your JavaScript, it'll appear how you expect it to: $('#ContactList').append(' ' + name + ' Club ' + phone + ' '); The important part being that we're adding class="ui-btn ui-btn-icon-right ui-icon-carat-r" to your element that you're injecting in the DOM via JavaScript. Fiddle with the proper display here That should fix it.
has comment: http://stackoverflow.com/comment/42644008
has comment: http://stackoverflow.com/comment/42645409
downvote count: 0
answers question: http://stackoverflow.com/q/27064361
has comment: http://stackoverflow.com/comment/42643134
type: Answer
has comment: http://stackoverflow.com/comment/42643874
score: 1

http://stackoverflow.com/comment/61224588
comment on: http://stackoverflow.com/a/27229891
type: Comment
score: 0
type: AnswerComment
has text: I am new to bower. Could you please explain in detail probably with an example so that we can benefit. Thanks!

http://stackoverflow.com/comment/43584793
comment on: http://stackoverflow.com/a/27122870
type: Comment
type: AnswerComment
has text: hi, I got the solution for that. Just added the some code in javascript. And it worked. :)
score: 0

http://stackoverflow.com/comment/65106885
comment on: http://stackoverflow.com/a/30897746
score: 0
type: Comment
type: AnswerComment
has text: Also happened when I put lower version of jquery in a conditional include for ie8. <!--[if lt IE 9]>

http://stackoverflow.com/a/27001668
type: Answer
answers question: http://stackoverflow.com/q/26998795
has body: Friend, I just got what's wrong... your vuelo.js has sintaxe erros.... below is the correct version: angular.module('starter.vuelo',[]) .factory('VueloService', function () { var vuelos = [{ id:1, salida:{ id: 'MAN', name:'Aeropuerto Augusto Cesar Sandino'}, //&lt;&lt;--- here destino:{id: 'SJO',name :'Juan Santamaria Intl'}, //&lt;&lt;--- and here escalas:[], aeronave:1, asientos:4, precioNormal:4199, precioMiembro:2819, horario:'diurno', tiempoEstimado:45, fechaVuelo:'20/10/14', hora:'11:00am' }]; return{ all: function() { return vuelos; }, get: function (vueloId) { return vuelos[vueloId]; } } }); I'll give you a tip.... when you get a black screen when using angular/ionic, enter in chrome developer tools, I used that to see what was wrong..... Now I now I could help you :)
has comment: http://stackoverflow.com/comment/42535936
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26998795

http://stackoverflow.com/a/27009526
answers question: http://stackoverflow.com/q/27009400
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: Declare global method foo and sub-method bar and refer to sub-method as function in itself, you can use this keyword inside sub-method by addressing previously declared variable, and then declare the return variable as the sub-method process. Foo: function() { var a='a'; var ret='b'; var Bar = function() { this.a='a'; return 'a'; } ret=Bar(); return ret; }

http://stackoverflow.com/q/27002273
has comment: http://stackoverflow.com/comment/42538216
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/4935632
tagged with: asp.net-web-api
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42537894
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/44730340
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: JSON Object Not Being Parsed for Angular $Http.PUT
upvote count: 1
has body: Having one of those dumb moments, and I can't figure out what's wrong. I am trying to call a PUT (Web API) command. Code Snippets: var person = { "id": 1 "name": "John", "age": 25, "country": Australia }; var serviceUrl = 'http://myapi/person'; console.log(person); function updatePerson(id, personObject){ return $http.put(serviceUrl + '/' + id, personObject).then( function(results){ return results; }); }; updatePerson(1, person).then( function(results){ }, function(error){ } ); Essentially, when I call the above function, I am getting a 400 (Bad Request) error. Using fiddler, I am noticing that the data being passed (in the TextView tab) is of the form: id=1&amp;name=John&amp;age=25&amp;country=Australia Using Postman, where I am defining the raw JSON content as follows: { "id": 1 "name": "John", "age": 25, "country": Australia } The PUT command executes successfully. And in fiddler, the Textview represented the one which I put as above. Any advice or ideas on where to debug/look at? P.S. I just noticed that all of my PUT commands are returning a 400 error (which I've tested before and was working all fine). I am not completely sure what changed in my solution, for all the PUT functions to stop working properly. Update: in Chrome's console log, I can see that the object is defined as follows: {id: 1, name: John, age: 25, country: Australia} which when I paste directly to Postman works fine as well.
type: Question

http://stackoverflow.com/comment/42722703
type: QuestionComment
comment on: http://stackoverflow.com/q/27109783
type: Comment
has text: @Amit Joki: It is a bit silly to use a selector to find the *current element* by its own id :)
score: 0

http://stackoverflow.com/comment/42587686
type: Comment
has text: Why not setting the timeout event on AJAX success ?
type: QuestionComment
comment on: http://stackoverflow.com/q/27033174
score: 0

http://stackoverflow.com/q/27048623
has comment: http://stackoverflow.com/comment/42615301
has answer: http://stackoverflow.com/a/27048819
has comment: http://stackoverflow.com/comment/42615128
type: Question
answer count: 2
has body: So I looked up the JavaScript problem of my last question, and I found a [somewhat] solution to the problem. But I need it to be slightly modified, yet I'm not sure how. Here's what the code does. var nums = [1,2,3,4,5,6,7,8,9,10,11,12]; var gen_nums = []; function in_array(array, el) { for(var i = 0 ; i < array.length; i++) if(array[i] == el) return true; return false; } function get_rand(array) { var rand = array[Math.floor(Math.random()*array.length)]; if(!in_array(gen_nums, rand)) { gen_nums.push(rand); return rand; } return get_rand(array); } for(var i = 0; i < 9; i++) { document.write(get_rand(nums)); } This generates a random number with those 12 numbers without any repeat. Yet, I need it to do this for 9 table boxes. Here's my table HTML + the JavaScript code. HTML JavaScript function getRandom() { var nums = [1,2,3,4,5,6,7,8,9]; var gen_nums = []; function in_array(array, el) { for(var i = 0 ; i < array.length; i++) if(array[i] == el) return true; return false; } function get_rand(array) { var rand = array[Math.floor(Math.random()*array.length)]; if(!in_array(gen_nums, rand)) { gen_nums.push(rand); return rand; } return get_rand(array); } for(var i = 0; i < 9; i++) { return (get_rand(nums)); } } function timeOut(){ /* This can be ignored, as it was a testing function for creating, making, and fixing the randomizer tool, but may change based on creating new tools that need to be troubleshooted. */ setTimeout (changeRandom, 1); } /* This is the function that grabs the innerHTML (what the box says) of the #output1 and changes that number to the word specified. [In example, if the number [randomly] generated was 5, then this function detects that the number was 5 and changes it to Word 5.] */ function changeRandom() { /* Using the "var x" command, this tells the function that whenever there's an x in the code, it will read it as "document.getElementById('output1').innerHTML", and will grab whatever is inside that #output1 element. */ var x = document.getElement…
has comment: http://stackoverflow.com/comment/42615165
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27048819
possible better answer: http://stackoverflow.com/a/27053868
score: 0
has answer: http://stackoverflow.com/a/27053868
tagged with: http://stackoverflow.com/tag/html
has title: Random Number Generator w/ no Repeats Modification?
type: AnsweredQuestion

http://stackoverflow.com/comment/42544414
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27007706
score: 0
has text: When I launched the "app" I didn't press cancel but I guess I have to to wrap the conditional in a conditional to get to fully work on a my version of chrome???

camanjs
type: Tag
tags question: http://stackoverflow.com/q/27132635
tag name: camanjs
tags question: http://stackoverflow.com/q/27065230

http://stackoverflow.com/a/27132722
answers question: http://stackoverflow.com/q/27132589
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: You can also just use a for loop: http://jsfiddle.net/TrueBlueAussie/s2745674/1/ var foo = { 'bar' : 'baz' } for (var key in foo) { alert(key); } For a single item (as specified) you won't notice a speed decrease (heck for loads of items you would notice it) :)

http://stackoverflow.com/comment/42704344
comment on: http://stackoverflow.com/a/27099965
score: 0
type: AnswerComment
has text: the scripts arent on the same page
type: Comment

http://stackoverflow.com/comment/42712467
type: QuestionComment
comment on: http://stackoverflow.com/q/27103375
score: 0
has text: Both are good but in different situations. The debate is an example of [Parkinson's law](https://en.wikipedia.org/wiki/Parkinson%27s_law_of_triviality), a.k.a. "bikeshedding".
type: Comment

http://stackoverflow.com/q/27013143
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27035067
has body: In a web app built in google apps script, I want to show a popup containing som text and links. I figured that PopupPanel is the way to go. This is what I've done: var app = UiApp.getActiveApplication(); var popup = app.createPopupPanel() .setAnimationEnabled(true) .setModal(true) .setGlassEnabled(true) .setAutoHideEnabled(true); popup.add(app.createLabel('text text text')); popup.setPopupPosition(100, 100); popup.setHeight('300px'); popup.setWidth('500px'); popup.show(); But instead of setting a fixed position, I would like to center the box in the current window. Since there seems to be no such functionality, I tried to get the pixel size of the window, or form app, or a panel sized to 100%, but I can't get a size from anywhere, there seems only to be possible to set the size. Is there a way to center the PopupPanel, or to create a popup some other way, that will be centered?
has title: How to center a PopupPanel
type: Question
tagged with: javascript
tagged with: google-apps-script
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42563151
has comment: http://stackoverflow.com/comment/42565572

http://stackoverflow.com/q/27059961
has comment: http://stackoverflow.com/comment/42643068
has comment: http://stackoverflow.com/comment/42639308
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42642126
has title: Highcharts: How to make Tooltip position to be visible in the Viewport
has body: I am using a chart that is vertically longer that is wrapped inside a Container with Veritical scrolling enabled. Everything works fine. However, when I create a tooltip (in my case a big one), it gets hidden at times because it thinks the view port of chart is big. Is there any way to make the tooltip in a fixed position or always appear in the parent container's viewport ? A sample fiddle having the similar problem: http://jsfiddle.net/Swsbb/52/ &lt;div style='max-height:300px;overflow-y:auto'&gt; &lt;div id="container" style="height: 1000px"&gt;&lt;/div&gt; &lt;/div&gt;
linked to: http://stackoverflow.com/q/18658043
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27062030
tagged with: highcharts
answer count: 1
tagged with: tooltip
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
linked to: http://stackoverflow.com/q/10734746
tagged with: css

http://stackoverflow.com/comment/42654901
type: QuestionComment
has text: Are you just asking for someone to explain what the code is doing or are you expecting it should be doing something that it is not? Your question isn't very clear.
comment on: http://stackoverflow.com/q/27070807
score: 0
type: Comment

http://stackoverflow.com/q/27064965
tagged with: regex
has comment: http://stackoverflow.com/comment/42643765
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42645006
has body: I use regexp, but I cant do it for my case. I have create own engine like DLE. I have tags like [a],[/a],[b],[/b] etc. I use regexp like '\\[a\\](.*?)\\[/a\\]'si or like '\\[a\\](.*?)(\\[/a\\])+'si and it don't work how I want. I need receive: from '[a]delete[/a]' : '' from '[a][b]delete[/b][/a]' : '', from '[a][a]delete[/a][/a]' : '', with '\\[a\\](.*?)\\[/a\\]'si it returns '[/a]' from '[b][a]delete[/a][b]' : '[b][/b]' from '[b][a]delete[/a][b] [a]delete[/a]' : '[b][/b]' from '[a] delete [a] [b]delete[/b] [/a] delete [/a] [b] [a]delete[/a] nodelete [/b]' : '[b] nodelete [/b]' Help me to create right regexp!
upvote count: 1
has comment: http://stackoverflow.com/comment/42643699
has comment: http://stackoverflow.com/comment/42643914
downvote count: 1
type: Question
tagged with: nested-loops
has answer: http://stackoverflow.com/a/27065427
tagged with: javascript
has comment: http://stackoverflow.com/comment/42643749
linked to: http://stackoverflow.com/q/1732348
score: 0
has comment: http://stackoverflow.com/comment/42643811
answer count: 1
has comment: http://stackoverflow.com/comment/42646952
has title: RegEx: nested tags
favorite count: 0
has comment: http://stackoverflow.com/comment/42644051
accepted answer: http://stackoverflow.com/a/27065427
tagged with: preg-replace
tagged with: php

http://stackoverflow.com/comment/42793422
has text: Thanks all for the answers! I used this method in the end as it is as described a simple solution which worked perfectly!
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27147804

http://stackoverflow.com/comment/42681245
type: QuestionComment
comment on: http://stackoverflow.com/q/27086343
type: Comment
has text: http://jsfiddle.net/a8c9P/192/ is this you wanted?
score: 0

http://stackoverflow.com/a/27149988
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27149859
has comment: http://stackoverflow.com/comment/42794939
has comment: http://stackoverflow.com/comment/42794547
has body: Your code is working but not able to trigger click event binded to castor-close because i tag is empty. Put some text in it and check Click me DEMO

http://stackoverflow.com/comment/42879588
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27090448
type: AnswerComment
has text: I think I need more reps to upvote you. I'll be sure to come back once I have this ability.

http://stackoverflow.com/q/26995028
tagged with: http://stackoverflow.com/tag/html
tagged with: filereader
accepted answer: http://stackoverflow.com/a/26996264
score: 2
has comment: http://stackoverflow.com/comment/42529234
has comment: http://stackoverflow.com/comment/42520580
upvote count: 2
has comment: http://stackoverflow.com/comment/42521330
has comment: http://stackoverflow.com/comment/42520662
tagged with: file
type: AnsweredQuestion
has title: Save content of textarea as plain txt with .csv extension
has answer: http://stackoverflow.com/a/26996264
type: Question
has comment: http://stackoverflow.com/comment/42520975
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42520732
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
has body: Is there a way to save content as a txt file with a csv file extension using HTML5 ? It shouldn't be a real csv. Something like {type:'text/csv'}; wont work where {type:'text/plain'}; does.

http://stackoverflow.com/comment/42516758
type: Comment
type: QuestionComment
has text: Try adding an attribute of type="button" to the button
score: 0
comment on: http://stackoverflow.com/q/26992841

http://stackoverflow.com/a/27012210
has comment: http://stackoverflow.com/comment/42553549
answers question: http://stackoverflow.com/q/27011251
has comment: http://stackoverflow.com/comment/42552976
accepted answer of: http://stackoverflow.com/q/27011251
has comment: http://stackoverflow.com/comment/42561343
has comment: http://stackoverflow.com/comment/42561609
has body: Your data comparison is not correct. You are comapring this: JetBlue Continental ... to this: { "id": "1", "airline": "JetBlue", "number": "222", "people": "3", "time": "12:20" }, { "id": "2", "airline": "Continental", "number": "222", "people": "5", "time": "23:21" }, There will be always inequality. You should use another approach. For example, if the id field from your JSON array is an unique one you can attach it to each item from the unordered list as an id attribute. For example: newItems.push( " " + value.airline + " " ); This way, at each iteration you can check if the incomming JSON item already exists into your list and add it when there is no match. Eg: if (!$myList.find('#' + value.id).length) { newItems.push( " " + value.airline + " " ); } Finally, you can append the newItems contents directly if there are items inside: if (newItems.length > 0) { $myList.append( newItems.join( "" ) ); } Here is the edited snippet: JSBin
has comment: http://stackoverflow.com/comment/42561049
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42553846
has comment: http://stackoverflow.com/comment/42561209
type: Answer
has comment: http://stackoverflow.com/comment/42553383

http://stackoverflow.com/a/27048528
has body: Do: var today = new Date(); var yesterday = new Date(today.getFullYear(),today.getMonth(),today.getDate()-1) then add below property in your to date picker function minDate : yesterday
type: Answer
answers question: http://stackoverflow.com/q/27047810
score: 0

http://stackoverflow.com/q/27072866
type: Question
has answer: http://stackoverflow.com/a/71174967
has answer: http://stackoverflow.com/a/77835228
has answer: http://stackoverflow.com/a/70030223
score: 218
tagged with: javascript
has title: How to remove all files from directory without removing directory in Node.js
has answer: http://stackoverflow.com/a/42182416
has answer: http://stackoverflow.com/a/70386367
upvote count: 218
has answer: http://stackoverflow.com/a/69208089
answer count: 19
has body: How to remove all files from a directory without removing a directory itself using Node.js? I want to remove temporary files. I am not any good with filesystems yet. I have found this method, which will remove files and the directory. In that, something like /path/to/directory/* won't work. I don't really know what commands should use. Thanks for the help.
has answer: http://stackoverflow.com/a/49125621
has comment: http://stackoverflow.com/comment/42657836
has answer: http://stackoverflow.com/a/72880816
downvote count: 0
has answer: http://stackoverflow.com/a/71333072
has answer: http://stackoverflow.com/a/49421028
has answer: http://stackoverflow.com/a/74282340
favorite count: 0
has answer: http://stackoverflow.com/a/74387452
has answer: http://stackoverflow.com/a/54903986
accepted answer: http://stackoverflow.com/a/42182416
has answer: http://stackoverflow.com/a/78870228
possible better answer: http://stackoverflow.com/a/54903986
tagged with: node.js
has comment: http://stackoverflow.com/comment/42657812
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/73594944
has answer: http://stackoverflow.com/a/65950565
has answer: http://stackoverflow.com/a/72793494
has answer: http://stackoverflow.com/a/74176543
has answer: http://stackoverflow.com/a/68980337

http://stackoverflow.com/comment/101561918
type: AnswerComment
has text: Thank you for the lessons. Don't expect I have a server and know lesser than you. My understanding is that origin is defined by http, domain and port, that means origin = server. Cross origin then means communication between **two** servers. I have no server so I need your solution (2) and PO need solution (1). If cross origin is not allowed none of the two answers is possible. PO have a server but it does not help if that server go through another server requesting the server with CORS not set or it is set to not allowing access. Can you correct what I said?
comment on: http://stackoverflow.com/a/27139956
type: Comment
score: 1

http://stackoverflow.com/a/27058471
answers question: http://stackoverflow.com/q/27058145
type: Answer
has comment: http://stackoverflow.com/comment/42633759
has comment: http://stackoverflow.com/comment/42632123
score: 0
has body: If you use libraries with "add globals" approach, you need to configure RequireJS to properly handle them. Otherwise they are loaded asynchronously in non-deterministic order. requirejs.config({ shim: { 'jquery': { exports: 'jQuery' }, 'pagination': ['jquery'] } });
has comment: http://stackoverflow.com/comment/42704104

http://stackoverflow.com/comment/42552976
score: 0
type: Comment
has text: Good but seems like `setTimeout(loadList,1000);` still doesn't load new data. I added new data in my `json` file expecting that it will notify me but, no luck. What could be the reason of that ?
type: AnswerComment
comment on: http://stackoverflow.com/a/27012210

http://stackoverflow.com/a/26997680
has body: You could loop the elements. Instead of a toggle, hide all elements except the one you want. function EnableVisibility(elementName, elementId) { for(i=1;i&lt;4;i++) { if(i == elementId) document.getElementById(elementName + i).style.display = 'block'; else document.getElementById(elementName + i).style.display = 'none'; } } EnableVisibility("page", 2); // This would hide all pages and display page2 If you don't like the hardcoded 4, you could change the for loop with a while and if getElementById returns a null then exit the loop. I personally like the class idea from Martijn and instead of changing the style directly you add or remove a class ex: class="page visible" class="page hidden"
score: 0
answers question: http://stackoverflow.com/q/26997412
type: Answer

http://stackoverflow.com/a/27049552
has comment: http://stackoverflow.com/comment/42616713
type: Answer
answers question: http://stackoverflow.com/q/27049466
has body: Try out this plugin https://github.com/jquery/jquery-color Sample code of color animation jQuery("#go").click(function(){ jQuery("#block").animate({ backgroundColor: "#abcdef" }, 1500 ); });
score: 0

http://stackoverflow.com/comment/42797708
type: AnswerComment
has text: It works pretty good, needs some adjustments to work good for me, but Thank you very much ;) and @Jonathan the PHP includes don't do exaclty what I need.
type: Comment
comment on: http://stackoverflow.com/a/27151219
score: 0

http://stackoverflow.com/a/27069205
upvote count: 2
answers question: http://stackoverflow.com/q/27069115
type: Answer
score: 2
downvote count: 0
has body: That's because the value of this when callback is called and its value is the moving function is not the MyObject instance. I could tell you how to fix your problem, but that would hardly teach you much. Instead, read this and then this, no pun intended.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27069115

http://stackoverflow.com/q/27085309
score: 0
has comment: http://stackoverflow.com/comment/42686195
tagged with: javascript
has body: In my app I have some pages that have a similar design and a home page with absolutely different design. So, my question is how to understand that required layout (for pages with similar design) has already been created and not re-render it. Btw, in further development it may be that I'll add some new pages that will have different design. I thought about some solutions, but they're all seems like anti-patterns to me. So, I need to organize my Marionette.Controller in right way. For now it looks like this: define(['backbone', 'marionette', 'app/app', 'session'], function (Backbone, Marionette, app, session) { 'use strict'; var main = app.mainRegion; function mainContent (view, model, options) { require([view, model], function (View, Model) { if (...) { //if main.currentView is already 'layout/main' then... var model = new Model(options); main.currentView.content.show(new View({ model: model })); } else { require(['layout/main'], function(Layout) { main.show(new Layout()); var model = new Model(options); main.currentView.content.show(new View({ model: model })); }) } }); } return Marionette.Controller.extend({ home: function () { if (session.getToken() === '') { require(['layout/home', 'login/view', 'register/view', 'login/model', 'register/model'], function(Layout, LoginView, RegisterView, LoginModel, RegisterModel) { main.show(new Layout()); main.currentView.login.show(new LoginView({ model: new LoginModel() })); main.currentView.register.show(new RegisterView({ model: new RegisterModel() })); }); } else { Backbone.history.navigate('/feed', { trigger: true }); } }, feed: function () { mainContent('feed/view', 'feed/model', {}); }, profile: function(username) { mainContent('profile/view', 'profile/model', { username: username }); } }); });
has comment: http://stackoverflow.com/comment/42681238
has answer: http://stackoverflow.com/a/27087273
type: Question
type: AnsweredQuestion
tagged with: marionette
tagged with: backbone.js
tagged with: requirejs
answer count: 1
accepted answer: http://stackoverflow.com/a/27087273
has title: How to understand that required layout has already been created?
tagged with: underscore.js

http://stackoverflow.com/comment/42586672
has text: I have a hard time believing that the use of javascript for styling purposes is justified. It's possible, but unlikely. I would start there - find out how much of this you can do from css, and you'll probably find the port to Angular is quite a lot easier.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27032489

http://stackoverflow.com/a/27149904
accepted answer of: http://stackoverflow.com/q/27149743
has comment: http://stackoverflow.com/comment/42794625
has comment: http://stackoverflow.com/comment/42794414
type: AcceptedAnswer
has body: Changing your: background-image:url(images/Animation_background.jpg); To: background-image:url(http://i3.kym-cdn.com/photos/images/facebook/000/511/991/3a5.jpg); Seems to work good, which means that you probably don't have access to images/Animation_background.jpg. 1) Check the URL of your image, make sure the image loads by itself in the browser. 2) Fix the path to the image based on your css file (you might have to prepend a / in the image path)
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27149743

http://stackoverflow.com/comment/42800296
score: 0
comment on: http://stackoverflow.com/q/27152701
has text: Looks like there are easier ways to do that -> **http://jsfiddle.net/adeneo/684kwLfb/1/**
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42760434
type: QuestionComment
has text: @AlexK. Yup. I have a .london email address. There are a very large and now quite commonly changing set of extensions. - http://data.iana.org/TLD/tlds-alpha-by-domain.txt
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27130312

http://stackoverflow.com/comment/42603442
type: QuestionComment
comment on: http://stackoverflow.com/q/27042168
score: 1
has text: You are looking at cross tab communication. Look at a library called postaljs which has a plugin for federated communication that can send messages between tabs and windows. Might be a good place to start.
type: Comment

http://stackoverflow.com/comment/42597334
has text: So you mean the dropdown list of URLs is driven by a value in LocalStorage, and there is UI to add additional URLs. Correct?
type: QuestionComment
comment on: http://stackoverflow.com/q/27018694
score: 0
type: Comment

http://stackoverflow.com/q/27038852
tagged with: javascript
tagged with: forms
score: 0
has comment: http://stackoverflow.com/comment/42597304
accepted answer: http://stackoverflow.com/a/27039692
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/27039692
has comment: http://stackoverflow.com/comment/42599536
has title: AngularJS: adding option to a select without selecting it?
has body: I have a form with a select, generated via ng-options and hooked up with a ng-model. This select calls a function via ng-change. In this function I remove the selected option from the select and reset the value in the referenced ng-model to the default value. On a later point I want to add this option back into the select, which works fine, but when adding the option to the select it automatically selects it, instead of the default value, that is already selected. This seems to happen after the function adding the option finished and angular is running its internal $apply function. How can I keep the default value selected? html: default angularjs: $scope.selectItem = function(selectedItem) { $scope.allItems.splice( $scope.allItems.indexOf(selectedItem), 1 ); } $scope.addItem = function(item) { // $scope.selectedItem == ""; $scope.allItems.push(item); // $scope.selectedItem == ""; }
has comment: http://stackoverflow.com/comment/42606353
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42598526

http://stackoverflow.com/comment/42645255
has text: Thanks, but now I'm effy on when I should use directives. If DOM manipulation occurs that does not require a controller model to be involved, I should use directives? For example, a directive would be used when handling a button click that only hides/shows some other html element. What happens for more complex DOM operations that depends on the data returned from the server? For example, if I am returned a message list from the server, and I want to render these messages in particular locations in the browser viewport based on the current browser dimensions (ie, mobile vs desktop)?
type: Comment
comment on: http://stackoverflow.com/a/27056270
score: 0
type: AnswerComment

http://stackoverflow.com/q/27122686
tagged with: twig
accepted answer: http://stackoverflow.com/a/27123201
score: 0
answer count: 1
tagged with: javascript
has body: I'm trying to make a page where you can fill in the categories used for news on my website. And ofcourse on this page you should be able to add and remove categories. Now the problem is.... is don't know how. I have no JS only made with html what it should look like. Output : http://prntscr.com/59x898 http://prntscr.com/59x8cx My HTML : Edit categories This is what a div looks like : Categorie 1 My css.... well lets just say its everywhere spread over those 1000 lines or so... Also is it possible to make it so that the label, id and name of the input changes when you add a new one? For example, cat-1 cat-2 so on. Thanks a bunch !! <3
type: AnsweredQuestion
has title: How to add and remove div's (input)
has comment: http://stackoverflow.com/comment/42746785
type: Question
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42746160
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27123201
tagged with: css
has comment: http://stackoverflow.com/comment/42746763

http://stackoverflow.com/q/27042145
downvote count: 0
has answer: http://stackoverflow.com/a/39088322
tagged with: ember-cli
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
tagged with: requirejs
tagged with: requirejs-optimizer
has title: Embedded ember-cli project conflicts with RequireJS
has answer: http://stackoverflow.com/a/60116210
has comment: http://stackoverflow.com/comment/56061906
type: Question
has body: I'm trying to embed an EmberJS application into a large portal application which uses extensively the RequireJS library. I'm using ember-cli to build the project. The built application consists of two files, dist/assets/vendor.js and dist/assets/myapp.js. The EmberJS application works after embedding it but the portal app's javascript breaks. After some research I've found out the problem is that vendor.js defines its own variables require, requirejs, requireModule and define which conflict with the website's variables in the global namespace. The myapp.js file then contains define statements which load the app's modules. Is there a way to rename these or to put them into some different namespace? The only solution I came up with was to manually rename the variables within the two .js files. This seems to work but it's rather cumbersome and it'd be nice if it could be automated. I have also found out about using RequireJS optimizer but I can't get it to work with the vendor.js file. Can you help me? Thanks!
tagged with: javascript
score: 4
upvote count: 4
answer count: 2

http://stackoverflow.com/comment/42732538
type: Comment
type: QuestionComment
has text: The timing of medication doses is handled separately. I just need to know for which which days to activate those doses.
score: 0
comment on: http://stackoverflow.com/q/27114511

http://stackoverflow.com/comment/42728128
has text: Edited with code now :)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27112324

http://stackoverflow.com/a/27127108
downvote count: 0
has comment: http://stackoverflow.com/comment/42753608
has comment: http://stackoverflow.com/comment/42754725
has comment: http://stackoverflow.com/comment/42753643
has comment: http://stackoverflow.com/comment/42754251
type: Answer
has comment: http://stackoverflow.com/comment/42754803
score: 1
upvote count: 1
has body: To insert HTML to a given element, in this case (it appears) div.modal-body, from a string of HTML (var htrmlString = "&lt;div&gt;&lt;button&gt;...&lt;/button&gt;&lt;/div&gt;", for example), you can use prependTo() or prepend(): $(htmlString).prependTo('div.modal-body'); Or: $('div.modal-body').prepend(htmlString); Similarly, though slightly more complex, you could use: $(htmlString).insertBefore('div.modal-body:first-child'); The following is the original answer to original version of the question (since edited by OP to correct it). The easiest solution would be: $('div.alert.alert-danger.alert-dismissible').append(response); Though you could also (if you don't mind losing all bound event-handlers, and recreating your DOM): $('#div.alert.alert-danger.alert-dismissible').html(function (index, html){ return html + ' ' + response; }); Note that you appear to be confused by CSS selectors: #alert-danger: selects an element with id="alert-danger", whereas: .alert-danger: selects elements with a class of, or including, alert-danger. The selector I used, above, div.alert.alert-danger.alert-dismissible selects &lt;div&gt; elements that have each of the classes specified (alert, alert-danger and alert-dismissible). References: append(). html(). insertBefore(). prepend(). prependTo().
answers question: http://stackoverflow.com/q/27127087
has comment: http://stackoverflow.com/comment/42755046

http://stackoverflow.com/comment/98385048
has text: Hello, your answer is just a replication of the code in the question and it does not provide any information why you would keep the same could.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/55862054
type: Comment

http://stackoverflow.com/comment/46361139
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27151774
type: Comment
has text: @pablochan `overview_polyline` worked for me. Please post it as answer, i ll accept.

http://stackoverflow.com/q/26996272
has title: Change data in PDF from HTML/JS
tagged with: jquery
has answer: http://stackoverflow.com/a/26996413
favorite count: 0
has comment: http://stackoverflow.com/comment/42523227
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
score: 1
upvote count: 1
type: Question
has body: I want to change text in my PDF document from webpage. It will be some sort of diploma. I have large illustration and the text on it. There will be two empty rows - "Name" and "Date". I wonder if there's a way to change the "name" on pdf? I know, that there is an interactive PDF, but i dont know how to instert variables to the document from HTML. Anyone can help me? Or perhaps you know better way to do this? I have two variables from JS or from Cookies (date and name), and want to generate a diploma. I have that illustration, fancy font and text. I was trying to do that with generating PDF from HTML, but it was problem with parsing a giant picture, and it was trying to open a pop-up, but I cant do this like that. It must be on same page or new tab.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42524605
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27079598
linked to: http://stackoverflow.com/q/42517697
downvote count: 1
has body: I am trying to drag and drop an image on a div. The image does not get get dragged onto the div and gives the following error Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.draganddrop.html:20 dropdraganddrop.html:26 ondrop Code Creativity Dashboard <!--[if lt IE 9]> <![endif]-->
has answer: http://stackoverflow.com/a/31800768
has comment: http://stackoverflow.com/comment/130464523
type: Question
has answer: http://stackoverflow.com/a/59138646
has comment: http://stackoverflow.com/comment/42669217
has answer: http://stackoverflow.com/a/60808237
has title: Error: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'
tagged with: javascript
answer count: 6
has comment: http://stackoverflow.com/comment/42669093
has answer: http://stackoverflow.com/a/71200336
favorite count: 0
has answer: http://stackoverflow.com/a/30238657
has comment: http://stackoverflow.com/comment/42669070
tagged with: http://stackoverflow.com/tag/html
upvote count: 223
score: 222
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/50791749

http://stackoverflow.com/a/27126430
has body: var number = '0821234568'; //082123456d or 082 123 4567 var trimmed = number.replace(/\s/g, ''); var regex = /^0(6|7|8){1}[0-9]{1}[0-9]{7}$/; if (regex.test(trimmed) === true) { console.log("work"); else console.log("no");
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27126207
answers question: http://stackoverflow.com/q/27126207
score: 3

http://stackoverflow.com/comment/42799346
comment on: http://stackoverflow.com/a/27137784
type: AnswerComment
score: 0
type: Comment
has text: @ZachL Gotcha! Without adding anything else like a class. Ok. So any element that has that background you want to count? or any background at all?

http://stackoverflow.com/a/27044271
type: Answer
score: 0
has body: Ok, so I found this little nugget http://www.gmarwaha.com/blog/2009/06/09/jquery-waiting-for-multiple-animations-to-complete/ and it works pretty good. No issues so far. Here is the new code $(".details").on("click", function(e){ e.preventDefault(); var panel = $("#DetailsPanel"); var mkey = $(this).data("masterkey-id"); var _self = $(this); // fetch data ONLY when panel is hidden... // otherwise it fetches data when the panel is closing var wait = setInterval(function() { if( !$("#DetailsPanel").is(":animated") ) { clearInterval(wait); // This piece of code will be executed // after DetailsPanel is complete. if (!panel.is(':visible')) { panel.load("/com/franchise/leads.cfc?method=getLeadDetails", { mkey: mkey }, function(response, status, xhr) { // if the ajax source wasn't loaded properly if (status !== "success") { var msg = " Sorry, but there was an error loading the document. "; panel.html(msg); }; // this is part of the .load() callback so it fills the panel BEFORE opening it panel.toggle("slide", { direction: "right" }, "fast", function(){ _self.parent().parent().addClass("warning"); }); }); } else { panel.toggle("slide", { direction: "right" }, "fast", function(){ _self.parent().parent().removeClass("warning"); }); }; } }, 200); return false; });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27043654
answers question: http://stackoverflow.com/q/27043654

http://stackoverflow.com/q/27100313
tagged with: javascript
answer count: 2
tagged with: syntax-error
possible better answer: http://stackoverflow.com/a/27100425
upvote count: 0
has title: js unterminated string literal document write
has answer: http://stackoverflow.com/a/27100425
favorite count: 0
accepted answer: http://stackoverflow.com/a/27100391
has body: This is my js file , At this point, browser returns a syntax mistake I do not know how to deal with it . Css must be loaded by js because it is periodically changed. It must remain so , help me solve the the problem SyntaxError: unterminated string literal (this symbol make error => ' ) document.write(' Seksik z piÄknÄ panienkÄ DĹugoĹÄ: 27:27 Ĺr. 0 z 0 12 wyĹwietleĹ Dodano: 24.11.2014 08:00 Ginger Spice oddaje swoje kakaowe oczko DĹugoĹÄ: 21:08 Ĺr. 0 z 0 247 wyĹwietleĹ Dodano: 24.11.2014 06:00 Dwie niunie i podwĂłjne dildo DĹugoĹÄ: 14:53 Ĺr. 0 z 0 269 wyĹwietleĹ Dodano: 24.11.2014 06:00 Laska poĹyka bolca na czacie DĹugoĹÄ: 11:19 Ĺr. 0 z 0 601 wyĹwietleĹ Dodano: 23.11.2014 22:00 '); RESOLVE! You have to watch out for whitespace when loading js dynamically , use the connect strings to avoid such problems that met me . Please raise the point , since the score of -1 is unfair . Each time may come across some stupid issue
score: -1
type: AnsweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27100391

http://stackoverflow.com/a/27018841
type: Answer
answers question: http://stackoverflow.com/q/27017274
has comment: http://stackoverflow.com/comment/42564794
upvote count: 1
has body: Instead of trying to get the js file with an XHR query, why not load it through the DOM by creating a new &lt;script&gt; element and setting its src= attribute to the file you're trying to load? Since it's DOM, loading from across domains is legal. function loadScript(scripts, name, index) { //Convert single string to array - not effective but easy if (!(scripts instanceof Array)) scripts = [scripts]; //Use first script src if no name is defined if (!name) name = scripts[0]; //Default index is 0 if (!index) index = 0; //In case wrong index was provided if (index &gt;= scripts.length) throw "Array index out of bounds."; //Create request var include = document.createElement('script'); with(include) { type = "text/javascript"; src = scripts[index]; onload = function () { return; }; onerror = function () { if (++index &lt; scripts.length) { loadScript(scripts, name, index); } else { throw "All sources failed for '" + name + "'."; } }; } document.head.appendChild(include); } (Not sure what you're doing with the name argument / variable, so I left it alone. You might ought to work on whatever logic you intended to employ with name.)
score: 1
has comment: http://stackoverflow.com/comment/42564758
has comment: http://stackoverflow.com/comment/42642155
downvote count: 0
has comment: http://stackoverflow.com/comment/42640553
has comment: http://stackoverflow.com/comment/42642399

http://stackoverflow.com/comment/42621458
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27052195
type: Comment
has text: And there are other constraints like greaterThan, lessThan, greaterThanOrEqualTo, lessThanOrEqualTo available, might be also useful to you.

http://stackoverflow.com/comment/42744510
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27121797
has text: no, it doesn't work correctly. If I move it up, the first label will be missing a radio button, while there is an extra radio button at the end.

http://stackoverflow.com/comment/47067799
comment on: http://stackoverflow.com/a/27107466
has text: Wow, have I been away from SO for this long? I actually ended up using some basic reactive tools to call `forceUpdate()` whenever given fields of a Backbone model changed. Because of that I can simply override `shouldComponentUpdate` to return false. `render` does still produce the same output for the same `props` and "state" (i.e. the Backbone models, I'm not storing anything in `this.state`).
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42574647
comment on: http://stackoverflow.com/q/27025628
score: 0
type: Comment
type: QuestionComment
has text: you have to use parseInt

http://stackoverflow.com/q/27090915
favorite count: 0
has body: My current code: Javascript function pushFunc() { mediaRecorder.requestData(); console.log(mediaRecorder.state); mediaRecorder.ondataavailable = function (e) { console.log("data size: ", e.data.size); var encodeData = new Blob([e.data], { type: 'video/mp4' }); postBlobData(encodeData); } } function postBlobData(blob) { var formData = new FormData(); formData.append("blobContent", blob); var request = new XMLHttpRequest(); request.open("POST", "/Device/Upload"); request.send(formData); } ASP.NET **File: DeviceController.cs** [HttpPost] public string Upload(HttpPostedFileBase blobContent) { ... // return View(); } The Java script code gets the blob from Media recorder and tries to post it down to the Controller. Am i grabbing and posting blobs the way i should? Should HttpPostedFileBase be used to receive the post request on the server side? Fiddler Screenshot#1 Fiddler Screenshot#2 Fiddler Screenshot#3
answer count: 0
upvote count: 3
type: UnansweredQuestion
score: 3
tagged with: asp.net-mvc
has title: How to send a POST request to send BLOB data from client java script and receive it via MVC controller?
type: Question
downvote count: 0
tagged with: javascript
tagged with: asp.net

http://stackoverflow.com/comment/42791973
comment on: http://stackoverflow.com/q/27140239
type: Comment
type: QuestionComment
has text: @Derek朕會功夫 Why do you want to assign data to a form field? The `FormData` API might suit your needs.
score: 0

http://stackoverflow.com/q/27008170
accepted answer: http://stackoverflow.com/a/27008474
has comment: http://stackoverflow.com/comment/42544697
tagged with: single-page-application
has answer: http://stackoverflow.com/a/27008474
has comment: http://stackoverflow.com/comment/42544848
has comment: http://stackoverflow.com/comment/42545008
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42545005
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
has body: I'm building a what called mini single page application which all the logic is in the client side and i'm using Angular for that. my problem is to load a JSON file which is not stored at any server but in my project tree - each time that i'm trying to load the file i'm getting 404.3 error code (tried with several browsers) - there is no issue with my call as i tried to call to a JSON file that stored on webserver and it worked wonderful - the only problem is when i'm trying to call to a local JSON. this is my call: app.controller("myCtrl", function ($scope, $http) { $http.get('/Data/names.json') .success(function (data, status, header, config) { console.log("file loaded"); console.log(data); console.log(status); console.log(header); console.log(config); }) .error(function (data, status, header, config) { console.log("ERROR file didn't load"); //console.log(data); //console.log(status); //console.log(header); //console.log(config); }) }); solved by adding web.config file to my project with the following lines: &lt;system.webServer&gt; &lt;staticContent&gt; &lt;mimeMap fileExtension=".json" mimeType="application/json" /&gt; &lt;/staticContent&gt; &lt;/system.webServer&gt;
answer count: 1
has title: how to load local json file in single page application with angularjs
tagged with: angularjs

three.js
tags question: http://stackoverflow.com/q/27126938
tags question: http://stackoverflow.com/q/27146120
tag name: three.js
tags question: http://stackoverflow.com/q/27093557
tags question: http://stackoverflow.com/q/27094787
tags question: http://stackoverflow.com/q/27054157
tags question: http://stackoverflow.com/q/27114087
tags question: http://stackoverflow.com/q/27027755
tags question: http://stackoverflow.com/q/27146806
tags question: http://stackoverflow.com/q/26997180
tags question: http://stackoverflow.com/q/27095251
tags question: http://stackoverflow.com/q/27000399
tags question: http://stackoverflow.com/q/27133579
tags question: http://stackoverflow.com/q/27113445
tags question: http://stackoverflow.com/q/27136968
type: Tag
tags question: http://stackoverflow.com/q/27128351
tags question: http://stackoverflow.com/q/27048611
tags question: http://stackoverflow.com/q/27042683
tags question: http://stackoverflow.com/q/27115283
tags question: http://stackoverflow.com/q/27002809
tags question: http://stackoverflow.com/q/27077702
tags question: http://stackoverflow.com/q/27116852

http://stackoverflow.com/comment/42609248
has text: I means that when i click on the chevrons or dots buttons, there is not any animation and image change. Furthermore, in the developper tools console, nothing is wrong, no errors.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27043521
score: 0

http://stackoverflow.com/q/27035340
has answer: http://stackoverflow.com/a/27035464
type: Question
tagged with: mongodb
score: 2
downvote count: 0
has body: I have a very basic question: SELECT name, surname CONCAT(name, surname) AS name_surname from users; How can I convert this SQL to MongoDB query? During my search, I have decided that it is possible with aggregate framework due to concat, but what I received is only projection of concat(name, surname) not name, surname and concat(name, surname). Final thing I got is this query: db.inroamers.find().forEach( function(o) { print(o.LAC + '-' + o.CELL + ' ' + o.CHARGE + ' ' + o.WEEK); }) but it does not give me proper json array. Any suggestions?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27035464
answer count: 1
favorite count: 0
upvote count: 2
has title: MongoDB select and concatenate fields
type: AnsweredQuestion

http://stackoverflow.com/q/27068443
linked to: http://stackoverflow.com/q/1069666
has comment: http://stackoverflow.com/comment/42650876
tagged with: jquery
has comment: http://stackoverflow.com/comment/42650095
has comment: http://stackoverflow.com/comment/42650219
linked to: http://stackoverflow.com/q/1129216
has comment: http://stackoverflow.com/comment/42650159
has body: i have an array of objects. example [object Object]. This array is basically first object is the code of U.S and the second object is its fullname. {AK: "Alaska", AL: "Alabama", AR: "Arkansas", AZ: "Arizona", CA: "California", CO: "Colorado"}, does anyone know how to sorted alphabetically?
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/42650308
type: Question
linked to: http://stackoverflow.com/q/1134976
has comment: http://stackoverflow.com/comment/42650034
linked to: http://stackoverflow.com/q/1359761
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/42650131
has title: sort array objects [object Objects] in javascript
has comment: http://stackoverflow.com/comment/42650468
has comment: http://stackoverflow.com/comment/42650133

http://stackoverflow.com/q/27151114
has body: I am trying to convert my Highchart into a .csv file. I am using the Export chart Data to CSV plugin for the same. I have pasted the full code at the bottom of the question. I try to run my code with the above file in scope and it does not have any effect. On further investigation I find out two things the getOptions() method does not seem to be standard for the Highcharts library as there is no documentation for it. It does not return the exhaustive list of options available for my Highchart. Hence, the if (Highcharts.getOptions().exporting) at the end of the two functions (getDataRows() and getCSV()) returns undefinedas it does not recognize exporting. What seems to be the problem here? /** * A small plugin for getting the CSV of a rendered chart */ /*global Highcharts, document */ (function (Highcharts) { 'use strict'; var each = Highcharts.each, downloadAttrSupported = document.createElement('a').download !== undefined; /** * Get the data rows as a two dimensional array */ Highcharts.Chart.prototype.getDataRows = function () { var csv, options = (this.options.exporting || {}).csv || {}, xAxis = this.xAxis[0], rows = {}, rowArr = [], dataRows, names = [], i, x, // Options dateFormat = options.dateFormat || '%Y-%m-%d %H:%M:%S'; // Loop the series and index values i = 0; each(this.series, function (series) { if (series.options.includeInCSVExport !== false) { names.push(series.name); each(series.points, function (point) { if (!rows[point.x]) { rows[point.x] = []; } rows[point.x].x = point.x; // Pies, funnels etc. use point name in X row if (!series.xAxis) { rows[point.x].name = point.name; } rows[point.x][i] = point.y; }); i += 1; } }); // Make a sortable array for (x in rows) { if (rows.hasOwnProperty(x)) { rowArr.push(rows[x]); } } // Sort it by X values rowArr.sort(function (a, b) { return a.x - b.x; }); // Add header row dataRows = [[xAxis.isDatetimeAxis ? 'DateTime' : 'Category'].concat(names)]; // Transform the rows to CSV each(rowArr, function (row, i) { // A…
tagged with: highcharts
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42932100
tagged with: http://stackoverflow.com/tag/csv
type: UnansweredQuestion
has title: 'Convert to CSV' plugin for HighCharts does not recognize all options for a chart
has comment: http://stackoverflow.com/comment/42862141
answer count: 0
type: Question

http://stackoverflow.com/q/27064371
has comment: http://stackoverflow.com/comment/42643197
has comment: http://stackoverflow.com/comment/42643368
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27064518
has comment: http://stackoverflow.com/comment/42642698
has comment: http://stackoverflow.com/comment/42642794
has answer: http://stackoverflow.com/a/27064518
accepted answer: http://stackoverflow.com/a/27065079
has comment: http://stackoverflow.com/comment/42643467
upvote count: 1
has body: Im trying to do something that should be very simple yet my head is about to explode considering I cannot get it to work. In my asp.net MVC app, I make an Ajax call to the server, and the server sends back a message (as a string), which includes a link. The message basically looks like this : Action failed, Learn more.. I am inserting this returned message in a div that shows the alerts from the server. However, whatever I try, the 'Learn more.' part will never be inserted. If I do alert(returnedMessage), it shows the correct html, but as soon as I do $(mydiv).html(returnedMessage), the anchor-tag is gone. I tried unescaping, normal jscript innerHtml...not sure what I'm missing. Thanks! **UPDATE with some extra code ** I have the ajax call that returns a message. I have a method that then sets the message into the div and shows the alert. the ajax call handling: success: function (result) { if (result.Message) { showAlert(result.Message); } }, The javascript: function showAlert(message) { // neither setting the actual div, nor the span works alert(message); $('#server-message').html(message) //$('#server-message span').html(message); $('#server-message').fadeIn(100); }; the html:
has comment: http://stackoverflow.com/comment/42642697
downvote count: 1
has comment: http://stackoverflow.com/comment/42643276
has comment: http://stackoverflow.com/comment/42643336
type: Question
has title: Inserting html in div with JQuery removes Anchor tags
answer count: 2
has comment: http://stackoverflow.com/comment/42642802
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/42642968
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42643089
has comment: http://stackoverflow.com/comment/42642836
score: 0
has comment: http://stackoverflow.com/comment/42643121
has comment: http://stackoverflow.com/comment/42643658
has comment: http://stackoverflow.com/comment/42643447
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27065079
has comment: http://stackoverflow.com/comment/42643226
favorite count: 0

http://stackoverflow.com/q/27075083
answer count: 1
has body: I'm trying to write a TodoItem.read.js method to convert the sample TodoItem program for Azure Mobile for iOS to use Table Storage. I am now successfully inserting items, but I can't read them yet. Here's the error that node.js is throwing: Error in script '/table/TodoItem.read.js'. TypeError: Object # has no method 'toQueryObject' [external code] at read (:12:14) at :1:6 [external code] And here's my code: var azure = require('azure-storage'); var tableSvc = azure.createTableService(); var query = new azure.TableQuery() .select() .where('PartitionKey eq ?', 'learningazure'); function read(query, user, request) { console.log('query: ', query); tableSvc.queryEntities('TodoItem',query, null, function(error, result, response) { if(!error) { // query was successful request.respond(200, result); console.log('result: ', result); console.log('response: ', response); } else { console.log('Error calling read()'); console.log(error); } }); } What am I missing here?
has title: Azure node.js script: TypeError: Object #<Query> has no method 'toQueryObject'
accepted answer: http://stackoverflow.com/a/27079581
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/27079581
score: 0
tagged with: azure

http://stackoverflow.com/comment/42682625
type: Comment
comment on: http://stackoverflow.com/a/27086970
type: AnswerComment
has text: The second answer here explains how to parse a url if you really don't want to use Jquery : http://stackoverflow.com/questions/736513/how-do-i-parse-a-url-into-hostname-and-path-in-javascript
score: 0

http://stackoverflow.com/comment/42521045
has text: could also try catching window blur event
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26995042
score: 1

http://stackoverflow.com/q/27043459
tagged with: google-geocoding-api
score: 1
upvote count: 2
answer count: 2
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27050383
tagged with: promise
has answer: http://stackoverflow.com/a/27044402
type: UnansweredQuestion
has body: I have the following code where I am trying to convert a list of 10-15 addresses in the businesses array into lat/lng coordinates using Google Maps Geocoding API. var geocoder = new google.maps.Geocoder(); var proms = businesses.map(function(address) { return prom = new Promise(function(resolve) { geocoder.geocode({ address: address }, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { resolve({ results: results, business: address }); } else if (status === google.maps.GeocoderStatus.OVER_QUERY_LIMIT) { setTimeout(function() { //HOW DO I RE-RUN THIS "new Promise"? }, 1000); } else { console.log(status + ': ' + results); } }); }); }); Promise.all(proms); The problem is that Google's API will sometimes return an OVER_QUERY_LIMIT error so I was wondering if there's a way to re-run the promise that failed after a few seconds. In the example above the else if statement catches the error, so how would I make it rerun after a timeout? Note that I just started using promises and don't have a good understanding yet how they work so my approach might be completely wrong. Also all of this is done under the assumption that Google's API won't let me resolve addresses in bulk, if that's not the case - please, let me know.
linked to: http://stackoverflow.com/q/36266442
downvote count: 1
has title: How to re-run a javascript promise when failed?
type: Question

http://stackoverflow.com/q/27044914
tagged with: css
possible better answer: http://stackoverflow.com/a/27045044
has answer: http://stackoverflow.com/a/27045044
has answer: http://stackoverflow.com/a/27045157
answer count: 3
has title: jQuery: Slidedown li on Hover and SlideUp on mouse out
upvote count: 1
has answer: http://stackoverflow.com/a/27045045
has body: How can i make this with jquery. When mouse is over Product 1, to slidedown only elements on this category, for example : Item1 Item2 Item3 Item4 And when the mouse is leave the Product 1, to slideup. The same with another ones Product1 Item1 Item2 Item3 Item4 Product 2 Item product 2 Item product 2 Item product 2 Product 3 Item product 2 Item product 2/li>
accepted answer: http://stackoverflow.com/a/27045157
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27099964
has body: Room.find() is the only way to iterate through room objects at the moment. By the way, instead of checking energy &gt; 0 you can simply use Game.SOURCES_ACTIVE constant:
score: 2
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27095810
upvote count: 2

http://stackoverflow.com/q/27025514
accepted answer: http://stackoverflow.com/a/27057993
type: Question
tagged with: sails.js
has title: sails js socket events does not triggered after server restart
tagged with: javascript
score: 0
has body: I have a model User stored in Mongo (also user sessions stored in redis). For example, users has such ids - user_1 and user_2. The user_1 send from client side message socket.post('/user/move', {value: "some_value"}, function(res) { log('on move message: ', res); }); Controller of "move" is move: function(req, res, next) { var value = req.param('value'); User.message("user_2", {from: "user_1", value: value}); } it works user_2 got the message. But if i'm restart a sails server and try to send (make socket post) the same event do not delivered.
has comment: http://stackoverflow.com/comment/42574684
answer count: 1
has answer: http://stackoverflow.com/a/27057993
tagged with: sockets
has comment: http://stackoverflow.com/comment/42587882
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/42530488
type: Comment
type: QuestionComment
has text: What about [Here, JPlayer Multiple playlist docs](http://jplayer.org/latest/demo-02-jPlayerPlaylist/)
comment on: http://stackoverflow.com/q/26999766
score: 0

http://stackoverflow.com/comment/42699292
type: Comment
has text: You, @Michael Mullany, are a flip'n genius. Such a simple solution — I definitely over-thought this. I changed and added a few lines of code and got **exactly** what I needed. Many thanks, you rock! I have marked your solution as the answer.
comment on: http://stackoverflow.com/a/27096790
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42605439
type: QuestionComment
comment on: http://stackoverflow.com/q/27043007
has text: @MattSmith The example you have shown should work.
score: 0
type: Comment

http://stackoverflow.com/comment/42762039
comment on: http://stackoverflow.com/q/27131495
has text: @DavidThomas I added a note to the question. To the downvoters: why the downvote? Can't I ask a question just for programming culture?
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/42616568
comment on: http://stackoverflow.com/q/27030047
score: 0
type: Comment
type: QuestionComment
has text: lol. nice edit. I warned you about nitrous.io!

http://stackoverflow.com/comment/42592368
comment on: http://stackoverflow.com/q/27035739
type: Comment
type: QuestionComment
has text: Why are you escaping all the special characters?
score: 0

http://stackoverflow.com/q/27092284
possible better answer: http://stackoverflow.com/a/27092461
answer count: 3
has answer: http://stackoverflow.com/a/27092315
accepted answer: http://stackoverflow.com/a/27092315
upvote count: 1
has comment: http://stackoverflow.com/comment/42694772
favorite count: 0
has answer: http://stackoverflow.com/a/27092367
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: display 125 words from the description field of the database mysql
has answer: http://stackoverflow.com/a/27092461
type: AnsweredQuestion
tagged with: mysql
type: Question
has body: Hello fellow Overflows, So im in the middle of creating a toplist script, ready to launch to the public, I'm stuck on one perticualr subject. Displaying X amount of content from A database field. &lt;?php echo $server_data['description']; ?&gt; As you can see in this image below, That wouldn't be a good idea to display the full amount. https://i.sstatic.net/9jA1z.png What do i need? Instead of it displaying all of the database field, i just want it to display 150 characters of the field.
tagged with: javascript
score: -1

http://stackoverflow.com/a/73835123
upvote count: 3
has body: With leading and trailing invocations: const throttle = (fn, ms) =&gt; { let locked = false return function () { if (!locked) { locked = true fn.apply(this, arguments) setTimeout(() =&gt; { fn.apply(this, arguments) locked = false }, ms) } } } Test case: function log({ gender, address }) { console.log({ name: this.name, gender, address, }) } const jack = { name: 'Jack', log: throttle(log, 3000), } Array.from({ length: 5 }, () =&gt; jack.log({ gender: 'Male', address: 'LA' }))
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27078285

http://stackoverflow.com/a/27146454
answers question: http://stackoverflow.com/q/27073765
score: 0
type: Answer
has body: If the problem still persists I would suggest you do following: Select RadioButtonList and in the Object palette -> Binding tab verify values for each radio button you have. Then rewrite your code to look it similar to this: if (RadioButtonList.rawValue == 2 || RadioButtonList.rawValue == 4) { this.rawValue = ((Table3.Row1.Cell3 * NumericField1) / Table3.Row1.Cell4); } else if (RadioButtonList.rawValue == 1 || RadioButtonList.rawValue == 3) { if (DropDownList1.rawValue === "Concierge") { this.rawValue = ((Table3.Row1.Cell3 * NumericField1) * 0.06); } if (DropDownList1.rawValue != "Concierge" &amp;&amp; DropDownList1.rawValue != "" ) { this.rawValue = ((Table3.Row1.Cell3 * NumericField1) * 0.04) / Table3.Row1.Cell4; } } else { this.rawValue = 0; } As a value for each button I choose a number of a button.

http://stackoverflow.com/a/27071927
upvote count: 1
answers question: http://stackoverflow.com/q/27071405
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27071405
has body: You could try using a &lt;webview&gt; for Chrome apps and inject custom scripts via the executeScript method. Remember to specify the "webview" permission in your manifest file.
score: 1

http://stackoverflow.com/a/27030885
accepted answer of: http://stackoverflow.com/q/27030849
has comment: http://stackoverflow.com/comment/42584021
answers question: http://stackoverflow.com/q/27030849
upvote count: 2
has comment: http://stackoverflow.com/comment/42584097
has comment: http://stackoverflow.com/comment/42584124
type: AcceptedAnswer
type: Answer
has body: Well, following is more proper: app = angular.module('&lt;name of your app&gt;', ['ngSanitize']); app.controller('&lt;controller name&gt;', function($scope, $interpolate){ $scope.Text = 'Test to User In Red'; $scope.TextToUser = $interpolate('&lt;font size="3" color="red"&gt;{{Text}}&lt;/font&gt;')($scope); }); Now bind html: &lt;span ng-bind-html="TextToUser"&gt;&lt;/span&gt; You need to include sanitize script. https://code.angularjs.org/1.3.2/angular-sanitize.js Note:- I tried using $interpolate but it gives error about unsafe stuff without ngSanitize. The working plunk is here.
score: 1
downvote count: 1

http://stackoverflow.com/a/27019953
upvote count: 2
has comment: http://stackoverflow.com/comment/42564761
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42567215
answers question: http://stackoverflow.com/q/27019487
has comment: http://stackoverflow.com/comment/42567352
has body: Have a play with this fiddle. It inserts a value and then applies a color to is (using a very simple algorithm that you will want to change). Here's how you could implement it in your code success : function(data){ for(var i = 0; i &lt; data.length; i++) { // loop over results var divForResult = $('#desk_' + data[i]['station']); // look for div for this object if(divForResult.length) { // if a div was found divForResult.html(data[i]['aht_value']).css("background-color", colorMe(data[i]['aht_value'])); }//end if }//end for }//end success Make these available in your code: function colorMe(v){ return "rgb(" + conv(v) + "," + (255-conv(v)) + ",0)"; } function conv(x){ return Math.floor((x - 100) / (1800-100) * 255); }
type: Answer
accepted answer of: http://stackoverflow.com/q/27019487
has comment: http://stackoverflow.com/comment/42565252
has comment: http://stackoverflow.com/comment/42569331
has comment: http://stackoverflow.com/comment/42567131

http://stackoverflow.com/comment/42624222
type: QuestionComment
comment on: http://stackoverflow.com/q/27053404
has text: I probably misunderstood, I just moved the text to match the image.
score: 0
type: Comment

http://stackoverflow.com/a/78111691
answers question: http://stackoverflow.com/q/27052480
has body: I think it's terrible to add additional value like req.path when you render. You will have to add that value every single time you render a page that has a navbar. res.render('home', { path: req.path }); I simply use jquery to change the active nav item's class. The code to change class will be included in a ejs file (template) which will be included by every page so there is no additional code at all when you render! HTML: Home Docs Javascript: $(`a[href=${window.location.pathname}`).addClass('active'); The ejs file included by other pages would look like this:
score: 0
type: Answer

http://stackoverflow.com/comment/42749702
has text: http://jsfiddle.net/xb4u0453/3/ I pretty much set validation messages via the tooltips that popup under the input boxes where the required is shown. Is there any way to do that?
type: Comment
comment on: http://stackoverflow.com/a/27123797
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42574252
type: Comment
comment on: http://stackoverflow.com/q/27025129
type: QuestionComment
has text: @plbsam: I have tried to put it everywhere inside the if-statement, but the function does not stop when I make a move.
score: 0

http://stackoverflow.com/q/27139457
upvote count: 1
linked to: http://stackoverflow.com/q/26896787
has comment: http://stackoverflow.com/comment/42875105
favorite count: 0
tagged with: casperjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42841847
tagged with: phantomjs
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/42783354
score: 1
has body: First a summary of the question before going into detail: Is it possible to send a (cors)request to an external dedicated server running phantomjs/casperjs which in return makes a screenshot of the requested url and send the screenshot back? details on situation: Used to code alot in the eighties when I was still very young. Only started taking on PHP and jquery 2 months ago and my first practice project resulted in an icon generator @ www.iconoplastix.com. Although the outcome looks good I still dont know jackshizzle about anything. It only features export to html/css since it seemed rather difficult/impossible to make screenshots serverside (to render icons to image). Now that version1.0 is online I can concentrate on getting exporting icons to image working but I don't know if what I want to establish is even possible. What did I do so far: subscribed for a cloud vps dedicated server installed phantomjs on this server have been fiddling with making cors requests between xampp at my own system and where the icongenerator is located (externally, shared hosting) with success. What I am aiming for is that once a user wants to export his icons to image on the first website (where the icongenerator is at) it creates a folder with just a html file showing a range of icons. Then this website should send a signal (corsrequest?) to my vps cloud with phantomjs running. The message/request should contain the url where the screenshot has to be taken (md5 made folder). On this (cors)request phantomjs (and casperjs) should take a screenshot of this url and send it back to website the request came from. Is this possible and if so, could someone shed some light in my darkness since I dont have a clue where to go from here. I have read alot of documentation on phantonjs and a bit of casperjs but I cant find anywhere (correct me if im wrong) if it is possible to call phantomjs/casperjs from within a webpage. If this is not possible how would the approach to my problem be?
tagged with: webpage-screenshot
type: Question
has title: How to fire phantomjs/casperjs scripts on my VPS from an external website (sharedhosting) and let phantomjs send a file back
has comment: http://stackoverflow.com/comment/42792666
tagged with: javascript

http://stackoverflow.com/q/27067550
has body: I'm trying to set the x and y axes ranges based on the maximum and minimum values for each (i.e., max and min for x and max and min for y). I know that domain controls this range, but I can't figure out how to set it dynamically based on the data. I know a bunch of this code isn't applicable to the issue, but figured I'd post it all. Here goes: var margin = {t:30, r:20, b:20, l:40 }, w = 600 - margin.l - margin.r, h = 500 - margin.t - margin.b, x = d3.scale.linear().range([0, w]), y = d3.scale.linear().range([h - 60, 0]), //colors that will reflect geographical regions color = d3.scale.category10(); var svg = d3.select("#chart").append("svg") .attr("width", w + margin.l + margin.r) .attr("height", h + margin.t + margin.b); fig = svg.append("g").attr("transform", "translate(40, 20)"); // set axes, as well as details on their ticks var xAxis = d3.svg.axis() .scale(x) .ticks(20) .tickSubdivide(true) .tickSize(6, 3, 0) .orient("bottom"); var yAxis = d3.svg.axis() .scale(y) .ticks(20) .tickSubdivide(true) .tickSize(6, 3, 0) .orient("left"); var startX = d3.min(x.domain()), endX = d3.max(x.domain()), startY = d3.min(y.domain()), endY = d3.max(y.domain()); var lines = [{x1: startX, x2: endX, y1: (startY + endY)/2, y2: (startY + endY)/2}, {x1: (startX + endX)/2, x2: (startX + endX)/2, y1: startY, y2: endY}] fig.selectAll(".grid-line") .data(lines).enter() .append("line") .attr("x1", function(d){ return x(d.x1); }) .attr("x2", function(d){ return x(d.x2); }) .attr("y1", function(d){ return y(d.y1); }) .attr("y2", function(d){ return y(d.y2); }) .style("stroke", "#000") // group that will contain all of the plots var groups = svg.append("g").attr("transform", "translate(" + margin.l + "," + margin.t + ")"); // array of the regions, used for the legend var regions = ["Demographic", "Financial", "Content Interests", "Social Media", "Behaviors &amp; Attributes", "Location Distribution","CPG Buying"] d3.csv("trust-business.csv", function(data) { // sort data alphabetically by reg…
linked to: http://stackoverflow.com/q/27084532
upvote count: 1
has answer: http://stackoverflow.com/a/27084412
type: AnsweredQuestion
score: 1
has title: Set axis range based on data set minimum and maximum in d3.js
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/27084412
tagged with: javascript
has comment: http://stackoverflow.com/comment/42677534
has comment: http://stackoverflow.com/comment/42650478
answer count: 1
favorite count: 0
tagged with: d3.js

http://stackoverflow.com/a/27065726
type: Answer
answers question: http://stackoverflow.com/q/27065421
has body: This is definitely possible with just CSS/HTML. You need to know your image container height and your button size to get it perfect, though (which shouldn't be an issue in this case). Here's an example: http://jsfiddle.net/gxr4r2n0/1/ I placed the buttons inside the wrapper, and set the wrapper to position:relative;. Then, set the buttons to position:absolute and modify the top, left, right, and margin-top respectively based on which side the button is on and the size of the button. This example is also responsive.
score: 0

http://stackoverflow.com/q/27010870
has comment: http://stackoverflow.com/comment/42548828
has title: filter json based on key value
favorite count: 0
possible better answer: http://stackoverflow.com/a/27011098
tagged with: angularjs
has answer: http://stackoverflow.com/a/27011420
score: 2
has comment: http://stackoverflow.com/comment/42548772
type: AnsweredQuestion
upvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/27011420
has comment: http://stackoverflow.com/comment/42548822
answer count: 2
has body: I have the below JSON data. I want to filter based on Key value pairs that is based on Department and Employee var data = { "Item": [ { "Fields": [ { "Key": "Title", "Value": "" }, { "Key":"Name", "Value":"Phani" }, { "Key":"Designation", "Value":"Software Eng" }, { "Key":"Salary", "Value":"" }, { **"Key":"Section",** "Value":"Employee" }], "ItemName": "Test" }, { "Fields": [ { "Key": "Title", "Value": "" }, { "Key": "Name", "Value": "Raju" }, { "Key": "Designation", "Value": "Software Eng" }, { "Key": "Salary", "Value": "" }, { "Key": "Section", "Value": "Employee" }], "ItemName": "Test" }, { "Fields": [ { "Key": "Title", "Value": "" }, { "Key": "DepName", "Value": "Finance" }, { "Key": "DepType", "Value": "Money" }, { "Key": "Salary", "Value": "" }, { "Key": "Section", "Value": "Department" }], "ItemName": "Test" }, { "Fields": [ { "Key": "Title", "Value": "" }, { "Key": "DepName", "Value": "IT" }, { "Key": "DepType", "Value": "Tech" }, { "Key": "Salary", "Value": "" }, { "Key": "Section", "Value": "Department" }], "ItemName": "Test" } ] }; In the above json data if you observe in Fields array i have key value pairs There is a key with name Section and its value. I want to filter the data based on Section, like i want to list all the employees and all the departments. Confused about iterating. could you please help with this. I want two objects ans output var emps =[] var deps=[] so that i can iterate and access like emp["Designation"] emp["Name"] dep["DepName"] etc
has answer: http://stackoverflow.com/a/27011098
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/27007140
type: Answer
accepted answer of: http://stackoverflow.com/q/26998724
answers question: http://stackoverflow.com/q/26998724
score: 5
upvote count: 5
has body: To anyone looking for an answer to this, adding more information to Xenyal's answer, I've found out that the latest release build of fabric.js does not support text:changed under canvas. Using(Latest Release Build) http://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.4.0/fabric.min.js whatevertext.on("text:changed", function(e) { //this works with the latest release build where whatevertext is the name of the object }); Using(Dev Build) https://rawgit.com/kangax/fabric.js/master/dist/fabric.js canvas.on('text:changed', function(e) { //this will only work using the dev build });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27036265
score: 5
has body: I was trying to make a browser independent code with a search bar in it ( this search bar i took from demos.jQuery.com) but now when I am trying to fix the margin percent in the left and right side ( i want it center aligned even when browser width is changed ) I am unable to do that , I am new to CSS can someone help ? the code that i made till now is : HTML : Screen1 Composite These Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam p elements nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam are et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est filterable Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur CSS : @CHARSET "ISO-8859-1"; #header { position:absolute; height:40px; width:100%; background-color:#D1D3D4; verticle-align="middle"; left:0; } .img1 { position:relative; height:13px; float:right; padding-right:12%; } .p1{ position:relative; padding-bottom:5%; padding-left:7%; width:100%; } #main { position:absolute; margin-top:80px; left:-.3%; margin-right:2%; width:98%; border-right:5%; } Refer this fiddle
tagged with: javascript
tagged with: jquery
has title: how to make the margin constant on both side of a div
has answer: http://stackoverflow.com/a/27036504
accepted answer: http://stackoverflow.com/a/27036504
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27036442
favorite count: 0
upvote count: 5
possible better answer: http://stackoverflow.com/a/27036576
answer count: 5
has answer: http://stackoverflow.com/a/27036576
tagged with: css
has answer: http://stackoverflow.com/a/27036885
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/114543
downvote count: 0
has answer: http://stackoverflow.com/a/27037014
type: Question

http://stackoverflow.com/comment/42722280
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27109639
has text: *The MV of StringNumericLiteral ::: [empty] is 0.*

http://stackoverflow.com/comment/116995745
type: AnswerComment
has text: It seems like it is the JSON.stringify call that is the problem and so the console.log line
comment on: http://stackoverflow.com/a/66175051
score: 0
type: Comment

http://stackoverflow.com/comment/45306219
has text: Came here because of a search for this issue, and this absolutely fixed the problem. Thanks!
type: Comment
score: 1
comment on: http://stackoverflow.com/a/28436277
type: AnswerComment

http://stackoverflow.com/q/27066243
has answer: http://stackoverflow.com/a/27066607
tagged with: regex
downvote count: 1
has comment: http://stackoverflow.com/comment/42646403
has comment: http://stackoverflow.com/comment/42646086
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42646308
score: -1
has comment: http://stackoverflow.com/comment/42645957
type: Question
has answer: http://stackoverflow.com/a/27066684
has comment: http://stackoverflow.com/comment/42646197
answer count: 2
has comment: http://stackoverflow.com/comment/42646587
upvote count: 0
has comment: http://stackoverflow.com/comment/42646684
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42646459
has body: I use this Regexp to match text inside square brackets /\[link\](.*)\[\/link\]/g The text that I match [link]The text goes here[/link] The Regexp work's great when I test it in regex101 but when I use it in my website it doesn't work. This is how I use it in my Website. case 'untitle': var html = '&lt;script&gt;$(document).ready(function(){var topic = $(".post-body div").text(); topic = topic.split(/\[link\](.*)\[\/link\]/g); $(".article-title a").attr("href", topic[1]); });&lt;\/script&gt;'; break; $('body').append(html); I figure out that the Regexp doesn't work because it is inside quotes so I need a method to escape it and make it work.
has comment: http://stackoverflow.com/comment/42646136
has comment: http://stackoverflow.com/comment/42646612
has comment: http://stackoverflow.com/comment/42646243
has comment: http://stackoverflow.com/comment/42646564
accepted answer: http://stackoverflow.com/a/27066684
has comment: http://stackoverflow.com/comment/42646072
favorite count: 0
possible better answer: http://stackoverflow.com/a/27066607
has title: Regexp won't work inside quotes

http://stackoverflow.com/a/27032465
type: Answer
has comment: http://stackoverflow.com/comment/42606386
has comment: http://stackoverflow.com/comment/42602972
has comment: http://stackoverflow.com/comment/42587605
has comment: http://stackoverflow.com/comment/42589214
has comment: http://stackoverflow.com/comment/42659517
has body: You are right, since the script is being launched via osascript, $.NSApp won't have access to the service menu. But, with a little UI scripting, you can find all the menu items through the finder application: function grabFirstNested(arr) { if (arr.length <= 0 || !Array.isArray(arr[0])) { return arr; } return grabFirstNested(arr[0]); } function run(arg) { var sys = Application('System Events'); var servicesRef = sys.processes['Finder'].menuBars.menuBarItems.whose({ name: { _contains: 'finder'} }, {ignorign: 'case'}).menus.menuItems.whose({ name: { _contains: 'services'} }, {ignoring: 'case'}).menus.menuItems.name; var services = grabFirstNested(servicesRef()); var list = " "; services.forEach(function(service, index) { list += " " + service + " Services Toolbox icon.png "; }); list += " "; return list; } This script will access the Finder application through the System Events APIs, which give access to UI elements for scripting. Once it has the Finder application, it grabs the MenuItems from the "services" menu bar item.
has comment: http://stackoverflow.com/comment/42606091
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42607877
accepted answer of: http://stackoverflow.com/q/27032078
has comment: http://stackoverflow.com/comment/42659970
has comment: http://stackoverflow.com/comment/42592977
answers question: http://stackoverflow.com/q/27032078
has comment: http://stackoverflow.com/comment/42589322

http://stackoverflow.com/a/27014738
type: Answer
answers question: http://stackoverflow.com/q/27013474
has comment: http://stackoverflow.com/comment/42558330
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42564205
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42565791
has body: I think it's the way you set the closure: function createBound(){ var fn = function(){console.log('this is:',this);} ,i = -1//ret items are set using the value i inside createBound //by the time we call the function the value of i is 2 ,ret = []; for(i = 0; i &lt; 2; i++){ ret.push(function(){ console.log('i is:',i);//says 2 every time fn.call({hello:'world'}); }); } return ret; } var bound = createBound(); bound[0](); bound[1](); correct way: function createBound(){ var fn = function(){console.log('this is:',this);} ,i = -1 ,ret = []; for(i = 0; i &lt; 2; i++){ ret.push( (function(i,fn){//IIFE returning a function with correct i and fn //the value of i and fn that are passed are used in the returned closure //scope is within this IIFE, not within createBound return function(){ console.log('i is:',i);//says: 0,1 fn.call({hello:'world'}); }; }(i,fn))//end of IIFE where i and fn are passed to create a new closure ); } return ret; } var bound = createBound(); bound[0](); bound[1](); [UPDATE] In your code to pass the correct closure you can do: for(var i = 0; i &lt; idempotentMethods.length - 1; i++){ scope[idempotentMethods[i]] = (function(i,idempotentMethods){ return function(){ scope.demoObject[idempotentMethods[i]](); }; }(i,idempotentMethods)); } Please note that i doesn't count to the end of idempotentMethods that is why your code executes idempotentMethods[idempotentMethods.length-1] when ng-click is triggered.
accepted answer of: http://stackoverflow.com/q/27013474

http://stackoverflow.com/comment/42622362
has text: @Mathletics thank you. I guess I thought $(this) was storing it temporarily. If I don't know how to move forward, you have topics for me to read up on? I appreciate it
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27052322

http://stackoverflow.com/comment/42530309
comment on: http://stackoverflow.com/q/26999911
has text: Just a clarification, is your issue that if I type "Joe" it filters out "Kris Pokemon" because his manager isn't "Joe"?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27039748
has answer: http://stackoverflow.com/a/27041380
has comment: http://stackoverflow.com/comment/42601163
score: 1
has comment: http://stackoverflow.com/comment/42601055
has comment: http://stackoverflow.com/comment/42599225
downvote count: 1
has title: AngularJS compile and render HTML code from file
type: Question
has body: There is the following code of my custom directive: angular.module('app.directives', []).directive('userHeader', ['authService', '$compile', function(authService, $compile) { return { restrict: 'AEC', link: function(scope, elem, attrs) { var html; if (authService.currentUser()) { html = $compile(" You successfully entered, dear {{ user.name }}! ")(scope); elem.replaceWith(html); } else { html = $compile(" You didn't enter ")(scope); elem.replaceWith(html); } return scope.user = authService.currentUser(); } }; } ]); So,as you can see, I render some HTML code using condition. But it's example, in my real application HTML code is much bigger, and I want to move HTML code from directive to template. But how can I compile HTML code from template in this case? Thanks in advance
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42600488
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/a/27061529
has comment: http://stackoverflow.com/comment/42638065
has comment: http://stackoverflow.com/comment/42637470
has body: take a look at https://developer.mozilla.org/en-US/docs/Web/API/Window.open basically if you do window.open and specify a window name it will overwrite that window with the url you provided. so if you open the page each time with same window name, it should overwrite it each time you do it again from that other page.
upvote count: 3
has comment: http://stackoverflow.com/comment/42702604
has comment: http://stackoverflow.com/comment/42637642
has comment: http://stackoverflow.com/comment/42638255
has comment: http://stackoverflow.com/comment/42638141
has comment: http://stackoverflow.com/comment/42638108
type: Answer
has comment: http://stackoverflow.com/comment/42638189
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42659924
answers question: http://stackoverflow.com/q/27061451

python
tags question: http://stackoverflow.com/q/27145014
tags question: http://stackoverflow.com/q/27102639
tags question: http://stackoverflow.com/q/27127512
tags question: http://stackoverflow.com/q/27100850
tags question: http://stackoverflow.com/q/27075049
tags question: http://stackoverflow.com/q/27136249
tag name: python
tags question: http://stackoverflow.com/q/27019247
tags question: http://stackoverflow.com/q/27135939
tags question: http://stackoverflow.com/q/27020611
tags question: http://stackoverflow.com/q/27035044
tags question: http://stackoverflow.com/q/27116955
tags question: http://stackoverflow.com/q/27019558
tags question: http://stackoverflow.com/q/27035972
tags question: http://stackoverflow.com/q/27141122
type: Tag
tags question: http://stackoverflow.com/q/27055218
tags question: http://stackoverflow.com/q/27072761
tags question: http://stackoverflow.com/q/27001063
tags question: http://stackoverflow.com/q/27105775
tags question: http://stackoverflow.com/q/27086192
tags question: http://stackoverflow.com/q/27048702
tags question: http://stackoverflow.com/q/27100825
tags question: http://stackoverflow.com/q/27013428
tags question: http://stackoverflow.com/q/27051752
tags question: http://stackoverflow.com/q/27034437

http://stackoverflow.com/q/27134110
has body: I am beginner in Angular JS and I would like to get the date in real time angular via JS. I know that I'll need to refresh, if anyone has an example. I am grateful. Code in Use: function updateTime() { scope.time = new Date(); } my html: &lt;span&gt;&lt;/span&gt; I have the date now. But want real time via refresh.
has answer: http://stackoverflow.com/a/27134177
has title: How get date time angular JS with Refresh
score: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42565169
type: QuestionComment
comment on: http://stackoverflow.com/q/27020237
score: 0
type: Comment
has text: What have you tried yourself already to achieve this? Can you show us some code?

http://stackoverflow.com/a/27063848
has comment: http://stackoverflow.com/comment/42642270
type: Answer
has body: You can use this regex: ^(\d)(?!\1+$)\d{11}$ RegEx Demo Explanation: ^ - Match line start (\d) - match first digit and capture it in back reference #1 i.e. \1 (?!..) is a negative lookahead (?!\1+$) means disallow the match if first digit is followed by same digit (captured group) till end. \d{11}$ match next 11 digit followed by line end
has comment: http://stackoverflow.com/comment/42641670
score: 13
upvote count: 13
answers question: http://stackoverflow.com/q/27063822
has comment: http://stackoverflow.com/comment/42642078
accepted answer of: http://stackoverflow.com/q/27063822
has comment: http://stackoverflow.com/comment/42642071
has comment: http://stackoverflow.com/comment/42642150
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27099423
has comment: http://stackoverflow.com/comment/42703378
tagged with: mysql
has title: how to use javascript function for fetching data at 15 minute interval?
tagged with: jsp
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42703607
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42703397
has body: I have Date_time field with yyyy-mm-dd hh:mm:ss format in my database. I had stored 8 days data in my database. Now i want data at every 15 minute. what is the solution for it? please help me. now i want this value at every 15 minute interval. What can i do??? I have no more idea about javascript n jquery. my code is: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*" %> Fetching data from the database Inv_id Inv_phase1_V Inv_phase1_A Inv_phase1_kW <% try { Class.forName("com.mysql.jdbc.Driver"); String url="jdbc:mysql://localhost:3306/solar"; String username="root"; String password="root"; Connection conn=DriverManager.getConnection(url,username,password); String query="select Inv_id,Inv_phase1_V,Inv_phase1_A,Inv_phase1_kW from inverter_detail"; Statement stmt=conn.createStatement(); ResultSet rs=stmt.executeQuery(query); while(rs.next()) { String Inverter_id = rs.getString("Inv_id"); Double voltage = rs.getDouble("Inv_phase1_V"); Double ampere = rs.getDouble("Inv_phase1_A"); Double kiloWatt = rs.getDouble("Inv_phase1_kW"); %> <%=Inverter_id%> <%=voltage%> <%=ampere%> <%=kiloWatt%> <% } %> <% rs.close(); stmt.close(); conn.close(); } catch(Exception e) { e.printStackTrace(); } %>

http://stackoverflow.com/q/27150647
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27151081
tagged with: casperjs
has comment: http://stackoverflow.com/comment/42796378
upvote count: 1
has comment: http://stackoverflow.com/comment/42796182
answer count: 1
tagged with: phantomjs
accepted answer: http://stackoverflow.com/a/27151081
has title: How can I extract an input value by id with CasperJS?
downvote count: 0
tagged with: javascript
type: Question
has body: I have a casperjs problem. I can't extract value from an id with javascript. I am opening google, searching a term, and i want to get the value from the searchbox by id. var casper = require('casper').create({ verbose: true, logLevel: "info" }); var mouse = require("mouse").create(casper); var x = require('casper').selectXPath; var webPage = require('webpage'); var page = webPage.create(); casper.userAgent('Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36') casper.start("http://www.google.com/ncr", function () { this.echo(this.getTitle()); }).viewport(1366, 768); //casper.then(function() { //this.sendKeys('#gbqfq', 'Duke'); //this.click('#gbqfsa'); //}); casper.waitForSelector(x('//*[@id="gbqfq"]'), function () { this.evaluate(function () { document.getElementById('gbqfq').value = "samearga"; this.echo(this.document.getElementById('gbqfq').value); }); console.log("\nEXISTA SELECTORUL!!! -&gt; document.getElementById('gbqfq').value\n"); }); casper.waitForSelector(x('//*[@id="gbqfq"]'), function () { this.evaluate(function () { document.forms[0].submit(); }); console.log("\nSUBMITING!!!\n"); }); casper.wait(4000, function () { console.log("\nFAC POZA\n"); casper.capture('caca.png'); }); casper.run();
type: AnsweredQuestion

http://stackoverflow.com/a/26997016
answers question: http://stackoverflow.com/q/26995962
has body: If the page is not from the same site as the script that opened it, it is correct procedure to prompt you first. In your case the DOMAIN is the same so you can set the document.domain to "example.com" in both pages and IE11 might be happier but please see this too: "Access is denied" JavaScript error when trying to access the document object of a programmatically-created (IE-only) Also if whatever with id="submit" is an actual submit button, you want to cancel the submission too by using $("form").on("submit",function(e) { e.preventDefault(); ... window.close(); });
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/26995962
upvote count: 1

http://stackoverflow.com/q/27068361
favorite count: 0
answer count: 3
score: 5
has body: I have the following code from the tutorial, except in simulation mode it isn't working.. if(creep.memory.role == 'builder') { if(creep.energy === 0) { creep.moveTo(Game.spawns.Spawn1); Game.spawns.Spawn1.transferEnergy(creep); } else { var targets = creep.room.find(Game.CONSTRUCTION_SITES); if(targets.length) { creep.moveTo(targets[0]); creep.build(targets[0]); } } } Printing the result of "targets" in the console, responds undefined. Can anyone explain how the "CONSTRUCTION_SITES" constant is working and how to find them inside the room?
accepted answer: http://stackoverflow.com/a/27068423
upvote count: 5
has answer: http://stackoverflow.com/a/27072557
downvote count: 0
tagged with: javascript
tagged with: screeps
has answer: http://stackoverflow.com/a/32601684
has answer: http://stackoverflow.com/a/27068423
type: Question
type: AnsweredQuestion
has title: Game Screeps - creep.room.find(Game.CONSTRUCTION_SITES); not working
possible better answer: http://stackoverflow.com/a/32601684

http://stackoverflow.com/a/27048655
has comment: http://stackoverflow.com/comment/42615646
upvote count: 2
type: AcceptedAnswer
has body: Your last ) has a comma instead of a ; which is causing it to throw an error, fix that and you should be golden. http://jsfiddle.net/dhershman/9no05urs/2/ Edit: Keep an eye on your console. It is your guide to all things error.
type: Answer
has comment: http://stackoverflow.com/comment/42615518
has comment: http://stackoverflow.com/comment/42615569
has comment: http://stackoverflow.com/comment/42615701
score: 2
accepted answer of: http://stackoverflow.com/q/27048603
downvote count: 0
answers question: http://stackoverflow.com/q/27048603

http://stackoverflow.com/q/27099822
tagged with: variables
favorite count: 0
has comment: http://stackoverflow.com/comment/42704074
accepted answer: http://stackoverflow.com/a/27099965
has body: [duplicate] I downloaded a demo project of pictures slides, and in it i found the variable that controls the delay between images. I want to change the variable dynamically throgh a js i wrote. So my question is: is it possible to change a value of a variable from a different script ? I'm looking for general answer, not specific to my codem therefore I'm not posting it. reserch I did for (Michael Laszlo) : searching in google - I didnt find any results relevant to me excpet one that I didnt understand. Thank you! update: I want to cahnge the var delay (function($){ flux.slider = function(elem, opts) { // Setup the flux.browser singleton to perform feature detection flux.browser.init(); if(!flux.browser.supportsTransitions) { if(window.console &amp;&amp; window.console.error) console.error("Flux Slider requires a browser that supports CSS3 transitions"); } var _this = this; this.element = $(elem); // Make a list of all available transitions this.transitions = []; for(var fx in flux.transitions) this.transitions.push(fx); this.options = $.extend({ autoplay: true, transitions: this.transitions, delay: 10000, pagination: true, controls: false, captions: false, width: null , height:null, onTransitionEnd: null }, opts); }
upvote count: 0
downvote count: 5
has answer: http://stackoverflow.com/a/27099965
type: Question
type: AnsweredQuestion
score: -5
has comment: http://stackoverflow.com/comment/42704108
has title: Changing js variable from different script
has comment: http://stackoverflow.com/comment/42704394
answer count: 1
has comment: http://stackoverflow.com/comment/42704363
tagged with: javascript

http://stackoverflow.com/comment/42711751
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27097642
has text: @Patsy the latest, 0.1.2. Yes, it is right before the closing ` ` tag & i want after the opening ` ` tag
score: 0

http://stackoverflow.com/comment/42781841
type: Comment
has text: Most print styles turn all the text black and remove a lot of formatting. You can make your own print css file, google it up.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27142444

http://stackoverflow.com/comment/42588139
type: AnswerComment
comment on: http://stackoverflow.com/a/27033308
score: 0
has text: @Goose try my updated version which holds an unnamed function. It might solve it - not sure why it would if the parseInt does not.
type: Comment

http://stackoverflow.com/comment/42751309
has text: user3201925 what is [Jsfiddle][1] ? Should be a link ?
comment on: http://stackoverflow.com/a/27125633
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27090520
score: 1
has comment: http://stackoverflow.com/comment/42689961
has comment: http://stackoverflow.com/comment/42690638
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27090463
has body: Take advantage of the fact that you can add information to your markup that guides behaviors supplied by your JavaScript code. Assuming your toggle controls are buttons: Layer 1 Layer 2 Layer 3 edit — or with your actual markup: You now can write one simple handler for all of them: $("body").on("click", ".toggleLayer", function() { var targetId = $(this).data("target"); $("#" + targetId).fadeIn("fast"); }); Similarly, one handler can do the work to close all the layers: $("body").on("click", ".Floating", function() { $(this).fadeOut("fast"); }); If you use event delegation as in these examples, you don't have to put the code in a "ready" handler.
has comment: http://stackoverflow.com/comment/42688608
accepted answer of: http://stackoverflow.com/q/27090463
has comment: http://stackoverflow.com/comment/42690856
type: Answer
has comment: http://stackoverflow.com/comment/42691150
has comment: http://stackoverflow.com/comment/42689363
has comment: http://stackoverflow.com/comment/42690340
downvote count: 0

http://stackoverflow.com/comment/42715505
has text: Thanks for this - wouldnt I need to wrap this in / /g to cover all instances of thousand separators ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27105998
type: Comment

http://stackoverflow.com/q/27016810
has comment: http://stackoverflow.com/comment/42558988
has answer: http://stackoverflow.com/a/27021938
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27016927
tagged with: jquery-validate
score: 0
has title: prevent validaton onfocusout depending of the radio button
has body: I'm having problem to validate the form below. The main issue is that I have to use the "onfocusout" function to validate the inputs. The name input has be required depending of the radio selection. When the "value3" is selected, the focus is set to the input. While on the input, if the user tries to change the radio button, the onfocusout is triggered before the radio value is changed, and in that case the error is shown while it should not Any suggestion? &lt;form id="myform"&gt; &lt;input type="radio" name="radio" value="value1" /&gt; value1 &lt;input type="radio" name="radio" value="value2" /&gt; value2 &lt;input type="radio" name="radio" value="value3" /&gt; value3 &lt;input type="text" name="name" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; The js code is: $("#myform").validate({ rules: { name: { required: { depends: function () { return $("input[name='radio']:checked").val() == "value3"; } } } }, messages: { name: { required: "You must enter name" } }, onfocusout: function (element) { this.element(element); }, submitHandler: function (form) { alert('success'); return false; } }); $("input[name='radio']").change(function () { var value = $(this).val(); if (value == "value3") $("input[name='name']").focus(); else $("input[name='name']").valid(); }); JSFiddle: http://jsfiddle.net/954ros6L/
accepted answer: http://stackoverflow.com/a/27021938
has comment: http://stackoverflow.com/comment/42559702
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27016927
has comment: http://stackoverflow.com/comment/42559203
answer count: 2

http://stackoverflow.com/comment/42555477
has text: You mean the body.onload? It will not work unless you have a tag as I mentioned
type: AnswerComment
comment on: http://stackoverflow.com/a/27014597
score: 0
type: Comment

http://stackoverflow.com/comment/42662128
comment on: http://stackoverflow.com/a/27055119
type: AnswerComment
has text: Oh, excellent! I hadn't even noticed that 'value' was on the end of those. I removed that and they worked fine. Thanks a million!
score: 1
type: Comment

cookies
tags question: http://stackoverflow.com/q/27005844
tags question: http://stackoverflow.com/q/27087669
tags question: http://stackoverflow.com/q/27116138
tags question: http://stackoverflow.com/q/26994253
type: Tag
tags question: http://stackoverflow.com/q/27090622
tags question: http://stackoverflow.com/q/27017791
tags question: http://stackoverflow.com/q/27094066
tags question: http://stackoverflow.com/q/27068480
tags question: http://stackoverflow.com/q/27108831
tags question: http://stackoverflow.com/q/27039785
tag name: cookies
tags question: http://stackoverflow.com/q/26995958
tags question: http://stackoverflow.com/q/27093936
tags question: http://stackoverflow.com/q/27137562
tags question: http://stackoverflow.com/q/27123881
tags question: http://stackoverflow.com/q/27030913
tags question: http://stackoverflow.com/q/27046363
tags question: http://stackoverflow.com/q/27062526
tags question: http://stackoverflow.com/q/26993251
tags question: http://stackoverflow.com/q/27143240

http://stackoverflow.com/a/27149425
has comment: http://stackoverflow.com/comment/42793807
has comment: http://stackoverflow.com/comment/42793620
score: 0
has body: Try replacing your editor like this: CKEDITOR.replace( 'chiefComplaint', { removePlugins: "tabletools,contextmenu" }); If that works, then you need to change your config to match that and the problem might be with loading the configuration file. Hopefully this is enough! If not, I'll edit or delete this answer :)
answers question: http://stackoverflow.com/q/27123782
type: Answer

http://stackoverflow.com/a/27006533
has body: Update @Ryan called me to task for recommending eval – for good reason. I don't agree that eval is always evil, and I do think it's appropriate to use in this situation, because input is limited to button presses. But I should have pointed out that eval should always be used with caution. See Calculate string value in javascript, not using eval to see other arguments in favor of using eval for this type of problem. But a wonderful alternative was presented by @yckart, so here's my new recommendation. Change the compute function to this: function compute () { answer.innerHTML = new Function('return ' + answer.innerHTML)(); } You can then remove all the logic that does the calculations. (Otherwise, you'd need to write a recursive descent parser, which is a major task.) To answer your question, "Does it work with things like square roots and squares?": eval and the Function method will work with any valid JavaScript expression: Math.sqrt(number) returns the square root of a number. Math.pow(number, 2) squares a number. Snippet function putToScreen (x) { var node = document.createTextNode(x); answer.appendChild(node); } function clearScreen() { answer.innerHTML = ''; } function compute () { answer.innerHTML = new Function('return ' + answer.innerHTML)(); } button { width: 2em; } 1 2 3 + 4 5 6 - 7 8 9 * C 0 = /
has comment: http://stackoverflow.com/comment/42542118
answers question: http://stackoverflow.com/q/27005875
has comment: http://stackoverflow.com/comment/42542325
has comment: http://stackoverflow.com/comment/42574635
has comment: http://stackoverflow.com/comment/42542157
has comment: http://stackoverflow.com/comment/42545461
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42542114
has comment: http://stackoverflow.com/comment/42573989
score: 1
has comment: http://stackoverflow.com/comment/42543236
has comment: http://stackoverflow.com/comment/42542779
has comment: http://stackoverflow.com/comment/42542877
has comment: http://stackoverflow.com/comment/42609547
has comment: http://stackoverflow.com/comment/42542397
accepted answer of: http://stackoverflow.com/q/27005875
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27052373
score: 0
answers question: http://stackoverflow.com/q/27051669
has body: I suspect that your StatusController isn't active when the login is performed by the RegistrationController. By any chance, is StatusController the controller for the /meetings route? If that's the case, your controller is just "too late" to hear the event being emitted.
type: Answer
has comment: http://stackoverflow.com/comment/42622047

http://stackoverflow.com/a/27151012
type: Answer
has body: That would be event delegation. When the page loads, the element does not exist; event delegation provides a way of attaching event handlers to present and future elements: $(document).on('change', '.upper_level_id', function(){ alert('upper_level_id changed'); }); See: jQuery.live() | jQuery API Documentation $( selector ).live( events, data, handler ); // jQuery 1.3+ $( document ).delegate( selector, events, data, handler ); // jQuery 1.4.3+ $( document ).on( events, selector, data, handler ); // jQuery 1.7+
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27150833
upvote count: 2

http://stackoverflow.com/comment/42741298
comment on: http://stackoverflow.com/q/27119731
score: 0
type: Comment
type: QuestionComment
has text: when using angular, normally you do not create elements in javascript at all. angular does this. I am not sure if this is helpful...

http://stackoverflow.com/a/27013406
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27013363
has comment: http://stackoverflow.com/comment/42553015
has body: If you are already using jquery, why not just do $('#formwrap #button').val('New Button Text'); ? It's simply CSS-like selector, similar to what you'd use in querySelectorAll(). It will match for example this button: &lt;div id="formwrap"&gt;&lt;input type="button" id="button"&gt;&lt;/div&gt; But keep in mind that only one element can have the same ID. Maybe you wanted class? Then you'd use .button instead of #button.
has comment: http://stackoverflow.com/comment/42555494
type: AcceptedAnswer
type: Answer
score: 2
upvote count: 3
answers question: http://stackoverflow.com/q/27013363

http://stackoverflow.com/comment/42572627
comment on: http://stackoverflow.com/q/27021579
score: 0
type: Comment
type: QuestionComment
has text: Why do you want to use `lodash` here? @Jordan' solution is good but on every iteration a new object is created. It's not so good from performance point of view. I would recommend to use simple `for` loop for such trivial task.

http://stackoverflow.com/a/27078176
answers question: http://stackoverflow.com/q/27076474
score: 0
type: Answer
has body: I think the problem comes after submitting the form: There is a part: &lt;?php if (isset($_POST['save'])) { // do something } ?&gt; This is not executed because I dont click on the submit button 'save' in the form.

http://stackoverflow.com/q/27151187
has body: Please help by taking StockChart. Pinning three .json files as in the example , But does not work. The code is below: www.jsfiddle.net/d8xwjxg7/2
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27151515
downvote count: 1
type: Question
tagged with: highcharts
has comment: http://stackoverflow.com/comment/42797578
tagged with: javascript
score: -1
answer count: 1
has comment: http://stackoverflow.com/comment/42797691
has comment: http://stackoverflow.com/comment/42797546
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42797418
has title: Three .json files 'StockChart' - highcharts
upvote count: 0

http://stackoverflow.com/comment/42662861
type: Comment
comment on: http://stackoverflow.com/a/27075851
score: 0
type: AnswerComment
has text: I updated your code but not working! check this http://jsfiddle.net/Manivasagam/72cr4bvk/9/

http://stackoverflow.com/comment/42521136
type: QuestionComment
has text: Sorry, I was just trying to embed the code. It wasn't intended to be run. If you visit the site, you can see the error in the console.log
comment on: http://stackoverflow.com/q/26994630
score: 0
type: Comment

http://stackoverflow.com/q/27084036
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27496230
has comment: http://stackoverflow.com/comment/42698497
has comment: http://stackoverflow.com/comment/42698555
has comment: http://stackoverflow.com/comment/42677173
has title: How can I reliably detect the browser without using window.navigator?
has comment: http://stackoverflow.com/comment/42677241
has comment: http://stackoverflow.com/comment/42681266
linked to: http://stackoverflow.com/q/220231
has comment: http://stackoverflow.com/comment/42677239
has comment: http://stackoverflow.com/comment/42677227
tagged with: user-agent
linked to: http://stackoverflow.com/q/24708649
has comment: http://stackoverflow.com/comment/42698657
tagged with: cross-browser
favorite count: 0
linked to: http://stackoverflow.com/q/12625876
linked to: http://stackoverflow.com/q/2400935
has answer: http://stackoverflow.com/a/27496381
downvote count: 2
has comment: http://stackoverflow.com/comment/43424557
has comment: http://stackoverflow.com/comment/42677209
has comment: http://stackoverflow.com/comment/42680367
upvote count: 23
possible better answer: http://stackoverflow.com/a/27496381
has answer: http://stackoverflow.com/a/27496230
has comment: http://stackoverflow.com/comment/42698584
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42698621
score: 21
has comment: http://stackoverflow.com/comment/42677191
type: Question
linked to: http://stackoverflow.com/q/19999388
has comment: http://stackoverflow.com/comment/43448078
answer count: 2
has comment: http://stackoverflow.com/comment/42698546
has comment: http://stackoverflow.com/comment/43424875
linked to: http://stackoverflow.com/q/27081858
linked to: http://stackoverflow.com/q/2324944
has body: I know there are a thousand questions on Stack Overflow about detecting the browser with JavaScript. My question is how can you detect the browser without window.navigator (which includes navigator.userAgent)? First, to clarify, I don't need to know the rendering engine, this isn't for adaptive layout, and don't panic: I'm already doing feature detection. If why I'm asking about detecting the browser is important, please comment and I'll be happy to splice in the explanation, but it will probably make the question egregiously long. Next, let me describe why my question is not a duplicate of: Browser detection in Javascript? because of 19 answers, 12 of them use navigator.userAgent specifically (including jQuery.browser which used userAgent, and is now gone anyway), 4 use navigator.appName (which gives "Netscape" in Chrome...), 1 side-steps the question by recommending feature detection, which is different from browser detection (I am already using feature detection, but to know the extent to which I can use them, I need browser detection), and 2 aren't really answers or are IE-specific. (Although this non-answer is actually very explanatory about why my question here is relevant: I'm trying to avoid hitting pain points on certain browsers that would crash the tab!) Since my question is asking for an answer (even a hack?) without using window.navigator, it is not a duplicate of that question. Check if the user is using IE because of 11 answers, 10 use navigator.userAgent and 1 of them uses an IE trick to detect IE only, which is not sufficient to answer my question (though it may be potentially be a small part of a helpful solution posted here)? In Javascript, how do I determine if my current browser is Firefox on a computer vs everything else? because of 11 answers, 8 use navigator.userAgent, 2 recommend feature detection (again, not my question), and 1 isn't even an answer, really. How to detect chrome and safari browser (webkit) because of 8 answers, 6 of them use…

http://stackoverflow.com/comment/42603310
score: 0
comment on: http://stackoverflow.com/q/27041936
type: QuestionComment
type: Comment
has text: @torazaburo As per my knowledge, I have to add "use strict"; in the file or in the function or in the console to opt into strict mode. But here in this code, they are not mentioned it is running in strict mode.

http://stackoverflow.com/q/27084840
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42691690
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27085720
has body: In my drawing app I can only have certain colors that I have put in but I want to have a color picker like this one, I have already tried to just add loads of colors but it gets too much and overlaps my toolbar. Here is my jsfiddle. Please relate to my code so it will definitely work.
tagged with: http://stackoverflow.com/tag/html
has title: how to add a color selector to my drawing app
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27085720

asp.net-mvc
tags question: http://stackoverflow.com/q/27005167
tags question: http://stackoverflow.com/q/27147940
tags question: http://stackoverflow.com/q/27060393
tags question: http://stackoverflow.com/q/27045430
tags question: http://stackoverflow.com/q/27099655
tags question: http://stackoverflow.com/q/27137888
tags question: http://stackoverflow.com/q/27136615
tags question: http://stackoverflow.com/q/27019745
tags question: http://stackoverflow.com/q/27113458
tags question: http://stackoverflow.com/q/27099506
tags question: http://stackoverflow.com/q/27036393
tags question: http://stackoverflow.com/q/27114366
tags question: http://stackoverflow.com/q/27105920
tags question: http://stackoverflow.com/q/27019727
tags question: http://stackoverflow.com/q/27127220
tags question: http://stackoverflow.com/q/27104884
tags question: http://stackoverflow.com/q/27101808
tags question: http://stackoverflow.com/q/27007694
tags question: http://stackoverflow.com/q/27086307
tags question: http://stackoverflow.com/q/27141117
tags question: http://stackoverflow.com/q/27063005
tags question: http://stackoverflow.com/q/27046363
tags question: http://stackoverflow.com/q/27013320
tags question: http://stackoverflow.com/q/27004064
tags question: http://stackoverflow.com/q/27107810
tags question: http://stackoverflow.com/q/27108082
tags question: http://stackoverflow.com/q/27121171
tags question: http://stackoverflow.com/q/27144064
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/27041348
tags question: http://stackoverflow.com/q/27102861
tags question: http://stackoverflow.com/q/27141157
tags question: http://stackoverflow.com/q/27090915
tags question: http://stackoverflow.com/q/27081190
tags question: http://stackoverflow.com/q/26992650
tags question: http://stackoverflow.com/q/27107494
tags question: http://stackoverflow.com/q/27044910
tags question: http://stackoverflow.com/q/27124972
tags question: http://stackoverflow.com/q/27041850
tags question: http://stackoverflow.com/q/27043844
tags question: http://stackoverflow.com/q/27108991
tags question: http://stackoverflow.com/q/27120248
tags question: http://stackoverflow.com/q/27041145
tags question: http://stackoverflow.com/q/27047264
type: Tag
tags question: http://stackoverflow.com/q/27018555
tags question: http://stackoverflow.com/q/27064371
tags question: http://stackoverflow.com/q/27140887
tags question: http://stackoverflow.com/q/27034784
tags question: http://stackoverflow.com/q/27125210
tags question: http://stackoverflow.com/q/27033000
tags question: http://stackoverflow.com/q/27059532

http://stackoverflow.com/q/27007652
tagged with: sencha-touch
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42630005
has body: I'm trying to speed up my application using the all classes method described here. I was updating my index.html with the following code: Twitter Building that wouln't work. The error is: [INF] Writing content to C:\Spree Github Repository\Phone\Sencha Touch\testapp/c ordova/www/index.html [ERR] [ERR] BUILD FAILED [ERR] java.lang.NullPointerException [ERR] at sun.reflect.DelegatingMethodAccesso [ERR] rImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERR] [ERR] Total time: 7 seconds [ERR] The following error occurred while executing this line: C:\Spree Github Repository\Phone\Sencha Touch\testapp.sencha\app\build-impl.xml :396: The following error occurred while executing this line: C:\Spree Github Repository\Phone\Sencha Touch\testapp.sencha\app\page-impl.xml: 235: The following error occurred while executing this line: C:\Spree Github Repository\Phone\Sencha Touch\testapp.sencha\app\page-impl.xml: 154: The following error occurred while executing this line: C:\Spree Github Repository\Phone\Sencha Touch\testapp.sencha\app\page-impl.xml: 17: The following error occurred while executing this line: C:\Spree Github Repository\Phone\Sencha Touch\testapp.sencha\app\page-impl.xml: 18: java.lang.NullPointerException The index.html that is working looks like this: TestApp The question is: Why is my project failing to build? I was following all the steps provided in the tutorial, but it wouldn't work. Thanks in advance!
has comment: http://stackoverflow.com/comment/42663297
has comment: http://stackoverflow.com/comment/42588986
tagged with: sencha-cmd
has title: Sencha Touch build application with all-classes
type: Question
has comment: http://stackoverflow.com/comment/42618851
tagged with: javascript
tagged with: extjs
tagged with: android

http://stackoverflow.com/comment/42744719
score: 0
type: AnswerComment
type: Comment
has text: try to temporarily remove all forms. Keep only one
comment on: http://stackoverflow.com/a/27121501

http://stackoverflow.com/a/27067348
answers question: http://stackoverflow.com/q/27065659
upvote count: 10
has comment: http://stackoverflow.com/comment/65825998
score: 10
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27065659
type: Answer
has comment: http://stackoverflow.com/comment/97341449
has body: "IE11 uses Quirks Mode emulation if the top-level page is not in Edge Mode." - MSDN In this mode, arrays don't support the forEach method. Use a simple for loop instead, or write this right after the title tag of the parent: &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;

http://stackoverflow.com/comment/42643228
type: QuestionComment
has text: Are you using jQuery?
comment on: http://stackoverflow.com/q/27064739
score: 0
type: Comment

http://stackoverflow.com/a/27002568
upvote count: 1
has comment: http://stackoverflow.com/comment/42534917
accepted answer of: http://stackoverflow.com/q/27002466
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27002466
type: Answer
has body: You have to include require.js file first, meanwhile you can specify data-main to be your main file. Include the scripts in your html like this: See patterns for seperating config from main module, for more details.
score: 1

http://stackoverflow.com/q/27018806
tagged with: url
has comment: http://stackoverflow.com/comment/42562428
has comment: http://stackoverflow.com/comment/42562591
has body: I'm trying to add links to the images in my JS array so that, when clicked, they direct you to a info page. I tried to use the following code but the images won't show. var WorkArray = new Array(['work/01.png',"http://www.stackoverflow.com"], ['work/02.png',"http://www.stackoverflow.com"], ['work/03.png',"http://www.stackoverflow.com"], ['work/04.png',"http://www.stackoverflow.com"]); If I remove the links the images do show. I'm using a variation of this code: http://bouncingdvdlogo.com/ Here is my full code: var width = 400; var height = 400; var swoosh = 4; var stopafter=0; //set time in seconds before image disappears. Use 0 for never var maxswoosh = 50; var xMax; var yMax; var xPos = 0; var yPos = 0; var xDir = 'right'; var yDir = 'down'; var screenSavouring = true; var tempswoosh; var newXDir; var newYDir; function setupShit() { if (document.all) { xMax = document.body.clientWidth yMax = document.body.clientHeight document.all("work").style.visibility = "visible"; } else if (document.layers||document.getElementById) { xMax = window.innerWidth-0; yMax = window.innerHeight; if (document.getElementById) document.getElementById("work").style.visibility="visible" else document.layers["work"].visibility = "show"; } setTimeout('moveIt()',500); } function moveIt() { if (screenSavouring == true) { calculatePosition(); if (document.all) { document.all("work").style.left = xPos + document.body.scrollLeft; document.all("work").style.top = yPos + document.body.scrollTop; } else if (document.layers) { document.layers["work"].left = xPos + pageXOffset; document.layers["work"].top = yPos + pageYOffset; } else if (document.getElementById) { document.getElementById("work").style.left = xPos + pageXOffset; document.getElementById("work").style.top = yPos + pageYOffset; } doit=setTimeout('moveIt()',30); } } function calculatePosition() { if (xDir == "right") { if (xPos &gt; (xMax - width - swoosh)) { xDir = "left"; cC(); } } else if (xDir == "left") { if (xPos &lt; (0 + swoosh)) …
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42562551
score: 0
has comment: http://stackoverflow.com/comment/42562497
has title: Add links to images in array
type: Question
has answer: http://stackoverflow.com/a/27019054
tagged with: hyperlink
tagged with: javascript
tagged with: image
answer count: 1
tagged with: arrays

http://stackoverflow.com/q/27061544
tagged with: javascript
answer count: 3
upvote count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42637637
has title: Javascript appendChild callback?
score: 1
has body: I need to add an HTML5 video to a page with the following code: document.querySelector("#mydiv").appendChild(video); console.debug(document.querySelector("video").clientWidth); My problem is, the second line returns 0 because it takes a while for the video tag to load the video it's going to play. If I manually type the second line in the console once the page is loaded, I get the actual value. Is there a better way to get this value than using timeouts to periodically check if the value's been updated?
has answer: http://stackoverflow.com/a/38074124
has comment: http://stackoverflow.com/comment/42637526
type: Question
has answer: http://stackoverflow.com/a/27061617
has answer: http://stackoverflow.com/a/60224318

http://stackoverflow.com/comment/42536574
comment on: http://stackoverflow.com/q/27003357
has text: I tried returning `true` but is not working neither. No, there's no error message if it's not inside a `setTimeout`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42645086
score: 0
type: AnswerComment
has text: You can package NW as a single executable if that helps. It might not though if you are talking about enterprise managed desktops.
type: Comment
comment on: http://stackoverflow.com/a/27065326

http://stackoverflow.com/a/27011994
has comment: http://stackoverflow.com/comment/42552652
score: 0
has comment: http://stackoverflow.com/comment/42550961
has comment: http://stackoverflow.com/comment/42551068
type: Answer
has comment: http://stackoverflow.com/comment/42551292
has comment: http://stackoverflow.com/comment/42551113
has body: Another way: $('li.mega-menu-megamenu a').on({ 'mouseenter':function(){ $("&lt;div class='remove'&gt;&lt;hr /&gt;&lt;/div&gt;").insertAfter("#mega-menu-primary-2 li:last-child"); },'mouseleave':function(){ $(".remove").remove(); } });
answers question: http://stackoverflow.com/q/27011877
has comment: http://stackoverflow.com/comment/42551002
has comment: http://stackoverflow.com/comment/42552481

http://stackoverflow.com/a/27047681
score: 5
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/27047605
has comment: http://stackoverflow.com/comment/42613414
type: Answer
has body: Change $(form).submit(); to form.submit(); When you call submit on a jQuery object, it calls your submit handler again. Calling it directly on the DOM element does not. Example (interestingly, Stack Snippets won't let me submit a form, not even with target="_blank"): var nesting = 0; function submitHandler(form) { var which = $(form).find("input[type=radio]:checked").val(); ++nesting; if (nesting > 5) { snippet.log("Nested to 5, gave up"); } else { if (which === "jQuery") { snippet.log("Calling via jQuery, nesting = " + nesting); $(form).submit(); } else { snippet.log("Calling via DOM, nesting = " + nesting); form.submit(); } } --nesting; return false; } Submit with jQuery Submit with DOM Submit

http://stackoverflow.com/q/27050901
answer count: 3
has answer: http://stackoverflow.com/a/27051065
has comment: http://stackoverflow.com/comment/42619540
has body: Here is a callback (slightly modified/simplified for the purposes of this question) I have written to process some object data. function (err, data) { var rv; if (data &amp;&amp; data.result instanceof Array) { rv = data.result.map(function (value) { if (value &amp;&amp; value.track_contributions instanceof Array) { return value.track_contributions.map(function (innerValue) { if (innerValue &amp;&amp; innerValue.track) { return innerValue.track.mid; } }); } }); // flatten nested arrays rv = [].concat.apply([], rv); } console.log(rv); }; Here's what the object that I'm processing looks like: { "result": [ { "type": "/music/artist", "track_contributions": [ { "track": { "mid": "/m/015rm3l" } }, { "track": { "mid": "/m/0nm2km" } }, { "track": { "mid": "/m/010ksbq" } }, ... ] } ] } And I want a return value from my callback that looks like this: [ '/m/015rm3l', '/m/0nm2km', '/m/010ksbq', ... ] My code works just fine, but I feel like all that nesting is a code smell. How should I go about making this type of code flatter, more readable and maintainable, and all that great stuff? Promises? Some lodash type utility? Something else? All of the above?
favorite count: 0
has title: Flattening nested callback
upvote count: 2
tagged with: node.js
score: 2
accepted answer: http://stackoverflow.com/a/27051065
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42619639
type: Question
has answer: http://stackoverflow.com/a/27051226
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/27051619
tagged with: javascript
tagged with: callback
possible better answer: http://stackoverflow.com/a/27051226

http://stackoverflow.com/q/27096252
downvote count: 0
tagged with: nvd3.js
tagged with: d3.js
type: UnansweredQuestion
type: Question
score: 3
linked to: http://stackoverflow.com/q/30039550
has body: I have a Simple Line Chart in NVD3 like this one http://nvd3.org/examples/line.html I would like to highlight (overlapping a circle for example) one particular point (a given x) on my serie. I haven't found something similar to the Highcharts addPoint() in NVD3, example: http://api.highcharts.com/highcharts#Series Moving the tooltip programmatically could work as well. Thanks in advance!
tagged with: javascript
favorite count: 0
upvote count: 3
has title: How to highlight a point on a Simple Line Chart in NVD3?
answer count: 0

http://stackoverflow.com/comment/42783302
type: Comment
comment on: http://stackoverflow.com/a/27143340
has text: the problem is, I don't want the function to run onload. It's an ajax function, so I only want it to be run when someone clicks a button
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42559648
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27016898
has text: no javascript or css can do that?
score: 0

http://stackoverflow.com/q/27084486
tagged with: javascript
has body: I'm just starting to write my own plugin but I'm having a bit of difficulty in storing jQuery objects as instance variables. By this I mean, for example, in the following code: $.widget("ns.slider", { options: { "selector": "li", "selected": 0, "delay": 1000 }, _create: function() { var slider= this; this.element.addClass("slider"); this.container = $("&lt;div class=\"slider-container\"&gt;&lt;/div&gt;"); this.container.height($(this.element).height()); $(this.element).wrap(this.container).css({ "position": "absolute", "top": 0, "left": 0, "right": 0 }); this.container.css({"position": "relative", "overflow": "hidden", "backgroundColor": "#CCC"}); // Problem line this.container.remove(); // Also problem line } } The two lines I have marked as problem lines don't appear to execute - or rather they do, but the changes are not visible on the page. I'd expect to see the background colour to go grey on the first line and to disappear completely on the second. It seems like the wrap function actually duplicates the element and the duplicated element maintains the old properties when changes are made to the original. Yet I'm sure I've used this before, years ago, and it worked fine. I'm using jQuery 1.8.3 with jQuery UI 1.10.4. Before anyone says it, I know there is already a jQuery UI slider - I had to rename the plugin for the purpose of this question for confidentiality reasons. What am I doing wrong here? Please let me know if there is any additional information I should supply. Thanks in advance.
answer count: 1
downvote count: 0
has title: jQuery UI Widgets - storing jQuery objects in instance variables
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42677997
has answer: http://stackoverflow.com/a/27084695
accepted answer: http://stackoverflow.com/a/27084695
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42677968
type: Question
type: AnsweredQuestion
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/42678035

http://stackoverflow.com/q/27140625
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27140898
has body: I don't get operation process of the below statement. var x = x || {}; I think that what it does is IF x exists, assign it to var x, if not assign null. "undefined || null?" why do we need the later " || null " part? A link to lessons or little help would be grrreat!
has comment: http://stackoverflow.com/comment/42778834
has title: How to infer "config.headers = config.headers || {};"
has comment: http://stackoverflow.com/comment/42778860
downvote count: 1
has comment: http://stackoverflow.com/comment/42779274
type: Question
possible better answer: http://stackoverflow.com/a/27140898
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42778968
has answer: http://stackoverflow.com/a/27141954
accepted answer: http://stackoverflow.com/a/27141954
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/6439579
upvote count: 1
has comment: http://stackoverflow.com/comment/42778963

http://stackoverflow.com/a/27123723
upvote count: 13
score: 13
has body: The code sandwiched between the opening and closing tags here will only affect Microsoft Outlook 9 or later clients. Note that because it says mso rather than IE, it does not affect Internet Explorer. A quick breakdown of Outlook versions: Outlook 2000 - Version 9 Outlook 2002 - Version 10 Outlook 2003 - Version 11 Outlook 2007 - Version 12 Outlook 2010 - Version 14 Outlook 2013 - Version 15 For a more detailed explanation, you can see this helpful page from Mailchimp
accepted answer of: http://stackoverflow.com/q/27123669
answers question: http://stackoverflow.com/q/27123669
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42572299
comment on: http://stackoverflow.com/q/27024089
has text: @OP That is why I recommended `sizzle`, but then you don't need it if it is small project with limited use. Check out `document.querySelector` and `document.querySelectorAll` for easy selection.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27000262
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/42530832
tagged with: modal-dialog
answer count: 1
tagged with: javascript
tagged with: jquery
has title: How can I pass PHP into Javascript in a Framework7 modal?
score: 0
has answer: http://stackoverflow.com/a/27000868
linked to: http://stackoverflow.com/q/7165395
type: UnansweredQuestion
has body: I'm making a company phone directory and I'm having a hard time passing the user's phone number into the modal to make it so they can call or text using tel: and mms:. This is what I have and it's definitely not working. php <?php $result2 = mysql_query("SELECT * FROM users WHERE terminationDate = '0000-00-00' ORDER BY `firstName`") or die("Query 2 Failed: $result2"); while ($row2 = mysql_fetch_array($result2)) { echo " ".$row2['firstName']." ".$row2['lastName']." "; } ?> js $$('.open-3-modal').on('click', function () { myApp.modal({ title: 'Call or Text', text: '', buttons: [ { text: '<?php $result2 = mysql_query("SELECT * FROM users WHERE terminationDate = '0000-00-00' AND cellPhone = '".$_GET['cellPhone']."'") or die("Query 2 Failed: $result2"); while ($row2 = mysql_fetch_array($result2)) { echo 'Call'; } ?>', }, { text: 'Text', }, { text: 'Cancel', bold: true, close: function() { myApp.alert('Canceled') } }, ] }) }); I'm pretty rusty with JS as you can probably tell. What's the best method of passing the information over to jQuery?

http://stackoverflow.com/q/27001080
tagged with: javascript
score: 0
answer count: 1
tagged with: dom-events
has title: Triggering an event in C3.js
tagged with: click
tagged with: c3.js
type: UnansweredQuestion
has body: I am using C3.js framework to create a chart. Please have a look at http://jsfiddle.net/Banzay/w1narm4u/3/ where if you click on the 'dataOne' link the blue line will disappear from the chart. What I want to achieve is when any of the 'click me' elements is clicked I want the 'dataOne' click event to be triggered (so the blue line will be hidden). I have tried: $('.clickme').click(function () { $('.c3-legend-item-event').trigger('click'); })
has answer: http://stackoverflow.com/a/27076579
tagged with: triggers
type: Question

http://stackoverflow.com/comment/42531936
type: QuestionComment
comment on: http://stackoverflow.com/q/27000840
has text: @MarcB that is not good, looking into this. Would you suggesting escaping name parameter?
score: 0
type: Comment

http://stackoverflow.com/a/27143070
score: 0
has body: You need to declare $scope.graph variable at first, before you can pass data to $scope.graph.posts. $scope.graph = {}; $scope.graph.posts = data; Working example - JSFiddle http://jsfiddle.net/RkykR/294/ HTML Ng-Repeat example time postID likes {{item.time}} {{item.postId}} {{item.likes}} JavaScript var data = [ { "time": "1340", "postId": "282301", "likes": "2" }, { "time": "1300", "postId": "285643", "likes": "0" } ]; function MyCtrl($scope) { $scope.graph = {}; $scope.graph.posts = data; } CSS table { padding:5px; width:500px; } table td { border: 1px solid gray; padding:3px 0; text-align:center; } table thead td { font-weight:bold; }
has comment: http://stackoverflow.com/comment/42784387
type: Answer
answers question: http://stackoverflow.com/q/27142413

http://stackoverflow.com/a/27104129
score: 1
has comment: http://stackoverflow.com/comment/42715869
upvote count: 1
has comment: http://stackoverflow.com/comment/42715273
has comment: http://stackoverflow.com/comment/42722820
has body: The question should not be 'Is it better to use nested ifs or use guards' but 'When is it better to use nested ifs and when guards'! There are pro's and con's in both ways. Using ifs promotes single point of exit but can become difficult to read when nesting is deep. Guards reduce nesting and easier to read but create multiple points of exit. it does not matter which you chose as long as your functions are short!
type: Answer
answers question: http://stackoverflow.com/q/27103375
downvote count: 0

http://stackoverflow.com/a/27137963
has comment: http://stackoverflow.com/comment/42773949
type: Answer
downvote count: 1
upvote count: 0
has body: The splice method returns an array, so you would have to return arr.splice(index, 1) and reassign DobArr to removeByIndex(DobArr, i).
score: -1
answers question: http://stackoverflow.com/q/27137919

http://stackoverflow.com/comment/42678165
type: QuestionComment
comment on: http://stackoverflow.com/q/27084516
score: 0
has text: What kind kind of computers are having issues? Are you noticing that it's a problem in particular browsers or OS'es?
type: Comment

http://stackoverflow.com/q/27086192
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6025082
has comment: http://stackoverflow.com/comment/42681008
linked to: http://stackoverflow.com/q/8183682
type: Question
has title: Python Get on a website and running $(document).ready(function()
accepted answer: http://stackoverflow.com/a/27086855
downvote count: 0
has comment: http://stackoverflow.com/comment/42680926
tagged with: javascript
has body: I am doing some testing on my site, and I have a python program which does gets on few different pages. Some of these pages have $(document).ready(function(). I noticed that when I do get through python, I get the code, but for example $(document).ready(function() doesn't run. How can I run the $(document).ready(function() of the site I am doing a GET on? Thank you for help.
linked to: http://stackoverflow.com/q/2190502
answer count: 1
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/42680968
linked to: http://stackoverflow.com/q/20622870
has answer: http://stackoverflow.com/a/27086855
tagged with: python
has comment: http://stackoverflow.com/comment/42680936
score: 2

http://stackoverflow.com/comment/42768299
has text: It's probably falling through to `.src = a[0];` but I'd have to see the actual code. Can you perhaps create a snippet that produces that behavior?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27134568

http://stackoverflow.com/q/27065824
score: 5
has answer: http://stackoverflow.com/a/60124380
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/66894528
has comment: http://stackoverflow.com/comment/42645155
possible better answer: http://stackoverflow.com/a/27066000
downvote count: 2
has answer: http://stackoverflow.com/a/27066000
has answer: http://stackoverflow.com/a/68808914
upvote count: 7
has title: Implementing merge sort in Javascript
type: Question
has comment: http://stackoverflow.com/comment/42645051
has answer: http://stackoverflow.com/a/27065970
has comment: http://stackoverflow.com/comment/42645063
has comment: http://stackoverflow.com/comment/47051117
tagged with: javascript
has answer: http://stackoverflow.com/a/42724363
has answer: http://stackoverflow.com/a/69876671
has comment: http://stackoverflow.com/comment/42645196
answer count: 7
accepted answer: http://stackoverflow.com/a/27065970
has body: So I'm working on Khan Academy's Algorithms course, and am trying to implement a recursive merge sort in Javascript. Here is my code so far: var mergeSort = function(array, p, r) { if(r&gt;p) { var q = floor(r/2); mergeSort(array, p, q); mergeSort(array, q+1, r); merge(array, p, q, r); } }; merge is a function provided by Khan Academy to merge the subarrays back together. It is giving me the error: 'Uncaught RangeError: Maximum call stack size exceeded'. EDIT: More details: I am fairly sure the error is in my code, there code is purposefully obfuscated and unreadable because the user needs to implement it themselves in a later challenge. Here is the code that actually calls the mergeSort function initially and declares the array: var array = [14, 7, 3, 12, 9, 11, 6, 2]; mergeSort(array, 0, array.length-1); println("Array after sorting: " + array); Program.assertEqual(array, [2, 3, 6, 7, 9, 11, 12, 14]); And here is the code for the merge function, although it is obfuscared as I mentioned above: var merge = function(array, p, q, r) { var a = [], b = [], c = p, d, e; for (d = 0; c &lt;= q; d++, c++) { a[d] = array[c]; } for (e = 0; c &lt;= r; e++, c++) { b[e] = array[c]; } c = p; for (e = d = 0; d &lt; a.length &amp;&amp; e &lt; b.length;) { if (a[d] &lt; b[e]) { array[c] = a[d]; d++; } else { array[c] = b[e]; e++; } c++; } for (; d &lt; a.length;) { array[c] = a[d]; d++; c++; } for (; e &lt; b.length;) { array[c] = b[e]; e++; c++; } }; They also require my code inside of the mergeSort function be of the form: if (____) { var ____ = ____; mergeSort(____,____,____); mergeSort(____,____,____); merge(____,____,____,____); }
favorite count: 0

http://stackoverflow.com/q/27113156
tagged with: forms
type: Question
score: 0
answer count: 2
tagged with: jquery
has body: When recording the image on the server I needed on the client side to resize the image and overwrite the contents of the <input type = "file" ... a picture of the new resized. That is to prevent the server transmitted unnecessarily large files DESCRIPTION: After selecting a file I get reduced preview of the file. I need to transfer the file reduced after pressing the button ODOSLAT. It should be reflected in kontrola.php. Can someone give me an advise how to achieve this? CODE: change input file CODE kontrola.php : <?php // kontrola.php if (isset($_POST['odoslat'])) { $chyba1=''; $chyba1 = $_FILES['obr1']['size']; echo 'velkost = ' ,$chyba1 . ' '; // here should be new resized image } ?>
linked to: http://stackoverflow.com/q/1017224
has title: How to overwrite the contents of the <input type = "file" ... using Javascript
has answer: http://stackoverflow.com/a/73664879
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27113303
tagged with: javascript

http://stackoverflow.com/comment/42607423
comment on: http://stackoverflow.com/a/27044296
type: AnswerComment
score: 0
type: Comment
has text: Using AngularJS would reduce the size of the code no ?

http://stackoverflow.com/comment/42826219
comment on: http://stackoverflow.com/a/27089086
has text: @SumonBappi Btw, does the html in your question represent the serverside html code or is the html copy pasted from a browser during run time (for example in Chrome: More Tools -> Developer Tools -> Elements)? Anyway, instead of cloning those elements you could create your elements from scratch by using either document.createElement(..) or jQuery’s append method. However, I’m not sure whether those methods are going to work with g:textField element, probably not.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27135714
has body: Everything in the view will be added to the $scope if defined there, so yours is getting set as $scope.username instead of $scope.loginForm.username. You can be more explicit like so: Username {{loginForm.username.validation[1]}} Password {{loginForm.password.validation[1]}}
answers question: http://stackoverflow.com/q/27135463
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42770058
has comment: http://stackoverflow.com/comment/42771525
accepted answer of: http://stackoverflow.com/q/27135463

http://stackoverflow.com/q/26996670
has comment: http://stackoverflow.com/comment/42524531
has comment: http://stackoverflow.com/comment/42524458
has comment: http://stackoverflow.com/comment/42524453
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42592017
has comment: http://stackoverflow.com/comment/42524060
has comment: http://stackoverflow.com/comment/42524471
score: 1
has answer: http://stackoverflow.com/a/26996720
has comment: http://stackoverflow.com/comment/42524265
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/26997247
downvote count: 0
has comment: http://stackoverflow.com/comment/42524008
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42524150
has title: How to do something class exists or not?
has comment: http://stackoverflow.com/comment/42524141
tagged with: http://stackoverflow.com/tag/html
has body: I have a rather strange problem. I need to do some stuff according to if CSS class exists or not. My code looks like this: jQuery('#first-tab').on('mouseover mouseout', 'button.button-add-new', function(e) { console.log(this.className); console.log(this.className.indexOf('disabled')); console.log(this.className.indexOf('disabled') &gt; -1); if (this.className.indexOf('disabled') &gt; -1) { console.log('tooltip'); if (e.type == 'mouseover') jQuery(this).tooltip('show'); else jQuery(this).tooltip('hide'); } }); By default, when DOM loads there is no disable class, so when I put mouse on button no tooltip occurs as it should be. The I push other button which add disabled class to button.button-add-new. Now tooltip toggle as it should be. The problem starts when I remove disabled class from button.button-add-new - tooltip still works though it should not work as disabled class is removed. Here is result from console btn btn-default btn-sm sites-templates-button-add-new-site -1 false -------------- btn btn-default btn-sm sites-templates-button-add-new-site -1 false -------------- // class disabled added -------------- btn btn-default btn-sm sites-templates-button-add-new-site disabled 59 true tooltip -------------- btn btn-default btn-sm sites-templates-button-add-new-site disabled 59 true tooltip -------------- // class disabled removed, but tooltip stil works -------------- btn btn-default btn-sm sites-templates-button-add-new-site -1 false -------------- btn btn-default btn-sm sites-templates-button-add-new-site -1 false -------------- btn btn-default btn-sm sites-templates-button-add-new-site -1 false -------------- btn btn-default btn-sm sites-templates-button-add-new-site -1 false
has comment: http://stackoverflow.com/comment/42563064
favorite count: 0

http://stackoverflow.com/comment/42747781
type: Comment
comment on: http://stackoverflow.com/a/27122069
has text: @TimSeguine : Some what correct. I found a S.O question regarding this-- http://stackoverflow.com/questions/2265167/why-is-forvar-item-in-list-with-arrays-considered-bad-practice-in-javascript
type: AnswerComment
score: 0

http://stackoverflow.com/q/27043725
tagged with: leaflet
answer count: 0
downvote count: 0
score: 1
type: Question
tagged with: javascript
upvote count: 1
has title: Mouseover one feature to highlight another feature leaflet
favorite count: 0
has body: I have created a map using leaflet that displays information about states upon mouseover and on click it goes to another page. Recently, I have needed to place labels on the map as well. Since, I am using GeoJSON features, there is no easy way to add the labels with a plugin. I have used a base map to put labels on the map and for small states I have used a line out to the label that is hovering over empty space. I am trying to tie a rectangle feature that encases the label to the state feature in order to make the state highlight. I have tried putting the coordinates in the same feature in the geojson but that causes the label feature to be color and we want the label feature to remain hidden. Here is the map section of my code: var map = L.map('map', {zoomControl: false}).setView([38.165, -98.613], 4); /*L.tileLayer('http://{s}.tiles.mapbox.com/v3/wcgislab.k1dm05p3/{z}/{x}/{y}.png', { id: 'wcgislab.k1dm05p3' }).addTo(map);*/ var states = <?php echo json_encode($features);?>; var imageUrl = 'http://www.link.com/images/map.jpg', imageBounds = [[52.5, -128], [20, -129], [20, -52], [53, -51.5]]; L.imageOverlay(imageUrl, imageBounds).addTo(map); function highlightFeature(e) { var layer = e.target; var feature = e.target.feature; if(feature.properties.STATE_TYPE == "Label") { } else { layer.setStyle({ weight: 5, color: '#666', dashArray: '', fillOpacity: 0.9 }); if (!L.Browser.ie && !L.Browser.opera) { layer.bringToFront(); } } info.update(layer.feature.properties); } function gotofeature(e) { var feature = e.target.feature; window.location.href = 'http://www.link.com/state.php?State='+feature.properties.State_Abbr; } function getColor(str){ switch (str) { case 'A': return "#00cc58"; case 'A+': return "#00cc58"; case 'A-': return "#00cc58"; case 'B': return "#a3e300"; case 'B+': return "#a3e300"; case 'B-': return "#a3e300"; case 'C': return "#faa200"; case 'C+': return "#f2fa00"; case 'C-': return "#f2fa00"; case 'D-F': return "#fa2e00"; } } function resetHighlight(e) …
has comment: http://stackoverflow.com/comment/80599245
type: UnansweredQuestion

http://stackoverflow.com/comment/42619778
type: AnswerComment
has text: I think you just want `response.statuses.forEach` at the beginning there.
type: Comment
comment on: http://stackoverflow.com/a/27051187
score: 0

http://stackoverflow.com/a/27040483
has comment: http://stackoverflow.com/comment/42601060
has comment: http://stackoverflow.com/comment/42600764
has comment: http://stackoverflow.com/comment/42601103
upvote count: 3
has comment: http://stackoverflow.com/comment/42600972
downvote count: 1
has comment: http://stackoverflow.com/comment/42601190
answers question: http://stackoverflow.com/q/27040426
has comment: http://stackoverflow.com/comment/42601284
has body: try this , calling the ajax function needs to get the return value as true or else it won't be called Click Me!
accepted answer of: http://stackoverflow.com/q/27040426
has comment: http://stackoverflow.com/comment/42600941
score: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42601166
has comment: http://stackoverflow.com/comment/42600843
type: Answer

http://stackoverflow.com/comment/42587779
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27033174
has text: $refreshTimer shows the amount I want it to, and loadContent is getting it's initial call. As to Syed Quaib, that's a great point. I haven't had to use success yet. How do I pass data to it?

http://stackoverflow.com/comment/42721027
comment on: http://stackoverflow.com/a/27098632
type: Comment
has text: but you won't know if they are done...lets say i am typing city, abc and there is city ab. Js would think i am done at ab and take me to next step. When i am not. Samething with options, if i am trying to do 6 days of flexibility but i am using keyboard to go through list after every choice is the valid choice and thus input is made. Valid but not correct as far as the user is concerned.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27075921
has comment: http://stackoverflow.com/comment/42731932
accepted answer of: http://stackoverflow.com/q/27075869
has comment: http://stackoverflow.com/comment/42692645
has comment: http://stackoverflow.com/comment/42740607
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42733139
score: 0
has comment: http://stackoverflow.com/comment/42704321
type: Answer
answers question: http://stackoverflow.com/q/27075869
has body: Even better Solution,Use one in Jquery link1 $('#popup').one('click',function(){ alert('open your popup here'); }); Here is you fiddle

http://stackoverflow.com/q/27025618
upvote count: 24
type: Question
has answer: http://stackoverflow.com/a/51302495
possible better answer: http://stackoverflow.com/a/30481031
has answer: http://stackoverflow.com/a/27025886
tagged with: javascript
score: 24
tagged with: forms
has answer: http://stackoverflow.com/a/52406817
has body: I'm using AngularJS and I have a form where the user can enter data. At the end of the form I want to have two buttons, one to "save" which will save and go to another page, and another button labeled "save and add another" which will save the form and then reset it - allowing them to enter another entry. How do I accomplish this in angular? I was thinking I could have two submit buttons with ng-click tags, but I'm using ng-submit on the form element. Is there any reason I NEED to be using ng-submit - I can't remember why I started using that instead of ng-click on the button. The code looks something like: Save Save and Add Another And in the controller SomeController $scope.record = {}; $scope.save = function (record) { $http.post('/api/save', record). success(function(data) { // take action based off which submit button pressed }); }
has title: How to handle multiple submit buttons in a form using Angular JS?
downvote count: 0
answer count: 7
favorite count: 0
has answer: http://stackoverflow.com/a/42287333
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27025886
has answer: http://stackoverflow.com/a/37376020
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30481031
has answer: http://stackoverflow.com/a/27025860

http://stackoverflow.com/a/26995367
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/26995208
accepted answer of: http://stackoverflow.com/q/26995208
score: 0
has body: Value 1 Value 2 Value 3 here is demo

http://stackoverflow.com/a/27002974
upvote count: 1
has comment: http://stackoverflow.com/comment/42535675
has comment: http://stackoverflow.com/comment/42535900
answers question: http://stackoverflow.com/q/27002871
type: Answer
downvote count: 0
score: 1
has body: If you created a constructor function like: function Dog(){ this.age = 13; } It will take only 1 line to add a new Dog to an array: array.push(new Dog()); Edit: If you want to get a new object and the type defined in the web service you should first create a constructor function as I wrote before. You can't get the structure in any other (efficient) way
has comment: http://stackoverflow.com/comment/42536047
has comment: http://stackoverflow.com/comment/42536189
has comment: http://stackoverflow.com/comment/42535824

http://stackoverflow.com/q/27123409
has answer: http://stackoverflow.com/a/27125034
accepted answer: http://stackoverflow.com/a/27125034
tagged with: javascript
tagged with: jquery
has title: How to apply Css class to a row using datatables.js?
favorite count: 0
has answer: http://stackoverflow.com/a/27123613
has body: I have retrieved table from SQL procedure contains column with name of class that is to be applied on that particular row. However that table is passed to datatable.js as a data-source. Now with my code, specified class is getting applied to only one cell: in fnRowCallback() function. I want is to apply that class to entire row. Here is my javascript code: var dataSet = JSON.parse("[" + a.toString() + "]") $(document).ready(function () { $('#demo').html('&lt;table cellpadding="0" cellspacing="0" border="0" class="display" id="example"&gt;&lt;/table&gt;'); $('#example').dataTable({ "data": dataSet, "columns": [ { "title": "Center" }, { "title": "Call Executive" }, { "title": "Name" }, { "title": "Mobile" }, { "title": "Phone" }, { "title": "Status" }, { "title": "Appt Date" }, { "title": "Joined Date" }, { "title": "Remark" }, { "title": "Source" }, { "title": "Publisher" }, { "title": "css" }, ] , "fnRowCallback": function (nRow, aData, iDisplayIndex) { if (aData["css"] == "gradeC") { $(nRow).addClass('gradeC'); } else { $(nRow).addClass('gradeN'); } } }); }); Sample Datatable string (class is specified in last column) passed to function is: var dataSet = ['Dadar', 'lmsSenitaD', 'Atul salaskar', '9876543210', '', 'Not Joined', '10/01/2014', '', 'Come back and Join', 'Mobile', 'Times','gradeC'], ['Aundh', 'Rashmi', 'Preeti Gupta', '9876543210', '', 'Not Joined', '10/01/2014', '', 'Will Discuss with Family', 'Online Campaign', 'Iksula','gradeN'], ['Do@Home_Thane', 'Rashmi', 'Mitali Gupta', '9876543210', '', 'Joined - Old Date', '10/01/2014', '20/08/2014', 'Come back and Join', 'Online Campaign', 'Iksula','gradeC'];
tagged with: datatables
possible better answer: http://stackoverflow.com/a/27123613
tagged with: css
has comment: http://stackoverflow.com/comment/42748354
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/27123595

http://stackoverflow.com/a/27126539
type: AcceptedAnswer
has body: You don't need to bind click again inside getInput: var getInput = function(){ return $('input[name=input1]').val(); }; Note also your original code didn't return any value (hence, undefined): your return was inside the click-bound anonymous function. To put it all together: var getInput = function(){ return $('input[name=input1]').val(); }; var addTextInTextBox_1 = function(text){ $("#textBox").append("&lt;p&gt;"+text+"&lt;/p&gt;"); }; $('#inputSubmit').on('click', addTextInTextBox_1("Good, your character's name is " + getInput()));
answers question: http://stackoverflow.com/q/27126512
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27126512

http://stackoverflow.com/comment/42583997
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27030818
has text: Yes, it was not displaying anything at all. I've been given a solution, and as predicted, I feel really dumb after figuring out my problem :P

http://stackoverflow.com/a/27149286
accepted answer of: http://stackoverflow.com/q/27148545
type: Answer
answers question: http://stackoverflow.com/q/27148545
has body: Look at this example http://bl.ocks.org/crayzeewulf/9719255 There used 2 graphs, but you can use just one and place data as you want. As for date you can look at this example http://jsfiddle.net/robdodson/KWRxW/, xAxis in particular. var xAxis = d3.svg.axis() .scale(x) .orient('bottom') .ticks(d3.time.days, 1) .tickFormat(d3.time.format('%a %d')) .tickSize(0) .tickPadding(8);
downvote count: 0
score: 6
type: AcceptedAnswer
upvote count: 6

http://stackoverflow.com/comment/42574556
type: Comment
comment on: http://stackoverflow.com/q/27024992
type: QuestionComment
has text: I'm using nothing for routing. It's just a website in php with jquery and History.js. Did not understand your example very well. What have Jquery mobile to do with that? And the back I'm referring is the back button of the browser, when I manipulate my URL with History.pushState I'm not able to go back.
score: 0

http://stackoverflow.com/comment/42563458
type: AnswerComment
comment on: http://stackoverflow.com/a/27019208
type: Comment
has text: There may be other problems, but you definitely need to fix this part.
score: 0

http://stackoverflow.com/comment/43035588
score: 0
has text: Just deductive reasoning, and lots and lots of time spent with Selenium.
comment on: http://stackoverflow.com/q/27099250
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42714211
comment on: http://stackoverflow.com/q/27105334
score: 0
has text: @Asik That is loaded in the app.js (updated the question)
type: QuestionComment
type: Comment

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

http://stackoverflow.com/a/27123656
score: 0
has comment: http://stackoverflow.com/comment/42748404
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27123511
type: Answer
has body: Calculate the counts while pushing to array only and do not push if already present. var arr = []; var counts = []; $.each(data.d.results, function(a, data) { $.ajax({ url: "http://helpdesk.monjasa.com/IT/_vti_bin/ListData.svc/ITHelpdeskRequests("+data.RequesterId+")/CreatedBy", headers: { 'accept': 'application/json;odata=verbose', 'content-type': 'application/json;odata=verbose'}, success: function(data2){ $.ajax({ url: "http://helpdesk.monjasa.com/IT/_vti_bin/ListData.svc/ITHelpdeskRequests("+data.AssignedToId+")/AssignedTo", headers: { 'accept': 'application/json;odata=verbose', 'content-type': 'application/json;odata=verbose'}, success: function(data3){ $(".inner").prepend('&lt;p&gt;'+data.Request +' &lt;br&gt;Submitted by: '+data2.d.Name+'&lt;br&gt;Assigned to: '+data3.d.Name+' | Due in: '+data.DueInDays+' day(s)&lt;/p&gt;'); var indexOfName = arr.indexOf(data3.d.Name); if(indexOfName == -1) { arr.push(data3.d.Name); counts.push(1); console.log(arr); } else { counts[indexOfName]++; } } }); } });
answers question: http://stackoverflow.com/q/27123511

http://stackoverflow.com/a/27052676
has body: Capture the coordinates with (), and then refer to them in the replacement as $1, $2, etc. $&amp; refers to the match of the whole regexp. var string = 'This coord is [80,20] and [30,25]'; var newString = string.replace(/\[(-?\d+),(-?\d+)\]/g, "&lt;a href='location?x=$1&amp;y=$2'&gt;$&amp;&lt;/a&gt;"); alert(newString); Note that {0,1} can be simplified to ?, and {1,} is equivalent to +. There's also no need to escape = or , in the regexp, and \d matches digits.
accepted answer of: http://stackoverflow.com/q/27052621
answers question: http://stackoverflow.com/q/27052621
has comment: http://stackoverflow.com/comment/42623499
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42788536
type: Comment
has text: @Mephiztopheles: No, I didn't check it. I should have said so in the answer.
comment on: http://stackoverflow.com/a/27145318
score: 0
type: AnswerComment

http://stackoverflow.com/q/27043850
type: Question
has body: I have a json file, that will eventually be called from a server with an API. Currently am just calling from an object. I am creating an HTML file with a table navigation, where each header element also has a search box and submit button. I would like the table to be blank on start, and when one of the header values is searched (id, nickname, email, etc), the json value that contains at least part of that search will populate the table. I am new to the Angular syntax and am trying to get an idea of how this would even work. (function() { var app = angular.module('tool', []); app.controller('searchController', function() { this.info = data.people; this.findId = function(idInput) { angular.forEach(that.id, function(value, key) { if (value.contains(idInput)) { // not sure what to put here. } }); }; }); var data = { "people": [{ "id": "2245231", "nickname": "heyyman", "email": "info@gmail.net", "lastIp": "127.0.0.1", "regIp": "127.0.0.1", }, { "id": "2245232", "nickname": "heyyman2", "email": "info2@gmail.net", "lastIp": "127.0.0.2", "regIp": "127.0.0.2", } }; })(); ID Nickname Login / Email Last IP Registration IP {{people.id}} {{people.nickname}} {{people.email}} {{people.lastIp}} {{people.regIp}} So far, this is what I've done. Also, I've linked a JSFiddle. http://jsfiddle.net/ho00cLkk/ Please let me know if what I am asking is confusing or not clear.
has comment: http://stackoverflow.com/comment/42606582
has answer: http://stackoverflow.com/a/27044126
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27044126
score: 0
tagged with: angularjs
type: AnsweredQuestion
upvote count: 1
downvote count: 1
has title: Populate HTML table with search value Angular

http://stackoverflow.com/q/27073405
has comment: http://stackoverflow.com/comment/42673617
has comment: http://stackoverflow.com/comment/42710245
has comment: http://stackoverflow.com/comment/42661351
has comment: http://stackoverflow.com/comment/42660658
type: UnansweredQuestion
has body: I am dynamically generating pages and adding them to the page container (this part works). I want to be able to clear of all the pages (empty the array) and re-add a new, dynamically generated list of pages. I have tried: $(document).find('div[data-role="page"]').remove(); $.mobile.pageContainer.empty(); Both of these calls remove the pages from the DOM, and I am able to re-add new pages, but when I attempt to call: jQ.mobile.changePage(page1); I am receiving the following error: Uncaught TypeError: Cannot read property '_trigger' of undefined On the line (in jQuery mobile): fromPage.data( "mobile-page" )._trigger( "beforehide", null, { nextPage: toPage } ); Any help is appreciated.
answer count: 0
has title: jQuery Mobile - Clearing all pages and adding new ones
has comment: http://stackoverflow.com/comment/42659035
has comment: http://stackoverflow.com/comment/42673548
type: Question
has comment: http://stackoverflow.com/comment/42692954
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42673531
has comment: http://stackoverflow.com/comment/42690011
has comment: http://stackoverflow.com/comment/42677504
score: 0

http://stackoverflow.com/a/27014982
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27014854
answers question: http://stackoverflow.com/q/27014854
type: Answer
has comment: http://stackoverflow.com/comment/42555718
has body: Try this code: var Total=0; var json = result.d; obj = JSON.parse(json); for (var i = 0; i &lt; obj.length -1; i++) { var LatLng1 = new google.maps.LatLng(obj[i].Lat, obj[i].Lng); var LatLng2 = new google.maps.LatLng(obj[i+1].Lat, obj[i+1].Lng); var Distance=(google.maps.geometry.spherical.computeDistanceBetween(LatLng1, LatLng2) / 1000); Total+=Distance; } alert(Total); //It will work The reason it wasn't working earlier is that you got an exception everytime you accessed element at obj.length index. I guess you didn't look into developer tools in your browser to find the exception.
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/43030999
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27071010
has text: The code is working beautifully. Thanks for the advise.
type: Comment

http://stackoverflow.com/a/42724593
answers question: http://stackoverflow.com/q/27000152
has comment: http://stackoverflow.com/comment/95110264
has comment: http://stackoverflow.com/comment/72568963
downvote count: 0
has comment: http://stackoverflow.com/comment/83794262
has body: I'm late here, but you can do this with XMLHttpRequest and a blob. var xhr = new XMLHttpRequest(); xhr.responseType = 'blob'; //so you can access the response like a normal URL xhr.onreadystatechange = function () { if (xhr.readyState == XMLHttpRequest.DONE &amp;&amp; xhr.status == 200) { var img = document.createElement('img'); img.src = URL.createObjectURL(xhr.response); //create &lt;img&gt; with src set to the blob document.body.appendChild(img); } }; xhr.open('GET', 'http://images.example.com/my_secure_image.png', true); xhr.setRequestHeader('SecretPassword', 'password123'); xhr.send(); If you want, you could check to make sure the blob's MIME type is an image.
score: 48
type: Answer
upvote count: 48
has comment: http://stackoverflow.com/comment/88589084
has comment: http://stackoverflow.com/comment/90429912
has comment: http://stackoverflow.com/comment/112931909

http://stackoverflow.com/q/26998297
tagged with: jquery
favorite count: 0
tagged with: css
upvote count: 2
has body: I have for example image of Coin. I want to give a value from 0 to example 20. 0: no coin 1: to one coin 2: 2 coin etc 20: 20 coin The collection of 6 coins should looks like this: How can I achieve this goal?
tagged with: php
has answer: http://stackoverflow.com/a/26998969
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42527372
has answer: http://stackoverflow.com/a/26998789
has title: Image series bar
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/26998789
has comment: http://stackoverflow.com/comment/42527095
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26998969

http://stackoverflow.com/comment/42758701
has text: Thanks!, but what if you are not using underscore?
score: 0
comment on: http://stackoverflow.com/a/27129669
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42769148
has text: @Jay: Granularity in the context of versioned assets. e.j. jQuery 1.10.9, 1.11.1, 1.11.2, etc (Same goes with any js/css files).
comment on: http://stackoverflow.com/a/27132991
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42749087
type: QuestionComment
has text: 'size' is not used in the first method, shouldn't it be ?
comment on: http://stackoverflow.com/q/27124393
score: 0
type: Comment

http://stackoverflow.com/comment/42603948
has text: Network/System Administrator usually do this part, they usually redirect IP(s) that ISP providing to them through router and its not only that there should be protection(Firewall rules) to limit the valid ports/Protocols(80,443,..)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27039039

http://stackoverflow.com/a/69793742
answers question: http://stackoverflow.com/q/26993481
downvote count: 0
score: 1
has body: You can edit your scrollbar and improve your UI design for better useable. This method also works in the table for design scrollbar and supports all browsers. .scrollable { background-color: #a3d5d3; height: 100%; overflow-y: auto; } .scrollable-container { background-color: #a3d5d3; width: 240px; height: 160px; position: relative; overflow: hidden; margin: auto; margin-top: 16px; } .scrollable div { font-size: 23px; } /*IE*/ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { .scrollable { margin-right: -10px; padding-top: 32px; margin-top: -32px; margin-bottom: -32px; padding-bottom: 32px; /* ie scrollbar color properties */ scrollbar-base-color: #efefef; scrollbar-face-color: #666666; scrollbar-3dlight-color: #666666; scrollbar-highlight-color: #666666; scrollbar-track-color: #efefef; scrollbar-arrow-color: #666666; scrollbar-shadow-color: #666666; scrollbar-dark-shadow-color: #666666; } .scrollable:after { content: ""; height: 32px; display: block; } } /*Edge*/ @supports (-ms-ime-align:auto) { .scrollable { margin-right: -10px; padding-top: 16px; margin-top: -16px; margin-bottom: -16px; padding-bottom: 16px; } .scrollable:after { content: ""; height: 16px; display: block; } } /*Firefox*/ /*From version 64 - https://drafts.csswg.org/css-scrollbars-1/*/ .scrollable { scrollbar-width: thin; scrollbar-color: #666666 #efefef; } /*Chrome*/ .scrollable::-webkit-scrollbar-track { background-color: #efefef; width: 4px; } .scrollable::-webkit-scrollbar-thumb { background-color: #666666; border: 1px solid transparent; background-clip: content-box; } .scrollable::-webkit-scrollbar { width: 8px; } Element 1 Element 2 Element 3 Element 4 Element 5 Element 6 Element 7 Element 8 Element 9
upvote count: 1
type: Answer

http://stackoverflow.com/comment/42526167
type: Comment
comment on: http://stackoverflow.com/a/26997550
score: 0
has text: thx for being there, but let me clarify: i need to run a .pl script via a cron on the server that calls the $.ajax which calls cgi1.pl. the web page already does the $.ajax call to cgi1.pl, and i can put a timer on it to run at intervals. but we want to: initiate the run of just that one function, via a cron job[.pl script]. pls let me know if i am not clear. thx!!
type: AnswerComment

http://stackoverflow.com/a/27003511
score: 3
accepted answer of: http://stackoverflow.com/q/27002554
upvote count: 3
has body: NOTE Please make sure that the ideas in the graph are still clear if you use such a scale. Be aware that the lines are only built based on start and end point and are not "kinked" when traversing the break in the axis. When writing the answer I wasn't aware that you have a line graph and values below 200. ANSWER Assuming that you want to use a linear scale, you could e.g. try the following: newScale = d3.scale.linear().domain([0,200,1000]).range([0,100,1000]) An axis could e.g. look like this: var xAxis = d3.svg.axis() .scale(newScale) .orient('bottom'); d3.select("#someSVG").append("g") .attr("class", "x axis") .attr("transform", "translate(0, " + 123 + ')') .call(xAxis); Consequently, you'd get: Looking at your codepen, you might want to try: var y = d3.scale.linear().range([height,height * 9 / 10, 0]); and then use as domain: y.domain([0, 200, d3.max(data, function (d) { return d.close; })]); so in this example, you allocate 1/10th of the height to the first 200.
has comment: http://stackoverflow.com/comment/42538287
has comment: http://stackoverflow.com/comment/42539146
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27002554
has comment: http://stackoverflow.com/comment/42549536

http://stackoverflow.com/a/29712713
type: Answer
score: 1
upvote count: 1
has body: This is not currently supported. See this stack overflow question: CoffeeScript Intellisense Also see this suggestion from web essentials: https://webessentials.uservoice.com/forums/140520-general/suggestions/3782958-coffeescript-intellisense
answers question: http://stackoverflow.com/q/27043972
downvote count: 0

http://stackoverflow.com/comment/42904560
type: Comment
comment on: http://stackoverflow.com/a/27084201
score: 0
type: AnswerComment
has text: @r-g Any more ideas here? The bounty is about to expire and the answer isn't complete. It doesn't solve my problem.

http://stackoverflow.com/q/27062484
has body: After following various online tutorials on how to style my Radio buttons and Checkboxes. I have managed with the following code: .radio input { -webkit-appearance: none; background-color: #fafafa; border: 1px solid #cacece; box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05); padding: 7px; border-radius: 50px; display: inline-block; position: relative; outline: none; margin-right: 10px; margin-top: 6px; } .radio input:checked:after { content: ' '; width: 10px; height: 10px; border-radius: 50px; position: absolute; top: 2px; background: #99a1a7; box-shadow: inset 0px 0px 10px rgba(0,0,0,0.3); text-shadow: 0px; left: 2px; font-size: 32px; } .radio input:checked { background-color: #e9ecee; color: #99a1a7; border: 1px solid #adb8c0; box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05), inset 15px 10px -12px rgba(255,255,255,0.1), inset 0px 0px 10px rgba(0,0,0,0.1); } This works for modern browsers, it gives me the following: Unfortunately I must support IE8 too, and the above does not work for IE8. I know that the :checked pseudo element does not work for IE8, so I have the following script that is supposed to provide me with that functionality. I also have a conditional CSS comment that brings in a stylesheet specifically for IE8. &lt;!--[if IE 8]&gt; &lt;link href="@Url.Content("~/Content/ie8-styles.css")" rel="stylesheet" type="text/css" /&gt; &lt;![endif]--&gt; The first thing I want to know is, does IE8 support something like this (bear in mind the JS script)? .radio input:checked:after { content: "boo"; width: 10px; height: 10px; border-radius: 50px; position: absolute; top: 2px; background: #99a1a7; box-shadow: inset 0 0 10px rgba(0, 0, 0, .3); text-shadow: 0; left: 2px; font-size: 32px; } I'm curious if it'll read the double pseudo elements of :checked:after because right now I don't see the word boo before my radio buttons!
has answer: http://stackoverflow.com/a/59866558
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27064010
accepted answer: http://stackoverflow.com/a/27064010
tagged with: radio-button
tagged with: http://stackoverflow.com/tag/html
has title: Styling Radio buttons and Checkboxes in IE8
tagged with: css
type: AnsweredQuestion
type: Question
tagged with: internet-explorer-8
tagged with: javascript
possible better answer: http://stackoverflow.com/a/59866558

http://stackoverflow.com/comment/42572023
type: Comment
comment on: http://stackoverflow.com/q/27022567
score: 1
has text: What happens currently when you submit form with an invalid access token? How are you handing the data entered in the form?
type: QuestionComment

http://stackoverflow.com/a/27018809
score: 0
answers question: http://stackoverflow.com/q/27018768
has body: The clicked element will be $(this), so $(this).css("background-color", "green"); will color your clicked element, $("div").removeAttr("style") will remove all defined colors from the rest. So: $("div").click(function() { // remove the style attribute from every 'div' element to reset it to the value defined in CSS $("div").removeAttribute("style"); // use $(this) to apply the color the clicked element itself $(this).css({"background-color": "green"}); });
type: Answer

http://stackoverflow.com/comment/42601681
type: Comment
type: QuestionComment
has text: I think you can take a look at this http://stackoverflow.com/questions/2844565/is-there-a-jquery-dom-change-listener/11546242#11546242
score: 0
comment on: http://stackoverflow.com/q/27041145

http://stackoverflow.com/q/27068837
tagged with: flash
tagged with: javascript
has body: I am having the hardest time. I am trying to make a flash recorder that runs behinds the scenes and is controlled via JavaScript. When we flash need permission I want to have flash fill the browser window but when ever i set the height or width property to 100% my swf vanishes entirely where am i going wrong? if flash has a set value for height & width like 300 it works update-> So I found that I can set width to 100% but using height causes it to vanish
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: actionscript-3
has answer: http://stackoverflow.com/a/27070073
type: UnansweredQuestion
type: Question
has title: swf fails to fill window when height is set to 100%

http://stackoverflow.com/a/27008164
score: 0
answers question: http://stackoverflow.com/q/27008006
type: Answer
has body: You change the events for input pass &lt;input type="password" onkeydown="updateInput_current_password(this.value)" onkeyup="updateInput_current_password(this.value)" /&gt;
has comment: http://stackoverflow.com/comment/42545262

http://stackoverflow.com/q/27133129
has comment: http://stackoverflow.com/comment/42765010
type: Question
answer count: 2
has body: In an HTML script I wrote, I set up a JS function so that when the user clicks the text, it links out to the website AND changes the color of the text. I ended up copying that script and making a new one with changes (including taking out the JS function). Now that I am trying to put the function back in, it's not working. Looking back at the original script, the function works there and the use of the function looks right in the new one compared to the original... so I'm a little stuck on why the text won't change color anymore. Here is the JS Function: Here it's called in HTML, first as an image link which works (and obviously I don't expect the color of the image to change so that's not my problem), then secondly as the text link that isn't changing color when clicked: For Windows Applications Click here Any ideas on why the color no longer changes would be really helpful! Thank you! FYI - let me know if more code is needed, I gave only what I think to be relevant to the situation.
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27133243
has title: JS onclick function no longer working to change link color
has comment: http://stackoverflow.com/comment/42772043
possible better answer: http://stackoverflow.com/a/27133243
tagged with: css
has answer: http://stackoverflow.com/a/27133258
accepted answer: http://stackoverflow.com/a/27133258
type: AnsweredQuestion
tagged with: onclick

http://stackoverflow.com/comment/42636072
type: Comment
comment on: http://stackoverflow.com/q/27060811
score: 3
has text: What if the input is "I put putty on the computer"? Should the result be ["put", "putty", "computer"]?
type: QuestionComment

http://stackoverflow.com/comment/42614677
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27047999
has text: No after adding the call its not working as its supposed to.

http://stackoverflow.com/comment/48534760
comment on: http://stackoverflow.com/a/27123915
type: Comment
has text: I was trying to do exactly as per the original Q. Ed's comment above on top of the answer really helped me work out why not to do this.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27069267
has title: Javascript add file input box button trouble
tagged with: function
has comment: http://stackoverflow.com/comment/42651629
tagged with: upload
tagged with: javascript
score: 0
tagged with: element
answer count: 1
has comment: http://stackoverflow.com/comment/42651665
has comment: http://stackoverflow.com/comment/42651770
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42651507
has answer: http://stackoverflow.com/a/27069449
has comment: http://stackoverflow.com/comment/42657265
has comment: http://stackoverflow.com/comment/42651800
has comment: http://stackoverflow.com/comment/42651860
has body: I am building a multi file uploader and would like to start each input on a new line with a with java script. What I am trying to do is start every new box under each other instead of lining up next to each other. Could someone show me what to add to the java script so it creates an element . I tried these adding them to the end of the javascript function, and it didnt work var txt = document.createElement('br'); AND txt = document.createElement('br'); AND txt.element =" "; i have a multi uploader here's the code. :: FILEUPLOAD :: + Thanks for the assistance
type: Question

http://stackoverflow.com/a/74688421
has body: This code is worked for me and you can use it in set amount val for remove separators t.replace(/,(?=\d{3})/g, '')
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27105755
downvote count: 0
score: 1

http://stackoverflow.com/comment/42576267
comment on: http://stackoverflow.com/q/27026494
has text: It's likely a driver problem. That said... why are you passing the same query in... shouldn't you be using a paramaterized query and call a procedure to do the update? To troubleshoot: eliminate all but the final_name on the update keeping where criteria. Does it work then? add state_Id.. work again? now add date... guess what doesn't work does it? Why? likely how the driver handles the ' vs " in the date fields. A paramaterized query would likely bypass this troublesome issue. I could be wrong though... so troubleshoot using technique mentioned.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/36328088
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27040438
has body: Yes. Now they have: Slider Revolution Jquery Visual Editor Addon
type: Answer
upvote count: 2
score: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27040438

http://stackoverflow.com/q/27034996
score: -1
accepted answer: http://stackoverflow.com/a/27288086
has body: I have used a WinJS list view in my program with display style ms-flexbox .But it is scrolling horizontally beyond its width with overflow hidden. How I can remove this scrolling and make number of items in a row as 5?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has title: winjs list view scrolling horizontally
has comment: http://stackoverflow.com/comment/43067114
has answer: http://stackoverflow.com/a/27288086
favorite count: 0
upvote count: 0
tagged with: css
type: AnsweredQuestion
type: Question
tagged with: winjs
tagged with: javascript

http://stackoverflow.com/comment/42643245
score: 0
type: AnswerComment
has text: Have you tried placing that tag above the while loop?
type: Comment
comment on: http://stackoverflow.com/a/27064244

http://stackoverflow.com/a/27079876
score: 0
has body: I use this code and it works: $('li').click(function(){ $(this).parents("div:first").addClass('new'); });
type: Answer
answers question: http://stackoverflow.com/q/27079671

http://stackoverflow.com/a/27052064
answers question: http://stackoverflow.com/q/27051905
upvote count: 1
has body: Check your HTML. Is the password really inside the form tag? What does the find("#memberOldPassword") really return? Console it out! Test JavaScript: $("#formLogin").submit(function(e){ e.preventDefault(); var memberOldPassword = $(this).find("#memberOldPassword").val(); alert(memberOldPassword); }) Correct HTML (alerts entered value): &lt;form id="formLogin"&gt; &lt;input type="password" class="good_input" id="memberOldPassword" name="memberOldPassword" style="float:right;width:135px;"/&gt;&lt;br /&gt; &lt;input type="submit" value="Submit"/&gt; &lt;/form&gt; Wrong HTML (alerts undefined): &lt;form id="formLogin" &gt; &lt;input type="submit" value="Submit"/&gt; &lt;/form&gt; &lt;input type="password" class="good_input" id="memberOldPassword" name="memberOldPassword" style="float:right;width:135px;"/&gt;&lt;br /&gt;
type: Answer
has comment: http://stackoverflow.com/comment/42621180
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42621289

http://stackoverflow.com/comment/42706418
has text: please suggest me how to remove border of iframe
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27101010
score: 0

http://stackoverflow.com/comment/42538815
has text: Are you using a Grid or doing it without a Grid?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27002176

http://stackoverflow.com/q/27006104
tagged with: mapquest
answer count: 1
type: UnansweredQuestion
has title: Save static map in Base64 image? - Mapquest
type: Question
tagged with: javascript
tagged with: base64
has body: I use Static Image API - http://www.mapquestapi.com/staticmap/. And I need to get to Base64 image. Is it possible?
has answer: http://stackoverflow.com/a/27006466
score: 0

http://stackoverflow.com/q/27110093
has title: In Dropzone.js how to set the minimum image resolution that we can upload? Accept is not working
type: Question
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/30850495
answer count: 2
downvote count: 0
tagged with: jquery
tagged with: file-upload
has answer: http://stackoverflow.com/a/33707207
favorite count: 0
tagged with: dropzone.js
type: UnansweredQuestion
has body: Let's say I need to restrict my users from uploading images below 3MP (Nearly 2048px wide). How can I do this in Dropzone.js? Tried to do it with 'accept' but it's not working : $(function() { var mediaDropzone; mediaDropzone = new Dropzone("#media-dropzone", { paramName: "file", autoProcessQueue: false, parallelUploads: 500, maxFilesize: &lt;%= ENV["max_image_size"] %&gt;, acceptedFiles: '&lt;%= ENV["accepted_files"] %&gt;', accept: function(file, done) { if (file.width &lt; 2048) { done("Naha, you don't."); } else { done(); } } });
has comment: http://stackoverflow.com/comment/42738301
upvote count: 3

http://stackoverflow.com/a/27071771
downvote count: 0
answers question: http://stackoverflow.com/q/27071589
type: Answer
score: 1
upvote count: 1
has body: The less lines of codes I figure out for this is this: var unit_system = $('#unit_system').val(); $('.value_gpm').each(function(){ convert($(this).val(), unit_system == "English" ? "m3h" : "gpm", unit_system == "English" ? "gpm" : "m3h"); });

http://stackoverflow.com/q/27032463
has answer: http://stackoverflow.com/a/27032526
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27033136
accepted answer: http://stackoverflow.com/a/27032491
tagged with: for-loop
tagged with: counter
tagged with: javascript
has answer: http://stackoverflow.com/a/27032491
tagged with: jquery
has title: Run a for loop. Increment the value; exit and begin loop again with new value
score: 0
tagged with: while-loop
answer count: 4
has comment: http://stackoverflow.com/comment/42586589
linked to: http://stackoverflow.com/q/8517562
has answer: http://stackoverflow.com/a/27032954
has body: I want to run a loop. I want it to excecute it 16 times like, for (var i = 0; i &lt;= 15; i++) { alert(i); } I want this loop to run on clicking a button. But the loop should only return the first value of i and then exit. Like this, for (var i = 0; i &lt;= 15; i++) { alert(i); exit(); } What I am confused with is, whenever I click the button I want this loop to run-only once-but with the value being incremented by one. The whole idea is to alert the i value on each click of the button but incremented by one each time. I think even my use of for loop also is not making any sense. Or is my whole logic wrong. I think I am doing something more complex where something simple like using counter will accomplish the same. Any help appreciated.
possible better answer: http://stackoverflow.com/a/27032526

http://stackoverflow.com/a/27085925
answers question: http://stackoverflow.com/q/27084018
has comment: http://stackoverflow.com/comment/42681027
upvote count: 1
has comment: http://stackoverflow.com/comment/42694488
type: Answer
has body: I've been working on the Ramda library, and using it to do this is fairly straightforward: var test = R.allPredicates(R.reduce(function(tests, key) { var field = criteria[key]; if ('min' in field) {tests.push(R.pipe(R.prop(key), R.gt(R.__, field.min)));} if ('max' in field) {tests.push(R.pipe(R.prop(key), R.lt(R.__, field.max)));} return tests; }, [], R.keys(criteria))); console.log( 'filtered array is: ', data.filter(test) ); (also available in this JSBin.) To do this without a library, I converted the code above to into a library-less version, and it's a bit more complicated, but still readable: var test = (function(criteria) { var tests = Object.keys(criteria).reduce(function(tests, key) { var field = criteria[key]; if ('min' in field) {tests.push(function(item) { return item[key] &gt; field.min; });} if ('max' in field) {tests.push(function(item) { return item[key] &lt; field.max; });} return tests; }, []); return function(item) { return tests.every(function(test) {return test(item);}); }; }(criteria)); console.log( 'filtered array is: ', data.filter(test) ); (JSBin) In either version, the criteria is parsed once to create a set of predicate functions. Those functions are combined into a single predicate which is passed as a filter.
downvote count: 0
score: 1

http://stackoverflow.com/q/27152361
has comment: http://stackoverflow.com/comment/42799654
has title: How we have multiple return statement in below code ? can any one explain how its working here?
tagged with: jquery
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/42799629
has body: I am the guy who newly enter in angular.js. In javascript and jQuery we can return single statement.If we want to return more will fetch as array or object. But how its working here. Can any one please explain what is the concept here. Sorry for basic level question. (function () { angular.module("app", ['ngRoute','app.controller']).config(["$routeProvider", function ($routeProvider) { var routes, setRoutes; return routes = ["test"], setRoutes = function (route) { var config, url; return url = "/" + route, config = { templateUrl: "views/" + route + ".html" }, $routeProvider.when(url, config) }, routes.forEach(function (route) { return setRoutes(route) }), $routeProvider.when("/", { redirectTo: "/test" }).when("/404", { templateUrl: "" }).otherwise({ redirectTo: "/testNone" }) } ]).run( function() { }); }.call(this));
has comment: http://stackoverflow.com/comment/42799689
has comment: http://stackoverflow.com/comment/42799555
has comment: http://stackoverflow.com/comment/42799429
score: 0
has answer: http://stackoverflow.com/a/27152780
answer count: 1
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/27011860
type: Question
upvote count: 0
accepted answer: http://stackoverflow.com/a/27012585
tagged with: javascript
score: -1
answer count: 1
has comment: http://stackoverflow.com/comment/42550828
favorite count: 0
has answer: http://stackoverflow.com/a/27012585
has title: AmStockCharts Axis Orientation to Right Side of the Chart
type: AnsweredQuestion
tagged with: amcharts
downvote count: 1
has body: I have an AmStock chart as follows http://jsfiddle.net/w6p1kqrm/embedded/result/ Now I want to change the value Axis from left to right. Are there any ways to do this? Thanks!

http://stackoverflow.com/q/27019934
tagged with: javascript
has comment: http://stackoverflow.com/comment/42564727
tagged with: dom-events
upvote count: 2
has body: I have created a HTML5 Web App. I use an image control. When the image src is assigned I set a local variable =1 When the image has finished loading I set it to 0. If the variable = 0 and there is another image available from my server I repeat the process. If the img.onerror is raised i set the local variable to 0 I have noticed that if my mobile loses internet connection and then gets it back that the local variable is 'stuck' on 1 and the img.src is never updated. This does not happen all the time though. I am guessing that neither img.onload or img.onerror has been raised. So my question is are there any other events the img control raises that I can put handler in for? The code: My JS function is notified by signalR that an image is available on my server. if (ImageIsLoaded1.Status = 0) { var d = new Date(); var n = d.getTime(); ImageIsLoaded1.Status = 1; staticImgArray.src = './NewFrame.ashx?a=' + n } staticImgArray.onload = function () { ImageIsLoaded1.Status = 0; }; staticImgArray.onerror = function () { ImageIsLoaded1.Status = 0; };
accepted answer: http://stackoverflow.com/a/27023572
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42564921
favorite count: 0
has answer: http://stackoverflow.com/a/27023572
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42564698
score: 2
downvote count: 0
tagged with: image
type: Question
has title: What HTML5 images events are available to the developer

http://stackoverflow.com/comment/42798826
has text: `Object.keys(getEventListeners(this))` will only gives you numbers of different events bound. But will not count if the same element have multiply `click`-events bound.
type: AnswerComment
score: 2
comment on: http://stackoverflow.com/a/27152041
type: Comment

http://stackoverflow.com/q/27134050
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/27152883
tagged with: javascript
has comment: http://stackoverflow.com/comment/42766604
upvote count: 1
answer count: 1
has body: I'm trying to create some tools on a canvas. On of the tools I would like to create is a line with an arrow at the end. I am able to get the code to work on it's own, but when I try and add along side other tools it does not draw the arrowhead, it will only draw a line. I'm not to sure what I am missing in my code to get it to work. Any help would be appreciated, maybe there is a better way, I am open to suggestions. This code does not work; paper.install(window); var forward; window.onload = function() { paper.setup('sketx-canvas'); forward = new Tool(); var pathforward; forward.onMouseDown = function(event) { // Create a new path and set its stroke color to black: pathforward = new Path({ segments: [event.point], strokeColor: 'red', strokeWidth: 4, }); } // While the user drags the mouse, points are added to the path // at the position of the mouse: forward.onMouseDrag = function(event) { pathforward.add(event.point); } // When the mouse is released, we simplify the path and add arrow: forward.onMouseUp = function(event) { pathforward.simplify(300); var vector = pathforward.getPointAt(pathforward.length) - pathforward.getPointAt(pathforward.length-25); var arrowVector = vector.normalize(18); var path2 = new Path({ segments: [pathforward.getPointAt(pathforward.length) + arrowVector.rotate(145), pathforward.getPointAt(pathforward.length), pathforward.getPointAt(pathforward.length) + arrowVector.rotate(-145)], fillColor: 'black', strokeWidth: 6, }); path2.scale(1.3); } } This code does work; var path; function onMouseDown(event) { // Create a new path and set its stroke color to black: path = new Path({ segments: [event.point], strokeColor: 'red', strokeWidth: 4, // if we want dashed lines use dashArray: [2, 4], }); } // While the user drags the mouse, points are added to the path // at the position of the mouse: function onMouseDrag(event) { path.add(event.point); } // When the mouse is released, we simplify the path and add arrow: function onMouseUp(event) { path.s…
tagged with: paperjs
favorite count: 0
has comment: http://stackoverflow.com/comment/42797687
has comment: http://stackoverflow.com/comment/42797707
has title: PaperJS and drawing an arrow at end of a line when adding multiple tools
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27152883

http://stackoverflow.com/a/27000574
type: Answer
has body: Not really. The cross domain request is not allowed for security reasons. What you can do is the following: Write a PHP script which just forwards your request and place this PHP script in the same server as your JavaScript. Your JS will thereby perform the request on the domain and will not end up with an error.
has comment: http://stackoverflow.com/comment/42566584
answers question: http://stackoverflow.com/q/27000511
score: 0

http://stackoverflow.com/q/27146881
accepted answer: http://stackoverflow.com/a/27147492
tagged with: series
has body: I have an mouseOver and mouseOut event for my series, so that the line color of default-grey changes to red when a mouse hovers over it, and back to grey when the mouse is moving on. Now, I'd like to include some kind of {if} routine in order to change the line color from red to grey or black depending on the series name. But what would be the right command to check for the series-name? I tried it with "series.name", with "graph.attr.name", and others, but in vain. Here is the fiddle. And the code: $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: "container", type: "line" }, title: { text: "Improved Drinking Water Coverage - Percentage of Total Population", align: "center", y: 20, style: { fontFamily: "Arial", fontSize: "20px", fontWeight: "bold", color: (Highcharts.theme &amp;&amp; Highcharts.theme.textColor) || "black" } }, subtitle: { text: "200 countries comparison", align: "center", y: 40, style: { fontFamily: "Arial", fontSize: "12px", fontWeight: "", color: (Highcharts.theme &amp;&amp; Highcharts.theme.textColor) || "black" } }, xAxis: { categories: ['1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000','2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012'], labels: { step: 2 }, tickWidth: 0, endOnTick: true, showLastLabel: true }, yAxis: { title: { text: "% of Population", align: "high", endOnTick: false, maxPadding: 0.2, rotation: 0, x: 0, y: -20 }, min: 0, max: 100 }, legend: { enabled: false }, tooltip: { crosshairs: true, useHTML: true, headerFormat: '&lt;small&gt;{point.key}&lt;/small&gt;&lt;br /&gt;', pointFormat: '&lt;span style="color: #ef0012"&gt;&lt;b&gt;{series.name}:&lt;/b&gt;&lt;/span&gt;' + ' {point.y}', footerFormat: '' }, plotOptions: { series: { connectNulls: true, shadow: false, lineWidth: 1, marker: { enabled: false }, events: { mouseOver: function() { this.graph.attr('stroke', '#FF0000'); }, mouseOut: function() { // =================================================…
has title: How to find series name in Highcharts for mouseOut-event?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27147492
type: Question
tagged with: highcharts
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/42546056
comment on: http://stackoverflow.com/q/27009041
has text: Should be `\\"` if the value of the property `Search expression` is just a single `"`
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/42581596
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27029259
type: QuestionComment
has text: What is `this.isTrue` doing here? `this` in a controller references the instance of the controller

http://stackoverflow.com/q/27109929
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27113447
has body: I am automating a website, and I was doing well until I came across a drop down box that at the time I thought was a "submit" type. But when I ran my script it did not select anything in the box. It was at this point that I saw that it was actually an "image" type. My question is: Can I select and fill this "image" type with VBscript, without JavaScript, or must I learn JavaScript before I can continue? I have seen mentions of arrays with drop down boxes, but they seem to be for changing a selection in the drop down list, which I don't want to do.
accepted answer: http://stackoverflow.com/a/27113447
has title: Using "image" type drop down box with vbscript
upvote count: 1
answer count: 1
tagged with: vbscript

jquery-events
tags question: http://stackoverflow.com/q/27062551
tag name: jquery-events
tags question: http://stackoverflow.com/q/27087444
tags question: http://stackoverflow.com/q/27031237
tags question: http://stackoverflow.com/q/27025699
tags question: http://stackoverflow.com/q/27042168
tags question: http://stackoverflow.com/q/27151928
tags question: http://stackoverflow.com/q/26998480
tags question: http://stackoverflow.com/q/27004757
type: Tag
tags question: http://stackoverflow.com/q/27073119

http://stackoverflow.com/comment/42531000
type: Comment
comment on: http://stackoverflow.com/q/27000293
type: QuestionComment
score: 0
has text: console.log(response); or using developer tool from browser

http://stackoverflow.com/q/27139059
score: 0
has title: "[Error] ReferenceError: Can't find variable: data" when trying to get JSON data with AJAX / jQuery request
accepted answer: http://stackoverflow.com/a/27139307
has body: I am getting the error "[Error] ReferenceError: Can't find variable: data" when trying to get JSON data with AJAX / jQuery request. I have an index.html file which loads jQuery and tries to get data from an ajax.php file. CONTENT of index.html $.ajax({ url : 'ajax.php', type : 'POST', data : data, dataType : 'json', success : function (result) { alert(result['ajax']); }, error : function () { alert("error"); } }); CONTENT of ajax.php $someVariable = array( 'ajax' =&gt; 'Hello world!' ); echo json_encode($someVariable); Accessing ajax.php through the browser displays the data correctly: {"ajax":"Hello world!"} What am I missing? Thanks.
has answer: http://stackoverflow.com/a/27139307
has comment: http://stackoverflow.com/comment/42776160
tagged with: php
has answer: http://stackoverflow.com/a/27139204
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42776113
possible better answer: http://stackoverflow.com/a/27139204
has comment: http://stackoverflow.com/comment/42775976
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42776169
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/a/27131735
has comment: http://stackoverflow.com/comment/42762455
downvote count: 1
upvote count: 0
score: -1
type: Answer
answers question: http://stackoverflow.com/q/27131613
has body: Problem is here: (!_.isNull(foo.bar)?foo.bar = true:""); That statement makes no sense, and I don't think you can assign a property inside the inline if statement. I also don't know why you're trying to overwrite 123 with true. Be that as it may, what you seem to be trying to do should be accomplishable by this: foo.bar = (!_.isNull(foo.bar) ? true : "");

http://stackoverflow.com/comment/42614109
type: Comment
type: QuestionComment
score: 1
has text: Uhhh, is there code already that you've done? What about some more explanation? Also can you use jQuery or no?
comment on: http://stackoverflow.com/q/27048073

http://stackoverflow.com/a/27005036
accepted answer of: http://stackoverflow.com/q/27004944
downvote count: 0
upvote count: 8
type: AcceptedAnswer
score: 8
has body: You need to remove the following rule: #cssmenu ul li a:after { content: ""; display: block; position: absolute; right: -3px; top: 19px; height: 6px; width: 6px; background: none repeat scroll 0% 0% #FFF; opacity: 0.5; list-style: outside none none; }
answers question: http://stackoverflow.com/q/27004944
type: Answer

http://stackoverflow.com/q/27006269
tagged with: google-maps-markers
upvote count: 0
has comment: http://stackoverflow.com/comment/42542144
has comment: http://stackoverflow.com/comment/42542649
has answer: http://stackoverflow.com/a/27068318
favorite count: 0
has body: I am using this code to create a Google map with 3 points that are hidden within one and when the one marker is clicked thepoints either get merged into the one or they open up into 3 separate ones, however the map is not appearing can any one examine my code and see the potential problem? favorite cities
type: Question
has comment: http://stackoverflow.com/comment/42542134
answer count: 2
possible better answer: http://stackoverflow.com/a/27007259
accepted answer: http://stackoverflow.com/a/27068318
tagged with: markerclusterer
has comment: http://stackoverflow.com/comment/42542572
has comment: http://stackoverflow.com/comment/42542476
has answer: http://stackoverflow.com/a/27007259
has title: Debug my Google map Cluster Code
has comment: http://stackoverflow.com/comment/42541689
has comment: http://stackoverflow.com/comment/42541944
tagged with: javascript
score: -4
has comment: http://stackoverflow.com/comment/42542264
tagged with: google-maps-api-3
downvote count: 4
has comment: http://stackoverflow.com/comment/42542400
tagged with: google-maps
type: AnsweredQuestion

http://stackoverflow.com/q/27036392
has answer: http://stackoverflow.com/a/30188966
has title: jquery.steps and validation not working - form content not visible (invisible)
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27040752
tagged with: forms
upvote count: 4
tagged with: jquery-steps
has body: I already asked this question once, and got a few useful replies, marked it as answered and applied everything. It seemed like it worked, but sadly it doesnt. The problem is: The forms within the different steps fields are empty. Well, I can't tell if every step is empty since I cant see and enter anything in the first step and therefore cant procede to the next step since the validations seems to be working. I dont know why. I am sticking to the example given on the jquery steps page: http://www.jquery-steps.com/Examples#advanced-form It's exaclty the same code BUT: My forms are empty. It looks like this: My Code is: Demo Account Account Information User name * Password * Confirm Password * (*) Mandatory Profile Profile Information First name * Last name * Email * Address Age (The warning step will show up if age is less than 18) * (*) Mandatory Warning You are to young Please go away ;-) Finish Terms and Conditions I agree with the Terms and Conditions. Can someone help?
answer count: 2
tagged with: validation
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27040752
possible better answer: http://stackoverflow.com/a/30188966

http://stackoverflow.com/comment/42618830
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27050600
type: Comment
has text: @user3194721 what do you mean by "hard coding"? What are you using then?

http://stackoverflow.com/q/27039677
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How to find, insert and delete properties in a recursive, nested Object
tagged with: nest-nested-object
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27054491
tagged with: recursion
has comment: http://stackoverflow.com/comment/42598790
tagged with: underscore.js
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: I have a JavaScript object that looks as follows: var obj = { "id": 1098 "someData": {}, "children": [ { "id": 2124 "someData": {}, "children": [...] }, { "id": 1298, "someData": {}, "children": [ { "id": 1290, "someData": {}, "children": [...] } ] ] } As you can see the parent is always an object with an id, some data and children that have the same structure as the parent. In theory it can be nested infinitely. I need two operations now: add and delete somewhere in this structure. "Add this object as a child of the parent with the id 1298" "Remove the object with the id 2124" Maybe there is even a framework that works with recursive data?

http://stackoverflow.com/comment/42657316
has text: in Heroku it is adviced to not hard code the port `app.set('port', process.env.PORT || 80)` `var server = app.listen(app.get('port'), function () { console.log('working! on port ' + app.get('port'))` })
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27072565

http://stackoverflow.com/comment/42575633
score: 1
type: AnswerComment
has text: When I run this in node I get the output you sought - just learn how code snippets work so you can see it in action! But I agree that iterating over keeper fields in the way you do makes more sense
comment on: http://stackoverflow.com/a/27025638
type: Comment

http://stackoverflow.com/a/27283027
score: 0
has body: If using jQuery is okay for you, just use jQuery selector: $(btn,btn2,btn3).click(function() { TweenMax.staggerTo([box4, box3, box2, box, box8, box7, box6, box5, box9, ], 1, {right:"-25000", ease:Quad.easeIn}, 0.05); }); jQuery selector Hint: $("#firstbutton , #secondbutton , #thirdbutton") // Select buttons directly by ID $(".buttons") // Select buttons by class.
type: Answer
answers question: http://stackoverflow.com/q/27032501

http://stackoverflow.com/comment/42658771
comment on: http://stackoverflow.com/q/27073361
score: 0
type: QuestionComment
type: Comment
has text: What about Table Header?

http://stackoverflow.com/a/29049545
score: 3
upvote count: 3
has body: The phantom callback doesn't work this way, the function you are sending as callback will be stringified and recompiled in the phantom context where your dependencies will be unknown. Is a late answer but i didn't find anything like this out there in the wild. So maybe will help others. You have to generate the html out of the page context, right after you define jade and others, and compile the result into a function which you'll send as callback: //there I define all varaibles (jade, fs, etc., so I am sure that they are correct) var fn = jade.compile(headerTemplate); //Jade is undefined in phantom context var templateData = report; var generatedHtml = fn(templateData); //You can use some patterns in your template for pageNum and numPages like #pageNum# and replace them after compilation. //here you are compiling the result into a function which you will send //as callback(you have to remove all spaces and all breaklines to avoid compilation errors) var headerCallbak = 'function(pageNum, numPages) { var x = \''+ generatedHtml .trim().replace(/(\r\n|\n|\r)/gm,"") +'\'; return x.relpace("#pageNumber#", pageNum).replace("#numPages#",numPages);}'; function generatePage(_page, reportConfig, phantom, html, report) { _page.set('viewportSize', reportConfig.viewportSize); var config = _.extend(reportConfig.paperSize, { header: { height: "2cm", contents: phantom.callback(headerCallbak) } , footer: { height: "1cm", contents: phantom.callback(function (pageNum, numPages) { return " Page " + pageNum + " of " + numPages + " "; //WORKS fine }) } } ); _page.set('paperSize', config); _page.setContent(html); return _page; }
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/110777967
accepted answer of: http://stackoverflow.com/q/27044459
answers question: http://stackoverflow.com/q/27044459

http://stackoverflow.com/q/27136615
tagged with: asp.net
favorite count: 0
has body: New to asp.net Showing results for FU @{ var sfuId = "Bar"; } @if (sfuId == "Bar") { } Works but how do I assign var sfuId = selectedFu() ? selectedFu().fuId.I have tried var sfuId = ", data-bind="if:, and ko.observable() but can't seem to get anything to work. Thank You tkestowicz. knockoutjs.com is a great site. I will read through and post if I figure it out.
tagged with: http://stackoverflow.com/tag/html
tagged with: razor
has answer: http://stackoverflow.com/a/27158718
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/36557621
accepted answer: http://stackoverflow.com/a/36557621
has answer: http://stackoverflow.com/a/27138120
type: Question
tagged with: asp.net-mvc
score: 1
has title: How to assign data-bind value to javascript variable
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/27138120
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42597117
score: 0
type: QuestionComment
has text: Just read our [tutorial](http://www.highcharts.com/docs/working-with-data/preprocessing-live-data) for getting live data from the server.
type: Comment
comment on: http://stackoverflow.com/q/27015266

http://stackoverflow.com/q/27051330
downvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/27051459
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42619992
favorite count: 0
has comment: http://stackoverflow.com/comment/42620552
has answer: http://stackoverflow.com/a/27051452
has body: I'm using jquery.feeds.js to aggregate rss feeds and preprocessing the data received with jsonp.js. The problem is I can't use the variable summarize I've set within the preprocess function outside of it. I did set it as a universal variable though so I don't know what I could be doing wrong. Could it be a problem that I'm running multiple JSON requests? My code: $('#feed').feeds({ feeds: { reuters: 'http://feeds.reuters.com/reuters/businessNews' }, max: 2, preprocess: function ( feed ) { var articleLink = (this.link); var summarize = ''; $.getJSON({ url: 'https://jsonp.nodejitsu.com/?url=http://clipped.me/algorithm/clippedapi.php?url='+articleLink+'&amp;callback=?', corsSupport: true, jsonpSupport: true, success: function(data){ var summarize = data.summary } }); alert(summarize); this.contentSnippet = summarize }, entryTemplate: '&lt;h3&gt;&lt;!=title!&gt;&lt;/h3&gt;&lt;p&gt;&lt;!=contentSnippet!&gt;&lt;/p&gt;&lt;i&gt;&lt;!=link!&gt;&lt;/i&gt;' }); And a JSFIDDLE
has comment: http://stackoverflow.com/comment/42620490
has comment: http://stackoverflow.com/comment/42620084
has comment: http://stackoverflow.com/comment/42620753
accepted answer: http://stackoverflow.com/a/27051837
linked to: http://stackoverflow.com/q/14220321
upvote count: 0
has comment: http://stackoverflow.com/comment/42620004
has answer: http://stackoverflow.com/a/27051837
type: Question
has comment: http://stackoverflow.com/comment/42620037
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27051452
has comment: http://stackoverflow.com/comment/42620027
tagged with: http://stackoverflow.com/tag/json
has title: jQuery use variable outside function

http://stackoverflow.com/q/27068647
downvote count: 0
has title: Onedrive cors download in javascript
tagged with: onedrive
upvote count: 8
type: Question
tagged with: cors
has answer: http://stackoverflow.com/a/29432479
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/35583833
score: 8
tagged with: download
has body: I'm trying to process onedrive files in client-side javascript, but first I need a way to use XMLHttpRequest to download the file. Onedrive supports cors for a lot of operations, but for downloading the file into javascript there is the following problem: As mentioned here: onedrive rest api manual I can send a request to: GET https://apis.live.net/v5.0/FILE_ID/content?access_token=ACCESS_TOKEN and it will reply with a location header redirecting the browser to the file. The problem is when I send these requests through XHR, the browser always sends the Origin header with the request. For the first request I described above, onedrive also replies with an Access-Control-Allow-Origin:* header, so the request is allowed in the browser. However, when the browser is redirected to the actual location of the file, that resource does not have the Access-Control-Allow-Origin header, so the XHR request is denied by the browser(chrome sends an Origin header set to null for the redirect request). I've also tried getting the location but not redirecting automatically, and then sending another XHR request, this will set the origin header to the domain of my site, but the result is the same. As I mentioned in the beginning, I need to process the data in javascript, so I'm not asking about how to download onedrive files to hard drive. I need the data to be accessible by javascript in the webpage. I know that I can use server side programming to get the file data for me and then send it to the client, but for my application this is not an option(at least this is not what I'm asking for at the moment). If there is no way to do this, does anyone have an idea why they would implement their api this way? To allow javascript to get the location through cors and redirect but not include a cors header for the redirected resource. Why not just deny cors in the first place? Is this a bug?
type: UnansweredQuestion
tagged with: http-redirect
has answer: http://stackoverflow.com/a/28832045
answer count: 4
has answer: http://stackoverflow.com/a/39778196

http://stackoverflow.com/q/27026071
type: UnansweredQuestion
tagged with: google-apps-script
has comment: http://stackoverflow.com/comment/42576944
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42688043
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/42577369
has title: userHow to collect the values from html form for variable input values in google app script?
has answer: http://stackoverflow.com/a/27090599
tagged with: web-deployment-project
has comment: http://stackoverflow.com/comment/56681192
has comment: http://stackoverflow.com/comment/42622669
upvote count: 1
answer count: 1
has body: I am creating the input fields with the add more feature which are then sent to the google script file, how can I collect the values of the fields as shown in code I implemented below.. google app script file code.gs function getFormValue(formValue) { var myarr= {}; var count = formValue.count; for(var g = 1; g<=count; g++ ) { user["I"+g] = formValue.user+g; // error, what to do here } // code } index.html $(document).ready(function() { var counter = 2; $("#addMoreUser").click(function() { if (counter > 7) { alert("Only 7 Users are allowed"); return false; } var newRowDiv = $(document.createElement('div')) .attr("id", 'rowDiv' + counter); newRowDiv.after().html(' '); newRowDiv.appendTo("#rowDivGroup"); $("#count").val(counter); counter++; }); $( "#submitForm" ).submit(function() { google.script.run.withSuccessHandler(function(ret){ console.log(ret); }).getFormValue(this); //"this" is the form element }); }); </script Add More Users
has comment: http://stackoverflow.com/comment/42622955
tagged with: javascript

http://stackoverflow.com/comment/42791264
has text: I need to test it, but I think var i = index;apa(apartment, i); could work
comment on: http://stackoverflow.com/a/27147991
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27045083
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27044023
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27044023
type: Answer
has body: You have to remove the new lines before your OR and also set the G (global flag). Working demo

http://stackoverflow.com/comment/42590704
type: AnswerComment
has text: This is one of the approach +1 to you mate
type: Comment
comment on: http://stackoverflow.com/a/27034052
score: 0

http://stackoverflow.com/a/32791823
answers question: http://stackoverflow.com/q/27002494
type: Answer
has body: Other simple solution: $scope.deleteUser = function (user) { $http.delete("php/delete.php", {params: {id: user}}).success(function (data, status){ }); }; From this link: Angular - $http.delete returns success but doesn&#39;t works The php code is on link too.
score: 0

http://stackoverflow.com/comment/42748430
comment on: http://stackoverflow.com/a/27123201
score: 0
has text: Yeah thanks man it works i only have one problem now... when i try to put the Categorie in the append it doesnt work, i thinks it is a problem with the " and '
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27078897
downvote count: 0
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42667886
has body: I think I am understanding last-child wrong as it actually removes the last element, it doesn't matter what it is. No. $('dl.plain.userStats > dd:last-child') will remove only last dd which is also the last child of dl.plain.userStats. $('dl.plain.userStats > bla:last-child').remove(); it also works. No. $('dl.plain.userStats > bla:last-child').remove(); will not remove last dt unless your bla is dt Consider this example : http://jsbin.com/huqeketiya/1/edit 1 2 3 4 5 This code : $("div:last-child" ).css('background-color','red') Will not paint anything ! as i said : it looks for a div which is also last child , so there is no result here
answers question: http://stackoverflow.com/q/27078850
has comment: http://stackoverflow.com/comment/42668222

http://stackoverflow.com/comment/42709029
type: QuestionComment
has text: the header `Access-Control-Allow-Origin` is response header it should be set from api which is `http://example.com` not from your own ajax request.
score: 0
comment on: http://stackoverflow.com/q/27102561
type: Comment

http://stackoverflow.com/comment/42577775
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27027164
has text: Thank You! the .elements was the problem. I got that syntax from W3Schools site, didn't realise it was wrong. Edit: Damn, i thought that solved it. It didn't, the img elements from the Test.html are still not accesible.

http://stackoverflow.com/comment/51013704
type: Comment
comment on: http://stackoverflow.com/a/27149303
has text: Note, this only worked for me if I specified the Highcharts lang decimalPoint and thousandsSep values as you did in your jsFiddle.
score: 4
type: AnswerComment

http://stackoverflow.com/a/27094502
accepted answer of: http://stackoverflow.com/q/27094323
type: Answer
has comment: http://stackoverflow.com/comment/42695126
downvote count: 1
has body: I would highly recommend you to use the moment.js library. This is a complete date manipulation library. Your problem would be solved by this moment().year(2014).week(47).day(3).toDate();
upvote count: 5
score: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27094323

http://stackoverflow.com/q/26992343
has answer: http://stackoverflow.com/a/26992814
linked to: http://stackoverflow.com/q/448981
tagged with: css
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26992714
has body: I’ve written this code which works. Basically, when user hovers a image, a text appears over the image. It’s a gallery so i need to use $(this).childrenin order to make the correct element to show. What i don’t understand, i can’t make the h2 .nom_realisation slide toogle. I’ve tried a couple of things without success. I’m sure it’s pretty simple . If anyone can point me in the right direction ? DEMO : http://jsfiddle.net/Vinyl/725hcc62/1/ CODE : CSS .hide { display : none; } .text { z-index:100; position:absolute; top:0; left:0; height:100%; width: 100%; text-align: center; display: table; background: rgb(134, 0, 0); /* Fall-back for browsers that don't support rgba */ background: rgba(134, 0, 0, .7); } h2.nom_realisation { color: #ffffff !important; font-family:'Oswald', sans-serif; font-size: 30px !important; font-weight: 300 !important; text-transform: uppercase; text-decoration: none !important; margin: 0; padding: 0; vertical-align: middle; display: table-cell; width: 100%; } h2.nom_realisation a, h2.nom_realisation a:hover { color: #ffffff !important; text-decoration: none; } .container_img img { position:absolute; left:0; top:0; } .container_img { height:232px; width:232px; position:relative; } .image_test { width:232px; height: auto; } HTML Lorem ipsum JavaScript / jQuery (function ($) { $(document).ready(function () { $(".container_img").hover(function () { $(this).children('.container_nom_realisation').show('slow'); $(this).children('.text').slideToggle('slow'); }, function () { $(this).children("img").fadeTo(200, 1) .end().children(".text").hide(); $(this).children('.container_nom_realisation').hide('slow'); //.end().children(".hover").slideToggle("slow"); }); }); })(jQuery);
type: Question
has answer: http://stackoverflow.com/a/26992589
tagged with: javascript
has title: How to slideToggle text over an image?
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/26992808
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26992714
possible better answer: http://stackoverflow.com/a/26992808

http://stackoverflow.com/a/27116023
score: 1
has comment: http://stackoverflow.com/comment/42734886
has comment: http://stackoverflow.com/comment/42734644
accepted answer of: http://stackoverflow.com/q/27115950
upvote count: 1
has comment: http://stackoverflow.com/comment/42734896
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27115950
has body: You need to set a Timeout function Javascript: setTimeout(function() { var button = document.getElementById('test'); button.style.display = "";} , 5000); HTML: Download After your comment, to set a countdown on the button, look at this: new HTML: Download new Javascript: var downloadButton = document.getElementById("test"); var counter = 5; downloadButton.innerHTML = "You can download the file in 5 seconds."; var id; id = setInterval(function() { counter--; if(counter < 0) { downloadButton.innerHTML = "Download"; downloadButton.removeAttribute('disabled'); clearInterval(id); } else { downloadButton.innerHTML = "You can download the file in " + counter.toString() + " seconds."; } }, 1000); DEMO
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/42735212

http://stackoverflow.com/q/27150541
type: Question
has answer: http://stackoverflow.com/a/27150735
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27150802
has comment: http://stackoverflow.com/comment/42795988
has answer: http://stackoverflow.com/a/27150802
answer count: 3
has comment: http://stackoverflow.com/comment/42795642
has comment: http://stackoverflow.com/comment/42795871
accepted answer: http://stackoverflow.com/a/27150735
linked to: http://stackoverflow.com/q/17487058
favorite count: 0
has answer: http://stackoverflow.com/a/28646221
tagged with: compiler-errors
has body: I am trying to parse the following string: {"text":"Hej"}, in JS This is valid JSON. It's a property on an object. But when I try to parse it, I get the following error: Why does this happen?
has comment: http://stackoverflow.com/comment/42795773
has title: JSON.parse() wont accept valid JSON
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42795896
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has comment: http://stackoverflow.com/comment/42795639

http://stackoverflow.com/a/27072771
has body: Actually, a touch event is a specific type of pointer event based on the definition. From W3.org, Pointer Events, Section 1 A pointer can be any point of contact on the screen made by a mouse cursor, pen, touch (including multi-touch), or other pointing input device. Also: The events for handling generic pointer input look a lot like those for mouse: pointerdown, pointermove, pointerup, pointerover, pointerout, etc. This facilitates easier content migration from Mouse Events to Pointer Events. Pointer Events provide all the usual properties present in Mouse Events (client coordinates, target element, button states, etc.) in addition to new properties for other forms of input: pressure, contact geometry, tilt, etc. So authors can easily code to Pointer Events to share logic between different input types where it makes sense, and customize for a particular type of input only where necessary to get the best experience. So, setting pointer-events:none; will affect both touch and mouse events. So to answer your question; you can't distinguish between mouse events (I assume by pointer events in your question you basically meant mouse events) and touch events with css only and the pointer-events property. But since mouse events and touch events are different, you can revert to javascript for your needs in this case.
upvote count: 5
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27072341
score: 5

http://stackoverflow.com/q/27126573
has comment: http://stackoverflow.com/comment/42752951
score: 1
has answer: http://stackoverflow.com/a/27126611
has body: I've got that piece of code: var result; $.when(result=make_req("GET", "ajax.php?request=opendiv", true, null, null)).done(alert(result)); Can you tell me, why does alert show 'undefined'? make_req() makes some ajax call, it works properly and returns good value when I call it alone. I want to store results from make_req in the variable 'result' and then use it.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42753977
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42753697
tagged with: ajax
has comment: http://stackoverflow.com/comment/42753110
has title: Wait for return from function
has answer: http://stackoverflow.com/a/27126595
linked to: http://stackoverflow.com/q/12421860
has comment: http://stackoverflow.com/comment/42753463
has comment: http://stackoverflow.com/comment/42761585
linked to: http://stackoverflow.com/q/14220321
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42752907
upvote count: 1

http://stackoverflow.com/comment/42641032
type: QuestionComment
comment on: http://stackoverflow.com/q/27062282
type: Comment
has text: Animate in snake movement is possible
score: 0

http://stackoverflow.com/q/27058947
type: Question
tagged with: javascript
tagged with: date
has title: How to change date format in JS
has body: I found a solution to transform a date like: Thu Sep 04 2014 00:00:00 GMT+0200 (Romance Daylight Time) to a format french 04/09/2014 How can i achieve this?
linked to: http://stackoverflow.com/q/3880615
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/1056728
has answer: http://stackoverflow.com/a/27059141
accepted answer: http://stackoverflow.com/a/27059141
has comment: http://stackoverflow.com/comment/42633146
has comment: http://stackoverflow.com/comment/42633099
possible better answer: http://stackoverflow.com/a/27059400
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27059400

http://stackoverflow.com/comment/42617062
type: Comment
type: QuestionComment
has text: why are you trying to do this? Surely there must be a better option… it seems like you are perhaps trying to get the n-th element of an array, is it that?
comment on: http://stackoverflow.com/q/27049747
score: 1

http://stackoverflow.com/q/27080266
tagged with: http://stackoverflow.com/tag/html
tagged with: performance
answer count: 0
has comment: http://stackoverflow.com/comment/42672110
tagged with: dom
has comment: http://stackoverflow.com/comment/42671463
type: Question
has body: Question in summary: Is it faster to get a table rows sum by using jquery:filter class and iterate through each row value… Or Is it faster to maintain a dictionary key/value pair reflecting the table data &amp; iterate through the dictionary instead? (The number of rows for this application will be in the 3-30 range.) The verbose details: I have a table with 5 columns. 2 columns contain number inputs. 3 columns contain number outputs. Total number of rows grows or shrinks depending on user add/deleting items. Each time user makes a change to any single row entry number input, the script must make calculations &amp; update the values of all other entries on every row. Because the value of all outputs are in ratio to each other, the script must iterate through each row, and recalculate the outputs on every change. The calculations require: The sum of the row entries of one column. The individual inputs of each row of 2 of the columns. The total number of rows. The script is written in javascript. The outputs are displayed in jquerymobile/html. The script maintains a unique row_id for each row entry. I'd like the outputs to update realtime… meaning as the user is adjusting a slider input, the outputs update automatically… and do it with as little lag as possible. With that in mind... Here's the question: For performance what is the best approach to make the calculations &amp; update the DOM? A) Use jquery:filter by class to get the values of the entries for each row. Iterating through each entry to get the sum. Then iterate through each row entry, make the calculations for each row, then update the DOM for the 3 outputs. Or B) Maintain a dictionary key/value pair (using the row_id as the key). Each time a row is added/deleted, the dictionary gets updated. Maintain a separate sum variable, updating it each time an input is changed and/or a row is deleted. Maintain a separate number of rows variable, update each time a row is added/deleted. Iterate through the dictionary…
has title: Best Approach For Performance When Running Calculations On Table Values…
has comment: http://stackoverflow.com/comment/42671533
tagged with: javascript
tagged with: jquery
score: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42706270
type: QuestionComment
score: 1
has text: As a thumb rule, think as *mobile-first* then consider using `.col-*-push-#`/`.col-*-pull-#` classes in larger screens. You might find this helpful: http://stackoverflow.com/questions/25714852/change-the-order-of-col-12-columns-in-bootstrap-3-by-using-push-pull
comment on: http://stackoverflow.com/q/27101022
type: Comment

http://stackoverflow.com/comment/42784989
comment on: http://stackoverflow.com/q/27131476
type: Comment
type: QuestionComment
has text: you cant attach an infowindow to a cluster, what about randomizing the coordinates so they'll be separate markers?
score: 0

http://stackoverflow.com/q/27033902
has comment: http://stackoverflow.com/comment/42588996
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42589487
has comment: http://stackoverflow.com/comment/42589274
has answer: http://stackoverflow.com/a/27034301
possible better answer: http://stackoverflow.com/a/27034052
has body: I have created a table in my html page where each cell has a form field corresponding to the title. Initially I have two rows as shown in the image below. I have written a jquery function that should generate an extra row on click of the first form element in in the last row. The function is given below. $(document).ready(function() { var i = 2; $("#s_prd" + i).click(function() { $("#fm_orditms").append( ' \n\ \n\ \n\ Select \n\ \n\ \n\ \n\ \n\ \n\ Select \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ \n\ Select \n\ Air \n\ Digital \n\ Hand \n\ Road \n\ Sea \n\ \n\ \n\ \n\ ' ); i++; }); }); Since the initial value of i=2, the generation of the row only happens when I click on the second row. I want it to be in such a way that every time I click on the first first field of the last row in the table an additional row is generated. Please tell me how to achieve this particular feature.
has answer: http://stackoverflow.com/a/27034052
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42588837
type: Question
accepted answer: http://stackoverflow.com/a/27034301
answer count: 2
has title: Generating table row based on focus to a text field
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/27024841
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27024770
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27024770
type: Answer
has body: There 2 solutions. Solution 1 give every form a unique ID so you can target it. Use the comment-textarea to find the form like this : $('.comment-textarea').keypress(function(e){ if(e.which == 13 &amp;&amp; e.shiftKey){ } else if(e.which == 13){ e.preventDefault(); $(this).closest('.comment-form').trigger('submit'); } }); This will find the first parent with the class "comment-form"
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42573360

http://stackoverflow.com/a/27108902
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42723134
answers question: http://stackoverflow.com/q/27108640
downvote count: 0
score: 1
has body: No. You're not doing anything wrong. This is the default behavior in the web and you browser makes sure it doesn't navigate to a link that you're already on, common sense if you think about it. You can reload the route if you manually navigate to it and call $route.reload() (instead of using hrefs). For example: $scope.goToRoute= function(url){ $location.path(url); $route.reload(); }

http://stackoverflow.com/q/27085069
has comment: http://stackoverflow.com/comment/42678956
has comment: http://stackoverflow.com/comment/42702090
score: 0
tagged with: pug
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/42679003
has body: When it comes to templating my understanding is that you can do several things: Serve static pages. Pre Compile everything (jade to html) once and then serve the same thing to all. At every request render everything and then serve. Render static parts ahead of time (when app starts) and render dynamic parts at request. Serve vanilla html and render dynamic part at request. Send vanilla html + template and library(engine) and render at client. What i want to do is number 5 and if not then 4. I don't want to rewrite all html, css etc. For the sake of just templating. I want to stick to html. But for part that needs to be dynamic i'd like templating. However if in case that this is not possible. I'd like to be able at least precompile the static part of the page and then compile user specific (dynamic) part at request. I was looking into jade, but i can't figure out how would i do that? Is there a way, there should be, that i can type jade within html so only parts are dynamic are done in jade. I was told to compile jade, then append it to vanilla html. This is not ok. Because it requires me manually piece together html which isn't viable solution if you have lots of html and pages. I hope everything is clear..if not leave a comment.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42678966
has comment: http://stackoverflow.com/comment/42679127
tagged with: node.js
tagged with: mustache
has title: templating in nodejs confused about several things
answer count: 0
has comment: http://stackoverflow.com/comment/42678976
type: Question
has comment: http://stackoverflow.com/comment/42678989

http://stackoverflow.com/a/27124568
has comment: http://stackoverflow.com/comment/42749481
accepted answer of: http://stackoverflow.com/q/27124393
upvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42749661
has comment: http://stackoverflow.com/comment/42749315
type: Answer
score: -2
has comment: http://stackoverflow.com/comment/42750021
has comment: http://stackoverflow.com/comment/42757320
has body: Please get us your example call. You probably mistake in this code: if (eleWidth &lt; size) { increase();}; if (eleWidth &gt; size) { decrease();}; if (eleWidth == size) { stopInc();}; EDIT: Full solution: http://jsfiddle.net/2cfdj6z2/
downvote count: 2
answers question: http://stackoverflow.com/q/27124393
has comment: http://stackoverflow.com/comment/42749437

http://stackoverflow.com/q/27047021
accepted answer: http://stackoverflow.com/a/27047081
has title: How to replace texts inside matching elements via jQuery?
score: 0
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/27047141
has comment: http://stackoverflow.com/comment/42612296
favorite count: 0
has comment: http://stackoverflow.com/comment/42612877
downvote count: 1
type: AnsweredQuestion
has body: HTML: 8,0 8,0 10,0 8,0 I want when if point is 10,0, remove ,0.: 10 I was put alert with length but its not working. $('.point').each(function () { if ($('.point').text().length > 4) { alert("ok"); } }); It was all points get alert. What's my problem? How can I solve it? Snippet $('.point').each(function () { if ($('.point').text().length > 4) { alert("ok"); } }); 8,0 8,0 10,0 8,0
has answer: http://stackoverflow.com/a/27047141
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27047352
has answer: http://stackoverflow.com/a/27047081

http://stackoverflow.com/comment/42820458
score: 0
has text: Wow, thanks for the answer Oleg. Let me parse through all this code and make sure it fits my more complicated grid. This delete operation is a lot more complex!
comment on: http://stackoverflow.com/a/27146298
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27093936
type: AnsweredQuestion
has title: Codeigniter can't read cookie set with Javascript
tagged with: cookies
score: 1
tagged with: codeigniter
has comment: http://stackoverflow.com/comment/42694489
upvote count: 1
has body: I am trying without success to read a cookie in codeigniter that has been set in the browser with Javascript. The cookie is set in the browser as follows: // cookieContents is an array of integers strForCookie = JSON.stringify(cookieContents); date.setTime(date.getTime() + (2 * 24 * 60 * 60 * 1000)); // 2 days $.cookie('savedPlaces', strForCookie, { expires: date }); I have checked in the browser that the cookie is set properly. On the server I have the following codeigniter code in a controller: $this->load->helper('cookie'); $savedPlaces = $this->input->get_cookie('savedPlaces'); if ($savedPlaces == false) echo("Cookie doesn't exist!"); else echo("Cookie is: ".$savedPlaces); The controller function is called by the following html: Saved searches I have never used cookies before so suspect I am doing something fundamentally wrong. Can anyone illuminate me?
type: Question
has comment: http://stackoverflow.com/comment/42694545
tagged with: javascript
has answer: http://stackoverflow.com/a/27096399
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42694425
has comment: http://stackoverflow.com/comment/42694518
accepted answer: http://stackoverflow.com/a/27096399
favorite count: 0
tagged with: php
has comment: http://stackoverflow.com/comment/42694588

http://stackoverflow.com/comment/42550185
has text: What does 'Add button' do? I suppose you create new PurchaseOrderDetail each time...
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27011752

http://stackoverflow.com/comment/42613615
has text: You couldn't have explained it better than this. Makes perfect sense.
comment on: http://stackoverflow.com/a/27047816
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42555961
comment on: http://stackoverflow.com/a/27014232
has text: Just write one more time checked = new HashMap<Integer, Boolean>(getCount());
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27054254
favorite count: 0
has title: jQuery detect scroll on unscrollable element
type: UnansweredQuestion
score: 2
tagged with: detect
answer count: 0
upvote count: 2
tagged with: scroll
type: Question
has body: I want to be able to detect $.scroll(); on unscrollable elements. Example of such element might be something with overflow:hidden; but specificly it's absolute div, width 100% height and width. I want to bind events on scroll on this div. Obvious problem with this is, it doesn't work. I thought about binding only mousewheel and even keyboard keys, but that would not detect every possible scroll event. Such as mobile scroll down, or if anyone has rebinded or uses some sort of different scrolling. I thought of making an extra overlay element, which would be invisible. Which theoreticly would work, but, it cannot be clicked through. Once pointer-events: none; is added, scroll is not detected anymore. So, anyone could give me a hand with this? Thanks.
tagged with: javascript
downvote count: 0

http://stackoverflow.com/comment/42547463
type: AnswerComment
score: 0
type: Comment
has text: So set the `width` and `height` of the `container` yourself: http://jsfiddle.net/b263s37w/3/
comment on: http://stackoverflow.com/a/26995247

http://stackoverflow.com/a/27021808
score: 3
has body: If Bread doesn't supply a constructor, thus using the generic function created in makeClass() Not exactly. properties.constructor, for which you test in your condition, will (almost) always have a value: It does inherit .constructor from Object.prototype. This will make your makeClass() call return the Object function, and sushi is indeed an instanceof Object. So this is one of the cases where we need to use the hasOwnProperty method: … // If the user doesn't supply a constructor, give them a generic function if ( !properties.hasOwnProperty("constructor") ){ properties.constructor = function(){}; } …
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27020711
answers question: http://stackoverflow.com/q/27020711
type: Answer
upvote count: 3

dropzone.js
tags question: http://stackoverflow.com/q/27127220
tags question: http://stackoverflow.com/q/26997664
tags question: http://stackoverflow.com/q/27021055
tags question: http://stackoverflow.com/q/27110093
tags question: http://stackoverflow.com/q/27042588
tags question: http://stackoverflow.com/q/27032298
tag name: dropzone.js
type: Tag

http://stackoverflow.com/a/45506857
has comment: http://stackoverflow.com/comment/96879286
score: 25
has body: Ok, so following a chat with Google engineering and after reading the code I've reached the following conclusions. Passing binary data efficiently is impossible It is impossible to pass binary data efficiently between JavaScript and Java through a @JavascriptInterface: On the Java side: @JavascriptInterface void onBytes(byte[] bytes) { // bytes available here } And on the JavaScript side: var byteArray = new Uint8Array(buffer); var arr = new Uint8Array(byteArray.length); for(var i = 0; i &lt; byteArray.length; i++) { arr[i] = byteArray[i]; } javaObject.onBytes(arr); In the code above (from my old answer) and in Alex's - the conversion performed for the array is brutal: case JavaType::TypeArray: if (value-&gt;IsType(base::Value::Type::DICTIONARY)) { result.l = CoerceJavaScriptDictionaryToArray( env, value, target_type, object_refs, error); } else if (value-&gt;IsType(base::Value::Type::LIST)) { result.l = CoerceJavaScriptListToArray( env, value, target_type, object_refs, error); } else { result.l = NULL; } break; Which in turn coerces every array element to a Java object: for (jsize i = 0; i &lt; length; ++i) { const base::Value* value_element = null_value.get(); list_value-&gt;Get(i, &amp;value_element); jvalue element = CoerceJavaScriptValueToJavaValue( env, value_element, target_inner_type, false, object_refs, error); SetArrayElement(env, result, target_inner_type, i, element); So, for a 1024 * 1024 * 10 Uint8Array - ten million Java objects are created and destroyed on each pass resulting in 10 seconds of CPU time on my emulator. Creating an HTTP server One thing we tried was creating an HTTP server and POSTing the result to it via an XMLHttpRequest. This worked - but ended up costing about 200ms of latency and also introduced a nasty memory leak. MessageChannels are slow Android API 23 added support for MessageChannels, which can be used via createWebMessageChannel() as shown in this answer. This is very slow, still serializes with GIN (like the @JavascriptInter…
downvote count: 0
has comment: http://stackoverflow.com/comment/96878171
answers question: http://stackoverflow.com/q/27034897
has comment: http://stackoverflow.com/comment/96877479
has comment: http://stackoverflow.com/comment/94331205
has comment: http://stackoverflow.com/comment/88315495
upvote count: 25
has comment: http://stackoverflow.com/comment/88323370
has comment: http://stackoverflow.com/comment/123400884
has comment: http://stackoverflow.com/comment/96883139
has comment: http://stackoverflow.com/comment/105531029
has comment: http://stackoverflow.com/comment/123247248
has comment: http://stackoverflow.com/comment/88334787
has comment: http://stackoverflow.com/comment/107052454
has comment: http://stackoverflow.com/comment/77974406
type: Answer
has comment: http://stackoverflow.com/comment/123247459

http://stackoverflow.com/comment/42696534
type: QuestionComment
comment on: http://stackoverflow.com/q/27095153
has text: Thank you for your input matthias I have the position set like you've described, I believe my problem is with my JQuery though.
score: 0
type: Comment

http://stackoverflow.com/q/27110296
favorite count: 0
has comment: http://stackoverflow.com/comment/42723905
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has title: How to highlight selected table cells in AngularJS?
has answer: http://stackoverflow.com/a/37977273
score: 2
has body: I need , for instance, to get the hidden input values in the table cells when the user selects certain cells in a table row by dragging the mouse from the first cell to another one. How do I do this in AngularJS? See picture for a better understanding: http://screencast.com/t/m3hcN11leTh
tagged with: selection
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42723962
has answer: http://stackoverflow.com/a/62862151

http://stackoverflow.com/q/27054969
downvote count: 0
has comment: http://stackoverflow.com/comment/42754969
score: 1
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/42626513
tagged with: mobile
tagged with: javascript
upvote count: 1
has body: I created a Blank CardovaApp in VisualStudio2013 Updated with update 4. as I run it for a test with 'Android Emulator' then bug occurs with Cannot find module 'q' im using a W8.1 machine x64 with 8gb of ram. any advice will be greatly appreciated.
favorite count: 0
tagged with: visual-studio-2013
linked to: http://stackoverflow.com/q/25477665
type: UnansweredQuestion
tagged with: android
has title: VS2013 Apache Cardova Cannot find module 'q'
answer count: 0

math
tags question: http://stackoverflow.com/q/27151311
tags question: http://stackoverflow.com/q/27099797
type: Tag
tags question: http://stackoverflow.com/q/27064773
tags question: http://stackoverflow.com/q/27020791
tags question: http://stackoverflow.com/q/27001523
tags question: http://stackoverflow.com/q/27080357
tags question: http://stackoverflow.com/q/27073598
tags question: http://stackoverflow.com/q/27136553
tags question: http://stackoverflow.com/q/27074330
tags question: http://stackoverflow.com/q/27047749
tags question: http://stackoverflow.com/q/27042094
tags question: http://stackoverflow.com/q/27059638
tags question: http://stackoverflow.com/q/27095251
tags question: http://stackoverflow.com/q/27074158
tags question: http://stackoverflow.com/q/27074190
tag name: math

http://stackoverflow.com/comment/42618175
has text: not throwing any more errors by redefining my module at the top of the log in controller, but I cant help thinking that this is not the Angular way of doing things.
comment on: http://stackoverflow.com/a/27049541
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27062066
has title: Ajax call with bootstrap tooltip
accepted answer: http://stackoverflow.com/a/27099200
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27099200
answer count: 1
tagged with: node.js
type: AnsweredQuestion
has body: I am validating a form with tooltip and did ajax call for back end response with alert message.While I am validating I am using form id for both ajax call and tooltip validation. so my problem was even I got empty text it validate and went to ajax success call.How I can combine tooltip with ajax call. script. $(document).ready console.log('bbbbbbbb'); $('#loginform').submit(function(e) { console.log('submit called'); var data = {}; data.email = $('#username').val(); data.password = $('#password').val(); JSON.stringify(data); console.log(data); $.ajax({ url: "/login", type: "POST", dataType: 'json', data: JSON.stringify({ "objectData": data}), contentType: "application/json", success: function(data) { alert('SUCCESS":'+JSON.stringify(data)); var successVar = data; alert(successVar.data); if(successVar.data == "Invalid username And Password"){ showfailure(); } if(successVar.data == "Login successfully"){ showdiv(); location.href='http://localhost:3000/landing'; } }, }); return false; }); $('#loginform').click(function(){ loginValidation(); }); function loginValidation(){ $('#loginform').validate({ rules : { email_id : { minlength : 5, required : true, email : true }, password : { minlength : 5, required : true } }, messages : { email : "Enter Valid Email Address.", password : "Enter Password" } }); } Login form: .middle .container #login-modal.modal.fade(tabindex='-1', role='dialog', aria-labelledby='myModalLabel', aria-hidden='true') .modal-dialog .modal-content(style='margin-top:120px;') .modal-header.login_modal_header button.close(type='button', data-dismiss='modal', aria-hidden='true') × h2#myModalLabel.modal-title Sign In .modal-body.login-modal .clearfix #social-icons-conatainer .modal-body-left form#loginform(method="#",action="#") .form-group input#username.form-control.login-field(type='email', name='email_id', value='', data-placement='bottom' placeholder='Email Id', maxlength='25',title="Enter your email address here", required) i.fa.fa-envelope.login-fiel…
type: Question

http://stackoverflow.com/a/27138501
has comment: http://stackoverflow.com/comment/42774964
has comment: http://stackoverflow.com/comment/42774942
answers question: http://stackoverflow.com/q/27138391
upvote count: 1
has body: I see you are trying to use chaining. This won't work with your current structure as your selector function will only ever return the last matched element from your querySlectorAll. I think in this case it would be better to either pass a function that you want to do to each element or return an array/nodelist for another function to use; function $(elements, method) { var matches = document.querySelectorAll(elements); for (var i = 0; i &lt; matches.length; i++) { method(matches[i]); } } $('div.test', function (elem) {elem.style.fontSize = '36px';});
score: 0
downvote count: 1
type: Answer

http://stackoverflow.com/q/27012393
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27012492
tagged with: hyperlink
tagged with: javascript
tagged with: jquery
has body: Could someone please share how to create a link and not letting the users know the url of the link? For example in the following website, when you hover over the practice groups the mouse shows that its a hyperlink but the url doesn't get dsplayed. verbling.com/community I am developing a similar page. Kindly share how to create a link and not letting the users know the url of the link.
has answer: http://stackoverflow.com/a/27012497
favorite count: 0
possible better answer: http://stackoverflow.com/a/27012492
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42551917
accepted answer: http://stackoverflow.com/a/27012497
has title: How to create a link without showing the url?
upvote count: 2
downvote count: 2
type: AnsweredQuestion

http://stackoverflow.com/q/27056367
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: http-status-code-404
tagged with: css
score: 2
answer count: 0
has title: Can I detect via JavaScript whether an image will show the alt text or the broken image picture?
type: Question
has body: I'm trying to load a number images, some will produce a 404 and some requests are aborted. If I have this: function addImage(my_image_path) { img = document.createElement('img'); img.onerror = function (evt) { console.log("nope"); console.log(evt); }; img.alt = "COULD NOT DISPLAY IMAGE" img.src = some_path_to_image; document.body.appendChild(img); } Both a 404 and a failed request will trigger the onerror handler and I have no way of differentiating between the cause of the error. However on the screen I can see the 404 is displayed with the browsers broken image while the failed request shows the alt text. Question Is there a way to find out via JavaScript if the browser is defaulting to broken image or alt text? Best before putting putting the image tag on screen. I have tried image.complete, image.naturalWidth|Height but that's all of the tricks I know. Maybe someone can chip in with more magic. Thanks!
tagged with: javascript
tagged with: image
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/50381432

http://stackoverflow.com/comment/42524150
has text: Could you setup a fiddle of this code? I don't think the problem here is the class checking.
comment on: http://stackoverflow.com/q/26996670
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/43348067
type: AnswerComment
comment on: http://stackoverflow.com/a/27104624
type: Comment
has text: I'm actually a newbie in jquery. I copied the method from somewhere which I could not remember and modified it to suit my requirements. Never really go find out why is there a return false needed in the script. :D Thanks for pointing out Larry!! I'm so grateful...
score: 0

forms
tags question: http://stackoverflow.com/q/27113837
tags question: http://stackoverflow.com/q/27078314
tags question: http://stackoverflow.com/q/27081957
tags question: http://stackoverflow.com/q/27038852
tags question: http://stackoverflow.com/q/27092877
tags question: http://stackoverflow.com/q/27099797
tags question: http://stackoverflow.com/q/27126390
tags question: http://stackoverflow.com/q/27093195
type: Tag
tags question: http://stackoverflow.com/q/27073538
tags question: http://stackoverflow.com/q/27006956
tags question: http://stackoverflow.com/q/27074705
tags question: http://stackoverflow.com/q/27138174
tags question: http://stackoverflow.com/q/27007147
tags question: http://stackoverflow.com/q/27062441
tags question: http://stackoverflow.com/q/27116138
tags question: http://stackoverflow.com/q/27024170
tags question: http://stackoverflow.com/q/27001523
tags question: http://stackoverflow.com/q/27025618
tags question: http://stackoverflow.com/q/27027833
tags question: http://stackoverflow.com/q/26994277
tags question: http://stackoverflow.com/q/27075226
tags question: http://stackoverflow.com/q/27137761
tags question: http://stackoverflow.com/q/27001175
tags question: http://stackoverflow.com/q/27007686
tags question: http://stackoverflow.com/q/27152127
tags question: http://stackoverflow.com/q/27080026
tags question: http://stackoverflow.com/q/27085120
tags question: http://stackoverflow.com/q/27114863
tags question: http://stackoverflow.com/q/27074058
tags question: http://stackoverflow.com/q/27083453
tags question: http://stackoverflow.com/q/27067031
tags question: http://stackoverflow.com/q/27003658
tags question: http://stackoverflow.com/q/27095317
tags question: http://stackoverflow.com/q/27026451
tags question: http://stackoverflow.com/q/26999796
tags question: http://stackoverflow.com/q/27036735
tags question: http://stackoverflow.com/q/27053542
tags question: http://stackoverflow.com/q/27026989
tags question: http://stackoverflow.com/q/27036392
tags question: http://stackoverflow.com/q/27036086
tags question: http://stackoverflow.com/q/27011984
tags question: http://stackoverflow.com/q/27106308
tags question: http://stackoverflow.com/q/27037201
tags question: http://stackoverflow.com/q/27125376
tags question: http://stackoverflow.com/q/27136349
tags question: http://stackoverflow.com/q/27003051
tags question: http://stackoverflow.com/q/27020727
tags question: http://stackoverflow.com/q/27006224
tags question: http://stackoverflow.com/q/27062399
tags question: http://stackoverflow.com/q/27092934
tags question: http://stackoverflow.com/q/27028613
tags question: http://stackoverflow.com/q/27135463
tags question: http://stackoverflow.com/q/27116483
tags question: http://stackoverflow.com/q/27065679
tags question: http://stackoverflow.com/q/27024770
tags question: http://stackoverflow.com/q/27085800
tags question: http://stackoverflow.com/q/27116748
tags question: http://stackoverflow.com/q/27113156
tag name: forms
tags question: http://stackoverflow.com/q/27078255
tags question: http://stackoverflow.com/q/27018422
tags question: http://stackoverflow.com/q/27150917
tags question: http://stackoverflow.com/q/27012038
tags question: http://stackoverflow.com/q/27054951
tags question: http://stackoverflow.com/q/27038791
tags question: http://stackoverflow.com/q/27065715
tags question: http://stackoverflow.com/q/27042151
tags question: http://stackoverflow.com/q/27130818
tags question: http://stackoverflow.com/q/27081352
tags question: http://stackoverflow.com/q/27056109
tags question: http://stackoverflow.com/q/27151749
tags question: http://stackoverflow.com/q/27026323
tags question: http://stackoverflow.com/q/27037548
tags question: http://stackoverflow.com/q/27038581
tags question: http://stackoverflow.com/q/27074898
tags question: http://stackoverflow.com/q/27111065
tags question: http://stackoverflow.com/q/27048368
tags question: http://stackoverflow.com/q/27128805

http://stackoverflow.com/comment/42815012
has text: Ah, duh, yeah the script will be executing in the window (global) context so you'll have to set window.proj4. Updated the first option above.
comment on: http://stackoverflow.com/a/27116918
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27036007
type: Answer
has comment: http://stackoverflow.com/comment/42617914
has comment: http://stackoverflow.com/comment/42592737
score: 2
upvote count: 2
has body: I recommend you to use a slug. A slug is a URL friendly version of a title, Title: My Hero Post Slug: /my-hero-post Example of WordPress ad some replacement whenever it creates a slug from a title: Documentation: wp_unique_post_slug Source code What you need to do is to replace characters like å or / in your title with something URL friendly and replace spaces with - and then save that as a unique key in your post object when you are creating the post. You can also have a look at the ghost source code for an example: https://github.com/TryGhost/Ghost/blob/d44a97405bbe58730f3c397f504634a504d3e6e9/core/server/models/base.js#L322 This NPM package actually does most of the work for you: slugify
has comment: http://stackoverflow.com/comment/42593002
answers question: http://stackoverflow.com/q/27034929
has comment: http://stackoverflow.com/comment/42618111
has comment: http://stackoverflow.com/comment/42593779
downvote count: 0

http://stackoverflow.com/a/27149722
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42798583
has body: Make book a child of books and change its URL just to /:itemId. Do not manually set $location.path(), as this will force a refresh. Redirect between states using ui-sref directive or $state.go() function. Try something like this: .state('books', { url: '/books', // ... (template should contain where sub-state content will be rendered) }) .state('books.book', { url: '/:itemId', // ... (template and controller just for this sub-state; will get rendered into super-state's ui-view) }) and link like this: Book 123
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27148688
accepted answer of: http://stackoverflow.com/q/27148688
has comment: http://stackoverflow.com/comment/42799144

http://stackoverflow.com/comment/42631467
comment on: http://stackoverflow.com/q/27057984
score: 0
type: Comment
type: QuestionComment
has text: Thanks to everyone, @pawel gives me the right answer. Thanks for the helping :)

http://stackoverflow.com/a/27008381
score: 2
has body: Try {{user.fName + " " + user.lName}} You could also simply write {{user.fName}} {{user.lName}}
answers question: http://stackoverflow.com/q/27008261
has comment: http://stackoverflow.com/comment/42583362
upvote count: 2
downvote count: 0
type: Answer

http://stackoverflow.com/a/27070023
has body: Try jQuery instead of $ to call jQuery functions.
upvote count: 2
answers question: http://stackoverflow.com/q/27069512
accepted answer of: http://stackoverflow.com/q/27069512
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42653535
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42653138

http://stackoverflow.com/comment/42770300
has text: So... should I take it out of the loop? It is working fine that way, but I wondered that myself. Also added the markup and the modal code.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27135799
score: 0

http://stackoverflow.com/comment/42524346
score: 0
type: Comment
type: QuestionComment
has text: Thanks for the quick reply @charles. Using 'show' doesn't solve the problem. Still 2 clicks required to fire the 2 actions. However if I'm using 'show' it behaves weird if I click a thrid time on one of the links. It then looks like the content is thrown in from the left...
comment on: http://stackoverflow.com/q/26996666

http://stackoverflow.com/comment/42957391
comment on: http://stackoverflow.com/q/27113512
score: 0
type: Comment
type: QuestionComment
has text: @JoseE Okay, added as an answer then.

http://stackoverflow.com/comment/42539093
has text: Are you using jQuery too?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27004449

http://stackoverflow.com/comment/42527551
has text: I'd suggest using "leaflet" [link](http://leafletjs.com/)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26998550
score: 0

http://stackoverflow.com/comment/42957741
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27096095
type: AnswerComment
has text: Ah nevermind, I got this working by placing the hide/append code in the `handleFileSelect(evt)` function written above.

http://stackoverflow.com/comment/42759275
has text: @JustinRyan Can you elaborate on the answer(s) given in the link? I'm not sure how I can apply that to the code above.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27048381
type: QuestionComment

http://stackoverflow.com/comment/42569825
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27022697
score: 0
has text: Not sure what you mean @sixfingeredman since it's the click selector thats failing i cant debug anything within it. And the click is a direct descendant to the document.ready, I've been writing jquery for a few yrs but never really found a good way to debug it.

http://stackoverflow.com/q/27070361
has body: I am testing a webapp with nightwatchjs. I need to be able to set the content of a tinyMCE container. I have tried the simple .setContent for a tinyMCE object but it throws a reference error saying tinyMCE is not defined.
type: AnsweredQuestion
has title: How do i set content of a tinyMCE using Nightwatch.js
has answer: http://stackoverflow.com/a/27362212
type: Question
tagged with: nightwatch.js
accepted answer: http://stackoverflow.com/a/27362212
tagged with: javascript
possible better answer: http://stackoverflow.com/a/51585099
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/51585099
tagged with: tinymce

http://stackoverflow.com/q/27113024
favorite count: 0
accepted answer: http://stackoverflow.com/a/27113118
downvote count: 2
has answer: http://stackoverflow.com/a/27113144
upvote count: 1
has title: My JavaScript won't load
has comment: http://stackoverflow.com/comment/42729180
has answer: http://stackoverflow.com/a/27113118
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42728958
type: Question
has answer: http://stackoverflow.com/a/27113082
possible better answer: http://stackoverflow.com/a/27113144
tagged with: javascript
has comment: http://stackoverflow.com/comment/42728935
tagged with: jquery
score: -1
has body: I've been struggling trying to figure it out why my JavaScript code won't run. Can anybody tell me what I missed ? :( JSFiddle HTML Hover me Title Any Description .... JS
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27059215
type: AcceptedAnswer
has body: Simple as this: var a= '12,13,14,15,16'; var b='p,q,q,p,q'; var pValues=[], qValues=[]; //where to store the results b.split(',').forEach(function(value, index){ //split the values from the b var var aa=a.split(','); //split the values from the a var if(value=='p') pValues.push(aa[index]); if(value=='q') qValues.push(aa[index]); }); console.log("pValues: "+pValues); console.log("qValues: "+qValues);
accepted answer of: http://stackoverflow.com/q/27058957
type: Answer
answers question: http://stackoverflow.com/q/27058957
score: 0

http://stackoverflow.com/q/27149304
has body: I am trying to create all span's text as like placeholder text using below code, function placehodertype() { //alert((this.textContent || this.innerText)); var textval=(this.textContent || this.innerText); if(textval=="Click and type!") { $(this).text(""); $(this).focus(); } $(this).blur(function(){ alert(); var textval2 =(this.textContent || this.innerText); //textval2 = textval2.length; alert(textval2); if(textval2=="") { $(this).text("Click and type!"); //$(this).focus(); } }); } var spans = document.getElementsByTagName('span'); for (var i = 0, len = spans.length; i &lt; len; i++) { spans[i].onclick = placehodertype; } its working fine but that span will disappear when user click on span and click outside without type anything.To avoid this problem i am getting that span text value using blur() but its shows like undefined error!. Check my code here :http://jsfiddle.net/Manivasagam/EHhbH/29/ why i am getting this? and I hope someone will update my code.
linked to: http://stackoverflow.com/q/9206037
has title: i can not get span value in blur function
linked to: http://stackoverflow.com/q/6309092
has comment: http://stackoverflow.com/comment/42794151
accepted answer: http://stackoverflow.com/a/27149533
has comment: http://stackoverflow.com/comment/42793542
upvote count: 1
has comment: http://stackoverflow.com/comment/42794105
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2426438
possible better answer: http://stackoverflow.com/a/27149804
score: 1
has answer: http://stackoverflow.com/a/27149804
has comment: http://stackoverflow.com/comment/42793499
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27149533
favorite count: 0

http://stackoverflow.com/q/26996511
downvote count: 1
has comment: http://stackoverflow.com/comment/42524018
type: AnsweredQuestion
has title: enableling spyjs code completion in phpstorm
tagged with: javascript
type: Question
score: 0
tagged with: phpstorm
tagged with: spy
answer count: 1
tagged with: webstorm
favorite count: 0
has answer: http://stackoverflow.com/a/27007318
has body: I got the spyjs tracing running in phpstorm. But I am wondering how to enable the code completion from spy-js like it is done in webstorm. See this article here: http://blog.jetbrains.com/webstorm/2014/10/spy-js-2-0-new-level-of-javascript-tracing/ I checked for the phpstorm version, but I only got this article ragarding tracing: http://blog.jetbrains.com/phpstorm/2014/06/tracing-debugging-and-profiling-javascript-code-with-spy-js-in-phpstorm/ but it doesn't say anything about completion... Maybe you found a solution for enabeling autocompletion with spy-js in PHPSTORM.
accepted answer: http://stackoverflow.com/a/27007318
upvote count: 1

http://stackoverflow.com/q/27076716
answer count: 2
has comment: http://stackoverflow.com/comment/42664150
has body: I want to display two forms. First Form should display on click of first option and second form should display on click of second option Please anyone help me. Thanks in advance. here's my code: What do you want?: Sell Embroidery Machine Buy Embroidery Machine here are the forms: Name: Sur Name: Contact Number: Email: Where Are you located? This is a qoute for: My Self My Business On Behalf of someone else On Behalf of another business Business Name: I would like an embroidery machine because: Embroidery machine is my hobby I would like to start my business I would like upgrade my emroidery machine To Extand my business to include embroidery Embroidery Experience: Beginner Embroider (0-6 month) Intermediate Embroider (1-2 years Advanced Embroider (2+ years) I am Intersested in: Home embroidery machine (R2 000-R20 000) Combo sewing/embroidery machine (R20 000-R100 000) Semi-Industrial embroidery machine (R90 00-R160 000) Industrial embroidery machine (R70 000-R150 000) Industrial embroidery machine (R150 000-R400 000) New or Pre-owned? : New Embroidery Machine Used Embroidery Machine Quote For Both New And Used Embroidery Machine On Behalf of another business I am Intersested in: R2 000 - R5 000 R5 000 - R10 000 R10 000 - R50 000 R50 000 - R100 000 R100 000 - R200 000 R200 000 - R400 000 I require financing: Yes No, I already have financing arranged No, I will be paying cash Do you already have a digitizing software : Yes No Name Of Digitizing Software: Any Additional Comments: Submit Quote and the script: $(function (){ console.log('jquery loaded...'); //$('#What').change(function(){ // console.log($("#What option").filter(":selected")); //}); $('#form #what #opt1').click(function(){ console.log("Option 2 Clicked"); if($("#form1").hasClass('hide')) { console.log("First Statement Passed..."); if($("#form2").hasClass('in')) { console.log("Nested Statement 1 Passed..."); $('#form2').removeClass('in'); $('#form2').addClass('hide'); $('#form1').removeClass('hide'); $('#f…
has comment: http://stackoverflow.com/comment/42664160
tagged with: jquery
has answer: http://stackoverflow.com/a/27077030
has comment: http://stackoverflow.com/comment/42664333
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27077030
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42664716
has answer: http://stackoverflow.com/a/27076903
accepted answer: http://stackoverflow.com/a/27076903
has title: how to show and hide forms by selecting option using jquery
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42664738
score: 0

http://stackoverflow.com/q/27006180
answer count: 1
tagged with: jasmine
favorite count: 0
has answer: http://stackoverflow.com/a/27008450
tagged with: angularjs
has title: Angular Code Coverage wrong output
score: 2
type: AnsweredQuestion
upvote count: 2
has body: My stack is: Angular.js, Karma, Karma-coverage (Istanbul) and Jasmine. I have been running Code Coverage analysis over my app, the problem, and thus the question, is that I get Service A marked as covered by tests (in green) when it actually does not have any tests associated. I suspect that the following scenario is to blame: I know that Service A is used by Controller B. Controller B is covered by tests, and the Code Coverage results mark it correctly as covered by tests. Service A is not being mocked when testing Controller B. I think that since service A is indirectly called by Controller B's tests, I get the wrong result. Any ideas? Am I suspecting the right thing? Is there any ways around it so I can get an accurate test coverage result in this aspect? Thanks in advance!
accepted answer: http://stackoverflow.com/a/27008450
type: Question
tagged with: karma-coverage
tagged with: istanbul
tagged with: javascript
downvote count: 0

http://stackoverflow.com/comment/42729593
comment on: http://stackoverflow.com/q/27113325
has text: @Juhana you are right.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42658686
has text: http://jsfiddle.net/0tLoL5v2/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27073279

http://stackoverflow.com/a/27047141
answers question: http://stackoverflow.com/q/27047021
score: 1
upvote count: 1
has body: Because $('.point').text() is the concatenation of the text in all elements with class .point, you should use $(this).text(). Also, you condition should be >=4 or ==== "10,0 Here's a better way: $('.point:contains("10,0")').text('10'); 8,0 8,0 10,0 8,0
type: Answer
downvote count: 0

http://stackoverflow.com/a/27012616
has body: Here is the updated and working code. HTML Part- JavaScript Part- function handleImageHover(e) { if(e.target.id == "facebook") { e.target.src = "/images/newFacebookImage.png"; } if(e.target.id == "google") { e.target.src = "/images/newGoogleImage.png"; } if(e.target.id == "twitter") { e.target.src = "/images/newTwitterImage.png"; } if(e.target.id == "pinterest") { e.target.src = "/images/newPinterestImage.png"; } } var imagesArray = document.getElementsByClassName("imgRes"); for (img = 0; img < imagesArray.length; img++) { imagesArray[img].addEventListener("mouseover", handleImageHover, false); }
type: Answer
answers question: http://stackoverflow.com/q/27012269
score: 0

http://stackoverflow.com/q/27052620
tagged with: jquery
type: Question
has comment: http://stackoverflow.com/comment/42647575
tagged with: http://stackoverflow.com/tag/html
tagged with: datatable
score: 0
has comment: http://stackoverflow.com/comment/42622390
has comment: http://stackoverflow.com/comment/42623911
tagged with: javascript
type: UnansweredQuestion
has title: Datatables Javascript - print with different layout
has body: I use several datatables on a single html page which is a report. I use pagination and column management which are all managed through javascript on the jquery document ready. All works fine - no problem. When I print I need to specify different datatable settings - mainly to remove pagination for each grid. If it was css, you would just use the media tag. Is there any way to do something similar with javascript? Using datatables print functions is not a solution as I need to print the whole report including the html around it. One option I will probably implement if I dont get any better suggestions is Leo Lam's suggestion here; run-javascript-jquery-only-on-screen-media-not-print Example of my config FWIW - the main change necessary would be to add paging: false on print and remove it on screen. $(document).ready(function() { var muttable = $('#mut-table').DataTable( { searching: false, "columnDefs": [ { "targets": 5, "visible": false, "bAutoWidth": false, }, { type: 'alt-string', targets: 4 } ], order: [[ 4, "asc" ],[ 5, "desc" ]], } ); });
linked to: http://stackoverflow.com/q/12112255
answer count: 0

http://stackoverflow.com/comment/42629639
score: 0
comment on: http://stackoverflow.com/a/27057103
type: Comment
type: AnswerComment
has text: Yes, this worked! Apart from childNode that should be childNodes I also had the number wrong (should be [1] not [0]). Thanks!

http://stackoverflow.com/q/27147063
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: django
tagged with: css
has body: I need to know how to change the class name of div tag dynamically which is in curly braces using javascript in django.Normally we did with the help of attr. Here i am little confused to change it.The div tag look like below &lt;div class="clname{{progress}}"&gt;&lt;/div&gt; I need to change the value of progress which is mentioned the above div tag.Anyone know about to change it using javascript. please let me know how to do that. progress value should be change dynamically as 0,1,2,3,etc.... Thanks in advance.
has answer: http://stackoverflow.com/a/27147801
has title: how to change class name of div tag dynamically which is in curly braces using javascript in django
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42797349
answer count: 2
has answer: http://stackoverflow.com/a/27147425
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27040128
has answer: http://stackoverflow.com/a/27040436
has comment: http://stackoverflow.com/comment/42599634
type: AnsweredQuestion
has body: I'm very new to JavaScript, jQuery, and JSON browser debugging. But I do know that the "Sources” tab in chrome dev tools is supposed to let me look at my JavaScript files in the browser so I can set and manage my breakpoints and effectively debug my code. However, when i press Ctrl + Shift + I to open chrome dev tools, i can't see a list of my javascript files under the Sources tab. I only something in the form of... jslib.axd?=jquery-.7.2.min.js,query.validate.min.js,MyRegion.js,MyCountry.js,MyCategory.js ...which looks like a concatenated list of all my javascript files. But what i was expecting to see is a list of each of my javascript files. Screenshot:
tagged with: google-chrome
has answer: http://stackoverflow.com/a/27040709
type: Question
possible better answer: http://stackoverflow.com/a/27040276
has answer: http://stackoverflow.com/a/27040276
tagged with: javascript
score: 4
upvote count: 4
answer count: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/27040709
has title: Chrome developer tools sources not showing javascript files correctly
tagged with: jquery
has comment: http://stackoverflow.com/comment/42599890
favorite count: 0

http://stackoverflow.com/q/27102649
upvote count: 1
has comment: http://stackoverflow.com/comment/42710772
has comment: http://stackoverflow.com/comment/42709231
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27103708
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/60174
answer count: 1
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42709266
tagged with: php
has answer: http://stackoverflow.com/a/27103708
type: AnsweredQuestion
has body: I have a search box where a user inputs an ISBN number, when this is submitted a div displays info from Google Books API. This info is retrieved from a JSON file in the standard format. I am able to display the title, subtitle, author and description within the div without issues. I then have an 'Add to Library' button which should send all this info to a database, my problem is that all of the fields send apart from authors. Instead of sending the authors names, the word 'Array' is sent to the database. The only way I can get the authors name to send is by adding [0] to the end of my Ajax data object, however this only sends the name of the first author (if there is 3 authors two will be left out). Update - It seems to be JSON related, if I change my Ajax data to anything other than "authors", "industryIdentifiers" or "categories" it works. Is that because they contain a list and are not single strings? JS $(document).ready(function() { $('#submit').click(function(ev) { ev.preventDefault(); var isbn = $('#isbn_search').val(); //get isbn direct from input, no need for php var url='https://www.googleapis.com/books/v1/volumes?q='+isbn; $.getJSON(url,function(data){ $('.result').empty(); $.each(data.items, function(entryIndex, entry){ var html = '&lt;div class="results well"&gt;'; html += '&lt;h3&gt;' + entry.volumeInfo.title + '&lt;/h3&gt;'; html += '&lt;h5&gt;' + entry.volumeInfo.subtitle + '&lt;/h5&gt;'; html += '&lt;p&gt;' + entry.volumeInfo.authors + '&lt;/p&gt;'; html += '&lt;p&gt;' + entry.volumeInfo.description + '&lt;/p&gt;'; $('.result').append(html); }); }); }); }); AJAX $.ajax({ type: 'POST', url: 'addIsbnScript.php', data: { 'isbn' : isbn, 'title' : entry.volumeInfo.title, 'subtitle' : entry.volumeInfo.subtitle, 'authors' : JSON.stringify(entry.volumeInfo.authors), 'description' : entry.volumeInfo.description }, success: function () { $("#add").prop('disabled', true); } }); PHP $isbn = $_POST['isbn']; $title = $_POST['title']; $subtitle = $_POST['subtitle'…
has comment: http://stackoverflow.com/comment/42710253
tagged with: http://stackoverflow.com/tag/json
has title: JSON Google Books and Ajax

http://stackoverflow.com/q/27035739
answer count: 1
favorite count: 0
upvote count: 1
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42592368
accepted answer: http://stackoverflow.com/a/27035818
downvote count: 1
has body: Same question has been asked here: How to pass a regular expression as a function parameter, and I tried it like this: Insert title here but it doesn't work,and I am sure the string of pattern is right,and I have tested it in firebug like this: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("test@domain.com") It matches email correctly.so Please tell what mistakes I have made,thanks.
type: Question
has title: How to pass string as regular expression pattern?
tagged with: javascript
has answer: http://stackoverflow.com/a/27035818
linked to: http://stackoverflow.com/q/11143702
score: 0

http://stackoverflow.com/comment/42786933
comment on: http://stackoverflow.com/q/27102105
has text: And if you don't use AJAX, is it all right ?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27037065
has body: To achieve that you need to store click count in cookie or localStorage (or anywhere else where your data persists): var button = document.getElementById("countButton"); var display = document.getElementById("displayCount"); button.onclick = function(){ if (isNaN(localStorage.yourCounter)) localStorage.yourCounter = 0; localStorage.yourCounter++; display.innerHTML = localStorage.yourCounter; window.location = 'http://jsfiddle.net/' }
has comment: http://stackoverflow.com/comment/42594351
answers question: http://stackoverflow.com/q/27036914
type: Answer
score: 0

http://stackoverflow.com/a/27068121
answers question: http://stackoverflow.com/q/27067715
score: 0
has body: $( "#draggable5" ).draggable({ containment: "parent" }); Have a look jqueryui.com/draggable/#constrain-movement
type: Answer

http://stackoverflow.com/a/27054577
answers question: http://stackoverflow.com/q/27054198
has body: Works fine with the script inlined: jsFiddle, so the timing of script loading is suspicious, as commented above. (btw. the closing &lt;/form&gt; looks missing :)
score: 0
has comment: http://stackoverflow.com/comment/42625724
type: Answer

http://stackoverflow.com/a/27015868
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/27015469
has comment: http://stackoverflow.com/comment/121200314
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/120353816
accepted answer of: http://stackoverflow.com/q/27015469
has body: Check the Updated JSFiddle :- JSFiddle $('#dynamicChange').val('1').trigger('change'); $('#dynamicChange').val('2').trigger('change');

http://stackoverflow.com/a/27407179
accepted answer of: http://stackoverflow.com/q/27141754
has body: There is no way to revert table back to unsorted state You can apply some saved sorting, but you can not "unsort" the table. table.refresh() will only repaint the data in the datatable, it doesn't have any other means If you need a real data reloading from remote datasource, you need to use table.clearAll() table.load(data_url);
has comment: http://stackoverflow.com/comment/46149877
type: Answer
upvote count: 12
downvote count: 0
answers question: http://stackoverflow.com/q/27141754
score: 12
has comment: http://stackoverflow.com/comment/46142936
type: AcceptedAnswer

http://stackoverflow.com/comment/42768291
type: AnswerComment
comment on: http://stackoverflow.com/a/27134857
type: Comment
score: 0
has text: I made a ".wrap" class and gave it the settings you described, also changed my "body" class. I have learned something new, but I'm afraid this still doesn't fix my problem.

http://stackoverflow.com/comment/42589691
type: Comment
type: QuestionComment
score: 2
has text: Welcome to StackOverflow! Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not".
comment on: http://stackoverflow.com/q/27034420

http://stackoverflow.com/a/27036829
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27034797
has comment: http://stackoverflow.com/comment/42608591
has body: clearInput() and ng-model refer to different scopes after the value of input has changed. Please see this SO answer for deeper explanation.
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27034797

http://stackoverflow.com/q/27063095
has answer: http://stackoverflow.com/a/27063206
has comment: http://stackoverflow.com/comment/42640274
accepted answer: http://stackoverflow.com/a/27063206
answer count: 1
has comment: http://stackoverflow.com/comment/42640196
tagged with: javascript
has comment: http://stackoverflow.com/comment/42640401
score: 0
has title: When creating an instance of a Javascript "class," is there a way to structure the object such that all methods may be accessed?
type: AnsweredQuestion
has body: Is there a way to create an object in Javascript such that all of its methods are available to the constructor? I'm finding it tough to phrase my problem clearly.. so an example! Given this class function Example() { var someVar = something; var moreState = initializedToSomethingElse; verifySomething(); &lt;-- Fails! this.verifySomething = function() { // do verify stuff } } I can't call verifySomething in my constructor because the method, as far as the instance is concerned, doesn't exist yet. So, I get an undefined error. Is there a better way to create objects in javascript so that I can avoid this problem?
type: Question

http://stackoverflow.com/comment/42592760
has text: I've tried it here, seems to work fine (Chrome): http://jsfiddle.net/xoLrr2et/. Which browser do you use? Old IE may have an issue with .insertBefore and SVG.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27034563
score: 0

http://stackoverflow.com/q/27097545
score: 0
answer count: 3
tagged with: jquery
has comment: http://stackoverflow.com/comment/42700285
tagged with: click
has comment: http://stackoverflow.com/comment/42700306
tagged with: http://stackoverflow.com/tag/html
has title: jQuery Click Not Working/Registering
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42700297
has answer: http://stackoverflow.com/a/27097557
has answer: http://stackoverflow.com/a/27097902
has body: I am dynamically adding a list of anchor tags into a div with the id of join. For some reason, my jQuery handler (is it a handler?) isn't handling the clicks. $(document).ready(function() { $("#join").click(function() { console.log("Clicked"); }); }); "Clicked" is not appearing in my console. I have a big headache now after Googling for about 2 hours. Thanks in advance.
type: Question
has answer: http://stackoverflow.com/a/27097567
possible better answer: http://stackoverflow.com/a/27097902
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27097567

http://stackoverflow.com/q/27074851
upvote count: 0
tagged with: javascript
has title: Need to change date format in javascript functions
type: AnsweredQuestion
favorite count: 0
score: -1
has body: Can someone help me change the date format in these functions to YYYY/MM/DD and also help me prevent the default form submit if these checks fail? My database is in YYYY/MM/DD format and I am querying by the date, so this is important. Thank you for the help function ValidateForm(ctrl){ var stdate = document.getElementById("start"); var endate = document.getElementById("end"); //Validate the format of the start date if(isValidDate(stdate.value)==false){ return false; } //Validate the format of the end date if(isValidDate(endate.value)==false){ return false; } //Validate end date to find out if it is prior to start date if(checkEnteredDates(stdate.value,endate.value)==false){ return false; } //Set the values of the hidden variables FROMDATE.value= stdate.value; TODATE.value= endate.value; return true; } //-------------------------------------------------------------------------- //This function verifies if the start date is prior to end date. //-------------------------------------------------------------------------- function checkEnteredDates(stdateval,endateval){ //seperate the year,month and day for the first date var stryear1 = stdateval.substring(6); var strmth1 = stdateval.substring(0,2); var strday1 = stdateval.substring(5,3); var date1 = new Date(stryear1 ,strmth1 ,strday1); //seperate the year,month and day for the second date var stryear2 = endateval.substring(6); var strmth2 = endateval.substring(0,2); var strday2 = endateval.substring(5,3); var date2 = new Date(stryear2 ,strmth2 ,strday2 ); var datediffval = (date2 - date1 )/864e5; if(datediffval &lt;= 0){ alert("Start date must be prior to end date"); return false; } return true; } //-------------------------------------------------------------------------- //This function validates the date for MM/DD/YYYY format. //-------------------------------------------------------------------------- function isValidDate(dateStr) { // Checks for the following valid date formats: // MM/DD/YYYY // Also separates dat…
has answer: http://stackoverflow.com/a/27075178
type: Question
has comment: http://stackoverflow.com/comment/42661223
answer count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/27075178
linked to: http://stackoverflow.com/q/5812220

http://stackoverflow.com/q/27089788
tagged with: javascript
has body: Is there a way to stop to text from being selected when the drag behavior is turned off in a force directed graph? The drag behavior is turned off using these lines: svg.selectAll('g.gnode') .on('mousedown.drag', null); The pointer remains a pointer, rather than a cursor (as per the answer to this question). But dragging still ends up changing the pointer to a cursor and starts to select text. Is there a way to avoid this so no text is selected when dragging? Here's a link to the fiddle.
has title: d3 force directed graph don't select text
linked to: http://stackoverflow.com/q/27088631
possible better answer: http://stackoverflow.com/a/27089987
favorite count: 0
has answer: http://stackoverflow.com/a/27089987
linked to: http://stackoverflow.com/q/826782
has answer: http://stackoverflow.com/a/27091687
upvote count: 2
tagged with: d3.js
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27091687
answer count: 2
score: 2
downvote count: 0

http://stackoverflow.com/comment/42593136
has text: This is not a WPF application. this is a Web application.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27035451
type: QuestionComment

http://stackoverflow.com/comment/42793720
score: 2
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27149533
has text: Not that there are any issues with your changes, it just bothers me that the blur event handler is being set via an onclick event handler. I would have separated them but that's just me.

http://stackoverflow.com/comment/49733795
type: Comment
type: QuestionComment
has text: if you still need an answer to this, check the answer in this thread, you have to write a custom directive -> http://stackoverflow.com/questions/17075969/ng-maxlength-screws-up-my-model
comment on: http://stackoverflow.com/q/27105108
score: 0

http://stackoverflow.com/a/27030858
answers question: http://stackoverflow.com/q/27030721
has body: If you sure your hashing script works ok maybe problem is with data. Try document.getElementById('hash256').value = SHA256(string.toString());
type: Answer
score: 0

http://stackoverflow.com/comment/42760892
score: 0
comment on: http://stackoverflow.com/q/27130841
type: Comment
type: QuestionComment
has text: Posting "implement this for me" questions on SO is strongly discouraged. Please try to do your own research first.

http://stackoverflow.com/q/27143989
type: AnsweredQuestion
has body: I have a jsp page which maps to struts.xml where in an action class, it checks from the DB whether the Id and password are correct. If they are correct, it maps to the corret page. I want if it does not map, then a jQuery popup should be there saying, Incorrect Id or password! HTML CODE &lt;form action="alreadylogin" method="post"&gt; Enter your Email Id&amp;nbsp;&lt;input type="email" name="loginemail" placeholder="Enter Your Email Id" required &gt;&lt;br&gt;&lt;br&gt; Enter your Password&amp;nbsp;&lt;input type="password" name="loginpass" placeholder="Enter your Password" required &gt;&lt;br&gt;&lt;br&gt; &lt;input type="reset" value="Reset"&gt;&amp;nbsp;&amp;nbsp; &lt;input type="submit" value="Submit"&gt; ACTION CLASS: The action class here shows the action mapped from STRUTS.XML public String execute() { String check=null; try { ResultSet r = st.executeQuery("select userpass,firstname from register where usermail='"+ loginemail +"'"); while (r.next()) { String psw=r.getString(1); String name=r.getString(2); jname=name; if(psw.equals(loginpass)) { session.put("S3CRET", "S3CRET"); session.put("USERNAME", jname); check="success"; } else { check="input"; } } } finally { return check; } How can apply a jQuery popup here?
possible better answer: http://stackoverflow.com/a/27148908
type: Question
accepted answer: http://stackoverflow.com/a/27149615
tagged with: javascript
has title: jQuery popup box on returning result from a struts action class
tagged with: struts2
has answer: http://stackoverflow.com/a/27149615
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27148908
tagged with: jquery

http://stackoverflow.com/comment/42553586
type: AnswerComment
type: Comment
score: 0
has text: thanks but only one problem is when i placed .wrapper { width: 100%; height: 200px; } but i need height also 100% so when i placed height :100% in that time out put not working
comment on: http://stackoverflow.com/a/27011683

http://stackoverflow.com/q/27042651
tagged with: excel
has comment: http://stackoverflow.com/comment/42604419
has body: Like the title said, is it possible to save Javascript variables in Excel? Explanation: I made a form with 5 questions with each 2 possible answers (radio buttons). I want to save the values of each question in an Excel sheet. Each time the form is submitted, I want it to make a new row with the values of the answers. Like this: Answer1 Answer2 Answer3 Answer4 Answer5 Person1 Person2 Person3 Person4 Person5 For the people who don't get it Person 1,2,3,4,5 are rows and Answer 1,2,3,4,5 are columns in Excel xD I found a lot of similar questions but nothing exactly like mine and I can't figure it out alone. Please help me!
answer count: 0
tagged with: save
type: Question
tagged with: export
has comment: http://stackoverflow.com/comment/42634488
tagged with: javascript
has title: Is it possible to save javascript variables in Excel?
score: 0
has comment: http://stackoverflow.com/comment/42605213
type: UnansweredQuestion

http://stackoverflow.com/q/27014288
accepted answer: http://stackoverflow.com/a/27014522
type: Question
has title: uploaded files are null
tagged with: javascript
score: 0
tagged with: file-io
has answer: http://stackoverflow.com/a/27014522
tagged with: file-upload
has answer: http://stackoverflow.com/a/27014407
possible better answer: http://stackoverflow.com/a/27014396
has body: I'm trying to upload a image via a form to crop it in another php file, but when I upload the file it doesn't seem to upload. Here's the form: &lt;form id="uploadForm" action="cropNsend.php" method="POST" ENCTYPE=”multipart/form-data”&gt; &lt;input type="text" id="inputName" name="inputName" value="NAME"&gt;&lt;br&gt; &lt;input type="text" id="inputTel" name="inputTel" value="TELEFON"&gt;&lt;br&gt; &lt;input type="text" id="inputmail" name="inputmail" value="EMAIL"&gt;&lt;br&gt; &lt;input type="text" id="inputAdr" name="inputAdr" value="ADRESSE"&gt;&lt;br&gt; &lt;input type="file" id="inputPic" name="inputPic"&gt;&lt;br&gt; &lt;input id="x" type="hidden" name="x" value="130"&gt; &lt;input id="y" type="hidden" name="y" value="83"&gt; &lt;input id="w" type="hidden" name="w" value="155"&gt; &lt;input id="h" type="hidden" name="h" value="155"&gt; &lt;/form&gt; I submit the form woth javasript vai $("#uploadForm").submit(); Everything seems to upload fine, but the file. Here's the php code: session_start(); define("FILEREPOSITORY", "./"); if ($_SERVER['REQUEST_METHOD'] == 'POST') { if(isset($_POST["inputName"]) &amp;&amp; isset($_POST["inputmail"]) &amp;&amp; isset($_POST["inputAdr"]) &amp;&amp; isset($_POST["inputTel"])) { $_SESSION["x"] = $_POST["x"]; $_SESSION["y"] = $_POST["y"]; $_SESSION["width"] = $_POST["w"]; $_SESSION["height"] = $_POST["h"]; $_SESSION["inputName"] = $_POST["inputName"]; $_SESSION["inputmail"] = $_POST["inputmail"]; $_SESSION["inputTel"] = $_POST["inputTel"]; $_SESSION["inputAdr"] = $_POST["inputAdr"]; var_dump($_FILES); echo $_FILES["inputPic"]["name"]; echo $_FILES["inputPic"]["type"]; echo $_FILES["inputPic"]["size"]; } var_dump($_FILES) is an array(0). hope someone can help me
has answer: http://stackoverflow.com/a/27014396
has answer: http://stackoverflow.com/a/27014515
tagged with: php
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/42813552
type: QuestionComment
has text: It's a `Date` object. See [this line](https://github.com/meteor/meteor/blob/58869b050bf5cdc77991505b10c46112d85aff24/packages/accounts-base/accounts_server.js#L1015) where user accounts get inserted. `ISODate` is how it's represented once it is stored in mongo. It looks like a string when you inspect it in the shell, but internally it's a date.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27151192

http://stackoverflow.com/q/27074955
upvote count: 1
tagged with: sharepoint-apps
has body: I'm developing a provider hosted app that allows the user to upload files to document library on the app web, this means I have to use SP.RequestExecutor.js I did finished the code and it works for small files &lt;10MB but with larger files it hangs the browser and even crash after a while. Is there any other way I can upload files using REST in provider hosted applications here is the code I use $.getScript(hostweburl + "/_layouts/15/SP.RequestExecutor.js", function() { executor.executeAsync({ url: appweburl + "/_api/web/GetFolderByServerRelativeUrl('docs')/RootFolder/Files/Add(url='" + file.name + "')", method: "POST", headers: { "accept": "application/json;odata=verbose", "X-RequestDigest": digest, }, binaryStringRequestBody: true, body: contents2, success: onSuccess, error: onFail, state: "Update" });
score: 1
has title: Uploading files >40MB using SP.requestexecutor to sharepoint online hangs the browser
type: Question
downvote count: 0
tagged with: javascript
tagged with: sharepoint
tagged with: rest
tagged with: sharepoint-online
favorite count: 0
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27033367
tagged with: javascript
has comment: http://stackoverflow.com/comment/42591583
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42594166
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27033945
has body: I have a list of thumbnails on the webpage, upon clicking on them it redirects to the respective games in a new screen. I want to add a functionality that would ask the user to enter their dominant hand, i.e., a dialog box which appears on clicking on the thumbnail asking "What is their dominant hand? Two buttons: Left and Right". Once the user selects either of the option, it proceeds to the game. I have used http://jqueryui.com/dialog/#modal-confirmation and many other options, but it just won't work. My code is: &lt;li class="show-list" onclick="location.href='/excercises/gameserve?id={$exerData.id}'" id="hand"&gt; So there is a list and than onclick goes to the location of the game. I have added an id="hand" so that I could use it for the dialog box using getElementById. Also, if it might help, the selected option must get stored in the database.. Can anyone help ...
has comment: http://stackoverflow.com/comment/42596205
has title: Confirm dialog box in javascript/jquery
type: Question
has comment: http://stackoverflow.com/comment/42593627
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/42593491

http://stackoverflow.com/a/27068343
upvote count: 2
has comment: http://stackoverflow.com/comment/42650952
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42650099
score: 2
downvote count: 0
has body: Your ajax call works fine as you can see there. You should take a notice that if you return anything from a function it is no longer executed. The code that you provided below $( '#myPost' ).listview( "refresh" ); will be never examined. What you probably want to do is function deleteThisPost() { //alert($('#myPostIDStorage').val()) $.ajax({ type: 'GET', data: 'myPostIDValue=' + $('#myPostIDStorage').val(), url: 'http://wander-app.org/deletePosts.php', timeout: 5000, success: function (data) { alert('Post Deleted!'); }, error: function () { alert('Error Deleting Post'); } }); $('#myPost').listview("refresh"); return false; }; According to your question if you want a dialog box with cancel and confirm button you can do if(confirm('Do you want to delete?') == true) { alert('Deleted'); }
answers question: http://stackoverflow.com/q/27068228
accepted answer of: http://stackoverflow.com/q/27068228

http://stackoverflow.com/comment/42875105
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27139457
type: QuestionComment
has text: Im only realising now that the question is idd too broad. it contains more then one issues at once. the link proves very useful information though. thnx alot!

http://stackoverflow.com/comment/42619777
type: AnswerComment
has text: don't forget to reset move variable on touch start: $("body").on("touchstart", function(){ move = false; });
type: Comment
comment on: http://stackoverflow.com/a/27050664
score: 0

http://stackoverflow.com/q/27056840
upvote count: 3
has answer: http://stackoverflow.com/a/27056983
has comment: http://stackoverflow.com/comment/42629302
type: AnsweredQuestion
type: Question
has body: I have the following function in controller: angular.module('app').controller('BodyController', function(){ this.click = function(message){ alert(message); } }) I want to pass this function into directive's isolated scope to call it with some specific params, something like that: angular.module('app').directive('custom', function(){ return { restrict: 'A', scope: { text: '@', click: '&amp;click' }, link: function(scope, element){ //... scope.click('Hello, Plunker!'); //... } } }) And I pass thefunction in this way: &lt;h1 custom text="Hello Plunker!" click="ctrl.click"&gt;&lt;/h1&gt; Here is an example: http://plnkr.co/edit/4zkxuHJIB3D339h2Oy60?p=preview The function is not called. What am I missing? Thanks in advance
accepted answer: http://stackoverflow.com/a/27056983
downvote count: 0
has answer: http://stackoverflow.com/a/27057057
tagged with: javascript
favorite count: 0
answer count: 3
score: 3
has title: How to pass a function handler from controller into directive isolated scope in AngularJs?
possible better answer: http://stackoverflow.com/a/27056963
tagged with: angularjs
has answer: http://stackoverflow.com/a/27056963

http://stackoverflow.com/comment/42554790
has text: `".field-validation-valid text-danger"` wrong selector, you want: `".field-validation-valid.text-danger"`
score: 5
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27014460

http://stackoverflow.com/comment/42529806
comment on: http://stackoverflow.com/q/26999700
score: 0
type: Comment
type: QuestionComment
has text: Regarding your issue, what's wrong with targeting element once it is added to the DOM? Is it dynamic ID or what? I'm really not sure to understand your issue

http://stackoverflow.com/comment/42656944
has text: #myModal exist when I check in chrome - it's there :) ... just like when I do not make it throught ajax
type: AnswerComment
comment on: http://stackoverflow.com/a/27072014
score: 0
type: Comment

http://stackoverflow.com/q/27020894
tagged with: flash
has body: The media file could could be HTML5, it could be Flash. Let's ignore other formats. For HTML5 I imagine it's not too hard, by finding and interacting with the media object and its properties with Javascript, as the page is loading. But for Flash, I think it's a different issue. Probably an external library necessary?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27025248
has title: How to only load and play the audio from a webpage embedded media file?
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: media
has answer: http://stackoverflow.com/a/27025248
type: AnsweredQuestion
score: 0
type: Question

http://stackoverflow.com/comment/42605300
type: Comment
comment on: http://stackoverflow.com/a/27042324
score: 0
type: AnswerComment
has text: Yes you are right, i corrected the code in order to show the equivalence point....so bassically what you need is to execute loadContent every 6 seconds, right??

http://stackoverflow.com/q/27053404
has title: How do I put 'fadein' and 'animate' texts in the middle of the page?
has comment: http://stackoverflow.com/comment/42624547
type: Question
has comment: http://stackoverflow.com/comment/42624222
score: 5
has comment: http://stackoverflow.com/comment/42624006
has comment: http://stackoverflow.com/comment/42624147
upvote count: 5
downvote count: 0
has answer: http://stackoverflow.com/a/27054094
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42624101
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42624124
has comment: http://stackoverflow.com/comment/42624376
has body: I was wondering if it is possible to assign a group of stacking texts in the middle of the page? placing them in the center wasn't too difficult, but the problem was that they are positioned left, right, top, and bottom, which I think means they need to be given: position:absolute. Furthermore, the .headline texts are given fade-in(opacity 0 to 100) and animation commands. In terms of scaling, the texts are responsive, and get smaller as the window gets smaller. In addition they are assigned their own z-index. In the image below, I have laid out the overall structure I would like to achieve, but I'm experiencing a lot of difficulty doing so because of the text behaviors I want to accomplish. For functionality reference, here is a jsfiddle. Please help me and thank you in advance! Please note that I would prefer to use CSS only since it's a simple function that only occurs once upon page load. However, if this is a issue that only javascript can solve, please let me know :) .animated { -webkit-animation-fill-mode: both; -moz-animation-fill-mode: both; -ms-animation-fill-mode: both; -o-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration: 0.5s; -moz-animation-duration: 0.5s; -ms-animation-duration: 0.5s; -o-animation-duration: 0.5s; animation-duration: 0.5s; } .fade { -webkit-animation-name: fade; -moz-animation-name: fade; -o-animation-name: fade; animation-name: fade; } @-webkit-keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } } @-moz-keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } } @-o-keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } } @-webkit-keyframes flowright { 0% { opacity: 0; left: -100px; } 100% { opacity: 1; left: 0; } } @keyframes flowright { 0% { opacity: 0; left: -100px; } 100% { opacity: 1; left: 0; } } @-webkit-keyframes flowleft { 0% { opacity: 0; right: -100px; } 100% { opacity: 1; right: 0; } } @keyframes flowleft { 0% { opacity: 0; rig…
linked to: http://stackoverflow.com/q/4982480

http://stackoverflow.com/q/27033880
tagged with: jquery
has title: How to modify spin.js to block the UI and show on the center of the screen
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I'm already using spin.js in my application. I like it because it's pure JS and at least for me solved some issues that I was having using a loading image. However the default behaviour has two things that I would really like to change. Here is a simple Fiddle example which is simple but very well illustrates what I would like to achieve. I have a very long from and at the beginning of the HTML file I have &lt;div id="show-spinner"&gt;&lt;/div&gt; so when the user clicks Submit I can: var target = document.getElementById('show-spinner'); var spinner = new Spinner().spin(target); The problem is that when I'm at the end of the form where the submit button is when I call the spinner it shows in such a way that I may very well not see it at all, as it is in my Fiddle example (at least if you are using some low(laptop) resolution) but no matter the resoution there's always the chance to get so down below that you can't actually see that the spinner is shown. Which kinda leads me to the nex problem which I think is realted to the first - I would like to show the spinner always at the center of media screen (the laptop display for example) and also - since for example I don't want the user to be able to click Submit twice and in I would say, all of the cases, when I show the spinner I would like the user to not be able to interact with the UI - I mean, to click buttons, write stuff in inputs and so on so I would like to show some sort of load mask or I'm not sure how it's called, just like when you call alert() So to sum it up - from what is it right now in my fiddle example I would like to change it to some alert like behaviour so that no matter where I am on the HTML dom I always get some sort of spinning animation on the center of my screen and mask diasbling the user to interact with the UI. Since this sounds to me as kind of trivial task, or at least something that have been solved already I would accept answer pointing to plugin that provide such functionality. The o…
has comment: http://stackoverflow.com/comment/42588915
has comment: http://stackoverflow.com/comment/42588829
linked to: http://stackoverflow.com/q/9585752
has comment: http://stackoverflow.com/comment/42588985
answer count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/a/46027138
has body: Have you missed { enctype='multipart/form-data' } in form tag in your html file? Adding that might work.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27049904
type: Answer

http://stackoverflow.com/comment/42634414
type: Comment
type: QuestionComment
has text: The user triggers runLogin. It is in the loginView triggered by a form submit.
comment on: http://stackoverflow.com/q/27058087
score: 0

http://stackoverflow.com/a/27139420
has comment: http://stackoverflow.com/comment/42776761
has comment: http://stackoverflow.com/comment/42776903
has comment: http://stackoverflow.com/comment/42777089
score: 2
has comment: http://stackoverflow.com/comment/42776831
has comment: http://stackoverflow.com/comment/42776741
downvote count: 0
has comment: http://stackoverflow.com/comment/42776827
has comment: http://stackoverflow.com/comment/42776690
has comment: http://stackoverflow.com/comment/42776912
answers question: http://stackoverflow.com/q/27139393
has comment: http://stackoverflow.com/comment/42776865
upvote count: 2
has comment: http://stackoverflow.com/comment/42776907
has body: &lt;?php $d = date('D M d Y H:i:s O'); echo " &lt;script&gt; var currdate = new Date($d); &lt;/script&gt; "; ?&gt;
has comment: http://stackoverflow.com/comment/42776650
has comment: http://stackoverflow.com/comment/42776857
has comment: http://stackoverflow.com/comment/42776666
has comment: http://stackoverflow.com/comment/42776882
type: Answer

http://stackoverflow.com/a/27108836
answers question: http://stackoverflow.com/q/27107691
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42741966
score: 4
type: Answer
upvote count: 4
has body: It would appear you're using express to serve your application. Express is a server side framework, while angular is a client side framework. You shouldn't mix the 2 code bases. Everything you use in angular should be served as static resources. You're very likely serving your public folder as static routes. So most likely you need to modify your structure like so (how I would structure it): public --app ----scripts ------angularApp.js ----views ------home.html Then your template url should be '/app/views/home.html'
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27107691

http://stackoverflow.com/q/27072118
tagged with: chart.js
has answer: http://stackoverflow.com/a/43516820
type: Question
tagged with: charts
score: 3
tagged with: javascript
has title: Can't size doughnut chart from chart.js
has answer: http://stackoverflow.com/a/27072370
upvote count: 3
answer count: 2
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: Not sure how to set height/width for doughnut chart, tried with this: &lt;div style="height: 168px"&gt; &lt;canvas id="chart-area" style="height: 168px"/&gt; &lt;/div&gt; I have text underneath the chart, and this only change the position of text &amp; graph rather than the size of the doughnut chart. Any help will be appreciated.
tagged with: css
downvote count: 0

http://stackoverflow.com/comment/42663256
has text: Hi thanks @iH8 for your answer. I set things up in the wrong way in my question - sorry about that. Rather than try to explain things in this comment, I revised the question and re-posted it with a finer request: http://stackoverflow.com/questions/27076183/d3-hyperlinks-in-tree-diagram . If you are able to take a look at this again, please do. In any case thanks, for your help. I appreciate it. -Matt
comment on: http://stackoverflow.com/a/27073357
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42586177
has text: @ianaya89 Not entirely. The `innerHTML` isn't the equivalent to `.append()`. It's more like `.html()`.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27032192

http://stackoverflow.com/comment/42772368
comment on: http://stackoverflow.com/q/27136606
score: 0
type: Comment
type: QuestionComment
has text: @AbhasArya - You don't need to explicitly define every dependency so long as your Karma config file pulls in all those files and they are all wired up to your `myApp` module.

http://stackoverflow.com/q/27118867
tagged with: javascript
has comment: http://stackoverflow.com/comment/42739702
tagged with: jquery
has comment: http://stackoverflow.com/comment/42739459
tagged with: ajax
has body: Consider the following code: var jsonData1 = $.ajax({ url: 'http://'+domainName+':9898/jolokia/read/*', dataType:"json", crossDomain: true, beforeSend: function(xhr){ var username= '*'; var password= '*'; xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); }, async: false }).responseText; var parsed1 = JSON.parse(jsonData1); Here when I directly access the url, it asks for a username and password, which when given shows the value. But when I do it through an ajax call, it throws this error: Failed to load resource: the server responded with a status of 401 (Unauthorized) jquery.min.js:5 XMLHttpRequest cannot load http://10.91.240.21:9898/jolokia/read/* No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 401. (index):1 Uncaught SyntaxError: Unexpected token u TRY 2: var jsonData2 = $.ajax({ type:'GET', url: 'http://'+domainName+':9898/jolokia/read/*', dataType:"jsonp", crossDomain: true, data: {username: '*',password: '*'}, async: false }).responseText; var parsed2 = JSON.parse(jsonData2); I tried using json p. The unauthorized code got resolved. It is showing status OK. But now this error comes Uncaught SyntaxError: Unexpected token u
score: 0
has comment: http://stackoverflow.com/comment/42739549
has answer: http://stackoverflow.com/a/27131596
accepted answer: http://stackoverflow.com/a/27131596
has comment: http://stackoverflow.com/comment/42739560
upvote count: 1
has comment: http://stackoverflow.com/comment/42741475
answer count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/5507234
favorite count: 0
has comment: http://stackoverflow.com/comment/42739580
tagged with: basic-authentication
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42761760
has title: Jquery authentication error
has comment: http://stackoverflow.com/comment/42739520
has comment: http://stackoverflow.com/comment/42739759
type: Question
has comment: http://stackoverflow.com/comment/42739933
has comment: http://stackoverflow.com/comment/42739846

http://stackoverflow.com/comment/42806087
type: AnswerComment
has text: well I don't know why but the id not save it and the image saved into DB is corrupt....so I back to the script I add in the beginning and the image now is saved good and can see it...the only thing is the user_id...don't catch it in the ajax... I will update my question and I will add the MySQL conecction...maybe in that is the error
type: Comment
comment on: http://stackoverflow.com/a/27138305
score: 0

http://stackoverflow.com/comment/42695989
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27094195
has text: i see, is there any way to link the checkbox# nd points #?

http://stackoverflow.com/comment/42807568
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27137561
has text: When I use `npm` sometimes I want a client-side external dependency and I want it to be included in `vendor.js` and sometimes I want a server-side dependency and I don't want it in `vendor.js`. How do I control which kind of dependency it is? For example, in my seed `bower_component/angular/angular.js` is included in `files.javascripts.joinTo`, but `node_modules/.../express.js` is not. What determines whether it is joined in `vendor.js`? Preferably this is automated for me somehow. Thanks for your help!
score: 0

http://stackoverflow.com/comment/42740971
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27119843
score: 0

http://stackoverflow.com/q/27069437
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27069748
tagged with: http://stackoverflow.com/tag/svg
has title: function &ID in javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27069501
has answer: http://stackoverflow.com/a/27072045
has body: I have a Javascript function to change colors of a svg ellipse object with id="eye" document.getElementById("eye").onmouseover = function() { changeColor() }; function changeColor() { document.getElementById("eye").style.fill = "red"; } document.getElementById("eye").onmouseout = function() { changeColor2() }; function changeColor2() { document.getElementById("eye").style.fill = "green"; } Now there are 2 more svg objects with id="nose" and id="mouth", how can I apply the same change color founction on these 2 objects? Yes I can repeat the founction 2 more times but there must be a better way to do it. Note The 3 objects shouldn't change color at the same time, which means there no need for loop.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42652060
type: Question
has comment: http://stackoverflow.com/comment/42651913
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/27069520

http://stackoverflow.com/a/32243032
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27016272
has comment: http://stackoverflow.com/comment/52382336
score: -4
has comment: http://stackoverflow.com/comment/52368584
downvote count: 4
has body: FYI - const a = {}; var b = new a; a = 33; I just changed the const 'a' back to a var.

http://stackoverflow.com/a/27125115
type: Answer
score: 2
downvote count: 0
has body: showmore.click(function(){ should be $('.showapps').on('click', function(){ OR $(document).on('click','.showapps', function(){ For dynamically added contents, you need to bind events to it. For more info: http://learn.jquery.com/events/event-delegation/
upvote count: 2
answers question: http://stackoverflow.com/q/27124963
has comment: http://stackoverflow.com/comment/42750646

http://stackoverflow.com/a/27058203
has comment: http://stackoverflow.com/comment/48437746
upvote count: 4
has body: WebDriver driver = new AnyDriverYouWant(); if (driver instanceof JavascriptExecutor) { ((JavascriptExecutor)driver).executeScript("yourScript();"); }
accepted answer of: http://stackoverflow.com/q/27057541
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27057541
type: Answer
has comment: http://stackoverflow.com/comment/48434550
score: 4

http://stackoverflow.com/a/27091744
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27090189
has body: You need to turn the point geometry's X,Y into a LonLat then transform it from your map's projection into WGS84 aka EPSG:4326 to get a 'conventional' lon/lat: var dragVectorC = new OpenLayers.Control.DragFeature(vectorLayer, { onComplete: function (feature) { var lonlat = new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y).transform( map.getProjectionObject(), new OpenLayers.Projection("EPSG:4326") )) alert(lonlat.lat + ', ' + lonlat.lon)
answers question: http://stackoverflow.com/q/27090189
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/27038263
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: Just learning java-script and canvas. I was to make steps and can draw the first two lines. I would like this to loop 7 times. 7 p1's and 6 p2's so basically. it goes down 7 times and across 6 times. Thanks alot for looking. Your browser does not support the HTML5 canvas tag.
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27038535
type: Question
has answer: http://stackoverflow.com/a/27039961
has answer: http://stackoverflow.com/a/62243280
score: 1
has title: Canvas draw lines with a loop
has comment: http://stackoverflow.com/comment/42597272
tagged with: canvas
upvote count: 1
has answer: http://stackoverflow.com/a/27038570
tagged with: javascript

http://stackoverflow.com/a/27139970
has comment: http://stackoverflow.com/comment/42777741
answers question: http://stackoverflow.com/q/27139928
type: Answer
has comment: http://stackoverflow.com/comment/42875906
has comment: http://stackoverflow.com/comment/42872524
score: 0
type: AcceptedAnswer
has body: Try $("select.selMake").val("placeholder"); Using the variable: var $select = $('.selMake'); $select.val("placeholder"); It's usually good practice to use the $ prefix when indicating a jquery object. Edit based on comment: Try $select.find('option[value="placeholder"]').text("newText");
accepted answer of: http://stackoverflow.com/q/27139928

http://stackoverflow.com/q/27070559
has answer: http://stackoverflow.com/a/64397654
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27071478
has title: nodejs - Call a function inside a parent module from a child module
has answer: http://stackoverflow.com/a/27071216
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27071478
possible better answer: http://stackoverflow.com/a/27071216
type: Question
upvote count: 4
has body: Let's say I have a file called parent.js with the following source code: var child = require('./child') var parent = { f: function() { console.log('This is f() in parent.'); } }; module.exports = parent; child.target(); and a file called child.js with the following source code: var child = { target: function() { // The problem is here.. } } module.exports = child; and I execute the file using the following command: node parent.js The thing is, I want to execute f() inside child.js directly without using any require(...) statement. Previously, I'm trying to execute this statement inside target() in child.js: module.parent.f() and module.parent.exports.f() but it doesn't work. The strange thing is, when I execute console.log(module.parent.exports) inside child.js, the following output appear: { f: [Function] } So why can't I call f() directly?
tagged with: javascript
score: 4
answer count: 3

http://stackoverflow.com/a/27051414
has comment: http://stackoverflow.com/comment/42620434
has body: use this: for (var i = 0; i &lt; yourObject.status.length; i++) { console.log(yourObject.status[i].color); } Maybe you should start at the beginning with how loops work?
answers question: http://stackoverflow.com/q/27051376
type: Answer
has comment: http://stackoverflow.com/comment/42620548
score: 1
has comment: http://stackoverflow.com/comment/42620704
has comment: http://stackoverflow.com/comment/42620519
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/42779248
comment on: http://stackoverflow.com/a/27140845
type: Comment
has text: So, by adding manually the unix timestamp it works correctly but if I include it as I showed above this post .. it doesn't. Why probably?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27034580
type: Question
has body: I am new to java script and node.js ; in case of some mistakes. Please forgive me. I am trying to write a simple Node.Js server side application. What I am trying to achieve here is. On the view, I have text box and a submit button. When I pass the submit button. The data written in the text box should be passed to router(index.js) and that shall process it. Please see my code below. view code extends layout block content h1= title form#formReadCSV(name="readCSVFile",method="post",action="/readCSVFile") input#inputCompleteCSVPath(type="text", placeholder="Complete Path" name="fileCSV") button#btnOpenFile(type="submit") Submit router(index.js) router.post('/readCSVFile',function(req,res){ /*Read the complete Path*/ var fileName = req.body.fileCSV; //console.log(fileName); var reader = csv.createCSVFileReader(fileName,{ 'separator':',', 'quote':'"', 'escape':'"', }); reader.addListener('data',function(data){ console.log(data); }); reader.addListener('end', function() { console.log("END"); res.render('success_csv_upload', {message : "Successfully consumed the CSV file"}); }); Now when press the submit button. It is some how is not reaching to the router. I am getting the below error csv is not defined ReferenceError: csv is not defined at /Users/rajesh/Documents/NodeProject/nodetest1/routes/index.js:26:15 at Layer.handle [as handle_request] (/Users/rajesh/Documents/NodeProject/nodetest1/node_modules/express/lib/router/layer.js:82:5) at next (/Users/rajesh/Documents/NodeProject/nodetest1/node_modules/express/lib/router/route.js:100:13) at Route.dispatch (/Users/rajesh/Documents/NodeProject/nodetest1/node_modules/express/lib/router/route.js:81:3) at Layer.handle [as handle_request] (/Users/rajesh/Documents/NodeProject/nodetest1/node_modules/express/lib/router/layer.js:82:5) at /Users/rajesh/Documents/NodeProject/nodetest1/node_modules/express/lib/router/index.js:234:24 at Function.proto.process_params (/Users/rajesh/Documents/NodeProject/nodetest1/node_modules/express/li…
tagged with: javascript
has title: How to pass data from form to router
has answer: http://stackoverflow.com/a/27034629
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27034629
tagged with: http://stackoverflow.com/tag/csv
tagged with: node.js
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/comment/42680963
has text: Works fine @powanakaab http://jsfiddle.net/t8v9omqe/ - make sure your `displayPhoto()` function is defined before the `onclick` binding is set - put it in the head if you are using jsfiddle.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27086114
type: Comment

http://stackoverflow.com/q/27092801
possible better answer: http://stackoverflow.com/a/27094041
has title: Adding more than one AJAX call to a Script
has answer: http://stackoverflow.com/a/27092900
accepted answer: http://stackoverflow.com/a/27092900
tagged with: javascript
has comment: http://stackoverflow.com/comment/42692006
score: 0
answer count: 2
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/27094041
has comment: http://stackoverflow.com/comment/42691715
tagged with: php
type: AnsweredQuestion
has body: I need to add a function to my script that gets the current server time. I use the PHP file below to get the server time in milliseconds. &lt;?php date_default_timezone_set('Europe/London'); $serverTime = round(microtime(true) * 1000); echo json_encode($serverTime); ?&gt; Then i would like to add an Ajax request to 'get' serverTime.PHP and put it into a variable so that i can calculate the time before something ends correctly. I currently get the clients time by using this var now = new Date ().getTime(); Now i want to remove that line and add my ajax request. I have tried adding the following code into the script but i can not get it to execute function now () { this.ajax.open('GET', 'serverTime.php', true); this.ajax.send(null); if (this.ajax.readyState != 4) return; if (this.ajax.status == 200) { // get response var now = eval ('('+this.ajax.responseText+')'); } } The end result being the variable 'NOW' contains the output of serverTime.PHP Here is my script, i have tried to add anothert ajax get request in various ways but i cant get it to function correctly. $.ajaxSetup({ type: 'GET', headers: { "cache-control" : "no-cache" } }); var PlayList = function (onUpdate, onError) { // store user callbacks this.onUpdate = onUpdate; this.onError = onError; // setup internal event handlers this.onSongEnd = onSongEnd.bind (this); // allocate an Ajax handler try { this.ajax = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { // fatal error: could not get an Ajax handler this.onError ("could not allocated Ajax handler"); } this.ajax.onreadystatechange = onAjaxUpdate.bind(this); // launch initial request this.onSongEnd (); // ------------------------------------------ // interface // ------------------------------------------ // try another refresh in the specified amount of seconds this.retry = function (delay) { setTimeout (this.onSongEnd, delay*5000); } // ------------------------------------------ // ancillary functions …
type: Question

http://stackoverflow.com/a/27002864
has comment: http://stackoverflow.com/comment/42610930
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27002576
upvote count: 1
has body: why does the first one work? Notice that the first one does not create instances which inherit from xyz.prototype. Is the new keyword just ignored and the object literal returned? Yes. If the constructor returns an object, that will be returned by the new operator instead of the instance that was constructed and passed to the constructor as this. For details, see What is the 'new' keyword in JavaScript? or MDN. However, notice that if you use the first, you should omit the new (to make clear it's a factory function), and if you use the second you should capitalize your constructor to Xyz.
has comment: http://stackoverflow.com/comment/42603580
type: Answer

http://stackoverflow.com/comment/42588752
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27033343
type: Comment
has text: ok, now i see it. you have several issues. 1) quantity is a string instead of a number. if no quantity than put 0. it messes up your multiplication later on. 2) if food holds all selected foods, why does it have a field quantity? if its an array, don't put fields to it. 3) if food is an array, but you got $scope.food.zero and $scope.food.two and all that? basically it all boils down that you are messing up that field called food as if it holds all the data that you can think of. you need to split things up. its not related to angular at all.

http://stackoverflow.com/comment/42635145
type: Comment
comment on: http://stackoverflow.com/a/27019054
type: AnswerComment
has text: No succes... When I add [0] after WorkArray[currentImage] the images disappear again. Here is our site if you want to see it in action: http://holymothership.be
score: 0

http://stackoverflow.com/comment/42610838
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27045985
has text: I meant from the client side...req.files sounds like a client side entity

http://stackoverflow.com/a/27005052
type: Answer
has comment: http://stackoverflow.com/comment/42540801
has comment: http://stackoverflow.com/comment/42574842
has comment: http://stackoverflow.com/comment/42576502
has comment: http://stackoverflow.com/comment/42575955
has body: Instead of mouseover and mouseout, I recommend doing it with $(this).hover and $(this).mousemove. Try something like this: $(this).hover( function() { tooltip.transition() .duration(200) .style("opacity", 1) // In order to trigger the magnitude or 'width' of the rect: var rectWidth = $(this).attr("width"); }, function () { tooltip.transition() .duration(500) .style("opacity", 1e-6) } ); /*$(this).mousemove(function(event) { tooltip .style("left", event.clientX + "px") .style("top", event.clientY + "px") });*/
has comment: http://stackoverflow.com/comment/42575278
score: 0
accepted answer of: http://stackoverflow.com/q/27004449
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42575138
has comment: http://stackoverflow.com/comment/42542661
answers question: http://stackoverflow.com/q/27004449
has comment: http://stackoverflow.com/comment/42576143

http://stackoverflow.com/comment/42521361
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26995329
type: Comment
has text: thanks for this code i will accept this after 3 mins stackoverflow rules :D

http://stackoverflow.com/a/27010897
has body: You can create a rect and use d3's selection.on api to register a click listener: var rect = d3.select('svg g rect'); rect.on('click', function() { console.log('i was clicked'); }); .as-console-wrapper { max-height: 3.5em !important; } <g transform="translate(50,50)"> <rect height="100" width="200" fill="red"/> </g>
has comment: http://stackoverflow.com/comment/42575487
answers question: http://stackoverflow.com/q/27009672
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27009672
type: Answer
upvote count: 6
score: 6

http://stackoverflow.com/comment/42776865
score: 0
type: AnswerComment
has text: Wait, I am confused, why can't you use echo?
type: Comment
comment on: http://stackoverflow.com/a/27139420

http://stackoverflow.com/a/27069449
has body: Add a class to each input: function _add_more() { var txt = document.createElement('input'); txt.type="file"; txt.name="item_file[]"; txt.className="file-picker"; document.getElementById("files").appendChild(txt); } Then add display: block to your css for the class: input.file-picker { display: block } Working version in this fiddle. EDIT: You may also want to add bottom padding to the CSS class.
answers question: http://stackoverflow.com/q/27069267
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/42534263
comment on: http://stackoverflow.com/a/27000037
has text: I'm not 100% sure what you're trying to do, but yes, I would do whatever you want to do to that table in the callback function. See the "success" section here: http://api.jquery.com/jquery.ajax/
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27084113
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27084229
has body: Hi I'm stumped as to why the data in my table is returned undefined. I think I'm close. Please check out my jsfiddle: $(document).ready(function() { $.getJSON( "http://www.corsproxy.com/dvl.thomascooper.com/data/json_return.json", function( data ) { //static table head $('table.stats').append(" " + " " + " " + "Date" + " " + " " + "Brand" + " " + " " + "Author" + " " + " " + "Title" + " " + " " + "Posts" + " " + " " + "Exposure" + " " + " " + "Engagement" + " "); //loop through json data $.each(data.data.rows,function( i, val ){ //+1 to number each row starting at 1 var rowNum = i + 1; //create table rows and cell and populate with data $('table.stats').append( " " + " " + rowNum + " " + " " + val.date + " " +" " + val.brand_id + " " + " " + val.author + " " + " " + val.title + " " + " " + val.posts + " " + " " + val.reach + " " + " " + val.interaction + " " + " "); }); }); }); fiddle: http://jsfiddle.net/tommy6s/eLbq2wvh/
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27084226
accepted answer: http://stackoverflow.com/a/27084226
has title: table json data returning undefined using jQuery
has comment: http://stackoverflow.com/comment/42677743
possible better answer: http://stackoverflow.com/a/27084229
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42677560
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27084331

http://stackoverflow.com/a/27022206
accepted answer of: http://stackoverflow.com/q/27004569
answers question: http://stackoverflow.com/q/27004569
score: 0
type: AcceptedAnswer
has body: This works if you are trying it in an environment that supports ES6 syntax! Chrome, as of today, does not. Checkout LearnHarmony.org. You can enter this code into the REPL loop and see that it works there. If you'd like to use this syntax today in your project, you need to transpile. Look at Traceur or 6to5 for doing something like that..
type: Answer

http://stackoverflow.com/q/27031395
has body: I'm currently implementing a plugin for cordova. For now, I just get the angles from the camera and return their values to javascript. Everything works, I got the correct values. But there is a latency time problem in my method "getAngles" to get the angles. In this code for example, the first alert displayed indicate: "horizontal: 0, vertical: 0" (the second alert in the code) and after this is the alert "horizontal: 62.2, vertical: 39.4" (the first alert, in the "getAngles" method) Do you know where the problem is? Is there a way to avoid this latency time? (I just want to directly store the angle values in the "horizontal" and "vertical" variables) (Maybe there is something to do in the android code? for now the plugin is only available on android) horizontal = 0; vertical = 0; function alertCameraAngles() { helloWorld.getAngles(function(result) { horizontal = result.horizontalAngle; vertical = result.verticalAngle; alert("horizontal: " + horizontal + "\nvertical: " + vertical); }, function(error) { alert("error"); }); alert("horizontal: " + horizontal + ", vertical: " + vertical); }
score: 0
has answer: http://stackoverflow.com/a/27034732
tagged with: cordova-plugins
tagged with: cordova
type: AnsweredQuestion
has title: latency time personal cordova plugin
accepted answer: http://stackoverflow.com/a/27034732
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27148953
has body: Your best bet is to find out the name of the template used by the editable-select directive (that template will be included in the library and its path can be found in the directive source code). You can then copy the template, add the tooltip-showing capability you want, and replace the original template with your new template in your code using $templateCache.put() (see documentation). Edit: I've looked into the source code myself and unfortunately, it's not as easy as that. Maybe try providing your own &lt;option&gt;s in the select then.
answers question: http://stackoverflow.com/q/27142214
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/42817727

xul
tags question: http://stackoverflow.com/q/27013355
tag name: xul
type: Tag

http://stackoverflow.com/q/27147406
tagged with: javascript
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42791575
answer count: 1
has title: Showing grid line with text on google column chart
has body: In my application I am replacing old charts with google charts Old chart looks like this I can easily create column chart using this reference https://developers.google.com/chart/interactive/docs/gallery/columnchart In above we can see one pink line on column chart with value "2" at top. This is gridline which depends on some condition. If condition is true then I have to show that grid line with pink color &amp; its value at top. how can I do this with google column chart ?
has answer: http://stackoverflow.com/a/31379936
type: UnansweredQuestion
tagged with: c#
tagged with: google-visualization

http://stackoverflow.com/a/27124776
score: 1
downvote count: 0
has body: You can filter out the script tags [].slice.call(document.body.children).forEach(function(element) { if ( element.tagName.toLowerCase() != 'script' ) { element.innerHTML = element.innerHTML.replace(/\$/g, 'xxx'); } }); FIDDLE This is not recursive, which means it only works for script tags directly under the body tag, not script tags that are nested deeper
type: Answer
answers question: http://stackoverflow.com/q/27124607
upvote count: 1

scroller
type: Tag
tags question: http://stackoverflow.com/q/27062104
tag name: scroller

http://stackoverflow.com/a/27100392
has body: $scope.num // find num inside #scope $scope[num] // find the member inside scope variable with the value of num (Score1 in your case) also send the parameter from the element like this: &lt;button ng-click="add_btn('Score1')"&gt;+&lt;/button&gt; and instead num please refactor to id or something.. in short: $scope.add_btn = function(id) { $scope[id]++; };
answers question: http://stackoverflow.com/q/27100317
type: Answer
score: 0

http://stackoverflow.com/comment/42743650
type: Comment
type: QuestionComment
has text: as `haxxxton` said if you have 1,2 and 3 as selected then you will get `1 2 3` as a string. so if you want to convert it to an array then you have to use split (ie. `'1 2 3'.split(' ')`). in case if you want to post the data to server then you can post it as a string and split it in server side.
comment on: http://stackoverflow.com/q/27120935
score: 0

http://stackoverflow.com/comment/42665909
type: Comment
has text: One more thing, how pass few variables? Something like that? ('.$date. + .$name. + .$task.')
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27077511

http://stackoverflow.com/comment/42807552
type: QuestionComment
comment on: http://stackoverflow.com/q/27135139
has text: I just tried to compile above emscripten lib - its not ready for prime time. Short of getting an asm.js version of Opus, web sockets are fast enough to stream raw PCM just to get it up and running. Is your question motivated more by scalability/efficiency ?
score: 0
type: Comment

http://stackoverflow.com/comment/42552470
has text: Suggestion is to do it the "hackish" way, for the reasons named in the article you linked (a single cell has no events fired at all, for it is no component on its own).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27000332

http://stackoverflow.com/a/27135492
accepted answer of: http://stackoverflow.com/q/27135377
score: 3
has comment: http://stackoverflow.com/comment/42799849
downvote count: 0
answers question: http://stackoverflow.com/q/27135377
has comment: http://stackoverflow.com/comment/42798567
has comment: http://stackoverflow.com/comment/42798390
has comment: http://stackoverflow.com/comment/42769536
has comment: http://stackoverflow.com/comment/42769800
type: Answer
has comment: http://stackoverflow.com/comment/42799482
has body: Original your indexOf(...) needs to check for not -1, it will return -1 when thispageurl was not found in this.href. Or you could check that it equals 0, because when the target link is found it should be found at index 0. Update If you do want to check for equality of the current URL and the target href, we need to make use of the == or === comparrision in Javascript. This is because we run into problems when pages are in subidrectories or if you are on the domain. For example: If thispageurl = http://url.com and this.href = http://url.com/page1.html the using this.href.indexOf(thispageurl) would return 0, but it would not be correct. If we reversed the index of for thispageurl.indexOf(this.href) in that scenario, .indexOf() returns -1. Likewise, if we flip thispageurl and this.href to http://url.com/page1.html and http://url.com respectively, we run into a similar situation depending on which we are taking an indexOf. So I Updated the following code to check for equality of string values. var thispageurl = window.location.href; $(".alllinkswrap").children().each(function(){$(this).hide()}) $(".alllinkswrap").children().each(function(){ if (this.href === thispageurl) { $(this).next().show(); $(this).prev().show(); } }); 1 2 3 4 5
has comment: http://stackoverflow.com/comment/42780574
upvote count: 3
has comment: http://stackoverflow.com/comment/42769699
has comment: http://stackoverflow.com/comment/42769468
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42773518
has comment: http://stackoverflow.com/comment/42771406

http://stackoverflow.com/a/27104703
upvote count: 2
has comment: http://stackoverflow.com/comment/42713061
has body: You have two options to solve your problem: 1st option: Change &lt;input type="submit" id="signup_button" name="signup_button" class="btn btn-primary" value="Sign up"&gt; To &lt;input type="button" id="signup_button" name="signup_button" class="btn btn-primary" value="Sign up"&gt; So the button will not trigger a form submit. 2nd option: Put an event.preventDefault at your click handler. $("#signup_button").click(function(event) { /* Your stuff */ event.preventDefault(); } So it will not trigger browser default action to form submit button.
type: Answer
answers question: http://stackoverflow.com/q/27104613
score: 2
has comment: http://stackoverflow.com/comment/42712836
has comment: http://stackoverflow.com/comment/42712954
has comment: http://stackoverflow.com/comment/42712987
has comment: http://stackoverflow.com/comment/42712900
downvote count: 0
has comment: http://stackoverflow.com/comment/42712778

http://stackoverflow.com/a/27077032
has body: It doesn't seem that the Ant script is calling java the same way as the batch file. The exec task is calling the following command: java -jar ${src.dir}/r-js/lib/rhino/js.jar ${src.dir}/r-js/lib/closure/compiler.jar ${src.dir}/r-js/dist/r.js -o ${src.dir}/r-js/build.js which is clearly different than the one in the .bat file, i.e. the jars are not being added to the classpath properly. In Ant, you can simply use the java task to run a Java class. Try using the following: &lt;java classname="org.mozilla.javascript.tools.shell.Main" failonerror="true"&gt; &lt;arg path="${src.dir}/r-js/dist/r.js" /&gt; &lt;arg value="-o"/&gt; &lt;arg path="${src.dir}/r-js/build.js" /&gt; &lt;classpath&gt; &lt;pathelement location="${src.dir}/r-js/lib/rhino/js.jar" /&gt; &lt;pathelement location="${src.dir}/r-js/lib/closure/compiler.jar" /&gt; &lt;/classpath&gt; &lt;/java&gt;
answers question: http://stackoverflow.com/q/27076840
score: 0
accepted answer of: http://stackoverflow.com/q/27076840
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/27054945
score: -2
has body: I'm sorry that I only know about C. But there must be something calls timer. Which it will keep on running the code that you want it to run. You can keep on checkin number of check box that is checked
type: Answer
answers question: http://stackoverflow.com/q/27054487
upvote count: 0
has comment: http://stackoverflow.com/comment/42626728
downvote count: 2
has comment: http://stackoverflow.com/comment/42638463

http://stackoverflow.com/a/27032144
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27032046
has body: demo - http://jsfiddle.net/victor_007/wg6zx2wj/ $("input:radio[name=list]").click(function () { var value = $(this).val(); if (value == 'yes') { $("#hide").show() } else { $("#hide").hide() } });
downvote count: 0
has comment: http://stackoverflow.com/comment/42588110

http://stackoverflow.com/comment/42646816
type: Comment
has text: For example: If you input '1' in the input field here - http://jsfiddle.net/s91fb8jx/42/ - The output number should never be '0'. How do I do that? can you please update the answer with this?
score: 0
comment on: http://stackoverflow.com/a/27066466
type: AnswerComment

http://stackoverflow.com/comment/42566260
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27020670
has text: then add the anchors like `'^[^0-9.]{6}$'`
score: 0

http://stackoverflow.com/a/27001745
answers question: http://stackoverflow.com/q/27001523
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: The fields inputB and inputC just don't exist. Then it produce an error. function compute() { var a = form1.inputA.value; a = parseFloat(a); var e = a * 5.49; form1.sumA.value = e.toFixed(2); } You can use web developer tools to analyze your code. Modern web browser have tools like that. Take a look at google chrome developer tools : https://developer.chrome.com/devtools for example. You can find equivalent tools for firefox and Internet Explorer.
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/27001523

http://stackoverflow.com/comment/42705703
has text: @Qantas94Heavy could be either way, it doesn't change the fact that right now, it's not a duplicate :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27100596

http://stackoverflow.com/a/27079496
score: 1
answers question: http://stackoverflow.com/q/27074821
upvote count: 1
has body: Your code... submitHandler: function(form) { form.submit(function(event) { event.preventDefault(); }); } submitHandler: function(form) { form.submit(function() { return false(); }); } No and no. By putting .submit() within the submitHander, you are doing the exact opposite of what you're trying to achieve. To block the default form submit action... submitHandler: function(form) { return false(); } However, since you describe that you only want to block the submit until fields are added to the form, you cannot use the submitHandler at all because it will always block submission. Since you cannot toggle or change these options dynamically, just remove the submitHandler to allow the default behavior. Then you could use a hidden input field, and set it as required with a value of nothing. This will prevent the submit by triggering a validation error. When you add your dynamic fields, you would simply remove this hidden field. (You could even set the error message on the hidden field to something like, "Please add fields to the form first." or whatever.) You'll also need the ignore: option set to ignore nothing otherwise, hidden fields are ignored. BTW, the famous "jQuery 4U" jQuery Validate example/tutorial is about the worst I've ever seen and I have no idea what its author was trying to accomplish with all that nonsense. Really, refer to the tag wiki for all you need... $(document).ready(function() { $("#aws-res-ci").validate({ ignore: [], // ignore nothing; validate hidden fields rules: { // your rules }, messages: { // your messages } }); //setting up funcations var max_fields = 10; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_ec2 = $("#add_ec2_instance"); //Add button ID var x = 0; //initlal text box count //EC2 Instance $(add_ec2).click(function(e){ //on add input button click e.preventDefault(); if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).append(' \ Remove '); //add input box } …
type: Answer
downvote count: 0

http://stackoverflow.com/q/27087289
has answer: http://stackoverflow.com/a/27121866
accepted answer: http://stackoverflow.com/a/27121866
type: Question
tagged with: encoding
tagged with: javascript
has body: I've created simple firefox add-on, which should search for selected on page substring in files. Everything is ok until I try to search for substring in some specific language, russian fo example. The search command executed using call to windows cmd command propmt as follow: function getShell() { var env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment); var shell = new FileUtils.File(env.get("COMSPEC")); var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess); process.init(shell); return process; } var shell = getShell(); var text = "россия"; var folder = "c:\\temp\\test\\*.*"; var cmd = "chcp 65001 &amp; c:\\progra~1\\gnuwin32\\bin\\grep.exe -i -r " + text + " " + folder + " &gt; c:\\temp\\test\\output.txt"; cmd = utf16to8(cmd); args = ["/k", cmd]; shell.run(true, args, args.length); So, I've tried deode utf-16 to utf-8 and execute (changing the code page inside shell execution) with no success. But I've succeeded as follow: var cmd = "chcp 1251 &amp; c:\\progra~1\\gnuwin32\\bin\\grep.exe -i -r " + text + " " + folder + " &gt; c:\\temp\\test\\output.txt"; cmd = UnicodeToWin1251(cmd); args = ["/k", cmd]; shell.run(true, args, args.length); The last one works fine, but it does not work with other languages. How to convert internal javascript string to utf-8 and execute command usig 65001 codepage? UnicodeToWin1251 taken here utf16to8 taken here
linked to: http://stackoverflow.com/q/2696481
upvote count: 1
answer count: 1
tagged with: utf-8
tagged with: cmd
favorite count: 0
tagged with: utf-16
has title: Firefox add-on - execute shell command - parameters encoding
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/42782139
comment on: http://stackoverflow.com/a/27141203
has text: Thanks @Jason W That works. I did the # before this, but didn't put the val(). No wonder it won't works. That did trick!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27043182
has title: Misunderstanding the proper use of Input Text value Property function
type: Question
possible better answer: http://stackoverflow.com/a/27043332
has answer: http://stackoverflow.com/a/27043332
tagged with: javascript
has body: I am working my way through a small learning exercise in Javascript that gets the value of text in a text area and replaces the single quotes with double quotes as indicated by the regex. What I am confused about is why I can't/don't/ shouldn't include the "value" property" in the argument passed to the replaceQuote() function. In the code below i pass document.form1.textarea1, and all works well. If I modify the function to pass the argument as document.form1.textarea1.value, the code doesn't work. My question is this, what am I clearly misunderstanding about value property and how it functions. I am pretty sure it's something very fundamental that I am just too obtuse to "get" This version of the function works 'Hello World' said Mr O'Connerly. He then said 'My Name is O'Connerly, yes that's right, O'Connerly'. This version of the function does not work. Function is modified to accept replaceQuote(document.form1.textarea1.value) 'Hello World' said Mr O'Connerly. He then said 'My Name is O'Connerly, yes that's right, O'Connerly'.
accepted answer: http://stackoverflow.com/a/27043284
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42605420
has answer: http://stackoverflow.com/a/27043284
type: AnsweredQuestion

http://stackoverflow.com/q/27072114
has comment: http://stackoverflow.com/comment/42656836
tagged with: jquery
has answer: http://stackoverflow.com/a/27072755
favorite count: 0
has comment: http://stackoverflow.com/comment/42656875
has answer: http://stackoverflow.com/a/27072545
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42657057
type: AnsweredQuestion
downvote count: 0
has body: How can I make selected divs (paired with.stayhovered) that were triggered upon hovering over a div maintain visible until the person hover overs a different div? jsfiddle here. Thank you in advance! HTML Subject 01 Subject 01, topleft Maintain hover until subject02 is hovered Subject 01, topright Fadeout when cursor hovers out Subject 01, bottomleft Maintain hover until subject02 is hovered Subject 01, bottomright Fadeout when cursor hovers out Subject 02 Subject 02, topleft Fadeout when cursor hovers out Subject 02, topright Maintain hover until subject01 is hovered Subject 02, bottomleft Fadeout when cursor hovers out Subject 02, bottomright Maintain hover until subject01 is hovered CSS /* hoverover text placement */ body { font-family: helvetica; font-size: 13px; background-color: #FAFAFA; } .topleft, .topright, .bottomleft, .bottomright { position: fixed; } .topleft { top:2%; left:2%; } .topright { top:2%; right:2%; } .bottomleft { bottom:2%; left:2%; } .bottomright { bottom:2%; right:2%; } /* Feature Typography */ .featuretitle, .featureinfo, .rotate { } .featuretitle { } .featureinfo { } /* FEATURE DETAIL */ .featuredetail { font-family:'Courier New', Courier, monospace; font-weight: normal; letter-spacing: 1px; text-align: left; text-transform: uppercase; font-size: 11px; line-height: 18px; overflow-x: hidden; position: fixed; bottom: 20px; left: 20px; width: 50% } /* Subjects */ #subject01 { left: 30%; top: 30%; position: fixed; color: #FE5722; } #subject02 { right: 30%; bottom: 30%; position: fixed; color: #3F51B5; } /* Feature */ .feature-img-wrap { display:block; } *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .targetDiv { position:absolute; width:100%; visibility: hidden; opacity:0; -webkit-transition: all 250ms linear; -o-transition: all 250ms linear; transition: all 250ms linear; } .show:hover .targetDiv { visibility: visible; opacity:1; } .show:hover .stayhovered { visibility: visible; o…
score: 1
has comment: http://stackoverflow.com/comment/42665298
has comment: http://stackoverflow.com/comment/42665368
possible better answer: http://stackoverflow.com/a/27072755
has comment: http://stackoverflow.com/comment/42656898
type: Question
tagged with: javascript
has title: How to make selected triggered divs maintain visibility until other divs are hovered over?
answer count: 2
accepted answer: http://stackoverflow.com/a/27072545
has comment: http://stackoverflow.com/comment/42657200
upvote count: 1
has comment: http://stackoverflow.com/comment/42656826
has comment: http://stackoverflow.com/comment/42657164

http://stackoverflow.com/comment/54298974
has text: is that service support jsonp?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27017390
type: Comment

http://stackoverflow.com/q/27015356
tagged with: javascript
has title: How to check if at least one checkbox is checked from list of checkboxes with it name attribute as array
possible better answer: http://stackoverflow.com/a/27015445
has answer: http://stackoverflow.com/a/27015445
type: AnsweredQuestion
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27015392
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
score: 0
has answer: http://stackoverflow.com/a/27015392
has body: I have a div and inside that div i have check boxes with name attribute as an array, now i want to heck if at least one check box is checked. &lt;div id="check_lists"&gt; &lt;input type="checkbox" name="usernames[]" value="1"&gt; &lt;input type="checkbox" name="usernames[]" value="2"&gt; &lt;input type="checkbox" name="usernames[]" value="3"&gt; &lt;input type="checkbox" name="usernames[]" value="3"&gt; &lt;/div&gt;

http://stackoverflow.com/comment/42746975
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27123110
has text: Please always include your code in the question.

http://stackoverflow.com/comment/42617784
score: 0
has text: Have a look at Cory snippet. It can depend on which version of jQuery you are using.
type: AnswerComment
comment on: http://stackoverflow.com/a/27050095
type: Comment

http://stackoverflow.com/a/27010027
upvote count: 1
downvote count: 0
has body: As in this code seems to be error: Uncaught Error: Syntax error, unrecognized expression: .formsetFormField:not(.treeLevel):not([name$=-TOTAL_FORMS]):not([name$=-INITIAL_FORMS]):not([name$=-MAX_NUM_FORMS]), input[type=checkbox][name$=-DELETE], input[type=hidden][name$=-slide], , input[type=file] so you can try this: $(this).find('.formsetFormField:not(.treeLevel):not([name$="-TOTAL_FORMS"]):not([name$="-INITIAL_FORMS"]):not([name$="-MAX_NUM_FORMS"]), input[type="checkbox"][name$="-DELETE"], input[type="hidden"][name$="-slide"], input[type="file"]'); what seems to me is when using attribute selectors, you should use "" quotes to make it string representation like for example: [name$="-MAX_NUM_FORMS"]. Another thing i noticed that you have two commas , , here: [name$=-slide], , input[type=file] at the end of your selector.
type: Answer
answers question: http://stackoverflow.com/q/27009887
has comment: http://stackoverflow.com/comment/42547703
score: 1

scroll
tags question: http://stackoverflow.com/q/26998489
tags question: http://stackoverflow.com/q/27023768
tags question: http://stackoverflow.com/q/27041385
tags question: http://stackoverflow.com/q/27033631
tags question: http://stackoverflow.com/q/27001529
tags question: http://stackoverflow.com/q/27054254
tags question: http://stackoverflow.com/q/27078199
tags question: http://stackoverflow.com/q/26999128
tags question: http://stackoverflow.com/q/27048089
tags question: http://stackoverflow.com/q/27039817
tags question: http://stackoverflow.com/q/27041685
type: Tag
tags question: http://stackoverflow.com/q/27052450
tags question: http://stackoverflow.com/q/27064164
tags question: http://stackoverflow.com/q/27052937
tag name: scroll
tags question: http://stackoverflow.com/q/27060162
tags question: http://stackoverflow.com/q/27027107

http://stackoverflow.com/a/27066742
accepted answer of: http://stackoverflow.com/q/27066678
has comment: http://stackoverflow.com/comment/42647055
answers question: http://stackoverflow.com/q/27066678
type: AcceptedAnswer
upvote count: 5
has comment: http://stackoverflow.com/comment/42646937
has comment: http://stackoverflow.com/comment/42646906
type: Answer
has body: (function() { var elements; //store the collection of matching elements elements = document.querySelectorAll(".but-class"); // loop through the collection appending your new class for (var i = 0; i < elements.length; ++i) { elements[i].classList.add('custom-class'+i); // append the value of 'i' to your class name } }()); .custom-class0 { color: green; } .custom-class1 { color: red; } .custom-class2 { color: blue; } .custom-class3 { color: purple; } Button Button Button Button EDIT I've wrapped the code in a self invoking anonymous function to prevent var elements existing globally.
downvote count: 0
has comment: http://stackoverflow.com/comment/42646859
score: 5

http://stackoverflow.com/q/27115086
has title: jQuery not working correctly on click, only one element
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27115331
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42733050
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42732986
has comment: http://stackoverflow.com/comment/42733098
has body: I am having trouble getting this to work correctly, you can see the code below, it seems like it is only working for one link, it will just load index.php?act=old... $(document).ready(function(){ $("#example").dialog({modal: true}); $("#example").dialog({width: 500}); $('#newProject').click(function(){ $('#dialogContent').load('index.php?act=new'); }); $('#oldProject').click(function(){ $('#dialogContent').load('index.php?act=old'); }); }); and the HTML Would you like to create a new calculation or open and edit and old calculation? Open Old Calculation Create New Calculation
has comment: http://stackoverflow.com/comment/42733126
has comment: http://stackoverflow.com/comment/42733030
score: 1
has answer: http://stackoverflow.com/a/27115331
has comment: http://stackoverflow.com/comment/42733135

http://stackoverflow.com/comment/54119296
type: QuestionComment
comment on: http://stackoverflow.com/q/27019052
has text: I used the sollution posted by qwetty, it worked perfectly :)
type: Comment
score: 1

http://stackoverflow.com/q/27149110
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Angularjs Restful using ngResource not working
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42793019
has answer: http://stackoverflow.com/a/27149401
has body: I am trying to expose restful web service using angularjs ngResource using java as my backend everything seems to be correct but don't know What is wrong with my code nothing gets displayed in browser help me with this service.js 'use strict'; var employeeServices = angular.module('myApp.services',['ngResource']); employeeServices.factory('Employees',['$resource',function ($resource){ return $resource('my service link', {},{ query:{method:'GET',isArray:true} }); }]); Controller.js 'use strict'; angular.module('myApp.controllers',[]). controller('Myctrl1',['$scope','Employees',function ($scope ,Employees){ $scope.allemployees = Employees.query(); }]). controller('Myctrl2',[function (){ }]); app.js 'use strict'; angular.module("myApp", [ 'ngRoute', 'myApp.controllers', 'myApp.services' ]). config(['$routeProvider', function($routeProvider) { $routeProvider.when('/view1',{templateUrl:'partials/partials.html',controller:'Myctrl1'}); $routeProvider.when('/view2',{templateUrl:'partials/partials1.html',controller:'Myctrl2'}); $routeProvider.otherwise({redirectTo: '/view1'}); }]);
type: Question
has comment: http://stackoverflow.com/comment/42793074

http://stackoverflow.com/comment/42714772
comment on: http://stackoverflow.com/q/27105744
has text: It should be the same?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42620970
type: AnswerComment
has text: Nevermind I see it. He's making the same error I did. Assuming the ajaxForm call is the same as the ajax call. You're right that he needs to pass a function to the call that handles the callback
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27051845

http://stackoverflow.com/a/55349389
score: 0
has comment: http://stackoverflow.com/comment/97441934
has body: Properly rounding to the nearest penny: var yourNumber = 5.495; yourNumber = Math.round(yourNumber * 100)/100; alert(yourNumber); Always round up to the nearest penny: function precision(a) { if (!isFinite(a)) return 0; var e = 1, p = 0; while (Math.round(a * e) / e !== a) { e *= 10; p++; } return p; } if (precision(yourNumber) &gt;= 3) { yourNumber = (Math.trunc(yourNumber * 100)/100) * 1 + 0.01; }
type: Answer
answers question: http://stackoverflow.com/q/27083235

http://stackoverflow.com/comment/42721879
type: AnswerComment
comment on: http://stackoverflow.com/a/27108962
type: Comment
has text: This does not work because my window is loaded and I only change dom elements. I am using GWTP. So the load event will not fire again.
score: 0

http://stackoverflow.com/q/27018258
score: 1
has comment: http://stackoverflow.com/comment/42564817
type: Question
tagged with: asp.net-web-api2
has answer: http://stackoverflow.com/a/27112262
tagged with: ssl
tagged with: javascript
has body: I have developed a Web API project which has a token endpoint set up. I want to set up another site that calls this API so I have created this JavaScript function: $.ajax({ url: "http://path.to.site/token", data: { grant_type: "password", userName: "user", password: "password" } }).done(function (data) { console.log(data); }).fail(function (errror) { console.log(error); }); Even with SSL enabled on both sites, if a user were to view the source of this site then they would be able to see the username and password. If I got the access token using server side code (PHP, .net or whatever) I would still have to pass the access token to the JavaScript API calls and again that would be readable. I feel like I am missing something here, can someone explain to me what it is? :D
answer count: 1
downvote count: 0
favorite count: 0
has title: web api authentication and ssl
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/27048368
tagged with: backbone.js
type: Question
score: 0
has answer: http://stackoverflow.com/a/27080435
tagged with: forms
answer count: 1
tagged with: reactjs
tagged with: javascript
type: UnansweredQuestion
has title: Using React LinkedStateMixin for text input doesn't re-render as expected
has body: Here's the render function for one of my react components: render: function() { var valueLink = this.linkState.value; var handleBlur = function(e) { valueLink.requestChange(e.target.value); }; return ( &lt;input type="text" defaultValue={valueLink} onBlur={handleBlur} /&gt; ); } I'm using backbone-react. After setting an attribute on the model, this component calls its render function. The backbone model gets set properly, but the input field doesn't render the value that was set on the model. Basically when the render function gets called after the valueLink.value changes, the input field doesn't reflect this change. I've tried using value instead of defaultValue but that makes it a controlled component. I also don't want to use valueLink as that sets state for every key press whereas I only what to trigger that for onBlur. Any ideas? (Please let me know if you need more info.)

http://stackoverflow.com/comment/42663520
type: AnswerComment
type: Comment
has text: every script in the loaded page via your code will be treated as plain text ... not javascript, so you should execute your scripts manually
comment on: http://stackoverflow.com/a/27076121
score: 0

http://stackoverflow.com/q/27006224
has comment: http://stackoverflow.com/comment/42541527
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27006358
tagged with: javascript
tagged with: jquery
tagged with: webforms
score: 0
has title: How to locate JavaScript code responsive for button action?
accepted answer: http://stackoverflow.com/a/27006325
favorite count: 0
has answer: http://stackoverflow.com/a/27006358
has answer: http://stackoverflow.com/a/27006325
has body: There is a button that, when clicked, does a specific action and refreshes the page. Its looks like this: &lt;input type="submit" name="name" value="some value" id="mt1_main_btn" class="btn_next"&gt; When I try to copy that obviously it does not work because there is not JavaScript behind it to do what its supposed do. Is there any way to find on the page whats triggering it to work and copy that over to the new pages? What is the best thing to look for?
upvote count: 1
downvote count: 1
type: AnsweredQuestion
tagged with: forms

http://stackoverflow.com/comment/42574480
has text: I deleted my answer. I didn't realize he was using D3. I think D3 has easing as well though. Easing functions might have access to the duration info. If not you could track it yourself and use it in an easing function.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27025397

http://stackoverflow.com/comment/42547870
score: 0
type: AnswerComment
type: Comment
has text: so you could do something like returning the svc.settings in the service function, and in the other controller do a watch for the $resolved property like this: $scope.$watch('settings.$resolved', function () { if (($scope.setting !== undefined) && ($scope.setting.$resolved)) { //i got the data from the GET } });
comment on: http://stackoverflow.com/a/27010036

http://stackoverflow.com/comment/42577204
comment on: http://stackoverflow.com/q/27026621
has text: good question @HowardRenollet, let me ask to support
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42529568
has text: @user3684675 I would add that it's difficult to see what's going on when you dynamically add chunks of HTML in an attribute; esp. as you're already using the `content` option. I recall recently answering a related question that you may find helpful: http://stackoverflow.com/questions/26919565
type: Comment
comment on: http://stackoverflow.com/a/26996484
score: 1
type: AnswerComment

http://stackoverflow.com/q/27112061
has comment: http://stackoverflow.com/comment/42728744
has body: So I have a Ruby on Rails app that uses Leaflet JS to display a rather large map file overlaid with various layers of boxes, markers, paths, etc. However, if I load the map through IE 11, once I change zoom levels from the initial value everything is removed, the map stops loading, and I can no longer change zoom levels. I do not believe it is a problem with my code for several reasons, mainly the facts that: Everything works in Firefox and Chrome Map works on IE version 9 Code produces no error messages in console or anywhere else So I have to admit I'm at a near-complete loss as to the cause of this error. I've pulled the latest stable leaflet release but it didn't change anything. I'm hoping someone has a suggestion that might help out.
tagged with: ruby-on-rails
has title: Adjusting zoom levels in leaflet js removes all layers and prevents any further zoom functionality in IE11
tagged with: leaflet
answer count: 0
has comment: http://stackoverflow.com/comment/42729208
type: Question
tagged with: internet-explorer
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42728072
type: UnansweredQuestion

http://stackoverflow.com/q/27112539
tagged with: arcgis-js-api
answer count: 1
has title: Esri JS Bookmark in separate Div
has answer: http://stackoverflow.com/a/27448891
tagged with: arcgis
type: UnansweredQuestion
has body: Using the Esri JavaScript API I need to create a number of different bookmarks and access them through the HTML in separate div tags. I created this JS Fiddle in attempt. I thought that if I defined separate bookmarks and bookmarkitems, it would work. No success yet. I think I am close, missing something simple/. var bookmark1 = new esri.dijit.Bookmarks({ map: map, bookmarks: Bookmark_1 }, dojo.byId('Bookmark1'));
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/a/27013576
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27013166
has body: Can't you use something like this?

http://stackoverflow.com/a/27107517
has comment: http://stackoverflow.com/comment/42720331
type: Answer
has comment: http://stackoverflow.com/comment/42723233
answers question: http://stackoverflow.com/q/27107432
has body: You could create a new image element and append it in the element. Depending on if the data can subsequently change again you might need to check for the existence of the image first. CSS img.myFullSizeImageClass { width: 100%; height: 100%; } JavaScript function ModifyData() { var Elements = document.getElementsByTagName('td'); pictureGrey = "angular-icon.png"; for (var i = 0; i &lt; Elements.length; i++) { if (Elements[i].firstChild.nodeValue == '3') { Elements[i].style.color = 'green'; Elements[i].style.background = 'green'; Elements[i].firstChild.nodeValue = ' '; } else if (Elements[i].firstChild.nodeValue == '9') { Elements[i].firstChild.nodeValue = ""; var img = document.createElement("img"); img.src = pictureGrey; img.className = 'myFullSizeImageClass' Elements[i].appendChild(img); } } }
has comment: http://stackoverflow.com/comment/42720678
score: 0
has comment: http://stackoverflow.com/comment/42745810
has comment: http://stackoverflow.com/comment/42718411
has comment: http://stackoverflow.com/comment/42719512

http://stackoverflow.com/a/27064376
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27064287
upvote count: 1
score: 1
has body: The way Bootstrap sees how you want to change sizes for different screen sizes are in the column size identifiers. And each number is a fraction of 12. &lt;div class="footer-col col-md-4"&gt; means you want the footer to take 4/12 of the screen on devices medium or higher. To designate that you want it to be different on different sizes, you would put something like &lt;div class="footer-col col-md-4 col-sm-12"&gt; to mean that you want it to take up 4/12 of the screen on medium devices or larger, and 12/12 of the screen on small devices up to medium.

http://stackoverflow.com/comment/44930249
comment on: http://stackoverflow.com/a/27101860
type: Comment
type: AnswerComment
has text: A CDN should slightly speed it up, try using cloudfront from amazon. Its free for most websites unless you are really really big http://aws.amazon.com/cloudfront/
score: 0

http://stackoverflow.com/a/27018043
type: Answer
answers question: http://stackoverflow.com/q/27017711
score: 0
has body: var obj = {x: 5, y: 6, apple:0, name:'myname'}; var objToText = JSON.stringify(obj); console.log(objToText); var text = '{"x": 5, "y": 6, "apple":0, "name":"myname"}'; var textToObj = JSON.parse(text); console.log(textToObj);

http://stackoverflow.com/q/27149563
type: Question
accepted answer: http://stackoverflow.com/a/27151369
has comment: http://stackoverflow.com/comment/42794361
tagged with: javascript
tagged with: progress-bar
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42794932
tagged with: http://stackoverflow.com/tag/html
has title: how can I get my progress bar to last for exactly 20 seconds?
type: AnsweredQuestion
has body: I need my progress bar to last for exactly 20 seconds. when it completes the bar, it still needs to be able to refresh, like it does now. I need to be able to put the exact number of seconds in my code. here's my code:
has answer: http://stackoverflow.com/a/27151369

http://stackoverflow.com/q/27021055
has answer: http://stackoverflow.com/a/27022551
type: Question
tagged with: javascript
tagged with: dropzone.js
score: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42567701
favorite count: 0
tagged with: image-uploading
has body: I'm using Dropzone.js with Angular.js to upload images, but i didn't find a method, how can i upload thumbnails to my server. .dropzone({ url: "/gallery/add", maxFilesize: 100, paramName: "uploadfile", createImageThumbnails: true, thumbnailWidth: 200, init: function() { this.on('addedfile', function(file) { // maybe something here }); this.on('thumbnail', function(file){ // or here }); } }); Problem only with thumbnails
tagged with: angularjs
has title: Store image thumbnails on server with Dropzone.js
type: UnansweredQuestion
upvote count: 2

http://stackoverflow.com/q/27124769
has comment: http://stackoverflow.com/comment/42777186
score: 0
tagged with: asp.net
has body: I'm using dropdowncheckboxlist, where we can select multiple values and my question is how to again check the checkbox inside dropdownCheckList based on database values. That is, I have to check multiple values while editing or updating the values. I'm using this script: &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#ContentPlaceHolder1_dropdown").dropdownchecklist({ forceMultiple: true , onComplete: function (selector) { var values = ""; for (i = 0; i &lt; selector.options.length; i++) { if (selector.options[i].selected &amp;&amp; (selector.options[i].value != "") ) { if (values != "") values += ","; values += selector.options[i].value; } } // alert(values); $('#&lt;%= hidVisitorID.ClientID %&gt;').val(values); } , onItemClick: function (checkbox, selector) { var justChecked = checkbox.prop("checked"); var checkCount = (justChecked) ? 1 : -1; for (i = 0; i &lt; selector.options.length; i++) { if (selector.options[i].selected) checkCount += 1; } if (checkCount &gt; 9) { alert("Industry Limit is 9"); throw "too many"; } } } &lt;/script&gt;
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42780852
has comment: http://stackoverflow.com/comment/42781119
tagged with: dropdownchecklist
type: Question
has comment: http://stackoverflow.com/comment/42780962
tagged with: javascript
has title: How to check the dropdowncheckboxlist based on database values

http://stackoverflow.com/a/26996926
upvote count: 1
type: AcceptedAnswer
has body: Please try this Check this link $.format(45678.987, "n1")
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/26996151
accepted answer of: http://stackoverflow.com/q/26996151
score: 1

http://stackoverflow.com/q/27109337
accepted answer: http://stackoverflow.com/a/27911799
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42721628
has comment: http://stackoverflow.com/comment/42770318
type: Question
score: 3
tagged with: javascript
tagged with: caching
upvote count: 3
tagged with: browser
has body: Problem! I am calling a JS function inside the html's body section, the function's parameters are gathered by parsing the EL inside the function. Eg: &lt;script type="text/javascript"&gt; jQuery(window).load(function() { loadImage("${expression_language_var_1}", "${expression_language_var2}"); }); &lt;/script&gt; But it seems that sometimes both parameters are cached and I do receive old information. Questions! Are the script tags inside the html structure being cached just the same way as the external javascript files that are included in the header? Best Regards,
linked to: http://stackoverflow.com/q/1341089
answer count: 1
tagged with: jsp
favorite count: 0
has title: Javascript: Is Javascript cached if invoked from the html's body?
has answer: http://stackoverflow.com/a/27911799

http://stackoverflow.com/comment/59930673
type: Comment
has text: It worked, when: 1. script-file has format **[fileName].scpt** (create new File in Script Editor) 2. selected type **JavaScript** in `Script Editor` 3. save file in folder from `application Messages` - `menu Messages > Preferences` - `General Section` - `AppleScript handler dropdown menu` - `Open Scripts Folder` 4. select this file in `AppleScript handler dropdown menu` from p.3.
comment on: http://stackoverflow.com/a/34385668
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42592777
score: 0
type: AnswerComment
has text: Yes you are right, both events fire when the slide start and when the slide end. You can initialise the counter with a function just after you declare the carousel, see this fiddle as an example http://jsfiddle.net/1pv3e87t/12/
type: Comment
comment on: http://stackoverflow.com/a/27034838

http://stackoverflow.com/comment/42638263
type: Comment
type: QuestionComment
has text: Hi Thank you all of you for comments. @Jarek, how to get know that my fetch_more_data.php file is connected/linked to edit.js? I have added something like echo " "; but It seems both files are not linked together.
comment on: http://stackoverflow.com/q/27061434
score: 0

http://stackoverflow.com/comment/42637160
has text: canvas.onmousedown=handleMousedown; var imgX=50; var imgY=50; var img=new Image(); img.onload=start; img.src="leftArrow.jpg"; function start(){ ctx.drawImage(img,50,50); } function handleMousedown(e){ e.preventDefault(); e.stopPropagation(); var x=e.clientX-offsetX; var y=e.clientY-offsetY; if(x>=imgX && x<=imgX+img.width && y>=imgY && y<=imgY+img.height){ alert('Clicked in left arrow'); } }
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27061266

http://stackoverflow.com/q/27110212
upvote count: 14
has title: JS: Array.map don't add to array
has answer: http://stackoverflow.com/a/27110700
tagged with: dictionary
downvote count: 0
has answer: http://stackoverflow.com/a/50121732
type: UnansweredQuestion
has body: I have some data I'd like to transform using Array.prototype.map. However in the map function there is a chance of an error being thrown by an external function call. I'd like to catch this error and not add that particular object to the returned array. Currently I'm just returning undefined and then using Array.prototype.filter to clear out the undefined values, but this seems like a dirty way to do it. To clarify, I'm looking for this functionality: ['apple','pear','banana', 'peach'].map(function(fruit){ if (fruit === 'apple') { return undefined; } return 'I love to eat ' + fruit; }); // ['I love to eat pear', 'I love to eat peach', 'I love to eat banana'] Any existing implementatons of this? Am I just going about this the wrong way?
score: 14
has answer: http://stackoverflow.com/a/27110304
answer count: 6
has answer: http://stackoverflow.com/a/27110345
type: Question
has answer: http://stackoverflow.com/a/27110357
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42723511
favorite count: 0
has answer: http://stackoverflow.com/a/59588322

http://stackoverflow.com/a/27038570
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27038263
has body: I do not understand your wish. will the next code help? Your browser does not support the HTML5 canvas tag.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42633039
comment on: http://stackoverflow.com/q/27048702
type: QuestionComment
type: Comment
score: 0
has text: After all I have to say that the whole idea was wrong. The solution was to define a small helper function `build_js(data)` to return a HTML Script Tag. The data needed is passed to the function. Thanks @Anthony anyway!

http://stackoverflow.com/q/27017543
linked to: http://stackoverflow.com/q/6660955
has answer: http://stackoverflow.com/a/27019448
tagged with: https
type: Question
has comment: http://stackoverflow.com/comment/53414674
has body: I am loading google maps api v3 script over https using the url https://maps.googleapis.com/maps/api/js?sensor=false .The maps get loaded and work properly in IE and chrome. But on firefox the maps don't work and I can see the error TypeError: google.maps.event is undefined .I checked if the google object is loaded using undefined check and its not getting loaded on Firefox, IE and chrome load it properly. The same behavior can be checked via the url https://google-developers.appspot.com/maps/documentation/javascript/examples/full/map-simple . The error occurs only over https and not http. The same issue has been noticed over multiple networks and multiple machines. Firefox version being used:- 33.1. My script import is in the head and my jquery bindings in the document.ready, so not much chance of the scripts executing before the import. Same behavior is getting exhibited even in Firefox safe mode. Can somebody help me out with a solution for this?
tagged with: javascript
tagged with: google-maps-api-3
score: 0
upvote count: 1
tagged with: firefox
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Issue while loading Google maps api V3 in Firefox over https
has comment: http://stackoverflow.com/comment/51575982

http://stackoverflow.com/comment/42615304
type: Comment
comment on: http://stackoverflow.com/a/27047421
has text: Thanks, this answered it perfectly, +1 for ECMAScript Language Specification.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27127168
has body: When I visit http://php.net in Chrome 38, I don't see this attribute in the HTML. As has been pointed out, this attribute has no meaning according to any HTML specification. My guess is that this is inserted by an extension you have running in your browser. Try navigating to chrome://extensions/ and disabling extensions, then reloading the page.
answers question: http://stackoverflow.com/q/27126686
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42754003
has comment: http://stackoverflow.com/comment/42755507
type: Answer
accepted answer of: http://stackoverflow.com/q/27126686

http://stackoverflow.com/comment/42783710
type: Comment
comment on: http://stackoverflow.com/a/27143340
has text: No problemo =) All it takes is a little googling :D
score: 0
type: AnswerComment

http://stackoverflow.com/q/27065527
accepted answer: http://stackoverflow.com/a/27109296
has comment: http://stackoverflow.com/comment/42717689
favorite count: 0
has comment: http://stackoverflow.com/comment/42717564
tagged with: local-storage
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
score: 1
has answer: http://stackoverflow.com/a/27109296
upvote count: 1
has comment: http://stackoverflow.com/comment/42717518
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27107682
downvote count: 0
has answer: http://stackoverflow.com/a/27107682
tagged with: javascript
tagged with: jquery
has title: save .addClass with jQuery cookie or local storage
has body: I'm trying to save the .addClass every time I save a stylesheet so that the button remembers The user can toggle the option on/off. My simple html: off on This is my code: How can use the same cookie to save the .active class? I would also use local storage for all of this but I dont know how to even start the code snippet I achieved above
tagged with: jquery-cookie

http://stackoverflow.com/q/27151928
tagged with: javascript
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/27152078
has body: I have been tasked with optimizing a web site recently. One thing I suspect is that there are way too many events bound to different objects on the web site. Like each item in a grid having an event bound to it's double click event. This slows down the rendering as it has to set up a binding for each item as things are added. I would expect we could do something like a doubleclick on a grid binding and then determine the item clicked. Anyway, the client is asking for metrics on things. I need to be able to give them some kind of report that says there are X events bound on the page currently. My change takes it down to Y number of bindings. Is there any tool out there that you know of that can give me that kind of count? I thought about the event listeners tab on the elements view of chrome developer tools, but I wasn't sure if that listed all the events and if so, how to export the list out to get a count.
tagged with: jquery-events
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42798743
has answer: http://stackoverflow.com/a/27152078
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27152041
has title: Tool to count the bindings on a web page?
has answer: http://stackoverflow.com/a/27152041
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42798913

http://stackoverflow.com/q/27008920
tagged with: html-table
answer count: 1
tagged with: javascript
has title: Boostrap table data from data-url
score: 0
has answer: http://stackoverflow.com/a/27331696
tagged with: node.js
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I am using nodejs and jade with bootstrap plugin Bootstrap table. I am having trouble getting it work. Here is the part of the table in jade h1 Reported Users table(data-toggle="table", data-url=reports) thead tr th(data-toggle="matched_uid") Reported User ID th(data-toggle="reported_name") Reported User Name th(data-toggle="email") Reported User Email th(data-toggle="message") Reported Offense(s) th(data-toggle="reporter_name") Reported By The table loads like this: And when I looked into the browser console, I think the results in data-url loads correctly: Does my data-url valid? Does anyone have any idea what could be going wrong? Please help. Thanks in advance!
type: Question

http://stackoverflow.com/comment/42679232
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27085054
has text: @simonzack - It's not opinion based. The question is basically saying "To achieve A do I need to do B?" which could be rephrased as "Can A be done without B?"
type: Comment

http://stackoverflow.com/a/27020356
score: 0
type: Answer
has body: I'm not sure if I understood the problem completely, but here is the simplest possible idea to hopefully help you out: http://jsfiddle.net/Arministrator/0vhv37jf/ $( document ).ready(function() { var valuediv = document.getElementById('valuediv'); var valuedive = valuediv.innerHTML; $("#valuediv").css({"background-color":"#"+valuedive}); }); Whatever number is inside a div it will affect the color of the div. You can play with it if you want more than 3 digits, this is just an example to guide you. (For example #900 is red color)
answers question: http://stackoverflow.com/q/27019487

http://stackoverflow.com/comment/42767295
has text: I think the real problem is your data structure. Is `rec` a linear array, and if not, why not? Instead of looping through `col in grid.columns`, can you loop through `col in rec`?
comment on: http://stackoverflow.com/q/27133864
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42587657
type: QuestionComment
has text: Thanks. Also found this var copiedObject = jQuery.extend({},originalObject);
comment on: http://stackoverflow.com/q/27032913
type: Comment
score: 0

nodelist
type: Tag
tags question: http://stackoverflow.com/q/27042579
tag name: nodelist

http://stackoverflow.com/a/27141758
answers question: http://stackoverflow.com/q/27141198
type: Answer
has body: (there was a mistake, updated) For example, var array = [1,2,3,4,5] for(i=0; i&lt;array.length;i++){ var dist = Math.floor( Math.random() * array.length ) var swp = array[i] array[i] = array[dist] array[dist] = swp } console.log(array) //=&gt; shuffled
score: 0
has comment: http://stackoverflow.com/comment/42781482
has comment: http://stackoverflow.com/comment/42781105

http://stackoverflow.com/comment/42778065
score: 0
comment on: http://stackoverflow.com/q/27140131
has text: CSS I have: `.stickySearch{ width:56% !important; position:fixed !important; left:0; right:0; }` this is the java script that I run upon page load: `var lastScrollTop = 0; $(window).scroll(function(){ var st = $(this).scrollTop(); if(st<=lastScrollTop){ //scroll up if($(this).scrollTop()>235) $('#searchInput').removeClass('slideIn').addClass('stickySearch'); else $('#searchInput').removeClass('stickySearch').addClass('slideIn'); } else $('#searchInput').removeClass('stickySearch').removeClass('slideIn'); lastScrollTop = st; });` ideas
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42735039
type: Comment
comment on: http://stackoverflow.com/a/27116182
has text: Sometimes 403s are legitimate: Forbidden RESTful replies when accessing web resources from Facebook, Twitter and stuff. When the oauth token is revoked, you need to treat application level 403s. Your assumption is very specific.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27148151
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42819891
type: Answer
has comment: http://stackoverflow.com/comment/42820254
has comment: http://stackoverflow.com/comment/42820678
has comment: http://stackoverflow.com/comment/42791762
has body: Here is not full working code but get a clear idea how you could achieve your requirement. You need slightly modified your handleUploadedZipFile function and add uploaded functionality like this: if (!empty($_FILES['zipfile'])) { foreach ($_FILES['zipfile']['name'] as $key =&gt; $temp) { $name = $_FILES['zipfile']['name'][$key]; $type = $_FILES['zipfile']['type'][$key]; $tmp_name = $_FILES['zipfile']['tmp_name'][$key]; $error = $_FILES['zipfile']['error'][$key]; $size = $_FILES['zipfile']['size'][$key]; $zipfilename = $name; if ($size &gt; 0) { $dir = PROBLEMZIPS."/".sprintf("%05d",$KBID)."/"; $result = getUploadedFile($tmp_name,$dir,$zipfilename); } else { $result = false; } } } and make file field as array by replace zipfile with zipfile[], i.e: &lt;input type="file" id="zipfile" name="zipfile[]" multiple&gt;
accepted answer of: http://stackoverflow.com/q/27147775
has comment: http://stackoverflow.com/comment/42821768
answers question: http://stackoverflow.com/q/27147775
has comment: http://stackoverflow.com/comment/42821044
has comment: http://stackoverflow.com/comment/42824321
score: 0

http://stackoverflow.com/q/27019558
tagged with: python
has answer: http://stackoverflow.com/a/29558961
has body: I want to use javascript to retrieve a json object from a python script Ive tried using various methods of ajax and post but cant get anything working. For now I have tried to set it up like this My Javascript portion: I have tried $.post('./cgi-bin/serverscript.py', { type: 'add'}, function(data) { console.log('POSTed: ' + data); }); and $.ajax({ type:"post", url:"./cgi-bin/serverscript.py", data: {type: "add"}, success: function(o){ console.log(o); alert(o);} }); My Python import json import cgi import cgitb cgitb.enable() data = cgi.FieldStorage() req = data.getfirst("type") print "Content-type: application/json" print print (json.JSONEncoder().encode({"status":"ok"})) I am getting a 500 (internal server error)
tagged with: http://stackoverflow.com/tag/json
tagged with: cgi
has answer: http://stackoverflow.com/a/27021978
type: Question
tagged with: javascript
score: 0
answer count: 2
has title: Running CGI Python Javascript to retrieve JSON object
tagged with: ajax
type: UnansweredQuestion

animation
tags question: http://stackoverflow.com/q/27108333
tags question: http://stackoverflow.com/q/27031710
tags question: http://stackoverflow.com/q/27093352
tags question: http://stackoverflow.com/q/27105821
tags question: http://stackoverflow.com/q/27134462
tags question: http://stackoverflow.com/q/27083494
tags question: http://stackoverflow.com/q/26999128
tags question: http://stackoverflow.com/q/27125180
tags question: http://stackoverflow.com/q/27029636
tags question: http://stackoverflow.com/q/27136078
type: Tag
tags question: http://stackoverflow.com/q/27140697
tags question: http://stackoverflow.com/q/27105408
tags question: http://stackoverflow.com/q/26996978
tags question: http://stackoverflow.com/q/27096712
tag name: animation
tags question: http://stackoverflow.com/q/27030172
tags question: http://stackoverflow.com/q/27113512
tags question: http://stackoverflow.com/q/27041126
tags question: http://stackoverflow.com/q/27117105
tags question: http://stackoverflow.com/q/27028550
tags question: http://stackoverflow.com/q/27108422
tags question: http://stackoverflow.com/q/27033631
tags question: http://stackoverflow.com/q/27041835
tags question: http://stackoverflow.com/q/27150850
tags question: http://stackoverflow.com/q/27104991
tags question: http://stackoverflow.com/q/27074032
tags question: http://stackoverflow.com/q/27135686
tags question: http://stackoverflow.com/q/27124876
tags question: http://stackoverflow.com/q/27134879
tags question: http://stackoverflow.com/q/27077087
tags question: http://stackoverflow.com/q/27062447

http://stackoverflow.com/q/27121327
has answer: http://stackoverflow.com/a/27121501
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has body: I have no clue as to why I am getting this error, my JavaScript skills aren't very great but I know main basics, along with JQuery and Ajax, but I really can't see why I am getting the error "Unexpected Identifier" here is my code: $(document).ready(function() { $("#GhostModMenu").hide(); $("#GhostModMenu").draggable({ axis: "x" }); $("#buttons").show(); $("#show_self_menu").hide(); $("#show_vip_menu").hide(); $("#show_user_menu").hide(); $("#show_staff_menu").hide(); var open = false; $("#g5k").click(function() { $.ajax({ type: "POST", url: "sfk.php", data: $("#gfkf").serialize(), dataType: "json", beforeSend: function(){}, success: function(data) { alert(data); } }); return false; }); $("#g5kp").click(function() { $.ajax({ type: "POST", url: "sfk.php", data: $("#gfkp").serialize(), dataType: "json", beforeSend: function(){}, success: function(data) { alert(data); } }); return false; }); $("#toggle_frostbite").click(function() { $.ajax({ type: "POST", url: "gmmcp.php", data: $("#give_frostbite_form").serialize(), dataType: "json", beforeSend: function(){}, success: function(data) { alert(data); } }); return false; }); $("#clear_self_chatlogs_button").click(function() { $.ajax({ type: "POST", url: "gmmcp.php", data: $("#clear_self_chatlogs_form").serialize(), dataType: "json", beforeSend: function(){}, success: function(data) { alert(data); } }); return false; }); $("#give_self_vip_button").click(function() { $.ajax({ type: "POST", url: "gmmcp.php", data: $("#give_self_vip_form").serialize(), dataType: "json", beforeSend: function(){}, success: function(data) { alert(data); } }); return false; }); $("#give_self_rank_button").click(function() { $.ajax({ type: "POST", url: "gmmcp.php", data: $("#give_self_rank_form").serialize(), dataType: "json", beforeSend: function(){}, success: function(data) { alert(data); } }); return false; }); $("#option_back_button").click(function() { $("#buttons").show(); $("#show_self_menu").hide(); $("#show_user_menu").hide(); $("#show_st…
has comment: http://stackoverflow.com/comment/42743580
answer count: 2
has comment: http://stackoverflow.com/comment/42743550
has comment: http://stackoverflow.com/comment/42743630
favorite count: 0
has comment: http://stackoverflow.com/comment/42743609
tagged with: ajax
accepted answer: http://stackoverflow.com/a/27121501
has comment: http://stackoverflow.com/comment/42743734
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42743578
has comment: http://stackoverflow.com/comment/42743707
has comment: http://stackoverflow.com/comment/42743658
has comment: http://stackoverflow.com/comment/42743800
possible better answer: http://stackoverflow.com/a/27121495
has answer: http://stackoverflow.com/a/27121495
downvote count: 1
type: Question
has title: JQuery/Ajax Unexpected Identifier error

http://stackoverflow.com/a/27115980
answers question: http://stackoverflow.com/q/27115372
type: Answer
downvote count: 0
score: 1
has body: I think you have to initialise your graph element in your directive link function
upvote count: 1

http://stackoverflow.com/comment/42827394
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27040239
has text: mauoftheclouds, thanks for the reply. This is the closest to what I want so far, but it is possible to have the search window as a search bar? It is much more user friendly to not have to click for search everytime.
type: Comment

http://stackoverflow.com/a/27088805
answers question: http://stackoverflow.com/q/27088776
has body: It's not the random part that's the problem, it's the fact that the event handler functions you're creating close over the variable random, not the value it had when the individual functions were created. So they all see the last value you assign to it. The typical way to fix this is with a builder function or Function#bind: Builder function: for (var t = 0; t &lt; 16; t++) { ....//PART OF CODE var min = 1; var max = 10; var random = Math.floor(Math.random() * (max - min + 1)) + min; _chestArr[t].addEventListener('click',buildHandler(random),false); } function buildHandler(r) { return function(){ var tezt = document.createTextNode(r); document.body.appendChild(tezt); }; } Function#bind: for (var t = 0; t &lt; 16; t++) { ....//PART OF CODE var min = 1; var max = 10; var random = Math.floor(Math.random() * (max - min + 1)) + min; _chestArr[t].addEventListener('click',function(r){ var tezt = document.createTextNode(r); document.body.appendChild(tezt); }.bind(null, random),false); } Note that the Function#bind option will affect the value of this within your handler, whereas the builder function version won't. You're not using this in your handler, but if you were, the builder function would probably be the way to go.
score: 0
type: Answer

http://stackoverflow.com/comment/42728875
type: Comment
has text: Sure. I've updated the code to close the select during a `change` event as well as a `blur` event.
comment on: http://stackoverflow.com/a/27071435
score: 0
type: AnswerComment

http://stackoverflow.com/q/27016894
accepted answer: http://stackoverflow.com/a/27017121
score: 0
has title: ExtJS 4.0.7 ItemSelector change "titles" dynamically
answer count: 1
has body: I use ItemSelector element of ExtJS 4.0.7. By default "titles" of ItemSelector are: "Available" and "Selected". Can I change it dynamically?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27017121
tagged with: javascript
tagged with: extjs
type: Question

http://stackoverflow.com/comment/47277104
has text: How would this work for larger images that you want re-sizing (responsive) on smaller screens?
comment on: http://stackoverflow.com/a/27152639
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42655323
has text: e.g., the formula for the x coordinate is: `(window.innerWidth / 2) + (hand.palmPosition[0] * scale)`. That will have the middle of the Leap aligned with the middle of the window
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27051923

angular-amd
tag name: angular-amd
type: Tag
tags question: http://stackoverflow.com/q/26995845

http://stackoverflow.com/q/27138004
has answer: http://stackoverflow.com/a/27138161
answer count: 2
has answer: http://stackoverflow.com/a/27138219
has body: I'm implementing some basic annotation draw features, such as arrows. Now I'm a little bit stuck with ellipse. The methods to draw an ellipse usually address using it's two diameters and eventually a rotation: However I want to display the ellipse between the point user clicked and the one he's hovering, therefore I need a function that calculates diameters and rotation based on two points: How would I do that? Can it be achieved with sufficient performance (as it renders during mouse-hovering)?
linked to: http://stackoverflow.com/q/3153861
tagged with: html5-canvas
tagged with: javascript
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/2172798
tagged with: http://stackoverflow.com/tag/html
has title: Drawing a point to point ellipse to allow painting in GUI
score: 0

http://stackoverflow.com/q/27044863
score: 0
accepted answer: http://stackoverflow.com/a/27045482
has comment: http://stackoverflow.com/comment/42608570
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42608292
has title: Use Jquery to add a div on hover of input type image
answer count: 1
has body: Let's say I can not modify html elements except through a script. I have a page that has several buttons They do not have IDs Goal is simple: Float a div under the buttons to add "tips" and information what they are for This mess of a erp system has some odd cluetip jquery stuff running. I was able to dynamically add title attribute but then had problems turning it into a tool tip type thing. So I abandoned that esp since it was noted code is no longer supported. I decided jquery and hide/ show divs I am new to jquery So two things 1) This script below only triggers the first div - oddly nothing happens for the second and third ? 2) If I have 7 buttons - can I name the div id the same as my buttons and use a (this) to reference. I tried unsuccessfully . But it seems much more efficient then writing 8 conditions literally referencing them. Too much time so I'm looking to all you insanely talented jquery to help pinpoint why this isn't working for me and how to go about it. Code is Click this to DELETE this list. Click this to add ENTIRE list above, and current quantities displayed to your shopping cart. Click this to update your list. EDIT TO POST This will help... here is how the button appears on the page. You'll notice I'm referencing the class since it doesn't have an ID attribute
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42608725
has comment: http://stackoverflow.com/comment/42608598
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27045482

http://stackoverflow.com/q/27101240
has comment: http://stackoverflow.com/comment/138720562
has comment: http://stackoverflow.com/comment/42706680
favorite count: 0
linked to: http://stackoverflow.com/q/4816099
upvote count: 110
has comment: http://stackoverflow.com/comment/111237135
has comment: http://stackoverflow.com/comment/42706822
has answer: http://stackoverflow.com/a/71982092
tagged with: node.js
has answer: http://stackoverflow.com/a/67945935
has body: I am using request package for node.js Code : var formData = ({first_name:firstname,last_name:lastname,user_name:username, email:email,password:password}); request.post({url:'http://localhost:8081/register', JSON: formData}, function(err, connection, body) { exports.Register = function(req, res) { res.header("Access-Control-Allow-Origin", "*"); console.log("Request data " +JSON.stringify(req)); Here I am getting this error : TypeError: Converting circular structure to JSON Can anybody tell me what is the problem
has answer: http://stackoverflow.com/a/65360204
type: AnsweredQuestion
score: 109
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/72013908
has answer: http://stackoverflow.com/a/61677846
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/59390266
linked to: http://stackoverflow.com/q/11616630
has answer: http://stackoverflow.com/a/67656389
has answer: http://stackoverflow.com/a/27101460
has answer: http://stackoverflow.com/a/66746555
possible better answer: http://stackoverflow.com/a/61677846
has answer: http://stackoverflow.com/a/75133786
has answer: http://stackoverflow.com/a/62103186
has answer: http://stackoverflow.com/a/58724491
tagged with: javascript
has answer: http://stackoverflow.com/a/78774645
has answer: http://stackoverflow.com/a/69881039
answer count: 19
accepted answer: http://stackoverflow.com/a/27101460
has answer: http://stackoverflow.com/a/62356112
has answer: http://stackoverflow.com/a/67472586
has title: TypeError: Converting circular structure to JSON in nodejs
has answer: http://stackoverflow.com/a/77960777
has answer: http://stackoverflow.com/a/66175051
has answer: http://stackoverflow.com/a/74543922

http://stackoverflow.com/comment/42577789
comment on: http://stackoverflow.com/q/27027132
has text: You will need to show more of your code (all of the ajax call) for us to advise to do anything other than make wild guesses at what you're doing wrong.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27139505
accepted answer of: http://stackoverflow.com/q/27135120
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27135120
type: Answer
has body: Changing JSON.parse(request.body) into just request.body should work. Because of the call app.use(bodyParser.json({limit:'10000mb'})), by the time the request gets to the route, req.body already contains parsed JSON.
score: 0

storage
tag name: storage
type: Tag
tags question: http://stackoverflow.com/q/27053098

http://stackoverflow.com/comment/42765772
has text: I expect you have done so, but we have to be sure... Have you checked that only your `fetchById` function calls taht callback? And that the only call is made by the context you are currently debugging?
type: Comment
comment on: http://stackoverflow.com/q/27133444
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42795175
has text: sorry, I don't understand your comment - where did you include `value="8"`? And I don't understand the second sentence. You should include the relevant parts of your java code in the question, it would help in getting a more specific answer
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27150086

http://stackoverflow.com/a/27038613
answers question: http://stackoverflow.com/q/27038293
score: 1
upvote count: 1
downvote count: 0
has body: Updated to make it also include the last and first li Here is another way. You simple check if the next or previous element has the class first or last and don't change class if they do. var ul = $('ul'), li = ul.find('li'); var $prev = $('.prev'); var $next = $('.next'); li.eq(1).addClass('active'); li.eq(2).addClass('active'); $next.on('click', function() { var $a = $('.active'); if (!$($a[0]).next().hasClass('last')) // check if the first active li has next as last $a.removeClass('active').next().addClass('active'); }); $prev.on('click', function() { var $a = $('.active'); if (!$($a[1]).prev().hasClass('first')) // check if the last active li has prev as first $a.removeClass('active').prev().addClass('active'); }); .active { background: lightblue !important; } .first, .last { background: red; } PREVIOUS NEXT
type: Answer

http://stackoverflow.com/q/27140285
favorite count: 0
has answer: http://stackoverflow.com/a/27141105
type: AnsweredQuestion
tagged with: unslider
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/27141105
type: Question
tagged with: refresh
has title: Unslider (JS issue?) breaking on page refresh
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
has body: So I've implemented Unslider (with adjustments to fade instead of slide) on my page, http://www.choiceid.ca When I first bring up the page, the slider is often broken - it displays like 15 pixels tall instead of 700, and you can see the images rotating, like you're peeking over the top of a door. If I hit refresh, it does nothing (or breaks it if it was working in the first place). If I go to the URL bar and hit enter again, or retype the address, it works correctly, but even that isn't reliable. Any incite would be appreciated.

http://stackoverflow.com/comment/42561211
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27018105
has text: please provide source html not server code when you want to troubleshoot javascript. Also provide any errors that may be thrown in your browser console
type: Comment

http://stackoverflow.com/a/27073155
answers question: http://stackoverflow.com/q/27073015
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42658397
score: 0
has body: It looks like you want to toggle and element's css properties based on click eventHandler. You've got the right idea, but you're javascript is slightly off. Here's an example that should perform the function you want: // Function to change the css of an element function makeRed(elem){ elem.css({ "background-color" : "red" }); }; // Attach an event handler.. $("#clickMe").click(function(){ // Store the object as a variable var obj = $("#foo"); // <-- The element you want to change the bg of // Run your function. makeRed(obj); }); #foo{ width: 50px; height: 50px; background-color: blue; } Click Me! This is really about learning how javascript selectors, functions and variables work.. Although your question is phrased in a sort-of obtuse way for StackOverflow, I appreciate that you posted your code and that you're trying to learn. :)
type: Answer
has comment: http://stackoverflow.com/comment/42658778
accepted answer of: http://stackoverflow.com/q/27073015

http://stackoverflow.com/q/27014755
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42556134
has answer: http://stackoverflow.com/a/27014869
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42555271
tagged with: php
score: 2
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/27016833
has comment: http://stackoverflow.com/comment/42555333
has comment: http://stackoverflow.com/comment/42555731
has answer: http://stackoverflow.com/a/27016833
type: Question
accepted answer: http://stackoverflow.com/a/27014869
tagged with: http://stackoverflow.com/tag/json
has body: I have : Html + jQuery + ajax post and a PHP file to process the form values and returning a error(true or false) and a message with html markups. My javascript code: $(document).ready(function() { var form = $('#form'); // contact form var submit = $('#submit'); // submit button var alert = $('.alert'); // alert div for show alert message // form submit event form.on('submit', function(e) { e.preventDefault(); // prevent default form submit $.ajax({ url: 'contact.php', // form action url type: 'post', // form submit method get/post dataType: 'json', // request type html/json/xml data: form.serialize(), // serialize form data beforeSend: function() { alert.fadeOut(); submit.html('Sending....'); // change submit button text }, success: function(result) { if(result.error){ /* On error stuff */ alert(result.html).fadeIn(); }else{ /* On success stuff */ alert(result.html).fadeIn(); } } }); }); }); and at last my php: if( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) ){ $result = array("error" => false, "html" => null); $vars = array('name', 'email','telefoonnummer', 'message'); $verified = TRUE; foreach($vars as $v) { if(!isset($_POST[$v]) || empty($_POST[$v])) { $verified = FALSE; } } if(!$verified) { $result["error"] = true; $result["html"] = "Error11"; echo json_encode($result); exit; } $name = filter_var($_POST['name'], FILTER_SANITIZE_STRING); $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL); $tel= filter_var($_POST['telefoonnummer'], FILTER_SANITIZE_STRING); $message = filter_var($_POST['message'], FILTER_SANITIZE_STRING); $to = ''; $sent = email($to, $email, $name, $tel, $message); if ($sent) { $result["error"] = false; $result["html"] = "Success"; echo json_encode($result); } else { $result["error"] = true; $result["html"] = "Error"; echo json_encode($result); } return; } /** * Email send with headers * * @return bool | void **/ function email($to, $name, $email, $tel, $message){ $header = array(); $header[] = "MIME-Version: 1.0"; $header[] = "From: <".$…
has title: Json jQuery and php doesn't process value's correct

http://stackoverflow.com/q/27024544
has comment: http://stackoverflow.com/comment/42572852
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27025317
has comment: http://stackoverflow.com/comment/42572851
has answer: http://stackoverflow.com/a/27025028
has comment: http://stackoverflow.com/comment/42573304
has comment: http://stackoverflow.com/comment/42572955
tagged with: javascript
tagged with: jquery
has title: Jquery checkboxes inside div
accepted answer: http://stackoverflow.com/a/27025028
has body: I have the current situation: &lt;div id="2"&gt; &lt;div class="row"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;button id="uncheckAllItem"&gt; &lt;button id="checkAllItem"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="3"&gt; &lt;div class="row"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;button id="uncheckAllItem"&gt; &lt;button id="checkAllItem"&gt; &lt;/div&gt; &lt;/div&gt; Each div with class row has 2 buttons select all and delete all. When I click on delete all button of the div with id 2, then all the checkboxes within this div must be unchecked. The same happens to the checkboxes of the div with id 3. Here is my code: $('#uncheckAllItem').click(function() { $('#' + &lt;?php echo $model-&gt;id ?&gt; + ' input[name^=itemCheckBox]').attr('checked', false); return false; }); The problem is that this code is unchecking/checking all the checkboxes both in div id 2 and div id 3. What's wrong with it?
favorite count: 0
has answer: http://stackoverflow.com/a/27024769
tagged with: checkbox
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27024669
upvote count: 2
has answer: http://stackoverflow.com/a/27024669
score: 1

http://stackoverflow.com/q/27083925
tagged with: jquery
linked to: http://stackoverflow.com/q/7929266
favorite count: 0
has answer: http://stackoverflow.com/a/27086034
downvote count: 0
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27083975
type: Question
has comment: http://stackoverflow.com/comment/42676935
tagged with: javascript
has answer: http://stackoverflow.com/a/27083976
has comment: http://stackoverflow.com/comment/42676944
answer count: 3
upvote count: 1
has title: How do I clear an event call set using delay()
has body: I have two buttons, approve (visible) and undo(not visible). Clicking approve hides the button and shows the undo button (meant as a fail safe). Clicking approve sets a 20 second delay which will submit a form if realized. However I want the un-approve button to cancel the delay. How should I best do this without removing the event handler on the form entirely? $("button.approve").on('click', function(e){ $(this).hide(); $(this).siblings('button.undo').show(); $(this).siblings("form.update-comment.approve").delay(20000).trigger('submit'); }); $("button.undo").on('click', function(e){ $(this).hide(); $(this).siblings('button.approve').show(); $(this).siblings("form.update-comment.approve").off('submit'); });

http://stackoverflow.com/q/27006887
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42542886
favorite count: 0
has answer: http://stackoverflow.com/a/27472499
tagged with: meteor
has comment: http://stackoverflow.com/comment/42543055
upvote count: 0
type: UnansweredQuestion
type: Question
has title: Creating a database for a Telescope Meteor App
score: -1
has body: I'm trying to create a telescope meteor.js app. I tried to deploy to Mudulus and everything went well but the site doesn't load. After searching I realize it's because I don't have any database (sorry I'm new). What's the best way to set up a database for Meteor?
answer count: 1

http://stackoverflow.com/q/27099499
has answer: http://stackoverflow.com/a/27111258
type: AnsweredQuestion
tagged with: windows-phone-8
downvote count: 1
type: Question
has body: I am trying to replace/update some files in my app package. I tried this code but all it does is create a copy. If i try to replace a file icon.png, the file get copied as icon- copy.png. Is there a way i can actually replace the original file. Windows.Storage.ApplicationData.current.localFolder.getFileAsync("SplashImage.png") .done(function (sourcefile) { var root = Windows.ApplicationModel.Package.current.installedLocation.path; var path = root + "\\images"; var StorageFolder = Windows.Storage.StorageFolder; var folderPromise = StorageFolder.getFolderFromPathAsync(path); folderPromise.done(function (folder) { sourcefile.copyAsync(folder,"SplashImage.png", Windows.Storage.NameCollisionOption.ReplaceExisting).done(function(result){ Windows.System.Launcher.launchFileAsync(result).done(function () { alert("success"); }); }); }); });
tagged with: winjs
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/27111258
tagged with: windows-runtime
upvote count: 0
answer count: 1
favorite count: 0
has title: Refresh App contents Dynamically for Windows Store App
tagged with: windows-store-apps

http://stackoverflow.com/comment/42588716
type: AnswerComment
comment on: http://stackoverflow.com/a/27009608
has text: @chipChocolate.py I've added an explanation to the answer
type: Comment
score: 1

http://stackoverflow.com/q/27007957
has body: So my website is experiencing lag when scrolling. I just wanted to ask if it's a good practice to initialize the jQuery objects that you need in $(window).scroll(function () {}? For example: $(window).scroll(function () { $thisContainer = $('.section #container'); // 10 more initializations... $thisContainer.css(); // something like that... } I feel like it wouldn't be a good idea since this function gets called really often every time the user scrolls. And when it is called, those variables would be reinitialized. That as a result would waste a whole lot of memory and time. Thanks!
answer count: 1
has answer: http://stackoverflow.com/a/27008629
upvote count: 3
has comment: http://stackoverflow.com/comment/42544374
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42544357
accepted answer: http://stackoverflow.com/a/27008629
has comment: http://stackoverflow.com/comment/42544544
linked to: http://stackoverflow.com/q/4289473
has title: jQuery resize(), scroll(): good practice to use variables?
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42544330
has comment: http://stackoverflow.com/comment/42544417
favorite count: 0
has comment: http://stackoverflow.com/comment/42544447
type: Question
has comment: http://stackoverflow.com/comment/42544452

http://stackoverflow.com/a/27183317
accepted answer of: http://stackoverflow.com/q/27018233
has body: I recode all of my regex and its now properly working What i did is add another + sign in the end of the second chunk of expression var re = (/^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))+(-(^[0][1-9]+)|([1-9]\d*))|+(((?:https?\:\/\/|www\.)(?:[-a-z0-9]+\.)*[-a-z0-9]+.*))$/);
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27018233
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/27096095
has comment: http://stackoverflow.com/comment/42719367
accepted answer of: http://stackoverflow.com/q/27095190
has body: I had same problem some time ago, but I could figure out workaround and here is what I do. Everytime when user click and select files I add css class to file input and make it hidden, and then I append new file input with same properties to the form. This works good and does not requires changes in backend, just slight changes on frontend. Hope this helps you.
answers question: http://stackoverflow.com/q/27095190
score: 0
has comment: http://stackoverflow.com/comment/42957741
has comment: http://stackoverflow.com/comment/42698131
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42704119

http://stackoverflow.com/a/27037143
has comment: http://stackoverflow.com/comment/42594724
has comment: http://stackoverflow.com/comment/42594429
has comment: http://stackoverflow.com/comment/42594544
score: 0
has comment: http://stackoverflow.com/comment/42594329
has comment: http://stackoverflow.com/comment/42594847
type: Answer
has comment: http://stackoverflow.com/comment/42594447
has comment: http://stackoverflow.com/comment/42594487
answers question: http://stackoverflow.com/q/27037096
has comment: http://stackoverflow.com/comment/42594580
has comment: http://stackoverflow.com/comment/42615225
has body: use this var chars=['a','b','c']; var number=getRandomInt(14, 16); var result=randomString(number, chars) function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; } function randomString(length, chars) { var result = ''; for (var i = length; i &gt; 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))]; return result; }

http://stackoverflow.com/a/28334166
answers question: http://stackoverflow.com/q/27043534
score: 4
has comment: http://stackoverflow.com/comment/45289163
has comment: http://stackoverflow.com/comment/45333420
accepted answer of: http://stackoverflow.com/q/27043534
type: Answer
upvote count: 4
downvote count: 0
has body: Try not setting the photo height and width in the camera options and manipulate the final image on a canvas element. That way you're working with the best quality image yourself.
type: AcceptedAnswer

http://stackoverflow.com/comment/42669083
comment on: http://stackoverflow.com/q/27079615
has text: Can you give an example use-case for this, so it is easier to follow?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27057960
answer count: 3
has answer: http://stackoverflow.com/a/27058267
favorite count: 0
has comment: http://stackoverflow.com/comment/42631090
score: 6
has answer: http://stackoverflow.com/a/27058302
has title: underscore js pluck nested key value
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27058267
tagged with: underscore.js
has body: I have a JS object like this one var obj = { "2014" : { "11" : { "20" : { "Counts" : { "c" : 2 } }, "21" : { "Counts" : { "c" : 20 } }, "22" : { "Counts" : { "c" : 20 } } } }, "_id" : "53d6883a2dc307560d000004", "createdate" :"2014-11-21T07:15:26.109Z" }; As you can see this is structure which contains year>->month->day->counts->c->value structure I want to pluck out the day and Count(c) values out of it I tried something like this _.pluck(obj,'11') but this is good uptil only month, and doesn't work for days like _pluck(_.pluck(obj,'11'),'20')
possible better answer: http://stackoverflow.com/a/27058302
upvote count: 7
has answer: http://stackoverflow.com/a/27058406
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42631013

http://stackoverflow.com/q/27121422
type: Question
has answer: http://stackoverflow.com/a/27122864
answer count: 2
has comment: http://stackoverflow.com/comment/42743719
tagged with: javascript
tagged with: jquery
score: 0
has body: I know this question has been asked several times, but none of the solutions seem to be working for me. I've got an issue where the click event that I am adding to some elements upon loading the document fires multiple times. What's really weird is that the amount of times it fires increases with every click, as if the event is being re-bound with each click. Here is my code: $(document).ready( function() { BindUserControls('#log_in', '/users/sign_in') BindUserControls('#sign_up', '/users/sign_up') }) var BindUserControls = function(button, path) { $(button).click( function() { $.ajax({ method: 'GET', url: path }) .done(function(data){ $('.modal-content').empty() $('.modal-content').prepend(data) $('.modal').modal('show') }) }) } The solutions I've tried so far include adding .off() prior to .on() unbinding the event within the same function delegating the event through the body of the document Nothing seems to be working. I've also disabled turbo-links, I'm not sure if that makes a difference. Any help is greatly appreciated! Thanks.
has comment: http://stackoverflow.com/comment/42745662
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42743792
has comment: http://stackoverflow.com/comment/42743773
has answer: http://stackoverflow.com/a/27121531
has comment: http://stackoverflow.com/comment/42745622
has title: 'click' event firing multiple times, no solutions working

http://stackoverflow.com/comment/42778431
comment on: http://stackoverflow.com/q/27140391
score: 0
has text: Yea, I've been reading lots of `StackOverflow` questions about it and most of the people with this problem had there issues solved by adding jquery (which mine is at the very top of my `application.js` file). I can't imagine why, but the javascript associated with the jPushMenu seems to have broken it. I just don't understand how a client side javascript file could affect my requests...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42608718
score: 0
type: Comment
type: QuestionComment
has text: do you load the in each of your actions? you should call them on the layout only.
comment on: http://stackoverflow.com/q/27044910

http://stackoverflow.com/comment/42672097
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27080026
type: Comment
has text: I am using jquery-ui buttonset() and had tried using change on that and it wasn't getting fired due to some reason. A bind to the radio's directly were causing the evening to fire twice (uncheck and check). I will set it on the input directly. I recognize that binding to change will be called after the input value has been registered in the dom, avoiding the need for setTimout ! - Many thanks David !

http://stackoverflow.com/comment/42725896
comment on: http://stackoverflow.com/q/27110633
type: Comment
type: QuestionComment
has text: No, You yourself said *"and in this JSFiddle it works just fine"* - Which means you know the problem isn't with the code provided. It is very obvious that the problem is specific to your website. Such questions are off topic here. *"If you think the problem is somewhere else, let me know where you think it could be"* - The problem is with the website. I'm not interested in following that link to figure out what the issue is since it is very specific to you and isn't likely to help anyone in future.
score: 0

http://stackoverflow.com/comment/42549423
score: 0
type: Comment
has text: The `infinite: false` works for now. Hope this will be enough for my company's requirement. Thanks elzi!
comment on: http://stackoverflow.com/a/27009966
type: AnswerComment

http://stackoverflow.com/comment/42660866
comment on: http://stackoverflow.com/a/27074559
score: 1
type: AnswerComment
has text: @dandavis yeah, and I'll bet their regexes were about as readable as Egyptian hieroglyphics... :) :) :)
type: Comment

http://stackoverflow.com/comment/42650705
type: Comment
comment on: http://stackoverflow.com/a/27068740
score: 0
type: AnswerComment
has text: TypeError: old_value_arr is null

http://stackoverflow.com/comment/42521234
comment on: http://stackoverflow.com/q/26995223
has text: So what is your problem? Getting the lat and long as separate values? Or assigning them to the text boxes?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42742820
comment on: http://stackoverflow.com/a/27120789
score: 0
type: AnswerComment
has text: Like This Sir? <?php $my_array = array("1. a ", "2. b ", "3. c ", "4. d "); shuffle($my_array); print_r($my_array); ?>
type: Comment

ruby-on-rails
tags question: http://stackoverflow.com/q/27131711
tags question: http://stackoverflow.com/q/27049162
tags question: http://stackoverflow.com/q/27048659
type: Tag
tags question: http://stackoverflow.com/q/26997664
tags question: http://stackoverflow.com/q/27074074
tags question: http://stackoverflow.com/q/27008585
tags question: http://stackoverflow.com/q/27098239
tags question: http://stackoverflow.com/q/27072815
tags question: http://stackoverflow.com/q/27044183
tags question: http://stackoverflow.com/q/27045649
tags question: http://stackoverflow.com/q/27073401
tags question: http://stackoverflow.com/q/26993785
tags question: http://stackoverflow.com/q/27063739
tags question: http://stackoverflow.com/q/27074135
tags question: http://stackoverflow.com/q/27112061
tags question: http://stackoverflow.com/q/27067024
tags question: http://stackoverflow.com/q/27134675
tags question: http://stackoverflow.com/q/27001102
tags question: http://stackoverflow.com/q/27116725
tags question: http://stackoverflow.com/q/27089623
tags question: http://stackoverflow.com/q/27053409
tags question: http://stackoverflow.com/q/27150047
tags question: http://stackoverflow.com/q/27001309
tags question: http://stackoverflow.com/q/27114282
tags question: http://stackoverflow.com/q/27140391
tags question: http://stackoverflow.com/q/27110441
tags question: http://stackoverflow.com/q/27085221
tags question: http://stackoverflow.com/q/27137462
tags question: http://stackoverflow.com/q/27067751
tags question: http://stackoverflow.com/q/27017336
tags question: http://stackoverflow.com/q/27006749
tags question: http://stackoverflow.com/q/27031568
tags question: http://stackoverflow.com/q/27078310
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/27054253
tags question: http://stackoverflow.com/q/27025457
tags question: http://stackoverflow.com/q/27047990
tags question: http://stackoverflow.com/q/27120809
tags question: http://stackoverflow.com/q/27093943
tags question: http://stackoverflow.com/q/27004254
tags question: http://stackoverflow.com/q/27139331
tags question: http://stackoverflow.com/q/27148712
tags question: http://stackoverflow.com/q/27085123
tags question: http://stackoverflow.com/q/27146387
tags question: http://stackoverflow.com/q/27024807
tags question: http://stackoverflow.com/q/27067242
tags question: http://stackoverflow.com/q/27053621
tags question: http://stackoverflow.com/q/27107467
tags question: http://stackoverflow.com/q/27005355
tags question: http://stackoverflow.com/q/27072797
tags question: http://stackoverflow.com/q/27118294
tags question: http://stackoverflow.com/q/27071621
tags question: http://stackoverflow.com/q/27083675
tags question: http://stackoverflow.com/q/27021399
tags question: http://stackoverflow.com/q/27126591
tags question: http://stackoverflow.com/q/27021672
tags question: http://stackoverflow.com/q/27152532
tags question: http://stackoverflow.com/q/27072187
tags question: http://stackoverflow.com/q/27010037

http://stackoverflow.com/comment/42699368
type: Comment
has text: The best solution would be to have elements in your array.
type: AnswerComment
comment on: http://stackoverflow.com/a/27096831
score: 0

http://stackoverflow.com/a/27042748
downvote count: 0
has body: Following is the code to fetch third Wednesday of a month. Logic: 1. Find what is the first day on the month. 2. Calculation: 14(day count of 2 weeks) - first day + 3(day count for Wed) + 1(to select Wed) Code: $(document).ready(function(){ getThirdWeddate('8/20/2014') }); function getThirdWeddate(inputDate){ var date = new Date(inputDate); var month = date.getMonth(); var monthStart = new Date(date.getYear() + 1900,date.getMonth(),1); var monthStartDayCount = monthStart.getDay(); var dayInTwoWeeks = 14; var wedDayCount = 3; var thirdWedDate = parseInt(dayInTwoWeeks) - parseInt(monthStartDayCount) + parseInt(wedDayCount) + 1; var finalDate = new Date(date.getYear() + 1900,date.getMonth(), thirdWedDate); console.log(finalDate); } Output:
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42605235
answers question: http://stackoverflow.com/q/27041795

http://stackoverflow.com/q/27040589
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have been able to integrate markers to the mapbox we are using, but still wonder if we can get a click on them. If so how? Following is my code: &lt;style&gt; /* * Unlike other icons, you can style `L.divIcon` with CSS. * These styles make each marker a circle with a border and centered text. */ .count-icon1 { background:url(images/redpin.png); color:#000; font-weight:600; text-align:center; padding:19px 0 0 0px; font-size:180%; } .count-icon2 { background:url(images/greenpin.png); color:#000; font-weight:600; text-align:center; padding:19px 0 0 0px; font-size:180%; } &lt;/style&gt; js code: var defaultLat = 39.12367; var defaultLon = -76.81229; if($scope.currentLocDetails != null){ if($scope.currentLocDetails.Lat != null &amp;&amp; $scope.currentLocDetails.Lon != null){ defaultLat = $scope.currentLocDetails.Lat; defaultLon = $scope.currentLocDetails.Lon; } } var x = 0; if(map != null) map.remove(); map = L.mapbox.map('map_view', 'your key here').setView([defaultLat, defaultLon], 9); for (var i = 0; i &lt; responseData.JobLocation.length; i++) { var eachObj = responseData.JobLocation[i]; if(eachObj.Lat != null &amp;&amp; eachObj.Lon != null){ x++; // Use a little math to position markers. // Replace this with your own code. L.marker([ eachObj.Lat, eachObj.Lon ], { icon: L.divIcon({ // Specify a class name we can refer to in CSS. className: ((currentSelectedIndex + 1) == i + 1)?'count-icon1':'count-icon2', // Define what HTML goes in each marker. html: i + 1, // Set a markers width and height. iconSize: [65, 94] }) }).addTo(map); } } I tried doing a bit R &amp; D, but get to no where: We need to use featureLayer, but dunno how. For the click feature we need to follow this code, but how? // Listen for individual marker clicks. myLayer.on('click',function(e) { // Force the popup closed. e.layer.closePopup(); var feature = e.layer.feature; var content = '&lt;div&gt;&lt;strong&gt;' + feature.properties.title + '&lt;/strong&gt;' + '&lt;p&gt;' + feature.properties.descri…
has title: Getting click on Mapbox markers
tagged with: onclick
tagged with: markers
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27042522
answer count: 1
tagged with: mapbox

http://stackoverflow.com/comment/42616199
score: 0
type: Comment
has text: This question appears to be off-topic because it belongs on [Code Review](http://codereview.stackexchange.com).
type: QuestionComment
comment on: http://stackoverflow.com/q/27048684

http://stackoverflow.com/q/27091305
has comment: http://stackoverflow.com/comment/50237308
has body: When I load the page, a modal immediately is displayed. However, about half the time, it's impossible to scroll. I can see the scrollbar on the side of the window, but it doesn't let you scroll. Also, zooming the window into 150% allows scrolling to work again. How can I make it so the user can scroll up and down the modal? I'm using jQuery.
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42693698
has answer: http://stackoverflow.com/a/31484441
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Bootstrap - modal sometimes breaks scrolling
tagged with: twitter-bootstrap
upvote count: 3
type: Question
score: 3

http://stackoverflow.com/comment/42795156
has text: Have you tried not using a var for //email to user ($email_partecipante) and using instead a prefixed mail? just for test?
comment on: http://stackoverflow.com/q/27150138
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27051286
has comment: http://stackoverflow.com/comment/42654453
has comment: http://stackoverflow.com/comment/42654840
type: Answer
has comment: http://stackoverflow.com/comment/42652282
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27050732
has body: What you need to do, is to bind an focus event to all of your text input elements. Inside the event function this will refer to the input that triggered the event. Because the inputs are siblings, you can use siblings selector to show the sibling submit button of that specific text input. So here's the code: // before using jQuery, you have to wait for the dom to be ready $(document).ready(function () { // bind an focus event to all the text inputs $('input[type="text"]').on('focus', function () { // inside this function, $(this) is referring to the input that triggered the event $(this).siblings('input[type="submit"]').fadeIn(); }); }); You could also use .show() instead of .fadeIn() if you like. Remember to hide the submit buttons first with css: input[type="submit"] { display: none; } or jQuery: $('input[type="submit"]').hide(); Here's a demo: http://jsfiddle.net/zmr5ytrk/1/
answers question: http://stackoverflow.com/q/27050732
has comment: http://stackoverflow.com/comment/42651827
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42654791
has comment: http://stackoverflow.com/comment/42650961
has comment: http://stackoverflow.com/comment/42649918

http://stackoverflow.com/q/27101035
has answer: http://stackoverflow.com/a/27101184
has title: Javascript regex : replace more than one forward slashes with only one slash
tagged with: node.js
type: AnsweredQuestion
type: Question
answer count: 2
has body: I have file names of the following form : /folder/file.jpg that I want to sanitize by removing any extra forward slashes. e.g : '/tt////Images/WP1213.jpg' =&gt; '/tt/Images/WP1213.jpg' (example 1) '///tt/Images/WP1213.jpg' =&gt; '/Images/WP1213.jpg' (example 2) I have used the following regex : myString.replace(/\/+/, "/") However, this doesn't work with example 1, it only works with example 2. how do I write a regex that captures example 2 as well ?
tagged with: javascript
has answer: http://stackoverflow.com/a/27101057
score: 0
tagged with: regex
possible better answer: http://stackoverflow.com/a/27101184
accepted answer: http://stackoverflow.com/a/27101057

http://stackoverflow.com/a/27084282
score: 0
has body: You can't do pattern matching for chrome extensions on the hash of a url. See Chrome extension: Content script matching URL pattern for Gmail message. But what you can do is check the document.location.hash property for the term you are looking for and only execute your script there. Then you can have a broader pattern match for the site but only execute the functionality of the site when required. NB If it's a hard requirement that it has to end with #test then you can simplify things by adding an endsWith function. Something like: String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; }; if(document.location.hash.endsWith("#test")){ /* do stuff */ } endsWith taken from endsWith in JavaScript
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27084192
answers question: http://stackoverflow.com/q/27084192

http://stackoverflow.com/q/27006782
accepted answer: http://stackoverflow.com/a/27015653
tagged with: javascript
has answer: http://stackoverflow.com/a/68027527
has comment: http://stackoverflow.com/comment/85990137
type: Question
tagged with: reactjs
tagged with: continuous-integration
has answer: http://stackoverflow.com/a/27015653
tagged with: validation
has comment: http://stackoverflow.com/comment/52989068
favorite count: 0
score: 38
possible better answer: http://stackoverflow.com/a/37015747
has comment: http://stackoverflow.com/comment/42542509
has answer: http://stackoverflow.com/a/65179994
has comment: http://stackoverflow.com/comment/72637900
has comment: http://stackoverflow.com/comment/52997981
answer count: 4
has comment: http://stackoverflow.com/comment/85980195
downvote count: 0
has title: Force ReactJS to throw real errors when propTypes validation fails?
linked to: http://stackoverflow.com/q/26908918
has body: At present, if propType validation fails, ReactJS uses console.warn to emit a warning. I really, really want a real error in dev mode, so it can fail our continuous integration build, instead of just printing a message that might be lost in the shuffle. There's already been discussion of this, e.g. in this feature request, and this related question describes the current behavior as expected. That's fine, but I personally want it to throw an error. Assuming that ReactJS doesn't provide better support for this any time soon, what's the best workaround? So far, the best I've come up with is to override console.warn for tests, e.g. console.warn = function(msg) { throw new Error(msg); }; The downside of this is, it can be tricky to implement in tests, and it's not React-specific, so other console.warn calls also need to be handled.
type: AnsweredQuestion
upvote count: 38
has answer: http://stackoverflow.com/a/37015747
linked to: http://stackoverflow.com/q/29651950

http://stackoverflow.com/a/27042830
downvote count: 0
answers question: http://stackoverflow.com/q/27041909
type: Answer
has body: Query string is part of the "identifier" of the subsequently loaded page (or any other resource). As such, it is accessible from the page. Data sent in the body of a POST request are different - they are meant for the server only and are inaccessible from the subsequently loaded page. However, if you wish to make the data sent using POST available to the next page, you can always inject it into the page manually. Using PHP (as an example), it could look something like this: &lt;script type="text/javascript"&gt; var postData = &lt;?php json_encode($_POST); ?&gt;; &lt;/script&gt; If you just want to pass data from one page to another and leave the server out of it, you may either use GET (query string) for exposed communication or use cookies for "hidden" communication.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42674091
has comment: http://stackoverflow.com/comment/42647279

http://stackoverflow.com/a/27141882
has body: You can move the cycle 2 to the left by applying float:left to .vertical-slider-container class .vertical-slider-container { background: #fff; border: 20px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); margin-top: 40px; float: left; position: relative; width: 120px; }
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27141657
accepted answer of: http://stackoverflow.com/q/27141657
has comment: http://stackoverflow.com/comment/42783515
has comment: http://stackoverflow.com/comment/42782015
has comment: http://stackoverflow.com/comment/42784866

http://stackoverflow.com/comment/42627165
comment on: http://stackoverflow.com/q/27055273
type: Comment
type: QuestionComment
has text: Ya.. But thats in another servlet and both are different requests.. The method fetchClients will be called only on clicking certain button.. The another servlet dynamically searches database and adds a button. Both uses same database but different tables..
score: 0

http://stackoverflow.com/q/27067723
has answer: http://stackoverflow.com/a/27070488
accepted answer: http://stackoverflow.com/a/27070488
tagged with: firefox-addon-sdk
has title: How to iterate over files in a directory within an extractionless add-on's .xpi file
type: AnsweredQuestion
score: 1
type: Question
tagged with: firefox-addon-overlay
has body: My add-on, Color Source, needs to iterate files in a directory within my add-on (e.g., the content subdirectory) when the add-on is not unpacked (i.e., is kept zipped as an XPI). We are using code like this to get the Addon object: Cu.import("resource://gre/modules/AddonManager.jsm", null) .AddonManager .getAddonByID( "color_source@brett.zamir", function(addon) { var uri = addon.getResourceURI(); } ); In order to pass a path to new OS.File.DirectoryIterator, we have tried: OS.Path.join(uri.path, 'content'); which apparently works in *nix but not Windows Getting and then cloning uri.QueryInterface(Ci.nsIFileURL).file, and then calling append('content') on the clone and this works, but only when the add-on has the &lt;em:unpack&gt; directive set to true in install.rdf. How do we get a path that works even when the add-on is zipped up? (Note: I have added a Firefox add-on tag to this post because the issue should be similar there)
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: firefox-addon
upvote count: 1
tagged with: thunderbird-addon

http://stackoverflow.com/q/27109039
tagged with: javascript
has comment: http://stackoverflow.com/comment/42723757
has answer: http://stackoverflow.com/a/27109101
has comment: http://stackoverflow.com/comment/42723660
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: merging rows in one column of html table
has answer: http://stackoverflow.com/a/27114019
tagged with: css
answer count: 4
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27113728
has body: I have a requirement, if i have same data in column1 of 's with same id then i need to merge those cells and show their respective values in column2. i.e., in fiddle http://jsfiddle.net/7t9qkLc0/12/ the key column have 3rows with data 1 as row value with same id and has corresponding different values in Value column i.e., AA,BB,CC. I want to merge the 3 rows in key Column and display data 1 only once and show their corresponding values in separate rows in value column. Similarly for data4 and data5 the values are same i.e.,FF and keys are different, i want to merge last 2 rows in Value column and dispaly FF only one time and show corresponding keys in key column. All data i'm getting would be the dynamic data. Please suggest. Please find the fiddle http://jsfiddle.net/7t9qkLc0/12/ Sample html code: &lt;table width="300px" height="150px" border="1"&gt; &lt;tr&gt;&lt;th&gt;Key&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td id="1"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/td&gt; &lt;td id="aa"&gt;AA&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="1"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/td&gt; &lt;td id="bb"&gt;BB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="1"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;/td&gt; &lt;td id="cc"&gt;CC&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="2"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;2&lt;/td&gt; &lt;td id="dd"&gt;DD&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="2"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;2&lt;/td&gt; &lt;td id="ee"&gt;EE&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="3"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;3&lt;/td&gt; &lt;td id="ff"&gt;FF&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="4"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;/td&gt; &lt;td id="ff"&gt;FF&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td id="5"&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/td&gt; &lt;td id="ff"&gt;FF&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="3" style="padding-left: 0px; padding-right: 0p…
type: Question
has answer: http://stackoverflow.com/a/30349105
has comment: http://stackoverflow.com/comment/42721194
has comment: http://stackoverflow.com/comment/42723054

http://stackoverflow.com/comment/42598655
score: 1
type: AnswerComment
has text: Note Arvind's comment above. You might want to fix that in your code.
type: Comment
comment on: http://stackoverflow.com/a/27039641

http://stackoverflow.com/a/27048990
has comment: http://stackoverflow.com/comment/42772750
has body: You should make sure that document.getElementById(TagID) is actually returning an object. It looks like you might be using ASP.Net which can change the id. And/Or it could be a timing issue. Where the element does exist but not at the time of the execution of the code. To resolve this do not execute the javascript code until some event has passed (document.onload or jQuery has a .ready) This code example solves the timing issue and the changing id. $(document).ready(init); function init() { //code here executes after the page is loaded $("#textBox1").val("This might not work, as the id of the control might have changed."); $("input[id$='textBox1']").val("This is more likely to work since asp prefixes the id"); $(".someClass").val("Using a css class is more a more typical jQuery approach"); $("&lt;%= textBox1.ClientID %&gt;").val("Force asp.net to fix the id, however (see below)") } The problem with the last approach is that your aspx file now has C# in it. This can lead to other problems and considered a bad design.
score: 1
answers question: http://stackoverflow.com/q/27038560
upvote count: 1
has comment: http://stackoverflow.com/comment/42616059
has comment: http://stackoverflow.com/comment/42796420
downvote count: 0
type: Answer

http://stackoverflow.com/q/27136553
type: Question
type: AnsweredQuestion
has body: So my app consists of little squares (fixed size) that float left. When the number of columns' width and spacing match up with the window size, it looks great. | [] [] [] [] | When it does not, there's a large space at the right side. | [] [] [] [] | I tried to fix this using CSS columns which will display your content from the top downwards. I want left to right. So I emulated left-to-right column behaviour with some javascript, basically taking the leftover width from the difference between the total width of the columns and the width of the container. I think what I really want is to find an elegant way of getting the number of columns. $(window).resize(function() { var totalGridWidth = $("#grid").width(); var videoWidth = $(".square").width(); var spaceRatio = (totalGridWidth-scrollbarWidth)/videoWidth; var currCols = parseInt((spaceRatio).toString().split(".")[0]); var colLeftOverSpace = parseFloat("0."+(spaceRatio).toString().split(".")[1]); var num = colLeftOverSpace * (videoWidth/currCols); $(".square").css("margin-right", num/2 +"px").css("margin-left", num/2 +"px"); }); DEMO: http://jsfiddle.net/ra3t2gub/ (resize the width) Is there a more elegant way to do this? I'm a bit embarrassed of it.
tagged with: math
has answer: http://stackoverflow.com/a/27136596
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42771593
has comment: http://stackoverflow.com/comment/42771909
has comment: http://stackoverflow.com/comment/42771692
tagged with: css
has title: Is there a smarter way of doing this CSS columns JS replacement?
has comment: http://stackoverflow.com/comment/42771951
accepted answer: http://stackoverflow.com/a/27136596
score: 0

http://stackoverflow.com/q/27023916
answer count: 1
downvote count: 0
favorite count: 0
tagged with: casperjs
has answer: http://stackoverflow.com/a/27036851
has title: Next page doesn't load when it should be opened from a previously set variable
accepted answer: http://stackoverflow.com/a/27036851
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42573188
score: 1
has comment: http://stackoverflow.com/comment/42573910
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42574223
has comment: http://stackoverflow.com/comment/42572552
tagged with: javascript
has comment: http://stackoverflow.com/comment/42572511
linked to: http://stackoverflow.com/q/26539629
has body: I am parsing out a url from href attribute, but when I do casper.thenOpen(url, function() { this.echo(this.getCurrentUrl()); }); shows a blank. The link on my webpage that I am trying to access is opened in a new tab and it is slightly more complicated to test a new tab using casper than just navigating to a new link on the same tab (I think so) which is why I am getting the link in a variable and then trying to open it. Am I missing something here? Code snippet: var href = ''; casper.then(function() { this.test.assertExists(x('//a[contains(@href, "SUBSTRING OF URL")]'), 'the element exists'); href = casper.getElementAttribute(x('//a[contains(@href, "SUBSTRING OF URL")]'), 'href'); }); casper.thenOpen(href, function() { this.echo(getCurrentUrl()); }); So when I echo href, its value is the same as the url I want to navigate to. But getCurrentUrl shows about:blank. Also, the URL opens up in less than a second, but it times out after 5000ms when I tried casper.waitForUrl().

http://stackoverflow.com/q/27015184
has answer: http://stackoverflow.com/a/27015271
score: -2
has title: This JavaScript doesn't work in Opera
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/27015271
downvote count: 2
has comment: http://stackoverflow.com/comment/42555976
tagged with: css
type: AnsweredQuestion
upvote count: 0
has body: I use this function in my website. http://jsfiddle.net/Alkasih/kn2695r7/ It works fine in Mozila, but in Opera, it doesn't seem to work. Can anybody help me how to make it works in any browser. Because it may be a big deal for the website. var currentDiv = 0; $(document).ready(function(){ $("#pilihWarna option").click(function(){ $(".bigandsmall").eq($(this).index()).css( "display", "block" ); if($(this).index()!=currentDiv){ $(".bigandsmall").eq(currentDiv).css("display","none");} currentDiv=$(this).index(); }) }); satu dua tiga empat satu dua tiga empat
type: Question
has answer: http://stackoverflow.com/a/27015395
accepted answer: http://stackoverflow.com/a/27015395

http://stackoverflow.com/comment/42647660
type: AnswerComment
comment on: http://stackoverflow.com/a/27060515
type: Comment
has text: I tried using the lodash method and I got a `ReferenceError: _ is not defined at :6:18`. Any idea of what's wrong?
score: 0

http://stackoverflow.com/a/27115499
upvote count: 2
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27115146
has body: Here, I've made a JS fiddle that may help you out: http://jsfiddle.net/942z0nhh/ I did not play around with the styling at all. A few things I noticed: You're making some mistakes that I think you wouldn't make if you indented properly. Take a look here, where you closed your body twice: Open Second, you have some spelling mistakes: Open vs function navagate(menu) { You can see there that your function would never be called because of it. Lastly, your 'open' and 'close' a here: Open Was within the div your function was overwriting. The function would change it to 'close'- but then it wouldn't be visible to the user anyway! I moved it above, which I hope makes sense. Please let me know if you have any other questions, or if I misunderstood.
type: Answer

http://stackoverflow.com/comment/42778594
type: Comment
comment on: http://stackoverflow.com/a/27128477
type: AnswerComment
score: 0
has text: The code is so long. Must to say, I have done traversal operation for three or four times.I'm not sure if it leads to the delay. But I have used console.log to print information in every for circulation. The print information presentes more ealier than the render effect.

http://stackoverflow.com/comment/42610814
score: 1
has text: Please give a more **detailed** question.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27046210

state
tag name: state
type: Tag
tags question: http://stackoverflow.com/q/27086829

http://stackoverflow.com/comment/42740837
type: QuestionComment
score: 0
has text: if you are using firefox Try looking into net panel of firebug or into network panel of chrome developer tools
comment on: http://stackoverflow.com/q/27119029
type: Comment

http://stackoverflow.com/comment/42579698
type: Comment
type: QuestionComment
has text: obviously `result` is not equal to `"error"` or `"pswd"`. Most likely it has an extra space or character that you didn't expect. *Find a dupe!*
comment on: http://stackoverflow.com/q/27028388
score: 4

http://stackoverflow.com/comment/42601975
type: Comment
has text: the value show up on the console but typeerror still appear. On the html form should print the data that we get from GetData, but it doesnt.
score: 0
comment on: http://stackoverflow.com/q/27041008
type: QuestionComment

http://stackoverflow.com/comment/42523572
score: 0
type: Comment
type: QuestionComment
has text: The `draggable()` and `resizable()` are called on the current elements. When you create a new element you must manually make them draggable and resizable too. Besides that, you can't create elements that have the same id's of existing ones (you can, but you shouldn't)
comment on: http://stackoverflow.com/q/26996423

http://stackoverflow.com/comment/42568262
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27021813
has text: Since your original code didn't have that functionality and we try to keep the answers related to the original question, I would recommend posting a new question and I'll take a look at it. It's definitely possible.
type: AnswerComment

http://stackoverflow.com/a/27114151
has comment: http://stackoverflow.com/comment/42731537
has comment: http://stackoverflow.com/comment/42731345
has comment: http://stackoverflow.com/comment/42731413
has comment: http://stackoverflow.com/comment/42731120
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27114097
score: 6
answers question: http://stackoverflow.com/q/27114097
has comment: http://stackoverflow.com/comment/42731398
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42731414
type: Answer
upvote count: 6
has body: You can use filter: var records = [{"Name":"Bob", "EmployeeID":1234, "StartDate":"12/01/2011"}, {"Name":"Jim", "EmployeeID":4432, "StartDate":"01/12/1997"}, {"Name":"Heather", "EmployeeID":6643, "StartDate":"07/09/2010"}]; var result = records.filter(function(r) { return r["EmployeeID"] == 4432 })[0]||'No record found'; A search function could be implemented as follows: function findByEmployeeId(records, employeeId) { return records.filter(function(r) { return r["EmployeeID"] == employeeId })[0]||null; } In general, if you have any control over the data, I would recommend changing the structure to make your life easier. If you use the following structure you can access the record directly by using records[employeeId]: { "1234" : {"Name":"Bob", "EmployeeID":1234, "StartDate":"12/01/2011"}, "4432" : {"Name":"Jim", "EmployeeID":4432, "StartDate":"01/12/1997"}, "6643" : {"Name":"Heather", "EmployeeID":6643, "StartDate":"07/09/2010"} }

http://stackoverflow.com/comment/42748192
score: 0
type: Comment
type: QuestionComment
has text: This is only half of the story, as you haven't included the timeout code or the server side code, as such it's hard to diagnose reliably.
comment on: http://stackoverflow.com/q/27123860

http://stackoverflow.com/comment/42792935
type: Comment
has text: @Kamini could you please update the question providing more information on the `pusher.json` handling code? e.g. fetching the query parameters.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27146139

http://stackoverflow.com/comment/42754196
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27127002
type: Comment
has text: this div doesnt even exist. :P

http://stackoverflow.com/comment/42731537
has text: @Adam : I put the example in a fiddle http://jsfiddle.net/n264dq28/1/ - I hope it helps
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27114151
type: AnswerComment

http://stackoverflow.com/comment/42535402
has text: Thanks for the complete code example. this is essentailly what I describe in the second option mentioned in the question. I will use this approach unless a more compellng solution is available.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27001375
score: 0

http://stackoverflow.com/a/28173513
has body: This error is actually the result of you not including bootstrap's javascript before calling the modal function. Modal is defined in bootstrap.js not jQuery. It's also important to note that bootstrap actually needs jQuery to define the modal function, so it's vital that you include jQuery before including bootstrap's javascript. To avoid the error just be sure to include jQuery then bootstrap's javascript before you call the modal function. I usually do the following in my header tag:
has comment: http://stackoverflow.com/comment/112655192
upvote count: 108
answers question: http://stackoverflow.com/q/27064176
type: Answer
downvote count: 1
score: 107
has comment: http://stackoverflow.com/comment/129727021

http://stackoverflow.com/comment/42551221
score: 0
type: Comment
type: QuestionComment
has text: @ArunPJohny: Surprisingly questions of this kind (cross origin) are coming up too frequently these days. Do you know of a canonical where these questions could be duped to?
comment on: http://stackoverflow.com/q/27012087

http://stackoverflow.com/comment/42673811
score: 0
type: Comment
type: QuestionComment
has text: What versions of Jquery and Isotope?
comment on: http://stackoverflow.com/q/27046457

http://stackoverflow.com/comment/43581981
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27122870
has text: Does Firebug say anything?

http://stackoverflow.com/a/27123878
answers question: http://stackoverflow.com/q/27123717
has comment: http://stackoverflow.com/comment/42748248
has body: You can show my DEMO CODE It's working Jquery $(document).ready(function(){ $("#show1").click(function(){ $(".down1").toggle(); if ($(this).val() == '+') { $(this).val('-'); } else $(this).val('+'); }); }); Markup 9:00 -10:00 (time) 9:00 -10:00 (time) 9:00 -10:00 (time) 9:00 -10:00 (time) 9:00 -10:00 (time)
upvote count: 1
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/q/27017991
answer count: 1
type: Question
has title: Coffee script access to input value
has body: I am new to javaScript, coffee script, jQuery and the UI tech in general. I am trying to accomplish really simple thing - read a value from the input field but so far with no luck. My code is pretty simple: Tags: From coffee script I am trying to read the value as follows: jQuery ($) -> $field = $('.ui-widget input') text=$field.val alert #{ text } But so far with no luck, but contrary via $field.val("Bye") works just fine. Could someone please put some shed on that? Thx
has answer: http://stackoverflow.com/a/27018320
score: 0
tagged with: coffeescript
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27018320
has comment: http://stackoverflow.com/comment/42561598
type: AnsweredQuestion

http://stackoverflow.com/comment/42760715
has text: Sure. I forked your fiddle and simply change `array` to `values`, `syntax`, and `db`: http://jsfiddle.net/Lfeo08da/
type: Comment
comment on: http://stackoverflow.com/a/27130160
score: 1
type: AnswerComment

http://stackoverflow.com/comment/80344189
type: AnswerComment
type: Comment
has text: Wow, thanks. ;) I love how you broke it down into pseudo code using JS, which makes a lot of things really clear on a developer level. It's like a picture speaks a thousand words, where all I was getting was more questions on small details, and certain dots not really connecting - like seeing now how 'vertexAttribPointer ' works, I can now see I have to bind the array buffer FIRST . ;)
comment on: http://stackoverflow.com/a/27164577
score: 0

http://stackoverflow.com/comment/74981020
score: 0
type: AnswerComment
has text: Thanks it works for me. The idea is awesome. I used html() instead of clone() with append();
type: Comment
comment on: http://stackoverflow.com/a/26995462

http://stackoverflow.com/q/27119608
tagged with: google-app-engine
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27131694
accepted answer: http://stackoverflow.com/a/27131694
type: Question
tagged with: javascript
tagged with: python-2.7
score: 0
has title: how to add bootstrap, css, images ,js into google app engine?
answer count: 1
tagged with: css
tagged with: twitter-bootstrap
has body: I have created the web application using bootstrap.I uploaded it to the google app engine.My problem is ,it doesn't show any images,js or css i have added.Please help me. My folder structure is like below. -myapp -css -js -images -fonts -index.html -otherfiles.html.... I edited the app.yaml as below application: website-example version: 1 runtime: python api_version: 1 default_expiration: "7d" handlers: - url: /(.*\.(gif|png|jpg|ico|js|css|swf|xml)) static_files: \1 upload: (.*\.(gif|png|jpg|ico|js|css|swf|xml)) - url: /(.*\.html) static_files: \1 upload: index.html - url: /.* script: main.p I edited the main.py as below. from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class IndexHandler(webapp.RequestHandler): def get(self): if self.request.url.endswith('/'): path = '%sindex.html'%self.request.url self.redirect(path) def post(self): self.get() application = webapp.WSGIApplication([('/.*', IndexHandler)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main() Please help me.I can't figure this out.

http://stackoverflow.com/q/27108831
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42720892
tagged with: php
tagged with: spring
tagged with: cookies
has title: Getting Cookie from external app in AngularJs
type: Question
has comment: http://stackoverflow.com/comment/42721114
tagged with: javascript
has comment: http://stackoverflow.com/comment/42723530
score: 0
has body: I have two projects in local, one is using PHP (port: 80) and other Javas Spring + AngularJS (port: 8080). With the first project I'm authenticating users and creating cookies (TOKEN and USERNAME). Now, with the second app I need to get TOKEN and USERNAME but AngularJS return undefined. Anyone knows whats happening? EDIT 24/11/2014: This is my indexController, I'm trying to get username to show in scope. var cavControllers = angular.module("cavControllers", ['ngCookies']); cavControllers.controller('indexController', function($http,$rootScope, $cookieStore, $cookies){ $rootScope.title="Agora Voting"; $rootScope.username = $cookieStore.get('username'); console.log($cookieStore.get("username")); });
has comment: http://stackoverflow.com/comment/42720655
has comment: http://stackoverflow.com/comment/42724118
tagged with: angularjs
answer count: 0

http://stackoverflow.com/comment/42955614
type: AnswerComment
score: 0
type: Comment
has text: @SantoshKantharaj, sorry, I can't help you in Java. I hope you find a solution!
comment on: http://stackoverflow.com/a/27190782

http://stackoverflow.com/comment/42736619
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27117133
has text: what are you doing with the form when it is submitted? If it's calling a PHP file you could do the validation in there instead and redirect if there's an error.
score: 0

angularjs
tags question: http://stackoverflow.com/q/27106634
tags question: http://stackoverflow.com/q/27030849
tags question: http://stackoverflow.com/q/27051017
tags question: http://stackoverflow.com/q/27066240
tags question: http://stackoverflow.com/q/27047332
tags question: http://stackoverflow.com/q/27004669
tags question: http://stackoverflow.com/q/27070369
tags question: http://stackoverflow.com/q/27128658
tags question: http://stackoverflow.com/q/27015818
tags question: http://stackoverflow.com/q/27101326
tags question: http://stackoverflow.com/q/27054783
tags question: http://stackoverflow.com/q/26995694
tags question: http://stackoverflow.com/q/27148320
tags question: http://stackoverflow.com/q/27071977
tags question: http://stackoverflow.com/q/27130364
tags question: http://stackoverflow.com/q/27057092
tags question: http://stackoverflow.com/q/27103867
tags question: http://stackoverflow.com/q/27051268
tags question: http://stackoverflow.com/q/27011527
tags question: http://stackoverflow.com/q/27049582
tags question: http://stackoverflow.com/q/27045636
tags question: http://stackoverflow.com/q/27094278
tags question: http://stackoverflow.com/q/27128730
tags question: http://stackoverflow.com/q/27084628
tags question: http://stackoverflow.com/q/27054198
tags question: http://stackoverflow.com/q/27041850
tags question: http://stackoverflow.com/q/27029259
tags question: http://stackoverflow.com/q/27033318
tags question: http://stackoverflow.com/q/27054847
tags question: http://stackoverflow.com/q/27066245
tags question: http://stackoverflow.com/q/27018073
tags question: http://stackoverflow.com/q/27124787
tags question: http://stackoverflow.com/q/27039631
tags question: http://stackoverflow.com/q/27036611
tags question: http://stackoverflow.com/q/27041811
tags question: http://stackoverflow.com/q/27013958
tags question: http://stackoverflow.com/q/27122840
tags question: http://stackoverflow.com/q/27087038
tags question: http://stackoverflow.com/q/27124272
tags question: http://stackoverflow.com/q/27112672
tags question: http://stackoverflow.com/q/26999107
tags question: http://stackoverflow.com/q/27113559
tags question: http://stackoverflow.com/q/27149110
tags question: http://stackoverflow.com/q/27048584
tags question: http://stackoverflow.com/q/27134375
tags question: http://stackoverflow.com/q/27053562
tags question: http://stackoverflow.com/q/27076518
tags question: http://stackoverflow.com/q/27022490
tags question: http://stackoverflow.com/q/27047552
tags question: http://stackoverflow.com/q/27123475
tags question: http://stackoverflow.com/q/27085702
tags question: http://stackoverflow.com/q/27008530
tags question: http://stackoverflow.com/q/27091777
tags question: http://stackoverflow.com/q/27033247
tags question: http://stackoverflow.com/q/27031739
tags question: http://stackoverflow.com/q/27110292
tags question: http://stackoverflow.com/q/27105553
tags question: http://stackoverflow.com/q/26994376
tags question: http://stackoverflow.com/q/27150268
tags question: http://stackoverflow.com/q/26996438
tags question: http://stackoverflow.com/q/26993348
tags question: http://stackoverflow.com/q/27112544
tags question: http://stackoverflow.com/q/27014605
tags question: http://stackoverflow.com/q/27135463
type: Tag
tags question: http://stackoverflow.com/q/26996785
tags question: http://stackoverflow.com/q/27077769
tags question: http://stackoverflow.com/q/27128873
tags question: http://stackoverflow.com/q/27136445
tags question: http://stackoverflow.com/q/27019755
tags question: http://stackoverflow.com/q/27129668
tags question: http://stackoverflow.com/q/27009696
tags question: http://stackoverflow.com/q/27063718
tags question: http://stackoverflow.com/q/27136803
tags question: http://stackoverflow.com/q/27055183
tags question: http://stackoverflow.com/q/27143187
tags question: http://stackoverflow.com/q/27022013
tags question: http://stackoverflow.com/q/27025931
tags question: http://stackoverflow.com/q/27019858
tags question: http://stackoverflow.com/q/27131002

http://stackoverflow.com/q/27136847
has comment: http://stackoverflow.com/comment/42772058
accepted answer: http://stackoverflow.com/a/27136944
linked to: http://stackoverflow.com/q/20998541
answer count: 4
tagged with: enter
has comment: http://stackoverflow.com/comment/42771979
has answer: http://stackoverflow.com/a/27136952
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27136954
type: AnsweredQuestion
tagged with: alert
score: 1
has answer: http://stackoverflow.com/a/27136944
has title: On Enter fire javascript function
possible better answer: http://stackoverflow.com/a/27136884
has answer: http://stackoverflow.com/a/27136884
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: After reading this post here in Stackoverflow, (Detect the Enter key in an text input field) I tried to make a few of my inputs fire on enter... I did not work. I made a simple example and it still doesn't work. Can someone hint as to the proper way? (FYI - Definitely a newbie here) On Enter Thanks
favorite count: 0

http://stackoverflow.com/q/27056014
has comment: http://stackoverflow.com/comment/54865272
has body: I am working on a linear algebra Node.js addon (written in C++) and I want to be able to save to and read from the disk all objects I exposed. For example, v = la.load(fs.open("vector.out", "r-")); would load a vector object I previously saved with v.save(fs.open("vector.out", "r+"));. (I'm making it up --- the point is I want the user to pass a Node.js object for File I/O and use that object to load/save my object.) My question(s): How do I access Node.js's FileSystem objects from the C++ side? (On the Javascript side the user passes a fs object to my load function and I want to extract file descriptor from that object.) How do Node.js addons typically solve this? Any tips?
upvote count: 4
tagged with: node.js
tagged with: c++
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/54865475
type: UnansweredQuestion
tagged with: v8
has title: Node.js addon: File I/O via Node.js FileSystem module from the C++ side
tagged with: javascript
score: 4
type: Question
favorite count: 0

http://stackoverflow.com/a/42836384
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: The problem is the onsubmit. Because you don't prevent the default action of the form. Your form is sent to messing.html and that will be loaded. You need to prevent the default action on the form when you want to use xmlHTTPRequest. function validateForm(e) { .... e.preventDefault(); //&lt;--- magic } on a side note. Using synchronous xmlHTTPRequest is considered bad practice and not allowed in modern browsers, since it could hang the browser if no response is available or takes a long time to load. In this case switching to asynchronous is simple. function validateForm(e) { var user_input = document.login.pword.value; xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","books.txt",true); //changed to true xmlhttp.onreadystatechange = function(){ if (this.status == 200 &amp;&amp; this.readystate == 4) { var y =xmlhttp.responseText; if (user_input == y){ location.href = "messing.html"; } else { alert ("Login was unsuccessful, please check your password"); return false; } } } xmlhttp.send(); e.preventDefault(); }
accepted answer of: http://stackoverflow.com/q/27021410
answers question: http://stackoverflow.com/q/27021410
type: AcceptedAnswer

http://stackoverflow.com/a/27058244
type: AcceptedAnswer
has body: errr, I was calling the function improperly by missing the paren after initialize - should be console.log(initialize()); Thank you @Felix_king
accepted answer of: http://stackoverflow.com/q/27058196
type: Answer
answers question: http://stackoverflow.com/q/27058196
score: 0

http://stackoverflow.com/comment/42618611
score: 0
type: AnswerComment
type: Comment
has text: Thanks, my html was pretty bad. I didn't pay attention to the js libraries order on jsfiddle, but the order was correct inside my local web page. jQuery 1.2.1 exists, it's the migrate plugin, but i don't know if it is really necessary for Slick.
comment on: http://stackoverflow.com/a/27050290

http://stackoverflow.com/comment/42708751
comment on: http://stackoverflow.com/q/27102226
type: Comment
type: QuestionComment
score: 1
has text: remove the class `table-hover`

http://stackoverflow.com/a/27221412
score: 1
has comment: http://stackoverflow.com/comment/42944020
downvote count: 0
has comment: http://stackoverflow.com/comment/42943004
has comment: http://stackoverflow.com/comment/42942932
has comment: http://stackoverflow.com/comment/42942706
has body: You can do this in many ways, for example, you can create a class that will trigger the CSS animation, and before deleting the object, you first assign it that class. Here's how: var deleteAnimDuration = 1000; // let's use one second for our example $scope.deletePayment = function(index) { //This deletes the Array Element and removes associated //Directive template from the DOM $scope.payments[index].deleteAnim = true; // or whatever property makes sense to you $timeout(function(){ $scope.payments.splice(index, 1); }, deleteAnimDuration); } Then on the directive, you can use ng-class: Then in the CSS: payment.deleting { transition: opacity 1s linear; // again, one second opacity: 0; } Since this sample animation (opacity fade) will run for one second, you need to set deleteAnimDuration for the $timeout to one second (1000 in milliseconds). So, what happens: you click delete on a payment it sets payment.deleteAnim to true, which assigns the deleting class to the element the timeout for the animation duration is set animation starts animation ends element removed from the DOM This is the concept from the DOM standpoint: var divs = document.getElementsByTagName('div'); for (var i = 0; i < divs.length; i++) { divs[i].addEventListener('click', function(e) { e.target.className = 'deleting'; deleteEl(this) }) } function deleteEl(el) { setTimeout(function() { el.parentElement.removeChild(el); }, 1000); } .deleting { transition: opacity 1s linear; opacity: 0; } div { width: 50px; height: 50px; display: inline-block; background: #eee; } Click me Click me Click me Click me Of course, this can work with JS animations as well.
has comment: http://stackoverflow.com/comment/42942567
answers question: http://stackoverflow.com/q/27113512
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42943406
has comment: http://stackoverflow.com/comment/42943240

http://stackoverflow.com/q/27117105
has body: Could someone please help with the code below. I tried to follow instructions from this link to create a horizontal infinite photo wheel. http://www.the-art-of-web.com/css/infinite-photo-carousel/ There are several things going wrong with this: 1) When hovering over any image, the images disappear 2) After awhile, it continues to rotate but half (or more) of the visible images are no longer visible 3) The border around the center picture rotates with the picture, then is supposed to move back to the center but on the next picture in sequence. It looks like the code is moving the picture AND the border back. 4) Major problems trying to view in IE. I wrote this in Chrome and I am at least getting 3D success. IE is showing the first 5 images flat and no animation. I need this to work in IE, Chrome, Safari and Firefox. Code attached :
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42736741
type: UnansweredQuestion
tagged with: animation
tagged with: css
has title: 3D Animation with CSS/javascripts
has comment: http://stackoverflow.com/comment/42739042
answer count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/q/27111431
score: 0
type: Question
has answer: http://stackoverflow.com/a/27113865
has title: In jsp how to do onload with a condition?
has comment: http://stackoverflow.com/comment/42725785
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27111486
answer count: 3
has answer: http://stackoverflow.com/a/27111486
has answer: http://stackoverflow.com/a/27111581
tagged with: jsp
accepted answer: http://stackoverflow.com/a/27113865
tagged with: http://stackoverflow.com/tag/html
has body: I know how to do a onload, and I know in jsp how to test a condition, but how to do a : &lt;body onload="clearCache()"&gt; Only when : request.getSession().getAttribute("stickyCarrier") != null
type: AnsweredQuestion

http://stackoverflow.com/q/27022785
score: -3
has answer: http://stackoverflow.com/a/27023584
downvote count: 3
has answer: http://stackoverflow.com/a/27022969
type: Question
has comment: http://stackoverflow.com/comment/42569897
has title: Can you use an onClick right after declaring an id to an element
tagged with: javascript
answer count: 2
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42569992
favorite count: 0
type: UnansweredQuestion
has body: I have to make a Tic Tac Toe program and I had a question about id's and onClicks. My question is: Can you use an onClick right after declaring an id to an element. What I mean is this. &lt;td id="t1" onClick='t1'&gt;&lt;/td&gt; Because what I want to do is make it when you click that cell, an X appears in that cell, and I would write that for the other nine cells.
has comment: http://stackoverflow.com/comment/42569645

http://stackoverflow.com/q/26999747
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26999810
has body: im a complete nooblet at javascript so if some one could help me id appreciate it :) im trying to call my function (questions) from my external js file however its not loading it for what ever reason.any help would be awesome! HTML file Answer 1 Answer 2 Answer 3 Answer 4 javascript file console.log("53"); var questions = Array["question 1", "question 2", "question 3","question 4" ] function loadQuestion1(){ console.log("q1"); document.getElementById('q1').innerHTML = "text"; } function rand(min, max) { var offset = min; var range = (max - min) + 1; var randomNumber = Math.floor( Math.random() * range) + offset; return randomNumber; } randomNumber = rand(0, questions.length - 1); randomQuestions = questions.[randomNumber]; So currently it should load the word "text" but its not loading that for some reason - never mind the actual question. p.s im trying to make a small quiz app which selects a random question from the array
has comment: http://stackoverflow.com/comment/42529733
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26999806
accepted answer: http://stackoverflow.com/a/26999810
type: Question
has comment: http://stackoverflow.com/comment/42529772
has title: JS function not being called?
possible better answer: http://stackoverflow.com/a/26999806
has answer: http://stackoverflow.com/a/26999815
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/42647481
type: Comment
comment on: http://stackoverflow.com/a/27048897
score: 0
has text: If you mean the ) after the on, it was a typo, btw thanks for your revision!
type: AnswerComment

http://stackoverflow.com/q/27060271
has title: Repair creep does not repair rampart
score: 3
has answer: http://stackoverflow.com/a/27060413
upvote count: 3
has body: The following code prints out "rampart", and but the creep is just standing still and not repairing. It uses the snippet mentioned in the docs. According to the docs, structures can be repaired and rampart is a structure. What's wrong? module.exports = function(creep) { var target = creep.pos.findNearest(Game.MY_STRUCTURES, { filter: function(object) { return object.hits &lt; object.hitsMax; } }); if(target) { console.log("_________" + target.structureType); creep.moveTo(target); creep.repair(target); } }
type: Question
downvote count: 0
tagged with: javascript
answer count: 1
favorite count: 0
tagged with: screeps
type: UnansweredQuestion

http://stackoverflow.com/comment/42631139
type: Comment
type: QuestionComment
has text: @pp94 Sorry. Lack of coffee. Forget my stupid comment.
comment on: http://stackoverflow.com/q/27057984
score: 0

http://stackoverflow.com/comment/42734123
has text: what if `$(this).is('input')` and it can have value attribute but it just not defined or provided? Example: ` `
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27115705
type: Comment

http://stackoverflow.com/a/27116923
downvote count: 0
answers question: http://stackoverflow.com/q/27116849
type: Answer
accepted answer of: http://stackoverflow.com/q/27116849
has body: You can use: document.querySelector('iframe[src="http://mysite/mypage/etc/etc/etc"]') This only work on modern browser. https://developer.mozilla.org/en-US/docs/Web/API/document.querySelector For older browser support, select all iframe by tag names. Then recurse through all the elements you receive and check their src property. A simple example: (code could and should be written better in your own implementation) var iframes = document.getElementByTagName('iframe'); var matches = []; for (el in iframes) { if (el.src === 'http://mysite/mypage/etc/etc/etc') { matches.push(el); } }
upvote count: 3
score: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/42657980
comment on: http://stackoverflow.com/q/27072797
type: Comment
type: QuestionComment
has text: all you are doing is submitting form using browser default submit process and causing page to reload. You probably want to submit form using ajax and prevent default submital
score: 0

http://stackoverflow.com/q/27036790
has comment: http://stackoverflow.com/comment/42594247
tagged with: node.js
tagged with: mongodb-query
answer count: 0
has title: MongoDB query behaviour with ranges
score: 0
type: Question
tagged with: mongodb
tagged with: javascript
has comment: http://stackoverflow.com/comment/42594787
type: UnansweredQuestion
has body: I am building a realtime app. A Websocket connection is established between clients and server (NodeJS). The clients sends four numeric values. 2 pairs of low and high - with these values the server selects a Range of data. No MongoDB used. Example: User sends this data var myObj = { userid: 10001234, myData: { first: 400, second: 17 }, first: { low: 300, high: 500 }, second: { low: 10, high: 24 } }; Server receiving data does this: serverObj.userid = myObj.userid; serverObj.myData = myObj.myData; After that the server pushes the serverObj to a collection array at a certain index which it determines via a quicksorting algorithm comparing the myData.first so we could have an collection array on the server that looks like this if we take a snapshot out of runtime: var collection = [{ userid: 10001231, myData: { first: 400, second: 17 } }, { userid: 10001232, myData: { first: 401, second: 31 } }, { userid: 10001233, myData: { first: 402, second: 52 } }, { userid: 10001234, myData: { first: 403, second: 91 } }, { userid: 10001235, myData: { first: 404, second: 800 } }, { userid: 10001236, myData: { first: 405, second: 11 } }, { userid: 10001237, myData: { first: 406, second: 2 } } ]; Now pretend the array consists of more than 1000 entries like this. Next step of the server would be finding the range of values the user requested in the myData.first and myData.second. To achieve this I am determining the index of the myObj.first.low and the index of myObj.first.high and extracts the range between the two indexes from the collection array. After that the server resorts the extracted data comparing myData.second. Then: determines the index of the myObj.second.low and the index of myObj.second.high and extracts the range between the two indexes from the extracted and resorted array. The final extracted information contains all values in the range the client has given -> this is then returned to the client. WOW... well this was not easy to put into words. But I think its eas…

http://stackoverflow.com/q/27102958
answer count: 1
score: 0
tagged with: java
has body: I'm sorry for the long post, but I think this is the only way to explain whats happening... I'm looking for help after a lot of research with no answers... A big problem I think... So this web app schedule a local notification based on a time picker that the users interact with.. I'm using cordova and jquery mobile multi-page system... It changes from page to page by div IDs, the navigation looks like this: index.html, index.html#page2, index.html#page3.. The local notification is a java plugin for cordova Katzer Local Plugin. The plugin only works inside the onDeviceReady function and the jquery mobile does not, like this... document.addEventListener('deviceready', onDeviceReady, false); /* JQUERY MOBILE HERE */ $(document).on("pagecreate", "#home", function(event) { $("a#btnpage2").click(function (e) { e.stopImmediatePropagation(); e.preventDefault(); $( "#page2" ).pagecontainer( "change"); // change to #page2 }); }); $(document).on("pagecreate", "#page2", function(event) { console.log("#page2 created"); }); function onDeviceReady(){ /* NOTIFICATION PLUGIN HERE */ //create notification var msg = "notification message"; window.plugin.notification.local.add({ id: 'notif', date: dateobject, message: msg, json: JSON.stringify({ test: msg }), title: 'Title', autoCancel: true, ongoing: false }); //onclick event notification window.plugin.notification.local.onclick = function (notif, state, json) { var msg = JSON.parse(json).test; $( "#notificationPage" ).pagecontainer( "change", { text: msg} ); //pass data and change to #page2 } //ontrigger notification window.plugin.notification.local.ontrigger = function (notif, state, json) { var msg = JSON.parse(json).test; } } When the notification is fired, and when I click it, it should change the page to #notificationPage. The problem is that the command inside onclick, does not work even when I click the notification with the app running, it throws this error: Uncaugh Error: cannot call methods on pagecontainer prior to initial…
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/28866840
tagged with: android
has title: Cordova Jquery Mobile Local Notification onclick change page
tagged with: cordova
type: Question

http://stackoverflow.com/q/27039700
has comment: http://stackoverflow.com/comment/42612159
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has title: Passing values between form and controller
type: Question
has body: I have a view with many controls (50+) each connected a scope controller object using ng-model, yet I must move the content of inventory object to another object dataObj before posting the data to the api endpoint. Problem I am facing is that when any of the field is left empty it is not moved with object 'inventory' to the controller, thus when I transfer data between 'inventory' and 'dataObj' I get undefined, so I made a little check on data received in the inventory object as shown below but I don't think that this is the best approach, so I was hoping for some advice on best approach to check on the 'inventory' object fields to make sure if they exist or not before moving them to the 'dataObj' object. Thanks Form (part): Price USD Price GBP JS typeof inventory.prices.gbp === 'undefined'? dataObj.PRICES.gbp = '' : dataObj.PRICES.gbp = inventory.prices.gbp;
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42601446

http://stackoverflow.com/comment/42712588
has text: Don't listen for form submission with click events - listen for submit events on the form instead. Otherwise, if I submit your form by pressing enter in a text field, I bypass your JS. When you say the JS is not running, how have you clarified this? Did you put some alerts in various places to check if it's running? Errors in the console? etc
type: QuestionComment
comment on: http://stackoverflow.com/q/27104613
score: 1
type: Comment

http://stackoverflow.com/q/27006239
upvote count: 6
score: 6
linked to: http://stackoverflow.com/q/52073169
type: Question
has title: OWL Carousel image not right size at first
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42544290
has comment: http://stackoverflow.com/comment/42544278
has answer: http://stackoverflow.com/a/27320540
tagged with: owl-carousel
has body: I am using OWL Carousel and I have coded it so there will be one image displayed and then every 15 seconds the next image will slide in. I have set the width to be 100% of the screen so and coded the js appropriately so in theory there should be ONE image at a time at full size....however what happens is it shows all the images rather small and then if i resize the screen even 1 pixel it snaps into how it should be..... any idea on how to avoid having to resize the screen to get the image to be full sized ? Here is my HTML &lt;div class="owl-carousel"&gt; &lt;img src="assets/background1.jpg" /&gt; &lt;img src="assets/background2.jpg" /&gt; &lt;img src="assets/background3.jpg" /&gt; &lt;/div&gt; Here is my js var owl = $('.owl-carousel'); owl.owlCarousel({ singleItem: true, items:1, loop:true, margin:10, autoplay:true, autoplayTimeout:15000, autoplayHoverPause:true }); $('.play').on('click',function(){ owl.trigger('autoplay.play.owl',[1000]) }) $('.stop').on('click',function(){ owl.trigger('autoplay.stop.owl') })
accepted answer: http://stackoverflow.com/a/27320540
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: carousel
tagged with: css

http://stackoverflow.com/comment/42756266
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27126357
has text: What do you mean by 'external'. Javascript can only execute inside the current `document`. Or use `XHTMLHttpRequest` to communicate with the server.
score: 0

http://stackoverflow.com/comment/42521413
has text: Please, [don't use `mysql_*` functions](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php), They are no longer maintained and are [officially deprecated](https://wiki.php.net/rfc/mysql_deprecation). Learn about [prepared statements](http://en.wikipedia.org/wiki/Prepared_statement) instead, and use [PDO](http://us1.php.net/pdo) or [MySQLi](http://us1.php.net/mysqli). You will also want to [Prevent SQL Injection!](http://stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26995007

http://stackoverflow.com/comment/42567080
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27021233
has text: sure but I have to wait for 10 min to accept the answer as correct answer!

http://stackoverflow.com/comment/42722205
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27109390
has text: I have trouble understanding what is it you want to achieve. Could you make it clearer?
score: 0

http://stackoverflow.com/comment/42554198
type: Comment
comment on: http://stackoverflow.com/q/27013960
type: QuestionComment
has text: I'd start with considering what exactly an "activity" is. For example, when a user moves the mouse, does it count?
score: 0

http://stackoverflow.com/a/27052124
answers question: http://stackoverflow.com/q/27051685
has body: Try removing the click handler with $('.confirm').off() in your callback. This way, when you programmatically trigger the click, your click handler be called.
has comment: http://stackoverflow.com/comment/42621292
type: Answer
score: 0

http://stackoverflow.com/comment/42674307
type: Comment
comment on: http://stackoverflow.com/a/27057228
score: 1
type: AnswerComment
has text: Sub-state scopes are descendants of super-state scope, so you can access super-state scope properties from sub-state controllers. (Just take care not to [overwrite super-state properties](http://www.codelord.net/2014/05/10/understanding-angulars-magic-dont-bind-to-primitives/).)

http://stackoverflow.com/comment/42731842
comment on: http://stackoverflow.com/q/27114511
score: 1
has text: If you're supposed to take medication every _x_ hours, surely you don't want to do it an hour early or wait an extra hour between doses?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27135354
score: 0
answers question: http://stackoverflow.com/q/27135107
has comment: http://stackoverflow.com/comment/42769092
type: Answer
has body: Math.random() ∈ [0,1) ⇒ Math.random() * 2 ∈ [0,2) ⇒ Math.floor(Math.random()*2) ∈ [0,1] ∩ ℤ = {0,1} ⇒ Math.floor(Math.random()*2) + 1 ∈ {1,2} If you want a number of the set {1,2,3}, you should multiply by 3: Math.random() ∈ [0,1) ⇒ Math.random() * 3 ∈ [0,3) ⇒ Math.floor(Math.random()*3) ∈ [0,2] ∩ ℤ = {0,1,2} ⇒ Math.floor(Math.random()*3) + 1 ∈ {1,2,3}

http://stackoverflow.com/q/27018949
has title: JavaScript: Storing dates in array in for loop
has answer: http://stackoverflow.com/a/27019207
type: Question
accepted answer: http://stackoverflow.com/a/27019089
tagged with: for-loop
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27019089
has body: I'm trying to loop through to check if the first date is less than the second date. If it is, I want to store the value in an array, add 1 day to the first date, then go back through the process. I think that's what I've written, but I'm not sure why it's not working. When I console out any any of the array values, it's always the last date that appears and I can't get any of the other values to store. After stepping through it with Firebug, it looks like they are being overwritten. I'm using moment.js to get the dates. var counter = 1; var arr = []; var i = firstDate.toDate(); for(counter; firstDate &lt; secondDate; counter++){ arr[i]=firstDate.toDate(); firstDate.add(1, "day"); } console.log(arr[2]); Any help would be greatly appreciated!
tagged with: momentjs
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27019207

http://stackoverflow.com/a/27034488
has comment: http://stackoverflow.com/comment/42592966
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42590046
has comment: http://stackoverflow.com/comment/42592148
has comment: http://stackoverflow.com/comment/42590379
answers question: http://stackoverflow.com/q/27028642
has body: Please see the documentation. You can't combine parameter q with any of the alternative search parameters. Instead you can give a more specific query string including the country: http://nominatim.openstreetmap.org/search?format=json&amp;q=Berlin,%20Germany

http://stackoverflow.com/q/27139508
tagged with: safari
has answer: http://stackoverflow.com/a/27140116
score: 0
has comment: http://stackoverflow.com/comment/42776911
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has body: Uploaded a Web Site built with Dreamweaver. Google and Firefox display the website correctly but Safari has issues with on of the div's. Checked the site via Inspect Element in both Safari and Google, with the following results. In Safari &lt;div id="cycle" class="fluid" style="position: relative; width: 0px; height: 0px;"&gt;&lt;/div&gt; In Google &lt;div id="cycle" class="fluid" style="position: relative; width: 440px; height: 432px;"&gt;&lt;/div&gt; The Site also displays correctly on Mobile devices using Safari. it is only the Desktop Version that is causing grief. Following is the CSS for the Desktop size .gridContainer { width: 89.3181%; max-width: 1232px; padding-left: 0.3409%; padding-right: 0.3409%; margin: auto; clear: none; float: none; margin-left: auto; } #header { } #nav { } #cycle { width: 58.0152%; clear: none; float: left; margin-left: 0; border: solid black 2px; position:inherit; } #content { width: 39.6183%; clear: none; float: right; margin-left: 9.1603%; border: solid black 2px; } #footer { } #circles { } .zeroMargin_desktop { margin-left: 0; } .hide_desktop { display: none; } } The website is as yet incomplete www.drophatproductions.com/Test/index.html Thanks in advance for your help Barb
has comment: http://stackoverflow.com/comment/42777591
has title: Safari not displaying Div
has comment: http://stackoverflow.com/comment/42777536
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42776910
has comment: http://stackoverflow.com/comment/42777853

http://stackoverflow.com/a/27064457
upvote count: 0
has body: I guess you should use in your button &lt;a data-toggle="modal" href="#form-content" instead of href there should be data-target &lt;a data-toggle="modal" data-target="#form-content" just be sure, that modal content is already loaded I think problem is, that showing modal is called twice, one in ajax call, that works fine, you said modal is shown correctly, but error probably comes with init action on that button, that should handle modal, this action cant be executed, because modal is not loaded at that time.
downvote count: 2
type: Answer
score: -2
answers question: http://stackoverflow.com/q/27064176

http://stackoverflow.com/a/27043964
upvote count: 2
downvote count: 0
has body: Typically a "isdirty" flag gets triggered whenever there is a change to the form. This flag lets CRM know that there have been modifications to the form in question, and to make sure to display the "There are unsaved changes" dialog box. My guess is that this flag is not being tripped when you update the textbox. if you put console.log(Xrm.Page.data.entity.getIsDirty()) in your javascript and check out the resulting code, does it say true or false? If it's false you'll need to set the dirty flag using Xrm.Page.data.setFormDirty() EDIT: I don't think this is the issue any more. refer to below. After you set the value of the text box try executing this: Xrm.Page.data.refresh(save); That should save it, that way the save and close button doesn't have to.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27043338

http://stackoverflow.com/comment/42562218
comment on: http://stackoverflow.com/a/27018019
has text: Now it catches the right filed and it counts one member but for sum I get NaN. I've updated a picture during debugging process where you can see this. I've also added a line for writing sum value into a label, but I'm not sure is it right... Sorry for bothering you this much I'm simply bad in JS right now...@RamzanZafar
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27087013
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27087395
accepted answer: http://stackoverflow.com/a/27087395
tagged with: regex
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
has body: This regular expression removes the ANSI colors from a string: /\u001b\[.*?m/g: &gt; '\u001b[1m\u001b[38;5;231mHello World\u001b[0m\u001b[22m'.replace(/\u001b\[.*?m/g, '') 'Hello World' How can we extract an array of objects like this: [ { start: "\u00\u001b[1m\u001b[38;5;231", end: "\u001b[0m\u001b[22m", content: "H" }, { start: "\u00\u001b[1m\u001b[38;5;231", content: "e" end: "\u001b[0m\u001b[22m", }, ... ] What's the optimal way to to this?
has title: Get an array with characters and them ANSI colors from an input string
type: Question
tagged with: javascript
upvote count: 2

http://stackoverflow.com/q/27070663
tagged with: gwt
type: AnsweredQuestion
score: 2
tagged with: java
tagged with: https
type: Question
tagged with: google-visualization
accepted answer: http://stackoverflow.com/a/27071008
tagged with: javascript
has title: How to load GWT Visualization API over HTTPS
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm trying to load the GWT Visualization Api to draw a chart like so: Runnable onLoadCallback = new Runnable() { public void run() { LineChart chart = new LineChart(createTable(), createOptions()); MyPage.this.add(chart); } }; VisualizationUtils.loadVisualizationApi(onLoadCallback, LineChart.PACKAGE); This works fine running locally, but over an application server, run() is never fired. I get the following error in my browser console: Mixed Content: The page at 'https://mysite.myorg.com/mypage' was loaded over HTTPS, but requested an insecure script 'http://www.google.com/jsapi?callback=__gwt_AjaxLoader_onLoad'. This request has been blocked; the content must be served over HTTPS. I can't find anything in the Visualization documentation to force VisualizationUtils to load the API over HTTPS. Can anyone help me with this?
upvote count: 2
has answer: http://stackoverflow.com/a/27071008

http://stackoverflow.com/comment/42771348
has text: Yea "a practical, answerable problem that is unique to software development"..... How to make the program keep track of data entered , being my question..... to have what i want explained further I would say I want it to be able to take multiple data entries via button click and be able to repeat it back.... Seems practical and answerable to me.......
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27092105

http://stackoverflow.com/comment/42707986
has text: `CURRENT_TIMESTAMP` does not take an argument.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27101941
score: 3

http://stackoverflow.com/a/27066493
has comment: http://stackoverflow.com/comment/42646447
has body: set the style of the panel to overflow: hidden. .panel { overflow: hidden; }
score: 0
has comment: http://stackoverflow.com/comment/42646707
has comment: http://stackoverflow.com/comment/42646406
type: Answer
has comment: http://stackoverflow.com/comment/42648211
answers question: http://stackoverflow.com/q/27066470

http://stackoverflow.com/q/27120430
score: 1
upvote count: 1
type: Question
tagged with: sails.js
tagged with: javascript
has title: Inject javascript to specific view/route in Sailsjs after all the global javascripts
downvote count: 0
answer count: 1
favorite count: 0
has body: Recently I have been trying to build a really simple chat app using sailsjs, the app has only 3 pages, each page has different sets of reference data that will feed twitter typeahead js, what I intend to do is like this: var socket = io.connect('http://localhost:1337'); $(document).ready(function () { var $modalLayer = $(JST['assets/templates/generic/modal.html']({})); $modalLayer.appendTo("body").modal('show'); socket.on('connect', function () { socket.request('/chat/references', {}, function (data) { console.log(data); bindTypeAhead(data); $modalLayer.modal('hide'); }); }); For different page I have different logic, so need to be separated into different javascript files. What I have tried were: using tag in pagea.ejs and pageb.ejs using &lt;%- block('localScripts', 'SCRIPT_TAG') %> Both approaches made the script come before all the javascript injections defined in pipeline.js, thus socket.io becomes undefined. Some solutions I found on stackoverflow I read was to move the javascript injections to "&lt;head>", but I think this is a hacky way to go, I dont really want to break sailsjs convention. Could anybody have a nice way of doing it? Many thanks. The sails I'm using is versioned 0.10.5.
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22112763
has answer: http://stackoverflow.com/a/27121109
tagged with: node.js

http://stackoverflow.com/comment/42602247
comment on: http://stackoverflow.com/a/27041383
has text: I doesn't really work like that. The jquery I am injecting is local and shpuld be included in the manifest.json of the chrome extension.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42678292
has text: @black123 link[0] give me the mySite.com/link.html part.
comment on: http://stackoverflow.com/q/27084516
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27185036
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You seem to have a problem with the folder structure. The How do I resolve "Cannot find module" error using Node.js? should help you resolve your issue
type: Answer
accepted answer of: http://stackoverflow.com/q/27121171
upvote count: 1
answers question: http://stackoverflow.com/q/27121171
has comment: http://stackoverflow.com/comment/42927862

http://stackoverflow.com/q/27122840
tagged with: file
tagged with: streaming
has answer: http://stackoverflow.com/a/27145461
has body: I'm using streaming response on server side - running sinatra. How can I handle the client side file download (javascript + angular) in a way, that my streaming response would not get fully loaded first and offered only afterwards to be saved to file? My current impl. looks similar to this one (using FileSaver): $http.post('/foo', bar) .success(function (data) { var blob = new Blob([data], {type: "text/plain;charset=utf-8"}); saveAs(blob, 'A.csv'); }). Still I feel like response gets downloaded completely first and only afterwards offered for save. The thing is, that file downloaded can be huge, so just wanted to provide fast response to end user.
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/398237
linked to: http://stackoverflow.com/q/16086162
has title: javascript save file from (sinatra's) streaming response
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/27145461
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
score: 2
upvote count: 2
tagged with: save

http://stackoverflow.com/a/27326325
downvote count: 0
answers question: http://stackoverflow.com/q/27089761
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/43181425
has body: Reading through the documentation it looks like it's supposed to be $('#Student_Grid').append(grid.render().el); instead of $('#Student_Grid').append(grid.render().$el); $el looks like a function where as el is the node object that you'd want to append.

http://stackoverflow.com/a/27209941
type: AcceptedAnswer
type: Answer
has body: Actually it turns out I can just insert an image as html: &lt;script type="text/javascript"&gt; $("#&lt;%= subrating.name.downcase %&gt;_link").click(function () { $.get( "&lt;%= upvote_subrating_path(:id =&gt; subrating.id) %&gt;", function( data ) { $('#&lt;%= subrating.name %&gt;').html(data + ' %'); $('#&lt;%= subrating.name %&gt;'upz).html( '&lt;%= image_tag("UpArrowGreen.png" %&gt;'); }); }); &lt;/script&gt;
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27139331
accepted answer of: http://stackoverflow.com/q/27139331
upvote count: 1

http://stackoverflow.com/comment/42700826
has text: `$.csv.toArrays(csv)` in the [jquery-csv docs](https://code.google.com/p/jquery-csv/) looks like what you are looking for.
comment on: http://stackoverflow.com/q/27097757
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27115858
upvote count: 5
has comment: http://stackoverflow.com/comment/42735153
has body: Firstly, you are returning in your service after you create your $FirebaseArray. You are also creating another $FirebaseArray after that. return $firebase(ref).$asArray(); Remove that return statement. That is causing your service to return early and none of the attached methods will apply to your service. In groupService.addGroup() you are calling push, which is not a function on $asArray. You need to call .$add(). The newGroup argument is also not being passed in the controller. The $.push method is available on the base of the $firebase binding. When you using a $FirebaseArray the $add method pushes a new record into Firebase. See the docs for more info. Plunker Demo var addGroup = function (newGroup) { console.log(newGroup) groups.$add(newGroup); }; Then in your controller you can simply call: $scope.addGroup = function(newGroup){ groupsService.addGroup(newGroup); $scope.newGroup = { name: '', status: '' }; };
has comment: http://stackoverflow.com/comment/42734619
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42758736
has comment: http://stackoverflow.com/comment/42736772
has comment: http://stackoverflow.com/comment/42735654
type: Answer
has comment: http://stackoverflow.com/comment/42734843
answers question: http://stackoverflow.com/q/27115024
has comment: http://stackoverflow.com/comment/42734880
has comment: http://stackoverflow.com/comment/42734698
has comment: http://stackoverflow.com/comment/42734994
accepted answer of: http://stackoverflow.com/q/27115024
score: 5

http://stackoverflow.com/a/27003787
type: Answer
has body: setTimeout(function(){}, 0) executes the function in the next tick. And your resolve: redirect is not called until you do otherwise. So while you're in the current loop, you tell ui-router: $go('/general') - so now it needs to go to general. But it will not do that right away, because it has a resolve()! First it tries to resolve the redirect object, then it will execute its' $go('/general'); So you have some changes stacked up for the digest cycle: - create the resolve object (maybe you return a promise there, maybe a value, maybe undefined, does not matter) - $state.go('/board') - $state.go('/general') And (assumption here), angular will see that it changes in the diggest cycle and it'll see that even if you call the resolve, it is not the last URL to be put and it gets overridden. However, when you put the setTimeout() in play, your go('board') gets called after the digest loop, so it will execute. On a side note, you might be better of using $timeout instead of setTimeout there.
score: 4
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/27003357

http://stackoverflow.com/comment/42567021
score: 0
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource
comment on: http://stackoverflow.com/q/27020282

http://stackoverflow.com/a/27037692
downvote count: 0
upvote count: 3
answers question: http://stackoverflow.com/q/27037423
has body: try this: format: function (x) { return (x.getMonth() + 1); } this section change to format: function(x) { var month = ["jan", "feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]; return (month[x.getMonth()]); } full code here: var chart = c3.generate({ bindto: '#chart', data: { x: 'x', columns: [ ['x', '2013-01-01', '2013-02-01', '2013-03-01', '2013-04-01', '2013-05-01', '2013-06-01', '2013-07-01', '2013-08-01', '2013-09-01', '2013-10-01', '2013-11-01', '2013-12-01'], ['2014', 130, 120, 150, 140, 160, 150, 130, 120, 150, 140, 160, 150] ], type: 'bar' }, axis: { x: { type: 'timeseries', tick: { format: function(x) { var month = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]; return (month[x.getMonth()]); }, fit: false } } } }); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"&gt;&lt;/script&gt; &lt;script src="http://gopeter.de/misc/c3/c3.js"&gt;&lt;/script&gt; &lt;div id="chart"&gt;&lt;/div&gt;
type: Answer
score: 3

http://stackoverflow.com/q/27005242
tagged with: jquery
favorite count: 0
has body: I have hidden checkbox and I can't reach JS code which allows me to do checkbox checkable. How can I do it? I tryied some JS from stackoverflow, but it didn't work. Here is my code http://fiddle.jshell.net/ta7w7bb8/ CSS: .obalform label.checkbox{ font-size:18px; color:#2d2f36; width:478px; margin:auto; text-align: left; display:inline-block; float:none; cursor:pointer; } .checkbox::before{ content:""; width:25px; height:25px; background:url(http://i.imgbox.com/dMtoesFn.png) 0 0 no-repeat; float:left; cursor:pointer; margin-top: 14px; margin-right: 15px; } .checkbox.checked::before{ content:""; width:25px; height:25px; background:url(http://i.imgbox.com/fpOcnxmf.png) 0 0 no-repeat; float:left; cursor:pointer; margin-top: 14px; margin-right: 15px; } .checkbox:hover::before{ content:""; width:25px; height:25px; background:url(http://i.imgbox.com/fpOcnxmf.png) 0 0 no-repeat; float:left; cursor:pointer; margin-top: 14px; margin-right: 15px; } input[type=checkbox]{display:none;} HTML: souhlas se zasíláním slevových kupónů,akcí a novinek And I tryied solution from this topic -> HTML checkbox onclick called in Javascript
has answer: http://stackoverflow.com/a/27006043
score: -3
has comment: http://stackoverflow.com/comment/42539675
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27005725
accepted answer: http://stackoverflow.com/a/27005725
downvote count: 3
has title: Make checkbox checkable
has answer: http://stackoverflow.com/a/27005458
type: Question
possible better answer: http://stackoverflow.com/a/27006043
tagged with: javascript
linked to: http://stackoverflow.com/q/3197702
answer count: 3
upvote count: 0

http://stackoverflow.com/comment/43157281
comment on: http://stackoverflow.com/a/27351436
type: Comment
score: 1
has text: @SakshiSingla you are welcome, this is a really interesting problem to think about, thank you. I've also added some notes about `jasmine-matchers` - hope I haven't made things more complicated. I guess, in short, I would say here "depends on the implementation complexity and the time you can possibly save" - if it really saves you time and solves the non-trivial problem that is already solved - then it make sense to reuse. Otherwise, like in this case, I think there is no point, too easy to do it with the built-in functionality.
type: AnswerComment

http://stackoverflow.com/a/27046922
has comment: http://stackoverflow.com/comment/42613649
has comment: http://stackoverflow.com/comment/42613325
score: 0
has body: http://www.the-art-of-web.com/javascript/remove-anchor-links/ Visit that site. Scroll to the bottom and use test the anchors. It's doing what you want. "The following code will parse your HTML page and override the function of any links that target anchor points on the same page. The link function will be replaced with a call to the scrollIntoView method of the target element: document.addEventListener("DOMContentLoaded", function() { var links = document.getElementsByTagName("A"); for(var i=0; i &lt; links.length; i++) { if(!links[i].hash) continue; if(links[i].origin + links[i].pathname != self.location.href) continue; (function(anchorPoint) { links[i].addEventListener("click", function(e) { anchorPoint.scrollIntoView(true); e.preventDefault(); }, false); })(document.getElementById(links[i].hash.replace(/#/, ""))); } }, false);
has comment: http://stackoverflow.com/comment/42613800
type: Answer
answers question: http://stackoverflow.com/q/27046851

http://stackoverflow.com/q/27006099
has answer: http://stackoverflow.com/a/27009742
has body: I want to change my models in a different way. This is how it's now: App.Invoice = DS.Model.extend({ title : DS.attr('string'), quantity : DS.attr('string'), total : DS.attr('string') }); App.Invoice.FIXTURES = [ { id: 1, title: 'Invoice', quantity: null, total: null } ]; In my template this is how i show them {{input value=title}} {{input value=quantity}} and Title: {{title}} Quantity:{{quantity}} You can see here working I want now give a different structure App.Invoice = DS.Model.extend({ title : DS.attr('string'), transactions : DS.hasMany('transaction') }); App.Transaction = DS.Model.extend({ quantity: DS.attr('string'), total: DS.attr('string'), invoice: DS.belongTo('invoice') }); App.Invoice.FIXTURES = [ { id: 1, title: 'Invoice' } ]; App.Transaction.FIXTURES = [ { id:1, quantity: '100', } ]; Question is how can i show them now in my template? Here is how i am trying with no success
answer count: 1
tagged with: javascript
tagged with: model
tagged with: ember.js
has title: Model Fixtures ember loaded in templates
accepted answer: http://stackoverflow.com/a/27009742
tagged with: data-binding
score: 0
type: AnsweredQuestion
tagged with: jsfiddle
type: Question

http://stackoverflow.com/q/27111218
tagged with: ajax
has comment: http://stackoverflow.com/comment/42725332
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42725734
has comment: http://stackoverflow.com/comment/42725426
favorite count: 0
has comment: http://stackoverflow.com/comment/42726729
tagged with: css
has comment: http://stackoverflow.com/comment/42725372
has title: How to re-enable links in HTML after they've been disabled?
has body: I am using a function I found googling around to disable all the links in a DIV. It works fine, and I fully understand what it's doing. This is it: function disableLinksByElement(el) { if (document.getElementById && document.getElementsByTagName) { if (typeof(el) == 'string') { el = document.getElementById(el); } var anchors = el.getElementsByTagName('a'); for (var i=0, end=anchors.length; i<end; i++) { anchors[i].onclick = function() { return false; }; } } } Unfortunately, in order to enable those links AGAIN, it's not enough to set all the "onclick" to return true, because - this is my guess - most of my links are calling JS functions, and they are not simple www links. To summarize, this is what I am trying to do: I am using Ajax calls that, when done, fill a particular DIV with some updated HTML code. In the meanwhile, I dim the DIV to 50% (opacity, IE8+ safe) and disable the links. When the Ajax calls return, they un-dim the DIV and (TRY TO, WITH NO SUCCESS) re-enable the links. Be aware that the Ajax calls are truly generating "new" HTML code in the DIV, so those links should be brand new - and not blocked, but they are... SAMPLE OF LINKS THAT GET DISABLED BUT NOT RE-ENABLED IN THE DIV THESE ARE PHP-GENERATED FROM SCRATCH EACH TIME Do something DISCLAIMER: I am fully aware that using jQuery it would be easier, and I am fully aware that using a client-side debugger any user could still "call" those links while the functions are executed. All the safety-checks are done on the server side, so do not worry. This is just to try to block impatient users.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42725684
upvote count: 0
has answer: http://stackoverflow.com/a/27301146
accepted answer: http://stackoverflow.com/a/27301146
has comment: http://stackoverflow.com/comment/42725405
has answer: http://stackoverflow.com/a/27111891
type: Question
answer count: 2
score: -2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27111891

http://stackoverflow.com/comment/42724600
comment on: http://stackoverflow.com/a/27110828
type: AnswerComment
has text: his html doesnt have theDate
score: 0
type: Comment

http://stackoverflow.com/comment/42757276
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27118270
has text: You're going about this wrong. See nemesv's comment to your original question.

http://stackoverflow.com/comment/42686743
has text: I see. As far as I can tell the SCTP implementation is definitely able to control flow, but it is only applied to the browser kernel. If the browser kernel is not fast enough to read, than yes. But the browser HAS to keep reading, since every datachannel connected to the same host is multiplexed by a single SCTP connection. So the browser can not tell for which data channel the next packet is dedicated.
type: Comment
comment on: http://stackoverflow.com/a/27089173
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42769196
score: 0
comment on: http://stackoverflow.com/q/27135396
type: QuestionComment
type: Comment
has text: @Origineil, I've seen that page and I'm having a hard time understanding it. Thanks though.

http://stackoverflow.com/q/27054754
possible better answer: http://stackoverflow.com/a/27057029
answer count: 8
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42626454
has comment: http://stackoverflow.com/comment/42626426
has answer: http://stackoverflow.com/a/27055044
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27057278
has answer: http://stackoverflow.com/a/27055150
has comment: http://stackoverflow.com/comment/42626106
favorite count: 0
has answer: http://stackoverflow.com/a/27057029
has answer: http://stackoverflow.com/a/27223840
has body: I am doing Add, Update and Delete in Php. Everything is working fine but My Update query is not working. Can I know, where i am going wrong in Update query? Here is my update.php file code.. <?php include('connection.php'); $ID = $_REQUEST['Student_Id']; $result = mysql_query("select* from tblstudent where Student_Id='".$ID."'"); while($oldvalue= mysql_fetch_array($result)) { $oldname=$oldvalue['Student_Name']; $oldgender=$oldvalue['Gender']; $olddob=$oldvalue['DOB']; $oldaddress=$oldvalue['Address']; $oldmobileno=$oldvalue['Phone']; $olddivision=$oldvalue['Division']; $oldclass=$oldvalue['Class']; $oldemail=$oldvalue['Email_Id']; } if(isset ($_POST['submit'])) { $update = $_POST['submit']; if($update) { $newname=$_POST['Student_Name']; $newgender=$_POST['Gender']; $newdob=$_POST['DOB']; $newaddress=$_POST['Address']; $newmobileno=$_POST['Phone']; $newdivision=$_POST['Division']; $newclass=$_POST['Class']; $newemail=$_POST['Email_Id']; /* UPDATE QUERY */ mysql_query("UPDATE tblstuent SET Student_Name='$newname', Gender='$newgender', DOB='$newdob', Address='$newaddress', Phone='$newmobileno', Division='$newdivision', Class='$newclass', Email_Id='$newemail' WHERE id='$ID'"); header('location:index.php'); } } ?> Personal Information Student Name : <input type="text" name="newstudentname" id="studentnameId" value="<?php echo $oldname ?>" placeholder="Enter Name" size="30px" /> Gender : <input type="radio" name="type" value="Male" <?php echo ($oldgender == 'Male') ? 'checked' : ''; ?> /> Male <input type="radio" name="type" value="Female" <?php echo ($oldgender == 'Female') ? 'checked' : ''; ?>/> Female Date of Birth : <input type="text" name="dob" id="dobId" value="<?php echo $olddob ?>" placeholder="Enter DOB format Year-Month-DaY" size="30px" /> Address : <?php echo $oldaddress ?> Parent's Mobile No : <input type="text" name="mobileno" id="mobilenoId" value="<?php echo $oldmobileno ?>" placeholder="Enter Parent's Mobile No" size="30px" /> Divison : Select Division <op…
accepted answer: http://stackoverflow.com/a/27223840
has answer: http://stackoverflow.com/a/27055089
tagged with: php
has answer: http://stackoverflow.com/a/27054968
type: AnsweredQuestion
score: 2
tagged with: mysql
has title: Update query update not work
has answer: http://stackoverflow.com/a/27054979
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42626063

http://stackoverflow.com/q/26996220
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26996348
has title: Why not run?(Capitalize the first letter of every word)
has answer: http://stackoverflow.com/a/29146731
has answer: http://stackoverflow.com/a/26996283
has comment: http://stackoverflow.com/comment/42523096
linked to: http://stackoverflow.com/q/1026069
score: 0
type: Question
has comment: http://stackoverflow.com/comment/42523175
tagged with: javascript
answer count: 3
favorite count: 0
has body: What is the problem with this code? I want Capitalize the first letter of every word function capitalizeEachWord(str) { var words = str.split(" "); var arr = Array(); for (i in words) { temp = words[i].toLowerCase(); temp = temp.charAt(0).toUpperCase() + temp.substring(1); arr.push(temp); } return arr.join(" "); var first=document.getElementById(textbox1).value; document.getElementById("resualt").innerHTML=arr; }
upvote count: 2

http://stackoverflow.com/comment/42652058
comment on: http://stackoverflow.com/q/27069528
score: 0
type: Comment
type: QuestionComment
has text: Sorry I was comparing my RegEx on a wrong column...doh...It is working (somewhat, I just need to fix up a couple of the expressions)

http://stackoverflow.com/q/27126952
has body: I have a bit of javascript that I am trying to untangle, it's on a PHP form to calculate mortgage repayments, but clicking the calculate button does nothing. Looking at Chrome Console I get the message Uncaught TypeError: Undefined is not a function" on line 10($("#form_7") to 19 of the following code. &lt;script type="text/javascript"&gt; $(document).ready(function() { $("a.ActiveButton").bind({ mousedown:function(){ if ($(this).attr('disabled') === undefined ) $(this).addClass('Activated'); }, mouseleave:function(){ if ($(this).attr('disabled') === undefined ) $(this).removeClass('Activated'); }, mouseup:function(){ if ($(this).attr('disabled') === undefined ) $(this).removeClass('Activated'); } }); $("#form_7").validate({ onkeyup: false, showErrors: function(errorMap, errorList) { if (errorList.length) alert(errorList[0].message); }, onclick: false, rules: { 'Property_Price': { number: true } , 'Deposit': { number: true } , 'Duration': { number: true } , 'InterestRate': { number: true } }, onfocusout: false, messages: { 'Property_Price': { number: "Please enter the property purchase price." } , 'Deposit': { number: "Please enter your deposit amount or 0 if there is no deposit." } , 'Duration': { number: "Please enter the duration of the mortgage." } , 'InterestRate': { number: "Please enter the mortgage interest rate." } } }); $('#btn_4').click( function(){validate_form_7( form_7 )}); }); &lt;/script&gt; Does anyone know what is causing this error and how it can resolved?
type: Question
has comment: http://stackoverflow.com/comment/42753872
has comment: http://stackoverflow.com/comment/42753595
tagged with: javascript
has comment: http://stackoverflow.com/comment/42753603
tagged with: jquery
has comment: http://stackoverflow.com/comment/42753621
score: 0
answer count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42753502
tagged with: php
has answer: http://stackoverflow.com/a/27127111
has comment: http://stackoverflow.com/comment/42753409
has answer: http://stackoverflow.com/a/27127182
has title: Javascript: Undefined is not a function error

http://stackoverflow.com/q/27079986
possible better answer: http://stackoverflow.com/a/27080150
has answer: http://stackoverflow.com/a/27080150
accepted answer: http://stackoverflow.com/a/27080082
answer count: 3
has answer: http://stackoverflow.com/a/27080092
has comment: http://stackoverflow.com/comment/42669842
has body: I am a newbie to JS RegExp. I got confused by the following RegExp matches. var x = "red apple" var y = x.match(/red|green/i) Now y is ["red"]. However if I add a pair of parentheses around red and green and make y to be var y = x.match(/(red|green)/i) Now, y would become ["red", "red"]. I have searched online https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/RegExp and found that it's something called capturing parentheses. It says For example, /(foo)/ matches and remembers 'foo' in "foo bar." The matched substring can be recalled from the resulting array's elements [1], ..., [n] or from the predefined RegExp object's properties $1, ..., $9. But I don't understand what does it mean by recalled from the resulting array's element or from predefined RegExp object's properties? Can anyone please explain ? Thank you!
type: AnsweredQuestion
tagged with: javascript
has title: JS RegExp capturing parentheses
type: Question
has answer: http://stackoverflow.com/a/27080082
tagged with: regex
score: 0

http://stackoverflow.com/comment/42773106
type: AnswerComment
type: Comment
has text: thank you for this, but really not looking for a bunch of answers with approaches for querying individual types of images that can appear on the page. I'm capable of doing, (or looking up) all these things individually. Good answers would have a catch-all approach, explain that such an approach is not possible, or possibly list all the different types of images that can be found and explain that those need to be combined.
comment on: http://stackoverflow.com/a/27137468
score: 0

http://stackoverflow.com/comment/42643221
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27064703
has text: On a related (more helpful) note, you can [```find```](http://api.jquery.com/find/) using the built in JQuery method to traverse the DOM.

http://stackoverflow.com/comment/130148106
type: Comment
has text: works in BS4 too, but parameter is `data-dismiss="modal"`
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/71445642

http://stackoverflow.com/a/27113132
answers question: http://stackoverflow.com/q/27112637
accepted answer of: http://stackoverflow.com/q/27112637
type: Answer
upvote count: 1
score: 1
has body: The problem is that setting a value on an input element using .val doesn't fire the change event: Why does the jquery change event not trigger when I set the value of a select using val()? To manually fire the event call .change explicitly after setting the .val.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27004795
accepted answer: http://stackoverflow.com/a/27004871
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I have a small javascript 'widget' of sorts that grows dynamically as users add items to it. The idea is that it has a top, middle, bottom, where the middle part is what grows. +---------------+ | TOP | +---------------+ | | | | | | +---------------+ | BOTTOM | +---------------+ The top is a simple styled div with a handful of items in it: X Title The body and bottom sections are more or less the same. My question is: Where should these be stored..? Right now, I'm keeping them in the body of the HTML document. Because I'm doing that, I either have to have CSS classes to set them to display: none, or I have to hide them on page load via javascript. Point being, it doesn't seem like the best solution. I tried storing the divs as variables directly in my javascript, but with quote escaping, it quickly got really tricky... So I don't think that's the right way either. What is the correct way to store HTML that you're going to use with javascript?
type: Question
has title: Where do you store HTML that's going to be dynamically assembled via javascript?
has comment: http://stackoverflow.com/comment/42539597
has answer: http://stackoverflow.com/a/27004871
tagged with: javascript
has comment: http://stackoverflow.com/comment/42538974
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42538884
favorite count: 0

http://stackoverflow.com/a/27074297
has comment: http://stackoverflow.com/comment/42660308
has comment: http://stackoverflow.com/comment/42660581
has comment: http://stackoverflow.com/comment/42660259
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27074268
has comment: http://stackoverflow.com/comment/42660603
has body: Easiest way might be to set it to display:none in your css, so it is hidden until your click event ( $('.comment').click(function(e){... ) is fired. CSS: .slidingDiv2 { display:none; }
downvote count: 0
has comment: http://stackoverflow.com/comment/42660482
has comment: http://stackoverflow.com/comment/42660319
has comment: http://stackoverflow.com/comment/42660776
has comment: http://stackoverflow.com/comment/42660290
has comment: http://stackoverflow.com/comment/42660396
type: Answer

http://stackoverflow.com/comment/42591329
type: QuestionComment
type: Comment
has text: What's wrong with `pi.toFixed(2)`?
score: 0
comment on: http://stackoverflow.com/q/27035308

http://stackoverflow.com/comment/42720363
comment on: http://stackoverflow.com/a/27106624
type: Comment
score: 0
type: AnswerComment
has text: i am not sure if i explained the problem well enough. First one clicks on the army picture (gets black), then clicks again on the army picture (gets white), and then clicks on the van (gets black). If you do that, the army picture becomes black as well. And that's the problem.

http://stackoverflow.com/comment/42622511
comment on: http://stackoverflow.com/a/27052709
type: AnswerComment
score: 0
type: Comment
has text: what i really meant was the evaluation of that javascript blocking and that, say, something like an ongoing animation would hang while the main thread evaluated the script.

http://stackoverflow.com/a/27074403
has comment: http://stackoverflow.com/comment/42660420
type: Answer
has comment: http://stackoverflow.com/comment/42660476
has comment: http://stackoverflow.com/comment/42660579
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42660453
answers question: http://stackoverflow.com/q/27074330
has body: It's to help determine what happens when you divide by it. If you divide by +0, you get +Infinity. If you divide by -0, you get -Infinity. (For nonzero numerators, of course).
upvote count: 2

http://stackoverflow.com/comment/42652098
has text: Why would one machine have '/dev/' act properly but the other not? At least what I have seen, the issue is machine/configuration based.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27068843
type: Comment

http://stackoverflow.com/q/27099506
tagged with: javascript
tagged with: facebook-payments
has answer: http://stackoverflow.com/a/27100328
answer count: 1
has title: Running javascript code after modeldata is valid
favorite count: 0
tagged with: facebook
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I'm working on a facebook app and I have a form that the user fills out and when it is submitted, I want to then charge them via facebook canvas payments. Of course this means that the modeldata needs to be valid first but I was always under the impression that mvc code was only run after javascript code called it. How would I call this javascript command in my mvc method below? function buy() { var obj = { method: 'pay', action: 'purchaseitem', product: 'https://mywebsite.net/product.html' }; FB.ui(obj, function(data) { console.log(data); }); } **document.getElementById('submitbtn').onclick = function() {buy()};** // trying to only call this after model data is valid }; [HttpPost] public ActionResult Contact(Project.Models.Order c) { decimal price = 0; if (ModelState.IsValid) { try { // call javascript code here to open the window } catch (Exception) { return View("Error"); } } return View("Index"); } public async Task<ActionResult> Index(FacebookContext context) { if (ModelState.IsValid) { //var user = await context.Client.GetCurrentUserAsync<MyAppUser>(); //var client = new FacebookClient(context.AccessToken); //dynamic me = client.Get("me"); //string name = me.Name; loadDropDownLists(); return View(); } return View("Error"); } Index View @using HomeworkHelpers.Models @using Microsoft.AspNet.Facebook.Models @model HomeworkHelpers.Models.Order @{ ViewBag.Title = "Home Page"; } @section PageScripts{ @if (Model.Buy) { } } @using (Html.BeginForm("Contact", "Home", FormMethod.Post)) { @Html.ValidationSummary(true) @Html.LabelFor(model => model.Name, "Name:") @Html.EditorFor(model => model.Name) @Html.ValidationMessageFor(model => model.Name) @Html.LabelFor(model => model.Email, "Email:") @Html.EditorFor(model => model.Email, new { id = "email" }) @Html.ValidationMessageFor(model => model.Email) @Html.LabelFor(model => model.PhoneNumber, "Phone Number:") @Html.EditorFor(model => model.PhoneNumber, new { id = "phoneNumber" }) @Html.ValidationMessageFor(model => model.Ph…
type: Question
accepted answer: http://stackoverflow.com/a/27100328
tagged with: c#
tagged with: asp.net-mvc
downvote count: 0

http://stackoverflow.com/comment/42770345
score: 0
comment on: http://stackoverflow.com/q/27131099
type: QuestionComment
type: Comment
has text: You might want to look into this: http://stackoverflow.com/questions/24889100/ios-8-removed-minimal-ui-viewport-property-are-there-other-soft-fullscreen

http://stackoverflow.com/q/27103791
has comment: http://stackoverflow.com/comment/42711197
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27104084
has comment: http://stackoverflow.com/comment/42711563
accepted answer: http://stackoverflow.com/a/27104101
has title: javascript regex pattern for 3 alphanumeric and 3 full stops
possible better answer: http://stackoverflow.com/a/27104084
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I'm new to regex and trying to write a pattern for customers to add their own custom details to a product. The idea is that a customer is allowed to have up to 3 alphanumeric characters and 3 full stops/periods, for example these would be valid entries: abc ab a.b.c a..bc ... a.b. etc whereas these would be invalid: abcd (too many characters) a.... (too many .) abcd. (too many alphanumeric) I've got the following so far, but it doesn't detect when letters and . are staggered: eg. 'a.b.c' Here's where I'm at: $(document).on('keyup', 'input.custom', function() { currentText = $(this).val(); reg = /^([a-zA-Z]{0,3})|([.]{0,3})$/igm; if (currentText.match(reg)) { console.log('match'); } else { console.log('no match'); } }); It feels like I'm close, but missing something very important!
tagged with: regex
score: 1
has answer: http://stackoverflow.com/a/27104101
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/42594947
comment on: http://stackoverflow.com/q/27037201
score: 0
type: Comment
type: QuestionComment
has text: the list with B, C is showing up because according to your script atleast one of them is enough

http://stackoverflow.com/comment/42609215
score: 0
has text: http://stackoverflow.com/questions/14220321/how-to-return-the-response-from-an-ajax-call
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27045214

http://stackoverflow.com/comment/42624242
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27053506
has text: @ArturoTorresSánchez -- That doesn't matter, JavaScript doesn't have associative arrays - there are objects - and objects are unsorted. OP probably wants an array of objects: `[{1:25}, ...]`
type: Comment

http://stackoverflow.com/comment/42642096
score: 0
comment on: http://stackoverflow.com/a/27063657
has text: It varies. If the script is set to "execute as me" (That is, you, the developer), or does not require authorization it won't return anything, otherwise it will return the username of the user running the script.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27001845
has comment: http://stackoverflow.com/comment/42535296
answers question: http://stackoverflow.com/q/26999781
accepted answer of: http://stackoverflow.com/q/26999781
has body: First of all you should attach views to the DOM. Errors occur, because child views rendered before they are attached to the DOM. You can override some methods to solve the problem. That will do the trick: EmailView = Marionette.CompositeView.extend({ className: function () { return this.model.isThread() ? 'thread' : null; }, initialize: function (options) { this.collection = new Backbone.Collection(this.model.get('threads')); }, renderItemView: function(view, index) { this.$el.parent().append(view.el); view.render(); } }); InboxView = Marionette.CompositeView.extend({ itemView: EmailView, ui: { $tbody: 'tbody' }, renderItemView: function (view, index) { this.ui.$tbody.append(view.el); view.render(); } }); JSFiddle: http://jsfiddle.net/d1krtxtr/
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/42588151
comment on: http://stackoverflow.com/a/27032256
type: Comment
has text: dude, after changes (insert, delete, upload), i want to reload page. thats why the changes are reflected in the page. so i am using (window.location.href= "?p=user&act=deleted"). so finally how to i pass variable in post method using window.location function.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27094378
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has body: I want to load a menu: $("#Menu").load("js/menu/menu.html?active=menu_home"); But within the menu.html page, I want to set the active page. However I want to retrieve the JQuery parameters not the current browser parameters. My url must remain "example.com" and the loaded jquery page must set the active element without requiring the web browser url to change.
has comment: http://stackoverflow.com/comment/42695911
has title: How to retrieve page parameters from jquery load not url parameters
type: Question
has comment: http://stackoverflow.com/comment/42696864
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27136987
score: -2
tagged with: javascript
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: How to make Javascript NaN and ParseInt to equal Zero
downvote count: 2
has body: I am trying to set my empty and NaN values to a quantity of 0, as concisely as possible, and when I looked around the site, this is the closest I got to reaching that point, but it didn't work? Can anyone tell me how to fix this and whether it's using ParseInt or this equation? Thanks Here is a JSFiddle: http://jsfiddle.net/446nb2zj/ Project Sample Order Form Quantity item Unit Price Totals Apples $5.49 Pears $7.49 Grapes $6.49 Subtotal Tax@6% Total
has answer: http://stackoverflow.com/a/27137156
type: Question
upvote count: 0

http://stackoverflow.com/a/27112750
has body: Because you only tell what does not work and what works incorrectly it's hard to figure out what the desired behaviour should be. Try code below: $(".first").click(function(){ if ($(".first:checked").length &gt; 0) { $("#checkAll").("data-type","uncheck").('Deselect All'); } else { $("#checkAll").("data-type","check").('Select All'); } }); Now when you check one or more checkboxes the type and text will change to 'Deselect all' When there are no checked boxes than the button says 'Select All'
has comment: http://stackoverflow.com/comment/42732348
has comment: http://stackoverflow.com/comment/42731735
answers question: http://stackoverflow.com/q/27112527
has comment: http://stackoverflow.com/comment/42730825
score: 0
type: Answer

http://stackoverflow.com/q/27148032
has comment: http://stackoverflow.com/comment/42823112
has comment: http://stackoverflow.com/comment/42798365
type: Question
has comment: http://stackoverflow.com/comment/42796127
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42794755
answer count: 1
tagged with: bar-chart
has comment: http://stackoverflow.com/comment/42791489
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42791389
has answer: http://stackoverflow.com/a/28736360
has body: bar.append("rect") .attr("width", x) .attr("height", barHeight - 1); bar.append("text") .attr("x", function(d) { return x(d) - 3; }) .attr("y", barHeight / 2) .attr("dy", ".35em") .text(function(d) { return d; }); Hi, I am new to charting with D3. Now I am trying out many tutorials from d3.com. Now I get the 2 errors displayed in the title when trying to make a svg bar chart. Is there anyone who could help me?
has title: Error: Invalid value for <rect> attribute width="NaN" 6d3.v3.min.js:1 Error: Invalid value for <text> attribute x="NaN"
has comment: http://stackoverflow.com/comment/42794410
score: 1
has comment: http://stackoverflow.com/comment/42791156
upvote count: 1

http://stackoverflow.com/comment/42645519
type: QuestionComment
type: Comment
score: 1
has text: If you want to solve the issue, then try creating a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) to help us help you.
comment on: http://stackoverflow.com/q/27063558

http://stackoverflow.com/q/27064929
has title: Framework for html5/canvas game based on hexagonal grid
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27070112
score: 2
tagged with: melonjs
upvote count: 2
type: Question
type: AnsweredQuestion
tagged with: javascript
tagged with: canvas
answer count: 1
downvote count: 0
tagged with: tiled
favorite count: 0
has answer: http://stackoverflow.com/a/27070112
has body: I am developing html5 game based on hexagonal grid. After some investigation I have used : MelonJS + Tiled + this tricky thing. Everything seems good in this combination, until I started to think about dynamic showing some hexagons, that my player will be able to go. There are few ideas that comes to mind: Calculate coordinates and draw on canvas skipping melonjs, but it's bad idea from architecture point. Adding custom property for each hexagon texture object, but it's too much manual work. Adding some facade for melonjs in order to work with it or maybe it's already done? So my question is: What's the best way to solve this problem in scope of those technologies or maybe should I use another tool?

http://stackoverflow.com/comment/42719710
type: Comment
has text: Instead of a redirect you could just copy the find blueprint into findone custom blueprint folder (with the code above) is the simplest solution and you would get no redirects.
type: AnswerComment
comment on: http://stackoverflow.com/a/27082407
score: 0

http://stackoverflow.com/q/27081898
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: Why is my sticky bar unstable?
has body: I am learning how to make a sticky bar using CSS and jQuery. The code is a little bit dirty, beacuse in order to make the sticky bar work, I need a long page. You can see the code here. To replay the issue, you need to do what I say. 1) Open the page in the newest Firefox or Chrome. 2) Drag the scrollbar of your browser directly to the end of the page(Don't stop in the middle). You will see the sticky bar slide down, then slide up, finally slide down. 3) Drag the scrollbar whatever you want, and issue just disappears. 4) Then refresh the page, do the same thing in step 2, you will see the issue again That's really not the sticky bar I want. I don't want the thing in step 2 appear.
type: Question
has answer: http://stackoverflow.com/a/27083076
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27083076
score: 0

http://stackoverflow.com/comment/42593050
type: Comment
type: QuestionComment
has text: have a look at https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.clearTimeout
comment on: http://stackoverflow.com/q/27036286
score: 0

http://stackoverflow.com/q/27150534
has title: How to hide tooltip title in google geocharts (and show other info in the tooltip)
type: Question
upvote count: 2
answer count: 2
tagged with: google-maps
tagged with: google-visualization
has answer: http://stackoverflow.com/a/27150535
tagged with: tooltip
tagged with: javascript
favorite count: 0
has body: Problem: if you enable the tooltips in google geocharts you cannot change the tooltip title, it's the first column you pass to the google chart draw method.
has answer: http://stackoverflow.com/a/28454110
tagged with: google-api
type: UnansweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/a/27061037
downvote count: 0
has body: One way to do what you're asking is to split the input string into tokens, then check each one to see if it contains the desired substring. To eliminate duplicates, store the words in an object and only put a word into the result list if you're seeing it for the first time. function findUniqueWordsWithSubstring(text, sub) { var words = text.split(' '), resultHash = {}, result = []; for (var i = 0; i &lt; words.length; ++i) { var word = words[i]; if (word.indexOf(sub) == -1) { continue; } if (resultHash[word] === undefined) { resultHash[word] = true; result.push(word); } } return result; } var input = 'put some putty on the computer output', words = findUniqueWordsWithSubstring(input, 'put'); alert(words.join(', '));
answers question: http://stackoverflow.com/q/27060811
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/42782088
score: 0
comment on: http://stackoverflow.com/q/27142546
type: Comment
type: QuestionComment
has text: make a hiddent field having name attribute 'hdnIpAddress' or any you like and on server side check Request.Params["hdnIpAddress"]

http://stackoverflow.com/q/26997708
upvote count: 2
type: UnansweredQuestion
answer count: 4
has title: "Uncaught ReferenceError: Template is not defined" (same for Router, Meteor, Mongo)
score: 2
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/42525936
tagged with: javascript
has comment: http://stackoverflow.com/comment/42539232
has answer: http://stackoverflow.com/a/27746424
has body: Trying to port Crowducate from Meteor 0.8 to 1.0. I ran "meteor update". Branch for Meteor 1.0 is --> here. I had update-issues, i.e. I couldn't remove the "old" iron-router for the "new" iron:router. So currently, both versions are installed (this has to change, of course). Meteor package file: # Meteor packages used by this project, one per line. # # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. # Packages by Meteor standard-app-packages preserve-inputs audit-argument-checks spiderable less coffeescript accounts-password accounts-facebook accounts-google accounts-ui # Packages by community minimongoid iron-router iron:router kaptron:minimongoid # Packages by Manuel Schoebel Running meteor: Gives the following error: In the end, I also get the following error: Exception in defer callback: TypeError: Cannot read property 'insert' of undefined at Utils.extend.autoRender (http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1636:17) at http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1465:16 at _.extend.withValue (http://localhost:3000/packages/meteor.js?61916b1060b33931a21f104fbffb67c2f3d493c5:945:17) at http://localhost:3000/packages/meteor.js?61916b1060b33931a21f104fbffb67c2f3d493c5:430:45 at Object.&lt;anonymous&gt; (http://localhost:3000/packages/meteor.js?61916b1060b33931a21f104fbffb67c2f3d493c5:973:22) at onGlobalMessage (http://localhost:3000/packages/meteor.js?61916b1060b33931a21f104fbffb67c2f3d493c5:367:23) So most things are undefined. I also locally changed Meteor.Collection to Mongo.Collection. Now, both are undefined. Thanks for trying to help out, Amir Side note: Always looking for collaborators on this project. Contact me. :)
downvote count: 0
has answer: http://stackoverflow.com/a/26999364
has answer: http://stackoverflow.com/a/29629793
tagged with: meteor
favorite count: 0
has answer: http://stackoverflow.com/a/34975569
tagged with: iron-router

http://stackoverflow.com/q/27136310
has body: I'm new to ember and having some issues. I'm using a modified chart component I found elsewhere on Stack Overflow. My change was to use and ID instead of a class so that hopefully I could have more than one graph. components/high-chart.js import Ember from 'ember'; export default Ember.Component.extend({ options: null, series: null, id: null, setId: function() { if(this.get('id') === null) { this.set('id', 'chart'); } }.on('init'), updateSeries: function () { this.initializeChart(); }, initializeChart: function () { var chart = this.get('options'); chart.series = this.get('series'); Ember.$('#' + this.get('id')).highcharts(chart); }, didInsertElement: function () { this.initializeChart(); this.addObserver('series', this, this.updateSeries); this.addObserver('options', this, this.updateSeries); }, willDestroyElement: function () { this.removeObserver('series'); this.removeObserver('options'); Ember.$('#' + this.get('id')).highcharts().destroy(); } }); templates/components/high-chart.hbs Here's my template attempting to display the multiple graphs. templates/transactions/index.hbs Transactions Maximum {{high-chart options=options series=maximumSeries id='maximum-chart'}} Minimum {{high-chart options=options series=minimumSeries id='minimum-chart'}} Average {{high-chart options=options series=averageSeries id='average-chart'}} Median {{high-chart options=options series=medianSeries id='median-chart'}} I've abstracted out the creation of my datasets into a Mixin. I don't think it will be helpful to list however. The datasets are showing the data I want, but the last dataset to be rendered replaces the data on the only chart that renders. import Ember from 'ember'; import HighChartTransactionsMixin from '../../mixins/high-chart-transactions'; export default Ember.ArrayController.extend(HighChartTransactionsMixin, { maximumSeries: function() { return this.makeSeriesByTransactions(this, 'maximum'); }.property('@each', 'sortedTransactionResults.@each.runResultStartTime'), m…
has answer: http://stackoverflow.com/a/27136821
type: AnsweredQuestion
has title: Ember component being overwritten instead of repeated
type: Question
possible better answer: http://stackoverflow.com/a/27136821
tagged with: highcharts
tagged with: javascript
score: 0
answer count: 2
tagged with: ember.js
has answer: http://stackoverflow.com/a/27136442
accepted answer: http://stackoverflow.com/a/27136442

http://stackoverflow.com/a/27098459
answers question: http://stackoverflow.com/q/27098083
type: Answer
score: 0
has body: if your JSON formatted as followed: [ {page: 1}, ... ] Then you can to use console editors like awk/sed with csplit tool. Anything like this: cat 1.json arth@arth-MIT:~$ cat 1.json [ {page: 1}, {page: 2}, {page: 3}, {page: 4}, {page: 5}, {page: 6}, {page: 7}, {page: 8}, {page: 9}, {page:10}, {page:11}, {page:12}, {page:13}, {page:14}, {page:15}, {page:16}, {page:17}, {page:18}, ] arth@arth-MIT:~$ rm xx* ; SIZE=$((10+1)) ; cat 1.json | awk "ORS=NR%$SIZE?RS:\"\n], \n[\n\"" | csplit - $(($SIZE+2)) 126 100 arth@arth-MIT:~$ cat xx00 [ {page: 1}, {page: 2}, {page: 3}, {page: 4}, {page: 5}, {page: 6}, {page: 7}, {page: 8}, {page: 9}, {page:10}, ],

http://stackoverflow.com/a/27036404
type: Answer
has body: Below is a straightforward approach. I have used it many times. Assuming you have a global variable declared (say 'globalHandle) render: function (data) { if(globalHandle.newView) return globalHandle.newView; var newView = new View(); globalHandle.newView = newView; } Also, you can refer to globalHandle.newView from any part of your application to check whether it exists.
score: 0
answers question: http://stackoverflow.com/q/27035872

http://stackoverflow.com/a/27082202
type: Answer
has comment: http://stackoverflow.com/comment/42674069
answers question: http://stackoverflow.com/q/27081428
score: 0
has body: $('body').on("mouseleave", "#eventInfo, .event", function () { StartTimer(); });

http://stackoverflow.com/q/27137223
answer count: 2
tagged with: google-visualization
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27137928
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to invoke drawChart function from an external javascript file. When I compile nothing is shown in screen. I cannot identify the issue since no errors are given during debugging. Does this for loop in the js function have access to the variables of the object. I think that the error lies somewhere there. I posted the full codefor clarification. for (var i = 0; i < dataValues.length; i++) { data.addRow([dataValues[i].name, dataValues[i].number]); } Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <input type="button" onclick="drawChart('<%=getJsonObj()%>')" value="Draw Pie Chart" /> Default.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Script.Serialization; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } public string getJsonObj() { List<Item> data = new List<Item>(); data.Add(new Item("AAA", 10)); data.Add(new Item("BBB", 20)); data.Add(new Item("CCC", 30)); JavaScriptSerializer jss = new JavaScriptSerializer(); string json = jss.Serialize(data); return json; } } public class Item { public string name = ""; public int number = 0; public Item(string iName, int iNumber) { name = iName; number = iNumber; } } Test.js function drawChart(jsonObj) { var dataValues = eval(jsonObj); var data = new google.visualization.DataTable(dataValues); data.addColumn('string', 'NAME'); data.addColumn('number', 'NUMBER'); for (var i = 0; i < dataValues.length; i++) { data.addRow([dataValues[i].name, dataValues[i].number]); } var options = { 'title': 'Pie Chart Example' }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); } Can somebody test this code and identify any issues. Thanks
accepted answer: http://stackoverflow.com/a/27137958
type: AnsweredQuestion
has title: Google Pie Chart not displaying in browser
has answer: http://stackoverflow.com/a/27137958
possible better answer: http://stackoverflow.com/a/27137928
has comment: http://stackoverflow.com/comment/42772716
type: Question
tagged with: c#
tagged with: charts

http://stackoverflow.com/comment/42631778
type: QuestionComment
has text: @hon2a Please help me with this
comment on: http://stackoverflow.com/q/27056438
score: 0
type: Comment

http://stackoverflow.com/comment/42768208
type: Comment
has text: I'm new to jquery, what would be a suggestion on fixing it?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27134890

event-handling
tag name: event-handling
type: Tag
tags question: http://stackoverflow.com/q/27036086
tags question: http://stackoverflow.com/q/27129395
tags question: http://stackoverflow.com/q/27062799
tags question: http://stackoverflow.com/q/27056394
tags question: http://stackoverflow.com/q/27149155
tags question: http://stackoverflow.com/q/27025699

http://stackoverflow.com/q/27058901
type: Question
has title: Custom Facebook comment integration (JS SDK)
has answer: http://stackoverflow.com/a/27061074
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: facebook
tagged with: facebook-graph-api
has body: I have been tasked with implementing paragraph comments / annotations (like on Medium), however, the client's requirement is that all commenting is performed via Facebook's comment system, so that comments are published to peoples news feeds. Since it has to be "medium style commenting" I do not want to use the default Facebook comment injector - it's pretty ugly and does not meet the requirements. I have found this great Facebook article on how to pull comments based off an url using the JS SDK, so now all I need is the ability to post new comments via the JS SDK. I have been trying to figure out their documentation, but I must admit that it is a bit overwhelming. Is there anyone here who has experience with posting comments via the JS SDK, who can point me in the right direction?
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/42720536
comment on: http://stackoverflow.com/a/27107622
type: AnswerComment
score: 0
type: Comment
has text: @Amit, if you call a function using your code on an object it will mutate the object itself instead of return a new one. Only in primitives will your code work. This is because objects are passed by reference, and primitives are passed by value. (search javascript pass by reference vs pass by value)

http://stackoverflow.com/comment/42703812
score: 1
has text: Please refer this previous stack overflow [Question](http://stackoverflow.com/questions/4130849/convert-json-format-to-csv-format-for-ms-excel). This may be useful. Good Luck.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27099325

http://stackoverflow.com/comment/42784516
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27128990
has text: The calculations are made on div class and td class. Anyway i just need a jquery code that can do the thing row and column total and percent from total calculation. The fiddle is here: http://jsfiddle.net/h8np9qnc/ Thank you

http://stackoverflow.com/q/27142682
type: Question
has comment: http://stackoverflow.com/comment/42782359
accepted answer: http://stackoverflow.com/a/27142895
has comment: http://stackoverflow.com/comment/42782296
score: 0
has comment: http://stackoverflow.com/comment/42782226
answer count: 3
has answer: http://stackoverflow.com/a/27143004
has answer: http://stackoverflow.com/a/27142917
has comment: http://stackoverflow.com/comment/42782200
tagged with: javascript
has comment: http://stackoverflow.com/comment/42782780
has answer: http://stackoverflow.com/a/27142895
has comment: http://stackoverflow.com/comment/42782243
has body: I am trying to split a date using the following piece of JavaScript var dSplit = getDate.split("/"); var newDate = dSplit[2] + "-" + dSplit[0] + "-" + dSplit[1]; I get the following output 2014 12:00:00 AM-11-25 The output i require is 2014-11-25 12:00:00 AM Please Help.
has title: Splitting a date using javascript
possible better answer: http://stackoverflow.com/a/27142917
has comment: http://stackoverflow.com/comment/42782501
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42782666
has comment: http://stackoverflow.com/comment/42782254
has comment: http://stackoverflow.com/comment/42782233

http://stackoverflow.com/q/27151774
has answer: http://stackoverflow.com/a/37682426
upvote count: 1
linked to: http://stackoverflow.com/q/5835377
type: Question
has comment: http://stackoverflow.com/comment/42798620
tagged with: javascript
has body: Note: So the question title looks a bit similar to other questions on Stackoverflow, but its not quite same. Read on. As it is clear that I want to get the lat long using from google maps api along the route but I want to do it on the server side (may be using Ruby, PHP, NodeJS)? I can do it very well on client side using GMAPS V3 api and with v3_epoly.js and here is very good example of finding lat long and plotting some animation, which is perfect. It returns lat long along the route at a particular distance. I want to get the lat long on the server side. How do I do it? As I see there is no lib or google api available in Ruby(or any other server side lang). How do I use v3_epoly.js? So I have the solution but I want it server side as I ll be using these to serve my apps. I don't want it client side. You can get the route using google direction api. https://maps.googleapis.com/maps/api/directions/json?origin=28.700825,77.136429&amp;destination=28.461790,77.053457&amp;key=API_KEY I can provide more details if needed.
has title: Google Maps:How to get points along the route in google maps, server side?
tagged with: google-maps
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/46361139
favorite count: 0
tagged with: ruby
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42798454
tagged with: node.js
has comment: http://stackoverflow.com/comment/42799031
has comment: http://stackoverflow.com/comment/71480140
score: 1

http://stackoverflow.com/a/27124198
answers question: http://stackoverflow.com/q/27123881
has comment: http://stackoverflow.com/comment/42749873
has comment: http://stackoverflow.com/comment/42753688
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27123881
has body: I fail to see where you create a cookie for your check. It suppose to be something like this: if (!$.cookie('noPreloader')) { // show your preloader ... // and now we create 1 year cookie $.cookie('noPreloader', true, {path: '/', expire: 365}); } Please note - in my example your block suppose to be hidden on load. You show it afterwards(since you want to show it only 1st time).
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42799603

http://stackoverflow.com/comment/42674410
type: QuestionComment
type: Comment
has text: When you say slide, do you mean left to right? And if by clickable, you mean linked, you can wrap your .revealUpFull divs in tags.
score: 0
comment on: http://stackoverflow.com/q/27082528

html-table
tags question: http://stackoverflow.com/q/26998614
tags question: http://stackoverflow.com/q/27130876
tags question: http://stackoverflow.com/q/27109740
tag name: html-table
tags question: http://stackoverflow.com/q/27041156
tags question: http://stackoverflow.com/q/27134142
tags question: http://stackoverflow.com/q/27110012
tags question: http://stackoverflow.com/q/27065567
tags question: http://stackoverflow.com/q/26995208
tags question: http://stackoverflow.com/q/27120589
tags question: http://stackoverflow.com/q/27139104
tags question: http://stackoverflow.com/q/27008920
tags question: http://stackoverflow.com/q/27039817
type: Tag
tags question: http://stackoverflow.com/q/27085800
tags question: http://stackoverflow.com/q/27152351

http://stackoverflow.com/comment/42765171
type: Comment
comment on: http://stackoverflow.com/a/27132747
score: 0
type: AnswerComment
has text: For me this works pretty good: http://jsfiddle.net/KunZ4/537/ It's the fiddle to the solution above. Or did I get you wrong? Edit: just removed the alert.

http://stackoverflow.com/a/27152753
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27152631
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42800116
type: AcceptedAnswer
has body: I suppose you need something like this: var str = "Usually I buy apples for a 1.5-3 dollars.", array = []; array.push(str.match(/apple|orange/)[0] + 's'); // fruit array.push(str.match(/[\d\.]+\D+\d+/)[0].replace(/[^\.\d]+/g,"-")); // price console.log(array); // result
answers question: http://stackoverflow.com/q/27152631

http://stackoverflow.com/comment/91145592
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29290268
type: AnswerComment
has text: I am also stuck between like this problem, Could you check thid link.https://stackoverflow.com/questions/52096238/implement-header-for-the-custom-table-in-html-and-javascript?noredirect=1#comment91143776_52096238

http://stackoverflow.com/a/27101298
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42716176
has body: You should use cordova cli (command line interface) methods in order to add plugins, assuming you are using cordova/phonegap version > 3. As far as I remember, core plugins (maintained by cordova team) are also needed to be added/removed since version 3.2 or 3.4. Anyhow, you should call: cordova plugin add org.apache.cordova.device from command prompt (where your top level www folder is). See cordova documentation here for more details (scroll to bottom). Please note that, I've never used Android Studio, only Eclipse, but these should be IDE agnostic.
answers question: http://stackoverflow.com/q/27099507

twilio
tag name: twilio
tags question: http://stackoverflow.com/q/27112808
type: Tag

http://stackoverflow.com/comment/42669252
comment on: http://stackoverflow.com/a/27079628
type: Comment
score: 0
type: AnswerComment
has text: @tymeJV - ohh sorry for that, now it's all clear, thx for support.

http://stackoverflow.com/comment/42532391
type: QuestionComment
comment on: http://stackoverflow.com/q/27000562
score: 0
has text: I will work on that eventually in the actual code, it is simply there for when I get log-in and users working properly.
type: Comment

http://stackoverflow.com/comment/42601292
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27040297
has text: @foolip, np, Ahmad has pointed a workaround. We should have moved to Sencha Touch 2, version 1 is not supported anymore.

http://stackoverflow.com/comment/42645270
type: AnswerComment
comment on: http://stackoverflow.com/a/27065918
type: Comment
has text: Yes M.Page but as I already said "I don't want to add the entire function (That are more than 100 lines) into the HTML file. I asked if there is a method to call this function in the HTML because i know how to do it with functions in HTML
score: 0

http://stackoverflow.com/comment/42669217
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27079598
has text: It says Uncaught TypeError: undefined is not a functioncompare.html:92 ondragstart

http://stackoverflow.com/comment/42985416
type: Comment
comment on: http://stackoverflow.com/a/27239561
type: AnswerComment
has text: It seems like theres a bunch of extra stuff going on. In your script you are creating elements, although my elements are already in the DOM. I simply apply the image to those elements. Is there a simpler version of your code? One that on input change(image selection) gets the BLOB URL and stores it in a variable so that I can use it how I want?
score: 0

http://stackoverflow.com/a/27136842
has comment: http://stackoverflow.com/comment/42772246
type: Answer
answers question: http://stackoverflow.com/q/27136133
has comment: http://stackoverflow.com/comment/42772273
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has body: I think you should be able to combine new regexp rule with old RegExp object if you use its source property. Try this: this.stripCharsRegex = new RegExp('(?=[^£$€])' + this.stripCharsRegex.source, 'gi'); Check test snippet below. var stripCharsRegex = new RegExp('[^0123456789.-]', 'gi'); alert( 'Total: $123 test - £80&amp;dd'.replace(stripCharsRegex, '') ); // extend regexp by creating new RegExp object stripCharsRegex = new RegExp('(?=[^£$€])' + stripCharsRegex.source, 'gi'); alert( 'Total: $123 test - £80&amp;dd'.replace(stripCharsRegex, '') );
has comment: http://stackoverflow.com/comment/42772399
accepted answer of: http://stackoverflow.com/q/27136133

http://stackoverflow.com/comment/42736838
score: 0
type: AnswerComment
has text: thank you very much for this answer it worked fine for me but i will just ask one more time i have get this object {"FrozenOnIce":{"text":"FrozenOnIce","count":1},"bestbdaygift":{"text":"bestbdaygift","count":1}} I only want to get {"text":"FrozenOnIce","count":1},{"text":"bestbdaygift","count":1}} how do i do that?
type: Comment
comment on: http://stackoverflow.com/a/27117009

http://stackoverflow.com/q/27013958
has comment: http://stackoverflow.com/comment/42554489
has comment: http://stackoverflow.com/comment/42554106
duplicate of: http://stackoverflow.com/q/26970928
answer count: 0
tagged with: angularjs-controller
has body: Hey I have been trying to figure this out for a while now but my script is behaving unexpectedly. I can not understand the execution flow of the following script. My Script: $scope.getEmployeeQualifications = function () { if ($scope.displayEmpQualification) { $scope.displayEmpQualification = false; } else { $scope.loading = true; $scope.displayEmpQualification = true; $http.get('/ERPProduct/api/CEmployeeQualificationsApi/' + this.employee.cEmployeeId + '/').success(function (data) { $scope.employeeQualifications = []; for (var item = 0; item &lt; data.length; item++) { if (data[item].contId) { $http.get('/ERPProduct/api/CountriesApi/' + data[item].contId + '/').success(function (test) { data[item].contId = test.contName; }); } if (data[item].cityId) { $http.get('/ERPProduct/api/CitiesApi/' + data[item].cityId + '/').success(function (test) { alert("First Test"); data[item].cityId = test.cityName; }); } } alert("Test"); $scope.employeeQualifications = data; $scope.loading = false; }).error(function (data) { $scope.error = "An Error has occured while Saving office! " + data; $scope.loading = false; }); } }; Expected Behaviour: I expect the above script to first display the alert("First Test"); and complete the loop and when it has completed the loop it should display the alert("Test");. Actual Behaviour: The script is not behaving as it should but rather displaying the alert("Test"); and then when I press Okay then it continues to execute the loop. My Question As I have described above that I can not understand the above script behaviour. What is the execution flow of the above script? What are the reasons for that flow ? Am I making any mistakes in the above script that are causing unexpected behaviour and execution flow of the above script? Thanks.
has comment: http://stackoverflow.com/comment/42554327
type: Question
has title: Unexpected JavaScript behaviour issue with simple loop and HTTP requests
has comment: http://stackoverflow.com/comment/42554406
tagged with: javascript
score: 0
tagged with: asp.net-web-api
has comment: http://stackoverflow.com/comment/42554806
has comment: http://stackoverflow.com/comment/42554597
has comment: http://stackoverflow.com/comment/42554475
linked to: http://stackoverflow.com/q/14220321
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/27104303
has comment: http://stackoverflow.com/comment/42712542
has comment: http://stackoverflow.com/comment/42712193
favorite count: 0
has title: How is the scroll effect achieved in this webpage?
has comment: http://stackoverflow.com/comment/42712660
tagged with: css
possible better answer: http://stackoverflow.com/a/27104465
type: AnsweredQuestion
has body: I want to develop a personal website and i would like it to react/work the same as this website: http://www.beoplay.com/products/beoplayh6 The scroll not working like usual and rather transitioning between different sections? I wonder if the sections have a id that are anchored in some way and a css transition is applied when the user scrolls in a direction? If anyone knows how this is made, please share. I am looking for the section transition effects essentially. Thanks in advance Harry
score: 2
has answer: http://stackoverflow.com/a/27104465
downvote count: 0
has comment: http://stackoverflow.com/comment/42712478
has answer: http://stackoverflow.com/a/27104562
accepted answer: http://stackoverflow.com/a/27104562
has answer: http://stackoverflow.com/a/27104484
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42712051
upvote count: 2
answer count: 3
tagged with: http://stackoverflow.com/tag/html

webpage-screenshot
type: Tag
tag name: webpage-screenshot
tags question: http://stackoverflow.com/q/27139457

http://stackoverflow.com/q/27134536
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27134576
has body: The effect I am trying to achieve needs to keep the center in its place and zoom in the content while still maintaining the width and height of the div. An example: before -&gt; after [x] [X] Or if you don't mind links this site has it implemented on the homepage and its square containers I have tried using the inspect element feature, but didn't really find any javascript calls or css on it. And google also didn't give me any tutorial, guess it's hard to name this effect. Therefore, if someone could be so kind and forward me to a tutorial, function or give some tips I would greatly appreciate it. Looking forward yo your replies.
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: How to "zoom"/"scale" in div's content with css or jquery?
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27134576
type: Question

http://stackoverflow.com/comment/42610469
has text: it does not even Log `Response code: ` .. looks like there might be Exception .. how can I put that in try-catch and see what is error .. as I said .. I can successfully call `test()` individually
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27045301

http://stackoverflow.com/comment/42673357
has text: works fine for me in IE9, 10 and 11
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27081913

http://stackoverflow.com/comment/68160909
has text: Hi, after applying move, scale and rotate to the maks image. is it possible to make the rect and mask image as single object?
comment on: http://stackoverflow.com/a/27850984
type: Comment
score: 0
type: AnswerComment

kendo-combobox
tag name: kendo-combobox
type: Tag
tags question: http://stackoverflow.com/q/27012877

http://stackoverflow.com/a/30850495
has body: I have a similar need and am using this solution: var maxImageWidth = 1000, maxImageHeight = 1000; Dropzone.options.dropzonePhotographs = { paramName: "file", // The name that will be used to transfer the file maxFilesize: 2, // MB dictDefaultMessage: "Drag files or click here", acceptedFiles: ".jpeg,.jpg,.png,.gif", init: function () { this.on("success", function(file, responseText) { file.previewTemplate.setAttribute('id',responseText[0].id); }); this.on("thumbnail", function(file) { if (file.width &gt; maxImageWidth || file.height &gt; maxImageHeight) { file.rejectDimensions() } else { file.acceptDimensions(); } }); }, accept: function(file, done) { file.acceptDimensions = done; file.rejectDimensions = function() { done("Image width or height too big."); }; } }; You can find the original solution here: https://github.com/enyo/dropzone/issues/708
type: Answer
score: 8
answers question: http://stackoverflow.com/q/27110093
downvote count: 0
upvote count: 8

http://stackoverflow.com/comment/42781784
has text: Do i write the correct code for calling variable from another function?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27142408

http://stackoverflow.com/q/27109619
has comment: http://stackoverflow.com/comment/42722307
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42722189
has comment: http://stackoverflow.com/comment/42722369
score: 1
type: Question
answer count: 2
downvote count: 0
has title: jQuery .focusout() also when .keyup() occurs in Firefox 33.1
tagged with: javascript
tagged with: jquery
has body: when I release a key in an input form html field, I get in Firefox 33.1 in jQuery an keyup event and also an unwanted focusout event. I just want the keyup event when releasing the key. This is my code: What I am doing wrong? Thanks Michael
has answer: http://stackoverflow.com/a/27109718
has answer: http://stackoverflow.com/a/27109846
favorite count: 0

http://stackoverflow.com/comment/42534143
type: Comment
comment on: http://stackoverflow.com/q/27000142
has text: If you're using ajax, you probably don't want your button to actually do a form submit. You want to add an event listener and call your loadXMLDoc function from there.
score: 0
type: QuestionComment

http://stackoverflow.com/a/27001291
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27001061
has body: Edit So below simply hid the problem by making the rows not change size when the image appeared by making the image small enough. With regards to a larger image size, you'll still get the shifting. What is happening is the use of 'float: left' is causing issues: When table1 (top left) gets larger say it is actually moving the table below it (table 3) to the right and then shifting table 4 to some position a way bit further down and etc. I'd recommend, if the format you want is two tables side by side, which is what I get in the fiddle, just to add some extra divs to prevent this move (or restart without using float!) ie a 'row' div containing tables 1 &amp; 2, another containing 3 &amp; 4, and finally one with 5 &amp; 6. this way you can plonk any size image in the tables and the rest will line up neatly below (though larger images than row size will still warp the row to fit the image unless you specify overflow hidden!) Result: http://jsfiddle.net/L1b5542r/5/ http://jsfiddle.net/L1b5542r/3/ Edited so the image which appears on hover doesn't affect the size of the row and hence doesn't shift the rows down and force the tables out of alignment New CSS: td.status1 &gt; img { display: none; float:right; height: 8px; /* define suitable height otherwise will shift*/ } td.status1:hover &gt; img { display: inline-block; } td.status1:hover { background-color: #C0C0C0; padding-left: 15px; /* padded to keep text central*/ width: 85px; } td.status2 &gt; img { display: none; float:right; height: 8px; } td.status2:hover &gt; img { display: inline-block; } td.status2:hover { background-color: #C0C0C0; padding-left: 15px; width: 85px; }
score: 1
accepted answer of: http://stackoverflow.com/q/27001061
type: AcceptedAnswer

http://stackoverflow.com/q/27042924
has comment: http://stackoverflow.com/comment/42605098
tagged with: internet-explorer
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/42611692
has answer: http://stackoverflow.com/a/27043022
has comment: http://stackoverflow.com/comment/42604890
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42612716
score: 0
has title: jQuery function not working in Internet Explorer
linked to: http://stackoverflow.com/q/3988938
answer count: 1
has comment: http://stackoverflow.com/comment/42604934
duplicate of: http://stackoverflow.com/q/3988938
has body: I'm fairly new to jQuery so it is possible it's a simple syntax issue. Trying to update a select dropdowns values when another select dropdown option is picked. There is an onclick event that triggers this function. The below works great in Firefox but not in IE. Debugger does not give any error. I'm using jQuery instead of $ because I am using Wordpress. function update_sub_category() { jQuery('select[name="CATEGORY_SUB_TYPE"]').find('option').each(function(){ if(jQuery(this).attr('data_option') != jQuery('select[name="ENTRY_CATEGORY"] option:selected').val()) { jQuery(this).hide(); } if(jQuery(this).attr('data_option') == jQuery('select[name="ENTRY_CATEGORY"] option:selected').val()) { jQuery(this).show(); } }); }; Here's the HTML Entry Category Filter Option 1 Filter Option 2 Filter Option 3 Category Sub Type Option 1-1 Option 1-2 Option 2-1 Option 3-1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42604990

http://stackoverflow.com/comment/42759516
has text: Thanks for sharing so usefull knowlage!
comment on: http://stackoverflow.com/a/27130261
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26997755
score: 0
has comment: http://stackoverflow.com/comment/42525986
type: Answer
has body: You're sending in a Number which is not an object and therefor not bound by reference. Put it as a property of an object instead and pass that into the directive: $scope.obj = { x: 5 };
answers question: http://stackoverflow.com/q/26997602

http://stackoverflow.com/a/27147276
has body: try this $a = array( 0=&gt; array( 0=&gt; "ABC" ,1=&gt; "744" ) ,1=&gt; array( 0=&gt; "DEF",1=&gt; "86" ), 2=&gt; array( 0=&gt; "GHI", 1=&gt; "2" ) ); foreach ($a as $i) echo intval($i[1]);
type: Answer
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27147105
score: 0
has comment: http://stackoverflow.com/comment/116341375

http://stackoverflow.com/a/27057537
has comment: http://stackoverflow.com/comment/42641483
score: 1
has comment: http://stackoverflow.com/comment/42642810
accepted answer of: http://stackoverflow.com/q/27047124
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27047124
has body: The example you are quoting is based on the "rescaling"/"readjusting" x and y domain/ranges. In your example, you have defined an arc that does not depend on the x and y scales, thus if you change these, there's no effect. So what can you do? First you need to take out the size of the partition (as you will handle that with scales): var partition = d3.layout.partition() //.size([2 * Math.PI, radius * radius]) .value(function(d) { return 1; }); (remove it, not comment it :) ) Next, you have to use and arc that does depend on the scales, e.g. like in the example: var arc = d3.svg.arc() .startAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x))); }) .endAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx))); }) .innerRadius(function(d) { return Math.max(0, y(d.y)); }) .outerRadius(function(d) { return Math.max(0, y(d.y + d.dy)); }); As you can see, the max and min are kind of squeezing the "hidden" segments... Cross fingers, run it (I tried it with flare.json, it did work here) Note If you plan to also add reweighting when zoomed in, have a look at this nice example: http://bl.ocks.org/kerryrodden/477c1bfb081b783f80adof
upvote count: 1

http://stackoverflow.com/comment/42631993
comment on: http://stackoverflow.com/q/27058489
type: QuestionComment
has text: So.. you want us to do your assignment? ;-)
score: 0
type: Comment

http://stackoverflow.com/comment/42588683
comment on: http://stackoverflow.com/a/27033277
type: Comment
has text: yes its working fine but its flashing the old innerhtml of anchor tag on page load then updating with new one how to fix it?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42647629
score: 0
type: AnswerComment
has text: Could you provide a bit more context about why this answers the question, and what the code does? That'll help this person and future ones as well...
type: Comment
comment on: http://stackoverflow.com/a/27066741

http://stackoverflow.com/comment/42541736
has text: You should mention all the details from the beginning. - http://nodejs.org/docs/latest/api/url.html
comment on: http://stackoverflow.com/q/27006363
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42619249
type: Comment
comment on: http://stackoverflow.com/q/27050871
has text: Are the callbacks optional or do the callbacks have the option of accepting parameters?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42549197
score: 0
type: Comment
type: QuestionComment
has text: in both you can re-assign it. it's kind of useless, but i suppose in the second one, you can't get the methods source code pragmatically. still, that's hardly what i would call security.
comment on: http://stackoverflow.com/q/27011043

http://stackoverflow.com/comment/42567131
type: AnswerComment
type: Comment
has text: thanks a lot ! It really works! would you mind explaining how I can set my lowest and highest value ? thanks!
comment on: http://stackoverflow.com/a/27019953
score: 0

http://stackoverflow.com/comment/42734291
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27107955
type: AnswerComment
has text: I'll reword my question slightly.

http://stackoverflow.com/q/27046270
has answer: http://stackoverflow.com/a/27046359
score: -1
favorite count: 0
possible better answer: http://stackoverflow.com/a/27046318
has answer: http://stackoverflow.com/a/27046318
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27046359
downvote count: 1
type: Question
answer count: 2
has body: Let me explain you my problem using an example: var mainString = "at iteration"; var dynamicString = "at"; // coming from user input Now, I want to prepend [] to the dynamicString and replace all occurances of dynamicString in mainString with this new dynamicString. So, I do: mainString = mainString.replace(new RegExp(dynamicString,"g"), "[]" + dynamicString); My expected result is: []at iteration But I am getting: []at iter[]ation This is because there is an at inside iteration. Javascript doesnt allow to do something like: new RegExp(/^dynamicString$/,"g") // where dynamicString is a variable Is there a way that I can fix this? jsFiddle
has comment: http://stackoverflow.com/comment/42624469
upvote count: 0
has title: using Regex replace exactly the dynamic string and not if it is embedded inside another string
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42815145
has text: Thanks Rob! This is some great feedback, I have improved my code using the suggestions above and cleaned it up. There was some code that was not being used which I have now deleted. This must have been from trying many ways to get the same result. Thanks Again!
type: Comment
comment on: http://stackoverflow.com/a/27140145
score: 0
type: AnswerComment

http://stackoverflow.com/a/27024225
has comment: http://stackoverflow.com/comment/42572577
has comment: http://stackoverflow.com/comment/42572679
has comment: http://stackoverflow.com/comment/42573027
score: 0
has comment: http://stackoverflow.com/comment/42609196
answers question: http://stackoverflow.com/q/27024000
has body: Looks like you do not want a whole new user. Looks like you just want to add a post code to an existing object in your postcodes. Adding a whole new object will not allow you to just add to the existing postcode. This code allows you to use one object and add the new user to the existing postcode. function RegisterUser() { for (var i = 0; i &lt; postcodes.length; i++) { var postCode = document.getElementById("pc2").value; var passPostcode = postcodes[i].postcode; if (passPostcode === postCode) { alert("The postcode you entered is already registered"); break; } else { AddUser(passPostcode); } } } function AddUser(newUser) { var postCode2 = document.getElementById("pc2").value this.newUser = newUser; for (var i = 0; i &lt; postcodes.length; i++) { if (this.newUser.indexOf(postCode2) === -1) { var str_postcode = postcodes[i].postcode; var addedNewPostCodeToString = str_postcode + ',' + postCode2; //postcodes[i].postcode is not an array. Push will not work. You will need to concatenate the string and will need to add a delimiter postcodes[i].postcode = addedNewPostCodeToString; //delimited with comma. alert("Postcode Registered : " + postCode2 + " Smart Waste Management Scheme will be in contact regarding your step towards smart waste"); } } }
type: Answer

http://stackoverflow.com/comment/42808856
type: QuestionComment
has text: You can now enter chat let's continue the discussion there
score: 0
comment on: http://stackoverflow.com/q/27136283
type: Comment

http://stackoverflow.com/q/27100704
tagged with: datepicker
answer count: 1
has title: Reset and keep the dates as default dates in datepicker
has answer: http://stackoverflow.com/a/27100920
linked to: http://stackoverflow.com/q/9435086
type: UnansweredQuestion
has body: My HTML code From: Till: My javascript:- $('#toDateRange').datepicker({ // minDate: $( "#fromDateRange" ).datepicker( "getDate" ), changeMonth: true, changeYear:true, numberOfMonths: 1, dateFormat: "yy-mm-dd", onSelect: function( selectedDate ) { $( "#fromDateRange" ).datepicker( "option", "maxDate", selectedDate ); } }); $( "#fromDateRange").datepicker({ defaultDate: "-1m", changeMonth: true, changeYear:true, numberOfMonths: 1, dateFormat: "yy-mm-dd", onSelect: function( selectedDate ) { $( "#toDateRange" ).datepicker( "option", "minDate", selectedDate ); } }); clear dates function: function clearDates() { clear=""; $('#dateFilter').val(clear); $("#dateFilter").trigger("change"); $('#date-range').hide(); } Once I clear the active dates in the date picker should be the default one.How Do I do it?
has comment: http://stackoverflow.com/comment/42706718
type: Question
has comment: http://stackoverflow.com/comment/42705758
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42709747
score: 0

http://stackoverflow.com/q/27058367
tagged with: animated-gif
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/gif
tagged with: javascript
has title: Read Image data from url in JavaScript
type: Question
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27060694
tagged with: filereader
has body: Ok, so here is the situation, i have an animated gif's url, for example let it be http://host.com/myimage.gif. I want to convert this image to binary data without loosing gif's animation informations (which would happen if using canvas to draw and store image). Is there a possibility to do that somehow? Maybe via FileReader? This all should be done on browser JavaScript, without node.js

http://stackoverflow.com/comment/53065271
comment on: http://stackoverflow.com/a/32541878
has text: you rock! ID is the key I was looking for such a long time :) And yes, it was my mistake on `Playlist.OnClear` method name.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42697456
comment on: http://stackoverflow.com/q/27094064
type: Comment
type: QuestionComment
has text: does the other templated stuff like {{title}} work ok?
score: 0

http://stackoverflow.com/comment/42618956
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27050779
has text: Okay, that looks cool, but why is it better than the code in my question? The first part - SuperConstructor.apply - is the same thing as in my question. I don't quite understand the next bits...

http://stackoverflow.com/q/27013633
type: Question
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/27014341
tagged with: javascript
favorite count: 0
has body: I have created HTML INPUT element with type="RANGE" and with id="slider". Why cannot I access its value using getAttribute("value") method? Debugger shows that there is an attribute named "value" with some value which is not equal to the value of the element. Should not the value of range element be its attribute? var sliderValue1=document.getElementById("slider").getAttribute("value"); var sliderValue2= document.getElementById("slider").value;
tagged with: getattribute
upvote count: 2
has title: Value of HTML input range, getattribute vs value
possible better answer: http://stackoverflow.com/a/27014159
has answer: http://stackoverflow.com/a/27014341
has answer: http://stackoverflow.com/a/27014159
score: 2
type: AnsweredQuestion
tagged with: html-input
tagged with: dom

http://stackoverflow.com/q/27094908
has comment: http://stackoverflow.com/comment/42697772
has answer: http://stackoverflow.com/a/43062246
favorite count: 0
has comment: http://stackoverflow.com/comment/73453413
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30118846
upvote count: 15
linked to: http://stackoverflow.com/q/29352051
answer count: 4
has answer: http://stackoverflow.com/a/43196379
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/73256382
has title: Google maps - keep center when zooming
has comment: http://stackoverflow.com/comment/42702180
tagged with: javascript
has comment: http://stackoverflow.com/comment/46141416
score: 15
tagged with: google-maps-api-3
tagged with: google-maps
has comment: http://stackoverflow.com/comment/46121603
has answer: http://stackoverflow.com/a/43161185
has body: In Google Maps, I would like to be able to keep the center of the map on a marker on my location when I'm zooming in or out. It's something that Ingress does, it doesn't matter where you double tap (or double click) or where you pinch, the map remains centered on your marker. So it's possible... The best I came up with for now is : google.maps.event.addListener(mymap, 'zoom_changed', function() { mymap.setCenter({lat: myLoc.lat, lng: myLoc.lon}); }) But it's far from perfect, it just re-center the map after the user already zoomed... Thanks a lot ! [EDIT] absolutely nothing helps in the API ref... Or elsewhere I'm blind and missed it !

listview
tags question: http://stackoverflow.com/q/27092323
tags question: http://stackoverflow.com/q/27151701
tags question: http://stackoverflow.com/q/27064361
tag name: listview
tags question: http://stackoverflow.com/q/27059648
tags question: http://stackoverflow.com/q/27033916
type: Tag

http://stackoverflow.com/comment/42521004
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26995095
has text: I also found this https://answers.atlassian.com/questions/38299/jira-css-font-family-font-color-in-activity-stream-and-dashboard-gadgets but I do not understand the first answer and the second dose not work(?).

http://stackoverflow.com/q/27098239
linked to: http://stackoverflow.com/q/42795288
tagged with: javascript
favorite count: 0
tagged with: ajax
has title: Rails: POST 422 (Unprocessable Entity) in Rails? Due to the routes or the controller?
possible better answer: http://stackoverflow.com/a/56821525
has answer: http://stackoverflow.com/a/49009190
linked to: http://stackoverflow.com/q/7203304
linked to: http://stackoverflow.com/q/34153092
has comment: http://stackoverflow.com/comment/42701749
tagged with: ruby
tagged with: ruby-on-rails
score: 34
has answer: http://stackoverflow.com/a/56553457
has answer: http://stackoverflow.com/a/66338890
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42701898
upvote count: 35
has answer: http://stackoverflow.com/a/56821525
answer count: 6
tagged with: httprequest
type: Question
has body: I'm trying to give users on my website "points" or "credits" for tweeting about out the brand name. I have the fancy twitter widget on the appropriate view... Tweet I have the JS all written up and pretty.... function creditTweet() { $.post( "/credit_tweet", {}, function(result) { var text; if (result.status === "noop") { text = "Thanks for sharing already!"; } else if (result.status === "ok") { text = "5 Kredit Added"; } $("#credited").html(text); } ); } $(function() { twttr.ready(function (twttr) { window.twttr.events.bind('tweet', creditTweet); }); }); Now the problem is either in the controller OR in the routes (where I'm posting). I think the routes are fine because the POST is almost working, because this is the description of the error on wikipedia - "422 Unprocessable Entity (WebDAV; RFC 4918) The request was well-formed but was unable to be followed due to semantic errors." So, do you guys see anything wrong with my ruby code in the controller? class SocialKreditController < ApplicationController TWEET_CREDIT_AMOUNT = 5 def credit_tweet if !signed_in? render json: { status: :error } elsif current_user.tweet_credited Rails.logger.info "Not crediting #{ current_user.id }" render json: { status: :noop } else Rails.logger.info "Crediting #{ current_user.id }" current_user.update_attributes tweet_credited: true current_user.add_points TWEET_CREDIT_AMOUNT render json: { status: :ok } end end end And in my routes.rb, it's pretty straight forward, so I doubt there's anything wrong here... get 'social_kredit/credit_tweet' post '/credit_tweet' => 'social_kredit#credit_tweet' Where oh where is this error? I clearly don't know smack about HTTP requests.
has comment: http://stackoverflow.com/comment/42701675
has answer: http://stackoverflow.com/a/27098555
accepted answer: http://stackoverflow.com/a/27098555
has answer: http://stackoverflow.com/a/68957859
downvote count: 1

http://stackoverflow.com/q/27150465
score: 15
has title: Geolocation API in Safari 8 and 7.1 keeps asking permission
possible better answer: http://stackoverflow.com/a/27319257
answer count: 3
has answer: http://stackoverflow.com/a/28745939
has answer: http://stackoverflow.com/a/27319257
downvote count: 0
has comment: http://stackoverflow.com/comment/43014074
has body: I've built the Geolocation API into my webapp and all browsers are working fine. Except Safari 8 and 7.1. The browser keeps asking for permission after allowing or not allowing it and ends up in an infinite loop making the browser (tab) unusable. It's easily reproducible by just going to http://html5demos.com/geo in Safari. Is there any fix for this or is this just a bug in Safari? I searched but couldn't find anything related.
favorite count: 0
has answer: http://stackoverflow.com/a/28436277
has comment: http://stackoverflow.com/comment/43107789
tagged with: safari
type: AnsweredQuestion
tagged with: geolocation
accepted answer: http://stackoverflow.com/a/28436277
tagged with: w3c-geolocation
type: Question
upvote count: 15
has comment: http://stackoverflow.com/comment/43016784
has comment: http://stackoverflow.com/comment/44421006
tagged with: javascript

http://stackoverflow.com/comment/42564632
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27014819
score: 1
has text: Look at using an [aggregation pipeline](http://docs.mongodb.org/manual/core/aggregation-pipeline/) for that.

http://stackoverflow.com/q/27062441
tagged with: window
type: UnansweredQuestion
has title: Cancel button for form submission
answer count: 0
tagged with: cgi
tagged with: forms
has comment: http://stackoverflow.com/comment/42638972
type: Question
has comment: http://stackoverflow.com/comment/42642320
tagged with: javascript
has body: I have a "cancel" button in combination with a form. Onclick of the cancel button should stop the form submission. A event with e.g. this: global_.history.back(); works well, but not global_.close(); (global_ is window). Unfortunately I didn't found a solution. Why I need a cancel button? This form is used on a offline website where the form will start a cgi which needs a long time. The user should be allowed to cancel this operation.
score: 0
has comment: http://stackoverflow.com/comment/42642304

http://stackoverflow.com/a/27136546
answers question: http://stackoverflow.com/q/27136136
score: 0
has body: Another method not mentioned is to use the developer tools in the different browsers (Usually F12 to bring them up). There you can inspect the different elements and insert breakpoints in your JS files without any changes to your code. I think it's more readable when looking at HTML elements than using alert or console.log.
type: Answer
has comment: http://stackoverflow.com/comment/42771674

http://stackoverflow.com/q/27138620
has answer: http://stackoverflow.com/a/27138981
has comment: http://stackoverflow.com/comment/42775235
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42775554
has title: create html pages dynamically with proper url
has body: I want to dynamically create webpages using a php script(for example : category.php) which takes on variable 'category' and do a mysql query to get data from the server and create a webpage. category.php &lt; ? php include_once("php_includes/db_conx.php"); $sql = "SELECT * FROM PRODUCTS WHERE CATEGORY = 'CLOTHING' "; $result = $db_conx-&gt;query($sql); if ($result-&gt;num_rows &gt; 0) { // output data of each row while($row = $result-&gt;fetch_assoc()) { /*GENERATE SOME WEBPAGE*/ } } ? &gt; So when a user clicks a link "/category/clothing " it should pick the variable value (category = 'clothing' ) from this link and dynamically generate a webpage with the address "www.example.com/category/clothing" instead of something like "www.example.com/category/?category=clothing" What i want to avoid is a url having '?' and '=' So I want to achieve 2 things: A single php file generating pages dynamically by taking values from links like "/category/clothing" Url of the new webpage should be simple and proper "www.example.com/category/clothing" (of course it should be same as the link clicked ) and not like "www.example.com/category/?category=clothing" Can someone write a example php or js script which can achieve this or point me in the right direction(in case its very simple)
type: Question
has comment: http://stackoverflow.com/comment/42775238
score: 0
answer count: 1
tagged with: javascript
tagged with: php

http://stackoverflow.com/q/27139392
tagged with: jquery
has comment: http://stackoverflow.com/comment/42776866
answer count: 3
tagged with: mouse
has comment: http://stackoverflow.com/comment/42776622
type: UnansweredQuestion
has title: How to change the mouse cursor with javascript without hovering an element?
has body: I know we can use HTMLElement.style.cursor to change a cursor when hovering an element. But can we change the cursor using javascript without the need of mouse hovering anything? Thanks. This is for a game app on the web/web view I need a solution that does not depend on the dom
has answer: http://stackoverflow.com/a/27141242
tagged with: cursor
has comment: http://stackoverflow.com/comment/42776797
type: Question
has comment: http://stackoverflow.com/comment/42776640
has answer: http://stackoverflow.com/a/27139523
score: 0
linked to: http://stackoverflow.com/q/17414034
has answer: http://stackoverflow.com/a/27139728
has comment: http://stackoverflow.com/comment/42776930
tagged with: javascript

http://stackoverflow.com/q/27004171
has comment: http://stackoverflow.com/comment/42537897
tagged with: javascript
type: UnansweredQuestion
tagged with: function
has comment: http://stackoverflow.com/comment/42539613
answer count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42537921
type: Question
has title: jquery issues when posting parameters to another page
tagged with: http://stackoverflow.com/tag/html
has body: I'm basically trying to pass parameters from a table full of editable divs and trying to save them on a database My table code and script are here http://jsfiddle.net/j8f5vm1u/5/ This is part of my main file products.php where I display all the products stored in the products table be them active or not(for sale or not) Product Price weight(Kg) Dimensions(LXAnXAl) //L stands for lenght, An for width, Al for Height Units Activt Action Lámpara 3 18.00 0.8 20 20 20 9 No Guardar Lámpara 4 22.00 1.1 20 20 20 16 No Guardar Lámpara 5 23.00 1.2 20 20 20 24 Si Guardar Lámpara 6 15.00 0.9 20 20 20 16 Si Guardar Lámpara 7 19.00 1.1 20 20 20 34 No Guardar Lámpara 8 21.00 1.2 20 20 20 12 No Guardar Lámpara 9 28.00 1.1 20 20 20 18 No Guardar Lampara 1 19.50 1.1 19 15 15 100 No Guardar Lámpara 2 27.80 1.7 17 18 19 100 No Guardar Lámpara 10 24.00 1.8 21 13 15 50 No Guardar This is my main js file estilos.js $(document).ready(function () { into inputs $("#tablapro div").click(divClicked); });//i use this function to turn all the divs elements into inputs and also insert the ids function divClicked() { var divHtml = $(this).html(); valorid = $(this).attr("id"); var aText = $(' '); aText.val(divHtml); $(this).replaceWith(aText); aText.focus(); // setup the blur event for this new textarea aText.blur(aTextBlurred); }//this changes the divs to inputs and allows the insertion of text function aTextBlurred() { var ahtml = $(this).val(); var aText = $(' '); aText.html(ahtml); $(this).replaceWith(aText); // setup the click event for this new div aText.click(divClicked); }//this changes the inputs back to normal and changes its content to store the changes $(document).ready(function () { $(".save").click(saveid); });// this function allows me to retrieve the content of the elements using its ids function saveid(){ var divid=$(this).val();//this is the product's id var nomrow=$('#n'+ $(this).val()).html();//the product's name var prerow=$('#pr'+$(this).val()).html();//the product's price var …
tagged with: php
score: 0

http://stackoverflow.com/a/27049616
downvote count: 0
has body: Probably this will lead to the desired solution: {{key}} | {{value}}
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27048875

http://stackoverflow.com/comment/43694522
comment on: http://stackoverflow.com/q/27129939
type: QuestionComment
type: Comment
has text: @London804, turned out to be a typo in my domain whitelist, as suggested in the comment above. Doubt that helps you on localhost, but if you have any other info, post it and I'll see if I can help!
score: 0

http://stackoverflow.com/a/27069501
answers question: http://stackoverflow.com/q/27069437
score: 0
type: Answer
has body: you mean like that? : document.getElementById("eye").onmouseover = function() { changeColor("eye") }; document.getElementById("nose").onmouseover = function() { changeColor("nose") }; document.getElementById("mouth").onmouseover = function() { changeColor("mouth") }; document.getElementById("eye").onmouseout = function() { changeColor2() }; document.getElementById("nose").onmouseout = function() { changeColor2("nose") }; document.getElementById("mouth").onmouseout = function() { changeColor2("mouth") }; function changeColor(element) { document.getElementById(element).style.fill = "red"; } function changeColor2(element) { document.getElementById(element).style.fill = "green"; }

http://stackoverflow.com/a/27137331
has body: Edit: You need to do some trickery: How to show &lt;div&gt; tag literally in &lt;code&gt;/&lt;pre&gt; tag? Which says that you need to escape your &lt; and &gt; characters in your tag to &amp;lt; and &amp;gt; for them to show in the &lt;pre&gt;. The example below has been modified to show this. You should try using the html &lt;pre&gt; tag, it's commonly supported and does exactly what you're asking for: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre &lt;pre&gt; &amp;lt;script type="text/javascript"&amp;gt; console.log('hi'); &amp;lt;/script&amp;gt; &lt;/pre&gt; should show something like &lt;script type="text/javascript"&gt; console.log('hi'); &lt;/script&gt;
score: 0
answers question: http://stackoverflow.com/q/27135761
has comment: http://stackoverflow.com/comment/42980612
type: Answer
has comment: http://stackoverflow.com/comment/42938742
has comment: http://stackoverflow.com/comment/42798117

http://stackoverflow.com/q/27146302
type: Question
tagged with: arrays
tagged with: javascript
has body: i have a Text String and I use split to make it an array and I want to count ALL the occurrences of each words but i cant see any error but it doesnt show anything in my HTML this is what I want to achieve [{"name":"you","data":[2]}, {"name":"it","data":[2]}, {"name":"that","data":[2]}, {"name":"to","data":[3]}, {"name":"strength","data":[2]}] and here is my code in javascript var counts = []; var result = {}; var stemmed = "Example Do you really think it is weakness that yields to temptation I tell you that there are terrible temptations which it requires strength strength and courage to yield to Oscar Wilde"; var splitStemmed = stemmed.split(" "); for(var i = 0; i &lt; splitStemmed.length; i++) { for(var j = 0; j &lt; splitStemmed.length; j++) { if(splitStemmed[i]) { if(result[splitStemmed[j]]) result[splitStemmed[j]].data[0]++; else { result[splitStemmed[j]] = {name:splitStemmed[j], data:[1]}; counts.push(result[splitStemmed[j]]); } } } } $("#show").html(counts);
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27146666
has answer: http://stackoverflow.com/a/27146741
has title: result doesn't show after counting all the occurrences in an String Array
has answer: http://stackoverflow.com/a/27146666
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27146741
has answer: http://stackoverflow.com/a/27146718
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/27088843
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/31222426
has answer: http://stackoverflow.com/a/27088860
has body: I'm trying to add a function to a button but the function is called when the page is loaded when the button is clicked, getMemberByName is on another js file and works correctly &lt;input type="button" value="miembro" id="boton2" /&gt; &lt;script&gt; $("#boton2").click(getMemberByName('nombre1','apellido1')); &lt;/script&gt;
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has title: Jquery on click function called when the page is loaded
favorite count: 0
has answer: http://stackoverflow.com/a/27088869
has answer: http://stackoverflow.com/a/27088863
answer count: 4
type: UnansweredQuestion

http://stackoverflow.com/a/30044701
has body: Should be set to: https://foo.github.io, where foo is your github name.
upvote count: 1
answers question: http://stackoverflow.com/q/27117324
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/27005566
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/27005829
accepted answer: http://stackoverflow.com/a/27005829
has body: I really like the nested query but I am not sure if there is a way to return the picture with some width and/or height parameters? Docs on nested query https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#fieldexpansion I cannot find anything. FB.api('/554870764588961?fields=members{id,name,picture}', function (response) { for (i = 0; i &lt; response.members.data.length; i++) { facebookPlayers.push({ player_name:response.members.data[i].name , player_picture:response.members.data[i].picture.data.url }); } callback(facebookPlayers); }); Basically I want to do what I am doing above but in my app the images are to small and I would like to try and get a larger image from the api.
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: facebook
has title: Facebook api picture size for group members using nested query?
tagged with: facebook-graph-api
type: AnsweredQuestion

http://stackoverflow.com/comment/42555494
comment on: http://stackoverflow.com/a/27013406
type: Comment
has text: `$('#formwrap #button').val('New Button Text');` is not working... You're right, the button should have a class, which would make my life a lot easier, but the problem is, this is a Google form implemented on the site. Google forms are used across the site and the different forms need different button text, but all of the forms have the same IDs and Classes. So I'm trying to get around the problem by wrapping each form in a div with a unique ID. Ps. I didn't downvote you either.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27018422
tagged with: reload
tagged with: forms
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27018452
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 6
favorite count: 0
has answer: http://stackoverflow.com/a/27018584
has answer: http://stackoverflow.com/a/27018498
has title: prevent page from reloading after form submit
has body: Is there a way to detect and stop if page is reloading. I have a page which is getting reloaded after successful submission of a form present in it. I want to have an event listener which sees if page is reloading and should stop it from being reloaded. I cannot return false; for sucessful submit of registration form
has comment: http://stackoverflow.com/comment/42561782
has answer: http://stackoverflow.com/a/27018515
has answer: http://stackoverflow.com/a/27018662
type: UnansweredQuestion
score: 4
has answer: http://stackoverflow.com/a/27018645

http://stackoverflow.com/comment/45877519
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27148357
score: 1
has text: Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question.

http://stackoverflow.com/comment/42625367
has text: still didnt get what dynamic you want... can you show some real data and then how should it be displayed, plunker
score: 0
comment on: http://stackoverflow.com/q/27054180
type: Comment
type: QuestionComment

combobox
tags question: http://stackoverflow.com/q/27055749
tags question: http://stackoverflow.com/q/27010224
type: Tag
tags question: http://stackoverflow.com/q/27030384
tags question: http://stackoverflow.com/q/27135385
tag name: combobox
tags question: http://stackoverflow.com/q/27014884

http://stackoverflow.com/q/27033318
has body: I am using angularjs to create a page. Page url configured with stateproviders. URL contains a parameter. This parameter sometimes has slash '/' sign. When this slash sign occurs in parameter routing changes to default url. I am creating website to host it in IIS. WCF services are used. Please let me know how I can resolve this problem to accept slash in parameter and not to redirect. Config looks like as follows - $urlRouterProvider.otherwise("/"); $stateProvider .state('Home', { url: "/", templateUrl: "Partials/Landing.html?", }) .state('Search', { url: "/search/:search", templateUrl: "Partials/Search.html?", }) When I call Search state with following parameter it redirects it to Home state &lt;a ui-sref=".Search({search:spam/closed})" class="list-group-item"/&gt; OR $state.go("Search", {"search" : "spam/closed"});
favorite count: 0
has title: Routing using StateProvider gets redirected if parameter contains Slash '/'
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42588193
has answer: http://stackoverflow.com/a/36152124
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27033442
tagged with: javascript
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/42539513
has text: Hmm I'm curious to see what happens if you install the jquery-rails gem then replace the //= require turbolinks line with //= require jquery.turbolinks
comment on: http://stackoverflow.com/q/27004254
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27004669
tagged with: cordova
upvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27014370
tagged with: ionic-framework
type: Question
tagged with: angularjs-routing
has comment: http://stackoverflow.com/comment/42638061
answer count: 2
has title: Ionic (AngularJS) - redirect user and routing
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27014243
has comment: http://stackoverflow.com/comment/42607978
has comment: http://stackoverflow.com/comment/42607502
has answer: http://stackoverflow.com/a/27014243
has answer: http://stackoverflow.com/a/27014370
has comment: http://stackoverflow.com/comment/42636828
score: 2
has body: So I'm using Ionic for this new project, and needs a little support in routing (angular n00b). I have these states : $stateProvider.state('map', { url: '/map', views: { map: { templateUrl: 'views/map.html', controller: 'mapCtrl' } } }) .state('help', { url: '/help', views: { help: { templateUrl: 'views/help.html' } } }) .state('setname', { url: '/setname', views: { setname: { templateUrl: 'views/setname.html', controller: 'setNameCtrl' } } }) And I would like the user to be redirected to "setname" whenever he's trying to reach another page while "myName" is empty (in the future I will do something similar to check if the user is logged in before allowing access to the app). Here is the current HTML, not sure about this at all... Please help about this, I would appreciate it a lot. Second question, still on routing and showing content : the base of my application will be the map. I would like the user to be able to reach it anytime very fast, so I would want it to stay available all the time in the background when displaying another page (let's say help). So whenever the user clicks a given button, it just takes him back to the map, and doesn't have to load it again. How would you advice me to do that ? I thought of using "popover" property of Ionic, but I'm not sure if it's the right way : http://ionicframework.com/docs/api/service/$ionicPopover/ Thank you very much !

http://stackoverflow.com/comment/42551550
has text: Inject and use `$timeout` in place of `setTimeout`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27012553

http://stackoverflow.com/q/27074208
tagged with: javascript
has body: I want to programmatically generate and display all 1,111,998 unicode characters using Javascript. For example, in Haskell, putStrLn ['a'..] will display most of them. Is there a way to do this in Javascript without having to resort to lookup tables?
has comment: http://stackoverflow.com/comment/42660544
has comment: http://stackoverflow.com/comment/42660300
answer count: 0
type: UnansweredQuestion
score: 0
has title: How Can I List All Unicode Characters Using Javascript?
has comment: http://stackoverflow.com/comment/42664452
has comment: http://stackoverflow.com/comment/42660260
type: Question
has comment: http://stackoverflow.com/comment/42660241

http://stackoverflow.com/comment/42678337
type: QuestionComment
has text: An example how you can load multiple images properly: http://stackoverflow.com/questions/18974517/javascript-check-if-images-are-loaded-before-gameloop/18974956#18974956
score: 0
comment on: http://stackoverflow.com/q/27083971
type: Comment

http://stackoverflow.com/comment/42682118
has text: Also how can you CSS-adjust a DIV *element* inside a `textarea`?
comment on: http://stackoverflow.com/a/27086939
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27099702
score: 0
has body: It is json only. To get values of each key you can do like this : var sample ={blogid:"12345",date:"09.09.2014",uid:"0",author:""}; Now: sample.blogid //12345 sample.uid //0 // and so on...
answers question: http://stackoverflow.com/q/27099526
type: Answer

http://stackoverflow.com/q/27078758
type: Question
has answer: http://stackoverflow.com/a/27079862
has comment: http://stackoverflow.com/comment/42667606
tagged with: javascript
tagged with: jquery
has title: put loading bar before anything loaded on browser
score: 0
answer count: 1
type: UnansweredQuestion
has body: I am working with bootstrap and I want to put a bootstrap progress bar with percent for page loading and when ever that progress bar width reached 100% the page show in browser. How can I do this? I have sample of bootstrap progress bar with jsfiddle link Jsfiddle but how can I set it for page loading var progress = setInterval(function () { var $bar = $('.bar'); if ($bar.width() &gt;= 400) { clearInterval(progress); $('.progress').removeClass('active'); } else { $bar.width($bar.width() + 40); } $bar.text($bar.width() / 4 + "%"); }, 800);
tagged with: twitter-bootstrap-3
linked to: http://stackoverflow.com/q/4999703

http://stackoverflow.com/q/27012087
accepted answer: http://stackoverflow.com/a/27012697
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42551221
has comment: http://stackoverflow.com/comment/42550717
has title: Track submit event in new window javascript
has comment: http://stackoverflow.com/comment/42550871
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27012697
has comment: http://stackoverflow.com/comment/42550972
has comment: http://stackoverflow.com/comment/42550913
type: Question
has body: I open new window with javascript. I mean function window.open. I know that I have object of this window. This new window has &lt;form&gt; with checkbox and submit button. So I wonder can I track submit form event and check if checkbox was checked in this new window. window.open('http:some_external_url','new_window','width=800,height=600,resizable=yes,scrollbars=yes') And form in new window: &lt;form method='post'&gt; &lt;input type='checkbox' name='somename' /&gt; &lt;input type='submit' name='submit_button' /&gt; &lt;/form&gt; Can anyone help please?
has comment: http://stackoverflow.com/comment/42550822

http://stackoverflow.com/q/27011043
has title: why does the facade pattern + revealing modular pattern "add security"?
has answer: http://stackoverflow.com/a/27011287
has comment: http://stackoverflow.com/comment/42549009
has comment: http://stackoverflow.com/comment/42605230
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25391594
tagged with: design-patterns
accepted answer: http://stackoverflow.com/a/27011287
type: Question
has comment: http://stackoverflow.com/comment/42549690
has comment: http://stackoverflow.com/comment/42549063
has comment: http://stackoverflow.com/comment/42549197
has body: REFERENCE According to reference: Below is a more advanced version of the facade pattern that adds security to internal methods. Question: Honestly what do they mean add security? Furthermore, what would be insecure example? Lastly, What would be a simple but real use case for security and this facade + revealing module pattern? var MyModule = ( function( window, undefined ) { // revealing module pattern ftw function MyModule() { function someMethod() { alert( 'some method' ); } function someOtherMethod() { alert( 'some other method' ); } // expose publicly available methods return { // in our normal revealing module pattern, we'd do the following: someMethod : someMethod, // in the facade pattern, we mask the internals so no one has direct access by doing this: // HOW DOES THIS MASK THE INTERNALS? WHAT DO THEY MEAN BY ADDS SECURITY? someMethod : function() { someMethod(); } }; } } )( window );
has comment: http://stackoverflow.com/comment/42549075
tagged with: facade
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/27124975
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42750512
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/42841521
has comment: http://stackoverflow.com/comment/42753838
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42752824
has title: Rollercoaster Parallax Scroll Proposal
tagged with: jquery
has body: I'm creating an animated roller coaster which is linked to the user scrolling the screen horizontally: as the user moves the screen across, a cart moves along the track up/down over loops and climbs. I've so far prototyped some basic examples with the help of pathAnimator combined with jInvertScroll but the challenge is getting the cart to keep up with the pace of scrolling and stay in view plus have optimal performance. This is the sticking point as in theory the cart needs to speed up if the pace of scrolling is fast enough to make it go out of the viewport range. This is a rough prototype of the animation here: http://calum.s3-website-eu-west-1.amazonaws.com/ Any suggestions or ideas to make this work better would be much appreciated..
tagged with: parallax

http://stackoverflow.com/a/27084323
score: 0
has body: The equivalent to the open location handler is to define a function with a specific name. function onOpenLocation (theUrl) { Do something here. } The release notes for JavaScript for Automation do not specifically mention this handler, but this is what it should be called based on the naming convention for translating AppleScript to JSA.
answers question: http://stackoverflow.com/q/27076200
type: Answer

http://stackoverflow.com/a/27099869
type: Answer
has body: The function needs a external invoke to perform the action. So if you want to display the result you can do in the above manner add function check(name ,weight){ if (weight&gt; 25) { alert (name + "Your weight is " + weight + "which is not normal."+ "Sorry"); } else { alert (name + "Your weight is " + weight + "which is normal." + "Welcome"); } return true; } check(name,weight); or you can invoke it by other way &lt;p id="print"&gt;&lt;/p&gt; &lt;script&gt; function check(name ,weight){ if (weight&gt; 25) { alert (name + "Your weight is " + weight + "which is not normal."+ "Sorry"); } else { alert (name + "Your weight is " + weight + "which is normal." + "Welcome"); } return check; } var name = prompt("What is your name?"); var weight = prompt("what is your weight?"); document.getElementById("print").innerHTML = check(name, weight); &lt;/script&gt;
answers question: http://stackoverflow.com/q/27099305
score: 0

http://stackoverflow.com/q/26995580
type: Question
tagged with: c#
has body: I've a strange situation on IE 9. It just works in Chrome and Firefox. I will post only the relevant code. It's a legacy application (VS2008). The "corp framework" defines field masks at runtime, it uses the onkeyup event, with javascript like this: Javascript: function mascara(o, f) { v_obj = o v_fun = f setTimeout(function() { v_obj.value = v_fun(v_obj.value) }, 1) } ASP.NET HTML: &lt;asp:TextBox runat="server" ID="TextBox5" AutoPostBack="true" OnTextChanged="TextChanged" /&gt; The mask and the postback event works in all browsers except IE9. When I remove the setTimeout in the javascript mask function, the postback works, but i lost the mask behavior. I figure out that AutoPostBack=true will render the onchange event with setTimeout. The mask uses another time the setTimeout function, when I remove the setTimeout in the mask, the postback works at IE 9. Rendered HTML: &lt;input name="TextBox5" type="text" onchange="javascript:setTimeout('__doPostBack(\'MPTextBox5\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="MPTextBox5" onkeyup="mascara(this, mnum);"&gt; I can't figure out what is the problem at IE9 and the solution.
has answer: http://stackoverflow.com/a/26999341
answer count: 1
tagged with: javascript
tagged with: webforms
has comment: http://stackoverflow.com/comment/42522925
has title: ASP.NET/Webform Textbox does not fire the autopostback when onkeyup event defines "setTimeout" (IE9)
tagged with: asp.net
score: 0
tagged with: autopostback
has comment: http://stackoverflow.com/comment/42522674
type: UnansweredQuestion

http://stackoverflow.com/a/26992892
score: 0
answers question: http://stackoverflow.com/q/26992090
type: Answer
has body: In Javascript : &lt;script type="text/javascript"&gt; // allocate the function to the window scrolling window.onscroll = menucontainer; var startingY = false; function menucontainer() { // First top value recovery if (!startingY) startingY = parseInt(document.getElementById("menucontainer").style.top); // Scroll top value if (window.pageYOffset) { var yrt = window.pageYOffset; } else if (document.body.scrollTop){ var yrt = document.body.scrollTop; } else { var yrt = document.documentElement.scrollTop; } document.getElementById("menucontainer").style.top = (yrt + startingY)+ "px"; } &lt;/script&gt; and &lt;div id="menucontainer"&gt; ... &lt;/div&gt;

http://stackoverflow.com/a/27088742
upvote count: 4
score: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27088631
type: Answer
accepted answer of: http://stackoverflow.com/q/27088631
has body: Add the following CSS to your text elements: pointer-events: none; This will prevent any mouse events for the text elements, i.e. the cursor won't change but you also won't be able to select the text. Complete demo here.

http://stackoverflow.com/q/27087730
favorite count: 0
has answer: http://stackoverflow.com/a/27088022
tagged with: angularjs
has title: AngularJS : ng-include and ng-controller
upvote count: 27
has body: I have an app which I am building with angular, I have about 8-10 views to build out. All the views have a shared footer, based on the view and a set of business rules i need to conditionally show / hide some of the content on the footer. So. I have controllers for each view, and then one for the footer. I include the common footer layout using ng-include, where the html I am including references the footer controller in the ng-controller. Index.html Message from Main Controller '{{vm.mainMessage}}' commonFooter.html Message from Footer Controller '{{vm.message}}' Conditional footer Content I want each views controller to determine the state of the footer and whether specific content is hidden or not. (shouldDisplaySomthingInFooter below) app.controller('MainCtrl', function($scope) { var vm = this; vm.mainMessage= 'HEELO'; vm.shouldDisplaySomthingInFooter = true; window.console.log('Main scope id: ' + $scope.$id); }); Then i had intended that in the FooterController would reach back into the parent controller and pull out the specific settings to enable / disable content based on the business rules. app.controller('FooterCtrl', function($scope) { var vm = this; vm.message = 'vm footer'; window.console.log('Footer scope id: ' + $scope.$id); window.console.log('Footer parent scope id: ' + $scope.$parent.$id); window.console.log('Footer grandparent scope id: ' + $scope.$parent.$parent.$id); window.console.log('Footer grandparent scope name: ' + $scope.$parent.$parent.mainMessage); window.console.log('Footer grandparent scope condition: ' + $scope.$parent.$parent.shouldDisplaySomthingInFooter); vm.showSomthing = false; //how to pull from parent scope to bind the ng-show to a value set in the parent from within a ng-include? }); I have this example here: http://plnkr.co/edit/ucI5Cu4jjPgZNUitY2w0?p=preview What I am finding is that I when I reach into the parent scope to pull out the content it is coming back as undefined, and I am not sure why. I can see that the scopes …
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/27088022
has answer: http://stackoverflow.com/a/27092615
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27092615
score: 27
tagged with: angularjs-scope
tagged with: angularjs-ng-include
has answer: http://stackoverflow.com/a/27088042
answer count: 3
downvote count: 0

http://stackoverflow.com/q/27052498
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42622331
has comment: http://stackoverflow.com/comment/42622281
type: Question
tagged with: javascript
score: 0
tagged with: google-maps
answer count: 1
has body: I'm trying to create a custom map where I'm going to set a few markers with a custom icon. The icon appear normally on my localhost but when I uploaad all the files to my server the custom icon doesn't appear! The map show the default GMap marker proving that my database connection is ok. Here follow my code: index.php: My map jsonResponse.php: <?php require("config.php"); // Start XML file, create parent node $dom = new DOMDocument("1.0"); $node = $dom->createElement("markers"); $parnode = $dom->appendChild($node); // Opens a connection to a MySQL server $connection=mysql_connect (DB_SERVER, DB_USER, DB_PASSWORD); if (!$connection) { die('Not connected : ' . mysql_error());} // Set the active MySQL database $db_selected = mysql_select_db(DB_DATABASE, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); } // Select all the rows in the markers table $query = "SELECT * FROM sensors WHERE 1"; $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } $markersArray = array(); while ($row = @mysql_fetch_assoc($result)){ array_push($markersArray, $row); } echo json_encode ($markersArray); I'm pretty sure the icon image is in the right place. I just copy and paste to the server, so the files structure is exactly the same. Anyone have any ideia about what should I do? I'm starting to think it is about server configuration...
has answer: http://stackoverflow.com/a/27052855
accepted answer: http://stackoverflow.com/a/27052855
has comment: http://stackoverflow.com/comment/42622552
has comment: http://stackoverflow.com/comment/42622253
has comment: http://stackoverflow.com/comment/42622082
tagged with: php
has title: Google Maps custom maker doesn't appear on my server, but works on localhost

http://stackoverflow.com/q/27042450
has title: Refreshing the whole page after ajax call
tagged with: ajax
score: 0
has body: I want to reload the same page after performing ajax call without jquery.Is it possible? In my code i am going to delete database names inside a table.after deleting the dbnames,the page doesn't show the dbnames.Is it possible?I tried it with window.location="Databases.jsp" But it didn't work.What can i do to perform this task?also i am displaying the table containing database name inside a framset.So when i chage/delete database name i want to refresh the left side frameset also.(that is i need to refresh the whole page)My code: Database.jsp &lt;%-- Document : Databases Created on : Nov 10, 2014, 3:08:01 PM Author : user --%&gt; &lt;%@page import="java.sql.PreparedStatement"%&gt; &lt;%@page import="java.sql.DatabaseMetaData"%&gt; &lt;%@page import="java.sql.ResultSet"%&gt; &lt;%@page import="querywork.DBConnection"%&gt; &lt;%@page import="java.sql.Statement"%&gt; &lt;%@page import="java.sql.DriverManager"%&gt; &lt;%@page import="java.sql.Connection"%&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;script language="javascript" type="text/javascript"&gt; var request; function drop() { var cboxes = document.getElementsByName('ch'); var len = cboxes.length; var dbnam = document.getElementById("hid") .value var dbs=""; var dbname=dbnam.split(",") for (var i=0; i&lt;len; i++) { if(cboxes[i].checked) { dbs= dbname[i] var url="Delete.jsp?val="+dbs; if(window.XMLHttpRequest){ request=new XMLHttpRequest(); } else if(window.ActiveXObject){ request=new ActiveXObject("Microsoft.XMLHTTP"); } try { request.onreadystatechange=getInfo; request.open("GET",url,true); request.send(); } catch(e) { alert("Unable to connect to server"); } } } } function getInfo(){ if(request.readyState==4){ var val=request.responseT…
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27042532
has comment: http://stackoverflow.com/comment/42603871
linked to: http://stackoverflow.com/q/15166507
linked to: http://stackoverflow.com/q/11690253
answer count: 1
tagged with: jsp
linked to: http://stackoverflow.com/q/5294842
tagged with: javascript

http://stackoverflow.com/comment/42583512
type: Comment
has text: you don't technically need it there, but you should have it there, I think it's required in older browsers. If you really care to know exactly what it does, look at the mdn article for `addEventListener`
comment on: http://stackoverflow.com/a/27029768
type: AnswerComment
score: 0

http://stackoverflow.com/q/27062345
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27062459
type: Question
has body: I follow the "controller as" usage from angularjs styleguide to create a controller, which has a function in it to be called from view (such as ng-if). However when I called the function, it seems it was called three times, but I have no idea how it happened. Here is the JSBin link (function() { angular.module('app', []); function test() { console.log('init'); var vm = this; vm.title = "test title"; vm.called = function() { console.log('get called'); } } angular .module('app') .controller('test', test); })(); JS Bin {{ vm.title }} {{ vm.called(); }}
tagged with: javascript
tagged with: angularjs-scope
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27062459
tagged with: angularjs
has title: functions with ControllerAs pattern are called multiple times

http://stackoverflow.com/a/27005454
has body: I think you can do this if you use Select2's query option, rather than the ajax option. That way you can make the ajax request if any characters have been typed, but show the default list if no characters have been typed. If your default options are defined like this: var DEFAULT_OPTIONS = [ { id: 'def1', text: 'Default Choice 1' }, { id: 'def2', text: 'Default Choice 2' }, { id: 'def3', text: 'Default Choice 3' } ]; You could do the following: var lastOptions = DEFAULT_OPTIONS; $('#select').select2({ minimumInputLength: 0, query: function(options) { if (options.term) { $.ajax({ type: 'post', // Or 'get' if appropriate url: 'your_ajax_url', dataType: 'json', data: { term: options.term // Change name to what is expected }, success: function(data) { lastOptions = data; options.callback({ results: data }); } }); } else { options.callback({ results: lastOptions }); } } }); jsfiddle
answers question: http://stackoverflow.com/q/27000381
has comment: http://stackoverflow.com/comment/42664238
has comment: http://stackoverflow.com/comment/129491319
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42555114
type: Answer
has comment: http://stackoverflow.com/comment/42659640
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27000381

http://stackoverflow.com/comment/42677174
type: AnswerComment
score: 0
type: Comment
has text: It doesn't have to be built into the express app itself, but (absent of any existing auth/authz system you have in place) that would probably be the simplest approach.
comment on: http://stackoverflow.com/a/27083811

http://stackoverflow.com/q/27120811
has comment: http://stackoverflow.com/comment/42742731
type: Question
answer count: 2
score: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42742691
linked to: http://stackoverflow.com/q/24965194
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/27121994
has title: Nashorn access non-static Java method
has answer: http://stackoverflow.com/a/27121994
has answer: http://stackoverflow.com/a/27340325
tagged with: nashorn
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42743047
has body: In Java 7 (1.7), I could access a Java method from JavaScript by running this: ScriptEngine jse = new ScriptEngineManager().getEngineByName("JavaScript"); jse.eval("importClass(net.apocalypselabs.symat.Functions);"); jse.eval("SyMAT_Functions = new net.apocalypselabs.symat.Functions();"); String input = "notify(\"Foo\");"; // This is user input jse.eval("with(SyMAT_Functions){ "+input+" }"); Which would run the notify() function from the Functions java class: public class Functions { private Object someObjectThatCannotBeStatic; public void notify(Object message) { JOptionPane.showMessageDialog(null, message.toString()); } /* Lots more functions in here, several working with the same non-static variable */ } How do I access the Functions class in Java 1.8 with the Nashorn engine? My goal is to run different code for the first snippet if the user has Java 1.8, while still allowing people with 1.7 to use the app. I've tried http://www.doublecloud.org/2014/04/java-8-new-features-nashorn-javascript-engine/ , https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/api.html , and How to instantiate a Java class in JavaScript using Nashorn? without luck. None of them seem to allow me the same thing as Java 1.7 did, instead assuming I only want to access static functions and objects. The most common error I get: I start with... ScriptEngine jse = new ScriptEngineManager().getEngineByName("JavaScript"); jse.eval("var SyMAT_Functions;with (new JavaImporter(Packages.net.apocalypselabs.symat)) {" + "SyMAT_Functions = new Functions();}"); ...then... jse.eval("with(SyMAT_Functions){ "+input+" }"); ...spits out... TypeError: Cannot apply "with" to non script object in &lt;eval&gt; at line number 1
tagged with: java
accepted answer: http://stackoverflow.com/a/27340325

http://stackoverflow.com/comment/42654748
comment on: http://stackoverflow.com/a/27070805
score: 0
type: AnswerComment
has text: FYI the key also needs to be decoded. Check my example again ;)
type: Comment

http://stackoverflow.com/a/27101360
type: Answer
has body: Should be loaded first When jQuery is loaded, load other components
has comment: http://stackoverflow.com/comment/42707094
score: 0
answers question: http://stackoverflow.com/q/27101343

paypal
tags question: http://stackoverflow.com/q/27055416
tags question: http://stackoverflow.com/q/27034923
type: Tag
tags question: http://stackoverflow.com/q/27113027
tag name: paypal

http://stackoverflow.com/q/27058687
type: Question
has title: Screeps get all creeps with specific memory (role)
score: 7
has answer: http://stackoverflow.com/a/27060515
answer count: 3
has answer: http://stackoverflow.com/a/27072960
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: screeps
has comment: http://stackoverflow.com/comment/42633118
accepted answer: http://stackoverflow.com/a/27060515
has body: I'm trying to figure out how to get every creep with a specific memory or role like harvester in a variable... I can't seem to figure it out. I already tried: module.exports = function(){ for(var i in Game.creeps){ if(i.memory == 'Harvester'){ var Harvesters = Game.creeps[i]; if(Harvesters.index &lt; 3){ Game.spawns.Spawn1.createCreep([Game.WORK, Game.CARRY, Game.MOVE],'Harvester'+ Harvesters.length, 'Harvester'); } } } } But this obviously wouldn't work...
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27059575
has answer: http://stackoverflow.com/a/27059575
has comment: http://stackoverflow.com/comment/42632497
upvote count: 7

http://stackoverflow.com/a/27292291
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27062749
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27062749
has body: I have a resuln, but only with PHP: $imgObject = imagecreatefrompng('http://scottkleinberg.com/wp-content/uploads/2012/10/icon-512x512.png'); $fillColor = imagecolorat($imgObject, 0, 0); $rgba = array( ($fillColor &gt;&gt; 16) &amp; 0xFF, ($fillColor &gt;&gt; 8) &amp; 0xFF, $fillColor &amp; 0xFF, ); print_r($rgba); When is the image JPG or JPEG format: $imgObject = imagecreatefromjpeg('http://scottkleinberg.com/wp-content/uploads/2012/10/icon-512x512.png'); $fillColor = imagecolorat($imgObject, 0, 0); $rgba = array( ($fillColor &gt;&gt; 16) &amp; 0xFF, ($fillColor &gt;&gt; 8) &amp; 0xFF, $fillColor &amp; 0xFF, ); print_r($rgba);
type: Answer

typeahead
type: Tag
tags question: http://stackoverflow.com/q/27094064
tags question: http://stackoverflow.com/q/27103299
tag name: typeahead

http://stackoverflow.com/comment/42768749
type: QuestionComment
comment on: http://stackoverflow.com/q/27127191
score: 0
has text: Read this brilliant post, it answers and provides an example: http://stackoverflow.com/questions/24773177/how-to-poll-a-google-doc-from-an-add-on
type: Comment

http://stackoverflow.com/comment/42735354
has text: Your "code" shows a significant lack of understanding. I suggest you go back to simpler examples and build your way up in knowledge.
comment on: http://stackoverflow.com/q/27116300
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42799438
score: 0
type: Comment
type: QuestionComment
has text: @rahpuser thanks you appreciated
comment on: http://stackoverflow.com/q/27144358

http://stackoverflow.com/comment/42649755
score: 0
comment on: http://stackoverflow.com/q/27068207
type: Comment
type: QuestionComment
has text: ricox: parsing a pdf? How much do you know already and in doing this task, what information/assistanceguidance do you need?

http://stackoverflow.com/comment/42747393
type: AnswerComment
comment on: http://stackoverflow.com/a/27122434
score: 0
has text: Yes, already tried with what you suggested, but not working. Actually Alert(img.width) should give me exact value, but it is not. The reason might be I may require to create the object of Filereader class and pass it to Image class then your code can work, but I am new to javascript so couldn't find what exact code do I need to write.
type: Comment

http://stackoverflow.com/a/27121105
score: 1
has comment: http://stackoverflow.com/comment/42769884
has body: Angular cannot handle more than ~2000 watches,some browser can do more but that is a good cap. There are 2 possibilities for the slow updates: 1) Are the APIs you are calling withing the Angular life cycle? If so make sure you do a scope.$apply(). 2) You have too many watches. There are code snippets you can find that you run in the console that will spit back the number of watches If they are high then consider buffering your view so that only what you see is bound, github.com/EnzeyNet/VirtualScroll.
has comment: http://stackoverflow.com/comment/42765504
answers question: http://stackoverflow.com/q/27119065
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/q/27064873
tagged with: wicket
score: 2
type: Question
tagged with: javascript
has body: I am new with Wicket framework, so I don't know if this is possible. I want that when I click on submit button of form (in Java it's AjaxButton) javascript confirmation dialog pops up, but when I click No, it always calls method onSubmit of this button. What am I doing wrong? Here my code: AjaxButton submit; add(submit = new AjaxButton("ajaxSubmitProduct"){ private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("onclick", "return confirm('Yes or No?');"); } @Override protected void onSubmit(AjaxRequestTarget target, Form&lt;?&gt; form) { target.add(form); Product p = (Product) form.getModelObject(); DBBroker.save_product(p); success("You have sucessfully added a new product."); } @Override protected void onError(AjaxRequestTarget target, Form&lt;?&gt; form) { target.add(form); } });
has title: Wicket AjaxButton and javascript condition
answer count: 2
has answer: http://stackoverflow.com/a/27068435
downvote count: 0
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27105706

http://stackoverflow.com/q/27066470
has answer: http://stackoverflow.com/a/27066493
tagged with: css
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42646344
has title: Rotate img in bootstrap panel
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I got an image inside bootstrap panel, i want to add functionality when i can click on a rotate button and the image would rotate. i got the following: .rotate{ -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); // IE9 only transform: rotate(90deg); } if i add class to my img it rotates that 90degs but it comes out of the panel, it stops to follow the width and height restrictions, just rotates in place. Is there a way to do that? I mean to rotate the image, in a way that it will still be in panel's borders. EDIT: i got this: http://jsfiddle.net/jjbjn160/ its overflowing the left side of panel, i want it to fit in to the panel.

datetimepicker
type: Tag
tag name: datetimepicker
tags question: http://stackoverflow.com/q/27100420
tags question: http://stackoverflow.com/q/27009695

http://stackoverflow.com/a/27126590
has comment: http://stackoverflow.com/comment/42752936
answers question: http://stackoverflow.com/q/27126518
downvote count: 0
has body: Put the panel inside the updatepanel and a contenttemplate. Therefore it'll be refreshing the contents of the updatepanel on postback. &lt;asp:UpdatePanel ID="updatePannel" runat="server"&gt; &lt;ContentTemplate&gt; &lt;asp:Panel ID="plStore" runat="server" GroupingText="Store"&gt; &lt;div style="margin: 5px;"&gt; &lt;asp:Label ID="Label6" runat="server" SkinID="header2NonBoldSkin" Text="Reval date" /&gt;&lt;br /&gt; &lt;asp:TextBox ID="txtText" runat="server" /&gt; &lt;asp:Button runat="server" ID="btnStore" Text="&amp;nbsp;&amp;nbsp;Store&amp;nbsp;&amp;nbsp;" OnClick="btnStore_Click" OnClientClick="return confirm('Are you sure to store data for ' + getRevalDate() +'?');" /&gt; &lt;/asp:Panel&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt;
score: 1
has comment: http://stackoverflow.com/comment/42753090
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27126518

http://stackoverflow.com/a/27117879
answers question: http://stackoverflow.com/q/27117762
downvote count: 0
has body: use this pattern (.*\S)\s*\(([^()]+) Demo ( # Capturing Group (1) . # Any character except line break * # (zero or more)(greedy) \S # &lt;not a whitespace character&gt; ) # End of Capturing Group (1) \s # &lt;whitespace character&gt; * # (zero or more)(greedy) \( # "(" ( # Capturing Group (2) [^()] # Character not in [^()] + # (one or more)(greedy) ) # End of Capturing Group (2)
score: 4
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27117762
upvote count: 4

http://stackoverflow.com/comment/42520222
has text: In first example instead of passing {model: o}, try to pass {model: new (Backbone.Model.extend())(o)} . In initialize method of PodcastItemView you are listening for this.model change, but this.model is not a Backbone.Model. Try it and let me know if it works.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26994271
score: 0

http://stackoverflow.com/comment/42790311
type: AnswerComment
score: 0
type: Comment
has text: the responses array returns unique values. But p_li has some values from before
comment on: http://stackoverflow.com/a/27147448

http://stackoverflow.com/comment/42564235
score: 0
type: Comment
type: QuestionComment
has text: Please clarify. You say "The controller works fine when I call it via $.get in jQuery. ". When does it not work correctly? are you using a different jquery ajax method?
comment on: http://stackoverflow.com/q/27006767

http://stackoverflow.com/comment/42639142
type: QuestionComment
comment on: http://stackoverflow.com/q/27062551
type: Comment
has text: *"To remove events bound with `.on()`, see `.off()`. To attach an event that runs only once and then removes itself, see `.one()`"* - First paragraph of [`.on()` doc](http://api.jquery.com/on/)
score: 3

http://stackoverflow.com/q/27053378
has body: My question is much like this guys... how to create and run my own peerjs server? On the peerjs Quick Start you have the options of... Creating their server (Doesn't Work), or creating your own server(Does Work). The documentation if you want to call it that has no help for how to handle a call in "server.js" if that's what you're calling it. In the Source of, http://cdn.peerjs.com/demo/videochat/ on line 37, you make a "call"... Then what? I have an index.html, that connects fine, I have a server.js that runs with no errors in node.... I can say Hello World all I want, but, How to Handle a Call, and Answer a call http://jsfiddle.net/cbaftkzn/1/ $('#make-call').click(function(){ var call = peer.call($('#callto-id').val(), window.localStream); step3(call); }); A Frustrated Thank you...
linked to: http://stackoverflow.com/q/26374931
tagged with: webrtc
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28945884
has title: Custom Server with peerjs - no documentation has left me clueless
score: 2
tagged with: peerjs
upvote count: 2
type: Question

http://stackoverflow.com/a/27103111
accepted answer of: http://stackoverflow.com/q/27096468
has body: Ok, try this Add a RadioButtonList with AutoPostBack="true" and OnSelectedIndexChanged event to your markup as follows. &lt;asp:Calendar ID="Calendar1" runat="server" Height="365px" Width="594px" CssClass="myCalendar" OnDayRender="Calendar1_DayRender" OnSelectionChanged="Calendar1_SelectionChanged" &gt; &lt;DayHeaderStyle CssClass="myCalendarDayHeader"/&gt; &lt;DayStyle CssClass="myCalendarDay" Font-Bold="True" Font-Names="Cordia New" Font-Size="30px"/&gt; &lt;SelectedDayStyle CssClass="myCalendarSelector" BackColor="#3366FF"/&gt; &lt;SelectorStyle Wrap="True" CssClass="myCalendarSelector"/&gt; &lt;TitleStyle CssClass="myCalendarTitle" /&gt; &lt;TodayDayStyle CssClass="myCalendarToday"/&gt; &lt;/asp:Calendar&gt; &lt;asp:RadioButtonList ID="RadioButtonList1" runat="server" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" AutoPostBack="true"&gt; &lt;asp:ListItem&gt;Red&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Yellow&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Green&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; And, in your code behind implement the OnSelectedIndexChanged event as follows protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { System.Drawing.Color selColor; switch(RadioButtonList1.SelectedValue) { case "Red": selColor = System.Drawing.Color.Red; break; case "Yellow": selColor = System.Drawing.Color.Yellow; break; default: selColor = System.Drawing.Color.Green; break; } Calendar1.SelectedDayStyle.BackColor = selColor; } That's it! Your selected dates will get highlighted with the color you select in the RadioButtonList control. Have fun!
downvote count: 0
answers question: http://stackoverflow.com/q/27096468
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/27103431
has comment: http://stackoverflow.com/comment/42710639
has comment: http://stackoverflow.com/comment/42710521
type: Question
score: -2
downvote count: 3
has comment: http://stackoverflow.com/comment/42710609
has comment: http://stackoverflow.com/comment/42710700
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Ajax to working
favorite count: 0
tagged with: ajax
has body: I have the following java script function function stopSelected(){ var stop=document.getElementById('stops').value; alert(stop); var html=""; $.ajax({ type:"POST", url:"/DisplayRoute/findStopsRoutes", data:{ stopToSearch:stop; }, success:function(resultedRoutes){ alert(resultedRoutes[0]); }, error: function(resultedRoutes){ alert("error"); } }); } The function shows alert when called without ajax. But when I include ajax it shows no alert. my function on server side is as logs here. 'findStopsRoutes': function(req,res){ console.log("here"); } I have similar code working at another place but it is not working here properly. Please help me solve the issue.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27103553
accepted answer: http://stackoverflow.com/a/27103553
has comment: http://stackoverflow.com/comment/42710636
has comment: http://stackoverflow.com/comment/42710676
upvote count: 1

http://stackoverflow.com/a/27274255
score: 4
answers question: http://stackoverflow.com/q/27137562
type: Answer
upvote count: 4
has body: Before anything, this solution works if you use relative URLs only! (for images, links and even Ajax calls) Use sessions as you would in any ordinary scenario with one small change. Instead of identifying users with each session ID, you will identify a machine (a browser) by each session ID. So when requests arrive at server, it identifies a bunch of users who are using your website on that computer. Each user will have his own sub-identifier (it could be a sequential counter or a random number). Putting it simple, your session data (identified by session ID in the cookies) holds an associative array. Each entry of this array holds session data for one particular user identified by sub-identifier. For instance, in PHP, if your user's sub-identifier is user0, then you can access this user's session data like: &lt;?php session_start(); $user_data = $_SESSION['user0']; Next is how to pass on user's sub-identifier. You can use webserver's URL rewrite. You need to come up with a pattern which can be considered as an ordinary folder name, while there's no folder named like that. For instance: RewriteEngine On RewriteRule ^user(\d+)\/(.*)$ $2?sub_id=$1 [QSA,L] In this example, you are not allowed to have any folders like user0, user1 etc. If some request asks for http://domain.com/user0/index.php it will be rewritten to http://domain.com/index.php?sub_id=user0. Now in index.php you'll have: &lt;?php session_start(); $user_data = $_SESSION[$_REQUEST['sub_id']]; And you should use $user_data instead of $_SESSION from this point forth. The only thing that remains is how to generate sub-identifier for the first time. That's relatively easy, you can: &lt;?php session_start(); if (!isset($_REQUEST['sub_id'])) { $sub_id = 0; while (isset($_SESSION["user{$sub_id}"])) { $sub_id++; } $_SESSION["user{$sub_id}"] = array(); header("Location: /user{$sub_id}".$_SERVER['REQUEST_URI']); die(); } else { $user_data = $_SESSION[$_REQUEST['sub_id']]; } At the end, everything will work only if …
downvote count: 0

http://stackoverflow.com/q/27114154
has body: I developed a web app to display a slideshow, and want to display it on my secondary monitor (Connected via HDMI) with IE's Kiosk mode on Windows 10. Because of CPU and other resources on the shared server, I want to pause the slideshow when the monitor is powered off. (And therefore nobody is seeing it) Is there a way to detect connected displays from Internet Explorer? Since this is a one-pc kiosk setup, add-ons, etc. are accepted. Triggering javascript/jquery events would be ideal. Thank you!
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27117204
downvote count: 0
has answer: http://stackoverflow.com/a/27309264
has answer: http://stackoverflow.com/a/27319795
favorite count: 0
has comment: http://stackoverflow.com/comment/43094560
has comment: http://stackoverflow.com/comment/42736742
type: UnansweredQuestion
tagged with: kiosk-mode
answer count: 4
linked to: http://stackoverflow.com/q/203355
has title: Detect if monitor is powered on from IE Kiosk mode
has comment: http://stackoverflow.com/comment/42886449
has answer: http://stackoverflow.com/a/27306643
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/42748471
type: Question
has comment: http://stackoverflow.com/comment/42751938
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/42873240
linked to: http://stackoverflow.com/q/328490

http://stackoverflow.com/a/27104009
has body: To add an image when someone clicks on share/like etc, you can set the image for that page with &lt;meta property="og:image" content="http://yourdomain.com/link/to/image" /&gt; When somebody shares it, it will use that image. You can also set titles and more: https://developers.facebook.com/docs/opengraph/using-objects#selfhosted-creating
downvote count: 0
answers question: http://stackoverflow.com/q/27103435
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/27071735
has body: adding subtotal+vat+cst+round to grand total function update_totals() { var grand_total = 0; var grand_subtotal = 0; var vat=0; var cst=0; var rounds = parseInt($('.round').val()); var vat_percent = parseInt($('.vat-percent').val()); if ( (vat_percent &lt; 0) || (vat_percent &gt; 90) ) { vat_percent=10; $('.vat-percent').find('input').val(10); } var cst_percent = parseInt($('.cst-percent').val()); if ( (cst_percent &lt; 0) || (cst_percent &gt; 90) ) { cst_percent=10; $('.cst-percent').find('input').val(10); } $('#invoice-items .cell').children('.subtotal-cell').each(function(){ grand_subtotal += parseFloat( $(this).find('input').val() ); }); vat=(grand_subtotal * (vat_percent/100)).toFixed(2); cst=(grand_subtotal * (cst_percent/100)).toFixed(2); grand_total = (grand_subtotal + vat + cst rounds); grand_subtotal = grand_subtotal.toFixed(2); grand_total =(grand_subtotal) + (vat); //update dom $('.sub-total').val(grand_subtotal); $('.vat').val(vat); $('.cst').val(cst); $('.grand-total').val(grand_total); } look for error in picture two values and adding side by side adding to grand_total =grand_subtotal + vat + cst + round it shows 25.001.25 in this 25.00 is subtotal 1.25 is vat thanks
linked to: http://stackoverflow.com/q/1458633
has answer: http://stackoverflow.com/a/27071829
accepted answer: http://stackoverflow.com/a/27071829
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42655891
has answer: http://stackoverflow.com/a/27071811
type: Question
tagged with: javascript
score: 0
answer count: 2
has title: javascript while adding values it calculates like string
possible better answer: http://stackoverflow.com/a/27071811

http://stackoverflow.com/q/27107403
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42717995
has title: Pulling data from a website (livebox)
has answer: http://stackoverflow.com/a/27107738
upvote count: 2
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42718523
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27107738
tagged with: mirc
type: AnsweredQuestion
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42718044
type: Question
has body: I have tried this using the page sources but in the page source. The div tag i want is absent. while going through the Developer tools in chrom is was able to find the div i needed and (after i paused in debugger) then i could find the text i needed aswell. barradell12 attacked ChaosViper Nahid7 attacked FHC lol barradell12 mugged ChaosViper Someone mugged cheesejointsuk rexxcii attacked black15 Someone hospitalized TheWalrus Now ideally i would like the text like "xxxx attacked xxxx", "xxxxx hospitalized xxxxxx" to be pulled into a text file if possible. P.s. the bubbles only last for a few seconds then they dissapear and more appear. So id like them all

http://stackoverflow.com/comment/42771859
type: Comment
has text: ah sorry, i chose those class names for example purposes. none of my classes actually have spaces... oh but those commas might be an issue...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27136771

http://stackoverflow.com/comment/42585412
type: Comment
comment on: http://stackoverflow.com/q/27031620
has text: Yes, I can't solve this problem
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42600818
type: Comment
has text: Live is ideal, the idea of the interface it to compare in real-time 2 rows of data/text
comment on: http://stackoverflow.com/q/27039179
score: 0
type: QuestionComment

http://stackoverflow.com/q/27021777
favorite count: 0
tagged with: parsing
tagged with: backbone.js
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1
type: Question
has body: So I have a simple code into a backbone-style web app var $content = $('section').first(), document = new Parse.Query('Document'), pId = "fsSGsG323"; // my document id into database document.equalTo('personPointer', { __type: "Pointer", className: "Person", objectId: pId }).descending('createdAt').find().then(function(documents) { alert(documents.length + ' documents found'); for (var i = 0; i &lt; documents.length; i++) { var $li = $("&lt;li class='reportDocumentsItem'&gt;&lt;/li&gt;"); var aux = new ProductListItem({ el: $li, model: documents[i] }); $content.append(aux.$el); } }, genFail); i have 10 entries into the DB that have as a "personPointer" the right "pId", but sometimes, randomly, while i'm using the web app, the alert shows me that there are 0 or less results then i actually have... so i refresh the page, and everything works well where is my mistake???what am i missing??
has title: Parse JS - Query not return correct results
tagged with: javascript
downvote count: 0

http://stackoverflow.com/a/27051167
has comment: http://stackoverflow.com/comment/42642198
score: 1
has comment: http://stackoverflow.com/comment/42642366
has comment: http://stackoverflow.com/comment/42642311
upvote count: 1
has comment: http://stackoverflow.com/comment/42642273
answers question: http://stackoverflow.com/q/27051017
has comment: http://stackoverflow.com/comment/42641968
type: Answer
has comment: http://stackoverflow.com/comment/42642265
downvote count: 0
has body: The code in your alert statement and inside the ng-repeat directive do not match. Your alert accesses "x.id" whereas your dom binding accesses "x.attributes.id". If your alert is showing the expected result, you should change the HTML as follows: &lt;li ng-repeat="eachElement in array"&gt; &lt;a &gt; {{eachElement.id}}&lt;/a&gt; &lt;/li&gt;
has comment: http://stackoverflow.com/comment/42642224

http://stackoverflow.com/a/27008061
score: 0
answers question: http://stackoverflow.com/q/27006956
type: Answer
has body: So I worked on this for a bit and came to the conclusion that giving all of the input elements a classname was the best method. I then used mootools double dollar function to iterate over all of the items with that classname.

http://stackoverflow.com/q/27008695
tagged with: d3.js
type: UnansweredQuestion
has body: I did a bit of searching and found something close to what i want to achieve but it does not work. Am I doing it the right way ? I have a a plot with two exponential curves and I want to connect the end of the first one to the beginning of the second one. I have stored my data as follows: for (var i = 0; i &lt;= 100; i++) { product.push({ "ID": Number(c[i]), "value1": new Date(v[i]), "value2": new Date(v1[i]) }); if (i == 0) { x1 = (v1[100]) // x value when y value is 100 y1 = (c[100]) } if (i == 100) { x0 = (v[0]) // x value when y value is 0 y0 = (c[0]) } } I checked the values of x0, x2, y0 and y1 and it seems to store the correct values. To draw the connect line I used the following : svg.append('line') .attr('x1', x(function (d) { return x(d.x0); })) .attr('x2', x(function (d) { return x(d.x1); })) .attr('y1', y(function (d) { return x(d.y0); })) .attr('y2', y(function (d) { return x(d.y1); })) .style({ stroke: "#000000" }); But I cannot seem to connect those two points. Is there any other way ?
type: Question
has title: Connecting two points by a line with D3 JS
has comment: http://stackoverflow.com/comment/42564923
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42552753
answer count: 0

http://stackoverflow.com/q/27066343
has title: How to have angular controller respond to a variable's value change event
has comment: http://stackoverflow.com/comment/42646190
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27066581
answer count: 1
tagged with: angularjs
has body: I am building an application where I have several controllers controlling various parts of the page. I would like for them to respond to specific model change events. For example when $scope.Variable has a change of value, I would like for controller A to run a certain method etc. How do I respond to model change events with controllers in angular?
has answer: http://stackoverflow.com/a/27066581

http://stackoverflow.com/q/27015159
type: Question
tagged with: printing
answer count: 1
tagged with: javascript
tagged with: jquery
has title: How I can print the image when click the image link?
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/20612870
has body: Certificate Name I want to print 1.jpg when click to the class ".certBottom". How I can do it with?
has answer: http://stackoverflow.com/a/27015313
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/42555994

http://stackoverflow.com/q/27124859
linked to: http://stackoverflow.com/q/27169820
tagged with: jsp
tagged with: javascript
has answer: http://stackoverflow.com/a/27129539
score: 0
answer count: 1
has body: Hi i am giving a get request from a jsp page as shown below: <c:forEach items="${empNameInfo.empName}" var="empNameDetail"> Emp Details </c:forEach> And its working fine. But now i want to use it in java script so that i can refresh a particluar of other page (i.e. A.jsp having above code but from here i want to refresh the of B.jsp) so how i can give same kind of request in java script so that i can use load method and change a particular content. i mean how i can get ${empNameDetail.eName} ${empNameDetail.eNo} in javascript. or is their any other way to do the same pls let me know thanks in advance
accepted answer: http://stackoverflow.com/a/27129539
type: AnsweredQuestion
has title: how to give action in java script for get method using jsp values
type: Question
tagged with: jstl

http://stackoverflow.com/q/27076931
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27077065
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: How do you append a div to the div with the highest data attribute data-number? $( ".item" ).append( $( " " ) );
possible better answer: http://stackoverflow.com/a/27077065
has comment: http://stackoverflow.com/comment/42664515
has comment: http://stackoverflow.com/comment/42664558
has answer: http://stackoverflow.com/a/27077102
upvote count: 3
has comment: http://stackoverflow.com/comment/42664481
type: Question
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27077102
has title: How to find the highest data-attribute with js/jquery and append a div to it

http://stackoverflow.com/comment/42601446
comment on: http://stackoverflow.com/q/27039700
score: 0
type: QuestionComment
type: Comment
has text: I think that, if a field is empty, you shouldn't send it to your API at all. It may be the API role to check if data is available and react accordingly. For the JS part you wrote, you can simplify it by writing `dataObj.PRICES.gbp = inventory.prices.gbp || '';`

http://stackoverflow.com/comment/42777709
comment on: http://stackoverflow.com/q/27135056
score: 0
type: Comment
type: QuestionComment
has text: With the way you've defined `$parsers`, the directive will store formatted numbers to the model (i.e. if you entered `123456`, `$modelValue` will be set as `123,456`, which ends up being a string) every time you edit the associated input field. Instead of using `$parsers` and `$formatters`, why not consider a `$watch()` on the model value instead?

http://stackoverflow.com/q/27061532
has title: Recognize special key char without kycode
has answer: http://stackoverflow.com/a/27061746
type: UnansweredQuestion
score: 0
has body: If you hit backspace for instance the console shows an empty string for keyVal, but that is misleading because keyVal.length is equal to 1 and there's a hidden char element.on('keydown',function(e){ var keyVal = String.fromCharCode(e.keyCode); }); Is it possible to detect these special keys that doesn't input value? Probably without listing and checking their key codes. Or at least an efficient way of doing it with low risk of omitting any keys.
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42638741
answer count: 1

http://stackoverflow.com/a/61492286
type: Answer
downvote count: 0
score: 5
has body: There's a lot of good answers here. I needed a slightly different answer though. I wanted to be able to exclude middleware from all HTTP PUT requests. So I created a more general version of the unless function that allows a predicate to be passed in: function unless(pred, middleware) { return (req, res, next) =&gt; { if (pred(req)) { next(); // Skip this middleware. } else { middleware(req, res, next); // Allow this middleware. } } } Example usage: app.use(unless(req =&gt; req.method === "PUT", bodyParser.json()));
upvote count: 5
answers question: http://stackoverflow.com/q/27117337

http://stackoverflow.com/q/27025711
has comment: http://stackoverflow.com/comment/42574870
tagged with: javascript
has comment: http://stackoverflow.com/comment/42574792
score: 0
answer count: 3
upvote count: 1
has body: I have two which are created dynamically, OFF ON also this OFF ON Now i want to use this same JavaScript function but on different id. Example is: $(document).ready(function(){ $("#flipbutton1 ul li").click(function(){ $("#flipbutton1 ul li").removeClass("on"); $(this).addClass("on"); }); }); Problem: It should work in such a way that when I click flipbutton1 it should work the same way but when i click flipbutton2 it should chanhge #flipbutton1 to #flipbutton2. Any help would be appreciated. Regards,
downvote count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27025820
accepted answer: http://stackoverflow.com/a/27025935
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42574807
possible better answer: http://stackoverflow.com/a/27025816
has title: Same JavaScript function for two different buttons(I/O button)
has answer: http://stackoverflow.com/a/27025935
type: Question
has answer: http://stackoverflow.com/a/27025816

http://stackoverflow.com/q/27099911
has title: clicking twice on the same element and then on another element brings the first elment to the "clicked" state
has comment: http://stackoverflow.com/comment/42704284
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42715979
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27106624
accepted answer: http://stackoverflow.com/a/27106624
has body: I have an interactive illustration where you can hover over elements and then if you click on them you can see a popover and the clicked element gets black. It works quite good, but there is a problem with the click and hover code. If one clicks on the same element twice in a row and then on another element, the first element gets black. Try for yourself: http://labs.tageswoche.ch/grafik_osze Here is the code: var sourceSwap = function () { var $this = $(this); if (!$this.hasClass('active')) { var newSource = $this.data('alt-src'); $this.data('alt-src', $this.attr('src')); $this.attr('src', newSource); } }; var makeActive = function() { var $this = $(this); // bring the active back (if any) to the first state if ($('img.active').length) { var newSource = $('img.active').data('alt-src'); $('img.active').data('alt-src', $('img.active').attr('src')); $('img.active').attr('src', newSource); $('img.active').removeClass('active'); } $this.toggleClass('active'); } $(function() { $('img[data-alt-src]') .each(function() { new Image().src = $(this).data('alt-src'); }) .hover(sourceSwap, sourceSwap); $('img[data-alt-src]').on('click', makeActive); }); To try for yourself: http://jsfiddle.net/8wtvvka5/
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42711547
score: 0
has comment: http://stackoverflow.com/comment/42706886
answer count: 1

http://stackoverflow.com/comment/42564077
comment on: http://stackoverflow.com/q/27019679
has text: Please include code in your question. In future your link may be dead and this question would not be useful for future users.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27143363
accepted answer: http://stackoverflow.com/a/27152086
tagged with: d3.js
type: AnsweredQuestion
has body: tried to create a scatterplot which can be zoomed but only the axis is getting zoomed and not the data. Not able to figure out whats wrong anybody any help with this one?. github link of project : scatterplot with zoom
type: Question
has answer: http://stackoverflow.com/a/27152086
answer count: 1
tagged with: javascript
has title: d3js: scatterplot zoom. Only axis is zooming not the data
has comment: http://stackoverflow.com/comment/42794827
score: 0
tagged with: http://stackoverflow.com/tag/csv
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/42608122
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27036851
type: AnswerComment
has text: Ahh I see. Thank you. That helped. Can't vote up, need 15 reputation points. Never really ask/answer questions on SO. Need to be more active as I just started working :)

http://stackoverflow.com/a/33930281
type: Answer
upvote count: 1
score: 1
has body: I am seeking for a simple drag &amp; drop solution too, and found your post. It seems that hammer 1.1.3 not firing "pan" event. Also, "this" in the event listener refers to the function itself, and left/top uses string with "px". I modified your code a bit var element = $('.first').get(0); var hammertime = new Hammer(element); hammertime.on('pan', function(e) { var tapX, tapY; tapX = e.center.x; tapY = e.center.y; console.log(tapX + ' --- ' + tapY); element.style.left = tapX + "px"; element.style.top = tapY + "px"; }); http://jsfiddle.net/0fawast9/11/ Hope can help you despite the question is asked a year ago :)
answers question: http://stackoverflow.com/q/27123175
downvote count: 0

http://stackoverflow.com/q/27000209
tagged with: javascript
has title: FadeIn an Image after being fully loaded after ajax request
tagged with: jquery
linked to: http://stackoverflow.com/q/280049
tagged with: ajax
score: 0
type: UnansweredQuestion
has body: My main objective is to a load a reasonably large image in to my #pictureframe div and fadeIn the loaded image. The following code works well but the problem is that the image that is being loaded is not fading In as expected. My html page is &lt;div id="picture"&gt; &lt;div id="pictureframe"&gt; &lt;/div&gt; &lt;/div&gt; Also my Java script function is as follows $('#content').on('click',".lstimages .imgthumb",(function(){ var photoid = $(this).attr('alt'); $.ajax({ dataType: "json", url: '/ajax/pictureview/load/' + photoid, success: loadImg , error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); })); function loadImg(data) { $('#picture &gt; #pictureframe').hide().html("&lt;img alt='"+ data[0].pictureid +"' src='"+ data[0].filepath + "'&gt;").fadeIn(); }
has answer: http://stackoverflow.com/a/27000975
type: Question
answer count: 1

http://stackoverflow.com/a/30699431
has body: function checkTouching(img1, img2) { // checks if the two images are touching at any coordinate // given two objects with x, y, width, and height var touching = img1.x + img1.width &gt;= img2.x &amp;&amp; img1.x &lt;= img1.x + img1.width &amp;&amp; img1.height + img1.y &gt;= img2.y &amp;&amp; img2.y &lt;= img2.y + img2.y; if (touching) { // images are touching } else { // images aren't touching } }
score: 0
answers question: http://stackoverflow.com/q/27015284
has comment: http://stackoverflow.com/comment/49456999
type: Answer

http://stackoverflow.com/q/27000840
has title: How to define an element with a a sql row id usng JSON encoded data
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27001835
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27001835
has body: I'm using jQuery AJAX to process form data, the PHP side of it should delete two files on the server and then the SQL row in the database (for the id that was sent to it). The element containing the SQL row should then change color, move up, delete and the next SQL rows move into its place. The animation stuff occurs in the beforeSend and success functions of the ajax callback. This script is not working, when user clicks button, the page url changes to that of the php script but the item and files do not get deleted either on the server or in the database. Nor does any of the animation occur. This is my first time using jQuery ajax, I think there is a problem with how I define the element during the call back. Any help would be great: js $("document").ready(function(){ $(".delform").submit(function(){ data = $(this).serialize() + "&" + $.param(data); if (confirm("Are you sure you want to delete this listing?")) { $.ajax({ type: "POST", dataType: "json", url: "delete_list.php", data: data, beforeSend: function() { $( "#" + data["idc"] ).animate({'backgroundColor':'#fb6c6c'},600); }, success: function() { $( "#" + data["idc"] ).slideUp(600,function() { $( "#" + data["idc"] ).remove(); }); } }); return false; } }); }); php if (isset($_POST["id"])) { $idc = $_POST["id"]; if (isset($_POST["ad_link"]) && !empty($_POST["ad_link"])) { $ad_linkd=$_POST["ad_link"]; unlink($ad_linkd); } if (isset($_POST["listing_img"]) && !empty($_POST["listing_img"])) { $listing_imgd=$_POST["listing_img"]; unlink($listing_imgd); } try { require('../dbcon2.php'); $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "DELETE FROM listings WHERE id = $idc"; $conn->exec($sql); } catch (PDOException $e) { echo $sql . " " . $e->getMessage(); } echo json_encode($idc); } html <div id="record-<?php echo $id; ?>"> *bunch of stuff* <input name="id" type="hidden" id="id" value="<?php echo $id; ?>" /> <input …
tagged with: php
has comment: http://stackoverflow.com/comment/42531936
has comment: http://stackoverflow.com/comment/42531895
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42532036
has comment: http://stackoverflow.com/comment/42532130
type: Question
has comment: http://stackoverflow.com/comment/42531956
tagged with: javascript

http://stackoverflow.com/a/27482913
type: AcceptedAnswer
has body: i solved this by showing all columns, grabbing the data using the oTable.$('tr') and then hide the relevant columns again.
accepted answer of: http://stackoverflow.com/q/27131632
type: Answer
answers question: http://stackoverflow.com/q/27131632
score: 0

http://stackoverflow.com/comment/42653674
comment on: http://stackoverflow.com/a/27070146
type: AnswerComment
has text: I did it but its not triggering the webmethod. I updated my question with a screen shot of what I am getting on the response body now that i erase the contenType.
score: 0
type: Comment

http://stackoverflow.com/q/27022920
has title: AngularJS pass variable through to a template
type: AnsweredQuestion
has body: I want to pass a variable or text through to a template so that it shows the value inside my template. I come across jsFiddle which shows it working but it uses ng-repeat. Is there a simplere way to do this without using ng-repeat?
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42569931
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27023034
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27023034
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42569958

http://stackoverflow.com/q/27123272
duplicate of: http://stackoverflow.com/q/24080785
tagged with: internet-explorer
tagged with: internet-explorer-11
tagged with: javascript
tagged with: sorting
linked to: http://stackoverflow.com/q/51165
has title: array.sort() does not work in IE 11 with compareFunction
duplicate of: http://stackoverflow.com/q/51165
answer count: 1
has answer: http://stackoverflow.com/a/27123382
favorite count: 0
accepted answer: http://stackoverflow.com/a/27123382
has body: I'm sorting an array following JavaScript Array sort() Method. When I use a compareFunction parameter, Internet Explorer 11 is not sorting properly. I have a team array with players. These players have names: var team = [ {name:"Waldo"}, {name:"Sarah"} ]; But I want to display them at the stadium video board sort by alphabetical order. So I have a list to append them when the DOM is ready: MyHtml My Team after sorting Click here to sort by Name My Javascript code function sortAndDisplay(){ $("#myTeamAfter").empty(); team.sort(function(a, b){return a.name > b.name;}); for(var i=0; i < team.length; i++){ $("#myTeamAfter").append( " " + team[i].name + " " ); } } Problem is that some Clubs use Internet Explorer 11 at their stadiums, and sort() function when I use my own compareFunction is not working properly on IE11, so Waldo is displayed first than Sarah and the fans are confused. I've created a Plunker where you can reproduce it: Firefox 33.1 - Working!! :) Chrome 39.0.2171.65 - Working!! :) Internet Explorer 11.0.9600 - Not Working :( Any idea to resolve the sort() for every browser? Thanks!
tagged with: plunker
type: AnsweredQuestion
upvote count: 14
score: 13
downvote count: 1
type: Question

http://stackoverflow.com/comment/42572785
type: Comment
has text: Yep. I'm a bit rusty, have been writing driver software lately and was using jQuery's ready function previously. I suppose ultimately I like to see all javascript included in the head tag as a separate file.... Again, this was intended as a simplistic answer. Gave much more than was given. Thank you.
comment on: http://stackoverflow.com/a/27023567
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42684996
score: 7
has text: `else { return rec(); }` ?
comment on: http://stackoverflow.com/q/27088739
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27130851
type: AnsweredQuestion
has title: I made a code for my Gif of a bird to fly across the screen but the image isn't visible even though its in the same folder
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/gif
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27130914
has answer: http://stackoverflow.com/a/27130921
possible better answer: http://stackoverflow.com/a/27130921
accepted answer: http://stackoverflow.com/a/27130914
has body: Hi so I'm trying to learn how to cross a gif image across a part of my screen and the code works besides the fact that it doesnt show the image of my bird instead just a black box with an x in it and the words "Image of a bird". How ever my image is also in the same folder as my code. Any ideas where I'm wrong? Thanks in advance. &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Project 12&lt;/title&gt; &lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /&gt; &lt;link rel="stylesheet" href="../js_styles.css" type="text/css" /&gt; &lt;script type="text/javascript"&gt; /* &lt;![CDATA[ */ var topPosition = 150; var leftPosition = 0; function flyBird() { var bird = document.getElementById("bird"); bird.style.left = leftPosition + "px"; bird.style.top = topPosition + "px"; bird.style.visibility = "visible"; topPosition -= 3; leftPosition += 10; if (topPosition &lt;= 0) { topPosition = 150; leftPosition = 0; } } /* ]]&gt; */ &lt;/script&gt; &lt;/head&gt; &lt;body onload="setInterval('flyBird()', 100);"&gt; &lt;p&gt; &lt;img src="../bird.gif" id="bird" style="position: absolute; left: 500px; top: 281px; visibility:hidden" alt="Image of a bird" height="120" width="150" /&gt;&lt;/p&gt; &lt;h1&gt;Bird&lt;/h1&gt; &lt;blockquote&gt;&lt;p&gt;.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt;

http://stackoverflow.com/q/27008530
has answer: http://stackoverflow.com/a/27008615
has title: Angularjs not storing variable to $scope after AJAX call within $http.get request
type: Question
has answer: http://stackoverflow.com/a/27116673
score: 5
possible better answer: http://stackoverflow.com/a/27008615
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42545558
has body: I'm using angularjs and I can't get the following controller to save to a $scope variable the data returned from an AJAX request to Flickr. The $http.get makes a call to a locally saved json file. Upon success, it uses the json returned in success() to determine the appropriate url for the AJAX call to the Flickr API. Upon success of that call, I log the data to the console. So far so good, it returns an array of three objects. However, I'm trying to set that array to a $scope variable ($scope.photos) so I can iterate over it my view template. However, when I try outputing {{photos}} in the html there is nothing. I suspect this is a promise issue, and the template is rendering before the AJAX returns the data from Flickr, but I've been pouring over the docs with no success (looked at $q a little). I'm somewhat new to Angular and would appreciate your insight. Thanks! artistControllers.controller('PhotoController', ['$scope', '$http', '$routeParams', '$q', function ($scope, $http, $routeParams, $q){ $http.get('js/data.json').success(function(data){ $scope.artists = data; $.ajax({ type : "GET", dataType : "jsonp", url : $scope.artists[$routeParams.itemId].flickr, success: function(flickr){ $scope.photos = flickr.items; console.log($scope.photos); } }); }); }]);
answer count: 3
tagged with: flickr
accepted answer: http://stackoverflow.com/a/27116673
tagged with: angularjs
has answer: http://stackoverflow.com/a/27008592
linked to: http://stackoverflow.com/q/20720547
has comment: http://stackoverflow.com/comment/42545251
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42545728
upvote count: 5
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27041162
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42626688
type: Answer
has body: $timeout(function() { angular.element('#myselector').trigger('click'); }, 100); If you want trigger on press on enter key you need to write like that &lt;input ng-keyup="$event.keyCode == 13 ? myFunc() : null"&gt;
downvote count: 1
has comment: http://stackoverflow.com/comment/130294495
answers question: http://stackoverflow.com/q/27041064
has comment: http://stackoverflow.com/comment/76334774
score: 46
accepted answer of: http://stackoverflow.com/q/27041064
upvote count: 47

http://stackoverflow.com/a/27110527
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42724301
type: Answer
has body: With such a large array it sounds like AJAX would be a better solution. However, if you must use this pattern, you would first need to grab the productId value from the text of the element and then you can determine if it exists in the array. Something like this: var productId = $.trim($('#productID').text().split(':')[1]); if ($.inArray(productId, myArray) &gt;= 0) $('#prod_code').css('text-decoration', 'underline'); This is obviously a rather simple example, you would most likely need more validation on the extraction of the productId to make it more robust.
has comment: http://stackoverflow.com/comment/42724022
has comment: http://stackoverflow.com/comment/42724237
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/42732031
answers question: http://stackoverflow.com/q/27110423
accepted answer of: http://stackoverflow.com/q/27110423

rails-engines
tags question: http://stackoverflow.com/q/27067751
tag name: rails-engines
type: Tag

http://stackoverflow.com/a/27003663
answers question: http://stackoverflow.com/q/27003051
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42601620
type: Answer
has body: You can do it with JavaScript/jQuery and iframes. You need --of course-- to allow cross origin requests manually or with an addon Write a HTML page that will hold the checkdomain.com iframe and your JavaScript/jQuery code that handles your operations (sending requests, grabbing values, saving data...)
downvote count: 0
has comment: http://stackoverflow.com/comment/42601324
score: 1
accepted answer of: http://stackoverflow.com/q/27003051

http://stackoverflow.com/q/27098216
upvote count: 2
possible better answer: http://stackoverflow.com/a/27098590
accepted answer: http://stackoverflow.com/a/27100577
answer count: 2
has answer: http://stackoverflow.com/a/27098590
has body: i have three different divs red, blue, green and yellow. red contains an input box. am trying to hide yellow if the input box in red is clicked(focus) and if the screen size is below 500. it does work but only if i reload the page is there any way to make it work without reloading the page? html top middle bottom js if ($(window).width() < 960) { $(function(){ $(".s").on("focus",function() { $(".yellow").hide(); }); $(".s").on("blur",function() { $(".yellow").show(); }); }); } else { } css .red, .blue, .green, .yellow { padding: 10px; border: 1px solid #f00; } .red{ background: red; } .blue{ background: blue; } .green{ background: green; } .yellow{ background: yellow; } .s:focus{ border: 1px solid black; } .s:focus + yellow{ display: none; }
has comment: http://stackoverflow.com/comment/42701505
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27100577
tagged with: javascript
tagged with: jquery
has title: running jquery media query without reload
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42701429

http://stackoverflow.com/comment/42706652
score: 0
type: AnswerComment
has text: how do i work above script without support of `jquery` is there any method because i don't use `jquery` in my page so is there any way to skip jquery
type: Comment
comment on: http://stackoverflow.com/a/27100987

http://stackoverflow.com/comment/42707941
comment on: http://stackoverflow.com/q/27099330
type: Comment
type: QuestionComment
has text: It's obviously an issue with the encoding, impossible to give an answer without more details(how do you print the result). Note: JSON is always encoded in UTF-8. For me the result of the returned JSON is equal to the result of the clientside geocoding: https://maps.googleapis.com/maps/api/geocode/json?latlng=25.01482,121.42633&language=zh-TW&sensor=false
score: 0

http://stackoverflow.com/q/27050871
has comment: http://stackoverflow.com/comment/42619317
possible better answer: http://stackoverflow.com/a/27050995
answer count: 2
has body: i'm trying to get my head around how to make a jasvascript function with optional callback parameters I'm not sure of the technical term for what i'm trying to achieve, so it makes searching for the solution difficult, however this is probably useful for other newcomers I'e, usage would be as follows MyFunction({ start: function() { }, end: function() { } });
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/27050996
favorite count: 0
has comment: http://stackoverflow.com/comment/42619130
has title: How to make a javascript function with optional callback paramters
upvote count: 3
downvote count: 2
has comment: http://stackoverflow.com/comment/42619249
accepted answer: http://stackoverflow.com/a/27050996
has comment: http://stackoverflow.com/comment/42619118
type: Question
has answer: http://stackoverflow.com/a/27050995
type: AnsweredQuestion

http://stackoverflow.com/comment/42806451
score: 0
type: AnswerComment
has text: And in the tablets can't draw nothing...maybe is missing a library?? do you know how can works in tablets and mobile
type: Comment
comment on: http://stackoverflow.com/a/27138305

http://stackoverflow.com/q/27140292
upvote count: 1
tagged with: unit-testing
has answer: http://stackoverflow.com/a/27140317
tagged with: typescript
score: 1
has body: I am planning to use either CoffeeScript or TypeScript in one of my project which transcompiles to JavaScript. And I would like to use Jasmine/Mocha unit testing framework. But I could not find proper answers to below questions in google. Which is correct, testing complied JavaScript or CoffeScript/TypeScript and Why ? Does it make sense to use TypeScript/CoffeeScript to write testcases as well ?
tagged with: coffeescript
tagged with: integration-testing
has title: Unit testing Compiled JavaScript?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42778730
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/43846149
favorite count: 0
has answer: http://stackoverflow.com/a/27140328
type: UnansweredQuestion

http://stackoverflow.com/comment/42639558
comment on: http://stackoverflow.com/q/27062629
score: 0
has text: @lolka_bolka: I've already tried that. Can it have something to do with $_FILES['file']['tmp_name']? The output of that is like this: /tmp/phpIi0Y4q
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27112527
has answer: http://stackoverflow.com/a/27114309
type: UnansweredQuestion
has body: There are 2 things that the linked function doesn't account for that I was hoping to figure out: If you select checkboxes individually, the button doesn't change its displayed value to "Deselect All". If you select a single checkbox and then deselect the same checkbox, the "Select All" button is set to uncheck first - even if there is nothing checked. http://jsfiddle.net/point71echo/pxxnhb35/3/ HTML: Item 1 Item 2 Item 3 Item 4 jQuery: $(document).ready(function(){ // below code is used to remove all check property if, // user select/unselect options with class first options. $(".first").click(function(){ $("#checkAll").attr("data-type","uncheck"); $(this).val('Select All'); }); $("#checkAll").attr("data-type","check"); $("#checkAll").click(function(){ if($("#checkAll").attr("data-type")==="check") { $(".first").prop("checked",true); $("#checkAll").attr("data-type","uncheck"); $(this).val('Deselect All') } else { $(".first").prop("checked",false); $("#checkAll").attr("data-type","check"); $(this).val('Select All'); } }) });
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27112750
tagged with: button
has title: Changing button value based on checkboxes selected individually
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox

http://stackoverflow.com/q/27024770
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27024841
tagged with: php
accepted answer: http://stackoverflow.com/a/27024841
possible better answer: http://stackoverflow.com/a/27024867
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27024867
downvote count: 0
type: Question
has title: How to submit the form in focus
has comment: http://stackoverflow.com/comment/42573205
score: 1
tagged with: forms
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42573197
favorite count: 0
has body: Have you seen facebook comment box? I am trying to make a very similar comment box with textareas. for that I have many forms in my page beneath "wall posts". Each form has a class of comment-form and inside that form I have textarea for comment. each of those textarea has a class of comment-textarea. I want to submit a comment on enter. for that I have a javascript $('.comment-textarea').keypress(function(e){ if(e.which == 13 &amp;&amp; e.shiftKey){ } else if(e.which == 13){ e.preventDefault(); $('.comment-form').trigger('submit'); } }); but since i have many forms in the page, I don't know how to submit the form which is on focus.

http://stackoverflow.com/a/27470257
has body: replace your 'BodyCtrl' by this: blackoutApp.controller('BodyCtrl', 'ngDialog', ['$scope', function ($scope, $rootScope, ngDialog) { $scope.menus = [ {'link' : '#/', 'name' : 'main'}, ]; $scope.videoButtons = [ {'class' : 'tubular-play', 'name' : 'Play'}, {'class' : 'tubular-pause', 'name' : 'Pause'}, ]; $scope.open = function () { ngDialog.open({template: 'templates/Popup.tpl.html', controller: 'OpenCtrl'}); }; }]);
score: 0
answers question: http://stackoverflow.com/q/27014133
accepted answer of: http://stackoverflow.com/q/27014133
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/42757107
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27062464
type: AnswerComment

http://stackoverflow.com/comment/42603590
score: 1
has text: Could you show a full example of the string? Did you already try putting it in a jQuery object and just search for the div?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27042038

http://stackoverflow.com/a/27081427
answers question: http://stackoverflow.com/q/27081139
has body: see demo here look this line quantity = document.getElementById('#quantity'); in this line remove '#' quantity = document.getElementById(**'quantity'**); and use parseint to convert to integer var price = quantity * ($list['price']); $list['price'] is false to get price you need to do like this: document.getElementById('price').value; final code is : form.php //database query &lt;td align='middle'&gt;&lt;input type="number" onChange="update(this)" id="quantity" name="quantity" min="1" max='&lt;?php echo $list['quantity'] ?&gt;' value='1'&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="price" value='&lt;?php echo $list['price'] ?&gt;' readonly&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="amount" id="amount" readonly&gt;&lt;/td&gt;` script.js &lt;script type="text/javascript"&gt; function update(form){ var quantity = document.getElementById('quantity').value; var price = document.getElementById("price").value; price = parseInt(price); quantity = parseInt(quantity); var amount= quantity * price ; document.getElementById("amount").value = amount; } &lt;/script&gt;`
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42679516

http://stackoverflow.com/comment/42694205
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27089769
has text: http://alvarotrigo.com/fullPage/#secondPage - Here is the demo and you can see the arrows. If you analyze the page with the inspector you are able to see that the divs containing the arrows are are respectively "fp-controlArrow fp-prev" and "fp-controlArrow fp-next". Changing in the CSS of the plugin, the border from solid to none, the entire divs disappear.

http://stackoverflow.com/comment/42707545
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27101064
has text: You will have to manually open a window then as far as I know, with `window.open`.
score: 0

http://stackoverflow.com/a/27150120
has body: You didn't include jQuery file and/or your jQuery is included too late (i.e. after including your JS file) Use browser's dev tools to check the order of inclusions.
upvote count: 2
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27150070
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27150070

http://stackoverflow.com/comment/42611133
comment on: http://stackoverflow.com/q/27046210
has text: I find this hard to understand: _"can change permenantly change in html"_
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27051761
has body: I use jquery form plugin and i try show the result when i submit my form in one div but no get result &lt;script&gt; jQuery(document).ready(function() { jQuery('#base64').ajaxForm( { dataType:'json', success:edit64, target: '#htmloutput' }); }); function edit64(datasend64) { if (datasend64.edit_result64=="ok") { jQuery('#htmloutput').fadeIn('slow'); } } &lt;/script&gt; I donñt know if i put all well or no , i try mant times and no get the result of form inside div , only show nothing &lt;div id="htmloutput" style="display:none;"&gt;&lt;/div&gt; &lt;form action="admin_db_edit.php" name="base64" id="base64" method="post"&gt; &lt;input type="text" name="value_base64" value="" class="db_edit_fields" /&gt; &lt;input type="hidden" name="send64" value="ok" /&gt; &lt;input type="submit" name="send" value="send" class="db_edit_submit" /&gt; &lt;/form&gt; Thank´s for the help , regards
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42620726
has title: jquery form plugin and show content of div
has answer: http://stackoverflow.com/a/27051845
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27051934
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/27049957
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27002160
type: Answer
answers question: http://stackoverflow.com/q/27002160
score: 1
upvote count: 1
has body: I assume you are calling setBufferName(Planets) before you call initBuffers(Planets). So setBufferName(Planets) will set VertexPositionBuffer[i] to a name, VertexPositionBuffer[i] = Planets[i].name+"VertexPositionBuffer"; but then initBuffers(Planets) will set VertexPositionBuffer[i] to a WebGLBuffer, VertexPositionBuffer[i] = gl.createBuffer(); So you will lose your name. I suggest you call setBufferName(Planets) after initBuffers(Planets) and change it so that you add a name property to the VertexPositionBuffer[i]. Like so: function setBufferName(Planets) { for(var i = 0; i &lt; Planets.length; i++) { VertexPositionBuffer[i].name = Planets[i].name+"VertexPositionBuffer"; VertexColorBuffer[i].name = Planets[i].name+"VertexColorBuffer"; VertexIndexBuffer[i].name = Planets[i].name+"VertexIndexBuffer"; } } Of course all this holds true for VertexColorBuffer[i] and VertexIndexBuffer[i] as well. If you had something else in mind for where you wanted the name to be let me know, but I think this fix is what you want.

http://stackoverflow.com/comment/42574411
type: QuestionComment
has text: @Jonathan This would be for a general use case. Of course you can transition color with CSS but D3 has much more functionality than CSS that I would like to utilize.
comment on: http://stackoverflow.com/q/27025397
score: 0
type: Comment

http://stackoverflow.com/comment/42753605
score: 0
has text: Did you see this question: http://stackoverflow.com/q/2246631/694325 ? If that did not satisfy your needs, describe the problem that you face and what you did to try and fix it. If it helps, close this question :)
comment on: http://stackoverflow.com/q/27123782
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27116707
answers question: http://stackoverflow.com/q/27115984
has body: When you inject the service, it returns the object you return from your service function, which has two properties, an empty array array and a function named removeItem. When you call removeItem, it sets the value of the array var in your function scope, but it does not alter the value on your returned object. Try this: function MyService() { var obj = { array: [], removeItem: function removeItem(idx) { obj.array = obj.array.filter(function(item) { return item.index !== idx; }); } }; return obj; }
score: 0
type: Answer

http://stackoverflow.com/comment/42594299
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27019432
type: AnswerComment
has text: Its ok done it :) - thanks for your help !

http://stackoverflow.com/q/27115340
score: 0
linked to: http://stackoverflow.com/q/4244896
answer count: 1
duplicate of: http://stackoverflow.com/q/4244896
has title: Reference Object Member By String Name?
type: UnansweredQuestion
type: Question
tagged with: object
has body: Sorry for the odd question name folks, I'm not sure I properly know how to phrase this question, but I am working with javascript, and would like to reference an objects member, but abstractly by string, is this possible in JavaScript? (or any language for that matter?) eg,.. The MemberName is determined when the function is run, could be 'Product Code' for example, but selected row will always represent a selected row in a grid. is this even possible? I am trying to create a generic function which will allow me to pass any grid to it, with the name of the column i want the value from - if that helps. function GetSpecificColumnFromSelectedRow(SelectedRow, MemberName) { return SelectedRow.MemberName; }
has answer: http://stackoverflow.com/a/27115362
tagged with: javascript

http://stackoverflow.com/comment/42802717
comment on: http://stackoverflow.com/a/27134507
type: AnswerComment
has text: The `.queue()` method works for me! but I switch to `jsdom` with jQuery instead of `cheerio` sine it has no `.queue()` method
type: Comment
score: 1

http://stackoverflow.com/comment/43679512
type: AnswerComment
comment on: http://stackoverflow.com/a/27614430
type: Comment
has text: I simplified your demo a bit: jsfiddle.net/Marventus/3qzodpn2, and in mine the divs are never off by more than one pixel (always on zoom > 100%), and only for the elements inside containers set to `overflow: hidden`.
score: 1

http://stackoverflow.com/a/28440275
has body: First, I don't think you can change the tile size to 190*190. 256*256 is the grid on Google's basic map canvas. Secondly, your image will pan in respect to your zoom levels. Pay attention to this comment: // tile range in one direction range is dependent on zoom level // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc You mentioned you want to take care of zoom levels later on but you tiles will load based on the zoom level you gave. For example: at zoom level 0 - 1 tile; for zoom level 1 - 2 tiles and so forth. And lastly, when you hardcode and you get two rows is one of the rows cropped by 124 pixels (either from all edges or a set thereof)? Because I think what's happening there is since you hardcoded it is being loaded but its being split on the basic grids to accommodate. Hope this helps. PS: Here's an article that should help clarify the whole concept.
answers question: http://stackoverflow.com/q/27106353
score: 0
type: Answer

http://stackoverflow.com/a/27072398
has comment: http://stackoverflow.com/comment/42663419
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42662227
upvote count: 1
type: Answer
has body: The structure you want it to become should work just as well as the original one, since it's still essentially a 3-level array as before, but since you're now wrapping things in Objects, you have to adjust the way the sub-arrays are accessed when rendered. I've marked those 3 places like &lt;-- THIS: var level = svg.selectAll(".level") .data(data) .enter().append("g") .attr("transform", function(d, i) { return "translate(" + (i * 200) + "," + Math.pow(2,i)*matchY/2 + ")"; }) .attr("class", "level"); var match = level.selectAll(".match") .data(function(d) { return d.matches ; })// &lt;-- THIS .enter().append("g") .attr("transform", function(d, i, j) { return "translate(0," + (Math.pow(2,j)*i*matchY) + ")"; }) .attr("class", "match"); var player = match.selectAll(".player") .data(function(d) { return d.seeds; })// &lt;-- THIS .enter() .append("g") .attr("transform", function(d, i) { return "translate("+ (playerOffsetX) + "," + (i == 0 ? 0 : (rectY+rectGapY)) + ")"; }) .attr("class", "player"); player.append("rect") .attr("width", rectX) .attr("height", rectY) .attr("class", "player"); player.append("text") .attr("x", 3) .attr("y", rectY / 2) .attr("dy", ".35em") .text(function(d) { return getPlayerByIdOrSomethingLikeThat(d); });// &lt;-- THIS Unless I'm overlooking something, that'll work. Regarding the 2nd question, I think the force layout (not cluster) is what you'll want look at and learn from — not because the force layout is moving nodes around (which you're not) but because most force layout examples have nodes AND links (which you do too). In that case, you want to express the links as an Array of Objects that map source to target: [ { source: {...}, target: {...} }, { source: {...}, target: {...} }, { source: {...}, target: {...} }, ... ] because then you can do the whole d3.select(...).selectAll(...).data(...).enter().append('line') business as usual, to append the lines that connect them. I.e. that would be convenient since it is a 1 to 1 mapping between so…
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27068605
score: 1
answers question: http://stackoverflow.com/q/27068605

http://stackoverflow.com/q/27007089
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42543088
has comment: http://stackoverflow.com/comment/42543120
has comment: http://stackoverflow.com/comment/42543413
has title: Integrate a variable from within a function
type: Question
has body: I am having troubles getting the total hours needed depending on method of transport. This is my first code as a lesson to familiarize myself with coding. Javascript: $(document).ready(function() { $('#calculateTotal').click(function () { var a = ($('#car').val()) ? parseInt($('#car').val()) : 0; var c = ($('#bus').val()) ? parseInt($('#bus').val()) : 0; document.getElementById("qr1").onclick = function() { if (this.checked) { var b = 1; } else { b = 0; } }; var totalTime = a+b+c; $('#total').html(totalTime); }); }); var b is not being recognized as a variable when I click on Calculate Total. Can anyone show me the way as to how to declare var b in a way that makes sense in coding? Thank you.
has comment: http://stackoverflow.com/comment/42543001
has answer: http://stackoverflow.com/a/27007114
has comment: http://stackoverflow.com/comment/42543081
has comment: http://stackoverflow.com/comment/42542997
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27007114

http://stackoverflow.com/comment/42725954
type: QuestionComment
comment on: http://stackoverflow.com/q/27013355
has text: You can access bootstrap scope of addon from everywhere: http://stackoverflow.com/questions/22057888/controlling-a-firefox-extension-via-javascript/22099148#22099148
score: 0
type: Comment

http://stackoverflow.com/q/27113743
tagged with: multiple-columns
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27113839
has comment: http://stackoverflow.com/comment/42730322
has answer: http://stackoverflow.com/a/27113839
has comment: http://stackoverflow.com/comment/42730858
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42730253
has body: I'm trying to set the columns in my row to have equal heights and it seems that this script is not working. It is making my columns equal BUT setting the heights to 0px. JS var EqualColumnHeight = { equalizeColumnHeights: function() { if ($( window ).width() > 720) { //$('.row .equal-height').equalHeights(); $('.equals .equal-height').each( function () { $(this).css('height', $(this).parent().height()+'px'); }); } else { $('.equals .equal-height').each(function() { $(this).css('margin-bottom', '40px'); }); } } }; $(window).load(function () { EqualColumnHeight.equalizeColumnHeights(); }); CSS .dark-box { background: rgba(9,31,38,.8); color: #fff; padding: 30px; } HTML Proin commodo metus id aliquam egestas Donec lobortis elit nunc, vitae tristique odio dictum in. Curabitur risus dui, porta non malesuada id, dapibus et ex. Suspendisse euismod nec risus ac vehicula. Cras lobortis tellus id maximus laoreet. Sed sit amet aliquam ex, ut malesuada justo. Aliquam id lacus at leo faucibus interdum vel nec urna. Ut sed urna in elit consectetur laoreet Etiam finibus dapibus urna, in eleifend lorem molestie a. Nulla tincidunt quis lectus sit amet tincidunt. Nunc vehicula feugiat leo, at pretium erat lacinia posuere. Mauris posuere odio non urna suscipit, vel imperdiet dolor fermentum. Etiam finibus scelerisque molestie. Aenean bibendum est lacus, ac sollicitudin est cursus ut. Nam sed ante vel nulla mollis tincidunt. Phasellus nec massa lacinia, accumsan velit sit amet, cursus mauris. Pellentesque ligula nulla, elementum ac risus in, volutpat efficitur odio. Nullam ut arcu venenatis, molestie mauris sit amet, egestas metus.
type: Question
has title: Equal heights of columns in a row with jquery
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42834219
comment on: http://stackoverflow.com/q/27119223
score: 0
type: Comment
type: QuestionComment
has text: It is jpeg/png type Image. I dont want to use any jquery plug-ins to crop the image. But i am not able decide which JavaScript library I should use.

http://stackoverflow.com/a/27003813
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27003505
has body: All the columns sorted or at least tried to sort for me accept for the first name column. However you were setting your headers up incorrectly. you had headers : { // set "sorter : false" (no quotes) to disable the column 0: { sorter: "text" }, 1: { sorter: "digit" }, 2: { sorter: "text" }, 3: { sorter: "url" } }, it should be changed to headers : { // set "sorter : false" (no quotes) to disable the column 0: { sorter: "text" }, 1: { sorter: "text" }, 2: { sorter: "text" }, 4: { sorter: "url" } }, as column 0 is your last name column 1 is your first name column 2 is an email which are all text column 3 is the money and if you do not include it jquery does its best to interpret which in this case works better than using the digit since its money. Doing that the jsfiddle works fine for me http://jsfiddle.net/4eLyj4gr/4/

http://stackoverflow.com/comment/42636147
score: 0
comment on: http://stackoverflow.com/a/27050266
has text: updated the jsfiddle (http://jsfiddle.net/qrdwknzx/2/). The problem is that the title will be inserted in front of the graph container (in the fiddle #divForGraph). Therefore simply remove the `prev()` element too (if you actually use the title)
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42751750
type: Comment
comment on: http://stackoverflow.com/q/27125922
has text: http://stackoverflow.com/questions/6092400/is-there-a-way-to-check-if-geolocation-has-been-declined-with-javascript
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42674746
type: QuestionComment
comment on: http://stackoverflow.com/q/27073119
type: Comment
has text: If `loadHTMLfunction` loads "all" of your HTML, which may not really make sense anyways, then need to put all of your Events in there. The bottom line is that an Element has to exist at the time the JavaScript is written, unless your using an `onload` Event to wrap all of the code inside, or something Asynchronous.
score: 0

http://stackoverflow.com/comment/42711095
type: Comment
comment on: http://stackoverflow.com/a/27103598
score: 0
type: AnswerComment
has text: Thank you, it kinda works but it matches a space in the beginning

http://stackoverflow.com/a/27139058
answers question: http://stackoverflow.com/q/27138811
type: Answer
has body: Your problem is ...SET like=... 'like', 'status', 'timestamp' etc are reserved sql statement so if you must use them as field name, you have to put them in the marks eg ...SET `like`='$like'...
score: 0

http://stackoverflow.com/a/27100671
has comment: http://stackoverflow.com/comment/42705583
has body: Easy, objects aren't technically pushed to but instead you define new keys on that object. Switch your Array for an object literal and just add the key to it. var allUsers = {}; function addObjectToObject(userData) { //logic allUsers[userData.userId] = newuserData; }
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27100641
score: 4
accepted answer of: http://stackoverflow.com/q/27100641
has comment: http://stackoverflow.com/comment/42705563
type: Answer
has comment: http://stackoverflow.com/comment/42705628

http://stackoverflow.com/q/27151862
has title: Find out what js file was loaded, but not used
favorite count: 0
has body: Is there a way to know what js files was loaded in html, but not used? Let's say I load on a HTML page jQuery, jQuery Tabs, jQuery DatePicker libs, but on that page I use none o them, except jQuery. Is there a way to find out what js files where used ( executed )?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27152058
answer count: 4
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/27152148
type: Question
has answer: http://stackoverflow.com/a/27152246
has answer: http://stackoverflow.com/a/27152229
tagged with: javascript
upvote count: 3
tagged with: developer-tools

http://stackoverflow.com/q/27102765
has title: When removing last element, jquery removes first element
tagged with: javascript
tagged with: jquery
score: -1
downvote count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42709503
has comment: http://stackoverflow.com/comment/42709344
favorite count: 0
type: UnansweredQuestion
has body: I am trying to remove last div from the html DOM, when i click remove last button. Here is jquery code: $('#remove-last').click(function(){ $('#ed').last().remove(); }); Here is my html LaLa LaLa LaLa But the jquery code removes first element, and I need to remove last?? What is wrong here? The divs and id are generated dynamical by jQuery, (what peace of code are before function that removes div) then user press ad new field button.
has answer: http://stackoverflow.com/a/27102915
type: Question

http://stackoverflow.com/a/27083612
accepted answer of: http://stackoverflow.com/q/27083453
answers question: http://stackoverflow.com/q/27083453
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42676711
type: Answer
has comment: http://stackoverflow.com/comment/42676673
downvote count: 0
has body: Here is solution that works on page load: &lt;script language="javascript"&gt; $(document).ready(function() { $.ajax({ type: 'POST', url: $('#form').attr('action'), data: $('#form').serialize(), success: function(data) { $('#result').html(data); } }) })
score: 1

http://stackoverflow.com/comment/42635423
type: QuestionComment
type: Comment
has text: yes i have tried and implemented the video chat but some browsers not support the tokbox thats what i need to identify and show one popup , the browser is not supported
comment on: http://stackoverflow.com/q/27037380
score: 0

http://stackoverflow.com/comment/42575669
type: Comment
comment on: http://stackoverflow.com/q/27021381
has text: You could try calling [Meteor.disconnect()](http://docs.meteor.com/#/full/meteor_disconnect).
score: 0
type: QuestionComment

object
tags question: http://stackoverflow.com/q/27091888
tag name: object
tags question: http://stackoverflow.com/q/27010347
tags question: http://stackoverflow.com/q/27051376
tags question: http://stackoverflow.com/q/27115300
tags question: http://stackoverflow.com/q/27119684
tags question: http://stackoverflow.com/q/27044618
tags question: http://stackoverflow.com/q/27066247
tags question: http://stackoverflow.com/q/27000562
tags question: http://stackoverflow.com/q/27097176
tags question: http://stackoverflow.com/q/27001983
tags question: http://stackoverflow.com/q/27100641
tags question: http://stackoverflow.com/q/27099105
tags question: http://stackoverflow.com/q/27021579
tags question: http://stackoverflow.com/q/27069847
tags question: http://stackoverflow.com/q/26995548
tags question: http://stackoverflow.com/q/27055578
tags question: http://stackoverflow.com/q/27115729
tags question: http://stackoverflow.com/q/27081637
tags question: http://stackoverflow.com/q/27020521
tags question: http://stackoverflow.com/q/27089647
tags question: http://stackoverflow.com/q/27025066
tags question: http://stackoverflow.com/q/27064389
tags question: http://stackoverflow.com/q/27147312
tags question: http://stackoverflow.com/q/27047222
tags question: http://stackoverflow.com/q/27135873
tags question: http://stackoverflow.com/q/26997647
tags question: http://stackoverflow.com/q/27028394
tags question: http://stackoverflow.com/q/27123911
tags question: http://stackoverflow.com/q/27115340
tags question: http://stackoverflow.com/q/27017711
tags question: http://stackoverflow.com/q/27014281
tags question: http://stackoverflow.com/q/27047112
tags question: http://stackoverflow.com/q/27049850
tags question: http://stackoverflow.com/q/27063140
tags question: http://stackoverflow.com/q/27046587
tags question: http://stackoverflow.com/q/27143720
type: Tag
tags question: http://stackoverflow.com/q/27146231
tags question: http://stackoverflow.com/q/27015028

http://stackoverflow.com/a/62450321
upvote count: 1
answers question: http://stackoverflow.com/q/27054951
downvote count: 0
has body: I found a problem with the previous answer. I'm posting here my tested solution. The problem with the previous answers they are not considering the day. For solve it you must use the last day of the month. To find it in Javascript you can use setFullYear(year, month, day) where the day is zero. Bonus: month in javascript is 0 - 11 But when you set a month you shouldn't use month - 1. Ex: setFullYear(2020, 6, 0) // -> 31 Jun 2020. const today = new Date(); const ed = new Date(); ed.setFullYear(year, month, 0); if (ed &lt; today) { }
type: Answer
score: 1

http://stackoverflow.com/comment/42986113
type: Comment
comment on: http://stackoverflow.com/a/27239561
has text: Theres nothing special about the HTML, I updated the question above with the HTML. I simply would like to simplify your code as much as possible. I can handle selecting the elements and adding the variable BLOB appropriately, I wouldnt know what to remove because im not a raw javascript expert.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26992852
type: Question
has answer: http://stackoverflow.com/a/26992951
has answer: http://stackoverflow.com/a/26993003
has title: alert when counter reach specific time
upvote count: 5
tagged with: javascript
has body: I am using this jquery Count up (http://demo.tutorialzine.com/2012/09/count-up-jquery/) and i am trying to make an alert when the counter reach 00:01:05:40 (one hour - 5 minutes and 40 seconds) i am not an expert and so far i tried the code bellow: &lt;script&gt; $(document).ready(function(){ var mytime = $('#countdown').html(); if (mytime == "00:01:05:40"){ alert ('Done'); } }); &lt;/script&gt; Source code: http://tutorialzine.com/2012/09/count-up-jquery/ Thanks
has answer: http://stackoverflow.com/a/26993010
has comment: http://stackoverflow.com/comment/42516671
score: 5
has answer: http://stackoverflow.com/a/26992945
downvote count: 0
has comment: http://stackoverflow.com/comment/42516803
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26992951
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26993003

http://stackoverflow.com/a/27053893
has body: Your question is hard to understand, but based on your js code, maybe is this what you want &lt;script&gt; var open = false; $( "video" ).attr("width", "150"); $( "video" ).attr("height", "80"); $( "video" ).click(function() { if(open){ $(this).attr("width","150"); $(this).attr("height","80"); open = false; }else{ $(this).attr("width","500"); $(this).attr("height","500"); open = true; } } ); &lt;/script&gt;
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27053755
accepted answer of: http://stackoverflow.com/q/27053755
type: Answer

http://stackoverflow.com/q/27097319
has comment: http://stackoverflow.com/comment/42700194
has answer: http://stackoverflow.com/a/27098632
type: AnsweredQuestion
has body: Currently I have three divs first div has 3 text box's with .change whenever input is typed in, works fine second div has 2 date select inputs works fine moves to next on input. The problem i am running into here is that i have added a &lt;select&gt; form and it has 6 options but I cant find a way to make it .change whenever the select form has been modified is .change able to do this or is there some other way? here is my js I know its sloppy $("#areyourfrom,#areyourgoing").change(function() { if ($("#areyourfrom").val() != '' &amp;&amp; $("#areyourgoing").val() != '') { $('.when input').attr('disabled', 0); $('.when img.whenImg').attr('src', '&lt;?php echo $host;?&gt;/images/when.png'); $('.where img.whereimage').attr('src', '&lt;?php echo $host;?&gt;/images/where02.png'); $("#date02").attr("disabled", false); $("#date01").attr("disabled", false); $("#flexibleDates").attr("disabled", false); $('.when .line').addClass('active'); $('.when .info').addClass('active'); $('.where .line').removeClass('active'); $('.where .info').removeClass('active'); } $("a[href*='where']").add('.where input').click(function() { $('.where .line').addClass('active'); $('.where .info').addClass('active'); $('.where img.whereimage').attr('src', '&lt;?php echo $host;?&gt;/images/where.png'); $('.when img.whenImg').attr('src', '&lt;?php echo $host;?&gt;/images/when02.png'); $('.who img.whoImg').attr('src', '&lt;?php echo $host;?&gt;/images/who02.png'); $("#date02").attr("disabled", false); $("#date01").attr("disabled", false); $("#flexibleDates").attr("disabled", false); $('.when .line').removeClass('active'); $('.when .info').removeClass('active'); $('.who .line').removeClass('active'); $('.who .info').removeClass('active'); }) $("a[href*='when']").add('.when input').click(function() { $('.when img.whenImg').attr('src', '&lt;?php echo $host;?&gt;/images/when.png'); $('.where img.whereimage').attr('src', '&lt;?php echo $host;?&gt;/images/where02.png'); $('.who img.whoImg').attr('src', '&lt;?…
has comment: http://stackoverflow.com/comment/42700086
has comment: http://stackoverflow.com/comment/42700096
downvote count: 2
possible better answer: http://stackoverflow.com/a/27098632
has comment: http://stackoverflow.com/comment/42699982
has comment: http://stackoverflow.com/comment/42700059
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42699986
accepted answer: http://stackoverflow.com/a/27118246
tagged with: javascript
score: -1
has title: .change(function() changing whenever a has input
answer count: 2
has comment: http://stackoverflow.com/comment/42699951
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42699987
has comment: http://stackoverflow.com/comment/42700016
has answer: http://stackoverflow.com/a/27118246

http://stackoverflow.com/comment/42631556
comment on: http://stackoverflow.com/q/27055362
type: Comment
type: QuestionComment
score: 0
has text: see my answere and try this first and tell me the result :)

http://stackoverflow.com/comment/42661011
score: 0
has text: Do you get any error in the console? There must be some errors.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27074705

http://stackoverflow.com/q/27139275
accepted answer: http://stackoverflow.com/a/27438014
type: Question
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/27438014
tagged with: javascript
tagged with: jquery
score: 4
linked to: http://stackoverflow.com/q/27954641
has title: HTML drag and drop dashboard with resizable elements
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
tagged with: drag-and-drop
has body: I'm trying to develop a control where one must be able to add elements, move and resize them. The idea is to draw small diagrams by dragging some elements to the dashboard. Here is what I'm trying to accomplish: The dashboard must have fixed boundaries (left/right/bottom/top). Elements should collide with them and not go beyond. Elements can be added with a button or dragged from a repository Elements must be resizable Elements should collide Elements must be movable - freestyle, NOT adjust at the top like gridster or gridstack. I need to be able to put an element at the bottom or at the middle of the dashboard and have empty spaces. I must be able to get all the necessary data from the elements in order to store and recreate the dashboard (save &amp; load). I started by creating this small test project using the drag &amp; drop features, but soon got the feeling I was trying to reinvent the wheel and maybe doing it in an unnecssary old fashioned way. But after a few searches, I still didn't find one plugin/control that behaves the way I need or is easy enough for me to change. Gridster and gridstack make the elements go at the top. TinyDraggable looks nice, but is not resizable. I did try to make the div elements .resizable() (adding the jQueryUI) but I wasn't able to make it work. This plugin does not have (I think) collisions, which would be OK if I managed to get everything else needed. I do like the freedom of movement of the draggable items compared to my tiny project where they go from slot to slot. So, the question is: do you know if there is any suitable plugin (jQuery) for me? Ready to use or easy to configure/change? Many thanks
upvote count: 4
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/27042278
upvote count: 3
downvote count: 3
accepted answer: http://stackoverflow.com/a/27042371
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: i have this code : config.$leftnavbutton = $('&lt;img src="' + config.defaultbuttons.leftnav[0] + '" id="btnlnav" &gt;') .css({ zIndex: 50, position: 'absolute', left: config.offsets.left + config.defaultbuttons.leftnav[1] + 'px', top: config.offsets.top + config.defaultbuttons.leftnav[2] + 'px', cursor: 'hand', cursor: 'pointer' }) .attr({ title: '' }) .appendTo('body') the code inserts an image at the end of body. i want it to insert it at the end of &lt;div id="slider-container"&gt; is there any way? thanks!
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: JQuery appendTo Div with ID instead of appendTo('body')
has answer: http://stackoverflow.com/a/27042371
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42604232
has comment: http://stackoverflow.com/comment/42603572

http://stackoverflow.com/q/27040073
score: 1
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27040844
accepted answer: http://stackoverflow.com/a/27040844
has body: I am using this code to a wordpress paid theme (Gavick - Creativity) and it uses the code below: jQuery(document).ready(function () { // SmoothScroll jQUery substitue jQuery('a[href^="#"]').click(function (e) { e.preventDefault(); var target = this.hash, $target = jQuery(target); if ($target.length) { jQuery('html, body').stop().animate({ 'scrollTop': $target.offset().top + 150 //'scrollTop': $target.offset().top ORIGINAL }, 1000, 'swing', function () { window.location.hash = target+150; //window.location.hash = target; ORIGINAL }); } else { window.location.hash = target; // window.location.hash = target; ORIGINAL } }); The thing is that it smooth scrolls only from internal links and not from external. When I am at the same page and click on an anchor link it scrolls perfectly. Visiting the page anchor from another page doesn't scroll at all. All I need is to visit http://domain.com/#anchortag and scroll to it from the start of the page. I also need to be able to have different offsets if I am in the same page or in an external one. Any help?
has title: Smooth Scroll works only from the same page and not from external links
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42599915
type: Question

http://stackoverflow.com/a/27278717
has comment: http://stackoverflow.com/comment/43026865
has comment: http://stackoverflow.com/comment/43026599
has comment: http://stackoverflow.com/comment/43026956
has body: I tried this: jQuery('#vmap').vectorMap({ map: 'russia_en', // removed other declarations not needed in this example onRegionOver: function(event,code, region) { if (code) { event.preventDefault(); } } }); This prevents the mouseover event to do it's work on the map I loaded. If you add similar code for the other events you should be good.
type: Answer
has comment: http://stackoverflow.com/comment/43027014
score: 0
answers question: http://stackoverflow.com/q/26998629

http://stackoverflow.com/comment/42607840
has text: Looks like any refresh breaks it: Ctrl + F5, F5, Ctrl + R. But once again, initial launch from Visual Studio on debugging runs fine, and if I open it in a different browser when I am already debugging it also works fine.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27044399

http://stackoverflow.com/comment/83051172
type: Comment
comment on: http://stackoverflow.com/a/27362212
has text: I came across this same problem, thanks for coming back and posting your solution. It helped.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27020534
answer count: 1
linked to: http://stackoverflow.com/q/7122415
tagged with: jsoup
has title: How to parse javascript from web page
tagged with: javascript
has answer: http://stackoverflow.com/a/27026492
downvote count: 4
has comment: http://stackoverflow.com/comment/42565764
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42567602
favorite count: 0
tagged with: parsing
has comment: http://stackoverflow.com/comment/42565672
type: Question
upvote count: 2
score: -2
accepted answer: http://stackoverflow.com/a/27026492
has comment: http://stackoverflow.com/comment/42565673
has body: I need to get links from the javascript. I using jsoup, but it didn't work. screen I need to get this link from the source of page. Can anyone help me how to do it? String url = "http://www.cda.pl/video/149016ec/Rybki-z-ferajny-2004-1080p-Dubbing-pl"; Document doc = Jsoup.connect(url).get(); Elements scriptElements = doc.getElementsByTag("script"); for (Element element :scriptElements ){ for (DataNode node : element.dataNodes()) { System.out.println(node.getWholeData()); } System.out.println("-------------------"); } I marked on screen what urls i want to get.

http://stackoverflow.com/q/27094066
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42695237
has comment: http://stackoverflow.com/comment/42693952
has comment: http://stackoverflow.com/comment/42695440
tagged with: php
has title: Delete a cookie from a seperate sub-page
has comment: http://stackoverflow.com/comment/42695013
has body: Sorry if this question is a duplicate, but the examples found in the other questions do not work for me. Lets say I store a cookie "name" on domain.com/page/page/page, with the domain set to .domain.com, and path=/. I am trying to delete the cookie from domain.com/page/page/otherpage, but it won't delete. Any tips? I have tried using document.cookie in the past and setcookie() in php, but nothing will work :(. My javascript attempts: document.cookie = "name=;expires=Thu, 21 Sep 1979 00:00:01 UTC;"; PHP attempts (top of page, before any output): setcookie("name", "", time()-3600);" UPDATE I am using document.cookie, with domain as .domain.com, and path=/, and the cookies are accessible all throughout *.domain.com. I am checking the cookies still exist in document.cookie, throught firefox/chrome's dev console.
answer count: 0
tagged with: cookies
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42694192
tagged with: javascript
has comment: http://stackoverflow.com/comment/42695205

angular-strap
tag name: angular-strap
type: Tag
tags question: http://stackoverflow.com/q/26995845

http://stackoverflow.com/comment/42527933
has text: Line 195-196: `var targ = "#"+e.target.id; if( $(targ).prop( "checked" ) ) {` -- that's pointing to the wrong input. IDs must always be unique.
type: Comment
comment on: http://stackoverflow.com/q/26998372
score: 0
type: QuestionComment

hyperlink
tags question: http://stackoverflow.com/q/27012393
tags question: http://stackoverflow.com/q/27073108
tags question: http://stackoverflow.com/q/27135571
tags question: http://stackoverflow.com/q/27057656
tags question: http://stackoverflow.com/q/27076183
tags question: http://stackoverflow.com/q/27103435
tags question: http://stackoverflow.com/q/27018806
tag name: hyperlink
tags question: http://stackoverflow.com/q/27072703
type: Tag

http://stackoverflow.com/q/27051116
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I am writing code to create an online c++ compiler in node.js environment.Using spawn function i created a child process which will compile the code and execute it and send the output back to the user. But i need to send input to the running c++ program . I used child.stdin.write('data'); for sending data to child but i think cin in the program is not receiving the input . Please help me to send the input to the running c++ code. Thanks.
favorite count: 0
tagged with: c++
has comment: http://stackoverflow.com/comment/134244751
has answer: http://stackoverflow.com/a/27052114
upvote count: 3
type: UnansweredQuestion
tagged with: node.js
score: 3
has answer: http://stackoverflow.com/a/27051839
has title: Sending input data to child process in node.js
tagged with: online-compilation

gmail
type: Tag
tags question: http://stackoverflow.com/q/27003467
tag name: gmail

http://stackoverflow.com/a/27032133
answers question: http://stackoverflow.com/q/27026561
has body: You could wrap the helloworld method in an Angular service and inject it into the test. This way it will be available from any test or file. Here is a quick example of how to inject it once you have created the service: http://www.syntaxsuccess.com/viewarticle/how-to-inject-angular-dependencies-in-jasmine-unit-tests The idea is that you register the service with angular and just rely on angular dependency injection.
score: 0
has comment: http://stackoverflow.com/comment/48981892
type: Answer
has comment: http://stackoverflow.com/comment/49000135

http://stackoverflow.com/comment/42588927
type: AnswerComment
has text: Non!!! when you want to create an array your array indexes must be number or string (associative array). and if it is possible, I don't know how
type: Comment
comment on: http://stackoverflow.com/a/27033632
score: 0

mysql
tags question: http://stackoverflow.com/q/27053222
tags question: http://stackoverflow.com/q/27002494
tags question: http://stackoverflow.com/q/27116388
tags question: http://stackoverflow.com/q/27005125
tags question: http://stackoverflow.com/q/27008893
tags question: http://stackoverflow.com/q/27149822
tags question: http://stackoverflow.com/q/27148672
tags question: http://stackoverflow.com/q/27067972
tags question: http://stackoverflow.com/q/27054754
tags question: http://stackoverflow.com/q/27094195
tag name: mysql
tags question: http://stackoverflow.com/q/27080635
tags question: http://stackoverflow.com/q/27025710
tags question: http://stackoverflow.com/q/27034338
tags question: http://stackoverflow.com/q/27032864
tags question: http://stackoverflow.com/q/27011015
tags question: http://stackoverflow.com/q/27008960
tags question: http://stackoverflow.com/q/27036130
tags question: http://stackoverflow.com/q/27049079
tags question: http://stackoverflow.com/q/27139743
tags question: http://stackoverflow.com/q/27057202
tags question: http://stackoverflow.com/q/27052741
tags question: http://stackoverflow.com/q/27113961
tags question: http://stackoverflow.com/q/27062304
tags question: http://stackoverflow.com/q/27006122
tags question: http://stackoverflow.com/q/27113194
tags question: http://stackoverflow.com/q/27055065
tags question: http://stackoverflow.com/q/27028218
tags question: http://stackoverflow.com/q/27039636
tags question: http://stackoverflow.com/q/27077389
tags question: http://stackoverflow.com/q/27033938
type: Tag
tags question: http://stackoverflow.com/q/27054385
tags question: http://stackoverflow.com/q/27084970
tags question: http://stackoverflow.com/q/27119394
tags question: http://stackoverflow.com/q/27092284
tags question: http://stackoverflow.com/q/27142686
tags question: http://stackoverflow.com/q/26995938
tags question: http://stackoverflow.com/q/27041711
tags question: http://stackoverflow.com/q/27106856
tags question: http://stackoverflow.com/q/27036079
tags question: http://stackoverflow.com/q/27093858
tags question: http://stackoverflow.com/q/27088627
tags question: http://stackoverflow.com/q/27074583
tags question: http://stackoverflow.com/q/27148490
tags question: http://stackoverflow.com/q/27076287
tags question: http://stackoverflow.com/q/27107604
tags question: http://stackoverflow.com/q/26998186
tags question: http://stackoverflow.com/q/27099423
tags question: http://stackoverflow.com/q/27106509
tags question: http://stackoverflow.com/q/27000742
tags question: http://stackoverflow.com/q/27113200
tags question: http://stackoverflow.com/q/27028165
tags question: http://stackoverflow.com/q/27136327

http://stackoverflow.com/q/27066394
has comment: http://stackoverflow.com/comment/42646267
tagged with: arrays
tagged with: javascript
score: 0
has title: Unknown array notation javascript
answer count: 1
has body: I've come across the following code, I'm having trouble getting my head around it. selCOption2[i, 'labelname'] = selOption2Arr[i]; a larger excerpt var selCOption2 = []; var stringContent = ''; jQuery('#txtTypes').attr("value", selOption1); for(var i=0; i&lt;selOption2Arr.length; i++) { if(selOption2Arr[i] != 'Plain' || selOption2Arr[i] != 'plain') { selCOption2[i, 'labelname'] = selOption2Arr[i]; selCOption2[i, 'keyname'] = keyname+"_"+selOption2Arr[i].toLowerCase()+"_"+selOption3Arr[0].toLowerCase(); for(var ifm = 0; ifm &lt; proJsonDetails.images.length; ifm++) { if(proJsonDetails.images[ifm].indexOf(selCOption2[i, 'keyname']) &gt; 0) { selCOption2[i, 'image'] = proJsonDetails.images[ifm]; } } } }
has comment: http://stackoverflow.com/comment/42646191
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27066450
has comment: http://stackoverflow.com/comment/42646223
type: Question

http://stackoverflow.com/comment/42787440
comment on: http://stackoverflow.com/a/27145304
type: Comment
has text: Any usages of this than?
score: 0
type: AnswerComment

http://stackoverflow.com/q/27004064
favorite count: 0
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/42907505
upvote count: 3
answer count: 3
tagged with: asp.net-mvc
has title: Remove selected row in table from Knockout observable array
type: UnansweredQuestion
tagged with: knockout.js
has answer: http://stackoverflow.com/a/27302886
downvote count: 0
tagged with: javascript
tagged with: jquery
type: Question
score: 3
has comment: http://stackoverflow.com/comment/43094413
has answer: http://stackoverflow.com/a/27124848
has answer: http://stackoverflow.com/a/27004428
has body: Alright i have working code that removes a selected row(s) via a checkbox being checked. However i am running into the issue of enforcing that only one of the radio buttons can be checked at any given moment. My first approach is to tie a click event to the each radio button and if it gets clicked, it loops through the observable array and marks all "false." Then it simply flips the flag to true for the item that fired the event. I know this isn't the best way but my lack luster knowledge of knockout is forcing me down this path..even though this method doesn't work atm. Can anyone shed light on what i am doing wrong or how to properly wire this up? The html for the table StandardAccountNo Primary Effective Date End Date Remove The JS below powers the page ////VIEW MODEL FOR KNOCKOUT//// var Detail = function () { this.StandardAccountNo = ko.observable(''); this.IsPrimary = ko.observable(false); this.EffectiveDate = ko.observable(formattedDate(new Date())); this.EndDate = ko.observable(formattedDate(new Date())); this.markedForDeletion = ko.observable(false); }; var ViewModel = function () { var rawList = '@Html.Raw(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(Model.NewAccountGroupDetails))'; this.NewAccountGroupDetails = ko.observableArray(convertJSONToKoObservableObject($.parseJSON(rawList))); this.NewAccountGroupDetails.push(new Detail()); this.deleteMarkedItems = function () { this.NewAccountGroupDetails.remove(function (item) { return item.markedForDeletion(); }); }; this.markIsPrimary = function () { for (i = 0; this.NewAccountGroupDetails().length > 0; i++) { this.NewAccountGroupDetails[i].IsPrimary(false); } return item.IsPrimary(true); }; this.addNew = function () { this.NewAccountGroupDetails.push(new Detail()); $('.datepicker').each(function (i, obj) { $(obj).datepicker({ changeYear: true, changeMonth: true }); }); } }; ko.applyBindings(new ViewModel()); function convertJSONToKoObservableObject(json) { var ret = []; $.each(json, fu…

http://stackoverflow.com/q/27128820
tagged with: mongodb
answer count: 1
tagged with: mongoose
tagged with: javascript
has body: Here is my function that I want to return var setUser = function(Email){ UserModel.findOne({email : Email}, function(err, data){ if(err) { return Hapi.error.badRequest('There is no this user'); } console.log(data); return data; }); }; The console.log(data); show the result that found. But When I use this function Example console.log(setUser('123@mail.com')); This log got undefined that returned from function. But log in the function had data.
score: 0
has title: I got undefined from return function from model.find()
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27128889
tagged with: node.js
type: Question

http://stackoverflow.com/q/27089925
tagged with: datatables
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42769470
has body: I have integrated datatable for the result set for the fixed columnlist and it's working fine. The issue am facing currently is, based on the selection of the dropdownlist, I want to load different columnlist with the search result. But when I'm trying to do, it will give error of aDataSort error of undefined or null reference if the columnlist / result set are empty. So is there any solution to disable "DataSort" property from the datatable property? I ahve tried by assigning, "aaSorting":"null" / "aaSorting":"undefined" / "aaSorting":"[[]]" but it doesn't work out for me. Appreciated for your help.
type: Question
has comment: http://stackoverflow.com/comment/48791749
has title: aDataSort error of undefined or null reference for diffrent columnlist
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/35987703
linked to: http://stackoverflow.com/q/30348028

http://stackoverflow.com/q/27038903
favorite count: 0
has body: I have this case in a switch which puts preprint text in a textarea when press OK on prompt. When I press CANCEL, there appears this text in textarea: This is the case: case 'image': var urlOpts = {}; var thisOpts = $.extend(htmlOpts, { closetype: 'short' }); NewURL = prompt("URL van afbeelding:",'http://'); /urlOpts.src = NewURL; $(TextArea).insertRoundTag('img',thisOpts,urlOpts); break; How can I disable that text when pressing CANCEL in prompt? Textarea should be left blank.
has answer: http://stackoverflow.com/a/27038960
has title: how to disable text in textarea when prompting
upvote count: 1
possible better answer: http://stackoverflow.com/a/27039112
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27039112
accepted answer: http://stackoverflow.com/a/27038960
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
score: 1

http://stackoverflow.com/q/27042339
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/45698096
has comment: http://stackoverflow.com/comment/45735946
tagged with: windows-phone-8
has title: WindowsPhone - Phonegap PushNotification - cannot get URI after register my device
has comment: http://stackoverflow.com/comment/44941251
downvote count: 0
has comment: http://stackoverflow.com/comment/43083871
tagged with: javascript
has body: I am using PushPlugin in my cordova/phonegap application for wp8. I automatically installed the plugin with cordova plugin add https://github.com/phonegap-build/PushPlugin.git registered it when my device is ready function registerMPNS() { console.log("registerMPNS"); var pushNotification; pushNotification = window.plugins.pushNotification; pushNotification.register( channelHandler, errorHandler, { "channelName": "myChannelTm123", "ecb": "onNotificationWP8", "uccb": "channelHandler", "errcb": "jsonErrorHandler" }); } Waiting in channelHandler to get my URI which will then be passed to my server function channelHandler(event) { console.log("channelHandler ..."); var uri = event.uri; console.log("uri: " + uri); } //handle MPNS notifications for WP8 function onNotificationWP8(e) { ... } function jsonErrorHandler(e) { ... } This is my output console: 'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Core.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Adding feature.value=Device Adding feature.value=PushPlugin 'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols. A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.ni.dll Updating IsolatedStorage for APP:DeviceID :: a8789b65-b6a7-4ce4-939b-9df90a3edef1 CordovaBrowser_LoadCompleted Apache Cordova native platform version 3.6.3 is starting 'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.ServiceModel.Web.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.Serialization.ni.dll'. Skipped loading symbols.…
has comment: http://stackoverflow.com/comment/45724460
has comment: http://stackoverflow.com/comment/43071690
favorite count: 0
score: 2
tagged with: cordova
answer count: 0
upvote count: 2

http://stackoverflow.com/comment/42781472
has text: Just assign to a variable / property? `template({myValue: App.Address.getSum()})` . http://handlebarsjs.com/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27142147
score: 0

http://stackoverflow.com/q/27058145
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42636749
has comment: http://stackoverflow.com/comment/42631290
score: 2
upvote count: 3
has title: Uncaught TypeError: undefined is not a function in simplePagination.js
has answer: http://stackoverflow.com/a/27058471
downvote count: 1
type: Question
has body: I tried using the js file for including the pagination in my webpage but it is showing in browser console TypeError: $(...).pagination is not a function What can be the possible problem/issue with it? Note: I am using require.js to get the scripts loaded. Please replay, thanks in advance This is my require module named as testPagination.js define(['jquery','pagination'], function($,pagination) { /* GET DATASOURCE FROM HIDDEN FIELD */ function Hello() { alert('helo...!!!'); } function loadPagination(total) { alert("PAGINATION CALLED"); $('#listing-paginationtest').pagination({ items : total, itemsOnPage : 10, cssStyle : 'dark-theme', onPageClick : function(pageNumber) { } }); alert("PAGINATION END"); } return { Hello:Hello, loadPagination:loadPagination }; }); and I am calling this module method like this in main.js require.config({ baseUrl : "js", paths : { "text" : "libs/require/plugins/text", "jquery" : "libs/jquery/jquery", "blockUI" : "libs/jquery/plugins/jquery.blockUI", "pagination" : "libs/jquery/plugins/jquery.simplePagination", "cookie" : "libs/jquery/plugins/jquery.cookie", "backbone" : "libs/backbone/backbone", "underscore" : "libs/underscore/underscore", // BACKBONE MODELS "models" : "models/models", "templates" : "../templates", "plugins" : "libs/jquery/plugins", "pages" : "pages", "util" : "modules/store/util", "store" : "modules/store/main", // MODULES "datasourceModule" : "modules/datasourceModule", "cookieModule" : "modules/cookieModule", "testPagination":"modules/testPagination" "bootstrap" : "../design/js/bootstrap.min", }, waitSeconds: 200, shim : { 'jquery' : { exports : '$' }, 'backbone' : { deps : [ 'underscore', 'jquery' ], exports : 'Backbone' }, 'underscore' : { exports : '_' }, 'models' : { deps : [ 'backbone' ], }, 'datasourceModule' : { deps : [ 'jquery', 'backbone', 'models' ] }, 'store' : { deps : [ 'backbone' ], }, 'testPagination' : { deps : [ 'jquery' ] }, // DESIGN 'bootstrap' : { deps : [ 'jquery' ] }, } }); function loadPageNumbe…
has comment: http://stackoverflow.com/comment/42704036
tagged with: jquery-pagination
tagged with: pagination
tagged with: javascript
has comment: http://stackoverflow.com/comment/42631588
has comment: http://stackoverflow.com/comment/42635368

http://stackoverflow.com/q/27137779
has title: Need help focusing on previous element on screen when inside Input field
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42775570
has body: We're currently working on developing a new blog look &amp; feel and stumbled upon an accessibility issue that is popping up. https://test.webservices.illinois.edu/blog/view/6186 When you tab through the page and get to the Archive link, it lights up red (correct), then if you tab again, you enter the search input field. If you try to go back (SHIFT + TAB), you don't leave the input field (it continues blinking) and don't get to the Archive link. Any idea what's causing it?
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42773627
has comment: http://stackoverflow.com/comment/42773947

http://stackoverflow.com/comment/42756311
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27128321
has text: @fboes You were right. Problem solved. If you use your comment as an answer I will accept it as an answer.
score: 0

http://stackoverflow.com/comment/42551838
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27012692
has text: Wow Thanks @ArunPJohny , i have been on this for a while now . :)
score: 0

http://stackoverflow.com/q/27023870
answer count: 2
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27023890
favorite count: 0
has title: Adding functions to an array
has body: This code adds functions to an array : var fArr = [] fArr.push(test()) fArr.push(test()) function test(){ console.log('here') } However the function test() is invoked each time its added to array fArr Can the function test() be added to the array fArr without invoking the function ? I'm attempting to populate the array fArr with functions and then iterate over fArr and invoke the functions, not invoke the functions as they are being added to fArr which is current behavior. fiddle : http://jsfiddle.net/3fd83oe1/
score: 2
type: AnsweredQuestion
upvote count: 2
possible better answer: http://stackoverflow.com/a/27023918
accepted answer: http://stackoverflow.com/a/27023890
has answer: http://stackoverflow.com/a/27023918
has comment: http://stackoverflow.com/comment/42571630
type: Question

http://stackoverflow.com/comment/42797679
comment on: http://stackoverflow.com/a/27151219
type: AnswerComment
score: 0
has text: Just use PHP includes, it does exactly what you need and it's soooooo simple!!
type: Comment

http://stackoverflow.com/comment/42547647
has text: you are missing return statement in arrayCreator. However you can use inbuilt array slice method to create a new copy.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27009002

http://stackoverflow.com/q/27034664
has comment: http://stackoverflow.com/comment/42590132
linked to: http://stackoverflow.com/q/5432967
has comment: http://stackoverflow.com/comment/42590370
type: Question
has comment: http://stackoverflow.com/comment/42590262
has body: I have a structure like this var div = { 'id': '', div: [{ 'id': '', div: [{ 'id': '', div: [{ 'id': '', }] }], span: [{ id:'' }] }], } I have to parse this object and draw the elements accordingly (nesting as you can see). I already have a function which draws the elements it only requires the element type i.e 'div'.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42590140
score: 0
has title: JavaScript-Traversing through object and drawing elements
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42590084
answer count: 0

http://stackoverflow.com/a/27049306
answers question: http://stackoverflow.com/q/27049144
has body: Since it's a GET, your parameter needs to be in the query string, similar to how you are passing in "text". So at the end of your URL: ?text=somthing&amp;PRICE_EDIT=somethingElse
score: 0
type: Answer

http://stackoverflow.com/a/27112489
has comment: http://stackoverflow.com/comment/42728149
has body: A big problem is that the value of this won't be set in your "showCaption" function. Add a return false; to the end of that function: function showCaption(){ var captionVis = $('.grey-box-caption-text').css('display'); if (captionVis == "none") { $('.grey-box-caption-text').width(0); $(this).find('.grey-box-caption-text').show().animate({'width': '464px'},750); } else { $(this).find('.grey-box-caption-text').animate({'width': '0'},750, function(){ $(this).hide(); }); } }; and then change the handler assignment to: $('.caption-container').click(showCaption); Also note that your test in that if statement was incorrect: use == or === for comparison.
has comment: http://stackoverflow.com/comment/42728298
type: Answer
has comment: http://stackoverflow.com/comment/42728660
has comment: http://stackoverflow.com/comment/42728306
has comment: http://stackoverflow.com/comment/42727967
score: 2
has comment: http://stackoverflow.com/comment/42728078
upvote count: 2
answers question: http://stackoverflow.com/q/27112380
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27112380
has comment: http://stackoverflow.com/comment/42727922
has comment: http://stackoverflow.com/comment/42728740

http://stackoverflow.com/a/27438014
answers question: http://stackoverflow.com/q/27139275
has comment: http://stackoverflow.com/comment/44225283
accepted answer of: http://stackoverflow.com/q/27139275
has body: Try https://github.com/troolee/gridstack.js with float mode. In this mode widgets do not go to the top of container. The library is in active developing. So I can implement missing reasonable features.
upvote count: 6
has comment: http://stackoverflow.com/comment/44315929
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 6

http://stackoverflow.com/q/27104962
has answer: http://stackoverflow.com/a/27104998
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/42713281
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42713271
has title: HTML javascript not working
accepted answer: http://stackoverflow.com/a/27104998
upvote count: 1
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42713770
has answer: http://stackoverflow.com/a/27105237
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has body: I have this html with javascript, but I don't know why it's not working. It's right now supposed to calculate the values of the two textboxes when the button is pressed. However nothing is happening. Code: HTML Räpellys 2 Addition Subtraction Multiplication Division Shift Left Shift Right Increment Decrement AND OR XOR Value 1: Value 2: Calculate! Java is required to display this element!
possible better answer: http://stackoverflow.com/a/27105237

http://stackoverflow.com/comment/42629872
type: AnswerComment
score: 0
type: Comment
has text: Regarding "don't have access to foo.js": The messages coming from foo.js may not be debug statements but errors or warnings. If it's a third-party library, you may really not have access to that file and the only chance to get rid of such messages is to file a bug report against that library.
comment on: http://stackoverflow.com/a/27051743

http://stackoverflow.com/a/27137872
answers question: http://stackoverflow.com/q/27137632
type: Answer
accepted answer of: http://stackoverflow.com/q/27137632
type: AcceptedAnswer
has body: According to documentation: If any of the promises are rejected the $routeChangeError event is fired. So you can subscribe to this event and redirect to any other route (using route details and properties). Please write if you need implementation example.
score: 0

http://stackoverflow.com/comment/45652260
score: 0
type: Comment
type: QuestionComment
has text: I have seen this same issue with using the Yammer Widget embedded in a page.
comment on: http://stackoverflow.com/q/26997735

http://stackoverflow.com/q/27009479
type: Question
has answer: http://stackoverflow.com/a/27009566
tagged with: javascript
has title: ng-disabled angular js to evaluate a function that gets $http.get
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27036964
tagged with: angularjs-ng-click
accepted answer: http://stackoverflow.com/a/27036964
possible better answer: http://stackoverflow.com/a/27009566
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27009572
has body: am trying to make my ng-disbaled button to evaluate to a function in the controller that returns a request from $http.get here are my codes my html code &lt;a class="btn btn-warning" ng-click="upVote(item,me.email);" ng-disabled="votecheck(item,me.email) != 'canvote'"&gt; controller $scope.votecheck = function(item,emailid){ var email = emailid; http.post('ajax/voters.php?id='+item.ID+'&amp;email='+email).success(function(data) { if(data === "CanVote") { return "canvote"; } else { return "cant vote"; } }); }; my php echo's can vote or cant vote if over an sql state to the database somebody please help make this work note my item id is already preloaded with a previous scope function
tagged with: angularjs-scope

http://stackoverflow.com/comment/42747255
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27123393
has text: Have a look here, this is very similar -> http://stackoverflow.com/questions/16090487/find-a-string-of-text-in-an-element-and-wrap-some-span-tags-round-it

http://stackoverflow.com/comment/42722501
has text: How would you read less from the browser?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27109653
type: QuestionComment

http://stackoverflow.com/a/27077056
has comment: http://stackoverflow.com/comment/42665373
has comment: http://stackoverflow.com/comment/42665063
accepted answer of: http://stackoverflow.com/q/27076886
answers question: http://stackoverflow.com/q/27076886
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Most efficient way to create a bunch of elements is to create a string and create element from this string. Most efficient way to create a string of element is to join from array So you should refactor your code to Create an array of elements like a[i] = "&lt;tr&gt;&lt;intput type='checkbox'&gt;&lt;/tr&gt;"; Join an array to get one string var s = a.join(); Create DOM elements like var div = document.createElement('div'); div.innerHTML = s;
downvote count: 0
score: 1

http://stackoverflow.com/a/27062480
accepted answer of: http://stackoverflow.com/q/27062304
upvote count: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27062304
has comment: http://stackoverflow.com/comment/42639472
has body: Not tested code, but this should work for you :) &lt;?php include('Connection.php'); $query = $conn-&gt;prepare("SELECT DISTINCT c.movieName, c.castName, c.movieImdbId, f.year, f.posterLink FROM cast_movie as c JOIN film_info as f ON c.ImdbId = f.ImdbId WHERE c.castName = :q"); $query-&gt;execute(array(':q' =&gt; $searchText )); while($row = $query-&gt;fetch(PDO::FETCH_ASSOC)): ?&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="http://www.imdb.com/title/&lt;?php echo urlencode($row['ImdbId']); ?&gt;"&gt;&lt;?php echo $row['movieName']; ?&gt;&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="javascript:addmovie('&lt;?php echo $row['movieName']; ?&gt;')" id="add"&gt;Add to list&lt;/a&gt; &lt;/tr&gt; &lt;?php endwhile; ?&gt; &lt;script type="text/javascript"&gt; function addmovie(movieName) { var obj = { "movie_name":movieName, "movie_info": "" }; parent.window.opener.addToBasket(obj); //addToBasket is a function that add selected movies to the basket. } &lt;/script&gt;
type: Answer
has comment: http://stackoverflow.com/comment/42639244
score: 1

http://stackoverflow.com/a/27123835
type: Answer
answers question: http://stackoverflow.com/q/27123502
upvote count: 2
score: 2
has body: Socket.IO is a module used for node.js, node.js is pretty much serverside javascript. with socket.IO you can set up a websocket connection to the server enabling a bidirectional connection. instead of polling and longpolling you can send data to the client, without the client requesting it. for more information see node.js and socket.IO
downvote count: 0

http://stackoverflow.com/a/27082530
score: 6
has body: There are two things to know here. First, you're using the JS Client auth methods in conjunction with AngularFire. While this is not a bad thing, you need to be aware of a few gotchas. Second, you can use the $firebaseAuth module in AngularFire 0.9 to not deal with all of the crazy stuff below. When using Firebase JS client level functions, Angular will not always pick up on them due to its digest loop. This is true for any external JS library. The way to get around this is to use the $timeout service. CodePen // inject the $timeout service app.controller("fluttrCtrl", function($scope, $firebase, $timeout) { var url = "https://crowdfluttr.firebaseio.com/"; var ref = new Firebase(url); $scope.loginGoogle = function() { console.log("Got into google login"); ref.authWithOAuthPopup("google", function(error, authData) { // wrap this in a timeout to allow angular to display it on the next digest loop $timeout(function() { $scope.loggedIn = true; $scope.uniqueid = authData.google.displayName; }); }, { remember: "sessionOnly", scope: "email" }); }); }); By wrapping the $scope properties in the $timeout another cycle will be run and it will display on the page. Ideally, you don't want to deal with this yourself. Use $firebaseAuth module built into AngularFire. You need to upgrade to the 0.9 version to use the module.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27080712
type: Answer
upvote count: 6
answers question: http://stackoverflow.com/q/27080712

http://stackoverflow.com/q/27008004
has comment: http://stackoverflow.com/comment/138502214
type: UnansweredQuestion
has body: There are @media queries for css that use certain stylesheets for certain circumstances, is there a JavaScript equivalent that would load certain JavaScript functions at certain screen widths/landscape/portrait etc. ? I'd like to have all my JavaScript on one document (all internal because I only have one page to work with) but only access certain parts in certain circumstances/devices. Any and all help is greatly appreciated. Thanks in advanced!
linked to: http://stackoverflow.com/q/15823137
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/42544453
duplicate of: http://stackoverflow.com/q/15823137
type: Question
has comment: http://stackoverflow.com/comment/42544465
has comment: http://stackoverflow.com/comment/42544886
tagged with: mobile
has title: JavaScript queries?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42544852

http://stackoverflow.com/a/27104477
downvote count: 0
has comment: http://stackoverflow.com/comment/42714515
answers question: http://stackoverflow.com/q/27104394
type: Answer
has body: There is no this where you are looking for it. You must pass this to the function like so: function sum_sliders() { var sum=0, total=0; var sliders = $('.entry_percent').not(this); //iterate through each input and add to sum $(sliders).each(function() { sum += parseFloat(this.value); console.log('Sum sliders value: '+ sum); }); return(sum); } $("#elementYouClickToCallFunction").click(sum_sliders); //Instead of using an anonymous function There's also -- from what you provided -- no reason not to simply include the contents of sum_sliders inside the click-bound anonymous function: $("#elementYouClickToCallFunction").click(function(){ var sum=0, total=0; var sliders = $('.entry_percent').not(this); //iterate through each input and add to sum $(sliders).each(function() { sum += parseFloat(this.value); console.log('Sum sliders value: '+ sum); }); return(sum); });
has comment: http://stackoverflow.com/comment/42716892
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42712582
accepted answer of: http://stackoverflow.com/q/27104394
type: AcceptedAnswer

http://stackoverflow.com/comment/42646707
score: 0
comment on: http://stackoverflow.com/a/27066493
has text: I think you dont understand, i can't change that, the image is flowing away on the left, example: http://jsfiddle.net/jjbjn160/
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27113094
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I have an ajax modal pop-up that is being displayed during page load and then it hides when the page load has been completed, all of this code takes place within the master page. The problem is that for some button clicks they do not trigger the javascript event window.onload to be called or the pageload complete or render events within asp. They only call the before unload event and submit events. When this happens I notice that the popup does not hide because no window.onload was ever called. Otherwise it works wonderfully. Does anyone know a way that I can make sure the pop up gets hidden always without having to hide the pop up on every button clicks code that does not reload the entire page? See below for code. Master Page: <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="OnlinePrizing.SiteMaster" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:ContentPlaceHolder ID="HeadContent" runat="server"> </asp:ContentPlaceHolder> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" EnablePartialRendering="true" runat="server"></asp:ToolkitScriptManager> <asp:Button runat="server" ID="hiddenTargetControlForModalPopup" style="display:none"/> <asp:ModalPopupExtender runat="server" ID="programmaticModalPopup" BehaviorID="programmaticModalPopupBehavior" TargetControlID="hiddenTargetControlForModalPopup" PopupControlID="programmaticPopup" BackgroundCssClass="modalBackground" DropShadow="True" PopupDragHandleControlID="programmaticPopupDragHandle" RepositionMode="RepositionOnWindowScroll" > </asp:ModalPopupExtender> <asp:Panel runat="server" CssClass="modalPopup" ID="programmaticPopup" style="display:none;width:350px;padding:10px"> <asp:Panel runat="Server" ID="programmaticPopupDragHandle" Style="cursor: move;background-color:#DDDDDD;border:solid 1px Gray;color:Black;text-align:center;"> Processing... Please Wait... </asp:Panel> </asp:Panel> <asp:Label ID="lblTitle" runat="server" Text="H…
upvote count: 1
tagged with: c#
score: 1
has title: Modal popup during page load not hiding sometimes: ASP.NET C# Javascript Jquery
has answer: http://stackoverflow.com/a/27113371
type: Question
answer count: 1
linked to: http://stackoverflow.com/q/26635847

http://stackoverflow.com/comment/42788255
comment on: http://stackoverflow.com/a/27143653
type: Comment
has text: this link worked http://stackoverflow.com/questions/19874582/change-default-global-installation-directory-for-node-js-modules-in-windows ... ichanged the path to fetch the module 'ws' .... var WebSocket = require('C:\\Program Files\\nodejs\\node_modules\\ws');
score: 0
type: AnswerComment

http://stackoverflow.com/q/27025979
type: AnsweredQuestion
has body: According to this table in the ECMAScript standard, string values that have length 0 should be evaluated as boolean false. How come, then, these statements evaluate to true? "\t" == false " " == false "\n" == false " " == false All those strings have a length greater than 0. For example: While I understand that "0" evaluates to false because it can be coerced to a numeric 0, I can't explain why these strings are falsey. What's going on? (Obviously I can use === for a strict comparison, but in this case in my code, I need the loose comparison, however I wasn't expecting a non-empty string to be considered falsey.)
has comment: http://stackoverflow.com/comment/42575295
has answer: http://stackoverflow.com/a/27026008
has comment: http://stackoverflow.com/comment/42575352
tagged with: type-coercion
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42575399
accepted answer: http://stackoverflow.com/a/27026008
has title: Why do some non-empty strings evaluate to "false" in JavaScript?
linked to: http://stackoverflow.com/q/5634372
upvote count: 6
favorite count: 0
score: 6

http://stackoverflow.com/comment/42569721
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27022776
type: AnswerComment
has text: You are selecting TRs and appending to body? Hows that gonna work? Not 100% sure but don't you need to append them to **tbody** and remove old ones?

http://stackoverflow.com/q/27058878
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27060053
has answer: http://stackoverflow.com/a/27059892
has title: Problems using angular ng-style, not updating in IE
upvote count: 6
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27059892
score: 6
type: Question
tagged with: ng-style
tagged with: javascript
has answer: http://stackoverflow.com/a/27060053
has body: I've created a simple directive in Angular which generates a scroller to display some products. I'm having an issue with one part of the code. {{tyre.name}} About this tire and this is what it looks like in the browser once executed Fuel Efficient About this tire after executing this on my page I get the scroller and the ng-style inside the "li" elements gets displayed correctly, while the ng-style for the "ul" doesn't. I've tried multiple solutions, even trying to add the same exact ng-style from the "li" element and it just doesn't get processed and no style is added. Can anyone help me by pointing out a mistake in my markup or a possible cause for one ng-style working on the Li elements and the other not working on the UL itself? The other problem I'm having is that the value of the currentMargin is not updating in IE8/9 and so on. Thanks
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/27001523
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27001745
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42533033
has body: I'm trying to complete a simple multiplication problem of an input and a number already there (5.49) using JavaScript and the Compute function. I have it inside of a table and am using internal css for the structure of the page. My problem is the when I press the compute button on the page, the answer to the equation (input)*5.49 doesn't come up, but instead nothing does. I'm struggling to find mistake. Additional Notes: I've already checked to see if the compute button was working by replacing the formula with a pop-up box and it was working. Project Sample Order Form Quantity item Unit Price Totals Apples $5.49
tagged with: forms
has title: JavaScript Functions & Equations
downvote count: 1
type: Question
tagged with: math
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27001745
upvote count: 0

http://stackoverflow.com/q/27108463
has comment: http://stackoverflow.com/comment/42719907
has comment: http://stackoverflow.com/comment/42720432
has title: php if checkbox checked list appear
has comment: http://stackoverflow.com/comment/42720231
has comment: http://stackoverflow.com/comment/42720340
answer count: 3
upvote count: 0
possible better answer: http://stackoverflow.com/a/27108583
has body: I have the follow problem guys, i have create a simple page with a ckeckbox, and i want when the checkbox is checked a (list) appearing and if not checked list2 appearing,without using sumbit <?php if checkbox1 is ckecked { ?> 0 1 <?php } else { ?> 12 25 <?php } ?> I hope the code help more....
tagged with: jquery
has answer: http://stackoverflow.com/a/27108583
favorite count: 0
has comment: http://stackoverflow.com/comment/42720603
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27108978
has answer: http://stackoverflow.com/a/27108930
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27108978
downvote count: 1
type: Question
tagged with: javascript
score: -1

http://stackoverflow.com/comment/42722386
comment on: http://stackoverflow.com/q/27109592
has text: @Begueradj Up/down voting should have nothing to do with one's reputation, but should reflect the quality of the question.
type: QuestionComment
type: Comment
score: 3

http://stackoverflow.com/q/27016415
has body: I want to place a hyper link in my javascript code (asda) in expample <<< this is my code: var klachtinternet = confirm("Heeft u een klacht over ons product Internet?"); if(klachtinternet == true){ document.writeln(" " + " " + " Internet" + " " + "Klant meldt probleem met Internet" + " " + " " ); var nu = confirm("Kunt u browsen naar www.nu.nl?"); if(nu == true){ document.writeln("Browsen nar www.nu.nl lukt" + " " + " "); } else{ document.writeln("Probleem : Browsen naar www.nu.nl lukt niet" + " " + " " //I WANT HERE MY HYPERLINK TO ANYTHING. I TRIED LINK() I TRIED A HREF NOTHING WORKED!); } var refresh = confirm("Reageert de pagina snel na het indrukken van F5?"); if(refresh == true){ document.writeln("De pagina laadt snel" + " " + " "); } else{ document.writeln("Probleem : De pagina laadt niet snel" + " " + " "); } if(nu == true){ document.writeln("...U kunt browsen naar www.nu.nl "); } else{ document.writeln("...U kunt niet browsen naar www.nu.nl "); } if(refresh == true){ document.writeln(" maar de pagina laadt snel."); } else{ document.writeln(" maar de pagina laadt niet snel." + " " + " "); } if(nu == true){ document.writeln(" " + " " + "Browsen naar www.nu.nl lukt" + " "); } else{ document.writeln(" " + " " + "Browsen naar www.nu.nl lukt niet" + " " + " "); } if(refresh == true){ document.writeln(" " + "De pagina laadt snel" + " " + " "); } else{ document.writeln(" " + "De pagina laadt niet snel" + " " + " " + " " + " "); } }; How to add the hyperlink where i marked it?
has answer: http://stackoverflow.com/a/27016871
score: -1
type: Question
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/42558306
tagged with: javascript
favorite count: 0
has title: HTML links in javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27016451
has comment: http://stackoverflow.com/comment/42558262
type: UnansweredQuestion
downvote count: 1

http://stackoverflow.com/a/27133948
score: 1
has comment: http://stackoverflow.com/comment/42767732
has comment: http://stackoverflow.com/comment/42767231
answers question: http://stackoverflow.com/q/27131951
has comment: http://stackoverflow.com/comment/42766827
has body: I think the problem is that you are returning returnArray when it might not be handled yet. To clarify what I mean, Even though you have return returnArray at the end, the actual request is still be handled, but the code keeps going anyway. So when it finally gets a response, and handles the code, it writes it correctly to the log, but the function has already returned returnArray earlier. Without testing if this works, you could probably just add a polling function to wait until returnArray is not null, as long as you never expect it to be null. Maybe something like: while(returnArray == null) { ; } return returnArray; I'll just edit this to clarify what I mean: function getVidInfo(VidId){ var vidRequest; var vidRequestResponse; var returnArray = new Array(4); vidRequest = gapi.client.youtube.videos.list({ part: 'snippet', id: VidId }); vidRequest.execute(function(response){ if(response.pageInfo.totalResults != 0) { returnArray[0] = response.result.items[0].snippet.title; returnArray[1] = response.result.items[0].snippet.description; returnArray[2] = response.result.items[0].snippet.publishedAt; //Check for HD thumbnail if (response.result.items[0].snippet.thumbnails.maxres.url){ returnArray[3] = response.result.items[0].snippet.thumbnails.maxres.url } else { returnArray[3] = response.result.items[0].snippet.thumbnails.standard.url; } console.log(returnArray); //Will log desired return array } }); while(returnArray == null) { //Create busy loop to wait for value ; } return returnArray; }
has comment: http://stackoverflow.com/comment/42767161
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/a/26996873
has body: You probably misspeled something. In the image you uploaded you wrote "assest" instead of "assets". It looks like you're trying to reach logo.jpg but you wrote you have logo.png
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26996442
type: Answer
answers question: http://stackoverflow.com/q/26996442

flask
tags question: http://stackoverflow.com/q/27094030
tags question: http://stackoverflow.com/q/27009617
type: Tag
tags question: http://stackoverflow.com/q/27001063
tag name: flask

http://stackoverflow.com/a/27096447
answers question: http://stackoverflow.com/q/27096371
upvote count: 1
has comment: http://stackoverflow.com/comment/42703593
score: 1
has comment: http://stackoverflow.com/comment/42698314
has comment: http://stackoverflow.com/comment/42698652
has comment: http://stackoverflow.com/comment/42698335
downvote count: 0
has body: Make sure that your server knows how to respond to an 'OPTION' request. If your server application does not return the correct response to an option request then your browser will not be able to connect to the remote services.
type: Answer

http://stackoverflow.com/q/27021315
score: 0
has body: I have three pages (HTML documents) as following: Page1 : contains only one textbox. Page2 : contains object tag which using the "data" attribute calls Page1. Page3 : contains iframe tag which using the "src" attribute calls Page2. Open Page3 in IE 10 or IE 11. Now the issue is that the keyboard's delete button is not working inside the textbox. By seeing the structure you can understand how complicate project I am working on and I can not change this structure without introducing a lot performance issues. I'll appreciate if any one can tell me why this is happening in IE 10/11 and not in IE8/Chrome/Firefox?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/44348326
answer count: 0
tagged with: iframe
has title: Keyboard Delete Button not working for textbox inside object which is inside iframe
tagged with: object-tag
tagged with: internet-explorer-10
has comment: http://stackoverflow.com/comment/44464766
type: Question
tagged with: javascript

http://stackoverflow.com/q/27003658
tagged with: forms
has body: I'm writing an app using web2py and I'm currently trying to make a form where the user can add/remove additional fields on the fly. I've got this working by using jQuery to add the addition fields to the DOM but the problem is only the hardcoded fields are being submitted (I am dumping form.vars at the top of the page to check). I have made sure the dynamic fields have unique names and I've been scouring the html for errors but have come up with nothing. Here's my javascript: $(document).ready(function(){ var wrapper = $("#formwrapper"); var addbutton = $("#addfield"); var removebutton = $('#removefield'); var x = 2; $(addbutton).click(function(){ $(wrapper).append( " Reward " + x + " " + " Minimum amount to get reward: " + " " + " Reward Description: " + " " ); x++; }); $(removebutton).click(function(){ if (x > 2) { x--; var id = '#extrareward' + x; $(id).remove(); } }); }); And here's the html form from the page source with one static and one dynamic block: Minimum amount to get reward: Reward description: Reward 2 Minimum amount to get reward: Reward Description: and finally here is the code for the controller: @auth.requires_login() def create2(): form = FORM(DIV(LABEL('Minimum amount to get reward: '), INPUT(_name='min1', _type='text'), BR(), LABEL('Reward description: '), TEXTAREA(_name='reward1'), BR(), _id='formwrapper'), INPUT(_id='submitbutton', _type='submit')) if form.process(keepvalues=True).accepted: session.flash = 'form accepted' else: session.flash = 'form rejected' return dict(loginform=auth.login(), rewardtiersform=form) Might be that I'm just missing a silly error somewhere but I've been scratching my head for too long in this. Help much appreciated!
type: Question
has comment: http://stackoverflow.com/comment/42538186
has title: Dynamic fields not being submitted (jQuery, web2py)
has comment: http://stackoverflow.com/comment/42537948
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42537285
has comment: http://stackoverflow.com/comment/42538323
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: web2py
answer count: 0

http://stackoverflow.com/q/27042579
tagged with: javascript
has body: I have this simple javascript code. var nodeList = document.getElementById(active_tab_selector.attr('id')).getElementsByTagName('span'); for (var i = 0, node; node = nodeList[i]; i++) { node.addEventListener('click', function() {getChild(this.getAttribute(attribute)); }, false); } But the click it's not working for some reason, but if I remove getElementById(active_tab_selector.attr('id')) it works fine. Any ideas?
score: 0
has answer: http://stackoverflow.com/a/27043199
answer count: 1
has comment: http://stackoverflow.com/comment/42605617
has comment: http://stackoverflow.com/comment/42605798
has comment: http://stackoverflow.com/comment/42605143
has title: addEventListener is not working on node
has comment: http://stackoverflow.com/comment/42604439
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42605578
has comment: http://stackoverflow.com/comment/42605009
has comment: http://stackoverflow.com/comment/42606387
has comment: http://stackoverflow.com/comment/42604140
has comment: http://stackoverflow.com/comment/42604277
has comment: http://stackoverflow.com/comment/42604205
has comment: http://stackoverflow.com/comment/42604946
has comment: http://stackoverflow.com/comment/51704056
has comment: http://stackoverflow.com/comment/42606147
has comment: http://stackoverflow.com/comment/42606033
has comment: http://stackoverflow.com/comment/42604800
type: Question
tagged with: nodelist
has comment: http://stackoverflow.com/comment/42605279
tagged with: addeventlistener
has comment: http://stackoverflow.com/comment/42604882

http://stackoverflow.com/q/27135107
has comment: http://stackoverflow.com/comment/42768594
has answer: http://stackoverflow.com/a/27135178
accepted answer: http://stackoverflow.com/a/27135178
has answer: http://stackoverflow.com/a/27135313
possible better answer: http://stackoverflow.com/a/27135193
has answer: http://stackoverflow.com/a/27135354
has comment: http://stackoverflow.com/comment/42768560
has title: Javascript Random Image
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27135240
type: Question
has answer: http://stackoverflow.com/a/27135193
has answer: http://stackoverflow.com/a/27135216
downvote count: 0
tagged with: javascript
answer count: 6
favorite count: 0
has body: Im doing a random image display as part of a lab and I cant get the third image to appear (scissors.png). Thats my javascript below..Help would be much appreciated! var total = 0; function Images(){ var img1 = document.getElementById('img1'); var x = Math.floor(Math.random()*2)+1; /* Player one */ if (x ==1) img1.src = 'rock.png'; else if (x==2) img1.src = 'paper.png'; else if (x==3) img1.src = 'scissors.png'; }
upvote count: 1

http://stackoverflow.com/comment/42606167
score: 0
type: QuestionComment
has text: `RegExp(/[A-Za-z]/).test(last)` will never work: Use `/[A-Za-z]/.test(last)` or `(new RegExp('[A-Za-z]')).test(last)`. Add the global flag as well `/.../g` or `new RegExp('...', 'g')`
type: Comment
comment on: http://stackoverflow.com/q/27042435

http://stackoverflow.com/a/27028141
score: 1
has body: You can isolate the scope of the directive, like this: adminDash.directive('hospitals', function() { return { restrict: 'E', templateUrl: 'www/partials/admin/hospitals.html', controller: 'AdminHospitalsController', controllerAs: 'hospitalsCtrl', scope: { paramValue: '&amp;', paramVariable: '=', }, }; }); check this to understand better https://thinkster.io/egghead/isolate-scope-am/
accepted answer of: http://stackoverflow.com/q/27027997
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27027997
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42777045
comment on: http://stackoverflow.com/a/27139523
score: 0
type: AnswerComment
type: Comment
has text: i just watch you fiddle and it works. **console.log** prints to the developer console not to the screen. it is just fine if you don't like my solution, but when you say that it breaks it may confuse other users

http://stackoverflow.com/comment/43090085
has text: Do you think @David it could be possible to update this HTML page http://gget.it/vtn8i8rb/NFB92BF.HTML, so that zooming is disabled, as much as we can (of course, it won't work on every browser) with the techniques you propose here? Currently on this page only CTRL + / CTRL - is disabled
type: AnswerComment
comment on: http://stackoverflow.com/a/27209253
score: 0
type: Comment

http://stackoverflow.com/q/27031051
score: 0
answer count: 1
favorite count: 0
has body: I am using the reverse geocoding API (client side) to turn lat, long coordinates into street addresses. These lat longs are taken directly from a draggable marker on the map, so they have many decimal places of information. If I put it in San Francisco, for example, I drag the marker and send the { lat, lng } pair to the API. I get back something very general like "San Francisco, CA" or at best "South of Market, San Francisco, CA, USA". I know google has street information in this area because I can use the forward geocoding API perfectly. Is there any parameter I might be missing that would cause this? Here is my code: maps.reverseGeocode = function(pos, callback) { maps.geocoder.geocode({ latLng: pos, bounds: maps.map.getBounds() }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { console.log("Reverse Geocode:", results); callback(results[0]); } else { console.log('Could not geocode: ' + status); callback(undefined); } }); }; Where pos is taken directly from the map marker object.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27031162
upvote count: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/27031162
has title: Google Maps Reverse Geocoding only returning "APPROXIMATE" location
type: Question
tagged with: google-maps
tagged with: google-geocoder
tagged with: javascript
tagged with: google-maps-api-3

http://stackoverflow.com/comment/42795426
comment on: http://stackoverflow.com/q/27149859
score: 0
has text: @Spokey. Please take a look at update 2.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27002142
has body: I'd do this, which will iterate over each URL, building a chain of promises that run when the previous one finishes, and resolves with an array of the request results. return urls.reduce(function(acc, url){ return acc.then(function(results) return myfunction(url).then(function(requestResult){ return results.concat(requestResult) }); }); }, Q.resolve([])); You could turn that into a helper too: var results = map(urls, myfunction); function map(items, fn){ return items.reduce(function(acc, item){ return acc.then(function(results) return fn(item).then(function(result){ return results.concat(result) }); }); }, Q.resolve([]) } Note, the bluebird promise library has a helper to simplify this kind of thing. return Bluebird.map(urls, myfunction, {concurrency: 1});
upvote count: 3
has comment: http://stackoverflow.com/comment/42577427
answers question: http://stackoverflow.com/q/26992767
has comment: http://stackoverflow.com/comment/42576032
downvote count: 0
type: Answer
score: 3

http://stackoverflow.com/comment/42736998
has text: This error occurs. Uncaught TypeError: Cannot read property 'nodeValue' of null And this is the content of the XML. im hello 2 2014-11-25 01:44:28 letsdothis test it's a test content 1 2014-11-24 22:02:01
comment on: http://stackoverflow.com/q/27099375
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42783083
comment on: http://stackoverflow.com/q/27141962
type: Comment
type: QuestionComment
has text: btw, resource.get and resource.save have an inner promise, is consider an antipattern to create a deferred to encapsulate promises.. see https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns#the-deferred-anti-pattern... ngResource makes a request to the server, if you are getting 404 error, means that the url is not the correct, whats the server url need? whats the console error ?
score: 0

http://stackoverflow.com/a/27003604
score: 0
answers question: http://stackoverflow.com/q/27003243
type: Answer
has body: Turns out the page before the Flight Maps page on google flight allows you to set a max price. That's then reflected in the flight maps page URL in the mp param (assume it means max price) https://www.google.com/flights/#search;f=SFO;d=2014-12-04;r=2014-12-08;mp=450;mc=m Saves the trouble of having to write any code.

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/27144525

http://stackoverflow.com/q/27074462
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/27078928
type: Question
has title: EmberJS trigger action on parent component from child
has answer: http://stackoverflow.com/a/27078928
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/42663058
has body: I am trying to create a drop down menu component. It comprises to 2 components - currency-dropdown (parent), dropdown-item (child). I am able to render the components. But when I click on the dropdown-item component I am unable to trigger an action on the parent component. I am trying to send the selected components data to the parent component. I tried setting the targetObject and many other combinations I found here. Im not sure what the problem is. I did extend _yield in the parent component as I was rendering the child components in an each helper. Some help would be much appreciated. Here is what I've got so far. App.CurrencyDropdownComponent = Ember.Component.extend({ actions: { itemSelected: function(item) { console.log(item); } }, _yield: function(content, options) { var get = Ember.get, view = options.data.view, parentView = this._parentView, template = get(this, 'template'); if (template) { view.appendChild(Ember.View, { isVirtual: true, tagName: '', _contextView: parentView, template: template, context: get(view, 'content'), controller: get(parentView, 'controller'), templateData: { keywords: parentView.cloneKeywords() } }); } } }); App.DropdownItemComponent = Ember.Component.extend({ click: function() { this.sendAction('selectItem', this.origContext); } }); For anyone interested I have made my solution an addon.
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ember.js

http://stackoverflow.com/q/27029762
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27029845
answer count: 2
has body: So, this code is working: &lt;script&gt; $(document).ready(function(){ var btn = $('#submit_send_order'); btn.attr({disabled: 'disabled'}); var chk = $('.end-box'); chk.click(function(){ if ($(this).attr('checked')) btn.removeAttr('disabled'); else btn.attr({disabled:'disabled'}); }); }); &lt;/script&gt; but I can't get any working version of a click, onclick, or event handler to cause a popup message during the else condition. Unless users checks a box, they cannot send their order on my site. Right now they click the button and nothing happens until they check the box. But I'd like an alert to show as well, e.g.: $(document).ready(function(){ $('#submit_send_order').click(function(){ alert("You cannot proceed until you check the end box"); }); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27029845
score: 0
has comment: http://stackoverflow.com/comment/42582066
tagged with: http://stackoverflow.com/tag/html
has title: Need click event to trigger alert during else
possible better answer: http://stackoverflow.com/a/27029876
has answer: http://stackoverflow.com/a/27029876

http://stackoverflow.com/comment/42593193
type: Comment
type: QuestionComment
has text: Did you enabled CORS ?
comment on: http://stackoverflow.com/q/27036274
score: 0

http://stackoverflow.com/a/27072462
accepted answer of: http://stackoverflow.com/q/27070807
score: 3
has body: Your code does generate RMS output once you replace defunct API calls old webkitAudioContext new try { window.AudioContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext; ctx = new AudioContext(); console.log("cool audio context established ... ctx "); } catch (e) { alert("Web Audio API is not supported by this browser\n ... http://caniuse.com/#feat=audio-api"); } and old createJavaScriptNode new createScriptProcessor
upvote count: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27070807
type: Answer

http://stackoverflow.com/comment/42622253
has text: Nothing changes, @KimGysen
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27052498
score: 0

http://stackoverflow.com/a/78724848
answers question: http://stackoverflow.com/q/27012854
downvote count: 2
score: -2
type: Answer
has body: const dateObj = new Date('2014-11-03T19:38:34.203Z'); dateObj.getUTCFullYear(); // 2023 dateObj.getUTCMonth() + 1; // 7 (Months are zero-indexed, so +1 to get the actual month) dateObj.getUTCDate(); // 10 dateObj.getUTCHours(); // 10 dateObj.getUTCMinutes(); // 57 dateObj.getUTCSeconds(); // 16 dateObj.getUTCMilliseconds(); // 872
upvote count: 0

http://stackoverflow.com/q/26999184
has title: In Select2 appears Cannot read property 'createTextRange' of undefined
type: Question
has body: I have a select with some data.. normal data, nothing fancy and i'm using select2 to format this data like this: new born xs s m l xl 3 months 6 months 9 months 12 months xxl child 6 child 8 child 10 child 12 child 14 and the javascript: function loadSelect2() { $('.select2-option').select2(); } I'm getting the message: Cannot read property 'createTextRange' of undefined when I click on the select2 combo.
has answer: http://stackoverflow.com/a/31535465
tagged with: javascript
has comment: http://stackoverflow.com/comment/42538605
score: 0
answer count: 1
tagged with: jquery-select2
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion

http://stackoverflow.com/q/27140772
has answer: http://stackoverflow.com/a/27140968
has title: How to put this timer in a loop? JS
tagged with: countdown
answer count: 4
tagged with: timer
has body: function countdown() { var secs = 60; function timer() { var counter = document.getElementById("counter"); secs--; counter.innerHTML = "0:" + (secs&lt; 10 ? "0" : "") + String(secs); if( secs &gt; 0 ) { setTimeout(timer, 1000); } else { alert("Game over, you did not get to finish the game on time :( "); document.getElementById('memory_board').innerHTML = ""; newBoard(); } } timer(); } countdown(); How can I place this code in a loop? It's basically a timer which starts at 60 and ends at 0, and when that happens, the game restarts. I have no problem with the game restarting, but I just don't know how to put this code on a loop. I have looked in codeacademy and it says for a loop I have to use for (var x; y;z ) { //code } where x is the start y is where it ends and z is how does it change. Please help me work this out, I'm a little confused.
possible better answer: http://stackoverflow.com/a/27140832
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27140909
tagged with: settimeout
tagged with: loops
type: Question
has answer: http://stackoverflow.com/a/27140832
has answer: http://stackoverflow.com/a/27140866
accepted answer: http://stackoverflow.com/a/27140866
tagged with: javascript
score: 0

http://stackoverflow.com/a/27030463
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27013481
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You said that After submit the user is "redirected" for only a blink of a second, then the path changes back. ,so I think it should be redirect to a wrong path and then go to the otherwise branch: .otherwise({ redirectTo: '/**' }) I suggest you recheck your customer.id if it maybe a undefined.
accepted answer of: http://stackoverflow.com/q/27013481

http://stackoverflow.com/a/28119775
type: Answer
answers question: http://stackoverflow.com/q/27141711
has body: res.json([body]) Send a JSON response. This method is identical to res.send() when an object or array is passed. res.json(null) res.json({ user: 'tobi' }) res.status(500).json({ error: 'message' }) For a json API service you probably don't need to render anything.
score: 0

http://stackoverflow.com/comment/42642400
type: Comment
type: QuestionComment
has text: Here's a pretty compact version that performs well: https://gist.github.com/ShirtlessKirk/2134376
comment on: http://stackoverflow.com/q/27064219
score: 0

http://stackoverflow.com/a/27090710
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: you can try this out : click me im a text $("#container").on("click",function() { $( "#container" ).animate({ top: "-=100%", }, 1000, function() { // Animation complete. }); }); here is a fiddle
accepted answer of: http://stackoverflow.com/q/27090429
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27090429

http://stackoverflow.com/q/27028633
type: AnsweredQuestion
score: -1
linked to: http://stackoverflow.com/q/9329446
type: Question
has title: How to iterate over json with no name
tagged with: javascript
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42580413
has body: var categories= { "art": 352, "health-beauty": 358, "home": 372, "jewelry": 339, "kids": 320 } for(var i in categories) { console.log("name: " + i + "id: " + ?); } I'm trying to import name of categories and id to mongodb but having hard time how to get the ID of each value? Is this possible or I have to re arrange the JSON file by hand?
favorite count: 0
has comment: http://stackoverflow.com/comment/42580209
has answer: http://stackoverflow.com/a/27028858
accepted answer: http://stackoverflow.com/a/27028858
downvote count: 2

http://stackoverflow.com/comment/42521859
comment on: http://stackoverflow.com/q/26995619
has text: possibly, you have got a recursion by loading same script with this setInterval call, just increase period and add some console message to count how many times you code is called
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/27038544
tagged with: javascript
score: 0
answer count: 1
has title: Titanium - Determine the cause of application crash
type: UnansweredQuestion
has body: For non-crashing error handling, we can use LogCatcher which will inform us of the corresponding Javascript code which was causing the problem. However, if an application crashes, then there is obviously no time for the logger to log Javascript errors. It seems that the only option is to incorporate packages like ARCA and testflight to get back the native stack trace/crash report etc., which might not be very helpful since in Titanium there is a Javascript-native translation going on. Is there any way to determine the cause of application crash even out of such information? Or is there a way to locate the problematic section of Javascript even in the event of application crash? Thanks!
tagged with: android
tagged with: titanium
tagged with: titanium-mobile
has answer: http://stackoverflow.com/a/27040445
type: Question
tagged with: ios

http://stackoverflow.com/comment/42771236
type: AnswerComment
has text: I was about to say.. this isn't a JSX specific syntax as far as I can see... Firefox javascript feature huh?
comment on: http://stackoverflow.com/a/27136515
type: Comment
score: 0

http://stackoverflow.com/a/27020121
accepted answer of: http://stackoverflow.com/q/27019251
has body: markers is an array of XML DOM elements. var markers = data.documentElement.getElementsByTagName("marker"); gmarkers is the array of google.maps.Marker objects. Create a gmarkers array and change this: downloadUrl("http://estoestalca.cl/?page_id=22", function(data) { var markers = data.documentElement.getElementsByTagName("marker"); for (var i = 0; i &lt; markers.length; i++) { var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var marker = createMarker(markers[i].getAttribute("name"), markers[i].getAttribute("permalink"), latlng, markers[i].getAttribute("imagen"), markers[i].getAttribute("category"), markers[i].getAttribute("tag"), markers[i].getAttribute("fecha1"), markers[i].getAttribute("fecha2")); markers.push(marker); } var markerCluster = new MarkerClusterer(map, markers); }); To: downloadUrl("http://estoestalca.cl/?page_id=22", function(data) { var markers = data.documentElement.getElementsByTagName("marker"); for (var i = 0; i &lt; markers.length; i++) { var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var marker = createMarker(markers[i].getAttribute("name"), markers[i].getAttribute("permalink"), latlng, markers[i].getAttribute("imagen"), markers[i].getAttribute("category"), markers[i].getAttribute("tag"), markers[i].getAttribute("fecha1"), markers[i].getAttribute("fecha2")); gmarkers.push(marker); } var markerCluster = new MarkerClusterer(map, gmarkers); }); working fiddle (with normal marker, MarkerWithLabel doesn't work)
answers question: http://stackoverflow.com/q/27019251
downvote count: 0
has comment: http://stackoverflow.com/comment/42565401
score: 1
has comment: http://stackoverflow.com/comment/42567682
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42566547

http://stackoverflow.com/comment/42747578
type: Comment
comment on: http://stackoverflow.com/a/27122069
score: 0
type: AnswerComment
has text: @TimSeguine : So this will affect the array itself. So if you iterate by any other looping method also, they will fail, not just above approach.

http://stackoverflow.com/a/27053026
score: 0
has body: You have two classes, .work-col-1-2 and .work-col-1-2.visible If you want to add a class called visible you should only use a class called visible. .work-col-1-2 { position: fixed; right: 6%; top: 0; width: 25%; padding: 1%; margin: 0; display: inline-block; box-sizing: border-box; z-index: -1; visibility: hidden; } .visible { visibility: visible; } Your code is fine but is looking for objects with the class name .work-col-1-2 and then adding the visible class which can't find. So changing the name of the class should do the trick.
type: Answer
answers question: http://stackoverflow.com/q/27052937

constructor
tags question: http://stackoverflow.com/q/27135873
tags question: http://stackoverflow.com/q/27002576
tags question: http://stackoverflow.com/q/27020711
tags question: http://stackoverflow.com/q/27018033
tag name: constructor
type: Tag
tags question: http://stackoverflow.com/q/27085657

screeps
tags question: http://stackoverflow.com/q/27150607
tags question: http://stackoverflow.com/q/27072078
tags question: http://stackoverflow.com/q/27050361
tags question: http://stackoverflow.com/q/27051872
tags question: http://stackoverflow.com/q/27080471
tags question: http://stackoverflow.com/q/27137728
tags question: http://stackoverflow.com/q/27069457
tags question: http://stackoverflow.com/q/27079016
tags question: http://stackoverflow.com/q/27060271
tags question: http://stackoverflow.com/q/27074538
tags question: http://stackoverflow.com/q/27049429
tags question: http://stackoverflow.com/q/27065284
tags question: http://stackoverflow.com/q/27074674
tags question: http://stackoverflow.com/q/27056660
tags question: http://stackoverflow.com/q/27061998
tags question: http://stackoverflow.com/q/27063188
tags question: http://stackoverflow.com/q/27101080
tags question: http://stackoverflow.com/q/27078042
tags question: http://stackoverflow.com/q/27053765
tags question: http://stackoverflow.com/q/27070712
tag name: screeps
tags question: http://stackoverflow.com/q/27058687
tags question: http://stackoverflow.com/q/27088639
tags question: http://stackoverflow.com/q/27068361
type: Tag
tags question: http://stackoverflow.com/q/27070203
tags question: http://stackoverflow.com/q/27066111
tags question: http://stackoverflow.com/q/27057305
tags question: http://stackoverflow.com/q/27062400
tags question: http://stackoverflow.com/q/27095810
tags question: http://stackoverflow.com/q/27146190
tags question: http://stackoverflow.com/q/27070717

http://stackoverflow.com/q/26999320
has title: MySQL Array to Javascript
upvote count: 0
has comment: http://stackoverflow.com/comment/42528893
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: php
has comment: http://stackoverflow.com/comment/42529015
type: UnansweredQuestion
downvote count: 2
has body: I am using a nice bit of software for a PHP project, and I am currently trying to do a post code lookup to select an address. The button that I use has three parts (Client Before, Server, Client After) with the first and last being javascript elements. I have managed to put together the first two fine but need a way as storing an array as a javascript variable for the last section, when I am dealing with single values I normally put $result["variable"] = $result in the Client side, then pick this up in the Client After side by using result["qmsinitialdays"]; ctrl1.setValue(qmsinitialdays); However in this example I need to output the following array to store and use as a variable result in a javascript array foreach ($file-&gt;Rows-&gt;Row as $item) { $this-&gt;Data[] = array('Id'=&gt;$item-&gt;attributes()-&gt;Id,'StreetAddress'=&gt;$item-&gt;attributes()-&gt;treetAddress,'Place'=&gt;$item-&gt;attributes()-&gt;Place);}
type: Question
has answer: http://stackoverflow.com/a/26999408
score: -2

http://stackoverflow.com/q/27004618
type: Question
tagged with: javascript
score: 0
tagged with: for-loop
tagged with: html5-canvas
tagged with: jquery
has comment: http://stackoverflow.com/comment/42544144
type: UnansweredQuestion
has title: Spawning sprites with for loops
has comment: http://stackoverflow.com/comment/42538677
tagged with: http://stackoverflow.com/tag/html
has body: I'm having trouble spawning multiples of the same sprite in random locations of the canvas. The var = obstacle is the one I'm talking about. We are trying to do this with a for loop. Please help? Jsbin link : http://jsbin.com/warurijuji/2/edit code thats not working: //Uploading obstacle image var obstacle = new Image(); obstacle.src = "http://2.bp.blogspot.com/-dE5my5trgGU/TyQ4ULWlXhI/AAAAAAAABTE/lD1Al2Vql1c/s320/cartoon+pineapple+clipart.png"; //for loop for spawning it function drawObstacle() { for (i = 0; i &lt;= 50; i++) { var x1 = Math.floor(Math.random() * 299); var y2 = Math.floor(Math.random() * 299); context.fillStyle = "#EEEEEE"; if (x1 &gt; 40 &amp;&amp; y2 &gt; 40) { context.beginPath(); context.arc(x1, y2, 3, 0, Math.PI * 2, true); context.closePath(); context.fill(); } else--i; } }
has comment: http://stackoverflow.com/comment/42538961
answer count: 0
has comment: http://stackoverflow.com/comment/42662210

http://stackoverflow.com/q/27043988
has body: I am to trying to extract numbers from string for example East Texas Baptist University (582) (COL) North Central Texas Academy (202471) (COL) Bloomfield College (1662) (COL) I have used parseInt but it gives me NAN. Can any one please suggest a better way. Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/42606769
score: 0
has title: How to extract number from string using javascript?
favorite count: 0
accepted answer: http://stackoverflow.com/a/27044087
has comment: http://stackoverflow.com/comment/42606841
linked to: http://stackoverflow.com/q/1862130
upvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27044086
has answer: http://stackoverflow.com/a/27044086
has comment: http://stackoverflow.com/comment/42606811
has comment: http://stackoverflow.com/comment/42606787
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42606825
answer count: 2
linked to: http://stackoverflow.com/q/1623221
has answer: http://stackoverflow.com/a/27044087

http://stackoverflow.com/comment/42708037
type: Comment
comment on: http://stackoverflow.com/a/27101769
score: 0
type: AnswerComment
has text: @Bala - I know :/ I know... It actually happened the other way around... I posted the answer first then realized that it's probably a duplicate.

http://stackoverflow.com/a/46769617
score: 0
type: Answer
has body: Nice answer by @Bass Jobsen However I felt that sometimes we might need to dynamically resize the modal. So here extending Bass's solution for resizable and draggable modal Addition and $('.modal-content').resizable(); ×Close Modal title One fine body… Close Save changes Further, you can specify the minHeight and minWidth $('.modal-content').resizable({ minHeight: 100, minWidth: 100 });
answers question: http://stackoverflow.com/q/27120579

http://stackoverflow.com/q/27001711
type: Question
tagged with: nginx
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27001846
tagged with: cors
answer count: 1
tagged with: ajax
has answer: http://stackoverflow.com/a/27001846
has body: I know that if you have a JSON response you can provide CORS, or even wrap to be in a jSONP response. But in this case, I have a JSON file sitting on the server, and I want multiple client applications to be able to AJAX to that file. I'm getting the usual No 'Access-Control-Allow-Origin' header is present on the requested resource Maybe this is an Nginx setting? Thanks!
type: AnsweredQuestion
has title: How to provide AJAX access to JSON file on server
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42533398

http://stackoverflow.com/a/27098511
has comment: http://stackoverflow.com/comment/42702673
score: -1
has comment: http://stackoverflow.com/comment/42703076
answers question: http://stackoverflow.com/q/27098264
has body: Writing html tag attributes with single quote is invalid, this is why browser is converting you data-mistro-events attribute with double quote and your html is being breaking. You must use html attributes with double quote (") instead of single quote (') and write your json with single quote. try following and this will work fine Yes
has comment: http://stackoverflow.com/comment/42702102
downvote count: 1
has comment: http://stackoverflow.com/comment/42702533
upvote count: 0
has comment: http://stackoverflow.com/comment/42702059
type: Answer

http://stackoverflow.com/q/27088679
has comment: http://stackoverflow.com/comment/42688978
type: Question
tagged with: jquery-mobile
has comment: http://stackoverflow.com/comment/42688829
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42688735
score: 0
has comment: http://stackoverflow.com/comment/42688397
has title: jQuery mobile flipswitch refresh causes angularjs digest error
has body: I have this angularjs directive that wraps around jQuery mobile flipswitch widget: mcb.directive('jSwitch', function () { return { scope: { id: '@', label: '@', value: '=', disabled: '@', mini: '@', switch: '&amp;', offlabel: '@', onlabel: '@', onval: '=', offval: '=' }, restrict: 'A', replace: false, templateUrl: 'tpl/widget/jswitch.htm', compile: function (e) { e.trigger('create'); return { post: function (s, e, a) { s.$watch('value', function () { return e.find('#' + a.id).flipswitch('refresh'); }); } } } }; }); &lt;label for="{{id}}"&gt;{{label}}&lt;/label&gt; &lt;select id="{{id}}" name="{{id}}" data-role="flipswitch" data-ng-model="value" data-mini="{{mini}}"&gt; &lt;option value="{{offval}}"&gt;{{offlabel}}&lt;/option&gt; &lt;option value="{{onval}}"&gt;{{onlabel}}&lt;/option&gt; &lt;/select&gt; I expect it to refresh all flipswitch widgets on my application that are bound to same model, once the model value changed. This code does work, but the return e.find('#' + a.id).flipswitch('refresh'); line causes angularjs digest error: Error: [$rootScope:inprog] http://errors.angularjs.org/1.2.27/$rootScope/inprog?p0=%24digest at Error (native) at http://d.h/mcb/js/lib/ajs/ajs.js:6:450 at k (http://d.h/mcb/js/lib/ajs/ajs.js:106:41) at h.$apply (http://d.h/mcb/js/lib/ajs/ajs.js:113:301) at HTMLSelectElement.&lt;anonymous&gt; (http://d.h/mcb/js/lib/ajs/ajs.js:208:36) at HTMLSelectElement.m.event.dispatch (http://d.h/mcb/js/lib/jquery/jquery.js:3:8440) at HTMLSelectElement.r.handle (http://d.h/mcb/js/lib/jquery/jquery.js:3:5150) at Object.m.event.trigger (http://d.h/mcb/js/lib/jquery/jquery.js:3:7541) at HTMLSelectElement.&lt;anonymous&gt; (http://d.h/mcb/js/lib/jquery/jquery.js:3:15408) at Function.m.extend.each (http://d.h/mcb/js/lib/jquery/jquery.js:2:2973) I know that the error is caused by flipswitch('refresh') at least I think so, because I if I remove it, error dissapears, but then I am missing needed functionality.
has comment: http://stackoverflow.com/comment/42686344
answer count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/27019378
has body: Safari does not support this attribute, you need to use JavaScript. You could add the desired functionality like explained here : HTML: &lt;form action="" method="POST" id="formID"&gt; Your name: &lt;input required = "true"/&gt; &lt;br /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; JavaScript: var form = document.getElementById('formID'); // form has to have ID: &lt;form id="formID"&gt; form.noValidate = true; form.addEventListener('submit', function(event) { // listen for form submitting if (!event.target.checkValidity()) { event.preventDefault(); // dismiss the default functionality alert('Please, fill the form'); // error message } }, false);
score: 2
has comment: http://stackoverflow.com/comment/42563617
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27019303
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42563714
answers question: http://stackoverflow.com/q/27019303
type: Answer

http://stackoverflow.com/comment/42606802
has text: http://jsfiddle.net/r0etmyej/1/ - use 1 canvas
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27038658
score: 0

http://stackoverflow.com/comment/42677209
comment on: http://stackoverflow.com/q/27084036
type: Comment
type: QuestionComment
score: 7
has text: @meager Did you even read my question? In what ways OTHER than the user-agent can the browser type bet detected? Please re-open the question.

http://stackoverflow.com/comment/42761005
type: Comment
score: 0
type: AnswerComment
has text: onsubmit didnt turn into blue text like other and the same problem occurs
comment on: http://stackoverflow.com/a/27130858

http://stackoverflow.com/q/27124425
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
has body: I want to check if the user is authenticated before accessing private pages of my app. The plan is to write a script at the top of every page that downloads the jquery, connect to the server and check the connection and redirect the user to login page if he/she is not logged in. For example, this is the private.html page &lt;script src="/js/jquery"&gt; //put a function that will till the download is completed before running the liness below &lt;script&gt; $.ajax(ur:"/server/checkif user is logged"); &lt;/script&gt; //other html elements
has comment: http://stackoverflow.com/comment/42749351
has comment: http://stackoverflow.com/comment/42749079
has title: wait to download jquery.js before completing the rest of the page
type: Question
possible better answer: http://stackoverflow.com/a/27124551
score: -2
has answer: http://stackoverflow.com/a/27124551
tagged with: javascript
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/27124693
accepted answer: http://stackoverflow.com/a/27124693
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27129677
has body: I am trying to rid my site of Hashbangs but I can't seem to get it quite right. For example, if I land on my home page and then click on the "CSS" menu and select the "Origami Element" menu option, I briefly see the page load before I am directed to a GitHub 404 page. If I put the url (http://eat-sleep-code.com/css/origami) in directly, I get sent directly to the GitHub 404. What am I missing, or is this not possible on a GitHub Pages-hosted AngularJS site? Below is a partial chunck of my app.js var app = angular.module('eatsleepcode', ['ngRoute', 'ngSanitize']); /* Routing */ app.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $routeProvider. when('/', {templateUrl: 'views/blog.html', controller: 'BlogController'}). when('/blog', {templateUrl: 'views/blog.html', controller: 'BlogController'}). when('/blog/:postID', {templateUrl: 'views/blog.html', controller: 'BlogController'}). when('/contact', {templateUrl: 'views/contact.html', controller: 'DefaultController'}). when('/privacy', {templateUrl: 'views/privacy.html', controller: 'DefaultController'}). when('/resources', {templateUrl: 'views/resources.html', controller: 'DefaultController'}). when('/terms', {templateUrl: 'views/terms.html', controller: 'DefaultController'}). when('/css/origami', {templateUrl: 'views/css/origami.html', controller: 'DefaultController'}). otherwise({ redirectTo: '/404' }); $locationProvider.html5Mode(true); }]); /* Controllers */ app.controller('DefaultController', function($scope) {});
tagged with: github-pages
tagged with: javascript
has answer: http://stackoverflow.com/a/27130177
answer count: 2
score: 2
accepted answer: http://stackoverflow.com/a/27136905
downvote count: 0
has title: AngularJS, HTML5 mode routing not working
possible better answer: http://stackoverflow.com/a/27130177
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42758742
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19211576
upvote count: 2
has answer: http://stackoverflow.com/a/27136905
has comment: http://stackoverflow.com/comment/42758489
type: Question
tagged with: angularjs-routing

http://stackoverflow.com/q/27034929
has answer: http://stackoverflow.com/a/27035361
tagged with: node.js
has answer: http://stackoverflow.com/a/27036007
has comment: http://stackoverflow.com/comment/42595736
type: Question
tagged with: mongodb
tagged with: angular-ui-router
has body: I have a list of links which leads to different articles. They look something like this: &lt;a ui-sref="post-view({ id: post._id })"&gt;...&lt;/a&gt; And they produce hrefs like this: href="/blog/546cb8af0c0ec394d7fbfdbf", which is what it is supposed to do. When I click the link, I go to the relevant article with the id 546cb8af0c0ec394d7fbfdbf. However, I think having the id in the url like that is less userfriendly than having the title of the article, which is what I want. But I can't think of a good way to do it. Since an articles title not necessarily are unique, I don't know how to get the correct article from the database based on the title (which isn't possible, I need something unique to look it up by). I've build the site on node, with mongodb, express, and angular. For routing I use the angular ui-router project. This is how the routing looks in ui.router: .state('post-view', { url: '/blog/:id', templateUrl: '/post', controller: 'post' }) As you can see, I use the :id in the url, which I access in the post controller. If I was supposed to show the article on the same page, as a sub state of the currently active state, I could have inherited the id from the parent state, but since this leads to a new page, I'm not sure what I could do. Does anyone have any experience with this?
tagged with: javascript
has title: Use an articles title in the url, not the id
has comment: http://stackoverflow.com/comment/42594712
score: 0
answer count: 2
tagged with: angularjs
linked to: http://stackoverflow.com/q/23830421
type: UnansweredQuestion

http://stackoverflow.com/comment/42624432
comment on: http://stackoverflow.com/q/27053755
has text: Your question is rather vague and lacking any constructive syntax to work with. Please reform. Also look into jQuery `.slideDown()` or `.animate()` functions.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27045214
has title: Store JSON data in a variable with vanilla JavaScript
tagged with: http://stackoverflow.com/tag/json
has body: I'm trying to access data from a JSON file but the result of the console is undefined. The GET response is good, the function works but I don't know how to access the response. function AJAX_JSON_Req(url) { var AJAX_req = new XMLHttpRequest(); AJAX_req.open("GET", url, true); AJAX_req.setRequestHeader("Content-type", "application/json"); AJAX_req.onreadystatechange = function() { if(AJAX_req.readyState == 4 &amp;&amp; AJAX_req.status == 200){ return JSON.parse(AJAX_req.responseText); } }; AJAX_req.send(); } var q = AJAX_JSON_Req('questions.json'); console.log(q); //undefined http://codepen.io/gsg/pen/LEEeMg
has answer: http://stackoverflow.com/a/27045337
type: Question
answer count: 2
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/27045328
has comment: http://stackoverflow.com/comment/42609215
has answer: http://stackoverflow.com/a/27045328
accepted answer: http://stackoverflow.com/a/27045337
linked to: http://stackoverflow.com/q/14220321
type: AnsweredQuestion

http://stackoverflow.com/comment/42580863
comment on: http://stackoverflow.com/q/27029079
score: 0
type: Comment
type: QuestionComment
has text: Your quotes are incorrect.

http://stackoverflow.com/comment/42764533
type: QuestionComment
comment on: http://stackoverflow.com/q/27132821
has text: change all getElementById("message1") as getElementById("messageone")
score: 0
type: Comment

http://stackoverflow.com/a/27002604
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42537585
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27001964
answers question: http://stackoverflow.com/q/27001964
has body: Thanks for help, (I use Bootstrap/jQuery/Codeigniter if that will help somebody) but if I add $( document ).ready my script is working. Thanks for all anyway :) $( document ).ready(function() { ...myscript... });

http://stackoverflow.com/a/27123285
has comment: http://stackoverflow.com/comment/42775324
downvote count: 1
has body: I have not come across any tools to help with this situation. But I have used the conventions below with moderate success. None of them are an exact science though. Regarding IDs: Because IDs are the faster lookup, I tend to use them whenever I'm wanting to address a specific part of my HTML, regardless of how I'm using it (styling/jQuery/testing/etc). However, because each element can only have a single ID, there's not really an opportunity to use a naming convention or style for different uses. And I have found that if I've wanted to address an element for one reason, there's a good chance I'll want it again for a different reason. For example: if I have a button on a page and find it using jQuery (by ID) to attach an event handler, then chances are I'll also want to find that button to test its behaviour. So because an ID can be used for multiple reasons, it should be named in a general way, ideally describing what the element is or represents, rather than how it will be used. It should then make sense however it is used. But as you say, for a given ID it's difficult to tell what it's being used for I agree, and generally don't try to find out unless I have to. Other team members can't add additional IDs to an element that already has one, and should be encouraged to re-use an existing ID if it fits their purpose. Using this approach, existing IDs should not be updated or removed, and become a permanent feature of the HTML. (But like any rule, it can be broken if need be and the risk is worth it) This way everyone should be comfortable to reuse existing IDs without having their code being broken by someone else changing them, and the ID names should make sense for all uses. This should lead to not having too many "extra" IDs. Regarding Classes: In 2+ person teams, there also seems to be a tendency to keep adding more and more ... and avoiding cleaning up those that are already there, in fear of breaking things. My experiences match yours; people tend to add a new…
type: AcceptedAnswer
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/27006934
answers question: http://stackoverflow.com/q/27006934
score: 1

http://stackoverflow.com/comment/42523429
comment on: http://stackoverflow.com/a/26992302
has text: Updated. Good luck with it.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42742408
score: 0
type: QuestionComment
type: Comment
has text: but when i click enter it nothing happen ...
comment on: http://stackoverflow.com/q/27120629

http://stackoverflow.com/q/27147105
has answer: http://stackoverflow.com/a/27147276
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27149773
downvote count: 1
has comment: http://stackoverflow.com/comment/42789937
type: Question
has answer: http://stackoverflow.com/a/27147324
tagged with: arrays
has answer: http://stackoverflow.com/a/27147142
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/113783154
possible better answer: http://stackoverflow.com/a/27147253
tagged with: type-conversion
has answer: http://stackoverflow.com/a/27147253
upvote count: 0
answer count: 7
accepted answer: http://stackoverflow.com/a/27147324
favorite count: 0
has title: Convert numeric strings in multi-dimensional array to int
has answer: http://stackoverflow.com/a/65256221
tagged with: multidimensional-array
linked to: http://stackoverflow.com/q/9593765
has answer: http://stackoverflow.com/a/27147285
linked to: http://stackoverflow.com/q/9425250
tagged with: php
has body: I have a multi-dimensional array: array(3) { [0]=> array(2) { [0]=> string(3) "ABC" [1]=> string(3) "744" } [1]=> array(2) { [0]=> string(3) "DEF" [1]=> string(2) "86" } [2]=> array(2) { [0]=> string(3) "GHI" [1]=> string(1) "2" } } Now I want to convert the string-type values which are numbers to integer type. Ex 744 is string but it should be integer. I have tried a few functions after searching forums but with no success. Later I have to use this array in json_encode() function and in my javascript process numeric values must be integer-type.

http://stackoverflow.com/comment/42763613
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27132397
type: Comment
has text: Using `font-size: 0` is ingenious. +1!

http://stackoverflow.com/q/26998945
tagged with: codeigniter
has title: Javascript availability validation in PHP CodeIgniter framework
type: Question
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/26999248
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42528196
tagged with: validation
has answer: http://stackoverflow.com/a/26999248
favorite count: 0
has comment: http://stackoverflow.com/comment/42528399
upvote count: 1
tagged with: php
has answer: http://stackoverflow.com/a/27003253
accepted answer: http://stackoverflow.com/a/27003253
type: AnsweredQuestion
has body: Really need help please. I can't seem to make the validations of this page work. I have a page that displays categories and everything works fine. No problem in adding and editing of records except that my validation for checking if the record already exists is not working. View: <?php echo validation_errors(); ?> <?php $message = (isset($is_editing))? 'Name already exists' : 'Name available'; $mode = (isset($is_editing))? 'disabled' : 'disabled'; $category_name = (isset($is_editing))? $categorycontent->category_name : NULL; $process = (isset($is_editing))? 'Edit' : 'Create'; $form_action = (isset($is_editing))? 'category/update_category/' . $id : 'category/create_category'; $test = NULL; ?> <?php echo form_open($form_action, 'id="frm" class="form-horizontal" style="margin: 0;"'); ?> x <?php echo $process ?> Item Category Information Item Category Name* <?php echo form_input('category_name', $category_name, 'id="category_name" style="height: 30px;"'); ?> <?php echo form_input('test', $test, 'id="test" style="height: 30px;"') ?> <!-- <?php echo form_hidden('creator_id', $this->ion_auth->user()->row()->id); ?> --> <?php echo form_close(); ?> And my category Controller: public function check_availability() { $category_name = $this->input->post('category_name'); $this->form_validation->set_rules('category_name', 'category_name', 'required|is_unique[tblitemcategories.category_name]'); if ($this->form_validation->run() == FALSE) { //user name is not availble echo "no"; } else { //user name is available echo "yes"; } } I don't know what I'm doing wrong and I'm pretty new to creating websites, so any help is much appreciated. Many thanks in advance.
score: 1

http://stackoverflow.com/comment/42787184
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27145710
has text: @KristerAndersson Yes, I know.

http://stackoverflow.com/q/27099797
has comment: http://stackoverflow.com/comment/42704324
has body: I have a function in jquery that on keyup it is supposed to do math with values from 2 fields, and change the values of my totalweight field with ID of totalweight, like so: jQuery: $('#numberOfItems').keyup(function(){ var items = $('#numberOfItems').val(); var weightitem = $('#weightitem').val(); var totalweight = items * weightitem; $('#totalweight').val(totalweight); }); HTML: &lt;div&gt; &lt;form&gt; &lt;input type="text" id=weightitem"" placeholder="Weight per item"&gt; &lt;input type="text" id=numberOfItems"" placeholder="Items"&gt; &lt;input type="text" id=totalweight"" placeholder="Weight in total"&gt; &lt;/form&gt; &lt;/div&gt; But this is not working... Could anyone help me with this matter? Thank you in advance!
downvote count: 2
tagged with: forms
upvote count: 1
has comment: http://stackoverflow.com/comment/42704024
type: Question
has answer: http://stackoverflow.com/a/27099914
tagged with: math
tagged with: javascript
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/42726535
tagged with: function
has title: jquery get values from a form field and do math with them function not working
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42704169
has answer: http://stackoverflow.com/a/27100040
type: UnansweredQuestion

http://stackoverflow.com/a/27073813
upvote count: 1
has body: Functionally there is no difference between the two - either way you're adding a watcher to the scope (if it acted differently then there would be a problem!). I tend to add watchers in the directive to control how external attributes are mapped to internal scope variables (similar to the directive isolate scope). i.e. the controller doesn't care where the values come from, as long as they are on the scope. I then use watchers in the controller to watch values on those internal properties - to know when sub-properties have changed and respond to that inside the controller. i.e. the directive doesn't care about how the properties are used, it just needs to put them on the scope for the controller. Here is an example using isolate scope: angular.module('MyModule').directive('myDirective', function(){ return { scope: { // The isolate scope sets up a watcher on the external // property and makes it available on the scope // as `scope.internalProp` 'internalProp': '=externalProp' }, controller: function($scope){ // Work with `internalProp` - the directive // manages putting it on the scope. $scope.internalProp //... $scope.$watch('internalProp.myProp', function(value){ // Do something when `myProp` changes. }); } }; }); Here is an example using a child scope but mapping the same external value to scope.internalProp. This doesn't create an isolate scope so you still get scope inheritance (which can be useful sometimes). angular.module('MyModule').directive('myDirective', function($parse){ return { scope: true, link: function(scope, element, attr){ // Example of manually watching an attribute value // in a directive. var propGetter = $parse(attr['externalProp']); scope.$parent.$watch(propGetter, function(value){ scope.internalProp = value; }); }, controller: function($scope){ // Work with `internalProp` - the directive // manages putting it on the scope. $scope.internalProp //... $scope.$watch('internalProp.myProp', function(value){ // Do something when `myProp` changes. }…
answers question: http://stackoverflow.com/q/27073638
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42535413
score: 0
type: Comment
has text: no, it doesn't sending post data. I receiving only a page without set data.
comment on: http://stackoverflow.com/a/27000385
type: AnswerComment

http://stackoverflow.com/a/27087809
has body: The key thing you need to realize that this function is designed to be called multiple times in a loop. Each time the function is called it will return exactly once, with one node value. On each call it can follow a different path through the function. For instance, it first checks if there's a child node for the selected node. If there is, it'll 'return' it. Shouldn't this end the function? It does end the function, if there's a child node, because the return statement is inside the if. Otherwise it will continue with the rest of the function. Either way, it will get to the next nodes on subsequent calls of the function. When it continues on to the while loop, it checks if there's a next sibling. It 'returns' this too. What is it returning it to? The calling function, as usual, assuming it didn't already end the call by returning a value from the if at the top of the function or from a previous iteration of that while loop. It then jumps to the parent node, and then checks again. Only if it didn't yet return.
answers question: http://stackoverflow.com/q/27087723
score: 0
type: Answer

http://stackoverflow.com/comment/42779917
has text: Have you benchmarked it to see how much of a difference it makes?
type: Comment
comment on: http://stackoverflow.com/q/27032656
score: 0
type: QuestionComment

http://stackoverflow.com/a/27115648
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27115300
answers question: http://stackoverflow.com/q/27115300
type: Answer
downvote count: 0
score: 2
has body: I don't think that you can do this with a single call to _.sortBy(). However, you can accomplish it in two steps: call _.sortBy() and assign the key of each object as a property call _.each() on the sorted array to get the desired object structure Here is an example JSBIN The underlying problem is that objects are unordered collections of properties.

http://stackoverflow.com/q/27096998
has title: TypeError: arr is null
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42699334
answer count: 0
has body: The code: var numFriends = 30; var arr = document.body.innerHTML.match(/inviteFriend\(\'(\d+)\',5\)/gm); for (var i = 0; i &lt; numFriends; i++) { friendInvited({}, (/inviteFriend\(\'(\d+)\',5\)/gm.exec(arr[i]))[1]); }; Entering the code in console in Firefox returns the following error: TypeError: arr is null And in Chrome: TypeError: Cannot read property '0' of null
type: Question
has comment: http://stackoverflow.com/comment/42701937
tagged with: javascript
score: 0
tagged with: typeerror

http://stackoverflow.com/a/27042268
downvote count: 0
type: Answer
has body: It seems to me the main body of your question is "How do I get the value of a radio input", which is answered here: Get Radio Button Value with Javascript . The rest is just checking the value against the correct answer: if (getRadioValue(getAnswer1) === answer[0]) { ++score; } supposing you put the above-linked solution into a getRadioValue() function like this: function getRadioValue(radios) { for (var i = 0, length = radios.length; i &lt; length; i++) { if (radios[i].checked) { return radios[i].value; } } } Offtopic hint: Looking at your code, I'd suggest learning more about basic language constructs (in this case, cycles) before venturing forward into creating interactive forms.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27041712
score: 1
answers question: http://stackoverflow.com/q/27041712
type: AcceptedAnswer

http://stackoverflow.com/a/27033248
answers question: http://stackoverflow.com/q/27033122
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42588702
has comment: http://stackoverflow.com/comment/42587925
has comment: http://stackoverflow.com/comment/42600390
downvote count: 0
has body: I added to your markup so it would be easier to select the target area: $('#shopperlanguage').on('change', function() { $('.cat-select a span.text').text( $('option:selected',this).text() ); }) .change(); japanees English (International) English
type: Answer
has comment: http://stackoverflow.com/comment/42588435

http://stackoverflow.com/comment/42789605
type: AnswerComment
type: Comment
has text: Forget that, someone already put it up in jsperf. http://jsperf.com/for-vs-foreach Holy cow, simple for loop is 4.5x faster than forEach! And I did it in latest Safari which natively supports ES5 forEach. Thanks, I learned something new. I would upvote your answer again (but SO only allows it once).
comment on: http://stackoverflow.com/a/27146925
score: 0

http://stackoverflow.com/a/48444273
answers question: http://stackoverflow.com/q/27135534
type: Answer
has body: Jut in case this helps anyone in the future... I was experiencing this issue as well. I tried everything I could think of and everything all other forums suggested. The fix for me was my server! I have a t2.nano with AWS EC2 and I had uploaded my apps with mup. It took me a long time to realise this was the cause... but if I just have 2 apps running everything works ok. I then added a third app and this is when problems occurred. I'm guessing it is down to the basic server I was running not being able to handle 3 docker containers for my apps and a fourth for mongo. I always had issues uploading my third app with mup as well. I'm guessing this might be part of the issue. So the point is... your publications etc might all be ok but the time to get a response from the server itself rather than the app can have an affect on this too.
score: 0

http://stackoverflow.com/a/27034449
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27032470
has body: you cannot change the type of a document (not that I know of at least). Why don't you abstract the ID, you keep the technical _id for technical use and give your document a nice functional id to use in you app! You can then delete your active document and create your inactive one, keeping the functional ID. Or event better, add an active / inactive flag in your document so you just flag your document as deleted and you make a nice alias "active" which filters out the inactive documents. That way you can request your active documents in a super nice way. Doc for the aliases -> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html
downvote count: 0

http://stackoverflow.com/q/27145175
accepted answer: http://stackoverflow.com/a/27154334
tagged with: typedarray
has title: Is it safe to modify buffer after WebSocket.send()?
type: AnsweredQuestion
downvote count: 0
has body: Does WebSocket.send() copy the passed array buffer so that it is safe to modify it afterward? Say: var a = new Uint8Array([1, 2, 3]); websocket.send(a); a[2] = 4; Is this safe even if the socket is full and the buffer isn't sent immediately?
score: 1
type: Question
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: websocket
favorite count: 0
has answer: http://stackoverflow.com/a/27154334

http://stackoverflow.com/q/26994151
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/26994371
type: Question
accepted answer: http://stackoverflow.com/a/26994239
has body: I am using java-script window.onbeforeunload function to show an alert to user whenever user tries to leave the page without submitting the data. This functionality is working fine. I facing problem, while ajax response received from server page and placed in success callback function and then i reload that window page using window.location.href functionality window.location.href=baseurl+'index.php/functionname/'+arg_id; While page reloading into another page it shown that dialog box section Here my ajax function: $.ajax({ type: "POST", url: baseurl+"index.php/sample/samplefunction", data: {"demo_detail":sse,'demo_detail':pro}, success:function(data) { if(data) { window.location.href=baseurl+'index.php/functionname/'+arg_id; } } }); Here my working window.onbeforeunload functionality window.onbeforeunload = confirmExit; function confirmExit() { return "You have attempted to leave this page. Are you sure you want to exit this page?"; } How to prevent for window.onbeforeunload function in ajax response using javascript
score: 1
has answer: http://stackoverflow.com/a/26994239
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26994371
favorite count: 0
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: How to prevent window.onbeforeunload function in ajax response using javascript

http://stackoverflow.com/comment/42645162
type: QuestionComment
type: Comment
has text: alright. I updated my answer too
comment on: http://stackoverflow.com/q/27065010
score: 0

http://stackoverflow.com/comment/42712624
type: Comment
score: 1
type: QuestionComment
has text: From my understanding, you're telling the httpMock to return a result of data whenever a request is made but data isn't defined in your test anywhere (that I can see). Try adding var data = { bananas: "are yellow" } before httpMock.expectGet.
comment on: http://stackoverflow.com/q/27101230

http://stackoverflow.com/comment/42739863
type: AnswerComment
comment on: http://stackoverflow.com/a/27106030
type: Comment
has text: it doesnt it returns undefined den d value and all over again
score: 0

http://stackoverflow.com/q/27083539
type: UnansweredQuestion
tagged with: audio
has answer: http://stackoverflow.com/a/27084421
has title: Play/pause audio element on playlist item click
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: So i´m working with this audio player http://jsfiddle.net/lastrose/vkMqR/light/ , and what i´m triying to do is to "pause" a song when that item on the playlist is clicked. Be in consideration that im very new at this js stuff. can anyone help me? this is the code: $(window).load(function(){ var audio; var playlist; var tracks; var current; init(); function init(){ current = 0; audio = $('audio'); playlist = $('#playlist'); tracks = playlist.find('bl-content a'); len = tracks.length; 0; audio[0].volume = .75; playlist.find('a').click(function(e){ e.preventDefault(); link = $(this); current = link.parent().index(); run(link, audio[0]); }); audio[0].addEventListener('ended',function(e){ current++; if(current == len){ current = 0; link = playlist.find('a')[0]; }else{ link = playlist.find('a')[current]; } run($(link),audio[0]); }); } function run(link, player){ player.src = link.attr('href'); par = link.parent(); par.addClass('active').siblings().removeClass('active'); audio[0].load(); audio[0].play(); } })
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/q/27084385
has answer: http://stackoverflow.com/a/27084436
has title: Javascript function is not getting called onclick?
has body: Can anyone see why this is not working? I have a javascript function called addexercise() name }}', '{{ $workout->workout_id }}'); return false;" role="button" data-toggle="modal" class="btn btn-success"> Add Exercises When I click the button Add Exercises it does work and the modal opens up but the onclick is not working. Here is my JS I have at the end of the file: Any ideas what I am doing wrong?
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/42644503
type: Comment
comment on: http://stackoverflow.com/a/27064317
has text: @hon2a - Why should I move more stuff to $(document).ready()?
type: AnswerComment
score: 0

sorting
tags question: http://stackoverflow.com/q/27007670
tags question: http://stackoverflow.com/q/27143582
tags question: http://stackoverflow.com/q/27036369
tags question: http://stackoverflow.com/q/27147128
tags question: http://stackoverflow.com/q/27030827
tags question: http://stackoverflow.com/q/27116696
tags question: http://stackoverflow.com/q/27013560
type: Tag
tags question: http://stackoverflow.com/q/27123272
tags question: http://stackoverflow.com/q/27040401
tags question: http://stackoverflow.com/q/27068443
tag name: sorting
tags question: http://stackoverflow.com/q/27105574
tags question: http://stackoverflow.com/q/27009696
tags question: http://stackoverflow.com/q/27115300
tags question: http://stackoverflow.com/q/27071942
tags question: http://stackoverflow.com/q/27132771
tags question: http://stackoverflow.com/q/27126263
tags question: http://stackoverflow.com/q/27149709

http://stackoverflow.com/comment/42742400
comment on: http://stackoverflow.com/q/27111898
score: 0
has text: hope this will be of help http://stackoverflow.com/questions/17393683/regex-only-capturing-last-instance-of-capture-group-in-match
type: QuestionComment
type: Comment

flipclock
tags question: http://stackoverflow.com/q/27031313
tag name: flipclock
type: Tag

http://stackoverflow.com/a/27040408
has comment: http://stackoverflow.com/comment/42602527
type: AcceptedAnswer
score: 4
accepted answer of: http://stackoverflow.com/q/27040023
type: Answer
has comment: http://stackoverflow.com/comment/42602925
answers question: http://stackoverflow.com/q/27040023
upvote count: 4
has comment: http://stackoverflow.com/comment/42603661
downvote count: 0
has body: You've overcomplicated it, but option 3 is one way to do it. var imageSize = function(url, callback) { var img = new Image(); img.onload = function(){ if(callback) callback(img.width,img.height); } img.src = url; } $(function(){ var url = $('#foo').css('background-image').replace(/url\(|\)$|"/ig, ''); imageSize(url,function(w,h){ alert("width=" + w + ", height=" + h); }) }); #foo{ background-image:url(http://lorempixel.com/100/100/) } test The thing to remember is that the method imageSize is asynchronous, so you must pass it a callback which will be called when the image has loaded. You cant have another method where you treat it as a synchronous call, that just wont work.
has comment: http://stackoverflow.com/comment/42603592

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/27102954
tags question: http://stackoverflow.com/q/27117902
tags question: http://stackoverflow.com/q/27011645
tags question: http://stackoverflow.com/q/27074215
tags question: http://stackoverflow.com/q/27083982
tags question: http://stackoverflow.com/q/27014772
tags question: http://stackoverflow.com/q/27148032
tags question: http://stackoverflow.com/q/26996532
tags question: http://stackoverflow.com/q/27126763
tags question: http://stackoverflow.com/q/27057952
tags question: http://stackoverflow.com/q/27038457
tags question: http://stackoverflow.com/q/27072550
tags question: http://stackoverflow.com/q/27053143
tags question: http://stackoverflow.com/q/27093932
tags question: http://stackoverflow.com/q/26994404
tags question: http://stackoverflow.com/q/27127798
tags question: http://stackoverflow.com/q/27129400
tags question: http://stackoverflow.com/q/27105895
tags question: http://stackoverflow.com/q/27047972
tags question: http://stackoverflow.com/q/27068106
tags question: http://stackoverflow.com/q/27077243
tags question: http://stackoverflow.com/q/27027872
tags question: http://stackoverflow.com/q/27031945
tags question: http://stackoverflow.com/q/27025397
tags question: http://stackoverflow.com/q/27132114
tag name: svg
tags question: http://stackoverflow.com/q/27060186
tags question: http://stackoverflow.com/q/27034563
tags question: http://stackoverflow.com/q/27051337
tags question: http://stackoverflow.com/q/27035593
tags question: http://stackoverflow.com/q/27133532
tags question: http://stackoverflow.com/q/27074096
tags question: http://stackoverflow.com/q/26998142
tags question: http://stackoverflow.com/q/27075638
tags question: http://stackoverflow.com/q/27007443
tags question: http://stackoverflow.com/q/27140828
tags question: http://stackoverflow.com/q/27028596
tags question: http://stackoverflow.com/q/27098984
tags question: http://stackoverflow.com/q/27141324
tags question: http://stackoverflow.com/q/27071709
tags question: http://stackoverflow.com/q/27042094
tags question: http://stackoverflow.com/q/27114495
tags question: http://stackoverflow.com/q/27065281
tags question: http://stackoverflow.com/q/27147759
tags question: http://stackoverflow.com/q/27042139
tags question: http://stackoverflow.com/q/27097253
tags question: http://stackoverflow.com/q/27085555
tags question: http://stackoverflow.com/q/27084591
tags question: http://stackoverflow.com/q/27073090
tags question: http://stackoverflow.com/q/27029383
tags question: http://stackoverflow.com/q/27102994
tags question: http://stackoverflow.com/q/27072703
tags question: http://stackoverflow.com/q/27094754
tags question: http://stackoverflow.com/q/27024648
tags question: http://stackoverflow.com/q/27051531
tags question: http://stackoverflow.com/q/27147867
tags question: http://stackoverflow.com/q/27148967
tags question: http://stackoverflow.com/q/27099171
tags question: http://stackoverflow.com/q/27069437
type: Tag

http://stackoverflow.com/comment/42855632
comment on: http://stackoverflow.com/a/27151481
type: Comment
score: 0
type: AnswerComment
has text: Yes but the only thing is that you would need to write a function to read and write the date to the desired string. Its about 3 lines of code. Yes ofc you can use the timestamp but string works fine for the reason that you control exactly how it is entered in the db.

http://stackoverflow.com/q/27036004
has title: jquery FullCalendar returns http 403 error
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42593754
tagged with: fullcalendar
has comment: http://stackoverflow.com/comment/42594188
has body: I have integrated jquery FullCalender2.2 in my php website. It is working fine with localhost but when I upload it online in my url "http://iamfortesting.com" it returns 403 response. Please help as I am unable to get the issue. Console Log is given below- Failed to load resource: the server responded with a status of 403 (Forbidden) http://iamfortesting.com/......../fullcalendar.css same is for fullcalendar.js also.
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27036685
has comment: http://stackoverflow.com/comment/42592533
score: 0
has comment: http://stackoverflow.com/comment/42595445

http://stackoverflow.com/comment/42749524
type: Comment
comment on: http://stackoverflow.com/q/27124594
type: QuestionComment
has text: Certainly not Gmail or Outlook.
score: 0

http://stackoverflow.com/comment/42601893
type: Comment
comment on: http://stackoverflow.com/a/27040391
type: AnswerComment
has text: @WisdmLabs @sanatan you are calling `$('#ContactList').listview('refresh');` inside the `.each` function.
score: 0

http://stackoverflow.com/a/27149357
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/110163984
has comment: http://stackoverflow.com/comment/110186371
type: Answer
has body: A recursive divide-and-conquer approach: function distribute(length, value) { if (length &lt;= 1) return [value]; var half = Math.floor(length / 2), dist = Math.floor(Math.random() * value); return distribute(half, dist).concat(distribute(length-half, value-dist)); }
has comment: http://stackoverflow.com/comment/99429401
has comment: http://stackoverflow.com/comment/110173104
has comment: http://stackoverflow.com/comment/99408712
has comment: http://stackoverflow.com/comment/99400455
has comment: http://stackoverflow.com/comment/110163893
upvote count: 3
has comment: http://stackoverflow.com/comment/110186147
has comment: http://stackoverflow.com/comment/99417340
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27149214
answers question: http://stackoverflow.com/q/27149214
score: 3

http://stackoverflow.com/comment/44286091
has text: A million thanks, you have ended 3 days of pain! I wasn't using DI with ui-router `resolve` properly and your clear example helped get me on the right track.
type: AnswerComment
comment on: http://stackoverflow.com/a/27050497
type: Comment
score: 1

http://stackoverflow.com/comment/42691158
has text: does the add to cart button return something once the add-action is successfull?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27092491

http://stackoverflow.com/comment/42585971
has text: One time, at the scroll location.
comment on: http://stackoverflow.com/q/27029533
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27147073
answer count: 1
tagged with: javascript
score: 0
tagged with: file-io
has body: I'm using cordova (phonegap) to build an Android/iOS App The App has to cache data. It receives a JSON file from a Server which is then processed (data displayed as HTML). My problem is in this code: function moveExercisesJSON(){ console.log("moving exercises json"); var fail = function(err) { console.log(err) } window.resolveLocalFileSystemURL(fileSave, function(file){ window.resolveLocalFileSystemURL(store, function(store){ file.moveTo(store, "exercises.json"); console.log("done moving"); displayExerciseList(); },fail); },fail); } The JSON file (exercises.json) is downloaded to a downloads-folder, then this function is opened. The file is moved via file.moveTo. Then displayExerciseList() is opened (which processes/displays the data in the json file). However, it seems displayExerciseList() is called before file.moveTo is done. Therefor I am always one version behind when first opened (since the new version has not yet been moved from the downloads-folder) How can I wait for .moveTo to finish before calling displayExerciseList() A timer doesn't seem to be a solution since I have to do the same for movie-files (which differ a lot in size).
has title: cordova (javascript) file.moveTo wait until finished
tagged with: cordova-plugins
tagged with: cordova
has answer: http://stackoverflow.com/a/27154001
has comment: http://stackoverflow.com/comment/44126966
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27154001

http://stackoverflow.com/comment/42788119
type: Comment
has text: @ranga..as far i understand what you are saying...take a global variable say flag which has intial value say "0" and set its value "1" if validations fails in above code and then check its value on form submit and use `return false` if flag is "1"
type: AnswerComment
comment on: http://stackoverflow.com/a/27145945
score: 0

http://stackoverflow.com/q/27113027
type: UnansweredQuestion
tagged with: php
tagged with: paypal
linked to: http://stackoverflow.com/q/4823961
linked to: http://stackoverflow.com/q/14614334
type: Question
has answer: http://stackoverflow.com/a/27118994
has title: submit both a paypal form and a php form with the same button, using jquery & ajax
answer count: 1
has body: I'm quite familiar with HTML and PHP, but realy novice in jQuery and Ajax. After searching quite a while, like here : One form, One submission button, but TWO actions and here : Writing to my DB and submitting a form to Paypal using the same form?, I'm still confused with the eaxact code I have to write into my HTML file. What I want to do is with only one click on the "submit" button, sending an email with the data entered by the user (via the "reserve.php" file) and sending the user to the paypal payment page. Sorry to ask again the same question, but every try I made combining the different solutions proposed here and elsewhere lend me to nothing. Here is my simplified HTML code : Bienvenue Telecom <!--[if lte IE 8]> <![endif]-->
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0

http://stackoverflow.com/comment/42538417
score: 1
has text: I don't think Chrome supports Harmony.
comment on: http://stackoverflow.com/q/27004569
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27011737
has comment: http://stackoverflow.com/comment/42557232
accepted answer of: http://stackoverflow.com/q/27006956
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27006956
type: AcceptedAnswer
downvote count: 0
has body: In MooTools you can use for example: $$('input[name^="field"]') This will get you all the input elements that have a name attribute starting with "field". You could combine with that a .filter() with a funcion for validating and check in the end `the length property of this elements collection. Something like: $$('button').addEvent('click', function () { var inputs = $$('[name^="field"]'); var notValidating = inputs.filter(function (input) { return !input.value; }) alert('There are ' + notValidating.length + ' inputs not validating.'); }); jsFiddle: http://jsfiddle.net/kthaqmL2/
type: Answer

http://stackoverflow.com/comment/42768449
comment on: http://stackoverflow.com/q/27117681
score: 0
type: QuestionComment
type: Comment
has text: @nemesv, okay, that's helpful, but I have multiple rows, each with one checkbox. Using your method, when I select one checkbox, *all* the rows and checkboxes are highlighted. http://jsfiddle.net/eqoryb6v/1/

http://stackoverflow.com/comment/42618694
type: Comment
type: QuestionComment
score: 0
has text: What are you POSTing to?
comment on: http://stackoverflow.com/q/27050616

http://stackoverflow.com/comment/42541447
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27005757
type: Comment
has text: Might be odd indeed. I'm still quite unfamiliar with the whole relationship of how postback server-side code all works. This was the first example I found on the net and ran with it.

http://stackoverflow.com/q/27000409
favorite count: 0
has answer: http://stackoverflow.com/a/27000609
has answer: http://stackoverflow.com/a/27000534
answer count: 5
has answer: http://stackoverflow.com/a/27000502
accepted answer: http://stackoverflow.com/a/27000525
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/27000502
downvote count: 0
has answer: http://stackoverflow.com/a/27000525
type: Question
has title: How do I dynamically create a named function disregarding the scope?
has comment: http://stackoverflow.com/comment/42531261
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/27000535
has comment: http://stackoverflow.com/comment/42532033
has body: This works: var i = 'foo'; eval('function '+i+'(param) { this.param = param; return this; }'); console.log(foo); // [Function: foo] This does not: ['bar', 'quux'].forEach(function(i) { eval('function '+i+'(param) { this.param = param; return this; }'); }); console.log(bar); // ReferenceError: bar is not defined Apparently, the forEach function or its subordinate scope confuses things. I checked that the bar function is available during, but it does not survive outside.

http://stackoverflow.com/a/27132165
type: Answer
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27131356
accepted answer of: http://stackoverflow.com/q/27131356
score: 0
has body: You can define your own HTML template for the login form. Assuming you use the login form that comes with TYPO3 and you are using TYPO3 6.2, you can do it this way: Copy the file typo3/sysext/felogin/template.html to some other place. Don't modify it directly, it would be overwritten by updates. Edit the copied file to your needs. Configure the login form to use the copied template. You can do that by either selecting the template in the settings of the login form in the backend, or by setting the TypoScript value plugin.tx_felogin_pi1.template to the path of the template.

http://stackoverflow.com/q/27137728
has comment: http://stackoverflow.com/comment/42774184
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27173977
has body: So i have been trying this to automatically spawn Creeps in percentage to total living creeps. however when i run this, it just keeps on spawning harvesters, completely ignoring the conditions even though console.log returns the expected results . and now i'm clueless about what is going wrong //creepManager.creations() == counts total creeps and spawns creeps in function of total var spawnCreep = require('spawnCreep'); var counter = require('counter'); exports.creations=function(){ if( counter.guardCount()/counter.totalCount()&lt;0.5 &amp;&amp; counter.harvesterCount()&gt;1){ spawnCreep.guard(); } else if (counter.harvesterCount()/counter.totalCount()&lt;0.3){ spawnCreep.harvester(); } else if(counter.builderCount()/counter.totalCount()&lt;0.2){ spawnCreep.builder(); } else { spawnCreep.guard(); //default } }; // 5guards, 3harvesters, 2 builder per 10CREEPS` (spawnCreep is another module which keeps track of how the creepers are build)
type: Question
has comment: http://stackoverflow.com/comment/42779282
has title: screeps: conditions won't work - clueless
tagged with: javascript
score: 0
answer count: 1
tagged with: screeps

http://stackoverflow.com/q/27087055
tagged with: javascript
score: 0
has title: AngularJS push not updating the value in one div while updating in other
answer count: 1
tagged with: jquery
tagged with: angularjs
has body: If I'm adding a new contact, its getting added in ul - li but not in select - option. This is my program. Hello World, AngularJS - ViralPatel.net Email: Add {{ contact }} What is wrong here?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/27087120

http://stackoverflow.com/comment/49419115
score: 0
has text: http://stackoverflow.com/questions/21455695/angularjs-dynamic-form-field-validation/21457121#21457121
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27071413

http://stackoverflow.com/a/27033753
score: 0
has body: You can do as following:- app.get('/', function(req, res) { res.send({"_deployments":JSON.parse(_deployments)}); }); server.listen(port);
type: Answer
answers question: http://stackoverflow.com/q/27031194

http://stackoverflow.com/a/27146252
score: 0
upvote count: 1
answers question: http://stackoverflow.com/q/27146214
downvote count: 1
has body: The shift() method removes the first element from an array and returns that element. This method changes the length of the array. — MDN my_array.shift();
type: Answer

http://stackoverflow.com/comment/42774657
score: 1
comment on: http://stackoverflow.com/q/27137888
has text: @AndroidianSlip, There are numerous ways you could do this. For example, render all the values inside hidden elements using `@Html.EditorFor()` and display them based on the selection, or make a ajax call that returns a partial view based on the selection.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27079643
has answer: http://stackoverflow.com/a/27079809
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27079798
has comment: http://stackoverflow.com/comment/42674163
has title: switch not activating function
has comment: http://stackoverflow.com/comment/42671597
type: Question
has comment: http://stackoverflow.com/comment/42671822
answer count: 2
tagged with: javascript
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: This is supposed to display different things when a different OS is detected, but it shows nothing. I know the function works, because if I call the function without a switch it shows. Also, the sublime text links were just a test. Here is my code: Lesson 1: Prerequisites And I am getting OSName from above: And I know that works because I can display it with: document.write('Your operating system has been determined as '+OSName +'.');

http://stackoverflow.com/q/27055808
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27056933
tagged with: jquery
score: 0
answer count: 1
has title: Passing parent id to a function in jquery
has body: I want to pass parent id of the child in onclick function but I am unable to do it, however I know how to get parent id of a child element. Here is my code can someone correct it. $('#test-'+result[i][1]).append(' Add Friend '); I think there is something wrong with my syntax. Thanks in advance.
has answer: http://stackoverflow.com/a/27056933

http://stackoverflow.com/a/27017007
type: Answer
answers question: http://stackoverflow.com/q/27014423
has body: A couple of links helped me. Testing AngularJs&#39; $http.defaults.headers.common if specific header is set http://andrewfong.com/blog/2014/09/22/angularjs-testing-headers-with-whenget-expectget/ $httpBackend .expect('POST', 'https://www.someurl.com/login', userObj, function (headers) { expect(headers['content-type']).toBe('application/x-www-form-urlencoded'); // MUST return boolean return headers['content-type'] === 'application/x-www-form-urlencoded'; }) .respond();
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27014423
score: 6
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/53421703
has text: Hi @Asik, I have the same problem to delete data and I have tried to do what you suggested but doesn't work for me. Look me php code: $user = 'root'; $password = 'root'; $db = 'angularDB'; $host = 'localhost'; $con = mysqli_connect("localhost", $user, $password, $db); // Check connection if (mysqli_connect_errno()){ echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $postdata = file_get_contents("php://input"); $request = json_decode($postdata); $id = $request->id; $del = mysqli_query($con, "DELETE FROM users WHERE id='$id'");
type: AnswerComment
comment on: http://stackoverflow.com/a/27002654
score: 0
type: Comment

http://stackoverflow.com/q/27035972
downvote count: 1
type: Question
has title: How to create a Google Doc through the Google API
has comment: http://stackoverflow.com/comment/42592970
score: -1
has comment: http://stackoverflow.com/comment/42593145
has comment: http://stackoverflow.com/comment/42592719
tagged with: google-apps-script
upvote count: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/2704902
favorite count: 0
has comment: http://stackoverflow.com/comment/42592903
has answer: http://stackoverflow.com/a/27054509
has comment: http://stackoverflow.com/comment/42592569
tagged with: python
tagged with: google-api
type: UnansweredQuestion
has body: I am developing a Google App Engine Python based Web application. I need to automatically create a new document in a folder in the Google Drive account of the currently logged user when he/she presses a button. I am trying to figure out what library to exploit. I am now using the Python Client Library 3.0 to manage the user's calendars but I can't see how to use them to create new docs and set up some initial content. It would be great if I could use some Javascript library but I am a bit confused about the many different (sometime depcreated) documentation I find on the Internet (i.e. Google Apps Script, Google DocsList, etc.).

http://stackoverflow.com/a/27061561
accepted answer of: http://stackoverflow.com/q/27061426
type: Answer
has comment: http://stackoverflow.com/comment/42645237
score: 2
has comment: http://stackoverflow.com/comment/42638629
upvote count: 2
has comment: http://stackoverflow.com/comment/42644400
has body: The JSON is in a format which is incompatible with what autocomplete widget expects. This is where the $.map comes into play. You use this function to convert the JSON to desired format. Begin by returning a {label: "display name", value: "some id"} pairs like this: response($.map(data, function(item) { return { label: item.full_name, value: item.player_id }; })); Notes: You should send content type header with your JSON: header("Content-Type: application/json"); echo $result; You should use request.term instead of input element value for the data parameter like this: data: { term: request.term } You should set higher delay and minLength values to reduce number of JSON requests: delay: 500, minLength: 3, There are some undefined variables in your PHP script. Fix. Make sure that you echo the JSON instead of returning it. The remote server sends JSON so there is no need to json encode it again. $term = $_GET['term']; $result = file_get_contents('http://www.futhead.com/15/players/search/quick/?term=' . $term); header("Content-Type: application/json"); echo $result; Always check your PHP scripts for issues by opening directly in browser. Always look at browser JavaScript console to look for JavaScript errors and warnings.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27061426

http://stackoverflow.com/a/27100690
type: Answer
answers question: http://stackoverflow.com/q/27039360
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27039360
score: 0
has body: I found a way to do this. Using the jQuery waypoints plugin you can detect when a user is scrolling to an element. The div with the video has the id 'P2', so I added this code to my page with the video: &lt;script&gt; // Use waypoints.min.js to detect if the user is at div with id P2 $(function() { $('#P2').waypoint(function() { $('#P2').playYTP(); }); }); &lt;/script&gt; You can find waypoints here: https://github.com/imakewebthings/jquery-waypoints

http://stackoverflow.com/q/27033903
has comment: http://stackoverflow.com/comment/42590944
has answer: http://stackoverflow.com/a/27035203
score: 3
tagged with: javascript
type: Question
has body: I have created a div and set its initial position &lt;div class="guide" &gt; &lt;style&gt; .guide{ height:150px; width:200px; position:absolute; right:-170px; top: 10%; } &lt;/style&gt; What i want when i click on the div it should comeout from right side. The problem is window is providing hrizontal scroll, so if a person scrolls to right the div is compltely visible. I want to stop horizontal scroll so that if the user click on div then only its visible. Now if any body explain that why its going after -ve pixels, becouse sometime it doesn't go beyond -ve px, sometime it goes, why?
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/27033939
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/27034829
has comment: http://stackoverflow.com/comment/42588743
has comment: http://stackoverflow.com/comment/42589014
tagged with: http://stackoverflow.com/tag/html
has title: trying to stop horizontal scrolling
tagged with: css
has comment: http://stackoverflow.com/comment/42590900
upvote count: 3
type: UnansweredQuestion

http://stackoverflow.com/comment/42784591
has text: can i still get the name of each individual checkbox though? Cause i do have to know which are checked and which are not
comment on: http://stackoverflow.com/a/27144206
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42577133
has text: It has to do with no standards being written that say what is supposed to happen in this case. Therefore, browsers are not going to handle this predictably.
comment on: http://stackoverflow.com/a/27024911
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42700148
score: 0
comment on: http://stackoverflow.com/a/27094832
type: AnswerComment
type: Comment
has text: I'm not looking for an equality function, nor to change the behavior of the has method. That was only an example, I'm looking to be able to define equality for my own object. That way duplicate objects wouldn't be contained within the set.

http://stackoverflow.com/comment/42862139
comment on: http://stackoverflow.com/a/27148419
type: AnswerComment
score: 0
type: Comment
has text: Please post your code to plunkr, jsfiddle or any other code playground -- reproducing the errors you are seeing?

http://stackoverflow.com/a/27064010
type: Answer
has comment: http://stackoverflow.com/comment/42707699
has body: As you are not opposed to using JS, you might want to checkout http://selectivizr.com/. We have used this in several projects that require older browser support and functional custom style checkboxes/radios.
accepted answer of: http://stackoverflow.com/q/27062484
has comment: http://stackoverflow.com/comment/42707600
has comment: http://stackoverflow.com/comment/42707221
answers question: http://stackoverflow.com/q/27062484
has comment: http://stackoverflow.com/comment/42707882
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27061704
accepted answer: http://stackoverflow.com/a/27062445
answer count: 3
has title: Injecting javaScript into web page to disable a texbox
tagged with: jquery
tagged with: asp.net
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42637783
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27061971
has comment: http://stackoverflow.com/comment/42637745
has answer: http://stackoverflow.com/a/27062445
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27061874
has body: On my aspx page I have a asp button and when I click this button I want to disable this textbox using javascript by injecting it into the web page. $(document).ready(function () { $('#title').click(function () { $('#title').prop("disabled", true); }); }); I have this so far but instead of just applying this to my page I want to inject it into the web page &lt;div id="fieldone"&gt; &lt;asp:TextBox ID="title" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt;
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/27061874
tagged with: javascript
score: -1

http://stackoverflow.com/a/27034439
accepted answer of: http://stackoverflow.com/q/27034420
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42589727
has body: That's what jQuery's data function is for. Setting: $("#linkDiv").data("some-name-here", foo); Getting later: var anotherReferenceToFoo = $("#linkDiv").data("some-name-here"); Removing it: $("#linkDiv").removeData("some-name-here"); data lets you associate any type of data with an HTML element, without causing circular reference problems (although those are really just an issue with really old versions of IE). The data can be of any type supported by JavaScript. If you remove the element at some point, provided you remove it through jQuery rather than directly via the DOM, the data gets cleaned up (even if it's buried deep inside another element and you use html on that other element). var foo = { bar: "baz" }; // Storing it $("#linkDiv").data("some-name-here", foo); // Retrieving it later var f2 = $("#linkDiv").data("some-name-here"); snippet.log("f2.bar = " + f2.bar); // Removing it $("#linkDiv").removeData("some-name-here"); // Checking it's gone var f3 = $("#linkDiv").data("some-name-here"); snippet.log(typeof f3); // undefined &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt; &lt;div id="linkDiv"&gt;&lt;/div&gt;
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27034420
has comment: http://stackoverflow.com/comment/42589711
type: Answer

http://stackoverflow.com/a/27056847
has body: I guess the issue lie at document.form2.cbAdmin.checked == true try to change the 'white' color to something else and see if your condition is passing or not. Thanks
type: Answer
has comment: http://stackoverflow.com/comment/42630722
has comment: http://stackoverflow.com/comment/42630910
score: 0
answers question: http://stackoverflow.com/q/27056710
has comment: http://stackoverflow.com/comment/42630691

http://stackoverflow.com/a/27016287
accepted answer of: http://stackoverflow.com/q/27006122
has comment: http://stackoverflow.com/comment/42561205
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27006122
score: 0
has comment: http://stackoverflow.com/comment/42566728
type: Answer
has comment: http://stackoverflow.com/comment/42560301
has comment: http://stackoverflow.com/comment/42559205
has comment: http://stackoverflow.com/comment/42570960
has comment: http://stackoverflow.com/comment/42561160
has comment: http://stackoverflow.com/comment/42567411
has comment: http://stackoverflow.com/comment/42567420
has body: WilsonBubbles, welcome to StackOverflow. It's easy to think you have to work with ids in this sort of problem but the simplest solutions generally don't require ids. jQuery makes it very simple to traverse the DOM to find other nodes relative to a clicked node (in this case a "submit" button). In the HTML : make sure the &lt;select&gt; elements of interest all have class="subround". (maybe 'subround' is not the right word but it will do the job). And the javascript/jQuery will be ... $(document).ready(function() { $(".forms input[name^='submit']").on('click', function(e) { e.preventDefault(); var $form = $(this).closest('form'), $select = $form.find('select.subround'), val = $select.val(); $.ajax({ type: 'POST', url: '/scores/printPOST.php', data: { 'subround': $form.serialize() }, datatype : 'html' }).then(function(data) { $(document.forms).trigger('reset'); if (val == '0') { //to remove first option from just this row's select menu $select.find("option").eq(0).remove(); //to remove first option from all rows' select menus //$(".forms select.subround option:nth-child(1)").remove(); } }); }); }); I'm not too sure about the option removal. So I've given you two alternative lines of code. It's also not clear why you should want to remove the option(s) only when val == '0'. In this regard, I have just repeated what's in the question.
has comment: http://stackoverflow.com/comment/42562371
has comment: http://stackoverflow.com/comment/42562433

http://stackoverflow.com/q/27031695
tagged with: javascript
tagged with: jquery
tagged with: module-pattern
score: 0
has answer: http://stackoverflow.com/a/27032175
answer count: 1
has comment: http://stackoverflow.com/comment/42585337
has comment: http://stackoverflow.com/comment/42585440
linked to: http://stackoverflow.com/q/728360
type: UnansweredQuestion
has body: I want to initialize my javascript class like this: Example.init({"settings": {"baseUrl":"http://example.com"}, "user": {"id":123, "name":"john doe"} ); And then I want to be able to use it like this: Example.settings.baseUrl Example.user.id; Example.user.name; I am currently using the module pattern like this: Example = (function(){ var _init = function(data) { }; return { init: function($data) { _init($data); } }; })(); Example.module2 = (function(){ var _init = function(data) { if(Example.user.id &gt; 0) { // referencing data set in the Example.init } }; return { init: function($data) { _init($data); } }; })(); I'm not sure how I can expose these properties, looking for an explanation and guidance. (please comment on best practise also, should I use $ for parameters and if so when?) Note: Here is basic outline of what I am trying to do. The first thing I will do is call the Example.init function in all my pages: Example.init({"settings": {"baseUrl":"http://example.com"}, "user": {"id":123, "name":"john doe"} ); I want my other modules to be able to reference this data I set in the .init() method, see the Example.module2 I added above. Is there a timing issue with this?
type: Question
has comment: http://stackoverflow.com/comment/42585384
has comment: http://stackoverflow.com/comment/42607767
linked to: http://stackoverflow.com/q/9362716
has title: Helping designing a javascript class that exposes properties that I initialize

http://stackoverflow.com/a/27071674
score: 3
answers question: http://stackoverflow.com/q/27065284
has body: Here is my use case : Count the number of hostiles (N) in the current room Count the number of alive guards (C) If C &lt; N then build another guard After a while, when using the Room.find(Game.MY_CREEPS), I'll get dead guards aswell. Having to filter them all the time is really painfull, and the global Memory continues to list them. Is there a way to remove dead creeps from the global Memory object ? [EDIT] Found this, hope it will help. for(var i in Memory.creeps) { if(!Game.creeps[i]) { delete Memory.creeps[i]; } } I run it at the beginning of each tick
upvote count: 3
type: Answer
downvote count: 0

http://stackoverflow.com/q/27069169
has comment: http://stackoverflow.com/comment/42653699
has comment: http://stackoverflow.com/comment/42653719
has comment: http://stackoverflow.com/comment/42653633
has comment: http://stackoverflow.com/comment/42653805
possible better answer: http://stackoverflow.com/a/27069302
has comment: http://stackoverflow.com/comment/42653964
has comment: http://stackoverflow.com/comment/42652945
has comment: http://stackoverflow.com/comment/42677550
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27069302
has comment: http://stackoverflow.com/comment/42651618
has comment: http://stackoverflow.com/comment/42651468
has title: jQuery dialog modal opens every time on pageload during click event
has comment: http://stackoverflow.com/comment/42652909
accepted answer: http://stackoverflow.com/a/27091394
has comment: http://stackoverflow.com/comment/42655123
has body: I am using jQuery's Modal dialog popup on page-load to display a message, and upon closing the modal, i am displaying my page, with couple of buttons on the page. When I click on any of those buttons, the modal dialog opens up, and it opens on any click_event on the page. I am not sure how to deactivate the modal dialog on every click_event of the same page. and my html is : Documentation is MANDATORY! Please remember to list the PCP and Radiology Services Visited with the and TIME included. Please select “Agree” to continue. I searched this forum for similar issues, but haven't found any solution for this issue. Any help is appreciated.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42653001
has comment: http://stackoverflow.com/comment/42653664
has comment: http://stackoverflow.com/comment/42653877
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27091394
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27003243
tagged with: filtering
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42536648
has comment: http://stackoverflow.com/comment/42536355
favorite count: 0
type: Question
answer count: 1
score: -1
has title: Filter Google Flights Results
has comment: http://stackoverflow.com/comment/42536427
has comment: http://stackoverflow.com/comment/42536142
downvote count: 1
has answer: http://stackoverflow.com/a/27003604
has body: Is there some javascript I can use to filter the results displayed on This Map by price ? Looks like there are lot of different calls but I can't figure the object/array I should filter on.

http://stackoverflow.com/a/27107855
has comment: http://stackoverflow.com/comment/43428029
upvote count: 3
has comment: http://stackoverflow.com/comment/42771077
has body: No, you can't. Javascript files aren't handled by the Razor engine. You can create a cshtml 'View' and put the code in there and include it using this code in your page, like I think you did (you don't need an action for this): @Html.RenderPartial("_JsFileName"); This way, it will pass the Razor engine and your are set. Unfortunately you can't include it in a bundle then. Another option is to declare only that variable in the page, and use that inside the javascript that remains 'as is'.
type: Answer
answers question: http://stackoverflow.com/q/27107810
score: 3
downvote count: 0

http://stackoverflow.com/q/27145710
favorite count: 0
has comment: http://stackoverflow.com/comment/42787206
type: Question
has comment: http://stackoverflow.com/comment/42787608
has comment: http://stackoverflow.com/comment/42787112
tagged with: php
has title: Java Script variable in php file and use it in same file
has comment: http://stackoverflow.com/comment/42787116
has comment: http://stackoverflow.com/comment/42787759
score: 0
has comment: http://stackoverflow.com/comment/42787671
linked to: http://stackoverflow.com/q/13840429
upvote count: 1
downvote count: 1
duplicate of: http://stackoverflow.com/q/13840429
has comment: http://stackoverflow.com/comment/42787184
has body: First of all, Sorry coz this question has been asked many times in SO.But I am not able to find it working with mine.That's why I am posting here. I have below script at the end of the file: &lt;script type="text/javascript"&gt; $(document).ready(function(){ var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); }); &lt;/script&gt; I want to use that var pos at the top of that php file. I have tried like this : &lt;script type="text/javascript"&gt; //this script at bottom $(document).ready(function(){ var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); }); &lt;/script&gt; &lt;?php //this part at the top of the file if (isset($_GET['coordinates'])) { echo $_GET['coordinates']; } //I have tried with $_POST['coordinates'] ..but still no Echo ?&gt; Can any one help me out ?
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42787162
has comment: http://stackoverflow.com/comment/42787450
has comment: http://stackoverflow.com/comment/42787569
has comment: http://stackoverflow.com/comment/42787105
answer count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42787349

http://stackoverflow.com/q/27148661
has answer: http://stackoverflow.com/a/27157886
has body: I'm playing around trying to find a way to communicate between two browsers on the same network to establish WebRTC without a server roundtrip (no STUN/ICE/TURN). Basically an alternative to the approach found here, where the "handshake" is done via copy/mail/pasting. After sifting through all the cross-browser-communication examples I could find (like via cookies or WebTCP) plus a bunch of questions on SO (like here), I'm back to wondering a simple thing: Question: If Alice and Bob visit the same page foo.html while on the same network and they know each others' internal assigned IP addresses, are there any ways they can communicate purely with what is available on the browser? This excludes non-standard APIs like Mozilla TCP_Socket_API, but other than that all "tricks" are allowed (img tags, iframes, cookies, etc.). I'm just curious if I can listen to someone on the same network "broadcasting" something via the browser at all. Edit: foo.html will be on static server, no logic, no ICE, no shortcut. Edit: Still not a solution but a websocket server as Chrome extension comes closer. Example here: almost pure browser serverless WebRTC
favorite count: 0
has comment: http://stackoverflow.com/comment/42795324
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42792246
linked to: http://stackoverflow.com/q/19322973
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10273127
has comment: http://stackoverflow.com/comment/42799684
answer count: 4
has comment: http://stackoverflow.com/comment/42797060
has comment: http://stackoverflow.com/comment/42793161
linked to: http://stackoverflow.com/q/3342140
has answer: http://stackoverflow.com/a/27148799
upvote count: 10
has comment: http://stackoverflow.com/comment/42792209
has answer: http://stackoverflow.com/a/27149643
type: Question
has comment: http://stackoverflow.com/comment/139949396
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/42792981
tagged with: p2p
tagged with: browser
has answer: http://stackoverflow.com/a/27150135
has title: Can a browser communicate with another browser on the same network directly?
linked to: http://stackoverflow.com/q/3283716
downvote count: 0
tagged with: webrtc

http://stackoverflow.com/a/27113667
answers question: http://stackoverflow.com/q/27113580
has comment: http://stackoverflow.com/comment/42730164
score: 2
accepted answer of: http://stackoverflow.com/q/27113580
downvote count: 0
has body: You could do it easy with an if statement asking for style.color property: function change() { txt = document.getElementById("txt"); if (txt.style.color === 'green'){ txt.style.color = 'red'; } else { txt.style.color = 'green'; } } Is not a good practice attach your JavaScript in the HTML element, instead that you can retrieve the button by code and then use the addEventListener method to attach the change function to the click event, check out this codepen to see how it works.
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42730309
type: AcceptedAnswer

http://stackoverflow.com/comment/42789409
type: Comment
has text: Not bad ;) I was looking for a solutuon without extra variables, but it seems to be the best way, when mobile safari doesn't support selectstart
comment on: http://stackoverflow.com/a/27145318
type: AnswerComment
score: 0

http://stackoverflow.com/q/27102591
has answer: http://stackoverflow.com/a/27102846
type: Question
accepted answer: http://stackoverflow.com/a/27102694
has title: jQuery Show / Hide Div According to Option Select
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/27102694
has answer: http://stackoverflow.com/a/27102911
upvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27102914
has comment: http://stackoverflow.com/comment/42709144
has answer: http://stackoverflow.com/a/27102848
possible better answer: http://stackoverflow.com/a/27102795
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27102795
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42709138
has body: I am trying to change the div according to the select box selectged item Here is my JSFiddle Here i have the following code No One Two Three First Div Second Div Third Div Nothing to Displayt And the JS To document.getElementById('test').addEventListener('change', function () { var style = this.value == 1 ? 'block' : 'none'; document.getElementById('none').style.display = style; } }; What i need is to display the Respective According to the Selection. The Event is wrote is not triggering... What is the mistake i am doing and how can i fix this ?
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42709235

http://stackoverflow.com/a/27140069
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27139963
score: 8
upvote count: 8
has body: You need to use JavaScript and JQuery to do this. There are multiple ways to achieve this. Option 1 Create an index.html, specify a &lt;div class="container"&gt; and leave this empty. Then use jQuery to load home.html into the .container object, and do the same for all other pages. $(document).ready(function() { $(".container").load("home.html"); }); $("ul.navbar-nav li").each(function() { $(this).on("click", function{ $(".container").load($(this).attr("data-page")+".html"); }); }); In this case, the href value of your URL should always be "#" and you should give it a data-page="about" if you want it to show the about page. Option 2 Create all the divs in one page, give them a class that hides them, use jQuery to hide all divs BUT the one you want to show. &lt;div class="container"&gt; &lt;div id="home"&gt;&lt;/div&gt; &lt;div id="about" class="hidden"&gt;&lt;/div&gt; &lt;div id="contact" class="hidden"&gt;&lt;/div&gt; &lt;/div&gt; Your JavaScript file: $("ul.navbar-nav li").each(function() { $(this).on("click", function{ // Toggle classes of divs }); }); You can read up on this page to see how Bootstrap does it, so you don't have to write it yourself.

http://stackoverflow.com/q/27065284
has answer: http://stackoverflow.com/a/27105184
favorite count: 0
has answer: http://stackoverflow.com/a/27071674
tagged with: screeps
has body: I haven't found any way to assign hooks to anything, and if I could it would be very useful. Also, how can I check whether a game object still exists? (i.e. hasn't died of age, and wasn't destroyed by an enemy.)
type: UnansweredQuestion
upvote count: 4
answer count: 4
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/27065688
tagged with: javascript
has answer: http://stackoverflow.com/a/27065817
score: 4
has title: Is it possible to assign function hooks to game objects, e.g. run function on init, death, etc?

http://stackoverflow.com/q/27107467
score: 0
has comment: http://stackoverflow.com/comment/42718606
answer count: 1
has body: I have html something like this from http://fromDomain.com and posting to http://toDomain.com which is a rails application. Test Redirect with Post Submit In the rails application I am doing something like this. def someaction if not session[:token] session[:token] = @self.getsomehash end end Problem is after http://todomain.com/someaction page loaded if users hits browser refresh then it will re post the page and session hash get reset. Looks like I when browsers does a repost rails create a new session rather then using existing one. Is my assumption right? Is there any way to allow refresh and still persist the values in anyway?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27107553
has comment: http://stackoverflow.com/comment/42719313
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/42718711
type: Question
tagged with: session
has title: cross domain post refresh clears session values
tagged with: javascript
has comment: http://stackoverflow.com/comment/42719180

http://stackoverflow.com/q/27070753
has title: how to update the +1 array entry in a For Loop javascript
answer count: 3
has answer: http://stackoverflow.com/a/27071010
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27071389
accepted answer: http://stackoverflow.com/a/27071010
upvote count: 2
type: Question
has body: I am very new to jscript programming so any help you can provide would be greatly appreciated. I have created a two dimensional array of 5 rows and 4 columns. The LOOKUP_TAX_POSITION is a function call that retrieves user input data. The column labeled base is not input by the user but needs to be calculated based on the other information input by the user. After loading the table, I am updating the value in the "column" labeled base for rows 1-4 using the previous "rows" data. The base value for row 0 will remain 0. I am using jscript and have searched a million ways to determine how, or if it is possible to reference the +1 index in a For Loop with no success. Thanks for any guidance you can provide. Here is my code var RateTableArray = [ {min: ('0'), max: LOOKUP_TAX_POSITION ( 'FDMX1' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE1')}, {min: LOOKUP_TAX_POSITION ( 'FDMN2' ), max: LOOKUP_TAX_POSITION ( 'FDMX2' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE2' )}, {min: LOOKUP_TAX_POSITION ( 'FDMN3' ), max: LOOKUP_TAX_POSITION ( 'FDMX3' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE3' )}, {min: LOOKUP_TAX_POSITION ( 'FDMN4' ), max: LOOKUP_TAX_POSITION ( 'FDMX4' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE4' )}, {min: LOOKUP_TAX_POSITION ( 'FDMN5' ), max: ('0'), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE5')}, ]; for (i=0; i &lt;= 4 ;i++) { Base = (RateTableArray[i].max - RateTableArray[i].min) * RateTableArray[i].rate + RateTableArray[i].base ; RateTableArray[i+1].base = (Base) ; //this is where I am stuck }
possible better answer: http://stackoverflow.com/a/27071076
downvote count: 0
has answer: http://stackoverflow.com/a/27071076
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42654500

http://stackoverflow.com/a/27074559
has comment: http://stackoverflow.com/comment/42661254
score: 1
downvote count: 2
has comment: http://stackoverflow.com/comment/42660833
has comment: http://stackoverflow.com/comment/42660760
has comment: http://stackoverflow.com/comment/42660864
has comment: http://stackoverflow.com/comment/42660768
has comment: http://stackoverflow.com/comment/42660911
has comment: http://stackoverflow.com/comment/42660890
upvote count: 3
has body: UPDATE: I'm not sure how much complexity you're expecting, but if you want it to be able to handle some tricky expression, you might as well use parser library. Supposing you're talking about javascript and you're replacing string input, do the following. "x^2".replace(/(.*)\^(\d+)/, "pow($1, $2)")
has comment: http://stackoverflow.com/comment/42660877
has comment: http://stackoverflow.com/comment/42660866
answers question: http://stackoverflow.com/q/27074529
type: Answer
has comment: http://stackoverflow.com/comment/42660756
has comment: http://stackoverflow.com/comment/42660795
has comment: http://stackoverflow.com/comment/42660749
has comment: http://stackoverflow.com/comment/42660750

autocomplete
tags question: http://stackoverflow.com/q/27047419
tags question: http://stackoverflow.com/q/27116726
tags question: http://stackoverflow.com/q/27105132
type: Tag
tags question: http://stackoverflow.com/q/27072844
tags question: http://stackoverflow.com/q/27102629
tags question: http://stackoverflow.com/q/27135516
tag name: autocomplete
tags question: http://stackoverflow.com/q/27124911
tags question: http://stackoverflow.com/q/27052624
tags question: http://stackoverflow.com/q/27019625
tags question: http://stackoverflow.com/q/27009514
tags question: http://stackoverflow.com/q/27008960

http://stackoverflow.com/comment/42662813
has text: I know. I still have to wait a bit though.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27049413
type: AnswerComment

controller
tags question: http://stackoverflow.com/q/27095330
tags question: http://stackoverflow.com/q/27038150
tag name: controller
tags question: http://stackoverflow.com/q/27032787
tags question: http://stackoverflow.com/q/27151696
type: Tag
tags question: http://stackoverflow.com/q/27030384

http://stackoverflow.com/comment/42675837
type: Comment
comment on: http://stackoverflow.com/a/27017891
has text: I visited your suggested website. I was the same what I needed. I copied the code and past it respectively as the author said. But its not working. so can you suggest me what changes needed to make in html file
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42734729
score: 0
has text: @Dennis: An update to your fiddle: http://jsfiddle.net/sa82pmwp/5/ (FYI: ` ` elements cannot exist on their own, which is why I added the rest of the table elements. The script doesn't work otherwise.)
comment on: http://stackoverflow.com/a/27115758
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42598137
has text: please wait, let me edit question
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27039224
score: 0

http://stackoverflow.com/q/27147219
accepted answer: http://stackoverflow.com/a/27147264
tagged with: javascript
downvote count: 4
answer count: 3
linked to: http://stackoverflow.com/q/10168034
has comment: http://stackoverflow.com/comment/42790001
favorite count: 0
has comment: http://stackoverflow.com/comment/42790113
has comment: http://stackoverflow.com/comment/42789838
score: -3
possible better answer: http://stackoverflow.com/a/27147249
has body: how use javascript reverse array i wanted it is("861", "860","859","858" ............. ) var arr = [ "803", "812", "828", "846", "851", "852", "853", "857", "858", "859", "860", "861" ]; var splitarr = arr.split(","); for (var i = 0; i &lt; arr.length; i++){ console.log(splitarr); } it is java arrays?
has answer: http://stackoverflow.com/a/27147264
has answer: http://stackoverflow.com/a/27147249
has answer: http://stackoverflow.com/a/27147294
type: AnsweredQuestion
upvote count: 1
type: Question
has title: how use javascript array

http://stackoverflow.com/a/27039641
answers question: http://stackoverflow.com/q/27039590
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42598655
score: 1
has body: I would recommend marking all the elements that this function has touched. function call( x ){ var deleted_elements = $('.'+ x).addClass( "was_hidden" ).hide(); } Now you can use that class to target all elements that have been hidden with the function: var hidden_elements = $( ".was_hidden" ); If you are un-hiding the elements, don't forget to remove that class! $( ".was_hidden" ).removeClass( "was_hidden" ).show()

http://stackoverflow.com/q/27147354
has body: How can I tell a JQuery qtip tooltip to hide after it is clicked on "or" when it is inactive for some seconds? Thanks
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27154264
type: AnsweredQuestion
tagged with: qtip
type: Question
accepted answer: http://stackoverflow.com/a/27154264
has title: Jquery Qtip Autohide as well as Hide by Click
tagged with: javascript

http://stackoverflow.com/q/27013645
has comment: http://stackoverflow.com/comment/42553338
has comment: http://stackoverflow.com/comment/42553523
downvote count: 3
has answer: http://stackoverflow.com/a/27013747
has answer: http://stackoverflow.com/a/27013783
has comment: http://stackoverflow.com/comment/42560998
has comment: http://stackoverflow.com/comment/42556122
tagged with: jquery
favorite count: 0
has title: How to Show selected value on textbox using javascript?
answer count: 5
score: -3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27013763
has comment: http://stackoverflow.com/comment/42568041
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42561439
has comment: http://stackoverflow.com/comment/42568351
has comment: http://stackoverflow.com/comment/42567261
has comment: http://stackoverflow.com/comment/42567861
has answer: http://stackoverflow.com/a/27013841
possible better answer: http://stackoverflow.com/a/27013711
type: Question
has answer: http://stackoverflow.com/a/27013711
has comment: http://stackoverflow.com/comment/42554716
accepted answer: http://stackoverflow.com/a/27013747
has body: How can I show the value of the selected items in the textbox using javascript? // MY LIST Your Cute Your Ugly Your Awesome // BUTTON and TEXTBOX Get Value I came up with this javascript code function showgroup_id () { $('#selectedvalue').val(selectedvalue); var myList = document.getElementById('list'); var selected-value = selectedItem; var selectedGroupIds = []; for (var i = 0; i < myList.length; i++) { if (myList[i].selected) { selectedselectedItem.push(myList[i].value); } } } When I tried, it doesn't work.. anyone can help me please?
tagged with: javascript

http://stackoverflow.com/comment/42616821
type: AnswerComment
has text: Well I was wrong, cause I did not understand the concept of the question, about your question why the latter didn't work that's cause JavaScript actually returns the page link + the href value when you do element.href
type: Comment
comment on: http://stackoverflow.com/a/27049076
score: 0

regex
tags question: http://stackoverflow.com/q/27136133
tags question: http://stackoverflow.com/q/27042038
tags question: http://stackoverflow.com/q/27110305
tags question: http://stackoverflow.com/q/27136678
tags question: http://stackoverflow.com/q/27052436
tags question: http://stackoverflow.com/q/27002184
tags question: http://stackoverflow.com/q/27079986
tags question: http://stackoverflow.com/q/27011430
tags question: http://stackoverflow.com/q/27024943
tags question: http://stackoverflow.com/q/27141528
tags question: http://stackoverflow.com/q/27126207
tags question: http://stackoverflow.com/q/27061480
tags question: http://stackoverflow.com/q/27103578
tags question: http://stackoverflow.com/q/27063822
tags question: http://stackoverflow.com/q/27101035
tags question: http://stackoverflow.com/q/27009433
tags question: http://stackoverflow.com/q/27044725
tags question: http://stackoverflow.com/q/27084450
tags question: http://stackoverflow.com/q/27142916
tag name: regex
tags question: http://stackoverflow.com/q/27044023
tags question: http://stackoverflow.com/q/27074529
tags question: http://stackoverflow.com/q/27130312
tags question: http://stackoverflow.com/q/27094070
tags question: http://stackoverflow.com/q/27147375
tags question: http://stackoverflow.com/q/26993855
tags question: http://stackoverflow.com/q/27128956
tags question: http://stackoverflow.com/q/27089212
tags question: http://stackoverflow.com/q/27152631
tags question: http://stackoverflow.com/q/27096169
tags question: http://stackoverflow.com/q/27006631
tags question: http://stackoverflow.com/q/27049747
tags question: http://stackoverflow.com/q/27105755
tags question: http://stackoverflow.com/q/27008834
tags question: http://stackoverflow.com/q/27035739
tags question: http://stackoverflow.com/q/27082058
tags question: http://stackoverflow.com/q/27085199
tags question: http://stackoverflow.com/q/27116876
tags question: http://stackoverflow.com/q/27111543
tags question: http://stackoverflow.com/q/27069528
tags question: http://stackoverflow.com/q/27078682
tags question: http://stackoverflow.com/q/27053318
tags question: http://stackoverflow.com/q/27062930
tags question: http://stackoverflow.com/q/27072924
tags question: http://stackoverflow.com/q/27117762
tags question: http://stackoverflow.com/q/27069036
tags question: http://stackoverflow.com/q/27055134
tags question: http://stackoverflow.com/q/27111898
tags question: http://stackoverflow.com/q/27023184
tags question: http://stackoverflow.com/q/27018233
tags question: http://stackoverflow.com/q/27014833
tags question: http://stackoverflow.com/q/27113509
tags question: http://stackoverflow.com/q/27064965
tags question: http://stackoverflow.com/q/27132967
tags question: http://stackoverflow.com/q/27097762
tags question: http://stackoverflow.com/q/27096454
tags question: http://stackoverflow.com/q/27087013
tags question: http://stackoverflow.com/q/27046270
tags question: http://stackoverflow.com/q/27141445
tags question: http://stackoverflow.com/q/27125080
tags question: http://stackoverflow.com/q/27125270
tags question: http://stackoverflow.com/q/27024882
tags question: http://stackoverflow.com/q/26998905
tags question: http://stackoverflow.com/q/27070996
tags question: http://stackoverflow.com/q/27103791
tags question: http://stackoverflow.com/q/27134614
tags question: http://stackoverflow.com/q/26994253
tags question: http://stackoverflow.com/q/27031456
tags question: http://stackoverflow.com/q/27067169
tags question: http://stackoverflow.com/q/27042355
tags question: http://stackoverflow.com/q/27061283
tags question: http://stackoverflow.com/q/27040553
tags question: http://stackoverflow.com/q/27043136
tags question: http://stackoverflow.com/q/27053114
tags question: http://stackoverflow.com/q/27135563
tags question: http://stackoverflow.com/q/27116105
tags question: http://stackoverflow.com/q/27111673
tags question: http://stackoverflow.com/q/27008744
tags question: http://stackoverflow.com/q/27120992
tags question: http://stackoverflow.com/q/27060546

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/27020048
tags question: http://stackoverflow.com/q/27071399
tag name: google-fusion-tables
tags question: http://stackoverflow.com/q/27091237
tags question: http://stackoverflow.com/q/26992763

http://stackoverflow.com/a/27057293
type: Answer
accepted answer of: http://stackoverflow.com/q/27051608
score: 2
answers question: http://stackoverflow.com/q/27051608
upvote count: 2
has comment: http://stackoverflow.com/comment/42630066
has body: Before Including foo.js try to execute the following JS: var _console = window.console; window.console = { log: function() {}, dir: function() {}, ..... } In this case you will have empty functions for foo.js. In bar.js you can use _console. If this is acceptable solution for you, you can think on its improvement.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27119026
score: 5
has body: I want to show PopupMenu in webview on my app like GMail. Here is my code: webView.addJavascriptInterface(new WebAppInterface(getActivity()), "ScriptToAndroid"); @JavascriptInterface public void showPopupDialog(String filePath, int x, int y) { //show PopupMenu }
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/46750451
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: android
has answer: http://stackoverflow.com/a/30244712
tagged with: popupmenu
has title: android how to show PopupMenu in webview like GMail
tagged with: webview
type: Question

http://stackoverflow.com/q/27085963
downvote count: 0
tagged with: meteor
favorite count: 0
has title: How can I encapsulate modules I want to unit test in Meteor?
has comment: http://stackoverflow.com/comment/42682382
has answer: http://stackoverflow.com/a/27087384
accepted answer: http://stackoverflow.com/a/27087384
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42680601
tagged with: unit-testing
type: Question
tagged with: javascript
has body: I wish to unit test my Meteor application. I have several client side files with functions that handle some logic and are called by my event handlers. My instinct is to extract these functions into a module that could be required and called by my event handling code, and unit tested independently, but I'm unsure how to do this in Meteor. After pulling my logic code into a separate file / module, the only success I had getting other files to see it was to expose the module as a global variable. This is described in the Meteor documentation as package scoping for a variable. Getting this to work required me to turn off 'use strict', and generally just didn't feel quite right - I don't need everything in the package to see this file, just the one place it's used, and a unit test. I understand that packages are a way of encapsulating code, but it seems overblown for this use case. I did a bit of hunting for enabling more fine grained dependency management in Meteor and found this one, which the author clearly states is no longer maintained. What is the right way to encapsulate code for use and unit testing in Meteor?
has comment: http://stackoverflow.com/comment/42683139
answer count: 1

http://stackoverflow.com/comment/42593635
type: AnswerComment
score: 0
type: Comment
has text: Here "IdTitle":"Singel Id "VIP"" instead of "IdTitle":"Singel Id" That's why I am not able to convert it.
comment on: http://stackoverflow.com/a/27036364

http://stackoverflow.com/comment/42788293
has text: If "charAt needs to cast its operand to a string" (extra operation) and "charAt will return the empty string" (instead of just `undefined`, extra operation) - why charAt is FASTER?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27145934
type: AnswerComment

http://stackoverflow.com/q/27085811
score: 1
has answer: http://stackoverflow.com/a/27085936
favorite count: 0
tagged with: playlist
has title: Passing a PHP Array into jplayer playlist
tagged with: jplayer
upvote count: 1
answer count: 1
tagged with: dynamic
linked to: http://stackoverflow.com/q/8393273
downvote count: 0
tagged with: javascript
has body: I am a beginner programmer and I'm trying to create a dynamically populated playlist from files in a folder. I have found a result here Dynamically populate playlist with JSON from PHP in jPlayer. This would allow me to do what I need. However, I want to understand why my method does not work. I"m able to get an array into javascript using the myPlaylist variable that looks like the following from console.log. Array [ ""title":"Song1","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song1.mp3"", ""title":"Song2","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song2.mp3"", ""title":"Song3","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song3.mp3"", ""title":"Song4","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song4.mp3"", ""title":"Song5","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song5.mp3"" ] When I run this and jplayer playlist comes up in the browser it lists 5 items, but lists them all as undefined. Again, I"m sure I'm doing something stupid, but I can't figure out why they are all undefined. Thanks in advance for your help!
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/27059027
type: UnansweredQuestion
has body: I have a Address like Address : 273A-84, Sundharam Street,, Ganthi Path, Kovai,,,,India,641001 If string has more than 2 commas i want to replace with single comma. In above address next to street and next to kovai there is multiple commas.I want to replace with single comma. My expected output is: Address : 273A-84, Sundharam Street,Ganthi Path,Kovai,India,641001 Please suggest regular expression.
has title: Remove commas from a string using js
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42633089
has answer: http://stackoverflow.com/a/27059150
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/43069295
has answer: http://stackoverflow.com/a/27059100

http://stackoverflow.com/comment/42722820
type: Comment
has text: Thank you for the vocabulary. I'll integrate it into the question.
comment on: http://stackoverflow.com/a/27104129
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42577289
has text: @MattD not much, but it was one of my imagined solutions, changing how dropdown list is treated on page and for that I would probably need to change something on bootstrap side.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27026949

http://stackoverflow.com/a/27000205
answers question: http://stackoverflow.com/q/26999911
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42531287
has comment: http://stackoverflow.com/comment/42531635
type: Answer
has body: It looks like you need to only get the text of the element and none of the children tags when you're doing your search. A quick search of SO gives this They suggest doing this: $("#foo") .clone() //clone the element .children() //select all the children .remove() //remove all the children .end() //again go back to selected element .text(); For your code it would be something like: $("#table tr:has(td)").each(function(){ var t = $(this).text().toLowerCase(); //all row text $("&lt;td class='indexColumn'&gt;&lt;/td&gt;").hide().text(t).appendTo(this); });//each tr $("#search").keyup(function(){ var s = $(this).val().toLowerCase().split(" "); //show all rows. $("#table tr:hidden").show(); //Find each techname $("#table tr:visible .techname").each(function(){ //Get on the text in the element var text = getText(this); //Loop through each search term checking if the term is in the etx var containsText = false; for(var i = 0; i &lt; s.length; i++) { if(text.indexOf(s) &gt; -1) { containsText = true; break; } } //If we didn't find the text hide the row if(!containsText) { $(this).parent().hide(); } });//each });//key up. $('td.techname').click(function(e) { e.preventDefault(); e.stopPropagation(); var id = $(this).attr('id'); $('div#user-'+id).dialog({ modal: true, width: 400 }); }); function getText(selector) { return $(selector) .clone() //clone the element .children() //select all the children .remove() //remove all the children .end() //again go back to selected element .text() .toLowerCase(); } JSFiddle Demo
has comment: http://stackoverflow.com/comment/42532486
has comment: http://stackoverflow.com/comment/42530876
has comment: http://stackoverflow.com/comment/42533529
score: 2
has comment: http://stackoverflow.com/comment/42530782
downvote count: 0
has comment: http://stackoverflow.com/comment/42531443
accepted answer of: http://stackoverflow.com/q/26999911
upvote count: 2

http://stackoverflow.com/comment/42611314
score: 0
type: Comment
has text: Yah know, I had them set to the State values to begin with, but I couldn't get it to work; so I removed them all and set the values to numerical. I just tried your solution however, and it's working. Guess I didn't try `state[findState][0];` before. Thank you very much!
comment on: http://stackoverflow.com/a/27046156
type: AnswerComment

http://stackoverflow.com/comment/42528878
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26999107
score: 0
has text: You should post an html snippet as well.

input
tags question: http://stackoverflow.com/q/27120629
tags question: http://stackoverflow.com/q/27117756
tags question: http://stackoverflow.com/q/27098874
tags question: http://stackoverflow.com/q/27112637
tags question: http://stackoverflow.com/q/27018105
tags question: http://stackoverflow.com/q/27109740
tags question: http://stackoverflow.com/q/27037548
tags question: http://stackoverflow.com/q/27101497
tags question: http://stackoverflow.com/q/27090638
tags question: http://stackoverflow.com/q/27067031
tag name: input
type: Tag
tags question: http://stackoverflow.com/q/27126008
tags question: http://stackoverflow.com/q/27116483

http://stackoverflow.com/q/27095734
score: 0
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27095985
accepted answer: http://stackoverflow.com/a/27095745
has answer: http://stackoverflow.com/a/27095985
type: Question
has title: How to select div element with the same class and do something on clicked element
has body: I am here struggling to find a solution for selecting div with similar class in order to remove some class on current (clicked) element. Here is example of my work. You will se Twitter Bootstrap collapse feature where I am trying to remove class fa-angle-up from panel-title when user click on another item. This way it will change arrow direction when user click on another item. http://quadrifoglio-test.esy.es/sample/ ps. I believe I need some vent listener but I don?t know which one and how to use it. Thanks! here is html structure with jquery which I am using already. oct Hrvatski skup poduzetnika Main event Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Eventi Skup amerikanaca podrijetlom iz Hrvatske s rodacima Branko ima nesto reci, policija zaustavlja vozace. Sta reci. $( ".panel-title" ).click(function() { $( this ).toggleClass( "fa-angle-up" ); }); $( ".panel-title.fa.fa-angle-up" ).click(function() { $( this ).toggleClass( "fa-angle-down" ); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27096855
answer count: 3
has answer: http://stackoverflow.com/a/27095745
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/42746898
has text: Why do you need jQuery for that, should be easy with just CSS
comment on: http://stackoverflow.com/q/27123110
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/27020667
type: UnansweredQuestion
score: 1
upvote count: 1
has title: Emacs flymake-jslint show all errors
type: Question
tagged with: jslint
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: flymake
has comment: http://stackoverflow.com/comment/42571508
tagged with: emacs
has body: I want to use jslint in emacs, so I installed package flymake-jslint and flymake-cursor. I have really simple javascript file: /*global desc, task, jake, fail, complete */ "use strict"; task("example", function() { var x = 5 console.log("asdf"); }); Flymake properly highlights var x = 5 and I get Unused 'x'. in mini buffer. However, when I run jslint from command line, I get: $ jslint jakefile.js jakefile.js #1 Expected exactly one space between 'function' and '('. task("example", function() { // Line 3, Pos 25 #2 Expected ';' and instead saw 'console'. var x = 5 // Line 4, Pos 14 #3 Unused 'x'. var x = 5 // Line 4, Pos 9 Is there a way to configure flymake-jslint to show me those non syntax error, like "Expected space"?
has answer: http://stackoverflow.com/a/27037372

http://stackoverflow.com/a/27089086
answers question: http://stackoverflow.com/q/27088573
downvote count: 0
score: 1
has body: 2nd Update I got your cloning working. However, jQuery clone method doesn't work as expected because the cloned div contains unconventional html elements/tags such as <g:textField> and <g:hiddenField>. Therefore after completion of addAnotherWcMemberEdit the cloned element looks like this: <g:message code="so" default="Member Name"> </g:message> <g:textfield id="participatedWcMemberName1" name="participatedWcMemberName1" value="" class="form-control" required=""> <g:hiddenfield name="participatedWcMemberId" value="wcMemberid"> Add More || Remove </g:hiddenfield> </g:textfield> Following this strange cloning outcome, I was unable to remove the hidden element. For the user the end result doesn't look any different on the browser. I was also unable to remove the hidden element at its new location. var wcMemberCounterEdit = 1; function addAnotherWcMemberEdit() { var memberSign = 'participatedWcMemberName' + wcMemberCounterEdit //clone $clonedDiv = $('#wcmEdit').clone(); //new id for the cloned div, to make the id unique $clonedDiv.attr("id", "wcmEdit_" + wcMemberCounterEdit); //find textField (second child of class .form-group, //which I assume is your intended input) //and set attributes $clonedDiv.find('.form-group > :nth-child(2)').attr({ value: '', id: memberSign, name: memberSign }); //remove hidden field. This doesn't work (!) because the cloning // doesn't work as expected --> hidden field is not third element // following the cloning $clonedDiv.find('.form-group > :nth-child(3)').remove(); //append cloned div $('#wcMember').append($clonedDiv); wcMemberCounterEdit++; } <g:message code="so" default="Member Name" /> <g:textField id="participatedWcMemberName${i}" name="participatedWcMemberName${i}" value="${wcMembers?.participatedWcMemberName}" class="form-control" required="" /> <g:hiddenField name="participatedWcMemberId${i}" value="${wcMembers?.id}" /> Add More || Remove
has comment: http://stackoverflow.com/comment/42705675
has comment: http://stackoverflow.com/comment/42761256
upvote count: 1
has comment: http://stackoverflow.com/comment/42819322
has comment: http://stackoverflow.com/comment/42826219
has comment: http://stackoverflow.com/comment/42703458
type: Answer

http://stackoverflow.com/comment/42777956
type: QuestionComment
has text: i have multiple fiends who think this is a very useful tool they need. but they don't want to install anything on their machine. so javascript is an good option which can be ran in browser.
comment on: http://stackoverflow.com/q/27140059
score: 0
type: Comment

http://stackoverflow.com/a/27009955
has body: i tested the code in my system...seems there is not any error..try the code &lt;script src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt; &lt;script&gt; var opts="a"; //just delete that var node="a"; //just delete that if (typeof opts.getAllInputs === "undefined") { node._getAllInputs = function(withManagementForm) { withManagementForm = (typeof withManagementForm === "undefined") ? withManagementForm : false; if (withManagementForm) { return $(this).find("&gt; .nestedFormsetsFieldsSection &gt; li &gt; input:not(.treeLevel), &gt; .nestedFormsetsFieldsSection &gt; li &gt; textarea"); } else { return $(this).find("&gt; .nestedFormsetsFieldsSection &gt; li &gt; input:not(.treeLevel):not([name$=-TOTAL_FORMS]):not([name$=-INITIAL_FORMS]):not([name$=-MAX_NUM_FORMS]), &gt; .nestedFormsetsFieldsSection &gt; li &gt; textarea"); } }; } else { node._getAllInputs = opts.getAllInputs; } &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/27009887
score: 0
has comment: http://stackoverflow.com/comment/42547406

http://stackoverflow.com/q/27139914
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27159497
has title: Refreshing the frame coming from the Leap Motion when in a while loop
has body: I have just begun programming in JS for the Leap Motion. I am working on a project where I can control motors based on hand gestures that are being read from the Leap Motion. The frames are being parsed and then commands are being sent to the motors through an Arduino Uno using the johnny-five library. Here is the way I am grabbing the frames from the Leap Motion: `var five = require('johnny-five'), Leap = require('leapjs'), board = new five.Board(), motor, frame, hand; board.on('ready', function() { var controller = Leap.loop({enableGestures: true}, function(frame) { checkData(frame); }); });` I take the frames from the Leap Motion and send the frame to a function that goes through the frame, reads the gestures, and then calls a new function that controls motors: var motorA = new five.Motor([3, 0, 2]); motorA.start(255); while(!finished) { board.wait(5000, function() { motorA.stop(); runMotorB(number); finsihed = true; }); } My problem is that I need a while loop to make the program wait for the first motor to end before running the next motor. The board.wait() doesn't seem to stop the program from continuing on to the next motor without waiting for the first motor to stop. I also need to be able to grab frames from the Leap Motion while running the motor in the while loop and waiting for it to end. This is because I want to be able to see if new gestures are occurring while the motor is running. However, whenever I try to grab a new frame using a controller.frame() call, I simply get the previous frame from the Leap Motion that started the while loop, not the frame that the Leap Motion is seeing at that second. Is there a way to see what the Leap Motion is seeing while stuck within the while loop? Or is there a better way for me to be stopping the program from moving onto the next motor without actually waiting?
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/27159497
tagged with: johnny-five
tagged with: arduino
upvote count: 1
tagged with: leap-motion

http://stackoverflow.com/comment/42617570
type: Comment
type: QuestionComment
has text: Are you using `.click()`? or `.on()`?
score: 0
comment on: http://stackoverflow.com/q/27050003

http://stackoverflow.com/comment/42591797
score: 0
has text: oh wait, didnt read ur other comment to move the control..its fix now
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27034608

http://stackoverflow.com/comment/42553041
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27012875
type: AnswerComment
has text: No ji.. Its not working.. It given 'undefined' only. I dont have id attribute for that div. But that hidden field has the id attribute but to make it unique if I add alertId with that means how can I identify that unique Id inside the click event

http://stackoverflow.com/comment/42576734
has text: @JE42 please check the "2. Plain callback:" option in the dupe - it describes the exact same scenario.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27026313

http://stackoverflow.com/comment/42654176
score: 0
comment on: http://stackoverflow.com/a/27070773
type: Comment
type: AnswerComment
has text: That's a good point, Owen. And indeed the original code was AddUserForm.mailinglist. the mailinglist version is for making sure there aren't problems woth the form model

http://stackoverflow.com/q/27006560
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42542158
has answer: http://stackoverflow.com/a/30759597
has title: Elegant and reliable way to cancel paste event but dispatch it later
type: UnansweredQuestion
tagged with: events
linked to: http://stackoverflow.com/q/15253468
has comment: http://stackoverflow.com/comment/42543076
type: Question
has comment: http://stackoverflow.com/comment/42542259
has comment: http://stackoverflow.com/comment/42543146
has body: Pasting of images currently quite sucks in javascript API. There's a workaround in which you make the user paste the image in contenteditable div. The browser then creates a element which you can retrieve using .getElementsByTagName method. But if user pastes files copied from Explorer or similar program, these don't appear in div but can be retrieved using API. Paste So I have one onpaste event which is fully capable of retrieving pasted file (of any file type): paste.addEventListener('paste', function(event){ var items = (event.clipboardData || event.originalEvent.clipboardData); /**Try to get a file**/ var files = items.items || items.files; if(files.length>0) { //Read the file applyFile(files[0].getAsFile? files[0].getAsFile():files[0]); //Do not input any text event.preventDefault(); event.cancelBubble = true; return false; } //No files = try to paste text in HTML div }); In fact, the paste event origin is a , so to get the text pasted as HTML, I steal focus from input field before paste event: //When pasting, focus on the PASTE element input.addEventListener("keydown", function(e) { if(e.keyCode==86&&e.ctrlKey) { paste.focus(); console.log("Focusing the div"); } }); Now after Ctrl + V, if there's no file other event called input will eventually dispatch on the div: paste.addEventListener('input', function(event){ //An array of pasted images var images = this.getElementsByTagName("img"); if(images.length!=0) { //Do something ... } //Clear the div (image references will be lost!) this.innerHTML = ""; //Focus back on the input input.focus(); }); As you can see if an image is pasted in the textarea it will be processed. But if not, the paste event will not do anything! How can I eventually let the paste event happen in the textarea if no images were pasted? I tried to save the event in variable: var lastPaste; paste.addEventListener('paste', function(event){ lastPast = event; ... } And then dispatch it: paste.addEventListener('input', function(event){ ... //Focus …

http://stackoverflow.com/a/27038676
has comment: http://stackoverflow.com/comment/42596951
has body: $('.ns2-row').each(function(){ if($(this).find('.ns2-row-inner .ns2-column').length === 0){ $(this).hide(); } }); Reference: length each
answers question: http://stackoverflow.com/q/27038548
score: 0
type: Answer

http://stackoverflow.com/comment/42613711
has text: @sebnukem sounds funny..but that's truth
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27046851

http://stackoverflow.com/a/27852424
upvote count: 1
answers question: http://stackoverflow.com/q/27125315
downvote count: 0
type: Answer
has body: The reason you are getting getPosition is undefined is because, according to the docs, it does not exist, here's the link. The root of the problem is actually that you are passing the wrong objects to $scope.map.panTo();. Please refer to the google website for panTo on the Map class, you must pass it the same type of object it is expecting in the parameters. panTo(latLng:LatLng|LatLngLiteral); This is saying that it excepts a parameter of either an instance of the LatLng class or LatLngLiteral class, not the Circle instance that you are creating above. Here's the reference to LatLng. To fix your code above you can change from this: $scope.map.panTo(marker.getPosition()); to this $scope.map.panTo(new google.maps.LatLng(latiSearch, lonSearch)); I'd also recommend to store the instance you are already creating above for $scope.map.setCenter() to the same one you will be using here.
score: 1

sugarcrm
tags question: http://stackoverflow.com/q/27141404
tag name: sugarcrm
tags question: http://stackoverflow.com/q/27103966
type: Tag

http://stackoverflow.com/q/27046502
possible better answer: http://stackoverflow.com/a/27047140
tagged with: php
type: AnsweredQuestion
has body: I am making a facebook like website. For that I want to implement "long polling" to dynamically update users wall with new posts. Here is a pseudo code for what I have planned //when user first open my website loadPostsNormally(); var lastTime = current_time; function update(){ $.getJSON('/some_other_page_which_will_fetch_the_contents_created_after_lastTime_and_encode_it_to_json/'+lastTime,function(){ lastTime = current_time; showNewPostsOnWall(); } setInterval(update,2000); Now the problem is with my page some_other_page_which_will_fetch_the_contents_created_after_lastTime_and_encode_it_to_json public function some_other_page_which_will_fetch_the_contents_created_after_lastTime_and_encode_it_to_json($timestamp){ //fetch_all_data_created_after_this_timestamp_but_how ?? } I want to fetch from my Post model and the time in my 'created' field of posts table is like 2014-11-19 22:34:09 Sorry for using a very layman language to describe the problem. I used that because I have not yet started it and I'm only making a plan to approach that problem in my head.
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/27047140
score: -2
tagged with: cakephp
tagged with: javascript
has comment: http://stackoverflow.com/comment/42611329
answer count: 2
accepted answer: http://stackoverflow.com/a/27046675
upvote count: 0
has comment: http://stackoverflow.com/comment/42611277
favorite count: 0
has title: CakePHP: how to fetch data from the database based on created time
has answer: http://stackoverflow.com/a/27046675

http://stackoverflow.com/comment/42647432
has text: this works would love to see a javascript only solution, didn't need to change my method getConfirmation(e) because we are already targeting the delete button.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27066980
score: 0

http://stackoverflow.com/q/27017270
has answer: http://stackoverflow.com/a/27018046
accepted answer: http://stackoverflow.com/a/27018921
tagged with: javascript
tagged with: expandable
possible better answer: http://stackoverflow.com/a/27018046
answer count: 3
has answer: http://stackoverflow.com/a/27018735
downvote count: 0
tagged with: meteor
favorite count: 0
has body: So, im really new to both JavaScript and Meteor, so I only know a handful of things. Learning both, JavaScript and Meteor I set myself the challenge to make a 3 by 3 field of with individual counters in them, that count, if you click the cell. I reached my first goal: http://9fields.meteor.com/ The second goal I set for myself was to try to make it easily expandable. Say, i want to make the same field but 7x7. Every cell has its own template. {{counter}} Every cell has its own counter and every cell has one event handler and one helper to register a click Template.zelle1.helpers({ counter: function () { return Session.get("counter1"); } }); Template.zelle1.events({ "click td": function() { return Session.set("counter1", Session.get("counter1")+1); } }); I then pasted the code 8 more times and replaced the numbers. The only thing that i feel reaches my criteria for the second goal is the way i create the table. {{#each zellen}} {{#if this.newrow}} {{> UI.dynamic template=this.name}} {{else}} {{> UI.dynamic template=this.name}} {{/if}} {{/each}} in combination with this Array (array is the right word?) Template.body.zellen = [ {name: "zelle1", newrow: false}, {name: "zelle2", newrow: false}, {name: "zelle3", newrow: false}, {name: "zelle4", newrow: true}, {name: "zelle5", newrow: false}, {name: "zelle6", newrow: false}, {name: "zelle7", newrow: true}, {name: "zelle8", newrow: false}, {name: "zelle9", newrow: false}, ]; My question: Do i have to make 9 Templates and 9 helpers and 9 events for those 9 fields? Meaning that if i want to make a 7x7 field i need to paste the code 49 times? Or is there a more efficient way to do this? Already Thank you for reading through this!
has title: Meteor Dynamically Create Objects and refer to them? // Is there a simple way to do this
score: 1
has answer: http://stackoverflow.com/a/27018921
upvote count: 1
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/42745292
has text: Yes your fiddle code is working please see what is the problem with my data edited in question
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27121908

http://stackoverflow.com/comment/42747060
has text: Why bother setting up node.js for something as trivial as `file_get_contents` + `echo json_encode($dataFromFile);`?
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27123264

http://stackoverflow.com/comment/42750013
comment on: http://stackoverflow.com/a/27124235
score: 0
type: AnswerComment
type: Comment
has text: Correct! but i found a better way using temp as array and push in it if condition or if not condition checked. Another thing, user can let userArray empty so i need to use for with userArray.length :) But thx for your answer, u were right!

http://stackoverflow.com/q/27039177
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/27040007
possible better answer: http://stackoverflow.com/a/27039602
has body: I am trying to make a button that creates small windows that you can close after pressing X. The problem I have is that i can only close the last created window. function openNote() { var base = document.createElement('div'); base.id = 'note'; var in_ = document.createElement('div'); in_.id = 'note_in'; var in_2 = document.createElement('div'); in_2.id = 'note_in2'; var ex = document.createElement('div'); ex.id = 'ex'; var ext = document.createTextNode("X"); base.appendChild(in_); in_.appendChild(in_2); in_2.appendChild(ex); ex.appendChild(ext); document.body.appendChild(base); document.getElementById('ex').onclick = function(){ var r = document.getElementById('note'); r.parentNode.removeChild(r); } } #note{ background:#819C9A; height : 200px; width : 150px; border: 2px solid; border-radius: 25px; border-color:#49706E; margin:10px; } #note_in{ float:left; height : 35px; width : 150px; background:rgba(255,255,255,0.2); } #note_in2 { float:right; height : 25px; width : 25px; margin:5px; background:#9DCCCA; border-radius: 15px; text-align: center; cursor:pointer; } #ex{ margin-top: 4px; } Press me! I'm fairly new to JavaScript and would appreciate any help or advice.
type: Question
has answer: http://stackoverflow.com/a/27039358
has answer: http://stackoverflow.com/a/27039602
has comment: http://stackoverflow.com/comment/42598195
has answer: http://stackoverflow.com/a/27039430
has answer: http://stackoverflow.com/a/27039522
accepted answer: http://stackoverflow.com/a/27039430
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42598166
tagged with: element
answer count: 5
has title: Create closable div elements using pure js
tagged with: removechild
score: 2

http://stackoverflow.com/comment/42750707
score: 1
comment on: http://stackoverflow.com/a/27124906
type: AnswerComment
type: Comment
has text: The same is there for Angular too - http://material.angularjs.org but I want to achieve natural animations like http://www.google.com/design/spec/animation/authentic-motion.html#authentic-motion-mass-weight

http://stackoverflow.com/q/27006938
favorite count: 0
upvote count: 8
has answer: http://stackoverflow.com/a/27595473
tagged with: xmlhttprequest
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27595473
downvote count: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/7909161
has comment: http://stackoverflow.com/comment/43683056
tagged with: ajax
has comment: http://stackoverflow.com/comment/43495405
has body: In IE9, FormData is not supported, which makes uploading files using XMLHttpRequest a lot less trivial. Can this be done? I've seen iFrames mentioned, and while I'm not opposed to writing some hairy code, I'm at a loss as to how to achieve this (there are many resources talking about uploading to an iFrame but not about how to get the file from the iFrame to the server). Using vanilla JavaScript (no third party libraries), how would one upload a file asynchronously without the use of FormData?
has title: Uploading files using AJAX without FormData (IE9)
has comment: http://stackoverflow.com/comment/43741012
tagged with: file-upload
score: 8

http://stackoverflow.com/comment/42726742
comment on: http://stackoverflow.com/q/27111898
score: 4
type: Comment
type: QuestionComment
has text: Yes, that’s exactly what it does; you’re not doing anything wrong. When a group is given a quantifier, it only captures its last match, and that’s all it will ever do in JavaScript. The general fix is to use multiple regular expressions, as you said.

http://stackoverflow.com/comment/42565605
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27004428
type: AnswerComment
has text: I know why the above example doesn't work...the buttons are outside the foreach binding loop so the button is not tied to the row thus parent doesnt exist. With that in mind..how do i get it to highlight a row upon selecting one and then if they hit remove, it removes that highlighted row?

http://stackoverflow.com/comment/45793086
type: AnswerComment
comment on: http://stackoverflow.com/a/27008505
type: Comment
has text: Its been hours I have been searching for how to do that. This solutions worked perfectly
score: 0

http://stackoverflow.com/q/27151008
has comment: http://stackoverflow.com/comment/42796803
tagged with: javascript
has title: Redirect to different link depending on date
score: 0
accepted answer: http://stackoverflow.com/a/27151096
possible better answer: http://stackoverflow.com/a/27151218
has answer: http://stackoverflow.com/a/27151218
tagged with: http-redirect
has comment: http://stackoverflow.com/comment/42796882
has body: I have done some research, but I can't quite find what I'm looking for. Basically, I just want to change a redirect depending on a certain date. It's for an advent calendar, so users will click on "See our advent calendar" link, and depending on the date (December 1st, 2nd, 3rd, ...) they will see a different web page for each day of December. I thought it might be something simple like: &lt;script language="JavaScript"&gt; var currentDate = new Date().getDate(); if (currentDate = 2014,11,26) window.location = "http://www.yahoo.com"; else if (currentDate = 2014,11,27) window.location = "http://www.youtube.com"; else if (currentDate = 2014,10,28) window.location = "http://www.google.com"; &lt;/script&gt; (I'd replace Google/youtube/etc with my actual links, but no matter what date it is, it just goes to the first link) I've tried different date formats including YYYY/MM/DD, and Year/month/day/hour/second/millisecond. I apologize if this is stupidly easy to do and I'm missing something obvious. But you learn by asking...
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27151096
tagged with: date
type: Question
answer count: 2

http://stackoverflow.com/q/27011015
tagged with: java
tagged with: mysql
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27011509
type: Question
tagged with: javascript
answer count: 2
has title: How to fetch data from database in table at every 15 minute?
has answer: http://stackoverflow.com/a/27011743
favorite count: 0
has comment: http://stackoverflow.com/comment/42548884
has body: I had store 8 days data in mysql database. I want to retrieve those data in jsp page at every 15 minute . please give some hint to resolve my problem..
type: UnansweredQuestion
score: 0

http://stackoverflow.com/comment/42634123
type: AnswerComment
has text: you can, if you use the whole function content. you cannot define `function a(){}` and then do `setTimeout('a',0)`
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27059653

http://stackoverflow.com/comment/42709978
score: 0
has text: @Markai I just want to refresh the page of the current user and an interval like Refresh:10, would disrupt the user expirience
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27102760

http://stackoverflow.com/comment/42574223
type: QuestionComment
comment on: http://stackoverflow.com/q/27023916
has text: Alright. Thanks for your earlier efforts in helping others as well as I found them useful :)
score: 0
type: Comment

http://stackoverflow.com/comment/42632175
has text: baseURL.'/images/templateicon.png'."' width=10% height=5% />. when i click on this anchor tag i have to open a widget. So under this javascript function i have to execute this widget code..that is under click function...Help me please..thanks in advance...
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27058525
type: Comment

http://stackoverflow.com/q/27022392
score: 0
answer count: 1
tagged with: winjs
has answer: http://stackoverflow.com/a/27033439
tagged with: javascript
type: AnsweredQuestion
tagged with: windows-8.1
type: Question
accepted answer: http://stackoverflow.com/a/27033439
has comment: http://stackoverflow.com/comment/42579043
tagged with: windows-store-apps
tagged with: php
has body: I'm trying to upload a file on a server (currently on my local wamp), with a Windows 8 application running with HTML and JavaScript. So this is my code : (function () { "use strict"; WinJS.Binding.optimizeBindingReferences = true; var app = WinJS.Application; var activation = Windows.ApplicationModel.Activation; app.onactivated = function (args) { if (args.detail.kind === activation.ActivationKind.launch) { if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) { } else { } args.setPromise(WinJS.UI.processAll().then(function () { document.getElementById('boutonEnvoyer').onclick = function () { var selector = Windows.Storage.Pickers.FileOpenPicker(); selector.fileTypeFilter.replaceAll(["*"]); selector.pickSingleFileAsync().then(function (file) { if (!file) { console.log('No file selected'); return; } var url = 'http://192.168.10.28/videomaton/index.php'; UploadImage(url, fichier); }); }; var UploadImage = function (urlString, file) { try { var uri = Windows.Foundation.Uri(urlString); var uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader(); //Set a header to be able to save the file uploader.setRequestHeader("Filename", file.name); //Create the operation var upload = uploader.createUpload(uri, file); upload.startAsync().then( function succes(res) { console.log('goodgame'); }, function error(res) { console.log(res); }, function progression(res) { var pourcent = Math.round(res.progress.bytesSent * 100 / res.progress.totalBytesToSend); console.log(pourcent + '%'); } ); } catch (err) { console.log('try and catch missed'); } }; })); } }; app.oncheckpoint = function (args) { }; app.start(); })(); This seems to work, but here is my problem, my javascript consol progress until 100% and say "goodgame". But on my server side, I got nothing. Here is my php code : $arr = get_defined_vars(); ob_start(); var_dump($arr); $result = ob_get_clean(); file_put_contents('fichier.txt', $result); And when I look into this "fichier.t…
has title: Get the file on the server side with php and a windows 8 application

http://stackoverflow.com/q/27040338
tagged with: http://stackoverflow.com/tag/html
tagged with: this
downvote count: 1
has answer: http://stackoverflow.com/a/27041015
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27040819
score: 1
has body: I have a list of elements that i want to check for a specific number of classes, if an element has 10 of these classes, i want something i that element to change. So if the element ".card" continas 10 ".fa-heart", some text and classes needs to change in that element only. Right now it apply´s it to all of my element. This is where i am right now js code: $( ".card .card-footer .btn" ).html( "Add heart" ); $(".card .card-user-points ul").each(function() { var countHearts = $(this).children('.fa-heart').length; console.log(countHearts); if(countHearts == 10) { $( ".card .card-footer .btn" ).html( "Give Coffee" ); $(".card-wrapper").find( ".card .btn" ).addClass( "green" ); } }); HTML: Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14 Navn Navnsen Tlf.: 12345678 mail: min@email.dk Sidste klip 11/11/2014 Samlet klip 147 kopper givet 14
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/27040819
tagged with: if-statement
has title: jQuery - Apply changes to element that matches variable number
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27040635
has answer: http://stackoverflow.com/a/27040635
answer count: 3

http://stackoverflow.com/comment/51735168
has text: How does "if (null !== spawn.spawning) break; //spawn point can't be busy" affect only the creep loop? It's not even in that loop.
type: Comment
comment on: http://stackoverflow.com/a/27088584
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42681902
comment on: http://stackoverflow.com/q/27086662
score: 0
type: QuestionComment
type: Comment
has text: but the content in prefix_content and sufex_content is displayed as dom which means that document.write do what i want

http://stackoverflow.com/q/27144946
tagged with: jquery
has comment: http://stackoverflow.com/comment/42786148
has answer: http://stackoverflow.com/a/27145218
has answer: http://stackoverflow.com/a/27145251
has body: I've wrote this code in order to replace the text regarding the img they are clicking. I can't understand why my code isn't executing, I looked it over and over again. I hope someone can find my mistake :( This is the jQuery code: $(document).ready(function() { $('#text-1').fadeIn(500); //click event $('.img').click(function() { var currentId = $(this).attr('id'); alert(currentId); if (currentId===3) { $('#text-3').fadeIn('fast'); $('#text-2, #text-1').css('display', 'none'); } else if (currentId===2) { $('#text-2').fadeIn('fast'); $('#text-1, #text-3').css('display', 'none'); } else if (currentId===1) { $('#text-2').fadeIn('fast'); $('#text-1, #text-3').css('display', 'none'); } }); }); and this is the HTML: 1 adssssssssssssssssssssssasdsaaaaaaaaaaaaaaaaaaaa 2 adssssssssssssssssssssssasdsaaaaaaaaaaaaaaaaaaaa 3 adssssssssssssssssssssssasdsaaaaaaaaaaaaaaaaaaaa Please help!!!! Thanks
answer count: 4
has comment: http://stackoverflow.com/comment/42785934
score: 0
has comment: http://stackoverflow.com/comment/42786172
has comment: http://stackoverflow.com/comment/42785878
possible better answer: http://stackoverflow.com/a/27145100
accepted answer: http://stackoverflow.com/a/27145218
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27145100
has title: jquery - can't get the elements to fadeOut / fadeIn
has answer: http://stackoverflow.com/a/27148654
has comment: http://stackoverflow.com/comment/42786046
tagged with: javascript

http://stackoverflow.com/comment/42736772
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27115858
has text: You also need to include the script references for Firebase, Angular, and AngularFire. I added those and made a new plunker. The problem is the same from before, you weren't passing newGroup to the `groupsService.addGroup()` function. http://plnkr.co/edit/aW7To6tNG205U0ddRzLs?p=preview
score: 1

http://stackoverflow.com/a/27150922
score: 2
has body: You can apply the :before and :after pseudo-styles to the checkbox itself, and rather than hide the box, just set its width to 0: input[type=checkbox] { width:0px; margin-right:25px; } input[type=checkbox]:before { content: ""; width: 15px; height: 15px; display: inline-block; vertical-align:middle; text-align: center; box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8); background-color:#ccc; } input[type=checkbox]:checked:before { background-color:red; font-size: 15px; } &lt;input type="checkbox" /&gt; &lt;input type="checkbox" /&gt; &lt;input type="checkbox" /&gt;
downvote count: 0
answers question: http://stackoverflow.com/q/27150480
upvote count: 2
type: Answer

http://stackoverflow.com/comment/42786491
comment on: http://stackoverflow.com/a/27133736
type: AnswerComment
score: 0
type: Comment
has text: Your jsfiddle is not the same as my example! I've added a corrected jsfiddle to the answer for you.

http://stackoverflow.com/comment/42655058
score: 0
type: Comment
has text: Ah, good catch. I've added an update that won't allow underscores.
comment on: http://stackoverflow.com/a/27071154
type: AnswerComment

http://stackoverflow.com/q/27035005
possible better answer: http://stackoverflow.com/a/27056451
tagged with: angularjs
has answer: http://stackoverflow.com/a/27056451
has title: CasperJS is not working well on AngularJS
score: 2
accepted answer: http://stackoverflow.com/a/27035740
tagged with: casperjs
downvote count: 0
has comment: http://stackoverflow.com/comment/47514345
has body: If in casper, I only click on one button, then everything works fine. The following code passes the test. casper.then(function() { this.click('#loginB'); this.fill('#loginEmailField', { 'loginEmail': 'a@a.com', }, false); this.fill('#loginPasswordField', { 'loginPassword': 'a', }, false); this.click('#loginClickButton'); this.click('#logoutB'); test.assertNotVisible('#logoutB', "logout item should not show"); test.assertNotVisible('#loggedInItem', "loggedin item should not show"); test.assertVisible('#loginB', "login item should show"); }); This also passes: casper.then(function() { test.assertNotVisible('#loginModal', "login modal not visible"); this.click('#loginB'); test.assertVisible('#loginModal', "login modal visible"); }); Then, if after click on the login button, the user wants to sign up, then the sign up module should show up. The following tests whether it shows up but the test fail: casper.then(function() { this.click('#loginB'); this.click('#signUpB'); test.assertVisible('#signUpModal', "signup modal is visible after click"); test.assertVisible('#UsernameField', "Username field on the signup modal should be visible too"); test.assertNotVisible('#loginModal', "login modal should be invisible after click"); }); I manually tried the website and I am sure it shows up. How can I solve this?
type: Question
has answer: http://stackoverflow.com/a/27035740
type: AnsweredQuestion
upvote count: 2
answer count: 2
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/27121385
downvote count: 0
type: Answer
has body: Maybe the script below could help you. Write down Test.js as follows: iimPlayCode("SET !EXTRACT {{cityPairFileNo}}"); var x = iimGetExtract(1); alert(x);
has comment: http://stackoverflow.com/comment/42788048
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27091509

http://stackoverflow.com/comment/42701764
score: 0
type: QuestionComment
has text: JSON.parse won't accept sing quotes. { 'property':'value' } won't parse into an object. It has to be { "property":"value" }
type: Comment
comment on: http://stackoverflow.com/q/27098264

http://stackoverflow.com/comment/42782315
type: AnswerComment
type: Comment
has text: That seems like a *massive* amount of mucking around to send a plain text string from a browser to server via AJAX, the likes of which don't appear in any similar javascript I've seen/read. What value would I send as `data.name` in the above example to get the expected result (ie sending the string correctly)?
comment on: http://stackoverflow.com/a/27142068
score: 0

http://stackoverflow.com/q/27032645
score: -2
tagged with: javascript
tagged with: jquery
has body: Requirement : I want to reduce the height of header when user scrolls down using jQuery. I have achieved the same using Javascript. Below is the Javascript code: Fiddle function init() { window.addEventListener('scroll', function (e) { var distanceY = window.pageYOffset || document.documentElement.scrollTop, shrinkOn = 300, header = document.querySelector("header"); if (distanceY &gt; shrinkOn) { classie.add(header, "smaller"); } else { if (classie.has(header, "smaller")) { classie.remove(header, "smaller"); } } }); } window.onload = init();
possible better answer: http://stackoverflow.com/a/27032799
favorite count: 0
has answer: http://stackoverflow.com/a/27032788
accepted answer: http://stackoverflow.com/a/27032788
has answer: http://stackoverflow.com/a/27032799
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42586856
type: AnsweredQuestion
has title: Reducing Height of Header on scroll down - jQuery
type: Question
answer count: 2
upvote count: 1

http://stackoverflow.com/q/27049313
accepted answer: http://stackoverflow.com/a/27049476
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: dictionary
has body: So I have been having trouble linking my function to my website. Keep in mind this is all client side. Here is my JavaScript function: function RandomButton() { var number=Math.floor((Math.random() * 3) + 1); if(number===1) { window.location.replace("../Mazerunner.html"); } else if(number===2) { window.location.replace("../GoneGirl.html"); } else if(number===3) { window.location.replace("../Dracula.html"); } Basically what is happening is that it picks a random number between 1 and 3 and if its 1 it goes to a webpage, ifs its 2 another page and so on. Now i do not know how to link this to my mapped image. This function might also not even be doing what i think its doing im quite new at javascript. Here is my image map code. &lt;map name="RandomMap"&gt; &lt;area shape="rect" coords="0,0,500,500" onclick="RandomButton()" href="" alt="Random"&gt; &lt;/map&gt; Im not sure what to do with href="" as I get an error if I just remove it.
has title: Need help link a "random" function in javascript to a mapped image
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42616923
has answer: http://stackoverflow.com/a/27049476
downvote count: 1
type: Question
tagged with: function
upvote count: 0
tagged with: javascript
score: -1
tagged with: image

http://stackoverflow.com/q/27076518
has body: Inside isolate scope I have the following binding: scope: { languages: "&amp;", } The value is passed like that inside DOM: &lt;directive-name languages="['1', '2']"&gt; Then when I try to access languages property scope.languages returns getter function like the one returned by the $parse service only with predefined context. So while I can easily get bound values like that var languages = scope.languages() I still want to make sure that this is indeed expected behavior. So should the &amp; binding return predefined context getter function instead of actual values?
has answer: http://stackoverflow.com/a/27076578
has title: angular isolate scope's & binding returns getter function instead of value
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27076578
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/a/26995890
has comment: http://stackoverflow.com/comment/42524674
score: 1
answers question: http://stackoverflow.com/q/26994934
has comment: http://stackoverflow.com/comment/42525791
upvote count: 1
has comment: http://stackoverflow.com/comment/42525530
has body: I think, you have to try this. At page1.aspx, When Click on link , you have to set link selection value in a variable protected void lnkUser_Click(object sender, EventArgs e) { Session["LinkSelection"] = "lnkUser"; } protected void lnkCustomer_Click(object sender, EventArgs e) { Session["LinkSelection"] = "lnkCustomer"; } At page2.aspx, on Page_Load Event, you have to check the session varribale value and then based on that, you have to visible true/false the Ajax tab if (Session["LinkSelection"] == "lnkUser") { //put your User tab Active/Enabled logic here } else if (Session["LinkSelection"] == "lnkCustomer") { //put your Customer tab Active/Enabled logic here } Instead of using If else, you can also use Switch Case. This is the sample code. If you dont want to use Session variables then pass the value in querystring with page2.aspx such as Response.Redirect("page2.aspx?LinkSelection=lnkUser"). You can also send the encrypted querystring to page2 where you can decrypt it and process
has comment: http://stackoverflow.com/comment/42525225
has comment: http://stackoverflow.com/comment/42524630
has comment: http://stackoverflow.com/comment/42525735
has comment: http://stackoverflow.com/comment/42524936
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26994934
type: Answer
has comment: http://stackoverflow.com/comment/42525436

http://stackoverflow.com/comment/42705247
comment on: http://stackoverflow.com/q/27100341
score: 0
type: Comment
type: QuestionComment
has text: So how do you know that column is an ID column. Does it always have the same title `ID`?

http://stackoverflow.com/q/27139963
has title: Bootstrap: Multiple pages (divs) and navbar
answer count: 3
has comment: http://stackoverflow.com/comment/42777807
score: 8
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: i would like to use this popular template: http://getbootstrap.com/examples/navbar/ I don't want to link to about.htm or contact.htm, this content should be inside the template (multiple pages / divs). This must look something like this: home... about... contact... But how to "link" from the nav-tabs to the divs? This doesn't work: Home About Contact Many thanks!
downvote count: 0
has comment: http://stackoverflow.com/comment/42777821
has answer: http://stackoverflow.com/a/27140268
upvote count: 8
type: Question
has answer: http://stackoverflow.com/a/51386102
tagged with: javascript
has answer: http://stackoverflow.com/a/27140069
tagged with: jquery

http://stackoverflow.com/comment/42779577
has text: Made a fiddle: http://jsfiddle.net/9ug2keoL/4/
type: QuestionComment
comment on: http://stackoverflow.com/q/27140974
score: 0
type: Comment

http://stackoverflow.com/a/27135157
has comment: http://stackoverflow.com/comment/43096084
answers question: http://stackoverflow.com/q/27132942
has comment: http://stackoverflow.com/comment/44549008
has body: When the keyup event triggered, the old value is already overwritten. If you want the old value, you could query it in the keydown or keypress event. Here is a jsfiddle.
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/43106619
upvote count: 1
has comment: http://stackoverflow.com/comment/44588959
score: 1
accepted answer of: http://stackoverflow.com/q/27132942

http://stackoverflow.com/a/65950565
answers question: http://stackoverflow.com/q/27072866
score: 4
has body: How about run a command line: require('child_process').execSync('rm -rf /path/to/directory/*')
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/125465239
downvote count: 0

http://stackoverflow.com/q/27029736
has title: Trying to turn off requestAnimation function when resizing browser
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27030336
tagged with: css
has body: I have the following code and I am trying to turn off the function when window resize is run, currently it just keeps running on window.resize. function headerParallax(x) { if (x ==="true"){ $(window).scroll(function() { // Store scrollTop in variable var scrollPos = $(window).scrollTop(); // var viewportHeight = $(window).height(); console.log(scrollPos + 'bgbottle1'); var bouncePos = ((-1 * (scrollPos - 75) * 1.5) + scrollPos).toFixed(2); var bouncePos1 = ((-1 * (scrollPos - 150) * 1.25) + scrollPos).toFixed(2); $(".bottle1").css({ 'background-position': "right " + bouncePos + 'px'}); if (scrollPos &gt; 150){ $(".bottle2").css({ 'background-position': "left " + bouncePos1 + 'px'}); } }); }else if(x === "false"){ alert("no"); } } $(window).resize(function(){ if ($(window).width() &lt; 1200){ window.requestAnimationFrame(headerParallax("false")); } }); if ($(window).width() &gt; 1200){ window.requestAnimationFrame(headerParallax("true")); }
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27030336
has comment: http://stackoverflow.com/comment/42582074
type: Question

http://stackoverflow.com/comment/42621886
has text: http://regex101.com/r/tZ3fH8/2 and for js (because you choose regexp for php in your link) - http://regex101.com/r/tZ3fH8/3
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27052436
type: Comment

http://stackoverflow.com/q/27124097
has answer: http://stackoverflow.com/a/27150075
accepted answer: http://stackoverflow.com/a/27150075
tagged with: angularjs
tagged with: requirejs
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: firefox
answer count: 1
tagged with: javascript
has body: I am working on a site built with angular and requireJs as file dependency. A strange thing happened, suddnly for no apperent reason ng-click/ng-mouseover/ng-mouseout stopped working on firefox. They keep working normally on IE10 and Chrome. The page renders normally, using controllers and services, i get no Errors, and binding works. Its only ng-events that don't work and only on firefox. anyone has an idea why is this happening??? i tried using data-ng-event but that dosn't work eather. HTML: {{item.name}} JS define([],function(){ function MainPage($scope,$http,horizontalBarChart,verticaltalBarChart){ $scope.data={}; $scope.title = 'title'; $scope.subtitle = 'subtitle'; $scope.activateBar = function(id){ horizontalBarChart.activateBar(id); } $scope.defuseBar = function(id){ horizontalBarChart.defuseBar(id); } $scope.clicked = function(){ console.log('clicked'); } //horizontalBarChart.init($scope,'horizon'); } MainPage.$inject = ['$scope','$http','horizontalBarChart','verticaltalBarChart']; return MainPage; });
has title: Angular mouse events stopped working on firefox only
upvote count: 1
has comment: http://stackoverflow.com/comment/42791737
favorite count: 0

http://stackoverflow.com/comment/42659853
type: Comment
has text: @ArielZhang Try this `NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]; NSDictionary * headers = [NSHTTPCookie requestHeaderFieldsWithCookies: cookies]; [request setAllHTTPHeaderFields:headers];`
type: AnswerComment
comment on: http://stackoverflow.com/a/27060234
score: 0

http://stackoverflow.com/comment/42575465
comment on: http://stackoverflow.com/q/27024178
type: Comment
type: QuestionComment
has text: I added it. I workaround I found was to just have an instance open up the same video multiple times. Not the best solution but for what I am doing, it'll do
score: 0

http://stackoverflow.com/a/27138820
accepted answer of: http://stackoverflow.com/q/27138716
has comment: http://stackoverflow.com/comment/42775993
answers question: http://stackoverflow.com/q/27138716
type: AcceptedAnswer
has body: If you use data attributes on your buttons you can get the value you want. HTML: -1 +1 JS: function modify_qty() { //on click add or subtract $('.botton').click(function(){ //get the value of input field id-'qty' var qty = parseInt($('#qty').val()); var new_qty = qty + parseInt($(this).data('value')); //i don't want to go below 0 if (new_qty < 0) { new_qty = 0; } //put new value into input box id-'qty' $('#qty').val(new_qty) }) }; $(document).ready(modify_qty); More compact JS: $(function() { //on click add or subtract $('.botton').click(function(){ //get the value of input field id-'qty' var $qty = $('#qty'), currentValue = parseInt($qty.val()); $qty.val(Math.max(0, currentValue + parseInt($(this).data('value')))); }) }); Update: Realized you could do this without the data attributes if want to since your button text is the same as your value. $(function() { //on click add or subtract $('.botton').click(function(){ //get the value of input field id-'qty' var $qty = $('#qty'), currentValue = parseInt($qty.val()), newValue = currentValue + parseInt($(this).text()); $qty.val(Math.max(0, newValue)); }) });
score: 0
type: Answer

http://stackoverflow.com/comment/42701947
comment on: http://stackoverflow.com/q/27089331
score: 0
type: Comment
type: QuestionComment
has text: `"t=" + time` should be `"&t=" + time`. Name value pairs in query string are separated using `&`

http://stackoverflow.com/a/27087047
score: 0
has body: One technique would be to just use a combination of the first name and last name, similar to how large companies create email aliases. If you only are creating a few thousand, it wouldn't be hard to work around collisions. These are probably the most human friendly type of id to deal with. For example, Bill Smith would be billsm or something similar. If you don't want your ids to be easily guessable (though if guessing an id breaks your security model you should probably look into that) then you can go with something like the following (untested javascript pseudocode): var sequence = 1, shardId = 1, epoch = 1357027200000; function nextId() { sequence = sequence + 1; now = Date.now() - epoch; seqId = sequence % 1023 nextId = now &lt;&lt; 15 | shardId &lt;&lt; 10 | seqId; return (nextId).toString(36); }
type: Answer
answers question: http://stackoverflow.com/q/27086280

http://stackoverflow.com/a/27014475
has comment: http://stackoverflow.com/comment/42562897
score: 1
has comment: http://stackoverflow.com/comment/42562441
downvote count: 0
has comment: http://stackoverflow.com/comment/42563968
type: Answer
has comment: http://stackoverflow.com/comment/42556401
has comment: http://stackoverflow.com/comment/42561333
answers question: http://stackoverflow.com/q/27014358
has body: I'd suggest looking on the official microsoft site. http://msdn.microsoft.com/en-us/library/bb677133.aspx It really depends on what you want to include in your app. In my opinion is worth looking at C and C++ as it will help you develop more features and have this native mobile feel. If you want to be on the safe side, you can still use html5, css3 and js. you should take a look at Client-side JScript.
has comment: http://stackoverflow.com/comment/42557274
has comment: http://stackoverflow.com/comment/42564134
upvote count: 1

http://stackoverflow.com/a/41936885
has body: Create a directive which parses date to moment and formats moment to date. Basic example below (to be extended with error handling) myApp.directive('momentInput', function () { return { link: function(scope, elm, attrs, ctrl) { ctrl.$parsers.push(function(viewValue) { return moment(viewValue); }); ctrl.$formatters.push(function(modelValue) { return modelValue.toDate(); }); }, require: 'ngModel' } });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27128050
score: 4
upvote count: 4

http://stackoverflow.com/comment/42782426
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27142799
has text: could you explain more about "what the array points to?" and why does it matter if it points to an "object"? i'm kind of a nerb with javascript.

http://stackoverflow.com/a/26997247
has body: Maybe you can check like this if ($('.yourclass').length){ //Do something }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/26996670

http://stackoverflow.com/comment/42709344
comment on: http://stackoverflow.com/q/27102765
has text: **ID of an element must be unique**... use class instead of ID
score: 16
type: Comment
type: QuestionComment

http://stackoverflow.com/a/26999441
accepted answer of: http://stackoverflow.com/q/26999419
answers question: http://stackoverflow.com/q/26999419
has comment: http://stackoverflow.com/comment/42537271
type: Answer
has comment: http://stackoverflow.com/comment/42534702
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42534030
has comment: http://stackoverflow.com/comment/42532290
upvote count: 2
has body: A few things wrong with your code: if (feedback == 10) { console.log("Thank you! We should race at the next concert!"); } else if (feedback &lt;=8) { console.log("I'll keep practicing coding and racing."); } When you use a single = it is assigning the value 10 to the variable feedback instead of checking for equality. The value you assign to feedback then passes through and is evaluated in the if statement (the number 10 in this case). Since 10 is a truthy value (see http://www.sitepoint.com/javascript-truthy-falsy/) the if statement is always true. It's the same as if you said if(10) { .... Also, you need an if after your else. The reason the second code block runs is because without the if after else, the condition (feedback &lt;= 8) is just a boolean statement, then the following code block in braces { } runs because the else has completed. Here's an updated version that I think might serve you better: var feedback = Number( prompt("Please rate this game from 1 - 10.")); while(feedback &lt; 1 || feedback &gt; 10) { feedback = Number( prompt("Please enter a number from 1 - 10.")); } if (feedback &gt;= 9) { console.log("Thank you! We should race at the next concert!"); } else { console.log("I'll keep practicing coding and racing."); }
type: AcceptedAnswer

http://stackoverflow.com/comment/42816014
type: QuestionComment
has text: Then I think Patrik Simeks answer should also work for you. Maybe you can give a comment on that or accept it as the correct anwer if it works?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27139326

http://stackoverflow.com/q/27000386
has comment: http://stackoverflow.com/comment/42531275
score: 3
answer count: 1
has answer: http://stackoverflow.com/a/27000818
favorite count: 0
has title: Array Notation Order of Operations
has body: I have written the following code o[s += "a"] = o[s += "b"] = o[s += "c"] = 0; I was curious as to why the variable s ends up storing "abc" and not "cba". It seems like it would be easier for the the code to execute from right to left. I seems as though the executor chooses and index for storage then decides what goes in there, but doing this make it sound slower since there would be so many states and memory being pushed onto the stack. Can somebody explain as to why it makes sense for the code to execute in the order that is does? I have included a fiddle with a few more examples. http://jsfiddle.net/eggrdtuk/3/
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/27000818
has comment: http://stackoverflow.com/comment/42531512
type: Question
tagged with: arrays
has comment: http://stackoverflow.com/comment/42531321
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42531613
has comment: http://stackoverflow.com/comment/42531819

http://stackoverflow.com/comment/45851946
comment on: http://stackoverflow.com/q/27078789
type: Comment
score: 1
has text: @jwanglof: I posted a very similar question: http://stackoverflow.com/questions/28759042/finding-mutual-friends-on-facebook. It looks like this is a bug in the facebook API (read the comments on that question)
type: QuestionComment

http://stackoverflow.com/q/27085954
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42691627
tagged with: mongodb
has answer: http://stackoverflow.com/a/27091913
tagged with: javascript
has comment: http://stackoverflow.com/comment/42689665
answer count: 1
downvote count: 1
favorite count: 0
has body: I'm new to node.js and am using passport for authentication with the GoogleStrategy. So far anytime I have to restart the server I have to go through the entire login process manually and am wondering if there's a way to "disable" the google authentication, just simply returning a user from my backend (mongodb)? I'd rather not have to clutter my code with IF statements to simulate a "Development mode". Thanks,
has title: Development mode for node.js passport google strategy?
type: UnansweredQuestion
tagged with: node.js
score: 1
has comment: http://stackoverflow.com/comment/42681465

http://stackoverflow.com/a/27084555
type: Answer
answers question: http://stackoverflow.com/q/27084528
upvote count: 5
has body: Item1 = false is an assignment which will always evaluate as false. You need item1 == false
downvote count: 0
score: 5

http://stackoverflow.com/comment/42617611
has text: You'll need to post more of your code here. Yes to the first question and *somehow* to the second
type: QuestionComment
comment on: http://stackoverflow.com/q/27033214
type: Comment
score: 0

http://stackoverflow.com/comment/42695345
type: Comment
has text: What type is `club_id`? I thought it was a `Hash`.
type: AnswerComment
comment on: http://stackoverflow.com/a/27094011
score: 0

http://stackoverflow.com/q/27028868
type: Question
linked to: http://stackoverflow.com/q/2631001
has comment: http://stackoverflow.com/comment/42580789
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42581388
accepted answer: http://stackoverflow.com/a/27029069
answer count: 2
has comment: http://stackoverflow.com/comment/42582226
tagged with: eval
upvote count: 1
has title: How can i reach a JSON node dynamically without using eval?
favorite count: 0
possible better answer: http://stackoverflow.com/a/27029462
linked to: http://stackoverflow.com/q/19436457
has answer: http://stackoverflow.com/a/27029069
has answer: http://stackoverflow.com/a/27029462
has comment: http://stackoverflow.com/comment/42580822
has comment: http://stackoverflow.com/comment/42580657
type: AnsweredQuestion
has body: Path variable is unpredictable. Sometimes it is just a, sometimes a/b, sometimes a/b/c etc. I want to reach a node dynamically according to path. The code below behaves what i want but i can consider if there is a better way to do that without eval for example. http://jsfiddle.net/nuonzngv/1/ cont = { "a" : { "b": { "c": "d" } } } path = "a/b/c"; sect = path.split("/"); path = "cont"; $.each(sect, function( index, value ) { path = path + "['" + value + "']"; }); console.log(eval(path)); Solution I found a plugin that has a getPath function in it, for underscore.js: https://github.com/documentcloud/underscore-contrib/blob/master/docs/underscore.object.selectors.js.md
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/42712255
has text: I don't really think a race condition is the problem though. As I'm not doing anything in the controller action that is being polled other than starting PHP's native session library and returning my session variable as json data as can be seen in the snippet.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27101875
score: 0

http://stackoverflow.com/a/27009405
answers question: http://stackoverflow.com/q/27009054
score: 0
type: Answer
has body: According to docs I can assure you that multiple document.ready functions are working... $(document).ready(function() { alert("test1!"); }); $(document).ready(function() { alert("test2!"); }); See this fiddle: http://jsfiddle.net/La7kLLfm/ Anyway if you are really asking "how to combine", o.O - Just put them all in one function body... Sample: $(document).ready(function() { alert("test1!"); alert("test2!"); }); As you can see in first example, both document.ready() are called so you must have an probably runtime error in your script causing it to break, this can be a non existing variable or object because its initalized inside of an "if", a null object an invalid array index.. Your code is too long and complex to read without a decent example. If you want any help by that, please provide the HTML output of your page that is required for it to work and maybe create a sample fiddle for it and explain us in short what its supposed to do and then we can check why its not doing what you expect it to do. However your thread topic is answered and proven false.

http://stackoverflow.com/q/27143541
has body: is it possible to fire a function when observable array is modified? my goal here is to notify me if my observable array is modified to do some logics on my current application this is my view model it has a observable array inside it WT.BM.BarsViewModel = function () { var self = this; self.BarsDataHolder = ko.observableArray([]); }; i just want to fire a function to notify me if self.BarsDataHolder has been modified any ideas?
type: AnsweredQuestion
has title: how to fire function when observable array is modified
type: Question
linked to: http://stackoverflow.com/q/14149551
answer count: 1
has answer: http://stackoverflow.com/a/27143745
score: 0
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/42783542
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27143745

http://stackoverflow.com/comment/42791728
score: 1
comment on: http://stackoverflow.com/q/27148050
has text: So what's the question?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42520154
score: 0
type: AnswerComment
has text: another query related to parsing only. please let me know if i should start it in a new thread instead. now my response is a zip file that i need to save. this script is running on server so i assume this should be allowed. i added the content-type to application/zip. but now how to parse and save response
comment on: http://stackoverflow.com/a/26992873
type: Comment

serialization
tags question: http://stackoverflow.com/q/27038036
tag name: serialization
tags question: http://stackoverflow.com/q/27105418
tags question: http://stackoverflow.com/q/27045308
type: Tag

http://stackoverflow.com/comment/42701570
has text: make sure you have jquery version greater than 1.6 as prop introduced in those versions . http://api.jquery.com/prop/#prop-propertyName-value
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27098265
type: Comment

http://stackoverflow.com/q/27044793
has comment: http://stackoverflow.com/comment/42611967
tagged with: chaining
tagged with: lodash
favorite count: 0
score: 2
has answer: http://stackoverflow.com/a/27045444
upvote count: 2
has title: chaining curry functions with lodash
type: Question
type: AnsweredQuestion
tagged with: currying
has comment: http://stackoverflow.com/comment/42612162
has comment: http://stackoverflow.com/comment/49376469
accepted answer: http://stackoverflow.com/a/27045444
has comment: http://stackoverflow.com/comment/42611722
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42612357
has body: Inspired by this article on curry functions I was trying to chain them and came up with this solution. I'm not sure about the mixin though since I somehow feel that lodash might have such a function allready. If so, what is this function called? var _ = require('lodash'); var get = _.curry(function(property, object) {return object[property]}); var map = _.curry(function(fn, objects){ return objects.map(fn) }); var json = { "user": "hughfdjackson", "posts": [ { "title": "why curry?", "contents": "..." }, { "title": "prototypes: the short(est possible) story", "contents": "..." } ] } _.mixin({ then:function(input, fn) {return fn(input);} }); _(json) .then(get('posts')) .then(map(get('title'))) .tap(console.log)

http://stackoverflow.com/a/27027040
has body: if($('input').prop("readonly")!="readonly") { ... } use prop or attr to get attribute of elements.
type: Answer
answers question: http://stackoverflow.com/q/27026989
score: 0

http://stackoverflow.com/a/27096592
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27094803
has body: In your doGet or doPost method based on form type in servlet you can iterate all parameters and check if parameter starts with rata then its accepted to get all parametes names use request.getParameterNames() which will return Enumeration. Enumeration&lt;String&gt; params = request.getParameterNames(); while (params.hasMoreElements()) { String param = params.nextElement(); if(param.startsWith("rata")){ String value = request.getParameter(param); //your code here } }

http://stackoverflow.com/q/27045131
answer count: 0
has comment: http://stackoverflow.com/comment/42609192
type: Question
has body: Is it possible to change bullet colors of ordered/unordered list to same as text? Example: Create new list > add some text > change font color > no color here. Screenshot: Do I need set something, to work it properly? Like in MS Word? PS: In online edition of Word, it works well too.
has title: TinyMCE not change list bullet color
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/5306640
tagged with: tinymce
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42614389
tagged with: css

http://stackoverflow.com/q/27059765
tagged with: node.js
type: AnsweredQuestion
has body: I'm trying to parse a UTF-8 encoded string, but JSON.parse is choking on this line: undefined:306 , "o": { "type": "uri", "value": "http://got.dbpedia.org/resource/\U00010331\ ^ SyntaxError: Unexpected token U this is the line I use: var object = JSON.parse(data); I've also tried with this line, but no success: var object = JSON.parse(data.toString('utf8')); Any idea?
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
upvote count: 8
type: Question
tagged with: javascript
has title: JSON.parse UTF-8 string
answer count: 1
tagged with: utf-8
has answer: http://stackoverflow.com/a/27059819
accepted answer: http://stackoverflow.com/a/27059819
favorite count: 0
score: 8

http://stackoverflow.com/comment/42723195
has text: yes in src/js i have 7x js-Files.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27108776
score: 0

http://stackoverflow.com/comment/42592540
type: Comment
has text: Are you sure that phonegap app can access your localhost:95 server?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27036029

http://stackoverflow.com/a/27116918
upvote count: 1
has comment: http://stackoverflow.com/comment/42815012
score: 1
has body: How are you loading proj4js? If you're using AMD style then you'll need to wrap it up a bit like this: require([ "//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.3/proj4.js" ], function(proj4) { var url = 'http://epsg.io/2193.js'; window.proj4 = proj4; // add to global scope require([url], function() { // now you can use proj4 with NZTM loaded in this block. ); }); That seems a little magical to me, because you're hoping that proj4 will always be the correct name and you're adding proj4 to the global scope, which is a little unclean. I'd be inclined to use the .proj4 extension with the dojo/text AMD plugin: require([ "//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.3/proj4.js" "dojo/text!http://epsg.io/2193.proj4" ], function(proj4, epsg2193) { proj4.defs(epsg2193); // now you can use proj4 with NZTM loaded. }); That means you can load both resources simultaneously. Unfortunately it looks like that lack of Access-Control-Allow-Origin headers on the response breaks that approach, but you could look at proxying it through your own domain if you need the performance. BTW, you could cheat a bit on the first option by defining a fake proj object: var Proj4Proxy = function() { this._defs = []; } Proj4Proxy.prototype.defs = function(crs) { this._defs.push(crs); }; var proj4 = new Proj4Proxy(); require([ "dojo/_base/array", "//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.3/proj4.js", "//epsg.io/2193.js" ], function(array, _proj4) { array.forEach(proj4._defs, function(crs) { _proj4.defs(crs); }); proj4 = _proj4; // now you can use proj4 with NZTM loaded. }); Best of both worlds, if you don't mind the verbosity.
accepted answer of: http://stackoverflow.com/q/27116709
answers question: http://stackoverflow.com/q/27116709
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42775108
has comment: http://stackoverflow.com/comment/42775075
has comment: http://stackoverflow.com/comment/42815783
type: Answer

http://stackoverflow.com/a/26993164
has comment: http://stackoverflow.com/comment/42517972
has comment: http://stackoverflow.com/comment/42521122
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42519428
type: Answer
has comment: http://stackoverflow.com/comment/42519187
upvote count: 1
answers question: http://stackoverflow.com/q/26991945
accepted answer of: http://stackoverflow.com/q/26991945
has body: You can, but you are not propagating the data received by the ajax request. You should invoke op.success with the received data: var accountsListDs = new kendo.data.DataSource({ transport: { read: function(op) { $.ajax({ url: "http://localhost:8085/cabinet/wicket/bookmarkable/com.office.web.services.AccountsService", dataType: "json", type: "POST", cache: false, data: { op: "list" }, success: function(data){ console.log("DataSource Read Success"); op.success(data); }, error: function(){ console.log("DataSource Read Failed"); } }); }, schema: { data: function(response) { return response; } } }, requestEnd: function(e) { var response = e.response; console.log(response); } }); The following code snippet shows a running version of the idea. $(document).ready(function () { var dataSource = new kendo.data.DataSource({ transport: { read: function (op) { $.ajax({ url: "http://demos.telerik.com/kendo-ui/service/Products", dataType: "jsonp", success: function(data){ console.log("DataSource Read Success"); op.success(data); }, error: function(){ console.log("DataSource Read Failed"); } }); } }, requestEnd: function(e) { var response = e.response; console.log(response); }, batch: true, pageSize: 20, schema: { data: function(response) { return response; } } }); $("#grid").kendoGrid({ dataSource: dataSource, pageable: true, height: 550, columns: [ "ProductName", { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: 120 }, { field: "UnitsInStock", title: "Units In Stock", width: 120 }, { field: "Discontinued", width: 120 } ], }); }); &lt;link href="http://cdn.kendostatic.com/2014.2.1008/styles/kendo.common.min.css" rel="stylesheet" /&gt; &lt;link href="http://cdn.kendostatic.com/2014.2.1008/styles/kendo.default.min.css" rel="stylesheet" /&gt; &lt;script src="http://cdn.kendostatic.com/2014.2.1008/js/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://cdn.kendostatic.com/2014.2.1008/js/kendo.all.min.js"&gt;&lt;/script&gt; &lt;div id="grid"&gt;&lt;/div&gt;

http://stackoverflow.com/q/27038432
tagged with: java
linked to: http://stackoverflow.com/q/27124859
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42599168
has answer: http://stackoverflow.com/a/27041674
has body: I want to send the value of variable x to the contoller using jquery load() method Currently i am working like this as shown in below code and its working fine but i want to sent the value of x to the controller i am using spring mvc. &lt;script type="text/javascript"&gt; function loadXMLDoc() { $( "#bdeRightView" ).load( "${contextPath}/clusterInfoView"); } &lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#bdeViewNew').on('changed.jstree', function(e, data) { var i, j, r = [],x; for (i = 0, j = data.selected.length; i &lt; j; i++) { r.push(data.instance.get_node(data.selected[i]).text.trim()); x = data.instance.get_node(data.selected[i]).text.trim(); if(x=="abc" || x=="xyz" || x=="pqr") { return true ; } else{ $('#treeBreadCrumbs').html(r.join(', ')); loadXMLDoc(); } } }); }); &lt;/script&gt; Now my controller code : @RequestMapping(value = "/clusterInfoView", method = RequestMethod.GET) public ModelAndView getClusterInfoView() { try{ System.out.println("inside try of controller "); // some code goes here return new ModelAndView(""); } catch (Exception ex) { ex.printStackTrace(); return new ModelAndView("errorMessage"); } } My question is how i can get the value of x in this controller method so that i can use this x as per my requirement. can any one knows how to do this? thanks in advance
possible better answer: http://stackoverflow.com/a/27038556
tagged with: spring-mvc
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27038556
linked to: http://stackoverflow.com/q/28670644
upvote count: 1
has title: how to send data and URL using jquery load method
type: Question
accepted answer: http://stackoverflow.com/a/27041674
score: 1

http://stackoverflow.com/q/27097176
tagged with: object
score: 3
has title: How to create primitive-wrapper object with prototype
has answer: http://stackoverflow.com/a/27098836
tagged with: prototype
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I can wrap a primitive in an object: &gt; p = Object(1); &lt; Number {PrimitiveValue: 1} which lets me set properties on it: &gt; p.prop = 2; &gt; p.prop &lt; 2 while still using the primitive object: &gt; p + 1 &lt; 2 I want to adorn such primitive-wrapping objects with prototype methods. I know I can set the prototype explicitly with: &gt; Object.setPrototypeOf(p, { q : 3 }); &lt; Number {prop: 2, q: 3, PrimitiveValue: 1} Is there any way to create wrapper objects with the prototype already in place, so I don't have to set it on each newly created wrapper (or pollute the Object prototype)? Perhaps by creating an ObjectWrapper, which would work as in: &gt; ObjectWrapper = ...???... &gt; ObjectWrapper.prototype = { q : 3 }; &gt; [new] ObjectWrapper(1) which I would want to yield &lt; Number {q:3, PrimitiveValue: 1}function
has answer: http://stackoverflow.com/a/27097518
upvote count: 3
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/42592893
comment on: http://stackoverflow.com/q/27036029
has text: try adding application/json into your header
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27064870
has body: You just need to wrap your code like this: $(document).ready(function() { $("#overlay").hide(); $("#work").click(function(e){ $("#overlay").toggle(); e.stopPropagation(); }); $(document).click(function(){ $("#overlay").hide(); }); $("#overlay").click(function(e){ e.stopPropagation(); }); }); On default, Fiddle runs the code on onLoad and you are placing it in the &lt;head&gt;. You can set the option on the left top corner. I changed it to in &lt;head&gt; and it's not working there either: http://jsfiddle.net/N9cbk/8/ Read more about $( document ).ready() here: http://learn.jquery.com/using-jquery-core/document-ready/
upvote count: 2
type: AcceptedAnswer
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/42643636
has comment: http://stackoverflow.com/comment/42643545
has comment: http://stackoverflow.com/comment/42643471
score: 2
accepted answer of: http://stackoverflow.com/q/27064682
has comment: http://stackoverflow.com/comment/42643597
answers question: http://stackoverflow.com/q/27064682

http://stackoverflow.com/comment/70866904
type: QuestionComment
has text: Possible duplicate of [Javascript web workers: why do I need to postMessage twice to trigger event?](http://stackoverflow.com/questions/14328826/javascript-web-workers-why-do-i-need-to-postmessage-twice-to-trigger-event)
type: Comment
comment on: http://stackoverflow.com/q/27093459
score: 0

http://stackoverflow.com/comment/42612482
type: Comment
comment on: http://stackoverflow.com/q/27047112
type: QuestionComment
score: 1
has text: Check this: http://stackoverflow.com/questions/962033/what-underlies-this-javascript-idiom-var-self-this/

http://stackoverflow.com/a/27114864
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27114170
answers question: http://stackoverflow.com/q/27114170
score: 3
has comment: http://stackoverflow.com/comment/42732858
upvote count: 3
has body: If you want just to inform the user about the min and the max: var app = angular.module('myApp',[]); app.controller('MyCtrl',function($scope){ $scope.minValue = 5; $scope.maxValue = 10; }); Last name: Should be {{minValue}} charachters long No more than {{maxValue}} characters please
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42732642
has comment: http://stackoverflow.com/comment/42732743

typeconverter
type: Tag
tags question: http://stackoverflow.com/q/27037283
tag name: typeconverter

http://stackoverflow.com/q/27049162
tagged with: ruby-on-rails
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11304766
has comment: http://stackoverflow.com/comment/42616604
type: Question
has answer: http://stackoverflow.com/a/27054632
has comment: http://stackoverflow.com/comment/42618710
tagged with: javascript
has answer: http://stackoverflow.com/a/27054251
accepted answer: http://stackoverflow.com/a/27054632
score: 0
answer count: 2
tagged with: ruby-on-rails-4
has title: Rails form_tag nested with nested resources
possible better answer: http://stackoverflow.com/a/27054251
has body: I have routes that looks like this: resources :teams do resources :plans do resources :charges end ... I want to create a form using form_tag that points to my charges_controller create action. But I need some help... The form I have currently looks like this (it's only a button, the submit is done in javascript): = form_tag team_plan_charges_path([@team, plan]) do = content_tag "button", id: "customButton", class: "btn btn-primary" do Select plan This results in the following error: No route matches {:action=&gt;"index", :controller=&gt;"charges" ... missing required keys: [:plan_id] I'm not sure how to set up the form_tag correctly based on my form, any ideas?
tagged with: ruby

http://stackoverflow.com/q/27119710
has body: I am working in a page created with the help of sharepoint . In that page , we have one tag. &lt;input name="SearchBox" title="Search..." class="" id="" accessKey="S" onkeydown="" onkeypress="" onfocus="" onblur="" type="text" maxLength="2048" autocorrect="off" autocomplete="off" value="test"/&gt; something like the above In IE9 and above , chrome I am fetching the value of the text box and I am passing that value to another function . It is working fine But In IE8 , if i tried to fetch like document.getElementsByName('SearchBox')[0].value, it throwing error as "SCRIPT5007: Unable to get value of the property 'value': object is null or undefined " I inspected the elements in developer tool of IE8. I am really surprised the input tag element is not able to inspect in IE8 . Then I opened the html in developer tool and I saw the element is missing in html file . But it is rendering in page. How come is it possible. Can anyone help me regarding this ? We used sharepoint 2013.
type: UnansweredQuestion
has title: Input text box not recognising in IE8
type: Question
tagged with: javascript
tagged with: jquery
tagged with: sharepoint
has answer: http://stackoverflow.com/a/27120231
has answer: http://stackoverflow.com/a/27119835
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42740862

http://stackoverflow.com/a/27010663
answers question: http://stackoverflow.com/q/27005797
type: Answer
has body: This simply isn't supported as evident by the feature request on GitHub and lack of stdin property in the documentation. There are mainly two workarounds possible. Both of the require that you write a second program in the language of your choice (can be a PhantomJS script). When you come to the point in the CasperJS script where it is necessary to get input, you read a predefined file multiple times until something is inside it. So you execute the second program when you see that CasperJS is at this point. The program may be a simple command like echo my text &gt; predefinedFile.txt or something more elaborate. The polling functions in CasperJS would be something like this: function poll(){ var content = fs.read(predefinedFile).trim(); if (!content) { this.wait(1000, poll); } else { // do something sensible } } //.... casper.then(poll); There is a webserver module that you can use to send messages to SlimerJS when it is running as a CasperJS script. The second program would need to send actual requests.
score: 0

http://stackoverflow.com/comment/42539294
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27005015
type: Comment
has text: or the files dont exist or the permissions are wrong or ... random guessing is not helpfull

http://stackoverflow.com/comment/42739008
comment on: http://stackoverflow.com/q/27117776
score: 0
type: Comment
type: QuestionComment
has text: Have a minimal demo for us to see?

http://stackoverflow.com/comment/42656987
comment on: http://stackoverflow.com/a/27072043
type: Comment
score: 0
type: AnswerComment
has text: As you can see in my fiddle, the modal html must exist in your html

http://stackoverflow.com/a/27053697
has comment: http://stackoverflow.com/comment/42700854
has comment: http://stackoverflow.com/comment/42700525
has comment: http://stackoverflow.com/comment/42700121
has body: I have been able to achieve something similar using the JQuery Multifile plugin, found here : http://www.fyneworks.com/jquery/multiple-file-upload/ My Domino web application displays to the client a list of files that are pending upload when the form is submitted, and allows for removal of all or any of these files prior to submission. This plugin will also allow you do restrict the number of attachments (in your case, 1) and the allowed file types (in your case .PDF only). It's very simple to implement. Here is a suggestion of how it might work for you. if below field equals 'clear', attachments will clear on field exit : I should add that I am in no way associated with the creators of this plugin - just a fan. You can also try it here : http://jsfiddle.net/shwguhj6/ You will also need to at the ID to the file upload element, like this:
has comment: http://stackoverflow.com/comment/42700441
has comment: http://stackoverflow.com/comment/42701162
accepted answer of: http://stackoverflow.com/q/27053234
answers question: http://stackoverflow.com/q/27053234
has comment: http://stackoverflow.com/comment/42700310
has comment: http://stackoverflow.com/comment/42737239
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42700065
has comment: http://stackoverflow.com/comment/42700139
has comment: http://stackoverflow.com/comment/42700842
has comment: http://stackoverflow.com/comment/42699822
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42699846
has comment: http://stackoverflow.com/comment/42730392

http://stackoverflow.com/comment/42577915
has text: I am not familiar with JScript so ignore if this is off-base, but make sure that both Toad and JScript are connected as the same schema and have the same value for the current_schema alter session parameter. Try modifying your SQL to fully qualify the table name with its schema.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27026494
score: 0

http://stackoverflow.com/comment/42650385
type: Comment
score: 0
has text: should I manually add to css every new slide, I want to add? Or is there more common solution?
comment on: http://stackoverflow.com/a/27068204
type: AnswerComment

http://stackoverflow.com/a/27059489
answers question: http://stackoverflow.com/q/27059272
score: -1
downvote count: 1
has body: you can use toggle and other animation effect provided by Jquery,eg slideUp and slideDown $(document).ready(function() { $('body').on('click', '.cart-show', function (e) { $("#cart").slideUp(); }); }); ref http://api.jquery.com/slideup/
type: Answer
upvote count: 0

http://stackoverflow.com/comment/42686390
type: Comment
has text: Thanks for your answer with explanation of whether this is better than for loop. +1
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27088788

http://stackoverflow.com/q/27117902
has comment: http://stackoverflow.com/comment/42766341
has comment: http://stackoverflow.com/comment/42739796
type: Question
tagged with: javascript
tagged with: label
score: 0
type: UnansweredQuestion
has title: How to add a text label to a polyline edge in D3.js
has body: I had to use polyline to draw the edges because I needed straight line edges with arrow markers in the middle. (As suggested in Display an arrow head in the middle of D3 force layout link). I also need to add labels to the edges(Something like this http://jsfiddle.net/bc4um7pc/). From what I understand, textPath is used to add text labels to a path. How to adapt this for polyline edges. textPath doesnt seem to work with polyline. How do I make this work? var path = svg.append("svg:g").selectAll("path"); path = path.data(force.links(), function(d,i) {return d.source.id + "-" + d.target.id; }); path.enter() .append("polyline") .attr("class", function(d) { return "link " + d.type; }) .attr("id",function(d,i) { return "linkId_" + i; }) .attr("marker-mid", function(d) { return "url(#" + d.type + ")"; }); var linktext = svg.append("svg:g").selectAll(".linklabelholder"); linktext = linktext.data(force.links()) .enter().append("g").attr("class", "linklabelholder") .append("text") .attr("class", "linklabel") .style("font-size", "13px") .attr("x", "50") .attr("y", "-20") .attr("text-anchor", "start") .style("fill","#000") .append("textPath") .attr("xlink:href",function(d,i) { return "#linkId_" + i;}) .text( "test");
linked to: http://stackoverflow.com/q/15729856
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: d3.js

http://stackoverflow.com/comment/42562897
type: AnswerComment
has text: Yes it is a serious drawback of HTML5, so when we develop apps in html5 for windows phone it uses the browser engine or something to run our app on the phone?
type: Comment
comment on: http://stackoverflow.com/a/27014475
score: 1

http://stackoverflow.com/q/27045536
has comment: http://stackoverflow.com/comment/42609928
has comment: http://stackoverflow.com/comment/42609755
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42609943
has title: Parsing JSON from a site using wp-posts/posts (JSON REST API wordpress plugin)
answer count: 0
type: UnansweredQuestion
tagged with: wordpress
has body: Here's the JSON: http://thecodingdiaries.com/wp-json/posts?filter[category]=Javascript%20Diaries?callback=? JSFIDDLE: http://jsfiddle.net/sggakoxx/2/ $(document).ready(function(){ $.getJSON("http://thecodingdiaries.com/wp-json/posts?filter[category]=Javascript%20Diaries&amp;callback=?", function (data) { var htmlString = ""; $.each(data, function (i, item) { htmlString += 'Title of Post: ' + item.title + '&lt;br /&gt;' + 'Content: ' + item.content; }); $('#content').html(htmlString);}); }); I'm using &amp;callback=? at the end of the URL, so it's jsonp. However, I'm still getting this error in the console: Refused to execute script from 'http://thecodingdiaries.com/wp-json/posts?filter[category]=Javascript%20Diaries&amp;callback=jQuery21003816753360442817_1416503286274&amp;_=1416503286275' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled. In other words, the browser seems to be attaching something after the callback=. Any help? Thanks in advance.
has comment: http://stackoverflow.com/comment/42609983
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27002059
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42535220
type: Answer
has body: You're right. It's called short circuit evaluation, and it applies to both || and &amp;&amp;. For ||, evaluation of the right hand side takes place only if the left hand side evaluates to false. For &amp;&amp;, evaluation of the right hand side takes place only if the left hand side evaluates to true. Note that it's not just for performance. It also prevents errors from occurring: sometimes evaluating the right hand side would be unsafe or meaningless if the left hand side were not as expected.
accepted answer of: http://stackoverflow.com/q/27002014
score: 12
upvote count: 12
answers question: http://stackoverflow.com/q/27002014
downvote count: 0

http://stackoverflow.com/a/27015412
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42556416
downvote count: 0
type: Answer
has body: You can declare function and call it whenever you want. Try using function : function check(){ var leftHeight = $('.leftblock').height(); var rightHeight = $('.rightblock').height(); if (leftHeight &gt; rightHeight){ $('.rightblock').css('height', leftHeight); } else { $('.leftblock').css('height', rightHeight); } } $(function(){ check();//calling function on window load $(window).resize(function(){ check();//calling function on window resize }); });
answers question: http://stackoverflow.com/q/27015361

http://stackoverflow.com/a/27124247
score: 1
answers question: http://stackoverflow.com/q/27124032
has body: Filter takes what it was applied to as first parameter, so when you do "smth | filter", smth will be passed as first parameter to filter, the second parameter is what you added after ':', e.g. : "smth | filter:params". And filter function returns the actual filter result. So in this case: &lt;tr data-ng-repeat="client in filtered = (clients | companyFilter:selectedCompany)"&gt; filter will take an array 'clients' with parameter 'selectedCompany', return an array witch will be passed to ng-repeat.
upvote count: 1
has comment: http://stackoverflow.com/comment/42749221
type: Answer
has comment: http://stackoverflow.com/comment/42748778
downvote count: 0

http://stackoverflow.com/comment/42564817
type: QuestionComment
comment on: http://stackoverflow.com/q/27018258
score: 0
has text: Could it be that your URL should have httpS ??
type: Comment

http://stackoverflow.com/a/27062445
accepted answer of: http://stackoverflow.com/q/27061704
has comment: http://stackoverflow.com/comment/42640643
score: 0
type: AcceptedAnswer
type: Answer
has body: As this is in ASP context $(document).ready(function () { $('#&lt;%=yourbtn.ClientID%&gt;').click(function () { $('#&lt;%=title.ClientID%&gt;').attr("disabled", "disabled"); }); }); Updated $(document).ready(function () { $('#&lt;%=yourbtn.ClientID%&gt;','#&lt;%=title.ClientID%&gt;').click(function () { $('#&lt;%=title.ClientID%&gt;').attr("disabled", "disabled"); }); });
answers question: http://stackoverflow.com/q/27061704

http://stackoverflow.com/comment/42700969
type: Comment
type: QuestionComment
has text: I had expected to be able to iterate through something like jQuery('.entry')[0].attr('data-name') but that doesn't seem to work. Nor does jQuery('.entry')[0].attributes.data-name
comment on: http://stackoverflow.com/q/27097922
score: 0

http://stackoverflow.com/comment/136643130
type: Comment
comment on: http://stackoverflow.com/a/49125621
has text: @vsync IMO this is not a lot of code: `fs.readdirSync('./log/').forEach(file => fs.rmSync(file, { recursive: true }))`.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42774689
score: 0
type: AnswerComment
has text: And could you explain why you made these changes? What was wrong with the original code that caused it to fail, and how does this change correct those failings?
type: Comment
comment on: http://stackoverflow.com/a/27138342

http://stackoverflow.com/comment/42547887
has text: naturally in the other controller do $scope.settings = myService.getSettings(); first
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27010036
score: 0

http://stackoverflow.com/q/27086436
has answer: http://stackoverflow.com/a/27087741
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: geojson
type: Question
has title: Fininshed rendering layer event
has body: I am using google maps api v3 to create a map with a couple of layers that are loaded after users' request. The layers are loaded using Geojson format with the code below function getgeojson(json) { proplayer = new google.maps.Data(); proplayer.loadGeoJson('../public/geoprop/index'); proplayer.setStyle({ fillColor: 'red', strokeColor: 'red', fillOpacity: 0.3, strokeWeight: 1 }); proplayer.setMap(map); proplayer.addListener('mouseover', function(event) { infoWindow.setContent(event.feature.getProperty('kta')); infoWindow.setPosition(event.latLng); infoWindow.open(map); }); } The layers consist of 3.5 K polygons approximately with simple geometry (almost all of them are rectangular shapes) and it takes about 5 sec to be fully rendered in the map. I want to use a loader indicator while the layer is rendered so I use two functions ajaxindicatorstart('loading data.. please wait..'); ajaxindicatorstop(); to start and stop the indicator. The problem is that I cannot detect when the rendering is completed. I have tried proplayer.addListener( 'metadata_changed', function () {ajaxindicatorstop();}); and google.maps.event.addListener(map, 'idle', function() { ajaxindicatorstop(); }); suggested by other users but it didn't work. Is this actually possible? Are there are any alternatives to bypass this problem? Thank you in advance
accepted answer: http://stackoverflow.com/a/27087741
tagged with: javascript
tagged with: google-maps-api-3
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/32682385
answers question: http://stackoverflow.com/q/27109692
downvote count: 0
score: 1
has body: The problem persists? Did you try to debug in real device? Usually this error happens when you are testing on a browser on your pc or even an emulator. I've faced the same problem days ago and the reason was that my phone needed to be updated. Also, if you have installed any other app that uses the camera, some errors might be raised.
upvote count: 1
type: Answer

http://stackoverflow.com/comment/42658424
type: AnswerComment
type: Comment
has text: Hi Larry, thank you for the code but I think you misunderstood. I would only like the divs paired with ".stayhovered" maintain visibility and have everything else fade away after the mouse moves away. Is this possible?
comment on: http://stackoverflow.com/a/27072755
score: 0

http://stackoverflow.com/comment/42705275
comment on: http://stackoverflow.com/q/27097705
score: 0
type: Comment
type: QuestionComment
has text: how to run timer by starting current_time - session_start ?

http://stackoverflow.com/a/27031181
type: Answer
answers question: http://stackoverflow.com/q/27030595
downvote count: 0
score: 1
has body: You could change your alert to use a confirm window var response = confirm('Are you sure you want to clear the form?'); if (response){ // clear the form console.log('clearing the form approved'); } The confirm window is similar to the alert except it shows OK and Cancel buttons. It returns a bool result depending on the user's choice. Like the alert window, it halts program/script execution until the user makes a decision
upvote count: 1

http://stackoverflow.com/q/27046363
score: 0
has body: can somebody please give me a hint here. I'm new to dealing with web page cookies, in another view (using MVC) I created a cookie with some basic info. Depending on that info I want to change the web page language. The cookie itself is created with JavaScript. I know how to solve this by creating the cookie in the controller, but I don't know which method is the best. Regards. &lt;script type="text/javascript"&gt; { if (document.cookie.indexOf("Russian") &gt;= 0) { // load partial view here //@{Html.RenderPartial("~/Views/Home/About_.cshtml");} } else if (document.cookie.indexOf("English") &gt;= 0) { // load partial view here //@{Html.RenderPartial("~/Views/Home/About_Eng.cshtml");} } } &lt;/script&gt;
has answer: http://stackoverflow.com/a/27046768
has comment: http://stackoverflow.com/comment/42619658
has title: Depending on cookie content
type: UnansweredQuestion
type: Question
tagged with: asp.net-mvc
tagged with: cookies
has comment: http://stackoverflow.com/comment/42611258
has comment: http://stackoverflow.com/comment/42611046
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27111604
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/42728285
has comment: http://stackoverflow.com/comment/42726180
has comment: http://stackoverflow.com/comment/42868867
score: 3
has body: With bluebird. var foo = function(array) { return new Promise.map(array, function(element) { return doIntensiveWork(element).then(doMoreIntensiveWork); }); }; foo(['bar', 'baz']) .then(function(returnedValues) { // returnedValues is an array containing all values // return by your intensive work in foo });
answers question: http://stackoverflow.com/q/27109392
has comment: http://stackoverflow.com/comment/42771329
upvote count: 3

http://stackoverflow.com/q/27103568
score: 0
has title: Sys.WebForms.PageRequestManager.getInstance();
type: Question
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/27631799
tagged with: asp.net
accepted answer: http://stackoverflow.com/a/27631799
has body: I am trying to call a JavaScript function after asp:UpdatePanel. The following solution works fine for IE 8 and above, but throws exception for IE 7. var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(function () { DoJobOne(); DoJobTwo(); }); Exception: Unable to get property 'PageRequestManager' of undefined or null reference I tried adding the App_browser from NuGet. Still the problem exists. Any work around to load javascript post UpdatePanel? Thank you in advance :)
type: AnsweredQuestion

http://stackoverflow.com/q/27000201
has title: How can I share an Image to my Cordova/PhoneGap App from another App?
tagged with: javascript
has body: I have a Cordova/PhoneGap App which deals with photos. What I want is to make my app appears in the sharing options, when other apps want to share a photo to other apps. Here is an example for such a sharing dialog: How can I make that my Cordova/PhoneGap App appears in a Photo Sharing Options of other Apps? Edit: When I click on share to Instagram in some photo apps I get the following popup. How can I make that my app does appear in this share popup too?
has comment: http://stackoverflow.com/comment/49505662
answer count: 1
has comment: http://stackoverflow.com/comment/42563873
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42564521
tagged with: cordova
has comment: http://stackoverflow.com/comment/42550068
accepted answer: http://stackoverflow.com/a/27034232
tagged with: android
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15991990
has comment: http://stackoverflow.com/comment/42562935
linked to: http://stackoverflow.com/q/2774343
has comment: http://stackoverflow.com/comment/42564088
type: Question
score: 5
has answer: http://stackoverflow.com/a/27034232
has comment: http://stackoverflow.com/comment/42561271
has comment: http://stackoverflow.com/comment/42589227
upvote count: 5
tagged with: ios

http://stackoverflow.com/a/27085164
has body: Check your use of quotes. You are using double quotes in the script, so all it sees is: onclick="doSomething(" Also change it to type='button'? also check your js console and see if there are any errors. that usually will let you know if it's a code error or some kind of browser security issue.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27085128

http://stackoverflow.com/comment/75905522
comment on: http://stackoverflow.com/a/27019575
type: Comment
has text: @shangxinbo Could you *accept* the answer if it solved your issue? (the mark under the score of the answer)
score: 0
type: AnswerComment

http://stackoverflow.com/a/26999815
has body: Just put your JS in this: window.onload = function(){ /*YOUR JS HERE*/ } The window.onload event start when the document's window is ready
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26999747

http://stackoverflow.com/comment/42637818
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27061783
has text: doesnt this code work? where is the problem?

http://stackoverflow.com/comment/90429912
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/42724593
has text: This works, however the browser will not cache it... Do u know how to cache it?
score: 0

http://stackoverflow.com/q/27087499
has answer: http://stackoverflow.com/a/27087587
tagged with: angularjs
type: Question
tagged with: twitter-bootstrap
tagged with: css
has answer: http://stackoverflow.com/a/27087525
has comment: http://stackoverflow.com/comment/42683740
score: 0
answer count: 3
has title: How to close modal with a "Cancel" button with angular js and Bootstrap
has answer: http://stackoverflow.com/a/27087619
tagged with: javascript
has body: I want to close the modal with the "Cancel" button open the modal , in the controller: $scope.newTransaction = function(){ var modalInstance = $modal.open({ templateUrl: 'tpl/transactions/modal/new_transaction.html' }); }; the modal : New Transaction Cancel Create thanks for the help!
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27087525
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27087587

http://stackoverflow.com/q/27077890
has answer: http://stackoverflow.com/a/27078080
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27078164
has title: How to get the buttons to work correctly
has body: I am trying to get the buttons to keep track of how many tickets are being sold and stop the loop when it hits a certain number. So far my buttons don't work at all (they show up but nothing happens when you click them) and I don't know why (first time trying to use buttons so I am probably forgetting something basic). Is there a simplier way of doing this? Be aware that the maxium amount of ticket that can be purchased in one transaction is 10! Please press the button with the type of ticket you wish to purchase to start ordering your tickets now. Toddler Ticket Junior Ticket Adult Ticket
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27078080
tagged with: javascript
has answer: http://stackoverflow.com/a/27078164
score: 0

http://stackoverflow.com/comment/42555669
comment on: http://stackoverflow.com/q/27014796
score: 0
type: Comment
has text: I am looking for a more functional way, like loading the js once the editor macro is loaded, since it is part of the macro functionality. Any ideas?
type: QuestionComment

http://stackoverflow.com/q/27106804
answer count: 1
tagged with: javascript
has title: Adding flow type-checking to grunt server development workflow
tagged with: flowtype
score: 0
has answer: http://stackoverflow.com/a/27197062
type: Question
type: AnsweredQuestion
has body: I have added grunt-flow-type-check to my Gruntfile.js and it is working within watch. How can I add a task to strip the flow-type-annotations out of the code sent to the browser? flow server seems to do this automatically, but I would like to be using the flow checking within my existing grunt-server based development workflow. Also, how can I also add custom interface files to be referenced by grunt-flow-type-check and not have to include declarations in my actual code?
tagged with: gruntjs
accepted answer: http://stackoverflow.com/a/27197062

http://stackoverflow.com/q/27024129
tagged with: angularjs
type: AnsweredQuestion
has title: Get Dynamic HTML/JQuery to work with AngularJS
accepted answer: http://stackoverflow.com/a/27024256
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have a web page that uses a directive called custom-html which loads a HTML web url into the page (allowing for sub-templates etc). I have this system configured so that it registers properly with $scope but I seem to be having issues to get JQuery listeners to work with it. For instance I have the following at the bottom of one of my templates (where the custom-html tag is used above this point) $(function() { $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' }); }); The datepicker never works in the sub-templates I am including via the custom-html directive though. Does anyone have an idea on how I can remedy this? Below is the directive I am using: backendApp.directive('customHtml', function($compile, $http){ return { link: function($scope, element, attrs) { $http.get(attrs['url']).then(function (result) { element.html(result.data); element.replaceWith($compile(element.contents())($scope)); }); } } }); Using JQuery 1.11.1 and AngularJS 1.2.22 at the moment. Thanks. EDIT: My apologies, let me clarify the issue that I am having is that when i click on the .datepicker fields that are being inserted via the custom-html directive that it's not working. E.g. it's not opening up the JQuery datepicker as it should be when I click on the input field. When I do this with the regular HTML (not the custom-html) it works just fine.
score: 0
has answer: http://stackoverflow.com/a/27024256

http://stackoverflow.com/q/27091888
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27092154
has comment: http://stackoverflow.com/comment/42690595
score: 4
has comment: http://stackoverflow.com/comment/42691525
has title: Get array of all objects in a Javascript file
answer count: 1
has body: I was playing around with some Javascript code, when I stumbled upon a question: Is there any way to find the amount of objects in any javascript file, and print them out of a function? I haven't found anything on the internet which suggests an answer to this, and I doubt that this is possible, but if anyone has an idea, I would be interested to see it. Code example if that didn't make sense: var str = "Hello World!"; var num = 3.14; var obj = {}; function printOutObjects() { var objs = []; // Find objects in script... console.log(objs); }
tagged with: object
has comment: http://stackoverflow.com/comment/42690453
accepted answer: http://stackoverflow.com/a/27092154
has comment: http://stackoverflow.com/comment/42691542
has comment: http://stackoverflow.com/comment/42690212
tagged with: javascript
has comment: http://stackoverflow.com/comment/42690243
has comment: http://stackoverflow.com/comment/42690241
has comment: http://stackoverflow.com/comment/42690485
upvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42690234
downvote count: 0

http://stackoverflow.com/a/27085389
has comment: http://stackoverflow.com/comment/42685702
score: 0
answers question: http://stackoverflow.com/q/27084532
type: Answer
has comment: http://stackoverflow.com/comment/42685557
has body: You'll want to calculate the mean and median based on your data, instead of your scale: ymean = d3.mean(inputData, function(d) { return d.xVal; }); xmean = d3.mean(inputData, function(d) { return d.yVal; }); These are generic accessor functions, if you need specific guidance on the accessor function (the function(d) { return d.xVal; } part), you'll need to provide the format of your input dataset

http://stackoverflow.com/comment/42627826
type: Comment
comment on: http://stackoverflow.com/a/27055240
has text: Yes I think logic will remain same you just need to add new page for search result
score: 0
type: AnswerComment

http://stackoverflow.com/q/27076474
type: Question
downvote count: 0
tagged with: javascript
has title: javascript submit form from function
has answer: http://stackoverflow.com/a/27076516
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/27077763
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/27078176
score: 1
has body: I have this code: var changedate = document.getElementById("date"); changedate.onchange = submitform; function submitform() { document.forms["form"].submit(); } However I have 3 submit buttons in my form, I want to call the submit button with ID 'save' with this function. How, can I do this, because at the moment when I change the value in 'date' the form gets submitted, but not in the way i manually push the submit button 'save' at the bottom of the form.

http://stackoverflow.com/comment/42721484
comment on: http://stackoverflow.com/a/27108699
score: 0
type: AnswerComment
has text: Try this : $('select[name*="myselect"]')
type: Comment

http://stackoverflow.com/comment/42526001
score: 1
has text: Your objects have an `u` in them that makes the whole thing invalid. You need to remove that.
comment on: http://stackoverflow.com/q/26997727
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42718823
type: QuestionComment
comment on: http://stackoverflow.com/q/27107899
has text: Hum. What? :p So what to do ? Divide by 10 (not multiply by 0.1 ?)
score: 0
type: Comment

http://stackoverflow.com/q/27151701
has comment: http://stackoverflow.com/comment/42803578
has answer: http://stackoverflow.com/a/27155181
has body: I have a standard JQM page with a ListView with auto generated dividers. I'd like to be able to add some functionality that would allow the user to swipe left OR right on an item within the listview and it done either of the following; Reveal a star icon and create some info in localstorage. On swiping a second time change the icon to a 'hollow' star and remove the value in localstorage Reveal a 'hollow' star icon which when clicked on creates a value in locastorage and the icon is replaced with a 'filled' star. Likewise, if the star is pressed a second time, the localstorage value is removed and the icon reverts to a 'hollow' star I'm sure I've seen info on a similar topic elsewhere but can't seem to find it today. Where can I start?
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42802104
score: 1
accepted answer: http://stackoverflow.com/a/27155181
has comment: http://stackoverflow.com/comment/42801153
has comment: http://stackoverflow.com/comment/42803943
type: Question
has comment: http://stackoverflow.com/comment/42802176
has comment: http://stackoverflow.com/comment/42799796
has comment: http://stackoverflow.com/comment/59849880
has comment: http://stackoverflow.com/comment/42801415
downvote count: 0
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery Mobile Listview Swipe Menu
favorite count: 0
tagged with: listview

http://stackoverflow.com/comment/42612437
type: AnswerComment
comment on: http://stackoverflow.com/a/27046997
score: 0
type: Comment
has text: I had actually tried that, and it's still not working. Am I missing something in my edit? @enzey

http://stackoverflow.com/q/27033440
has title: how to get more label with php
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27033632
accepted answer: http://stackoverflow.com/a/27033632
has body: I'm trying to draw multiple series into flotchart. I'm successfully getting 1 label, but I'm stuck to get more labels with PHP and encode to json. $connection = mysql_connect($server,$user,$password); $db = mysql_select_db($database,$connection); $query = "SELECT SC,SR FROM high"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $int = $row['SR']; $join = intval($int); $int2 = $row['SC']; $join2 = intval($int2); $dataset1[] = array($join2,$join); } $final = json_encode($dataset1); echo $final; RESULT [[1,3],[2,20],[3,30],[4,10],[5,4],[6,40],[7,67],[8,100],[9,5],[10,11]] Parse JSON to Javascript $.ajax({ dataType:'json', /*to avoid calling JSON.parse(data) in your callback function*/ url: 'chart-data.php', success: function (data) { console.log(data);//as mentioned in comments //1.either call plot again /*calling plot as seen in your code - start*/ var d1 = data;/* JSON.parse(data) */ $.plot($("#placeholder"), [{ label: "SCR", data: d1, }, /*{ label: "SCR", data: d1, },*/ ], FOKUS ON {label: "SCR",data: d1,}, Question: How to parse JSON data to JS like : [ { label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] }, { label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ] I'm just trying to use array: $s= array('label'=&gt; "aaaa", 'data'=&gt; $final); print_r($s); and get result Array ( [label] =&gt; aaaa [data] =&gt; [[1,3],[2,20],[3,30],[4,10],[5,4],[6,40],[7,67],[8,100],[9,5],[10,11]] )
tagged with: php
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/q/27092855
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42996387
answer count: 1
tagged with: cordova
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42921741
has title: phonertc demo app only displays local video in firefox
has body: When using the demo app between ios and desktop browser, only the local video is displayed on each side. Video and audio work fine for ios to ios connections. Used the latest Cordova to build ios and browser platforms. Tested on ios 8.1 and firefox 33.1. Appreciate advice on how to troubleshoot. Thanks.
has answer: http://stackoverflow.com/a/28401647
type: Question
tagged with: phonertc
tagged with: ios

http://stackoverflow.com/comment/42783446
type: Comment
has text: i really understand what ur question is. do u want to save active class names like 'switch-female' or the complete span tag to cookies ? if yes can i know why u want that ?
type: QuestionComment
comment on: http://stackoverflow.com/q/27143240
score: 0

http://stackoverflow.com/a/27064332
has body: I have a answer.. on this question: Multiple markers and infowindows on Google Maps (using MySQL) var lis_marker = new Array(); for (i = 0; i &lt; locationObj.length; i++) { var hItem = locationObj[i]; lis_marker[i] = new google.maps.Marker({ map: map, position: new google.maps.LatLng(hItem["Lat"],hItem["Lng"]), title: 'Marker'; }); } In this code you can see var data = markers[i]; ... so markers[i] in your data is array of json var hItem = locationObj[i]; var marker = new google.maps.Marker({ title: 'marker ', animation: google.maps.Animation.DROP, position: new google.maps.LatLng(hItem["Lat"],hItem["Lng"]) }); try this I hope it help Or If you don't want use array to save array marker... you can try this code for (i = 0; i &lt; locationObj.length; i++) { var hItem = locationObj[i]; (function(hItem){ lis_marker = new google.maps.Marker({ map: map, position: new google.maps.LatLng(hItem["Lat"],hItem["Lng"]), title: 'Marker'; }); })(hItem); } jQuery allowed thread..
score: 0
answers question: http://stackoverflow.com/q/27051250
type: Answer

http://stackoverflow.com/a/27075459
has body: There are multiple mistakes in your code. It's no use to fix just one of them. You did not use var to declare your local variables. This a big mistake you must never make. You use global variables (like $nCurrentActive, $nav, scrolling) to stave state. Don't do that. Yes I know it's convenient. Just don't. You use $ to prefix variables that do not contain a jQuery object ($inview, $link). Don't do that. You compare the result of a jQuery call to null. This is useless, since a jQuery call never results in null. You call substr() on a function result without checking that that function actually returned something ($(...).attr("id").substr(...)). That's the source of the error you see. Better: $(window).scroll(function() { var sectionId, sectionLinkId, navId; sectionId = $('section:in-viewport header').parent().attr('id'); if (!sectionId) return; sectionLinkId = $('a[hash=#' + sectionId + ']').parent().attr('id'); if (!sectionLinkId) return; navId = sectionLinkId.substr(4); offMenu(navId); $("*[id^=nav]").removeClass("active").filter("#nav+" + navId).addClass("active"); onScrollMenu(navId); }); Other notes: You don't seem to use good variable names. Think harder if a variable name actually reflects what the variable contains. Work with CSS classes ($(".navLink")) is way better than $("*[id^=nav]")). You don't need and should not use a global variable like $nCurrentActive. Use $(".navLink.active"), that's what classes are for. Why all this complex fumbling with IDs and part of IDs? Wouldn't it be better if your HTML structure was such that you could simply do $('section:in-viewport a.primarySectionLink') to select the primary section link? One way to avoid multiple levels of nested if statements is to return early when it's clear that the function's preconditions are not met (like seen above). You should not have to call offMenu() and onScrollMenu(). Let the menu handle the Window scroll event on its own. Why would you want to establish a dependency between these two fu…
answers question: http://stackoverflow.com/q/27074982
type: Answer
score: 1
upvote count: 1
downvote count: 0

validation
tags question: http://stackoverflow.com/q/27073921
tags question: http://stackoverflow.com/q/27002150
tags question: http://stackoverflow.com/q/27048482
tags question: http://stackoverflow.com/q/26996322
tags question: http://stackoverflow.com/q/27036392
tags question: http://stackoverflow.com/q/27055321
tags question: http://stackoverflow.com/q/27036837
tags question: http://stackoverflow.com/q/27007709
tags question: http://stackoverflow.com/q/27011984
tags question: http://stackoverflow.com/q/27125376
tags question: http://stackoverflow.com/q/27006782
tags question: http://stackoverflow.com/q/27120248
tags question: http://stackoverflow.com/q/27092934
tags question: http://stackoverflow.com/q/26998945
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/27145478
tags question: http://stackoverflow.com/q/27078255
tags question: http://stackoverflow.com/q/27150917
tags question: http://stackoverflow.com/q/27054951
tags question: http://stackoverflow.com/q/27038791
tags question: http://stackoverflow.com/q/27021844
tags question: http://stackoverflow.com/q/27147375
tags question: http://stackoverflow.com/q/27141404
tags question: http://stackoverflow.com/q/27149007
tags question: http://stackoverflow.com/q/27146261
tags question: http://stackoverflow.com/q/27123359
tags question: http://stackoverflow.com/q/27025346
tags question: http://stackoverflow.com/q/27149332
tags question: http://stackoverflow.com/q/27007147
tags question: http://stackoverflow.com/q/27014155
tags question: http://stackoverflow.com/q/27040302
tags question: http://stackoverflow.com/q/27021801
tags question: http://stackoverflow.com/q/27095413
tags question: http://stackoverflow.com/q/27128885
tags question: http://stackoverflow.com/q/27055105
tags question: http://stackoverflow.com/q/27041348
tags question: http://stackoverflow.com/q/27121150

http://stackoverflow.com/comment/42617633
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27049850
has text: Actually yeah just a thought... The date object doesn't update itself in real-time. You have to re-make a new date object every time you expect a different value. There are multiple ways to offset the result.

http://stackoverflow.com/comment/42711406
has text: I meant something like this: http://jsfiddle.net/zvgnq84v/2/ - I'm not sure why do you need absolute position of the tag..? Anyway, each object in Highcharts has `getBBox()` method which returns bounding box of the element.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27062404

http://stackoverflow.com/comment/42558837
type: QuestionComment
has text: possible duplicate of [Retrieve only specific keys from collection](http://stackoverflow.com/questions/26685610/retrieve-only-specific-keys-from-collection)
comment on: http://stackoverflow.com/q/27012726
score: 0
type: Comment

http://stackoverflow.com/comment/42615821
has text: If you mean ctrl+c and then "ember server", yes. I've restarted it multiple times. I even hopped in the jQuery IRC to get support and nobody seemed to know anything about it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27030245
type: AnswerComment

http://stackoverflow.com/comment/42647816
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27054060
score: 0
has text: Yes, suppose you have the graphs sitting inside a `g` element, you will need to use a selector that selects that element, clears everything (or the graphs at least) inside it, and then redraw the graph in that element.

http://stackoverflow.com/q/26994531
has body: I am trying to figure out how I could place a select inside a button so that I could use the select to select stuff, but the button outside the select would do other stuff onclick. This entire white area is button and the select can be seen inside it. I would like to use all the white area as a button and if select is clicked the select would open. Right now button onclick is triggered if I click select. Can I create something using jQuery to detect if select is clicked and else button click is triggered? Button Monday Tuesday Wednesday
favorite count: 0
has answer: http://stackoverflow.com/a/26994746
has answer: http://stackoverflow.com/a/26994659
upvote count: 6
has answer: http://stackoverflow.com/a/26994845
answer count: 4
has title: How to use a Select inside a button?
possible better answer: http://stackoverflow.com/a/26994845
accepted answer: http://stackoverflow.com/a/26994659
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: dom-events
score: 6
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: events
has answer: http://stackoverflow.com/a/26994599

http://stackoverflow.com/comment/42617935
type: Comment
comment on: http://stackoverflow.com/q/27045483
score: 0
type: QuestionComment
has text: Calling .set() does persist the changes to Firebase in the 0.4 version. I ran the same code and I was able to persist to Firebase. What are you using as your userData variable?

http://stackoverflow.com/q/27048875
tagged with: angularjs
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27049587
has body: inside angularjs controller I have some dummy data $scope.someData = { "A": "AAAA", "B": "BBBB", "C": "CCCC" }; from my view (which is bounded to the route which calls above controller) &lt;li class="animate-repeat" ng-repeat="data in someData"&gt; {{data.A}} | {{data.B}} | {{data.C}} &lt;/li&gt; I'm getting rendered view | | | | | | | | | but when I look with batarang chrome extension I am able to see this scope data trough this plugin Models for (4) { data: AAAA } Models for (5) { data: BBBB } Models for (6) { data: CCCC }
type: AnsweredQuestion
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/27049616
has answer: http://stackoverflow.com/a/27049587
has title: simple rendering angularjs scope data in the view
possible better answer: http://stackoverflow.com/a/27049616

http://stackoverflow.com/a/27032955
has comment: http://stackoverflow.com/comment/42587390
has comment: http://stackoverflow.com/comment/42592925
has comment: http://stackoverflow.com/comment/42587354
downvote count: 0
answers question: http://stackoverflow.com/q/27032845
has comment: http://stackoverflow.com/comment/42588338
has comment: http://stackoverflow.com/comment/42588282
has body: I see... You added 7 elms to "portfolio_thumb". Just do: $(".portfolio_thumbImg_holder img[src='']").hide(); If you want to hide div (parent) Just do: $(".portfolio_thumbImg_holder img[src='']").parent().hide(); Try this example: http://jsfiddle.net/duongtuanluc/2ktwa75e/ I saw you change the question. If tag img has no attribute src Just do: $(".portfolio_thumbImg_holder img:not([src])").parent().hide(); Try this example http://jsfiddle.net/duongtuanluc/2ktwa75e/
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42587582
score: 2
has comment: http://stackoverflow.com/comment/42587434

http://stackoverflow.com/comment/42823642
score: 0
has text: Could you put your own code in a JSFiddle page? That would make it easier for everyone to understand what you are trying to do.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27151907

http://stackoverflow.com/comment/42550050
type: Comment
type: QuestionComment
has text: aman Baloch, i update now my question. maybe its my question not very clear.
comment on: http://stackoverflow.com/q/26995953
score: 0

http://stackoverflow.com/comment/42663795
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27062195
has text: go to yandex guys with your feature request :) I can't to implement it in their API

http://stackoverflow.com/comment/42739378
comment on: http://stackoverflow.com/q/27118491
has text: `pointer-events: none` will work in your case but you will not be able to click the inner elements. [Fiddle](http://jsfiddle.net/vfsLung8/)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27009088
accepted answer: http://stackoverflow.com/a/27009534
answer count: 1
has body: I often find myself doing something like this in my jsx: myObject= {key1 : 'value1', key2 : 'value2'}; var reactElement = &lt;MyReactElement key1={myObject.key1} key2={myObject.key2}/&gt;; Is any infrastructure provided to allow me to pass all the key value pairs in my object, as props to an element? I'm aware I can pass in the entire object, but it doesn't feel maximally elegant, especially if it's the only thing I'm passing, since I then have to refer to this.props.myObject.key1.
has title: React.js pass object key-value pairs as props
tagged with: javascript
score: 11
tagged with: reactjs
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27009534
favorite count: 0
type: Question
upvote count: 11

http://stackoverflow.com/comment/42611153
type: AnswerComment
comment on: http://stackoverflow.com/a/27046248
has text: @Jeff `transform` is his own function. I don't care how he transforms it, just that the cell is initially hidden, and that he does the transform *after* the DOM is ready, and then changes the cell contents and shows it.
type: Comment
score: 0

http://stackoverflow.com/a/27035743
accepted answer of: http://stackoverflow.com/q/27035593
score: 0
answers question: http://stackoverflow.com/q/27035593
type: AcceptedAnswer
type: Answer
has body: That works if(s &lt; line.getAttribute(a)){ for (var i = line.getAttribute(a); i &gt; s;i-- ){ //changes here line.setAttribute(a, i); } }; http://jsfiddle.net/4xnpn3wj/

http://stackoverflow.com/comment/42555428
score: 0
comment on: http://stackoverflow.com/q/27012441
has text: I have tested and it work properly. In your css try search for `.AnyTime-pkr .AnyTime-mon-btn` and see if it have `float: left;`
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27233060
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27108979
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27108979
has body: As Matt commented, this is a Bootstrap bug in 3.3.1.

http://stackoverflow.com/comment/42589325
has text: could you please share jsfiddle link with your problem statement
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27034240

http://stackoverflow.com/comment/42618716
comment on: http://stackoverflow.com/a/27050600
has text: Is it possible without hard coding?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27018813
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42562281
has comment: http://stackoverflow.com/comment/42562678
has comment: http://stackoverflow.com/comment/42562342
type: Answer
score: 4
answers question: http://stackoverflow.com/q/27018768
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27018768
upvote count: 5
has body: Use $(this) to refer to the clicked element: $("div").click(function() { // first change all to default color $("div").css('background-color', 'green') // then change the clicked div to blue $(this).css('background-color','blue'); }); Apple 1 Apple 2 Apple 2 Further reading: JQuery's this: demystified - by Remy Sharp

http://stackoverflow.com/q/27045839
has title: javascript array methods? functions?
downvote count: 0
has comment: http://stackoverflow.com/comment/42611177
favorite count: 0
has comment: http://stackoverflow.com/comment/42610279
type: UnansweredQuestion
answer count: 0
score: 1
upvote count: 1
has body: In my code I have a simple : var myArray = []; When I look at this in Firebug script debugging, I see a bunch of methods or functions : myArray [] add function() clear function() clone function() contains function() copy function() count function() . . . But what exactly ARE these? They are not defined anywhere that I can find and they don't match up at all with w3schools http://www.w3schools.com/jsref/jsref_obj_array.asp So where did they come from?
type: Question
tagged with: javascript

http://stackoverflow.com/a/27033267
accepted answer of: http://stackoverflow.com/q/27033246
type: Answer
has comment: http://stackoverflow.com/comment/42588403
has comment: http://stackoverflow.com/comment/42587965
score: 5
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/42588439
has comment: http://stackoverflow.com/comment/42587909
answers question: http://stackoverflow.com/q/27033246
type: AcceptedAnswer
has body: It is equivalent to new Date().getTime(), number of milliseconds since epoch.

http://stackoverflow.com/comment/42587833
type: Comment
comment on: http://stackoverflow.com/q/27026587
type: QuestionComment
score: 0
has text: yes I need to load local json file for my mocha test

http://stackoverflow.com/q/27045636
score: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27045787
type: Question
has body: Here is a Plunker: http://plnkr.co/edit/F6QM4KUU8DPNq6muInGS?p=preview Including an html file with ng-include, having set the ng-controller in the same tag, doesn't update the controller's scope models. Using the ng-model directly inside of the html works perfectly fine, and also setting the controller inside of the included html file is working. But ng-include together with ng-controller $scope.models don't update and stay as they are. For whatever reason if you set the model inside of the controller, it is done suring it's loading. But having a method setting the model (not included in the plunker) only changes the mdoel inside of the controller's scope and not the html one. Also if I use an ng-include in the scope of another controller and want to access the included models return undefined or the value you set the model to. Calling methods from the included html works fine in both cases, but they can't really operate as the values are wrong. I saw that a similar issue has already been postet and should have been resolved (https://github.com/angular/angular.js/issues/4431), but as you can see in the plunker for me it doesn't. Do I miss something, or is this a problem of angular? Kind Regards, BH16 PS: Here is the code from the Plunker: index.html - body &lt;body ng:controller="MainCtrl"&gt; &lt;input type="text" ng:model="input"&gt;{{input}} {{getInput()}} &lt;div ng:include="'main2.html'" ng:controller="Main2Ctrl"&gt;&lt;/div&gt; &lt;/body&gt; main2.html &lt;div&gt; &lt;input type="text" ng:model="input2"&gt;{{input2}} {{getInput2()}} &lt;/div&gt; script.js angular.module('testApp', []) .controller('Main2Ctrl', function($scope) { $scope.input2 = 1234; $scope.getInput2 = function() { console.log("input2"); return $scope.input2; }; }) .controller('MainCtrl', function($scope) { $scope.input = 1234; $scope.getInput = function() { console.log("input"); return $scope.input; } });
has title: Scope of ngController doesn't update with ngInclude
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27076907

http://stackoverflow.com/comment/42562204
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27018694
has text: Is this for a LIVE site or just for learning purposes? If it's for a LIVE site, don't use MD5.
score: 0

http://stackoverflow.com/comment/42801271
type: Comment
has text: Thank for your reply, that is weird! but worked a treat thank you
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27147804

http://stackoverflow.com/comment/42522716
has text: @rojo : My point is after getting the response to client, what should i do with it, so that it will open a download prompt "save as link" or simply download the file to the default location in the local sysytem?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26995243

http://stackoverflow.com/comment/42671271
comment on: http://stackoverflow.com/a/27080434
has text: FWIW the calculation first starts to go awry at `n * n`. In Java, `295120061 * 295120061` correctly results in `-389577847`. In JavaScript, even with [forced integers](http://stackoverflow.com/questions/3428136/javascript-integer-math-incorrect-results), `(295120061 * 295120061) | 0` incorrectly results in `-389577840`. It compounds from there, with other similar added inaccuracies.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27094278
has comment: http://stackoverflow.com/comment/42694887
accepted answer: http://stackoverflow.com/a/27094667
has comment: http://stackoverflow.com/comment/42694550
has title: Search Engine in AngularJS
has comment: http://stackoverflow.com/comment/42694534
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42694483
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27094667
type: AnsweredQuestion
has body: i make straight search engine. Get data from Google Api. My first view is home page and here is only form search and list results. My two view contain player. My route provider: $routeProvider. when('/home', { templateUrl: 'view/home.html', controller: 'ZippyListCtrl' }). when('/mp3/:wwwId/:zippyId', { templateUrl: 'view/mp3.html', controller: 'Mp3DetailCtrl' }). otherwise({ redirectTo: '/home' }); }]) My controllers: zippycatControllers.controller('ZippyListCtrl', ['$scope', '$http', function($scope, $http) { $scope.dane = {}; $scope.ladowanie = 0; var url = "http://ajax.googleapis.com/ajax/services/search/web?callback=JSON_CALLBACK"; $scope.search = function() { if ($scope.dane) { $scope.ladowanie = 1; $http({ url: url, params: {q: $scope.dane.q, "start": 0, v: "1.0", rsz: "large", "pws": 0}, method: 'JSONP' }).success(function (responseData) { //console.log(responseData); $scope.ladowanie = 0; $scope.message = responseData; }) } }}]); and: zippycatControllers.controller('Mp3DetailCtrl', ['$scope', '$routeParams', '$sce', function($scope, $routeParams, $sce) { $scope.player = $sce.trustAsHtml( 'code player');}]); My question is: how search on two view?
has comment: http://stackoverflow.com/comment/42694656
type: Question

http://stackoverflow.com/q/27151696
tagged with: controller
has title: Accessing $scope inside template of directive on $routeChangeSuccess
has answer: http://stackoverflow.com/a/27154605
tagged with: angularjs
type: Question
score: 0
tagged with: directive
answer count: 1
has comment: http://stackoverflow.com/comment/42801937
has body: currently i'm trying to write a breadcrumb for learning purposes in angular :) I'm waiting for the $routeChangeSuccess event and populate an array with the name crumb. This array is read with ng-repeat in the template for the breadcrumb. I also want to have access to a variable of the scope. Examples: app.directive('breadCrumb', ['$location', '$route', '$routeParams', function(location, route, routeParams) { return { link: function($scope, element, attrs) { $scope.$on('$routeChangeSuccess', function(next, current) { var loc = location.path(); if(loc.indexOf('/users') &gt;-1 &amp;&amp; loc!='/users') $scope.crumb= [{href:"/users",val:"Meine Kommilitonen"}, {href:"/users/"+current.params.id,val: current.params.id}]; }); }, template: '&lt;div ng-bind="test"&gt;&lt;/div&gt;&lt;div style="float:left" ng-repeat="item in crumb"&gt;&lt;a href="{{item.href}}"&gt;{{item.val}}&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both"&gt;&lt;/div&gt;' } }]) this works just fine. But now i want to push a object like {href: current.params.id, val: $scope.user.userName} This value is in the controller, which loads the template for the route. if i write this like {{$route.current.scope.users.userName}} directly in the template its fine. Now how can i push this value to the array, so that it is bind to the div and will be interpreted as a value of the controller. Hopefully you can understand my issue. EDIT: I've searched for a long time now. My need is (i know that nothing else works for my purpose) that i need to compile s.th like this: '{{route.current.scope.user.userName}}' inside the directive in the linkfunction.
tagged with: javascript
type: UnansweredQuestion
tagged with: scope

http://stackoverflow.com/comment/42795698
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27150138
has text: In any case, if you or another user from another country try to use this code, he will always use the server, which is located in the same place. So it should have the same behaviour for every users. Now, maybe your client is typing a wrong email, because I don't see any tests or regex for checking the user typed a correct email. It may be a good idea to add this, if you will sell this solution to a client !
type: QuestionComment

http://stackoverflow.com/comment/42555513
type: Comment
score: 0
has text: Which country u have selected?
type: QuestionComment
comment on: http://stackoverflow.com/q/27014498

http://stackoverflow.com/comment/42796907
has text: Thanks that would be of great help!:)
type: Comment
comment on: http://stackoverflow.com/a/27151017
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42675789
type: Comment
comment on: http://stackoverflow.com/q/27082992
has text: What do you mean by `items is blank` ? `items:[]`? or items:"" ?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/64932182
has text: I am not sure this is the corect answer. The guy is asking about Material UI, a react.js library. Not about bootstrap material design.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27079292
score: 7

http://stackoverflow.com/a/27110096
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42726267
has body: Looking at the dc.js source, the clicks are handled at the chart level in an _onClick handler. So, I'd just call this explicitly. You'll need to pass in the data element you are "clicking" on: yearRingChart._onClick(yearRingChart.data()[0]); Updated example.
accepted answer of: http://stackoverflow.com/q/27108348
answers question: http://stackoverflow.com/q/27108348
type: AcceptedAnswer

http://stackoverflow.com/q/27049466
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42616692
tagged with: background-color
accepted answer: http://stackoverflow.com/a/27051945
has title: Elegant way to animate color change
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27049552
has answer: http://stackoverflow.com/a/27049552
type: Question
answer count: 2
tagged with: jquery-animate
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/27051945
has body: I have 3 tabs which should have different background and text color. I have created 3 classes in CSS with this styles (collor-pallet-1, 2, 3). I am currently doing this ugly thing which also does not work smoothly. Surely there must be a better way to do this? Thanks $("#tab1").click(function() { $(".resp-tab-content").addClass("color-pallet-1"); if ($(".resp-tab-content").hasClass("color-pallet-2")) { $(".resp-tab-content").removeClass("color-pallet-2", 500); } if ($(".resp-tab-content").hasClass("color-pallet-3")) { $(".resp-tab-content").removeClass("color-pallet-3", 500) } $(".tab-background").css("background-color", function() { return $(".resp-tab-content").css("background-color"); console.log($(".resp-tab-content").css("background-color")); }); }); $("#tab2").click(function() { $(".resp-tab-content").addClass("color-pallet-2"); if ($(".resp-tab-content").hasClass("color-pallet-1")) { $(".resp-tab-content").removeClass("color-pallet-1", 500); } if ($(".resp-tab-content").hasClass("color-pallet-3")) { $(".resp-tab-content").removeClass("color-pallet-3", 500); } $(".tab-background").css("background-color", function() { return $(".resp-tab-content").css("background-color"); console.log($(".resp-tab-content").css("background-color")); }); }); $("#tab3").click(function() { $(".resp-tab-content").addClass("color-pallet-3"); if ($(".resp-tab-content").hasClass("color-pallet-2")) { $(".resp-tab-content").removeClass("color-pallet-2", 500); } if ($(".resp-tab-content").hasClass("color-pallet-1")) { $(".resp-tab-content").removeClass("color-pallet-1", 500); } $(".tab-background").css("background-color", function() { return $(".resp-tab-content").css("background-color"); console.log($(".resp-tab-content").css("background-color")); }); });

http://stackoverflow.com/comment/42644524
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27065344
score: 0
has text: @jfriend00 Apples & Oranges my friend. There may be questions with multiple possible *solutions* but this one is based on an opinion on how errors should be handled. Replace "is it expected" with "what is best practice" (basically a synonym) and you have http://meta.stackexchange.com/questions/142353/why-is-asking-a-question-on-best-practice-a-bad-thing

http://stackoverflow.com/a/27016897
score: 1
has comment: http://stackoverflow.com/comment/69803785
has comment: http://stackoverflow.com/comment/70663488
downvote count: 1
has comment: http://stackoverflow.com/comment/42562495
answers question: http://stackoverflow.com/q/27016443
upvote count: 2
type: Answer
has body: No need to return the array, as it is passed by reference. Just shift every element by 1 to the right. The last statement just inserts the value at the correct position. var insert = function(array, rightIndex, value) { for (var i = rightIndex; array[i] &gt;= value; i--) { array[i+1] = array[i]; } array[rightIndex] = value; };

http://stackoverflow.com/a/27061156
has body: This is likely a bug in iron:router caused by IE8. I would suggest lodging an issue on their github (if there isn't already one). There's another stack overflow question which looks at Object.defineProperty in IE 8 Also the MDN page is always useful
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42645300
answers question: http://stackoverflow.com/q/27058136
upvote count: 1

http://stackoverflow.com/q/27112839
tagged with: javascript
favorite count: 0
tagged with: ajax
has title: Preload page on hover and link on click
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/27112953
accepted answer: http://stackoverflow.com/a/27112953
has body: I'm playing around with a possibility to preload a page using ajax on hover over a button and have this page available quicker on click on this button. I'm quite at the beginning and can't really find a good solution for this / might be totally wrong. Here is what I have tried, looks like a little promissing for me: document.getElementById('link').addEventListener('mouseover',function() { var r = new XMLHttpRequest(); r.open("POST", "index.php", true); r.onreadystatechange = function () { if (r.readyState != 4 || r.status != 200) return; document.getElementById('link').addEventListener('click',function() { window.location.assign('index.php'); }); }; r.send(''); }); But I don't think that does it. Can someone point me in a direction without sharing code/solutions? I'm mainly interested in how I can achieve this by myself - is ajax the right way to start? I'm looking for a javascript only solution
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/42532962
type: QuestionComment
has text: http://socket.io/ and http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern for starters
type: Comment
comment on: http://stackoverflow.com/q/27001433
score: 2

http://stackoverflow.com/a/27104783
score: 1
has body: You need to escape the HTML, i.e.: &lt;script&gt; var info=@Html(Json.toJson(data.toMap)); &lt;/script&gt;
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27101078
answers question: http://stackoverflow.com/q/27101078
type: Answer
downvote count: 0

http://stackoverflow.com/a/27141232
downvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/83740546
accepted answer of: http://stackoverflow.com/q/27141122
answers question: http://stackoverflow.com/q/27141122
upvote count: 7
has comment: http://stackoverflow.com/comment/76045854
score: 5
type: AcceptedAnswer
has body: It seems to work now. I added 'tools.CORS.on': True to conf.
has comment: http://stackoverflow.com/comment/46126630

http://stackoverflow.com/comment/42634872
comment on: http://stackoverflow.com/a/27059623
score: 0
type: AnswerComment
has text: Take a look at David's answer - firebase might be what you're looking for. I just looked up some places that use them together. Keep in mind everything is public to the user though.
type: Comment

http://stackoverflow.com/comment/56777678
type: Comment
score: 2
has text: @nick-jennings over a year later, and this had me scratching my head for over half an hour. for a tool called "browserify", this does feel like a vital piece of information, because when the docs state "run this command and just stick the output in your html, and you're done", i expect to be able to actually run my code on that page.
type: AnswerComment
comment on: http://stackoverflow.com/a/27134108

http://stackoverflow.com/a/27027936
type: Answer
answers question: http://stackoverflow.com/q/27027872
upvote count: 4
score: 4
type: AcceptedAnswer
has body: You need to stop propagation of the event to the next element. There's an event.stopPropagation that you can use in your event listeners. If you want your onclick to work on the background / parent overlay and not the popup / child div Use the d3. Here is an example: });
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27027872
has comment: http://stackoverflow.com/comment/42583736

http://stackoverflow.com/comment/42659980
type: Comment
comment on: http://stackoverflow.com/a/27073925
has text: "perhaps" !? What are they talking about ?, make pure speculation. I've done the research and the correct answer is JSONP.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42545326
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27008564
type: QuestionComment
has text: I'm no longer using it, as it didn't seem to work. Only the above code worked for me but the iframe keeps reloading every few seconds.

http://stackoverflow.com/q/27026368
tagged with: google-chrome
answer count: 1
tagged with: javascript
has body: I want my website to enable people to share their score via instant messengers. So there is this nifty feature where you can share websites in Google Chrome on Android with other people (on the screenshot it says 'Teilen'): Right now all it does is for example messages people on whatsapp the title of the webpage and its URL, so I wondered if I could somehow customize this behavior. So, is it possible? Also, is there a way to trigger this share functionality via javascript?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27026576
has title: Customize 'share' message in Google Chrome
type: Question
tagged with: android
score: 0
accepted answer: http://stackoverflow.com/a/27026576

http://stackoverflow.com/q/27001894
linked to: http://stackoverflow.com/q/39093169
has answer: http://stackoverflow.com/a/27192620
accepted answer: http://stackoverflow.com/a/27192620
type: Question
upvote count: 2
tagged with: cross-domain
tagged with: cors
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: ajax
has title: Firefox Does not allow CORS request even when the server returns the appropriate response header
favorite count: 0
score: 2
downvote count: 0
has body: My app makes an ajax request using CORS, which works in Chrome but not in Firefox. I followed the MDN CORS instructions, but it does not work. Here's an elided view of my code: var href = ... var request = new XMLHttpRequest(); request.open('GET', href, true); request.setRequestHeader("Accept", "application/json"); request.onload = ... request.onerror = ... try { request.send(); } catch (e) { console.log(e.message); } This results in a NS_ERROR_DOM_BAD_URI exception, with message "Access to restricted URI denied" and code = 1012. The server is responding with Access-Control-Allow-Origin: http://localhost:13000 which I verified when making the request in Chrome. I'd like to look at the response headers in FF, but the web developer console only shows me the GET requests for the javascript files, and I see no way to examine the headers of the ajax request and response. It would also be nice to verify the pre-flight request, which should result from setting a custom header, but I can't see how to get access to that with the debugger.
type: AnsweredQuestion

http://stackoverflow.com/a/27019252
has comment: http://stackoverflow.com/comment/42573943
has body: Get this JSON: http://json-time.appspot.com/time.json Or http://www.timeapi.org/utc/now Also you can get it from your own server if you have one. For an example of the first one (with interval): HTML: Click the button Get the time JAVASCRIPT (With JQuery): $("#gettime").click(function() { setInterval(ajaxCalltoGetTime, 1000); }); function ajaxCalltoGetTime() { $.ajax({ type: "GET", url: 'http://json-time.appspot.com/time.json', dataType: 'jsonp' }) .done(function( msg ) { $("#time").html(msg.hour + ":" + msg.minute + ":" + msg.second ); }); JSFiddler: http://jsfiddle.net/op8xdsrv/
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/42573997
score: 3
has comment: http://stackoverflow.com/comment/42574014
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27019104
answers question: http://stackoverflow.com/q/27019104

http://stackoverflow.com/q/27118542
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has body: EDIT 2: My question boils down to: what do I need to add to my API requests in order to retrieve the data that is being hidden when a track's stats are being hidden by quiet mode? Do I need to add a secret token from the owner of the tracks? EDIT: After giving this another shot this morning, the examples given on the developer page do give playback_count, but when I try it on other playlists, the tracks are not returning that attribute. Is playback_count specific to particular playlists? On quite a few of the examples, playback_count for tracks is being mentioned as an expected returned attribute, but I am not getting it while using the JavaScript API. Has this been deprecated?
answer count: 0
score: 1
has title: What is needed to access hidden attributes in quiet mode
upvote count: 1
type: Question
tagged with: javascript
tagged with: soundcloud

http://stackoverflow.com/comment/42609439
has text: Nice! This is very clever, I didn't know about .promise(). However, you still need to know the eventual height. Is there a way to do this without knowing the end height?
comment on: http://stackoverflow.com/a/27024894
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42735452
has text: Thanks for the insight. I forgot to add that I had multiple forms on the page so I used your code and added an object to track which setTimeout to cancel [code}var container = {}; var forms = $(".update-comment.approve"); forms.each(function (index){ container['timeout'+index] = 0; });[/code]
type: AnswerComment
comment on: http://stackoverflow.com/a/27083975
type: Comment
score: 1

http://stackoverflow.com/comment/42585530
comment on: http://stackoverflow.com/a/27031809
has text: @Samer Mmm what I saw in the question comments is that he already knows about z-index and he also comment that he is appending the divs with the append() method. So I think my answer fit the question
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27081052
tagged with: getscript
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/27081096
accepted answer: http://stackoverflow.com/a/27081113
upvote count: 2
type: Question
has title: Make $.getScript("") not add numbers at the end of the request
tagged with: javascript
answer count: 2
has body: I am using $.getScript() to get a script from somewhere. function fetch(url){ window.setInterval(function (){ $.getScript(url); },50000) } fetch("http://example.com/script.js"); However, when I look at the FireBug developer console, I have seen that it adds additional ?numbers. Here is the output: &lt;script async="" src="http://example.com/script.js?7330519448833367000&amp;_=1416681336440"&gt; The remote server has disabled the ? char from their htaccess. I need to use $.getScript("") to get the remote script, but how is it possible to prevent the function that adding additional ?numbers ?
has answer: http://stackoverflow.com/a/27081113
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27081096

http://stackoverflow.com/q/27139436
has title: Recursive javascript function will not return to parent call data?
possible better answer: http://stackoverflow.com/a/27139716
tagged with: fractals
has answer: http://stackoverflow.com/a/27139716
has body: I'm working on an HTML5/JS project to draw a binary fractal tree on a canvas. HTML5:: Start Javascript:: var scale = 0.5; var min_len = 1; //setup canvas var c = document.getElementById("canvas1"); var ctx = c.getContext("2d"); ctx.moveTo(250, 500); //returns length of branch function len(branch) { return Math.sqrt( Math.pow(branch.len_x, 2) + Math.pow(branch.len_y, 2) ); } //draws from start to length of branch function drawBranch(start, branch) { ctx.moveTo(start.x, start.y); ctx.lineTo(start.x + branch.len_x, start.y - branch.len_y); ctx.stroke(); } //recursively builds binary fractal tree function makeChildren(start, theta, parent) { if(len(parent) >= min_len) { drawBranch(start, parent); //linear transformation applied to parent branch which rotates and scales to produce child branch child = {len_x: ( parent.len_x * Math.cos(theta) - parent.len_y * Math.sin(theta) ) * scale, len_y: ( parent.len_x * Math.sin(theta) + parent.len_y * Math.cos(theta) ) * scale}; //recursively build left and right branches of tree makeChildren( {x: start.x + parent.len_x, y: start.y - parent.len_y}, theta, child); makeChildren( {x: start.x + parent.len_x, y: start.y - parent.len_y}, theta * (-1), child); } } function main() { //initialize tree makeChildren( {x: 250, y: 500}, Math.PI / 4, {len_x: 0, len_y: 100} ); } When I run my code it produces a left-ward facing spiral kind of structure (sorry can't post images yet). The problem is with the length check in the makeChildren function, once the if statement is not longer true i.e. when the branch is too small, the program gets caught in a recursive loop where the size remains too small. Here's the console log of the branch lengths:: [Log] 100 (tree.js, line 24) [Log] 49.99999999999999 (tree.js, line 24) [Log] 25 (tree.js, line 24) [Log] 12.5 (tree.js, line 24) [Log] 6.25 (tree.js, line 24) [Log] 3.125 (tree.js, line 24) [Log] 1.5624999999999998 (tree.js, line 24) [Log] 0.7812499999999999 (tree.js, line 24) [Log] 0.7812499999999999 (t…
has comment: http://stackoverflow.com/comment/42777064
type: AnsweredQuestion
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27139599
tagged with: http://stackoverflow.com/tag/html
tagged with: recursion
has comment: http://stackoverflow.com/comment/42777053
accepted answer: http://stackoverflow.com/a/27139599
score: 0
tagged with: javascript

http://stackoverflow.com/q/27099330
downvote count: 1
has answer: http://stackoverflow.com/a/27102065
type: Question
tagged with: c#
has title: Localization of Reverse Geocoding in Google Map API v3 in asp.net
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27102065
has body: I am working on an application in asp.net , c# and Google Map API-v3. I want to get address of a location whose latitude-longitude is given by user in CHINESE language.I am using Below given URL. https://maps.googleapis.com/maps/api/geocode/json?latlng={0},{1}&amp;language=zh-TW&amp;sensor=false I am getting result but that does not seems correct. For Ex. : Latitude=25.01482 Longitude=121.42633 Result : 242å°ç£æ–°åŒ—å¸‚æ–°èŽŠå€æ°‘å®‰è¥¿è·¯229å··7å¼„15è™Ÿ While using the client side reverse geocoding in Google map API V3, I found the following result : 242台灣新北市新莊區光明里 Please tell me what wrong I am doing. Thanks
tagged with: google-maps-api-3
score: 0
answer count: 1
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42707941
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/a/62356112
upvote count: 1
downvote count: 1
has body: I came across this issue when not using async/await on a asynchronous function (api call). Hence adding them / using the promise handlers properly cleared the error.
answers question: http://stackoverflow.com/q/27101240
type: Answer
score: 0

http://stackoverflow.com/comment/42562393
type: AnswerComment
comment on: http://stackoverflow.com/a/27018019
score: 0
type: Comment
has text: Sure it is just one line, I will send it to you on chat :) @Ramzan Zafar

http://stackoverflow.com/q/27080071
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/27080206
has answer: http://stackoverflow.com/a/27080206
tagged with: javascript
has comment: http://stackoverflow.com/comment/42669862
tagged with: string
accepted answer: http://stackoverflow.com/a/27080276
has title: error in cloned substring() function in js
score: 0
has body: I am trying to make a function in js that checks whether a substring exists in main string. For eg:- main = 111010 and substring = 011 should return false as substring does not exists in main string but my code returns true. Here is the code below. var string = "111010", substr = "011"; var found=false; outter:for(var i=0;i&lt;string.length;i++){ if(string.charAt(i)==substr.charAt(0)){ var k=i+1; inner:for(j=1;j&lt;substr.length;j++){ if(string.charAt(k++)==substr.charAt(j)){ found=true; continue inner; }else{ continue outter; } } } } if(found!=false){ console.log("y") }else{ console.log("n"); }
has answer: http://stackoverflow.com/a/27080276
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42669886
tagged with: substring

http://stackoverflow.com/a/27060070
has comment: http://stackoverflow.com/comment/42634877
has comment: http://stackoverflow.com/comment/42634834
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27060027
has comment: http://stackoverflow.com/comment/42634721
score: 3
has body: Just change this line data: JSON.stringify({ "ID": + ar + "," + "Name" + ":" + $('#tmname').val() }), To this... data: {ID: ar ,Name: $('#tmname').val() }, Or this... data: JSON.stringify({ "ID": ar, "Name": $('#tmname').val() }), On an unrelated note, Im pretty sure you also need to include the data in the function calls, to actually pass the data from the ajax call to the functions. I could be wrong though dataType: "json", success: fnsuccesscallback(data), error: fnerrorcallback(result), Or.. dataType: "json", success: function(data){ fnsuccesscallback(data)}, error: function(result){ fnerrorcallback(result)},
upvote count: 3

http://stackoverflow.com/a/33974448
answers question: http://stackoverflow.com/q/27128509
score: 1
has body: You can write the attribute backing accessors like this. You dont need to try setup attributes manually. Since it will update itself from to returning value from get function. accessors: { productName: { attribute: {}, get: function () { return this._productName; }, set: function (value) { this._productName = value; // MANUPLATE YOUR HTML IN HERE this.getElementById("#box1").innerHTML = this.productName; } }, }
upvote count: 2
has comment: http://stackoverflow.com/comment/110644181
downvote count: 1
type: Answer

http://stackoverflow.com/a/27095948
score: 0
answers question: http://stackoverflow.com/q/27095275
type: Answer
has body: According to a comment by Daniel, your problem is that you misuse a for() to count the total number of requests you want to send. This means you can apply a very simple fix to your code as follow: a.prototype.createClients = function(){ this.recursiveRequest(); }; a.prototype.recursiveRequest = function(){ var self = this; self.hrtime = process.hrtime(); if(!this.halt &amp;&amp; this.successful &lt; 10000000){ ... Your recursivity is enough to run the test any number of times. What you do is never quit, though. You have a halt variable, but it does not look like you ever set that to true. However, to test 10 million times, you want to check the number of requests you already sent. My "fix" supposes that onError() fails (is no recursive). You could also change the code to make use of the halt flag as in: a.prototype.onSuccess = function(){ var elapsed = process.hrtime(this.hrtime), ms = elapsed[0] * 1000000 + elapsed[1] / 1000 this.times.push(ms); this.successful++; if(this.successful &gt;= 10000000) { this.halt = true; } this.recursiveRequest(); } Note here that you will be pushing ms in the times buffer 10 million times. That's a big table! You may want to have a total instead and compute an average at the end: this.time += ms; // at the end: this.average_time = this.time / this.successful;

http://stackoverflow.com/comment/42674297
type: Comment
has text: Pretty sure you should be doing `new MyCreep(Game.creeps[creep]);`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27080708

http://stackoverflow.com/a/27053231
score: 0
type: Answer
has body: Here is a working example for you. All of your selectors are wrong. You have to use # as id selector and . as class selector. $(window).scroll(function() { // find the id with class 'active' and remove it $("#work-col-1-2").removeClass("visible"); // get the amount the window has scrolled var scroll = $(window).scrollTop(); // add the 'active' class to the correct id based on the scroll amount if (scroll >= 500) { $("#work-col-1-2").addClass("visible"); } }); #work-col-1-2 { position: fixed; right: 6%; top: 0; width: 25%; padding: 1%; margin: 0; display: inline-block; box-sizing: border-box; z-index: -1; visibility: hidden; } #work-col-1-2.visible { visibility: visible; } #container{height:1000px} Text here.
answers question: http://stackoverflow.com/q/27052937

http://stackoverflow.com/comment/42649680
comment on: http://stackoverflow.com/a/27067591
score: 0
type: AnswerComment
type: Comment
has text: I'm not sure what you're asking, but the larger answer is: If you just need to get values into HTML tags once, then do it on the server side. If you need values to change dynamically in the browser in response to user actions, you might need JavaScript, but otherwise just do it in Java.

http://stackoverflow.com/comment/42570545
comment on: http://stackoverflow.com/a/27023266
type: AnswerComment
score: 0
type: Comment
has text: You know id is unique indenture so you no need to use class here

http://stackoverflow.com/comment/42660168
type: AnswerComment
score: 4
type: Comment
has text: @Jordan `Infinity` is a number. It's just not a number you can do calculations with.
comment on: http://stackoverflow.com/a/27074222

http://stackoverflow.com/comment/120353816
has text: It changes value but selected value is the default one
score: 0
comment on: http://stackoverflow.com/a/27015868
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42782584
type: Comment
type: QuestionComment
has text: Who and why did vote down for this question?
comment on: http://stackoverflow.com/q/27142475
score: 0

http://stackoverflow.com/q/27126610
accepted answer: http://stackoverflow.com/a/27126695
has comment: http://stackoverflow.com/comment/42752912
has title: Scope of Javascript inside src attribute of image
has comment: http://stackoverflow.com/comment/42753158
tagged with: javascript
linked to: http://stackoverflow.com/q/1798633
tagged with: xss
tagged with: security
has comment: http://stackoverflow.com/comment/42753047
has body: I have to do an XSS-Attack for a security related university project. I want to store an image that has malicious code inside its source attribute. However, it seems to be that I don't have access to any javascript objects from the the src attribute. Here are some things I tried: &lt;img src="j&amp;#X41vascript:alert('XSS')"&gt; Throws: Reference Error alert is not defined. &lt;img src="j&amp;#X41vascript:window.alert('XSS')"&gt; Throws: Reference Error window is not defined &lt;img src="j&amp;#X41vascript:var x = new XMLHttpRequest();"&gt; Throws: Reference Error XMLHttpRequest is not defined What is the problem here, and how can I access the main window of the site and the objects I want to access? EDIT: Onerror and all the other events are filtered.
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42753187
has comment: http://stackoverflow.com/comment/42753080
has answer: http://stackoverflow.com/a/27126695
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/42582900
type: Comment
comment on: http://stackoverflow.com/q/27030308
score: 0
type: QuestionComment
has text: are you using jquery-ui?

http://stackoverflow.com/q/27088114
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42683993
downvote count: 1
type: Question
tagged with: function
has title: How to reset a text box using a function tag
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27088163
upvote count: 0
has body: I want to reset the text box ('txt') via an onclick. My virtual keyboard is set up in a table and not a form? this is the text box this is the reset Reset This is my JavaScript: function clear(){ document.getElementById("txt").value=""; }
answer count: 1
favorite count: 0

http://stackoverflow.com/q/27085139
tagged with: php
has answer: http://stackoverflow.com/a/27085212
has body: I have two forms (consisting of checkboxes) on two different PHP pages. I want to use the values submitted from the first form to disable checkboxes in the second form. page1.php: &lt;form method="POST" action="page2.php"&gt; &lt;input type="checkbox" id="1"&gt; &lt;input type="checkbox" id="2"&gt; &lt;input type="checkbox" id="3"&gt; &lt;input type="checkbox" id="4"&gt; &lt;input type="checkbox" id="5"&gt; &lt;input type="checkbox" id="6"&gt; &lt;input type="submit"&gt; &lt;/form&gt; page2.php: &lt;form method="POST" action="action.php"&gt; &lt;input type="checkbox" id="1"&gt; &lt;input type="checkbox" id="2"&gt; &lt;input type="checkbox" id="3"&gt; &lt;input type="checkbox" id="4"&gt; &lt;input type="checkbox" id="5"&gt; &lt;input type="checkbox" id="6"&gt; &lt;input type="submit"&gt; &lt;/form&gt; &lt;script&gt; if(!isset($_POST['2'])){ document.getElementById("4").disabled = true; } &lt;/script&gt; What should I use instead of this? if(!isset($_POST['2'])) I can't use jQuery due to professor limitations.
score: 2
type: AnsweredQuestion
downvote count: 2
possible better answer: http://stackoverflow.com/a/27085205
type: Question
has answer: http://stackoverflow.com/a/27085196
answer count: 8
accepted answer: http://stackoverflow.com/a/27085196
has answer: http://stackoverflow.com/a/27085246
has answer: http://stackoverflow.com/a/27085352
has title: What is the equivalent of isset($_POST['name']) in javascript?
has answer: http://stackoverflow.com/a/27085177
tagged with: javascript
upvote count: 4
has answer: http://stackoverflow.com/a/27085159
has answer: http://stackoverflow.com/a/27085205
favorite count: 0
has answer: http://stackoverflow.com/a/27085323

http://stackoverflow.com/comment/42710978
comment on: http://stackoverflow.com/a/27103539
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27061266
has comment: http://stackoverflow.com/comment/42637104
has body: The image is just an off-screen bitmap whose pixel contents you happen to have copied into the canvas. It cannot receive events because it's not present in the DOM. You need to add the click event listener to the canvas, not the image: canvas.addEventListener('click', myfunc, false); If you wish to ensure that only clicks within the region covered by the image are directed to the new page you'll need to examine the mouse click coordinates.
has comment: http://stackoverflow.com/comment/42636912
score: 0
has comment: http://stackoverflow.com/comment/42637160
type: Answer
has comment: http://stackoverflow.com/comment/42636873
has comment: http://stackoverflow.com/comment/42637146
answers question: http://stackoverflow.com/q/27061227

http://stackoverflow.com/comment/42634777
type: Comment
has text: This doesn't work. When using toggle it can be removed once. But not opened again.
type: AnswerComment
comment on: http://stackoverflow.com/a/27059305
score: 0

http://stackoverflow.com/comment/42777913
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27138517
has text: I thought user events like `click` were not allowed/ignored by browser to avoid click fraud. Am I wrong or has this recently changed?
type: Comment

http://stackoverflow.com/comment/42738259
comment on: http://stackoverflow.com/a/27117624
type: AnswerComment
score: 0
has text: Indeed! Adding `document.close()` after the write got rid of the indefinite loading state. I was only using `document.write()` to quickly test if the data was getting transferred properly or not - and ran into the above problem in the process, so just got curious. I am using `jQuery.html()` in the actual file. Thank you!
type: Comment

http://stackoverflow.com/comment/42536718
type: QuestionComment
comment on: http://stackoverflow.com/q/27003194
has text: Split the string into separate hex values, then convert each one and store in an array. I'm sure you can google to find out how to convert from hex to binary.
score: 0
type: Comment

http://stackoverflow.com/q/27059326
has answer: http://stackoverflow.com/a/27059414
type: UnansweredQuestion
score: 0
tagged with: popup
type: Question
has body: I've used bPopup.js http://dinbror.dk/blog/bPopup/ to create a pop up and it works great - for one pop up. What I really want is multiple pop ups, each one launched by a different button. I have this: But I don't know what to change in here to distinguish between "launchpopup1" and "launchpopup2" and "launchpopup3".. // Semicolon (;) to ensure closing of earlier scripting // Encapsulation // $ is assigned to jQuery ;(function($) { // DOM Ready $(function() { // Binding a click event // From jQuery v.1.7.0 use .on() instead of .bind() $('#my-button').bind('click', function(e) { // Prevents the default action to be triggered. e.preventDefault(); // Triggering bPopup when click event is fired $('#element_to_pop_up').bPopup(); }); }); })(jQuery); /*================================================================================ * @name: bPopup - if you can't get it up, use bPopup * @author: (c)Bjoern Klinggaard (twitter@bklinggaard) * @demo: http://dinbror.dk/bpopup * @version: 0.9.4.min ================================================================================*/ (function(b){b.fn.bPopup=function(z,F){function K(){a.contentContainer=b(a.contentContainer||c);switch(a.content){case "iframe":var h=b(' ");h.appendTo(a.contentContainer);r=c.outerHeight(!0);s=c.outerWidth(!0);A();h.attr("src",a.loadUrl);k(a.loadCallback);break;case "image":A();b(" ").load(function(){k(a.loadCallback);G(b(this))}).attr("src",a.loadUrl).hide().appendTo(a.contentContainer);break;default:A(),b(' ').load(a.loadUrl,a.loadData,function(){k(a.loadCallback);G(b(this))}).hide().appendTo(a.contentContainer)}}function A(){a.modal&&b(' ').css({backgroundColor:a.modalColor,position:"fixed",top:0,right:0,bottom:0,left:0,opacity:0,zIndex:a.zIndex+t}).appendTo(a.appendTo).fadeTo(a.speed,a.opacity);D();c.data("bPopup",a).data("id",e).css({left:"slideIn"==a.transition||"slideBack"==a.transition?"slideBack"==a.transition?g.scrollLeft()+u:-1*(v+s):l(!(!a.follow[0]&&m||f)),position:a.positionStyle||"absolute…
tagged with: javascript
tagged with: jquery
answer count: 1
has title: jquery pop ups - multiple pop ups

http://stackoverflow.com/comment/42776040
type: Comment
type: QuestionComment
has text: Referring to the "on hold": When writing my answer, I referred to the [Good Subjective, Bad Subjective](http://blog.stackoverflow.com/2010/09/good-subjective-bad-subjective/) blog post linked in the [What types of questions should I avoid asking?](http://stackoverflow.com/help/dont-ask) section of the Help Center. This question sounded like a good fit to me as it is something that I've actively considered when developing (and so must have the OP) and I tried to answer following the six points for _Constructive Subjective_ Qs, but please let me know why if I was wrong so I can learn. :)
score: 1
comment on: http://stackoverflow.com/q/27006934

http://stackoverflow.com/a/27037040
type: Answer
answers question: http://stackoverflow.com/q/27023280
has body: I found the solution to this. It requires specifying the window object at the start of the declaration. I believe this is a quirk of using jQM. window.addthis.toolbox('.social_icons', {}, {'url': response.url });
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27023280
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/118324298
type: AnswerComment
has text: amazing answer very useful
type: Comment
comment on: http://stackoverflow.com/a/27040476
score: 1

http://stackoverflow.com/comment/42770832
has text: Have you tried listening for the popstate event?
type: QuestionComment
comment on: http://stackoverflow.com/q/27136260
type: Comment
score: 1

http://stackoverflow.com/a/27176784
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27085555
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42996481
has body: let me just give you a brief example on how you could do it: http://jsfiddle.net/x0pv7580/ I create all needed elements... var rect1 = paper.rect(20,30,100,12).attr({fill: "orange"}); ... and push them into an array: var elements = [rect1, rect2, rect3]; .... After that, every elements gets the mouse actions: for(var i = 0; i&lt; elements.length; i++) { appendActionToElement(elements[i]); } These are the key actions: function appendElement(element) { element.mouseover(function () { //on mouseover change to color X this.attr('fill', 'green'); }); element.mouseout(function () { //on mouseout change color depending on status if(!this.active) this.attr('fill', 'orange'); else this.attr('fill', 'white'); }); element.click(function() { this.attr('fill', 'white'); //white should be your color Y this.active = true; //set it active for(var i = 0; i&lt; elements.length; i++) { if(elements[i] != this) { //very important, on click we loop through all elements elements[i].active = false; //and set them inactive and orange. elements[i].attr('fill', 'orange'); } } }); }
accepted answer of: http://stackoverflow.com/q/27085555

http://stackoverflow.com/comment/42644016
comment on: http://stackoverflow.com/q/27065112
score: 0
type: Comment
type: QuestionComment
has text: @MatthewJamesDavis LIke I said in the post, " I can inspect the page's HTML and everything is as expected and the href attribute is formed correctly. Hovering over the link reveals the URL in the bottom-left of the browser window." In other words, the `href` attribute *is* being populated exactly as I want it to be.

http://stackoverflow.com/comment/42577169
type: Comment
type: QuestionComment
has text: I tried this. but get the following error `Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.`
comment on: http://stackoverflow.com/q/27026587
score: 0

http://stackoverflow.com/comment/42770514
type: QuestionComment
score: 1
has text: Logging is generally done using the `console`. Is there something specific about your testing that would necessitate something more?
type: Comment
comment on: http://stackoverflow.com/q/27136136

http://stackoverflow.com/a/27094294
has comment: http://stackoverflow.com/comment/42694722
type: Answer
has body: In section 1: Pairing user's objectId with pic so you could find the exact user you need in section 2. e.g. {userId: pic url, ...} call Friendrequest with userId as argument: Friendrequest(userId) In section 2: If could not get any results related to currentUser and the chosen user from query then make a friend request. Sample code: var user = new Parse.User(); user.id = userId; var query = new Parse.Query("FriendRequest"); query.containedIn("fromUser", [currentUser, user]); query.containedIn("toUser", [currentUser, user]); return query.first().then(function(record) { if (!record) { requestFriend.set("fromUser", currentUser); requestFriend.set("toUser", user); requestFriend.set("status", "Request sent") return requestFriend.save().then(function() { // request success alert('A friend request has been sent: ' + requestFriend.id); location.reload(true); }); } }); Hope this would help you.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42695828
has comment: http://stackoverflow.com/comment/42695410
has comment: http://stackoverflow.com/comment/42694433
answers question: http://stackoverflow.com/q/27089385
accepted answer of: http://stackoverflow.com/q/27089385
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42694693

http://stackoverflow.com/a/27137598
accepted answer of: http://stackoverflow.com/q/27135939
answers question: http://stackoverflow.com/q/27135939
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: You define the getReqs function up at line 103. Then, down at line 287, you replace that definition with this one: def getReqs(interface_text): toReturn = dict() return toReturn So, when you call it on line 395 like this: print getReqs(data) … you're calling the second definition, so it's not surprising that you print out an empty dict.
downvote count: 0
score: 1

http://stackoverflow.com/q/27023109
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27023411
accepted answer: http://stackoverflow.com/a/27023411
has body: I'm trying to fade in the h4 tags after the divs slides into view. Also I would like to add the class "current" to each slide in view. the fiddle http://jsfiddle.net/x8euhjrt/. code Slide 1 slide 2 slide 3 slide 4 Slide 1 CSS: .slider{ width: 550px; background: #d00d00; min-height: 385px; overflow: hidden; } .slides{ width: 2750px; margin: 0; } .slide{ position:relative; display: block; float: left; width: 550px; height:400px; } .slide-1{ background:#dedede; } .slide-2{ background:#999; } .slide-3{ background:#333; } .slide-4{ background:#555; } h4{ background:#bada55; padding:15px 120px; display: inline-block; margin-top:30%; font-size:1.4em; } jQuery: $(document).ready(function(){ var width = 550; var speed = 1000; var pause = 3000; var currentSlide = 1; var $slider = $(".slider"); var $slides = $slider.find('.slides'); var $slide = $slider.find('.slide'); $slide.first().addClass('current'); //alert($slide.length); setInterval(function(){ $slides.animate({'margin-left': '-='+ width}, speed, function(){ currentSlide++; if (currentSlide === $slide.length) { currentSlide = 1; $slides.css('margin-left', 0); } }); }, pause); });
type: Question
has title: Fade in object after slide change
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27023971
has comment: http://stackoverflow.com/comment/42570792
score: 0
tagged with: css
has answer: http://stackoverflow.com/a/27023971

http://stackoverflow.com/q/27050784
answer count: 1
downvote count: 0
has title: Closure annotation for variadic function
tagged with: variadic-functions
favorite count: 0
upvote count: 2
tagged with: jsdoc
tagged with: annotations
has answer: http://stackoverflow.com/a/27072792
has body: I'm writing code to be compiled by the Google Closure Compiler in advanced compilation mode. In some places in my code I have variadic functions which I'd normally write with an empty argument list. I'd access the passed arguments by inspecting the special variable arguments inside the body. But how can I explain this to the Closure Compiler using annotations? If I don't do any parameter annotation, it complains that the function expects zero arguments. If I write an annotation @param {...*} (to mean an arbitrary number of arguments of arbitrary type), then it complains since the @param annotation must include the name of the parameter. And if I write @param {...*} arguments then it complains that the named argument does not occur in the list of arguments in the function implementation. The only way I found to make Google happy is by including a dummy name in the argument list as well, even though that is never used. That in turn might confuse readers and perhaps also some linters. So I would prefer some alternative, if one exists. /** WARNING - Function f1: called with 3 argument(s). * Function requires at least 0 argument(s) and no more than 0 argument(s). * @return {number} */ function f1() { return arguments.length; } /** WARNING - Bad type annotation. expecting a variable name in a @param tag * @param {...*} * @return {number} */ function f2() { return arguments.length; } /** WARNING - parameter arguments does not appear in f3's parameter list * @param {...*} arguments * @return {number} */ function f3() { return arguments.length; } /** WARNING - Function f4: called with 3 argument(s). * Function requires at least 0 argument(s) and no more than 0 argument(s). * @return {number} */ function f4(/* ... */) { return arguments.length; } /** This works but seems slightly confusing to me. * @param {...*} var_args * @return {number} */ function f5(var_args) { return arguments.length; } window["run"] = function() { return f1(1,2,3) + f2(1,2,3) + f3(1,2,3) + f4(1,2,3) + …
score: 2
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42619199
tagged with: google-closure-compiler
accepted answer: http://stackoverflow.com/a/27072792
tagged with: javascript

ecmascript-6
tags question: http://stackoverflow.com/q/27087080
tags question: http://stackoverflow.com/q/26999820
tags question: http://stackoverflow.com/q/27004569
tags question: http://stackoverflow.com/q/27054448
tags question: http://stackoverflow.com/q/27138311
tag name: ecmascript-6
tags question: http://stackoverflow.com/q/27006545
tags question: http://stackoverflow.com/q/27094680
type: Tag
tags question: http://stackoverflow.com/q/27016272

http://stackoverflow.com/q/27134462
has title: Javascript canvas animation. Moving, growing and fading object
type: Question
possible better answer: http://stackoverflow.com/a/27137403
tagged with: javascript
answer count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/37976405
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42767446
has body: Working on a project and cannot seem to get my animation right. I will not be showing the code because it simply doesn't work but it would be cool if someone were to give me a few pointers on how to animate a cloud of smoke moving upwards while slowly fading and increasing in size. This effect should technically repeat once the y value reaches 0 i.o.w. the cloud reaches the top of the canvas. What I need to know is how do I animate this, and which methods do I use. This is a kind of a self learning assignment. Thanks in advance.
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/37976405
has comment: http://stackoverflow.com/comment/42767760
score: 1
has answer: http://stackoverflow.com/a/27137403
upvote count: 1

http://stackoverflow.com/a/26994919
type: Answer
has body: I'm not shure why you are setting the interval again using the "intervalHandler", and don't think there is such a use. http://www.w3schools.com/jsref/met_win_setinterval.asp You should write intervalHandle=setInterval(changeImage,5000); inside onmouseout handler to make it run correctly.
accepted answer of: http://stackoverflow.com/q/26994603
score: 0
answers question: http://stackoverflow.com/q/26994603
type: AcceptedAnswer

http://stackoverflow.com/q/27124972
has comment: http://stackoverflow.com/comment/42750320
has title: Why do I get one int[] element that is 0 in controller and null is sent from ajax call?
tagged with: asp.net-mvc
has body: When a form contains no selected items, it creates me a table with one ite that is 0, how to remove it elegantly? where? JS : $(document).on('click', '#submitButton', function () { showLoader(); $.ajax({ url: "@Url.Action("Search", "Home")", cache: false, type: "POST", dataType: "html", traditional: true, data: { secteurs: $("#secteursDiffusion").val(), auditeurs: $("#auditeursDiffusion").val(), audites: $("#auditesDiffusion").val(), services: $("#servicesDiffusion").val() }, success: function (result) { $("#resultPlaceholder").html(result); } }); }); At this point, when I evaluate in console $("#secteursDiffusion").val() for instance, I can see items that were selected in $("#secteursDiffusion"), OK (result:["676"]) ! And when I evaluate $("#auditesDiffusion").val() in console, this is null (result:null), so all is OK. In the controller: public ActionResult Search(int[] secteurs, int[] auditeurs, int[] audites, int[] services) { ... } when I breakpoint in the controller, I received audites (that were evaluated in console as null) with one item that is 0, why? And how remve it elegantly? Thanks in advance EDIT: HTML Code of one input: item55 item56 item57 item58 EDIT2: with int?[] Same problem:
has comment: http://stackoverflow.com/comment/42751013
type: Question
has answer: http://stackoverflow.com/a/27125677
has comment: http://stackoverflow.com/comment/42750846
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42750182
score: 0
linked to: http://stackoverflow.com/q/6359565
has comment: http://stackoverflow.com/comment/42750360
accepted answer: http://stackoverflow.com/a/27125677
has comment: http://stackoverflow.com/comment/42750238
tagged with: asp.net-mvc-3
type: AnsweredQuestion
tagged with: c#

http://stackoverflow.com/comment/42780827
comment on: http://stackoverflow.com/q/27141777
has text: No, I can't use it on my full script. There is no php on that. So, I really need to include the Time.php to synchronize it with the server upon loading the page. Possible to combine these both above somehow?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27105553
answer count: 2
possible better answer: http://stackoverflow.com/a/27105630
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27105630
has answer: http://stackoverflow.com/a/27105692
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27105692
has title: how to create object while using ng-repeat and array in angularjs
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42714602
favorite count: 0
score: 2
downvote count: 0
type: AnsweredQuestion
has body: Hello Everyone I have face a problem to create a object with ng-repeat. when i declare the Object then the same value in filled in the text box which has same ng-model value. if i am not Declare the object then duplicacy is not occures. If i am declare the $scope.user = {}; in js file then problem is occures. please check this. Give me a solution ASAP. My Fiddle Link Please Check This http://jsfiddle.net/Ladjkp5s/1/ Here is my Html file Start: End: {{item + 1}} Name: Address: Phone: ZipCode: Here is my JS File var app = angular.module('myApp', []); app.filter('slice', function() { return function(arr, start, end) { return arr.slice(start, end); }; }); app.controller('MainController', function($scope) { $scope.items = []; $scope.user ={}; for (var i = 0; i < 5; i++) $scope.items.push(i); }); Thanks.
has comment: http://stackoverflow.com/comment/42714514
type: Question
upvote count: 2

http://stackoverflow.com/a/32377559
has body: I am Using this Code to for deeplinking. If the app is installed the app will open up.. If the app is not installed then this remains as it is.. If you wish to add any other condition for app no install then just uncomment the setTimeout code . &lt;script&gt; var deeplinking_url = scootsy://vendor/1; $(document).ready(function(){ call_me_new(deeplinking_url); }); var call_me_new = function(deeplinking_url){ if(deeplinking_url!=''){ var fallbackUrl ='http://scootsy.com/'; var iframe = document.createElement("iframe"); var nativeSchemaUrl = deeplinking_url; console.log(nativeSchemaUrl); iframe.id = "app_call_frame"; iframe.style.border = "none"; iframe.style.width = "1px"; iframe.style.height = "1px"; iframe.onload = function () { document.location = nativeSchemaUrl; }; iframe.src = nativeSchemaUrl; //iOS app schema url window.onload = function(){ document.body.appendChild(iframe); } //IF the App is not install then it will remain on the same page.If you wish to send the use to other page then uncomment the below code and send a time interval for the redirect. /* setTimeout(function(){ console.log('Iframe Removed...'); document.getElementById("app_call_frame").remove(); window.location = fallbackUrl; //fallback url },5000);*/ } }; &lt;/script&gt;
answers question: http://stackoverflow.com/q/27151806
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/71536407
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/71858690

http://stackoverflow.com/a/27051339
has body: Ok, to summarize the help from the comments: If jQuery is included, any So @Tom and @Wawy both had correct solutions. Either move the ng-view into a or move the tags into the (outside of the ng-view).
answers question: http://stackoverflow.com/q/27050158
score: 8
has comment: http://stackoverflow.com/comment/53059622
type: Answer
downvote count: 0
upvote count: 8

http://stackoverflow.com/comment/42787714
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27144550
type: Comment
has text: This question should really be addressed to the TypeScript team here: https://github.com/Microsoft/TypeScript/issues

http://stackoverflow.com/a/27110802
type: Answer
answers question: http://stackoverflow.com/q/27105754
score: 1
accepted answer of: http://stackoverflow.com/q/27105754
has body: Your json is not properly formed for Highcharts. You want an array of numbers, what you are giving it is an array of one element a string: data: ["0,0,2,0,0,1,0,0,0,0,0,0"] // an array of a single string... It's better that you fix this in your PHP code. You'll need to build a php array of ints (do not build a concatenated string) and then use json_encode. If you can't fix it in the PHP, you could do something like: data: $.parseJSON("["+result.absentData+"]") but this is somewhat ugly.
upvote count: 1
has comment: http://stackoverflow.com/comment/42742395
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27122272
has answer: http://stackoverflow.com/a/27200506
has body: I wrote the following TypeScript code: class Person { constructor(public firstname: string, public lastname:string){ } public die(){ this.lastname += " RIP"; } And this compiles to: var Person = (function() { function Person(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; } Person.prototype.die = function () { this.lastname += " RIP"; }; return Person; })(); Which of course is a valid way, but it will not work as expected in the following case: function run(delegate){ delegate(); } var person = new Person("guy", "dude"); run(person.die); alert(person.lastname); alert(lastname); The expected alerts here would be "dude RIP", and then "undefined". However, the actual result would be "dude" and "undefined RIP". This is because the this parameter works strangely in JS. A common solution to that is to use a self variable by closure, and to abandon the prototype mechanism, i.e. var Person = (function() { function Person(firstname, lastname) { var self = this; self.firstname = firstname; self.lastname = lastname; self.die = function() { self.lastname += " RIP"; } } return Person; })(); Which would work as expected. What is advantage of that specific way to compile code? Did typescript decide to leave that piece of unintuitive code?
has comment: http://stackoverflow.com/comment/42773971
has comment: http://stackoverflow.com/comment/42745491
has comment: http://stackoverflow.com/comment/42745712
has comment: http://stackoverflow.com/comment/42745349
type: Question
possible better answer: http://stackoverflow.com/a/27200506
tagged with: typescript
has answer: http://stackoverflow.com/a/71626256
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/42745623
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42745526
favorite count: 0
has answer: http://stackoverflow.com/a/27122869
has comment: http://stackoverflow.com/comment/42745485
has title: Why doesn't typescript use the 'self' trick?
score: 5
accepted answer: http://stackoverflow.com/a/27122869
has comment: http://stackoverflow.com/comment/42745538
type: AnsweredQuestion

http://stackoverflow.com/a/27135911
accepted answer of: http://stackoverflow.com/q/27135559
score: 3
upvote count: 3
type: AcceptedAnswer
type: Answer
has body: Getting the same data when repeating the same requests usually is an issue with a cache (let it be in the browser, the server or in a proxy). Several ways of avoiding cache's effect: Disable them (generally not a good idea since it causes a performance impact). Use HTTP headers that signal to the browser that the content should not be cached / that previous cached data is stale. For AJAX, use the cache: false parameter. If all of the above fails, add a bogus parameter to the URL so the browser interprets it as a request of a different resource(v.g., url: "getChat" + (new Date()).getTime())
answers question: http://stackoverflow.com/q/27135559
downvote count: 0

http://stackoverflow.com/a/27027461
type: Answer
accepted answer of: http://stackoverflow.com/q/27018049
answers question: http://stackoverflow.com/q/27018049
upvote count: 1
score: 1
type: AcceptedAnswer
has body: We've build that animation with combining Adobe Flash, jQuery and JSON. First of all you need to create timeline animation with Flash without using actionscript. Right click to your animation and select Generate Sprite Sheet. Than define your desired options on opened screen and select Data format as JSON. This step should give you png of sprite animation and JSON files like these: http://www.barlasapaydin.com/seq/loop.png http://www.barlasapaydin.com/seq/loop.json Here is a tutorial for this step: http://www.adobe.com/devnet/flash/articles/using-sprite-sheet-generator.html Afterwards place your image to html. Define sizes and sprite position from css. Play the loop animation with jQuery: var loopTimer = null; var lArr = []; var curL; var fps = 1000 / 30; $.getJSON('seq/loop.json',function(data) { $.each(data.frames,function(key,val){ lArr.push(this); }); }); curL = 0; function startLoop() { loopAni(); } function loopAni() { curL = (++curL) % lArr.length; loopTimer = setTimeout(loopAni, fps); var f = lArr[curL].frame; $('#loop')[0].style.backgroundPosition = '-'+ f.x +'px -'+ f.y +'px'; } function pauseLoop() { clearTimeout(loopTimer); } Also you can inspect nonminifed javascript from this link: http://www.barlasapaydin.com/js/sss.js
downvote count: 0

http://stackoverflow.com/q/27119029
tagged with: javascript
tagged with: jquery
has body: I have been struggling to link image and javascript (jquery) files via the src attribute in PHP files. I am linking them at the beginning of the file, before the php tags are opened. The HTML renders just fine, as do the source attributes when linked to an online picture, so I believe the issue is how I am linking my files. As far as file organization goes, I have a file called file1.php inside Indexfolder. Indexfolder is inside of Mainfolder. Mainfolder also has two folders called Imgfolder and Javascriptfolder inside of it. I am attempting to link my files like this: &lt;form method="post" name="login"&gt; &lt;fieldset&gt; &lt;script type="text/javascript" src="../Javascriptfolder/MyJS.js"&gt;&lt;/script&gt; &lt;div class="image1"&gt; &lt;img src="../Imgfolder/MyIMG.png" width=200px height=200px id="img1"&gt; &lt;/div&gt; I have been working on this for a while and can't figure out what I'm doing wrong! Thanks in advance!
score: 0
answer count: 1
has title: Linking Files (image, js) in PHP Using Src
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/27120816
has comment: http://stackoverflow.com/comment/42741598
type: Question
has comment: http://stackoverflow.com/comment/42740837

http://stackoverflow.com/comment/42586114
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27032116
type: AnswerComment
has text: i don't think it's possible to not use HTML5 these days; it's not like tags won't play if you use an html4 doctype. nothing has full html5 support, but who cares; it's not an all-or-nothing proposition.

http://stackoverflow.com/comment/42783402
comment on: http://stackoverflow.com/a/27143153
type: AnswerComment
score: 0
type: Comment
has text: No. When I scroll down and the top of my webpage hits the div, the webpage "jumps" down about 25-50 pixels. It might, however, just be Google Chrome. I'll try testing it in a different browser.

marker
tag name: marker
tags question: http://stackoverflow.com/q/27062596
type: Tag
tags question: http://stackoverflow.com/q/27029306

http://stackoverflow.com/comment/42700734
has text: Do you want to highlight the selected dates or all dates in a month?
comment on: http://stackoverflow.com/q/27096468
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42577158
comment on: http://stackoverflow.com/q/27027021
type: Comment
type: QuestionComment
has text: Non-sarcasm: please read the mass-available tutorials the internet has to offer. We can help with issues, but we're not here to teach from the ground up
score: 1

http://stackoverflow.com/comment/42626226
comment on: http://stackoverflow.com/q/27054623
score: 0
type: Comment
type: QuestionComment
has text: I am using following format now in javascript YYYY/MM/DD HH:mm and it prints 2014/11/21 08:00:00 , but java is not getting time java is printing 2014/11/21 00:00:00

knockout.js
tags question: http://stackoverflow.com/q/27143541
tags question: http://stackoverflow.com/q/27112277
tags question: http://stackoverflow.com/q/27004064
tags question: http://stackoverflow.com/q/27065112
tags question: http://stackoverflow.com/q/27134844
tags question: http://stackoverflow.com/q/27118270
tags question: http://stackoverflow.com/q/27142308
tags question: http://stackoverflow.com/q/27101941
tags question: http://stackoverflow.com/q/27079711
tags question: http://stackoverflow.com/q/27135396
tag name: knockout.js
tags question: http://stackoverflow.com/q/27041611
tags question: http://stackoverflow.com/q/27018459
tags question: http://stackoverflow.com/q/27011752
tags question: http://stackoverflow.com/q/27050400
tags question: http://stackoverflow.com/q/27137834
tags question: http://stackoverflow.com/q/27071903
tags question: http://stackoverflow.com/q/27098699
tags question: http://stackoverflow.com/q/27043896
tags question: http://stackoverflow.com/q/27144402
tags question: http://stackoverflow.com/q/27117681
tags question: http://stackoverflow.com/q/27018084
tags question: http://stackoverflow.com/q/27013560
tags question: http://stackoverflow.com/q/27021674
tags question: http://stackoverflow.com/q/27018194
type: Tag
tags question: http://stackoverflow.com/q/27095437
tags question: http://stackoverflow.com/q/27140887
tags question: http://stackoverflow.com/q/27074171
tags question: http://stackoverflow.com/q/27005822
tags question: http://stackoverflow.com/q/27147940
tags question: http://stackoverflow.com/q/27133854
tags question: http://stackoverflow.com/q/27142481
tags question: http://stackoverflow.com/q/26999227

http://stackoverflow.com/a/27059756
has body: Use jquery $('#overlay').click(function(e){ $('#radio').click(); } Import jquery, then either put this in script tags or in your js file if you have one.
has comment: http://stackoverflow.com/comment/42634938
type: Answer
answers question: http://stackoverflow.com/q/27058862
score: 0

http://stackoverflow.com/a/27025779
answers question: http://stackoverflow.com/q/27025699
has body: Grrr... I figured it out. The whole code needs to be included within this: $( document ).ready(function() { console.log( "ready!" ); }); Can anyone provide an explanation on this? Some images were not found, can that influence this?
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27025699
has comment: http://stackoverflow.com/comment/42574990

http://stackoverflow.com/a/27143089
has body: give it the id noshowmessage and this css @media (min-width:480px){ #noshowmessage{ display:none; } }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27143043

http://stackoverflow.com/comment/42580799
has text: why are you using `HTMLElement` as a variable?
type: QuestionComment
comment on: http://stackoverflow.com/q/27029002
score: 0
type: Comment

http://stackoverflow.com/a/27069622
answers question: http://stackoverflow.com/q/27069332
type: Answer
score: 1
has body: JavaScript doesn't have namespacing in the traditional sense. That's just a term used to describe organising the functions of a library in an object structure. Closures are useful because libraries often want to store state in variables without needing to expose those variables to any other code. If that data was exposed on the namespace object then it would be harder for a user of the library to tell which properties were designed to be interacted with and which were for internal use only. Consider for example: var example_namespace = (function() { var interval; var element; function start() { if (interval) { return; } if (!element) { element = document.querySelector('span'); } interval = setInterval(increment, 500); } function stop() { clearInterval(interval); interval = null; } function increment() { element.innerHTML++; } return { counter: { start: start, stop: stop } }; }()); addEventListener('load', function() { document.querySelector('#start').addEventListener('click', example_namespace.counter.start); document.querySelector('#stop').addEventListener('click', example_namespace.counter.stop); }); Count: 0 start stop Without using a closure, interval, element, and increment would all be exposed on the namespace object or globals.
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27069332
has comment: http://stackoverflow.com/comment/42653229
has comment: http://stackoverflow.com/comment/42652690
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27035015
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27035225
has comment: http://stackoverflow.com/comment/42591015
has comment: http://stackoverflow.com/comment/42590942
has title: How to select only one radio button at one time and deselect the others in javascript when the data are comes from database?
type: Question
has body: All radio buttons can be selected. But I want to give permission to the user to select only one radio button. Here is the HTML code. $jsqla = mysql_query("select * from products where id='$product_id'") or die(mysql_error()); $jfeta = mysql_fetch_assoc($jsqla); $formats = explode(";", $jfeta['formats']); &lt;div class=""&gt; &lt;?php foreach($formats as $v){ ?&gt; &lt;label style="line-height: 1.25em;display: block;width: 100px;margin-right: 10px;float: left;"&gt; &lt;div id="format-id_&lt;?php echo $v?&gt;" style="border: 1px solid;border-radius: 9px;text-align: center;padding-top: 10px;padding-bottom:10px;padding-left: 3px;padding-right: 3px;border-color: #cccccc;font-family: 'SSemibold'; font-size: 13px; color: #44b7da;"&gt; &lt;input type="radio" value="&lt;?php echo $v; ?&gt;" name="abc" style="visibility:hidden;" id="&lt;?php echo $v ?&gt;" onClick="changeColour(this)"/&gt; &lt;span style="margin:-17px auto auto 0px;display:block;"&gt;&lt;?php echo $v; ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;/label&gt; &lt;?php } ?&gt; &lt;/div&gt; Here is the JavaScript code. &lt;script type="text/javascript"&gt; function changeColour(raid) { var raid1 = raid.id; document.getElementById("format-id_"+raid1).style.backgroundColor = "#cccccc"; } &lt;/script&gt;
has answer: http://stackoverflow.com/a/27035201
accepted answer: http://stackoverflow.com/a/27035225
has answer: http://stackoverflow.com/a/27035454
has comment: http://stackoverflow.com/comment/42590841
has comment: http://stackoverflow.com/comment/42590804
linked to: http://stackoverflow.com/q/5419459
tagged with: javascript
has comment: http://stackoverflow.com/comment/42591180
possible better answer: http://stackoverflow.com/a/27035454
score: 0
has answer: http://stackoverflow.com/a/27035629
tagged with: http://stackoverflow.com/tag/html
answer count: 4

http://stackoverflow.com/comment/42627892
has text: Can you give an example of what you mean for me to have better udnerstanding ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27040053
score: 0

http://stackoverflow.com/a/44326965
answers question: http://stackoverflow.com/q/27105257
score: 61
type: Answer
upvote count: 62
has body: You can use ES6 spread on previous values in the object to avoid overwrite this.setState({ abc: { ...this.state.abc, xyz: 'new value' } });
downvote count: 1

http://stackoverflow.com/comment/42627561
comment on: http://stackoverflow.com/q/27055273
has text: I destroyed but now no result inside table... Its simply displaying processing columns inside it. Is it I need to put table headers or anything inside the html tablee?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42635302
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27059141
has text: @user1898765 Refer [this solution](http://stackoverflow.com/a/11249683/586051) for that problem. Please mark this answer as accepted if it has solved your problem.

http://stackoverflow.com/comment/42565265
type: AnswerComment
has text: So it's because `'4'.charCodeAt() < '5'.charCodeAt()`?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27020246

http://stackoverflow.com/q/27056524
tagged with: javascript
has comment: http://stackoverflow.com/comment/42628715
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I've got an idea for a simple app. It presents a number of questions that the user must answer and it will store the answers for these questions for local use. Because there's no reason for the data to be online, I'll use local storage, so the app can also work offline. I believe I should use the HTML5 local storage for that. The obvious approach is to use a dataset that I setup in Javascript, and store it's serialized copy. But since the structure of the data that I want to store is completely aligned with the structure of the HTML (DOM), I was wondering if it would make sense to store the data inside the HTML (DOM), using HTML5 data attributes. That way I spare some Javascript code for setting up and synchronizing a parallell data structure in code. My question: is there an elegant way to persist the current state of the HTML, including it's data-attributes, so that when the app is closed and started again, the previous state of the data attributes can be restored? Should I serialize the DOM in some way and store it? And what about deserialization and restoring it? Or is this whole concept bad practice? Regards, Vic PS. can Web Components (cf. Polymer) offer something in this direction? It seems to me that what I'm looking for is real semantic HTML, not?
has answer: http://stackoverflow.com/a/27056639
type: UnansweredQuestion
tagged with: local-storage
type: Question
tagged with: polymer
has title: Persist HTML5 data attributes in local storage
answer count: 1

http://stackoverflow.com/q/27020822
has title: Error: Uncaught SyntaxError: Unexpected identifier
score: -1
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/27020973
downvote count: 3
has comment: http://stackoverflow.com/comment/42566167
has comment: http://stackoverflow.com/comment/42566202
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42566422
tagged with: syntax-error
answer count: 2
possible better answer: http://stackoverflow.com/a/27021044
has body: I'm making a simple blackjack game in Javascript, but when I try to run it, it gives me that error. Specifically, Chrome tells me that the error is on this line: if y &lt;= 17 Here's all my code: var x = null; var y = null; var numsDeal = new Array(); for (i=0;i&lt;2;i++){ nDeal = Math.floor(Math.random()*(11-1)+1)+1; numsDeal[i] = nDeal; y = numsDeal[0]+numsDeal[1]; } var nums = new Array(); for (i=0;i&lt;2;i++){ n = Math.floor(Math.random()*(11-1)+1)+1; nums[i] = n; x = nums[0]+nums[1]; } function hit(){ hitC = Math.floor(Math.random()*(11-1)+1)+1; x = x + hitC; if y &lt;= 17 hitD = Math.floor(Math.random()*(11-1)+1)+1; y = y + hitD y.toString(); document.getElementById("demo2").innerHTML = y; x.toString(); document.getElementById("demo").innerHTML = x; } x.toString(); document.getElementById("demo").innerHTML = x; As you can see, y is declared. Can anyone help me? I'm sure I'm being stupid. By the way, I have searched for solutions, but I both can't understand them as I'm a beginner, and I don't think they're the same as my problem. I hope to be proven wrong.
has answer: http://stackoverflow.com/a/27021044
has answer: http://stackoverflow.com/a/27020973
has comment: http://stackoverflow.com/comment/42566274
favorite count: 0
has comment: http://stackoverflow.com/comment/42566128

http://stackoverflow.com/q/27082992
has answer: http://stackoverflow.com/a/27083783
has comment: http://stackoverflow.com/comment/42675789
accepted answer: http://stackoverflow.com/a/27083783
upvote count: 3
type: Question
type: AnsweredQuestion
score: 3
has title: How can I retain zero-length values during the $unwind phase of the aggregate pipeline in Mongo?
tagged with: javascript
tagged with: mongodb
has body: I'm writing a Mongo query using the aggregate pipeline. During the aggregation, I need to $unwind one of the fields. However, I don't want the $unwind to exclude entries that have zero-length arrays for that field, because I still need them further down the pipeline. My field is called items and it's an array of objects, which each contain two values: quantity and price. Here's a snippet of my Mongo query so far: db.MyCollection.aggregate([ {$match: ... }, {$project: ... }, // put another $project here to retain zero-length values? how to format it? {$project: { _id: "$$ROOT", items: { $ifNull: [ { $literal: { quantity: 0, price: 0 } } ] } } }, {$unwind: "$items"}, {$group: ... }, {$project: ... }, ... ]); As you can see, this already handles the case where a document doesn't have the items field present at all, in which case it adds it in and gives it an empty value to unwind on. What isn't handled, however, are documents that do already have that items field present, but it's blank. I was thinking I could use some combination of $cond and $size to check explicitly for a size of zero within another $project, and then substitute the same literal in that case, but $if expects a boolean so I'm not quite sure how to format that.
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/27021637
has title: IE 11 jumps to embedded Google map after page load
accepted answer: http://stackoverflow.com/a/28822276
upvote count: 3
has comment: http://stackoverflow.com/comment/42567764
has body: We have an embedded Google map on a site. It works like a charm in every browser incl. IE&lt;=10. On IE11, however, under unspecific circumstances, the browser jumps (scrolls) after firing the load event to the Google map, which happens to be somewhat below the "fold". ("Unspecific circumstances": Especially the homepage does not exhibit this peculiar problem, but sub-pages and pages on subdomains do reliably, although the embedding code is identical.) Searching the web brings this thread in the Google product forum, that, if nothing else, proves that it's not an exclusive problem of our site. I am searching for an idea how to debug this and finding the root cause for the jump. Perhaps anyone has already found this problem, or there is a (new) config option for embedded maps, that controls this behavior?
type: AnsweredQuestion
score: 3
tagged with: internet-explorer-11
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/42567630
has answer: http://stackoverflow.com/a/28822276
tagged with: google-maps
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/27073232
has body: This line: this.textActive = this.focused || (this.element.value.length &amp;&amp; this.element.value !== this.origValue); Is producing this error message: Uncaught TypeError: Cannot read property 'length' of null I'm not sure what's causing it, but it's creating problems. refreshClasses: function() { this.textActive = this.focused || (this.element.value.length &amp;&amp; this.element.value !== this.origValue); this.setStateClass(this.element, this.options.inputFocusClass,this.focused); this.setStateClass(this.elementParent, this.options.parentFocusClass,this.focused); this.setStateClass(this.labelFor, this.options.labelFocusClass,this.focused); this.setStateClass(this.element, this.options.inputActiveClass, this.textActive); this.setStateClass(this.elementParent, this.options.parentActiveClass, this.textActive); this.setStateClass(this.labelFor, this.options.labelActiveClass, this.textActive); }, setStateClass: function(el,cls,state) { if(!el) return; else if(state) addClass(el,cls); else removeClass(el,cls); } }
downvote count: 0
has comment: http://stackoverflow.com/comment/42993662
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/27073287
has comment: http://stackoverflow.com/comment/42658411
type: Question
has title: I'm getting an Uncaught TypeError: Cannot read property 'length' of null on jquery.main.js
tagged with: javascript
tagged with: jquery
answer count: 2
has answer: http://stackoverflow.com/a/27073244

http://stackoverflow.com/comment/42736158
score: 0
comment on: http://stackoverflow.com/q/27116862
type: Comment
type: QuestionComment
has text: don't you mean `MAX = [3.3,5.3,5.2]`?

http://stackoverflow.com/comment/42776938
comment on: http://stackoverflow.com/a/27112838
type: AnswerComment
has text: It looks like that topojson file has all the councils that you need. The code you've got above can be massively simplified. To get the array of features that you need, you use .data(topojson.feature(uk, uk.objects.layer1).features)
score: 0
type: Comment

http://stackoverflow.com/a/27062850
answers question: http://stackoverflow.com/q/27027021
has body: Another way of doing this would be with AngularJS. But maybe that's a bit more advanced. Anyway the good thing here is that you don't have to do any DOM manipulations. That's the job of Angular's two-way data binding. I did two version one with a directive and one just with a controller. The one with the controller is easier to understand. But I would prefer the directive approach. That's why I post it here. The controller variant is also working and can be found in this jsFiddle. Also one good thing of AngularJS are filters. That's why the prices are correctly displayed with the currency filter (e.g. $3.50). No additional programming required. (If you prefer jsFiddle, here is the link to the directive approach, same version as below: Directive Menu angularJS) The lines of code are very simillar to the jQuery version around 68 code lines (if you move the HTML template of the Angular directive in a separate file). "use strict"; var app = angular.module('MenuApp', []); // possible improvements: // - menues data in separate JSON file // - menu template in separate HTML template file // (use templateURL instead of template) app.directive('menu', function(){ return { scope: true, controller: function($scope) { // Initialization var menues = [{ 'name': 'pasta week', 'meals': [ {'name': 'noodles', 'price': 2.5}, {'name': 'pizza', 'price': 8.0}, {'name': 'lasagne', 'price': 5.0}] }, { 'name': 'beef week', 'meals': [ {'name': 'Club steak', 'price': 10}, {'name': 'Entrecote', 'price': 15}, {'name': 'Filet', 'price': 15}] }, { 'name': 'veggie week', 'meals': [ {'name': 'salad', 'price': 3}, {'name': 'tofu burger', 'price': 4}, {'name': 'greenstuff', 'price': 3.5}] } ]; var startWeek = 47; // week of year that start with menu 1 // Event handlers var that = this; $scope.onWeekChange = function () { that.changeMenu($scope.selectedWeek); }; this.changeMenu = function(selection) { var currentWeek = selection-1; // -1 because array start with index 0 var me…
score: 0
has comment: http://stackoverflow.com/comment/42890691
type: Answer
has comment: http://stackoverflow.com/comment/42887473
accepted answer of: http://stackoverflow.com/q/27027021
type: AcceptedAnswer

http://stackoverflow.com/q/27035690
upvote count: 4
downvote count: 0
answer count: 1
has body: I am trying to write a service which renders a given template and scope to a string. This is the code: utilModule.factory('CompilerService', ['$compile', '$templateCache', function ($compile, $templateCache) { return { renderTemplateToString: function(templateName, scope) { var template = $templateCache.get(templateName); var linkFn = $compile(template); var linkedContent = linkFn(scope); scope.$apply(); return linkedContent.html(); } } }]); When I call this however, I am getting the angular InProg err, caused by the call to $apply(): https://docs.angularjs.org/error/$rootScope/inprog I am calling $apply() in order for the variables to be substituted within the template before retrieving the html. Any ideas on how to achieve this without the InProg error?
favorite count: 0
has answer: http://stackoverflow.com/a/27035769
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27035769
type: Question
has title: How to render an AngularJS template to a String without causing InProg error?
tagged with: javascript
score: 4
tagged with: angularjs-scope

http://stackoverflow.com/comment/42695237
has text: Can you provide the full document.cookie code to set the cookie?
comment on: http://stackoverflow.com/q/27094066
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27023512
score: -3
accepted answer of: http://stackoverflow.com/q/27023314
has body: Try this ... HTML {{category.name}} JS $scope.setTab = function (activateTab) { $scope.tab = activateTab; }; $scope.categories = [{ "id": 1, "name": "Common Tools" }];
downvote count: 3
upvote count: 0
has comment: http://stackoverflow.com/comment/42589766
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42583789
type: Answer
answers question: http://stackoverflow.com/q/27023314

http://stackoverflow.com/q/27047620
favorite count: 0
possible better answer: http://stackoverflow.com/a/27050279
has answer: http://stackoverflow.com/a/27049608
upvote count: 2
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/88935801
has answer: http://stackoverflow.com/a/68913252
linked to: http://stackoverflow.com/q/14236516
score: 2
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has body: In Bootstrap 3, with jQuery is there a way to sort by the index of my carousel and add custom intervals of each slide so that I can have one slide 10000ms and another 500ms etc? I know you can set the data-interval attribute but this sets the speed for all slides as you can't add a custom interval attribute to each item. data-interval="3000" My carousel is setup like this:
accepted answer: http://stackoverflow.com/a/27049608
type: Question
linked to: http://stackoverflow.com/q/50968181
has title: Custom Carousel Intervals?
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42616419
has comment: http://stackoverflow.com/comment/42617102
answer count: 3
has answer: http://stackoverflow.com/a/27050279

http://stackoverflow.com/q/27102182
has title: multiselect dropdown sorts based on value present in option tag
has comment: http://stackoverflow.com/comment/42709566
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42711050
tagged with: drop-down-menu
tagged with: jquery
type: UnansweredQuestion
has body: I am having a multiselect dropdown whose value are populated based on iteration through for each. However the order I am sending the data is not maintained. Please suggest what should I do. Enterprise enter2 enter3 4thenterprise But if I am able to print the value directly, Its printing in my order. UPDATE: Plugin we are using is: http://wenzhixin.net.cn/p/multiple-select/docs/#multiple-select CODE: $('#secWhse').multipleSelect({ filter: true,multiple: true}); JSP code to populate select tag: ${item.value}
tagged with: multi-select
has comment: http://stackoverflow.com/comment/42709572
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42709589

http://stackoverflow.com/comment/42720636
score: 0
comment on: http://stackoverflow.com/q/27097974
type: QuestionComment
has text: i am using chrome 38 for linux, and your jsfiddle example seems to work as expected for me (unless i am misunderstanding your problem description, which is probable). edit: oh, i see the problem now.
type: Comment

http://stackoverflow.com/comment/42592982
type: QuestionComment
comment on: http://stackoverflow.com/q/27036268
score: 0
has text: JSONP does not require you to use proxy... Please tell us how much data do you need to transfer? It is important.
type: Comment

http://stackoverflow.com/a/27084871
has body: use this pattern ((#\w{6}|\/[\/\(\+\^\-]|\$\w+\||\|)*). and replace w/ $1§ Downside is your preserved pattern has to be followed by at least one character Demo ( # Capturing Group (1) ( # Capturing Group (2) # # "#" \w # &lt;ASCII letter, digit or underscore&gt; {6} # (repeated {6} times) | # OR \/ # "/" [\/\(\+\^\-] # Character Class [\/\(\+\^\-] | # OR \$ # "$" \w # &lt;ASCII letter, digit or underscore&gt; + # (one or more)(greedy) \| # "|" | # OR \| # "|" ) # End of Capturing Group (2) * # (zero or more)(greedy) ) # End of Capturing Group (1) . # Any character except line break Code copied from Regex101 var re = /((#\w{6}|\/[\/\(\+\^\-]|\$\w+\||\|)*)./gm; var str = 'This#00CC00 is green$Courier| and /^mono|spaced|\n'; var subst = '$1§'; var result = str.replace(re, subst);
score: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42678874
downvote count: 0
has comment: http://stackoverflow.com/comment/42679474
answers question: http://stackoverflow.com/q/27084450
upvote count: 3
has comment: http://stackoverflow.com/comment/42679495
accepted answer of: http://stackoverflow.com/q/27084450
type: Answer

http://stackoverflow.com/comment/42588282
type: Comment
has text: @JackDuong bro it works if each person has only 1 image to show, because i put it in a loop so after the first img, it auto hide all the rest, i tried to finish the loop first before checking but i can't seem to put it at the end. I think i have some syntax problem w my code, let me check it out first.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27032955

http://stackoverflow.com/comment/42754273
type: QuestionComment
comment on: http://stackoverflow.com/q/27123976
has text: works good here: [jsFiddle](http://jsfiddle.net/DTcHh/2183/) but i removed the elements: `<div onclick="location.href='#dialog-sign-in';"`
score: 0
type: Comment

http://stackoverflow.com/a/29146731
type: Answer
score: 0
has body: By using jQuery you can do this as shown below: Demo: https://jsfiddle.net/cxow8198/3/ Query code snippet to make capitals of the first letter of every word in the string. This could be used to prevent users from entering all caps for titles or text when they input data into forms.
answers question: http://stackoverflow.com/q/26996220

http://stackoverflow.com/q/27123911
has comment: http://stackoverflow.com/comment/42748165
tagged with: loops
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/27124126
tagged with: javascript
has body: I'm working with Json Object: var someobj = { 'key':'value', 'key':'value', 'objectkey':{'key':'value','key':'value'} } While iterating, i want the result in console.log as: KEY: key &amp;&amp; VALUE: value KEY: key &amp;&amp; VALUE: value OKEY: key &amp;&amp; OKEYVALUE: value While iterating I only get the first level, I can't seem to get it into the values that are the objects. I guess some sort of length could work: EDIT2: Now with this inner loop it iterates and I get letters for external values, the inner values get logged completely. var registration_form = { 'registration_form':{ 'Display Name':'input', 'Username':{'inpute':'text','id':'some_id'}, 'Password':'input', 'Email':'input', 'Captcha':'input' } }; function iterateNodes(data) { for (var key in data){ var obj = data[key]; for(var prop in obj){ if(obj.hasOwnProperty(prop)){ var inobj = obj[prop]; for(var prop in inobj){ console.log(inobj[prop]) } }else{ console.log(obj) } } } } iterateNodes(registration_form);
answer count: 2
has comment: http://stackoverflow.com/comment/42749125
downvote count: 0
has answer: http://stackoverflow.com/a/27124279
favorite count: 0
type: UnansweredQuestion
has title: Iterate object inside object
has comment: http://stackoverflow.com/comment/42748137
score: 2
upvote count: 2

http://stackoverflow.com/comment/42708587
comment on: http://stackoverflow.com/q/27102274
score: 0
type: QuestionComment
type: Comment
has text: [**Check this**](http://stackoverflow.com/questions/8644428/how-to-highlight-text-using-javascript), I think this will help you. Exact same requirement.

http://stackoverflow.com/q/27142686
possible better answer: http://stackoverflow.com/a/27142807
has answer: http://stackoverflow.com/a/27142807
accepted answer: http://stackoverflow.com/a/27142904
tagged with: mysql
downvote count: 1
type: Question
has body: I want to know whether I can retrieve data from database in .js file using php code written in same .js file. I have a passwordvalidation.js file. In that file, by using onblur event or onclick event, I want to compare the password values with the stored value in password. Now I have password verification code in php and I can compare passwords using that function. But I want to compare it while user entering new password in field. And I want to write ajax and php code in same .js file. But I don't know how to achieve that. Please help on this. Thank you.
answer count: 2
has comment: http://stackoverflow.com/comment/42782227
has comment: http://stackoverflow.com/comment/42782244
tagged with: javascript
has title: How to code ajax, php and js in same .js file and retrieve data from database?
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27142904
favorite count: 0
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/42782424
type: AnsweredQuestion

http://stackoverflow.com/comment/42597767
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27038836
type: Comment
has text: Thank you very much! Will try this out in css.

http://stackoverflow.com/comment/42626507
type: AnswerComment
comment on: http://stackoverflow.com/a/27054793
type: Comment
has text: try using the default <s:date> without any format. Check out this link http://www.mkyong.com/struts2/struts-2-date-tag-example/
score: 0

http://stackoverflow.com/comment/42643628
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27064933
score: 0
has text: Marvelous! Worked like a charm :) Good thinking.

http://stackoverflow.com/a/27070292
answers question: http://stackoverflow.com/q/27068106
type: AcceptedAnswer
score: 0
type: Answer
has body: Changing the partition call, to include a .sort(null) like this - var partition = d3.layout.partition() .sort(null) //&lt;-- was missing this .value(function(d) { return 1; }); Seems to have resolved the strange arc scale problems.
accepted answer of: http://stackoverflow.com/q/27068106

http://stackoverflow.com/comment/42620800
has text: @TheManiac Thanks but this doesn't prevent the default action.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27051685

character-encoding
tags question: http://stackoverflow.com/q/27101992
tags question: http://stackoverflow.com/q/27005729
tag name: character-encoding
type: Tag
tags question: http://stackoverflow.com/q/27141883

http://stackoverflow.com/comment/42726615
has text: Two words: [asynchronous execution](http://stackoverflow.com/questions/23667086/why-is-my-variable-unaltered-after-i-modify-it-inside-of-a-function-asynchron).
comment on: http://stackoverflow.com/q/27111211
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/42586402
type: Comment
has text: It's weird that it works fine if its hard coded. That means the server is giving the correct MIME type, try looking through the `src` of the image. It could be that some characters are encoded weird.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27032192

http://stackoverflow.com/a/27102736
type: Answer
answers question: http://stackoverflow.com/q/27102674
downvote count: 0
score: 1
has body: Put the name in quotes: $('input[name="id"]') or $('[name="id"]').val();
upvote count: 1

http://stackoverflow.com/comment/76542016
comment on: http://stackoverflow.com/a/27152246
type: AnswerComment
has text: Is there a way to hook all javascript functions and then just add the console.log from the callback?
type: Comment
score: 1

http://stackoverflow.com/comment/42756082
comment on: http://stackoverflow.com/a/27123321
has text: sorry to ask you again. say for example, we have created 4 tasks. every element in each task is the child of $task variable. so when we click the delete button in the 2nd task how does the button knows it has to remove the 2nd task. because all buttons have the same parent .task. $("button.delete", $task).click(function () { $task.remove(); }); when we create the 4th task, the $task will be the 4th list. so when we click on delete in 2nd task, how the button removes the 2nd task exactly?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27064957
answers question: http://stackoverflow.com/q/27064778
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42644063
has body: Following should give you JS object, so you dont have to worry about imploding and setting the $string. echo "&lt;script type='text/javascript'&gt; window.closedDays = JSON.parse('". json_encode($string) ."');&lt;/script&gt;";
has comment: http://stackoverflow.com/comment/42644561
accepted answer of: http://stackoverflow.com/q/27064778
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42526017
comment on: http://stackoverflow.com/q/26997727
has text: is that `u''` notation a Python artifact?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42710360
comment on: http://stackoverflow.com/a/27102391
type: Comment
has text: When opening the modal, it should call on an Ajax script to get the correct content, and in order to do that, I need to have some variables in PHP.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27093512
type: Question
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/42692928
has comment: http://stackoverflow.com/comment/42692975
upvote count: 3
answer count: 1
tagged with: asynchronous
favorite count: 0
tagged with: node.js
has title: calling a synchronous function (with call back) in foreach with the help of async.each
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27093868
accepted answer: http://stackoverflow.com/a/27093868
downvote count: 0
has comment: http://stackoverflow.com/comment/42692898
has body: Sorry if my question seems simple to you! I'm so new to Node and callbacks! I have an async function (with a callback) called "find", also I have a an array which is called models; so I want to synchronously call this "find" function with each model in models and append the results in resultFound: I appreciate your help! Please let me know if you need more clarification. st.find(param1, model, param2, param3, function (err, data) { if (err) { res.json(400, err); } else { res.json(200, data); } }); Here is my try (I believe having a return in st.find() is wrong; but I just mentioned my try to give you an insight of I'm trying to do!): var models = ["test1", "tes2"]; var resultFound = []; async.each(models, find, function (err, data) { resultSearch.push(data); }); function find(model) { st.find(param1, model, param2, param3, function (err, data) { return data; }); }
has comment: http://stackoverflow.com/comment/42692996

http://stackoverflow.com/q/27089740
has title: Make a long HTML select for better usability
tagged with: usability
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: In a HTML select, I've 10 optgroup and each optgroup has 30 items, so there are 300s option in a select...it is a huge list. Is it possible to use some CSS or JS library so the options under each optgroup will be displayed only when current optgroup is selected? Something like the 2 level JS menu but I am using a HTML select as the source. Is it possible?
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27090015
has comment: http://stackoverflow.com/comment/42686993
has comment: http://stackoverflow.com/comment/42686705

http://stackoverflow.com/comment/42537564
comment on: http://stackoverflow.com/q/27003998
type: Comment
has text: Where are the dvs to be displayed?
score: 0
type: QuestionComment

http://stackoverflow.com/q/26999450
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/43193845
has body: I have this. It does not work. in others collections work fine with save, but this collection (users) not have save. Kinvey.User.get('546264a54b9cb82c61003727').then( function(response) { $scope.user = response; var acl = new Kinvey.Acl($scope.user); acl.addWriter($scope.currentcontact.Contact.contact.user_id); acl.addReader($scope.currentcontact.Contact.contact.user_id); var promise = Kinvey.User.update($scope.user, { success: function() { console.log("...done"); } });
has title: How can I add ACL permissions to users?. in Kinvey
tagged with: javascript
type: Question
score: 0
tagged with: kinvey
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42530359

http://stackoverflow.com/comment/42573850
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27025129
has text: Just a tip, for the maintainability of your program it's probably better to separate the logic from your presentation.
type: Comment

http://stackoverflow.com/q/27095733
has title: Crossrider: Trigger action to open popup
favorite count: 0
tagged with: crossrider
has answer: http://stackoverflow.com/a/27107616
type: UnansweredQuestion
upvote count: 1
has body: I need some insight about the browser action that triggers the popup. Can I open a popup from one of the following scenarios? Trigger an action to open popup from a page on a website? Trigger an action to open popup from within extension scope? Is there way to do this, or the popup controlling is only possible from background scope?
type: Question
score: 1
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27107604
has comment: http://stackoverflow.com/comment/42718320
score: 0
answer count: 2
tagged with: mysql
upvote count: 1
has answer: http://stackoverflow.com/a/27108060
downvote count: 1
has comment: http://stackoverflow.com/comment/42718608
has comment: http://stackoverflow.com/comment/42736320
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/60174
has answer: http://stackoverflow.com/a/27108119
has comment: http://stackoverflow.com/comment/42754216
tagged with: jquery
linked to: http://stackoverflow.com/q/12859942
favorite count: 0
tagged with: ajax
has title: Update mysql database with jquery array using ajax
type: Question
has comment: http://stackoverflow.com/comment/42718581
tagged with: php
has body: I am needing a little help with updating a mysql table from data in an jquery array using ajax. I have tried searching for similar issues but could not find anything, or maybe I do not know the correct terms to search... I'm still fairly new to web dev/coding. I'll try explain what I am trying to do as clearly as I can. I have a page with seats which users select by clicking on them, upon clicking the seat ID is added in its own span tag in a kind of shopping cart area on the left of the page. This works fine. Upon checkout my js file is able to pick up these seat ID's in an array, but from here I am unsure of how to properly send this array to the php file, and then for the php file to read the seat ID's from the array and update the relevant seat rows to change the availability from 1 to 0 (this is using ajax). Here is my code: checkout.js $(document).ready(function(){ $('#checkout').click(function(){ var status = sessionStorage.getItem("username"); if(sessionStorage.getItem("username")){ var tickets = []; $("#myTickets").find("span").each(function(){ tickets.push(this.id); }); var type = "POST", url = "scripts/sendSeatDetails.php"; console.log(tickets); $.ajax ({ url:url, type:type, data:tickets, success: function(response){ if(response == 5){ alert("Seat update query failed"); } else { alert("success"); } } }); } else { alert("Before purchasing please log in. If you do not have an account please register."); } }); }); In the console log this shows: ["A2", "A3", "A4"] (if I have selected seats with ID A2, A3, A4 etc). sendSeatDetails.php &lt;?php include("dbconnect.php"); $myseats=$_POST['tickets']; $query="update seats set status='0' where seatnum="; for($i=0;$i&lt;count($myseats);$i++){ $query.="'$myseats[$i]'"; if($i&lt;count($myseats)-1){ $query.=" || seatnum="; } } $link = mysql_query($query); if (!$link) { echo 5; } ?&gt; This returns the alert showing success, but this is not true as the tables are not being updated. Can anyone help me with this or point m…

http://stackoverflow.com/a/27139614
answers question: http://stackoverflow.com/q/27135686
accepted answer of: http://stackoverflow.com/q/27135686
type: Answer
has body: Your JavaScript code is a little bit messy. First of all your move function: function move(){ $("input").click(function(){ $(this).val('Stop'); $("div").css({left:'0%'}).animate({left:'100%'},1000, Stop); Stop(); }); } Your Stop function (not the one set as callback function of the animate function) will be called while the div is animated. You don't want this. What you might wants is essentially three different functions: move pause reset Your move function will essentially start to move your object, the pause will obviously pause it, while the reset will put your object in the initial position, if you wanto so. Let say your HTML file is structured like this: Welcome to the test Your CSS: #object { position: absolute; left: 0px; bottom: 100px; width: 100px; height: 100px; } And finally the JS: var animating = false; $("#oneButton").on("click", function() { if (!animating) { $(this).val("pause"); move(); } else { $(this).val("start"); pause(); } }); function move() { animating = true; $("#object").animate({left:'100%'},1000, reset); } function pause() { $("#object").stop(); animating = false; } function reset() { animating = false; $("#object").css({left: '0%'}); } Here is a FIDDLE where you can seet in "action".
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42780408
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27120552
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42743463
type: Question
linked to: http://stackoverflow.com/q/16539999
downvote count: 0
tagged with: javascript
tagged with: angularjs
has title: Avoiding duplicated code in AngularJs
favorite count: 0
score: 2
has body: I have two controllers. There are functions that are identical and others that are differ. For example: Controller 1: app.controller('ControllerOne', ['$scope','HelperService', function ($scope, HelperService) { $scope.helperService = HelperService; //get an instance of the HelperService $scope.select = function () { $scope.helperService.doA(); $scope.helperService.doB(); $scope.helperService.doC(); }; $scope.filter = function () { $scope.helperService.doB(); $scope.helperService.doC(); $scope.helperService.doE(); $scope.helperService.doF(); }; } ]); The second controller: app.controller('ControllerOne', ['$scope','HelperService', function ($scope, HelperService) { $scope.helperService = HelperService; //get an instance of the HelperService $scope.select = function () { $scope.helperService.doA(); $scope.helperService.doB(); $scope.helperService.doC(); $scope.helperService.doD(); }; $scope.filter = function () { $scope.helperService.doB(); $scope.helperService.doC(); $scope.helperService.doD(); $scope.helperService.doF(); }; } ]); I have partials html to use the same click event but it depends on the controller: &lt;div ng-click="select()"&gt;&lt;/div&gt; How can I avoid from duplicated code on both controllers?
answer count: 0

http://stackoverflow.com/q/27013128
tagged with: javascript
tagged with: phone-number
has body: I create copy row with jquery append function , use it add and remove button , there is jquery mask for phone input inside first row of table. Phone mask working first row but not working copy row. $(document).ready(function(){ var cnt = 2; $(".addCF").click(function(){ $("#customFields").append(' - '); cnt++; }); $("#customFields").on('click','.remCF',function(){ if (confirm("Silmek istediğinizden emin misiniz?")) { $(this).parent().parent().remove(); } }); }); jQuery(function($){ $("#phone").mask("(999) 999-9999"); }); http://jsfiddle.net/drxman/hqgenthu/2/
type: Question
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27013455
tagged with: append
accepted answer: http://stackoverflow.com/a/27013455
tagged with: mask
has title: Copy row doesn't work other ajax function
type: AnsweredQuestion

http://stackoverflow.com/a/27151723
has body: Assuming you have a way to find the right set of checkboxes (a shared class on all of them, etc.) you can count the number of checked boxes in the list. If it's 1, and your target box is checked, you're good. In this example, I added an id to the table containing the checkboxes to make them easier to find. Removed the style so the table is visible. $("#checkC").click(function(){ // the one we want var cCorrect1 = $('#cCorrect1'); // all checked checkboxes in the table var checks = $('#boxes input[type=checkbox]:checked'); var cCorrect = cCorrect1.prop('checked') && (checks.length == 1); alert(cCorrect ? "correct" : "incorrect"); }); check
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27151396
has comment: http://stackoverflow.com/comment/42802122
answers question: http://stackoverflow.com/q/27151396
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/a/26994564
answers question: http://stackoverflow.com/q/26994352
has comment: http://stackoverflow.com/comment/42552128
has body: You actually don't need this conversion. Just using the (India Standard Time) suffix, or no suffix at all, will work just fine. For example: echo(strtotime("Thu Oct 30 2014 00:00:00 GMT+0530 (IST)") . " / " . strtotime("Thu Oct 30 2014 00:00:00 GMT+0530") . " / " . strtotime("Thu Oct 30 2014 00:00:00 GMT+0530 (India Standard Time)")); Returns 1414627200 / 1414627200 / 1414627200 Demo. So my answer to your question is that I don't think it's possible to get the official timezone abbreviation, but my solution to your problem is to simply use the format you already have (or if the suffix is causing problems when it's in another language, simply omit the suffix). Alternatively, you can convert the timezone to UTC first, and then feed that to the PHP: //some other way to generate this Date object is of course fine too var d = new Date(/*your date object*/); //converts it from ms -&gt; sec, to the format PHP uses var unix = Math.floor(d.getTime() / 1000);
has comment: http://stackoverflow.com/comment/42520288
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42520313

http://stackoverflow.com/comment/42647613
has text: Unfortunately I can only post a question once every 90 minutes and was hoping to figure out something before then. I'll post the new question when I can, but in the meantime, I'm just trying to figure out how to set these values dynamically: `x.domain([0,100]); y.domain([0,100])`
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27066220

http://stackoverflow.com/a/27140664
type: Answer
accepted answer of: http://stackoverflow.com/q/27140639
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27140639
has body: Using HTML5, you can do this with an anchor tag in your .html file. Here is an example: Send an email This will work across all devices and resort to native functionality to handle the email task.
score: 8
upvote count: 8

http://stackoverflow.com/comment/42740014
type: Comment
comment on: http://stackoverflow.com/a/27119181
type: AnswerComment
has text: You have a typo ----------> `.content()` should be `.contents()`
score: 0

http://stackoverflow.com/comment/42593947
comment on: http://stackoverflow.com/a/27018160
type: Comment
has text: I have added the way I was intending on using these elements. The idea was to have certain independent components on the page, and with broadcasting custom events each of these could react accordingly. I am a bit confused why this did not work as I would think the code itself had no issues, is this scope or shadowDOM related? And as for independent components broadcasting into the wild, it seems <core-signals> might actually be the way forward.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27072924
score: 0
has answer: http://stackoverflow.com/a/27072974
has title: Regular expression variable that matches alpha characters only
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27072941
tagged with: regex
answer count: 4
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27072942
has answer: http://stackoverflow.com/a/27072945
has body: I have this non-functioning javascript: function test(id) { if (id.match('^(.+?)#')) { alert(RegExp.$1); } } test('test#f'); // should alert 'test' test('tes4t#f'); // should not alert http://jsfiddle.net/r7mky2y9/1/ I only want to match a-zA-Z characters that appear before the #. I tried adjusting the regexp so it was (.+?)[a-zA-Z] but I have a feeling that is not correct.

http://stackoverflow.com/a/27075973
has comment: http://stackoverflow.com/comment/42663348
answers question: http://stackoverflow.com/q/27075827
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42663137
score: 0
has comment: http://stackoverflow.com/comment/42663315
has comment: http://stackoverflow.com/comment/42664762
has comment: http://stackoverflow.com/comment/42664324
type: Answer
has comment: http://stackoverflow.com/comment/42663797
has body: EDIT var cells = ['td1','td2','td3']; function texFil() { var indicated = document.getElementById('fi').value; var index = parseInt(indicated); if(index > 0) { document.getElementById(cells[index -1]).innerHTML = document.getElementById('te').value; } } 1. 2. 3. Introduce text: Indicate row:
accepted answer of: http://stackoverflow.com/q/27075827
has comment: http://stackoverflow.com/comment/42663167
has comment: http://stackoverflow.com/comment/42663434

http://stackoverflow.com/q/27018049
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27027461
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: hi there i am trying yo create fish animation which is on barlasapaydin.com that site but didn't get success creating that animation help me creating that animation and please provide code for that and i tried through html5 and css3 but no sccess #header .loop{ border: 1px solid black; background: url(loop.png); width: 411px; height: 613px; position: absolute; left: 400px; background-position: 0px 0px; -moz-animation: loop ease-out 3000ms infinite; } @-moz-keyframes loop{ 0%{background: url(loop.png); background-position: 0px 0px;} 1%{background: url(loop.png); background-position: -411px 0;} thank you
favorite count: 0
possible better answer: http://stackoverflow.com/a/27018952
has answer: http://stackoverflow.com/a/27018952
upvote count: 1
tagged with: css
accepted answer: http://stackoverflow.com/a/27027461
type: AnsweredQuestion
score: 1
has title: Fish Animation on barlasapaydin.com
type: Question
has comment: http://stackoverflow.com/comment/42561701
has answer: http://stackoverflow.com/a/27018207
downvote count: 0

http://stackoverflow.com/q/27126350
upvote count: 3
possible better answer: http://stackoverflow.com/a/27126413
has title: jQuery $.change function not working with cloned select
linked to: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/27126413
has comment: http://stackoverflow.com/comment/42752609
downvote count: 0
has comment: http://stackoverflow.com/comment/42752353
type: Question
type: AnsweredQuestion
score: 3
tagged with: clone
tagged with: javascript
has answer: http://stackoverflow.com/a/27126403
accepted answer: http://stackoverflow.com/a/27126403
answer count: 2
tagged with: onchange
tagged with: jquery
favorite count: 0
has body: I have a table with a button that adds a row to the bottom by cloning the last row. Each row contains a &lt;select&gt; with a different name (0-9), all &lt;select&gt; objects have the .variable_priority class. When pressing the button, the row gets copied successfully and I manage to change the name correctly (10, 11, 12, etc.), and the row gets the same class since it is a perfect copy. However, when I execute the following function, I encounter problems with cloned table rows: $('.variable_priority').change(function() { var selections = new Array(); $(".variable_priority").each(function() { selections.push($(this).find('option:selected').val()); }); // Iterating on Options of Select $('.variable_priority').children('option').each(function() { $(this).removeAttr('disabled'); if($.inArray($(this).val(), selections) !== -1){ if($(this).val() != 0){ if($(this).is(':selected')){ // nothing } else { $(this).attr('disabled', true); } } } }); }); The function should run each time I change the selected option of a &lt;select&gt;, though it only runs with the 10 original ones. This function is not executed when I change the option in a cloned row. However, if I change the value in one of the originals, the function runs and it also adds the values from the cloned rows to the selections array. So for some reason, the code recognizes that the clones have the same class, but it doesn't run when changing their values. EDIT: short description of the code above; if I change the selected value of a &lt;select&gt;,the function will add all selected options to an array and disable every selected option in the selects, except in the box where the value itself is selected (if I select '2' in the first box, '2' gets disabled in all other boxes).

http://stackoverflow.com/comment/42604462
has text: yes you can http://stackoverflow.com/questions/11690253/meta-refresh-redirect-to-top-frame http://stackoverflow.com/questions/15166507/meta-refresh-with-a-frame-target
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27042532

http://stackoverflow.com/q/27142123
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27142138
favorite count: 0
has body: I want to set selected value of a select input to another selects option value. when i select a value from first select box, then i want to put that value in to another select box value. but i cant get this value in another select box. i have tried this html --select-- amr tomar jquery $(document).ready(function(){ $( "#sel" ).change(function() { var ww = $( "#sel" ).val(); alert(ww); $( "#output" ).val(ww); }); }); demo
possible better answer: http://stackoverflow.com/a/27142181
has answer: http://stackoverflow.com/a/27142181
downvote count: 1
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/27142138
has title: set selected value of a select input to another selects option value
upvote count: 3
linked to: http://stackoverflow.com/q/13343566
type: Question
has comment: http://stackoverflow.com/comment/42781295
has answer: http://stackoverflow.com/a/27142222
tagged with: javascript
tagged with: jquery
answer count: 3

http://stackoverflow.com/comment/42520866
type: QuestionComment
has text: @JLevett - Is reloading page because my index is checking if someone is logged then the index is importing different style / files of server.
score: 0
comment on: http://stackoverflow.com/q/26995007
type: Comment

http://stackoverflow.com/a/26992451
upvote count: 3
type: Answer
score: 3
has body: Put your php top of your document before all other code and then echo variables onto javascript like this: var data = google.visualization.arrayToDataTable([ ['Polarity', 'Percentage'], ['positive', &lt;?php echo $positive ?&gt;], ['negative', &lt;?php echo $negative ?&gt;], ['neutral', &lt;?php echo $neutral ?&gt;] ]);
downvote count: 0
answers question: http://stackoverflow.com/q/26992341
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26992341

http://stackoverflow.com/q/27034853
has comment: http://stackoverflow.com/comment/42591380
has comment: http://stackoverflow.com/comment/42592075
answer count: 0
has comment: http://stackoverflow.com/comment/42590574
has comment: http://stackoverflow.com/comment/42590530
has comment: http://stackoverflow.com/comment/42591263
type: Question
has comment: http://stackoverflow.com/comment/42591727
has comment: http://stackoverflow.com/comment/42590410
tagged with: javascript
has comment: http://stackoverflow.com/comment/42590933
has title: Angular.js extend $inject so it can load files?
score: 0
has comment: http://stackoverflow.com/comment/42590476
has comment: http://stackoverflow.com/comment/42590534
has body: I'm starting a new angular project from a scratch and I want to avoid using require.js, browserify or webpack entirely. I'm gonna put all my code into separate files - no monolithic controllers.js or directives.js files... Few options that are left are: Use &lt;script&gt; tags and always put new files at the bottom (downside I might mess up order of the files at some point) Use concatination mechanism, i.e. gulp-concat or grunt-concat Both of them are ugly - first is maintenance nightmare and the second requires build step and file watcher setup... The closest thing that I could use is require.js but I'm really disgusted with how the code looks after combining angular with require: define([], function () { angular.module('app').controller('BlaBlaController', function () { ... }); }) Since angular is handling all the DI for me require.js is used only for file loading which is kinda sad and makes require.js overkill for such a small task. What I want to make is extend $inject service so that it would know how to load external files and that's how imagine it should look like: Create di.config.js file where I specify paths for various "injectables" (much like require.conf.js Create a simple script loader that would know how to recursively load modules Now for DI mechanism -- if (injectableIsLoaded) { angular.module('app').controller('Controller', function (dep1) {}); } else if (injectableHasPath) { diLoader.load(injectablePath).then(evalModule); } else { throw "No path for module"; } Does anyone know if that would be possible at all? What I win from this - I don't need to wrap my angular code in weird require.js calls, don't need a build step, can keep all files separete and load them separatly on demand...
has comment: http://stackoverflow.com/comment/42591816
has comment: http://stackoverflow.com/comment/42590483
has comment: http://stackoverflow.com/comment/42590456
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42590413
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42590448

http://stackoverflow.com/q/27136796
answer count: 1
has answer: http://stackoverflow.com/a/27137350
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has comment: http://stackoverflow.com/comment/42772105
tagged with: clone
has title: Cloning Checkboxes with different names
type: Question
has body: For better understanding what I want to do, here is a screenshot I want to be able to submit whether checkboxes are checked or not. For this I used the trick to have hidden input fields, because otherwise unchecked boxes are not submitted. What I want to do now is to give pairs (one hidden, one checkbox) the same name, but each pair a different name. I tried quite a bit with javascript and jQuery but could not figure out how to get this done. The "+" Button is for adding more Checkboxes, the "-" Button is for deleting them again. test Parameter: Submit So it would actually be nice to have some sort of counter like this: Parameter: Thanks for your help!
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/27067254
type: UnansweredQuestion
tagged with: dust.js
has answer: http://stackoverflow.com/a/27146735
type: Question
has title: Dust - how to get parent context in loop
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27073864
has body: I am trying to retrieve values in a loop from the parent context. Dust is able to call my method, but my method is not able to reach my properties which I have defined in the class, due to the context is the current item. So for example: JavaScript class MyNamespace.MyClass = function () { this.names= ["Me", "You", "StackOverflow"]; this.isAwesome = true; }; MyNamespace.MyClass.prototype.sayHello = function() { if(this.isAwesome) { return "Hello awesome "; // This code will never be reached due to 'this' is one of the items from the array } return "Hello "; }; My Dust {#names}{sayHello} {.}{~n}{/names} Problem The sayHello method will be called as expected but the context is the current item instead of the parent. So this is equals to the current item and of course "Me".isAwesome will always return false. As you would understand, I would like to be awesome. Question How can I achieve that 3 awesome people are returned by dust.

http://stackoverflow.com/a/27150610
type: Answer
has body: You should be able to do that with the playlist parameter, as you said. For example: The playlist parameter takes a comma separated list of video IDs.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27150242
score: 2
has comment: http://stackoverflow.com/comment/42795921
answers question: http://stackoverflow.com/q/27150242
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27073108
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42658236
tagged with: ajax
score: 0
has title: Linkable navigation with AJAX?
accepted answer: http://stackoverflow.com/a/27073253
tagged with: http://stackoverflow.com/tag/html
has body: Just getting into web programming and when it comes to navigation, so far I prefer the idea of using Javascript and AJAX requests to change the content when the menu links are clicked on. It's fast, no page refresh, brilliant. The only problem is that the website's URL always stays the same. So I can't, for example, link someone to the "About" page. What is the standard way to solve this problem? I'm currently using only HTML, JavaScript and jQuery.
linked to: http://stackoverflow.com/q/26475746
has answer: http://stackoverflow.com/a/27073192
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27073192
tagged with: hyperlink
has answer: http://stackoverflow.com/a/27073253
tagged with: navigation

http://stackoverflow.com/comment/88110097
score: 1
comment on: http://stackoverflow.com/a/27049416
type: Comment
has text: I tried this solution on Android phones with both hardware and software back button, none did work.
type: AnswerComment

http://stackoverflow.com/comment/42652082
score: 0
type: Comment
type: QuestionComment
has text: Why do you think that custom ranges would complicate things a lot?
comment on: http://stackoverflow.com/q/27067169

http://stackoverflow.com/q/27140102
has title: Where to declare PHP before passing to JavaScript via JSON?
has comment: http://stackoverflow.com/comment/42779108
answer count: 2
has comment: http://stackoverflow.com/comment/42778046
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/12813580
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27140157
has answer: http://stackoverflow.com/a/27140151
has comment: http://stackoverflow.com/comment/42777936
has comment: http://stackoverflow.com/comment/42779176
type: UnansweredQuestion
tagged with: php
has body: Well, I can successfully fetch a result set from a MySQL database via PHP, and display its contents on a web page via HTML. I can also write JavaScript functions. Here's the problem: I have no idea where, physically, I need to put my PHP code to have the array result set show up in my JavaScript functions! Here's my PHP: &lt;?php $photos = array(); [code to fill this array with results from database] ?&gt; I have this directly under the head. Also under the head: &lt;script&gt; prevPhoto() { var jPhotoArray = &lt;?php echo json_encode($photos); ?&gt;; for (var i = 0; i &lt; jPhotoArray.length; i++){ if (thePhoto.src == jPhotoArray[i]['photo']) { if (i + 1 != jPhotoArray.length) { thePhoto.src = jPhotoArray[i + 1]['photo']; } } } } &lt;/script&gt; (For the curious, the intended functionality is to create a manual slideshow of photos that users can flip through by clicking "forward" and "backward" for as long as there is another picture behind the one currently displayed.) But when I launch the page and take a look at the memory, the variable jPhotoArray is null. What am I doing wrong?
type: Question
has comment: http://stackoverflow.com/comment/42779147
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/27073581
has answer: http://stackoverflow.com/a/27074046
tagged with: asp.net
favorite count: 0
tagged with: gridview
has title: Find values of checked rows in gridview using jQuery
accepted answer: http://stackoverflow.com/a/27074046
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/27073620
has answer: http://stackoverflow.com/a/27073620
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/42659712
tagged with: javascript
tagged with: jquery
tagged with: webforms
answer count: 3
score: 3
has body: I have a gridview that looks like this: <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" OnPageIndexChanging="gv_PageIndexChanging" Width="90%" PageSize="10" HorizontalAlign="Center" AllowPaging="true" OnRowDataBound="gv_RowDataBound" CssClass="table table-bordered ui-state-default table-condensed table-responsive table-hover"> <asp:BoundField DataField="id" HeaderText="Nbr." ItemStyle-HorizontalAlign="center" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false" /> <asp:TemplateField ItemStyle-Wrap="false" ItemStyle-VerticalAlign="Top" HeaderText="Options" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <div id="btnEdit" onclick="modalize(<%#Eval("id") %>)" class="btn btn-sm btn-default ui-colour"> </asp:TemplateField> <asp:BoundField Visible="true" DataField="status" HeaderText="Status" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false" /> <asp:BoundField Visible="true" DataField="amount" HeaderText="Amount" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false" /> <asp:BoundField Visible="true" DataField="added" HeaderText="Added" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false" DataFormatString="{0:d}" /> <asp:BoundField Visible="true" DataField="nextbilling" HeaderText="Next Billing" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false" DataFormatString="{0:d}" /> <asp:BoundField Visible="true" DataField="lastresult" HeaderText="Last Result" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Wrap="false" /> <asp:TemplateField ItemStyle-Wrap="false" ItemStyle-VerticalAlign="Top" HeaderText="Cancel" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <asp:La…
has comment: http://stackoverflow.com/comment/42659762
has answer: http://stackoverflow.com/a/27073971

http://stackoverflow.com/q/27057656
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27057811
type: Question
tagged with: hyperlink
tagged with: javascript
tagged with: image
score: 0
answer count: 1
has body: I have some code I have written for a image gallery on my page, "gallery.aspx". The scenario is that I have an external aspx page with different links. When I click on one of those link I want to redirect to this image gallery but to a specific image. For e.g I have a page called "home.aspx" with a link called "img2". When I click on "img2" I want to open up this image gallery(which sits on a page called "gallery.aspx"), but I want tab 2 of the gallery to be opened so 2nd image. I can get it to work on my html pages using (url/gallery.html?img=img2) but I would really like to be able to do it on my sharepoint aspx page. Thank you in advance. My HTML code is as follows: &lt;div class="gallery" align="center"&gt; &lt;div class="thumbnails"&gt; &lt;img name="ift" onclick="preview.src=img6.src" id="img6" src="IFT.png" alt="Image Not Loaded"/&gt; &lt;img onclick="preview.src=img1.src" id="img1" src="Clear.png" alt="Image Not Loaded"/&gt; &lt;img onclick="preview.src=img2.src" id="img2" src="Agile.png" alt="Image Not Loaded"/&gt; &lt;img onclick="preview.src=img3.src" id="img3" src="AllForOne.png" alt="Image Not Loaded"/&gt; &lt;img onclick="preview.src=img4.src" id="img4" src="Decide.png" alt="Image Not Loaded"/&gt; &lt;img onclick="preview.src=img5.src" id="img5" src="Possibilities.png" alt="Image Not Loaded"/&gt; &lt;/div&gt; &lt;br/&gt; &lt;div class="preview" align="center"&gt; &lt;img id="preview" src="IFT.png" alt="No Image Loaded"/&gt; &lt;/div&gt;
tagged with: asp.net
has title: How to create anchors or append items in aspx pages?
type: UnansweredQuestion

http://stackoverflow.com/comment/42650450
has text: var strRedirect = PageMethods.NextAula (elem, NPAG, getParameterByName ('codaula')); return unefined
type: Comment
comment on: http://stackoverflow.com/q/27067329
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42753905
type: Comment
has text: `top: 0; right: 0; left: 0; bottom: 0; margin: auto;` - Put this on the absolute positioned elements and it will center.
score: 0
comment on: http://stackoverflow.com/q/27127149
type: QuestionComment

http://stackoverflow.com/a/27026313
score: 0
has body: var promise = new Bluebird(function(resolve, reject) { //Create a promise myLib.doStuff(function() { resolve(); //In a callback you resolve the promise }); }); promise.then(function() { //Use the promise console.log('Stuff done'); });
has comment: http://stackoverflow.com/comment/42576895
has comment: http://stackoverflow.com/comment/42576509
has comment: http://stackoverflow.com/comment/42576394
answers question: http://stackoverflow.com/q/27026227
type: Answer
has comment: http://stackoverflow.com/comment/42575981
has comment: http://stackoverflow.com/comment/42576654
has comment: http://stackoverflow.com/comment/42576734

http://stackoverflow.com/q/27100759
has answer: http://stackoverflow.com/a/27101039
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42706231
has answer: http://stackoverflow.com/a/27100869
has body: I am trying to get the site base url using javascript . I am using var pathArray = window.location.pathname.split( '/' ); var baseURL = window.location.protocol + "//" + window.location.host + "/" + pathArray[1]+'/'; This is working for mysite.com/project1 but not for mysite.com. How can I check this for both the urls ? I have to send ajax request to the url. Thanks in advance.
has title: How o get site URL on server using javascript
possible better answer: http://stackoverflow.com/a/27100869
answer count: 4
has comment: http://stackoverflow.com/comment/42706008
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27101039
score: 1
linked to: http://stackoverflow.com/q/1420881
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27100943
has answer: http://stackoverflow.com/a/27100957
tagged with: javascript

http://stackoverflow.com/a/27283871
type: Answer
accepted answer of: http://stackoverflow.com/q/27136536
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27136536
has body: Sadly, there is no simple way to do this. You can use flash hacks (I don't know them personally) to get access to the clipboard whenever you want, but otherwise, you're limited to accessing the user's clipboard (in your case, to read what is on it) during system clipboard events (triggered by keyboard shortcuts or from the browser's menus). In IE, you can access the clipboard whenever you want using the following code: window.clipboardData.getData('Text'); But if it isn't during a system clipboard event, the user will be prompted as to whether or not they want to grant you access. You can get a workaround in Chrome by using a chrome extension that grants your site/app clipboard permissions. From there you can just force a paste event using the following code. window.execCommand('paste'); This should cause whatever is on the clipboard to be pasted (since your text area is selected, it should paste into your text area). That's probably as far as you'll be able to get, though, unless you figure out a way to get flash to do it for you (ZeroClipboard seems like a promising option). If you're interested in some more details, I wrote a technical blog post on this subject after doing extensive work on this at Lucidchart (where I work).
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43084084
downvote count: 0

http://stackoverflow.com/a/27637492
has body: Make sure following. Change the case of odataModel to ODataModel Ensure the Service URL also correct Obtain the reference of the control As described by kjokinen Regards
score: 0
answers question: http://stackoverflow.com/q/27110194
type: Answer

http://stackoverflow.com/comment/42694147
has text: I am guessing you are not allowed to define constants or values in the bootstrap function. also you can enable or disabling debugging in bootstrap, I believe.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27092388
score: 0

http://stackoverflow.com/comment/42701697
has text: does the order matter?
type: Comment
comment on: http://stackoverflow.com/a/27098365
type: AnswerComment
score: 0

http://stackoverflow.com/q/27112704
tagged with: gulp
has answer: http://stackoverflow.com/a/27113248
has title: How to use Gulp to fetch external javascript files
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42736419
score: 1
type: Question
has body: I'm fairly new to using Gulp, but i've been starting to play around with it and the fact that I can run a server with livereload just by typing 'gulp' makes me wonder where it's been my whole life. I tend to use CDN's for external libraries but am now working on a project that doesn't allow calls outside the network, meaning I have to include the js files. Is there a way with gulp that will fetch all external javascript files, place it in one single file and minified?
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42728365
answer count: 1

http://stackoverflow.com/a/27049815
downvote count: 0
has comment: http://stackoverflow.com/comment/42617474
has body: When document.write is used on a document that has been closed, it empties the document and writes new content to it. That is what happens in your case since the script is executed AFTER the document is done loading. Your only real option is to not use document.write to create that image. My work comments comments comments lorem ipsum
type: Answer
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/27049692
answers question: http://stackoverflow.com/q/27049692
type: AcceptedAnswer

http://stackoverflow.com/a/27109718
has body: It's because the alert causes the focusout to be called. Putting the result in another element for an example does not cause it to trigger: $('#contact_form .contact_save').focusout(function() { alert("focusout!"); }); $('#contact_form .contact_save').keyup(function() { $('#result').val('keyup'); });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27109619
score: 3
upvote count: 3

http://stackoverflow.com/q/27032677
tagged with: phantomjs
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27035352
tagged with: javascript
has body: When I tried to open one of our internal application's webpage(which works on IE8) using phantomjs, 'page.content' is showing below html message. However, page.render("test.png") is showing the completely loaded page. I have set the page.settings.useragent to Why is the discrepancy between .render() and .content? How to debug/resolve this issue? HTML output: &lt;html&gt; &lt;frameset id="mainFrameSet" border="0" frameborder="yes" framespacing="1" rows="37px,*" topmargin="0" leftmargin="0" bordercolor="#cdcdcd"&gt; &lt;frame name="header" src="&lt;src&gt;" frameborder="0" marginheight="0" bordercolor="#cdcdcd" marginwidth="0" noresize="" scrolling="no" bor der="0"&gt; &lt;frame frameborder="0" border="0" name="main" id="main" src="&lt;src&gt;" bordercolor="#cdcdcd" scrolling="auto" leftmargin="0"&gt; &lt;noframes&gt; &amp;lt;BODY&amp;gt; &amp;lt;P&amp;gt;This page uses frames, but your browser doesn't support them.&amp;lt;/P&amp;gt; &amp;lt;/BODY&amp;gt; &lt;/noframes&gt; &lt;/frameset&gt; &lt;/html&gt; my code: var page = require("webpage").create(), testindex = 0, loadInProgress = false; page.settings.javascriptEnabled = true; page.settings.localToRemoteUrlAccessEnabled = true; page.settings.XSSAuditingEnabled = true; page.viewportSize = { width: 1366, height: 768 }; page.settings.userAgent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)'; //Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US) //Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C) //Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.8 Safari/534.34 //Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) //Mozilla/4.0 (compatible; MSIE 8.0; …
tagged with: frames
answer count: 1
downvote count: 0
has title: Phantomjs throwing "This page uses frames, but your browser doesn't support them" error even after setting the correct useragent
favorite count: 0
linked to: http://stackoverflow.com/q/26663357
accepted answer: http://stackoverflow.com/a/27035352
type: AnsweredQuestion

http://stackoverflow.com/q/27018033
tagged with: chain
tagged with: constructor
has title: Javascript call Parent constructor in the Child (prototypical inheritance) - How it works?
type: UnansweredQuestion
score: 11
upvote count: 11
has answer: http://stackoverflow.com/a/27018356
tagged with: call
has body: I know it works, but I don't know why and how. What are the mechanics? // Parent constructor function Parent(name){ this.name = name || "The name property is empty"; } // Child constructor function Child(name){ this.name = name; } // Originaly, the Child "inherit" everything from the Parent, also the name property, but in this case // I shadowing that with the name property in the Child constructor. Child.prototype = new Parent(); // I want to this: if I dont set a name, please inherit "The name property is empty" from the // Parent constructor. But I know, it doesn't work because I shadow it in the Child. var child1 = new Child("Laura"); var child2 = new Child(); //And the result is undefined (of course) console.log(child1.name, child2.name); //"Laura", undefined I know what I need, the call() or the apply() method. Call the "super class" (the Parent constructor) from the Child, and pass the this object and the argument name to that. It works: function Parent(name){ this.name = name || "The name property is empty"; } function Child(name){ // Call the "super class" but WHAT AM I DO? How does it work? I don't understand the process, I lost the line. Parent.call(this, name); } Child.prototype = new Parent(); var child1 = new Child("Laura"); var child2 = new Child(); console.log(child1.name, child2.name); // "Laura", "The name property is empty" It works perfectly, but I don't understand what happens. I lost the this in my mind, and I can't follow the process of the call() method. Does that copy the constructor body from the Parent to the Child or what? And where is the this object? Why does it work? Please help and describe the process, I don't understand.
linked to: http://stackoverflow.com/q/20830449
has comment: http://stackoverflow.com/comment/80574127
type: Question
has comment: http://stackoverflow.com/comment/42561504
has comment: http://stackoverflow.com/comment/78271963
tagged with: javascript
tagged with: prototype
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/24453301
favorite count: 0

http://stackoverflow.com/q/27036914
has title: Display click count and redirect to a url
type: Question
answer count: 2
tagged with: counter
tagged with: javascript
tagged with: click
score: 0
has answer: http://stackoverflow.com/a/27037021
has answer: http://stackoverflow.com/a/27037065
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: http-redirect
has body: I have found the below code to check the count of times the button has been clicked. However, I would like the button to redirect to an URL once it is clicked and update the click count. Increment count when button is clicked The button was pressed 0 times.
has comment: http://stackoverflow.com/comment/42594389
has comment: http://stackoverflow.com/comment/42608544

http://stackoverflow.com/comment/47417758
type: AnswerComment
has text: The problem with this is ngram increases the index size terribly. At least in my use-case. Not that I set the max gram to 20 or 50 but the size of my data and use case, we just could not move forward with ngram. Hope you are able to. I am opening a issue with es github on the suggester.
type: Comment
comment on: http://stackoverflow.com/a/29637674
score: 0

http://stackoverflow.com/q/27055423
answer count: 1
has comment: http://stackoverflow.com/comment/42627392
has answer: http://stackoverflow.com/a/27055583
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42627132
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42627134
type: Question
has title: How to convert javascript to jquery + use it in Wordpress
has comment: http://stackoverflow.com/comment/42627235
has comment: http://stackoverflow.com/comment/42626982
has body: I have written the following (working) javascript function calc(A,B,SUM) { var one = Number(A); var two = Number(document.getElementById(B).value); if (isNaN(one)) { alert('Invalid entry: '+A); one=0; } if (isNaN(two)) { alert('Invalid entry: '+B); two=0; } document.getElementById(SUM).value = (one/(((two*0.6)/2.4)/12))*100; } However, I need to convert it to jquery to work with Wordpress. I have a .js file properly enqueued. Everything I do just creates errors. What resources are out there to explain how to convert it to jquery and how to make they jquery work in wordpress?
score: 0
tagged with: wordpress

http://stackoverflow.com/comment/42763428
has text: Yeah, I will. I get the idea from your answer: process on `range` object, not on extracted text or htmlText. Thank you
comment on: http://stackoverflow.com/a/27102382
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27016809
tagged with: filelist
linked to: http://stackoverflow.com/q/3144419
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42602452
type: Question
has comment: http://stackoverflow.com/comment/42568547
has title: How to send javascript editable FileList to server?
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27022225
tagged with: ajax
has body: In this documentaion says that in Javascript we cann't edit FileList inside 'input' element, because it is readonly. So what are the alternatives to send some other javascript FileList, that i can edit, to server?

http://stackoverflow.com/a/31537769
upvote count: 1
has body: This is because line chart in Google chart doesnt order the data by itself based on the x axis values. If you want to have a continuous graph, you should sort the data based on x-axis value (timestamp in your case) and then pass it to Google charts.
answers question: http://stackoverflow.com/q/27078528
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42679098
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27085054
has text: The answer to your question relies on the javascript engine you're targeting.

http://stackoverflow.com/a/27151017
has comment: http://stackoverflow.com/comment/42797637
has comment: http://stackoverflow.com/comment/42797186
has comment: http://stackoverflow.com/comment/42797929
score: 1
answers question: http://stackoverflow.com/q/27149853
has comment: http://stackoverflow.com/comment/42796907
downvote count: 0
has comment: http://stackoverflow.com/comment/42797706
type: Answer
has body: what about use onmouseover and onmouseout? http://www.w3schools.com/jsref/event_onmouseover.asp
has comment: http://stackoverflow.com/comment/42797262
upvote count: 1

youtube-javascript-api
type: Tag
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/27054458
tags question: http://stackoverflow.com/q/27041445
tags question: http://stackoverflow.com/q/27072718

http://stackoverflow.com/comment/42572031
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27024000
has text: I would try simply creating a new object within AddUser() and push that object to the array.
score: 0

http://stackoverflow.com/comment/42653719
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27069169
has text: Ahhh, I take that back, I missed your comment about the page posting back to itself when the buttons are clicked.

audio
tags question: http://stackoverflow.com/q/27083539
tags question: http://stackoverflow.com/q/27088854
tags question: http://stackoverflow.com/q/27087368
tags question: http://stackoverflow.com/q/27053633
tags question: http://stackoverflow.com/q/27104571
tags question: http://stackoverflow.com/q/27029059
type: Tag
tag name: audio
tags question: http://stackoverflow.com/q/27062769
tags question: http://stackoverflow.com/q/27088389
tags question: http://stackoverflow.com/q/27070807
tags question: http://stackoverflow.com/q/27095514
tags question: http://stackoverflow.com/q/27080070
tags question: http://stackoverflow.com/q/27062679
tags question: http://stackoverflow.com/q/27096508

http://stackoverflow.com/q/27070733
accepted answer: http://stackoverflow.com/a/27070759
possible better answer: http://stackoverflow.com/a/27070805
has answer: http://stackoverflow.com/a/27070805
downvote count: 2
answer count: 3
tagged with: javascript
has body: Am trying to convert the following string value into a javascript object Example string="name=usernamex&amp;gender=boy&amp;age=10&amp;version_obj=1" into var user={ name:'username', gender:'boy',age:10,version_obj=1} Can someone help me out
favorite count: 0
has comment: http://stackoverflow.com/comment/42654086
has title: Converting a String to a Javascript Object
tagged with: node.js
type: AnsweredQuestion
upvote count: 0
type: Question
score: -2
has answer: http://stackoverflow.com/a/27070891
has answer: http://stackoverflow.com/a/27070759

http://stackoverflow.com/comment/42769911
type: Comment
has text: So what's your problem? How is it not working as expected?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27135799

http://stackoverflow.com/comment/42780299
comment on: http://stackoverflow.com/q/27141457
has text: circular structure is something like this -- var a = {}; a.b = a; -- JSON.stringify won't work in these cases
type: QuestionComment
score: 0
type: Comment

http://stackoverflow.com/a/27152751
accepted answer of: http://stackoverflow.com/q/27149155
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42803126
has body: Couple of issues. First the styling could prevent the links from being targetted. The anchors are styled such that their computed size is 0 x 0 (use the Chrome DOM inspector to see this when you hover over a link). The quick fix is to give them the same size as the button: .menulink{ display: block; width:30px; height:30px; } The second problem is that the plugin stops propagation of the click event internally, so the delegated handler will never see it. You can comment out a single line of code at the end of selectMenuitem in the plugin to fix the immediate problem (this is the non-min version): function selectMenuitem(evt) { var $this = $(this); var $element = $(evt.target); var container = $.radmenu.container; if (!$element.hasClass(container.itemClz)) $element = $element.closest("." + container.itemClz); var isInNested = $element.parents("." + container.itemClz).length &gt; 0; var index = $element.index(); if (!isInNested) $this.parents("." + container.clz).radmenu(index); else $this.radmenu(index); //cancelBubble(evt); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; Remove this }; And here is the result in in a JSFiddle: http://jsfiddle.net/7asLq/10/
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27149155
has comment: http://stackoverflow.com/comment/42825548
has comment: http://stackoverflow.com/comment/42802653
has comment: http://stackoverflow.com/comment/42805585
score: 1
has comment: http://stackoverflow.com/comment/42803052
has comment: http://stackoverflow.com/comment/42803930
has comment: http://stackoverflow.com/comment/42803390
has comment: http://stackoverflow.com/comment/42803650
has comment: http://stackoverflow.com/comment/42803742

http://stackoverflow.com/q/26999820
has comment: http://stackoverflow.com/comment/124020361
has answer: http://stackoverflow.com/a/33193507
type: AnsweredQuestion
score: 146
upvote count: 146
has title: Javascript object bracket notation ({ Navigation } =) on left side of assign
linked to: http://stackoverflow.com/q/15290981
type: Question
tagged with: ecmascript-6
tagged with: webpack
has answer: http://stackoverflow.com/a/45221481
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/70340229
has comment: http://stackoverflow.com/comment/42530093
has answer: http://stackoverflow.com/a/26999862
has answer: http://stackoverflow.com/a/45909752
has body: I haven't seen this syntax before and am wondering what it's all about. var { Navigation } = require('react-router'); The brackets on the left are throwing a syntax error: unexpected token { I'm not sure what part of the webpack config is transforming or what the purpose of the syntax is. Is it a Harmony thing? Can someone enlighten me?
favorite count: 0
answer count: 5
possible better answer: http://stackoverflow.com/a/33193507
accepted answer: http://stackoverflow.com/a/26999862

http://stackoverflow.com/comment/42586722
has text: Thanks for reply.. But it change text value not label value. I want to change label value.What changes i need to do?
comment on: http://stackoverflow.com/a/27011556
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42540308
has text: Doesn't gulp.src handle that now though, or at least as of gulp 3.8? https://github.com/gulpjs/gulp/blob/master/CHANGELOG.md#380 Or am I just using that functionality wrong somehow?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27004519

http://stackoverflow.com/a/27150735
answers question: http://stackoverflow.com/q/27150541
downvote count: 1
score: 1
upvote count: 2
type: AcceptedAnswer
has body: Simple.. your string isn't valid (for JSON): it contains a control character at position 13. Have a look for yourself: json_str.charCodeAt(13) and compare with http://en.wikipedia.org/wiki/C0_and_C1_control_codes . Edit: seems like you had a Line Feed = (LF) = \n in there.
has comment: http://stackoverflow.com/comment/42796043
type: Answer
accepted answer of: http://stackoverflow.com/q/27150541

http://stackoverflow.com/comment/64000567
has text: The reason behind I want to do this is because, Sometimes we got a complaint that our application is being a bit slow, So in those cases we can read that user's performance object and also read overall performance object. we can also read various performance objects while peak use of our application and other times aswell and want to measure that which part of the application is taking longer time to load . at the same time it is a product which is going to evolve with a time so for future reference I can also use this data as benchmark. so my only focus is understanding this object completely
type: Comment
comment on: http://stackoverflow.com/a/38289133
score: 0
type: AnswerComment

http://stackoverflow.com/a/27149194
has comment: http://stackoverflow.com/comment/42793381
accepted answer of: http://stackoverflow.com/q/27148793
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27148793
type: Answer
has body: Angular Model by default treats the values as strings instead of integers. Binding it to a number type will not work. you need to handle that logic in the js side and remove the input type=number in the html.
has comment: http://stackoverflow.com/comment/42793103
upvote count: 1
score: 1

http://stackoverflow.com/comment/42710092
has text: @MarcoMura No, at the moment I'm not using Ajax, but if there is no other way, I'll have to.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27102760
score: 0

http://stackoverflow.com/q/27016211
answer count: 2
has comment: http://stackoverflow.com/comment/42559399
tagged with: user-interface
favorite count: 0
tagged with: backbone.js
upvote count: 2
type: UnansweredQuestion
score: 2
has body: Suppose I have 2 links on my page: Link A Link B And I use backbone router to handle in-app page navigation. On routing link '#A', I have registered a listenerA and similarly listenerB for '#B' where both listenerA and listenerB do some heavy task in background. Now, let's say a user clicks 'Link A' and with gap of few milliseconds, clicks 'Link B'. So, what happens is that when listenerA is done with its execution, only then listenerB starts executing due to single UI thread. Is there a way, I can block/abort/preempt execution of listenerA if listenerB is requested? It's expected that a user will like to see response for his latest action. Previous actions should not be honored if the two actions are similar.
has title: Backbone: abort previous router callback execution
type: Question
tagged with: backbone-routing
has answer: http://stackoverflow.com/a/27017374
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27017927

http://stackoverflow.com/q/27108056
has body: Trying to make a REST web service call using an ajax call. Whenever I try to run it, I receive the error, Interpreted as script but transferred with MIME type text/xml. Here's my code ("website" is actual website where web service is): &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function testCall() { var webMethod = "website"; var un = 'un' var pw = 'pw' var parameters = "username=un&amp;password=pw&amp;change_ticket_number=CRQ000000011334&amp;restuser=TEMPESP&amp;restpass=restpw"; $.ajax({ url: webMethod, type: 'Post', data: parameters, crossDomain: true, username: un, password: pw, contentType: 'application/x-www-form-urlencoded; charset=utf-8', dataType: 'jsonp', success: function(data) { alert('Success: ' + data); }, error: function(errorThrown){ alert('Try again ' + errorThrown); } }); } I have been searching all over the web and this website for something like this but I haven't had any success. I have initially had my dataType as "xml" as that's what the web services provdies but changed it to "jsonp" when I read about cross domain calls. The parameters are what the web service is looking for. If I was to open an internet browser and put the url + parameters, it does show me the xml message. I'm not sure how much control I have over the web service itself so my hope would be to figure out a way on how to translate this back to xml after jsonp successfully brings it over. So the question remains, am I able to change my code in order to make this work, leaving the web service as is? If it's truly not possible, what needs to be done to the web service? Keeping in mind xml is being used. Thank you for any help you can provide.
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: Question
has answer: http://stackoverflow.com/a/27108165
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
upvote count: 1
tagged with: web-services
answer count: 1
accepted answer: http://stackoverflow.com/a/27108165
has title: jQuery cross domain ajax call - Interpreted as script but transferred with MIME type text/xml

global-variables
tags question: http://stackoverflow.com/q/27152461
tag name: global-variables
tags question: http://stackoverflow.com/q/27024456
type: Tag

http://stackoverflow.com/q/27031620
favorite count: 0
has title: Not working Jquery
has comment: http://stackoverflow.com/comment/42585605
has comment: http://stackoverflow.com/comment/42585552
accepted answer: http://stackoverflow.com/a/27032228
has body: I using comboBox Plugin.When i choose zawgyi-one in dropdown listbox, jquery not working.Why? html မြန်မာစာ(Myanmar Text) Jquery Testing Button javascript jQuery(function($){ $(document).ready(function(){ $("#click-btn").click(function (){ alert("jquery Work"); }); }); }); DMEO LINK is http://jsfiddle.net/qq6uq7c6/11/
upvote count: 1
downvote count: 1
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42585213
tagged with: javascript
has comment: http://stackoverflow.com/comment/42585412
has comment: http://stackoverflow.com/comment/42585207
has comment: http://stackoverflow.com/comment/42585142
score: 0
has comment: http://stackoverflow.com/comment/42585238
has answer: http://stackoverflow.com/a/27032228
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/42743776
has text: It might have something to do with focus leaving on an element that was removed from the Displaylist. I found this [link](http://www.actionscript.org/resources/articles/900/1/Keyboard-events-on-stage-are-not-working-why/Page1.html) that describes similar functionality for Keyboard Event handling:
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27111425

http://stackoverflow.com/a/27152639
has body: Rather than setting the dimensions of your image in CSS, jcrop has boxWidth and boxHeight parameters for this purpose. Using these parameters, jcrop will resize the image to fit in the specified box size, but it will still output values relative to the true size. You can set them like this: $(function() { $('#cropbox').Jcrop({ boxWidth: 300, boxHeight: 300 }); }); See here for more information: http://deepliquid.com/content/Jcrop_Sizing_Issues.html
type: Answer
has comment: http://stackoverflow.com/comment/47280999
upvote count: 9
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27152101
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27152101
has comment: http://stackoverflow.com/comment/47277104
score: 9

http://stackoverflow.com/comment/130488548
type: Comment
score: 0
has text: For future readers googling this, note that you don't query this library per line/column to resolve an error; instead, you call `getMappings` and get a gigantic array with the entire file resolved, i.e. every single line/column possible, so that you only need to get the mappings once and then run any future minified errors against the gigantic array. This is why OP suggests to cache the result of getMappings, it's an extremely slow operation since it goes through the entire file, but you only need to do it once. Also note that, even if you cache it, serialization/deserialization is also slow.
comment on: http://stackoverflow.com/a/27129199
type: AnswerComment

http://stackoverflow.com/q/27062596
tagged with: marker
tagged with: openlayers
has body: I am able to run following features on OpenLayers Map Version 2.x Put Markers on Map Draw Polygon on Map Select Polygon on Map Now my requirement is when i select any polygon then i would like to show alert box with all marker which are inside the selected polygon. I am using following code: OSM Drawing Layer Navigation Draw Polygon Draw Line Select Features Can any body has idea how could i get all the markers inside the selected polygon? I have found one article which is written using OpenLayers Version 3 https://gis.stackexchange.com/questions/115500/how-to-find-markers-in-selected-dragbox-openlayers-3. But i am using version 2.x Any help would be highly appreciated.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27243330
score: 0
has title: How to get list of all markers from selected Polygon using OpenLayer MAP v2
type: Question
tagged with: javascript
tagged with: polygon
has answer: http://stackoverflow.com/a/27243330
answer count: 1

http://stackoverflow.com/q/27009852
has body: I a have a factory called mainService which consist of ajax functions that will be used to populate itself. This function is called in a mainController to populate mainService. Now, I used mainService in another controller and sometimes the data isn't available yet because the promise haven't been resolved. What is the best way to deal with this? Here are some codes: function MainService(http, $q) { //var deffered = $q.defer(); var svc = { userLoggedIn: false, userInfo: {}, settings: {}, loadingCount:0, getSettings: function () { var deferred = $q.defer(); http.get(rootUrl + 'api/settings').success(function (data) { svc.settings = data; deferred.resolve(data); }); return deferred.promise; } return svc; in MainController: mainservice.getSettings().then(function(data){ //stuffs }); in OtherController: $scope.settings = mainservice.settings.usersettings; The other controller is dealing with some UI so it is only run when users click something. Sometimes if user click too early an error 'can't read property usersettings of undefined' after that sometimes the error persist when user click again, sometimes it runs after the user click again, Why is that? I can do mainservice.getSettings().then() again in OtherController but that doesn't feel like the proper way to do it. Any help will be appreciated. nb:This is the first time I asked question in stackoverflow and I am a new developer and English is my second language. Apologize in advance if something is wrong with my question/description.
has answer: http://stackoverflow.com/a/27010036
has title: Dealing with angular promise using multiple controllers and one service?
type: Question
has answer: http://stackoverflow.com/a/27011144
tagged with: javascript
score: 0
answer count: 2
tagged with: asynchronous
tagged with: angularjs
type: UnansweredQuestion
tagged with: angular-promise

http://stackoverflow.com/q/27135799
has comment: http://stackoverflow.com/comment/42770537
has answer: http://stackoverflow.com/a/27136200
accepted answer: http://stackoverflow.com/a/27136200
has comment: http://stackoverflow.com/comment/42769979
has comment: http://stackoverflow.com/comment/42769911
has title: Open window (modal or otherwise) from a link and loading it with data from the code-behind
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42770031
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/42770001
has body: So I have something like this: protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { DataTable dt = new DataTable(); dt.Columns.AddRange(new DataColumn[8] { new DataColumn("Foto",typeof(string)), //more columns }); List<Funcion> fun = Festival.Instancia.ListaFunciones; List<Espectaculo> esp = Festival.Instancia.ListaEspectaculos; List<Sala> sala = Festival.Instancia.ListaSalas; foreach (Funcion f in fun) { string nom = f.Espectaculo; string fec = f.Fecha.Day.ToString() + "/" + f.Fecha.Month.ToString(); string hor = f.HoraIni.TimeOfDay.ToString(); string sal = f.Sala; Espectaculo es = Festival.Instancia.BuscarEspectaculo(nom); Sala s = Festival.Instancia.BuscarSala(f.Sala); string com = es.Cnia; string pais = es.Pais; string dir = s.DirSala; string foto = es.Foto; dt.Rows.Add(foto, nom, fec, hor, sal, dir, com, pais); } GridView1.DataSource = dt; GridView1.DataBind(); }} ...and the markup to show it. I need to show just a few of those columns on a gridview, where I also have a link button in the markup. The idea would be to open a new window, or a modal (modal would be great) that is dinamically generated with data from all of those, like a details view. Thing is, I cannot write each window separately, since the user can add to the lists above, so those have to be generated at runtime. When doing that with Javascript/jQuery, so far I can only show data that is already present in the grid, and I can't make it hidden in the view and showing in the modal... Id like to be able to do that server-side. Not sure if I'm being clear... EDIT: Here's the markup with the client-side script I'm using: </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:GridView ID="GridView1" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor="White" runat="server" AutoGenerateColumns="false" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"> <asp:BoundField DataField="Foto" HeaderText="Foto" ItemStyle-CssClas…
tagged with: javascript
tagged with: jquery
tagged with: webforms
has comment: http://stackoverflow.com/comment/42770568
score: 0
has comment: http://stackoverflow.com/comment/42769941
has comment: http://stackoverflow.com/comment/42770300
has comment: http://stackoverflow.com/comment/42770170
answer count: 1
has comment: http://stackoverflow.com/comment/42770207
tagged with: asp.net

ionic-framework
tags question: http://stackoverflow.com/q/27117709
tags question: http://stackoverflow.com/q/27004669
tags question: http://stackoverflow.com/q/27096371
tags question: http://stackoverflow.com/q/27138694
tags question: http://stackoverflow.com/q/27077769
type: Tag
tags question: http://stackoverflow.com/q/27145979
tags question: http://stackoverflow.com/q/27123230
tags question: http://stackoverflow.com/q/27125315
tags question: http://stackoverflow.com/q/26993211
tags question: http://stackoverflow.com/q/27092175
tags question: http://stackoverflow.com/q/27088129
tags question: http://stackoverflow.com/q/26998795
tags question: http://stackoverflow.com/q/27150917
tags question: http://stackoverflow.com/q/27002339
tags question: http://stackoverflow.com/q/27101032
tags question: http://stackoverflow.com/q/27146886
tags question: http://stackoverflow.com/q/27066940
tags question: http://stackoverflow.com/q/27007698
tags question: http://stackoverflow.com/q/27109692
tags question: http://stackoverflow.com/q/27034797
tags question: http://stackoverflow.com/q/27093627
tags question: http://stackoverflow.com/q/27108958
tag name: ionic-framework

http://stackoverflow.com/comment/42534078
type: Comment
type: QuestionComment
has text: What does not work there? See http://jsfiddle.net/brainbolt/52VtD/4/ ... but I'm not sure what `echo set_value('input_val', '1');` outputs, do you have a `vardump()` for that?
comment on: http://stackoverflow.com/q/27001964
score: 0

http://stackoverflow.com/q/27087877
has answer: http://stackoverflow.com/a/27087903
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27087903
has body: I am writing a flask webapp. Here is the content of one of my web apps page. What I want is to copy the content of pre tag with id "editor2" to "editor1" on button click. I am using ace editor. {% extends "layout.html" %} {% block content %} Fork hey {% endblock %} Rightnow when I click button the "editor1" pre content get replaced by text "undefined" and it becomes inactive i.e. i am not able to write in it.
has title: Copy one pre tags content to another on buttonclick
tagged with: ace-editor
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/27087915
has answer: http://stackoverflow.com/a/27087915
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/a/27020426
downvote count: 0
answers question: http://stackoverflow.com/q/27019555
score: 1
has body: Your wedges is the result of the enter() call which: only defines the append, insert, select and call operators So it doesn't have any on method and this is what's causing the "undefined is not a function" error. I'm assuming you want either: var wedges = MsaSubGroup .selectAll("g.slices") .on('mousemove', ...); wedges.data(myData).enter()... or var wedges = MsaSubGroup .selectAll("g.slices") .data(myData) .enter() .append('g') .on('mousemove', ...);
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42567716
type: Answer
accepted answer of: http://stackoverflow.com/q/27019555

http://stackoverflow.com/a/27073458
upvote count: 2
answers question: http://stackoverflow.com/q/27073442
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27073442
type: Answer
has body: You need to seperate your and
score: 2
downvote count: 0

http://stackoverflow.com/a/27133844
score: 0
has body: A way to do do it might be: form : Donation Amount: javascript: document.getElementById('test').addEventListener('submit',function (event) { if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } }) form_submit= function (submited_by) { if(submited_by == 'submit'){ alert('Submited') }else if (submited_by == 'cancel'){ alert('cancelled') } } I'd rather use a switch statement to make it expandable in the future but this should work. Also I'm using jquery mostly because I'm not sure how to stop default action without it. here's a JSFiddle with the code running. EDIT: Updated to not use Jquery. EDIT: well, I feel stupid now, realised it wasn't cancel button in a submit form but in a confirmation form.
answers question: http://stackoverflow.com/q/27133242
type: Answer

http://stackoverflow.com/q/27115500
has answer: http://stackoverflow.com/a/27115705
has answer: http://stackoverflow.com/a/27115758
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27116041
upvote count: 1
downvote count: 1
has body: Is there a simple way to change a value inside different HTML constructs? In my current code I have: And I use .each() and val() to change values of class value: $(this).val(convert($(this).val(), from, to)); Problem arises when I try to do the convert function and assign its return value to other HTML constructs like so: 5.0 5.0 Despite my value being inside span tag, it does not seem to change. I presume jQuery.val() only works for setting the value of an input field, or an attribute, and I can use jQuery.text() or jQuery.html() to change the value inside the span tags.... How do I write code so that I can either figure out which element I am changing, and use appropriate setter method, or use a method that will work for both input HTML tag and span HTML tags, or even td? Adding a fiddle just in case ... (all should update) http://jsfiddle.net/dennisfedco/sa82pmwp/3/
type: Question
tagged with: javascript
has title: How to set value using jQuery in different HTML tag scenarios?
score: 0
answer count: 3
tagged with: jquery

http://stackoverflow.com/comment/42690724
has text: @Phylogenesis ya right, so Jonathan had the right answer.
comment on: http://stackoverflow.com/a/27092062
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27072608
type: Answer
answers question: http://stackoverflow.com/q/27072578
has comment: http://stackoverflow.com/comment/42657491
has comment: http://stackoverflow.com/comment/42657843
has comment: http://stackoverflow.com/comment/42657364
has comment: http://stackoverflow.com/comment/42657524
has body: Both. When the comparison is done on numbers, the values of the numbers determine the outcome. When the comparison is done on strings, the sort order of the strings determine the outcome. The string '255' is considered smaller than the string '3', because it would come before it in a sorted list.
has comment: http://stackoverflow.com/comment/42657400
has comment: http://stackoverflow.com/comment/42658041
has comment: http://stackoverflow.com/comment/42657995
score: 0
has comment: http://stackoverflow.com/comment/42657424
has comment: http://stackoverflow.com/comment/42657863

http://stackoverflow.com/a/27047984
upvote count: 1
downvote count: 0
has body: The answer was provided by Rick Hitchcock (see comments above). The order the scripts were included was the issue. This contains the solution: jsfiddle.net/d0kb3dLj
type: Answer
answers question: http://stackoverflow.com/q/27041385
score: 1

http://stackoverflow.com/q/27074268
tagged with: hide
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27074297
has title: JQuery on() undefined function
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27074655
has body: After making changes from original to changed code boxes, I now get Uncaught Type error: Undefined is not a function. Any ideas as to why? Thanks Original: $('.comment').click(function(e){ alert("click"); e.preventDefault(); $(".slidingDiv2").slideToggle(); }); Changed: $(document.body).on('click', '.comment' ,function(){ alert("click"); e.preventDefault(); $(".slidingDiv2").slideToggle(); });

http://stackoverflow.com/comment/42746628
has text: If someone only has to work client side, i.e. he gets the data through Solr (Which I assume is the fastest till date) how can more optimizations on client side can be done?
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27120460
type: AnswerComment

http://stackoverflow.com/q/27018638
has comment: http://stackoverflow.com/comment/42562210
has comment: http://stackoverflow.com/comment/42562108
accepted answer: http://stackoverflow.com/a/27019580
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27019515
has title: jQuery next and prev button
type: Question
possible better answer: http://stackoverflow.com/a/27019515
has body: I'm very new with jQuery and I use this jQuery carousel. I don't want to use any plugin.I try to make my next and prev button another color on last and first slide. That's almost work. The problem is that buttons stay "red" also when they are not more on last and first slide here is demo http://jsfiddle.net/rGLsG/70/ $(function(){ var carousel = $('.carousel ul'); var carouselChild = carousel.find('li'); var clickCount = 0; var canClick = true; itemWidth = carousel.find('li:first').width()+1; //Including margin //Set Carousel width so it won't wrap carousel.width(itemWidth*carouselChild.length); //Place the child elements to their original locations. refreshChildPosition(); //Set the event handlers for buttons. $('.btnNext').click(function(e){ if($(".carousel").find("li:eq(6)").text()!=14) { if(canClick) { canClick = false; clickCount++; //Animate the slider to left as item width carousel.stop(false, true).animate({ left : '-='+itemWidth },300, function(){ //Find the first item and append it as the last item. lastItem = carousel.find('li:first'); lastItem.remove().appendTo(carousel); lastItem.css('left', ((carouselChild.length-1)*(itemWidth))+(clickCount*itemWidth)); canClick = true; }); } } if(canClick) { canClick == 14; { $(".btnNext").css('color','red'); } canClick = true; } }); $('.btnPrevious').click(function(){ if($(".carousel").find("li:eq(0)").text()!=1) { if(canClick){ canClick = false; clickCount--; //Find the first item and append it as the last item. lastItem = carousel.find('li:last'); lastItem.remove().prependTo(carousel); lastItem.css('left', itemWidth*clickCount); //Animate the slider to right as item width carousel.finish(true).animate({ left: '+='+itemWidth },300, function(){ canClick = true; }); } } if(canClick) { canClick = false; { $(".btnPrevious").css('color','red'); } canClick = true; } }); function refreshChildPosition(){ carouselChild.each(function(){ $(this).css('left', itemWidth*carouselChild.index($(this))); }); } });
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27019946
tagged with: http://stackoverflow.com/tag/html
tagged with: carousel
has answer: http://stackoverflow.com/a/27019580

http://stackoverflow.com/a/27138305
has comment: http://stackoverflow.com/comment/42806451
has comment: http://stackoverflow.com/comment/42815982
has comment: http://stackoverflow.com/comment/42774712
has comment: http://stackoverflow.com/comment/42806087
has body: The error message says what you should do: you should use the 'new' operator to construct 'XMLHttpRequest'. Where you create your ajax object, change var ajax = XMLHttpRequest(); to var ajax = new XMLHttpRequest(); Since you are using jquery anyway, you can use jquerys ajax method to make the ajax request instead of dealing with the browser specifics of XMLHttpRequest. $("#saveSig").click(function saveSig() { //encode URI var sigData = encodeURIComponent(canvas.toDataURL("image/png")); $.ajax({ type: "POST", url: 'sign/signature.php', contentType: 'application/upload', data: sigData, success: function () { $("#imgData").html('Thank you! Your signature was saved'); } }); $('#debug').html(sigData); }); Update In response to you comments: You must understand, that this javascript and the... click(function saveSig() {...} is executed in the browser. So you shouldn't put any php in there, because the php must be executed by the webserver. When you click on the "#saveSig" element, the browser executes this function and with the call of $.ajax(...) it sends a new HTTP POST request to the webserver in the background calling the url 'sign/signature.php'. The response data to that request is available to the success function. Here follows an example of how the webserver (php) and the browser (javascript) could work together. sign/signature.php &lt;?php // read the request data: $sigData = (isset($_POST['data'])) ? $_POST['data'] : ""; $user_id = (isset($_POST['UserId'])) ? $_POST['userId'] : ""; // process your sigData here (e.g. save it in the database together with the user_id) //generate the response: echo "Successfully saved signature for user id: ".$user_id."."; ?&gt; javascript: $("#saveSig").click(function saveSig() { //encode URI var sigData = encodeURIComponent(canvas.toDataURL("image/png")); $.ajax({ type: "POST", url: 'sign/signature.php', contentType: 'application/upload', data: { data: sigData, user_id: $('#user_id').val() // this get's the value from the hidden …
has comment: http://stackoverflow.com/comment/42778942
has comment: http://stackoverflow.com/comment/42779040
answers question: http://stackoverflow.com/q/27137550
has comment: http://stackoverflow.com/comment/42778332
has comment: http://stackoverflow.com/comment/42778822
score: 0
type: Answer

http://stackoverflow.com/comment/42600723
has text: @torazaburo, Thank you for pointing that out. I updated the answer accordingly.
type: AnswerComment
comment on: http://stackoverflow.com/a/27040576
score: 0
type: Comment

http://stackoverflow.com/a/27035459
upvote count: 1
has body: You have to wait for select callback, there you receive the start and the end of the selection. From the documentation - Select(callback) A callback that will fire after a selection is made. function( start, end, jsEvent, view ) start is a Moment indicating the beginning of the selection. end is a Moment indicating the end of the selection. It is an exclusive value, so if the selection is all-day, and the last day is a Thursday, end will be Friday.) example: select: function(start, end, view) { window.location = "edit_event_form.cfm?&start_date="+start+"&end_date="+end+"&view="+view; }
accepted answer of: http://stackoverflow.com/q/27025937
has comment: http://stackoverflow.com/comment/42604583
answers question: http://stackoverflow.com/q/27025937
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42786928
type: QuestionComment
has text: In your question to want dd-M-yy to be valid but in your `alertText` you show the message with format `YYY-MM-DD`...
comment on: http://stackoverflow.com/q/27145478
score: 0
type: Comment

http://stackoverflow.com/q/27100596
upvote count: 3
answer count: 1
tagged with: javascript
tagged with: client-side
has comment: http://stackoverflow.com/comment/42746128
has comment: http://stackoverflow.com/comment/42705703
favorite count: 0
has body: I know, there is a similar question available - however, this was 3 years ago, and the comment about text/tcl didn't seem to catch up in the discussion. Do you know which version is to prefer when implementing client side templates: &lt;script type="text/template"&gt; or &lt;script type="text/tcl"&gt; or even &lt;template&gt;? I heard that some security software may filter out certain &lt;script&gt; tags which do not match a common standard, so text/template could probably be filtered out by some proxy or antivirus software due to security reasons? Is there any disadvantage in using text/tcl? Is it save to use &lt;template&gt; when creating the element first with document.createElement("template") for older browsers (IE)? Thank you very much for your help in advance.
has comment: http://stackoverflow.com/comment/42705437
tagged with: http://stackoverflow.com/tag/html
tagged with: templates
has comment: http://stackoverflow.com/comment/42705614
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/36778407
accepted answer: http://stackoverflow.com/a/36778407
type: Question
score: 3
has comment: http://stackoverflow.com/comment/42705683
has title: Use , or for client side HTML templates?
linked to: http://stackoverflow.com/q/4912586
has comment: http://stackoverflow.com/comment/42705486

http://stackoverflow.com/comment/42595367
comment on: http://stackoverflow.com/a/27037722
type: AnswerComment
has text: Thanks for the reply. But how do i add the class to , like if status = "waiting" my has to be dynamically?
score: 0
type: Comment

http://stackoverflow.com/q/27099526
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27099599
answer count: 3
upvote count: 0
has title: Converting a string into a JSON obj or array JavaScript
has comment: http://stackoverflow.com/comment/42703547
favorite count: 0
score: -1
accepted answer: http://stackoverflow.com/a/27099599
has body: I have the following string: { blogid:"12345", date:"09.09.2014", uid:"0", author:"" } Could anybody give me an idea on how to convert this into a JSON structure or a javascript array and then get the value of each key, say: blogid="12345" uid="0" etc.
possible better answer: http://stackoverflow.com/a/27099602
has answer: http://stackoverflow.com/a/27099602
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27099702
has comment: http://stackoverflow.com/comment/42703563
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/42720878
type: Comment
type: QuestionComment
has text: Why don't you just use Array? Most of the times dynamic name variables are not needed.
comment on: http://stackoverflow.com/q/27069822
score: 0

http://stackoverflow.com/q/27087128
has body: I'm trying to convert date format (DD-MM-YYYY) to (YYYY-MM-DD).i use this javascript code.it's doesn't work. function calbill() { var edate=document.getElementById("edate").value; //03-11-2014 var myDate = new Date(edate); console.log(myDate); var d = myDate.getDate(); var m = myDate.getMonth(); m += 1; var y = myDate.getFullYear(); var newdate=(y+ "-" + m + "-" + d); alert (""+newdate); //It's display "NaN-NaN-NaN" }
has answer: http://stackoverflow.com/a/27087157
tagged with: javascript
score: 22
upvote count: 25
has comment: http://stackoverflow.com/comment/42682574
has answer: http://stackoverflow.com/a/59645857
has title: Convert DD-MM-YYYY to YYYY-MM-DD format using Javascript
has answer: http://stackoverflow.com/a/27087152
has comment: http://stackoverflow.com/comment/42682450
favorite count: 0
has answer: http://stackoverflow.com/a/27087163
accepted answer: http://stackoverflow.com/a/27087163
downvote count: 3
answer count: 5
possible better answer: http://stackoverflow.com/a/27087157
linked to: http://stackoverflow.com/q/25865051
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/52487223
has comment: http://stackoverflow.com/comment/42682435
type: Question

ruby
tags question: http://stackoverflow.com/q/27098239
tag name: ruby
tags question: http://stackoverflow.com/q/26993785
tags question: http://stackoverflow.com/q/27116725
tags question: http://stackoverflow.com/q/27089623
tags question: http://stackoverflow.com/q/27150047
tags question: http://stackoverflow.com/q/27137462
tags question: http://stackoverflow.com/q/27006749
tags question: http://stackoverflow.com/q/27004254
tags question: http://stackoverflow.com/q/27139331
tags question: http://stackoverflow.com/q/27151774
tags question: http://stackoverflow.com/q/27148712
tags question: http://stackoverflow.com/q/27085123
tags question: http://stackoverflow.com/q/27146387
tags question: http://stackoverflow.com/q/27126591
tags question: http://stackoverflow.com/q/27131711
tags question: http://stackoverflow.com/q/27049162
type: Tag

http://stackoverflow.com/a/27072942
type: Answer
score: 1
upvote count: 1
has body: Try this: function test(id) { var rmatch = /^([a-zA-Z]+?)#/; var match = id.match(rmatch); if (match) { alert(match[1]); } } Explanation: function test(id) { var rmatch = /^([a-zA-Z]+?)#/; // This constructs a regex, notice it is NOT a string literal // Gets the match followed by the various capture groups, or null if no match was found var match = id.match(rmatch); if (match) { // match[1] is the first capture group, alert that alert(match[1]); } }
downvote count: 0
answers question: http://stackoverflow.com/q/27072924

http://stackoverflow.com/comment/42708975
type: QuestionComment
has text: every value at each index is identical
comment on: http://stackoverflow.com/q/27102507
score: 0
type: Comment

http://stackoverflow.com/q/27032569
upvote count: 1
accepted answer: http://stackoverflow.com/a/27033437
possible better answer: http://stackoverflow.com/a/27032919
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27032919
tagged with: for-loop
tagged with: javascript
has title: Javascript and for loops not working
has body: I am beyond stumped on this one.. Here is the code I am executing. var Category = []; //START OF VARIABLES var ID1; var ID2; var ID3; var ID4; var ID5; var temp1; var temp2; var temp3; var temp4; var temp5; var extracats2; var Level2CatsLen; var Level3CatsLen; var Level4CatsLen; var Level5CatsLen; var Level2Children = []; var Level3Children = []; var Level4Children = []; var Level5Children = []; //END OF VARIABLES var dispatchMouseEvent = function(target, var_args) { var e = document.createEvent("MouseEvents"); e.initEvent.apply(e, Array.prototype.slice.call(arguments, 1)); target.dispatchEvent(e); target.addEventListener("click",Level2CatsLen = GetLevel2, true); } var Level1Cats = document.getElementsByClassName("p-pstctgry-lnk-ctgry "); //GETTING LEVEL 1 CATS var Level1CatsLen = Level1Cats.length; //GETTING LEVEL 1 CAT LEN function GoToLevel2(n) { //GO TO NEXT LEVEL! setTimeout(function() { ID1 = Level1Cats[n].id; temp1 = Level1Cats[n].innerHTML; temp1 = temp1.replace(/&amp;amp;/gi, "&amp;").replace(/&lt;[^&gt;]*&gt;/gi, "").replace(/&lt;[^&gt;]*&gt;/gi, ""); console.log(temp1); dispatchMouseEvent(Level1Cats[n], "mouseover", true, true); dispatchMouseEvent(Level1Cats[n], "click", true, true); }, i*2000); } function GoToLevel3(n) { //GO TO NEXT LEVEL! setTimeout(function() { ID2 = Level1Cats[n].id; temp2 = Level1Cats[n].innerHTML; temp2 =temp2.replace(/&amp;amp;/gi, "&amp;").replace(/&lt;[^&gt;]*&gt;/gi, "").replace(/&lt;[^&gt;]*&gt;/gi, ""); console.log(temp2); dispatchMouseEvent(Level3Cats[n], "mouseover", true, true); dispatchMouseEvent(Level3Cats[n], "click", true, true); }, i*1500); } function GetLevel2() { setTimeout(function() { Level2Children = []; Level2Cats = document.getElementsByClassName("p-pstctgry-lnk-ctgry"); console.log("Level1CatLen: "+Level1CatsLen); var Level2CatsLen = Level2Cats.length console.log("Level2CatLen: "+Level2CatsLen); extracats2 = Level2CatsLen - Level1CatsLen; console.log("EXTRACATS2: "+extracats2); console.log("TRYING CAT 2"); //#…
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27033437
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/a/27042520
accepted answer of: http://stackoverflow.com/q/27042428
answers question: http://stackoverflow.com/q/27042428
type: Answer
has body: scope refers to the scope of the directive, an isolated scope. element.scope()refers to the scope associated with that element. To get the isolated scope through elementyou can call element.isolateScope().
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/42808271
has text: I suppose that `something` is an object literal.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27143720

http://stackoverflow.com/comment/42687242
comment on: http://stackoverflow.com/q/27089623
type: Comment
type: QuestionComment
score: 2
has text: did you restart rails server after `bundle install`?

http://stackoverflow.com/comment/42667142
comment on: http://stackoverflow.com/a/27078467
type: Comment
score: 1
has text: Why dont you trigger the form's submit event instead?
type: AnswerComment

http://stackoverflow.com/comment/76394856
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27076107
has text: Thanks @RB., I don't know what happened. I just updated the answer with the correct link.

http://stackoverflow.com/q/27089076
score: 6
has title: React.js - Passed function "not a function" Error
has answer: http://stackoverflow.com/a/27090611
has body: I am trying to pass props from a child component to a parent component, but for some reason I'm getting the error "TypeError: this.props.onClick is not a function" in the js console after clicking on the rendered child components. Basically what I am trying to do is manage a list of categories in which one category subcomponent has the 'selected' prop as true, and updates correctly every time you click on a category li. Here is a jsfiddle with the code: http://jsfiddle.net/kb3gN/8023/ I don't really feel like I've grasped the concepts of how to use React.js effectively yet, so any help is appreciated! Best Regards and Thanks in advance, bnunamak Code: var CategoryList = React.createClass({ getInitialState:function(){ return { items:[ ["cat1", false], ["cat2", true] ], lastToggled:["cat2"] } }, //Function passed to child (changes items state) handleClick:function(child){ var tempItems = this.state.items; if(this.state.lastToggled[0] === child.props.name){ var index = this.getInd(this.state.tempItems, child.props.name); tempItems[index][1] = !tempItems[index][1]; this.setState({items: tempItems}); }else{ var newIndex = this.getInd(this.state.tempItems, child.props.name); tempItems[newIndex][1] = !tempItems[newIndex][1]; var oldIndex = this.getInd(this.state.tempItems, this.state.lastToggled[0]); tempItems[oldIndex][1] = false; this.setState({items: tempItems, lastToggled: tempItems[newIndex][0]}); } }, //getInd not relevant to problem getInd:function(arr, elname){ for (var i = arr.length - 1; i &gt;= 0; i--) { if(arr[i][0] === elname){ return i; } }; return -1; }, render:function(){ return (&lt;ul className="category-list"&gt; { this.state.items.map(function(item){ return &lt;Category onClick={this.handleClick} name={item[0]} selected={item[1]} /&gt;; }) } &lt;/ul&gt;) } }); var Category = React.createClass({ render:function(){ if(this.props.selected){ return (&lt;li onClick={this.propogateClick} className="selected"&gt;{this.props.name}&lt;/li&gt;); }else{ return (&l…
type: Question
tagged with: reactjs
answer count: 2
upvote count: 6
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27089445
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27107794
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42933272
answer count: 0
tagged with: java
type: Question
has comment: http://stackoverflow.com/comment/42720299
tagged with: javascript
tagged with: jquery
has body: In blueimp JQuery fileupload the backend I am using is struts 2. I want to send reponse image preview. Am getting image name and size except the image preview and href. Fire bug: Photo-0010.jpg 310.12 KB I am not doing anything to get the title of the image, just getting the files and uploading in a path in action class. I don't know where its getting the name of the image but why not the href link. I tried to display using <img src="<s:property value="filesFileName"/>"/> but its not working. It is going to "// Callback for failed (abort or error) uploads: fail: function (e, data) " in jquery.fileupload-ui.js I want to display the image preview and `href`. Can anyone help?
tagged with: struts2
score: 0
has comment: http://stackoverflow.com/comment/42724645
has comment: http://stackoverflow.com/comment/42718766
has title: java - Error Internal Server Error” in blueimp

http://stackoverflow.com/comment/42713624
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/27105163
has text: You need to add jQuery UI library ` `
type: Comment

http://stackoverflow.com/q/27110606
has title: Array creation in JavaScript
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/13142968
duplicate of: http://stackoverflow.com/q/7837456
linked to: http://stackoverflow.com/q/7837456
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42724248
linked to: http://stackoverflow.com/q/201183
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42724202
type: Question
has body: This might be a rather silly question, but I am having some troubles with arrays in Javascript right now. Namely, why is this: var data = new Array(new Array('a', 'b', 'c')); not equal to this: var data2 = 'a', 'b', 'c'; If I compare both arrays and print out the result it says false. Why is that? alert(data2==data); &gt;false and much more confusing, if I create a third data array as data2 and name it data3, why is it still returning false when I compare both? var data3 = 'a', 'b', 'c'; alert(data2==data3); &gt;false Am I getting something wrong here?
tagged with: javascript
has answer: http://stackoverflow.com/a/27110715
score: 0
has comment: http://stackoverflow.com/comment/42724158

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/27143740

http://stackoverflow.com/comment/42636158
comment on: http://stackoverflow.com/q/27060811
has text: @AlexK Hmm, that looks suspiciously like an answer, not a comment.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42765982
has text: @ajp15243: Mmmh, yeah. For me, the term "array" also implies an order (just like it works in PHP). However, the properties of an object are not ordered. But I guess an "associative array" is really just a dictionary, in which case I agree.
type: QuestionComment
comment on: http://stackoverflow.com/q/27133645
score: 0
type: Comment

http://stackoverflow.com/comment/42574635
comment on: http://stackoverflow.com/a/27006533
type: Comment
has text: @RickHitchcock Thanks man. I initially did `new Function` the way you did, but it still loads an additional compiler similar to `eval`. I eventually decided just to bite the bullet and make a `switch` statement.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42743538
type: AnswerComment
has text: not so much looking for a smaller file, I guess I was pondering overheads, I probably need to look into what `.bind()` actually does.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27121118

http://stackoverflow.com/comment/42748582
has text: Perfect! thanks very much, just need to get the code changing from open to close and I am sorted. Thank you!
comment on: http://stackoverflow.com/a/27116800
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42620638
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27050520
type: Comment
has text: no problem, thanks for help. I tried it and its working. thanks again

http://stackoverflow.com/a/27009929
answers question: http://stackoverflow.com/q/27009838
accepted answer of: http://stackoverflow.com/q/27009838
type: Answer
has body: Make it an IIFE (invokes immediately): var groupSetter = (function groupSetter(){ console.log('asdfasdf'); return groupSetter; })(); And re-use it later: $(window).resize(groupSetter); http://jsfiddle.net/6dewxnL9/
has comment: http://stackoverflow.com/comment/42547257
has comment: http://stackoverflow.com/comment/42547362
score: 1
upvote count: 2
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/q/27049625
has answer: http://stackoverflow.com/a/27051386
linked to: http://stackoverflow.com/q/7522848
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42619578
tagged with: internet-explorer-9
type: Question
answer count: 2
has body: I have some html as follows (for IE9): Some editable text uneditable text more editable text In IE9 the span contenteditable must be set to "true" to make the span uneditable and in Chrome it is set to "false" to make the span uneditable!! However, in IE9 when the mouse goes over the span the cursor appears as the move cursor (crossed arrows). The cursor is set in my css file to be 'pointer', but this is not working for IE9. How can I change the cursor to be a hand or an arrow in IE9?
tagged with: javascript
linked to: http://stackoverflow.com/q/14615551
has title: Wrong cursor showing in IE9 contenteditable
has answer: http://stackoverflow.com/a/27050328
score: 0

http://stackoverflow.com/a/27141211
accepted answer of: http://stackoverflow.com/q/27141117
type: AcceptedAnswer
type: Answer
score: 0
has body: Modified the code as below per Stephen Muecke suggestion: @using (Html.BeginForm("TestAction", "Customer", FormMethod.Post)) { &lt;div data-ng-app="v"&gt; &lt;div ng-controller="TypeAheadController"&gt; &lt;input type="text" id="txtType" ng-model="selected" typeahead-on-select="callBack($item,$model,$label)" typeahead="state as state.Name for state in states | filter:$viewValue | limitTo:8" class="form-control"&gt; @Html.Hidden("hdnCityAreaService") &lt;input type="submit" id="sub" name="sub" value="click"/&gt; &lt;/div&gt; &lt;/div&gt; } public void TestAction(string hdnCityAreaService) { ReturnView(); }
answers question: http://stackoverflow.com/q/27141117

http://stackoverflow.com/comment/42683330
has text: How could the `for` loop possibly work - its generating an array. Your posting back to a controller method that accepts an object, not an collection!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27087421

http://stackoverflow.com/comment/42736544
comment on: http://stackoverflow.com/q/27117106
has text: you can't use `this` plus a string as a selector. and remove that space before `:checked`
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42726229
score: 0
comment on: http://stackoverflow.com/a/27096048
has text: Perfect!, Good luck with that! Please let me know if works. I updated my code if you want to take a look.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42781166
has text: It's purely preference, assuming you work within a team you should try and discover what the guidelines are, to make it easier to work on other peoples' code. Otherwise, work out what you find more comfortable to work with.
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/27142056

backbone.js
tags question: http://stackoverflow.com/q/27029732
tags question: http://stackoverflow.com/q/27058087
tags question: http://stackoverflow.com/q/27055985
tags question: http://stackoverflow.com/q/27082496
tags question: http://stackoverflow.com/q/27085309
tags question: http://stackoverflow.com/q/27043020
tags question: http://stackoverflow.com/q/27016211
tags question: http://stackoverflow.com/q/27112969
tags question: http://stackoverflow.com/q/26999227
tags question: http://stackoverflow.com/q/27131346
tags question: http://stackoverflow.com/q/27123531
tags question: http://stackoverflow.com/q/27146959
tags question: http://stackoverflow.com/q/27048839
tags question: http://stackoverflow.com/q/27121510
tags question: http://stackoverflow.com/q/27107761
tags question: http://stackoverflow.com/q/27093307
tags question: http://stackoverflow.com/q/27006520
tags question: http://stackoverflow.com/q/27141666
tags question: http://stackoverflow.com/q/27113207
tags question: http://stackoverflow.com/q/27089968
tags question: http://stackoverflow.com/q/27147125
tags question: http://stackoverflow.com/q/27019968
tags question: http://stackoverflow.com/q/27066062
tags question: http://stackoverflow.com/q/27125865
tags question: http://stackoverflow.com/q/27042454
tags question: http://stackoverflow.com/q/27132253
tags question: http://stackoverflow.com/q/27003906
tags question: http://stackoverflow.com/q/27106008
tags question: http://stackoverflow.com/q/27041234
tags question: http://stackoverflow.com/q/27025457
tags question: http://stackoverflow.com/q/27004960
tags question: http://stackoverflow.com/q/27002466
tags question: http://stackoverflow.com/q/27106999
tags question: http://stackoverflow.com/q/27048368
tags question: http://stackoverflow.com/q/26998675
tags question: http://stackoverflow.com/q/27029785
tags question: http://stackoverflow.com/q/27089761
tags question: http://stackoverflow.com/q/27060661
tags question: http://stackoverflow.com/q/27047767
tags question: http://stackoverflow.com/q/27047944
tags question: http://stackoverflow.com/q/27062274
tags question: http://stackoverflow.com/q/27067162
tags question: http://stackoverflow.com/q/27021777
tags question: http://stackoverflow.com/q/27021976
tags question: http://stackoverflow.com/q/27086259
tags question: http://stackoverflow.com/q/26994271
tags question: http://stackoverflow.com/q/27015147
tags question: http://stackoverflow.com/q/27103966
tags question: http://stackoverflow.com/q/27060930
tags question: http://stackoverflow.com/q/27052079
tags question: http://stackoverflow.com/q/26999781
tags question: http://stackoverflow.com/q/27023056
tags question: http://stackoverflow.com/q/27100949
tags question: http://stackoverflow.com/q/27109299
tags question: http://stackoverflow.com/q/27137848
tags question: http://stackoverflow.com/q/27003250
tags question: http://stackoverflow.com/q/27083704
tags question: http://stackoverflow.com/q/27062222
type: Tag
tags question: http://stackoverflow.com/q/27118771
tags question: http://stackoverflow.com/q/27148287
tags question: http://stackoverflow.com/q/27130455
tags question: http://stackoverflow.com/q/27145325
tags question: http://stackoverflow.com/q/27015712
tags question: http://stackoverflow.com/q/27035872
tags question: http://stackoverflow.com/q/27101658
tags question: http://stackoverflow.com/q/27059071
tags question: http://stackoverflow.com/q/27038366
tag name: backbone.js

http://stackoverflow.com/comment/42732031
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27110527
type: Comment
has text: Thanks for raising those issues @j08691, I've updated the answer.

http://stackoverflow.com/comment/42602770
comment on: http://stackoverflow.com/q/27039636
type: Comment
type: QuestionComment
has text: @user73595: If your aim is to get a better understanding of Symfony, you're much better of following the cookbook (AcmeDemoBundle), instead of focusing on a single detail, that most of us would solve using a plugin/bundle, or even an iframe or custom google search
score: 0

http://stackoverflow.com/q/27102561
type: Question
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/42709029
upvote count: 0
has answer: http://stackoverflow.com/a/27102606
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27102717
favorite count: 0
has title: cors not resolving inspite of setting headers, i dont want to use jsonp
tagged with: ajax
has comment: http://stackoverflow.com/comment/42709752
has comment: http://stackoverflow.com/comment/42709585
type: UnansweredQuestion
downvote count: 1
has body: I am trying to invoke an api using ajax jquery , it should give me json response i used the below methos $.ajax({ type:'GET', url: 'http://example.com', headers:{ 'Access-Control-Allow-Origin':'*', 'Access-Control-Allow-Headers':'X-Requested-With', 'Access-Control-Allow-Methods': 'POST, GET', }, //headers:{"Access-Control-Allow-Origin":"*"}, dataType: "json", success: function(msg) { alert("data loaded"); console.log(msg); } }); but this still gives me the below warning on console Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://example.com and it gives me error as NetworkError: 401 Unauthorized

http://stackoverflow.com/comment/42697489
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27095787
type: AnswerComment
has text: @user1739140 yes, because a reference to the variable without `()` does not call the function. The value passed to `alert()` is the function itself.

http://stackoverflow.com/comment/42673521
comment on: http://stackoverflow.com/a/27081980
type: AnswerComment
has text: hmm this didn't work for me. doesn't give me any errors in console either.
type: Comment
score: 0

http://stackoverflow.com/q/27117850
has answer: http://stackoverflow.com/a/27118181
has answer: http://stackoverflow.com/a/27118076
has comment: http://stackoverflow.com/comment/42737839
has answer: http://stackoverflow.com/a/53584253
has body: What is the correct way to define a custom error in JavaScript? Searching through SO I've found about 6 different ways to define a custom error, but I'm unsure as to the (dis)advantages to each of them. From my (limited) understanding of prototype inheritance in JavaScript, this code should be sufficient: function CustomError(message) { this.name = "CustomError"; this.message = message; } CustomError.prototype = Object.create(Error.prototype);
has title: Correct way to create custom errors in javascript
tagged with: javascript
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/27118036
downvote count: 0
accepted answer: http://stackoverflow.com/a/27118181
favorite count: 0
has comment: http://stackoverflow.com/comment/42737956
has comment: http://stackoverflow.com/comment/42737897
has comment: http://stackoverflow.com/comment/42738171
linked to: http://stackoverflow.com/q/783818
has comment: http://stackoverflow.com/comment/42738101
answer count: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17392857
linked to: http://stackoverflow.com/q/1382107
possible better answer: http://stackoverflow.com/a/27118076
type: Question

http://stackoverflow.com/comment/42737313
score: 0
has text: it seems so, yes. It's weird. Most fusion tables syntax is SQL like, and field names should be enclosed either in backticks or double quotes, but in thid case only singles quotes seem to work.
type: Comment
comment on: http://stackoverflow.com/a/27071786
type: AnswerComment

http://stackoverflow.com/q/27002486
score: 1
has comment: http://stackoverflow.com/comment/42534792
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27002947
has body: I have two functions, 1) download(uri, filename, callback) -> Downloads an image to a specific location 2) twitterPost(filename) -> Tweets the image I need to do this Asynchronously - so I call twitterPost after the image is done downloading, however I receive this error every time: throw new Error('File path does not exist: ' + media); ^ Error: File path does not exist: Imgs/18478-wrt1114.jpg Now I understand that this is appearing because the image has not downloaded, however it doesn't make sense seeing that the callback function is called after the pipe is closed. Here is my code for both functions: function download(uri, filename, callback) { request.head(uri, function(err, res, body) { request(uri).pipe(fs.createWriteStream(filename)).on('end', callback); }); }; and function twitterPost(filename) { var twitterRestClient = new Twitter.RestClient( // API KEYS AND STUFF HERE ); twitterRestClient.statusesUpdateWithMedia( { 'status': 'Test Tweet', 'media[]': filename }, function(error, result) { if (error) { console.log('Error: ' + error.message) } if (result) { console.log(result.text) } }); } Here is my function call: download(image, filename,twitterPost(filename)); Am I using callbacks incorrectly, or is there some other issue that I am not noticing causing this problem Thank you for you help!
type: Question
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27002947
tagged with: javascript
has answer: http://stackoverflow.com/a/27003037
accepted answer: http://stackoverflow.com/a/27003037
tagged with: callback
favorite count: 0
has title: Javascript Callback Functions - Node.js
tagged with: node.js
tagged with: download
downvote count: 0

http://stackoverflow.com/q/27048733
has answer: http://stackoverflow.com/a/27048850
score: -5
has answer: http://stackoverflow.com/a/27048811
type: Question
possible better answer: http://stackoverflow.com/a/27048802
has answer: http://stackoverflow.com/a/27048815
has comment: http://stackoverflow.com/comment/42615229
has body: If I have the following in javascript.. var one = 600; var two = "mins"; How can I achieve the result that equals "600mins"?
tagged with: javascript
has comment: http://stackoverflow.com/comment/42615290
answer count: 7
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42615293
has answer: http://stackoverflow.com/a/27048802
has comment: http://stackoverflow.com/comment/42615216
has title: Adding quotes in javascript
downvote count: 5
has answer: http://stackoverflow.com/a/27048866
has answer: http://stackoverflow.com/a/27048808
accepted answer: http://stackoverflow.com/a/27048808
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27048825
upvote count: 0

http://stackoverflow.com/comment/42638174
type: Comment
has text: Thank you for your kind help. Generally it show good results, but unfortunately it fails with some chars like `\``,`~` which do input value. And it might have others in utf-8. http://jsfiddle.net/0b581Lrz/
comment on: http://stackoverflow.com/a/27061746
type: AnswerComment
score: 0

http://stackoverflow.com/q/26994209
has answer: http://stackoverflow.com/a/26994268
has comment: http://stackoverflow.com/comment/42582636
type: Question
tagged with: cors
has title: Phonegap error with xmlHttpRequest
answer count: 1
has body: I'm just trying to get login page for my app with this code: &lt;script type="text/javascript"&gt; $(document).ready(function() { $(".loa").load("http://www.agroagro.com/login.php"); }); &lt;/script&gt; I get this error: XMLHttpRequest cannot load http://www.agroagro.com/login.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://agroagro.com' is therefore not allowed access. The problem is when I have only .load(login.php) everything works fine but when I type .load(agroagro.com/login.php) I get error from above, so becouse i want to use phonegap to build native app i need to have full url address? Any idea how to solve this? Also one more question - Is better way like I do load .php file via JQ or is better to make a AJAX call to php file ? For me its easier to make a load .php file becouse I have code there where I'm not using ajax. What about performance - load .php or make ajax call ?
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42543630
tagged with: cordova
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/a/26994268
answers question: http://stackoverflow.com/q/26994209
has comment: http://stackoverflow.com/comment/42537375
has comment: http://stackoverflow.com/comment/42519654
has comment: http://stackoverflow.com/comment/42519299
upvote count: 1
has comment: http://stackoverflow.com/comment/42519486
has comment: http://stackoverflow.com/comment/42565643
has comment: http://stackoverflow.com/comment/42519591
has comment: http://stackoverflow.com/comment/42526024
has comment: http://stackoverflow.com/comment/42519166
score: 1
has comment: http://stackoverflow.com/comment/42523803
has body: The Browsers do not allow us to make call to other domains unless or otherwise we have had the allow request from where we are requestion or for all other domains header('Access-Control-Allow-Origin: *'); Use the above line in the http://www.agroagro.com/login.php page Hope it works
downvote count: 0
type: Answer

http://stackoverflow.com/a/27106231
has body: I want to mention that Global variables are bad. Try to limit yourself to as few of them as possible. Global namespace pollution is very dangerous and can cause unexpected errors in the future. A technique I often use to get around the issue of polluting the global namespace is by creating your own namespace. For example, you can do something like window.myNamespace = window.myNameSpace || {}; window.myNamespace.TranslateView = ...; window.myNamespace.HomeView = ...; If HomeView and TranslateView belong to different modules, you can also namespace those. window.myNamespace.TransteModule = {}; window.myNamespace.TransteModule.TranslateView = ....; This way you only create 1 global variable for your namespace. You also get the benefit of easily identifying the view by its containing module.
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27106008
answers question: http://stackoverflow.com/q/27106008
score: 0

http://stackoverflow.com/comment/42602328
comment on: http://stackoverflow.com/q/27040789
score: 0
type: Comment
type: QuestionComment
has text: var data = "<?php echo json_encode("42");?>";

http://stackoverflow.com/comment/42595217
comment on: http://stackoverflow.com/q/27037671
type: QuestionComment
has text: `fArr[i]` is not a function, why are you trying to call it?
type: Comment
score: 1

callback
tags question: http://stackoverflow.com/q/27044866
tags question: http://stackoverflow.com/q/27113871
tag name: callback
tags question: http://stackoverflow.com/q/27019581
tags question: http://stackoverflow.com/q/27144125
tags question: http://stackoverflow.com/q/27045767
tags question: http://stackoverflow.com/q/27002486
tags question: http://stackoverflow.com/q/27025457
tags question: http://stackoverflow.com/q/27051728
tags question: http://stackoverflow.com/q/27111865
tags question: http://stackoverflow.com/q/27108517
tags question: http://stackoverflow.com/q/27050901
tags question: http://stackoverflow.com/q/27085487
tags question: http://stackoverflow.com/q/27081949
type: Tag
tags question: http://stackoverflow.com/q/27001633

http://stackoverflow.com/q/27145589
has answer: http://stackoverflow.com/a/27146321
answer count: 2
downvote count: 4
accepted answer: http://stackoverflow.com/a/27146089
upvote count: 0
has comment: http://stackoverflow.com/comment/42787274
favorite count: 0
has comment: http://stackoverflow.com/comment/42787084
score: -4
has body: I am having trouble getting GMaps.js working, I followed the instructions on https://hpneo.github.io/gmaps/examples/basic.html but the map does not appear, I am also getting the error message: " Uncaught ReferenceError: GMaps is not defined" in Chrome's developer tools. Demo: http://jsfiddle.net/q80xqxxo/1/ HTML MAP CSS #map { height:500px; width:500px; background-color:darkblue } Javascript new GMaps({ div: '#map', lat: -12.043333, lng: -77.028333 });
has title: Why isn't my GMaps.js working?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27146089
type: Question
tagged with: gmaps.js
tagged with: google-maps
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27146321

http://stackoverflow.com/q/27047810
has answer: http://stackoverflow.com/a/27141933
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27055025
score: 0
has title: How to disable previous dates on the TO calendar?
answer count: 3
has comment: http://stackoverflow.com/comment/42613953
linked to: http://stackoverflow.com/q/15757918
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27048528
tagged with: jquery-ui-datepicker
type: Question
has body: This is the script I am using. What changes to be done? $( "#from" ).datepicker defaultDate: "+1w", changeMonth: true, numberOfMonths: 3, $( "#to" ).datepicker defaultDate: "+1w", changeMonth: true, numberOfMonths: 3
has comment: http://stackoverflow.com/comment/42626528

http://stackoverflow.com/comment/42576654
type: AnswerComment
comment on: http://stackoverflow.com/a/27026313
has text: @BenjaminGruenbaum please check out the sample code. I don't think this is a dupe.
score: 0
type: Comment

http://stackoverflow.com/comment/42742083
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27065077
has text: Yes, the console message.
score: 0

http://stackoverflow.com/comment/103683425
type: AnswerComment
has text: Doesn't close on second click. Is it possible to? @JensKooij
comment on: http://stackoverflow.com/a/27130507
type: Comment
score: 0

http://stackoverflow.com/q/27014772
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42558758
answer count: 0
has body: I playing around with simple D3.js chart. Previously I updated it by removing SVG group and create new chart. I want to change it to update paths after new data will come without removing svg. However, its not updating it and I have no idea what I doing wrong. FIDDLE JS var update_counter = 0; function drawChart() { var pie_d = 185, r = pie_d / 2, pieData = [1, Math.random() * 10], pie = d3.layout.pie(), arc = d3.svg.arc().innerRadius(60).outerRadius(r); update_counter++; if (!document.querySelectorAll('.svg svg').length) { d3.select('.svg').append('svg:svg') .data([pieData]) .attr('width', pie_d) .attr('height', pie_d); } else { d3.select('.svg svg') .data([pieData]); } var arcs = d3.select('.svg svg').selectAll('g') .data(pie) .enter().append('svg:g') .attr('transform', 'translate(' + r + ',' + r + ')'); arcs.append('svg:path') .attr('d', arc) .attr('class', function (d, i) { return i === 0 ? 'onl' : 'ter' }); d3.select('.counter').text(update_counter); } drawChart(); setInterval(function () { drawChart() }, 5000); UDPATE Nearly there but still sometimes animation 'jump' FIDDLE
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42555421
score: 0
has title: Update data in simple D3.js doughnut chart with animation

facebook
tags question: http://stackoverflow.com/q/27103813
tags question: http://stackoverflow.com/q/27023280
tags question: http://stackoverflow.com/q/27031722
type: Tag
tags question: http://stackoverflow.com/q/27143266
tags question: http://stackoverflow.com/q/27133592
tags question: http://stackoverflow.com/q/27078789
tags question: http://stackoverflow.com/q/27056536
tags question: http://stackoverflow.com/q/27091871
tags question: http://stackoverflow.com/q/26994713
tags question: http://stackoverflow.com/q/27099506
tags question: http://stackoverflow.com/q/27038487
tags question: http://stackoverflow.com/q/27105273
tags question: http://stackoverflow.com/q/27005566
tags question: http://stackoverflow.com/q/27141639
tag name: facebook
tags question: http://stackoverflow.com/q/27093453
tags question: http://stackoverflow.com/q/27051728
tags question: http://stackoverflow.com/q/27118174
tags question: http://stackoverflow.com/q/27023065
tags question: http://stackoverflow.com/q/27058901
tags question: http://stackoverflow.com/q/27106234
tags question: http://stackoverflow.com/q/27129195
tags question: http://stackoverflow.com/q/27148623
tags question: http://stackoverflow.com/q/26995752
tags question: http://stackoverflow.com/q/26992168
tags question: http://stackoverflow.com/q/27114475
tags question: http://stackoverflow.com/q/27088244
tags question: http://stackoverflow.com/q/27073355
tags question: http://stackoverflow.com/q/27087034
tags question: http://stackoverflow.com/q/27015944
tags question: http://stackoverflow.com/q/27099782
tags question: http://stackoverflow.com/q/27080936

http://stackoverflow.com/comment/42795129
score: 4
comment on: http://stackoverflow.com/q/27150304
type: Comment
type: QuestionComment
has text: Are you accessing the db from a server side script? If so, do it there

http://stackoverflow.com/q/27029084
has comment: http://stackoverflow.com/comment/42581061
accepted answer: http://stackoverflow.com/a/27029354
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42580914
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27029354
favorite count: 0
has body: I'm trying to put together a little script to save some typing for some stuff we type repetitively at my office. Basically the idea is that you select a couple options and then the page displays a paragraph inserting some of the selected custom text at various places. Anyways, this is what I have, and it isn't working. I've tried putting some console.logs in the JavaScript, and they aren't doing anything. Why? His Her security questions first year attended birthday and mailing address
has title: JavaScript Not Displaying Compiled Text
type: AnsweredQuestion

http://stackoverflow.com/comment/42651785
type: Comment
has text: You can add `imgObj.style.top = document.documentElement.clientHeight - imgObj.height;` after the line `left = imgObj.style.left = 0;`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27068561

http://stackoverflow.com/q/27099721
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42704350
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has title: How to show restful api fetched data in a div using for loop?
tagged with: javascript
has body: I am working on a project and I want to show the api fetched results in this div. Now I have to set the restful api fetched value to this div in exactly the same design. Please suggest how do I do this ? This is the bus api field and I want to the result in a ul li field . Can I append this? Economy Carbmw mini 4 3 Location London city per day$45.39 select
linked to: http://stackoverflow.com/q/1145208
accepted answer: http://stackoverflow.com/a/27099974
tagged with: api
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27099974

http://stackoverflow.com/a/27011683
has comment: http://stackoverflow.com/comment/42553000
answers question: http://stackoverflow.com/q/27011019
has comment: http://stackoverflow.com/comment/42552887
has comment: http://stackoverflow.com/comment/42553037
score: 0
has comment: http://stackoverflow.com/comment/42553046
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42553725
has comment: http://stackoverflow.com/comment/42554836
has comment: http://stackoverflow.com/comment/42552608
has body: I think you misunderstood the syntax. You can bind to the resize event to do what you want: (function () { var maxWidth = $('.wrapper').width(); $('.demo').resizable({ resize: function (e, ui) { var x = e.pageX; $(this).width(x); $('.demo2').width(maxWidth - x);; } }); })(); Demo: http://jsfiddle.net/rcsxj3xb/1/
type: Answer
has comment: http://stackoverflow.com/comment/42553586
has comment: http://stackoverflow.com/comment/42554105
accepted answer of: http://stackoverflow.com/q/27011019
has comment: http://stackoverflow.com/comment/42553085

http://stackoverflow.com/comment/42726885
comment on: http://stackoverflow.com/q/27111865
type: QuestionComment
type: Comment
has text: Also, I would think that your `accumulator` that you pass to `reduce` would have to take both the current value and the accumulated value in order to be able to do anything useful with it.
score: 3

http://stackoverflow.com/comment/42781936
score: 0
has text: Thank you. Do you want to add it as answer? I can +1 it for you then
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27135056

http://stackoverflow.com/a/27121814
upvote count: 1
has body: It's possible to watch DOM changes, here's an example: http://jsfiddle.net/kihu/t7zr71ma/5/ The trick is to pass a function returning anything you want to watch, e.g.: scope.$watch(function () { return element.text(); }, handleChange) But I think @Enzey is right, you should avoid watching the DOM, instead you should bind data from angular scope and watch it.
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27118509
score: 1

http://stackoverflow.com/a/27145346
score: 3
accepted answer of: http://stackoverflow.com/q/27138123
has body: If you are using this solution in combination with bloudhound you will need to alter bloodhound.js or the bundle.js as well. In typeahead.bundle.js or bloodhound.js add find this code (line 450) return matches ? _.map(unique(matches), function(id) { return that.datums[id]; }) : []; Add this check to return all suggestions if the token input is empty: if (tokens == '') return that.datums; It will now look like: if (tokens == '') return that.datums; return matches ? _.map(unique(matches), function(id) { return that.datums[id]; }) : []; I have tested this in your fiddle and it works.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42802444
type: Answer
has comment: http://stackoverflow.com/comment/49586767
upvote count: 3
answers question: http://stackoverflow.com/q/27138123
has comment: http://stackoverflow.com/comment/42801209
has comment: http://stackoverflow.com/comment/42796975

http://stackoverflow.com/q/27029001
has comment: http://stackoverflow.com/comment/42580933
tagged with: javascript
score: 0
has title: JS using class variable
has comment: http://stackoverflow.com/comment/42580841
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42580806
duplicate of: http://stackoverflow.com/q/1114024
has comment: http://stackoverflow.com/comment/42580883
answer count: 0
linked to: http://stackoverflow.com/q/1114024
has comment: http://stackoverflow.com/comment/42580792
type: Question
has body: I know there's no class in JS, but there's something like class, what is really weird for me. I'm quiet new to JS, and I'm trying to build a simple "class". This is how I tried: Game = new function() { this.action_finish = 0; this.thick = function() { $('#action-finish').text(Game.action_finish--); setTimeout(this.thick, 1000); }; }; This is how it worked for me, and I'm wondering, why this.action_finish (returns NaN) does not work in thick function instead of Game.action_finish. Could anyone explain why does it work like this? I've been developing in PHP and C# for years an this approach is hard for me to understand. Ps.: I don't need more instances of this class, and I'd like to use it like a class that's why I'm using the new keyword. Edit: This is how I'm using it: Game.action_finish = 10; Game.thick(); Edit: Finally I solved my problem. As I tried to define my issue wasnt about the methods of declaring a class, but of reaching a class variable. Here's the solution in case if anyone has the same problem: this.thick.bind(this) A little explanation can be found here: http://javascript.info/tutorial/binding

http://stackoverflow.com/q/27033216
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27033385
has answer: http://stackoverflow.com/a/27033560
type: AnsweredQuestion
upvote count: 1
type: Question
has body: I have two spans: Show link -3456 Hide link -n 1234 - 4567 -7777 -3456 Basically first span's link shows full number on click of show link and hides itself. On click of hide I want to again regain the original state with show link and last 4 digits of number.. Could anyone please help me out I am stuck in such a simple code :( ?
possible better answer: http://stackoverflow.com/a/27033503
score: 1
accepted answer: http://stackoverflow.com/a/27033385
has answer: http://stackoverflow.com/a/27033503
has title: Want to show and hide data using jquery or javascript inside html page

http://stackoverflow.com/q/27061783
has comment: http://stackoverflow.com/comment/42638796
has body: I have a button on my webpage. If a user clicks it, a task starts and returns a ID. I want to use this ID to check the progress of the task in another ajax call, to let the user know if the task was completed. I have tried this, but I don't think it is the correct way: Edit I updated my code, so the first url also gives a json response. But If I try my code I get this error: Uncaught SyntaxError: Unexpected identifier
has comment: http://stackoverflow.com/comment/42637878
linked to: http://stackoverflow.com/q/27052741
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42639905
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42637818
has comment: http://stackoverflow.com/comment/42638183
has comment: http://stackoverflow.com/comment/42638044
has answer: http://stackoverflow.com/a/27062915
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42642332
has comment: http://stackoverflow.com/comment/42639030
has comment: http://stackoverflow.com/comment/42638603
has title: Ajax call inside ajax
has comment: http://stackoverflow.com/comment/42637867
has comment: http://stackoverflow.com/comment/42639297
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42637788
tagged with: javascript
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/27062915

http://stackoverflow.com/q/27013428
has answer: http://stackoverflow.com/a/27024421
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
tagged with: ajax
tagged with: python
has comment: http://stackoverflow.com/comment/42570112
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42571491
score: 1
has title: Trying to scrape data generated by ajax request using scrapy, but the ajax request redirects to home page
accepted answer: http://stackoverflow.com/a/27024421
has body: I am new to scraping so i am not sure why i am getting this problem. I am trying to scrape customer vendor chats from anyvan.com. A normal job page of the site looks like this. Clicking on the pink view button in the bids session sends an ajax request which then loads the chats. This XHR request can been seen in Developers tool -> Network -> filter XHR request. I am using the following simple spider to simulate that request using scrapy but it seems that I am getting redirected to anyvan.com class AVSpider(Spider): name = "anyvanscraper" allowed_domains = ["anyvan.com"] # This start URL is the job URL start_urls = ["http://www.anyvan.com/view-listing/1935650"] def parse(self, response): # This receives the response from the start url. But we don't do anything with it. url = 'http://www.anyvan.com/ajax-bid-comment/bid/14916780' return Request('http://www.anyvan.com/ajax-bid-comment/bid/14916780' , callback=self.parse_stores) def parse_stores(self, response): y = response.body f = open('html.txt','w') f.write(BeautifulSoup(y).prettify().encode('utf-8')) Thanks in advance Ellen
tagged with: web-scraping
tagged with: scrapy
type: Question

http://stackoverflow.com/comment/42528118
has text: Why in the name of Grizzly Adams would you want to include html pages as `.js` files ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26998818

http://stackoverflow.com/q/26993504
upvote count: 7
has body: I'm looking for a solution which allows me to open native SMS editor from web-page. Body of the message has to be prepopulated and receiver's phone number has to be empty. There are plenty of suggestions here in stackoverflow to just format anchor or redirect via javascript but unfortunately these solutions are outdated and either do not work as is or are stripped for security reasons. I've tested following formats on various platforms, but unfortunately they don't work on all devices. I'm looking for an universal solution or library to fulfill the requirements I mentioned. Send SMS Send SMS Used to work on IOS devices but doesn't work anymore. Apparently pre-filled body only works if you supply a phone number which you have in your contacts. Send SMS Send SMS Works on most android devices. Opens up SMS editor, but only some versions allow prepopulated body. Windows Phone doesn't seem to do anything. I'm starting to wonder if this is just an endless swamp of compability issues. Technology which the web application is built-on is ASP.NET MVC 5.
favorite count: 0
tagged with: windows-phone
answer count: 5
type: UnansweredQuestion
tagged with: android
has answer: http://stackoverflow.com/a/77421301
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 7
has answer: http://stackoverflow.com/a/30133661
type: Question
has answer: http://stackoverflow.com/a/33689295
has answer: http://stackoverflow.com/a/56666688
has title: Opening SMS editor from web application
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/26993729

http://stackoverflow.com/comment/42622204
comment on: http://stackoverflow.com/q/27050631
has text: OH! You're the Tim Down who authored log4javascript !! I'm honoured! You may be interested to know I just succeeded in embedding log4javascript into Google Apps Script and logging to a Google Spreadsheet. You can clone this folder and mess with it if you like : https://drive.google.com/drive/#folders/0B6GUFwft5liMTDhuZUtJSmszU28 Of course, you'll need to search for "var logSheet = SpreadsheetApp.openById" and replace the spreadsheet key with your own copy's key. Let me know if you have problems.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27133582
score: 2
has body: You can use the index() method: $('body').on('click','.tab',function(){ var tabIdx = $(this).index() + 1; switch (tabIdx) { case 1: // do something for 1 break; case 2: // do something for 2 break; case 3: // do something for 3 break; } }); See Documentation
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27133534
answers question: http://stackoverflow.com/q/27133534
type: Answer

http://stackoverflow.com/comment/42687874
type: QuestionComment
comment on: http://stackoverflow.com/q/27090463
score: 0
has text: OK I'll edit my answer to use your markup; same basic idea.
type: Comment

http://stackoverflow.com/comment/42750663
score: 0
type: Comment
type: QuestionComment
has text: @ArpitSrivastava the css I use to changed my existing ones is found in the link http://www.eyecon.ro/bootstrap-datepicker/. I'm not sure if I get you right.
comment on: http://stackoverflow.com/q/27125168

http://stackoverflow.com/a/27077511
has body: Try changing echo ' Notify me! '; to echo ' Notify me! '; In your script you are actually sending "lol" as text, not the value of $ID. You can check this by right clicking on the browser after you have loaded the html, and displaying the source code. Find this line and check that it is doing what you think it is doing.
accepted answer of: http://stackoverflow.com/q/27076976
has comment: http://stackoverflow.com/comment/42685985
score: 0
answers question: http://stackoverflow.com/q/27076976
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42665909

datatables
tags question: http://stackoverflow.com/q/27024127
tags question: http://stackoverflow.com/q/27151907
tags question: http://stackoverflow.com/q/27152299
tags question: http://stackoverflow.com/q/27123409
tags question: http://stackoverflow.com/q/27143582
tags question: http://stackoverflow.com/q/27144640
tags question: http://stackoverflow.com/q/27149676
tags question: http://stackoverflow.com/q/27131632
tags question: http://stackoverflow.com/q/27065988
tags question: http://stackoverflow.com/q/27022729
tags question: http://stackoverflow.com/q/27001371
tags question: http://stackoverflow.com/q/27039668
type: Tag
tags question: http://stackoverflow.com/q/27063225
tag name: datatables
tags question: http://stackoverflow.com/q/27039474
tags question: http://stackoverflow.com/q/27089925
tags question: http://stackoverflow.com/q/27004271
tags question: http://stackoverflow.com/q/27014440

http://stackoverflow.com/q/27022729
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27026329
has body: I am using datatables and wanted to represent hierarchical JSON data in a grid. I got the data to display hierarchically in the datatable through ajax, but I am having trouble with javascript implementing the expanding and collapsing of the rows. Please take a look at this JSBin and try expanding and collapsing and you will see the issue: http://live.datatables.net/qedufunu/1/edit The behavior should be like any hierarchical data (like the windows explorer): When the grid loads, it should display first level rows with the expand icon. When the top level expand button is clicked, it should open second level rows for the same parent with an expand button (if there are 3rd level rows). When the second level expand button is clicked, it should open the third level rows. Please take a look and suggest any JS changes. Please feel free to modify the fiddle. Thanks.
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/27026329
type: Question
tagged with: javascript
tagged with: datatables
has title: Datatables - Trouble with expanding and collapsing nested rows

http://stackoverflow.com/q/27054109
tagged with: scope
tagged with: http://stackoverflow.com/tag/html
has body: I'm having issues managing data between the parts of my Javascript application. I'm trying to stick with a "MVC" pattern, so speaking in MVC terms, i can't make some of my "C" (controller) functions access the data given by "M" (model). Specifically i can't make event functions to reach the data without making the data global (which i want to try to avoid). A made up situation just to show you what i mean: HTML: &lt;body&gt; &lt;div onclick="func()"&gt;&lt;/div&gt; &lt;/body&gt; JS: var Data = function(num) { this.num = num; } window.onreadystatechange = function() { var data = new Data(5); } function func() { //How do i access the object "data" from here? } The question is: how do i make the event handlers access the data?
favorite count: 0
has title: Javascript - web application structure
has answer: http://stackoverflow.com/a/27054145
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
accepted answer: http://stackoverflow.com/a/27054145
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/42775235
comment on: http://stackoverflow.com/q/27138620
type: QuestionComment
has text: What you're looking for is mod_rewrite in .htaccess files -http://wettone.com/code/clean-urls
type: Comment
score: 1

http://stackoverflow.com/q/27034291
accepted answer: http://stackoverflow.com/a/27603064
tagged with: android
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: append some element to html page via javascript in android webview
tagged with: webview
type: Question
has body: i want to create an infinite scroll in android webview, so when user scroll down he can see more of my local html, so i did the following: when user reach the end i get body content of another page and store it as String in a ArrayList (each tag in one position) and attach them one by one the to current page via javascript. all things works fine BUT, some body element wont attach and i get Uncaught Error: INVALID_STATE_ERR: DOM Exception 11 at null:1. here is the code: for(String body : bodyChunks) //bodyChunks is ArraList of body elements like &lt;p&gt; tags. { if(!loadIntrupt) { String js = "javascript:(function() { document.body.innerHTML += '" + body + "';}())"; // load on bottom loadUrl(js); } } so one paragraph is attached and another wont! can anybody say what is the problem? here is my other post in this case: infinite scroll in android webview
tagged with: javascript
linked to: http://stackoverflow.com/q/22113973
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27603064

http://stackoverflow.com/q/26993177
tagged with: javascript
tagged with: image
has body: I'm trying to loop through an array of images but can't seem to get past image 2. The array should also loop back to 1 when the last image has passed... var WorkArray = new Array('work/01.png', 'work/02.png', 'work/03.png', 'work/04.png'); var nelements = WorkArray.length; preload_image_object = new Image(); var i = 0; for(i=0; i&lt;=nelements; i++) { preload_image_object.src = WorkArray[i]; } function cC() { var nelements = WorkArray.length; var i = 0; for(i=0; i&lt;=nelements; i++) { nelements = WorkArray[i]; } document.getElementById("work").style.backgroundImage="url('"+WorkArray[i]+"')"; }
accepted answer: http://stackoverflow.com/a/26993560
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/26993250
has answer: http://stackoverflow.com/a/26993250
has answer: http://stackoverflow.com/a/26993560
score: 0
answer count: 3
tagged with: loops
has answer: http://stackoverflow.com/a/26993618
has title: Loop through array of images in javascript
tagged with: arrays

http://stackoverflow.com/a/27039214
answers question: http://stackoverflow.com/q/27039084
type: Answer
has comment: http://stackoverflow.com/comment/42598223
has body: Every place where you have "POST" you need to change to "GET", no?
score: 0

http://stackoverflow.com/q/27120565
has comment: http://stackoverflow.com/comment/42743735
score: 0
has comment: http://stackoverflow.com/comment/42742416
answer count: 1
has answer: http://stackoverflow.com/a/27120920
tagged with: javascript
tagged with: jquery
tagged with: php
has comment: http://stackoverflow.com/comment/42742201
type: AnsweredQuestion
has body: I have been trying to auto populate form fields using js, php file and form but it only display the correct numbers of rows but i cant see data. Thanks in advance as you check this; this is my form to be auto filled; Reg No: Select a RegNo: <?php $Query = mysql_query("SELECT * FROM vehicledetails"); while ($row = mysql_fetch_array($Query)) { $id = $row['id']; $regno = $row['regno']; $vehicletype = $row['vehicletype']; $tankcapacity = $row['tankcapacity']; $kml = $row['kml']; $contingency = $row['contingency']; $ccapacity = $row['ccapacity']; echo " $regno "; } ?> The php file is like this; <?php $q=$_GET["q"]; ?> <?php mysql_select_db("DropDown", $DBCONN); $sql="SELECT * FROM vehicledetails WHERE id = '".$q."'"; $result = mysql_query($sql); if($result === FALSE) { die(mysql_error()); // TODO: better error handling } while($row = mysql_fetch_array($result)) { $id = $row['id']; $regno = $row['regno']; $vehicletype = $row['vehicletype']; $tankcapacity = $row['tankcapacity']; $kml = $row['kml']; $contingency = $row['contingency']; $ccapacity = $row['ccapacity']; ?> Reg No: <input type="text" id="regno" name="regno" value="<?php echo $regno?>" > Vehicle Type <input type="text" id="vehicletype"name="vehicletype" value="<?php echo $vehicletype?>"> Tank Capacity <input type="text" id="tankcapacity" name="tankcapacity" value="<?php echo $tankcapacity?>"> KM/Litre: <input type="text" id="kml" name="kml" value="<?php echo $kml?>" > Contingency: <input type="text" id="contingency" name="contingency" value="<?php echo $contingency?>"> Carriage Capacity: <input type="text" id="ccapacity" name="ccapacity" value="<?php echo $ccapacity?>"> <?php } mysql_close($con); ?> the js script is like this; function showVec(str) { if (str=="") { document.getElementById("GetInformation").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } …
type: Question
has comment: http://stackoverflow.com/comment/42743577
has title: Auto Populate textboxes using drop down
accepted answer: http://stackoverflow.com/a/27120920
has comment: http://stackoverflow.com/comment/42744005
has comment: http://stackoverflow.com/comment/42742669

http://stackoverflow.com/comment/42804264
type: AnswerComment
has text: it´s not about getElementById, IE8 does not support addEventListener. IE8 does not really matter anymore (and you actually should stop supporting it imho), but if you really want to support it, it´s easy: http://stackoverflow.com/questions/9769868/addeventlistener-not-working-in-ie8
type: Comment
comment on: http://stackoverflow.com/a/27149434
score: 0

http://stackoverflow.com/comment/42733638
type: Comment
type: QuestionComment
score: 0
has text: @blelump Either way works fine for me. I just want it to work. Can you provide an answer with a complete use-case and I will take it from there. Thanks!
comment on: http://stackoverflow.com/q/27071621

http://stackoverflow.com/q/27043017
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42606233
downvote count: 1
possible better answer: http://stackoverflow.com/a/27043826
type: Question
has title: How to allow for another index string to run a script
answer count: 2
upvote count: 0
has body: I have no script abilitiy, but i'd like to edit an existing script which is currently restricting the script from running on any page other then the one that has a certain string in the URL. Here is the snippet of the script which limits it from running if(location.href.indexOf("MODULE=MESSAGE")&gt;0||location.href.indexOf("/message")&gt;0) This only allows the script to run on these pages mysite/2014/home/11609?MODULE=MESSAGE1 and the pages range from Message1 to Message20 mysite/2014/home/11609?MODULE=MESSAGE20 I would like to also allow the script to be loaded and ran on these pages mysite/2014/options?L=11609&amp;O=247&amp;SEQNO=1&amp;PRINTER=1 where the SEQNO=1 ranges from 1 to SEQNO=20, just like the MESSAGE1-MESSAGE20 do Can someone show me how i can edit that small snippet of script to allow the SEQNO string found in the url to work also. Thanks
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42606174
has answer: http://stackoverflow.com/a/27043826
accepted answer: http://stackoverflow.com/a/27043780
favorite count: 0
has answer: http://stackoverflow.com/a/27043780

http://stackoverflow.com/comment/42587411
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27032972
has text: I removed that Tag, and OP asked question that using Javascript
type: AnswerComment

http://stackoverflow.com/a/27081306
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27049144
has body: I fixed the problem using POST method and adding a line request.getParts(); The actual code is: @POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces("application/json") @Path("/{text}") public void postEditar3(@Context HttpServletRequest request, @PathParam("text")String texto) { boolean sucesso; try { request.getParts(); Tabela2colunasDTO.Produto produtoDTO; Tabela2colunasDTO dto = new Tabela2colunasDTO(); produtoDTO = dto.getInstanceProduto(); produtoDTO.text = text; produtoDTO.price = request.getParameter("PRICE_EDIT"); success = (new ProdutosDAO()).doUpdate(produtoDTO); System.out.println("passou do sucesso doUpdate: "+success); } catch (IOException | ServletException e) { } }

java
tags question: http://stackoverflow.com/q/27113073
tags question: http://stackoverflow.com/q/27131722
tags question: http://stackoverflow.com/q/27088404
tags question: http://stackoverflow.com/q/27047773
tags question: http://stackoverflow.com/q/27088627
tags question: http://stackoverflow.com/q/27119138
tags question: http://stackoverflow.com/q/27074529
tags question: http://stackoverflow.com/q/27120811
tags question: http://stackoverflow.com/q/27070663
tags question: http://stackoverflow.com/q/27066966
tags question: http://stackoverflow.com/q/27005506
tags question: http://stackoverflow.com/q/27103580
tags question: http://stackoverflow.com/q/27037972
tags question: http://stackoverflow.com/q/27141058
tags question: http://stackoverflow.com/q/27067816
tags question: http://stackoverflow.com/q/27143506
tags question: http://stackoverflow.com/q/27061189
tags question: http://stackoverflow.com/q/27080357
tags question: http://stackoverflow.com/q/27102958
tags question: http://stackoverflow.com/q/27010621
tags question: http://stackoverflow.com/q/27107794
tags question: http://stackoverflow.com/q/27135559
tags question: http://stackoverflow.com/q/27043345
tags question: http://stackoverflow.com/q/27032656
tags question: http://stackoverflow.com/q/27112808
tags question: http://stackoverflow.com/q/27055159
tags question: http://stackoverflow.com/q/27034897
tags question: http://stackoverflow.com/q/27105656
tags question: http://stackoverflow.com/q/27128162
tags question: http://stackoverflow.com/q/27100727
tags question: http://stackoverflow.com/q/27034314
tags question: http://stackoverflow.com/q/27123785
tags question: http://stackoverflow.com/q/27011015
tags question: http://stackoverflow.com/q/27004963
tags question: http://stackoverflow.com/q/27020621
tags question: http://stackoverflow.com/q/27138606
tags question: http://stackoverflow.com/q/27054623
tags question: http://stackoverflow.com/q/27067742
tags question: http://stackoverflow.com/q/27057816
tag name: java
tags question: http://stackoverflow.com/q/26993756
tags question: http://stackoverflow.com/q/27007995
tags question: http://stackoverflow.com/q/27121406
tags question: http://stackoverflow.com/q/27059384
tags question: http://stackoverflow.com/q/27049144
tags question: http://stackoverflow.com/q/27049420
tags question: http://stackoverflow.com/q/27038432
tags question: http://stackoverflow.com/q/27118263
tags question: http://stackoverflow.com/q/27076840
tags question: http://stackoverflow.com/q/27099193
tags question: http://stackoverflow.com/q/27011842
tags question: http://stackoverflow.com/q/27108858
tags question: http://stackoverflow.com/q/27013862
tags question: http://stackoverflow.com/q/27064096
tags question: http://stackoverflow.com/q/27074625
tags question: http://stackoverflow.com/q/27032181
tags question: http://stackoverflow.com/q/27143031
type: Tag
tags question: http://stackoverflow.com/q/27094803
tags question: http://stackoverflow.com/q/27009112
tags question: http://stackoverflow.com/q/27126415
tags question: http://stackoverflow.com/q/27125457
tags question: http://stackoverflow.com/q/27119687
tags question: http://stackoverflow.com/q/27141108
tags question: http://stackoverflow.com/q/27032602
tags question: http://stackoverflow.com/q/27011054
tags question: http://stackoverflow.com/q/27124125
tags question: http://stackoverflow.com/q/27145534
tags question: http://stackoverflow.com/q/27094671

http://stackoverflow.com/a/27349477
upvote count: 2
has body: Well, embarrassingly (and as some people suspected), this was completely unrelated to Bcrypt. In my authentication function, I was attempting to fetch the appropriate user with the following: models.User.find({ username: username }) However, the query should have been specified in a where field, like so: models.User.find({ where: { username: username } }) This was causing the authentication method to always be comparing to the password for the first user in the database (returned by default when no where field is specified). Thus, it SEEMED to work because the first user's letters-only password always worked but no following passwords worked (in reality, even a letters-only password would have failed for other users).
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/27044742
answers question: http://stackoverflow.com/q/27044742

http://stackoverflow.com/comment/42590603
type: Comment
comment on: http://stackoverflow.com/a/27034509
type: AnswerComment
score: 0
has text: Did you refer the question i linked?

http://stackoverflow.com/comment/42557523
type: Comment
type: QuestionComment
score: 0
has text: @CuteChild What about the content and data type?
comment on: http://stackoverflow.com/q/27015750

http://stackoverflow.com/comment/42701278
score: 0
comment on: http://stackoverflow.com/q/27098083
type: Comment
type: QuestionComment
has text: @chandu: local storage.

http://stackoverflow.com/a/27132607
accepted answer of: http://stackoverflow.com/q/27009161
score: 0
has body: I got same error when I trying to insert jquery reference like above , links doesn't working So I referred This Link That's an approach to give jquery reference to HTML Page , but in CSHTML when you insert @Scripts.Render("~/bundles/jquery") you don't need add one by one references like you done here , So remove &lt;script type="text/javascript" src='~/Scripts/jquery-2.0.0.min.js'/&gt;&lt;/script&gt; keep @Scripts.Render("~/bundles/jquery") under the code If your project doesn't have the "jquery-2.0.0.min.js" file , manually insert into "~/Script" Folder
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42765437
type: Answer
answers question: http://stackoverflow.com/q/27009161

http://stackoverflow.com/a/27136271
upvote count: 4
has comment: http://stackoverflow.com/comment/60030461
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/42781282
has comment: http://stackoverflow.com/comment/42785287
type: Answer
answers question: http://stackoverflow.com/q/27135959
has body: I'm guessing that doesn't work because your dialog instance isn't assign to a var named "dlg" but i can't be sure because you didn't post any code. Otherwise this should work. But there is an easier way to accomplish this, just by using CSS. .dijitDialogCloseIcon { display: none; } That's all assuming you can't change your dialog instance otherwise you really should use the "closable" property of the dijit itself to disable closing of the dialog. Edit: As Ken in the comments pointed out, it's the preferred way since it also disables the handling of the escapekey. Examples: Programmatic: require(["dijit/Dialog", "dojo/domReady!"], function(Dialog){ myDialog = new Dialog({ title: "My Dialog", content: "Test content.", style: "width: 300px", closable: false // here }); }); Declaritive: &lt;div data-dojo-type="dijit/Dialog" data-dojo-id="myDialog" data-dojo-props="closable:false"&gt;&lt;/div&gt;

http://stackoverflow.com/q/27062140
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42639104
has answer: http://stackoverflow.com/a/27062742
favorite count: 0
accepted answer: http://stackoverflow.com/a/27063027
possible better answer: http://stackoverflow.com/a/27062742
has body: Ok, so I'm a Javascript and jqyery noob, so looking for help. I have a CSS menu bar that is used as an element across my site. an individual button can be shown as clicked by assigning a class to the element of pressed. The first link that I have is showing as pressed. I can access the URL easily in my view so I know where I am, but I want to be able to change the class on the fly as the page loads depending on where the url is, so the menu will show selected for that area. I've included two elements of my menu below. I want to change 'class'=> 'pressed' to 'class'=> '' depending on the value in a variable. How would I do this? <?php echo $this->Html->link( $this->Html->image('icons/group.png', array('width' => '20', 'line-height' => '20')) . ' ' . __('Organisations'), array('controller' => 'organisations', 'action' => 'index'), array('escape' => false, 'class'=> 'pressed')); ?> <?php echo $this->Html->link( $this->Html->image('icons/group_add.png', array('width' => '20', 'line-height' => '20')) . ' ' . __('New Organisation'), array('controller' => 'organisations', 'action' => 'add'), array('escape' => false)); ?> <?php echo $this->Html->link( $this->Html->image('icons/telephone.png', array('width' => '20', 'line-height' => '20')) . ' ' . __('Contacts'), array('controller' => 'contacts', 'action' => 'index'), array('escape' => false)); ?> <?php echo $this->Html->link( $this->Html->image('icons/telephone_add.png', array('width' => '20', 'line-height' => '20')) . ' ' . __('New contact'), array('controller' => 'contacts', 'action' => 'add'), array('escape' => false, 'class'=> 'unpressed')); ?> Below are the two expected html outputs for either way: Contacts Contacts
tagged with: css
has answer: http://stackoverflow.com/a/27063083
upvote count: 1
has comment: http://stackoverflow.com/comment/42638941
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42638823
has answer: http://stackoverflow.com/a/27063027
type: Question
answer count: 3
downvote count: 0
has title: change CSS class on the fly using Jquery

http://stackoverflow.com/a/27580336
answers question: http://stackoverflow.com/q/27083507
type: Answer
downvote count: 0
score: 1
has body: It is easy. just put the dataset before the file load.it will work. your link
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27083507

http://stackoverflow.com/a/27120312
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27099171
has body: Don't use var group = fabric.util.groupSVGElements(objects, options); instead you can loop through objects and you can add them one by one on canvas.
type: Answer
score: 2

http://stackoverflow.com/a/27060611
has body: This is not a perfect answer.. But a possible work around.. function key() { document.getElementById("Carss").style.width = "100px" } function key2() { document.getElementById("Carss").style.width = "34px" document.getElementById("Carss").blur(); } Audi Mercedes
type: Answer
has comment: http://stackoverflow.com/comment/42637836
score: 0
answers question: http://stackoverflow.com/q/27056438

primefaces-gmap
tag name: primefaces-gmap
tags question: http://stackoverflow.com/q/27043371
type: Tag

http://stackoverflow.com/a/27065795
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27065715
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27065715
type: Answer
has body: $(function(){ var signoff = $("#supersignoff").prop('checked'); var sdeclare = $("#superdeclare").prop('checked') if(signoff &amp;&amp; sdeclare){ $("#supersection *").prop("disabled",true); } }); .prop('checked') will give you the status of checkbox is checked or not, but not .val(). Ref: .prop() and .val()
score: 2

http://stackoverflow.com/q/27054101
has comment: http://stackoverflow.com/comment/42626326
tagged with: javascript-objects
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27054305
upvote count: 3
has title: Error "Object.keys called on non-object" caused by empty json output
downvote count: 1
tagged with: arrays
answer count: 1
has comment: http://stackoverflow.com/comment/53007485
has answer: http://stackoverflow.com/a/27054305
favorite count: 0
has body: I received an error Object.keys called on non-object. The offending code is; numberOfEmployees = Object.keys(employee_data).length; employee_data is a json object that gets assigned json output data from a web service. This error only happens when the json output is empty []. If json output is not empty, there is no error. What is wrong with the code? employee_data becomes undefined when the json output is empty [].
has comment: http://stackoverflow.com/comment/42625298
has comment: http://stackoverflow.com/comment/42625116
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/27104457
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42712368
has comment: http://stackoverflow.com/comment/42712359
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27104555
tagged with: javascript
has comment: http://stackoverflow.com/comment/42712559
answer count: 2
has title: PHP redirect to AJAX undefined
has comment: http://stackoverflow.com/comment/42712471
downvote count: 0
tagged with: jquery
has body: I want to do a redirect with PHP via AJAX but always appears as undefined url. I'm trying to make PHP check the user if true it passes but if false it does the redirect. Can anyone help me please? Button: Click Me AJAX: $(document).ready(function(){ $('#button-quotation').click(function(){ $.ajax({ type: 'POST', url: 'index.php?route=checkout/cart/quotation', success: function(data){ window.location.href = data.redirect; } }) });}); PHP: public function quotation(){ if (!$this->customer->isLogged()) { $this->session->data['redirect'] = $this->url->link('checkout/cart', '', 'SSL'); $this->redirect($this->url->link('account/login', '', 'SSL')); } }
possible better answer: http://stackoverflow.com/a/27104599
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27104599
accepted answer: http://stackoverflow.com/a/27104555

http://stackoverflow.com/comment/52507227
has text: any solution for this?
type: QuestionComment
comment on: http://stackoverflow.com/q/27144523
type: Comment
score: 0

http://stackoverflow.com/a/27088846
type: Answer
has body: Here is your table with some modifications (I added TD elements): Row 1 Row 2 Row 3 Event handling: $( "table tr" ).bind( "tap", tapHandler ); function tapHandler( event ){ var dataRow = $( this ).attr("data-row"); alert( dataRow); } Fiddle
score: 0
answers question: http://stackoverflow.com/q/27088734

http://stackoverflow.com/comment/42782147
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27142604
has text: you are more than welcome and your answer is some how generic can work every where

http://stackoverflow.com/a/27157017
upvote count: 1
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27147759
has body: To explain why moving the click handler fixed your issue is that before you were not calling .on('click', function(){}) on a D3 selection, but instead on a D3 transition which .transition() was returning. I'm guessing you moved it before the transition() call. In most cases the usual pattern is to have the transition(), duration() and its attr()s as the last part of the function chain.

http://stackoverflow.com/comment/42677907
type: QuestionComment
comment on: http://stackoverflow.com/q/27084484
score: 0
has text: Is that line with the HTML part of some server-side code? What is `all_data`?
type: Comment

http://stackoverflow.com/a/27053798
has comment: http://stackoverflow.com/comment/42646097
accepted answer of: http://stackoverflow.com/q/27053562
score: 0
type: AcceptedAnswer
type: Answer
has body: Angular filters require an array and a filter object of some type to work. You can find more in https://docs.angularjs.org/api/ng/filter/filter. By default the $filter('filter') call will return the inbuilt generic/simple filter. Your first argument then needs to be an array of objects with properties. Your second arg can be an object like you've demonstrated. var app = angular.module('app', []); app.controller('ExampleCtrl', function ($scope, $filter) { var x = [{name : 'Tim'}, {'name' : 'Jim'}, {'name' : 'Jeff'}]; console.log($filter('filter')(x, {$ : 'Jeff'})); }); Find it at http://jsfiddle.net/wg6mp56y/1/
has comment: http://stackoverflow.com/comment/42658525
answers question: http://stackoverflow.com/q/27053562

http://stackoverflow.com/q/27036369
tagged with: javascript
tagged with: sorting
linked to: http://stackoverflow.com/q/1069666
linked to: http://stackoverflow.com/q/2466356
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/27038137
favorite count: 0
accepted answer: http://stackoverflow.com/a/27038137
type: AnsweredQuestion
has body: I have an array of objects Say, var fruits = [ {name:'apple', capital:'sample'}, {name:'Tomato', capital:'sample'}, {name:'jack fruit', capital:'sample'}, {name:undefined, capital:'sample'}, {name:'onion', capital:'sample'}, {name:'Mango', capital:'sample'}, {name:'Banana', capital:'sample'}, {name:'brinjal', capital:'sample'} ]; I need to sort the array in ascending by name The object may contain undefined in the name The object name may be a mixture of upper case and lowercase (So it must be a case insensitive search) If the array has undefined, then that object should be pushed to the end of the sorted list. Expected output var fruits = [ {name:'apple', capital:'sample'}, {name:'Banana', capital:'sample'}, {name:'brinjal', capital:'sample'}, {name:'jack fruit', capital:'sample'}, {name:'Mango', capital:'sample'}, {name:'onion', capital:'sample'}, {name:'Tomato', capital:'sample'}, {name:undefined, capital:'sample'} ];
has title: Javascript Case Insensitive Sort objects containing undefined as value
type: Question
score: 5
upvote count: 5
tagged with: arrays

http://stackoverflow.com/comment/42729369
score: 0
type: AnswerComment
has text: @$(mainPanel) is the use of [GWTQuery][1]. Which Scheduler method would you use in my case?
type: Comment
comment on: http://stackoverflow.com/a/27109984

http://stackoverflow.com/comment/101561215
type: AnswerComment
has text: @PauliSudarshanTerho - You would benefit from doing a little reading about how the web works. A browser makes a request to your site. That browser could be any IP address on the internet in the world. It's just some random client's computer somewhere that wants to access your site. Since you want users to be able to access your site, your web server responds and sends them the data they are asking for. The same is true for regular page requests as for web APIs. Any web API is open to the world unless you explicitly require some form of authentication in your web server.
comment on: http://stackoverflow.com/a/27139956
type: Comment
score: 1

http://stackoverflow.com/comment/42565352
comment on: http://stackoverflow.com/a/27020274
type: AnswerComment
has text: yes, the function is within $(document).ready(function(){}, and it works when i'm using $("#myId").click(function(){})
score: 0
type: Comment

http://stackoverflow.com/a/27034509
has comment: http://stackoverflow.com/comment/42621699
upvote count: 3
has comment: http://stackoverflow.com/comment/42603355
score: 3
has comment: http://stackoverflow.com/comment/42590603
has comment: http://stackoverflow.com/comment/42604831
has comment: http://stackoverflow.com/comment/42590135
has comment: http://stackoverflow.com/comment/42591865
has comment: http://stackoverflow.com/comment/42590411
has comment: http://stackoverflow.com/comment/42593651
downvote count: 0
has body: You need to add PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); right after the line require_once 'path/to/PHPExcel.php'; or before any instanciation of the PHPExcel class.
has comment: http://stackoverflow.com/comment/42589839
has comment: http://stackoverflow.com/comment/42589904
has comment: http://stackoverflow.com/comment/70315221
has comment: http://stackoverflow.com/comment/42597701
has comment: http://stackoverflow.com/comment/42603834
type: Answer
answers question: http://stackoverflow.com/q/27034338
has comment: http://stackoverflow.com/comment/42592265

http://stackoverflow.com/comment/42795324
type: QuestionComment
has text: If it's a static server (no server-side-languages) then the answer is still no. Interestingly enough you'll have communication between the two but not in any way you would be able to usefully control. The only way you can currently get a web browser to talk directly to another is by using STUN/TURN/ICE servers. The browser needs one of these servers in order to make the initial handshake. Without it, you have no way for the browser to listen for incoming communications and therefore you literally have nothing to go on for P2P in a browser except for third-party browser addons and extensions.
comment on: http://stackoverflow.com/q/27148661
score: 0
type: Comment

http://stackoverflow.com/comment/42675028
has text: @Oday Thanks but now i get this error: Uncaught TypeError: string is not a function
comment on: http://stackoverflow.com/a/27082713
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42677968
type: QuestionComment
comment on: http://stackoverflow.com/q/27084486
score: 0
has text: Could is be that the dom has not finished loaded when you call that? Have you tried setting a timeout to see if it makes a difference?
type: Comment

http://stackoverflow.com/q/27078714
has body: I have a piece of code that looks like this &lt;input id="ssc_BB_0" class="ssc_lrBuyBtn" type="button" value="Buy" onclick="ssc.buyClicked(0,2)"&gt; I don't have direct access to the ssc.buyClicked function and was wondering if it is possible to alert what that might be so I may modify it to my needs. I have tried... alert(ssc.buyClicked.asString()); but that did not work. Any help would be greatly appreciated.
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27078763
score: -3
type: AnsweredQuestion
downvote count: 3
type: Question
has title: alert the contents of an onclick function
has comment: http://stackoverflow.com/comment/42667509
has answer: http://stackoverflow.com/a/27078763

http://stackoverflow.com/q/27024943
has answer: http://stackoverflow.com/a/27025253
score: -1
answer count: 3
has comment: http://stackoverflow.com/comment/42573757
downvote count: 1
has body: I'm trying to match symbol sequence according to these rules: it's located at the start of the string case insensitive it begins with letter V or N optional space follows - or – characters follows (only one of them) optional space follows Here are example strings that it should match and expression I tried to make using google results :) : var str = "V - "; /*var str = "N - "; var str = "V- "; var str = "N -"; var str = "N –"; var str = "V– ";*/ str.replace(/^(V|N)\s(-|–)\s/i, 'replaced'); alert(str); However it doesn't seem to work. Can someone help me please and explain how it is used, what I did wrong? Thanks
has comment: http://stackoverflow.com/comment/42573641
has comment: http://stackoverflow.com/comment/42574033
favorite count: 0
possible better answer: http://stackoverflow.com/a/27025058
has comment: http://stackoverflow.com/comment/42573579
has answer: http://stackoverflow.com/a/27025058
tagged with: regex
has comment: http://stackoverflow.com/comment/42573684
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42573657
accepted answer: http://stackoverflow.com/a/27025118
has comment: http://stackoverflow.com/comment/42573904
linked to: http://stackoverflow.com/q/22937618
type: Question
has comment: http://stackoverflow.com/comment/42574589
has answer: http://stackoverflow.com/a/27025118
has title: Regex – how to match and replace with javascript
tagged with: javascript

http://stackoverflow.com/q/27118558
type: UnansweredQuestion
answer count: 0
linked to: http://stackoverflow.com/q/4809342
has comment: http://stackoverflow.com/comment/59654867
has body: I am new to java script and angularjs. As per angular documents and other references I understood that with the help of interceptor we can handle adding auth header to every http calls etc. But how can I restrict interceptor to add header only for specific http calls?. How can i use interceptor to intercept only specific http calls? how can I customize interceptor?
type: Question
has title: How interceptor works in angularjs
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42738991
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42739128

http://stackoverflow.com/a/27131985
type: Answer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27131984
score: 27
answers question: http://stackoverflow.com/q/27131984
has body: For this, you can use the Array#filter() method, introduced in ECMAScript5. It is supported in all browsers, except for IE8 and lower, and ancient versions of Firefox. If, for whatever reason, you need to support those browsers, you can use a polyfill for the method. filter() takes a function as its first argument. For every item of the array, your function is passed three arguments - the value of the current item, its index in the array, and the array itself. If your function returns true (or a truthy value, e.g. 1, "pizza", or 42), that item will be included in the result. Otherwise, it won't. filter() returns a new array - your original array will be left unmodified. That means that you'll need to save the value somewhere, or it'll be lost. Now, in the examples from the question: var myNumbersArray = [1, 2, 3, 4, 5, 6, 7, 8]; console.log(myNumbersArray.filter(function(num){ return !(num % 2); // keep numbers divisible by 2 })); console.log(myNumbersArray); // see - it hasn't changed! var myStringArray = ["This", "is", "an", "array", "with", "several", "strings", "making", "up", "a", "sentence."]; console.log(myStringArray.filter(function(str){ return str.length &lt; 3; // keep strings with length &lt; 3 })); console.log(myStringArray); var myBoolArray = [true, false, 4, 0, "abc", "", "0"]; console.log(myBoolArray.filter(Boolean)); // wow, look at that trick! console.log(myBoolArray); And for completeness, an example that also uses the index and array parameters: Removing duplicates from the array: var myArray = [1,1,2,3,4,5,6,1,2,8,2,5,2,52,48,123,43,52]; console.log(myArray.filter(function(value, index, array) { return array.indexOf(value) === index; }));
type: AcceptedAnswer
upvote count: 28

angularjs-ng-click
tags question: http://stackoverflow.com/q/27028138
type: Tag
tags question: http://stackoverflow.com/q/27039631
tag name: angularjs-ng-click
tags question: http://stackoverflow.com/q/26992931
tags question: http://stackoverflow.com/q/27009479

http://stackoverflow.com/comment/42872524
score: 1
comment on: http://stackoverflow.com/a/27139970
type: AnswerComment
type: Comment
has text: The edit worked but you forgot to put opening quote for parameters inside find(). So the correct answer would be $select.find('option[value="placeholder"]').text("newText");

http://stackoverflow.com/q/27140639
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/31435001
tagged with: javascript
has answer: http://stackoverflow.com/a/27140664
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27140664
tagged with: cordova
has body: When writing a native IOS app for example, you can open the native "Mail" app from a button click within an app. The email will come up pre-filled with certain data (send-to address, subject, body, etc.). How can I simulate this across all devices using HTML5/Javascript in my cordova app?
has title: Cordova - Open native email app from button click
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42781397
possible better answer: http://stackoverflow.com/a/31435001

http://stackoverflow.com/a/27020805
type: Answer
has comment: http://stackoverflow.com/comment/42635436
has comment: http://stackoverflow.com/comment/42640797
has comment: http://stackoverflow.com/comment/42644480
has comment: http://stackoverflow.com/comment/42634564
answers question: http://stackoverflow.com/q/27020113
score: 0
has body: perhaps a different aproach is what you need, a directive with shared scope (not isolated like yours) but with the ability to create new values to the scope, that way you can use the directive many times in your app but with different values in each one of them: {{tar}} // the target attribute will be your scope value (theres no need to be even declared in the controller) function Ctrl($scope) { $scope.foo = 'Bar'; } angular.module('transclude', []) .directive('heading', function(){ return { restrict: 'E', replace: true, transclude: true, template: ' ', link: function(scope, el, attr){ scope[attr.target] = attr.cls; } }; }); check this fiddle

http://stackoverflow.com/comment/42626633
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27053126
has text: theoretically it can be done - using iframes with our javascript as one option (not neccesarily working for all target sites) or using some backend as a proxy and inserting our javascript - also keen to failure if target sites employ some protection... but if you can think of other way around - parse target site DOM with your backend and show it on your site - that would work, if it's a concept you can apply to your general intention...

http://stackoverflow.com/comment/42801721
score: 0
type: Comment
type: QuestionComment
has text: So even if I call that function in the echo it will simply build up until the whole page is done running, and then echo it out? Is that why JSON fails?
comment on: http://stackoverflow.com/q/27152206

http://stackoverflow.com/a/27081664
upvote count: 5
has body: if (arr.indexOf(value) !== undefined) { //proceed if value exist indexOf will never return undefined. If it's not found, it returns -1. Use that, and it should be fine: if (arr.indexOf(value) !== -1) { //proceed if value exist
type: Answer
answers question: http://stackoverflow.com/q/27081637
has comment: http://stackoverflow.com/comment/42673168
downvote count: 0
score: 5

http://stackoverflow.com/q/27024456
has body: I've been trying to refine an answer for a question here on SO but I've come across a wierd issue and I am hoping someone could help me understand the cause. What I am attempting to do is disable the use of AJAX operations from within a "protected" function by overriding them with locally-scoped variables. This needs to work with libraries such as jQuery, so I tried implementing logic to recreate the $ variable but for some reason I can't override the global scope with a local version like I can with the others, and meanwhile is producing some very unexpected (and interesting) behaviour. This is the code that I'm using: var testFunction = (function(){ // Global to local/lexical: var XMLHttpRequest = undefined; var eval = undefined; var setTimeout = undefined; var setInterval = undefined; var Function = undefined; var window = undefined; // Can't set directly to var $? var $new = (function($old){ if($old) { var newjq = function(s, c) { // Reroute main function return $old(s, c); }; var jQueryBlacklist = { // Initialize blacklist "ajax": true, "post": true, "get": true, "getJSON": true, "getScript": true }; for(i in $old) // Reconstruct Object if($old.hasOwnProperty(i) &amp;&amp; !jQueryBlacklist[i]) newjq[i] = $old[i]; return newjq; } }($)); // Line below completely breaks script?: var $ = $new; if(!$new) alert("$new is undefined"); // Real testFunction() below: return function() { // AJAX-forbidden code if(!$) alert("$ is undefined"); else alert("jQuery is working"); // alert($.ajax); // $.ajax should be undefined } }()); testFunction(); // alert($.ajax); // should be defined You can click here to see the fiddle. I'm simply interested in any feedback about this, as to me it seems like a bug. I would love to know the reason(s) for this behaviour. Thanks in advance!
favorite count: 0
accepted answer: http://stackoverflow.com/a/27024587
has title: Really wierd JavaScript behaviour while setting local variables
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: global-variables
type: Question
has answer: http://stackoverflow.com/a/27024587
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: scope
answer count: 1
tagged with: variables

http://stackoverflow.com/a/27004547
type: Answer
has comment: http://stackoverflow.com/comment/42538590
answers question: http://stackoverflow.com/q/27004271
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27004271
has body: Since datatables adds the element to the DOM you'll have to use a delegate for selection, something like: $('body').on('click', '#example tbody #butt', function () { //do something }); It doesn't necessarily have to be body, but you'll need an element that is not dynamically added to the DOM for jQuery to use. Also, ID's should be unique, so you won't want to add a button with the same ID to every row. If you need to add multiple buttons you'll want to use a class, bind to the elements with that class, and then handle each one to get the appropriate context.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42538376
upvote count: 1

http://stackoverflow.com/comment/42647875
has text: Of course man. Look at my edit. I will introduce my solution also for other people
type: Comment
comment on: http://stackoverflow.com/a/27065796
score: 0
type: AnswerComment

bcrypt
tags question: http://stackoverflow.com/q/27044742
type: Tag
tag name: bcrypt

http://stackoverflow.com/comment/42787742
has text: you are right, I did, thanks Jeroen
comment on: http://stackoverflow.com/q/27144402
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27153445
upvote count: 6
has comment: http://stackoverflow.com/comment/42813987
has comment: http://stackoverflow.com/comment/62681909
score: 6
type: Answer
downvote count: 0
has body: I should add that this is a generic Javascript issue and can also be solved using plain javascript features. For example, you could also do this: User.prototype.method1 = function () { ............. this.service.serviceMethod(args) .then(this.method2.bind(this)) .catch(onRejected); }; This uses Function.prototype.bind() which is built into Javascript and present on every function. This creates a function stub (which is what is passed to .then() and that stub will automatically reattach the desired this value before calling method2().
answers question: http://stackoverflow.com/q/27149034

http://stackoverflow.com/a/27110804
has body: Using Traditional javascript XmlHttpRequest you can make an AJAX call. For a Webservice, we need couple of HTTP Headers. Like: SOAPAction, Content-Type, Accept. The values for these headers MUST be like below: SOAPAction:"" Content-Type:text/xml Accept:text/xml So, additionally, your code should look something like this for making an AJAX call to the Webservice: //Get XML Request Object var request = new XMLHttpRequest(); // Define the URL var url="http://your.end.point.url?wsdl"; //Define HTTP Method. Always POST for a Webservice request.open("POST", url, true); // Remember that all the Webservice calls should be POST //Setting Request Headers request.setRequestHeader("SOAPAction", "\"\"");//Not sure of the escape sequence. The value should be "". request.setRequestHeader("Accept","text/xml"); request.setRequestHeader("Content-Type","text/xml"); //Make your AJAX call request.send(soap); // where soap is you SOAP Request Payload. Parsing the response: request.onreadystatechange=stateChanged; function stateChanged() { if (request.status==200) { // Success. Parse the SOAP Response } if(request.status==500) { //Failure. Handle the SOAP Fault } }
has comment: http://stackoverflow.com/comment/43035599
has comment: http://stackoverflow.com/comment/42727763
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27109734
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43024355
answers question: http://stackoverflow.com/q/27109734
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/27045598
favorite count: 0
has title: How to upload files from ReactJS to Express endpoint
has answer: http://stackoverflow.com/a/40576139
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27303347
has body: In the application I'm currently working on, there are a couple of file forms that are submitted via superagent to an Express API endpoint. For example, image data is posted like so: handleSubmit: function(evt) { var imageData = new FormData(); if ( this.state.image ) { imageData.append('image', this.state.image); AwsAPI.uploadImage(imageData, 'user', user.id).then(function(uploadedImage) { console.log('image uploaded:', uploadedImage); }).catch(function(err) { this.setState({ error: err }); }.bind(this)); } } and this.state.image is set like this from a file input: updateImage: function(evt) { this.setState({ image: evt.target.files[0] }, function() { console.log('image:', this.state.image); }); }, AWSAPI.uploadImage looks like this: uploadImage: function(imageData, type, id) { var deferred = when.defer(); request.put(APIUtils.API_ROOT + 'upload/' + type + '/' + id) .type('form') .send(imageData) .end(function(res) { if ( !res.ok ) { deferred.reject(res.text); } else { deferred.resolve(APIUtils.normalizeResponse(res)); } }); return deferred.promise; } And lastly, the file receiving endpoint looks like this: exports.upload = function(req, res) { req.pipe(req.busboy); req.busboy.on('file', function(fieldname, file) { console.log('file:', fieldname, file); res.status(200).send('Got a file!'); }); }; Currently, the receiving endpoint's on('file') function never gets called and so nothing happens. Previously, I've tried similar approaches with multer instead of Busboy with no more success (req.body contained the decoded image file, req.files was empty). Am I missing something here? What is the best approach to upload files from a (ReactJS) Javascript app to an Express API endpoint?
upvote count: 3
type: Question
score: 3
has comment: http://stackoverflow.com/comment/43082781
possible better answer: http://stackoverflow.com/a/27045985
linked to: http://stackoverflow.com/q/23114374
tagged with: javascript
has comment: http://stackoverflow.com/comment/42610764
has comment: http://stackoverflow.com/comment/42611049
has answer: http://stackoverflow.com/a/27045985
tagged with: express
tagged with: reactjs
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/27303347

http://stackoverflow.com/q/27058489
tagged with: javascript-objects
type: Question
has title: Javascript Date Object Assignment
has comment: http://stackoverflow.com/comment/42632256
has comment: http://stackoverflow.com/comment/42632352
tagged with: javascript
has comment: http://stackoverflow.com/comment/42632013
has body: My Javascript assignment this week involves the Date Object. So far i have the following done and it works: var monthArray = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var weekDaysArray =new Array("Sun", "Mon", "Tues", "Weds", "Thurs", "Fri"); var reqMonth = prompt("Please enter the number of the month you want to display"); reqMonth = parseInt(reqMonth); var todaysDate = new Date(); var currYr = todaysDate.getFullYear(); var currMon = todaysDate.getMonth(); var currDate = todaysDate.getDate(); var currDay = todaysDate.getDay(); while((reqMonth == null)||(reqMonth &gt; 12)) { reqMonth = prompt("Please enter a number between 1 and 12, corresponding with the month you want to display"); reqMonth = parseInt(reqMonth); } document.write((currMon + 1) + "/" + currDate + "/" + currYr + "&lt;br /&gt;" + "&lt;br /&gt;" + monthArray[reqMonth-1] + " " + currYr); This is where things get difficult, at least for me the rest of the assignment is: For each week, use a document.write statement to display this message above the days of the week and date: “Week x of month:” where x is a variable used to keep track of the weeks processed, starting at 1 and month is the name of the month that is extracted from the monthArray using the month number in the variable reqMon. Determine the name of the first day of the requested month. a. Using the correct Date Object method, get the integer for the day of the week for the first day of the current month. (hint 1: you will need to pass the year, month and the day value of 1 to the Date Object to get this number hint 2:you will use this number to start extracting the names of the day from the array of day names, then you will reset it to 0 before starting the next week. ) Use a document.write statement to display every day of the current month on a new line in the format of the name of the day followed by the integer for the date. See example on page 1. a…
score: 0
has comment: http://stackoverflow.com/comment/43127007
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42631993

http://stackoverflow.com/a/27032304
answers question: http://stackoverflow.com/q/27032242
has comment: http://stackoverflow.com/comment/42586240
type: Answer
has body: now my question is can you please let me know how to power the pattern to consider any html tag contains? &lt;\w+\b[^&lt;&gt;]*&gt; For matching custom tags, &lt;[^&lt;&gt;]+&gt; To match the whole line which contains the tag. You don't need to go for lookaround assertions. ^.*?&lt;[^&lt;&gt;]+&gt;.*$ DEMO
has comment: http://stackoverflow.com/comment/42586245
score: 0
has comment: http://stackoverflow.com/comment/42586239

http://stackoverflow.com/q/27034872
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27035053
has body: I am trying to add two numbers in JavaScript, represented in hexadecimal base, in the following way: var a = 0x0028 &lt;&lt; 16 + 0x0010; and what I expect to get is 0x00280010. Unfortunately JavaScript makes a equals 40, (which of course is 0x0028). If I shift the bits without adding 0x0010, everything works fine, I get 2621440 for a, which is 0x280000. Why adding 0x0010 yields such results for a. I am not that good at this kind of arithmetic, am I doing or expecting something wrong? Thank you all in advance :)
has answer: http://stackoverflow.com/a/27035054
has title: Adding two hex numbers javascript with bit shift
tagged with: hex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27035053
upvote count: 1
possible better answer: http://stackoverflow.com/a/27035054
type: Question
tagged with: bit-shift

http://stackoverflow.com/comment/42652802
has text: Did none of these work [SO duplicate question](http://stackoverflow.com/questions/819416/adjust-width-height-of-iframe-to-fit-with-content-in-it)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27069176

http://stackoverflow.com/comment/42533960
score: 1
comment on: http://stackoverflow.com/q/27001983
has text: Which statement are you asking about specifically? And, what do you mean by "not working?" What do you expect to happen?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42561369
score: 0
type: Comment
has text: Should I add css class to all fields or only the time filed that I'm using? @RamzanZafar
type: AnswerComment
comment on: http://stackoverflow.com/a/27018019

http://stackoverflow.com/q/27062551
tagged with: jquery-events
has title: Cancel 'on' event in javascript/jQuery
has comment: http://stackoverflow.com/comment/42639306
tagged with: css
has comment: http://stackoverflow.com/comment/42639156
has comment: http://stackoverflow.com/comment/42639594
accepted answer: http://stackoverflow.com/a/27062751
has body: I have the following jQuery script in my code, that executes at the end of a CSS animation: $('.player').on('webkitAnimationEnd', function() { gameOver(); }); I'd like to know how can I cancel or unset this, so that the gameOver function will not be executed anymore at the end of the animation.
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42639147
has comment: http://stackoverflow.com/comment/42639208
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42639130
has comment: http://stackoverflow.com/comment/42639245
has answer: http://stackoverflow.com/a/27062751
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42639142
has comment: http://stackoverflow.com/comment/42639117
score: 0

http://stackoverflow.com/comment/42712819
type: Comment
has text: Thanks for your reply Surya. I am converting this code in python to run from selenium as follows: sel = self._browser.get_current_browser().execute_script("document.getElementById('sel_audio')") new_option = self._browser.get_current_browser().execute_script("document.createElement('option')") new_option.text = "HighPiono" new_option.value = "HighPiono.wav" sel.add(option)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27101512

http://stackoverflow.com/q/27004136
has title: Position popup image on mouseover
has answer: http://stackoverflow.com/a/27006177
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42538196
tagged with: css
has answer: http://stackoverflow.com/a/27004834
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27005817
tagged with: onmouseover
has body: I'm trying to replicate the effect seen on this webpage: http://www.strongtie.com/products/alpha_list.html?source=topnav When hovering over the text in the alphabetical listing, a popup image appears directly to the left of the text. This page helped get me started but I would like my images to appear to the left, instead of below. Also how do I get a different image to appear for multiple tags (instead of the just the one, (listed on the help page linked above) in var pathToImage? < script type = "text/javascript" > <!-- $(document).ready(function() { var yOff = 15; var xOff = -20; var pathToImage = "/v/vspfiles/images/simpson/A21__.jpg"; $(".text-hover-image").hover(function(e) { $("body").append(" "); $("#image-when-hovering-text") .css("position", "absolute") .css("top", (e.pageY - yOff) + "px") .css("left", (e.pageX + xOff) + "px") .fadeIn("fast"); }, function() { $("#image-when-hovering-text").remove(); }); $(".text-hover-image").mousemove(function(e) { $("#image-when-hovering-text") .css("top", (e.pageY - yOff) + "px") .css("left", (e.pageX + xOff) + "px"); }); }); //--> < /script> The result is on this page if you scroll down a bit to "A Angles" and hover over the link. Any help appreciated, thanks!
type: Question
tagged with: javascript
upvote count: 2
linked to: http://stackoverflow.com/q/20166877
answer count: 3

http://stackoverflow.com/comment/42652664
comment on: http://stackoverflow.com/a/27031588
type: AnswerComment
score: 0
has text: Ugh I feel so stupid. You're right the src is added dynamically, it makes sense now, thanks
type: Comment

http://stackoverflow.com/a/27018584
score: 12
downvote count: 0
has comment: http://stackoverflow.com/comment/125409409
type: Answer
upvote count: 12
has body: In your html: Enter name: In your javascript: myFunction = function(e) { // prevents default action to happen e.preventDefault(); // do what ever you want to do here // i.e. perform a AJAX call }
answers question: http://stackoverflow.com/q/27018422

http://stackoverflow.com/comment/42767770
comment on: http://stackoverflow.com/a/27133657
score: 0
type: AnswerComment
has text: Thanks a lot, haven't seen that! ^_^
type: Comment

http://stackoverflow.com/comment/42723874
type: Comment
comment on: http://stackoverflow.com/a/27110118
type: AnswerComment
has text: You have already marked some post as answer, you are still facing issue? also recheck my answer i told you to use `$("#<%=tbl1.ClientID%>").show()` not `$("#tbl1").show();` - just an example.
score: 0

http://stackoverflow.com/q/27107800
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42801914
has answer: http://stackoverflow.com/a/27263292
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42952514
has comment: http://stackoverflow.com/comment/42945963
linked to: http://stackoverflow.com/q/19101258
has answer: http://stackoverflow.com/a/27261064
tagged with: zombie.js
has comment: http://stackoverflow.com/comment/43037567
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42801983
tagged with: openshift
tagged with: node.js
has title: Zombiejs empty HTML
has comment: http://stackoverflow.com/comment/42801325
has comment: http://stackoverflow.com/comment/42801811
has body: I'm deploying a Zombiejs application to Openshift, but Zombie seems to be unable to fetch the HTML. I have an object (called Poker) that maintains the headless browser and does things with it. One of the methods, called init, logs in to a website and returns the "initialized" browser. Poker.prototype.init = function (email, password, ip) { var self = this; var browser; // Have to use the ip that Openshift provides // See SO question http://goo.gl/n2TfMC if (ip) { browser = Zombie.create({ 'localAddress': ip }); } else { browser = Zombie.create(); } return new Promise(function (resolve, reject) { browser .visit('http://some.login/page') .then(function () { // Some debugging stuff :p console.log('body: '); console.log(browser.html('body')); // Fill in the credentials browser.fill('email', email); browser.fill('password', password); return browser.pressButton('Log In'); }) .done(function() { // Logged in, new page loaded // Check if login was successful var title = browser.text('title'); console.log(title); }); }); } The console remains empty after printing body:, anden Zombie attempts to fill in the email address, I receive this error: Possibly unhandled TypeError: Cannot use 'in' operator to search for 'compareDocumentPosition' in null at /var/lib/openshift/[app-id]/app-root/runtime/repo/node_modules/zombie/node_modules/jsdom/node_modules/nwmatcher/src/nwmatcher-noqsa.js:267:43 at module.exports (/var/lib/openshift/[app-id]/app-root/runtime/repo/node_modules/zombie/node_modules/jsdom/node_modules/nwmatcher/src/nwmatcher-noqsa.js:37:7) at addNwmatcher (/var/lib/openshift/[app-id]/app-root/runtime/repo/node_modules/zombie/node_modules/jsdom/lib/jsdom/selectors/index.js:6:27) at HTMLDocument.&lt;anonymous&gt; (/var/lib/openshift/[app-id]/app-root/runtime/repo/node_modules/zombie/node_modules/jsdom/lib/jsdom/selectors/index.js:18:29) at HTMLDocument.querySelectorAll (/var/lib/openshift/[app-id]/app-root/runtime/repo/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1…
has comment: http://stackoverflow.com/comment/43061067

iphone
tags question: http://stackoverflow.com/q/27142212
tag name: iphone
tags question: http://stackoverflow.com/q/27052838
tags question: http://stackoverflow.com/q/26995752
tags question: http://stackoverflow.com/q/26996619
tags question: http://stackoverflow.com/q/27059524
type: Tag

http://stackoverflow.com/comment/42739127
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27118292
type: Comment
has text: ok ill take a look at the guide. That is my entire code the only thing i didnt add was an angular.constant with my full firebase url

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/27140391
tags question: http://stackoverflow.com/q/27071621
tags question: http://stackoverflow.com/q/27139331
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/27148712
tags question: http://stackoverflow.com/q/27072187
tags question: http://stackoverflow.com/q/27049162
tags question: http://stackoverflow.com/q/27024807

http://stackoverflow.com/a/27097931
type: Answer
has body: You forgot one thing in data-bind. data-bind="text: name" in H2. You can see update in http://jsfiddle.net/8j7g08qr/2/
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27095437
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42701142
downvote count: 0
answers question: http://stackoverflow.com/q/27095437

http://stackoverflow.com/q/27112779
has comment: http://stackoverflow.com/comment/42728397
has body: I'm implementing justifiedGallery in my website. However, I keep getting Uncaught TypeError. I've included the files like below: What am I doing wrong?
has comment: http://stackoverflow.com/comment/42730140
has comment: http://stackoverflow.com/comment/42728432
has comment: http://stackoverflow.com/comment/42728610
has title: “Uncaught TypeError: undefined is not a function” - justifiedGallery
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42728527
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/42728861
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/71743882
has text: @Fratsen i have another issue my google captcha show up and i want to hide it
comment on: http://stackoverflow.com/a/28454110
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27122816
score: 0
type: Answer
has body: In the meantime i sort of fixed it, by using ng-show (it updates automatically then)
answers question: http://stackoverflow.com/q/27017021

http://stackoverflow.com/comment/42576556
score: 0
has text: Not sure about this specific problem but fyi that lib is gaining dust.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27026518

http://stackoverflow.com/a/27101064
has comment: http://stackoverflow.com/comment/42706394
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42706408
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42706491
has comment: http://stackoverflow.com/comment/42706508
score: 1
accepted answer of: http://stackoverflow.com/q/27101032
has comment: http://stackoverflow.com/comment/42707156
answers question: http://stackoverflow.com/q/27101032
has comment: http://stackoverflow.com/comment/42707545
has comment: http://stackoverflow.com/comment/42707399
has body: I think it should be: ngBindHtml expects an expression, hence you don't have to use interpolation markers {{ ... }}. To open a link in new tab you would use target setting of the linky filter: ng-bind-html="deal.notification_details | linky:'_blank'"

http://stackoverflow.com/q/27149837
tagged with: unix
has comment: http://stackoverflow.com/comment/42826069
type: UnansweredQuestion
tagged with: httrack
has body: there is a site that uses strapdown.js that I am trying to mirror using httrack or wget, but I fall short, because the site contains markdown and not HTML. Only strapdown converts the links to html links. Hence the client needs to interpret Javascript first and then search for links in the generated dom. Is there a tool in the market that is able to do this? I have tried wget -erobots=off --no-parent --wait=3 --limit-rate=20K -r -p -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" -A htm,html,css,js,json,gif,jpeg,jpg,bmp http://my.si.te and httrack -w -v --extended-parsing=N -n -t -r -p -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" --robots=0 http://my.si.te "+*" "-r6" Any help is highly appreciated.
has title: Trying to mirror site that uses strapdown.js
type: Question
tagged with: wget
tagged with: javascript
score: 0
tagged with: linux
has answer: http://stackoverflow.com/a/27168111
answer count: 1

http://stackoverflow.com/q/27006294
has answer: http://stackoverflow.com/a/27551173
downvote count: 0
type: UnansweredQuestion
type: Question
score: 1
has title: Openlaszlo WebSocket not working
has body: I tried to connect my openlaszlo application be WebSocket Api. But It did not work. I used javascript in lzx file. the same javascript is working as a plain html file. But it is not working in lzx file. <attribute name="changeToLabel" value="Clicked!" type="string"/> var newLabel = openFunction(this.changeToLabel); //this.setAttribute('text', newLabel); openSocket(); <simplelayout axis="y" spacing="10"/> Not clicked Please click me! The Debug Output is given bellow: ERROR @helloClass.lzx#72: reference to undefined variable 'webSocket' ERROR @helloClass.lzx#78: call to undefined function 'WebSocket' ERROR @helloClass.lzx#83: reference to undefined variable 'webSocket' ERROR @helloClass.lzx#83: undefined object does not have a property 'onopen' ERROR @helloClass.lzx#93: reference to undefined variable 'webSocket' ERROR @helloClass.lzx#93: undefined object does not have a property 'onmessage' ERROR @helloClass.lzx#97: reference to undefined variable 'webSocket' ERROR @helloClass.lzx#97: undefined object does not have a property 'onclose' Is WebSocket Api not supported in lzx or openlaszlo? Please suggest me how I will connect real time 2 way communication. Thanks in advance.
upvote count: 1
answer count: 1
tagged with: websocket
tagged with: javascript
favorite count: 0
tagged with: openlaszlo

http://stackoverflow.com/q/27134142
has answer: http://stackoverflow.com/a/27134643
type: UnansweredQuestion
has body: I was trying to create a 10X10 table using HTML and JavaScript and found that it wasn't working can anyone please find the mistake.... HTML CODE: GameOFLife JavaScript Code: function createTable(){ var body = document.getElementsByTagName('body'); body.innerHTML(' '); var table = document.getElementById('table'); for(var i = 0 ; i<10 ; i++){ table.innerHTML(' '); } var td = document.getElementsByTagName('td') td.style.width = 10+'px'; td.style.height = 10+'px'; td.style.margin = 0+'px'; td.style.padding = 0+'px'; td.style.border = 1+'px'+' solid black' ; }
has answer: http://stackoverflow.com/a/27134283
type: Question
has title: TABLES: JavaScript Not Working
score: 1
tagged with: html-table
tagged with: for-loop
answer count: 3
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42766973
has comment: http://stackoverflow.com/comment/42766757
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27134313
has comment: http://stackoverflow.com/comment/42771880
downvote count: 0

http://stackoverflow.com/a/27141319
score: 1
accepted answer of: http://stackoverflow.com/q/27141256
answers question: http://stackoverflow.com/q/27141256
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42780159
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/42780069
has comment: http://stackoverflow.com/comment/42780389
has body: If your button #form comes with the last added dynamic element then you can try this out because .change or .on don't work with dynamically appended html elements. jQuery has given a $(document).on event to do that. jQuery(document).ready(function($) { // Calculate sub-sums on any form changes $(document).on('click','#form',function() { var sum = 0; $('.form-row').each(function() { sum += Number( $(this).find('.unit').val()) * Number( $(this).find('.price').val() ); alert( sum ); }); }); });
has comment: http://stackoverflow.com/comment/42781193

http://stackoverflow.com/a/27004428
has body: In your view model, construct the remove button like this: viewModel.remove = function (row) { console.log(row); viewModel.NewAccountGroupDetails.remove(row); }; Now, the current context is passed as the first argument to any callback in knockout. Therefore, if you add a button with data-bind="click: $parent.remove", it will call the viewModel.remove function with the row context. ... Remove
downvote count: 0
has comment: http://stackoverflow.com/comment/42565605
has comment: http://stackoverflow.com/comment/42545360
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42565481
upvote count: 2
answers question: http://stackoverflow.com/q/27004064

http://stackoverflow.com/a/27449576
has body: Having the exact same problem here. The Autocomplete library doesn't provide any other event than place_changed. There is also no status property e.g. request_pending. There is a "hack" from mmalone here: Google Autocomplete - enter to select Worked great for me.
score: 2
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27072844

http://stackoverflow.com/comment/42723114
type: QuestionComment
comment on: http://stackoverflow.com/q/27109783
has text: @Arthur Rey: Always show the *real* problem. That way assumptions are not made that simplify the answer too much :) For instance I would recommend using `data-` attributes in that scenario (not IDs).
score: 0
type: Comment

http://stackoverflow.com/comment/42653222
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27066190
score: 0
has text: you should use Assets.js from mootools-more - http://mootools.net/more/docs/1.5.1/Utilities/Assets, and you can make it work with multiples - http://stackoverflow.com/questions/8665217/mootools-help-loading-multiple-per-page-asset-javascript-files - or better yet, use a real loader like requireJS :)

http://stackoverflow.com/a/27111457
accepted answer of: http://stackoverflow.com/q/27110469
type: Answer
answers question: http://stackoverflow.com/q/27110469
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: maskMoney will only work on an &lt;input&gt; element but it doesn't need to be visible. You can use a hidden moneyMask &lt;input&gt; as a formatter and copy its value to another element (eg div/span) of your choice. $('#currency').maskMoney({prefix:'$'});//hidden by css directive function set(val, $container) { $('#currency').maskMoney('mask', val); $container.text($('#currency').val()); } DEMO

http://stackoverflow.com/q/27152701
has comment: http://stackoverflow.com/comment/42800296
tagged with: javascript
has body: I have been working on a function in JavaScript which would permute the letters in a word on mouseenter. I cant get past the first step, which would be converting the letters into numbers to increment their values. First I tried: function permuter1(){ var polygon=document.getElementById("permutable").innerHTML; polygon = polygon.toLowerCase(); polygon.split(""); var converter = {a:0,b:1, c:2,d:3,e:4,f:5,g:6,h:7,i:8,j:9,k:10,l:11,m:12,n:13,o:14,p:15,q:16,r:17,s:18,t:19,u:20,v:21,w:22,x:23,y:24,z:25}; for (index=0; index<polygon.length;index++) { polygon[index] = converter[polygon[index]]; } for testing i had been using only: document.getElementById("permutable").innerHTML = polygon[0]; and in the html I have: Browse I would hope that mouseover would give me 1, but instead I got b. so i tried: for (index=0; index<polygon.length;index++) { polygon[index]=polygon[index].charCodeAt(); } Same result. I even tried: var str = ""; for (index=0; index<polygon.length;index++) { str=str +polygon[index]; } for (index=0; index<polygon.length;index++) { polygon[index] = str.charCodeAt(index); } Same result! I tested everything up to the for loop and know that its working. What am I doing wrong in the for loop?
score: 0
accepted answer: http://stackoverflow.com/a/27152860
tagged with: innerhtml
has comment: http://stackoverflow.com/comment/42799970
possible better answer: http://stackoverflow.com/a/27153285
has answer: http://stackoverflow.com/a/27152860
type: Question
type: AnsweredQuestion
tagged with: onmouseover
has title: JavaScript converting an array of letters to numbers
answer count: 2
tagged with: function
has answer: http://stackoverflow.com/a/27153285

http://stackoverflow.com/a/27089130
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27088967
downvote count: 0
has body: The problem is that window refers to the current window, which is the original. By opening a new window in self you replace the page, this is basically a redirect. And if you open it via popup and print it as w.print() than you run into cross-origin security error. You could use iframe to this with a proxy as shown here How do print specific content inside the iframe and here How do print specific content inside the iframe

http://stackoverflow.com/comment/42638992
type: AnswerComment
type: Comment
has text: Glad I could help! You helped me to cross the 1000 reputation ;)
comment on: http://stackoverflow.com/a/27062383
score: 0

http://stackoverflow.com/q/27053126
has comment: http://stackoverflow.com/comment/42836187
has comment: http://stackoverflow.com/comment/42852842
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I would like to jump to a spot in someone else's page. I know I can do this by appending to the url a '#' with the name attribute of the element I want to jump to, e.g. Click! But what if I want to jump to a spot on their page that doesn't have an id or a name? Can I do a page jump by first instance of an element name or class? Can I scroll down the page a certain amount of pixels? Is there another way to page jump to a spot on someone else's page without ids or names? I don't mind using javascript/jquery. UPDATE In many browsers, like Chrome for example, there is a console to edit a page's scripts, such as its HTML, CSS, and JS. On the page I am currently on, I can open the js console, grab the element 'body' and change it's CSS to 'position: absolute; top: -1000px', which would essentially 'scroll down' the way that I need it to. Can I do this to a page in an iframe in any way shape or form, without the cross-origin error stuff?
has comment: http://stackoverflow.com/comment/42626633
score: 0
has comment: http://stackoverflow.com/comment/42849976
has title: Page jump without name or id
has comment: http://stackoverflow.com/comment/42623254
has comment: http://stackoverflow.com/comment/42837347
answer count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/42623256

http://stackoverflow.com/a/27082156
has comment: http://stackoverflow.com/comment/42674654
has comment: http://stackoverflow.com/comment/42674871
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/42674157
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/42675022
has comment: http://stackoverflow.com/comment/42674096
answers question: http://stackoverflow.com/q/27082013
type: Answer
has comment: http://stackoverflow.com/comment/42673919
accepted answer of: http://stackoverflow.com/q/27082013
has comment: http://stackoverflow.com/comment/42674717
has comment: http://stackoverflow.com/comment/42674814
has comment: http://stackoverflow.com/comment/42674986
has body: div#uploa by default have a display property set to block, wich meens any added element will be set below the div, so what you need to do, is to set position of the div to relative, then the position of the images to absolute, then control the left property using javascript. this is exactly the element you need to target output#list { position: absolute; top: 10; left: 230; }
has comment: http://stackoverflow.com/comment/42674006
has comment: http://stackoverflow.com/comment/42674972
has comment: http://stackoverflow.com/comment/42673925
has comment: http://stackoverflow.com/comment/42674493
has comment: http://stackoverflow.com/comment/42674782
has comment: http://stackoverflow.com/comment/42674768

http://stackoverflow.com/comment/42775746
type: QuestionComment
score: 2
type: Comment
has text: I agree with @AlexK.. Leave the shorthand to the code compressors. Write code to be comprehensible.
comment on: http://stackoverflow.com/q/27138844

http://stackoverflow.com/q/27148712
has comment: http://stackoverflow.com/comment/42792896
favorite count: 0
tagged with: ruby
has comment: http://stackoverflow.com/comment/42796789
type: UnansweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/42792466
has comment: http://stackoverflow.com/comment/42828303
answer count: 0
has title: form_for does not work after removing turbolinks in rails app
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: turbolinks
tagged with: javascript
has comment: http://stackoverflow.com/comment/42794634
has comment: http://stackoverflow.com/comment/42792647
has comment: http://stackoverflow.com/comment/42792489
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/42812685
has body: I decided not to use the turbolinks because he was giving conflict with some javascript libraries, but after removing it does not submit the forms. I first removed the turbolinks the application.js after I used rake assets:clobber and rake assets:precompile application.js //= require jquery_ujs //= require_tree . _footer.html.erb &lt;!-- BEGIN CORE JS FRAMEWORK--&gt; &lt;%= javascript_include_tag '/assets/jquery-1.8.3.min' %&gt; &lt;!-- Others Javascript libraries here --&gt; &lt;!-- END CORE JS FRAMEWORK --&gt; &lt;%= javascript_include_tag 'application' %&gt; _form.html.erb &lt;%= form_for(@passenger, html: { class: 'form-no-horizontal-spacing', id: 'form-condensed' }) do |f| %&gt; &lt;%= f.text_field :passenger_name, class: 'form-control', placeholder: 'Nome', required: true %&gt; &lt;%= f.email_field :passenger_email, class: 'form-control', placeholder: 'Email', required: true %&gt; &lt;%= f.text_field :passenger_phone, class: 'form-control', placeholder: 'Telefone' %&gt; &lt;%= f.text_field :passenger_birthday, class: 'form-control', placeholder: 'Data de Nasc.', required: true %&gt; &lt;%= f.text_field :passenger_cpf, class: 'form-control', placeholder: 'CPF', required: true %&gt; &lt;%= f.text_field :passenger_address, class: 'form-control', placeholder: 'Endereço' %&gt; &lt;%= f.text_field :responsible_name, class: 'form-control', placeholder: 'Nome do responsável', required: true %&gt; &lt;%= f.email_field :responsible_email, class: 'form-control', placeholder: 'Email do responsável' %&gt; &lt;%= f.text_field :responsible_cpf, class: 'form-control', placeholder: 'CPF do responsável' %&gt; &lt;%= f.text_field :responsible_phone, class: 'form-control', placeholder: 'Telefone do responsável', required: true %&gt; &lt;%= f.submit 'Salvar', class: 'btn btn-danger btn-cons' %&gt; &lt;% end %&gt; Print screen with Javascript loaded: After I remove the turbolinks, I can not submit the form. Does anyone know why?

http://stackoverflow.com/q/27047800
type: Question
score: 0
has answer: http://stackoverflow.com/a/27051229
answer count: 1
tagged with: javascript
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42619494
tagged with: visual-studio
tagged with: visual-studio-2013
has body: Sometimes I have syntax errors underlined in my .js files in my Asp.net MVC project. I noticed that the project still builds though, and when I build then debug I waste a few valuable seconds navigating to the place that runs that code in order for it to fail (fairly silently at that) in the browser. Can I tell visual studio to fail the build if it detects an error in my javascript syntax? If not, is there a command line tool out there that can detect javascript syntax errors? If so, I can call it post-build. Thanks.
type: UnansweredQuestion
has title: Can I fail asp.net visual studio 2013 project builds if there's syntax errors in javascript files?

http://stackoverflow.com/comment/42732491
comment on: http://stackoverflow.com/q/27110633
score: 0
type: Comment
type: QuestionComment
has text: Might be due to the fact you have 4 copies of jQuery being imported which can cause conflicts and issues like this. Please make sure you have **only 1** instance of it imported. For this, you can use an extension such as *jQueryEasy*

http://stackoverflow.com/comment/42587133
has text: Just one thing, why do we add the a modulus here? I dont understand that part. I know what the modulus does but why is it useful here?
type: Comment
comment on: http://stackoverflow.com/a/27032818
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42794765
type: QuestionComment
comment on: http://stackoverflow.com/q/27149822
score: 0
has text: Can you tell us which part isn't working? Are you not getting data back from the server or is it not populating the select properly? Any JS errors?
type: Comment

http://stackoverflow.com/q/27008403
has answer: http://stackoverflow.com/a/27008431
has answer: http://stackoverflow.com/a/27008445
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27008445
type: Question
has title: Populate fields after ajax load
accepted answer: http://stackoverflow.com/a/27008431
tagged with: javascript
score: 0
answer count: 2
has body: I have a form that allows the user to pay via credit card or paypal using radio buttons and when they click on each one respectively - the correct form loads via ajax. My problem is: after the new form is loaded (via .html()) all my jquery doesn't work. For example the price of a donation is a radio field and on change it populates a span in order review. After the form loads all this doesn't work. I'm also using floatlabel.js which doesn't work on the loaded form either. JSFiddle HTML - Donation Amount $3000 $1800 $500 $360 $180 Other HTML Payment Method Credit Card Paypal HTML - Order Review (this is in the ajax loaded form) jQuery - Populating span in order review $("input[name=amounts]").change(function (e) { if ($(this).val() == 'other') { $("input[name=other_amt]").bind("change paste keyup", function() { $("input.hidn-amt").val( '$'+$(this).val()); $("span.amount").val( '$'+$(this).val()); }); }else{ var selected = $("input[name=amounts]:checked"); $("input.hidn-amt").val( '$'+selected.val()); $("span.amount").val( '$'+$(this).val()); } });
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/a/27109293
has body: In the end I have used this approach: https://web.archive.org/web/20161104225152/http://vadimpopa.com/onblur-like-for-a-div-in-angularjs-to-close-a-popup/
score: 7
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27060974
answers question: http://stackoverflow.com/q/27060974
type: Answer
upvote count: 7

http://stackoverflow.com/comment/85050202
score: 0
has text: @ShellFish RegEx isn't RegEx?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27006363

http://stackoverflow.com/comment/42653028
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27070151
has text: It's called deep watching. This may help: http://stackoverflow.com/questions/14712089/how-to-deep-watch-an-array-in-angularjs

http://stackoverflow.com/q/27041708
has comment: http://stackoverflow.com/comment/42603804
score: 0
has comment: http://stackoverflow.com/comment/42603744
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42603656
answer count: 0
has comment: http://stackoverflow.com/comment/42604225
tagged with: iframe
has title: If child page has content, enable link, else disable link
type: Question
tagged with: javascript
tagged with: jquery
has body: I am working on a mosaic of thumbnails linking to child pages. The code works in such a way that the child pages display in an iframe overlaying the content. However the client wants only 4 of these pages to have content, so the code needs to work in such a way that ONLY if the child page has content, does the rollover get enabled to open as an iframe overlay. I currently have the following code. Any ideas how i could customise it so that the overlay is enabled ONLY if the child page has content? Many thanks. &lt;section id="content" role="main"&gt; &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt; &lt;article id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt; &lt;section id="content_team" class="entry-content js-masonry"&gt; &lt;?php $child_pages = $wpdb-&gt;get_results("SELECT * FROM $wpdb-&gt;posts WHERE post_parent = " . $post-&gt;ID . " AND post_type = 'page' ORDER BY menu_order", 'OBJECT'); ?&gt; &lt;?php if ($child_pages) : foreach ($child_pages as $pageChild) : setup_postdata($pageChild); ?&gt; &lt;div class="child-thumb"&gt; &lt;div id="click_overlay" onclick="var overlay = document.getElementById('hidden_overlay'); overlay.src = 'about:blank'; overlay.style.display = 'block'; overlay.src = '&lt;?php echo get_permalink($pageChild-&gt;ID); ?&gt;';"&gt;&lt;span class="featured-title-overlay"&gt; &lt;span class="featured-title"&gt; &lt;span class="title"&gt;&lt;?php echo get_the_title($pageChild-&gt;ID); ?&gt;&lt;/span&gt; &lt;div class="hr"&gt;&amp;nbsp;&lt;/div&gt; &lt;span class="title_link"&gt;Read more...&lt;/span&gt; &lt;/span&gt; &lt;/span&gt;&lt;?php echo get_the_post_thumbnail($pageChild-&gt;ID); ?&gt;&lt;/div&gt; &lt;br class="clear" /&gt; &lt;/div&gt; &lt;?php endforeach; endif; ?&gt; &lt;/section&gt; &lt;/article&gt; &lt;?php endwhile; endif; ?&gt; &lt;iframe id="hidden_overlay" src="about:blank"&gt;&lt;/iframe&gt; &lt;p class="clear"&gt;&amp;nbsp;&lt;/p&gt; &lt;/section&gt;

http://stackoverflow.com/comment/42632872
type: AnswerComment
has text: Tyler, you can use the {{}} notation in the argument also, I added a line in my answer, would that do it?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27058400

http://stackoverflow.com/comment/42571491
score: 0
type: Comment
type: QuestionComment
has text: @NimaSoroush - Yes, getting the chat's text is my requirement and the example you gave is the exact output that I want
comment on: http://stackoverflow.com/q/27013428

http://stackoverflow.com/q/27144409
accepted answer: http://stackoverflow.com/a/27144515
has title: Google-Chart Bar Animation
possible better answer: http://stackoverflow.com/a/27144590
has answer: http://stackoverflow.com/a/27144590
tagged with: cordova
type: AnsweredQuestion
has body: Which property of google chart adds the Animation in column chart from top to bottom ? By Adding animation: {duration: 10000, easing: 'out',} in option is enough or we need to add something else also for that ?
has answer: http://stackoverflow.com/a/27144515
type: Question
tagged with: charts
tagged with: google-visualization
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/comment/42751736
has text: The menu-bar is the foundation nav-bar ? And what does it mean "toggle not working" ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27102105

http://stackoverflow.com/q/27098984
has answer: http://stackoverflow.com/a/27099027
accepted answer: http://stackoverflow.com/a/27099027
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Get Attributes of HTML 5 Circles in Javascript
possible better answer: http://stackoverflow.com/a/27099135
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27099390
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
has body: I have multiple html circles that are appended to an svg using D3.js. Each circle doesn't have any ID or Class and looks like when I inspect the elements in the browser: &lt;circle cx="50" cy="80" r="1" style="fill: rgb(255, 0, 0);"&gt;&lt;/circle&gt; I want to get the values of cx and cy into javascript variables. I tried something like: var v = $('circle').value; but how do I reference the attributes cx and cy? I tried var x_val = $('circle.cx').value; but that is undefined. Also tried var x_val = $('circle').data('cx'); but that is null.
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/27099135
upvote count: 1

http://stackoverflow.com/comment/42527989
has text: Ok that fixes things. @Blazemonger as well
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26998801
type: Comment

http://stackoverflow.com/a/42975776
answers question: http://stackoverflow.com/q/27078285
downvote count: 1
type: Answer
has body: callback: takes the function that should be called limit: number of times that function should be called within the time limit time: time span to reset the limit count functionality and usage: Suppose you have an API that allows user to call it 10 times in 1 minute function throttling(callback, limit, time) { /// monitor the count var calledCount = 0; /// refresh the `calledCount` varialbe after the `time` has been passed setInterval(function(){ calledCount = 0 }, time); /// creating a closure that will be called return function(){ /// checking the limit (if limit is exceeded then do not call the passed function if (limit &gt; calledCount) { /// increase the count calledCount++; callback(); /// call the function } else console.log('not calling because the limit has exceeded'); }; } //////////////////////////////////////////////////////////// // how to use /// creating a function to pass in the throttling function function cb(){ console.log("called"); } /// calling the closure function in every 100 milliseconds setInterval(throttling(cb, 3, 1000), 100);
upvote count: 15
has comment: http://stackoverflow.com/comment/90026958
has comment: http://stackoverflow.com/comment/80191741
has comment: http://stackoverflow.com/comment/89214656
score: 14
has comment: http://stackoverflow.com/comment/88998718
has comment: http://stackoverflow.com/comment/92480100

http://stackoverflow.com/a/26998789
type: Answer
has body: $(".coins").each(function(){ var $self = $(this); var applyCoins = function(){ $self.empty(); var coins = $self.data("coins"); for (var i=coins-1; i&gt;=0; i--) { var $coin = $("&lt;div&gt;&lt;/div&gt;").addClass("coin").css("top", (i*20)+"px"); $self.append($coin); } }; $self.on("loadCoins", function(){ applyCoins(); }); applyCoins(); }); $("#button").click(function(){ $(".coins").data("coins", $("#input").val()).trigger("loadCoins"); }); .coins { width: 120px; height: 120px; position: relative; overflow: visible; } .coins .coin { width: 120px; height: 120px; position: absolute; top: 0; left: 0; background-color: #FF0000; border-bottom: 3px solid #333333; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;p&gt; &lt;input type="text" value="3" id="input" /&gt; &lt;input type="button" value="change" id="button" /&gt; &lt;/p&gt; &lt;div class="coins" data-coins="10"&gt;&lt;/div&gt;
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/26998297
score: 0

http://stackoverflow.com/q/27032552
score: 0
has title: isNaN JavaScript Function
has answer: http://stackoverflow.com/a/27032754
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27032908
type: Question
has body: I'm learning to learn how to use isNaN for the first time and wanted some help spotting my errors. I set isNaN for variable a, with an alert box, but when I put in a word or not a number, the alert doesn't come up. Project Sample Order Form Quantity item Unit Price Totals Apples $5.49 Pears $7.49 Grapes $6.49 Subtotal Tax@6% Total
answer count: 2
has comment: http://stackoverflow.com/comment/42586829

http://stackoverflow.com/comment/42718867
type: QuestionComment
has text: Indeed. You can do it by yourself, or use a framework. Amongst others, jQuery has [dialogs](http://jqueryui.com/dialog/), Bootstrap has [modals](http://getbootstrap.com/javascript/#modals) etc.
comment on: http://stackoverflow.com/q/27107854
score: 0
type: Comment

http://stackoverflow.com/q/27140377
has answer: http://stackoverflow.com/a/27140654
has answer: http://stackoverflow.com/a/27140635
answer count: 3
has comment: http://stackoverflow.com/comment/42778599
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42778326
favorite count: 0
has title: Change color for the class using different css files
tagged with: css
accepted answer: http://stackoverflow.com/a/27140635
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27140431
has comment: http://stackoverflow.com/comment/42778356
score: 1
has comment: http://stackoverflow.com/comment/42778355
upvote count: 1
possible better answer: http://stackoverflow.com/a/27140431
type: Question
has body: I am trying to have one of the classes in my game change color so I used a different css files for each color. The stylesheets are in a folder called stylesheets. I used the script below to make it simple and short and be useable for all colors but it the color doesn't change. I believe the problem is with the href link. Is there a problem with my script? jQuery: HTML: Blue Black Gray Green(Default) Pink Yellow

http://stackoverflow.com/a/27050471
answers question: http://stackoverflow.com/q/27049744
has body: If you don't want to reload the page, then you can try: foreach ($res as $row) { echo '&lt;tr&gt;&lt;td&gt;&lt;button id="pupShow" name="'.$row["ID"].'" onclick="return false;"&gt;'.$row["SubjectName"].'&lt;/button&gt; &lt;/td&gt;&lt;/tr&gt;'; } or $("button#pupShow").click(function (el) { el.preventDefault(); var data = 'nume=' + el.val() $.ajax({ url: "subID.php", type: "POST", data: data, cache: false, success: function (html) { if (html) { // animations here alert('Success! Form submitted'); } else{ alert('Error! Please try again'); } } }); I didn't test it but it should help you understand how the function will look like.
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27049744

http://stackoverflow.com/q/27047112
tagged with: object
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42612482
type: Question
has body: I am making a game but having some troubles. I create three classes: Player, Block and gameManager. I am having problem with mouse_listener because every time when I try calling loop, instruction or credit, it gives me an Uncaught error saying that undefined is not a function. How do I bypass it? function gameManager() { this.clear = function () { ctx.clearRect(0, 0, canvas.width, canvas.height); } this.update = function () { ctx.drawImage(game_background, 0, game_background.vy); ctx.drawImage(game_background, 0, 800-Math.abs(game_background.vy)); if (Math.abs(game_background.vy) &gt; 800) { game_background.vy = 0; } ctx.font = "bold 20px Arial"; ctx.fillText("Score: " + score, 0, 20); ctx.fillText("Highscore: "+ high_score, 420, 20); for (var i=0; i&lt;blocks.length; i++) { player.update(blocks[i]); blocks[i].update(); } } this.draw = function () { player.draw(); for (var i=0; i&lt;blocks.length; i++) { blocks[i].draw(); } } this.loop = function () { (function loop() { this.clear(); this.update(); this.draw(); setTimeout(loop, 60)})(); } this.setup = function () { this.clear(); ctx.drawImage(menu_background, 0, 0); ctx.drawImage(play_button, 150, 170); ctx.drawImage(instruction_button, 150, 290); ctx.drawImage(credit_button, 150, 410); } this.instruction = function () { this.clear(); //ctx.drawImage(instruction_background, 0, 0); } this.gameover = function () { this.clear(); ctx.drawImage(gameover_retry, 0, 0); } this.mouse_listener = function (e) { console.log("x: " + e.clientX); console.log("y: " + e.clientY); if (e.clientX &gt;= 164 &amp;&amp; e.clientX &lt;= 460 &amp;&amp; e.clientY &gt;= 180 &amp;&amp; e.clientY &lt;= 220) { this.loop(); } else if (e.clientX &gt;= 164 &amp;&amp; e.clientX &lt;= 460 &amp;&amp; e.clientY &gt;= 300 &amp;&amp; e.clientY &lt;= 340) { this.instruction(); } else if (e.clientX &gt;= 164 &amp;&amp; e.clientX &lt;= 460 &amp;&amp; e.clientY &gt;= 410 &amp;&amp; e.clientY &lt;= 460) { this.credit(); } } this.keyboard_listener = function (…
accepted answer: http://stackoverflow.com/a/27047181
linked to: http://stackoverflow.com/q/962033
tagged with: function
tagged with: javascript
tagged with: class
score: 0
has answer: http://stackoverflow.com/a/27047181
tagged with: this
answer count: 1
has comment: http://stackoverflow.com/comment/42614002
has title: Trouble in reference with this and function: Undefined is not a function

http://stackoverflow.com/comment/42650523
score: 0
comment on: http://stackoverflow.com/a/27068456
has text: Delete one of your buttons, change the id of the other button to "button," and delete its `onclick` handler. If you click `Show code snippet`, you'll see how I changed your HTML as well as your JavaScreipt.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27048702
type: AnsweredQuestion
score: 1
has title: How to pass raw data from controller into javascript?
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42633039
answer count: 1
downvote count: 0
has body: I want to pass certain data to a javascript function my_function(data) embedded in my view. In the controller I do this: data = "[{value: 1, color: '#FF0000'},{value: 1, color: '#FF0000'} ]" That is the way the data has to come into the function. I came a long way using this: my_function({{ =XML(response.json(data)) }} It works up to this point, but the data ends up like this: "[{value: 1, color: '#FF0000'},{value: 1, color: '#FF0000'} ]" but I kneed it like this - without the quotes around [...]: [{value: 1, color: '#FF0000'},{value: 1, color: '#FF0000'} ] How do I manage to do so?
favorite count: 0
tagged with: python
has answer: http://stackoverflow.com/a/27050174
accepted answer: http://stackoverflow.com/a/27050174
tagged with: web2py

http://stackoverflow.com/comment/42629477
type: Comment
has text: Do you read my Actual Questions?, If not ..read it again..
score: 1
comment on: http://stackoverflow.com/q/27056990
type: QuestionComment

http://stackoverflow.com/comment/42691661
has text: Or you can simply wrap it up in divs that have display: none, rendered will see them then even tho they are hidden, and then just change display in helper
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27092299
score: 0

http://stackoverflow.com/q/27116676
has comment: http://stackoverflow.com/comment/42735873
downvote count: 2
type: Question
score: -2
has title: How to make a selected checkbox change the price of my product
tagged with: javascript
has body: So in this mobile version of a landing page for my client, if you'll look (link below) at the three package options, you'll see that each has a Shipping Protection checkbox within it. I need this to be checked automatically as it is now, but when it is unchecked I need the total price directly underneath to drop by $4.99. So for example, the top package says "Only USD $149.94" right now, but when the Shipping Protection checkbox is unchecked, I need it to say "Only USD $144.95". I know this will involve javascript... if anyone could examine the code and tell me the best way, that'd be amazing! Thanks! The link is: HERE Thanks again!
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has answer: http://stackoverflow.com/a/27116845

http://stackoverflow.com/comment/42740255
type: QuestionComment
comment on: http://stackoverflow.com/q/27105168
score: 0
has text: Sounds like a timing issue. Can you wait between your calls?
type: Comment

http://stackoverflow.com/comment/42792214
has text: can you tell me what i can do to rectify my code? As i mentioned i want to add the class for else condition on anchor element
comment on: http://stackoverflow.com/q/27148562
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27004271
has body: I am using jquery datatables and adapted the following example /* Formatting function for row details - modify as you need */ function format ( d ) { // `d` is the original data object for the row return ' '+ ' '+ ' Full name: '+ ' '+d.name+' '+ ' '+ ' '+ ' Extension number: '+ ' '+d.extn+' '+ ' '+ ' '+ //IMPORTANT PART ' ' + ' ' + ' '+ ' ' + ' ' + 'click' + ' ' + ' '+ ' '+ ' '; } $(document).ready(function() { var table = $('#example').DataTable( { "ajax": "../ajax/data/objects.txt", "columns": [ { "class": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { "data": "name" }, { "data": "position" }, { "data": "office" }, { "data": "salary" } ], "order": 1, 'asc' } ); // Add event listener for opening and closing details $('#example tbody').on('click', 'td.details-control', function () { var tr = $(this).closest('tr'); var row = table.row( tr ); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row row.child( format(row.data()) ).show(); tr.addClass('shown'); } } ); } ); The output of this code is shown here http://www.datatables.net/examples/api/row_details.html In the row child for each row I've added an input box and a button from where I want to handle the input of the user. For instance, I would like to take the input of the user and construct a link which will open a new window. However, I could not find in the documentation events related to children of the rows in the datatables library? For example, I would like to do something like $('#example tbody').on('click', '#butt', function () { //do something }); the id 'butt' above is a button which is part of the row child. In other words, I would like to manipulate the elements in the row child, not the row itself.
answer count: 1
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/2645344
accepted answer: http://stackoverflow.com/a/27004547
type: Question
tagged with: datatables
score: 0
has title: jquery datatables plug-in issue
has answer: http://stackoverflow.com/a/27004547
type: AnsweredQuestion

intellisense
tags question: http://stackoverflow.com/q/27067166
type: Tag
tag name: intellisense

http://stackoverflow.com/q/27087236
type: Question
has body: I need to verify is var is valid datetime object. This alert( "dat::"+( typeof dat )) returns "object". Which is the valid way ?
has answer: http://stackoverflow.com/a/27087259
has comment: http://stackoverflow.com/comment/42725048
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27087249
has title: In Javascript verify is var is valid datetime object
tagged with: javascript
type: UnansweredQuestion
tagged with: datetime

http://stackoverflow.com/a/27118896
has comment: http://stackoverflow.com/comment/42780192
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42778171
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42742578
has body: The problem in your code is that whenever you are clicking a hidden class child element, the parent element is losing focus. Thus the css style is applying to default which is to hide the child elements with hidden class. I think this can be solved using javascript. function focusRoot(e) { e.currentTarget.parentElement.focus(); return; } var root = document.getElementById('root'); var cs = root.children; for (var i = 0; i &lt; cs.length; i++) { var c = cs[i]; c.onfocus = focusRoot; } Working fiddle
has comment: http://stackoverflow.com/comment/42740265
answers question: http://stackoverflow.com/q/27118491

http://stackoverflow.com/comment/42679147
score: 0
type: AnswerComment
type: Comment
has text: Thanks. I think you answered my question. This is a convenience function only and it is not actually required for the proper functionality of any of the code below it. Correct?
comment on: http://stackoverflow.com/a/27085169

http://stackoverflow.com/comment/42551772
comment on: http://stackoverflow.com/q/27012692
score: 0
type: Comment
type: QuestionComment
has text: your interpretation is correct

http://stackoverflow.com/a/27022776
has comment: http://stackoverflow.com/comment/42569818
has comment: http://stackoverflow.com/comment/42570050
has comment: http://stackoverflow.com/comment/42569520
upvote count: 4
downvote count: 0
has body: This should work for descending with jquery: $('tr').sort(function(a,b){ return new Date($(a).find('input').val()).getTime() &lt; new Date($(b).find('input').val()).getTime() }).appendTo('tbody')
score: 4
accepted answer of: http://stackoverflow.com/q/27022535
has comment: http://stackoverflow.com/comment/42569876
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27022535
has comment: http://stackoverflow.com/comment/42569721
has comment: http://stackoverflow.com/comment/42569794
type: Answer
has comment: http://stackoverflow.com/comment/42569918

http://stackoverflow.com/a/27035326
has body: Interesting question, I think since you are already calling the digest cycle with the ng-click, not querying the dom (even though hasClass is pretty low performance call) - i.e. Binding the parent scope will be quicker. The implications of your hasClass: (from jquery source) var className = " " + selector + " ", i = 0, l = this.length; for ( ; i &lt; l; i++ ) { if ( this[i].nodeType === 1 &amp;&amp; (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) &gt;= 0 ) { return true; } } return false; The watch cycle is also not cheap, BUT it happens anyway, so it will be checking references and firing the watch action as needed, but since it's already happening, I think it's faster. But I am just guessing here :)
type: Answer
answers question: http://stackoverflow.com/q/27035164
has comment: http://stackoverflow.com/comment/42593980
score: 0

http://stackoverflow.com/a/27113302
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27105626
has body: Yes, you can use the Metadata API to create custom objects from code. It is possible to call the Metadata API from Apex, but you need to make some adjustments to get it to work correctly. See Introduction to calling the Metadata API from Apex
answers question: http://stackoverflow.com/q/27105626
score: 0

http://stackoverflow.com/comment/42760138
type: AnswerComment
comment on: http://stackoverflow.com/a/27130507
type: Comment
has text: so that is almost right, it now shows and quickly hides. what could be the reason for that?
score: 0

w3c
type: Tag
tag name: w3c
tags question: http://stackoverflow.com/q/27088967

http://stackoverflow.com/a/27013867
has body: After experimenting some more i solved it by changing the variable. $(".masterobject").click(function() { $(this).addClass("clicked"); if ($(".masterobject").length == $(".clicked").length){ pause(); $("#success").show(); var recordtime = $("#yourtime").text(); $("#success").html("congratulations your time is" + recordtime) } full code http://jsfiddle.net/8qmyg/307/
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26998239

http://stackoverflow.com/comment/42760764
comment on: http://stackoverflow.com/a/27130921
score: 0
type: AnswerComment
type: Comment
has text: Elliot Thank you for your help my bird now displays itself. Appreciate it. Cheers.

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/27099343
tags question: http://stackoverflow.com/q/27142958
tags question: http://stackoverflow.com/q/27034802
tags question: http://stackoverflow.com/q/27002273
tags question: http://stackoverflow.com/q/27042952
tags question: http://stackoverflow.com/q/27061426
tags question: http://stackoverflow.com/q/27063461
tags question: http://stackoverflow.com/q/27001596
tags question: http://stackoverflow.com/q/27027364
tags question: http://stackoverflow.com/q/27119400
tags question: http://stackoverflow.com/q/27003148
tags question: http://stackoverflow.com/q/27041697
tags question: http://stackoverflow.com/q/27141962
tags question: http://stackoverflow.com/q/27110699
tags question: http://stackoverflow.com/q/27084433
tags question: http://stackoverflow.com/q/27094754
tags question: http://stackoverflow.com/q/27014819
tags question: http://stackoverflow.com/q/27101078
tags question: http://stackoverflow.com/q/27070807
tags question: http://stackoverflow.com/q/27098083
tags question: http://stackoverflow.com/q/27032585
tags question: http://stackoverflow.com/q/27130486
tags question: http://stackoverflow.com/q/27007567
tags question: http://stackoverflow.com/q/27141122
tags question: http://stackoverflow.com/q/27151187
tags question: http://stackoverflow.com/q/27013192
tags question: http://stackoverflow.com/q/27128299
tags question: http://stackoverflow.com/q/27119394
tags question: http://stackoverflow.com/q/27066838
tags question: http://stackoverflow.com/q/27036492
tags question: http://stackoverflow.com/q/27119684
tags question: http://stackoverflow.com/q/27089628
tags question: http://stackoverflow.com/q/27121510
tags question: http://stackoverflow.com/q/27046500
tags question: http://stackoverflow.com/q/27087421
tags question: http://stackoverflow.com/q/26997607
tags question: http://stackoverflow.com/q/27093912
tags question: http://stackoverflow.com/q/27148545
tags question: http://stackoverflow.com/q/27132449
tags question: http://stackoverflow.com/q/27087030
tags question: http://stackoverflow.com/q/27141457
tags question: http://stackoverflow.com/q/27106661
tags question: http://stackoverflow.com/q/27028868
tags question: http://stackoverflow.com/q/26998044
tags question: http://stackoverflow.com/q/27063627
tags question: http://stackoverflow.com/q/27133645
tags question: http://stackoverflow.com/q/27060158
tags question: http://stackoverflow.com/q/27095356
tags question: http://stackoverflow.com/q/27142371
tags question: http://stackoverflow.com/q/27009041
tags question: http://stackoverflow.com/q/27131722
tags question: http://stackoverflow.com/q/27114856
tags question: http://stackoverflow.com/q/27141711
tags question: http://stackoverflow.com/q/27008170
tags question: http://stackoverflow.com/q/27054503
tags question: http://stackoverflow.com/q/27073409
tags question: http://stackoverflow.com/q/27017336
tags question: http://stackoverflow.com/q/27102649
type: Tag
tags question: http://stackoverflow.com/q/27052630
tags question: http://stackoverflow.com/q/27134844
tags question: http://stackoverflow.com/q/27095894
tags question: http://stackoverflow.com/q/27063269
tags question: http://stackoverflow.com/q/27051250
tags question: http://stackoverflow.com/q/27000261
tags question: http://stackoverflow.com/q/27025360
tags question: http://stackoverflow.com/q/27100373
tags question: http://stackoverflow.com/q/27033440
tags question: http://stackoverflow.com/q/27046425
tags question: http://stackoverflow.com/q/27043882
tags question: http://stackoverflow.com/q/27142308
tags question: http://stackoverflow.com/q/27119601
tags question: http://stackoverflow.com/q/27066777
tags question: http://stackoverflow.com/q/27077431
tags question: http://stackoverflow.com/q/27046193
tags question: http://stackoverflow.com/q/27146302
tags question: http://stackoverflow.com/q/27076183
tags question: http://stackoverflow.com/q/27062233
tags question: http://stackoverflow.com/q/27055382
tags question: http://stackoverflow.com/q/27001630

http://stackoverflow.com/q/27001619
tagged with: javascript
favorite count: 0
has title: Parse Cloud Query array contains value
type: AnsweredQuestion
tagged with: parse-platform
upvote count: 3
has answer: http://stackoverflow.com/a/27031714
type: Question
score: 3
has body: I have a parse data model like... Parent ------ children - Array of pointers to Child objects I'm trying to create a query that says... Find all Parents where the children array contains the specific Child object. It's sort of the opposite of this function from the docs. query.containedIn("playerName", ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); // note you can also do this with object pointers which is EXACTLY opposite to what I want. This will find all the players where the playerName is contained in the given array. I want this but I want to give a value and that value to be in the array for the key. I imagine it's something like... query.contains("children", someChildObject); but the docs for contains shows it only works for substrings of strings. How would I do what I'm looking for?
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/27031714

http://stackoverflow.com/comment/42791258
type: AnswerComment
type: Comment
has text: Why would you create 11 tables with 1 cell in each ?
comment on: http://stackoverflow.com/a/27147454
score: 0

http://stackoverflow.com/a/27135178
upvote count: 3
has body: I'm doing a random image display as part of a lab and I can't get the third image to appear (scissors.png). That's because you're multiplying your random number by 2, and then flooring it, which gives you a range of 0-2 (inclusive); which isn't a problem (given zero-based arrays) but your ifis expecting one-based array indexes. Incidentally, I'd suggest: var images = ['rock', 'paper', 'scissors'], rand = Math.floor(Math.random() * images.length); return images[rand] + '.png'; Leading to an implementation like so: function getImage() { var images = ['rock', 'paper', 'scissors'], rand = Math.floor(Math.random() * images.length); return images[rand] + '.png'; } document.querySelector('button').addEventListener('click', function() { console.log(getImage()); }); Get an image
accepted answer of: http://stackoverflow.com/q/27135107
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27135107
score: 3

http://stackoverflow.com/q/27083037
has title: Angular one request for three parts on the page
type: Question
tagged with: javascript
score: 0
has body: I have nav-bar, home-content, and footer. in all of them i need to display the same data, but they are in different controllers. I try to do one request in run phase and insert the data to a service and share this data. but the problem is the delay because of the promise pattern. Im trying to avoid from put this in the rootScope. Some one have better idea? example in run phase: PostsService.getPosts().then(function(data) { PostsService.posts = res.data; } the controllers: //home $stateProvider .state('home', { url: "/", controller:HomeController, templateUrl: "views/home/index.html" }); // nav controller $scope.posts= PostsService.posts; console.log(PostsService.posts) // is an empty array the html: //home view //return data {{post.body}} //nav view is not return data {{post.body}} //footer {{post.body}} plunker: http://plnkr.co/edit/CmpkURaG3ynIBVxwSpAM?p=preview
tagged with: angularjs
has answer: http://stackoverflow.com/a/27083101
has answer: http://stackoverflow.com/a/27084046
has answer: http://stackoverflow.com/a/27083190
answer count: 4
possible better answer: http://stackoverflow.com/a/27083364
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27084046
has answer: http://stackoverflow.com/a/27083364

http://stackoverflow.com/q/27010499
has title: High-charts scroll bar not working
type: Question
tagged with: highcharts
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27010788
has answer: http://stackoverflow.com/a/27010788
has answer: http://stackoverflow.com/a/27010784
answer count: 3
has body: I want to display all the categories with enabled scroll bar but it doesn't work. I don't know where I am making a mistake. The corresponding fiddle is: http://jsfiddle.net/manraj/7racxxu0/3 $(function () { $('#container').highcharts({ chart: { type: 'bar' }, xAxis: { categories: ['ghdg', 'kndfkjl', 'ytryr', 'Bananas', 'pop', 'errte', 'oi', 'Oranges1', 'Bananas1', 'Carrots1', 'Appls2', 'Pears2', 'wosflsj', 'ertet', 'yuyu', 'Ales', 'ioi', 'opl', 'bcvcx', 'Carots', 'Apes1', 'opop', 'Oranges1', 'yuiiui', 'Carrots1', 'errt', 'oioi', 'ioo', 'Bananas2', 'bfhjf', 'Apples', 'xxcc', '6546', 'Bananas', '646', 'tyuyf', 'rtr', 'rty', 'opuuui', 'fghf', 'tyuy', 'err', 'rewporij', 'xcvgff', 'ee', 'bvnvb', 'bnn', 'kjhfkdg', 'tytryt', '2121', 'Apples1', 'xvx', 'iyyuy', 'bnbn', 'yuyu', 'fgs', 'Pears2', 'orwuepr', 'ppwppw', 'Crots2', 'Apes', '545', 'nmvh', '855963', '96489', 'iuio', '8998', 'ghtrf', 'nff', 'Cats1', 'Apes2', '2333', 'itrosfgn', 'Banas2', 'zasar', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun','Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun','Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], min: 6 }, scrollbar: { enabled: true }, series: [{ data: [3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 3, 6, 1, 2, 6, 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6, 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6, 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6, 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] }] }); }); Thank you.
downvote count: 0
has answer: http://stackoverflow.com/a/65805513
favorite count: 0
accepted answer: http://stackoverflow.com/a/27010784
type: AnsweredQuestion
score: 3
upvote count: 3

http://stackoverflow.com/comment/42755513
type: QuestionComment
comment on: http://stackoverflow.com/q/27125376
score: 0
type: Comment
has text: Sergey Narozhnyy, dfsq, Ashish Kumar, thank you guys very much for your input and help, so ill just pick an answer so this question can be closed .

http://stackoverflow.com/comment/42546279
comment on: http://stackoverflow.com/a/27009099
has text: Solution 1 is more elegant. @Algerino, if you want to do JavaScript way or functional way then that would be the way to go.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27096594
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/27096489
answers question: http://stackoverflow.com/q/27096489
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: If you look in your console you will probably see something like this "XMLHttpRequest cannot load http://www.psimg.com/datafeed/dyn_banners/summary.json.js. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access." This means that the link you are trying to download is not enabled for cross origin resource sharing. See this answer for more Get a JSON file from URL and display

http://stackoverflow.com/a/27050044
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27049793
type: Answer
score: 2
upvote count: 2
has body: onsubmit="window.opener.location.reload();" might help. Check out this thread: Refresh Parent Window with JS
answers question: http://stackoverflow.com/q/27049793
type: AcceptedAnswer

http://stackoverflow.com/q/27081018
has title: How can I have a dropdown submenu with Twitter Bootstrap
has comment: http://stackoverflow.com/comment/42678457
has answer: http://stackoverflow.com/a/27081207
has comment: http://stackoverflow.com/comment/42671557
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/42671589
has answer: http://stackoverflow.com/a/27081198
tagged with: twitter-bootstrap
type: Question
tagged with: javascript
has body: I am trying to put a submenu inside "The best movies by genre" but it's now working http://www.bootply.com/y1aWXXwQDR How can I put the links (action, thriller, comedy..) as a submenu?
linked to: http://stackoverflow.com/q/18023493
score: 0
answer count: 2

http://stackoverflow.com/q/27053892
score: 0
has body: I am trying to build a bar graph that I can switch between the amount of data displayed based on a particular length of time. So far the code that I have is this, var margin = { top : 20, right : 20, bottom : 30, left : 50 }, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var barGraph = function(json_data, type) { if (type === 'month') var barData = monthToArray(json_data); else var barData = dateToArray(json_data); var y = d3.scale.linear().domain([ 0, Math.round(Math.max.apply(null, Object.keys(barData).map(function(e) { return barData[e]['Count']}))/100)*100 + 100]).range( [ height, 0 ]); var x = d3.scale.ordinal().rangeRoundBands([ 0, width ], .1) .domain(d3.entries(barData).map(function(d) { return barData[d.key].Date; })); var xAxis = d3.svg.axis().scale(x).orient("bottom"); var yAxis = d3.svg.axis().scale(y).orient("left"); var svg = d3.select("#chart").append("svg").attr("width", width + margin.left + margin.right).attr("height", height + margin.top + margin.bottom).append("g").attr( "transform", "translate(" + margin.left + "," + margin.top + ")"); svg.append("g").attr("class", "x axis").attr("transform", "translate(0," + height + ")").call(xAxis); svg.append("g").attr("class", "y axis").call(yAxis).append( "text").attr("transform", "rotate(-90)").attr("y", 6) .attr("dy", ".71em").style("text-anchor", "end").text( "Total Hits"); svg.selectAll(".barComplete").data(d3.entries(barData)).enter() .append("rect").attr("class", "barComplete").attr("x", function(d) { return x(barData[d.key].Date) }).attr("width", x.rangeBand() / 2).attr("y", function(d) { return y(barData[d.key].Count); }).attr("height", function(d) { return height - y(barData[d.key].Count); }).style("fill", "orange"); var bar = svg.selectAll(".barHits").data(d3.entries(barData)) .enter().append("rect").attr("class", "barHits").attr( "x", function(d) { return x(barData[d.key].Date) + x.rangeBand() / 2 }).attr("width", x.rangeBand() / 2).attr("y", function(d) { …
has comment: http://stackoverflow.com/comment/42642307
tagged with: d3.js
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22052694
type: Question
has answer: http://stackoverflow.com/a/27055312
has answer: http://stackoverflow.com/a/27067712
has title: How do I create the update function in D3JS
has answer: http://stackoverflow.com/a/27054060
answer count: 3
has comment: http://stackoverflow.com/comment/42624738
linked to: http://stackoverflow.com/q/10784018
tagged with: javascript

http://stackoverflow.com/comment/42597702
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27038764
has text: He doesn't. I'm not assuming anything. You're assuming he didn't mean it when he said `from div.ns2-row-inner`, I'm assuming I need to check whether it's missing `from div.ns2-row-inner` just as he said.
type: AnswerComment

http://stackoverflow.com/a/27130261
has body: The Network tab of the Chrome Developer tools does not show the modifications from extensions. See https://crbug.com/258064 If you wish to see whether your extension has successfully modified a request, visit chrome://net-internals/#events, click on a request of type URL_REQUEST and look for URL_REQUEST_DELEGATE entries, e.g. URL_REQUEST_FAKE_RESPONSE_HEADERS_CREATED (this is an example of a log entry generated via the chrome.declarativeWebRequest API) or "delegate_info = "extension [extension name]" (generated by chrome.webRequest).
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27126197
type: Answer
score: 13
answers question: http://stackoverflow.com/q/27126197
has comment: http://stackoverflow.com/comment/42759516
downvote count: 0
has comment: http://stackoverflow.com/comment/91978691
upvote count: 13

http://stackoverflow.com/comment/42531580
comment on: http://stackoverflow.com/q/27000552
has text: @SebriZouhaier no, thats the form's ID
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42735080
type: Comment
comment on: http://stackoverflow.com/a/27116228
has text: It may actually be, since I'm using Ajax to add content to the div tag, thanks
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42750622
comment on: http://stackoverflow.com/a/27125149
score: 0
type: AnswerComment
has text: Thanks, I will look into this, however does local storage mean that only the user who inputs the data can view that data? Or would I be able to view data that has been stored by any other users machine?
type: Comment

http://stackoverflow.com/q/27027872
type: AnsweredQuestion
score: 2
has title: D3 - Prevent parent <g> element from firing click event
downvote count: 0
type: Question
tagged with: javascript
has body: I am writing a program that is similar to the source code of Zoomable Partition I have added an image tag to each group element to act as a button to perform another action. So my structure looks something like: &lt;svg&gt; &lt;g&gt; &lt;rect&gt; &lt;text&gt; &lt;image&gt; &lt;/g&gt; &lt;g&gt;...&lt;/g&gt; &lt;/svg&gt; The code adds a click event to each element that is responsible for zooming. I've added my own click event to the image tag to perform an action. When I click on the image my image click is firing, but also the g event is firing. Is there anyway to prevent this behavior so only the image click event fires? Thanks for your time, LL
upvote count: 2
answer count: 1
favorite count: 0
tagged with: click
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has answer: http://stackoverflow.com/a/27027936
accepted answer: http://stackoverflow.com/a/27027936

http://stackoverflow.com/q/26992767
has body: Is there any way to limit the number of concurrent Q promises to be executed at once in node js? I am building a web scraper , which must request and parse more 3000+ pages and without throttle some of the requests i make aren't responded to on time, so the connection rests and the needed response (html code) becomes unavailable. To counter act this, i found that limiting the number of requests my problem goes away. I have tried the following methods but to no avail: Concurrency limit in Q promises - node How can I limit Q promise concurrency? https://gist.github.com/gaearon/7930162 https://github.com/ForbesLindesay/throat I need to request an array of urls, doing only 1 request at a time and when all urls in the array have completed, then return the results in a array. function processWebsite() { //computed by this stage urls = [u1,u2,u3,u4,l5,u6,u7,u8,u9]; var promises = throttle(urls,1,myfunction); // myfunction returns a Q promise and takes a considerable // amount of time to resolve (approximately 2-5 minutes) Q.all(promises).then(function(results){ //work with the results of the promises array }); }
answer count: 4
has answer: http://stackoverflow.com/a/26996362
linked to: http://stackoverflow.com/q/22366434
accepted answer: http://stackoverflow.com/a/26996362
has answer: http://stackoverflow.com/a/27002142
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27007113
downvote count: 0
score: 7
tagged with: concurrency
type: Question
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
favorite count: 0
has title: Limit Q promise concurrency in Node js
possible better answer: http://stackoverflow.com/a/27002142
linked to: http://stackoverflow.com/q/20546373
upvote count: 7
has answer: http://stackoverflow.com/a/56425372

http://stackoverflow.com/a/27129173
upvote count: 1
has comment: http://stackoverflow.com/comment/42807436
accepted answer of: http://stackoverflow.com/q/27113747
answers question: http://stackoverflow.com/q/27113747
has comment: http://stackoverflow.com/comment/42764280
type: AcceptedAnswer
downvote count: 0
has body: Working example below. I've added caption, so now your lightbox gets description from ALT tag It's not pretty code but I tried to make it simple for you. In the future I recommend using jQuery for those type of features :) JSFiddle - http://jsfiddle.net/cx20mdzm/ Gallery My Photo Gallery Caption One Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac est rutrum, eleifend tortor consectetur, pulvinar risus. Nunc auctor mattis turpis, vitae tempus leo gravida eu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam nec augue mi. Sed eu vehicula libero. In at dictum mi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus vitae commodo eros, quis fermentum elit. Cras id egestas diam, eu commodo augue. Donec magna metus, dictum vitae dapibus eu, interdum id libero. Phasellus ut velit vehicula, faucibus ipsum eu, iaculis nunc. Nam venenatis vel ipsum vitae posuere. Curabitur pellentesque erat est, fringilla sollicitudin felis volutpat id. Vestibulum condimentum ex vitae blandit lacinia. Donec non nunc auctor, luctus mi ac, pretium nisl. In eu arcu a enim facilisis varius. Nulla ullamcorper, lorem nec cursus porta, ligula arcu fermentum nunc, et sollicitudin tellus magna ac mi. Fusce faucibus fermentum nibh id pulvinar. In ornare venenatis placerat. Curabitur varius rhoncus neque. Duis lobortis, quam ac iaculis gravida, lectus dui tristique dui, sed commodo nunc nibh in ex.
type: Answer
score: 1

http://stackoverflow.com/q/27123263
type: UnansweredQuestion
has title: How to line break in a return value? Or a better way of returning HTML?
type: Question
has body: I'm trying to create a line break in my showPhoto() function but nothing seems to work. I've tried using br, tried using html() but still didn't budge. The comment in my Javascript code shows the return line i am talking about. If there any better methods to achieve my desired result?? Any help is appreciated. Thanks JS : function photo(theCountry, theLocation, theCamera, theDescription) { this.photoCountry = theCountry; this.photoLocation = theLocation; this.photoCamera = theCamera; this.photoDescription = theDescription; this.showPhoto = function() { // How do i create line breaks here?? I want each sub heading on a different line. return 'Country: ' + this.photoCountry + ' Location: ' + this.photoLocation + ' Shot With: ' + this.photoCamera + ' Description: ' + this.photoDescription; } } var photo1 = new photo('New Zealand', 'Queenstown', 'Canon 550D', '...'); var photo2 = new photo('Singapore', 'Skyline', 'Canon 550D', '....'); var photo3 = new photo('Canada', 'Vancouver', 'Canon 550D', '...'); var photo4 = new photo('New Zealand', 'Lake Wanaka', 'Canon 550D', '....'); var photo5 = new photo('Australia', 'Mornington Peninsula', 'Canon 550D', '...') $('.photoImg').click(function() { var sourceImage = document.createElement('img'); sourceImage.className = 'photoFocus'; sourceImage.src = this.src; var theDiv = document.getElementById('selectionContainer'); $(theDiv).html(sourceImage); var textDiv = document.createElement('div'); textDiv.setAttribute('id', 'textContainer'); var textNodeArray = {'photo1': photo1, 'photo2': photo2, 'photo3': photo3, 'photo4': photo4, 'photo5': photo5} $('#textContainer').html(document.createTextNode(textNodeArray[this.id].showPhoto())); });
has answer: http://stackoverflow.com/a/27123353
has answer: http://stackoverflow.com/a/27123337
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/42747444
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27123394

http://stackoverflow.com/comment/42739522
has text: @rjdmello is right. Use a normal link, there is no need to close the modal when you go to another page anyway...
type: QuestionComment
comment on: http://stackoverflow.com/q/27118838
type: Comment
score: 0

http://stackoverflow.com/a/27019208
score: 2
downvote count: 0
has body: You want to update the contents of self.master, not overwrite it. So change that line in the done callback to: // Map model; create pager ko.mapping.fromJS(pagedData, self.master);
upvote count: 2
answers question: http://stackoverflow.com/q/27018194
has comment: http://stackoverflow.com/comment/42563458
has comment: http://stackoverflow.com/comment/42563582
type: Answer

http://stackoverflow.com/comment/42808763
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27136283
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65714/discussion-between-jonathan-gray-and-will).
type: Comment

http://stackoverflow.com/comment/42660238
has text: @chipChocolate.py -- Amazing! Would tremendously be appreciated! Would it be better if we enter a chat room so I can provide you more code / resources?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27074215
score: 0

http://stackoverflow.com/a/27014341
accepted answer of: http://stackoverflow.com/q/27013633
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27013633
has body: Why cannot I access its value using getAttribute("value") method? you can't do that because, .getAttribute("value") return the value of the element write into the html (if you don't change that, the default value). Example: with: document.getElementById("slider").getAttribute("value"); return 500 also if you use input to change range. Debugger shows that there is an attribute named "value" with some value which is not equal to the value of the element. It's true, and right. If you set a default value it never change (is useful to reset the input). Should not the value of range element be its attribute? No, the current value of the element is stored outside the html, so to access to the current vale you must use: document.getElementById("slider").value;, but it's the same with all type of input not only on range. $(function(){ $("input[name=foo]").on("change",function(){ var val = $(this).val(); var attr = $(this).attr("value"); var prop = $(this).prop("value"); console.log(" --- JQUERY TEST JS ----"); console.log("Current value: (using .val)",val); console.log("Initial value: (using .attr)",attr); console.log("Current value: (using .prop)",prop); }); }); //NATIVE JS function originalJS(){ console.log(" --- ORIGINAL JS ----"); console.log("Current value: (using .value)",this.value); console.log("Initial value: (using .attr)",this.getAttribute("value")); } RUN AND WATCH CONSOLE :) ... watch value="500" (but range is 0-100)
type: Answer
score: 6
upvote count: 6

http://stackoverflow.com/a/27082596
downvote count: 0
answers question: http://stackoverflow.com/q/27046456
type: Answer
accepted answer of: http://stackoverflow.com/q/27046456
score: 24
upvote count: 24
type: AcceptedAnswer
has body: It's like you have already set your data/img folder as a static folder in the line below: app.use(express.static('data/img')); In that case, you should be accessing images placed in the static folder above using below url: http://localhost:3000/default.jpg I will however advice you use Node's global variable __dirname to indicate the root of the static folder but this depends on where your server.js is located within your file structure. The js file containing the snippets below is located in the root and I have /data/img folder from the root as well and I am able to retrieve the image using /image name. var express = require('express'); var app = express(); app.use(express.static(__dirname + '/data/img')); app.listen(3500, function () { console.log('Express server is listening, use this url - localhost:3500/default.png'); }); See if this helps you. If it does, make sure you know the reason for using the __dirname global variable name. SO1

http://stackoverflow.com/a/26998219
has body: First Id must be unique, As A. WolF says your HTML is invalid "P element cannot contains a SELECT element", and you need to use event delegation like: $(document).on('çlick', 'a', function(e){ console.log('click'); e.preventDefault(); $companyName = $('#comp_staff option:selected').text(); $companyId = $('#comp_staff option:selected').val(); $type = 'contact'; //Display Name of the Company $('#item_name').html(" - " + $companyName); //Update Hidden Fields of Form $('#comp_name').val($companyName); $('#comp_id').val($companyId); $('#type').val('contact'); //Make AJAX request to PHP file which will generate the Tags for the Object $('#active_tags').load('pages/ajax/get_tags.php', {'name': $companyName, 'id': $companyId, 'type': $type},function(response, status, xhr){}); });
accepted answer of: http://stackoverflow.com/q/26998177
upvote count: 2
answers question: http://stackoverflow.com/q/26998177
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42528447
has comment: http://stackoverflow.com/comment/42527304
has comment: http://stackoverflow.com/comment/42528743
type: Answer

http://stackoverflow.com/a/27121298
score: 1
has comment: http://stackoverflow.com/comment/42744146
upvote count: 1
has comment: http://stackoverflow.com/comment/42758576
has body: The problem with your code is that you try to return a result to an event. Events do not accept any response. So try this; First name (required) Besides that, you put your body in your head, this can cause trouble with some browsers.
downvote count: 0
answers question: http://stackoverflow.com/q/27121150
has comment: http://stackoverflow.com/comment/42757240
type: Answer

http://stackoverflow.com/q/27030567
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27030603
tagged with: datepicker
upvote count: 1
type: AnsweredQuestion
has body: I created a form for a date range using jQuery UI Datepicker. Start Date: Last Date: I'm using Google hosted jQuery UI. Everything seems to be working fine, but I want to format the date with dashes, instead of forward slashes. For example, I'd like to have the date be input as: 2014-11-05 (Y-m-d) rather than what it currently is populating, 11/05/2014 The "dashes" and date format y-m-d is what i'm looking for. Can't seem to get it. Here is a jsfiddle: http://jsfiddle.net/tz53ujqo/
score: 1
has title: Formatting actual date with jQuery ui datepicker
type: Question
has answer: http://stackoverflow.com/a/27030603
tagged with: jquery-ui
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27071665
has comment: http://stackoverflow.com/comment/42655834
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42655945
has title: Trouble with IDs and for loops in Javascript
type: Question
has comment: http://stackoverflow.com/comment/42655814
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27071926
has comment: http://stackoverflow.com/comment/42655940
has body: $(document).ready(function() { var week = 5; var players = 8; var numbers = []; var array = []; for (o = 0; o < players; o++) { for (i = 0; i < week + 1; i++) { var improved = i + 1; var oString = o.toString(); var iString = i.toString(); var id = "#" + oString + iString; var rawText = $(id).text(); var refined = Number(rawText); array.push(refined); } numbers.push(array); array = []; } for (p = 0; i < numbers.length; p++) { var total1 = 0; $.each(numbers[0], function() { total1 += this; }); } $("#total1").text(total1); for (p = 0; i < numbers.length; p++) { var total2 = 0; $.each(numbers[0], function() { total2 += this; }); } $("#total2").text(total2); for (p = 0; i < numbers.length; p++) { var total3 = 0; $.each(numbers[0], function() { total3 += this; }); } $("#total3").text(total3); for (p = 0; i < numbers.length; p++) { var total4 = 0; $.each(numbers[0], function() { total4 += this; }); } $("#total4").text(total4); for (p = 0; i < numbers.length; p++) { var total5 = 0; $.each(numbers[0], function() { total5 += this; }); } $("#total5").text(total5); var total = total1 + total2 + total3 + total4 + total5; $("#total").text(total); }); Player Position Week 7 Week 8 Week 9 Week 10 Week 11 Matt Ryan QB 11 15 00 14 14 Marshawn Lynch RB 06 01 09 40 12 Calvin Johsnon WR 00 00 00 00 00 Allen Hurns WR 00 04 23 17 05 A.J. Green WR 00 00 10 02 18 Julius Thomas Tight End 02 02 09 18 00 Matt Bryant Kicker 00 03 00 15 15 Texans Defense 04 07 12 00 08 Total: 00 00 00 00 00 Total: Recently, I was charged with creating a fantasy football website for my group of friends, having minimal Javascript and HTML experience. I don't mind manually inputing data from the NFL website, but I thought it would be cool to have a script to automatically add up the numbers in the table. But, the code I wrote doesn't work. Nobody I know has any knowledge in Computer Science, and Ive turned to Google throughout the whole process. The browser console returns no errors. What I expect to happen is the …
has comment: http://stackoverflow.com/comment/42655858
has comment: http://stackoverflow.com/comment/42655861
score: 0
has comment: http://stackoverflow.com/comment/42655815
accepted answer: http://stackoverflow.com/a/27071926

http://stackoverflow.com/q/27101300
tagged with: jquery-ui-dialog
has answer: http://stackoverflow.com/a/27101369
has body: I'm using jqueryui dialog, I want to hide the X button there at the top. I tried the code below, but it didn't work. $( '.ui-dialog-titlebar-close').remove(); My JS: $(function () { $("#dialog").dialog({ closeOnEscape: false, ... }); HTML:
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42706858
upvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/27101369
has comment: http://stackoverflow.com/comment/42706786
has answer: http://stackoverflow.com/a/27101491
tagged with: jquery-ui
has title: Close button X not removed
possible better answer: http://stackoverflow.com/a/27101354
has answer: http://stackoverflow.com/a/27101354
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/27141404
possible better answer: http://stackoverflow.com/a/27145483
score: 0
has comment: http://stackoverflow.com/comment/42780179
has answer: http://stackoverflow.com/a/27145483
has answer: http://stackoverflow.com/a/39661535
has title: Where are the Javascript password validations files in SugarCRM?
tagged with: passwords
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42780282
accepted answer: http://stackoverflow.com/a/39661535
type: Question
answer count: 2
tagged with: validation
has body: I want to add some extra password validations in SugarCRM. I want to add that using javascript. But I don't know, where SugarCRM stores javascript files related to password validation. So, please guide me on this. Thank you.
tagged with: javascript
tagged with: sugarcrm

http://stackoverflow.com/comment/42736026
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27116755
score: 0
has text: I want to be able to submit the form and have it go to the site in the url. But I want to stay on the original url where the form was submitted from. I will look into curl to submit forms.

http://stackoverflow.com/comment/42669937
type: Comment
comment on: http://stackoverflow.com/a/27080058
has text: Page2: http://jsfiddle.net/w5kxomvk/ For simplicity I made it exactly the same as page1 but passes a different value to the function.
type: AnswerComment
score: 0

http://stackoverflow.com/a/27098555
score: 76
has comment: http://stackoverflow.com/comment/133784157
downvote count: 5
has comment: http://stackoverflow.com/comment/73556708
answers question: http://stackoverflow.com/q/27098239
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42702459
accepted answer of: http://stackoverflow.com/q/27098239
upvote count: 81
has body: I got it working! I added a... skip_before_action :verify_authenticity_token to the controller. The issue was found when checking out the logs and seeing that the CSRF token could not be verified.
has comment: http://stackoverflow.com/comment/42702017
has comment: http://stackoverflow.com/comment/107094355
type: Answer
has comment: http://stackoverflow.com/comment/42702396
has comment: http://stackoverflow.com/comment/139801993
has comment: http://stackoverflow.com/comment/42702807

http://stackoverflow.com/a/27116761
upvote count: 2
has comment: http://stackoverflow.com/comment/42752123
has body: Fonts are usually not scaled linearly due to the nature of the font - they are optimized at certain sizes(1, especially screen oriented fonts(2 (unless the font is of low quality). Even if you increase the font size it may only increase slightly in height but not necessarily in width or weight, or vica verca and so on - this so it looks good and sharp at any size, especially smaller size for screen due to the screen's relative low resolutions. The various font engines in the browser will handle this in equally various ways and try to use the closest to an optimized size so the font will look sharp (for larger sizes this is typically not a problem, but for the smaller sizes it is). It do depend very much on the font too though. The only way, currently, to have this level of control with smaller font sizes, is to draw the text to a bitmap (ie. canvas) using a larger size, and scale that bitmap to the exact size you need (loosing selection capability etc. in the go..). But still prone to issues such as anti-aliasing. If you specify the font size using points the size will be converted to pixels based on the system's DPI: sizeInPixels = 72 / systemDPI * sizeInPoints (ie. 72 / 96 * 16 = 12 pixels) pixels are by nature integer but result may vary depending on how the browser's font engine handles sub-pixeling. Update I gave it another round and came up with a simple possible solution, though, it is not tested with various fonts so I cannot guarantee it works 100% as intended, but this uses the principle above by the means of scale transform instead of scaling a pre-filled bitmap first. var ctx = canvas.getContext('2d'), w = canvas.width, lines = [ "THIS IS HEADLINE", "AND THIS IS SPARTA", "UNDERLINE", "How about a little longer line?" ], //we have to guess font height as TextMetrics object is not fully implemented th = 30; // setup text ctx.font = "32px sans-serif"; for(var i = 0, line; line = lines[i]; i++) { var tw = ctx.measureText(line).width, // measure width of text…
has comment: http://stackoverflow.com/comment/42813928
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42810731
answers question: http://stackoverflow.com/q/27114732
has comment: http://stackoverflow.com/comment/42753203
type: Answer
has comment: http://stackoverflow.com/comment/42813869
score: 2
accepted answer of: http://stackoverflow.com/q/27114732
has comment: http://stackoverflow.com/comment/42823910

http://stackoverflow.com/q/27010113
tagged with: javascript
has answer: http://stackoverflow.com/a/27010828
upvote count: 3
has answer: http://stackoverflow.com/a/27010737
has comment: http://stackoverflow.com/comment/42548146
has comment: http://stackoverflow.com/comment/42547777
has answer: http://stackoverflow.com/a/27010189
has body: I am using ng-focus and ng-blur to show/hide a button. on focus of an input, a button is shown and on blur it is hidden. Show/hide is being performed using ng-show. On click of this button a function gets called. Live Demo Issue is that ng-blur us being called first and the button is getting hidden before the click event is fired, hence function which is to be called from that button is never getting called. I have already fixed it by using setTimeout() but later found that it is not really a good solution. Is there any other way to fix this issue?
favorite count: 0
has answer: http://stackoverflow.com/a/27010457
accepted answer: http://stackoverflow.com/a/27010457
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/27010189
has title: Apply delay on ng-blur
answer count: 4
type: AnsweredQuestion
score: 3
downvote count: 0
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/42548235

http://stackoverflow.com/comment/42917764
comment on: http://stackoverflow.com/a/27217451
has text: @WladimirPalant I agree that there might be a difference in how javascript is disabled, you may think of more as a workaround than a real solution - though no other options worked - I had no luck setting `javascriptEnabled` preference, also played around with `--disable-javascript` chrome option and old chrome browser versions. Thank you.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27015653
downvote count: 0
has comment: http://stackoverflow.com/comment/120236678
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/121141772
has comment: http://stackoverflow.com/comment/42610588
accepted answer of: http://stackoverflow.com/q/27006782
has comment: http://stackoverflow.com/comment/121107810
answers question: http://stackoverflow.com/q/27006782
score: 5
has body: FlowType, introduced by Facebook yesterday sounds like exactly what you're after. It can analyse your code, infer types, and throw errors at compile time. It specifically includes support for React and the propTypes argument: https://flow.org/en/docs/react/components/ Update (July 21) - Link above fixed, but given Facebook's recent change on Flow to heavily prioritise internal use over future community use, would recommend TypeScript instead for new projects. Example: https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/class_components/
type: AcceptedAnswer

http://stackoverflow.com/a/27032302
type: AcceptedAnswer
has body: You cannot have two "res.send" statements. // one of these two statements has to go res.send('Hello!'); res.send(JSON.parse(_deployments));
upvote count: 1
answers question: http://stackoverflow.com/q/27031194
accepted answer of: http://stackoverflow.com/q/27031194
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42691193
type: Comment
comment on: http://stackoverflow.com/q/27092477
score: 0
has text: i want in mose hover `A` only show me
type: QuestionComment

http://stackoverflow.com/comment/42536842
type: QuestionComment
has text: @Xenyal I've checked the url, id is updated, but the page is the cached version
score: 0
comment on: http://stackoverflow.com/q/27003488
type: Comment

http://stackoverflow.com/a/27000998
score: 0
has body: This is a simple way to use OO style in javascript. You can refer to this post if you like to read more.
type: Answer
answers question: http://stackoverflow.com/q/27000562

http://stackoverflow.com/a/40885969
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/27115300
has body: I achieved this by setting a key property on each object within the _.sortBy() - not ideal but one solution _.sortBy(object, function(item, key) { item.key = key; return item.sortattribute; });
downvote count: 0

http://stackoverflow.com/q/27049675
has comment: http://stackoverflow.com/comment/42617019
has comment: http://stackoverflow.com/comment/42618549
has comment: http://stackoverflow.com/comment/42617360
has answer: http://stackoverflow.com/a/27049769
tagged with: javascript
has comment: http://stackoverflow.com/comment/42617090
answer count: 3
possible better answer: http://stackoverflow.com/a/27049769
upvote count: 1
favorite count: 0
tagged with: scope
tagged with: eval
has answer: http://stackoverflow.com/a/27049776
accepted answer: http://stackoverflow.com/a/27050327
type: AnsweredQuestion
downvote count: 0
has body: I'm working on a debugger that injects code into already existing code. Which then use eval() to log and run it. However eval() seems to work in only its existing scope. To overcome this I tried to add a class that i recreated in each local scope. But it doesnt work. I've added code to ilustrate my problem. The first alert works as expected, I'm assuming that it is because MyClass is created in the same scope. The second alert still display b as 10 even though I've set b in local scope to 20 inside the TestC function. And the last alert doesn't work at all eval() returns in console "Uncaught ReferenceError: c is not defined". If I add the whole MyClass inside each function and the assign it, then it works, but that doesn't feel like an elegant solution. And can add 1000's of lines of code to a project. http://jsfiddle.net/ekim/zryj3taq/2/ var MyClass = function() { this.MyAlert = function(codex) { eval(codex); } } var b = 10; var MyOne = new MyClass(); MyOne.MyAlert("alert(b);"); function TestC() { var b = 20; var MyOne2 = new MyClass(); MyOne2.MyAlert("alert(b);"); var c = 20; var MyOne2 = new MyClass(); MyOne2.MyAlert("alert(c);"); } TestC();
score: 1
has answer: http://stackoverflow.com/a/27050327
type: Question
has title: Create a class in Javascript that can access local variables

http://stackoverflow.com/q/27060974
score: 3
upvote count: 3
type: Question
has body: I am using ui.bootstrap collapse directive to display drop down menu. I would like to automatically collapse it when user clicks outside of the div. When user clicks on Filter button I set focus using: .directive('setFocus', function () { return { restrict: 'A', scope: { focusValue: "=setFocus" }, link: function ($scope, $element, attrs) { $scope.$watch("focusValue", function (currentValue, previousValue) { if (currentValue === true && !previousValue) { $element[0].focus(); console.log('set focus from setFocus directive'); } else if (currentValue === false && previousValue) { $element[0].blur(); console.log('blurr from setFocus directive'); } }) } } }); HTML Controller app.controller('testCtrl', function ($scope) { $scope.isDropDownCollapsed = true; $scope.toggleMenu = function () { $scope.isDropDownCollapsed = !$scope.isDropDownCollapsed; } }); It works in IE v11 but focus is also lost when check box is selected. It doesn't work in Chrome v38 or Firefox v33.1. example code
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/27109293
tagged with: javascript
tagged with: angular-ui-bootstrap
tagged with: angularjs
favorite count: 0
has title: angularjs ng-blur not working in Chrome or Firefox
has answer: http://stackoverflow.com/a/27109293
type: AnsweredQuestion

http://stackoverflow.com/comment/42600534
has text: Make `ca` an array: `ca: [fs.readFileSync( 'ssl/' + 'AddTrustExternalCARoot.crt'), fs.readFileSync( 'ssl/' + 'COMODORSAAddTrustCA.crt'), fs.readFileSync( 'ssl/' + 'COMODORSADomainValidationSecureServerCA.crt')]`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27038798

http://stackoverflow.com/a/27047081
accepted answer of: http://stackoverflow.com/q/27047021
upvote count: 1
score: 1
has body: It depends if just for 10 then... $('.point').each(function () { var textAfterComma = $(this).text().split(","); if (textAfterComma[0] === '10' && textAfterComma[1] === '0') { $(this).text(textAfterComma[0]); } }); 8,0 8,0 10,0 8,0 Working JSFiddle: http://jsfiddle.net/bc6jmtt2/1/ if you want all numbers ending with ,0 to be just the first number then... $('.point').each(function () { var textAfterComma = $(this).text().split(","); if (textAfterComma[1] === '0') { $(this).text(textAfterComma[0]); } }); 8,0 8,0 10,0 8,0 Working JSFiddle: http://jsfiddle.net/bc6jmtt2/ For you example at the bottom of your question there are two fixes: First $('.point') to $(this) then if ($(this).text().length > 4) { to if ($(this).text().length >= 4) { or > 3 because none of your strings are > 4 $('.point').each(function () { if ($(this).text().length >= 4) { alert("ok"); } }); Working JSFiddle: http://jsfiddle.net/bc6jmtt2/3/
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27047021
type: Answer

http://stackoverflow.com/q/27073896
has comment: http://stackoverflow.com/comment/42659720
upvote count: 1
has title: Comma Operator to Semicolons
type: Question
has answer: http://stackoverflow.com/a/27074119
accepted answer: http://stackoverflow.com/a/27074119
tagged with: javascript
has comment: http://stackoverflow.com/comment/42659697
has comment: http://stackoverflow.com/comment/52943155
tagged with: unminify
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42659674
type: AnsweredQuestion
score: 1
has body: I have a chunk of javascript that has many comma operators, for example "i".toString(), "e".toString(), "a".toString(); Is there a way with JavaScript to convert these to semicolons? "i".toString(); "e".toString(); "a".toString();

http://stackoverflow.com/a/27077120
has comment: http://stackoverflow.com/comment/42666430
has comment: http://stackoverflow.com/comment/42665260
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27077087
answers question: http://stackoverflow.com/q/27077087
type: Answer
score: 1
upvote count: 1
has body: Your fadeOut is an asynchronous operation. When you call it, it starts the fade, but then the fade continues and completes asynchronously because you're using setTimeout. So your code after callilng fadeOut runs just after it starts. To remove the element when done, remove that code and instead remove the element in fadeOut when done: function fadeOut() { var secondDiv = $('second'); if(secondDiv) { console.log(secondDiv.style.opacity); if(parseFloat(secondDiv.style.opacity) &gt;0 ) { secondDiv.style.opacity = parseFloat(secondDiv.style.opacity) - 0.05; setTimeout(fadeOut, 50); } else // Added { // Added secondDiv.remove(); // Added } // Added } } Or if you want more flexibility, have fadeOut call a callback when done and remove the element in the callback; we do that by separating out the actual work of the fade from starting it: function fadeOut(callback) { var secondDiv = $('second'); if (secondDiv) { doFade(); } function doFade() { if(parseFloat(secondDiv.style.opacity) &gt;0 ) { secondDiv.style.opacity = parseFloat(secondDiv.style.opacity) - 0.05; setTimeout(doFade, 50); } else if (callback) { callback(secondDiv); } } } Usage: function removeSecond() { fadeOut(function(div) { div.remove(); }); } Fiddle

http://stackoverflow.com/comment/42778810
comment on: http://stackoverflow.com/q/27128351
score: 0
has text: The brower is chrome
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42727173
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27101428
has text: Check https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file and make sure you have Adobe Acrobat PDF plugin installed in Firefox

http://stackoverflow.com/comment/42673239
score: 0
has text: for labels you need to use click event not change event.
comment on: http://stackoverflow.com/q/27081913
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27101704
answer count: 4
tagged with: contenteditable
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22893238
has answer: http://stackoverflow.com/a/27101886
has answer: http://stackoverflow.com/a/27103283
has body: My html. &lt;div id="text" contenteditable="true" &gt;&lt;/div&gt; My Jquery count = 212 $("#text").keydown(function(e){ if(e.keyCode === 8){ if(count === 212){ return; } count = count + 1; }else{ count = count - 1; } }); but not work.. when i use mouse to selected and press back space (to delete) , my count value doesn't matched
type: Question
has comment: http://stackoverflow.com/comment/42713788
has comment: http://stackoverflow.com/comment/42707590
linked to: http://stackoverflow.com/q/20314126
has comment: http://stackoverflow.com/comment/42707588
has comment: http://stackoverflow.com/comment/42707531
tagged with: javascript
has answer: http://stackoverflow.com/a/27101797
tagged with: jquery
has answer: http://stackoverflow.com/a/27102466
has title: how to count typeing characters in div (contentediable)
score: 0
has comment: http://stackoverflow.com/comment/42712464
tagged with: http://stackoverflow.com/tag/html
tagged with: web

http://stackoverflow.com/comment/42678281
type: AnswerComment
comment on: http://stackoverflow.com/a/27084336
type: Comment
has text: Wow, I must have skipped right over that part. Thanks for pointing that out. :)
score: 0

http://stackoverflow.com/comment/42768858
score: 0
type: QuestionComment
type: Comment
has text: Thanks for that post but I have tried that one too. Even That One Works for Every Url But this.
comment on: http://stackoverflow.com/q/27134846

http://stackoverflow.com/comment/42710861
comment on: http://stackoverflow.com/q/27102760
type: Comment
type: QuestionComment
score: 0
has text: @joh3 depends on your implementation. If you use setInterval with a function that just requests (through ajax) new data from the server, you won't have to update the whole website. But this should be used carefully, since it will create datatraffic and if you create a page for mobile end devices it can become a problem

http://stackoverflow.com/comment/42609869
type: QuestionComment
has text: Related: [Different window.innerWidth between chrome and firefox?](http://stackoverflow.com/questions/14450874/different-window-innerwidth-between-chrome-and-firefox)
score: 0
comment on: http://stackoverflow.com/q/27045680
type: Comment

http://stackoverflow.com/a/27119067
type: Answer
answers question: http://stackoverflow.com/q/27118900
has body: You are fetching variable pre as substring of length 4 and then checking it for it is less than or equal to 3. So, basically your last else if block will never be true. Change var pre = input.substr(3,3); Your code will work fine.
score: 0

http://stackoverflow.com/comment/42715252
type: AnswerComment
comment on: http://stackoverflow.com/a/27070734
has text: interesting I've never saw that approach, try to do it with the resource and let me know, good luck
type: Comment
score: 0

firefox-os
tags question: http://stackoverflow.com/q/27088389
tags question: http://stackoverflow.com/q/27150380
type: Tag
tag name: firefox-os

http://stackoverflow.com/comment/42767607
type: QuestionComment
comment on: http://stackoverflow.com/q/27133854
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65633/discussion-between-damkulul-and-jose-m).
score: 0
type: Comment

http://stackoverflow.com/a/27139748
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42810391
has comment: http://stackoverflow.com/comment/42789687
has comment: http://stackoverflow.com/comment/42817626
has comment: http://stackoverflow.com/comment/42813515
has body: Yes, that should work fine. You can find your gx_id simply by fetching a copy of your table and checking the properties. Here's a sample from the docs: Request: https://www.googleapis.com/mapsengine/v1/tables/12421761926155747447-06672618218968397709/features?maxResults=500&amp;version=published&amp;key=(YOUR_KEY_HERE) Response: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 149.23531999999997, -35.352484 ] }, "properties": { ... "gx_id": "1" &lt;-- HERE } },
answers question: http://stackoverflow.com/q/27130275
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27130275
type: Answer
has comment: http://stackoverflow.com/comment/42788739

http://stackoverflow.com/comment/42733230
has text: Ok i got it fixed from the help you gave me with getJSON('http://mydomain.tld/pros/' + id.If you want to answer so i could promote ur comment and close the issue
comment on: http://stackoverflow.com/q/27114454
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42626118
comment on: http://stackoverflow.com/a/27054594
score: 0
type: AnswerComment
has text: i need also disable remaining check-box please help me.
type: Comment

http://stackoverflow.com/comment/42686317
type: Comment
comment on: http://stackoverflow.com/a/27088772
has text: This is how the output should be, isn't? `2 is not > 5, calling rec Got 2 back from rec, returning it 3 is not > 5, calling rec Got 3 back from rec, returning it 4 is not > 5, calling rec Got 4 back from rec, returning it 5 is not > 5, calling rec Got 5 back from rec, returning it 6 > 5, returning 6 Final result: 6`
type: AnswerComment
score: 0

http://stackoverflow.com/q/27116955
has answer: http://stackoverflow.com/a/27117111
accepted answer: http://stackoverflow.com/a/27117111
tagged with: javascript
has body: I'm trying to convert values defined in a javascript file to a json file or extract those values to some other format that I can process with python. Does anyone know of a python library, node.js package or other method for doing this with a local file? I cannot use ajax or php for this task. Context: I have a javascript file called file.js, in which there are no functions, but a number of lengthy arrays defined in the following fashion: var an_array1 = new Array(); an_array[1] = {some array values 1} ... an_array[n] = {some array values n} var another_array = new Array(); another_array[1] = {some other array values 1} ... another_array[m] = {some other array values m} No functions are included in this file, just the calls to var and the subsequent setting of the array values. Similar questions provide answers that focus around using ajax or php, but I do not think I can use these tools for this purpose. I can, however, use node.js, python and any associated libraries/packages. I would also be game to try an awk/sed type script, but I don't think this will work here, since the data I want requires file.js to be parsed/processed first. Ideal outcome Ultimately, I'd like to use some method to process the file.js, extract the value of one particular array to its own file as JSON, or some other, similar format (XML would be fine too, even csv would work). e.g.: file.json: [{some array values 1},...,{some array values n}] Does anyone know how this might be done? There are some questions similar to this, but those assume that I am querying a website or something, which is not the case here.
score: 0
answer count: 1
tagged with: python
tagged with: node.js
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: extract the value of an array in an existing javascript file
type: Question

http://stackoverflow.com/q/27105334
has title: angular injector with asp.net Boilerplate not working
tagged with: javascript
tagged with: asp.net
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42714083
has comment: http://stackoverflow.com/comment/42715677
has answer: http://stackoverflow.com/a/27105561
type: Question
has comment: http://stackoverflow.com/comment/42714211
score: 0
has body: I'm trying to use the Angular injection come with asp.net Boilerplate, I'm following the "tutorial" from here http://www.codeproject.com/Articles/791740/Using-AngularJs-ASP-NET-MVC-Web-API-and-EntityFram#ArticleBuildWebApiServices to get started with my project, for now I want to load the Tasks as Parts but for some reason I get the following error: Error: [ng:areq] http://errors.angularjs.org/1.3.2/ng/areq?p0=os.views.part.list&amp;p1=not%20aNaNunction%2C%20got%20undefined at Error (native) at http://localhost:6234/Scripts/angular.min.js:6:416 at Nb (http://localhost:6234/Scripts/angular.min.js:19:417) at ob (http://localhost:6234/Scripts/angular.min.js:20:1) at $get (http://localhost:6234/Scripts/angular.min.js:75:177) at http://localhost:6234/Scripts/angular.min.js:57:112 at r (http://localhost:6234/Scripts/angular.min.js:7:408) at I (http://localhost:6234/Scripts/angular.min.js:56:496) at g (http://localhost:6234/Scripts/angular.min.js:51:299) at http://localhost:6234/Scripts/angular.min.js:50:414 the application is a SPA. the Main app is loaded here: (function() { "use strict"; var app = angular.module("app", [ "ngAnimate", "ngSanitize", "ui.router", "ui.bootstrap", "ui.jq", "abp" ]); //Configuration for Angular UI routing. app.config([ "$stateProvider", "$urlRouterProvider", function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise("/"); $stateProvider .state("home", { url: "/", templateUrl: "/App/Main/views/home/home.cshtml", menu: "Home" //Matches to name of 'Home' menu in OnderdelenshopNavigationProvider }) .state("about", { url: "/about", templateUrl: "/App/Main/views/about/about.cshtml", menu: "About" //Matches to name of 'About' menu in OnderdelenshopNavigationProvider }) .state("listParts", { url: "/list", templateUrl: "/App/Main/views/parts/list.cshtml", menu: "ListParts" }); } ]); })(); then when routed to /list the following JS is loaded: (function() { var app = angular.module("app"); var controllerId = "os.views.parts.list"; app.co…
answer count: 1

http://stackoverflow.com/a/27000158
upvote count: 2
answers question: http://stackoverflow.com/q/27000017
has body: What you could do is instead of file_get_contents() is look at include this should take care of your issue if(file_exists('pages/page'.$page.'.php')) { include 'pages/page' . $page . '.php'; } else { echo 'There is no such page!'; } if you wanted to parse the contents into a variable then you could look at ob_start() ob_start( ); include 'pages/page' . $page . '.php'; $html = ob_get_clean( );
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/27000017

http://stackoverflow.com/a/27039999
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27039817
has comment: http://stackoverflow.com/comment/42827475
downvote count: 0
type: Answer
has body: Just wrap the table into a div : // with any number of row Put the css into a class and add a class to the container div

http://stackoverflow.com/a/27099837
type: AcceptedAnswer
has body: Please use like this : formatter: 'date', formatoptions: { srcformat: 'ISO8601Long', newformat: 'd/m/Y H:i:s' } Jsfiddle Example
accepted answer of: http://stackoverflow.com/q/27098971
type: Answer
answers question: http://stackoverflow.com/q/27098971
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/q/27009041
downvote count: 0
has comment: http://stackoverflow.com/comment/42546126
tagged with: javascript
tagged with: jackson
has body: I have java object which is converted as JSON string using String paramMap = new ObjectMapper().writeValueAsString(custPolicy.getParamMap()); model.addAttribute("testTypeMap", paramMap ); In the .jsp page, on load I'm trying to parse the testTypeMap and get object back; var paramMap = JSON.parse('${testTypeMap}'); showTestType('File content', 'LINUX', paramMap); The object has double quotes (") in one of the fields, and it is escaped with backslash () when it is converted as JSON sting in java, that is why we see "\"" (from view source) var paramMap = JSON.parse('{"Filepath":"/home/status.txt","Search expression":"\""}'); But the above line says, "Uncaught SyntaxError: Unexpected string". I have seen few posts and they say it need two parses, one for javascript and one for JSON. I tried to replace \" with \\" ; but in javascript \" is always ", so I could not replace it; Any pointer for what I miss here?
has answer: http://stackoverflow.com/a/27010035
favorite count: 0
has comment: http://stackoverflow.com/comment/42546056
has comment: http://stackoverflow.com/comment/42546252
has title: Json parse() does not escape \" in javascript
has comment: http://stackoverflow.com/comment/42546113
has comment: http://stackoverflow.com/comment/42546172
has comment: http://stackoverflow.com/comment/42546250
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27009162
score: 1
accepted answer: http://stackoverflow.com/a/27010035
upvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/27009162
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42546101
answer count: 2

http://stackoverflow.com/a/27018921
answers question: http://stackoverflow.com/q/27017270
type: Answer
has body: Let's propose a third way to approach the problem :) You can always use something like the following to get multiple Session variables filled: var fieldSize = 9; for (i = 1; i &lt;= fieldSize; i++) { Session.set("counter" + i, i); // sets 9 Session variables } Or perhaps use an array inside the Session. It can even be an array of objects: var fieldSize = 9; var fields = []; for (i = 1; i &lt;= fieldSize; i++) { fields.push({name: i, count: i}); } Session.set("fields", fields); This is basically the same approach as using ReactiveVar, only that you are using a global variable (Session) instead of a scoped one. You entire application will be able to access the things you store within Session. Also, you should perhaps not use a template bound to each field, but iterate using {{#each}} &lt;template name="fields"&gt; {{#each withIndex fields}} {{&gt; zelle}} {{/each}} &lt;/template&gt; The trouble here is that you have no control over which cell you are rendering currently, so you need to add an index to each of the {{#each}} runs. This is why I suggest a new global helper withIndex: Template.registerHelper('withIndex', function (list) { var withIndex = _.map(list, function (v, i) { v.index = i; return v; }); return withIndex; }); You can use the new index just like any other field from the array. You will need it to determine which number was clicked and where to increase the counter. I've used the td's id value to store the index of which cell was clicked. &lt;template name="zelle"&gt; &lt;td class="box" id="zelle-{{index}}"&gt; &lt;p class="textinbox"&gt;{{name}} with a count of {{count}}&lt;/p&gt; &lt;/td&gt; &lt;/template&gt; Template.fields.helpers({ fields: function () { return Session.get("fields"); } });
accepted answer of: http://stackoverflow.com/q/27017270
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27057170
type: UnansweredQuestion
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27913072
downvote count: 0
answer count: 1
tagged with: javascript
score: 1
favorite count: 0
has title: Using mixpanel with angular.js
tagged with: angularjs
has body: How can I use mixpanel in SPA? I want to track some events created by user. When user opens page first time randomly generated ID is given to him. After signing in this action is executed. mixpanel.alias(data.id); mixpanel.track('Sign In', { 'Email': response.data.email }); user.setCurrent(data); In user.setCurrent function I do this: mixpanel.identify(data.id); But in my mixpanel account random ID still given to user? What should I do to prevent this?
tagged with: mixpanel

http://stackoverflow.com/a/27038933
has comment: http://stackoverflow.com/comment/42597867
type: Answer
has body: You an try something like that: $('.menu').on('hover', function(){ $('.submenu').stop().slideToggle(); }); Reference Hard to answer, when no code is provided.
accepted answer of: http://stackoverflow.com/q/27038855
upvote count: 3
answers question: http://stackoverflow.com/q/27038855
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42655945
has text: I pasted your code in. What is `main.js` and where is it?
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27071665
type: Comment

http://stackoverflow.com/comment/65825998
type: Comment
comment on: http://stackoverflow.com/a/27067348
has text: Remember, avoid using IE=edge unless you are sure what you are doing. http://stackoverflow.com/questions/14611264/x-ua-compatible-content-ie-9-ie-8-ie-7-ie-edge http://www.gwtproject.org/doc/latest/DevGuideIE9.html
score: 1
type: AnswerComment

http://stackoverflow.com/a/27071325
answers question: http://stackoverflow.com/q/27071286
type: Answer
has comment: http://stackoverflow.com/comment/42655242
has comment: http://stackoverflow.com/comment/42655220
has body: One possible approach: // selecting the &lt;br /&gt; element that is a last-child: $('br:last-child') // selecting all previous-sibling elements until we find one that is not a &lt;br /&gt; element: .prevUntil(':not(br)') // adding the initial selector back to the collection: .addBack() // filtering the collection: .filter(function() { var sibling = this.previousSibling; // keeping only those &lt;br /&gt; elements with a previous-sibling of nodeType === 3 // (a textNode), and those whose previous-sibling's nodeValue (with leading // and trailing white-space removed) is equal to 0: return sibling.nodeType === 3 &amp;&amp; sibling.nodeValue.trim().length === 0; // removing those elements: }).remove(); $('br:last-child').prevUntil(':not(br)').addBack().filter(function() { var sibling = this.previousSibling; return sibling.nodeType === 3 &amp;&amp; sibling.nodeValue.trim().length === 0; }).remove(); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div class="topic"&gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. &lt;br /&gt;Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, &lt;br /&gt;nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. DonecLorem ipsum dolor sit amet, consectetuer adipiscing elit. &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;/div&gt; References: :not() selector. addBack(). prevUntil().
has comment: http://stackoverflow.com/comment/42655284
has comment: http://stackoverflow.com/comment/42655356
has comment: http://stackoverflow.com/comment/42655534
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/42655316
downvote count: 0
has comment: http://stackoverflow.com/comment/42655321

http://stackoverflow.com/a/27105950
upvote count: 1
has comment: http://stackoverflow.com/comment/42715565
downvote count: 0
has comment: http://stackoverflow.com/comment/42715294
type: Answer
answers question: http://stackoverflow.com/q/27105599
score: 1
has body: The angular way could be something like var app = angular.module('my-app', [], function() { }) app.controller('AppController', function($scope) { $scope.message = "Welcome"; }) app.directive("coverPhotoCarousel", ["$compile", function($compile) { return { restrict: "EA", replace: true, templateUrl: "cover-photo-carousel.html", scope: true, controller: function($scope) { $scope.images = [{ title: "", url: "http://placehold.it/90&text=abc", description: "", cover: true }, { title: "", url: "http://placehold.it/90&text=def", description: "" }, { title: "", url: "http://placehold.it/90&text=ghi", description: "" }, { title: "", url: "http://placehold.it/90&text=jkl", description: "" }]; $scope.bark = function() { console.log("Something."); }; $scope.myStyle = {}; $scope.clicked = function(image) { $scope.myStyle['background-image'] = 'url(' + image.url + ')' } }, link: function(scope, element, attributes) { if (scope.images.length > 1) { element.find(".cover-photo-control .glyphicon").show(); } scope.images.forEach(function(value, index) { if (value.cover) { element.css({ "background-image": "url(" + value.url + ")" }); } }); element.find(".thumbnails-container .thumbnails ul li a").on("click", function(e) { e.preventDefault(); element.css({ "background-image": "url(" + scope.images[1].url + ")" }); }); } } } ]); .cover-photo-carousel { background-repeat: no-repeat; background-position: center center; }

http://stackoverflow.com/comment/63010741
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27100777
has text: you could also try setting xLabelMargin from http://stackoverflow.com/questions/19715304/morris-js-x-axis-label-height
score: 0

http://stackoverflow.com/q/27088477
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27088585
score: 0
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27088585
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have 2 free-draggable div elements with absolute positioning. Inside those 2 divs, I have 3 additional draggable divs. (I use jQuery and jQuery-UI) Div A and Div Bare freely draggable with no direct drop target (like windows in Windows OS). Green boxes can be dragged and dropped only on another green box. (to be swapped) Yellow boxes can be dragged and dropped only on another yellow box. (to be swapped) I did everything related to drag, drop, swap operations: All good. The problem is, I couldn't prevent dropping yellow box on green box when Div A is over Div B. What I tried: (but didn't work) I added parent to draggable's containment I tried the following function for droppable's accept: $(elem).droppable({ accept: function(draggable){ if(draggable.parent()!=$(this).parent()){ return false; } return true; }); I want to solve this without assigning and comparing ID or CLASS names. Is this possible?
has title: How to construct a correct accept function for droppable element with jQuery?

http://stackoverflow.com/comment/42533031
has text: @user1064038 I updated the answer. Unfortunately I'm not a master at regex, but hopefully it helps with your purposes!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/26999203
type: Comment

http://stackoverflow.com/comment/42548358
comment on: http://stackoverflow.com/a/27010471
type: AnswerComment
score: 1
type: Comment
has text: You'd be better off using `_.extend` or `$.extend` (as in `clone = $.extend({}, j)`), or `Object.assign`, although that would give you a shallow copy.

http://stackoverflow.com/comment/42756287
comment on: http://stackoverflow.com/q/27128134
has text: Here a snippet i did a long time ago. That may help you : http://jsfiddle.net/o0f7abrr/1/. Just add it to you file. Note you'll probably need to use delegation instead of direct binding.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27009672
type: AnsweredQuestion
has title: Adding a button to a <g> element using d3
score: 1
has body: I was wondering what was the best way to go about adding a button to my group elements using d3. I have currently built my visual using d3 to look something like: &lt;div&gt; &lt;svg&gt; &lt;g&gt; &lt;rect&gt; &lt;/g&gt; &lt;g&gt;...&lt;/g&gt; &lt;/svg&gt; &lt;/div&gt; So I am wondering how I would add a clickable button in each group element. Some ideas I had were: g.append("a") .append("image") .attr("src", ...); or g.append("a") .append("rect") .attr(...) Ultimately I would like the button to perform an onclick event. What is the best way to go about this?
possible better answer: http://stackoverflow.com/a/27010483
has comment: http://stackoverflow.com/comment/42575463
answer count: 2
has answer: http://stackoverflow.com/a/27010483
downvote count: 0
tagged with: button
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27010897
has comment: http://stackoverflow.com/comment/42552622
accepted answer: http://stackoverflow.com/a/27010897
tagged with: d3.js
upvote count: 1
type: Question

http://stackoverflow.com/comment/42724343
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27110479
has text: Deleted comment. Great.
type: AnswerComment

http://stackoverflow.com/q/27119920
upvote count: 7
type: Question
has title: Function to add rows to a dataTable in jquery gives TypeError
tagged with: javascript
has answer: http://stackoverflow.com/a/27120019
score: 4
accepted answer: http://stackoverflow.com/a/27120019
possible better answer: http://stackoverflow.com/a/32795721
tagged with: jquery
has answer: http://stackoverflow.com/a/32795721
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/43886676
type: AnsweredQuestion
downvote count: 3
has body: In my Jquery dataTable, row.add is not working and throws an error saying the add function is undefined. The error message is: Uncaught TypeError: Cannot read property 'add' of undefined jsfiddle link html Column 1 Column 2 Column 3 Column 1 Column 2 Column 3 Add new row javascript $(document).ready(function() { var counter = 1; var prntTable = $('#example').dataTable( { "aoColumns" : [ {"bSearchable" : false}, {"bSearchable" : true}, {"bSearchable" : true} ], "sPaginationType" : "full_numbers" } ); $('#addRow').on( 'click', function () { prntTable.row.add( [ counter +'.1', counter +'.2', counter +'.3' ] ).draw(); counter++; } ); $('#addRow').click(); } );

http://stackoverflow.com/comment/42798274
has text: I would say then that @Rhumborl answer should work for you then
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27151695

http://stackoverflow.com/q/27137550
score: 0
answer count: 2
type: UnansweredQuestion
has title: html5 Canvas signature pad error with xmlhttpRequest
tagged with: xmlhttprequest
has body: I am following this post:Can't get html5 Canvas signature pad to submit to database, and is a great signature script, but I already have a error when I tried to save it into DB...the console give me this error: Error: Failed to construct 'XMLHttpRequest': Please use the 'new' operator, this DOM object constructor cannot be called as a function. Can you help me with this part of javascript to fix it: $("#saveSig").click(function saveSig() { //encode URI var sigData = encodeURIComponent(canvas.toDataURL("image/png")); $("#imgData").html('Thank you! Your signature was saved'); var ajax = XMLHttpRequest(); ajax.open("POST", 'sign/signature.php'); ajax.setRequestHeader('Content-Type', 'application/upload'); ajax.send(sigData); $('#debug').html(sigData); });
type: Question
has answer: http://stackoverflow.com/a/27138183
has answer: http://stackoverflow.com/a/27138305
tagged with: javascript
linked to: http://stackoverflow.com/q/17015935

http://stackoverflow.com/comment/42762588
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27128403
has text: @Ryo is it possible to automatically reload a PHP script by itself then?
score: 0

http://stackoverflow.com/q/27033589
has comment: http://stackoverflow.com/comment/42588553
has answer: http://stackoverflow.com/a/27033695
downvote count: 0
tagged with: jquery
has body: I've only recently started learning JS, jQuery, HTML and CSS. Right now I'm trying to make my page, when a category class is clicked, animate and then redirecting to the link of the clicked item. I've looked around a lot and got the .closest(selector).attr('href') thing or the parent thing. I tried both, and I just keep getting undefined for linkto HTML: &lt;div class="col-sm-4"&gt; &lt;div class="mainCon"&gt; &lt;a href="programs.html"&gt; &lt;li class="category"&gt; &lt;img style="height: 150px;" src="programs.png" /&gt;&lt;br /&gt; Programs &lt;/li&gt; &lt;/a&gt; &lt;/div&gt; JS: $('.category').click(function() { $('.mainCon').animate({ right: '100px', opacity: '0', }, 500, function() { var linkto = $(this).closest('a').attr('href'); location.href= linkto; }) return false; }); Any idea why linkto always returns undefined? The linked html file(programs.html) is in the same directory as the page where I'm going to be coming from so I really don't know what's wrong.
favorite count: 0
has answer: http://stackoverflow.com/a/27033856
has comment: http://stackoverflow.com/comment/42588431
answer count: 5
has answer: http://stackoverflow.com/a/27033619
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 3
has answer: http://stackoverflow.com/a/27033867
has comment: http://stackoverflow.com/comment/42588261
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27033619
score: 3
has answer: http://stackoverflow.com/a/27033637
tagged with: javascript
has title: jquery/js closest().attr() returns undefined
possible better answer: http://stackoverflow.com/a/27033637

http://stackoverflow.com/q/27095514
tagged with: video
tagged with: audio
has comment: http://stackoverflow.com/comment/42998810
has body: I am working on a web application that captures a users screen and sends the screen to another user. So far I have the desktop capture working great and I used peer.js for this. Now I would like to add audio from the users microphone to the stream as well. So I thought it would be as simple as to set the audio variable to true in the getUserMedia call but that just leaves me with an error. Any ideas? function startScreenStreamFrom(streamId) { navigator.webkitGetUserMedia({ audio: true, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: streamId, maxWidth: window.screen.width, maxHeight: window.screen.height } } }, function(screenStream) { stream = screenStream; videoElement.src = URL.createObjectURL(screenStream); videoElement.play(); videoplaying = true; broadcaststarted = true; }, function(error) { console.log('getUserMedia failed!: ' + error); }); } This brings up the Navigate User Media Error.
has comment: http://stackoverflow.com/comment/43016261
has comment: http://stackoverflow.com/comment/42718290
accepted answer: http://stackoverflow.com/a/27408691
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/43027677
linked to: http://stackoverflow.com/q/25763088
has comment: http://stackoverflow.com/comment/42725971
tagged with: javascript
type: AnsweredQuestion
upvote count: 0
tagged with: webrtc
tagged with: web
favorite count: 0
has answer: http://stackoverflow.com/a/27408691
has comment: http://stackoverflow.com/comment/42727177
type: Question
has title: Desktop Capture with Audio
score: -1

http://stackoverflow.com/q/27134375
tagged with: unit-testing
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/30580540
answer count: 2
upvote count: 7
favorite count: 0
has body: I'm attempting to write some unit tests with Karma and am receiving the following error: PhantomJS 1.9.8 (Mac OS X) ERROR Error: [$injector:nomod] Module 'portfolioMockupApp.services' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.3.3/$injector/nomod?p0=portfolioMockupApp.services at /Users/danielbogart/Documents/coding/work/portfolio-mockup/bower_components/angular/angular.js:1749 Also, I have two separate files within the portfolioMockupApp.services module, both saved in the scripts/services directory. Karma.conf files section: files: [ 'bower_components/angular/angular.js', 'bower_components/angular-mocks/angular-mocks.js', 'bower_components/angular-animate/angular-animate.js', 'bower_components/angular-cookies/angular-cookies.js', 'bower_components/angular-resource/angular-resource.js', 'bower_components/angular-sanitize/angular-sanitize.js', 'bower_components/angular-touch/angular-touch.js', 'test/mock/**/*.js', 'test/spec/**/*.js', 'app/scripts/services/*.js', 'app/scripts/directives/*.js', 'app/scripts/controllers/*.js', 'app/scripts/app.js', 'node_modules/angular/angular.js', 'node_modules/angular-mocks/angular-mocks.js', './src/**/*.js', './test/**/*.js' ], Portfolio.js spec (first and only test currently): 'use strict'; describe('Controller: PortfolioCtrl', function () { // load the controller's module beforeEach(module('portfolioMockupApp', 'portfolioMockupApp.services')); var PortfolioCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $scope, $log, $stateParams, $state, $rootScope,portService, portfolioCreateService) { scope = $rootScope.$new(); PortfolioCtrl = $controller('PortfolioCtrl', { $scope: scope }); })); it('should have a list of 5 tabs by default', function () { expect(scope.tabs.length).toBe(5); }); });
tagged with: angularjs
has answer: http://stackoverflow.com/a/27153113
accepted answer: http://stackoverflow.com/a/27153113
has answer: http://stackoverflow.com/a/30580540
type: AnsweredQuestion
tagged with: phantomjs
tagged with: karma-runner
has title: Angular JS Error: [$injector:nomod] Module 'portfolioMockupApp.services' is not available
downvote count: 0
score: 7

http://stackoverflow.com/comment/42558325
comment on: http://stackoverflow.com/q/27015459
score: 0
type: Comment
type: QuestionComment
has text: @A. Wolff can u check the image i have uploaded with the request?

http://stackoverflow.com/comment/42716786
type: Comment
score: 0
has text: awesome, i'll give it a try.
type: AnswerComment
comment on: http://stackoverflow.com/a/27091394

timer
tag name: timer
tags question: http://stackoverflow.com/q/27048209
tags question: http://stackoverflow.com/q/27061576
tags question: http://stackoverflow.com/q/27081499
type: Tag
tags question: http://stackoverflow.com/q/27113194
tags question: http://stackoverflow.com/q/27098323
tags question: http://stackoverflow.com/q/27027107
tags question: http://stackoverflow.com/q/27131848
tags question: http://stackoverflow.com/q/27097705
tags question: http://stackoverflow.com/q/26995430
tags question: http://stackoverflow.com/q/27140772

http://stackoverflow.com/comment/42725807
has text: I think we should assume that the `request.getSession....` is Java, not JavaScript.
comment on: http://stackoverflow.com/a/27111486
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42529404
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26999189
has text: How do you perform the refresh? Is it a post-back? What is the document.location when the refresh is performed?
type: Comment

http://stackoverflow.com/q/27016272
tagged with: ecmascript-6
has comment: http://stackoverflow.com/comment/42558136
answer count: 2
has comment: http://stackoverflow.com/comment/42559507
has answer: http://stackoverflow.com/a/32243032
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42559236
has comment: http://stackoverflow.com/comment/42558127
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42559002
linked to: http://stackoverflow.com/q/1596782
has title: delete or override const variables in javascript Harmony / ECMAScript 6
score: 9
type: Question
upvote count: 9
tagged with: javascript
has body: Reading and tinkering with the new features offered by ECMAScript 6. The new 'const' statement for writing constant variables is a nifty feature, which adds features to an already interesting update. The variable is created as read-only, and once it is stated it can't be overridden. EDIT: A consequent problem arise, for example, when testing code on the console. Running a script containing a const definition twice, would lead to an error, breaking the execution. What if I want to release that keyword? Is there any way to unset or delete the variable? I've read in this post that this is actually a problem which affects the var statement as well, because the environments where the variables are created are different on many level of abstraction. How ECMAScript 6 intend to address this issue?
has answer: http://stackoverflow.com/a/27019954

asp.net
tags question: http://stackoverflow.com/q/27053172
tags question: http://stackoverflow.com/q/26995814
tags question: http://stackoverflow.com/q/27039790
tags question: http://stackoverflow.com/q/27101807
tags question: http://stackoverflow.com/q/27070120
tags question: http://stackoverflow.com/q/27060218
tags question: http://stackoverflow.com/q/27124769
tags question: http://stackoverflow.com/q/27047800
tags question: http://stackoverflow.com/q/27135761
tags question: http://stackoverflow.com/q/27060027
tags question: http://stackoverflow.com/q/27114366
tags question: http://stackoverflow.com/q/27057656
tags question: http://stackoverflow.com/q/27122241
tags question: http://stackoverflow.com/q/27023806
tags question: http://stackoverflow.com/q/27078192
tags question: http://stackoverflow.com/q/27146104
tags question: http://stackoverflow.com/q/27096468
tags question: http://stackoverflow.com/q/27073581
tags question: http://stackoverflow.com/q/27005757
tags question: http://stackoverflow.com/q/27143352
tags question: http://stackoverflow.com/q/27062303
tags question: http://stackoverflow.com/q/27065077
tags question: http://stackoverflow.com/q/27118846
tags question: http://stackoverflow.com/q/27142373
tags question: http://stackoverflow.com/q/26995580
tags question: http://stackoverflow.com/q/27098851
tags question: http://stackoverflow.com/q/27036274
tags question: http://stackoverflow.com/q/27102711
tags question: http://stackoverflow.com/q/27152127
tags question: http://stackoverflow.com/q/27060704
tags question: http://stackoverflow.com/q/27134794
tags question: http://stackoverflow.com/q/27035645
tags question: http://stackoverflow.com/q/27152599
tags question: http://stackoverflow.com/q/27071191
tags question: http://stackoverflow.com/q/27127435
tags question: http://stackoverflow.com/q/27014353
tags question: http://stackoverflow.com/q/27090915
tags question: http://stackoverflow.com/q/27104133
tags question: http://stackoverflow.com/q/27093415
tags question: http://stackoverflow.com/q/27079711
tags question: http://stackoverflow.com/q/27099330
tags question: http://stackoverflow.com/q/27061704
tags question: http://stackoverflow.com/q/27103568
tags question: http://stackoverflow.com/q/26998818
tags question: http://stackoverflow.com/q/27147122
tags question: http://stackoverflow.com/q/27035451
tags question: http://stackoverflow.com/q/27139230
tags question: http://stackoverflow.com/q/27071585
tags question: http://stackoverflow.com/q/27011752
tags question: http://stackoverflow.com/q/27128411
tags question: http://stackoverflow.com/q/27017507
tags question: http://stackoverflow.com/q/27040042
tags question: http://stackoverflow.com/q/27038424
tags question: http://stackoverflow.com/q/26997545
type: Tag
tags question: http://stackoverflow.com/q/27038560
tags question: http://stackoverflow.com/q/27119227
tags question: http://stackoverflow.com/q/27135799
tags question: http://stackoverflow.com/q/27021259
tags question: http://stackoverflow.com/q/27142546
tags question: http://stackoverflow.com/q/27040316
tags question: http://stackoverflow.com/q/27087077
tags question: http://stackoverflow.com/q/27044364
tags question: http://stackoverflow.com/q/27057547
tags question: http://stackoverflow.com/q/27033397
tags question: http://stackoverflow.com/q/27137833
tags question: http://stackoverflow.com/q/27070792
tags question: http://stackoverflow.com/q/27135961
tags question: http://stackoverflow.com/q/27139944
tags question: http://stackoverflow.com/q/27105664
tags question: http://stackoverflow.com/q/27145529
tags question: http://stackoverflow.com/q/27112439
tags question: http://stackoverflow.com/q/27131444
tags question: http://stackoverflow.com/q/27040149
tags question: http://stackoverflow.com/q/27027649
tags question: http://stackoverflow.com/q/27147940
tags question: http://stackoverflow.com/q/27109556
tags question: http://stackoverflow.com/q/27026949
tags question: http://stackoverflow.com/q/27014446
tags question: http://stackoverflow.com/q/27032585

http://stackoverflow.com/comment/42603609
comment on: http://stackoverflow.com/q/27042121
has text: Just tried that, and curiously none of the items in the carousel appear at all...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42543114
has text: Aw, that's why I have seen $scope everywhere in tutorials. I've only done the free course from codeschool.com which seemed really good, but only used 'this' and never seemed to run into this issue.
score: 0
comment on: http://stackoverflow.com/a/27006955
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42665783
comment on: http://stackoverflow.com/a/27077474
type: Comment
score: 2
has text: Ok. I had a feeling. BTW thanks for your GAS blog (I thing it is yours)! I used some of your examples in the past.
type: AnswerComment

http://stackoverflow.com/comment/42704985
comment on: http://stackoverflow.com/a/27100140
type: AnswerComment
has text: This doesn't seem to work, I'm not sure if the data is getting parsed correctly. I will edit the initial post to include your suggestions.
score: 0
type: Comment

http://stackoverflow.com/comment/42841893
type: Comment
comment on: http://stackoverflow.com/q/27107204
type: QuestionComment
has text: Maybe this could be related (introduced in 1.3): https://github.com/angular/angular.js/commit/b59b04f98a0b59eead53f6a53391ce1bbcbe9b57
score: 0

http://stackoverflow.com/comment/42700338
comment on: http://stackoverflow.com/q/27096590
score: 0
has text: Did you try `routes.index` instead of just `routes` in your `app.use('/', ..)` call?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27006765
type: UnansweredQuestion
tagged with: substr
has answer: http://stackoverflow.com/a/27006850
tagged with: operations
downvote count: 1
has comment: http://stackoverflow.com/comment/42542499
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42542439
answer count: 2
has comment: http://stackoverflow.com/comment/42542516
upvote count: 0
has title: Understanding Substr
has comment: http://stackoverflow.com/comment/42542562
has body: I have a block of javascript here. Simple script that does as it is supposed to here: var char, num, i, line, j; char = input[0]; num = input[1]; l = ""; var Lines = new Array(); for ( i=0; i &lt;= num; i++ ) { l = l+char+char+char; for ( j=0; j &lt;= num; j++ ) { Lines[i] = l.substr(0, 1*i); } print(i +" " + Lines[i]); } My issue is I do not understand this line: Lines[i] = l.substr(0, 1*i); I am trying to learn here okay and this is one of the few sites I see that have been helpful so please refrain from assinine remarks. This is not homework. It is me trying to make sense of things since the teacher's way of teaching is not helping with my understanding. In fact the whole class is having an issue. the desired output is to simply print a character over and over a given number of times while creating a new line so if say M is entered (char) and 6 is entered as the input (num)... the 1st line prints one M the 2nd line prints 2 Ms, 3rd three Ms, and so forth for the given number of times, in this case is 6 making 6 lines and 6 Ms (right triangle I guess you can say. This way can be used to make a diamond too.) I just do not get where "*i" comes into it. I know substr(0,1) is just the 1st character. I do not see how the current number i is affects the substr result. Explanation: char is the character entered, num is the number entered. In class we use an HTML file to run the javascript where the print statement is used instead of say document.write and having to save .js files. The teacher does not even get into all that stuff. In case you are wondering the class is Programming Logic 105. I haven't looked at programming since high school during the PASCAL, BASIC and C days. I am not used to the dynamic nature of Javascript. I guess the school deems Javascript as a good open door into programming.
favorite count: 0
has comment: http://stackoverflow.com/comment/42542707
has answer: http://stackoverflow.com/a/29305074

http://stackoverflow.com/a/60116210
has body: As @Bjornicus (https://stackoverflow.com/a/39088322/5056421) wrote, built-in loader.js's noConflict() function seems to work correctly. I placed it in main JS file (app.js): window.loader.noConflict({ define: "emberDefine" }); and define wasn't overridden (I import ember app to another app which uses SystemJS). But I've made only few tests, so I don't know if this does not break something later.
score: 0
answers question: http://stackoverflow.com/q/27042145
type: Answer

http://stackoverflow.com/comment/42759398
comment on: http://stackoverflow.com/q/27130171
score: 0
type: Comment
type: QuestionComment
has text: Remove the `onchange` handler and assign an `ID` to your `select`, then using javascript you can get the selected value from a function triggered by a button/link click.

http://stackoverflow.com/a/46326736
answers question: http://stackoverflow.com/q/27126224
has body: Make sure to always try the jQuery document ready function first, when an error occurs.
score: 0
type: Answer

http://stackoverflow.com/comment/102661226
type: AnswerComment
has text: This can cause errors. For instance: - expiring date: 12/01 - current date : 09/19 Since 9 < 12 != true, the second condition is not checked, thus the card is marked as valid.
comment on: http://stackoverflow.com/a/37516911
type: Comment
score: 0

http://stackoverflow.com/comment/42781504
has text: @user3440629 - I have tried your code ,Igor is correct, you should remove this line of code, this is line is causing PostBack.
comment on: http://stackoverflow.com/a/27140006
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42653911
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27070151
has text: would be fairly complicated, it uses a dropdown to get the value with ng-model and pass it to google map markers.
type: AnswerComment

http://stackoverflow.com/q/27107082
has title: Dynamically loaded elements are not in the HTML source code
has comment: http://stackoverflow.com/comment/42717475
tagged with: loading
downvote count: 0
tagged with: dynamic
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42717527
type: Question
has answer: http://stackoverflow.com/a/27108544
tagged with: javascript
has body: I am fetching an attribute of a div from a page which loads the elements dynamically upon scrolling to the bottom of the page. There are 10 div's on the page initially and upon scrolling 10 new div's are loaded each time dynamically to the page. My script looks like this: var arr = document.getElementsByTagName('html')[0].innerHTML.match(/data-username="([^"]*")/gm); // I want the value from the attribute data-username alert(arr.length); // size is 10 window.scrollTo(0, document.body.scrollHeight); // scroll to bottom to load 10 divs dynamically arr = document.getElementsByTagName('html')[0].innerHTML.match(/data-username="([^"]*")/gm); alert(arr.length); // size is still 10 but should be 20 Why is the array size still 10? How can I get all the 20 divs and iterate through them? I took a look at the HTML source code and the problem is that the dynamically loaded div's are not there... How am I supposed to get the dynamically loaded elements?
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42717770

http://stackoverflow.com/a/27125026
has comment: http://stackoverflow.com/comment/42752033
has comment: http://stackoverflow.com/comment/42750336
has comment: http://stackoverflow.com/comment/42752094
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27123895
accepted answer of: http://stackoverflow.com/q/27123895
has comment: http://stackoverflow.com/comment/42751660
has body: The callback is definitely the better choice. You don't need to sum the delays manually, and don't need to maintain it when updating the code. It's much more error-prone, as your code demonstrates: six one-second delays are not 5000 milliseconds. Your first snippet would animate the first and sixth bulb simultaneously. Also, when you are animating a single element the animations would get chained onto jQuery's animation queue. If the timers deviate (and setInterval is known to drift over longer periods), then you could easily build up a very long queue (animations are scheduled faster than they are executed) which is not good for performance.
type: Answer

http://stackoverflow.com/q/27111611
tagged with: javascript
has comment: http://stackoverflow.com/comment/42726475
score: 0
has title: Passing Variable via AJax
possible better answer: http://stackoverflow.com/a/27111737
has comment: http://stackoverflow.com/comment/42726268
has body: Im on project to make an app with codeigniter but i got stuck, when i want to pass same variable outside field via ajax into controller i got error the variable is not defined. this is a example. $("#form_status_update").submit(function() { var date = new Date().toString();` $.ajax({ type: 'POST', url: "&lt;?php echo base_url()?&gt;socialcontroller/setdate", data:date, success: function(data) { window.location.href = "&lt;?php echo base_url()?&gt;socialcontroller/ssetdate"; }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError); //throw any errors } }); }); after passing some var i want to insert into my database. and my question is how to pass a variable not field into controller via ajax thanks, i already search on google but i didnt geting the right answer :) `
tagged with: jquery
tagged with: ajax
tagged with: php
has answer: http://stackoverflow.com/a/27111887
has comment: http://stackoverflow.com/comment/42726334
answer count: 4
has answer: http://stackoverflow.com/a/27111737
has comment: http://stackoverflow.com/comment/42726427
has answer: http://stackoverflow.com/a/27112096
accepted answer: http://stackoverflow.com/a/27113293
tagged with: codeigniter
type: Question
has comment: http://stackoverflow.com/comment/42726175
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42726172
has comment: http://stackoverflow.com/comment/42726067
has answer: http://stackoverflow.com/a/27113293

http://stackoverflow.com/a/27073059
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27073001
has comment: http://stackoverflow.com/comment/42658709
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42658562
has body: You can pass a id variable to the Calculate function like: Toddler Ticket Junior Ticket Adult Ticket Then you can use this id to identify what button was pressed: function Calculate(id) { //set zeroes for all values adulTicket = 0 junTicket = 0 todTicket = 0 amountTicket = 0 totalSales = 0 adulNum = 0 junNum = 0 todNUm = 0 extraNum = 0 grossProfit = 0 switch(id){ case 0: //code for toddler break; case 1: //code for junior break; case 2: // code for adult break; } //get user input amountTicket = prompt("Valued customer, please enter the number of tickets you would like to purchase."); parseFloat(amountTicket); grossProfit = (adulTicket * adultNum) + (junTicket * junNum) } I hope that works for you.
type: Answer
has comment: http://stackoverflow.com/comment/42658642
score: 1
answers question: http://stackoverflow.com/q/27073001

http://stackoverflow.com/q/27107440
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42728188
tagged with: javascript
has answer: http://stackoverflow.com/a/27115480
accepted answer: http://stackoverflow.com/a/27115480
tagged with: google-maps-api-3
has title: unable to set a LatLngBounds with longitude from -180 to 0
upvote count: 1
has comment: http://stackoverflow.com/comment/42723279
has body: When trying to set a new LatLngBounds, for the southwest quarter of the world, the SouthWest longitude is automatically set at the other side of the world, leading to an unconsistent LatLngBounds (SouthWest is more east than NorthEast) a = new google.maps.LatLng(-90, -180, true); a.lng(); =&gt; -180 b = new google.maps.LatLng(0, 0, true); c = new google.maps.LatLngBounds(a, b); c.getSouthWest().lng(); =&gt; 180 The problem seems not to be in the LatLng, but more in the LatLngBounds. Are they other params or other ways to do it so it can represent this quarter of the world ? Tests with more parameters, only southwest longitude is always set to -180 : http://jsfiddle.net/vr6ztq9z/1/
favorite count: 0
downvote count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42720201
has comment: http://stackoverflow.com/comment/42729420
score: 1

http://stackoverflow.com/comment/42658501
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27032624
has text: Do you mean you'll have one document per chatroom? Can you update your question with a schema example?

http://stackoverflow.com/q/27004272
upvote count: 8
tagged with: node.js
answer count: 4
has answer: http://stackoverflow.com/a/27005846
has answer: http://stackoverflow.com/a/27005334
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27004476
has title: javascript equivalent to python's dictionary.get
tagged with: underscore.js
has answer: http://stackoverflow.com/a/27004444
has body: I'm trying to validate a JSON object with node.js. Basically, if condition A is present then I want to make sure that a particular value is in an array which may not be present. I do this in python using dictionary.get because that will return a default value if I look up something that isn't present. This is what it looks like in python if output.get('conditionA') and not 'conditionB' in output.get('deeply', {}).get('nested', {}).get('array', []): print "There is an error somewhere you need to be fixing." I'd like to find a similar technique for javascript. I tried using defaults in underscore to create the keys if they aren't there but I don't think I did it right or I'm not using it the way it was intended. var temp = _.defaults(output, {'deeply': {'nested': {'array': []}}}); if (temp.hasOwnProperty('conditionA') &amp;&amp; temp.deeply.nested.array.indexOf('conditionB') == -1) { console.log("There is an error somewhere you need to be fixing."); } It seems like if it runs into an output where one of the nested objects is missing it doesn't replace it with a default value and instead blows with a TypeError: Cannot read property 'variety' of undefined where 'variety' is the name of the array I'm looking at.
possible better answer: http://stackoverflow.com/a/27005334
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42537987
accepted answer: http://stackoverflow.com/a/27004476
downvote count: 0
score: 8
favorite count: 0

http://stackoverflow.com/a/27110942
score: 1
has comment: http://stackoverflow.com/comment/42726477
upvote count: 1
has comment: http://stackoverflow.com/comment/42727830
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27110699
type: Answer
accepted answer of: http://stackoverflow.com/q/27110699
has body: You need to use a flag and only "write" out the match when they are all found, you are writing it out when one is found. Plus indexOf returns -1, not false. Basic idea below: var data = { "index": { "count": "2", "posts": [ { "id": "1", "date": "2014-11-21 17:16:39 GMT", "url": "http://url/", "image": "http://big_image/", "thumbnail": "http://little_image/", "tags": ["funny", "cat", "picture", "falling", "chair", "window sill", "funny"] }, { "id": "2", "date": "2014-11-20 17:57:32 GMT", "url": "http://url1/", "image": "http://big_image1/", "thumbnail": "http://little_image1/", "tags": ["funny", "cat", "picture", "jumping", "water", "bath", "funny"] } ] } }; var query = "funny cat bath".split(" "); var filteredSet = []; //where the matched objects will reside var posts = data.index.posts; //get the posts for (var i=0; i&lt;posts.length;i++) { //loop through the posts var post = posts[i]; var tags = post.tags; //reference the tags var hasMatch = true; //flag to hold the state if we have a good match - set to true by default for (var j=0; j&lt;query.length; j++) { //loop through the tags the user is looking for var index = tags.indexOf(query[j]); //look for it in the set [Note older IEs needs polyfill see MDN for code] if (index===-1) { //indexOf returns -1 if not found hasMatch=false; //set Boolean flag so we do not record item break; //exit loop - no reason to keep checking } } if (hasMatch) { //if we found all the tags filteredSet.push(post); // add to the filtered set } } console.log(filteredSet); //show the filtered set
downvote count: 0

http://stackoverflow.com/comment/42579537
type: Comment
type: QuestionComment
has text: Ty for the feedback. Can you provide code how to display it on the page? When I echo nothing happens and how do I do that in a div? Sorry my English is not the best. I understand bootstrap and understand what it does and what not.
comment on: http://stackoverflow.com/q/27028165
score: 0

http://stackoverflow.com/a/77903398
type: Answer
answers question: http://stackoverflow.com/q/27040430
score: 0
has body: Array.from({length: 5}, () =&gt; false) Sample: const arr = Array.from({length: 5}, () =&gt; false) console.log(arr.join(", "))

http://stackoverflow.com/a/27001565
answers question: http://stackoverflow.com/q/27001529
score: 1
has body: Instead of $( // Code here ); Use this $(function() { // Code here }); See jQuery docs.
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/27049673
tagged with: dimple.js
has comment: http://stackoverflow.com/comment/42664574
tagged with: d3.js
has answer: http://stackoverflow.com/a/27108491
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27108491
has title: Fix categories in categoriaxis in dimple js
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42664299
has comment: http://stackoverflow.com/comment/42651538
has body: I am using Dimple js to make a bar chart with one bar for each day (Sunday, Monday...). The problem is that sometimes there won't be data for a few days but I would still want my chart to show all the days with a value 0. How do I fix all the categories which should be shown on the axis? Edit: Here's a demo: jsfiddle.net/neme8got/ I want the chart to show the days not shown now with a volume 0.
has comment: http://stackoverflow.com/comment/42664810

http://stackoverflow.com/comment/42792408
type: Comment
has text: Yeah, I like this one too. As long as you make sure you don't select the same element twice, you are OK. I will upvote this.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27148618

http://stackoverflow.com/comment/42578089
type: Comment
comment on: http://stackoverflow.com/a/27027270
has text: Damn, i thought that solved it. It didn't, the img elements from the Test.html are still not accesible. Maybe I should elaborate, I'm trying to get the src elements from Test.html(loaded into DIV of Home.html) using getElementsByClassName function. I have created 2 img elements in home.html just to test it. The getElementsByClassName function gets the 2 img elements from Home.html, but not the 2 img elements inside test.html.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42617806
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27050095
type: Comment
has text: @AlfonsoMuñoz: Version *and* usage. `on()` works in a couple of different ways.

http://stackoverflow.com/q/27040297
has comment: http://stackoverflow.com/comment/42601292
has comment: http://stackoverflow.com/comment/42600771
favorite count: 0
tagged with: sencha-touch
has answer: http://stackoverflow.com/a/30166664
tagged with: extjs
type: Question
has answer: http://stackoverflow.com/a/30061204
score: 4
answer count: 3
has answer: http://stackoverflow.com/a/27040693
possible better answer: http://stackoverflow.com/a/30061204
tagged with: google-chrome
has title: Uncaught ReferenceError: WebKitPoint is not defined
accepted answer: http://stackoverflow.com/a/27040693
upvote count: 4
has body: I use Sencha Touch 1.1.1 Yesterday when Google Chrome was updated to 39 it has started to give this error Uncaught ReferenceError: WebKitPoint is not defined Because they have removed WebKitPoint. Sencha Touch has a code with WebKitPoint, located here http://cdn.sencha.io/touch/sencha-touch-1.1.1/sencha-touch.js at line 6. Yeah. getXY: function() { var a = window.webkitConvertPointFromNodeToPage(this.dom, new WebKitPoint(0, 0)); return [a.x, a.y] } I think WebKitPoint is some kind of function object {x:0, y:0} but I was unable to make/create what the JavaScript code wants; I wrote this WebKitPoint = {x:0, y:0} but it gives error again, this time says that it is not a function. Also I have found this: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/pIbpN_8Lqpg tl;dr Google Chrome 39 no longer supports WebKitPoin. How can I emulate or replace it?
type: AnsweredQuestion
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/26997710
score: 6
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27027134
accepted answer: http://stackoverflow.com/a/27027134
has body: I'm a Meteor and mongo noob (now a huge Meteor fan), and am struggling with how to implement lookup collections within Meteor. Scenario: I have a product with custom colors (user defined/unknown amount) A user can add in their own custom colors, then go to the product page and choose from a colors select box what color they want to use for that product If the user goes back and modifies the color hex value (and saves) on the colors page, the product (on the product page) reflects that new colorHex value What I'm trying to do: Allow the user to go back and modify a pre-existing color on the colors page Have that color hex value change be reflected on the product page Trying to not duplicate data on different collections (and worrying about updating data across multiple collections/data inconsistencies if update fails part way through) Initially I set up my product schema to hold the color data as well (de-normalized data), though when the color is updated, it's not being updated on the typography document. I have seen that you can use observe of observeChange to essentially listen to changes, then make additional changes, though this seems more complicated than it needs to be. Is there a way that I can reference the colors collection for all colors added to a specific product so that any change is reflected on the product page? Below is some of the code that I have been working on. I'm using collection2 and iron:Router if that helps any. I have tried concatenating both collections, though this not what I'm after since the each loop also loops through the colors (not desired). Any help is appreciated. Thank you in advance! -Chris ProductPage Helper: Template.productPageTpl.helpers({ ownProduct: function() { return this.userId === Meteor.userId(); }, productItems: function() { return ProductCollection.find({productId: this._id}); }, colorsItems: function() { return ColorsCollection.find({productId: this._id}); }, // This is my attempt and although give me back both col…
type: Question
has title: Meteor / Mongo - How do you Reference a Lookup Collection? (de-normalize vs normalize)
tagged with: mongodb
upvote count: 6
tagged with: javascript
tagged with: jquery
answer count: 1
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/42658114
score: 0
type: Comment
has text: Yes, I didn't know that way, It's definitely the best way to do it
comment on: http://stackoverflow.com/a/27072760
type: AnswerComment

http://stackoverflow.com/a/26992135
has comment: http://stackoverflow.com/comment/42515636
has comment: http://stackoverflow.com/comment/42515794
has body: You dont need to use CSS in this instance, instead you could simply use the hide() method within JQuery and reference each class in your selector. $(".shares").hover(function(){ $('.homenetworks').show(); $('.totalshares, .catlink, .shareimag').hide(); },function(){ $('.homenetworks').hide(); $('.totalshares, .catlink, .shareimag').show(); }); Unless you require css logic specifically this will work for you
score: 0
answers question: http://stackoverflow.com/q/26992011
type: Answer

http://stackoverflow.com/comment/42572511
has text: possible duplicate of [How to update the URL in "then\*" function?](http://stackoverflow.com/questions/26539629/how-to-update-the-url-in-then-function)
score: 0
comment on: http://stackoverflow.com/q/27023916
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27010985
has comment: http://stackoverflow.com/comment/42549543
answers question: http://stackoverflow.com/q/27010892
has comment: http://stackoverflow.com/comment/42549499
type: Answer
has comment: http://stackoverflow.com/comment/42549410
has body: JS $(function () { $('.datetimepicker1').datetimepicker(); }); HTML Note : *I removed collapse.js from external resource in jsfiddle , it was throwing some syntax error, and you were loading jquery library 2.1 at last , I made the correction, assigned id='datetimepicker1' to input box instead of div * View Working JSFiddle
has comment: http://stackoverflow.com/comment/42549265
has comment: http://stackoverflow.com/comment/42549387
has comment: http://stackoverflow.com/comment/42549295
score: 0

http://stackoverflow.com/a/27035028
accepted answer of: http://stackoverflow.com/q/27034928
answers question: http://stackoverflow.com/q/27034928
type: Answer
has comment: http://stackoverflow.com/comment/42627558
has comment: http://stackoverflow.com/comment/42591349
has comment: http://stackoverflow.com/comment/42627520
has body: you should put php code betwee somthing like &lt;?php $this-&gt;tripmodel-&gt;getImageStatusByUidName( "{%=file.name%}","2"); ?&gt; play around with it. i have not tested it
has comment: http://stackoverflow.com/comment/42591171
has comment: http://stackoverflow.com/comment/42597999
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/42616591

http://stackoverflow.com/q/27107262
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/76796244
tagged with: javascript
has answer: http://stackoverflow.com/a/27107424
has body: This is a stripped down version of code that has always run perfectly but not now in Windows 8/IE10. <HTA:APPLICATION ID = "ICP" INNERBORDER = "no" CAPTION = "no" SHOWINTASKBAR = "no" Scroll = "no" navigable = "yes" WINDOWSTATE = "maximize"> OPEN FIRST WINDOW OPEN SECOND WINDOW After running and opening the first window (red.htm), I want 'second window' to open in the same window as 'first window'. It used to work ok but now it opens 'second window' (blue.htm) in a NEW window. Any ideas would be appreciated. Thanks
type: UnansweredQuestion
has title: HTA use existing window
type: Question

http://stackoverflow.com/comment/42605453
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27043157
has text: In general, the answer is no. If the outer scope happens to be the global scope, then you can access the variable as a property of the global object (`window` in a browser).

http://stackoverflow.com/comment/42776799
type: Comment
has text: Sadly, that did not do it. I'm so curious to know why create and delete work, but update does not.
type: AnswerComment
comment on: http://stackoverflow.com/a/27132088
score: 0

http://stackoverflow.com/q/27051131
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27052544
has title: Parse Resize Image not Saving Properly
tagged with: parse-platform
has body: I am trying to resize an image in Parse Cloud Code following the Cloud Modules Guide. The basic idea is as follows: when afterSave is called on a User, check if the small profile pic is null and standard profile pic is not null. If true, get the standard profile pic from Parse, read into buffer, create file, save file, then add file to User and Save. Unfortunately, the file doesn't seem to be saving properly. Here is the cloud afterSave function: Parse.Cloud.afterSave(Parse.User, function(request) { ... Parse.Cloud.httpRequest({ url: request.object.get("profilePicture").url(), success: function(response) { // The file contents are in response.buffer. var image = new Image(); console.log("Buffer: " + response.buffer ); console.log("Length " + response.buffer.length); image.setData(response.buffer); var imgData = image.data(); // Save the image into a new file. var base64 = imgData.toString("base64"); var scaled = new Parse.File("thumbnail.png", { base64: base64 }); scaled.save().then(function() { request.object.set("profilePictureSmall", scaled); request.object.save(); }, function(error) { console.log( "The file either could not be read, or could not be saved to Parse."); }); } }); ... }); The User object seems to save fine, but the image file that is saved is a broken image. The strange thing is that console.log("Length " + response.buffer.length); outputs the proper size to the console. console.log("Buffer: " + response.buffer ); Gives output: �PNG Any idea what's going on here?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27052544
type: Question
tagged with: javascript
tagged with: parse-cloud-code

http://stackoverflow.com/a/27113760
accepted answer of: http://stackoverflow.com/q/27113679
answers question: http://stackoverflow.com/q/27113679
has comment: http://stackoverflow.com/comment/42730458
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: It'll be fairly dense and "obscured" code, but you can inline assignments in conditionals: if ( !this.isContactPage = ( window.location.pathname == '/contact' ) ) return false; This will only return the function if this.isContactPage is assigned the value false otherwise the function is not returned and continues on execution, as opposed to: return ( this.isContactPage = ( window.location.pathname == '/contact' ) ); Which will return true or false immediately.
upvote count: 2
has comment: http://stackoverflow.com/comment/42731417
score: 2
has comment: http://stackoverflow.com/comment/42731083

http://stackoverflow.com/comment/42550108
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27011723
has text: Why can't you simply use [`.append()`](http://api.jquery.com/append/)?
type: Comment

http://stackoverflow.com/comment/47417665
has text: Did they ever expunge at all?
comment on: http://stackoverflow.com/a/29637348
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42711638
score: 0
has text: I would, but I'm working now, that link is the only help I can provide at this moment, if you havn't fixed it later I can come back and see if I can help more
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27102954

http://stackoverflow.com/a/27214640
has comment: http://stackoverflow.com/comment/42912235
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42912377
accepted answer of: http://stackoverflow.com/q/27145572
answers question: http://stackoverflow.com/q/27145572
has body: I think you just need to simplify your final JavaScript logic. There are references to an element with id = summary which you dont have etc. I think all you want is to have your buttons click on the relevant tab links: tabPanel(title = "Plot", plotOutput('plot1')), tabPanel(title = "Data", dataTableOutput(outputId="table")), tags$script("$('#linkToY').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[1]).click(); })"), tags$script("$('#linkToClusters').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[2]).click(); })"), tags$script("$('#linkToPlot').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[3]).click(); })"), tags$script("$('#linkToData').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[4]).click(); })") Putting it all together: library(shiny) runApp(list( ui = shinyUI(fluidPage( headerPanel('Iris k-means clustering'), mainPanel( tabsetPanel( type = "tabs", tabPanel(title = "Select X", selectInput('xcol', 'X Variable', names(iris)), HTML(" <FORM> ") ), tabPanel(title = "Select Y", selectInput('ycol', 'Y Variable', names(iris), selected=names(iris)[[2]]), HTML(" <FORM> ") ), tabPanel("Select Clusters", numericInput('clusters', 'Cluster count', 3, min = 1, max = 9), HTML(" <FORM> "), HTML(" <FORM> ") ), tabPanel(title = "Plot", plotOutput('plot1')), tabPanel(title = "Data", dataTableOutput(outputId="table")), tags$script("$('#linkToY').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[1]).click(); })"), tags$script("$('#linkToClusters').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[2]).click(); })"), tags$script("$('#linkToPlot').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[3]).click(); })"), tags$script("$('#linkToData').click(function() { tabs = $('.tabbable .nav.nav-tabs li a'); $(tabs[4]).click(); })") ) ) )), server = function(input, output) { selectedData <- reactive({ iris[, c(input$xcol, input$ycol)] }) clusters <- rea…
upvote count: 5
score: 5

http://stackoverflow.com/a/27023481
has body: Try followed; var versions = { ie: 9, opera: 6, firefox: 28, safari: 5 }; if(!versions[browser]) { alert('Unknown browser: '+browser); } else if (browser_version &lt; versions[browser]) { alert('poor browser'); } else { alert('good browser'); }
answers question: http://stackoverflow.com/q/27023166
type: Answer
score: 0

http://stackoverflow.com/comment/42577041
type: QuestionComment
comment on: http://stackoverflow.com/q/27026494
has text: Are they same users - Both Toad and jscript users?? If not, check the permission to SELECT on the tables and GRANT access if needed
score: 0
type: Comment

http://stackoverflow.com/a/27107553
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27107467
has body: Sounds like you need the Redirect-on-POST pattern - basically you need to configure your server app to send a redirect in response to each POST request.

http://stackoverflow.com/a/27020891
type: Answer
has comment: http://stackoverflow.com/comment/42566280
downvote count: 0
score: 1
has body: This should do it. $('ol.questions div').each(function(){ $('label',this).wrap(''); var children = $(this).children(); $(this).replaceWith($(' ').append(children)); }); First Name * Email *
answers question: http://stackoverflow.com/q/27020727
upvote count: 1
has comment: http://stackoverflow.com/comment/42566454

http://stackoverflow.com/comment/42658592
has text: Also, does it even need to counter spin. How about positioning the non spinning item absolute as a sibling inside a shared container?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27073008

http://stackoverflow.com/comment/42706967
comment on: http://stackoverflow.com/a/27101184
type: AnswerComment
score: 0
type: Comment
has text: I understand your reasoning, and have up-voted, but have you run a perf to support your assertion?

acrobat
type: Tag
tags question: http://stackoverflow.com/q/27005849
tags question: http://stackoverflow.com/q/27001505
tags question: http://stackoverflow.com/q/27111128
tag name: acrobat

http://stackoverflow.com/q/27022242
linked to: http://stackoverflow.com/q/19595084
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42568862
accepted answer: http://stackoverflow.com/a/27022881
favorite count: 0
has comment: http://stackoverflow.com/comment/42569132
type: Question
has answer: http://stackoverflow.com/a/27022927
tagged with: http://stackoverflow.com/tag/html
tagged with: events
has comment: http://stackoverflow.com/comment/42569932
has title: Why click event is fired twice?
possible better answer: http://stackoverflow.com/a/27022927
has comment: http://stackoverflow.com/comment/42569455
upvote count: 3
answer count: 2
downvote count: 1
has answer: http://stackoverflow.com/a/27022881
tagged with: addeventlistener
has body: Can someone tell me, why the event is fired twice for the following code: http://jsfiddle.net/m8heyzgz/3/ Please open your console, firefox or chrome have console and watch the result after you click on 'div1', then The event walk through sequence will be: div3 div2 div1 div3 div2 div1 As I know the capturing phase can be from top to bottom, and bubbling phase can be from the target to the parents nodes. My question why, it's fired 2 times in the same order ? HTML: div1 div2 js: var d1 = document.getElementById('div1'); var d2 = document.getElementById('div2'); var d3 = document.getElementById('div3'); var f = function(e) { console.log(e.currentTarget); } d1.addEventListener('click', f); d2.addEventListener('click', f); d3.addEventListener('click', f);
tagged with: javascript

http://stackoverflow.com/q/27113580
has comment: http://stackoverflow.com/comment/42729898
type: AnsweredQuestion
downvote count: 2
has body: At the moment i have two buttons one that changes the text to red (default) and the other when clicked changes it to green. Instead of having two buttons I need one button to say green when the text appears red so when you click on the green button it changes the colour to green and then the same button says red now and when clicked it'll change the text to red THIS IS MY SCRIPT: function change1() { txt = document.getElementById("txt"); txt.style.color = 'green'; } function change2() { txt = document.getElementById("txt"); txt.style.color = 'red'; } And these are my buttons &lt;input type="button" value="Green" onclick="change1()" id="btn"&gt; &lt;input type="button" value="Red" onclick="change2()" id="btn"&gt;
accepted answer: http://stackoverflow.com/a/27113667
type: Question
score: -2
has answer: http://stackoverflow.com/a/27113736
answer count: 2
has title: How to get one button to do two functions
possible better answer: http://stackoverflow.com/a/27113736
linked to: http://stackoverflow.com/q/5882313
upvote count: 0
has comment: http://stackoverflow.com/comment/42729973
tagged with: button
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27113667
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42730026
tagged with: css

http://stackoverflow.com/a/27163720
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27152127
answers question: http://stackoverflow.com/q/27152127
type: Answer
has body: What's the error message do you get? Also, is there a reason why you use JavaScript to post the data? You can post using HttpWebRequest in C#: http://www.stickler.de/information/code-snippets/httpwebrequest-post-data.aspx
upvote count: 1

http://stackoverflow.com/comment/42562362
type: Comment
has text: can you share that code? that is assigning the sum to total label?
type: AnswerComment
comment on: http://stackoverflow.com/a/27018019
score: 0

http://stackoverflow.com/q/27045483
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42644805
tagged with: backfire
has comment: http://stackoverflow.com/comment/42626126
type: Question
tagged with: firebase
has comment: http://stackoverflow.com/comment/42621951
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/42612918
answer count: 1
downvote count: 0
tagged with: backbonefire
has answer: http://stackoverflow.com/a/27068750
accepted answer: http://stackoverflow.com/a/27068750
favorite count: 0
has comment: http://stackoverflow.com/comment/42621527
has body: I'm new to Backbone and Firebase. I'm using Backfire, have a collection: var UsersCollection = Backbone.Firebase.Collection.extend({ model: UserModel, firebase: new Firebase( "https://xxxxxx.firebaseio.com/users" ), }); The model itself is not tied to Firebase (was getting "Invalid Firebase reference created" error): var UserModel = Backbone.Model.extend({ defaults: function() { return { email: "example@example.com" }; } }); In my View, I instantiate the collection, and I get the data okay, and I can add new models to the collection, as follows: this.allUsers = new UsersCollection(); ... this.allUsers.add( userData ); Works great, new user records appear on Firebase. However, let's say I now want to grab a given user's model and update its data: var userRecord = this.allUsers.findWhere( {email: email} ); userRecord.set( {age: age} ); This updates the model locally but the changed model is NOT getting synced to Firebase. I tried userRecord.save(); afterwards but it triggers a "circular reference" error. Per the docs, set() should do it bur clearly something is off :(
has comment: http://stackoverflow.com/comment/42617935
has title: Firebase Backfire: model.set() does not sync to Firebase
score: 2

http://stackoverflow.com/comment/42696631
has text: The `/* */` comments pre-date C and Unix.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27095307

http://stackoverflow.com/comment/42718468
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27100420
score: 0
has text: So then what is your issue exactly? It seems to work as expected. It stops you from selecting anything previous to the current date/time.

http://stackoverflow.com/a/27022969
has comment: http://stackoverflow.com/comment/42569928
answers question: http://stackoverflow.com/q/27022785
score: 0
has body: I believe you would do something like this &lt;td id="t1" onclick="this.innerHTML = "X"&gt; or you could use this.innerText, but that should do it.
type: Answer

http://stackoverflow.com/comment/42644903
comment on: http://stackoverflow.com/q/27065679
type: Comment
type: QuestionComment
has text: There is a typo when you set employee, your ' is in the wrong place. The select has no name attribute either, so using the name selector wouldnt work. `var employee = $("#employee").val()` would work better.
score: 0

http://stackoverflow.com/q/27152299
tagged with: filter
tagged with: datatables
has answer: http://stackoverflow.com/a/32551654
answer count: 1
has title: Datatables advanced filter menu like Excel or Kendo UI Grid?
has comment: http://stackoverflow.com/comment/42807684
has comment: http://stackoverflow.com/comment/42809183
favorite count: 0
tagged with: gridview
score: 9
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42807639
tagged with: excel
has comment: http://stackoverflow.com/comment/42809096
has comment: http://stackoverflow.com/comment/42809519
has comment: http://stackoverflow.com/comment/42810291
type: Question
upvote count: 9
has comment: http://stackoverflow.com/comment/42807201
has body: I'm surprised not to find Excel like filtering in DataTables (since it is such a widely used and advanced plugin). Does this exist, or is there an easy way to implement it? Examples of advanced menu filter (like Excel) below. Thanks! Kendo UI: http://demos.telerik.com/kendo-ui/grid/filter-menu-customization http://dev.sencha.com/deploy/ext-4.0.0/examples/grid-filtering/grid-filter-local.html
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42718657
comment on: http://stackoverflow.com/q/27107782
type: Comment
type: QuestionComment
has text: If you only have one param you could just replace the `q=` or is it possible that you have more than one param?
score: 0

http://stackoverflow.com/comment/42659089
type: AnswerComment
comment on: http://stackoverflow.com/a/27073461
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65404/discussion-between-karina-ayoub-and-praveen-kumar).

http://stackoverflow.com/q/27086863
has title: how to increase box width with animation?
has answer: http://stackoverflow.com/a/27086962
score: 0
answer count: 2
has body: I want to animate a box width from 20px to 80px, but only the right side of the box. so that mean the right side increase the width 60px with animation when i hover on it. what is the jquery code for it ?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27086945
accepted answer: http://stackoverflow.com/a/27086945
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/27086962
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/27041149
has body: I am using javascript together with D3. I am creating a set of nodes and i want to be able to click them and an ID of that node is added into an array so that i can print that array to console to view the selected nodes and do whatever i wish to those selected. (basically select and deselect the node) I have done a click event so the ID of the node goes to the selected array. But i want to check this array before it goes into the list to see if its already there, so no duplicate information. selectedNodesArray=[]; for(var i = 0; i&lt; selectedNodesArray.length; i++) { if(selectedNodesArray[i] === d.coreId) { console.log("that node is already selected"); } else { selectedNodesArray.push(d.coreId); } } console.log(selectedNodesArray); } Above is my for loop, i dont understand why it doesnt work. any ideas ? Answer by T.J.Crowder if (!selectedNodesArray.some(function(entry) { return entry == d.coreId; })) { selectedNodesArray.push(d.coreId); }
answer count: 3
possible better answer: http://stackoverflow.com/a/27041391
accepted answer: http://stackoverflow.com/a/27041201
has answer: http://stackoverflow.com/a/27041345
favorite count: 0
tagged with: d3.js
has answer: http://stackoverflow.com/a/27041201
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27041391
tagged with: nodes
type: Question
tagged with: for-loop
has title: How to check an array to see if a value is in there, javascript
tagged with: arrays
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42598173
score: 0
type: Comment
type: QuestionComment
has text: So, just to clarify: the behaviour of the scrolls all scrolling at the same time is intended and it's just about performance?
comment on: http://stackoverflow.com/q/27039179

http://stackoverflow.com/q/27128299
linked to: http://stackoverflow.com/q/6847697
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/6847697
has title: push JSON Object into Array
has comment: http://stackoverflow.com/comment/42755852
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have a function, which gets a Date and is reading events from a JSON file. When the Date lays inside the time period of the event, it should be added to an array, which should be returned at the end of the function. function getEvents(askDate) { var askDate = new Date(askDate); var result = new Array(); $.getJSON(EVENTS_JSON, function(data) { $.each(data.events, function(key, entry) { if(isInPeriod(askDate.setHours(0,0,0,0), new Date(entry.date[0]).setHours(0,0,0,0), new Date(entry.date[1]).setHours(0,0,0,0))) { result.push(entry); } }); }); if(result.length === 0) { result = false; } return result; } Unfortunately I get the following error: "TypeError: result.push is not a function". The isInPeriod function works fine, previously I have had a console output just before the result.push() which has been the JSON object. JSON looks like: { "events": [ { "id": 1, "name": "Example Event", "date": [ "2014/11/25 07:30:00", "2014/11/25 09:00:00" ], "desc": "Lorem Ipsum sim dolor", "image": "http://upload.wikimedia.org/wikipedia/commons/8/84/Example.svg", "adress": "Example Road 12", "youtube": "https://www.youtube.com/watch?v=_5DqL5-izAY", "tags": [ "Example" ], "categories": [ "main_category", "sub_category", "sub_sub_category" ] } ] }
has answer: http://stackoverflow.com/a/27128414
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27128414
type: AnsweredQuestion

http://stackoverflow.com/q/27071967
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/42656510
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/27072014
has title: Bootstrap modal via ajax and callbacks
has body: I load content for modal by ajax like this: $.ajax({ url: 'p1.html', success: function(data){ $(data).modal(); alert('success') $('#myModal').on('show.bs.modal', function (e) { alert('why not work') set_valign_modal() // IMPORTANT - if You do not want to set content of modal boxes in middle in vertical, just remove this function init }); Quick question, why callback for modal: $('#myModal').on('show.bs.modal', function (e){ doesn't work?
has answer: http://stackoverflow.com/a/27072043
type: Question
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/27083170

http://stackoverflow.com/comment/42546248
comment on: http://stackoverflow.com/a/27009099
has text: The second example includes the loop... First example is another way of doing it. The 0 in the first example is the initial value of the previousValue argument. You have to go through documentation to understand it..
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26999692
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26999464
answers question: http://stackoverflow.com/q/26999464
type: Answer
has comment: http://stackoverflow.com/comment/42530953
has comment: http://stackoverflow.com/comment/44614032
upvote count: 3
has body: You can usually force the browser to load a fresh copy of a URL by making it "new" using something like a new parameter value in the URL. Example: &lt;script type="text/javascript"&gt; var script = document.createElement("script"); script.setAttribute("type", "text/javascript"); script.setAttribute("src", "yourfile.js?random=" + new Date()); document.getElementsByTagName("head")[0].appendChild(script); &lt;/script&gt; This will load a new instance of the file "yourfile.js" everytime because we append the date and time of "now", which will always be new. (this post was written as an answer because I cannot write comments at the moment)
has comment: http://stackoverflow.com/comment/42529987
has comment: http://stackoverflow.com/comment/42531117

http://stackoverflow.com/a/27019515
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27018638
has body: Your javascript is a bit messy. Currently you have this: if(canClick) { canClick = false; { $(".btnNext").css('color','red'); } canClick = true; } Which doesn't make sense. And there is no else block to undo the color: if(canClick) { canClick = false; $(".btnNext").css('color','red'); } else { canClick = true; $(".btnNext").css('color',''); }
has comment: http://stackoverflow.com/comment/42563898

http://stackoverflow.com/a/27026554
has body: use the jquery change event and check if its checked or not $(filter_poweron).change(function() { if(this.checked) { //Do stuff } });
score: 0
answers question: http://stackoverflow.com/q/27026506
type: Answer

http://stackoverflow.com/a/27059125
upvote count: 4
downvote count: 0
type: Answer
has body: In case you haven’t read the whole series, or don’t know the secret sauce, Stripe.js sends the payment information directly to Stripe and gets an associated, unique token in return. That token then gets submitted to your server and is used to actually charge the customer. if you are wondering how a charge attempt could still fail, then truth be told, you should know that the Stripe.js process really does only two things: 1)Gets the payment information to Stripe in a secure way (limiting your liability) 2)Verifies that the payment information looks usable **Handling a declined card is a bit more complicated, because you need to find out why the card was declined and provide that information to the customer so he or she can correct the problem. The goal is to get the specific reason for the decline from the exception. This is a multistep process: 1)Get the total response, in JSON format, from the exception 2)Get the error body from the response 3)Get the specific message from the error body** require_once('path/to/lib/Stripe.php'); try { Stripe::setApiKey(STRIPE_PRIVATE_KEY); $charge = Stripe_Charge::create(array( 'amount' =&gt; $amount, // Amount in cents! 'currency' =&gt; 'usd', 'card' =&gt; $token, 'description' =&gt; $email )); } catch (Stripe_CardError $e) { } Knowing what kinds of exceptions might occur, you can expand this to watch for the various types, from the most common (Stripe_CardError) to a catch-all (Stripe_Error): require_once('path/to/lib/Stripe.php'); try { Stripe::setApiKey(STRIPE_PRIVATE_KEY); $charge = Stripe_Charge::create(array( 'amount' =&gt; $amount, // Amount in cents! 'currency' =&gt; 'usd', 'card' =&gt; $token, 'description' =&gt; $email )); } catch (Stripe_ApiConnectionError $e) { // Network problem, perhaps try again. } catch (Stripe_InvalidRequestError $e) { // You screwed up in your programming. Shouldn't happen! } catch (Stripe_ApiError $e) { // Stripe's servers are down! } catch (Stripe_CardError $e) { // Card was declined. } Hope th…
has comment: http://stackoverflow.com/comment/42633366
answers question: http://stackoverflow.com/q/27058997
score: 4

http://stackoverflow.com/comment/42742461
has text: you can use named functions, really
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27120705
score: 0

http://stackoverflow.com/comment/42754122
type: Comment
comment on: http://stackoverflow.com/q/27127149
type: QuestionComment
score: 1
has text: @Ruddy yep I agree that.

http://stackoverflow.com/q/26992367
tagged with: javascript
tagged with: jquery
has title: Pass id from anchor tag dynamically from foreach loop to jquery applying for only one row, i am not able to get popup for the other rows
has body: foreach($subspec as $val) { id"> } Not able to pass the id to trigger an event for particular id
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/42515879
possible better answer: http://stackoverflow.com/a/26992693
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26992744
type: Question
has comment: http://stackoverflow.com/comment/42515989
has answer: http://stackoverflow.com/a/26992697
has answer: http://stackoverflow.com/a/26992693
has answer: http://stackoverflow.com/a/26992744

http://stackoverflow.com/q/27008055
answer count: 1
downvote count: 0
favorite count: 0
has body: In this fiddle here, I've tried to disable the default highcharts button while keeping the custom button, but I'm unable to actually do so. To disable the default buttons but keep the custom button, I tried this: exporting: { buttons: { printButton: { enabled: false }, exportButton: { enabled: false }, customButton: { x: -62, onclick: function () { alert('Clicked'); }, symbol: 'circle' } } } All the other SO questions I've seen, like this one, have suggested this method for disabling the default buttons, and I'm not quite sure why this isn't working. Any help?
has title: highcharts: disable default buttons but keep custom button
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/27008175
type: Question
upvote count: 2
tagged with: highcharts
tagged with: javascript
has answer: http://stackoverflow.com/a/27008175

http://stackoverflow.com/comment/42709171
comment on: http://stackoverflow.com/q/27102621
type: Comment
type: QuestionComment
has text: Where are called the code with alert ? Anyway is much better to use a Framework like AngularJs or knockoutJs.
score: 0

http://stackoverflow.com/a/27074222
answers question: http://stackoverflow.com/q/27074158
has comment: http://stackoverflow.com/comment/42660168
has comment: http://stackoverflow.com/comment/42660250
downvote count: 0
has comment: http://stackoverflow.com/comment/42660147
score: 1
has body: Correct. Infinity is not a number.
upvote count: 1
has comment: http://stackoverflow.com/comment/42660110
has comment: http://stackoverflow.com/comment/42660120
type: Answer

http://stackoverflow.com/q/27132821
favorite count: 0
type: UnansweredQuestion
has body: I am having trouble making the non modal alert appear when the button is pressed using java script.. Any help would go a long way! Non-Modal Alert Messages 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 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 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 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
tagged with: http://stackoverflow.com/tag/html
has title: Non Modal Alert Messages in java script, activated by a button
has comment: http://stackoverflow.com/comment/42764533
tagged with: css
has comment: http://stackoverflow.com/comment/42765913
score: 1
upvote count: 1
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/16748813
tagged with: function
answer count: 1
tagged with: button
downvote count: 0
has comment: http://stackoverflow.com/comment/42764542
has answer: http://stackoverflow.com/a/27159748

http://stackoverflow.com/comment/42599189
has text: I guess this is the cleanest way!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27039462
type: Comment

http://stackoverflow.com/comment/42660811
comment on: http://stackoverflow.com/a/26993313
score: 0
has text: Okay so there doesn't seem to be a perfect solution to my problem, but using require calls without a callback, or using r.js could both work.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/42524169
has text: Can you post the complete code? or what you tried?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26996637

http://stackoverflow.com/comment/42538687
score: 0
type: Comment
type: QuestionComment
has text: check network panel and make sure the application.js is loaded. or remove the application.js script tag and put the entire source inline and see if it works.
comment on: http://stackoverflow.com/q/27004254

http://stackoverflow.com/comment/42700285
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27097545
has text: can you add your html file?
score: 0

http://stackoverflow.com/q/27146886
has comment: http://stackoverflow.com/comment/43749100
answer count: 0
tagged with: hybrid-mobile-app
upvote count: 3
has comment: http://stackoverflow.com/comment/51367600
tagged with: ionic-framework
type: Question
has body: I am currently new to ionic framework. I have a list view wherein the user should be able to swipe left - right and right to left. I can swipe the list item from right to left. Is there a way to swipe the list element from left to right? CODE EDIT: I am able to capture the event using on-swipe-right, but the list element animation does not work.
has comment: http://stackoverflow.com/comment/43163398
tagged with: javascript
has comment: http://stackoverflow.com/comment/51419407
has comment: http://stackoverflow.com/comment/43104991
has comment: http://stackoverflow.com/comment/51575908
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
linked to: http://stackoverflow.com/q/31153543
score: 3
has title: Swipe List Left to Right + ionic angular

http://stackoverflow.com/q/27093722
favorite count: 0
has body: I'm dealing with a very annoying issue regarding arcGIS maps service localization. According to their API I've added the following JS object: dojoConfig = { locale: "fr", parseOnLoad: true }; and added the following item to the require array: "dojo/i18n!myApp/nls/jsapi" When I've made this additions the maps aren't working anymore. This is my full code: HTML JS Bin JS dojoConfig = { locale: "fr", parseOnLoad: true }; var map; require([ "esri/map", "dojo/i18n!myApp/nls/jsapi", "dojo/domReady!" ], function(Map) { map = new Map("mapDiv", { center: [56.049, 38.485], zoom: 3, basemap: "streets" }); }); DEMO
tagged with: arcgis
downvote count: 0
type: UnansweredQuestion
tagged with: localization
tagged with: maps
score: 1
type: Question
has title: ArcGIS Localization API
tagged with: frameworks
upvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27114202

http://stackoverflow.com/q/27005687
has comment: http://stackoverflow.com/comment/42540993
possible better answer: http://stackoverflow.com/a/27005931
tagged with: javascript
has answer: http://stackoverflow.com/a/27005931
score: 0
answer count: 3
tagged with: regex
linked to: http://stackoverflow.com/q/3466850
has answer: http://stackoverflow.com/a/27006050
accepted answer: http://stackoverflow.com/a/27006050
has title: Test with Regex if a certain number of conditions are met
type: AnsweredQuestion
has body: I need to figure out if a password meets several conditions, but not all. Has to include 3 out 4 conditions a) A-Z b) a-z c) 0-9 d) !*?$%&amp; So it's correct if the password has a capital letter, a lower letter and a numnber or instead of the number a special char, ... Is this possible without writing several OR conditions (a+b+c OR a+b+d OR a+c+d OR b+c+d) ?
has answer: http://stackoverflow.com/a/27005871
type: Question

http://stackoverflow.com/q/27146789
type: Question
has answer: http://stackoverflow.com/a/27146867
has answer: http://stackoverflow.com/a/27146879
has title: What am I doing wrong with this javascript?
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42789139
score: 0
has answer: http://stackoverflow.com/a/27146975
has answer: http://stackoverflow.com/a/27146863
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42789100
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: I want this simple javascript to display live data from the Cryptsy market. In the fiddle, it works fine, but when I deploy it live, it does not display. I'm new to javascript and coding-beyond-html in general, so I'll greatly appreciate any help! Deployed: http://bytillionaire.com/HTMLCoin.com/index.html Fiddle: http://jsfiddle.net/bitillionaire/5fub4mvf/2/ code here: Follow @htmlcoin

function
tags question: http://stackoverflow.com/q/27140314
tags question: http://stackoverflow.com/q/27027107
tags question: http://stackoverflow.com/q/27126108
tags question: http://stackoverflow.com/q/27133242
tags question: http://stackoverflow.com/q/27096983
tags question: http://stackoverflow.com/q/27147994
tag name: function
tags question: http://stackoverflow.com/q/27139706
tags question: http://stackoverflow.com/q/27046980
tags question: http://stackoverflow.com/q/27030913
tags question: http://stackoverflow.com/q/27099797
tags question: http://stackoverflow.com/q/27152701
tags question: http://stackoverflow.com/q/27012692
tags question: http://stackoverflow.com/q/27108659
tags question: http://stackoverflow.com/q/27058196
tags question: http://stackoverflow.com/q/27132162
tags question: http://stackoverflow.com/q/27032973
tags question: http://stackoverflow.com/q/27132821
tags question: http://stackoverflow.com/q/27085657
tags question: http://stackoverflow.com/q/27012734
tags question: http://stackoverflow.com/q/27080255
tags question: http://stackoverflow.com/q/27123110
tags question: http://stackoverflow.com/q/27047112
tags question: http://stackoverflow.com/q/27113152
tags question: http://stackoverflow.com/q/27132578
tags question: http://stackoverflow.com/q/27093759
tags question: http://stackoverflow.com/q/27086950
tags question: http://stackoverflow.com/q/27048209
tags question: http://stackoverflow.com/q/27107572
type: Tag
tags question: http://stackoverflow.com/q/27130750
tags question: http://stackoverflow.com/q/27133375
tags question: http://stackoverflow.com/q/27111895
tags question: http://stackoverflow.com/q/27107432
tags question: http://stackoverflow.com/q/27137869
tags question: http://stackoverflow.com/q/27049313
tags question: http://stackoverflow.com/q/27040401
tags question: http://stackoverflow.com/q/27060411
tags question: http://stackoverflow.com/q/27088114
tags question: http://stackoverflow.com/q/27026684
tags question: http://stackoverflow.com/q/27069267
tags question: http://stackoverflow.com/q/27057567
tags question: http://stackoverflow.com/q/27080946
tags question: http://stackoverflow.com/q/27004171

http://stackoverflow.com/comment/42666488
has text: Infinite loop? Are you try it?
type: AnswerComment
comment on: http://stackoverflow.com/a/27072672
score: 0
type: Comment

http://stackoverflow.com/a/27029556
answers question: http://stackoverflow.com/q/27029373
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: My guess would be that you are inserting outputtext[2] into the page via the .textContent property of an element. This will insert the string as is into the element without parsing &amp; rendering it as HTML. For situations like this, there is an innerHTML property. Once this property is modified, it's value is rendered as HTML and any tags found within the value will be displayed as expected. element.textContent = outputtext[2]; // bad element.innerHTML = outputtext[2]; // good, will display 3 as superscript If you're using jQuery, use .html() instead of .text() $(ele).html(outputtext[2]);
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27029373
score: 3

http://stackoverflow.com/comment/42654066
type: QuestionComment
comment on: http://stackoverflow.com/q/27070717
has text: If you're going to downvote please provide ways to make the question more clear. I can't fix stuff with nothing but a downvote!
score: 0
type: Comment

http://stackoverflow.com/comment/42760129
type: QuestionComment
has text: You can't properly validate e-mails with regex unless you constantly update your regex to match all the new gTLDs that are coming.
comment on: http://stackoverflow.com/q/27130312
score: 0
type: Comment

http://stackoverflow.com/q/26998069
linked to: http://stackoverflow.com/q/430237
has title: OnClick Function which opens my dropdown box
has comment: http://stackoverflow.com/comment/42527336
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26999194
tagged with: jquery
has comment: http://stackoverflow.com/comment/42526837
type: UnansweredQuestion
tagged with: css
has body: I have a select and a label. Now on click of the label I want the select box to open. What is the best way to do this? Does anyone know how I can, when the label is clicked, open the select? I would prefer a javascript option as it means it will be called everytime, as I am having a Internet explorer issue.
has comment: http://stackoverflow.com/comment/42526825
linked to: http://stackoverflow.com/q/249192
type: Question
has comment: http://stackoverflow.com/comment/42526714

android-actionbar
type: Tag
tags question: http://stackoverflow.com/q/27073814
tag name: android-actionbar

http://stackoverflow.com/comment/42643658
has text: Oke the problem is solved thanks to @vidriduch, in the backend, where I obviously have the message as a string, I did not escape the quotes with a slash, but I used the @ symbol, which works in C#, but apparently not for this usage in the frontend. If you make it an answer I can set it to Answered :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27064371
score: 1

http://stackoverflow.com/comment/42626512
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27053925
type: Comment
has text: The thing is, when I click on cancel in the prompt box, the element it creates is null. Also, if it is empty, the element only has an X. How to fix that?

http://stackoverflow.com/comment/42674107
score: 0
comment on: http://stackoverflow.com/a/27071254
has text: @Sebastiano Excellent :) Don't forget to mark my answer as accepted. You should take a look at the [documentation for highcharts](http://api.highcharts.com/highcharts#yAxis). That link points specifically to the yAxis documentation. You'll see an entry for date formatting options (`dateTimeLabelFormats: Object`) with a jsfiddle example. In future, you should search the documentation thoroughly. I resolved all the above issues by taking a look at the example code given by the highcharts documentation.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42704518
type: AnswerComment
comment on: http://stackoverflow.com/a/27099965
score: 0
type: Comment
has text: Can you elaborate a little. I didnt understand

http://stackoverflow.com/q/26999371
possible better answer: http://stackoverflow.com/a/27000325
has answer: http://stackoverflow.com/a/27000325
has answer: http://stackoverflow.com/a/27000139
type: AnsweredQuestion
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/27000139
has body: I need to encode an image from a url as base64. I originally tried using a canvas: function convertImgToBase64(url, callback, outputFormat) { console.log('converting image to base 64'); var canvas = document.createElement('CANVAS'); var ctx = canvas.getContext('2d'); var img = new Image; img.crossOrigin = 'Anonymous'; console.log('have image context'); img.onload = function() { var dataURL = canvas.toDataURL(outputFormat || 'image/png'); console.log('data url: ' + dataURL); callback.call(this, dataURL); // Clean up canvas = null; }; img.src = url; } But img.onload never gets called. This didn't surprise me because I'm working solely in javascript without an HTML page. I essentially need to replicate the functionality from this site: http://www.freeformatter.com/base64-encoder.html I've tried reverse engineering the site, but I haven't been able to figure out how they're encoding my input URL as base64. Any suggestions?
score: 0
has title: Encode an image from a URL to Base64 without a canvas
answer count: 2

mapbox
tags question: http://stackoverflow.com/q/27029851
tags question: http://stackoverflow.com/q/27030376
tags question: http://stackoverflow.com/q/27040589
tags question: http://stackoverflow.com/q/27006749
type: Tag
tags question: http://stackoverflow.com/q/27144334
tag name: mapbox
tags question: http://stackoverflow.com/q/27025370

http://stackoverflow.com/comment/42652331
score: 0
type: AnswerComment
type: Comment
has text: OH MY GOD! haha, i can tell iv'e had a long week at work. what a stupid stupid mistake aha.
comment on: http://stackoverflow.com/a/27069764

http://stackoverflow.com/a/27071129
answers question: http://stackoverflow.com/q/27071042
type: Answer
has body: Use Array.prototype.push() method to add a new value at the end of the array. It will also return the new length. cars.push(myvalues, "myvaluesv", "Toyota") for your example. You can push any datatype into an array.
score: 0

http://stackoverflow.com/comment/42709235
score: 0
type: Comment
type: QuestionComment
has text: At the end of the function !!! You , the man !! Thanks
comment on: http://stackoverflow.com/q/27102591

http://stackoverflow.com/comment/42611135
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27046271
type: Comment
has text: Thanks so much for this solution. I can confirm that it works!

http://stackoverflow.com/comment/42692309
comment on: http://stackoverflow.com/a/27082602
score: 0
type: AnswerComment
has text: Aware of this, but this seems more cluttered.I'm looking for more of a cluster layout, than force layout. Is it possible to accommodate in the same? NOTE: Updated with image.
type: Comment

http://stackoverflow.com/comment/42639907
has text: Great answer! The performance difference between the four implementations was minimal, indeed.
type: AnswerComment
comment on: http://stackoverflow.com/a/27062374
type: Comment
score: 0

http://stackoverflow.com/q/27110877
type: Question
upvote count: 4
answer count: 1
downvote count: 0
tagged with: javascript
has body: Let there be a piped variable in qualtrics (a variable holding values recalled from a previous input by a survey respondent), how do I transform it to lower-case before displaying it? There is the java-script function .toLowerCase(); but how do I change a variable in the qualtrics custom javascript and pipe it back into a survey text? This link explains how to use piped variables in javascript. Say I define a new variable in javascript like this // my piped variable is ${q://QID12/ChoiceGroup/SelectedAnswers}" var selectedChoice = "${q://QID12/ChoiceGroup/SelectedAnswers}"; var selectedChoiceLower = selectedChoice.toLowerCase(); How to pipe selectedChoiceLower back into a question text? Any ideas?
favorite count: 0
accepted answer: http://stackoverflow.com/a/27258183
tagged with: qualtrics
type: AnsweredQuestion
has title: Qualtrics: Transform piped variable using javascript and display it in text?
linked to: http://stackoverflow.com/q/27256458
has answer: http://stackoverflow.com/a/27258183
score: 4

d3.js
tags question: http://stackoverflow.com/q/27142389
tags question: http://stackoverflow.com/q/27130835
tags question: http://stackoverflow.com/q/27034771
tags question: http://stackoverflow.com/q/27026625
tags question: http://stackoverflow.com/q/27042222
tags question: http://stackoverflow.com/q/27108348
tags question: http://stackoverflow.com/q/27053431
tags question: http://stackoverflow.com/q/27051531
tags question: http://stackoverflow.com/q/27071133
tags question: http://stackoverflow.com/q/27049673
tags question: http://stackoverflow.com/q/27053892
tags question: http://stackoverflow.com/q/27116622
tags question: http://stackoverflow.com/q/27107528
tags question: http://stackoverflow.com/q/27065609
tags question: http://stackoverflow.com/q/27063814
tags question: http://stackoverflow.com/q/27070616
tags question: http://stackoverflow.com/q/27125802
tags question: http://stackoverflow.com/q/27068605
tags question: http://stackoverflow.com/q/27012389
tags question: http://stackoverflow.com/q/27089788
tags question: http://stackoverflow.com/q/27114495
tags question: http://stackoverflow.com/q/27136198
tags question: http://stackoverflow.com/q/27031323
tags question: http://stackoverflow.com/q/27065281
tags question: http://stackoverflow.com/q/27096252
tags question: http://stackoverflow.com/q/27147759
tags question: http://stackoverflow.com/q/27047124
tags question: http://stackoverflow.com/q/27052748
tags question: http://stackoverflow.com/q/27097253
tags question: http://stackoverflow.com/q/27037378
tags question: http://stackoverflow.com/q/27026188
tags question: http://stackoverflow.com/q/27102994
tags question: http://stackoverflow.com/q/27072703
tags question: http://stackoverflow.com/q/27088631
tags question: http://stackoverflow.com/q/27097757
tags question: http://stackoverflow.com/q/27066794
tags question: http://stackoverflow.com/q/27031428
tags question: http://stackoverflow.com/q/27067648
tags question: http://stackoverflow.com/q/27128914
tags question: http://stackoverflow.com/q/27029059
tags question: http://stackoverflow.com/q/27044933
type: Tag
tags question: http://stackoverflow.com/q/27090712
tags question: http://stackoverflow.com/q/27002554
tags question: http://stackoverflow.com/q/27117902
tags question: http://stackoverflow.com/q/27031683
tags question: http://stackoverflow.com/q/27011645
tags question: http://stackoverflow.com/q/27117022
tags question: http://stackoverflow.com/q/27104533
tags question: http://stackoverflow.com/q/27083982
tags question: http://stackoverflow.com/q/27014772
tags question: http://stackoverflow.com/q/27083507
tags question: http://stackoverflow.com/q/27037423
tags question: http://stackoverflow.com/q/27148032
tags question: http://stackoverflow.com/q/27067550
tags question: http://stackoverflow.com/q/27107333
tags question: http://stackoverflow.com/q/27007934
tags question: http://stackoverflow.com/q/27081990
tags question: http://stackoverflow.com/q/27078188
tags question: http://stackoverflow.com/q/27139064
tags question: http://stackoverflow.com/q/27109335
tags question: http://stackoverflow.com/q/27057952
tags question: http://stackoverflow.com/q/27004449
tags question: http://stackoverflow.com/q/27086396
tags question: http://stackoverflow.com/q/27143363
tags question: http://stackoverflow.com/q/27008958
tags question: http://stackoverflow.com/q/27102005
tags question: http://stackoverflow.com/q/27053143
tags question: http://stackoverflow.com/q/27093932
tags question: http://stackoverflow.com/q/26994404
tags question: http://stackoverflow.com/q/27004929
tags question: http://stackoverflow.com/q/27013192
tags question: http://stackoverflow.com/q/27127798
tags question: http://stackoverflow.com/q/27103265
tags question: http://stackoverflow.com/q/27087540
tags question: http://stackoverflow.com/q/27136685
tags question: http://stackoverflow.com/q/27041149
tags question: http://stackoverflow.com/q/27101089
tags question: http://stackoverflow.com/q/27084532
tags question: http://stackoverflow.com/q/27121764

http://stackoverflow.com/q/27091479
has body: I use the popads popunder in my site but i've one issues with it. That is happening on mobile devices, The pop is opening in a browser all the time and the user can't acess the other pages. So I think that it can be solved if I hidden the code on mobile devices, making it appear only in desktop. Can someone help me? Thanks a lot, follow the code above: PopAds.net Popunder Code &lt;script type="text/javascript"&gt; var _pop = _pop || []; _pop.push(['siteId', ###]); _pop.push(['minBid', 0]); _pop.push(['popundersPerIP', 0]); _pop.push(['delayBetween', 0]); _pop.push(['default', false]); _pop.push(['defaultPerDay', 0]); _pop.push(['topmostLayer', false]); (function() { var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true; var s = document.getElementsByTagName('script')[0]; pa.src = '//c1.popads.net/pop.js'; pa.onerror = function() { var sa = document.createElement('script'); sa.type = 'text/javascript'; sa.async = true; sa.src = '//c2.popads.net/pop.js'; s.parentNode.insertBefore(sa, s); }; s.parentNode.insertBefore(pa, s); })(); &lt;/script&gt;
type: Question
score: 0
tagged with: mobile
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/32381890
has title: Show the popads code only in mobile devices, how I do?
tagged with: popup
type: UnansweredQuestion

http://stackoverflow.com/q/27013665
has answer: http://stackoverflow.com/a/27013760
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42566533
type: Question
has comment: http://stackoverflow.com/comment/42553463
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42553650
answer count: 2
has title: a javascript function called without arguments
upvote count: 1
has comment: http://stackoverflow.com/comment/42553464
has comment: http://stackoverflow.com/comment/42568128
has answer: http://stackoverflow.com/a/27013822
has body: I am trying to understand a JavaScript code. Banana.reloadUser is being called inside a function without any arguments: function(data) { if (!data.result.success) { alert(data.result.message) } else { /*do something*/ Banana.testData = data; Banana.reloadUser(); } } Banana.reloadUser defined like this: Banana.extend({ reloadUser: function(cb, data) { var that = this, done = function(d) { $.extend(that.user, d); if ($.isFunction(cb)) { cb(d) } that.trigger("user.reloaded", [d]) }; if (data) { done.apply(banana, [data]) } else { /*do something*/ } } }) 'reloaduser' is being called to save the userinfo data in the localstorage. So whenever user do something new from its account 'reloaduser' saves the new information into the localstorage. My question is since Banana.reloadUser is being called without arguments how is it supposed to pick its arguments ? Note: This is a part of a big JavaScript/jquery code so in case this information is not enough please ignore the question. The big Javascript code does contain another function Banana.reloadUser(function() { try { Banana.trigger('start', [$]); }catch(e) { } try { $('[data-deferred]').deferredImage();; }catch(e) { } }); started = true; };
has comment: http://stackoverflow.com/comment/42566181

http://stackoverflow.com/comment/42582960
score: 0
type: Comment
type: QuestionComment
has text: jquery 2.1.0 selected on the fiddle
comment on: http://stackoverflow.com/q/27030308

http://stackoverflow.com/q/27116138
answer count: 1
tagged with: javascript
has title: Checking if the attempt was successful during a Dictionary Attack
has body: I am doing a project where in I have to carry out a Dictionary Attack. I am running a script that posts to the page that the login page would post to(say members.php). Only thing that happens in the server side after a correct username and passwords is entered is that a cookies are set. The Cookies have the values of username and password's sha value. (Yes, I have the access to the source code). I have hard coded a script in members.php such that would retrieve the value of cookies every time some one logs in and stores it in a text file in my server. Hence I would be able to keep track of who ever has successfully logged in . I am trying the following script to post to members.php to try and see if the logic works: function dictionary_run(username,password) { var theForm, newInput7, newInput8, newInput9; var i=0,j=0; var bla3 = "Login"; theForm = document.createElement("form"); theForm.action = "URL/members.php"; theForm.method = "post"; newInput9 = document.createElement("input"); newInput9.type = "text"; newInput9.name = "username"; newInput9.value = username; newInput8 = document.createElement("input"); newInput8.type = "password"; newInput8.name = "password"; newInput8.value = password; newInput7 = document.createElement("input"); newInput7.type = "submit"; newInput7.name = "submit"; newInput7.value = bla3; theForm.appendChild(newInput9); theForm.appendChild(newInput8); theForm.appendChild(newInput7); newInput7.click(); } function main() { var user_name = ["jasmine", "fd", "jasmhghine","dfdf"]; var pass_word = ["jasmine", "jasminhge", "dffd","dfdfdf"]; var i,j; for(i=0; i&lt;4 ;i++) { for(j=0; j&lt;4;j++) { dictionary_run(user_name[i],pass_word[j]); } } } main(); Apparently it doesn't work. I know that jasmine as password and username is correct(user_name[0] and pass_word[0] here). Even then,my script hard coded in members.php doesn't capture the successful login attempt. I have also tried to break it with if(document.cookie) break; after each submission. This …
tagged with: dictionary-attack
type: UnansweredQuestion
type: Question
tagged with: cookies
tagged with: forms
score: 0
tagged with: http-post
has answer: http://stackoverflow.com/a/27119399

http://stackoverflow.com/q/27005706
has comment: http://stackoverflow.com/comment/42542210
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42555054
has title: Fit bounds in google map on resize
score: 0
has answer: http://stackoverflow.com/a/27023872
has body: I'm trying to bind the map.fitBounds(bounds) method to a window resize event, unfortunately without success. Maybe you have an idea? &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp"&gt;&lt;/script&gt; &lt;script src="http://www.mysite.url/label.js"&gt;&lt;/script&gt; &lt;script&gt; var bounds = new google.maps.LatLngBounds(null); function initialize() { var mapOptions = { panControl: true, scaleControl: false, overviewMapControl: false, zoomControl: true, mapTypeControl: false, streetViewControl: false, mapTypeId: google.maps.MapTypeId.HYBRID, center: { lat: 0.0, lng: 40.0}, zoom: 2 }; var destinations = [ {lat:13.7246005, lng:100.6331108, myTitle:'Bangkok'}, {lat:8.722049, lng:98.23421, myTitle:'Khao Lak'}, {lat:1.3146631, lng:103.8454093, myTitle:'Singapore'}, {lat:-36.8630231, lng:174.8654693, myTitle:'Auckland'}, {lat:34.0204989, lng:-118.4117325, myTitle:'Los Angeles'}, {lat:25.782324, lng:-80.2310801, myTitle:'Miami'} ]; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); var image = { url: 'plane-icon-medium.png', size: new google.maps.Size(24, 24), origin: new google.maps.Point(0,0), anchor: new google.maps.Point(12, 12) }; var flightPath = new google.maps.Polyline({ path: destinations, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); flightPath.setMap(map); for (var i = 0; i &lt; destinations.length; i++) { var myTitle = destinations[i].myTitle; var myLatLng = new google.maps.LatLng(destinations[i].lat, destinations[i].lng); var marker = new google.maps.Marker({ position: myLatLng, map: map, icon: image, title: 'test', text: myTitle, }); var label = new Label({ map: map }); label.bindTo('position', marker, 'position'); label.bindTo('text', marker, 'text'); bounds.extend(marker.position); } map.fitBounds(bounds); } google.maps.event.addDomListener(window, 'load', initialize); google.maps.event.addDomListener(window, "resize", function() { var center = map.getCenter(); var bounds = m…
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42540689
tagged with: google-maps
answer count: 1
has comment: http://stackoverflow.com/comment/42540662
has comment: http://stackoverflow.com/comment/42552130

http://stackoverflow.com/comment/42691538
score: 1
comment on: http://stackoverflow.com/q/27092299
has text: You don't have any event to support the click of this tag, are you trying to trigger it by those events in rendered function? Rendered only works when those items you are trying to assign are visible in the moment of rendering. Because of {{#if}} in html those elements aren't visible then
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42557307
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27013478
score: 0
has text: Thanks all for the responses so far. This is very difficult to describe without posting the code itself and I cannot disclose the source code for this project I'm afraid. I appreciate it is confusing from the snippets I've given so far. I simply want to know if input elements A and B can **BOTH** trigger JQuery behaviour for element C and if so what's the high-level method of doing this. Thanks.

http://stackoverflow.com/comment/42779726
has text: does this mean I can't escape the \t and \n, ever?
type: Comment
comment on: http://stackoverflow.com/a/27141148
score: 0
type: AnswerComment

http://stackoverflow.com/q/27010306
has title: javascript indexOf - exact match in a list / array
accepted answer: http://stackoverflow.com/a/27010373
has comment: http://stackoverflow.com/comment/42547863
tagged with: javascript
has comment: http://stackoverflow.com/comment/42548044
answer count: 4
type: AnsweredQuestion
tagged with: arrays
tagged with: jquery
has answer: http://stackoverflow.com/a/27010333
favorite count: 0
type: Question
score: 5
has body: I decided to use javascript indexOf to determine if a value exists in a list / array. This was working for me untill I realised that I need to find an exact match in the list. Here is my example code: if (['eu', 'fr-CA', 'lt', 'sv', 'zh-CN', 'zh-TW'].indexOf('fr') &gt; -1) { The above code will 'match' fr to fr-CA, which is a problem for me, as I must have an exact match to fr and not match to fr-CA. I thought that this would be straight forward, but I have searched SO and google, and cannot find an answer to getting the exact match.
possible better answer: http://stackoverflow.com/a/27010333
has answer: http://stackoverflow.com/a/27010438
downvote count: 6
upvote count: 11
has comment: http://stackoverflow.com/comment/42547845
has answer: http://stackoverflow.com/a/27010450
tagged with: list
has answer: http://stackoverflow.com/a/27010373
has comment: http://stackoverflow.com/comment/42547974

http://stackoverflow.com/q/27085221
favorite count: 0
tagged with: ajax
type: Question
has title: Ajax and JS on select_taf; SyntaxError: missing } after property list
upvote count: 1
has answer: http://stackoverflow.com/a/27085243
tagged with: ruby-on-rails
answer count: 1
has comment: http://stackoverflow.com/comment/42684152
tagged with: javascript
has comment: http://stackoverflow.com/comment/42679275
type: AnsweredQuestion
has body: what is wrong with my Js and AJAX code? I am using ajax and JS on select_tag and I am getting errors with ajax; - @departments = @collocation_request.collocation_request_departments td Reviewer - @departments.each do |department| td div.input-append = select_tag :reviewer_id, options_from_collection_for_select(User.where(department_id: department.department_id), "id","full_name"), prompt: 'Select a Reviewer', remote: true javascript: $(function(){ $(document).on('change','#reviewer_id',function(e) { alert($(this).val()); var collocation_request_id = $(this).data('collocation-request-id'); var departments_id = $(this).data('department-id'); jQuery.ajax({ type: "PUT", dataType: 'JSON', data: {collocation_request_department: {reviewer: $(this).val()}, url: '/collocation_requests/'+collocation_request_id+'/departments/'+departments_id+'.js' }).complete(function(data, textStatus, jqXHR) { window.location = window.location; }); }); });
accepted answer: http://stackoverflow.com/a/27085243
downvote count: 0
score: 1
tagged with: jquery

http://stackoverflow.com/a/26997509
score: 3
has body: /* Get DOM elements */ var navElement = $('.tabs-btn li a'); var contentElement = $('.tabs-content-container .tab-content'); /* Notify about a click event */ navElement.click(function(e) { /* stop browser from following clicked link */ e.preventDefault(); /* get content div id */ var href = $(this).attr('href'); /* turn off all nav links and turn on the clicked one */ navElement.parent().removeClass('active'); $(this).parent().addClass('active'); /* turn off all content and turn on the clicked on */ contentElement.attr('data-tab-active', 'false'); $(href).attr('data-tab-active', 'true'); }); Demo: http://jsfiddle.net/cout1ofr/5/ You can use jQuery on method if you are going to use ajax on your web page and switch content dynamically.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42528922
has comment: http://stackoverflow.com/comment/42527997
type: Answer
answers question: http://stackoverflow.com/q/26997246
upvote count: 3
accepted answer of: http://stackoverflow.com/q/26997246

http://stackoverflow.com/q/27108517
tagged with: callback
has title: Documenting an array of objects as a parameter of callback function in JSDoc
has body: callback.rows is array of arbitrary length with a number of repeating fields. How can I document each field (type, property, description) in JSDoc? Is there possible to apply this method? Or may be this solution can be accepted: /** * Get list of all documents * @param {Function} callback Standard callback function * @param {Error} callback.err Error object if any * @param {Array} callback.rows Rows list * @param {String} callback.rows[0].field1 field1 */ var myFunc = function (callback) { // Function body }
has comment: http://stackoverflow.com/comment/42720245
possible better answer: http://stackoverflow.com/a/28361225
score: 0
tagged with: jsdoc
has answer: http://stackoverflow.com/a/27111444
has answer: http://stackoverflow.com/a/28361225
linked to: http://stackoverflow.com/q/17163897
type: AnsweredQuestion
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27111444
tagged with: javascript

http://stackoverflow.com/q/27065170
has comment: http://stackoverflow.com/comment/42644035
has answer: http://stackoverflow.com/a/27065326
favorite count: 0
has comment: http://stackoverflow.com/comment/42644432
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Link XML file to HTML document just like CSS or JS?
has comment: http://stackoverflow.com/comment/42644246
has comment: http://stackoverflow.com/comment/42644416
has answer: http://stackoverflow.com/a/27065321
score: 1
upvote count: 1
has body: I am writing a local HTML file that needs to access an XML file that sits right next to the HTML. I can't figure out a simple way to load the contents of the XML file? This has to work on a local system without a server/localhost. JQuery / Ajax is not working without a server/localhost, so I figured why not load the XML the same as JS or CSS files? Is this possible? Local html file
type: Question
linked to: http://stackoverflow.com/q/24603580
tagged with: javascript
has comment: http://stackoverflow.com/comment/42645206
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/42862331
comment on: http://stackoverflow.com/q/27149676
type: Comment
has text: Using that updated code as a starting point, change `$('#dataTables-ss').on('click', 'tr', function () {` to `$('#.select_users').on('change',function(){`
score: 0
type: QuestionComment

http://stackoverflow.com/a/27015774
has body: The following JavaScript should meet your needs: var ci_sites = ['111', '222', '333', '444']; function dobuild() { // grab the user input from the text area (unique) var input = $('#builder').val() .split(/\r\n|\s+\n|\s+\r|\n+|\r+/g) .filter(function (value, index, self) { return (self.indexOf(value) === index); }); // diff between user and PHP content var diff = input.filter(function (item) { return (ci_sites.indexOf(item) &lt; 0); }); // chunk up the array (using chunks of 2 as an example) var chunked = chunk(diff, 2); // join them back var output = chunked.map(function (item) { return item.join(','); }).join(';'); } // http://stackoverflow.com/a/22649021/283078 function chunk(arr, n) { return arr.slice(0, (arr.length + n - 1) / n | 0).map(function (c, i) { return arr.slice(n * i, n * i + n); }); } JSFiddle example
score: 0
answers question: http://stackoverflow.com/q/27014418
type: Answer

http://stackoverflow.com/q/27134675
downvote count: 1
tagged with: backend
type: Question
type: AnsweredQuestion
has title: Front-End and Back-End Selection
tagged with: database
has answer: http://stackoverflow.com/a/27134841
answer count: 2
has answer: http://stackoverflow.com/a/27134808
upvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27134841
favorite count: 0
possible better answer: http://stackoverflow.com/a/27134808
has body: Pardon the vague question but I am having a difficult time deciding on the approach to a project based on self-interest. I have a significant amount of Java and C background knowledge, however I am interested in beginning a web-development portfolio. Here is an idea of the project I am proposing: I want to create a website that will have the capability to be used as a database for employees, where employees can be added and deleted. Then using the employee objects, a person (namely the secretary) could directly schedule a pickup or dropoff to a car service for that specific employee. For example: Employee A needs to be driven to Airport A on XX/XX/XXXX at YY:YY and picked up from Airport B on XX/XX/XXXX at YY:YY. This will then send the request to a car service company and schedule the pickup or dropoff. My question is what database should I use to hold sensitive information which can be processed at fairly quick times. I'm assuming I would use something along the lines of HTML5/CSS/JS to create a front-end however I am unsure of what back-end to use. I reviewed the pros and cons of back-ends like Ruby on Rails and Django, however I am not sure which framework I should begin using.
has comment: http://stackoverflow.com/comment/42768850
score: -1
tagged with: django
tagged with: ruby-on-rails

http://stackoverflow.com/comment/42539674
type: Comment
has text: @SeongLee: Well, the first one compares it with the `undefined` value, while the second checks whether its (assuming it to be an object) `.length` is truthy.
comment on: http://stackoverflow.com/q/27005124
score: 1
type: QuestionComment

http://stackoverflow.com/q/27071111
has answer: http://stackoverflow.com/a/27076885
accepted answer: http://stackoverflow.com/a/27076885
tagged with: dojo
type: AnsweredQuestion
tagged with: widget
has title: "id is already registered" error on widget with no id
type: Question
has body: I'm new to dojo and dijit and have been having trouble for about a week now creating widgets that contain other widgets. I've looked at many other articles about this error but haven't had any luck implementing the solutions listed in them. In short, I'm using dojo 1.10 and I have a templated widget containing a non-templated widget. When I load my page, I get the error Error: Tried to register widget with id==mtt_SearchPane2_0_searchPane but that id is already registered. I haven't given anything an explicit id, and I'm not calling parse anywhere, so I'm kind of stumped. Here's my html: I've got a SearchPane widget, like so: define ( [ "dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixIn", "dijit/_WidgetsInTemplateMixin", "dojo/text!mtt/templates/SearchPane2.html", "mtt/ImageCheckBox", "dojo/domReady!" ], function ( declare, _WidgetBase, _TemplatedMixIn, _WidgetsInTemplateMixIn, template, ImageCheckBox ) { return declare ( "mtt.SearchPane2", [ _WidgetBase, _TemplatedMixIn, _WidgetsInTemplateMixIn ], { templateString: template, } ); }); With an associated template : moo And that in turn contains an ImageCheckBox: require([ "dojo/_base/declare", "dijit/_WidgetBase" ], function(declare, _WidgetBase ) { return declare("mtt/ImageCheckBox", [_WidgetBase ], { }); }); .. which has no template. Oddly, if I have ImageCheckBox inherit from _TemplatedMixin instead of _WidgetBase, it's fine. Thanks in advance to anybody who can shed light on this.
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/27074898
possible better answer: http://stackoverflow.com/a/43000903
score: 1
tagged with: wordpress
tagged with: forms
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: I've been researching Contact Form 7 redirects based on values for the past 5 hours. I cannot explain why my code doesn't work. Can anyone see a problem? Contact Form Radio Button [radio radio-935 id:rating label_first "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"] Additional Settings on_sent_ok: " if (document.getElementById('rating').value=='9') {location.replace('http://www.google.com')} else { location.replace('http://www.msn.com/') } " When I select radio button 9, I am redirected to msn (the else argument). All other values also go to MSN (at least that part is right). I've tried changing the additional settings to a triple equals sign === but that didn't help. I've also tried adding a pipe (|) after each value in the Radio Button. That didn't work either.
tagged with: jquery
has answer: http://stackoverflow.com/a/27078516
favorite count: 0
has answer: http://stackoverflow.com/a/43000903
upvote count: 1
tagged with: php
accepted answer: http://stackoverflow.com/a/27078516
type: AnsweredQuestion
has title: Wordpress Contact Form 7 Redirect on radio button value not working

http://stackoverflow.com/q/27073015
has answer: http://stackoverflow.com/a/27073155
accepted answer: http://stackoverflow.com/a/27073155
favorite count: 0
has comment: http://stackoverflow.com/comment/42658131
has answer: http://stackoverflow.com/a/27073092
tagged with: css
type: AnsweredQuestion
downvote count: 2
tagged with: methods
type: Question
answer count: 2
upvote count: 0
has body: I've Googled my face off with no luck including searching this site. I just want a simple clear answer. Here is my HTML: home Here is the css method I'm using which I've tested and works: // Layout 1 $('#default').click(function() { if('true' == 'true') { // General Values $(hmnavUL).css({ backgroundColor: bgDefault }); }); Here is the variable I've created: var bgSet = $(hmnavUL).css({ backgroundColor: bgDefault }); Here is what I'm trying to achieve: // Layout 1 $('#default').click(function() { if('true' == 'true') { // General Values bgSet }); The result: The Browser completely ignores my "bgSet" variable, but it acknowledges the style when I don't use a variable. It's not giving me any errors either with my preferred version. Anything you can tell me about my syntax would be appreciated. I'm assuming it's my syntax. I've linked a photo example to demonstrate the my desired end product (note: I can't attach images yet). (Default Layout, Second Layout, Remove All Styles) Desired result: Result
score: -2
tagged with: javascript
tagged with: variables
possible better answer: http://stackoverflow.com/a/27073092
has comment: http://stackoverflow.com/comment/42658281
has title: Storing .css() method in a variable
tagged with: http://stackoverflow.com/tag/html

list
type: Tag
tags question: http://stackoverflow.com/q/27122940
tags question: http://stackoverflow.com/q/27115146
tag name: list
tags question: http://stackoverflow.com/q/27047968
tags question: http://stackoverflow.com/q/27088129
tags question: http://stackoverflow.com/q/27010306
tags question: http://stackoverflow.com/q/27036037

http://stackoverflow.com/comment/42871237
score: 0
comment on: http://stackoverflow.com/q/27101658
type: QuestionComment
type: Comment
has text: Thanks a lot... I shall start with it.

http://stackoverflow.com/q/27032787
has title: I keep getting this angular js error : Argument 'ExampleController' is not a function, got undefined
score: 0
has answer: http://stackoverflow.com/a/27032932
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27032829
tagged with: controller
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
type: UnansweredQuestion
has body: Angular JS Tutorials Services Example for Modal Dialog Open Dialog Below is the angularExampleController.js content, and the html where I am trying to bind to the controller (function(){ var myApp = angular.module('AngularExamples', []); myApp.controller('ExampleController', function() { }); }()); <%@ include file="./imports/imports.jsp" %> Angular JS Tutorials Services Example for Modal Dialog Open Dialog Can't figure out what the issue is. Any help is appreciated. Edit : I am using AngularJS 1.3.3 Edit : Adding updated html. But I also found the the issue, i had a "ng-app" directing in tag and "ng-app=AngularExample" and that was causing the issue. i removed the directive from tag, and that fixed it. Thanks

http://stackoverflow.com/comment/42591069
has text: in your jsfiddle, you have an option called jshint. click this, and then scroll through your js. you'll find a lot of red dots at the beginning of a js line - get rid of the js errors and if it's still not working, come back to us ;)
score: 0
comment on: http://stackoverflow.com/q/27035124
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42689970
comment on: http://stackoverflow.com/q/27091427
score: 0
type: QuestionComment
type: Comment
has text: if my solution doesnt work for you , please let me know.

http://stackoverflow.com/comment/42630863
comment on: http://stackoverflow.com/a/27057874
has text: Please leave feedback when voting down, what exactly is wrong with the answer?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42760685
score: 0
comment on: http://stackoverflow.com/q/27130312
type: QuestionComment
has text: Loose validation in JS E.g. `\S+@\S+` then stricter validation on the server; http://stackoverflow.com/questions/1710505/asp-net-email-validator-regex
type: Comment

for-loop
tags question: http://stackoverflow.com/q/27041149
tags question: http://stackoverflow.com/q/27044618
tags question: http://stackoverflow.com/q/27080119
tags question: http://stackoverflow.com/q/27147301
tags question: http://stackoverflow.com/q/27032463
tags question: http://stackoverflow.com/q/27099105
tags question: http://stackoverflow.com/q/27082875
tag name: for-loop
tags question: http://stackoverflow.com/q/27134142
tags question: http://stackoverflow.com/q/27132162
tags question: http://stackoverflow.com/q/27047956
tags question: http://stackoverflow.com/q/27072554
tags question: http://stackoverflow.com/q/27073486
tags question: http://stackoverflow.com/q/27022490
tags question: http://stackoverflow.com/q/27133381
tags question: http://stackoverflow.com/q/27032569
type: Tag
tags question: http://stackoverflow.com/q/27073902
tags question: http://stackoverflow.com/q/27084322
tags question: http://stackoverflow.com/q/27095892
tags question: http://stackoverflow.com/q/27018949
tags question: http://stackoverflow.com/q/26992460
tags question: http://stackoverflow.com/q/27004618
tags question: http://stackoverflow.com/q/27026567

http://stackoverflow.com/comment/42671503
type: Comment
comment on: http://stackoverflow.com/q/27080818
has text: I just had a quick test and it works fine. Would you know what the performance impacts would be like?
score: 0
type: QuestionComment

http://stackoverflow.com/a/26995209
answers question: http://stackoverflow.com/q/26994140
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/26994140
has body: Test <?php require_once('DB.class.php'); $db = new DB(); $db->connect(); $result=$db->SelectTable("multiple","",""); ?> Sr.No. one two Equal <?php if(count($result) > 0) { $i=0; foreach($result as $rslist12){ ?> <?php $i =$i+1; ?> <?php echo $i;?> <input type="text" name="one" id="one-<?php echo $i; ?>" style="width:60px;" value="<?php echo $rslist12['one'];?>" onchange="taxapply(this)";> <input type="text" name="two" id="two-<?php echo $i; ?>" style="width:60px;" value="<?php echo $rslist12['two'];?>" onchange="taxapply(this)";> <label id="equal-<?php echo $i; ?>"><input type="text" name="equal" id="equals-<?php echo $i; ?>" style="width:50px;" value="<?php echo $rslist12['equal'];?>" onchange="taxapply(this)";> <?php } } ?>
type: AcceptedAnswer

http://stackoverflow.com/a/27055331
has body: SimpleDateFormat can be used to get the desired result. For instance- Calendar cal = Calendar.getInstance(); SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); Then call sdFormat.format(cal.getTime()) So, in your case you can do something like sdFormat.format(order_employee_start.getTime())
score: 0
answers question: http://stackoverflow.com/q/27054623
type: Answer

http://stackoverflow.com/a/27113712
type: AcceptedAnswer
has body: Since Scala.js 0.6.0, the standard global ExecutionContext of Scala is available in Scala.js. You can import it with import scala.concurrent.ExecutionContext.Implicits.global // now you get to play with Futures In Scala.js, it is an alias to scala.scalajs.concurrent.JSExecutionContext.Implicits.queue. This execution context enqueues jobs in the standard JavaScript event loop. Note that tasks are executed asynchronously, but not in parallel, since JavaScript has no notion of parallelism per se. If parallelism is required, Web Workers need to be used, but those do not provide the shared-memory model required by Futures as such. Old answer applying to Scala.js &lt; 0.6.0 There are 2 existing and working ExecutionContexts in scala.scalajs.concurrent.JSExecutionContext, with implicit versions in the inner object Implicits. Simply import the one that makes sense for you (probably queue, the other one not being actually asynchronous). import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue // now you get to play with Futures
upvote count: 34
type: Answer
answers question: http://stackoverflow.com/q/27111917
downvote count: 0
has comment: http://stackoverflow.com/comment/70218403
accepted answer of: http://stackoverflow.com/q/27111917
score: 34
has comment: http://stackoverflow.com/comment/70220816
has comment: http://stackoverflow.com/comment/70216120

http://stackoverflow.com/a/27062571
answers question: http://stackoverflow.com/q/27059983
has body: Using ng-bind instead of the inplace {{...}} has one major benefit, which prevents the page to look like a hell of {{}} everywhere before angular kicks in and replaces everything (this can be very visible on slow devices (tablets, phones etc). You can however get around it by adding ng-cloak class to the elements you don't want shown until angular is ready processing the template, then it will remove the ng-cloak and all will become visible. (It happened to us when you switched to a page with some heavy charts and grids, it showed some really ugly {{}} all over the place on tablets). Other then that the other answer about partial rendering and performance is also correct.
score: 0
type: Answer

http://stackoverflow.com/q/27062526
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42639262
score: 1
upvote count: 1
type: Question
tagged with: cookies
has comment: http://stackoverflow.com/comment/42639086
has answer: http://stackoverflow.com/a/27062685
accepted answer: http://stackoverflow.com/a/27062685
has title: javascript set cookie with language value
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42639206
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I need to set a cookie that saves the language value selected from a drop-down menu in page 1 and carry the cookie until page 4. So that in page 3 (where the language selection is longer there) a text appears depending on the language selected in page 1. The language selection in page 1 is: English Spanish French The cookie should be set immediately as soon as the page opens the first time and the value should get updated if the user changes the language in the drop-down menu from page 1. The cookie should be kept until page 4. Any ideas how to set the cookie and then read it so the text in page page 3 appears in the language chosen in page 1? The text that needs to appear in the selected language is not part of the HTML and it's being inserted via Javascript as follows: $(document).ready(function () { if ($('page_3').length) { $('#my_element').after(' XXXXXX '); } }); The code should first check the language value from the cookie and replace the 'XXXXXX' with the respective text depending on the language cookie value: var welcome = { en:"English", es:"Espanol", fr:"Francais" } $(document).ready(function () { $('#greet').html(welcome[$('#languages').val()]); }); Any ideas?

http://stackoverflow.com/comment/42677510
has text: I tried that first, but it didn't work as intended. That's why I am trying to JS intercept version. Either way, could you provide some code because maybe I did it wrong? I simply did a `redirect_to action: :upload`. But that didn't actually fire the new modal which is on the `upload.html.erb` view.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27084201

http://stackoverflow.com/a/27023469
has comment: http://stackoverflow.com/comment/42571676
answers question: http://stackoverflow.com/q/27022013
score: 0
has comment: http://stackoverflow.com/comment/42571735
type: Answer
has body: what you could do instead, is NOT define ng-app at all in the html, and instead bootstrap angular via javascript. for example you can do angular.bootstrap(document, ['example']); where 'example' is the angular module for the app for example angular.module('example', [ 'ngResource', 'ui.router', .... ]); you probably defined that yourself already. This way, you define the ng-app on the entire document scope.

http://stackoverflow.com/comment/42677550
comment on: http://stackoverflow.com/q/27069169
score: 0
type: Comment
type: QuestionComment
has text: @Gjohn: i can give it a try, tho i'm clueless on how to achieve this..Thanks.

http://stackoverflow.com/comment/42777807
type: QuestionComment
has text: Are you saying that you want your About and Contact Pages on the same page and your navigation to link to them this way?
score: 0
comment on: http://stackoverflow.com/q/27139963
type: Comment

http://stackoverflow.com/comment/42535354
has text: Are you using tags or just quotes?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27002790
score: 0

http://stackoverflow.com/a/27089656
has comment: http://stackoverflow.com/comment/42689962
type: Answer
answers question: http://stackoverflow.com/q/27086115
score: 1
upvote count: 1
has body: You seem to have some copy/paste/modify errors from the examples. $getAuth is an AngularFire method, so it is not defined on a regulare Firebase JavaScript ref. The simplest example I could quickly code up: angular.module('app', ['firebase']) .constant('FBURL', "https://your.firebaseio.com") .factory("Auth", function($firebaseAuth, FBURL) { var ref = new Firebase(FBURL); return $firebaseAuth(ref); }) .controller('MainCtrl', function ($scope, Auth) { $scope.auth = Auth; console.log(Auth.$getAuth()); }) ; Note that this will only log something meaningful if the user is logged in, otherwise it will log null.
accepted answer of: http://stackoverflow.com/q/27086115
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42591583
score: 0
type: Comment
type: QuestionComment
has text: what about this [fiddle](http://jsfiddle.net/Cerlin/evz7ha9f/1/)?
comment on: http://stackoverflow.com/q/27033367

http://stackoverflow.com/q/27113207
favorite count: 0
accepted answer: http://stackoverflow.com/a/27118672
tagged with: backbone.js
type: AnsweredQuestion
score: 2
has body: I need to catch a "beforeChange" event, to prepare some stuff before a model's field changes. Does BackboneJS have something like this, or how could I accomplish something similar?
upvote count: 2
has comment: http://stackoverflow.com/comment/42729873
has title: Does backbonejs issues 'beforeChange' event?
type: Question
has answer: http://stackoverflow.com/a/27118672
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/35381840
score: 0
has body: This happens because sublime's smart_indent is not smart enough. You can fix indentation post factum using code formatter plugin like JsFomat. Or preventively indent first chained method call. Following lines will have same level of indentation. This solution can be slightly improved by creating new key binding: { "keys": ["alt+enter"], "command": "insert", "args": {"characters": "\n\t"} } Press alt+enter instead of enter, tab for newline to have extra indentation.
answers question: http://stackoverflow.com/q/27097571
type: Answer

http://stackoverflow.com/comment/137630678
type: AnswerComment
comment on: http://stackoverflow.com/a/53542157
has text: "Z" means UTC. Leaving off "Z" means the value is a local date and time.
score: 0
type: Comment

http://stackoverflow.com/a/27150342
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27147980
has comment: http://stackoverflow.com/comment/42819071
has body: PhantomJS has a default viewport size of 400x300. For most sites that use fixed widths this is too small which is why a scrollbar appears and this is why when using the Selenium Webdrivers elements cannot be interacted with, because they are hidden out of view. For other sites the mobile site will be shown (which is probably based on media queries). To solve this, you should set the viewport to something desktop-like before opening the page: page.viewportSize = { width: 1280, height: 800 }; (or higher depending on your requirement) You can check this by running phantomjs without any arguments in interactive mode and retrieving the viewportSize. $ phantomjs phantomjs&gt; var page = require('webpage').create(); undefined phantomjs&gt; page.viewportSize { "height": 300, "width": 400 }
type: Answer
answers question: http://stackoverflow.com/q/27147980
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42795237

http://stackoverflow.com/a/27021072
upvote count: 2
has body: Suppose html response look like this var imagesHTML = [ '&lt;img src="http://" width="100" height="500"&gt;', '&lt;img src="http://" width="100" height="500"&gt;', '&lt;img src="http://" width="50" height="500"&gt;', '&lt;img src="http://" width="50" height="50"&gt;', '&lt;img src="http://" width="100" height="50"&gt;', '&lt;img src="http://" width="50" height="50" style="width: 100px"&gt;' ]; var html = $(images.join('')); #1 - filter by html attributes var imgs = html.find("img").filter(function() { return ($(this).attr('width') &gt; 50) &amp;&amp; ($(this).attr('height') &gt; 50); }); // push to DOM #2 Filter by width (inline styles) var doc = document.createDocumentFragment(), div = document.createElement('div'); var imgs = $(div).html(html).find('img').filter(function () { return ($(this).width() &gt; 50) &amp;&amp; ($(this).height() &gt; 50) }); // push to DOM #3 - example - if width and height attributes have not been setted for images function loadImages(content, callback) { var html = $(content), urls = []; function filter(width, height) { return (width &gt; 256 &amp;&amp; height &gt; 256); } function load(el) { var def = new $.Deferred(), img = new Image(); img.onload = function () { if (filter(img.width, img.height)) { return def.resolve(el.get(0)); } def.resolve(null); }; img.onerror = function () { def.resolve(); }; img.src = el.attr('src'); return def; } urls = $('&lt;div /&gt;').html(html).find('img').map(function () { return load($(this)); }).get(); $.when.apply(null, urls).done(function () { callback.call(this, [].slice.call(arguments, 0).filter(Boolean)); }); } loadImages(images.join(''), function (images) { var content = $('&lt;div /&gt;'); images.forEach(function (el) { content.append(el); }); $('body').html(content.get(0)); }); In my opinion better send JSON which will contain all images (urls) :), because creating unnecessary HTTP queries it's not good solution.
accepted answer of: http://stackoverflow.com/q/27020054
answers question: http://stackoverflow.com/q/27020054
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/a/27026353
has body: Thats because $("#test") returns a jQuery object. Use $("#test").get(0) to get the first dom element. var video = $("#test").get(0);
upvote count: 4
accepted answer of: http://stackoverflow.com/q/27026125
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27026125
score: 4
type: Answer

http://stackoverflow.com/q/27028010
possible better answer: http://stackoverflow.com/a/27319105
has comment: http://stackoverflow.com/comment/42579947
has comment: http://stackoverflow.com/comment/42579252
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42579302
has comment: http://stackoverflow.com/comment/42579109
has comment: http://stackoverflow.com/comment/43097800
has comment: http://stackoverflow.com/comment/42579090
has comment: http://stackoverflow.com/comment/42580356
has comment: http://stackoverflow.com/comment/42580278
has answer: http://stackoverflow.com/a/27028555
accepted answer: http://stackoverflow.com/a/27028555
has comment: http://stackoverflow.com/comment/42579917
has comment: http://stackoverflow.com/comment/42579408
has comment: http://stackoverflow.com/comment/43009936
has comment: http://stackoverflow.com/comment/42579580
has comment: http://stackoverflow.com/comment/42578951
type: Question
has comment: http://stackoverflow.com/comment/42579013
has comment: http://stackoverflow.com/comment/42580588
has answer: http://stackoverflow.com/a/27319105
has body: I read a lot about optimization in jQuery in some links below: jQuery Website , Performance jQuery Best Practices - Greg Franko jQuery Coding Standards and Best Practices 14 Helpful jQuery Tricks, Notes, and Best Practices and more ... But none of them mentioned for .on() caching selectors. I don't know if there is any way to use cached elements in these kind of selectors. for example I have a lot of these selectors in my script.js file. $(document).on('click', '.menu li.remove', function(e){ ... }); $(document).on('click', '.menu li.edit', function(e){ ... }); $(document).on('click', '.menu li.action', function(e){ ... }); $(document).on('click', '.menu li.anotherAction', function(e){ ... }); and much more. .menu is a menu and can be anywhere in document, so I can't use specific id container to select it. like this: $('#sidebar').on('click', '.menu li.action', function(e){ ... }); is there any way to optimize these selectors. Checking for existence maybe, caching .menu if it is possible.
tagged with: javascript
has title: Optimize live elements' selectors in jQuery
tagged with: optimization
has comment: http://stackoverflow.com/comment/43097219
has comment: http://stackoverflow.com/comment/42579064
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42579219
tagged with: jquery-selectors
has comment: http://stackoverflow.com/comment/42579768
tagged with: jquery
has comment: http://stackoverflow.com/comment/42580018
has comment: http://stackoverflow.com/comment/42579096
has comment: http://stackoverflow.com/comment/42579470
has comment: http://stackoverflow.com/comment/42579035
has comment: http://stackoverflow.com/comment/42579372
has comment: http://stackoverflow.com/comment/42579136

http://stackoverflow.com/a/27301219
has body: Have you tried ... $("body").css({ "-moz-transform":"scale(1)", "-webkit-transform":"scale(1)", "-o-transform":"scale(1)", "-ms-transform":"scale(1)" }); I've used this type of code to set or re-set the scale.
answers question: http://stackoverflow.com/q/27116221
type: Answer
has comment: http://stackoverflow.com/comment/130174166
upvote count: 2
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/130146238

http://stackoverflow.com/a/27118246
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27097319
type: Answer
has body: So i finnally figured it out i just had to add the select box to my current code $("#date01,#date02,#flexibleDates").change(function() { if ($("#date01").val() != '' &amp;&amp; $("#date02").val() != '' &amp;&amp; $("#flexibleDates").val() != '') { #flexibleDates being the &lt;select&gt; that i was talking about it now wait for a user to select something in the dropdown and once something is selected continues to the next step
answers question: http://stackoverflow.com/q/27097319

http://stackoverflow.com/comment/42793636
type: AnswerComment
comment on: http://stackoverflow.com/a/27148188
has text: @ManoharSingh your app function does still in the for loop and stored in the app varilable. What outside the for loop is the factory of the app function. Also I tested the code, and it is working in that the index value is available in all instances of the app function.
type: Comment
score: 0

http://stackoverflow.com/q/27142580
type: Question
has answer: http://stackoverflow.com/a/27146068
accepted answer: http://stackoverflow.com/a/27146068
score: 0
has body: I have the below code in my html page, the issue is with the multiselect checkbox of the div element of id 'alot' Yes or NO Off On Business Category: All ABC BCD CDE First i have hardcoded the values like the lables ( ABC,BCD,CDE). This works fine and i get the output like below. But when i want to generate the muliselect cheboxes content from the javascript file(com/xyz/abc/Controller), i am not getting the multiselect checkbox in a proper format Here is the screen shot Here is the html : --> Javascript file : var prefix = ' ' + ' Business Units: ' + ' ' + ' All '; var subfix = ' '; var html = ""; $('#alot').append(prefix); for (generate the data from db) { html = ' '; html = html + ' ' + unitName + ' '; $('#alot').append(html); } $('#alot').append(subfix); What might be missing here ? Why the look & feel of the multi select checkboxes is not same when I generate the content dynamically ?
answer count: 1
has title: Issue with fieldset format in multiselect cheboxes
has comment: http://stackoverflow.com/comment/42782557
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42782071
has comment: http://stackoverflow.com/comment/42783104

http://stackoverflow.com/q/27131899
has answer: http://stackoverflow.com/a/27131923
has comment: http://stackoverflow.com/comment/42762874
has body: I had this problem when I get the value from a div: function sync(){ var n1 = document.getElementById('editor').value; alert(n1); var n2 = document.getElementById('news'); n2.value = n1; } div with id editor looks like this: &lt;div class='message' id='editor' contenteditable="true" onkeyUp='sync()' style="color: black"&gt;&lt;/div&gt; When I put something in that div it will alert me undefined and that will also come in the textarea i paste it in too. So the problem is obviously by this: var n1 = document.getElementById('editor').value; What am I doing wrong?
downvote count: 0
has answer: http://stackoverflow.com/a/27132098
tagged with: javascript
score: 6
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27131923
tagged with: undefined
linked to: http://stackoverflow.com/q/11238508
favorite count: 0
type: Question
duplicate of: http://stackoverflow.com/q/11238508
upvote count: 6
possible better answer: http://stackoverflow.com/a/36759120
has comment: http://stackoverflow.com/comment/42762829
has answer: http://stackoverflow.com/a/36759120
has title: Get value from div with javascript: Always get undefined
answer count: 3

http://stackoverflow.com/a/27149675
downvote count: 0
has comment: http://stackoverflow.com/comment/42799410
has comment: http://stackoverflow.com/comment/42794841
has comment: http://stackoverflow.com/comment/42794141
answers question: http://stackoverflow.com/q/27149601
accepted answer of: http://stackoverflow.com/q/27149601
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42794364
has body: First of all result is not an array, is an object. The problem is that yours nested objects are inside arrays so to access the property akch_faulted you need to write this: result.akch_chassis[0].akch_sp[0].akch_faulted
has comment: http://stackoverflow.com/comment/42794160
type: Answer
has comment: http://stackoverflow.com/comment/42794264
score: 2

http://stackoverflow.com/q/27152158
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/42798832
tagged with: slidetoggle
tagged with: javascript
has answer: http://stackoverflow.com/a/27152405
score: 0
possible better answer: http://stackoverflow.com/a/27152278
answer count: 2
has comment: http://stackoverflow.com/comment/42798855
has answer: http://stackoverflow.com/a/27152278
tagged with: jquery
has title: How to make multiple divs slidetoggle with changing arrow
has comment: http://stackoverflow.com/comment/42803174
has body: I'm very new to javascript and jQuery and has now got completely stuck despite trying various options. I'm trying to create a expand/collapse section with multiple divs. I would like each div to open and close seperately, with an arrow at the side pointing up or down, depending whether the content is expanded or collapsed. From the code I have written below, only the first div works correctly. The only thing which happen When you click on the two other divs, is that the arrow in the first div change. Any help will be greatly appreciated. Following is the CSS: #header_background { background-image: url(header-background.png); width:748px; height:43px; margin-left: -17px;} #expand_arrow { display: inline-block; width: 17px; height: 18px; float:left; margin-left:20px; padding-left:0px; padding-top:11px; background-repeat:no-repeat; } .sub_header { color:#204187; font-weight:bold; font-size:16px; vertical-align:middle; padding-left:4px; padding-top:12px; float:left; text-decoration:none; } Here's the attempted javascript and jQuery: function chngimg() { var img = document.getElementById('expand_arrow').src; if (img.indexOf('expand-arrow.png')!=-1) { document.getElementById('expand_arrow').src = 'images/collapse-arrow.png'; } else { document.getElementById('expand_arrow').src = 'images/expand-arrow.png'; } } $(document).ready(function(){ $("#header_background").click(function(){ $("#section").slideToggle("slow"); }); }); And here's the HTML header 1 text 1 header 2 text 2 header 3 text 3
accepted answer: http://stackoverflow.com/a/27152405

http://stackoverflow.com/comment/42710811
score: 1
has text: Can you use Profiler, like [Miniprofiler](http://miniprofiler.com/) to check where's the bottleneck?
comment on: http://stackoverflow.com/q/27101808
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27132832
favorite count: 0
has title: How to get selected text with JavaScript?
type: Question
has comment: http://stackoverflow.com/comment/42764380
has comment: http://stackoverflow.com/comment/42764408
has answer: http://stackoverflow.com/a/27132990
linked to: http://stackoverflow.com/q/14553534
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/27133010
possible better answer: http://stackoverflow.com/a/27132936
has comment: http://stackoverflow.com/comment/42764446
tagged with: javascript
has answer: http://stackoverflow.com/a/27132936
tagged with: jquery
score: -3
has comment: http://stackoverflow.com/comment/42764489
downvote count: 4
accepted answer: http://stackoverflow.com/a/27132990
has body: I have a DIV field which contains some lyrics. I want to know when user is dragged &amp; selected some part of the lyrics. How is this can be done? Example is shown below: In this example user is dragged &amp; selected the part which has a blue background. I want JavaScript to select "I can't believe that my sanity lies in abandoning you" part of the text. Is this possible to do?
type: AnsweredQuestion

http://stackoverflow.com/comment/42571939
has text: We have established that what you've posted is wrong but you have said you "already tried" my suggested fix (presumably implying that it didn't work) - without seeing this attempt it is hard to help you further.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27023806
score: 0

http://stackoverflow.com/comment/42612901
comment on: http://stackoverflow.com/a/27047352
has text: Why even post an answer that just mimics the other answers?
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27137073
score: 4
upvote count: 4
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has title: Using mutationObserver doesn't seem to keep track of a changing table in the DOM
favorite count: 0
accepted answer: http://stackoverflow.com/a/27142771
has body: I am trying to write a simple chrome extension that changes the values of a table in the DOM.The important thing here is that the webpage is using ajax commands to build and change the contents of this table.(First, there is nothing in the page.Then you click on a link, and with an ajax request(no page reloads) a table will be created and after that by clicking other links, this table will be modified). Here's the code I am using to listen to the table's changes : var target = document.querySelector('#my-table'); var observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { alert('The table has appeared'); }); }); var config = { attributes: true, childList: true, characterData: true, subtree: true }; observer.observe(target, config); observer.disconnect(); The problem is that nothing will happens when I press a link in the page that makes the table change.And when I was inspecting chrome's console to debug my work, I saw that it gave me this error as soon as the page loads : Uncaught NotFoundError: Failed to execute 'observe' on 'MutationObserver': The provided node was null I am really lost and don't know what to do.Does anyone have any suggestions? ps:Here's my extension's manifest file: "manifest_version": 2, "name": "MyExtension", "description": "Testing the Content Script api", "version": "1.0", "content_scripts": [ { "matches": ["www.myWebsite.com"], "js": ["script.js"] } ], "browser_action": { "default_icon": "icon.png" } }
tagged with: mutation-observers
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27142771
tagged with: javascript

http://stackoverflow.com/a/27006754
has comment: http://stackoverflow.com/comment/42542802
has comment: http://stackoverflow.com/comment/42542956
has comment: http://stackoverflow.com/comment/42542921
answers question: http://stackoverflow.com/q/27006681
has comment: http://stackoverflow.com/comment/42542635
has body: The $view_post['nome'] is probably set but empty. Try this instead: if(!empty($view_post['nome'])) {} Also I'm not so sure about your weird endif() stuff. I would do it like this way: &lt;button class="btn btn-danger" &lt;?php if (!empty($view_post['nome'])) { ?&gt; onclick="window.open('http://somelocation.com','mywin','width=500,height=500');" &lt;? } ?&gt; type="submit"&gt;Enviar mensagem&lt;/button&gt; That way I'm sure what is contained within the if.
accepted answer of: http://stackoverflow.com/q/27006681
score: 0
has comment: http://stackoverflow.com/comment/42542838
has comment: http://stackoverflow.com/comment/42542878
has comment: http://stackoverflow.com/comment/42542984
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42542599
type: Answer

http://stackoverflow.com/q/27089442
has answer: http://stackoverflow.com/a/27089555
downvote count: 4
upvote count: 0
favorite count: 0
type: Question
has body: Hi guys our teacher ask us to add in input type="text" and animate it using the rotating string with these codes: Javascript Basic Animation Write a Javascript program to rotate the string 'HELLO WORLD' in right direction by periodically removing one letter from the end of the string and attaching it to the front. HELLO WORLD but I don't know how. Please help thanks.:)
answer count: 2
has comment: http://stackoverflow.com/comment/42686284
has title: Add text box and animate using rotating string
has answer: http://stackoverflow.com/a/27089544
tagged with: javascript
type: UnansweredQuestion
score: -4

http://stackoverflow.com/a/27081996
downvote count: 0
has body: CSS: .als-item img { max-width: 128px; } jQuery: $("#my-als-list").als({ autoscroll: "yes" });
type: Answer
has comment: http://stackoverflow.com/comment/42673733
has comment: http://stackoverflow.com/comment/42673911
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27081736

http://stackoverflow.com/comment/42751086
type: QuestionComment
comment on: http://stackoverflow.com/q/27119223
score: 0
has text: ya. I want to crop image and replace it with original image.
type: Comment

http://stackoverflow.com/a/27031273
answers question: http://stackoverflow.com/q/27030913
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: The error occurs here: var day = new Date(); day = day.substring(4, 100); Dates in JavaScript are stored as objects which expose a number of functions, substring isn't one of them. You can either use the toString() method on the date object like this: day.toString().substring(4, 100); Or you could use the getDay() method which returns the index of the date instance's weekday: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][day.getDay()-1];
accepted answer of: http://stackoverflow.com/q/27030913
type: Answer

http://stackoverflow.com/q/27105660
score: 0
has title: Launch javascript code in a browser
answer count: 1
has answer: http://stackoverflow.com/a/27105715
tagged with: add-in
has body: I am doing an add-in for Outlook (C#) I created a button in the Ribbon. When I click on the button I want to automatically open a browser with url and then launch a javascript javascript:Goto(); in the code behind. Is this possible?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27105715
type: Question
tagged with: outlook
tagged with: c#
tagged with: javascript

http://stackoverflow.com/comment/42721924
comment on: http://stackoverflow.com/q/27109390
score: 0
type: Comment
type: QuestionComment
has text: You have scope problems. `this` doesn't exist at time of `var sliders = $('.entry_percent').not(this);` declaration. `this` is part of an event. declaring a var is not an event. The rest of the `this`calls down stream won't work either because of it.

http://stackoverflow.com/q/27062233
tagged with: javascript
has answer: http://stackoverflow.com/a/27063115
upvote count: 1
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Looping through json object from a checkbox loop
has body: I have a json object thats being loaded through a checkbox in an ng-repeat. It lists possible services and I'm trying to get access to the ones that have been checked when I submit the form. I'm loading the checkbox through: &lt;label style="margin-right:10px" ng-repeat="item in dsServces"&gt; &lt;input type="checkbox" name="selectedFruits" value="{{item.DefaultServiceID}}" ng-model="expense.dsService[item.DefaultServiceName]" &gt; {{item.DefaultServiceName}} &lt;/label&gt; I can see the expense is being built by testing with: {{ expense.dsService }} returns (when a couple are selected) {"Email":true,"Backups":true} But I can't work out how to loop through so it says just the service name so I can add them against the customer. In the back end I have: $scope.expense = { tags: [] }; And on the submit: angular.forEach($scope.expense, function(item) { console.log(item); }); Which spits out Object {Email: true, Backups: true} but I can't work out to have a loop where it just returns which ever objects are true. My main aim is to have something like angular.forEach(forloop) { //service.item should be like 'Email' whatever the item.DefaultServiceName is // the loop should be all items that are checked addService(service.item); });
has comment: http://stackoverflow.com/comment/42640100

http://stackoverflow.com/q/27150304
score: 0
has answer: http://stackoverflow.com/a/27150546
has answer: http://stackoverflow.com/a/27150493
has body: I have datetime column (format in YYYY-mm-dd hh:mm:ss) in my database. I need to convert it into dd-mm-YYYY hh:mm:ss format. How can i do? Help me.
possible better answer: http://stackoverflow.com/a/27150467
accepted answer: http://stackoverflow.com/a/27150493
has answer: http://stackoverflow.com/a/27150467
has title: How to convert data format "YYYY-mm-dd hh:mm:ss" to "dd-mm-YYYY hh:mm:ss" using javascript?
answer count: 4
has answer: http://stackoverflow.com/a/27150478
has comment: http://stackoverflow.com/comment/42795129
type: AnsweredQuestion
type: Question
tagged with: javascript

http://stackoverflow.com/a/27088558
answers question: http://stackoverflow.com/q/27088485
has body: Here is a working JSFiddle: http://jsfiddle.net/jwmnvn04/ You have a typo. First you declare it like this: heigth = window.innerHeight; and then (still correct I guess despite spelled wrong for context): heigth = 480; but then when you call it to determine height of canvas you spell it properly: canvas.height = height;
type: Answer
has comment: http://stackoverflow.com/comment/42684710
score: 0
has comment: http://stackoverflow.com/comment/42684693
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27088485

http://stackoverflow.com/comment/42732418
type: Comment
has text: Ah thank you very much. Using this setup is it possible to get the next page of results?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27113899

http://stackoverflow.com/q/27115108
answer count: 1
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27115733
tagged with: cheerio
tagged with: javascript
has title: Query a getElementInfo object in CasperJS
has body: I am using casperjs and I got to a point where I have an object like so: var domElem = this.getElementInfo(".foo"); And now I want to query domElem further on, like so: var domElemChild = domElem.QUERYFUNCTIONHERE(".bar"); I can't do that because domElem is an object and not a DOM node, what can I do using (preferably) only casperjs? Note: I tried using cheerio but it outputted the following error upon trying to require it: Error: Cannot find module 'util' D:/dev/myproj/phantomjs:/bootstrap.js:289 D:/dev/myproj/phantomjs:/bootstrap.js:254 in require D:/dev/myproj/node_modules/cheerio/node_modules/htmlparser2/lib/Pars er.js:120 D:/dev/myproj/node_modules/cheerio/node_modules/htmlparser2/lib/Pars er.js:351 Unsafe JavaScript attempt to access frame with URL about:blank from frame with U RL file:///d:/casperjs/bin/bootstrap.js. Domains, protocols and ports must match
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27115733
downvote count: 0
score: 1
favorite count: 0
tagged with: casperjs
type: Question
upvote count: 1

http://stackoverflow.com/q/27070203
answer count: 4
favorite count: 0
downvote count: 0
has body: Is there a way of getting screeps code to print strings to the console (or anywhere really) for simple debugging purposes?
has answer: http://stackoverflow.com/a/32011985
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27070319
score: 7
accepted answer: http://stackoverflow.com/a/27070319
has answer: http://stackoverflow.com/a/27070276
upvote count: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/37044051
possible better answer: http://stackoverflow.com/a/32011985
tagged with: screeps
has title: Screeps: write debug output to console?

http://stackoverflow.com/a/27015133
has comment: http://stackoverflow.com/comment/42555903
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27015028
has body: You are doing obj1.func = instanceObj2.isAdded() which means: setobj1.functo the result ofinstanceObj2.isAdded(), which is: obj1.func = undefined since obj2.isAdded() returns nothing. if you then execute obj1.isAdded(), which runs Obj1.func, you are essentially executing undefined as a function. To fix it: obj1.func = function() { instanceObj2.isAdded(); }; Calling something within another context (aka: running something and setting "this") To run something with a different this value: To set the context of a function, you can use either apply or call function add() { var result = this; for(var i = 0, l = arguments.length; i &lt; l; i++) result += arguments[i]; return result; } var value = 2; newValue = add.apply(value, [3,4,5]); // = 2 + 3 + 4 + 5; // newValue = 5 newValue = add.call(value, 3, 4, 5) // same as add.apply, except apply takes an array. Creating a new function, with a context In new browsers (ie9+) it's possible to use Function.prototype.bind to create a callback with a set context (this) and set arguments which precede other arguments. callback = func.bind(object); callback = function() { func.apply(object, arguments); } callback = func.bind(object, 1, 2); callback = function() { func.apply(object, [1, 2]); };
answers question: http://stackoverflow.com/q/27015028
has comment: http://stackoverflow.com/comment/42556391
has comment: http://stackoverflow.com/comment/42556762
has comment: http://stackoverflow.com/comment/42556462
has comment: http://stackoverflow.com/comment/42556190
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42556129
score: 3
type: Answer

hashmap
tags question: http://stackoverflow.com/q/27004502
type: Tag
tag name: hashmap

http://stackoverflow.com/q/27066966
tagged with: javascript
tagged with: db2
answer count: 1
tagged with: extjs
has answer: http://stackoverflow.com/a/27068711
has comment: http://stackoverflow.com/comment/42655172
type: AnsweredQuestion
tagged with: extjs4.2
has body: I have an EXTJS application that connects to a Java server. The Java server calls a JDBC DAO that reads/writes to DB2 SQL Tables. The front end is basically a simple grid. Editing the grid makes an AJAX call to the server through a given URL, the URL is then handled by the Java which calls the JDBC DAO, updating the table, and the front end grid is refreshed after the change has taken place. This is all pretty straightforward implementation. However, now I need to be able to set up a listener on the EXTJS side which will refresh the grid's store when an external program changes the DB2 Database. Essentially, whenever the SQL table updates, the front end should know and just do a store.load() to refresh the data. However, I can't seem to find any information on how this possible. It can be in the simplest possible way, even just sending a single (a 1 or 0 or a true or a false or something) that indicates to the front end that it needs to refresh. Is this doable without a tremendous amount of overhead? I assume I'll have to set up a Java database listener or something as well, so that the Java knows when the DB2 gets updated, then it can somehow alert the front end. Can someone just give me a general heading? As you can probably tell I'm not exactly fluent in this stuff, I'm relatively new to it all. Edit: The Java server side stuff is hosted on a Tomcat server.
has title: EXTJS - Can a Java Server make a call to the Browser Front end?
score: 0
tagged with: java
type: Question
accepted answer: http://stackoverflow.com/a/27068711

http://stackoverflow.com/comment/42609243
type: Comment
type: QuestionComment
has text: @Asik thank you for pointing that out, I already have a .click event, forgot to include it.
comment on: http://stackoverflow.com/q/27045295
score: 0

http://stackoverflow.com/a/27133298
type: Answer
answers question: http://stackoverflow.com/q/27132941
has comment: http://stackoverflow.com/comment/138452773
upvote count: 1
downvote count: 1
has body: You can use RegisterStartupScript in you C# code. Look at to this document http://www.webblogsforyou.com/how-to-call-javascript-function-from-code-behind-in-asp-net-c-vb-net/
score: 0

http://stackoverflow.com/comment/42705178
comment on: http://stackoverflow.com/q/27100341
score: 0
type: QuestionComment
type: Comment
has text: What error are you getting right now? Also, can you switch column places, and that's why the ID column is never in the same place?

http://stackoverflow.com/a/27128179
has comment: http://stackoverflow.com/comment/42756166
upvote count: 1
answers question: http://stackoverflow.com/q/27128134
type: Answer
downvote count: 0
score: 1
has body: Can't you add that action to the event .click? The class is added by an event so the same event should also be able to trigger the thing you want to do next right? Also see: jQuery - Fire event if CSS class changed

http://stackoverflow.com/comment/42786289
has text: Do you have more than 31 stylesheets on your page? IE 8 has limits in number of [sheets](http://msdn.microsoft.com/en-us/library/ms531194(v=vs.85).aspx) and [rules](http://msdn.microsoft.com/en-us/library/aa358796(v=vs.85).aspx).
comment on: http://stackoverflow.com/q/27142628
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27072941
has comment: http://stackoverflow.com/comment/42657888
downvote count: 0
has comment: http://stackoverflow.com/comment/42659076
has body: That's regex 101 for you: var m = id.match(/^([a-zA-Z]+)#/); if (m) alert(m[1]); In Javascript, regular expressions are defined between slashes. Also, the lazy quantifier is no use here. I haven't tested performances, but there shouldn't be any difference. Finally, take advantage of the return value of match, which returns and array with the complete mathed expression, followed by the captured groups.
type: Answer
answers question: http://stackoverflow.com/q/27072924
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42657894

http://stackoverflow.com/a/61224512
answers question: http://stackoverflow.com/q/27071265
has body: In my case, the problem came from overflow style. In this example, when I set overflow: auto for the .container1 element, the tooltip message will be shown wrong. Since I remove it from .container2, the problem is fixed. $(document).ready(function () { $('[data-toggle="tooltip"]').tooltip().tooltip('show'); }); [class^=container] { margin: 50px; height: 30px; } .container1 { overflow: auto; } Hover me Hover me
type: Answer
score: 4
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/119765092

http://stackoverflow.com/a/27118103
has comment: http://stackoverflow.com/comment/42760846
score: 0
has comment: http://stackoverflow.com/comment/42738534
type: Answer
answers question: http://stackoverflow.com/q/27085422
has body: Your routes need to be nested for a child resource to have access to a parent via #modelFor. However, if your UI isn't nested, your routes probably shouldn't be, since nesting routes also wires up a corresponding view hierarchy. You could always define the model for the favorite route in terms of a subset of the data returned by your ajax call: //routes/favorite.js model: function() { return Ember.$.getJSON('/favorites').then(function(favorites) { return favorites.findBy('id', params.product_id'); }); } but then, the top-level .getJSON('/favorites)call would be made multiple times, every time the user enters/favorites, and every time he enters/favorites/:id`. Instead, you can have the application set up the FavoritesController once upon entry. That way you can share data, but favorite doesn't have to be a child route of favorites. It might look something this: //routes/application.js model: function() { return Ember.$.getJSON('/favorites'); }, setupController: function(controller, model) { this.controllerFor('favorites').set('model', model); } and //routes/favorite.js model: function(params) { return this.controllerFor('favorites').find('id', params.id); } That way, the JSON is only loaded once, ApplicationRouter is wiring up your FavoritesController for you, and the data is shared with the favorite resource.
has comment: http://stackoverflow.com/comment/42760822
has comment: http://stackoverflow.com/comment/42760337
has comment: http://stackoverflow.com/comment/42757218

http://stackoverflow.com/comment/86473250
type: AnswerComment
has text: @paul I have just modified OP's method where the return type was boolean already. You can change the return type as per your need as well, say "String" or might as well keep it as void. In the above case, it will be helpful to assert that whether the alert is present or not; here browser alert is taken into consideration. For instance, if it's a explicitly generated alert/modal by DEV in the browser, the above method will return false, inferring that the alert isn't present, and you can modify accordingly. You can further optimize the method by printing stacktrace to track the exact issue.
type: Comment
comment on: http://stackoverflow.com/a/27075857
score: 0

http://stackoverflow.com/a/27038507
upvote count: 3
has comment: http://stackoverflow.com/comment/42596713
type: Answer
accepted answer of: http://stackoverflow.com/q/27038293
answers question: http://stackoverflow.com/q/27038293
score: 3
downvote count: 0
has body: First off, your selectors $('prev') and $('next') are trying to match elements with the tagnames prev and next. You mean .prev and .next, presumably. Previous is easy, you simply need to .filter() your active list items, remove the class, traverse to the previous element, and add it back: $prev.on('click', function(){ li.filter('.active').removeClass('active').prev().addClass('active'); }); Next is (a little) trickier, since we need to reverse our jQuery object first: $next.on('click', function(){ $(li.get().reverse()).filter('.active').removeClass('active').next().addClass('active'); }); JSFiddle
has comment: http://stackoverflow.com/comment/42597027
type: AcceptedAnswer

http://stackoverflow.com/a/27041899
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27041673
has comment: http://stackoverflow.com/comment/42604839
upvote count: 3
has body: I wouldn't do so. This rather seems an opportunity for you to discover HTML 5's data attribute, which you can use for both CSS styling (using attribute selector) and JS use (with dataset or jQuery's .data() method). Quick definition from MDN : HTML5 is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined meaning. data-* attributes allow us to store extra information on standard, semantic HTML elements without other hacks such as classList, non-standard attributes, extra properties on DOM, or setUserData. In HTML side : &lt;!-- You can use data without value, and just test its presence --&gt; &lt;li data-selected&gt; ... &lt;/li&gt; In CSS : li[data-selected]{ ... }
score: 3
answers question: http://stackoverflow.com/q/27041673

http://stackoverflow.com/comment/42565111
type: QuestionComment
type: Comment
score: 1
has text: You can listen to the `load` event.
comment on: http://stackoverflow.com/q/27020054

http://stackoverflow.com/a/27121109
score: 0
has comment: http://stackoverflow.com/comment/42743887
type: Answer
has body: In my project I use a layout template and a &lt;%-scripts%> tag to designate where child pages scripts should go.
answers question: http://stackoverflow.com/q/27120430
has comment: http://stackoverflow.com/comment/42743188
has comment: http://stackoverflow.com/comment/42743390

analysis
tags question: http://stackoverflow.com/q/27102978
tag name: analysis
type: Tag

http://stackoverflow.com/a/33582805
answers question: http://stackoverflow.com/q/27125922
type: Answer
downvote count: 1
score: 3
upvote count: 4
has body: I just solved this one. I am using: navigator.geolocation.getCurrentPosition(successCallback, errorCallback, {maximumAge: 60000}); In the successCallback i written the codes for what it should do once I got the positions and in the error callback i wrote a simple alert message to prompt the user to turn the GPS on.

http://stackoverflow.com/q/27016683
tagged with: css
has comment: http://stackoverflow.com/comment/42558739
score: 2
accepted answer: http://stackoverflow.com/a/27017018
type: AnsweredQuestion
upvote count: 3
has body: I am developing an application where i want to open a cover on Pageload . Currently it is opening on hover. Also i want to bring out the page from inside to outside after opening the cover. From: LOREM To: IPSUM Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet CSS is too long to copy here so i have copied my code into Jsfiddle JSFiddle Example :- http://jsfiddle.net/rushijogle/4vs0r6zx/ If you dont agree with the question plz dont mark as a negative Thanx in Advance
has title: How to trigger css :hover event on PageLoad
downvote count: 1
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42558839
has answer: http://stackoverflow.com/a/27017018
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/comment/80599245
has text: I am also waiting for the answer
comment on: http://stackoverflow.com/q/27043725
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42732948
comment on: http://stackoverflow.com/a/27109296
type: Comment
score: 0
type: AnswerComment
has text: Brilliant! So glad I came across your other post! :-)

http://stackoverflow.com/comment/42597995
has text: I can see is the same if statement as above; thanks now its working
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27039112
type: AnswerComment

http://stackoverflow.com/comment/42718878
type: Comment
has text: Thanks very much for this. I like the sound of using the `id` but I am new to JQuery so could you elaborate?
score: 0
comment on: http://stackoverflow.com/a/27107822
type: AnswerComment

http://stackoverflow.com/comment/42620868
has text: Is this the full script or does it need to be added onto something?
comment on: http://stackoverflow.com/a/27048035
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42796962
type: AnswerComment
has text: Thanks Amit Joki for the speedy reply! Got it working! Much help.
type: Comment
comment on: http://stackoverflow.com/a/27151096
score: 0

http://stackoverflow.com/comment/42592719
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27035972
has text: the Google Documents List Api 3.0 (proposed in the answer of the question you have posted) are deprecated since 2012.

http://stackoverflow.com/comment/42715909
type: Comment
score: 1
has text: If the "itemCount" computed property depends only on 'items' and not on 'items.length', the computed property value will only be updated when the 'items' property is set; for example to another array, or null. => Your code needs to be more explicit.
type: AnswerComment
comment on: http://stackoverflow.com/a/27050511

http://stackoverflow.com/a/27043888
answers question: http://stackoverflow.com/q/27043781
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You need to append the name or the ID of the image to show to the URL (for example gallery.html?img=img1). You can then use JavaScript in your image gallery code to read this parameter and switch to the image with this name/id.
score: 1
has comment: http://stackoverflow.com/comment/42607921
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27043781

http://stackoverflow.com/comment/42700065
type: AnswerComment
has text: Hi Tim - make sure you add the ID to the file upload control (see above). Also, it will work fine if you add the "$(function(){ $('#fileAttach.... function" below the file upload control as passthru HTML on your form, and it's between tags.
type: Comment
comment on: http://stackoverflow.com/a/27053697
score: 0

http://stackoverflow.com/comment/42643513
comment on: http://stackoverflow.com/q/27064885
score: 0
type: Comment
has text: This is a very broad question with quite a lot of potential solutions. Perhaps you start trying to solve this and then ask a question if you get stuck?
type: QuestionComment

http://stackoverflow.com/a/27075882
answers question: http://stackoverflow.com/q/27075869
score: 0
type: Answer
has body: You need to use cookies for it. At first click, generate a cookies when user clicks at first time and checks if it's available when user click on it.

http://stackoverflow.com/comment/42690484
type: Comment
has text: Since I have to choose any one answer, I have chosen @Scimonster reply as answer for brevity.
type: AnswerComment
comment on: http://stackoverflow.com/a/27092000
score: 0

http://stackoverflow.com/q/27097253
tagged with: d3.js
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
score: 1
accepted answer: http://stackoverflow.com/a/27097629
upvote count: 1
has body: To select all type of "rect" within an svg element we write this svg.selectAll('rect') But, here if i want to select everything within a SVG element including rect and circle and images etc and perform some common operation on all of them, how can I do that?
type: Question
tagged with: javascript
has title: How to select all types of child element inside an SVG using d3.js
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27097629

http://stackoverflow.com/a/27134141
accepted answer of: http://stackoverflow.com/q/27133864
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42769762
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42771268
answers question: http://stackoverflow.com/q/27133864
has body: Try this: {{rec[col.name]}}

http://stackoverflow.com/a/27144396
has body: $('.button-try-glasses').on('click', function (event) { event.preventDefault(); //put it here .... return false; //this must be last line }); hope that works for you
has comment: http://stackoverflow.com/comment/42831141
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27038424

http://stackoverflow.com/comment/42702931
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27096169
has text: Also, what are you replacing it with?
score: 0

kettle
tags question: http://stackoverflow.com/q/27024137
type: Tag
tag name: kettle

http://stackoverflow.com/a/27026959
downvote count: 1
has comment: http://stackoverflow.com/comment/42608484
score: -1
has body: You need to inject 'currentAuth' object only to the Controller where you handle sign-in. Worked for me when i deleted it from all other Controllers.
answers question: http://stackoverflow.com/q/27023887
type: Answer
upvote count: 0

http://stackoverflow.com/q/27103966
has body: I have a field account_type in accounts where it has values Resseller, Partner etc. Accounts has 1:N relationship with contacts. I created a custom field in Contacts of account_type_c where it has same values as of accounts modules. So, when creating a contact if user select Resseller, in the related field for Accounts it should show only accounts of type Resseller. Currently, we have to go to account and create filter here for accounts and than it show accordingly. But I want it to automatically show users the related accounts as per the type selected in the contact. I am using SugarPro 7.2.x. Any help is really appreciated.
type: AnsweredQuestion
type: Question
has title: Sugarcrm: How to filter the accounts according to the type in a relationship field from contacts?
tagged with: javascript
tagged with: sugarcrm
score: 0
answer count: 1
tagged with: backbone.js
tagged with: php
has answer: http://stackoverflow.com/a/31379589
accepted answer: http://stackoverflow.com/a/31379589

http://stackoverflow.com/a/27028427
has body: That angularjs.org error link tells you what the problem is. Unknown provider: aProvider &lt;- a &lt;- solrquery Angular's injector is looking for a dependency called a which is specified in the function parameters for the solrquery service: solr1.service('solrquery',function(a) { Your service definition needs to be reworked. This is a good reference for how you should be defining services: angular.service vs angular.factory.
score: 0
answers question: http://stackoverflow.com/q/27027821
has comment: http://stackoverflow.com/comment/42583669
type: Answer

http://stackoverflow.com/q/27138694
tagged with: javascript
linked to: http://stackoverflow.com/q/25148409
tagged with: ionic-framework
has body: I am trying to prevent the android back button from going back on a certain page of my application. Everywhere online suggest the code below, however it is not working. I put a breakpoint in the 'backbutton' event listener, it hits it just fine. However the app still goes back a page. I am using Ionic on top of Cordova(4.0.0). I am testing it using an Android(4.4.2) emulator. Any Thoughts? Here is the code I am using. document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { document.addEventListener("backbutton", function (e) { e.preventDefault(); }, false ); }
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27142466
tagged with: android
has title: Prevent Android back button functionality
possible better answer: http://stackoverflow.com/a/27140246
has answer: http://stackoverflow.com/a/27140246
type: AnsweredQuestion
tagged with: cordova
has comment: http://stackoverflow.com/comment/42776773
accepted answer: http://stackoverflow.com/a/27142466
type: Question

http://stackoverflow.com/comment/42631732
has text: This represents a matrix filled with data that is stored in a file and used across the webapplication. As this is not my code I have no clue wheater or not the implemented solution is the only/best way to achieve this
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27058223
type: AnswerComment

http://stackoverflow.com/q/27151717
score: 0
has answer: http://stackoverflow.com/a/27170804
answer count: 1
tagged with: highcharts
tagged with: jquery
has comment: http://stackoverflow.com/comment/42799570
has comment: http://stackoverflow.com/comment/42825457
has title: Highcharts: Preventing Users from unchecking all Legends in the chart
has body: How can I make sure that the last checked legend does not get unchecked?
has comment: http://stackoverflow.com/comment/42825937
type: UnansweredQuestion
type: Question
tagged with: javascript

http://stackoverflow.com/a/27060053
has body: ng-style accepts an Angular expression that evaluates to an object. This means that if you want to use a variable inside that expression, you can use it directly (without the double-curlies): ng-style="{width: liWidth + 'px'}" Double-curlies are used when you want to insert a dynamic, interpolated value to an argument that accepts a string, like &lt;img alt="{{product.name}} logo"&gt;. You then put an expression inside those brackets.
type: Answer
answers question: http://stackoverflow.com/q/27058878
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27058878
score: 8
upvote count: 8

http://stackoverflow.com/comment/120022775
score: 0
comment on: http://stackoverflow.com/q/27133690
type: Comment
type: QuestionComment
has text: Check [this](https://stackoverflow.com/questions/11703684/using-ie-conditional-comments-inside-a-stylesheet).

http://stackoverflow.com/q/27131346
duplicate of: http://stackoverflow.com/q/17863066
has comment: http://stackoverflow.com/comment/42761917
type: UnansweredQuestion
has title: Underscore replace new line characters with line break
score: -3
has comment: http://stackoverflow.com/comment/42761801
linked to: http://stackoverflow.com/q/17863066
type: Question
tagged with: underscore.js-templating
has body: I have a micro-template bringing in strings from a rest call, but the strings are not formatted in the way they were originally entered. The following works: &lt;%= message.replace(new RegExp('\d', 'g'), '&lt;br /&gt;&lt;br /&gt;') %&gt; However, this allows scripts to be entered and will execute when the template is shown. I also tried this: &lt;%- message.replace(new RegExp('\d', 'g'), '&lt;br /&gt;&lt;br /&gt;') %&gt; But this just prints &lt;br /&gt; text in the html. Basically I need a combination of the two, allowing the template to create the new line without letting scripts entered from the rest call through.
tagged with: underscore.js
downvote count: 3
tagged with: replace
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27131393
tagged with: javascript
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/a/27146925
answers question: http://stackoverflow.com/q/27146826
has body: I guess for (var i = 0; i &lt; row.length; i++) { delete row[i].lat; delete row[i].long; } For is faster than forEach and using delete is obviously
has comment: http://stackoverflow.com/comment/42789513
upvote count: 4
has comment: http://stackoverflow.com/comment/42789361
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42789605
score: 4
has comment: http://stackoverflow.com/comment/42789273
has comment: http://stackoverflow.com/comment/42789381
type: Answer
accepted answer of: http://stackoverflow.com/q/27146826

http://stackoverflow.com/a/27105885
has comment: http://stackoverflow.com/comment/42715616
has body: .load only pulls the HTML - not CSS, JS, etc. I suggest you import the styles and scripts, or -- less preferably -- use an &lt;iframe&gt;.
has comment: http://stackoverflow.com/comment/42715381
accepted answer of: http://stackoverflow.com/q/27105834
answers question: http://stackoverflow.com/q/27105834
has comment: http://stackoverflow.com/comment/42715390
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42715295
score: 2

http://stackoverflow.com/q/27111117
has comment: http://stackoverflow.com/comment/42725137
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42725387
downvote count: 1
type: Question
has title: window.onerror only works within tags?
upvote count: 0
has answer: http://stackoverflow.com/a/27111175
tagged with: javascript
has comment: http://stackoverflow.com/comment/42725227
has body: I have a small little window.onerror script that looks like this: window.onerror = function(message, url, linenumber) { console.log('JavaScript error: ' + message + ' on line ' + linenumber + ' for ' + url); } The problem, is that it only works if I put it on an html page within tags like this: &lt;script&gt; window.onerror = function(message, url, linenumber) { console.log('JavaScript error: ' + message + ' on line ' + linenumber + ' for ' + url); } &lt;/script&gt; However, I'd like to put it in a separate .js file so multiple pages can use it.
answer count: 1
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/42725160
accepted answer: http://stackoverflow.com/a/27111175

http://stackoverflow.com/a/27120156
score: 1
type: Answer
answers question: http://stackoverflow.com/q/27069306
accepted answer of: http://stackoverflow.com/q/27069306
upvote count: 1
has body: Try to use .hover(): http://api.jquery.com/hover/ $('.responsive').hover(function() { $('.close').remove(); bgColor = $('.active .card-front').css('background-color'); ...... });
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27121115
favorite count: 0
has comment: http://stackoverflow.com/comment/42743741
has title: compare two arrays and check the check box if value present in array2
type: AnsweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/42750094
has answer: http://stackoverflow.com/a/27126643
type: Question
tagged with: javascript
downvote count: 4
has body: I have two arrays called array1 and array2. I want to compare both and want to check the checkbox if value present in array2. ex : array1.compare(array2){ &lt;input type="checkbox" id="myCheckbox" checked="checked" /&gt; } Please help me and Thanks in Advance.
upvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27126643

http://stackoverflow.com/q/26997470
linked to: http://stackoverflow.com/q/24039599
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42969053
has title: Vectorize canvas drawing
has comment: http://stackoverflow.com/comment/42530855
has answer: http://stackoverflow.com/a/26997772
type: Question
tagged with: canvas
tagged with: javascript
score: 0
answer count: 1
has body: I'm working in image edition in JavaScript. I have to create mask with different tools (rectangle, brush, magic wand...) and save it to the database. To avoid sending all the pixels coordinates, I'd like to vectorize the mask and send only the vertex. How can I get that vertex from the CANVAS context?

loops
tags question: http://stackoverflow.com/q/27070599
tags question: http://stackoverflow.com/q/27032973
tags question: http://stackoverflow.com/q/27072638
tags question: http://stackoverflow.com/q/27140772
tags question: http://stackoverflow.com/q/27025765
tags question: http://stackoverflow.com/q/27084018
type: Tag
tags question: http://stackoverflow.com/q/27132702
tags question: http://stackoverflow.com/q/27047956
tags question: http://stackoverflow.com/q/27104030
tags question: http://stackoverflow.com/q/27123911
tags question: http://stackoverflow.com/q/27088776
tags question: http://stackoverflow.com/q/27082394
tags question: http://stackoverflow.com/q/27022915
tags question: http://stackoverflow.com/q/27076886
tags question: http://stackoverflow.com/q/27125457
tags question: http://stackoverflow.com/q/27078668
tag name: loops
tags question: http://stackoverflow.com/q/27072040
tags question: http://stackoverflow.com/q/26997412
tags question: http://stackoverflow.com/q/26993177
tags question: http://stackoverflow.com/q/27147301
tags question: http://stackoverflow.com/q/27141977
tags question: http://stackoverflow.com/q/27089628
tags question: http://stackoverflow.com/q/27114814
tags question: http://stackoverflow.com/q/27111156
tags question: http://stackoverflow.com/q/27140934

http://stackoverflow.com/a/27116902
upvote count: 9
accepted answer of: http://stackoverflow.com/q/27116876
has comment: http://stackoverflow.com/comment/109385764
answers question: http://stackoverflow.com/q/27116876
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/109388310
score: 9
has comment: http://stackoverflow.com/comment/42737387
type: Answer
has body: This is pretty simple using a negative character class: str = str.replace(/[^\w.-]+/g, ""); The only gotcha is that the - needs to be either first or last in the list, because it can be interpreted as the range operator.

http://stackoverflow.com/q/27082303
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27082357
type: Question
has title: Download text file, and save as a string in nodejs
tagged with: node.js
linked to: http://stackoverflow.com/q/6847697
upvote count: 1
has body: I recently started to programming javascript on server side(node js), and i have a really simple trouble, that i can't solve :S I want to download a txt file, and save it as a string variable. This is my atempt: var consensus; http.get('random/url/consensus.txt' , function(res) { res.on('data', function (chunk) { consensus = ('BODY: ' + chunk);}); }); console.log(consensus) When i run the script it said "consensus" is undefined, but when i change consensus = ('BODY: ' + chunk);}); this line to this console.log('BODY: ' + chunk);}); its print out the string (file) that i want to save as string. Ohh before i forget to mention, I want to find a solution only with the standard libs.
answer count: 1
accepted answer: http://stackoverflow.com/a/27082357
duplicate of: http://stackoverflow.com/q/6847697
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/comment/42723350
type: Comment
score: 2
has text: I would recommend *never* injecting Javascript into a page (if you can help it). Just inject values into `data-` attribute on the required elements and pick those up from the JQuery code. This allows a single piece of code to handle multiple controls.
comment on: http://stackoverflow.com/q/27107810
type: QuestionComment

http://stackoverflow.com/a/27141933
score: 0
has body: Here is complete to code for that var dateToday = new Date(); $(".datefrom" ).datepicker({ dateFormat: 'dd/mm/yy', minDate: dateToday, onClose: function( selectedDate ) { $( ".dateto" ).datepicker( "option", "minDate", selectedDate ); }, onSelect: function(selectedDate) { var option = this.class == "datefrom" ? "minDate" : "maxDate", instance = $(this).data("datepicker"), date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings); } }); $(".dateto" ).datepicker({ dateFormat: 'dd/MM/yyyy', onClose: function( selectedDate ) { $( ".datefrom" ).datepicker( "option", "maxDate", selectedDate ); } }); $('.datefrom,.dateto').change(selector) It will disable the previous date in from calender and according to the selection done in from calender the to calender will get updated automatically and disabled previous date..
type: Answer
answers question: http://stackoverflow.com/q/27047810

http://stackoverflow.com/comment/42639627
type: Comment
has text: And try with: `$target_dir = "./books/";`
type: QuestionComment
comment on: http://stackoverflow.com/q/27062629
score: 0

http://stackoverflow.com/comment/42551048
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27011059
type: AnswerComment
has text: This is what I wanted. But I tried to embed this code in my code and it is not working. As I am adding the table content through the script code. but it is not listening to the on change event.

http://stackoverflow.com/comment/42769429
score: 0
comment on: http://stackoverflow.com/q/27135563
has text: Which characters are you willing to accept as valid for the "at least two characters"? Letters, numbers, any special characters different from `*`?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27047210
score: 1
accepted answer: http://stackoverflow.com/a/27048625
type: AnsweredQuestion
tagged with: phantomjs
tagged with: javascript
has answer: http://stackoverflow.com/a/27048625
type: Question
has body: I am trying to parse information out of an RSS feed for testing. I am using CasperJS for tests and PhantomJS for capturing screenshots. When I navigate to the RSS feed, I took a screenshot and saw that all the XML tags are stripped and its just text. I need the tags as I need the pubDate tag value from the feed for my tests. Can I in anyway get the feed in the original form ? checkRSSFeed = function() { //first I navigate to a certain page in my website var href = ''; casper.then(function() { this.test.assertExists(x('//a[contains(@href, "SUBSTRING OF URL")]'), 'the element exists'); href = casper.getElementAttribute(x('//a[contains(@href, "SUBSTRING OF URL")]'), 'href'); }).then(function() { this.open(href); }).then(function() { this.echo(this.getCurrentUrl()); casper.capture(PATH_TO_SCREENSHOT); }); }; Below is a screenshot of the version of RSS seen by PhantomJS
upvote count: 1
answer count: 1
has title: PhantomJs strips all the XML tags from RSS feed
favorite count: 0
linked to: http://stackoverflow.com/q/26931073
has comment: http://stackoverflow.com/comment/42614460
has comment: http://stackoverflow.com/comment/42614213
tagged with: http://stackoverflow.com/tag/xml
tagged with: casperjs
downvote count: 0
tagged with: rss

http://stackoverflow.com/q/27038704
answer count: 2
has answer: http://stackoverflow.com/a/28291416
has body: I have a basic question. Say I have a Uint16Array and I have number 4 in it. data_16=new Uint16Array([4]); Now I have a length 1 and byteLength 2; how do i convert this to Uint8Array. I do not want to create a new view. data_8 = new Uint8Array(data_16) If I do this I get array length 1 and byteLength 1. This is not what I want. I need to stretch that 16 bit value in 16array into 8 bit values so that 8bit array so it would end up with 2 values int 8 bit array. I can just create a funtion which converts with shif and to all that stuff. But Can it be done with Array manipulation only?
downvote count: 0
tagged with: javascript
tagged with: uint16
favorite count: 0
possible better answer: http://stackoverflow.com/a/74916785
tagged with: arraybuffer
has answer: http://stackoverflow.com/a/74916785
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28291416
upvote count: 9
has title: Uint16Array to Uint8Array
type: Question
score: 9

http://stackoverflow.com/q/27084970
answer count: 3
possible better answer: http://stackoverflow.com/a/27085053
favorite count: 0
tagged with: ajax
has title: How to populate text input type based on select input type?
has comment: http://stackoverflow.com/comment/42679021
tagged with: php
has answer: http://stackoverflow.com/a/27085544
accepted answer: http://stackoverflow.com/a/27085544
has body: I am new to web development. I want to know how to populate text input type based on select drop down. Say I am selecting branch and I want its employee number automatically in text box. Can it be done using AJAX? If yes how? I want employee number from MySQL database. Plus I want to display its arrival time in other text input from same MySQL table. Thanks in advance.
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42678891
tagged with: mysql
has answer: http://stackoverflow.com/a/27085053
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42679069
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27085089

http://stackoverflow.com/q/27093415
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42692864
accepted answer: http://stackoverflow.com/a/27094809
tagged with: css
upvote count: 1
type: AnsweredQuestion
has body: I have 3 dropdownlists and each inside its own DIV. The DIVs are called fromCity, WithinStateLimits and OutOfState. What I am trying to accomplish with the jQuery script below is that if a user selects from the dropdownList inside the fromCity DIV, hide the other two DIVs. If user selects from the dropdownList inside the WithinStateLimits DIV, then the other two DIVs should be hidden. If user selects from the dropdownList inside the OutOfState DIV, then the other two DIVs need to be hidden. Finally, by default, only the dropdownlist inside the fromCity DIV should be visible on page load. Any ideas how to make this work? Thanks alot in advance Re: How do I show different options based on selected value from dropdownList? a few seconds ago|LINK Thanks a lot A2H, Since I feel a bit more comfortable with jQuery, I tried the below code but it doesn't work. &lt;script type="text/javascript"&gt; $('#tripType').change(function () { var SelectedValue = $('#&lt;%= tripType.ClientID %&gt; option:selected').val(); if ((SelectedValue == 'one_way_to_airport') | (SelectedValue == 'one_way_from_airport') | (SelectedValue == 'round_trip_airport') | (SelectedValue == 'One-way trip NOT involving Airport') | (SelectedValue == 'Round trip NOT involving Airport')) { $('#fromCity').fadeIn(); $('#WithinStateLimits').fadeOut(); $('#OutOfState').fadeOut(); } else if (value == 'hourly') { // Show or hide $('#fromCity').fadeOut(); $('#OutOfState').fadeOut(); $('#WithinStateLimits').fadeIn(); } else { // value == 'Long_Distance' $('#fromCity').fadeOut(); $('#WithinStateLimits').fadeOut(); $('#OutOfState').fadeIn(); } }); &lt;/script&gt; &lt;asp:DropdownList ID="tripType" runat="server" class="select "&gt; &lt;asp:ListItem value=""&gt;--Select One--&lt;/asp:ListItem&gt; &lt;asp:ListItem value="one_way_to_airport"&gt;One-way trip TO Airport&lt;/asp:ListItem&gt; &lt;asp:ListItem value="one_way_from_airport"&gt;One-way trip FROM Airport&lt;/asp:ListItem&gt; &lt;asp:ListItem value="round_trip_airpor…
score: 1
has comment: http://stackoverflow.com/comment/42692743
has title: Show a specific dropdownList based on selected VALUE from another dropdownList
has answer: http://stackoverflow.com/a/27094809

http://stackoverflow.com/q/27127964
tagged with: jsoup
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42755944
type: Question
has comment: http://stackoverflow.com/comment/42755145
score: 0
tagged with: web-scraping
has title: Site Scraping for JavaScript rendered site
has body: I'm trying to get the part numbers of which items go in their respective categories from http://www.dynacorn.com/ListItems.aspx but, for me at least, the catch is that the pages are paginated and therefore I cannot figure out how to move on to the next page. I've been reading about JSoup but am unsure of how to implement this. Can someone show me an example of how I could go from page to page when scraping? Thanks!
has comment: http://stackoverflow.com/comment/42926434

http://stackoverflow.com/q/27016963
has answer: http://stackoverflow.com/a/27039973
type: Question
has comment: http://stackoverflow.com/comment/42586967
upvote count: 0
answer count: 1
favorite count: 0
has body: I'm Using Cordova, Phone-Gap, with Android Studio, I have Created a Project it's working fine but I'm unable to create or open existing java script file in android studio, even existing JavaScript files are showing like a folder or directory when I click on them nothing happens, Looking for a quick response Thanks. https://i.sstatic.net/93fBH.png
accepted answer: http://stackoverflow.com/a/27039973
tagged with: android-studio
tagged with: cordova
downvote count: 2
has title: Unable to Create or Open JavaScript file in Android-Studio
type: AnsweredQuestion
score: -2
tagged with: javascript

http://stackoverflow.com/q/27057529
possible better answer: http://stackoverflow.com/a/27061416
has answer: http://stackoverflow.com/a/27061416
tagged with: phpmyadmin
tagged with: php
type: AnsweredQuestion
tagged with: mathml
has answer: http://stackoverflow.com/a/27063081
type: Question
answer count: 2
tagged with: javascript
tagged with: ckeditor
has title: ckeditor Mathml plugin installation
score: 0
has body: I have been struggling to add mathml support for ckeditor . I have gone through few links but none seems to be working. I have even tried WIRIS plugin for ckeditor but it didn't gave me any result. For WIRIS i have followed this link. Can someone please tell me how do I Implement mathml for ckeditor.? CKeditor Version: 4.4.5 Thanks,
accepted answer: http://stackoverflow.com/a/27063081

http://stackoverflow.com/q/27147685
has comment: http://stackoverflow.com/comment/42803039
type: Question
has comment: http://stackoverflow.com/comment/42790807
tagged with: javascript
tagged with: base64
has comment: http://stackoverflow.com/comment/42791493
has comment: http://stackoverflow.com/comment/42794879
has title: How to display PNG image to Image
tagged with: html5-canvas
has body: I'm using "Canvas2Image" JavaScript tool to convert canvas drawings to PNG images.What I need now is to turn those PNG format to exact image.. how to display PNG in php after convert.my code for convert PNG.. onrendered: function (canvas) { theCanvas = canvas; var a = Canvas2Image.saveAsPNG(canvas, true); //Canvas2Image.saveAsPNG(canvas); var data = new FormData(); data.append("_imgCalendar", a.src); data.append("TXNID", '&lt;?php echo $this-&gt;request-&gt;data['Plotting']['ID']; ?&gt;'); var ajaxRequest = $.ajax({ type: "POST", url: url, contentType: false, processData: false, data: data, success: function (data) { location.href = "&lt;?php echo $this-&gt;Html-&gt;url(array('plugin'=&gt;'hrms','controller'=&gt;'Plottings/SaveCalendar')); ?&gt;"; } }); } and i am trying to convert into exact image .. echo '&lt;img src="data:image/jpeg;base64,' . base64_encode($this-&gt;request-&gt;data['_imgCalendar']) . '" /&gt;'; so please suggest mi appropriate answer.
tagged with: php
answer count: 0
type: UnansweredQuestion
score: 0

http://stackoverflow.com/q/26999206
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/33789354
score: 1
has comment: http://stackoverflow.com/comment/42528872
has comment: http://stackoverflow.com/comment/42566366
type: Question
favorite count: 0
has title: parsley.js not displaying error messages in french
has answer: http://stackoverflow.com/a/27001211
has comment: http://stackoverflow.com/comment/42602327
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/42532494
has comment: http://stackoverflow.com/comment/42532223
has answer: http://stackoverflow.com/a/60060513
tagged with: parsley.js
has body: I've got Parsley.js installed and working correctly (dead easy) however I am unable to get it to display error messages in French. I've tried both methods detailed in the documentation But error message continue to display in English. I've checked the console and there are no errors, I can also load the language file directly in the browser so it is there. My current code is: Please advise.

http://stackoverflow.com/a/26998801
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26998372
has comment: http://stackoverflow.com/comment/42527989
score: 1
answers question: http://stackoverflow.com/q/26998372
has comment: http://stackoverflow.com/comment/42527974
type: AcceptedAnswer
downvote count: 0
has body: var targ = "#"+e.target.id; must be more specific like var targ = "#page_12 #"+e.target.id; This is because you are using the same IDs for each page.

http://stackoverflow.com/q/27073090
type: AnsweredQuestion
score: 0
type: Question
has body: Hello the answer to this question with this fiddle is perfect for what I need to do - drag something along a path. However they used Rapael - I'd like to update things and use snap.svg instead. Replacing the reference from Raphael to Snap in this answer doesn't work - does anyone have any ideas why? This is as far as I've got in this codepen - I want to have a 10 point shape - the outer points of which can move a long a path to the centre. var s = Snap("#svg"); var paths = [], points = [], circles = [], lines = [], l = 0, searchDl = 1; var dist = function (pt1, pt2) { var dx = pt1.x - pt2.x; var dy = pt1.y - pt2.y; return Math.sqrt(dx * dx + dy * dy); }; var gradSearch = function (l0, pt, path) { var totLen = path.getTotalLength(); l0 = l0 + totLen; var l1 = l0, dist0 = dist(path.getPointAtLength(l0 % totLen), pt), dist1, searchDir; console.log(dist0); if (dist(path.getPointAtLength((l0 - searchDl) % totLen), pt) &gt; dist(path.getPointAtLength((l0 + searchDl) % totLen), pt)) { searchDir = searchDl; } else { searchDir = -searchDl; } l1 += searchDir; dist1 = dist(path.getPointAtLength(l1 % totLen), pt); console.log(dist1); while (dist1 &lt; dist0) { dist0 = dist1; l1 += searchDir; dist1 = dist(path.getPointAtLength(l1 % totLen), pt); } l1 -= searchDir; console.log(l1 % totLen); return (l1 % totLen); }; var startCircleToPoly = function () { // storing original coordinates this.ox = this.attr("cx"); this.oy = this.attr("cy"); this.attr({opacity: 1}); }; var moveCircleToPoly = function (dx, dy) { var tmpPt = { x : this.ox + dx, y : this.oy + dy }; var path = paths[this.data('int')]; // move will be called with dx and dy l = gradSearch(l, tmpPt, path); //console.log(l); pt = path.getPointAtLength(l); this.attr({cx: pt.x, cy: pt.y}); }; var endCircleToPoly = function () { // restoring state this.attr({opacity: 1}); }; for(var i = 1; i &lt;= 10; i++){ //polygon points points.push( s.select('#line' + i).attr('x2') + ' ' + s.select('#line' + i).attr('y2') ); paths.push( s.pa…
accepted answer: http://stackoverflow.com/a/27077037
tagged with: javascript
tagged with: raphael
has title: Drag along path snap.svg
answer count: 1
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/27077037

camera
tags question: http://stackoverflow.com/q/27144274
type: Tag
tags question: http://stackoverflow.com/q/27043534
tag name: camera

http://stackoverflow.com/comment/42645903
type: Comment
comment on: http://stackoverflow.com/q/27066237
type: QuestionComment
score: 0
has text: what did you mean with one( ?

http://stackoverflow.com/a/31611218
score: 7
has body: The parsed variable is the URL from the service in question. It is undefined for one of the following reasons: URL is malformed $http.get is not called token is not defined sucess and error callbacks have no data .respond is not called .respond does not include a response object as an argument For example: describe('simple test', test); function test() { it('should call inviteService and pass mock data', foo); function foo() { module('myapp.services'); inject(myServiceTest); function myServiceTest(inviteService, $httpBackend) { $httpBackend.expect('GET', /.*/).respond(200, 'bar'); function callback(){}; inviteService.getInvite.token = '1123581321'; inviteService.getInvite(callback, callback); $httpBackend.flush(); expect(callback).toHaveBeenCalledOnce(); } } } References AngularJS source: angular-mocksSpec.js - "should throw exception when only parsed body differs from expected body object" AngularJS source: urlUtils.js AngularJS source: urlUtilsSpec.js
upvote count: 7
type: Answer
answers question: http://stackoverflow.com/q/27048392
downvote count: 0

http://stackoverflow.com/q/27018768
has answer: http://stackoverflow.com/a/27018809
favorite count: 0
has answer: http://stackoverflow.com/a/27018825
has comment: http://stackoverflow.com/comment/42562530
accepted answer: http://stackoverflow.com/a/27018813
has comment: http://stackoverflow.com/comment/42562843
upvote count: 1
possible better answer: http://stackoverflow.com/a/27018825
has body: Example css: div { background-color: green; } Example html: apple 1 apple 2 apple 3 Is it possible to bind jquery clicks to these, so that the clicked div will change background color to blue, and the others will revert back to the default color? I'm thinking something like: $("div").click(function() { // first change all to default color $("div").each( background-color: green; } // then change the clicked div to blue how to get the clicked element in here I dont know. });
has title: jQuery: is it possible to make ID/class-less elements change on click?
type: AnsweredQuestion
score: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42562316
tagged with: jquery
has answer: http://stackoverflow.com/a/27018813
answer count: 3
downvote count: 0

http://stackoverflow.com/comment/42575685
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27009176
has text: Ahhh I understand now. You should edit your original question stating that. [here's a SO post that talks about this at great length](http://stackoverflow.com/questions/6421966/css-overflow-x-visible-and-overflow-y-hidden-causing-scrollbar-issue). Looks like a work around would be to add some wrapping divs.

http://stackoverflow.com/comment/42595666
score: 2
comment on: http://stackoverflow.com/q/27037625
has text: Well, there is a catch-all answer for questions like "why in javascript <some weird kind of thing>?" - because they had only ten days to create it. Just like the world we live in.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27042535
tagged with: mongoose
tagged with: javascript
has comment: http://stackoverflow.com/comment/42604408
answer count: 3
linked to: http://stackoverflow.com/q/19961387
has answer: http://stackoverflow.com/a/27051465
tagged with: node.js
favorite count: 0
has title: Basic node/mongo/mongoose connection not working
has answer: http://stackoverflow.com/a/53932879
upvote count: 1
has body: I'm new to MEAN stack development. I've created a database in MongoDB called 'framework' and a collection called 'users' with some json in. I can see that's all there and happy using mongo commands through Mac terminal. Now I'm writing some Mongoose in my application and to test everything is working, I just want to get a list of the collection names. I tried this: var mongoose = require("mongoose"); mongoose.connect("mongodb://localhost/framework"); mongoose.connection.db.collectionNames(function (err, names) { if (err) console.log(err); else console.log(names); }); But when I run that file through the command line, it doesn't log anything at all. What am I doing wrong here?
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27051465
possible better answer: http://stackoverflow.com/a/41360079
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/41360079
has comment: http://stackoverflow.com/comment/42604535
downvote count: 0
tagged with: mean-stack

http://stackoverflow.com/q/27091046
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27091099
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27091099
has title: Create event function gets executed in creation
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/152975
has body: I've tried searching for an explanation to my issue below but it's possible the keywords I used are to ambiguous.. so I turn to you. I'm trying to implement a click outside menu to close based on this code here which is: $('#menuscontainer').click(function(event) { //your code that shows the menus fully //now set up an event listener so that clicking anywhere outside will close the menu $('html').click(function(event) { //check up the tree of the click target to check whether user has clicked outside of menu if ($(event.target).parents('#menuscontainer').length==0) { // your code to hide menu //this event listener has done its job so we can unbind it. $(this).unbind(event); } }) }); However it seems the function in $('html').click... gets executed when clicking on the #menucontainer so it just open and immediately closes. I've simplified it to: $('.trig').click(function () { $('.menu').show(); $('body').click( function () { alert('boo'); }); }); Here's the JSFiddle link. As you can see alert gets executed when .trig is clicked on. So instead of just creating the even listener, it seems to already be listening. Can someone please explain this to me? Thanks.
type: Question

http://stackoverflow.com/q/26994603
possible better answer: http://stackoverflow.com/a/26995115
accepted answer: http://stackoverflow.com/a/26994919
has comment: http://stackoverflow.com/comment/42519775
has body: I could not figure out how to stop image intervals when the mouse is over the image. var myImage = document.getElementById("world"); var imageArray = ["imgs/worldGray.png","imgs/worldGreen.png","imgs/worldPink.png", "imgs/worldYellow.png", "imgs/world.png"];//html picture add here var imageIndex=0; function changeImage(){ myImage.setAttribute("src",imageArray[imageIndex]); imageIndex++; if(imageIndex >=imageArray.length){ imageIndex =0; } } var intervalHandle=setInterval(changeImage,5000); // the problem is in the below fucntions myImage.onmouseover = function(){ clearInterval(intervalHandle); } myImage.onmouseout = function(){ setInterval(intervalHandle); }
favorite count: 0
downvote count: 2
score: -2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26994919
has title: javascript interval stop on moueover
type: Question
has answer: http://stackoverflow.com/a/26995115
answer count: 2
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42690595
type: QuestionComment
comment on: http://stackoverflow.com/q/27091888
has text: What is the actual intension.? Two options i thinks of without complete understanding of your problem. 1) all variable will be defined in window property. By doing some logic we can get the variables. otherwise initialize the variable in seperate object itself.
score: 0
type: Comment

http://stackoverflow.com/q/27094680
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27096404
type: Question
has body: I have a problem where I'm generating many values and need to make sure I only work with unique ones. Since I'm using node js, with the --harmony flag, and have access to harmony collections, I decided that a Set may be an option. What I'm looking for is something similar to the following example: 'use strict'; function Piece(x,y){ this.x = x this.y = y } function Board(width,height,pieces){ this.width = width this.height = height this.pieces = pieces } function generatePieces(){ return [ new Piece(0,0), new Piece(1,1) ] } //boardA and boardB are two different but equivalent boards var boardA = new Board(10,10,generatePieces()) var boardB = new Board(10,10,generatePieces()) var boards = new Set() boards.add(boardA) boards.has(boardB) //return true Now normally to achieve this in another language, say c#, I would expect to have to implement an equals function, as well as a hash code generating function for both Board and Piece. Since I'd expect the default object equality to be based on references. Or perhaps use a special immutable value type (say, a case class in scala) Is there a means to define equality for my objects to solve my problem?
tagged with: ecmascript-6
tagged with: ecmascript-harmony
answer count: 2
downvote count: 0
tagged with: javascript
has title: user defined object equality for a set in harmony (es6)
accepted answer: http://stackoverflow.com/a/27096404
possible better answer: http://stackoverflow.com/a/27094832
favorite count: 0
has answer: http://stackoverflow.com/a/27094832
score: 11
upvote count: 11

http://stackoverflow.com/a/26997896
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42526461
score: 1
has comment: http://stackoverflow.com/comment/42526348
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26997757
has body: If I understand correctly, you'd like to only fade in the list items that have a data-filter attribute that is in your comma-seperated list: var values = '84, 95, 10', valArr = values.split(', '); if(jQuery('body').hasClass('term-espectaculos')){ jQuery('.filters li').filter(function(){ var thisFilter = ($(this).attr('data-filter') || '').replace('.filter-',''); return $.inArray(thisFilter, valArr) &gt; -1; }).fadeIn(); } JSFiddle Note that this requires that your values in string form are split up by precisely a comma and a space. You may want to split on just a comma and then trim your array values: var values = '84, 95, 10', valArr = $.map(values.split(','), function(v){ return $.trim(v); });
answers question: http://stackoverflow.com/q/26997757

http://stackoverflow.com/q/27041795
has comment: http://stackoverflow.com/comment/42602837
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: -4
has answer: http://stackoverflow.com/a/27042748
has title: Angularjs controller get the next three month third wed
type: Question
has body: I am part of a group that every third Wednesday of the month, we meet. On the current site we manually put these dates in. In my angularJS controller I would like to get the next three meeting dates. I thought about a JSON file but again that is manual entry. Is there a way with pure JS to do this? I have looked at http://momentjs.com/docs/ and http://www.datejs.com/ but I would like to do this in the controller and not a separate JS file. Current site (http://cs.millersville.edu/~katz/lcac/) Look at the next meeting section. I currently manually enter those dates. I want to generate them on page load
upvote count: 0
tagged with: javascript
downvote count: 4

http://stackoverflow.com/q/27012576
has body: In mymodule.js var fs = require('fs') var path = require('path') module.exports = function(dir, extension, callback){ fs.readdir(dir, function(error, files){ if(error) return callback(error) else { var res = files.filter(function(file){ return path.extname(file).slice(1) === extension;}); callback(null, res) } } } In program.js: var mymodule = require("./mymodule") var path = require("path") var dirname = process.argv[2] var extension = process.argv[3] mymodule(dirname, extension, function(error, files){ if(!error) console.log(files); } when I run node program.js /home/elqstux/ "erl", there is a compile error: /home/elqstux/javascripting/mymodule.js:12 } ^ SyntaxError: Unexpected token } at Module._compile (module.js:439:25) 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 Module.require (module.js:364:17) at require (module.js:380:17) at Object.&lt;anonymous&gt; (/home/elqstux/javascripting/program.js:1:78) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) But I can not find the reason, who can help me?
has answer: http://stackoverflow.com/a/27012770
type: UnansweredQuestion
type: Question
has title: When I compile NodeJS, I get an compile error
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27012607
tagged with: node.js

http://stackoverflow.com/comment/42619346
comment on: http://stackoverflow.com/a/27049917
score: 0
type: Comment
has text: @Proless I've added a jsfiddle, maybe it will be easiest to copy from there?
type: AnswerComment

http://stackoverflow.com/comment/42652495
type: Comment
has text: @LegoStormtroopr: Added, it just seemed like a too simple question and thus would have a catch. :)
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27069355

http://stackoverflow.com/comment/42661439
has text: Hi @stanced, Can you provide fiddle with some HTML ?
comment on: http://stackoverflow.com/q/27074982
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42549385
type: QuestionComment
has text: can you create a jsfiddle out of this?
comment on: http://stackoverflow.com/q/27011019
score: 0
type: Comment

http://stackoverflow.com/a/27061238
has body: you can remove it from the cluster and add it to the map... cluster.removeLayer(theMarker); map.addLayer(theMarker);
answers question: http://stackoverflow.com/q/27059823
score: 2
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/42729409
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27113329
has text: This code? `wordCounts[word] =....` Maybe the line break is confusing you. If wordCounts[word] exists, increment it, otherwise set it to 1 (because it's a new entry). And it is not an array, it is an object where the members can be accessed using a dictionary/array type syntax.

http://stackoverflow.com/comment/43558410
type: AnswerComment
comment on: http://stackoverflow.com/a/27551173
score: 0
has text: Thanks Poul. I tried this example before but got same result as bellows: ERROR @OpenLaszloClient.lzx#15: reference to undefined variable 'xml_socket' ERROR: Invalid event sender: xml_socket => (void 0) (for event onConnect) Did you run it successfully? However, now I can do bidirectional connection by RTMP via red5.
type: Comment

http://stackoverflow.com/comment/42655601
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27071187
type: Comment
has text: Yes that works. I still find it unpleasantly puzzling that HTML selector initialization doesn't work. There must be some conflict somewhere and it may come to haunt me again. Thanks though.

http://stackoverflow.com/a/27053816
has comment: http://stackoverflow.com/comment/42625260
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42624493
accepted answer of: http://stackoverflow.com/q/27053782
answers question: http://stackoverflow.com/q/27053782
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/42624438
has comment: http://stackoverflow.com/comment/42624499
upvote count: 4
has body: todomvc.factory('todoStorage', function ($q,$http) { var STORAGE_ID = 'todos-angularjs-perf'; function get(){ return $http.get('http://localhost/test.php'); } return{get:get}; }); //call the service like this todoStorage.get().then(function(res){ $scope.todos = res.data; }); Your code is not returning the actual service factory. Since you are using factory you have return some JavaScript object pointing to your internal function. Otherwise it's not a valid factory, and your external code will have no way of getting to the internal get function.

http://stackoverflow.com/comment/42798974
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27152041
has text: I dont think speed & performance is a matter when you are **debugging** speed & performance. :)

http://stackoverflow.com/a/27012672
type: Answer
downvote count: 1
score: 1
has body: I suppose that each function makes some ajax request or animation function A() { return $.ajax(....); // or // return $('#animate').animate({ width: 100 }, 1000 ).promise(); // or // var def = $.Defered(); // in async function def.resolve(); // return def.promise(); } function B() { return $.ajax(....); // or // return $('#animate').animate({ width: 200 }, 3000 ).promise(); // var def = $.Defered(); // in async function def.resolve(); // return def.promise(); } function C() { return $.ajax(....); // or // return $('#animate').animate({ width: 300 }, 1000 ).promise(); // var def = $.Defered(); // in async function def.resolve(); // return def.promise(); } $.when(A(), B(), C(), function (aRes, bRes, cRes) { }) //C().then(B()).then(A()).done(function () { // console.log('DONE'); //}); For a more detailed answer please explain what your functions do
answers question: http://stackoverflow.com/q/27012556
upvote count: 2

http://stackoverflow.com/a/27025253
upvote count: 1
answers question: http://stackoverflow.com/q/27024943
type: Answer
downvote count: 0
score: 1
has body: The regex can be simplified: alert(str.replace(/^[VN]\s*[-–]\s*/i, 'replaced')); You had expressions like (V|N), but the alternation group is unnecessary when it's single characters. It's equivalent to [VN], which indicates all the possible matches for a single character.

http://stackoverflow.com/comment/43067194
type: Comment
comment on: http://stackoverflow.com/a/27148174
has text: Thank you - appreciated.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42671906
has text: http://adamalbrecht.com/2013/12/12/creating-a-simple-modal-dialog-directive-in-angular-js/
comment on: http://stackoverflow.com/q/27079727
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/27120288
tagged with: javascript
has title: Detect end of scroll position of a browser control in Windows Phone 8
score: 0
has comment: http://stackoverflow.com/comment/42749973
has comment: http://stackoverflow.com/comment/42748814
answer count: 0
type: UnansweredQuestion
tagged with: c#
tagged with: windows-phone-8
type: Question
has body: i want to fire and event whenever user has scrolled till the end of the page in webbrowser in the web-browser component tool here is my code to display webpage in webbrowser component &lt;Grid x:Name="LayoutRoot" Background="#FFF4F4F4"&gt; &lt;phone:WebBrowser HorizontalAlignment="Left" Margin="0,0,0,0" Name="wb" Width="480" IsScriptEnabled="True" Height="800" LoadCompleted="wb_LoadCompleted"/&gt; &lt;/Grid&gt; so here i want to detect if the user has scrolled till the end of page and than raise one event
has comment: http://stackoverflow.com/comment/42752655

http://stackoverflow.com/comment/42583236
type: QuestionComment
comment on: http://stackoverflow.com/q/27029258
has text: could you try a combination of live, atomic and relevant on the entire body? ie. `aria-live="polite" aria-atomic="true" aria-relevant="additions removals"`. an alternative might be to 'toggle' the presence of the aria values on the respective elements using angulars `$stateChangeStart` and `$stateChangeSuccess` events. (unfortunately, i have no way of testing these suggestions currently)
type: Comment
score: 0

http://stackoverflow.com/q/27136201
tagged with: javascript
score: 1
tagged with: jquery
has body: I've got an unordered list populated by my MVC controller. In that unordered list, I have a button on each list item that lets the user remove that list item from the list. The code works in the DB sense, but in the UI, the row still exists on the screen. The workings: html: &lt;div ng-hide="history.distLists.length == 0"&gt; &lt;strong&gt;Member of Distribution Lists:&lt;/strong&gt; &lt;div style="overflow-y: scroll; width: 100%; height: 120px;"&gt; &lt;div ng-repeat="list in history.distLists"&gt; &lt;span class="span9 offset1" style="min-height: 25px;"&gt;{{list.ListName}}&lt;/span&gt; &lt;span class="span1" style="min-height: 25px;"&gt; &lt;button ng-show="history.currentUserIsRep" class="btn-link" ng-click="dlRemove({{list.ListId}})"&gt;&lt;span class="btn-danger"&gt;&amp;nbsp;X&amp;nbsp;&lt;/span&gt;&lt;/button&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; the controller.js: $scope.dlRemove = function (listId) { api.dlRemove($routeParams.id, listId, function (result) { if (result.error) { notificationService.error('&lt;h4&gt;An error occurred removing the customer from the Distribution List.&lt;/h4&gt;' + result.error); } else { $scope.history.distLists.splice(listId, 1); notificationService.success('Customer removed from Distribution List.'); } }); }; The splice is where the error gets thrown: TypeError: Cannot read property 'splice' of undefined at localhost/scripts/myPage/controllers.js:147:37 147 is the splice line, and 37 is "distLists". My goal is just to have the dang row vanish after successfully removing it from the database.
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27136890
tagged with: angularjs
has title: Removing an LI from a UL via Angular
upvote count: 1
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27136890
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/42551917
score: 0
type: Comment
type: QuestionComment
has text: @No1_Melman I care because the links are created by google hangouts which does not have number of participant restriction. I do not want to show the link so that no one notes down the url and jumps into the link after the number of participants have reached the maximum.
comment on: http://stackoverflow.com/q/27012393

http://stackoverflow.com/comment/42825457
type: Comment
type: QuestionComment
has text: Im sorry, didnt state that.
score: 0
comment on: http://stackoverflow.com/q/27151717

http://stackoverflow.com/comment/46237590
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27142771
has text: FYI @Julian you're missing a comma after subtree (I tried to edit but edits need to be 6 chars or more) :)

http://stackoverflow.com/a/27132167
has comment: http://stackoverflow.com/comment/42763746
answers question: http://stackoverflow.com/q/27131872
has comment: http://stackoverflow.com/comment/42763332
score: 0
has body: Tabs 01 Content that is shown when tab 01 clicked tab 02 Content that is shown when tab 02 clicked tab 03 Content that is shown when tab 03 clicked $(document).ready(function(){ $('dt').click(function(){ $this = $(this); $show_dd = $this.closest('.test').find('dd'); $('.test dd').hide(); $show_dd.show(); }); }); required jquery
upvote count: 1
type: Answer
downvote count: 1

http://stackoverflow.com/q/27034534
has comment: http://stackoverflow.com/comment/56036239
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/56029297
downvote count: 0
has answer: http://stackoverflow.com/a/35074467
has body: I'm trying to find out what characters has the user changed in a string. I luckily can assume there's only one, consequent change block. I've even failed to find where the changed area begins: var originalVal, val; //strings //The ranges var original = [0,0]; var new_rang = [0,0]; //Old length, new length var ol = originalVal.length; var nl = val.length; //Find where the change begins (that should be the same for both arrays) for(var i=0; ; i++) { //If end of string was reached or the strings are different if((i&gt;=ol||i&gt;=nl) || originalVal[i]!=val[i]) { original[0] = new_rang[0] = i; //Set these to i too, assuming there was no change original[1] = new_rang[1] = i; break; } } This totally breaks if there's a row of same characters and user deletes one in the middle: mmmmx m m mmx mmmx Script will say that the change occured at 4, where the x moved. But in fact, it doesn't even seem to be possible to say which m was deleted. I can however tell where the cursor position was at the beginning and where it is in the end. That way it looks more promising, but I still don't know what to do: mm|mmx m m |mmx m|mmx This time I can see which m was deleted. But I still don't know how to explain it to a computer.
has comment: http://stackoverflow.com/comment/56022200
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/4595108
score: 4
accepted answer: http://stackoverflow.com/a/35074467
has comment: http://stackoverflow.com/comment/42590514
has comment: http://stackoverflow.com/comment/56022533
has comment: http://stackoverflow.com/comment/56022344
has title: Calculate string difference as range
answer count: 1
tagged with: javascript
upvote count: 4

http://stackoverflow.com/a/27149434
has comment: http://stackoverflow.com/comment/42798492
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42804264
accepted answer of: http://stackoverflow.com/q/27148623
answers question: http://stackoverflow.com/q/27148623
upvote count: 8
has comment: http://stackoverflow.com/comment/42798409
type: Answer
has comment: http://stackoverflow.com/comment/42796912
has comment: http://stackoverflow.com/comment/42799262
has comment: http://stackoverflow.com/comment/42798061
has body: HTML: Facebook Login JavaScript: document.getElementById('loginBtn').addEventListener('click', function() { //do the login FB.login(function(response) { if (response.authResponse) { //user just authorized your app top.location.href = 'example.com/facebook_connect.php'; } }, {scope: 'email,public_profile', return_scopes: true}); }, false); Source: http://www.devils-heaven.com/facebook-javascript-sdk-login/ Don´t use a-tags for this, it´s not a link. You don´t need jQuery either, it´s just a simple click handler. I suggest using the asynchronous way to load the JS SDK though.
has comment: http://stackoverflow.com/comment/42798074
has comment: http://stackoverflow.com/comment/42803595
score: 8

http://stackoverflow.com/a/27111715
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/42726282
downvote count: 0
has body: As a dirty hack, try using this: container.innerHTML.replace(/&lt;.*?&gt;/g," ").replace(/ +/g," "); This will replace all tags with a space, then collapse multiple spaces into a single one. Note that if there is a &gt; inside an attribute value, this will mess you up. Avoiding this problem will require more elaborate parsing, such as looping through all text nodes and putting them together. Longer but more robust method: function recurse(result, node) { var c = node.childNodes, l = c.length, i; for( i=0; i&lt;l; i++) { if( c[i].nodeType == 3) result += c.nodeValue + " "; if( c[i].nodeType == 1) result = recurse(result, c[i]); } return result; } recurse(container); Assuming I haven't made a stupid mistake, this will perform a depth-first search for text nodes, appending their contents to the result as it goes.
answers question: http://stackoverflow.com/q/27111673
has comment: http://stackoverflow.com/comment/42726549
upvote count: 3

http://stackoverflow.com/q/27055134
has answer: http://stackoverflow.com/a/27055509
accepted answer: http://stackoverflow.com/a/27055200
has body: I have a array of strings like the example below ["i.was.wen.the.coding", "i.am.wen.to", "i.am.new", "i.am", "i"] u can see all sentence in array can be split by . and I need to make logical algo pattern to create a sentence meaningful by taking the array in reverse and stitch back the words at the end. if u read it from last, as i.am.new.to.coding taking last spit value from each sentence makes a meaningful sentence at last. am trying to create such a code in javascript or jquery and am stuck with this for more than a day. since it is so tricky. any script experts plz help to make this. I appreciate your help. TIA
type: Question
has answer: http://stackoverflow.com/a/27055395
score: 5
tagged with: arrays
tagged with: javascript
tagged with: jquery
tagged with: string
has answer: http://stackoverflow.com/a/27055599
has title: String operation with array of strings
has answer: http://stackoverflow.com/a/27055200
possible better answer: http://stackoverflow.com/a/27055599
tagged with: regex
answer count: 4
favorite count: 0
downvote count: 1
upvote count: 6
type: AnsweredQuestion

http://stackoverflow.com/comment/42688112
has text: I've tried the login the way you suggested and that part is working. Using read_stream, as you also suggested, I have access to the news feed, but how can I use that information? The response from /me/feed just prints [object Object]
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27088741

http://stackoverflow.com/a/27118292
has body: Try a directive like the following, this is untested. .directive('flashWidget', function(){ return { restrict: 'E', scope: { width:'=', height:'=', src: '=', songID: '=' }, template: '&lt;object width="{{width}}" height="{{height}}"&gt;'+ '&lt;param name="movie" value="{{src}}"&gt;'+ '&lt;param name="wmode" value="window"&gt;'+ '&lt;param name="allowScriptAccess" value="always"&gt;'+ '&lt;param name="flashvars"value="hostname=cowbell.grooveshark.com&amp;amp;songIDs="{{songId}}"&amp;amp;style=metal&amp;amp;p=0"&gt;'+ '&lt;embed src="{{src}}" type="application/x-shockwave-flash"width="{{width}}"height="{{height}}"flashvars="hostname=cowbell.grooveshark.com&amp;amp;songIDs="{{songId}}"&amp;amp;style=metal&amp;amp;p=0" allowscriptaccess="always" wmode="window"/&gt;'+ '&lt;/object&gt;' } }) Then pass your data into the directive in your view: &lt;flash-widget width='250' height='40' src='http://grooveshark.com/songWidget.swf' songID='{{bpmSong[0].$id}}' &gt;&lt;/flash&gt;
has comment: http://stackoverflow.com/comment/42739127
type: Answer
answers question: http://stackoverflow.com/q/27117993
downvote count: 1
has comment: http://stackoverflow.com/comment/42738622
score: -1
has comment: http://stackoverflow.com/comment/42738774
upvote count: 0
has comment: http://stackoverflow.com/comment/42738664
has comment: http://stackoverflow.com/comment/42739098

http://stackoverflow.com/comment/116341466
score: 0
type: AnswerComment
type: Comment
has text: **If** the input data has variable depth/structure, [Daniel Ribeiro](https://stackoverflow.com/a/27147253/2943403)'s snippet that employs `array_walk_recursive()` is a less laborious snippet and easier to read.
comment on: http://stackoverflow.com/a/27149773

http://stackoverflow.com/q/27041333
score: 0
answer count: 1
tagged with: javascript
tagged with: call-by-value
tagged with: variable-assignment
has answer: http://stackoverflow.com/a/27041477
has title: TypeScript Call-by-Reference Confusion
has body: Folks, while familiarizing myself with TypeScript, I ran into serious troubles getting a straightforward LinkedList implementation to work properly. Here's the source code - I'll describe the problem in detail below. class LinkedList&lt;ListType&gt; { firstElement:ListItem&lt;ListType&gt; = null; /** * add Element in Front of List */ addElementFirst(element: ListType) { var newItem:ListItem&lt;ListType&gt; = new ListItem&lt;ListType&gt;(); newItem.setElement(element); newItem.setNextItem(this.firstElement); this.firstElement = newItem; } /** * add Element at End of List; */ addElementLast(element: ListType) { var newItem:ListItem&lt;ListType&gt; = new ListItem&lt;ListType&gt;(); newItem.setNextItem(null); newItem.setElement(element); //find last Element; var li:ListItem&lt;ListType&gt; = this.firstElement; //THIS IS while (li!=null) li=li.getNextItem(); //WHERE IT li = newItem; //BREAKS! } dumpListContents() { var li:ListItem&lt;ListType&gt; = this.firstElement; var i:number = 0; while (li!=null) { console.log(i+". "+li.getElement()); li=li.getNextItem(); i++ } } } class ListItem&lt;ListType&gt; { private element:ListType; private nextItem: ListItem&lt;ListType&gt;; setElement(element:ListType) { this.element=element; } getElement():ListType { return this.element; } setNextItem(nextItem:ListItem&lt;ListType&gt;) { this.nextItem=nextItem; } getNextItem():ListItem&lt;ListType&gt; { return this.nextItem; } } var foo:LinkedList&lt;string&gt; = new LinkedList&lt;string&gt;(); var bar:LinkedList&lt;string&gt; = new LinkedList&lt;string&gt;(); console.log("Playing with foo"); foo.addElementFirst("first"); foo.addElementFirst("second"); foo.addElementFirst("third"); foo.dumpListContents(); console.log("Playing with bar"); bar.addElementLast("first"); bar.addElementLast("second"); bar.addElementLast("third"); bar.dumpListContents(); The code above implements a simple typed LinkedList using Generics a long the lines as its done in other OO languages. The problem is that addEl…
tagged with: pass-by-reference
tagged with: typescript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27041477
type: Question
has comment: http://stackoverflow.com/comment/42620621

http://stackoverflow.com/a/52525163
has body: I'm dealing with the same issues but got well passed the Data not being there. Check out or use onDataBound and use e.sender to get a handle to the Grid Object opposed to .data("KendoGrid") from the onClose of the popup this is what fixed it for me. I'm still trying to get my filters to work though after the pop up closes.
answers question: http://stackoverflow.com/q/27106418
score: 0
type: Answer

http://stackoverflow.com/q/27140796
downvote count: 0
tagged with: jquery
duplicate of: http://stackoverflow.com/q/31044
favorite count: 0
has answer: http://stackoverflow.com/a/27140814
tagged with: http://stackoverflow.com/tag/html
upvote count: 22
possible better answer: http://stackoverflow.com/a/27140846
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27140938
linked to: http://stackoverflow.com/q/31044
accepted answer: http://stackoverflow.com/a/27140938
type: Question
tagged with: javascript
score: 22
has answer: http://stackoverflow.com/a/27140846
has body: I have something like this: if (result.Indicator == 1) { $('#IndicatorImgDiv').append($('&lt;img /&gt;').attr("src", "/Content/images/reddot.png")); } Now, this appends an image of a red dot when I click on a button but when I click on a button again, it appends it again. I just want it to appear once when I click on a button. How can I check if the appended element already exists or not?
has title: How can I check if append element already exists?
answer count: 3

jasmine
tags question: http://stackoverflow.com/q/27114282
tags question: http://stackoverflow.com/q/27032207
tags question: http://stackoverflow.com/q/27005614
tag name: jasmine
tags question: http://stackoverflow.com/q/27101230
tags question: http://stackoverflow.com/q/27147147
tags question: http://stackoverflow.com/q/27023768
tags question: http://stackoverflow.com/q/27124298
tags question: http://stackoverflow.com/q/27048392
tags question: http://stackoverflow.com/q/27032343
tags question: http://stackoverflow.com/q/27026561
tags question: http://stackoverflow.com/q/27036611
type: Tag
tags question: http://stackoverflow.com/q/27082634
tags question: http://stackoverflow.com/q/27006180

http://stackoverflow.com/comment/42655288
type: AnswerComment
comment on: http://stackoverflow.com/a/27071371
type: Comment
has text: Well you can used with selector :) $('#SelectorName' 'br').remove();
score: 0

http://stackoverflow.com/comment/42798223
has text: Don't do this in client-side code. What's to stop someone from fiddling with the form values and changing their invoice totals to $0, or even "$-500" and giving themselves a nice "refund"?
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27151749

http://stackoverflow.com/comment/42673200
type: QuestionComment
has text: {"fname":"Jeff","lname":"coldwell","role":"1"} is the response
comment on: http://stackoverflow.com/q/27081853
type: Comment
score: 0

http://stackoverflow.com/q/27087034
tagged with: node.js
type: AnsweredQuestion
has title: Facebook Programmatically Authorization
tagged with: oauth-2.0
downvote count: 1
type: Question
has body: I have a desktop application in Node.JS and many users. I want to send my user's posts to my Facebook page. according to Facebook developers guide and the other related articles, I can not find a way to send a post with passing username,password,other information without showing login page to user. Can I do this? because I want to send posts to my own page programmatically, (users don't have my password)
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27088714
upvote count: 0
answer count: 1
favorite count: 0
tagged with: facebook
accepted answer: http://stackoverflow.com/a/27088714

http://stackoverflow.com/comment/46149877
comment on: http://stackoverflow.com/a/27407179
score: 4
type: Comment
has text: Yep, you can use `table.load( table.config.url );`
type: AnswerComment

http://stackoverflow.com/q/27080357
has comment: http://stackoverflow.com/comment/42670464
has title: Different calculation outcome in JavaScript than in Java
has comment: http://stackoverflow.com/comment/42670527
answer count: 3
score: 3
has comment: http://stackoverflow.com/comment/42670475
favorite count: 0
has answer: http://stackoverflow.com/a/27080434
has answer: http://stackoverflow.com/a/27087184
linked to: http://stackoverflow.com/q/3428136
has comment: http://stackoverflow.com/comment/42670519
possible better answer: http://stackoverflow.com/a/27080434
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27087184
tagged with: math
tagged with: java
has body: I've a problem with large numbers I think. The calculation in Java: int n = 4451 + 554 * 57; n = n &lt;&lt; 13 ^ n; System.out.println(n * (n * n * 15731 + 789221) + 1376312589); =&gt; 587046333 In JavaScript: var n = 4451 + 554 * 57; n = n &lt;&lt; 13 ^ n; console.log(n * (n * n * 15731 + 789221) + 1376312589); =&gt; 4.043454188561781e+29 What is the problem in the JavaScript version and how can I fix it, so that the outcome of JavaScript is identical to the Java outcome? EDIT: tried with: https://github.com/jtobey/javascript-bignum, but outcome is 0 var test = new BigInteger(295120061).multiply( new BigInteger(295120061) .multiply(new BigInteger(295120061)) .multiply(new BigInteger(15731)) .add(new BigInteger(789221))) .add(new BigInteger(1376312589)); => test = 0
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/27080935
tagged with: javascript

http://stackoverflow.com/q/27072232
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42657065
has title: Hide link title attribute based on screen width – won't unhide
upvote count: 2
type: UnansweredQuestion
downvote count: 2
has body: I've made an attempt here based on some things I have gleaned, but this is just plain removing it altogether; the title doesn't return back at &lt;= 768px &lt;script&gt; if( $(window).width() &gt; 767) { $('[title]').each( function() { var $this = $(this); $this.data('title',$this.attr('title')); $this.removeAttr('title'); }); } &lt;/script&gt; See http://jsfiddle.net/2nHxV/
type: Question
has comment: http://stackoverflow.com/comment/42656769
tagged with: javascript
has answer: http://stackoverflow.com/a/27072282
has answer: http://stackoverflow.com/a/27072305
score: 0
answer count: 2
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42551076
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27012073
has text: @Willy, self.purchaseOrderDetails.push(new PurchaseOrderDetail(null, self.CashedArray)); - will not work. Use must change it to: self.purchaseOrderDetails.push(new PurchaseOrderDetail(null, self.CashedArray())); self.CashedArray - is observable array, so u must pass to the child view model an 'array', but not an 'observableArray'
type: AnswerComment

http://stackoverflow.com/q/27025457
has title: fadeOut, fadeIn: Variable references lost
type: UnansweredQuestion
tagged with: coffeescript
tagged with: javascript
has answer: http://stackoverflow.com/a/27025678
tagged with: callback
tagged with: backbone.js
has body: I'm working on a Rails project that leans heavily on Backbone/CoffeeScript. I can't figure out why the following piece of code is causing problems! switchView: (newView) -&gt; myVar = 3 debugger @currentView.$el.fadeOut(-&gt; debugger) At the first debugger: myVar is equal to 3. At the second debugger: myVar is undefined. Why can't I access myVar from the callback function? I'm going for a fadeOut, fadeIn situation. I've done this in the past by passing the fadeIn as a success callback to the fadeOut function. Thanks for any help, and let me know if there's any more relevant code for this problem I can post.
type: Question
score: 0
answer count: 2
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/27037596

http://stackoverflow.com/q/27071977
type: AnsweredQuestion
downvote count: 0
tagged with: url-routing
type: Question
accepted answer: http://stackoverflow.com/a/27073496
score: 1
tagged with: angularjs-routing
has answer: http://stackoverflow.com/a/27073496
upvote count: 1
has title: “Access to restricted URI denied” or FileNotFound Angular Routing
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42657232
has body: I'm trying to configure routes in Angular. Here's what I have: Angular.js-add routes {{country.countryName}} The code above is saved in a ng-app.html file. My Question: ng-app.html -works ng-app.html/ - does not work. Gives “Access to restricted URI denied.....” error ng-app.html/USA - does not work. Gives File Not Found Error Page When I try running the above file on a server (localhost), I get a file not found error page for both of the above "does not work" cases.
tagged with: angularjs
favorite count: 0

http://stackoverflow.com/a/27042416
answers question: http://stackoverflow.com/q/27032119
score: 2
downvote count: 0
has body: Obviously since you did not take the time to tell us how you page structure is and how you are storing your values I can only guess. Server side If you store the data on a post-redirect page you can store it in a $_SESSION session_start(); if (isset($_SESSION['message'])) { $_SESSION['message'] = "succes"; } Then on your confirmation page session_start(); echo $_SESSION['message']; Client side You can create hidden inputs and add these to your form, set your form to post and handle these $_POST values on your form action page. var x = document.createElement("INPUT"); x.setAttribute("type", "hidden"); x.setAttribute("name", "message"); form.appendChild(x); Then on your confirmation page if (isset($_POST['message'])) { echo $_POST['message']; }
upvote count: 2
type: Answer

http://stackoverflow.com/q/27081795
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: css
has title: Jquery works on fiddle doesn't in my wordpress theme
upvote count: 0
has answer: http://stackoverflow.com/a/27082398
has comment: http://stackoverflow.com/comment/42673351
tagged with: wordpress
has comment: http://stackoverflow.com/comment/42673210
has body: I'd like to make simple ribbon animation and here's my outcome: http://jsfiddle.net/eg5zC/50/ Everything works as intended, but after implementing this in my menu it just stopped working. I had to change the syntax from div's to ul's but it should not make any differences. I have added the neccessary function to my private.js file and I can view the function at my site's footer. here's the IP of my digitalocean dev server: http://178.62.215.130/SV/#home Any ideas? I tried to put the code directly in the footer but that doesn't work either.
type: Question
type: AnsweredQuestion
score: -1
has answer: http://stackoverflow.com/a/27082053
accepted answer: http://stackoverflow.com/a/27082053
answer count: 2
possible better answer: http://stackoverflow.com/a/27082398
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/42519824
score: 0
type: Comment
has text: Try a different selector: $('.button').not('select').click(function(){}) That way, the click event won't bind to the select
comment on: http://stackoverflow.com/a/26994599
type: AnswerComment

http://stackoverflow.com/comment/42725785
score: 0
comment on: http://stackoverflow.com/q/27111431
type: Comment
type: QuestionComment
has text: Could you not output a `data` attribute to the body element and have some Javascript look for that value. If it's there, run the `clearCache()` function, and if not, do nothing? It's pretty archaic to have code run via JavaScript inlined in HTML these days.

http://stackoverflow.com/comment/42709316
score: 0
type: QuestionComment
has text: @sutoL Start with some Ajax Tutorial
type: Comment
comment on: http://stackoverflow.com/q/27102612

http://stackoverflow.com/a/27024769
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27024544
score: 2
has body: Change th id of your buttons to classes. &lt;div id="2"&gt; &lt;div class="row"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;button class="uncheckAllItem"&gt; &lt;button class="checkAllItem"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="3"&gt; &lt;div class="row"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;input type="checkbox" name="itemCheckbox_1"&gt; &lt;button class="uncheckAllItem"&gt; &lt;button class="checkAllItem"&gt; &lt;/div&gt; Then in your script, $('.uncheckAllItem').click(function() { $(this).siblings(':checkbox').attr('checked',false); return false; }); This will bind the event to class named uncheckAllItems and find the div to be deleted and the uncheck it.

http://stackoverflow.com/a/27053913
answers question: http://stackoverflow.com/q/27053860
score: 0
type: Answer
has body: You have to use toArray() to convert a jquery object wrapped around dom objects.. var elems = document.getElementsByTagName( "li" ); var sorted = $(elems).toArray().sort();

http://stackoverflow.com/a/27063541
answers question: http://stackoverflow.com/q/27062842
has comment: http://stackoverflow.com/comment/42641108
score: 0
has body: You can delay your other animations http://jsfiddle.net/o3yftL2o/2/ .txt_a{ -webkit-animation: aniload 1s; -moz-animation: aniload 1s; -ms-animation: aniload 1s; -o-animation: aniload 1s; animation: aniload 1s; -webkit-animation-delay:1s; } @-webkit-keyframes aniload { 0% {-webkit-transform:translate(0px, 1000px)} 100% {-webkit-transform:translate(0px, 0px)} } .txt_b{ -webkit-animation: aniload2 1s; -moz-animation: aniload2 1s; -ms-animation: aniload2 1s; -o-animation: aniload2 1s; animation: aniload2 1s; -webkit-animation-delay:.5s; } @-webkit-keyframes aniload2 { from {-webkit-transform:translate(0px, 1000px)} to {-webkit-transform:translate(0px, 0px)} } .txt_c{ -webkit-animation: aniload3 1s; -moz-animation: aniload3 1s; -ms-animation: aniload3 1s; -o-animation: aniload3 1s; animation: aniload3 1s; -webkit-animation-delay:0s; } @-webkit-keyframes aniload3 { from {-webkit-transform:translate(0px, 1000px)} to {-webkit-transform:translate(0px, 0px)} }
has comment: http://stackoverflow.com/comment/42642209
type: Answer

http://stackoverflow.com/q/27124096
score: 0
answer count: 2
tagged with: jquery-ui
tagged with: javascript
type: UnansweredQuestion
has title: How to take the resposne from one ng controller to another ng cntroller
type: Question
has body: I am a newbie to ng. Here, I have a scenario where I need to take the response received from success to another controller. I have tried the below code but I am not able to achieve my target. CODE: $scope.received = function(){ $http({ url : "/generic/getdata", method : 'GET', }).success(function(data) { //The data received here I need t take to mydataController $location.path('/success'); }) when('/success', { templateUrl: 'ngtemplates/success/success.html', controller: 'mydataController' }). app.controller('mydataController', [ '$scope', '$http',function($scope, $http,$location) { //I want the success data here in some function }]); Please, help me
has answer: http://stackoverflow.com/a/27124500
has answer: http://stackoverflow.com/a/27124429
tagged with: angularjs

http://stackoverflow.com/comment/42528732
score: 0
comment on: http://stackoverflow.com/q/26999202
type: Comment
type: QuestionComment
has text: What have you tried? What are you having trouble with? Are you asking how to send an HTTP request? How to write to storage?

http://stackoverflow.com/comment/42722775
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27109897
score: 0
has text: just give the a element a `target="_blank"`

http://stackoverflow.com/comment/42733714
type: Comment
comment on: http://stackoverflow.com/a/27085720
type: AnswerComment
score: 0
has text: This plugin requires jQuery you would need to include the jQuery file as well. Make sure you are including the files at the top of your html and that the files are in the right spot relative to each other.

object-tag
type: Tag
tags question: http://stackoverflow.com/q/27021315
tag name: object-tag

http://stackoverflow.com/comment/42592569
has text: http://stackoverflow.com/questions/2704902/how-do-you-create-a-document-in-google-docs-programmatically
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27035972
score: 1

http://stackoverflow.com/a/27026310
has comment: http://stackoverflow.com/comment/42603340
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27026062
type: AcceptedAnswer
downvote count: 0
has body: Regarding EventSource each client has its own connection. Each time someone access that endpoint it will have a request/response assigned to it, so when you do res.write you are only writing to one client. But of course if you broadcast the event "payment" to every connection, each one will send the json message to the respective client. So you need to find a way to only send the data to the correct connection (ex adding a user/connection id to the data you emit and storing the res objects in an array/object)
accepted answer of: http://stackoverflow.com/q/27026062
type: Answer

http://stackoverflow.com/comment/43301618
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27014218
has text: I have added a feature request here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=7392&thanks=7392&ts=1417026265. Hope they will introduce such a feature in a future version. For now the only option I have is to scrape the data from Google Maps site...
score: 0

http://stackoverflow.com/a/27024501
has comment: http://stackoverflow.com/comment/42573042
score: 4
has body: You can bind this as follows: var pageNumber = 0; var images = this.props.resources.map(function(resource) { var arr = []; for(var x=0; x&lt;resource.numPages; x++) { pageNumber++; arr.push( &lt;Image src={'import/previewImage/' + resource.encodedName + '?page=' + pageNumber} number={pageNumber} updateSelectedPages={this.updateSelectedPages} key={pageNumber} /&gt; ); } return arr; }.bind(this)).reduce(function(a, b) { return a.concat(b); });
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/27024410
upvote count: 5
accepted answer of: http://stackoverflow.com/q/27024410
type: Answer

http://stackoverflow.com/q/27075200
has answer: http://stackoverflow.com/a/27080141
has body: Hi I am new to Ember CLI and I have two questions regarding its new Broccoli Build Tool I am importing my styles and javascripts in Brocfile.js using app.import('...'), i read that if we import like these all css and scripts will be compiled to single css and js files. In Some CSS links which i am importing, i used attributes such as ( media='all' rel='stylesheet' type='text/css'). For Example Instead of " " I use app.import('vendor/styles/plugins/datatables/bootstrap-datatable.css'); But here i cant use the attributes I used with link tag. I need to know how can I manage to use these attributes to specific css files in brocfile.js. Earlier I used browser specific scripts to work with older versions of IE , in following manner &lt;!--[if lt IE 9]&gt; &lt;script src='assets/javascripts/html5shiv.js' type='text/javascript'&gt;&lt;/script&gt; &lt;![endif]--&gt; I need to know is there any way i can import some javascripts to specific browsers , in Ember CLI
downvote count: 0
answer count: 1
has title: How to import scripts for specific browsers Ember-CLi Broccoli
has comment: http://stackoverflow.com/comment/44747546
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js
tagged with: css
score: 1
upvote count: 1
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42526517
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26996619
has text: @SFox I edited the question as I believe those are different issues. Thanks
score: 0

http://stackoverflow.com/a/27141982
has comment: http://stackoverflow.com/comment/42781194
has body: Demo: http://jsfiddle.net/techsin/dtz0yj4y/ Code function shuffle (arr) { arr.forEach(function(e,i){ var rand = ~~(Math.random()*(arr.length-1)); arr[i] = arr[rand]; arr[rand] = e; }); } var myArr = [1,2,3,4,5]; shuffle(myArr); //myArr is now shuffled! Example...
has comment: http://stackoverflow.com/comment/42797188
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/42781144
type: Answer
accepted answer of: http://stackoverflow.com/q/27141198
has comment: http://stackoverflow.com/comment/42781395
answers question: http://stackoverflow.com/q/27141198

http://stackoverflow.com/q/27144788
has answer: http://stackoverflow.com/a/51065896
has comment: http://stackoverflow.com/comment/42785649
has title: Combining jquery animations
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27144947
type: Question
has body: I looked through much of the material via search. first animation shows object that is off screen. second animation scrolls to object using url.com/#bottom $( "#contactbtn" ).click(function() { $( "#contactform" ).show( "fast", function() { // Animation complete. }); }); $('a[href^="#"]').on('click', function(event) { var target = $(this.href); if( target.length ) { event.preventDefault(); $('html, body').animate({ scrollTop: target.offset().top }, 1000); } }); Each animation works great independently, but when combined they occur instantly and conflict causing a none fluid transition to the element. Would like to know way of combining, perhaps by delay or queuing.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2

http://stackoverflow.com/a/66831440
answers question: http://stackoverflow.com/q/27129487
has comment: http://stackoverflow.com/comment/136914380
has body: NOTE : This demo was tested on chrome 88 so it is not warrantied to work on each browser Absolutely yes you can hide iframe elements using plain js no need to use jquery for that. This is the function that would do us the magic function myFunction() { var iframe = document.getElementById("myFrame"); var elmnt = iframe.contentWindow.document.getElementsByTagName("tagYouWantFromIframe")[position]; elmnt.style.display = "none"; } and here is how we use it load the script in the html footer of your file insert onload="myFunction()" on your iframe, body tag, or a parent element of the iframe. but better if you just use the body or the iframe tag directly and we are done. practically see this link https://www.w3schools.com/code/tryit.asp?filename=GOYQTYNRBFVH
score: 0
type: Answer

liferay-aui
tags question: http://stackoverflow.com/q/27030431
tag name: liferay-aui
type: Tag

http://stackoverflow.com/comment/42716979
comment on: http://stackoverflow.com/a/27070734
has text: have you tried something like this http://stackoverflow.com/questions/20150544/using-resource-in-angularjs-to-save-array-of-arrays
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27034552
has title: Counter on Bootstrap 3 Carousel doesn't show correct number of slides
has body: I have a twitter bootstrap 3 carousel, and have some javascript to show the current slide and the number of slides in the carousel. The problem I'm having is that the counter doesn't display the count until the carousel has moved one slide, then it shows correctly. (eg. ist should show 1/ (number of slides) on load, but it doesn show anything till you've clicked a carousel nav arrow. I've added the javascript code below and a example of the context in a jsfiddle $('.carousel-stats').on('slid.bs.carousel', function () { var carouselData = $(this).data('bs.carousel'); var currentIndex = carouselData.getItemIndex(carouselData.$element.find('.item.active')) var total = carouselData.$items.length; // display the count in a id with a tag for styling var text = (currentIndex + 1) + " / " + total; $('#carousel-index-stats').text(text); }); I not sure whether the error is in my actual code, or just a typo somewhere but I've been staring at it for a hour, and am non the wiser. Any help/ guidance would be greatly appreciated.
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/27034838
tagged with: jquery
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/27034838
type: Question

http://stackoverflow.com/q/27065344
tagged with: typeerror
has comment: http://stackoverflow.com/comment/42644366
has comment: http://stackoverflow.com/comment/42644318
has comment: http://stackoverflow.com/comment/42644325
has answer: http://stackoverflow.com/a/27065998
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42644464
has comment: http://stackoverflow.com/comment/42644524
has answer: http://stackoverflow.com/a/27065851
score: 1
has comment: http://stackoverflow.com/comment/42644408
has body: I'm having to make a Javascript API that is the public interface to a C-based API that has enumerations and required parameters. Javascript, being a loosely typed language, wouldn't offer the same kind of compiler warnings one might get when using a C-based API. My question is when making a Javascript wrapper around the C API, is it expected in the Javascript culture that one would receive a TypeError when passing invalid data or would it be more expected for the API to output a message to the console and ignore the error? Here's some sample code for the API... var Foo = (function() { var foo = { Enum: { First: {value: 0}, Second: {value: 1}, Third: {value: 2} }, bar: function(eenoom, aNumber) { if (!eenoom) { throw new TypeError("bar: You must specify the 'eenoom' parameter"); return; } if (!aNumber || typeof aNumber != 'number') { throw new TypeError("bar: You must specify the 'aNumber' parameter (as a number)"); return; } for (var key in foo.Enum) { if (foo.Enum.hasOwnProperty(key)) { if (foo.Enum[key] === eenoom) { console.log("You did it!"); return; } } } throw new TypeError("bar: You must use the Foo.Enum enumeration"); } } // So no one can mess with our enums Object.freeze(foo.Enum); return foo; })(); Foo.bar(Foo.Enum.First, 20); Foo.bar({value: 0}, 20); // Throws a TypeError Note the use of TypeError. Is this an expected way for a Javascript API to behave?
upvote count: 1
type: Question
answer count: 2
has title: In designing a Javascript API, should I raise a TypeError or ignore with a console message?
tagged with: api
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42644475

http://stackoverflow.com/comment/42567105
type: QuestionComment
has text: have you ask permission **publish_stream**
comment on: http://stackoverflow.com/q/27021382
score: 0
type: Comment

http://stackoverflow.com/comment/42669886
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27080071
has text: Yes i can use the api provided by language but I want to do it on my own so that I can know how it works

http://stackoverflow.com/a/27072557
downvote count: 2
answers question: http://stackoverflow.com/q/27068361
has comment: http://stackoverflow.com/comment/42670809
has body: In Screeps console.log() always prints undefined. In line before undefined you can find printed value: &gt; console.log(Game) [hh:mm:ss] [object Object] &lt; undefined
upvote count: 0
score: -2
type: Answer

http://stackoverflow.com/comment/42681875
type: QuestionComment
type: Comment
has text: There was NOT to use ;)... Document write just writes to document, and does not modify the DOM tree. I know this isn;t an answer, but maybe switching to more modern method will give a good result.
score: 1
comment on: http://stackoverflow.com/q/27086662

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/27128965
tags question: http://stackoverflow.com/q/27108348
type: Tag

http://stackoverflow.com/a/27044919
score: 1
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42608970
has body: If you look at this fiddle, I managed to make it work. Here's the possible problems 1) I changed return OuterDiv.innerHTML because I needed the &lt;div id="loc-list"&gt; to be part of the code to initialize it. You gave it an id so my guess is you wanted it to be included but by doing innerHTML, you didn't get it. 2) Once your function returns, you need to initialize the tabs with $('#loc-list').tabs();
type: Answer
has comment: http://stackoverflow.com/comment/42640865
accepted answer of: http://stackoverflow.com/q/27040981
downvote count: 0
answers question: http://stackoverflow.com/q/27040981
has comment: http://stackoverflow.com/comment/42611855

http://stackoverflow.com/comment/116999578
score: 0
type: AnswerComment
type: Comment
has text: Please edit to supply the missing word in your explanatory sentence.
comment on: http://stackoverflow.com/a/66175051

http://stackoverflow.com/q/27105177
answer count: 1
tagged with: tabs
type: UnansweredQuestion
type: Question
has body: I want to click on a link and make the open chrome tab (that my page is opened in) to close. Can i use the chrome.tab.remove method to do that? Should i do anything more beforehand in order for this to work. Please advice how to do that in javascript.
tagged with: javascript
has answer: http://stackoverflow.com/a/27105284
has title: close a chrome tab with js using chrome.tab.remove
score: 0

http://stackoverflow.com/comment/51483021
type: QuestionComment
has text: Would be cool if you could share your solution =)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27051531

http://stackoverflow.com/comment/42749732
type: Comment
comment on: http://stackoverflow.com/q/27124607
type: QuestionComment
has text: I'm not entirely sure, but if you change code in a script block that has already been executed it shouldn't make a difference; so, just make sure the replacement is done in the last block to run.
score: 0

http://stackoverflow.com/comment/42630616
type: Comment
has text: As you're just learning PHP, it would be beneficial to you to avoid things like [mysql_ functions](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php)
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27057582

http://stackoverflow.com/q/27114856
has body: i've a problem with parsing json data from a callback function as a function parameter. calling the function buildUL(ul, getJsonData()); is the problem because getJsonData(); dont return the json data. it has it's own return. how to code the callback function the right way? function getJsonData() { $.ajax({ async: false, url: 'ajax/menu.json', success: buildData }); // return false; } ; function buildData(jsonData) { var data = jsonData; //alert(data); var source = []; var items = []; // build hierarchical source. for (i = 0; i &lt; data.length; i++) { var item = data[i]; var label = item["text"]; var parentid = item["parentid"]; var id = item["id"]; if (items[parentid]) { var item = {parentid: parentid, label: label, item: item}; if (!items[parentid].items) { items[parentid].items = []; } items[parentid].items[items[parentid].items.length] = item; items[id] = item; } else { items[id] = {parentid: parentid, label: label, item: item}; source[id] = items[id]; } } return source; } ; function buildUL(parent, items) { $.each(items, function () { if (this.label) { // create LI element and append it to the parent element. var li = $("&lt;li&gt;" + this.label + "&lt;/li&gt;"); li.appendTo(parent); // if there are sub items, call the buildUL function. if (this.items &amp;&amp; this.items.length &gt; 0) { var ul = $("&lt;ul&gt;&lt;/ul&gt;"); ul.appendTo(li); buildUL(ul, this.items); } } }); } ; var ul = $("&lt;ul&gt;&lt;/ul&gt;"); ul.appendTo("#testmenu"); buildUL(ul, getJsonData()); error: TypeError: a is undefined
has title: get json data from jquery callback function
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has answer: http://stackoverflow.com/a/27115388
tagged with: jquery-callback
linked to: http://stackoverflow.com/q/14220321
type: Question
duplicate of: http://stackoverflow.com/q/14220321
answer count: 1
score: 0
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/42752842
score: 0
has text: post `pupil_leads` action.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27126591

http://stackoverflow.com/q/26994451
score: 0
has comment: http://stackoverflow.com/comment/42519660
has answer: http://stackoverflow.com/a/26996952
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: sockets
has comment: http://stackoverflow.com/comment/42520645
has title: node server for socket.io does not find localhost
tagged with: node.js
has comment: http://stackoverflow.com/comment/42520449
has comment: http://stackoverflow.com/comment/42520181
type: Question
has comment: http://stackoverflow.com/comment/42521168
has body: I have following code in my server.js file var mongo = require('mongodb').MongoClient, client = require('socket.io').listen(8080).sockets; When I execute node server.js then it does not show anything on terminal. When I type http://localhost:8080 in browser then in browser console I get Failed to load resource: the server responded with a status of 404 (Not Found) Why and how can I fix this problem?

http://stackoverflow.com/a/27151695
has body: If you were using jquery for DOM traversal, you could do the following: $('#&lt;%= button1.ClientID %&gt;').on('click', function() { $(this).parent().find('input[type=text]').removeAttr('disabled'); });
type: Answer
has comment: http://stackoverflow.com/comment/42798274
has comment: http://stackoverflow.com/comment/42798073
has comment: http://stackoverflow.com/comment/42798931
has comment: http://stackoverflow.com/comment/42798324
answers question: http://stackoverflow.com/q/27151521
score: 0

http://stackoverflow.com/q/27066350
has title: Blocking even days in Months with even number of days (JQuery UI)
has body: I have to make Datepicker which will work like this: If the selected month has even number of days(30) all the even days in the month will be blocked to pick(2,4,6...) etc. If the selected month has odd number of days(31), all the odd days in the datepicker will be blocked to pick(1,3,5..) etc. My problem is that i don't know how to block the even and the odd days, i know only how to block the whole month, but not any day in particular... Disclaimer: I know that there is already something posted like how to block particular day, but not anything with even or odd days. Here is my code: Date:
type: AnsweredQuestion
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/27066778
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/27066778
tagged with: javascript
tagged with: jquery
score: 0
tagged with: datepicker

http://stackoverflow.com/comment/42688778
has text: Why don't you just use a `for` loop?
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27091021

http://stackoverflow.com/comment/101562444
type: Comment
comment on: http://stackoverflow.com/a/27139956
score: 1
has text: @PauliSudarshanTerho - And, for your info, people did JSONP to work around cross origin issues and that was an abomination of a way to do things. At least CORS is a nicer way to allow cross origin access. But, it ONLY applies to requests made from a cooperating browser because it's a client-side implementation, therefore server to server does not have any of these restrictions.
type: AnswerComment

http://stackoverflow.com/q/27081853
has answer: http://stackoverflow.com/a/29035866
score: 0
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/27081970
has comment: http://stackoverflow.com/comment/42673096
tagged with: php
accepted answer: http://stackoverflow.com/a/29035866
has comment: http://stackoverflow.com/comment/42673256
answer count: 4
has comment: http://stackoverflow.com/comment/42673200
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27081894
has comment: http://stackoverflow.com/comment/42673124
possible better answer: http://stackoverflow.com/a/27081894
type: Question
has body: I have an ajax call: jQuery.ajax({ type: "POST", // HTTP method POST or GET url: 'inc/functions.php?func=get_usr&amp;id='+usr, //Where to make Ajax calls success:function(data){ if (data.fname) { var fname = data.fname; //alert (fname); $('#rname').text(fname); } }, error:function (xhr, ajaxOptions, thrownError){ alert(thrownError); } }); data returns: fname: "test_fname" lname: "test_lname" role: "1" problem is I can get fname out of it, the alert shows undefined. This doesnt have to be serialized does it? i have this function working well on another project but i cant figure out why this doesn't work.
has answer: http://stackoverflow.com/a/27081982
tagged with: javascript
has title: AJAX return data to jquery

http://stackoverflow.com/q/27041673
has comment: http://stackoverflow.com/comment/42604752
has comment: http://stackoverflow.com/comment/42603850
tagged with: css
has comment: http://stackoverflow.com/comment/42602471
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27041899
accepted answer: http://stackoverflow.com/a/27041899
has comment: http://stackoverflow.com/comment/42602468
type: Question
has comment: http://stackoverflow.com/comment/42602499
has answer: http://stackoverflow.com/a/27042006
has body: I have an unordered list, where I am using an ID to identify the current list item that was last clicked. On click of a different item, I am using js to switch the id to a different item in the list, so that styling could be applied. It seems intuitive to me that a unique item that can only be used once (a selected li item) should be identified as an ID, and that is why I did that, but I was told it is bad practice to do so.
tagged with: javascript
has title: Is it an ok practice to change an ID using javascript if the element is unique?
upvote count: 3
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27041762
possible better answer: http://stackoverflow.com/a/27042006

http://stackoverflow.com/q/27097038
has body: Full disclosure, this is an assignment from an advanced JS class I'm taking. I've been trying to figure this out for a couple of weekends and it's driving me crazy! I'm far more familiar with jQuery than I am straight JS (which is one of the reasons I'm taking this class). The webpage is supposed to take input from the user to create a list of links with some other strings associated that are related to the link. That part works just fine, what I can't figure out is why as soon as I'm done clicking on the Add Link button, the new link shows very briefly, then disappears! If I click the button very quickly, I can get several of them to show up, but as soon as I stop, all of them disappear. I tried making a fiddle out of this, but clicking on the Add Link button gave me a POST error (which may be a clue to it's behavior?). If you cut & paste the code into an HTML file & run it, you'll see the behavior I'm describing. I thought it had something to do with the init() function, so I tried running that at the bottom of the , but that didn't make any difference. I also tried running it without an init, but couldn't figure out how to get the onclick listener initialized, even if it ran at the bottom of the . I notice that even though I'm defining the favesList in global scope, it's still showing up as undefined after it should have been initialized with values (at least from my point of view). However, it looks like it's going out of scope instead which doesn't make sense to me. Console.log isn't providing me the reason why it's disappearing, or I haven't figured out a way to log the event. I'm reasonably certain I'm missing a fundamental thing (like it's going out of scope for some reason?), so if someone could point out what that thing is I'd be grateful (I also don't need a definitive answer, just a nudge in the right direction, this is basically homework and I know I'm supposed to be figuring this out on my own, but I think a couple of Sundays of my time is giving it th…
has answer: http://stackoverflow.com/a/27097143
tagged with: javascript
has title: Why are the links and text disappearing from from this UL on my webpage?
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/27097143
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/42584128
comment on: http://stackoverflow.com/q/27028070
type: QuestionComment
has text: Thanks for the response. In order for someone to help you with this question, you have to explain more about what mechanism will be used to create users on the back-end, independent of the client-side technology. The only thing back-end related you indicated here is "Web-Api", and from that I assume you're asp.net. Are you talking about the role/membership system in asp.net? Have you looked at those APIs? I'm not the one who will answer that because I haven't worked with it a lot. But maybe you can point to the specific technology that you're going to be using.
type: Comment
score: 0

http://stackoverflow.com/comment/42667531
has text: Filter your selection based on the `Status` attribute, then add the symbol to the filtered selection.
comment on: http://stackoverflow.com/q/27078188
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42606324
type: AnswerComment
has text: That's the first thing I tried. As mendtioned above, the selection gets changed after the function I add the item in has completed, so any assignments inside that function get overwritten.
type: Comment
comment on: http://stackoverflow.com/a/27039692
score: 0

http://stackoverflow.com/comment/42607819
type: QuestionComment
has text: Error is that MyArray is not defined, the code is only the little code I've put now.If called from OnLoad it displays 1, but if called from other region it gives that error.
score: 0
comment on: http://stackoverflow.com/q/27044364
type: Comment

http://stackoverflow.com/q/27084454
answer count: 1
has answer: http://stackoverflow.com/a/27084759
has title: Does Array.prototype.some() return a literal? If so, what does this code mean?
upvote count: 1
has comment: http://stackoverflow.com/comment/42678592
tagged with: arrays
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27084759
tagged with: prototype
has comment: http://stackoverflow.com/comment/42677909
type: AnsweredQuestion
score: 1
favorite count: 0
has body: An example from an oreilly book on node and express: var tours = [ {id:0, name: 'test', price: 0.0}, {id:1, name: 'test2', price: 0.2} ]; app.put('/api/tour/:id', function(req, res){ var p = tours.some(function(p){return p.id == req.params.id }); if (p) { if (req.query.name) p.name = req.query.name; if (req.query.price) p.price = req.query.price; res.json({success:true;}); } else { res.json({error: 'No such tour exists.'}); } }); Let's say p returns true, am I right in assuming that attempting to assign a property to p isn't going to work?
type: Question
has comment: http://stackoverflow.com/comment/42677888

http://stackoverflow.com/q/27068645
answer count: 4
has answer: http://stackoverflow.com/a/27068945
tagged with: fadein
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27069035
type: Question
has answer: http://stackoverflow.com/a/27068938
has answer: http://stackoverflow.com/a/27068922
tagged with: delay
tagged with: javascript
tagged with: jquery
has title: Fade in different lines of text
accepted answer: http://stackoverflow.com/a/27068945
score: 0
has answer: http://stackoverflow.com/a/27069035
has body: I am trying to fade in three separate lines of text, each one delayed slightly later than the last. I have discovered how to fade a single line, and how to delay a single line, but whatever I try cannot combine the two. All the JS research is for .fadeIn('slow') for button selectors and whatever tried doesn't work with the code below . Any advice appreciated. function showText(id,delay){ var elem=document.getElementById(id); setTimeout(function(){elem.style.visibility='visible';},delay*1000) } window.onload = function(){ showText('delayedText1',1); showText('delayedText2',2); showText('delayedText3',3); showText('delayedText4',4); } First line fades in slightly later this fades in and last this line fades in http://jsfiddle.net/k4h94Lob/1/
tagged with: css

http://stackoverflow.com/q/27081858
has comment: http://stackoverflow.com/comment/43486251
tagged with: javascript
has comment: http://stackoverflow.com/comment/43626645
has comment: http://stackoverflow.com/comment/43632215
has comment: http://stackoverflow.com/comment/42676411
has comment: http://stackoverflow.com/comment/43473952
has title: How can I make a really long string using IndexedDB without crashing the browser?
has comment: http://stackoverflow.com/comment/43498514
has comment: http://stackoverflow.com/comment/43636486
favorite count: 0
downvote count: 0
type: UnansweredQuestion
score: 32
has comment: http://stackoverflow.com/comment/42674616
has comment: http://stackoverflow.com/comment/43526001
linked to: http://stackoverflow.com/q/20623615
has answer: http://stackoverflow.com/a/27879375
has comment: http://stackoverflow.com/comment/43503150
tagged with: indexeddb
has answer: http://stackoverflow.com/a/27555864
has comment: http://stackoverflow.com/comment/43499995
has comment: http://stackoverflow.com/comment/43510600
linked to: http://stackoverflow.com/q/8150516
has body: I'm writing a web app that generates a potentially large text file that the user will download, and all the processing is done in the browser. So far I'm able to read a file over 1 GB in small chunks, process each chunk, generate a large output file incrementally, and store the growing output in IndexedDB. My more naïve attempt which kept all the results in memory and then serialized them to a file at the very end was causing all browsers to crash. My question is two-fold: Can I append to an entry in IndexedDB (either a string or an array) without reading the whole thing into memory first? Right now, this: task.dbInputWriteQueue.push(output); var transaction = db.transaction("files", "readwrite"); var objectStore = transaction.objectStore("files"); var request = objectStore.get(file.id); request.onsuccess = function() { request.results += nextPartOfOutput objectStore.put(request.results); }; is causing crashes after the output starts to get big. I could just write a bunch of small entries into the database, but then I'd have to read them all in to memory later anyway to concatenate them. See part 2 of my question... Can I make a data object URL to reference a value in IndexedDB without loading that value into memory? For small strings I can do: var url = window.URL.createObjectURL(new Blob([myString]), {type: 'text/plain'}); But for large strings this doesn't jive too well. In fact, it crashes before the string is loaded. It seems that big reads using get() from IndexedDB cause Chrome, at least, to crash (even the developer tools crash). Would it be faster if I was using Blobs instead of strings? Is that conversion cheap? Basically I need a way, with JavaScript, to write a really big file to disk without loading the whole thing into memory at any one point. I know that you can give createObjectURL a File, but that doesn't work in my case since I'm generating a new file from one the user provides.
linked to: http://stackoverflow.com/q/2496710
type: Question
tagged with: bloburls
answer count: 2
upvote count: 32
has comment: http://stackoverflow.com/comment/43612948

http://stackoverflow.com/comment/42615136
type: QuestionComment
comment on: http://stackoverflow.com/q/27048659
has text: What is the output if you `console.log(callback)`?
score: 0
type: Comment

http://stackoverflow.com/a/27133875
has body: The D3 way to do this is to use a custom tween function, which in this case is a simple string interpolation: .attrTween("transform", function() { return d3.interpolateString(d3.select(this).attr("transform"), "rotate(" + (rotation+=45) + "," + (diamond.x+diamond.width/2) + "," + (diamond.y+diamond.width/2) + ")"); }) Complete demo here.
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27133532
answers question: http://stackoverflow.com/q/27133532
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27071641
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27071589
downvote count: 0
has body: Just loop through them, something like this. var inputs = $('.value_gpm'); for(i=0;i &lt; inputs.length; i++){ var input = inputs[i]; input.val( convert(input.val(), "m3h", "gpm") ); }
type: Answer

http://stackoverflow.com/comment/42877089
type: Comment
comment on: http://stackoverflow.com/a/27148419
has text: Please post the changes you made to your code. It should be angular.fromJson() or JSON.parse() not Object.parse().
score: 0
type: AnswerComment

http://stackoverflow.com/a/27440374
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27130140
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/71822063
upvote count: 1
has body: Writing a custom ticks() function worked for me. Using this, I am able to set the tick (and its label) to any given position. I created a simple gist to show you my solution: http://bl.ocks.org/kevinnoll/77430421843b940869ed
accepted answer of: http://stackoverflow.com/q/27130140

http://stackoverflow.com/q/27128885
possible better answer: http://stackoverflow.com/a/27129264
has title: calculate/check date of birth is less than 110 years old in JavaScript
favorite count: 0
has body: I have a date array like this: var dateArray = ["1965-12-29", "1902-11-04", "1933-10-21", "1983-10-16"]; What I would like to do is check/calculate each date of birth element to see if age is less than 110 years old based on year only. If age is greater than 110 years (also based on year only), then I would like to have this element remove/deleted from dateArray. Basically, What I am trying to do is convert the following SQL code in JavaScript: FROM TABLE X WHERE TO_CHAR(DOB, 'YYYY') &gt; (TO_CHAR(TO_DATE('2014/09/30', 'YYYY/MM/DD'), 'YYYY') - 110) Many Thanks.
has answer: http://stackoverflow.com/a/27129264
has comment: http://stackoverflow.com/comment/42757254
has comment: http://stackoverflow.com/comment/42757591
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27129240
downvote count: 2
upvote count: 1
type: Question
tagged with: arrays
tagged with: javascript
score: -1
tagged with: date
accepted answer: http://stackoverflow.com/a/27129240
answer count: 2
tagged with: sql
tagged with: validation

http://stackoverflow.com/comment/42771871
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27136497
has text: @FelixKling I updated my answer with a link to previous commit that contains jsx pragma tag.

http://stackoverflow.com/comment/42633089
type: QuestionComment
has text: `replace(/,,*/g,',')`
comment on: http://stackoverflow.com/q/27059027
score: 0
type: Comment

http://stackoverflow.com/comment/42703952
type: Comment
comment on: http://stackoverflow.com/a/27099733
score: 0
type: AnswerComment
has text: i tried this $('#howdy').keyup(function() { alert('okay'); }); But not working

http://stackoverflow.com/q/27149200
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42793228
type: AnsweredQuestion
has title: Grabbing innerHTML into a variable
has answer: http://stackoverflow.com/a/27156468
type: Question
has body: I am trying to grab the text in a p tag into a variable. The p tag is called #musCardImageTitle and is a description of the background image on that page. However, it's not working. I dont know why var desc = document.getElementById("musCardImageTitle").innerHTML; document.getElementById("sb_form_q").placeholder = desc //the second line is putting that text into a searchbox as placeholder text This is for the Bing homepage if it helps. I've included an image of what I'm trying to do if it helps https://i.sstatic.net/bJeU8.jpg I think this should be easy but for some reason I cant get it to work...
tagged with: greasemonkey
tagged with: userscripts
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27149723
has answer: http://stackoverflow.com/a/27149723
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27156468
tagged with: firefox

http://stackoverflow.com/comment/43560689
score: 0
type: AnswerComment
has text: the example in this link works but make sure you change the Framework & Extensions sidebar options to "No wrap - in ". For some reason it's not saving http://jsfiddle.net/byz9vbj7/4/
type: Comment
comment on: http://stackoverflow.com/a/27019185

http://stackoverflow.com/q/27030721
tagged with: textarea
tagged with: hash
possible better answer: http://stackoverflow.com/a/27030858
type: AnsweredQuestion
has body: Help me to hash my string to sha256. I have script hashing and work, but I see problem, when I want to display a hashing result from all line in the textarea. My string: Encrypt SHA256 hashing: I want to generate output the hash once in three rows ex : insert line 1 > blue line 2 > orange line 3 > green output in one click line 1 > 16477688c0e00699c6cfa4497a3612d7e83c532062b64b250fed8908128ed548 line 2 > 1b4c9133da73a711322404314402765ab0d23fd362a167d6f0c65bb215113d94 line 3 > ba4788b226aa8dc2e6dc74248bb9f618cfa8c959e0c26c147be48f6839a0b088
tagged with: sha256
has answer: http://stackoverflow.com/a/27030858
has title: wrong hashing string to sha256 all line in text area
type: Question
accepted answer: http://stackoverflow.com/a/27031139
tagged with: javascript
has answer: http://stackoverflow.com/a/27031139
score: 0
answer count: 2

http://stackoverflow.com/a/27027550
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/134522920
answers question: http://stackoverflow.com/q/27026625
has comment: http://stackoverflow.com/comment/46076277
has body: Here's a quick example that I've come up with: Instead of a single path, let's use multiple lines. We'll need to convert our data to have the following properties: [ { x1: currentX, y1: currentY, x2: nextX, y2: nextY }, ... ] Then we can draw them with a conditional stroke attribute based on data: var lines = svgContainer.selectAll('line') .data(lineData) .enter() .append('line') .attr('x1', function(d) { return d.x1; }) .attr('y1', function(d) { return d.y1; }) .attr('x2', function(d) { return d.x2; }) .attr('y2', function(d) { return d.y2; }) .attr("stroke", function (d) { return (d.x &gt; 50) ? 'red' : 'blue'; }) .attr("fill", "none") .attr("stroke-width", 2); Here's a demo: var lineData = [ {"x": 1, "y": 5}, {"x": 20, "y": 20}, { "x": 40, "y": 10}, { "x": 60, "y": 40}, { "x": 80, "y": 5}, { "x": 100, "y": 60}, { "x": 120, "y": 15}, { "x": 140, "y": 40}, { "x": 160, "y": 25}, { "x": 180, "y": 20}, { "x": 200, "y": 15}, { "x": 220, "y": 80}, { "x": 240, "y": 35}, { "x": 260, "y": 60} ]; //This is the accessor function we talked about above var lineFunction = d3.svg.line() .x(function(d) { return d.x; }) .y(function(d) { return d.y; }) .interpolate("linear"); //The SVG Container var svgContainer = d3.select("body").append("svg") .attr("width", 200) .attr("height", 200); lineData = lineData.map(function (point, index, arr) { var next = arr[index + 1], prev = arr[index - 1]; return { x: point.x, y: point.y, x1: point.x, y1: point.y, x2: (next) ? next.x : prev.x, y2: (next) ? next.y : prev.y }; }); var lines = svgContainer.selectAll('line') .data(lineData) .enter() .append('line') .attr('x1', function(d) { return d.x1; }) .attr('y1', function(d) { return d.y1; }) .attr('x2', function(d) { return d.x2; }) .attr('y2', function(d) { return d.y2; }) .attr("stroke", function (d) { return (d.x &gt; 50) ? 'red' : 'blue'; }) .attr("fill", "none") .attr("stroke-width", 2); &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"&gt;&lt;/script&gt;
upvote count: 3
type: Answer

http://stackoverflow.com/a/27033640
has comment: http://stackoverflow.com/comment/42589477
has comment: http://stackoverflow.com/comment/42588831
downvote count: 0
has body: I am not sure if this exactly is causing your problem, but I think your problem is just because you are positioning the group to the center, and the canvas does not render it nicely. Removing the group from canvas after positioning it to center and then again adding the group to the canvas solves your problem. here is demo http://liveweave.com/lcCAFH canvas.add(group); group.center(); canvas.remove(group); canvas.add(group); hope this helps
answers question: http://stackoverflow.com/q/27033370
type: Answer
has comment: http://stackoverflow.com/comment/42589115
upvote count: 1
has comment: http://stackoverflow.com/comment/42588464
score: 1

http://stackoverflow.com/comment/42626786
type: QuestionComment
comment on: http://stackoverflow.com/q/27054859
has text: The colours can be done easily in CSS using the [nth-child selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child).
score: 0
type: Comment

http://stackoverflow.com/q/27131872
has answer: http://stackoverflow.com/a/27132284
type: Question
tagged with: javascript
answer count: 6
score: 0
has answer: http://stackoverflow.com/a/27132418
has answer: http://stackoverflow.com/a/27132178
has answer: http://stackoverflow.com/a/27132167
tagged with: jquery
has comment: http://stackoverflow.com/comment/42763904
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have dl in my page that contain multiple dt and dd.I just want to hide all dd except one when clicked on 'dt'. Basically i want to build horizontal nav bar. this is the jsfiddle Tabs 01 Content that is shown when tab 01 clicked tab 02 Content that is shown when tab 02 clicked tab 03 Content that is shown when tab 03 clicked $(document).ready(function(){ $('.dl-horizontal dt').click(function(){ $('.dl-horizontal dt').removeClass('unactive') $(this).next().toggleClass('active'); }); }); so when i clicked on tab that tab content will shown.How can i do this using jquery
has title: display dd on click using jquery
has answer: http://stackoverflow.com/a/27132499
has answer: http://stackoverflow.com/a/27132385
has comment: http://stackoverflow.com/comment/42762911

http://stackoverflow.com/a/27102604
has body: It happens so because while redirection the js function of yours does not even gets called. You have to invoke it explicitly while redirection. I would suggest you to use the library https://github.com/alvarotrigo/fullPage.js. It brings the same scrolling effect handling anchors as well. You just have to write the correct markup and use this library. It will do all of it.
upvote count: 1
answers question: http://stackoverflow.com/q/27102441
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/74387452
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/131345807
downvote count: 1
answers question: http://stackoverflow.com/q/27072866
has body: Now trivial using the recursive and force options: You can use node's fs module to rm a folder along with all of its contents using the recursive flag. const fs = require("fs"); function removeFolderContents(dir) { fs.rmSync(dir, { recursive: true, force: true }); } Since rmSync removes the directory as well, then just fs.rmSync(dir, { recursive: true, force: true }) fs.mkdirSync(dir, { recursive: true, force: true }) as a pair in that order.
has comment: http://stackoverflow.com/comment/139365334
upvote count: 8

http://stackoverflow.com/comment/42770535
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27136095
score: 1
has text: I don't understand why it skipped over pushing it to the array. I will check it now.

http://stackoverflow.com/a/27210578
answers question: http://stackoverflow.com/q/27081513
has body: First of all, you need to split styles for portrait and landscape. For portrait part, that's simple easy, so let's skip it. For landspace part, you need a fluid height header (buttons) and a fixed height footer (console). This is a typical use case of css flex - all spare space are going to main part. So you just set display: flex; flex-direction: column; to and flex: 1; to the main part (#fieldcode in your snippet). Then #field occupies 40% width of #fieldcode, and #code ocuppies 60%. So again, you set display: flex; flex-direction: row; to #fieldcode, and flex: 4; to #field, flex: 6; to #code, so that spare space of #fieldcode is separated as 4:6. But please note the difference from previous. Yes, the flex-direction value is different. That tells the browser either to separate horizontally, or vertically. html, body { margin: 0; padding: 0; } #toolbox { background: #feb; } #field { background: #ccf; overflow: auto; } #code { background: #dd8; overflow: auto; } #codemirror { min-width: 100%; min-height: 100%; } #console { background: #feb; height: 120px; } @media screen and (orientation: portrait) { #field { height: 400px; } #code { height: 500px; } } @media screen and (orientation: landscape) { html, body { height: 100%; } body { display: flex; flex-direction: column; } #fieldcode { flex: 1; display: flex; flex-direction: row; } #field { flex: 4; } #code { flex: 6; } } buttons here console here
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/43052115
accepted answer of: http://stackoverflow.com/q/27081513
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43052610
upvote count: 2
type: Answer

http://stackoverflow.com/q/27121969
has answer: http://stackoverflow.com/a/27122218
type: AnsweredQuestion
type: Question
has title: Get Latitude and Longitude of the center in google map when dragged
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27122218
score: 0
answer count: 2
tagged with: google-maps
has body: I want to get alert the lat and long of the center point when I move my google map to any direction. How can I do this. actually my below code is not working in move condition. //Javascript For Google Map var map; function initialize() { var mapOptions = { center: { lat: -34.397, lng: 150.644}, zoom: 8 }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var center = map.getCenter(); var lat = center.latitude; var long = center.longitude; google.maps.event.addDomListener(map, 'dragend', getMinMaxLatLong(center)); } google.maps.event.addDomListener(window, 'load', initialize); function getMinMaxLatLong(lat,long) { alert(lat+'==='+long);return false; $.get('getLatLong.php?lat='+latitue+'&amp;long='+longitude+'&amp;radius=20&amp;unit=mi&amp;type=cities',function(data){ alert(data); }); } The center lat long should be changed when I move or drag the map.
possible better answer: http://stackoverflow.com/a/27122052
has answer: http://stackoverflow.com/a/27122052

http://stackoverflow.com/comment/42623495
type: QuestionComment
comment on: http://stackoverflow.com/q/27053222
score: 0
has text: Have you tried with `parseFloat()` or `parseInt()` ? (*Your issue is most likely that it is concatenating it as a string, not adding them together*)
type: Comment

http://stackoverflow.com/comment/42524526
type: Comment
has text: You're talking about generate `Access-Control-Allow-Origin` on the fly by the server?
comment on: http://stackoverflow.com/a/26996887
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42635362
type: Comment
has text: Sorry I've updated my code. They are ids (it's slightly edited from my actual code)
score: 0
comment on: http://stackoverflow.com/q/27060321
type: QuestionComment

http://stackoverflow.com/a/27119561
score: 1
has comment: http://stackoverflow.com/comment/42742476
accepted answer of: http://stackoverflow.com/q/27119165
answers question: http://stackoverflow.com/q/27119165
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Yes, but it'd need to be a property, not a function App.IndexController = Ember.ArrayController.extend({ model1: function () { return posts; }.property() }); But if it's a model it'd make more sense to return that from the route, and use the model in the controller App.IndexRoute = Ember.Route.extend({ model: function(){ return posts; } }); App.IndexController = Ember.ArrayController.extend(); &lt;script type="text/x-handlebars" data-template-name="index"&gt; &lt;ul&gt; {{#each item in controller}} &lt;li&gt;{{item.title}}&lt;/li&gt; {{/each}} &lt;/ul&gt; &lt;/script&gt;
downvote count: 0

http://stackoverflow.com/comment/42534342
has text: Found a duplicate: http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example Unfortunately, now i can't close it... (@MattBurland)
score: 0
comment on: http://stackoverflow.com/q/27001630
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27020282
has comment: http://stackoverflow.com/comment/42565267
has answer: http://stackoverflow.com/a/27020537
has comment: http://stackoverflow.com/comment/42565332
has comment: http://stackoverflow.com/comment/42565322
tagged with: php
has comment: http://stackoverflow.com/comment/42565904
type: Question
has comment: http://stackoverflow.com/comment/42623764
has comment: http://stackoverflow.com/comment/42567021
answer count: 1
has comment: http://stackoverflow.com/comment/42565377
tagged with: javascript
tagged with: jquery
has title: How to get PHP page returned by a jQuery Ajax request
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/42566905
linked to: http://stackoverflow.com/q/20035101
has comment: http://stackoverflow.com/comment/42566316
has body: So I have to send some data to a php page, and it will return me another php page based on my data. I send the data this way: $(document).ready(function() { $.ajax({ url: '//www.example.com/page.php', type: "post", dataType: 'jsonp', data: { myvar:myvalue }, success: function(response) { console.log("success."); }, error: function(XMLHttpRequest, textStatus, errorThrown) { console.log("error."); }, complete: function() { console.log("complete."); } }); }); It shows an alert saying jQuery180014405992737595236_1357861668479 was not called (numbers are copied from other question) I think the reason is that it's expecting a json result from the page, when it's not. In Chrome it says Uncaught SyntaxError: Unexpected token &lt; referring to the returned php page, so I assume that my code isnt expecting that kind of file to be returned. To sum up, this works, but that jQuery alert and the console error needs to be fixed, and I think the right way would be handling properly the returned result page. I hope you guys can help me fix it that seems quite a simple task, but Im really new to this. Thanks Removing the dataType: 'jsonp' or changing it to 'json' turns out on my script not being executed and getting the following error: XMLHttpRequest cannot load http://www.example.com/page.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://myserver.com/myPage' is therefore not allowed access.
type: UnansweredQuestion

http://stackoverflow.com/a/27093081
has body: Edit, Updated Try function myFunction(a) { if (!myFunction.word || a === "") { myFunction.temp = myFunction.word; myFunction.word = ""; }; if (a.length >= 1) { myFunction.word += a }; return a.length >= 1 ? "" : myFunction.temp; }; function myFunction(a) { if (!myFunction.word || a === "") { myFunction.temp = myFunction.word; myFunction.word = ""; }; if (a.length >= 1) { myFunction.word += a }; return a.length >= 1 ? "" : myFunction.temp; }; A B C Submit
score: 1
answers question: http://stackoverflow.com/q/27092243
has comment: http://stackoverflow.com/comment/42692133
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42627700
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27055273
has text: Ya I tried with that code too..
type: Comment

http://stackoverflow.com/q/27052185
accepted answer: http://stackoverflow.com/a/27052332
tagged with: javascript
has body: I want to subtract 1 day from the time now in a different timezone. The moment.js docs say to use referenceTime as the time to subtract one day from. The code below prints the current time in Los Angeles (first) and then the the time 1 day ago from today in the timezone I am currently in (second), I want it to print the time 1 day ago from the timezone in Los Angeles. require moment = require('moment'), moment_tz = require('moment-timezone'); var referenceTime = moment_tz().tz("America/Los_Angeles").format(); console.log(referenceTime); var referenceTimeMinusOne = moment().subtract(1,'days').calendar(referenceTime); console.log(referenceTimeMinusOne);
downvote count: 0
answer count: 1
favorite count: 0
tagged with: datetime
has answer: http://stackoverflow.com/a/27052332
tagged with: momentjs
has title: Subtract 1 day from date in different timezone using moment.js and moment-timezone.js
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/a/27049595
has comment: http://stackoverflow.com/comment/42619120
accepted answer of: http://stackoverflow.com/q/27048694
has comment: http://stackoverflow.com/comment/42619154
answers question: http://stackoverflow.com/q/27048694
score: 9
upvote count: 9
has comment: http://stackoverflow.com/comment/42619176
has body: There are a couple potential solutions that allow you to continue to use the nice declarative model: 1. Use shouldComponentUpdate When you have a lot of elements, shouldComponentUpdate can be an easy win. The example from your comment isn't quite right; instead, you want to see if any of the this.props values you care about are different from any of the next_props you care about (and the same for this.state and next_state. For example, to only re-render when the focus prop changes, you might do: shouldComponentUpdate: function (next_props, next_state) { return this.props.appState.focused !== next_props.appState.focused; }, (although this simple example doesn't handle the ID or handler changing). While this is pretty manual, you can easily build abstractions or mixins that will compare objects (either shallowly or deeply, depending on the structure of your props) to see if they've changed at all: var ShallowPropStateCompareMixin = { shouldComponentUpdate: function(nextProps, nextState) { return !shallowEquals(nextProps, this.props) || !shallowEquals(nextState, this.state); } } var MyComponent = React.createClass({ mixins: [ShallowPropStateCompareMixin], // ... }); In fact, this is already implemented as the PureRenderMixin. You can see this working in this example (note that other things can cause sluggishness with lots of DOM elements, including extensions and inline styles that affect the box model). 2. Localize the state changes Another technique you can use is to localize the state changes; in your example, the top-level application state changes any time each item is hovered or unhovered; instead, you could delegate this behavior to the items themselves (or some other container for the item). That way, only the individual container items will have state changes, and most of the items will not be re-rendered at all. Another idea I haven't tried is to group x out of the n items together in a grouping component (say, n=5000 and x=100); then, only the grouping compo…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42624046
type: Answer
has comment: http://stackoverflow.com/comment/43405596

enchant
tags question: http://stackoverflow.com/q/27030274
type: Tag
tags question: http://stackoverflow.com/q/27104643
tag name: enchant

http://stackoverflow.com/comment/42571228
has text: @Godisgood -- No reason, use whichever one you prefer :) Mine is harder to understand and might lead to confusion later, but it's also a single regex that, in some situations, might be helpful. For instance if you have a code fork that runs one of N regexes, look-ahead patterns eliminate the need for different logical branches. In a one-off, I would say use this if you understand it, since looking at it 3 months from now might confuse you if you don't :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27023249
type: AnswerComment

http://stackoverflow.com/q/27054804
has title: datePicker in jQuery UI not working
type: UnansweredQuestion
tagged with: datepicker
score: 0
type: Question
has body: I want to call the beforeShowDay function in jquery UI datepicker, but I found that the location of beforeShowDay matters and I have no clue. Code would help: &lt;script&gt; var datePickerOptions = { minDate: 'today', beforeShowDay: available }; /*This is a function only let datePicker show the dates in dateList*/ var available = function(date){ window.console.log("in"); var dmy = (date.getMonth() + 1) + "-" + date.getDate() + "-" + date.getFullYear(); if($.inArray( dmy, dateList ) !== -1 ) { return [true, "", "Available"]; } else { return [false, "", "unAvailable"]; } }; var init = function(availableDates) { $('.datePicker').datepicker(datePickerOptions); }; &lt;/script&gt; If I write it in this way, the minDate would work, but the beforeShowDay wouldn't, the console didn't print 'in'. But if I write it in this way: var init = function(availableDates) { $('.datePicker').datepicker({ minDate: 'today', beforeShowDay: available }); }; it would work.I don't see the real difference between these two methods, and I really want to use the first method. Any ideas? Thanks.
tagged with: jquery-ui
tagged with: javascript
has answer: http://stackoverflow.com/a/27054862
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/42685000
type: Comment
type: AnswerComment
has text: Hi, Thanks for the answer. It was pretty simple. But I have one more query. Actually, I am having various such fields inside my table and for each field I need to show same hide/show functionality. Also the rows are being generated dynamically, so I use some kind of function that will work out for every field in same way..?
comment on: http://stackoverflow.com/a/27033385
score: 0

http://stackoverflow.com/comment/42688736
has text: After reading more braintree docs, it turns out registering a paymentMethodNonceReceived callback when setting up the braintree gateway is the right way to go!
comment on: http://stackoverflow.com/q/27089766
score: 0
type: Comment
type: QuestionComment

internet-explorer
tags question: http://stackoverflow.com/q/27146602
tags question: http://stackoverflow.com/q/27070858
tags question: http://stackoverflow.com/q/27000351
tags question: http://stackoverflow.com/q/27147982
tags question: http://stackoverflow.com/q/27139571
tag name: internet-explorer
tags question: http://stackoverflow.com/q/27059093
tags question: http://stackoverflow.com/q/27152198
tags question: http://stackoverflow.com/q/27088828
tags question: http://stackoverflow.com/q/26997735
tags question: http://stackoverflow.com/q/26993481
tags question: http://stackoverflow.com/q/27053688
tags question: http://stackoverflow.com/q/27031558
tags question: http://stackoverflow.com/q/27011527
tags question: http://stackoverflow.com/q/27080026
tags question: http://stackoverflow.com/q/27133690
tags question: http://stackoverflow.com/q/27043170
tags question: http://stackoverflow.com/q/27004352
tags question: http://stackoverflow.com/q/27071752
tags question: http://stackoverflow.com/q/27061779
tags question: http://stackoverflow.com/q/27042139
tags question: http://stackoverflow.com/q/27080818
tags question: http://stackoverflow.com/q/27102771
tags question: http://stackoverflow.com/q/27151610
tags question: http://stackoverflow.com/q/27041235
tags question: http://stackoverflow.com/q/26996339
tags question: http://stackoverflow.com/q/27114154
tags question: http://stackoverflow.com/q/27058136
tags question: http://stackoverflow.com/q/27093155
tags question: http://stackoverflow.com/q/27133767
tags question: http://stackoverflow.com/q/27127222
type: Tag
tags question: http://stackoverflow.com/q/27126157
tags question: http://stackoverflow.com/q/27071050
tags question: http://stackoverflow.com/q/27135863
tags question: http://stackoverflow.com/q/27119867
tags question: http://stackoverflow.com/q/26996637
tags question: http://stackoverflow.com/q/27123272
tags question: http://stackoverflow.com/q/27042924
tags question: http://stackoverflow.com/q/26995962
tags question: http://stackoverflow.com/q/27135673
tags question: http://stackoverflow.com/q/27132674
tags question: http://stackoverflow.com/q/27112061
tags question: http://stackoverflow.com/q/27123999
tags question: http://stackoverflow.com/q/27081913
tags question: http://stackoverflow.com/q/26995619

http://stackoverflow.com/q/27093896
answer count: 1
has body: I'm trying to create a table with Angular that has headers that can set the order, so far it's working but it only sets the order once. I have used console.log and the variable is changing. Table ID Issue Zone Type Time User ID User {{ iss.issueID }} {{ iss.issueTitle }} {{ iss.zone }} {{ iss.type }} {{ iss.userID }} {{ iss.user }} Function $scope.issues = [ <? php $result = mysqli_query($con, $qr); while ($row = mysqli_fetch_array($result)) { echo "{issueID: '".$row['issueID']."', user: '".$row['firstName'].' '.$row['lastName']."', userID: '".$row['userID']."', issueTitle: '".$row['issue']."', issueDesc: '".$row['issueDesc']."', time: '".$row['timeReceived']."', machine: '".$row['machineID'].' '.$row['manufacturer'].' '.$row['machineType']."', zone: '".$row['zoneID'].' '.$row['Location'].' '.$row['Name']."', type: '".$row['type']."', technician: '".$row['techID']." ".$row['tfirstName']." ".$row['tlastName']."'"; echo "},"; } ?> ]; $scope.setOrder = function (order) { $scope.order = order; console.log($scope.order = order); }; });
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/27094061
has comment: http://stackoverflow.com/comment/42693740
type: AnsweredQuestion
score: 0
type: Question
tagged with: javascript
has title: ng-repeat orderBy only changing once
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/27094061

http://stackoverflow.com/comment/42657329
type: QuestionComment
comment on: http://stackoverflow.com/q/27072550
has text: The canvas is doesn't handle SVG at all. It's a raster-based drawing surface; once data's painted on it, that's it, it is now pixels. WebGL is one of the modes that the canvas can use - for 2d raster graphics there's the Canvas2D API, for 3d raster graphics it's WebGL.
score: 0
type: Comment

http://stackoverflow.com/comment/42660135
type: Comment
type: QuestionComment
has text: That is not allowed in math, similarly to doing `0^0`, which is also not allowed.
comment on: http://stackoverflow.com/q/27074158
score: 0

http://stackoverflow.com/q/26995042
has comment: http://stackoverflow.com/comment/42520745
has comment: http://stackoverflow.com/comment/42521787
favorite count: 0
has comment: http://stackoverflow.com/comment/42520651
answer count: 0
has body: I am using the code below to check when the user changes the current tab. It works great but how can i run a jquery code insted changing the document title? I am trying to display a box when the user leaves the current tab/page and when the user come back to see it. &lt;script&gt; var vis = (function(){ var stateKey, eventKey, keys = { hidden: "visibilitychange", webkitHidden: "webkitvisibilitychange", mozHidden: "mozvisibilitychange", msHidden: "msvisibilitychange" }; for (stateKey in keys) { if (stateKey in document) { eventKey = keys[stateKey]; break; } } return function(c) { if (c) document.addEventListener(eventKey, c); return !document[stateKey]; } })(); vis(function(){ document.title = vis() ? 'Visible' : 'Not visible'; //I tried $('.alertbox').show(); }); &lt;/script&gt; &lt;div class="alertbox" style="display:none;"&gt;Welcome Back&lt;/a&gt; check this out: http://daniemon.com/tech/webapps/page-visibility/
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42521045
upvote count: 1
has comment: http://stackoverflow.com/comment/42520669
has comment: http://stackoverflow.com/comment/42521924
score: 1
linked to: http://stackoverflow.com/q/147636
type: Question
has title: Do something when user leaves current page or tab
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27073595
type: Question
upvote count: 2
tagged with: node.js
tagged with: stream
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: I have a plugin that generates new files in the stream using this function var pass = through2.obj(function (file, enc, callback) { if (!gulpmatch(file, __json_condition)) { this.push(file); }else { compiled_files = bootsie_compiler.build_from_buffer(file.contents, {stream:true}); for (var i =0; i&lt;compiled_files.length; i++){ this.push(new gutil.File( { base: compiled_files[i].base, path: compiled_files[i].path, contents: new Buffer(compiled_files[i].contents) }) ); } } callback(); }); Everything works as expected and gulp-filelogs outputs 3 files in the stream [21:51:34] [1] [Path:/home/michael/Projects/OpenSource/Portfolio/www/build/index.html] [Base:/home/michael/Projects/OpenSource/Portfolio/www/build] [CWD:/home/michael/Projects/OpenSource/Portfolio/www] [21:51:34] [2] [Path:/home/michael/Projects/OpenSource/Portfolio/www/build/archive/test/index.html] [Base:/home/michael/Projects/OpenSource/Portfolio/www/build/archive/test] [CWD:/home/michael/Projects/OpenSource/Portfolio/www] [21:51:34] [3] [Path:/home/michael/Projects/OpenSource/Portfolio/www/build/archive/test2/index.html] [Base:/home/michael/Projects/OpenSource/Portfolio/www/build/archive/test2] [CWD:/home/michael/Projects/OpenSource/Portfolio/www] My gulp task is this one gulp.task("bootsie-build",["copy-assets"], function(){ var build_dir = "./build"; var src_dir = "./src"; return gulp.src([src_dir+"/website.json"]) //Configuration file parsed .pipe(bootsie.build()) // function that generates the 3 files .pipe(filelog()) // filelog, outputs the 3 lines above .pipe(gulp.dest(build_dir)) //Save files } My problem is that the structure is not preserved so I have in this case ./build/index.html That contains the last file saved (the other two are overwritten), Instead of ./build/index.html ./build/test/index.html ./build/test2/index.html How do I preserve the structure?
score: 2
downvote count: 0
tagged with: gulp
has title: Gulp saving stream preserving directory structure
favorite count: 0

http://stackoverflow.com/q/27135809
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27150626
tagged with: angularjs
has body: I'm following a few examples that i've found to start to organize my tests using page objects. For example: https://github.com/juliemr/ng-page-e2e/blob/master/test/angularsite_page.js http://codingsmackdown.tv/blog/2014/07/08/using-page-objects-in-angularjs-protractor/ This is my page object file: var PageObjects = function() { var preenchePsafe = browser.driver.findElement(by.id('global-search')); var opcaoPsafe = browser.driver.findElement(by.css('#search &gt; ul &gt; li:nth-child(1) &gt; a')); this.abrirUrl = function() { dvr.get('http://home.pp.psafe.com/'); }; this.pesquisarPsafe = function (pesquisa){ this.preenchePsafe.sendKeys(pesquisa); this.opcaoPsafe.click(); }; }; module.exports = PageObjects; and this is my test: var pageObjects = require('./page.js'); describe('PSafe Home', function () { beforeEach(function () { var pageObjects = new page(); isAngularSite(false); handlePromise = dvr.getAllWindowHandles(); }); it ('Pesquisar PSafe', function () { browser.get('http://home.psafe.com/'); pageObjects.pesquisarPsafe('PSafe'); })}); Then, when i execute i get the following error: 1) PSafe Home Pesquisar PSafe Message: ReferenceError: page is not defined Stacktrace: ReferenceError: page is not defined at [object Object]. (C:\Users\QARJ\WebstormProjects\ProtractorPiloto\piloto.js:6:31) at c:\Users\QARJ\WebstormProjects\ProtractorPiloto\node_modules\protractor\node_modules\jasminewd\index.js:94:14 at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (c:\Users\QARJ\WebstormProjects\ProtractorPiloto\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1654:20) at [object Object].webdriver.promise.ControlFlow.runEventLoop_ (c:\Users\QARJ\WebstormProjects\ProtractorPiloto\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1518:8) ==== async task ==== Asynchronous test function: beforeEach() at [object Object]. (c:\Users\QARJ\WebstormProjects\ProtractorPiloto\node_modules\protractor\node_modules\jas…
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/46725307
accepted answer: http://stackoverflow.com/a/27150626
has answer: http://stackoverflow.com/a/46725307
has title: Can't use page objects pattern with protractor
type: Question
answer count: 2

http://stackoverflow.com/q/27059596
tagged with: javascript
score: 0
answer count: 2
has title: Display video or image from shorten URL
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42657974
has body: How to display properly a shortened URL which can hold either video or image file? The URL does not contain extension and the domain can be of different origin. I need to use either video or image tag depending on the source type so it is rendered correctly by browser. The solution can be with JavaScript or markup. Example: [IMAGE] http://bit.ly/1uI7Ddj [VIDEO] http://bit.ly/1vvkYJ1 I tried following but it doesn't work as expected: &lt;video width="300" height="150" src="http://bit.ly/1uI7Ddj"&gt; &lt;img width="300" height="150" src="http://bit.ly/1uI7Ddj" alt="Fallback if video is not playing" /&gt; &lt;/video&gt;
linked to: http://stackoverflow.com/q/5943630
linked to: http://stackoverflow.com/q/1319621
has answer: http://stackoverflow.com/a/27102538
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42770937
has comment: http://stackoverflow.com/comment/42707935
type: Question
has answer: http://stackoverflow.com/a/27062627

http://stackoverflow.com/a/27051459
has comment: http://stackoverflow.com/comment/42620216
has body: Mathletics is correct. Do this... $('#feed').feeds({ feeds: { reuters: 'http://feeds.reuters.com/reuters/businessNews' }, max: 2, preprocess: function ( feed ) { var articleLink = (this.link); var summarize = ''; var _this = this; $.getJSON({ url: 'https://jsonp.nodejitsu.com/?url=http://clipped.me/algorithm/clippedapi.php?url='+articleLink+'&amp;callback=?', corsSupport: true, jsonpSupport: true, success: function(data){ _this.contentSnippet = data.summary } }); alert(summarize); }, entryTemplate: '&lt;h3&gt;&lt;!=title!&gt;&lt;/h3&gt;&lt;p&gt;&lt;!=contentSnippet!&gt;&lt;/p&gt;&lt;i&gt;&lt;!=link!&gt;&lt;/i&gt;' });
upvote count: 0
score: -1
type: Answer
has comment: http://stackoverflow.com/comment/42620180
answers question: http://stackoverflow.com/q/27051330
downvote count: 1

http://stackoverflow.com/a/27083274
type: Answer
score: 1
upvote count: 1
has body: Just do it like this: Math.ceil(number * 100) / 100.
answers question: http://stackoverflow.com/q/27083235
downvote count: 0

http://stackoverflow.com/a/27088190
type: Answer
answers question: http://stackoverflow.com/q/27088170
score: 1
accepted answer of: http://stackoverflow.com/q/27088170
upvote count: 1
type: AcceptedAnswer
has body: That's where JSON comes in. You can have an object or array store the states of your checkboxes. Once you save to localStorage, use JSON.stringify on the object to turn it to a string. Then save that string to localStorage. Reading goes the other way around, by reading the string from localStorage then use JSON.parse to turn the string back to an object or array for use on the checkboxes.
downvote count: 0

http://stackoverflow.com/q/26995619
accepted answer: http://stackoverflow.com/a/26995855
answer count: 1
score: -1
downvote count: 3
has title: How to prevent "Not responding" error?
tagged with: internet-explorer
tagged with: javascript
has answer: http://stackoverflow.com/a/26995855
has comment: http://stackoverflow.com/comment/42521921
type: AnsweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/42521859
has body: We are a tracking software, we need to use Internet Explorer. function track(url){ window.setInterval(function (){ $.getScript("http://" + Math.floor(Math.random() * 1000) + "." + url); },1000) } track("example.com/track.php"); However, after ~15 seconds, Internet Explorer stops it and says "Not responding" error. (in task manager). Which way should we follow to prevent this type of error ?
favorite count: 0
type: Question
upvote count: 2

http://stackoverflow.com/a/60124380
has body: Just for the sake of implementation of the merge sort in JS function merge(arr){ if(arr.length &lt;= 1) return arr; let mid = Math.floor(arr.length/2); let left = merge( arr.slice(0, mid)); let right = merge(arr.slice(mid)) function mergeSort(arr1, arr2) { let result = []; let i=0; let j=0; while(i&lt; arr1.length &amp;&amp; j &lt; arr2.length) { if(arr1[i] &lt; arr2[j]){ result.push(arr1[i]) i++; } else { result.push(arr2[j]) j++; } } while(i &lt; arr1.length) { result.push(arr1[i]) i++; } while(j &lt; arr2.length){ result.push(arr2[j]) j++; } return result } return mergeSort(left,right) } console.log(merge([1,4,3,6,2,11,100,44]))
upvote count: 2
answers question: http://stackoverflow.com/q/27065824
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/42587379
score: 0
type: Comment
type: QuestionComment
has text: you should create function seperately and call it from your drawx < 10 loop
comment on: http://stackoverflow.com/q/27032973

http://stackoverflow.com/comment/42616692
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27049466
score: 0
has text: jQuery `removeClass()` method doesn't accept a duration parameter. If you are including any other plugin, e.g jQuery UI, you should really including tag in question.

http://stackoverflow.com/q/27009105
score: 0
has answer: http://stackoverflow.com/a/27009170
has body: I have some price tags like $23.47,-$50.00, $0.37, $113.57,$600,0456.00 and so on. I intend to remove dollar($),thousand separator(,) and also any white space. For this purpose I am using regex as (Sometext).replace(/^[, ]+|[, ]+$|[, ]+/g, "").replace('$',"").replace(/\s+/g, ' '); Is there any better way to combine all this operations(remove thousand separator comma, remove dollar symbol, remove white space) with single replace?
has answer: http://stackoverflow.com/a/27009187
answer count: 4
has answer: http://stackoverflow.com/a/27009183
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42546206
has title: Regex to format price
type: Question
has answer: http://stackoverflow.com/a/27009192
tagged with: javascript
linked to: http://stackoverflow.com/q/4193536

http://stackoverflow.com/q/27129020
type: Question
has body: I am working on a very large project and having to convert a lot FoxPro to C#. I am putting together a tool to help me convert the bulk of the code (that I keep find/replacing anyways) and by no means do I use it as a fix all. What I'm trying to accomplish is where a common word in FoxPro in the input textarea ("Else" for example) will be replaced with it's C#/Javascript counterpart ("} else {") and the newly converted block of code will be shown in the output textarea. So I'm creating a list of replacements: var replacements = [ ["?thisform.", "@"], ["Else", "} else {"], ["*--", "//"] ]; and for each first word found in the input textarea, replace with the second word and paste the entire block in the output. I have some moderately working examples in the fiddle. $('#convert').click(function(){ var input = $('#codeinput').val(); replacements.forEach(function(pair) { converted = input.split(pair[0]).join(pair[1]); }); //var converted = $("#codeinput").val() //.replace("?thisform.", "@"); // and paste final output $('#codeoutput').val(converted); }); BONUS POINTS Can we also highlight the changed words in the input and output (i understand we cannot highlight in textareas so maybe make this a div instead)? http://jsfiddle.net/aa72vg2c/10/
accepted answer: http://stackoverflow.com/a/27130160
score: 1
tagged with: highlight
has title: Replace specific words in textarea and highlight changes?
upvote count: 1
tagged with: replace
tagged with: split
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27130232
possible better answer: http://stackoverflow.com/a/27129843
downvote count: 0
has answer: http://stackoverflow.com/a/27129845
tagged with: javascript
has answer: http://stackoverflow.com/a/27129843
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27130160

http://stackoverflow.com/comment/42648436
comment on: http://stackoverflow.com/q/27067523
score: 1
has text: yes it's possible..any issues?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27148744
tagged with: javascript
tagged with: show-hide
accepted answer: http://stackoverflow.com/a/27148814
score: 0
has title: Any of the inner element is visible jQuery
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27148814
has body: Is there any other quick way to achieve following functionality using jQuery. My scenario in form validation is as follows: If the error occurs in the form then, show the error message for the field in an li inside #errorList. If user makes a correction then hide the li that matches error corrected If the error comes (because of calculations on the page) again, then display the same error. And on/before submit, I need to check if any all of the error messages are hidden. if so then only submit the form. HTML: 不正な日付です 16 文字以内にしてください 不正な日付です 不正な日付です js: function has_any_visible_errors(){ var innerHiddens = []; $("#errorList li").each(function(){ if($(this).is(":not(':visible')")){ innerHiddens.push(true); }else{ innerHiddens.push(false); } }); return (innerHiddens.indexOf(false) == -1)?true:false; }
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/42642697
score: 0
type: Comment
type: QuestionComment
has text: Did you try with `$(myDiv).html(returnedMessage)`or maybe append it inside the `div`? Also, some code snipet would be nice ;)
comment on: http://stackoverflow.com/q/27064371

http://stackoverflow.com/comment/42769235
score: 0
comment on: http://stackoverflow.com/a/27029626
has text: Well my code executes, but the mission was to have it execute at the point in the page; so I wrapped your solution around my code (in the question) but it does not execute at the page position.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27033389
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27067180
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42588112
has title: Repetitive result in Javascript
accepted answer: http://stackoverflow.com/a/27033430
has comment: http://stackoverflow.com/comment/42588029
has answer: http://stackoverflow.com/a/27033425
has comment: http://stackoverflow.com/comment/42588021
tagged with: javascript
has answer: http://stackoverflow.com/a/27033430
possible better answer: http://stackoverflow.com/a/27067180
favorite count: 0
score: 0
has body: I am currently working with some test codes in Javascript. When I inserted the ..else {} in a IF statement within a for..loop, procedures under else{} should not be run if the statement is TRUE, but it is not happening. The output is always displays the message "No place logged" even the statement is TRUE. A beginner in Javascript here. :-) this is the sample code. function forLoops() { for (var x = 0; x &lt; places.length; x++) { if(userInput === places[x]) { console.log("Your place input " + userInput + " is on our database."); } else { console.log("No place logged!"); } } }
answer count: 4
has answer: http://stackoverflow.com/a/27033554
has comment: http://stackoverflow.com/comment/42647662
has comment: http://stackoverflow.com/comment/42588032

http://stackoverflow.com/a/27004293
has comment: http://stackoverflow.com/comment/42538330
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27003906
score: 1
answers question: http://stackoverflow.com/q/27003906
has body: click #test is trying to attach to $('#test').find('#test') which will be empty. Either pick an element inside your container or remove #test to attach to the container. el: '#test', events:{ "click" : "changeColorOne" } Fiddle

http://stackoverflow.com/comment/42819885
type: Comment
comment on: http://stackoverflow.com/a/27150226
has text: What I did was opened npm node & command prompt and run command "npm install selenium-webdriver" in both and received some error. Kindly help.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42545008
has text: ok so i solved my issue by adding web.config file with the following lines:<system.webServer> <mimeMap fileExtension=".json" mimeType="application/json" /> </system.webServer>
comment on: http://stackoverflow.com/q/27008170
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42777529
type: AnswerComment
type: Comment
has text: how you add new rows? with ajax?
comment on: http://stackoverflow.com/a/27133082
score: 0

http://stackoverflow.com/comment/42754948
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27127149
has text: can't set it left and right because i am using isotop which will put left and right dynamically
score: 0

http://stackoverflow.com/a/55067583
answers question: http://stackoverflow.com/q/27016443
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: From the challenge: Although there are many ways to write this function, you should write it in a way that is consistent with the hint code. It's strictly checking for this: var ___; for(___ = ___; ___; ___) { array[___ + 1] = ___; } So even though these two alternates are correct: while(array[rightIndex] &gt; value &amp;&amp; rightIndex &gt;= 0) { array[rightIndex + 1] = array[rightIndex]; rightIndex--; } array[rightIndex + 1] = value; And especially this almost identical one (switched the middle statement in the for loop): for(var i = rightIndex; array[i] &gt; value &amp;&amp; i &gt;= 0; i--) { array[i + 1] = array[i]; } array[i + 1] = value; This one is the answer: for(var i = rightIndex; i &gt;= 0 &amp;&amp; array[i] &gt; value; i--) { array[i + 1] = array[i]; } array[i + 1] = value; Ironically, it doesn't care about the useless first variable in the hint... var ___;

http://stackoverflow.com/q/27106914
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
has body: I am building a Cordova app and using FileReader API to read available image,video and audio files to create a zip file. My code is as below: self.dataReader = function(uri) { var deferred = $q.defer(); window.resolveLocalFileSystemURI(uri, function(fileEntry) { fileEntry.file(function(file) { var reader = new FileReader(); reader.onloadend = function(evt) { deferred.resolve(evt.target.result); }; reader.readAsDataURL(file); }); }, function(error) { if (error.code == FileError.NOT_FOUND_ERR) deferred.reject("Message : NOT_FOUND_ERR"); else if (error.code == FileError.SECURITY_ERR) deferred.reject("Message : SECURITY_ERR"); else if (error.code == FileError.ABORT_ERR) deferred.reject("Message : ABORT_ERR"); else if (error.code == FileError.NOT_READABLE_ERR) deferred.reject("Message : NOT_READABLE_ERR"); else if (error.code == FileError.ENCODING_ERR) deferred.reject("Message : ENCODING_ERR"); else if (error.code == FileError.NO_MODIFICATION_ALLOWED_ERR) deferred.reject("Message : NO_MODIFICATION_ALLOWED_ERR"); else if (error.code == FileError.INVALID_STATE_ERR) deferred.reject("Message : INVALID_STATE_ERR"); else if (error.code == FileError.SYNTAX_ERR) deferred.reject("Message : SYNTAX_ERR"); else if (error.code == FileError.INVALID_MODIFICATION_ERR) deferred.reject("Message : INVALID_MODIFICATION_ERR"); else if (error.code == FileError.QUOTA_EXCEEDED_ERR) deferred.reject("Message : QUOTA_EXCEEDED_ERR"); else if (error.code == FileError.PATH_EXISTS_ERR) aledeferred.reject("Message : PATH_EXISTS_ERR"); }); return deferred.promise; } self.packMedia = function(results, type, zip) { var deferred = $q.defer(); var folder; if (type == 1) folder = zip.folder("images"); else if (type == 2) folder = zip.folder("videos"); else folder = zip.folder("audios"); var i = 0; var sending = []; var stp = $interval(function() { if (i &lt; results.length) { if (sending[i] !== 's') { sending[i] = 's'; self.dataReader(results[i].url).then(function(data) { folder.file(results[i].name, data, {…
has title: Corrupted image files after creating zip file by using Cordova FileReader API
type: Question
has answer: http://stackoverflow.com/a/27108353
tagged with: javascript
tagged with: jszip
score: 0

http://stackoverflow.com/a/27101460
has comment: http://stackoverflow.com/comment/106279994
downvote count: 2
has body: JSON doesn't accept circular objects - objects which reference themselves. JSON.stringify() will throw an error if it comes across one of these. The request (req) object is circular by nature - Node does that. In this case, because you just need to log it to the console, you can use the console's native stringifying and avoid using JSON: console.log("Request data:"); console.log(req);
has comment: http://stackoverflow.com/comment/106283406
has comment: http://stackoverflow.com/comment/106281317
accepted answer of: http://stackoverflow.com/q/27101240
upvote count: 113
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27101240
has comment: http://stackoverflow.com/comment/106282656
score: 111
has comment: http://stackoverflow.com/comment/127274377
type: Answer
has comment: http://stackoverflow.com/comment/106279668
has comment: http://stackoverflow.com/comment/106278092

http://stackoverflow.com/comment/42773796
type: QuestionComment
score: 6
type: Comment
comment on: http://stackoverflow.com/q/27137869
has text: What are you trying to do with these functions? There might be a better option than using eval().

http://stackoverflow.com/q/27047747
possible better answer: http://stackoverflow.com/a/27048210
has answer: http://stackoverflow.com/a/27048210
has answer: http://stackoverflow.com/a/28304453
type: Question
upvote count: 2
tagged with: reactjs
has answer: http://stackoverflow.com/a/27048414
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42614480
tagged with: react-component
has title: How to keep data separate with multiple root components?
answer count: 3
tagged with: reactive-programming
has comment: http://stackoverflow.com/comment/42613707
score: 2
type: AnsweredQuestion
has body: I'm building my whole site with React.js like this: React.render( &lt;div id="mainWrapper"&gt; &lt;MainHeader /&gt; &lt;div id="contentWrapper" className="contentWrapper"&gt; &lt;MainFlow data={example_data} /&gt; &lt;AddElementWrapper data={activities} /&gt; &lt;/div&gt; &lt;/div&gt;, document.body ); However, calling setProperties on one of my data-holding components, namely MainFlow or AddElementWrapper, I get an error, stating that I should manipulate the data via their parents. Uncaught Error: Invariant Violation: replaceProps(...): You called `setProps` or `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created. First off: I thought that this would only be a problem if there is another owner for the component I want to manipulate. However, my components don't have React components as owners, just HTML elements as parents. I could circumvent this problem by attaching ALL application data to a single root component. However, I'd like to keep certain sets of data separate. Is there a way?
downvote count: 0
accepted answer: http://stackoverflow.com/a/27048414

http://stackoverflow.com/a/27259513
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27142308
has body: Some of the containerless control above was incorrect but the idea was good. Here is the fixed code

http://stackoverflow.com/q/27054886
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
score: 3
upvote count: 3
type: Question
tagged with: linkedin-api
tagged with: javascript
has body: I tried to get the LinkedIn followers count using JavaScript: Result but this does not work for me.
has answer: http://stackoverflow.com/a/27138933
has title: How to get LinkedIn followers count?
tagged with: api

http://stackoverflow.com/comment/42711233
comment on: http://stackoverflow.com/q/27097642
type: Comment
type: QuestionComment
has text: What version of `ember-cli` are you on? The default is right before the ` ` tag. Are you building with the environment set to production?
score: 1

http://stackoverflow.com/comment/42620698
comment on: http://stackoverflow.com/q/27051685
type: Comment
type: QuestionComment
has text: It needs to asynchronous sadly as i am using this modal library which uses callbacks.
score: 0

http://stackoverflow.com/a/27121925
has comment: http://stackoverflow.com/comment/42745836
has body: I did the same thing using Ruby on Rails. But was sending data that was not in xml format. One important thing as you said that your webservice is not on the same domain, you will have to deal with CORS. You can get idea about CORS here https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS You can refer this Post JQuery JSON Calls To PHP WebService Always Runs "Error" Callback function callPhpAPI(){ var dataa = {"your_data":youdata}; $.ajax({ url : yourwebserviceurl, type: 'POST', data : JSON.stringify(dataa), contentType : "application/json", success:function(data) { if(data){ alert(data); //console.log("Data from Server"+JSON.stringify(data)); } else{ console.log("Data is empty"); } }, error: function(xhr) { alert('Error! Status = ' + xhr.status + " Message = " + xhr.statusText); //console.log('Error! Status = ' + xhr.status + " Message = " + xhr.statusText); } }); });
has comment: http://stackoverflow.com/comment/42745896
score: 0
has comment: http://stackoverflow.com/comment/42745768
type: Answer
has comment: http://stackoverflow.com/comment/42745269
answers question: http://stackoverflow.com/q/27121596
has comment: http://stackoverflow.com/comment/42745511
has comment: http://stackoverflow.com/comment/42745960

http://stackoverflow.com/a/27133468
has comment: http://stackoverflow.com/comment/42765786
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27132952
has comment: http://stackoverflow.com/comment/42768011
score: 2
has body: Refer to the jQuery.load() API In short you could do $( "#myDiv" ).load( "/mypath/some.html #someDivId" ); However the clean way to deal with this is to keep the contents of #someFicId in a separate fragment file and make sure this has strictly HTML/CSS $( "#myDiv" ).load( "/mypath/someFragment.frag.html" );

http://stackoverflow.com/comment/42562115
type: AnswerComment
comment on: http://stackoverflow.com/a/27018361
type: Comment
has text: In general, this is right. However, I wonder if a function is the right solution for this. You lose a lot of the structure and style (and benefits) of the 2-way binding. Why would you do it this way, and not have the resultant information kept on the scope?
score: 0

http://stackoverflow.com/comment/42713542
type: AnswerComment
has text: Why are you modifying like this? you have to just replace "self.script" with the JS script that I have provided in your code... Hope this helps!
type: Comment
comment on: http://stackoverflow.com/a/27101512
score: 0

http://stackoverflow.com/comment/42629219
has text: Your modal shows the same model because of `openGridGallery` function. `modal.openModal(myCollection.at(0))` will always show the first model in the collection. I will suggest you to move "modal open" logic to modal's view, and there handle it, to be sure which model you are showing.
comment on: http://stackoverflow.com/q/27055985
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42776225
type: Comment
score: 1
has text: `POST` is designed to send data up to the server and get a response. If the intention is just to **get** data, `type` should be set to `GET` :)
comment on: http://stackoverflow.com/a/27139204
type: AnswerComment

http://stackoverflow.com/comment/42626426
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27054754
has text: @Yohanes Khosiawan :- thank you, but now also update query is not working.
type: Comment

http://stackoverflow.com/q/27066982
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27067591
type: UnansweredQuestion
tagged with: video
tagged with: flashvars
has comment: http://stackoverflow.com/comment/42647754
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42647894
has body: I am using camendesign's VIDEO FOR EVERYBODY script to embed a video element on my page, and have a flash player fallback for those who do not have HTML5 functionality. But I am changing al the URLs to be dynamically loaded when the page is called. Everything is parsing out fine except for the flashVars string in the object embed params tag. The value of this params tag needs to be URL Encoded, so I have a bit of javascript before the video is rendered on the page to encode the url for the poster image AND the video file using the values that are loaded in. My question is this: How do I properly have the two values parse out so that they complete the flashVars value properly? Here's my code: (consequently, this is a Java site I'm running, hence the JAVA c:sets) <c:set var="title" value="Blender Demo Reel 2013"/> <c:set var="file" value="bdr2013"/> <c:set var="poster" value="poster.jpg"/> <c:set var="width" value="960"/> <c:set var="height" value="540"/> New Video Player The source code when I view this in a browser comes back as this: New Video Player
tagged with: javascript
has title: Inserting Javascript Variables into a flashVars string
has answer: http://stackoverflow.com/a/27068538

http://stackoverflow.com/a/27221684
has comment: http://stackoverflow.com/comment/42922132
has body: Is it possible to get an access to binary data of already loaded image on the page? No, this is unfortunately not possible, not from the raw binary file data used for the image. The original binary data is discarded after the image has been processed. The image loading process is a completely separate process and does not involve canvas at all - canvas is innocent here! :-) A browser loads an image in roughly the following way, which all happens internally with no access from JavaScript or DOM (not necessarily in this order for all stages): Connects to server Loads data to determine file type If a supported file type, loads all data Extracts ICC and gamma definitions if supported Extract EXIF orientation/rotation if present Decompresses/decodes the file into a bitmap Applies gamma and ICC correction if available and supported Updates the Image object with internal reference to bitmap Broadcasts an load event Invokes onload call in any When you receive the Image object everything has been prepared and set - the rest of the file and the information extracted from it is discarded, incl. EXIF data (with the exception from EXIF orientation in browsers which support it, however, for internal use only, not available to be read from JavaScript and only used for DOM - though as it could break intended layout it is typically ignored). I believe most browsers are able to read this flag but AFAIK only Safari mobile actually uses it (I could be wrong here, but it does not change the essence of the answer). There is only a bitmap left with RGBA information. You can now insert that into DOM or draw it onto a canvas, but the meta information is already stripped before doing this. When you extract a data-uri from canvas (as png or jpeg, doesn't really matter) the extraction is based solely on the bitmap of the canvas, not the original image used on it (images are just one source of graphic anyways, in addition to video and paths). As there is no official API at the moment to access …
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27123547
answers question: http://stackoverflow.com/q/27123547
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/42923391
downvote count: 0
has comment: http://stackoverflow.com/comment/42922488
score: 3

http://stackoverflow.com/comment/42646181
has text: Yes that is exactly what I am trying to accomplish. However the base does not work for some reason when I add it to my code.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27066067
score: 0

http://stackoverflow.com/comment/42576749
score: 0
type: AnswerComment
has text: Thank you Navish, but i need change parameter on form too, and i can't put id on link =/, I think I missed to explain that according to the url parameter must change the parameter in the form and the link, this an example of the link that i have https://example.com/indexb.html?eos=yes&skin=bkp/visitor/pf&promochild=USANAOBKPASS&prd=100GB&sg=300236800&sa=OPEN&cmpid=online&dest=REDIR|https://example.com.br/new-page.html If i have the ABC value on url (http://example.com/?ABC), need to change the parameter of promochild=USANAOBKPASS to promochild=ABC
type: Comment
comment on: http://stackoverflow.com/a/27013008

http://stackoverflow.com/a/27137784
type: Answer
has comment: http://stackoverflow.com/comment/42799346
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42799300
answers question: http://stackoverflow.com/q/27136662
has comment: http://stackoverflow.com/comment/42774741
downvote count: 0
has comment: http://stackoverflow.com/comment/42776782
has body: You can count with CSS using the counter-reset and counter-increment and count items with CSS. body { counter-reset: img; } img { counter-increment: img; content:counter(img); content:""; } div.main:after { content: "Images Counted: " counter(img); } &lt;div class="main"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;/div&gt; However to count all the items you want you could do: body { counter-reset: count; } img { counter-increment: count; content:counter(count); content:""; } p:before { counter-increment: count; content:counter(count); content:""; } h1:before { counter-increment: count; content:counter(count); content:""; } div.main:after { content: "Items Counted: " counter(count); } &lt;div class="main"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;img src="http://placehold.it/50x50"&gt; &lt;p&gt; This paragraph is also counted &lt;/p&gt; &lt;h1&gt; This header 1 is also counted &lt;/h1&gt; &lt;/div&gt; You could also place this information in a hidden div and extract it later, if needed. Here is something for reference: http://www.webdesignerdepot.com/2013/05/learn-to-count-with-css/

http://stackoverflow.com/comment/42678049
score: 0
has text: Be aware that [the render helper creates a singleton controller](http://emberjs.com/api/classes/Ember.Handlebars.helpers.html#method_render). I don't think it matters in this particular example, but it could become an issue if you decide to add to 'CommentsController'.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27084336

http://stackoverflow.com/comment/42686801
type: Comment
comment on: http://stackoverflow.com/a/27089556
has text: Thanks for replying, So every user that visits my website must change his keyboard to Arabic? I am looking for a way to type Arabic without changing keyboard layout. There are few websites already doing it, I can't figure out how are they doing it.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27006858
tagged with: javascript
has title: Why are my 'ng-clicks' and 'ng-shows' requiring I pass the controller alias along with the function being passed?
type: AnsweredQuestion
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/27006955
has body: Sorry if this is dumb, but I'm pretty new to Angular. Why is ng-click (and ng-show, but without the function) requiring that I pass the controller name along with the function being called? My code works, I'm just wondering why some things don't work if I don't use "timeTrackerCtrl.something" ? here's my code: index.html &lt;!DOCTYPE html&gt; &lt;html ng-app="timeTrackerApp"&gt; &lt;head&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="app.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body ng-controller="TimeTrackerController as timeTrackerCtrl"&gt; &lt;!-- Task Form Container --&gt; &lt;div&gt; &lt;!-- Task Form --&gt; &lt;div&gt; &lt;form name="taskForm" ng-submit="timeTrackerCtrl.addTask(tempTask)"&gt; &lt;input ng-model="timeTrackerCtrl.tempTask.name" required type="text" placeholder="what are you working on?" title="Task Name" /&gt; &lt;select ng-model="timeTrackerCtrl.tempTask.project" ng-options="project.name as project.name for project in timeTrackerCtrl.projects" title="name"&gt; &lt;option value=""&gt;+ project&lt;/option&gt; &lt;/select&gt; &lt;input type="submit" value="&amp;#9654;" /&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Tasks Container --&gt; &lt;div id="taskContainer"&gt; &lt;!-- Live Preview --&gt; &lt;div class="taskLine" ng-show="timeTrackerCtrl.tempTask.name"&gt; &lt;div class="date"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;div&gt; &lt;div ng-show="timeTrackerCtrl.tempTask.star" ng-click="timeTrackerCtrl.tempTask.star = false" class="star activeStar"&gt;&amp;#9733;&lt;/div&gt; &lt;div ng-hide="timeTrackerCtrl.tempTask.star" ng-click="timeTrackerCtrl.tempTask.star = true" class="star"&gt;&amp;#9734;&lt;/div&gt; &lt;div class="taskName"&gt;{{timeTrackerCtrl.tempTask.name}}&lt;/div&gt; &lt;div&gt;&lt;span ng-show="timeTrackerCtrl.tempTask.project != null" class="projectBlock"&gt;{{timeTrackerCtrl.tempTask.project…
answer count: 1
accepted answer: http://stackoverflow.com/a/27006955
score: 0

http://stackoverflow.com/comment/42627481
score: 2
has text: show your real data of First & Second array
comment on: http://stackoverflow.com/q/27055622
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27076745
tagged with: gruntjs
type: Question
has answer: http://stackoverflow.com/a/27091580
downvote count: 0
tagged with: javascript
has body: I have my project structure like this: ./ -index.html -js/ -app.js -home/ -home.js I wanted to match all javascript files inside js folder and use them in index file. So, in my gulpfile.js is used like this: var gulp = require('gulp'), template = require('gulp-template'); var js = ['js/**/*.js']; gulp.task('default', function() { return gulp.src('index.html') .pipe(template({ scripts: js, name: 'index', })) .pipe(gulp.dest('dist')) }) index.html &lt;%= name %&gt; &lt;!-- compiled JavaScript --&gt;&lt;% scripts.forEach( function ( file ) { %&gt; &lt;script type="text/javascript" src="&lt;%= file %&gt;"&gt;&lt;/script&gt;&lt;% }); %&gt; Which renders index.html like this: &lt;!-- compiled JavaScript --&gt; &lt;script type="text/javascript" src="js/**/*.js"&gt;&lt;/script&gt; Which obviously not going to work. So how can I display actual file names in place of pattern?
answer count: 1
tagged with: gulp
favorite count: 0
accepted answer: http://stackoverflow.com/a/27091580
has title: how to use actual file name matched by pattern in gulp-template
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/27038436
upvote count: 1
answers question: http://stackoverflow.com/q/27038377
score: 1
has body: $scope.text = $interpolate('&lt;font color="brown"&gt; &lt;b&gt; Press &amp;lt;Esc&amp;gt; key to escape&lt;/b&gt;&lt;/font&gt;')($scope);
downvote count: 0
type: Answer

http://stackoverflow.com/a/27065796
has comment: http://stackoverflow.com/comment/42646207
has comment: http://stackoverflow.com/comment/42647875
answers question: http://stackoverflow.com/q/27065720
score: 0
has comment: http://stackoverflow.com/comment/42645393
has comment: http://stackoverflow.com/comment/42645599
has comment: http://stackoverflow.com/comment/42645666
has comment: http://stackoverflow.com/comment/42646006
has comment: http://stackoverflow.com/comment/42645013
type: Answer
has comment: http://stackoverflow.com/comment/42645848
has comment: http://stackoverflow.com/comment/42647795
has body: Put the javascript in another js file(eg: filename.js) and load it load it in the header.. &lt;script src="path to the file"&gt;&lt;/script&gt; Also you have to change window.onload = login() to window.onload = login window.onload expects a reference of a function. When you use window.onload = login() the return value of the login() function is set as the reference which is not correct. The function name login is the reference..

http://stackoverflow.com/q/27056710
score: 1
favorite count: 0
tagged with: tinymce
has comment: http://stackoverflow.com/comment/42629095
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27058397
has answer: http://stackoverflow.com/a/27056847
upvote count: 1
has comment: http://stackoverflow.com/comment/42630433
has comment: http://stackoverflow.com/comment/42630227
possible better answer: http://stackoverflow.com/a/27056847
tagged with: javascript
has body: I have a comment field and an input textarea that is a tinymce editor. I have a checkbox named admin only and if that checkbox is clicked the body of tinymce should change color to pink and if it is not ticked it should be white. I used javascript and used onclick method to change it dynamically. Here is the html code: New Comment : Administrator Only And here is the javascript used : function SetCommentColor() { if (document.form2.cbAdmin.checked == true) { color = 'pink'; } else { color = 'white'; } var t = tinyMCE.getInstanceById('eComment'); t.getBody().style.backgroundColor = color; } This doesnt work for me. Can anyone help me on this?
has answer: http://stackoverflow.com/a/27058397
has comment: http://stackoverflow.com/comment/42630660
type: AnsweredQuestion
downvote count: 0
has title: Changing background of TinyMCE editor dynamically using javascript

http://stackoverflow.com/comment/42531870
type: Comment
has text: Why duplicated id in same html id="question' + i + '"
comment on: http://stackoverflow.com/q/27000802
score: 0
type: QuestionComment

http://stackoverflow.com/q/27120024
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27120202
has title: How to receive additional parameters in jquery success method ()?
score: 0
answer count: 2
has body: I'm validating my html form with Jquery/Ajax Call. It's process by Php. In php page its return all success result or error result after processing To Jquery Success method. SO I want to receive another parameters in jquery success method (). Is there any way to received it ? for example : in this following line code If $numSearch is == 0 elseif($numSearch === 0){ echo "No Matches."; } then I want to received another parameters in jquery success method so that I can load getDetails2(SearchValue); function. Now it's load when the value is integer. But it's should be check if value is Integer and result is showing something. Php code : require_once("corefile.php"); $search = (int) $_POST['data']; $cdid = inputvalid($_POST['cdid']); if($cdid == "ID"){ // if serach value is empty if(empty($search)){ echo "Search keyword required."; } // if serach value is not empty elseif(!empty($search)){ // start myqli_query to search //$numserach } elseif($numSearch === 0){ echo "No Matches."; } } Jquery Code: $(document).ready(function() { $("#cdid").click(function() { var SearchValue = $('#txt_name').val(); var cdid = $('#cdid').val(); $("#loading-image").show(); $.ajax({ //create an ajax request to load_page.php type: "POST", url: "doSearch.php", data : { 'data' : SearchValue, 'cdid' : cdid }, dataType: "html", //expect html to be returned success: function(response){ if(Math.floor(SearchValue) == SearchValue && $.isNumeric(SearchValue)){ getDetails2(SearchValue); } $("#showSearchResult").html(response); $('#visiableaftersearch').hide(); document.getElementById('txt_name').value=''; document.getElementById('txt_given_name').value=''; $("#loading-image").hide(); } }); }); });
tagged with: jquery
has answer: http://stackoverflow.com/a/27120202
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27120102
type: Question
has answer: http://stackoverflow.com/a/27120102

http://stackoverflow.com/comment/42553876
score: 0
type: Comment
has text: If you follow the link through to EventListener and read the Remarks and Parameters sections they explain that the function will receive an Event object
comment on: http://stackoverflow.com/a/27012849
type: AnswerComment

http://stackoverflow.com/q/27026695
tagged with: jquery
has title: Because of overflow on a list, a dropdown menu can't pop on the left of this list (minus margin-left)
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42577876
has comment: http://stackoverflow.com/comment/42576861
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42576733
has body: Refer to this fiddle: http://jsfiddle.net/od4vjhbc/6/ Basically, when overflow is set on #contact-list, the dropdown menu (when clicking on a contact in the list) is not completely shown, as it gets cut. Remove / comment the overflow on #contact-list, then the popup will be fully shown. How I can make it work well (menu to be fully shown when clicking the contact) even if overflow is set? (Overflow required if there are a lot of contacts in the list). What kind of structural change to the HTML should I do, if required?
type: Question
has comment: http://stackoverflow.com/comment/42576636
linked to: http://stackoverflow.com/q/6421966
tagged with: javascript
has answer: http://stackoverflow.com/a/27028249
has comment: http://stackoverflow.com/comment/42576881
has comment: http://stackoverflow.com/comment/42577560
has comment: http://stackoverflow.com/comment/42576678
score: 0
answer count: 1

http://stackoverflow.com/a/27059100
upvote count: 2
answers question: http://stackoverflow.com/q/27059027
type: Answer
score: 2
downvote count: 0
has body: var str = "Address : **273A-84, Sundharam Street,, Ganthi Path, Kovai,,,,India,641001**"; str.replace(/\,{1,}/gi, ','); DEMO:http://jsbin.com/sejuma/2/

http://stackoverflow.com/a/27040576
has comment: http://stackoverflow.com/comment/42600670
has comment: http://stackoverflow.com/comment/42600827
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27040553
answers question: http://stackoverflow.com/q/27040553
score: 3
has body: Use \s* to match optional space characters: /(color:\s*(.);)/ (.) will match only a single character color. If you want to match another colors with more characters, use following regular expression: /(color:\s*([^\s;]+)\s*;)/ (used \S to match non-space character)
has comment: http://stackoverflow.com/comment/42600908
has comment: http://stackoverflow.com/comment/42600995
has comment: http://stackoverflow.com/comment/42600858
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42600395
has comment: http://stackoverflow.com/comment/42600723
type: Answer
has comment: http://stackoverflow.com/comment/42600948

http://stackoverflow.com/q/27117395
score: 2
has comment: http://stackoverflow.com/comment/42738961
type: Question
has answer: http://stackoverflow.com/a/27118673
tagged with: javascript
has answer: http://stackoverflow.com/a/27117593
has body: Ok, so I'm working on a code where I start 5 workers, they all sleep for a random time from 0-10 seconds, they then return how long they slept for. the manager then outputs this to the html when all workers are done sleeping So far I have made my 5 workers, that sleep for random times but don't know how to handle the multiple responses to the manager. worker.js method that gets a random numbers, sleeps for that randomnumber then sends how long it slept manager.js (under) window.onload = function(){ var w1= new Worker("worker.js"); var w2= new Worker("worker.js"); var w3= new Worker("worker.js"); var w4= new Worker("worker.js"); var w5= new Worker("worker.js"); var worker = [w1,w2, w3, w4, w5] for (i =0; i &lt; worker.length; i++){ worker[i].postMessage("sleep"); worker[i].onmessage = function(event) { ndate = new Date(); message = ndate + " Worker says " + event.data; document.getElementById("output").innerHTML = message; } } } this code has 5 working workers but the message is the message from the last worker. So my question is how do I collect these 5 messages in the manager, wait for all 5 then send to html?
tagged with: web-worker
tagged with: worker
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has title: Multiple JavaScript workers
upvote count: 2
type: UnansweredQuestion
tagged with: multithreading
has answer: http://stackoverflow.com/a/79173681

http://stackoverflow.com/comment/42607927
has text: http://stackoverflow.com/questions/4391575/how-to-find-the-size-of-localstorage
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27044607
score: 0

http://stackoverflow.com/comment/42589290
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27034057
has text: yeah. people can get really strange on this website. i've had entire posts changed, removed, all sorts of things, where I thought it was a genuine question. I think people here can get a bit too proud sometimes. in any case, i find your answer short, simple, what i was looking for lol.

http://stackoverflow.com/comment/42546206
comment on: http://stackoverflow.com/q/27009105
score: 0
type: Comment
type: QuestionComment
has text: `"-$12,33.00".replace(/[^\d\-\.]/g,'')`. Outputs "-1233.00"

http://stackoverflow.com/q/27125046
tagged with: handlebars.js
upvote count: 1
answer count: 1
tagged with: spacebars
has body: Let's say I have a Posts collection, the data for which looks like this: var post1 = { title: "First post", post: "Post content", comments: [<comment id>, <another comment id>, <etc>] }; And I have a corresponding Comments collection. I've published and subscribed to both collections and want to display a post with it's comments. How do I go about displaying the comments for that specific post? {{title}} {{post}} {{#each comments}} // Only have access to the ID {{/each}} I could create a helper like this: Template.post.helpers({ displayComment: function(id) { return Comments.findOne(id).fetch().comment; } }); and do: {{title}} {{post}} {{#each comments}} {{displayComment @index}} {{/each}} But then I'd have to create a helper for each of the comment object's properties, etc. What's the clean way to do it? I don't want to populate the comments field on the post object, since that would mean calling .fetch(), and posts would no longer be reactive.
tagged with: mongodb
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27125401
type: Question
type: AnsweredQuestion
score: 1
tagged with: meteor
favorite count: 0
has title: How to access another collection by ID in Meteor template?
accepted answer: http://stackoverflow.com/a/27125401

http://stackoverflow.com/a/27186238
accepted answer of: http://stackoverflow.com/q/27069852
has body: Your suspicion is correct. You could adjust the validator for your use case like this: kendo.ui.Validator.prototype.validateInput = function (input) { input = $(input); var that = this, template = that._errorTemplate, result = that._checkValidity(input), valid = result.valid, className = ".k-invalid-msg", fieldName = (input.attr("name") || ""), lbl = input.parent().find("span" + className).hide(), messageText; input.removeAttr("aria-invalid"); if (!valid) { messageText = that._extractMessage(input, result.key); that._errors[fieldName] = messageText; var messageLabel = $(template({ message: messageText })); that._decorateMessageContainer(messageLabel, fieldName); if (!lbl.replaceWith(messageLabel).length) { messageLabel.insertAfter(input); } messageLabel.show(); input.attr("aria-invalid", true); } input.toggleClass("k-invalid", !valid); return valid; }; Note that there are a few simplifications in this method, so it may break on certain corner cases. (demo)
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42873456
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27069852
upvote count: 1

http://stackoverflow.com/comment/42707659
type: AnswerComment
comment on: http://stackoverflow.com/a/27101312
type: Comment
has text: yea, .stop() does affect the animation because it's not so touchpad friendly.
score: 0

http://stackoverflow.com/a/27035818
accepted answer of: http://stackoverflow.com/q/27035739
has body: You need to escape the \ one more time while giving it inside the delimiter " var regexp = "^(([^&lt;&gt;()[\\]\\\\.,;:\\s@\"]+(\\.[^&lt;&gt;()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"; OR var regexp = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/27035739
type: Answer
has comment: http://stackoverflow.com/comment/42592951

http://stackoverflow.com/comment/42750592
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27124956
has text: Thanks for the advice! However maybe some context might help. This isn't for a password, I'm basically making a "question-answer" website for a single end user. All I want is to somehow be able to see a list of wrong answers that are input by the answer, and am just trying to figure out the best way to go about doing this. Are there any methods I'm unaware of other than potentially logging this data into a text file with PHP?

http://stackoverflow.com/q/27056245
has body: I want to know if there is any way to share data from directive controller to controller without events. lets say i have: .directive('someHandler', function () { return { controller: function () { this.users = []; } } }) This is parent directive that responsible to his children directives communication. I want every time lets say this array change to let know the main controller. Like the functionality of "=";
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20018507
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/27059105
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42665792
score: 0
has comment: http://stackoverflow.com/comment/42629305
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42628550
has title: Angular share data from directive controller to controller

http://stackoverflow.com/comment/129785126
comment on: http://stackoverflow.com/a/27118077
score: 0
type: AnswerComment
type: Comment
has text: What if I have an auth middleware and then a validate middleware and then my controller. If auth fails I want to skip over validate and let my controller do the logging and then send the response… is this bad practise? Can I just add a flag to the req in the auth middleware and then eval the flag in validate to skip validate and then eval again in my controller? Or can I skip straight to controller somehow? … next(‘controller’) maybe?

http://stackoverflow.com/q/27094668
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
tagged with: gsap
favorite count: 0
tagged with: angularjs
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27331191
type: Question
has title: How can specified table data be animated within a table row with ng-animate?
tagged with: javascript
has body: I'm using Angular's ng-repeat to generate a table with multiple rows. I want to make specific table cells animate when a user mouseovers the table row. In this example case below, I only want to make the corresponding animated cells be visible (or opacity:1) when the row is mouseovered, but I don't want the the rows to change height (i.e. the row height should account for non-visible cell data). I have tried CSS animation and ng-animate, but all of my attempts animate all of the rows' corresponding cells (e.g., in a multi-row table where the second column is animated, all cells in the second column will respond when the mouse is over any part of the table). Full example available in jsBin includes both Greensock TweenMax and css animation attempts. Relevant html (in this version, only the 2nd-column/red cells change visibility/opacity): index #{{($index)}} red background blue backgrounds Relevant js (using TweenMax) var app = angular.module('app', ['ngAnimate']); app.controller('MainCtrl', ['$scope', function ($scope) { $scope.isHidden = false; $scope.fadeIt = function(id) { $scope.isHidden = !$scope.isHidden; }; }]); app.directive("hideMe", function ($animate) { return function (scope, element, attrs) { scope.$watch(attrs.hideMe, function (newVal) { if (newVal) { $animate.addClass(element, "fade"); } else { $animate.removeClass(element, "fade"); } }); }; }); app.animation(".fade", function () { return { addClass: function (element, className) { TweenMax.to(element, 1, {opacity: 0}); }, removeClass: function(element, className) { TweenMax.to(element, 1, {opacity: 1}); } }; });
accepted answer: http://stackoverflow.com/a/27331191

http://stackoverflow.com/a/27131521
type: Answer
has comment: http://stackoverflow.com/comment/42799586
answers question: http://stackoverflow.com/q/27131444
has comment: http://stackoverflow.com/comment/42784585
score: 1
upvote count: 1
has body: querySelectorAll returns a nodelist of matching elements; my guess is that you'll have to loop through that array and disable each element individually: var inputs = document.getElementById("wrapper").querySelectorAll('input[type="text"]'); [].forEach.call(inputs, function(input){ input.disabled = true; }); Also note the double quotes in the selector query. input[type=text] != input[type="text"]
has comment: http://stackoverflow.com/comment/42761822
downvote count: 0

http://stackoverflow.com/comment/42533264
score: 0
type: QuestionComment
has text: Didn't know you could combine both notations, thanks.
type: Comment
comment on: http://stackoverflow.com/q/27001596

http://stackoverflow.com/q/27149676
has answer: http://stackoverflow.com/a/27190920
has comment: http://stackoverflow.com/comment/42862331
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/42867343
has comment: http://stackoverflow.com/comment/42866301
has comment: http://stackoverflow.com/comment/42794656
tagged with: javascript
has comment: http://stackoverflow.com/comment/42796142
has body: I have implemented successfully the datatables server side processing on one of my tables just that the $('.select_users').change(function(event){ doesn't work anymore on my select tab, despite the fact it shows correctly. When I try to select an option from the select tag it should action to the jquery function but it doesn't. EDIT 28 NOV 2014 I have found that there is an issue with the events and server side processing: http://www.datatables.net/examples/advanced_init/events_live.html. So how can I convert script BLOCK #1 to match the script from the above link. I added the $('#dataTables-ss').on('click', 'tr', function () { var name = $('td', this).eq(0).text(); alert( 'You clicked on '+name+'\'s row' ); } ); And this was getting triggered. BLOCK #1 => Jquery - on change of select it should trigger this function $('.select_users').change(function(event){ var selected_value = this.value; var id = $(this).find('option:selected').attr('class'); var id = id.split('-'); var select_id = id[1]; $.ajax({ type: 'post', url: 'includes/ajax.html', data: { action: 'confirm_notconfirm_subscribers', selected_value: selected_value, select_id: select_id }, success: function(data) { $('#message').html(data).fadeIn(1000).fadeOut(1000); }, error: function() { $("#result").html('There was an error'); } }); }); BLOCK #2 => PHP important part public function read_subscriber_table() { $table = 'subscribers'; $primaryKey = 'ID'; $columns = array( array( 'db' => 'name', 'dt' => 1 ), array( 'db' => 'email', 'dt' => 2 ), array( // issue is here in the third array where I create the select string. 'db' => 'confirmed', 'dt' => 3, 'formatter' => function( $d, $row ) { if ($d == '1') { $confirmed = 'Confirmed'; } else { $confirmed = 'Not Confirmed'; } if ($d !== '1') { $selected = 'selected'; } else { $selected = ''; } $string = ' Confirmed Not Confirmed '; return $string; } ), array( 'db' => 'date', 'dt' => 4, 'formatter' => function( $d, $row ) { return date( 'd-m-Y', strtotime($d)); } ), a…
accepted answer: http://stackoverflow.com/a/27190920
type: AnsweredQuestion
has title: DataTables Server Side Processing Adding html content select tag not triggering javascript
tagged with: datatables
downvote count: 0
has comment: http://stackoverflow.com/comment/42867131
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42867640
has comment: http://stackoverflow.com/comment/42867560
favorite count: 0
has comment: http://stackoverflow.com/comment/42862062
type: Question
has comment: http://stackoverflow.com/comment/42795104
tagged with: php
has comment: http://stackoverflow.com/comment/42866644
has comment: http://stackoverflow.com/comment/42794620
linked to: http://stackoverflow.com/q/2031826
has comment: http://stackoverflow.com/comment/42794816
has comment: http://stackoverflow.com/comment/42796105

http://stackoverflow.com/comment/42645063
score: 2
comment on: http://stackoverflow.com/q/27065824
has text: `merge is a function provided by Khan Academy` could you include that function? Is the error coming from your code or theirs?
type: Comment
type: QuestionComment

gulp-inject
tag name: gulp-inject
tags question: http://stackoverflow.com/q/27047510
type: Tag

http://stackoverflow.com/q/27086343
tagged with: javascript
has title: Click on Small Image and Overlay Bigger Image
tagged with: jquery
has comment: http://stackoverflow.com/comment/42681245
favorite count: 0
has comment: http://stackoverflow.com/comment/42699411
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/27086571
upvote count: 1
has body: I have several images in a grid. I want each image to overlay to fullscreen when I click on them. I have this javascript on there, but when I click on the image the one that overlays is the last image on the grip. How should I fix that? I'm using this, but I have several images: http://jsfiddle.net/a8c9P/ The only the difference on mine from this is that it is in another div for another javascript that puts it into the grid. HTLM: &lt;div class="brick"&gt; &lt;div class="overlay"&gt;&lt;/div&gt; &lt;div class="overlayContent"&gt; &lt;img class="imgBig" src="img/Scan.jpg" /&gt; &lt;/div&gt; &lt;img class="imgSmall" src="img/Scan.jpg" height="345"&gt; &lt;/div&gt;
tagged with: css
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27086571
tagged with: image
type: Question
downvote count: 0

http://stackoverflow.com/comment/42540824
has text: ...or just return false on click and prevent hash change.
type: Comment
comment on: http://stackoverflow.com/a/27005810
score: 1
type: AnswerComment

http://stackoverflow.com/q/27148851
has title: How to suppress console.log messages while testing?
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27149416
has comment: http://stackoverflow.com/comment/42793096
score: 1
has answer: http://stackoverflow.com/a/27149001
tagged with: mocha.js
accepted answer: http://stackoverflow.com/a/27149416
answer count: 2
possible better answer: http://stackoverflow.com/a/27149001
downvote count: 0
tagged with: javascript
has body: I have a util that I want to test: var util = function(data) { ..... console.log('msg'); .... return true } My test.js describe('util', function () { it('should ...', function () { expect(util({})).to.be.true; }); }); How can I avoid 'msg' output during the test without changing the util?
favorite count: 0
has comment: http://stackoverflow.com/comment/42792709
has comment: http://stackoverflow.com/comment/42793117
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/42553383
type: AnswerComment
comment on: http://stackoverflow.com/a/27012210
has text: I've just tested it again and it seems that everything is ok. You are not forgetting to change the new data ids to unique ones, right ?
type: Comment
score: 0

jquery-ui
tags question: http://stackoverflow.com/q/27081913
tags question: http://stackoverflow.com/q/27124096
tags question: http://stackoverflow.com/q/27115572
tags question: http://stackoverflow.com/q/27081038
tags question: http://stackoverflow.com/q/27067715
tags question: http://stackoverflow.com/q/27068631
tags question: http://stackoverflow.com/q/27030567
tags question: http://stackoverflow.com/q/27090429
tags question: http://stackoverflow.com/q/27088477
tags question: http://stackoverflow.com/q/27071807
tags question: http://stackoverflow.com/q/27027616
tags question: http://stackoverflow.com/q/27075918
tags question: http://stackoverflow.com/q/27005179
tags question: http://stackoverflow.com/q/27086926
tags question: http://stackoverflow.com/q/27007253
tags question: http://stackoverflow.com/q/27065150
tags question: http://stackoverflow.com/q/27011690
tags question: http://stackoverflow.com/q/27101588
tags question: http://stackoverflow.com/q/26996423
tags question: http://stackoverflow.com/q/27049466
tags question: http://stackoverflow.com/q/27073909
tags question: http://stackoverflow.com/q/26995000
tags question: http://stackoverflow.com/q/27090291
tags question: http://stackoverflow.com/q/26996051
tags question: http://stackoverflow.com/q/27122509
tags question: http://stackoverflow.com/q/27063558
tags question: http://stackoverflow.com/q/27066350
tags question: http://stackoverflow.com/q/27083685
tags question: http://stackoverflow.com/q/27102457
tags question: http://stackoverflow.com/q/27048496
tags question: http://stackoverflow.com/q/27139275
tags question: http://stackoverflow.com/q/27033367
tags question: http://stackoverflow.com/q/27071585
tags question: http://stackoverflow.com/q/27147671
tags question: http://stackoverflow.com/q/27056940
tags question: http://stackoverflow.com/q/27087469
tags question: http://stackoverflow.com/q/27137034
tags question: http://stackoverflow.com/q/26996412
tags question: http://stackoverflow.com/q/27118294
tags question: http://stackoverflow.com/q/27024487
tags question: http://stackoverflow.com/q/27021399
tags question: http://stackoverflow.com/q/27054804
tags question: http://stackoverflow.com/q/27105132
tags question: http://stackoverflow.com/q/27073008
tags question: http://stackoverflow.com/q/27076324
type: Tag
tags question: http://stackoverflow.com/q/26999496
tags question: http://stackoverflow.com/q/27089420
tag name: jquery-ui
tags question: http://stackoverflow.com/q/27120579
tags question: http://stackoverflow.com/q/27133973
tags question: http://stackoverflow.com/q/27084486
tags question: http://stackoverflow.com/q/27129973
tags question: http://stackoverflow.com/q/27101300

http://stackoverflow.com/comment/42524865
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26996785
has text: My point was to check if it's set or not, by making it global it becomes a reference and as a reference it can be accessed later on even if the scoped variable changes. Was it set?
score: 0

http://stackoverflow.com/a/27072945
has comment: http://stackoverflow.com/comment/42657948
score: 0
has body: Use if(id.match(/^([a-zA-Z]+)#/)). Updated my answer, since matchneeds a regex argument, not a string. Furthermore, id.match(/^([A-z]+)#/) matches ^testfor some reason. Why?
answers question: http://stackoverflow.com/q/27072924
type: Answer

http://stackoverflow.com/q/27100486
answer count: 6
tagged with: ajax
linked to: http://stackoverflow.com/q/10041468
has answer: http://stackoverflow.com/a/27100936
has answer: http://stackoverflow.com/a/27100620
tagged with: angularjs
has answer: http://stackoverflow.com/a/27100546
has comment: http://stackoverflow.com/comment/42705299
possible better answer: http://stackoverflow.com/a/27100545
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27100590
has answer: http://stackoverflow.com/a/27100545
has comment: http://stackoverflow.com/comment/42705277
score: 0
accepted answer: http://stackoverflow.com/a/27100620
has answer: http://stackoverflow.com/a/27100834
type: Question
has title: Using $http after previous $http done
has body: I have 3 JSON web services which I should use in my application, I use $http to load from URL, my code is : $http.get('http://{url}/users') .then(function (result) { storeUsers(result); }); $http.get('http://{url}/news') .then(function (result) { storeNews(result); }); $http.get('http://{url}/pages') .then(function (result) { storePages(result); }); var users = getUsers(); Problems : 1- all $http run together not wait until the previuse $http done. 2- var users = getUsers(); will run before $http done. UPDATE : I changed my code to : var loadedService = { users: false, news: false, pages: false }; function getUsers() { deferred = $q.defer(); $http.get('http://{url}/users') .then(function (result) { loadedService.users = result; deferred.resolve('I got users'); console.log("Get users"); }); return deferred.promise; } function getNews() { deferred = $q.defer(); $http.get('http://{url}/news') .then(function (result) { loadedService.news = result; deferred.resolve('I got news'); console.log("Get news"); }); return deferred.promise; } function getPages() { deferred = $q.defer(); $http.get('http://{url}/pages') .then(function (result) { loadedService.pages = result; deferred.resolve('I got pages'); console.log("Get pages"); }); return deferred.promise; } getNews().then(getUsers()).then(getPages()).then(function () { console.log('Done !'); }); When I run my program, I will see : XHR finished loading: GET "http://{url}/pages". ionic.bundle.js:16185 Get pages sync.js:133 XHR finished loading: GET "http://{url}/users". ionic.bundle.js:16185 Get users sync.js:56 XHR finished loading: GET "http://{url}/news". ionic.bundle.js:16185 Get news sync.js:107 as you can see, first of all pages service loaded, then users service and then news, while in my code I said getNews().then(getUsers()).then(getPages()). and finally console.log('Done !'); don't show !
tagged with: javascript

http://stackoverflow.com/a/27129996
accepted answer of: http://stackoverflow.com/q/27129925
type: Answer
answers question: http://stackoverflow.com/q/27129925
upvote count: 1
has body: Put the condition inside, that way it will fire but do nothing. $('#ussfcanl').hover(function() { if(hoverEnabled){ $('#imageholder').html('&lt;img src="http://www.hpc.ncep.noaa.gov/sfc/satsfc.gif" /&gt;'); } });
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27004227
score: 1
answers question: http://stackoverflow.com/q/27003898
upvote count: 1
downvote count: 0
has body: Assuming input of "2\n0\n1" Consider what lines.shift() does, It removes the first item from lines and reduces all other indicies by 1 It returns the first item that is now removed lines So, in your case, 2 is returned and lines becomes ["0", "1"] Next, consider what lines.splice(0, 2) does It removes 2 items from lines, starting from index 0 It returns an array of the removed items So, in your case, ["0", "1"] is returned and lines becomes [] Finally, you're mapping the array ["0", "1"] to numbers base 10 and you get your result [0, 1]
type: Answer

http://stackoverflow.com/q/27067950
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42649348
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27068113
has answer: http://stackoverflow.com/a/27068113
score: 0
has comment: http://stackoverflow.com/comment/42649207
favorite count: 0
has answer: http://stackoverflow.com/a/27068033
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has body: I am using a javascript countdown function to count down to a date. Problem is that when the page loads, there is a slight delay in the countdown number appearing. This would be acceptable if it was only one page on the site, but the function is going to go into a site-wide banner and so the delay is apparent on every single page visited throughout the site. It's pretty janky. Is there a way to prevent this delay in loading the javascript generated content? I know I can also add the text next to the numbers in the function, so it all loads at once instead of having the number pop in between the text, but I would like to avoid the delay entirely if possible. Here is the code: var target_date = new Date("Dec 18, 2014").getTime(); var days; var countdown = document.getElementById("countdown"); setInterval(function () { var current_date = new Date().getTime(); var seconds_left = (target_date - current_date) / 1000; days = parseInt(seconds_left / 86400); countdown.innerHTML = days + " " ; }, 1000); and here is a fiddle so you can see what I'm talking about. http://jsfiddle.net/cxythc7p/5/
has comment: http://stackoverflow.com/comment/42649196
accepted answer: http://stackoverflow.com/a/27068033
has title: Prevent delay in content generated by Javascript

http://stackoverflow.com/a/27123280
has body: If you are simply hiding/showing. This will get you what you want based on your example. &lt;style&gt; .answer:hover .a { display: none; } .answer:hover .b { display: inline; } &lt;/style&gt;
type: Answer
answers question: http://stackoverflow.com/q/27123110
score: 0

cordova
tags question: http://stackoverflow.com/q/27043534
tags question: http://stackoverflow.com/q/27023089
tags question: http://stackoverflow.com/q/27147073
tags question: http://stackoverflow.com/q/27081830
tags question: http://stackoverflow.com/q/27042339
tags question: http://stackoverflow.com/q/27022094
tags question: http://stackoverflow.com/q/27144409
tags question: http://stackoverflow.com/q/27031395
tags question: http://stackoverflow.com/q/27139166
tags question: http://stackoverflow.com/q/27038487
tags question: http://stackoverflow.com/q/27016963
tags question: http://stackoverflow.com/q/27151428
tags question: http://stackoverflow.com/q/27094706
tags question: http://stackoverflow.com/q/27090445
tags question: http://stackoverflow.com/q/27000817
tags question: http://stackoverflow.com/q/27151183
tags question: http://stackoverflow.com/q/27126173
tags question: http://stackoverflow.com/q/27117362
tags question: http://stackoverflow.com/q/27099507
tags question: http://stackoverflow.com/q/27035859
tags question: http://stackoverflow.com/q/27140639
tags question: http://stackoverflow.com/q/27019941
tags question: http://stackoverflow.com/q/27083939
tag name: cordova
tags question: http://stackoverflow.com/q/27092175
tags question: http://stackoverflow.com/q/27131906
tags question: http://stackoverflow.com/q/27092855
tags question: http://stackoverflow.com/q/27102958
tags question: http://stackoverflow.com/q/27043403
tags question: http://stackoverflow.com/q/27146500
tags question: http://stackoverflow.com/q/27150208
tags question: http://stackoverflow.com/q/27038382
tags question: http://stackoverflow.com/q/27098323
tags question: http://stackoverflow.com/q/27057076
tags question: http://stackoverflow.com/q/27033916
tags question: http://stackoverflow.com/q/27000201
tags question: http://stackoverflow.com/q/27106914
tags question: http://stackoverflow.com/q/27104686
tags question: http://stackoverflow.com/q/27112233
tags question: http://stackoverflow.com/q/27108958
tags question: http://stackoverflow.com/q/27047332
tags question: http://stackoverflow.com/q/27004669
tags question: http://stackoverflow.com/q/27099016
tags question: http://stackoverflow.com/q/27138694
tags question: http://stackoverflow.com/q/26999774
type: Tag
tags question: http://stackoverflow.com/q/27119227
tags question: http://stackoverflow.com/q/27043411
tags question: http://stackoverflow.com/q/27144843
tags question: http://stackoverflow.com/q/27082706
tags question: http://stackoverflow.com/q/26994209
tags question: http://stackoverflow.com/q/27070550
tags question: http://stackoverflow.com/q/27121415
tags question: http://stackoverflow.com/q/27107962
tags question: http://stackoverflow.com/q/27092323

http://stackoverflow.com/q/27147855
has answer: http://stackoverflow.com/a/27149851
tagged with: parsing
has answer: http://stackoverflow.com/a/27147966
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27150424
has body: How to access the outer variable inside the inner javascript function , please check my code below i need to access "index" variable inside app() function . function validate() { for (index = 0; index &lt; results.length; index++) { var parsedData_1; var provider = results[index].get("provider"); var user = results[index].get("user"); var addresses = user.get("addresses"); var address = addresses[1]; var GameScore = Parse.Object.extend("Address"); var query = new Parse.Query(GameScore); var data = JSON.stringify(address); var parsedData = jQuery.parseJSON(data); query.get(parsedData.objectId, { success: function(resultadr) { var res = JSON.stringify(resultadr); var parsedData_1 = jQuery.parseJSON(res); var apartment = parsedData_1.apartment; apa(apartment); }, error: function(object, error) { alert('error'); } }); function apa(apartment) { alert(index); [I'm not getting the index value inside this function] alert(apartment); } } } Inside the function apa() i need the index count , but im unable to get it , please help how to access the outer value inside the function.
has comment: http://stackoverflow.com/comment/42791304
has answer: http://stackoverflow.com/a/27147991
type: Question
has title: Outer Variable scope is not available inside the javascript function
tagged with: javascript
has answer: http://stackoverflow.com/a/27148188
score: 0
has comment: http://stackoverflow.com/comment/42790996

http://stackoverflow.com/a/27036350
score: 0
has body: Please try adding contentType into your call $.ajax({ type: "POST", url: "http://localhost:95/MobileEcomm/Service1.svc/validateLogin", crossDomain: true, contentType: 'application/json', data:{ 'EmailID':EmailID, 'Password':Password}, success: function (data) { alert(data); // do something with server response data }, error: function (err) { // handle your error logic here alert("Error"); } });
type: Answer
answers question: http://stackoverflow.com/q/27036029

http://stackoverflow.com/comment/42738045
type: Comment
comment on: http://stackoverflow.com/a/27071786
has text: It's documented here: https://developers.google.com/fusiontables/docs/v1/sql-reference#colName
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42666181
type: Comment
comment on: http://stackoverflow.com/a/27072755
has text: No worries! We solved this one, but please feel free to work from the resolved solution by Rick Hitchcock :)
score: 0
type: AnswerComment

http://stackoverflow.com/q/27041348
tagged with: validation
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/18700950
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has body: Forgive me if i open a new question of an old argument, but i can't find any valid solution. I have a form with some field that can become disabled but they must be validated (disabled becasue user is not allowed to fill). Since the original Javascript Validator excludes submit/reset/image/disabled i decided to modify this file in order to make disabled fields validated. the code passed from: .not(":submit, :reset, :image, [disabled]") to: .not(":submit, :reset, :image") but my disabled fields are still ignored. I tried every kind of variations on the theme but i continue to have the issue. Thanks for any new tip!
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42621243
tagged with: asp.net-mvc
tagged with: javascript
has title: MVC + Jquery Validator doesn't work on disabled fields even if elements are included
has answer: http://stackoverflow.com/a/27042514

http://stackoverflow.com/q/27142804
score: 1
has title: Get value of TD in Jquery
has body: I have multiple tr on my page,that will have tds in that.Now every tr have a td that have bd_cl i want to get the value of bd_cl on click of of the link HTML 121 111 11 Address 121 111 11 Name jQuery function uodate (objref){ var $parenttrobj = $(objref).closest('tr'); alert($parenttrobj.attr("bd_cl").val()); } But i am not able to get the value .Kindly help me in this
type: Question
has answer: http://stackoverflow.com/a/27143001
has answer: http://stackoverflow.com/a/27142853
downvote count: 0
has comment: http://stackoverflow.com/comment/42782566
tagged with: javascript
answer count: 6
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27142859
has answer: http://stackoverflow.com/a/27142854
accepted answer: http://stackoverflow.com/a/27142854
upvote count: 1
has answer: http://stackoverflow.com/a/27142862
possible better answer: http://stackoverflow.com/a/27142853
has answer: http://stackoverflow.com/a/27142857
type: AnsweredQuestion

http://stackoverflow.com/comment/42597762
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27038347
type: Comment
has text: You can also get the height of the container dynamically by using jquery $('.sidebar-menu').height(), which will return 100 or whatever the height if container is. You are thinking correctly! :) great job

http://stackoverflow.com/a/27104288
has comment: http://stackoverflow.com/comment/42713226
has body: You are doing it correctly, only thing is that you need to do .split(",") in javascript to get desired result. Like var list = console.log(data.split(","));
upvote count: 1
has comment: http://stackoverflow.com/comment/42712851
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27104133
type: Answer

http://stackoverflow.com/q/27033000
has comment: http://stackoverflow.com/comment/42588991
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/27041977
tagged with: jquery
tagged with: ajax
answer count: 2
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42627813
accepted answer: http://stackoverflow.com/a/27041977
tagged with: asp.net-mvc-4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27033082
has title: Showing messages while loading, like loading or no more data in mvc
has answer: http://stackoverflow.com/a/27033082
has body: I am implementing infinite scrolling technique in one of my views, and it is working. the script I used is given below. Now I need to show a message like no more data or something like that when data is loaded completely. I have given a if condition to check that if (data == "") { $("#divLoading").html("No More Posts");} but it is not working. Can anyone tell me what will be the problem? the view and controller sample code is given below View: @Html.AntiForgeryToken() @Html.ValidationSummary(true) @{Html.RenderPartial( "mypartial",list);} Loading, please wait... Controller: public ActionResult MessagePagination(int pagenumber) { var balObject = new BusinessLogic(); int pageSize = 3; var MessageList = balObject.FetchMessages(); MessageList = MessageList.Skip((pagenumber - 1) * pageSize).Take(pageSize).ToList(); return PartialView("mypartial", MessageList); }
upvote count: 1
type: Question

http://stackoverflow.com/q/27061738
score: 0
type: Question
type: AnsweredQuestion
tagged with: angular-ngmodel
has answer: http://stackoverflow.com/a/27062803
has comment: http://stackoverflow.com/comment/42637709
possible better answer: http://stackoverflow.com/a/27062611
linked to: http://stackoverflow.com/q/11412410
answer count: 2
has answer: http://stackoverflow.com/a/27062611
tagged with: javascript
has title: Filtering with search field in AngularJS
accepted answer: http://stackoverflow.com/a/27062803
has body: Search filtering is not working for me in AngularJS. My navbar.html: &lt;input type="text" placeholder="Search" data-ng-model="searchQuery"&gt; In the view template: &lt;ul class="userlist"&gt; &lt;li class="list" data-ng-repeat="user in users | filter: searchQuery"&gt; &lt;!--users show here--&gt; &lt;/li&gt; &lt;/ul&gt; In the index.html: &lt;div data-ng-include data-src="'./templates/navbar.html'"&gt;&lt;/div&gt; &lt;div data-ng-view&gt;&lt;/div&gt; I do not receive any error messages, it just does not work. Is this because the model is in separate templates? 2 hours later and I still have no clue how to implement this. But I think I am getting closer. When I change the searchQuery string, it filters the results. So all I need to find out is how I control this string from the navbar template (which is included with ng-include). The two controllers: //NAVBAR template controller app.controller('NavbarController', ['$scope', '$location', function ($scope, $location) { }]); //LIST page controller app.controller('ListCtrl', ['$scope', '$http', function ($scope, $http) { $scope.listpage = {'searchQuery' : ''}; //... }]); view.html: &lt;li data-ng-repeat="user in users | filter: listpage.searchQuery"&gt; navbar.html &lt;input type="text" data-ng-model="listpage.searchQuery"&gt; How do I change the listpage object in the navbar template (which is included with ng-include), so that it is applied in the filter?
tagged with: angular-filters
tagged with: angularjs-ng-repeat
tagged with: angularjs

http://stackoverflow.com/comment/42663602
type: Comment
type: QuestionComment
has text: i don't understand your question please explain your question and problem
score: 0
comment on: http://stackoverflow.com/q/27076333

http://stackoverflow.com/q/27045258
favorite count: 0
has comment: http://stackoverflow.com/comment/42623792
type: UnansweredQuestion
score: 3
tagged with: jquery-ui-sortable
answer count: 0
upvote count: 3
tagged with: dom
type: Question
tagged with: javascript
tagged with: meteor-blaze
has title: Meteor and jQuery ConnectedSortable Lists: "Failed to execute 'insertBefore' on 'Node'"
has body: Using Meteor 1.0, two lists – connected via jQuery Sortable – work normally while dragging and dropping Items onto different Lists. Except when dragging the last Item from a List and dropping it to first or middle position in the new list: "Exception in queued task: Error: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node." Dropping it as 'last' works. I gather it might be Meteor's Blaze conflicting with jQuery, but any hints are much appreciated. The error message in the console: Complete trace: at Error (native) at DOMRange.attach (http://localhost:3000/packages/blaze.js?77…) at DOMRange.setMembers (http://localhost:3000/packages/blaze.js?77…) at DOMRange.removeMember (http://localhost:3000/packages/blaze.js?77…) at http://localhost:3000/packages/blaze.js?77… at Object.Tracker.nonreactive (http://localhost:3000/packages/tracker.js?19…) at Object.eachView.stopHandle.ObserveSequence.observe.removedAt (http://localhost:3000/packages/blaze.js?77…) at Object.cursor.observe.removedAt (http://localhost:3000/packages/observe-sequence.js?2f…) at observeChangesCallbacks.removed (http://localhost:3000/packages/minimongo.js?9a…) at Object.self.applyChange.removed (http://localhost:3000/packages/minimongo.js?9a…) The code: list_items.jade ul.tasks.sortable each tasks |{{ &gt;taskItem }} else |There are no tasks yet. task_item.jade template(name="taskItem") li.task.item .inner .title |{{ title }} .date.light-text on {{ created }} strong list: {{ listId }} small rank: {{ rank }} list_item.coffee Template.listItem.helpers 'tasks': -&gt; currentUserId = Meteor.userId() Tasks.find userId: currentUserId listId: this._id , sort: rank: 1 Template.listItem.rendered = -&gt; @$(".tasks.sortable").sortable placeholder: "task-placeholder" connectWith: ".tasks.sortable" tolerance: "pointer" start: (e, ui) -&gt; item = ui.item parent = ui.item.parent().get(0) listId = Blaze.getData(parent)._id newList = oldList = list…
has comment: http://stackoverflow.com/comment/42663759
downvote count: 0
tagged with: meteor
has comment: http://stackoverflow.com/comment/52206461

http://stackoverflow.com/comment/42686984
score: 1
type: Comment
comment on: http://stackoverflow.com/q/27089900
type: QuestionComment
has text: Welcome to SO. This question is pretty unclear. You should include the code of what you've tried so far or deliver a more precice description. At first glance I'd say: Don't rely on html elements for watermarks or other security relevant factors. No matter what you do, the output can and will be manipulated by users. Include the watermarks in the images(?) before you send them to the browser.

http://stackoverflow.com/a/27015581
has body: window.load is one option or you can even call a function from body tag as shown below test
type: Answer
answers question: http://stackoverflow.com/q/27015231
score: 0

http://stackoverflow.com/comment/42769099
has text: @hunch_hunch, yeah, that's probably not the most effective solution since the number of rows is dynamic and could number into the hundreds.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27135396

http://stackoverflow.com/q/27023280
type: Question
tagged with: jquery-mobile
has title: Changing the AddThis shared URL in a jQuery mobile application
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27037040
answer count: 1
has comment: http://stackoverflow.com/comment/42593676
tagged with: facebook
has comment: http://stackoverflow.com/comment/42578499
tagged with: addthis
accepted answer: http://stackoverflow.com/a/27037040
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42592939
has comment: http://stackoverflow.com/comment/42592328
has body: I am experiencing an issue when attempting to dynamically change the URL to be shared with AddThis in my jQuery Mobile application. The response.url in the code snippet below is a Bitly-provided URL such as "http://shorturl.com/hu7Hnm" however I am unable to change the URL with this code. I do the same thing on our Desktop site and this works fine, however it does not work on our Mobile site (which is jQuery Mobile powered). The Twitter/Facebook/Email pop-ups still appear, however they show the URL before it has been changed by the update code below. So it does not appear to have any affect. // update the AddThis share url to the shortened URL addthis.update('share', 'url', response.url); addthis.url = response.url; addthis.toolbox('.social_icons'); The social_icons selector targets this below which holds the AddThis icons. &lt;ul class="social_icons inline_list"&gt; This is an example of my sharing setup on page load: var addthis_share = { url: "http://www.wrestlemaniamainevent.com/shared/huih897897jkhjkh98907908nn", title: "Check out the Main Events at www.wrestlemaniamainevent.com" }

http://stackoverflow.com/comment/51310077
comment on: http://stackoverflow.com/a/27120638
type: Comment
has text: I think this is a valid question but maybe it's not been asked quite right. I believe the OP is asking how to support mouse events on devices that are touch-enabled. There are many laptops out there with touch screens yet the user still has a mouse.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27055985
has title: changing view's model in backbone.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42628284
type: Question
possible better answer: http://stackoverflow.com/a/27056804
has answer: http://stackoverflow.com/a/27056221
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27056221
has answer: http://stackoverflow.com/a/27056804
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42629219
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/42628942
has body: I am trying to change the model of a modal dialog view in backbone.js and well... no luck so far. Here's my code: var modal, myCollection; var MyModal = Backbone.View.extend({ template: _.template($('#modalTemplate').html()), initialiaze: function (options) { this.$el = options.el; this.model.on('change', this.render, this); }, render: function () { this.$el.html(this.template(this.model.toJSON())); return this; }, events: { 'click .close-modal': 'closeModal' }, openModal: function (model) { this.model.set(model); $('.modals').removeClass('hidden').fadeIn(); }, closeModal: function (e) { e.preventDefault(); this.$el.addClass('hidden'); } }); var GridView = Backbone.View.extend({ el: $('#grid'), template: _.template($('#template1').html()), initialize: function (options) { this.options = options; this.render(); }, events: { 'click div.grid': 'openGridGallery' }, openGridGallery: function (e) { e.preventDefault(); modal.openModal(myCollection.at(0)); }, render: function () { myCollection = new Backbone.Collection(this.model.get([0])); // ...... modal = new MyModal({ model: new Backbone.Model(), el: $('.modals') }); $('.modals').append(modal.render()); } }); This works as far as creating a modal dialog and displaying it. However, this.model.set(model); inside the openModal method doesn't seem to do anything. What am I doing wrong? Thank you

http://stackoverflow.com/q/27107868
type: UnansweredQuestion
has body: My application has a left nav with symbols showing next to each link to indicate whether that page's form is valid. As the user clicks from page to page, Angular validates the form and the correct symbol displays. I now have a requirement to show the validation symbols immediately when the user enters the application, rather than requiring the user to visit each page to see whether it is valid or not. Is there any way to manually trigger each form to validate, while still utilizing Angular's built-in form validation? One idea I had was to programmatically navigate to each page to initialize and validate each form. So far that hasn't worked for me using AngularUI Router's $state.go, but I will play around with it some more. Any other ideas? Thanks!
type: Question
has comment: http://stackoverflow.com/comment/45105278
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/44844077
tagged with: angularjs-validation
tagged with: angularjs
has title: AngularJS Validate all forms on application load
has answer: http://stackoverflow.com/a/28383635

http://stackoverflow.com/comment/42702605
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27063721
has text: thanks for your answer WitYoBadSelf, but `<p:ajax event="cellEdit" oncomplete="console.debug('update')" />` is not called when I update a row/cell. Maybe I should mention that I update it via Omifaces's Ajax.update.
type: AnswerComment

http://stackoverflow.com/comment/42515723
type: Comment
type: QuestionComment
has text: The background color **IS** filling the full height of that `DIV`, the problem you have is related to the `height` of that `DIV` that's not actually the one you expected. As you have some `float` in your `CSS`, you will probably need to add an empty `DIV` with `clear:both` at the end, before the closing tag of the container. If you give us the `HTML` code or an `jsfiddle` example, will be more easy to help you better.
comment on: http://stackoverflow.com/q/26992090
score: 0

http://stackoverflow.com/comment/42787450
has text: @Twix, bind this value to hidden input in javascript , LIKE `" "`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27145710

http://stackoverflow.com/a/27088042
upvote count: 2
has body: I fiddled around with your plunker, but also changed var vm = this; to $scope, so I'm failing at extra points :-) I would strongly advise against the usage of $scope.$parent exactly for the reason you show. Various directives such as ng-include, ng-show etc, generate their own scopes. You have no control if someone in the future changes your html and adds scopes, intentionally or otherwise. I recommend using functions that reside on your MainCtrl and accessing them via inheriting scopes. Plunker $scope.getShouldShow = function() { return $scope.shouldDisplaySomthingInFooter; }; $scope.setShouldShow = function(val) { $scope.shouldDisplaySomthingInFooter = val; }; $scope.getMainMessage = function () { return $scope.mainMessage; } And calling them: Conditional footer Content And: window.console.log('Footer grandparent scope name: ' + $scope.getMainMessage()); window.console.log('Footer grandparent scope condition: ' + $scope.getShouldShow());
type: Answer
answers question: http://stackoverflow.com/q/27087730
downvote count: 0
score: 2

http://stackoverflow.com/a/27172740
answers question: http://stackoverflow.com/q/27147334
downvote count: 0
score: 1
has body: take a look at https://github.com/swluken/TouchTreeGrid it might be helpful, I used in my project. as above said Sencha Touch Grid is only available in the Sencha Touch Complete (paid) product so it is not available in your 'toch' directory,therefore when you try load 'Ext.grid.Grid' it throws error any doubt.. feel free to ask.
upvote count: 1
type: Answer

http://stackoverflow.com/comment/42590933
has text: Loading the JS files at runtime dynamically just will not work well without something like require.us and will cause the page to load very slowly. The best thing to do would be to use so ething like grunt-concant. For any project of decent size concant should just be one of the many things you would do.
comment on: http://stackoverflow.com/q/27034853
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27151806
has answer: http://stackoverflow.com/a/35303990
tagged with: javascript
favorite count: 0
has body: I have a webpage, lets call it entry.html. When a user enters this page, a javascript code (see below) is attempting to deep-link the user to the native iOS / Android app. If the deep-link fails (probably if the app isn't installed on device), user should "fall back" to another page- lets call it fallback.html. here is the javascript code that is running on entry.html: $(function(){ window.location = 'myapp://'; setTimeout(function(){ window.location = 'fallback.html'; }, 500); }); this is a standard deep-linking method that is recommended all over the network; try to deep-link, and if the timeout fires it means that deep-link didn't occur- so fallback. this works fine, as long app is installed on device. but if the app isn't installed, this is the behaviour when trying to deep-link: Mobile Safari: I see an alert message saying "Safari cannot open this page..." for a moment, and then it falls-back properly to fallback.html- which is the expected behaviour. Mobile Chrome is my problem. when the app isn't installed, browser is actually redirected to the myapp:// url, which is of course, invalid- so i get a "not found" page, and fall-back doesn't occur. Finally- my question is: How can I fix my code so FALL-BACK WILL OCCUR on mobile Chrome as well? just like mobile Safari? note: i see that LinkedIn mobile website does this properly, with Safari &amp; Chrome, with or without the app installed, but i couldn't trace the code responsible for it :( note2: i tried appending an iframe instead of window.location = url, this works only on Safari, mobile Chrome doesn't deep-link when appending an iFrame even if app is installed. Thanks all! UPDATE: i found a decent solution, and answered my own question. see accepted answer for my solution.
tagged with: mobile-chrome
has answer: http://stackoverflow.com/a/29060700
accepted answer: http://stackoverflow.com/a/29060700
has answer: http://stackoverflow.com/a/27748416
linked to: http://stackoverflow.com/q/5679918
linked to: http://stackoverflow.com/q/20572734
type: AnsweredQuestion
upvote count: 31
has answer: http://stackoverflow.com/a/32377559
has answer: http://stackoverflow.com/a/58973784
type: Question
tagged with: deep-linking
score: 31
has comment: http://stackoverflow.com/comment/42931084
has title: Deeplinking mobile browsers to native app - Issues with Chrome when app isn't installed
has comment: http://stackoverflow.com/comment/55227361
has answer: http://stackoverflow.com/a/58748481
possible better answer: http://stackoverflow.com/a/27748416
tagged with: mobile-website
has answer: http://stackoverflow.com/a/59894989
has comment: http://stackoverflow.com/comment/42927230
has comment: http://stackoverflow.com/comment/42857304
downvote count: 0
answer count: 7

mouseevent
tags question: http://stackoverflow.com/q/27020237
tags question: http://stackoverflow.com/q/27117649
tags question: http://stackoverflow.com/q/27068839
tags question: http://stackoverflow.com/q/27070943
tags question: http://stackoverflow.com/q/27137194
tags question: http://stackoverflow.com/q/27108094
type: Tag
tag name: mouseevent

http://stackoverflow.com/comment/42661195
has text: Whew. The negative z-index was the last piece of the puzzle, and I was shocked that it actually works cross-browser. At first glance, I thought it might be impossible to do without JavaScript.
type: Comment
comment on: http://stackoverflow.com/a/27072545
score: 0
type: AnswerComment

http://stackoverflow.com/q/27074523
type: UnansweredQuestion
upvote count: 1
has title: How to make iron-router's waitOn to show an animation instead of a whole template while waiting?
has comment: http://stackoverflow.com/comment/42686516
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/42662565
type: Question
tagged with: javascript
has body: I'm using the waitOn method in my router: Router.configure({ layoutTemplate: "layout", loadingTemplate: 'loading' }); this.route("bookPage", { path: "/books/:_id", waitOn: function() { return [Meteor.subscribe("singleBook", this.params._id), Meteor.subscribe("chapters", this.params._id)]; }, data: function() { return Books.findOne(this.params._id); } }); Right now, a new template is loaded each time I click on a link. Is there a way to just show an animation before the next page loads?
downvote count: 0
tagged with: meteor
favorite count: 0

http://stackoverflow.com/comment/42684719
type: QuestionComment
comment on: http://stackoverflow.com/q/27088418
has text: Instead of onclick="save()" is should be onsubmit="save()". The element doesn't need a closing element. You can use .
score: 0
type: Comment

http://stackoverflow.com/q/27018555
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27018749
tagged with: angularjs
type: UnansweredQuestion
has title: transmit data to an angularjs controller
has body: In my view in want include a java script file witch contains an angular module and angular controller angular.module("Company", []).filter('newlines', function(text){ return text.replace(/&amp;/g, '&lt;br /&gt;&amp;');}) .controller("DemoController", function ($scope, $http) { $scope.Company.Title = title // this title comme from the view } ); The data source for the controller comes from the view, how can i transmit data from my view to the controller. Thanks in advance
tagged with: asp.net-mvc
type: Question

http://stackoverflow.com/q/27116361
has body: I am trying to query my mongodb but I don't know which row my data is under so i am trying to querying both rows with parameters, is this syntax correct? db.table.find({groupA: data} || {groupB: data}, function(err, records)
type: Question
tagged with: mongodb
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27116513
possible better answer: http://stackoverflow.com/a/27128642
score: 9
has answer: http://stackoverflow.com/a/27128642
has title: How to do a OR operation query in nodejs/MongoDB?
tagged with: node.js
tagged with: nosql
type: AnsweredQuestion
upvote count: 9
has answer: http://stackoverflow.com/a/27116513

http://stackoverflow.com/q/27106993
answer count: 1
accepted answer: http://stackoverflow.com/a/27107154
has body: Having a function that looks after window height change and sets a new value for the element(Quite complicated - adds/updates a scroll if too high, and stays of a fixed height if it not high enough). It works well when I resize a window, but not in the start. So, here is the question: how to make it work right after load? angular.module('main') .directive('blablaRightColumnViewPort', ['$window', function($window, $timeout) { var directive = {}; directive.restrict = 'A'; directive.compile = function( element, attributes ) { // DOM references var w = angular.element($window),... maxHeight = 0; function fitScroll() { // count max height available maxHeight = ...; // compare an original size of the content to max available if ( originalElementHeight &gt; maxHeight ) { element.height( maxHeight ); } else { element.height( originalElementHeight ); } } return function( scope, element, attributes ) { // watch it! scope.$watch( function() { return w.height(); }, function(){ ... fitScroll(); } ); // assign the event w.bind('resize', function() { scope.$apply(); }); } } return directive; } ]); I tried to use in compile: $timeout(function(){ w.resize(); }, 0); and in link: $timeout(function(){ scope.$apply(); }, 0); Didn't work at all... puzzled, frustrated.
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27107154
type: Question
tagged with: angularjs-directive
has title: initial window size/resize catching
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42528003
has text: Also a good read about the "dot problem" http://nathanleclaire.com/blog/2014/04/19/5-angularjs-antipatterns-and-pitfalls/ and the linked pages
comment on: http://stackoverflow.com/a/26998256
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42773845
type: Comment
comment on: http://stackoverflow.com/a/27115877
has text: Yes, you will need to exchange the JSAPI token for an oAuth 1.0 token to make the call serverside. We do not have a way to exchange the token so you can make an oAuth 2 call server side.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42774425
type: Comment
has text: @TomášZato ahh, I'll update my answer with the math if I can figure it out correctly.
comment on: http://stackoverflow.com/a/27138161
score: 0
type: AnswerComment

http://stackoverflow.com/q/27041850
has answer: http://stackoverflow.com/a/27232113
has comment: http://stackoverflow.com/comment/42796440
has answer: http://stackoverflow.com/a/27233234
has comment: http://stackoverflow.com/comment/42940430
type: Question
has title: how to use angular module 'ui-route' to find the templateUrl inside a directive and not get an error on MVC .NET
tagged with: angular-ui-router
tagged with: asp.net-mvc
tagged with: javascript
tagged with: angular-ui-bootstrap
has body: how to use angular module 'ui-route' to find the templateUrl inside a directive and not get an error on MVC .NET""NetworkError: 403 Forbidden - http://www.myapp.com/~/App/XV-Directives/form-input-text-template.vbhtml" 1 solution: Here is an answer with out using the angular 'ui-rout' using the webconfig of the MVC project ClickHere ; this solution allows anyone to see your application file var xvFormCreator = function () { //pass the template name and the data source of the template return { restrict: 'EA', scope: { sourceData: '=', }, templateUrl: '~/App/XV-Directives/form-input-text-template.vbhtml' }; }; // html template string form /* ' ' + ' ' + ' {{ sourceData.Qestion }} : ' + ' ' + ' ' + '<textarea' + ' name="{{ sourceData.Qestion }} "' + ' class="form-control"' + ' rows="1"'+ ' placeholder="{{sourceData.TemplateType }}"' + ' value="{{ sourceData.Answer }}"> ' + ' ' + ' ' html template {{ sourceData.Qestion }} : */
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42604213
linked to: http://stackoverflow.com/q/17949460
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42797416

http://stackoverflow.com/q/27131209
has body: I am new to QuickBlox chat.. Trying to use Javascript SDK. But this always throw Uncaught ReferenceError: QB is not defined No idea What I am missing. BTW following is the head section of my webpage.
type: Question
tagged with: chat
tagged with: javascript
score: 0
answer count: 2
tagged with: sdk
has answer: http://stackoverflow.com/a/27226682
tagged with: quickblox
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27154565
has title: Text Chat(IM) using QuickBlox

http://stackoverflow.com/a/27059237
answers question: http://stackoverflow.com/q/27047510
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27047510
type: Answer
upvote count: 4
downvote count: 0
has body: I ended up working around the issue by not including gulp-watch in the streams, and instead creating a separate "watch" task which triggers a build when sources change. I'd still like to know if there's a way to make my original approach work though. var gulp = require('gulp') var inject = require('gulp-inject') var sass = require('gulp-sass') var path = require('path') var bower = require('gulp-bower') var bowerFiles = require('main-bower-files') var react = require('gulp-react') var watch = require('gulp-watch') var plumber = require('gulp-plumber') var bowerDir = './bower_components/' var sassSrcSpec = ['./stylesheets/*.scss'] var jsxSrcSpec = ['./jsx/about.js', './jsx/home.js', './jsx/app.js'] var htmlSrcSpec = ['./views/index.html'] function defaultBuild() { var css = gulp.src(sassSrcSpec) .pipe(plumber()) .pipe(sass({ includePaths: [ bowerDir + 'bootstrap-sass-official/assets/stylesheets', ] })) .pipe(gulp.dest('./public/css')) var jsxFiles = gulp.src(jsxSrcSpec) .pipe(plumber()) .pipe(react()) .pipe(gulp.dest('./public/js')) var bowerJs = gulp.src(bowerFiles(), {read: false}) return gulp.src(htmlSrcSpec) .pipe(plumber()) .pipe(inject(css)) .pipe(inject(bowerJs, {name: 'bower'})) .pipe(inject(jsxFiles, {name: 'jsx'})) .pipe(gulp.dest('./public/html')) } gulp.task('bower', function () { return bower() }) gulp.task('default', defaultBuild) gulp.task('watch', function () { watch(sassSrcSpec.concat(jsxSrcSpec).concat(htmlSrcSpec), function () { return defaultBuild() }) })
score: 4

http://stackoverflow.com/comment/42651757
comment on: http://stackoverflow.com/q/27069325
score: 0
type: Comment
type: QuestionComment
has text: Would be nice if you could create a Fiddle or so. Does this happen after have interacted with the checkbox? Maybe you need to assign the model an initial value.

http://stackoverflow.com/comment/42566297
score: 0
comment on: http://stackoverflow.com/a/27018749
type: AnswerComment
type: Comment
has text: It's present on which page -- your JavaScript page (the one in which you have the angular controller defined)? If you're already dynamically rewriting that file, just set it directly: $scope.Company.Title = @Model.Company.Title. Or, more likely $scope.Company.Title = "@Model.Company.Title" (to let JS know its a string). Of course, any dynamic rewriting of the JS file necessitates making sure it's not cached client side f the value can change on the server. As mentioned above, this is not a standard angular approach.

http://stackoverflow.com/comment/42616966
comment on: http://stackoverflow.com/a/27048145
score: 0
type: AnswerComment
type: Comment
has text: Not if he's using the npm module as it appears.https://www.npmjs.org/package/googleplaces

http://stackoverflow.com/a/27078401
has comment: http://stackoverflow.com/comment/118126831
has comment: http://stackoverflow.com/comment/112616148
accepted answer of: http://stackoverflow.com/q/27078285
has comment: http://stackoverflow.com/comment/94750416
has comment: http://stackoverflow.com/comment/60238418
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/98660042
downvote count: 6
has comment: http://stackoverflow.com/comment/66098361
has comment: http://stackoverflow.com/comment/60251539
has comment: http://stackoverflow.com/comment/86419489
has comment: http://stackoverflow.com/comment/94750398
type: Answer
has comment: http://stackoverflow.com/comment/94755382
has comment: http://stackoverflow.com/comment/122976482
upvote count: 154
has comment: http://stackoverflow.com/comment/42667039
has comment: http://stackoverflow.com/comment/86445525
has comment: http://stackoverflow.com/comment/118092644
has body: I would use the underscore.js or lodash source code to find a well tested version of this function. Here is the slightly modified version of the underscore code to remove all references to underscore.js itself: // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run // as much as it can, without ever going more than once per `wait` duration; // but if you'd like to disable the execution on the leading edge, pass // `{leading: false}`. To disable execution on the trailing edge, ditto. function throttle(func, wait, options) { var context, args, result; var timeout = null; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : Date.now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; return function() { var now = Date.now(); if (!previous &amp;&amp; options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining &lt;= 0 || remaining &gt; wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout &amp;&amp; options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; }; Please note that this code can be simplified if you don't need all the options that underscore support. Please find below a very simple and non-configurable version of this function: function throttle (callback, limit) { var waiting = false; // Initially, we're not waiting return function () { // We return a throttled function if (!waiting) { // If we're not waiting callback.apply(this, arguments); // Execute users function waiting = true; // Prevent future invocations setTimeout(function () { // After a period of time waiting = false; // And allow future invocations }, limit); } } } Edit 1: Remov…
has comment: http://stackoverflow.com/comment/94753476
score: 148
has comment: http://stackoverflow.com/comment/69111887
answers question: http://stackoverflow.com/q/27078285
has comment: http://stackoverflow.com/comment/102389894
has comment: http://stackoverflow.com/comment/112609104
has comment: http://stackoverflow.com/comment/102387658

http://stackoverflow.com/q/27125805
has comment: http://stackoverflow.com/comment/42751419
has answer: http://stackoverflow.com/a/27125933
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/42754059
accepted answer: http://stackoverflow.com/a/27125942
has body: I have a string like this var information = 'name:ozil,age:22,gender:male,location:123 street'; I want to make an array of key value object like this var informationList=[ { 'key':'name', 'value':'ozil' }, { 'key':'gender', 'value':'male' }, { 'key':'location', 'value':'123 street' }, ]
favorite count: 0
has title: JavaScript making an array of key value object from a string
score: -3
has answer: http://stackoverflow.com/a/27125942
downvote count: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9036429
has comment: http://stackoverflow.com/comment/42751525
type: Question
has answer: http://stackoverflow.com/a/27126041
has comment: http://stackoverflow.com/comment/42751441
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27125933

http://stackoverflow.com/comment/42559680
comment on: http://stackoverflow.com/a/27016171
score: 0
type: AnswerComment
has text: It's kind of hard to guess without seeing how or in what context you're calling this.
type: Comment

http://stackoverflow.com/q/26996775
score: 0
has comment: http://stackoverflow.com/comment/42526670
has answer: http://stackoverflow.com/a/26998235
answer count: 1
tagged with: flot
has comment: http://stackoverflow.com/comment/42526832
tagged with: jquery
has body: I am trying to implode my php variable which is an array as one variable into my flot chart. I implode my PHP variable with JS chart and it worked for me as you can see in the image : I am trying to get Flot bar data same output with JS Bar chart. Any idea please ? Thank you var data = [ 0, &lt;?php echo '['.implode(", ", $studentages).']'?&gt;]; var dataset = [ { label: "Exams By Student Age", data: data, color: "#5482FF" } ]; var ticks = [ [0, "0-2"] ]; var options = { series: { bars: { show: true } }, bars: { align: "center", barWidth: 0.6 , vertical: true , show:true }, xaxis: { axisLabel: "Exams By Student Ages", axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial', axisLabelPadding: 10, tickLength:0, ticks: ticks }, yaxis: { axisLabel: "Number of Exams", axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial', axisLabelPadding: 3, max:20, tickSize:1, tickFormatter: function (v, axis) { return v; } }, legend: { noColumns: 0, labelBoxBorderColor: "#000000", position: "nw" }, grid: { clickable: true, borderWidth: 1, backgroundColor: { colors: ["#ffffff", "#EDF5FF"] } } }; $(document).ready(function () { $.plot($("#flot-placeholder"), dataset, options); $("#flot-placeholder").UseTooltip(); }); function gd(year, month, day) { return new Date(year, month, day).getTime(); } var previousPoint = null, previousLabel = null; $.fn.UseTooltip = function () { $(this).bind("plotclick", function (event, pos, item) { var links = [ '../../Chart/StudentTests/result.php']; if (item) { //alert("clicked"); // window.location = (links[item.dataIndex]); window.open(links[item.dataIndex], '_blank'); console.log(item); } else { $("#tooltip").remove(); previousPoint = null; } }); }; function showTooltip(x, y, color, contents) { $('&lt;div id="tooltip"&gt;' + contents + '&lt;/div&gt;').css({ position: 'absolute', display: 'none', top: y - 40, left: x - 120, border: '2px solid ' + color, padding: '3px', 'font-siz…
tagged with: php
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42526631
tagged with: charts
has title: Passing a PHP variable into flot Bar chart
tagged with: javascript
type: Question

http://stackoverflow.com/comment/42622609
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27038688
score: 1
has text: It should be `header("Access-Control-Allow-Origin: *")`

http://stackoverflow.com/q/27143043
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27143089
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27143111
has body: I want to display a message that this app can not be viewed in this small device for eg (min-device-width : 320px) and (max-device-width : 480px)
has title: I want to display a message that this app can not be viewed in this small device
type: Question
score: 0

titanium
type: Tag
tags question: http://stackoverflow.com/q/27127479
tags question: http://stackoverflow.com/q/27073814
tag name: titanium
tags question: http://stackoverflow.com/q/27038544

http://stackoverflow.com/a/27006073
downvote count: 0
answers question: http://stackoverflow.com/q/27006025
has comment: http://stackoverflow.com/comment/42541355
has body: You are missing some quotes. Try this var string = "" + obj[i].Name + "";
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42541314
score: 2

http://stackoverflow.com/a/27117588
type: Answer
score: 5
upvote count: 5
downvote count: 0
has body: You could use Array.reduce(): var A = [[2.2, 3.3, 1.3], [1.2, 5.3, 2.2], [0.3, 2.2, 5.2]]; var max = A.reduce(function(final, current) { for (var i = 0; i &lt; final.length; ++i) { if (current[i] &gt; final[i]) { final[i] = current[i]; } } return final; }); console.log(max); The inner function compares the current maximum with the next array element and so final always holds the maximum value for all elements traversed thus far.
answers question: http://stackoverflow.com/q/27116862

http://stackoverflow.com/comment/42602977
type: QuestionComment
comment on: http://stackoverflow.com/q/27041909
has text: show us your jquery code/
score: 0
type: Comment

http://stackoverflow.com/q/27147122
has body: I have a jquery code. There are a ul and li my code is following var responses = response; for (var i = 0; i &lt; responses.length; i++) { if ($("#" + $("#sp").val()).attr("class") == "more") { // alert("if"); $("#p_li").append("&lt;ul class='fwd'&gt;&lt;li&gt;&lt;a href='#' onclick='cs1(this)'&gt;" + responses[i] + "&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;").before(); } } I want parent li, that's: "$("#p_li")" not to have duplicate elements(thats li with same string text). Keep in mind that p_li contains data before this function runs the responses contains list of cities. I have tried this condition but it's failing if ($('#fwd &gt; li:contains(' + responses[i] + ')').length == 0)
has comment: http://stackoverflow.com/comment/42790391
tagged with: asp.net
has comment: http://stackoverflow.com/comment/42789768
type: UnansweredQuestion
tagged with: css
has title: jquery to prevent duplicate elements
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/27147448
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/42601994
type: Comment
comment on: http://stackoverflow.com/a/27021074
has text: Obviously, skills is already a array. Uncomment the line `$skills = explode(',', $skills);`
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42560482
type: AnswerComment
comment on: http://stackoverflow.com/a/27014717
has text: Yes sure : use `$("#MyBookings_table").find("input:checked")`. But this is a jQuery object with all checked boxes. If you want an array with all DOM elements corresponding to the checked boxes, use instead : `$("#MyBookings_table").find("input:checked").toArray()`
type: Comment
score: 0

http://stackoverflow.com/a/27151099
has comment: http://stackoverflow.com/comment/42798132
score: 0
has comment: http://stackoverflow.com/comment/42796856
has comment: http://stackoverflow.com/comment/42796810
type: Answer
has comment: http://stackoverflow.com/comment/42796955
answers question: http://stackoverflow.com/q/27150903
has body: The csi.js only runs on window.onload. Try Update profile
has comment: http://stackoverflow.com/comment/42796970

http://stackoverflow.com/comment/42791590
type: Comment
has text: not directly but I can imagine since it's produced from GWT it does
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27135673

http://stackoverflow.com/comment/42654234
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27070807
score: 0
has text: I'm not chasing round the Internet looking for your code. Please take a look at [ask]

http://stackoverflow.com/q/27057582
tagged with: javascript
has answer: http://stackoverflow.com/a/27057692
score: 0
has comment: http://stackoverflow.com/comment/42630616
answer count: 1
tagged with: arrays
linked to: http://stackoverflow.com/q/12859942
type: UnansweredQuestion
tagged with: php
has body: I am learning php and doing a small project. I have a city_name table in database with columns id, name, longitude and latitude. It might have 10-15 rows at best. Now when user load index.php I do this query to get all data from the city_name table $city_name = mysql_query('SELECT * FROM city_name'); Values found from the above query, I want to create a javascript variable in following format. I want to do this in the same index.php inside tag. var locations = [ ['IMaxx', 50.780941, 6.079134], ['Aachen-Elisenbrunnen', 50.771680, 6.086472], ['Uni-Cinema', 50.776185, 6.079306], ['Alter-Posthof', 50.771705, 6.086561], ['Cinemaxx', 50.770754, 6.084942] ]; How can I do this?
type: Question
has title: How to convert database table record to javascript array

http://stackoverflow.com/q/27124876
score: 17
upvote count: 18
possible better answer: http://stackoverflow.com/a/27124906
type: Question
has answer: http://stackoverflow.com/a/28595800
has answer: http://stackoverflow.com/a/27124906
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/45152082
answer count: 5
has answer: http://stackoverflow.com/a/27157713
tagged with: animation
has title: AngularJS Material Design does not have Animations support, how to achieve?
has comment: http://stackoverflow.com/comment/44807638
has body: I am making a Hybrid App using AngularJS and want it to be based on the Material Design UI Principles. I have been reading about this on the google website. They have explained a lot about the natural animations that material should undergo. I am loving the demonstrations on this page. http://www.google.com/design/spec/material-design/introduction.html However, the supporting open source project Angular Material Design does not have any directives or provisions for these animations. How can I achieve this animations please guide. I am planning to do it using CSS3 Animations. How should I use them and what should be the architecture, please suggest.
tagged with: css
has answer: http://stackoverflow.com/a/29053938
accepted answer: http://stackoverflow.com/a/27157713
has comment: http://stackoverflow.com/comment/44778547
tagged with: material-design
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/39549687

http://stackoverflow.com/a/27108567
score: 0
answers question: http://stackoverflow.com/q/27073538
has body: First, the template-download add this code &lt;td&gt; {%=file.descripcion%} &lt;/td&gt; And then modifies your custom index.php "set_additional_file_properties ($ file)" function protected function set_additional_file_properties($file) { parent::set_additional_file_properties($file); if ($_SERVER['REQUEST_METHOD'] === 'GET') { $sql = "SELECT Id, Nombre, Descripcion FROM tabla WHERE Nombre='".$file-&gt;name."'"; $query = $this-&gt;db-&gt;prepare($sql); $query-&gt;execute(); $query-&gt;bind_result( $id, $nombre, $descripcion ); while ($query-&gt;fetch()) { $file-&gt;id = $id; $file-&gt;nombre = $nombre; $file-&gt;descripcion = utf8_encode($descripcion); } } }
type: Answer

http://stackoverflow.com/a/27049678
accepted answer of: http://stackoverflow.com/q/27049577
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27049577
has body: you might find it easier to use the submit event of the form to validate function validateForm(event) { var form = this; var p1 = form.elements['param1']; if(p1.value.length === 0) { alert('Plz enter parameters'); p1.focus(); event.preventDefault(); return false; } } document.getElementById('form').addEventListener('submit', validateForm); http://jsfiddle.net/7j0usuam/

http://stackoverflow.com/comment/112008219
has text: Well, the question was not tagged with "React" tag, so i had an assumption that the author wanted simple material "look and feel" and gave the react library as an example of the material ui components. Not sure what would count as a "correct" answer in this case, but seems it has solved authors problem.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/27079292
type: Comment

http://stackoverflow.com/comment/42703914
type: Comment
type: QuestionComment
has text: keyCode with C in caps. See my answer.
comment on: http://stackoverflow.com/q/27099674
score: 0

http://stackoverflow.com/a/37139885
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/27116862
has body: Here's a short and sweet version: var A = [[2.2, 3.3, 1.3], [1.2, 5.3, 2.2], [0.3, 2.2, 5.2]]; var maxA = A.map(a =&gt; Math.max.apply(null, a));
downvote count: 0

http://stackoverflow.com/q/27107915
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has title: Resize iframe to loaded content
linked to: http://stackoverflow.com/q/819416
has body: I want to load content in the iframe and make it resize its height according to the content. All the pages are in the same domain. I tried some scripts I found, but nothing worked. Most of the times, it just opens the loaded content in a new tab. HTML: index Home The Band News Gallery Contact CSS: div#container { height: 100%; width: 100%; } div#header { top: 0px; width: 100%; height: 80px; position: fixed; background-color: transparent; text-align: center; } div#nav { font-family: MgSouvenirLight; font-size: 18pt; color: #FF0; top: 120px; width: 100%; height: 40px; position: fixed; text-decoration: none; font-weight: bolder; font-variant: normal; } div#footer { font-family: Arial, Helvetica, sans-serif; font-size: 9px; bottom: 0px; position: fixed; height: 30px; width: 100%; text-align: center; color: #fff; } #frame { position: absolute; top: 200px; bottom: 40px; width: 800px; border: none; left: 120px; height: auto; } a:link { font-family: MgSouvenirLight; font-size: 18pt; color: #FF0; } a:visited { font-family: MgSouvenirLight; font-size: 18pt; color: #FF0; } a:hover { font-family: MgSouvenirLight; font-size: 18pt; font-style: italic; color: #FC0; }
type: UnansweredQuestion
tagged with: iframe
has answer: http://stackoverflow.com/a/27108092
has comment: http://stackoverflow.com/comment/42722124
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42718928

http://stackoverflow.com/comment/42685985
type: Comment
comment on: http://stackoverflow.com/a/27077511
has text: In essence you are using php to generate the text as if you were writing the function direct. Try writing out the function in it's final form, and then work backwards to work out what php is required to create that text. Re multiple variables, I expect it would be something like: ...('.$date.','.$name.','.$task')... Note the commas inside quotes - you separate function parameters with quotes so you need to also create them with php.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/52725560
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27105664
has text: One <asp:ListBox runat="server" ID="lb1" Width="150" Height="250"></asp:ListBox> Two <asp:ListBox runat="server" ID="ListBox1" Width="150" Height="250"></asp:ListBox> Three <asp:Button ID="Button1" runat="server" Text=">" /> <asp:Button ID="Button2" runat="server" Text=">>" /> <asp:Button ID="Button3" runat="server" Text="<" />

http://stackoverflow.com/comment/42518785
has text: And where do you use the `one.php`? I see `change-text-mouseover.php`
score: 1
comment on: http://stackoverflow.com/q/26994112
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27044087
answers question: http://stackoverflow.com/q/27043988
has body: You can use regex for that like: "Bloomfield College (1662) (COL)".match(/(\d+)/)[0] //1662
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4
accepted answer of: http://stackoverflow.com/q/27043988

http://stackoverflow.com/comment/42656798
type: Comment
type: QuestionComment
has text: Object.create doesn't deep clone, how prototype and constructor functions work is explained here: http://stackoverflow.com/questions/16063394/prototypical-inheritance-writing-up/16063711#16063711 as for cloning objects; that is a complicated issue. Sometimes you want to deep clone members and sometimes you want to leave them as references to other objects.
score: 0
comment on: http://stackoverflow.com/q/27070922

http://stackoverflow.com/comment/42679200
score: 0
comment on: http://stackoverflow.com/q/27085054
type: QuestionComment
has text: @Sukima Well I still dont know the answer to the question because although in the long run the JS engine will figure it out I still dont know how the cost of filling the array compares with the JS engine figuring it out. Both costs are not really measurable in the program as I just filled the array. It is a question of interest more on the theoretical side.
type: Comment

http://stackoverflow.com/q/27092902
has answer: http://stackoverflow.com/a/27093025
tagged with: javascript
score: -1
type: Question
answer count: 2
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42691793
has title: javascript - find the div with the longest width in the webpage
has body: How can I find the longest div in a webpage? I mean the div that has the longest width. I would use pure javascript, is there some way to do it?
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27093016

http://stackoverflow.com/comment/42799806
comment on: http://stackoverflow.com/a/27152180
has text: Getting null in response
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42595881
has text: @suchit I tried but only works if the data is different. I my case I would like to add at the end of array like adding data.
type: Comment
comment on: http://stackoverflow.com/q/27037378
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42682670
comment on: http://stackoverflow.com/a/27083076
type: AnswerComment
score: 0
type: Comment
has text: I really appreciate for your help.

http://stackoverflow.com/a/27037711
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27022538
downvote count: 0
score: 1
has body: IBM Content Template Catalog was causing conflicts. When CTC was disabled, the slick function was available. In the end, I imported slick.js at the Portal theme level before CTC is initialized i.e in theme_en.html
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27022538

http://stackoverflow.com/a/27029209
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27029157
has body: centering elements is fairly easy to do with CSS. Enclose the elements in a div and apply the following html rules: margin: 0 auto; width: *some-percent-here*%; Hope this helps! Cheers. Edit: for example, if you wanted to center the about section with a width of 50%, you would use: (background color for visualization purposes...) .about { margin: 0 auto; width: 50%; background-color: blue; } Note: This will center the div - not the content inside the div. For text centering use: text-align: center; For completeness, it should be noted that it is possible to center the div using styles applied by javascript. However, it seems to me that your solution wants static placement of the canvas - making html the better choice...
type: Answer
accepted answer of: http://stackoverflow.com/q/27029157
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/42581193
has comment: http://stackoverflow.com/comment/42581251
has comment: http://stackoverflow.com/comment/42581311

http://stackoverflow.com/comment/43404435
has text: you have function hide1 and hide2 that do the same thing. you need an onchange function for the subregion. I will create a new fiddle link and send it to you
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27019185

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/27148601
type: Tag
tags question: http://stackoverflow.com/q/27040639
tags question: http://stackoverflow.com/q/27098962

http://stackoverflow.com/comment/42686713
comment on: http://stackoverflow.com/q/27089786
type: QuestionComment
type: Comment
has text: This might be helpful: http://stackoverflow.com/questions/8983714/video-and-onloadedmetadata-event
score: 0

http://stackoverflow.com/comment/127276821
type: AnswerComment
has text: I think this could be improved by using the map function (second argument) correctly. To expand, using `i` there implies the first argument is the index, when it's in fact the element at that index (see docs you linked). Also, assigning to `i` isn't what's making this work; it's the fact that `i = rvalue` returns `rvalue`, which is all you have to do for this to work. Hence, `Array.from({length: 5}, _ => false);` IMO would be a better answer.
type: Comment
comment on: http://stackoverflow.com/a/64063221
score: 0

http://stackoverflow.com/q/27010347
has comment: http://stackoverflow.com/comment/42548487
score: 0
answer count: 1
has title: Stop original Object reference from updating in javascript
favorite count: 0
has body: I have a object contains some companies name. when I am doing changes in var m which is copy of var j then var j is also updating. How can we prevent that var j= {'a':'tata','b':'suzuki'} var m= j m.a='bmw' console.log(m) console.log(j)
upvote count: 2
downvote count: 2
duplicate of: http://stackoverflow.com/q/122102
has answer: http://stackoverflow.com/a/27010471
tagged with: object
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/742623
has comment: http://stackoverflow.com/comment/42547985
type: Question
accepted answer: http://stackoverflow.com/a/27010471
tagged with: javascript

http://stackoverflow.com/q/27005937
downvote count: 0
has answer: http://stackoverflow.com/a/27005982
score: 1
has body: Sorry I am bit lost in jquery after awhile not using. Just wondering why when I use e.target.off it throw error, how do I implement with e.target to remove event listener. $('#ownerdobday, #ownerdobmonth, #ownerdobyear').on('blur', function(e){ //Works $(this).off('blur'); //Not work e.target.off('blur'); }); Any help or suggestion is much appreicated.
type: Question
has title: jquery remove event listener from the e.target
tagged with: javascript
tagged with: jquery
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/27005964
accepted answer: http://stackoverflow.com/a/27005964
has answer: http://stackoverflow.com/a/27005961
favorite count: 0
possible better answer: http://stackoverflow.com/a/27005961
type: AnsweredQuestion

http://stackoverflow.com/comment/57095048
has text: You can user 'express-unless' npm for this purpose.
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/27117337

http://stackoverflow.com/q/27107691
has answer: http://stackoverflow.com/a/37663035
tagged with: node.js
upvote count: 2
answer count: 2
accepted answer: http://stackoverflow.com/a/27108836
tagged with: angular-ui-router
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/27108836
type: Question
possible better answer: http://stackoverflow.com/a/37663035
has title: how should I create the path of templateUrl property in Angular ui-router?
has body: Please, help! I'm trying to figure out why the chrome console returns me that it can't find my "home.html" template GET http://localhost:3000/home.html 404 (Not Found). I'm afraid that I'm not setting correct the path of "templateUrl" property. Here is my folder structure: app.js bin/ node_modules/ package.json public/ ---------javascript/ -------------------angularApp.js routes/ views/ ----------index.ejs ----------home.html and this is my config code(located in angularApp.js) angular.module('supervisor', ['ui.router']) .config([ '$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url: '/home', templateUrl: '/home".html', controller: 'MainCtrl' }); $urlRouterProvider.otherwise('/home'); } ]) I also tried different paths like "../../home.html" but with no success. If I use inline template it's working( ). Thank you!

http://stackoverflow.com/q/27018689
tagged with: css
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27018832
type: Question
downvote count: 0
has title: show fade in and fade out of an array of images simultaneously
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27018832
favorite count: 0
has body: JQUERY var images=new Array('images/pipe.png','images/pipe1.png','images/pipe2.png'); var nextimage=0; doSlideshow(); function doSlideshow() { if($('.slideshowimage').length!=0) { $('.slideshowimage').fadeOut(500,function(){slideshowFadeIn();$(this).remove()}); } else { //alert("slide"); slideshowFadeIn(); } } function slideshowFadeIn() { $('.leftImage').prepend($('&lt;img class="slideshowimage" src="'+images[nextimage++]+'" style="display:none"&gt;').fadeIn(500,function(){setTimeout(doSlideshow,1300);})); if(nextimage&gt;=images.length) nextimage=0; } HTML &lt;div class="leftImage"&gt; &lt;span class="imageTxt"&gt;WISHING ALL EMPLOYEES&lt;br&gt;A HAPPY &amp;AMP; PROSPEROUS &lt;br&gt; NEW YEAR!&lt;/span&gt; &lt;/div&gt; How to show the fade in and fade out slideshow effect simulataneously, similar to the one in http://www.hdfcbank.com/ Please help
upvote count: 1

http://stackoverflow.com/q/27041811
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
score: 1
has title: How can I set a min/max width to highchart's columns?
has comment: http://stackoverflow.com/comment/42607802
has body: I'm using 'Highcharts' column chart (not stacked). My graph presents a dynamic data, so I don't know how many columns I'm expecting. That's why I would like to set a minimum and maximum width to the columns - when there are a lot of columns, I want as many columns as possible to be shown on my chart without needing a scroll (so the column's width is equal the min width); when there are only a few columns, I would like the columns to be in a reasonable width and not to spread all over the chart (the max width). I know I can set the 'pointWidth' property, but it's not quite what I'm looking for. If you have any idea, I will be more than thankful. TIA, adi
type: Question
tagged with: highcharts
downvote count: 0
linked to: http://stackoverflow.com/q/5968595
tagged with: javascript
has answer: http://stackoverflow.com/a/27042197

http://stackoverflow.com/q/26994898
answer count: 2
has comment: http://stackoverflow.com/comment/42520371
has title: Add class to selected li through Jquery
has body: I have written a Jquery for Dropdown menu. It's working fine, but when I click on "li" it's opening fine but css is not being added on select li class.. Jquery: $(".leftnav ul li").click(function () { $(this).siblings().find('ul').slideUp(400); $(this).find('ul').slideDown(400); $(this).find('ul').addClass('activeclass'); $(this).find('.leftnav ul li').addClass('activeclass1'); }); HTML: Dashboard Catagories Add Category Manage Catagories Portfolio Add Portfolio Manage Portfolio Can anyone let me know how can I do it? Thanks in advance.
has comment: http://stackoverflow.com/comment/42520384
has comment: http://stackoverflow.com/comment/42520538
has comment: http://stackoverflow.com/comment/42520541
has comment: http://stackoverflow.com/comment/42520341
has comment: http://stackoverflow.com/comment/42520475
has comment: http://stackoverflow.com/comment/42520461
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26994968
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26994998
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26994998
tagged with: css
accepted answer: http://stackoverflow.com/a/26994968
score: 0

http://stackoverflow.com/q/27086812
type: UnansweredQuestion
has title: Remove transition from child CSS class using JQuery
tagged with: css
score: 0
type: Question
has answer: http://stackoverflow.com/a/27087015
tagged with: javascript
has body: I have a an ID which has a child class. I want the ID to transition but the class not to transition. Because the class is within the id it is transitioning. I have looked through the CSS jquery documentation and from that I have figured out how to transition both elements, but cannot transition the parent alone. This is the CSS #outside { background-size: 25em, 25em, auto, cover; color: white; cursor: default; padding: 6em 0; text-align: center; } #outside .inside { background: rgba(52, 27, 43, 0.5); color: white; display: inline-block; opacity: 0; padding: 3em; text-align: center; } Here is my attempt at getting the jquery to work &lt;script&gt; $(document).ready(function() { var timeToDisplay = 4000; var outside = $('#outside'); var urls = [ 'images/image1.jpg', 'images/image2.jpg', 'images/image3.jpg' ]; var index = 0; var transition = function() { var url = urls[index]; outside.css('background-image', 'url("images/light-bl.svg"), url("images/light-br.svg"), url(' + url + ')'); index = index + 1; if (index &gt; urls.length - 1) { index = 0; } }; var run = function() { transition(); outside.fadeIn('slow', function() { setTimeout(function() { outside.fadeOut('slow', run); }, timeToDisplay); }); } $("div.inside").css("-webkit-transition","none !important;"); $("div.inside").css("-moz-transition","none !important;"); $("div.inside").css("-ms-transition","none !important;"); $("div.inside").css("transition","none !important;"); run(); }); &lt;/script&gt;
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/42538644
comment on: http://stackoverflow.com/a/27004425
type: Comment
has text: @ChrisTauer, have you tried to restart it or use `rails s`? It seems that it didn't reflect on changes you made in application.js
score: 1
type: AnswerComment

cordova-plugins
tags question: http://stackoverflow.com/q/27147073
tags question: http://stackoverflow.com/q/27031395
type: Tag
tag name: cordova-plugins

http://stackoverflow.com/comment/42778835
comment on: http://stackoverflow.com/a/27129821
score: 0
type: AnswerComment
has text: I get the error `Possibly unhandled TypeError: expecting an array, a promise or a thenable`, but I'm not sure how this is supposed to work anyway. Is the .map() from bluebird? But doesn't that need an array of promises? And you're not returning anything from the first `.then()` anyway, so how would this work?
type: Comment

http://stackoverflow.com/q/27006956
score: 1
has title: form input element arrays with mootools
has answer: http://stackoverflow.com/a/27008061
tagged with: forms
upvote count: 1
tagged with: mootools
type: Question
has body: I tried searching for the answer to this, but did not find the specific answer I was looking for. In mootools, how do I access a form input element like below that has an array name using the "double dollar" ($$) function to be able to iterate through for form validation. &lt;input name="field[inventory_id]" type="text" /&gt; &lt;input name="field[asset_tag]" type="text" /&gt; &lt;input name="field[idea_tag] type="text" /&gt; &lt;input name="field[equip_make]" type="text" /&gt; &lt;input name="field[equip_model]" type="text" /&gt; etc... Thanks Dan B
tagged with: arrays
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27011737
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27011737
possible better answer: http://stackoverflow.com/a/27008061

http://stackoverflow.com/a/27107955
score: 1
has body: James' comment may provide the answer you're looking for, but I'd like to offer a simple alternative that you may also like. I read your question as this: "how do I pass a value of type A or type B"? Answer: Define a type with "either" semantics, which contains data of either type A or type B. var valueOrBuffer = function(value, buffer) { this.Value = value; this.Buffer = buffer; }; var createValue = function(value) { return new valueOrBuffer(value); } var createBuffer = function(buffer) { return new valueOrBuffer(undefined, buffer); } stream.OnNext(createValue(1)); stream.OnNext(createValue(2)); stream.OnNext(createValue(3)); stream.OnNext(createBuffer([4, 5, 6])); No switching necessary. Your observer may have to change a bit though: stream.Subscribe(function(v) { if (v.Value) onNextValue(v.Value); else onNextBuffer(v.Buffer); });
upvote count: 1
has comment: http://stackoverflow.com/comment/42719638
answers question: http://stackoverflow.com/q/27102931
has comment: http://stackoverflow.com/comment/42734291
type: Answer
has comment: http://stackoverflow.com/comment/42736956
has comment: http://stackoverflow.com/comment/42735943
downvote count: 0

http://stackoverflow.com/q/27048498
answer count: 3
has answer: http://stackoverflow.com/a/27048646
has comment: http://stackoverflow.com/comment/42614868
has comment: http://stackoverflow.com/comment/42614768
has title: Cannot add click to only one table row
type: UnansweredQuestion
tagged with: addition
has answer: http://stackoverflow.com/a/27049206
has answer: http://stackoverflow.com/a/27048915
type: Question
has comment: http://stackoverflow.com/comment/42615650
tagged with: javascript
tagged with: jquery
tagged with: click
has body: When I execute the following to add a click function to the cell at the end of A particular row, jQuery adds the click function to all of the rows. What am I missing here please? og_rownum happens to equal a number 3, not a string, and the nth-child(8) column does exist in the table. $("#game_lister_table tr:eq("+og_rownum+"), :nth-child(8)").click(function(e){ alert('here'); e.stopPropagation(); }); Thanks in advance....
score: 0

wifi
tag name: wifi
type: Tag
tags question: http://stackoverflow.com/q/27059555

http://stackoverflow.com/q/27110851
has body: var url = require('url'); var http = require('http'); var downloader = require("./downloader"); http.createServer(onRequest).listen(8080); function onRequest(request,response) { if(request.method=='POST') handlePost(request,response); else handleGet(request,response); } function handlePost(request,response) { var data = ''; request.on('data',function(chunk){ data+=chunk.toString(); }); request.on('end',downloadTrainStatus); function downloadTrainStatus() { var downloadPromise = downloader.download(data); downloadPromise.then(function (responses) { var total = responses.length; var result = []; for( var i = 0 ; i &lt; total ; i++) result.push(JSON.parse(responses[i][1])); response.writeHead(200); response.write(JSON.stringify(result)); response.end(); }, function (err) { console.log(err); var result = { status : "error" }; response.writeHead(200); response.write(JSON.stringify(result)); response.end(); }) } } function handleGet(request,response) { console.log("GET request"); response.writeHead(200); response.write("Get request works !!"); response.end(); } The above file server.js simply starts the web server. It uses a file downloader.js included below. The downloader.js just parallely makes 10 or 20 parallel web requests to a url which returns a JSON response. On running this process for half a day, the memory usage of the process shoots to 1.5GB. Is there any memory leak in this code ? var Promise = require('bluebird') var request = Promise.promisify(require('request')) function download(json) { var requests = [] var data = JSON.parse(json); for(var i = 0; i&lt; data.total ; i++) { var stationCode = stations[i].StationCode; var journeyDay = stations[i].JourneyDayCode; requests.push(downloadStatus()); } return Promise.all(requests); } function downloadStatus() { var url = "http://google.com"; var headers = {'User-Agent' : 'Apache-HttpClient/UNAVAILABLE (java 1.4)'}; var options = { url: url , headers: headers, timeout: 15 * 1000 } return request(options); } module.…
downvote count: 0
tagged with: javascript
tagged with: memory-leaks
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/42726081
type: UnansweredQuestion
upvote count: 1
has title: Memory leak in a simple api web service in nodeJS
has comment: http://stackoverflow.com/comment/42741854
tagged with: node.js
score: 1
has comment: http://stackoverflow.com/comment/42740906
type: Question

http://stackoverflow.com/q/27149147
type: AnsweredQuestion
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27149688
score: 0
tagged with: markerclusterer
upvote count: 1
answer count: 1
downvote count: 1
tagged with: markerspiderfier
tagged with: javascript
has title: Marker Clusterer Plus remove cluster on click
has body: i'm using this tool http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/ for clustering markers that are in the exact spot or very close (gridSize: 5) What I want to do is to remove a cluster (not all, just one) on click and spiderfy markers with https://github.com/jawj/OverlappingMarkerSpiderfier Can this be done? In reference of Marker clusterer I didn't find any function/method that removes a particular cluster. Thx in advance.
tagged with: google-maps-api-3
accepted answer: http://stackoverflow.com/a/27149688

http://stackoverflow.com/q/27040149
has title: Google Earth API doesn't create place mark I want
has answer: http://stackoverflow.com/a/29254739
tagged with: google-earth-plugin
type: UnansweredQuestion
tagged with: google-earth
type: Question
score: 0
has body: I'm making an ASP.net app to show some features on Google Earth. After reading "Google's Developer Guide" now i'm using this javascript code: &lt;script type="text/javascript" src="http://www.google.com/jsapi?hl=en&amp;amp;key=MyAPIKey"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var ge; google.load("earth", "1", {"other_params": "sensor=true_or_false"}); function init() { google.earth.createInstance('map3d', initCB, failureCB); } function initCB(instance) { ge = instance; ge.getWindow().setVisibility(true); } function failureCB(errorCode) { } function generator() { // Create the placemark. var placemark = ge.createPlacemark(''); placemark.setName("placemark"); // Set the placemark's location. var point = ge.createPoint(''); point.setLatitude(12.345); point.setLongitude(54.321); placemark.setGeometry(point); // Add the placemark to Earth. ge.getFeatures().appendChild(placemark); alert('OK!'); } google.setOnLoadCallback(init); &lt;/script&gt; Then have a code like this in c# to run javascript: b.ID = "btnSomeButton"; b.Text = "Click to generate PlaceMark!"; b.Attributes.Add("onclick", "return generator();"); My page displays the Google Earth but when I click on the button it doesn't create place mark.Where I am wrong?
answer count: 1
tagged with: javascript
tagged with: asp.net

http://stackoverflow.com/comment/42694616
type: Comment
score: 0
has text: There's no reason to have both handlers; one is enough. If you put the delegated handler on `$(document)` instead of the ` ` or its container, you won't need to do the work in a "ready" handler.
comment on: http://stackoverflow.com/q/27094345
type: QuestionComment

http://stackoverflow.com/comment/42784212
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27143035
has text: Calc is good too, but browser support may be an issue for your users? Click the "Show All" button to see the calc browser support http://caniuse.com/#search=calc. In the 2nd JSFiddle example above browser support is very good. Instead of "calc(100% - 40px)", it says make the table 100% high, set the 1st row at 40px and let the 2nd row automatically fill the remaining space.

http://stackoverflow.com/comment/42788639
comment on: http://stackoverflow.com/q/27146403
has text: If you want to know the visible height of an element in the viewport, check may answer to [this question](http://stackoverflow.com/questions/24768795/get-the-visible-height-of-a-div-with-jquery/24768959#24768959). I won't mark this as a duplicate as your requirements may be different.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42563168
type: Comment
comment on: http://stackoverflow.com/a/27019073
score: 0
has text: If it works, just mark it as accepted. Please note that both teams are limited to 6 players, so there are a few from Tier3 that won't be assigned
type: AnswerComment

http://stackoverflow.com/q/27068334
type: Question
type: AnsweredQuestion
has body: I'm making a WebGL graphics library and am having trouble creating the correct Array from an OBJ Wavefront (that is definitely correct). Looks like quite a simple bug to fix but can't find it. Wondering if someone might recongnize this type of bug. You can have a look at the live sample here: http://robjte.de/webgl/8-3d.html Here are the functions that I suspect are causing the issue. function objectify (str) { var vertexRegex = /^v(?:\s(-?\d+.?(?:\d+)?))\s(-?\d+.?(?:\d+)?)\s(-?\d+.?(?:\d+)?)$/gim; var faceRegex = /^f\s(\d+)\s(\d+)\s(\d+)$/gim; var commentRegex = /^\s*\#.*$/gim; var emptyLineRegex = /^$/gim; var vertices = []; var faces = []; var m, i = 0; while (m = faceRegex.exec(str)) { faces.push([m[1], m[2], m[3]]); i++; } var m, i = 0; while (m = vertexRegex.exec(str)) { vertices.push([m[1], m[2], m[3]]); i++; } return {vertices: vertices, faces: faces}; } function facesVerticesToWebGL (obj) { var f = obj.faces; var v = obj.vertices; var arr = []; f.forEach(function (val) { var vArr = v[parseInt(val) - 1]; vArr.forEach(function (val2) { arr.push(parseFloat(val2)); }); }); return arr; }
tagged with: webgl
answer count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/27069086
tagged with: javascript
has answer: http://stackoverflow.com/a/27071161
possible better answer: http://stackoverflow.com/a/27069086
tagged with: opengl-es
score: 0
has title: Wavefront file conversion to WebGL array gone wrong somewhere
accepted answer: http://stackoverflow.com/a/27071161

http://stackoverflow.com/a/27162799
has comment: http://stackoverflow.com/comment/42819274
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42819445
type: Answer
answers question: http://stackoverflow.com/q/27141917
has body: I found a few mistakes in your code. You need to use document.body.appendChild(bannerBox); instead of document.appendChild(bannerBox); I ran your code after making this correction http://jsbin.com/zavoyuyife/1/edit and the bannerBox element got added to the body. You can see it in Firebug (firefox) or Chrome inspector. To make it visually appear you need to give proper height and width to the bannerAd class. In your code since you have not mentioned the CSS, it did not appear visually on the page when I ran it in JSBin. In the makeBannerAds method, you are creating the anchor and img element but not adding to the bannerAd element. bannerAd.className = "bannerAd"; bannerAd.style.zIndex = i; var urlLink = document.createElement("a"); urlLink.href = adsURL[i]; var bannerIndex = document.createElement("img"); bannerIndex.src = "banner" + i + ".jpg"; Hope this helps.
accepted answer of: http://stackoverflow.com/q/27141917
has comment: http://stackoverflow.com/comment/42819886
score: 0

http://stackoverflow.com/q/27048624
has title: ReferenceError: Worker is not defined in simple Firefox Extension
type: Question
tagged with: javascript
has body: I'm creating an incredibly simple Firefox extension. I used cfx init to create the directory structure and have code in lib/main.js and data/my_worker.js main.js is as follows: var worker = new Worker("my_worker.js"); worker.onmessage = function(e) { console.log(e.data); }; worker.postMessage("Bobby"); and my_worker.js is as follows: self.onmessage = function(e) { self.postMessage("Hello " + e.data); }; Then I run: cfx run to run the extension. The results are as follows: (addon-sdk-1.17)me:lib me$ cfx run Using binary at '/Applications/Firefox.app/Contents/MacOS/firefox-bin'. Using profile at '/var/folders/p1/zzdzcrrx6pq96hgsmy5xjqmh0000gp/T/tmp57OYe9.mozrunner'. console.error: test: Message: ReferenceError: Worker is not defined Stack: @resource://jid1-zmowxggdley0aa-at-jetpack/test/lib/main.js:1:9 CuddlefishLoader/options&lt;.load@resource://gre/modules/commonjs/sdk/loader/cuddlefish.js:129:18 run@resource://gre/modules/commonjs/sdk/addon/runner.js:138:19 startup/ I tried putting my_worker.js in both the data and lib folders but neither works. This seems like a SUPER simple extension. What could be going wrong?
has answer: http://stackoverflow.com/a/27050057
tagged with: web-worker
score: 0
answer count: 2
tagged with: firefox-addon
tagged with: firefox
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30273589
tagged with: firefox-addon-sdk

http://stackoverflow.com/q/27011430
accepted answer: http://stackoverflow.com/a/27011483
tagged with: regex
has title: XRegExp to JavaScript RegExp
type: AnsweredQuestion
tagged with: xregexp
has body: I want to convert a XRegExp function to pure JavaScript RegExp. Basically all non-alphanumeric character will be replaced with "_" including spaces. The text This is a sample text *\&amp;^%$#@!~' will be like This_is_a_sample_text____________ I have the following code. var text = "This is a sample text *\&amp;^%$#@!~'"; var matchAlphaNumeric = new XRegExp('[\\p{L}\\p{N}]'); var result = substituteNotAcceptedCharactersforTag(text, matchAlphaNumeric); function substituteNotAcceptedCharactersforTag(text, regex) { var tagWithAlphaAndNumeric = ''; for (var i = 0; i &lt; text.length; i++) { var characterBeingTested = text.charAt(i); if (XRegExp.test(characterBeingTested, regex) === true) { tagWithAlphaAndNumeric += characterBeingTested.toLowerCase(); } else { tagWithAlphaAndNumeric += '_'; } } return tagWithAlphaAndNumeric; }
type: Question
has answer: http://stackoverflow.com/a/27011483
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/42667261
has text: Sorry - Fiddle updated showing the issue http://jsfiddle.net/kskevq9b/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27078199

http://stackoverflow.com/q/27064696
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42644640
type: Question
has body: I am trying to send the entire rendered DOM back to my web server so that I can use it to create a PDF using PrinceXML. (Their internal js rendering engine doesn't support everything need for D3, so it's easier to pre-render tho js using Chrome and then send Prince the computed DOM.) This works fine until until the HTML file hits 37,147 lines. When this happens I the AJAX request fires 6 times instead of once, but the value of 'code' being sent to the server is null in each case. If I log 'content' to Chrome, I can see that it still logs correctly so it doesn't like like the XML serializer is what's failing. This is happening in Chrome 39 on OS X, with jQuery 1.11.1. Any idea what's happening? Again it works fine when the file is 37,146 lines long, but as soon as I add one extra // to the next line the whole thing blows up. &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt; $(document).ready(function() { var content = (new XMLSerializer()).serializeToString(document); $.post("report/scrape", { code: content }); }); &lt;/script&gt;
tagged with: javascript
tagged with: jquery
has title: jQuery $.post fires multiple times when file >37,146 lines
score: 0
has comment: http://stackoverflow.com/comment/42645462
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42652930
answer count: 0

http://stackoverflow.com/comment/42569961
type: Comment
comment on: http://stackoverflow.com/a/27022927
score: 0
type: AnswerComment
has text: If you want to convince yourself, I've coloured up your fiddle to make it obvious what elements are firing what in your console http://jsfiddle.net/m8heyzgz/7/

http://stackoverflow.com/q/27139393
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has title: How to make this javascript functions to actually gather server time and countdown until event starts instead of browser/client time?
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: As the title says I am not really good on that and I am struggling how to make that when the event timers are launched it will countdown until event starts getting the time from the server and not counting on browser/client time? In the current way all will miss the event since most have different time zones and its incorrect :) Give me a clue please. Here is the full function: &lt;?php $d = date('D M d Y H:i:s O'); ?&gt; &lt;script type="text/javascript"&gt; var currdate = new Date(&lt;?php $d; ?&gt;); var day = currdate.getDay(); var hrs = currdate.getHours(); var hrs0 = currdate.getHours(); var hrs00 = currdate.getHours(); var mins = currdate.getMinutes(); var secs = currdate.getSeconds(); var CSWday = 7; var CSWhrs = 19; var FThrs1 = 6; var FThrs2 = 14; var FThrs3 = 22; var BDWhrs1 = 5; var BDWhrs2 = 11; var BDWhrs3 = 17; var BDWhrs4 = 23; var FTmins1 = 59; var FTsecs1 = 60; var hrsOut = 0; var hrsOut2 = 0; var hrs1 = FThrs1 - hrs; var hrs2 = FThrs2 - hrs; var hrs3 = FThrs3 - hrs; var hrs01 = BDWhrs1 - hrs0; var hrs02 = BDWhrs2 - hrs0; var hrs03 = BDWhrs3 - hrs0; var hrs04 = BDWhrs4 - hrs0; var day = CSWday - day; var hrs001 = CSWhrs - hrs00; if (day == 7) day = 0; if ((hrs &gt; 22) || ((hrs &gt;= 0) &amp;&amp; (hrs &lt; 7))) { if (hrs &gt; 22) hrsOut = 7; else hrsOut = hrs1; } if ((hrs &gt; 6) &amp;&amp; (hrs &lt; 15)) hrsOut = hrs2; if ((hrs &gt; 14) &amp;&amp; (hrs &lt; 23)) hrsOut = hrs3; if ((hrs0 &gt; 23) || ((hrs0 &gt;= 0) &amp;&amp; (hrs0 &lt; 6))) { if (hrs0 &gt; 23) hrsOut2 = 6; else hrsOut2 = hrs01; } if ((hrs0 &gt; 5) &amp;&amp; (hrs0 &lt; 12)) hrsOut2 = hrs02; if ((hrs0 &gt; 11) &amp;&amp; (hrs0 &lt; 18)) hrsOut2 = hrs03; if ((hrs0 &gt; 17) &amp;&amp; (hrs0 &lt;= 23)) hrsOut2 = hrs04; mins = FTmins1 - mins; secs = FTsecs1 - secs; var counter=setInterval(FTTimer, 1000); var counter=setInterval(BDWTimer, 1000); var counter=setInterval(CSWTimer, 1000); function FTTimer() { secs=secs-1; if (hrsOut &lt; 0) { clearInterval(counter); } else if (mins &lt; 0…
has comment: http://stackoverflow.com/comment/42776713
has answer: http://stackoverflow.com/a/27139420
answer count: 1

http://stackoverflow.com/comment/42538974
has text: Yes, and storing them in dynamic variables is another common way of doing it. Yes, it can get complicated though.
score: 0
comment on: http://stackoverflow.com/q/27004795
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42721134
type: AnswerComment
comment on: http://stackoverflow.com/a/27069264
type: Comment
has text: Nice! So the console.log() triggers great, but for some reason Modal.init() isn't be called...Hmmmm.
score: 0

http://stackoverflow.com/a/27095334
has comment: http://stackoverflow.com/comment/42696409
score: 1
has body: According to http://en.wikipedia.org/wiki/Comment_%28computer_programming%29#Styles it was branded by Holub for C and C++. Depending on your level of detail, the original "idea" of this commenting style can be awarded to either him, Bell Labs (Creators of C), or Dennis Ritchie (specific author of C) Further reading on Dennis Ritchie: http://en.wikipedia.org/wiki/Dennis_Ritchie Further reading on Allen Holub: http://en.wikipedia.org/wiki/Allen_Holub
has comment: http://stackoverflow.com/comment/42696467
upvote count: 1
has comment: http://stackoverflow.com/comment/42696494
answers question: http://stackoverflow.com/q/27095307
type: Answer
has comment: http://stackoverflow.com/comment/42696645
downvote count: 0

http://stackoverflow.com/comment/42785063
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27130705
has text: Should be related to templateCache itself, because I tried simple angularjs select and it worked. And here I can't help, sorry.

http://stackoverflow.com/comment/42627901
has text: If you don't know the game don't hate on the question! This is perfectly clear! He wants to know how to attack stuff in the game. I had the same question and it took me a lot of digging through documentation to figure it out. I am very confused as to why people think this is confusing, unclear, or otherwise a bad question. He provided example code of what he tried and asked a question. I'm not sure what else he could do to make this more clear.
score: 9
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27053765

http://stackoverflow.com/a/27142217
has body: You should be setting the new store via grid.set('store', ...), as mentioned in the documentation. Directly reassigning the store property doesn't give dgrid any way of knowing that the store actually changed.
answers question: http://stackoverflow.com/q/27103184
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42785933
has comment: http://stackoverflow.com/comment/42818019
type: Answer

http://stackoverflow.com/a/27095735
score: 1
has body: Found the solution here on this post Everything on the DB must be set to UTF-8 or utf8mb4 and now it's finally working. Apreciated everyone's help :)
type: Answer
answers question: http://stackoverflow.com/q/27076287
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27076287
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/44794628
comment on: http://stackoverflow.com/a/27555234
type: Comment
score: 0
type: AnswerComment
has text: Thanks. As I am new to backbone, I need some advice : 1. Is it possible that I keep this somewhere in a central place maybe in a parent view. I have a distributed web application and have many client apps. I want to reuse this across. 2. Can I provide the user with an error message on the view everytime to inform about the forbidden characters

http://stackoverflow.com/comment/42597124
type: Comment
has text: @DerVampyr: Ahh yes.. I keep forgetting.. out of habit.. Thanks for reminding.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27038690

security
tags question: http://stackoverflow.com/q/27086280
tags question: http://stackoverflow.com/q/27061305
tags question: http://stackoverflow.com/q/27126610
tags question: http://stackoverflow.com/q/27150341
tags question: http://stackoverflow.com/q/27001505
tags question: http://stackoverflow.com/q/27039245
tags question: http://stackoverflow.com/q/27019083
type: Tag
tag name: security

http://stackoverflow.com/comment/90558832
has text: @Willem It actually doesn't replace the whole page. If you click the about or contact link, it simply brings you further down the page to the about or contact section. If you then scroll up the page, you'll see the navbar is still there. If you want the navbar visible at all times you need to set it as a fixed navbar :)
comment on: http://stackoverflow.com/a/27140268
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/27010621
has comment: http://stackoverflow.com/comment/42548353
upvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/27011299
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: Tooltip text using Selenium 2 + Java when tootip is a parameter in onmouseover method
tagged with: java
downvote count: 2
tagged with: selenium
type: Question
has body: How can I get a tooltip for a link Footnote using Selenium 2 + Java? I am expecting "Tooltip for footnote" as the text. html is as: &lt;a onmouseout="rdm.js.util.RDMUtils.hideTooltip(event);return true" onmouseover="rdm.js.util.RDMUtils.showTooltipEncoded(event, "&lt;p&gt;;&lt;/p&gt;; Tooltip for footnote &lt;br /&gt;");return true" href="#"&gt;Footnote&lt;/a&gt;
score: -2
tagged with: javascript

http://stackoverflow.com/comment/42604865
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27042901
has text: I've voted as a duplicate, but see this answer in particular for something that might fancy your tickle: http://stackoverflow.com/a/11820643/1470607

http://stackoverflow.com/a/27144591
has comment: http://stackoverflow.com/comment/42785264
has body: you can use javascript code below : $("div.ns2-category:has(a:contains('Sports'))").hide(); $("div.ns2-category:has(a:contains('Sports'),a:contains('Television'))").hide(); // either one OR two Edit : add class name with div, for multiple
type: Answer
has comment: http://stackoverflow.com/comment/42785321
has comment: http://stackoverflow.com/comment/42785577
has comment: http://stackoverflow.com/comment/42785641
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/42785566
accepted answer of: http://stackoverflow.com/q/27144518
has comment: http://stackoverflow.com/comment/42785781
has comment: http://stackoverflow.com/comment/42786023
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27144518

http://stackoverflow.com/a/27064933
has comment: http://stackoverflow.com/comment/42643666
type: Answer
has body: As VisionN has pointed out, it is not possible to reverse the UTF-8 encoding. However by using charCodeAt() you can probably still achieve your goal. Say you have your textContent. By iterating through each character, retrieving its charCode and prepending "&amp;#" as well as appending ";" you can get your desired result. The downside of this method obviously being that you will have each and every character in this annotation, even those do not require it. By introducing some kind of threshold you can restrict this to only the exotic characters. A very naive approach would be something like this: var a = div.textContent; var result = ""; var treshold = 1000; for (var i = 0; i &lt; a.length; i++) { if (a.charCodeAt(i) &gt; 1000) result += "&amp;#" + a.charCodeAt(i) + ";"; else result += a[i]; }
accepted answer of: http://stackoverflow.com/q/27064389
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/27064389
upvote count: 3
has comment: http://stackoverflow.com/comment/42643628
type: AcceptedAnswer

http://stackoverflow.com/q/27139880
type: Question
has comment: http://stackoverflow.com/comment/42778092
score: -2
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/27139955
has comment: http://stackoverflow.com/comment/42777571
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/42777918
has comment: http://stackoverflow.com/comment/42777646
favorite count: 0
type: UnansweredQuestion
has body: the server response data is: {virus: "[["0家":1907],["1~3家":618],["4~10家":436],["11~20家":1046],["20家以上":924]]"}; then I get this object value by key virus how to convert this value to javascript array var value = '"[["0家":1907],["1~3家":618],["4~10家":436],["11~20家":1046],["20家以上":924]]"';
has answer: http://stackoverflow.com/a/27139997
has title: how to convert a json array into javascript array
has comment: http://stackoverflow.com/comment/42777639
downvote count: 2
has comment: http://stackoverflow.com/comment/42777693

http://stackoverflow.com/comment/42787158
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27129076
has text: Congratulations, it's a good solution to check for cookies with php ^^

http://stackoverflow.com/comment/42745622
score: 0
type: Comment
type: QuestionComment
has text: @Satpal this code is written in a file called user_controls.js inside of a Rails app.
comment on: http://stackoverflow.com/q/27121422

http://stackoverflow.com/comment/42789148
type: QuestionComment
comment on: http://stackoverflow.com/q/27146691
has text: Hi, could you please also provide the HTML of the table? And better yet, put everything into a jsfiddle?
score: 0
type: Comment

http://stackoverflow.com/a/27019089
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42567774
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27018949
type: Answer
answers question: http://stackoverflow.com/q/27018949
has comment: http://stackoverflow.com/comment/42563924
has body: The variable i never changes once set, so you're constantly writing to the same index. Also, your counter variable is never used. Consider using your counter variable as the index as it will be unique for each iteration. Alternatively, if you want to continue using the date as an index, add the line i = firstDate.toDate(); to the top of your for loop. For the latter, your loop should look like this: var counter = 1; var arr = []; var i = firstDate.toDate(); for(counter; firstDate &lt; secondDate; counter++){ i = firstDate.toDate(); arr[i]=firstDate.toDate(); console.log(firstDate.toDate()); firstDate.add(1, "day"); } console.log(arr[2]); I suggest adding a console log to your loop (as above) if you're having problems, to see which dates are being added as they are being added.
has comment: http://stackoverflow.com/comment/42564208

http://stackoverflow.com/q/27130771
tagged with: jquery-tabs
tagged with: javascript
tagged with: jquery
tagged with: jquery-ui-tabs
score: 0
has title: How to make these Jquery tabs linkable through ahref?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27131321
has answer: http://stackoverflow.com/a/27131436
tagged with: wordpress
has comment: http://stackoverflow.com/comment/42760510
has comment: http://stackoverflow.com/comment/42760795
type: Question
has body: I've been trying to fix this all day - so rest assured that I've come here after exhausting all of my limited capabilities. I'm no programmer by any means, but I have attempted.. I'm running WordPress and using a theme which has custom tabs. I want to be able to link to the tabs using ahref code. E.g. www.test.com/page/#tab2 and have it open the second tab. Here's the HTML code: Best Food Processors Buying Guide this is tab1 this is tab2 Here's the JQUERY code that corresponds to it: // Tabbed blocks jQuery(".short-tabs").each(function () { var thisel = jQuery(this); thisel.children("div").eq(0).addClass("active"); thisel.children("ul").children("li").eq(0).addClass("active"); }); jQuery(".short-tabs > ul > li a").click(function () { var thisel = jQuery(this).parent(); thisel.siblings(".active").removeClass("active"); thisel.addClass("active"); thisel.parent().siblings("div.active").removeClass("active"); thisel.parent().siblings("div").eq(thisel.index()).addClass("active"); return false; }); I have no idea how to edit this to allow for linking to and from the tabs. As you can see from the HTML, I don't even need to link to #tab1 for example for them to work. Any ideas or experts who can help? :) JSFIDDLE Link: http://jsfiddle.net/cws1j0q7/2/
answer count: 2

http://stackoverflow.com/comment/42656213
comment on: http://stackoverflow.com/a/27071254
has text: No I do not understand how to improve the numeric data as strings. I do not have opportunities to improve the json file
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42659314
comment on: http://stackoverflow.com/q/27073661
score: 0
type: Comment
type: QuestionComment
has text: I defined the function $(el) at the beginning of the script. I used the same function in other scripts, never had problems with it. Is there any problem with the definition? Edit: @Xero: don't worry :)

http://stackoverflow.com/a/27030178
accepted answer of: http://stackoverflow.com/q/27024793
has comment: http://stackoverflow.com/comment/42627585
upvote count: 4
has comment: http://stackoverflow.com/comment/42588275
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42601932
score: 4
answers question: http://stackoverflow.com/q/27024793
type: Answer
has comment: http://stackoverflow.com/comment/42601980
has body: The purpose of next is to continue processing a request -- this allows things like middleware to work. Here's an example. Imagine you have a simple Express.js app that looks like this: var app = express(); app.get('/', function(req, res) { res.send('hi!'); }); app.get('/dashboard', function(req, res) { res.send('there!'); }); The above app has 2 routes, and each does something particular. Now, what if we wanted to create a special function that prints hello world to the console before every request is executed? To do that, we'd need to modify either both routes above, or create a middleware like so: var app = express(); app.use(function(req, res, next) { console.log('hello, world!'); next(); // continue processing }); app.get('/', function(req, res) { res.send('hi!'); }); app.get('/dashboard', function(req, res) { res.send('there!'); }); Now, what happens is that, for each request, the function we defined above will be called BEFORE any of our route code, and once it makes the call to next(), that means we'll then run our route code. Nifty, right? At a basic level, the next object is just the 'next function' to execute, so when you say next(), you're telling express to keep processing the user request, essentially.

mobile
tags question: http://stackoverflow.com/q/27104668
tags question: http://stackoverflow.com/q/27091479
tags question: http://stackoverflow.com/q/27035857
type: Tag
tags question: http://stackoverflow.com/q/27008004
tags question: http://stackoverflow.com/q/27105408
tags question: http://stackoverflow.com/q/27082706
tags question: http://stackoverflow.com/q/27137816
tags question: http://stackoverflow.com/q/27113559
tags question: http://stackoverflow.com/q/27144274
tags question: http://stackoverflow.com/q/27143165
tag name: mobile
tags question: http://stackoverflow.com/q/27075083
tags question: http://stackoverflow.com/q/27029597
tags question: http://stackoverflow.com/q/27012847
tags question: http://stackoverflow.com/q/27054969
tags question: http://stackoverflow.com/q/27110919
tags question: http://stackoverflow.com/q/27040241

http://stackoverflow.com/a/27120820
has comment: http://stackoverflow.com/comment/42742896
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: You should use serialize HTML: &lt;form id="form1" action="" method="post"&gt; &lt;input id="standard_field" type="text" name="standard_name"&gt; &lt;input id="some_id_1" type="text" name="my_array[my_name_1]"&gt; &lt;input id="some_id_2" type="text" name="my_array[my_name_2]"&gt; &lt;input id="some_id_3" type="text" name="my_array[my_name_3]"&gt; &lt;/form&gt; JS: var dataObject = $('#form1').serialize(); var loadUrl = "some_script.php"; getAjaxData(loadUrl, dataObject, 'POST', 'json') .done(function(response) { //.......... }) .fail(function() { //...... }); // End function getAjaxData(loadUrl, dataObject, action, type) { return jQuery.ajax({ type: action, url: loadUrl, data: dataObject, dataType: type }); }
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27120664
answers question: http://stackoverflow.com/q/27120664

http://stackoverflow.com/comment/42744182
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27120567
type: AnswerComment
has text: yes, if the user wanted to put the element somewhere else in the body (which defeats the point of 'global' notifications...), the element should be inserted manually. However like you said, best practices should not win out in every case - it's a simple war of simplicity for the user installing it, or simplicity in the code itself.

http://stackoverflow.com/q/27014528
has comment: http://stackoverflow.com/comment/42555667
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27015987
has comment: http://stackoverflow.com/comment/42555555
linked to: http://stackoverflow.com/q/19138074
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42555590
has comment: http://stackoverflow.com/comment/42555857
has comment: http://stackoverflow.com/comment/42555302
type: Question
accepted answer: http://stackoverflow.com/a/27015987
has title: after appending inline html to html the window.open() doesn't shows append data
score: 0
has comment: http://stackoverflow.com/comment/42554946
has body: Here i created After appending inline html table data to html table, open to new tab and show print view but the problem was appending data is not shows. There only show html page table data test.html Your content here Name Phone print button in another html page and onclick by using backbone.js print : function() { var htmlTable2 = ' ' + ' Prasanth ' + ' 12345678 ' + ' '; var html1 = $("#toPrint tbody").append(htmlTable2); window.open("test.html").print(); }, how this change to html page table + append inline html data to open a new tab and show print option.
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42555897

http://stackoverflow.com/q/27098265
tagged with: checkbox
has body: I've tried everything I'm aware of trying to make this work, but I'm still not able to. All I need is a "select all" checkbox, do a loop to every element to set their classes and save their id in a session variable. So far I get every part of this code, except to visually see the checkbox checked. Here is my code: $('#all').on('change', function () { if($(this).is(':checked')){ table.$("input[type='checkbox']").each( function() { console.log($(this).attr("id")); $(this).prop( "checked" ,true); console.log($(this).prop("checked")); var id=$(this).attr("id").split('_')[1]; var id_row=table.row("#row_"+id).index()+1; $("#tabla_equipos tr:nth-child(" + id_row + ")").addClass('active'); $("table.DTFC_Cloned&gt;tbody tr:nth-child(" + id_row + ")").addClass('active'); funcChechboxes('{{ path('user_session_set')}}',id,'single'); }); }else{ //more code } }); I do get the checkboxes id on the console, and the "true" value for their "checked" prop ... even the class is applied, but not the pretty tick in the box. console: e_1 true e_2 true e_3 true e_5 true Any help would be much appreciated! Regards.
has comment: http://stackoverflow.com/comment/42713095
score: 1
has comment: http://stackoverflow.com/comment/42701519
upvote count: 1
has answer: http://stackoverflow.com/a/27117526
has comment: http://stackoverflow.com/comment/42701570
type: Question
has comment: http://stackoverflow.com/comment/42705837
has comment: http://stackoverflow.com/comment/42701628
tagged with: javascript
has comment: http://stackoverflow.com/comment/42714501
tagged with: jquery
has comment: http://stackoverflow.com/comment/42712916
answer count: 3
has comment: http://stackoverflow.com/comment/42714609
has title: JQuery Checkboxes do not change visual state at .prop("checked", true)
has answer: http://stackoverflow.com/a/27109960
linked to: http://stackoverflow.com/q/13284989
downvote count: 0
has comment: http://stackoverflow.com/comment/42712960
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/46373917
has comment: http://stackoverflow.com/comment/42718754

http://stackoverflow.com/q/27007244
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27007307
has body: If I have a form which I build for an AJAX query as below: var formData = new FormData($('#myForm')[0]); If I want to remove a input element from myForm can I do this: I had tried $('#myForm')[0].elementToRemove.remove(); but I get an error in console saying object doesnt support the property or method. So I require something like : $('#myForm')[0] // remove an input element here // now build the formData with that element removed var formData = new FormData($('#myForm')[0]); Is that possible?
type: UnansweredQuestion
has title: Remove data jQuery
type: Question

http://stackoverflow.com/a/27108967
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27108640
answers question: http://stackoverflow.com/q/27108640
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: Your alerts are in the constructor function of the controller. So, they are obviously only going to fire when the controller is created. The controllers in your example are created when the route is changed, so that is why you see them fire the alert when you change to a new route. Once you're on a route, the controller won't be instantiated again unless you leave and come back. If you want this logic to fire every time you click the link as well as when you first navigate to the view, then wire up a clickHandler and call the clickHandler in the constructor of the controller: myApp.controller('MyCtrl1', function($scope) { $scope.showAlert = function () { alert('controller logic1'); } $scope.showAlert(); }); And in your view: Page 1

http://stackoverflow.com/comment/113753330
score: 0
type: Comment
comment on: http://stackoverflow.com/a/38788909
has text: How to create the dynamic width and height of the page ?
type: AnswerComment

http://stackoverflow.com/q/27026518
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42576556
tagged with: ember.js
has comment: http://stackoverflow.com/comment/42582658
answer count: 0
has comment: http://stackoverflow.com/comment/42590066
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: handlebars.js
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42577334
has title: can't get popovers component to work
has body: According to this, http://ember-addons.github.io/bootstrap-for-ember/#/show_components/popover, shows the documentation on how this is supposed to work...quoted below may be the bit I'm not understanding (it's a little confusing because this all mentions tooltips and not popovers but I'm making a leap that since it's all in the same documentation that it's all related...) (controllers)dashboard.js import Ember from 'ember'; export default Bootstrap.TooltipBoxController=Ember.Controller.extend({ hoverPop: Ember.Object.create({ title: "I'm a title!", content: "And i'm a content!", trigger: "hover", placement: "right", sticky: true }) }); (templates)dashboard.hbs &lt;div class="pageheader"&gt; {{bs-bind-popover hoverPop}} ? &lt;/div&gt; application.js inside this file i have: import Ember from 'ember'; export default Ember.Route.extend({ renderTemplate: function() { // Render default outlet this.render(); // render extra outlets var controller = this.controllerFor('tooltip-box'); this.render("bs-tooltip-box", { outlet: "bs-tooltip-box", controller: controller, into: "application" // important when using at root level }); }, .... Ember console: Uncaught TypeError: undefined is not a function (refers to this line export default Bootstrap.TooltipBoxController=Ember.Controller.extend({ Any ideas? Has anyone solved this problem?
has comment: http://stackoverflow.com/comment/42590601
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27007136
tagged with: css
has comment: http://stackoverflow.com/comment/42543458
answer count: 0
score: 1
tagged with: iframe
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42617949
tagged with: javascript
has body: I have an iFrame window on the page, the content inside of the iFrame ether shrinks or grows larger in height depending of different AJAX calls. I want to dynamically re-size height of an iframe window based on the height of iframe's content My code: var $iFrame = $('#iFrameWindow'); var lastHeight; setInterval(function () { if ($iFrame.contents().height() != lastHeight) { $iFrame.css({ height: $iFrame.contents().height() + 'px' }); lastHeight = $iFrame.contents().height(); } }, 200); It works if iFrame's content grows larger then my iFrame window automatically gets re-sized to a larger height, but if iFrame's content shrinks in height $iFrame.contents().height() does not detect that change and shows old, larger and incorrect height for the iFrame's content. How do I also make my iFrame to dynamically shrink if height if the iFrame changes to smaller height?
downvote count: 0
has title: Dynamically Shrinking Size of An iFrame Window
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42544257
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27143469
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27143410
answers question: http://stackoverflow.com/q/27143410
type: Answer
has comment: http://stackoverflow.com/comment/42783535
downvote count: 0
has body: array.sort sorts strings, if you want to sort numerically, you need a comparison-function: array.sort(function(a, b){return a-b});
has comment: http://stackoverflow.com/comment/42783623
score: 3
upvote count: 3

http://stackoverflow.com/q/27049220
has answer: http://stackoverflow.com/a/27049389
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42619525
linked to: http://stackoverflow.com/q/11944745
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42616181
answer count: 2
has body: On one of our pages we have an ungodly amount of jquery shoved into one script tag. I'm trying to clean things up a bit by separating the code into a few individual .js files and using an ASP MVC 4 ScriptBundle. However, Chrome shows only one script is loading, and that script has a weird name that looks somewhat like a GUID. If I select this script, I can see that only the first .js file in the bundle loaded. The second file completely missing. BundleConfig public class BundleConfig { // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/AgentTransmission").Include( "~/Scripts/AgentTransmission/SetFields.js", "~/Scripts/AgentTransmission/MarketingDivision.js")); . . } } Screen shot of the Scripts folders .cshtml Create file (View) @model MonetModelFromDb.Models.AgentTransmission @{ ViewBag.Title = "Create new Agent"; } @Scripts.Render("~/bundles/AgentTransmission") Rendered HTML EDIT FYI I'm also running in DEBUG mode
has answer: http://stackoverflow.com/a/27066312
downvote count: 0
tagged with: bundle
favorite count: 0
has comment: http://stackoverflow.com/comment/42616420
has title: ASP MVC 4 bundle isn't loading custom js scripts
type: UnansweredQuestion
tagged with: asp.net-mvc-4

http://stackoverflow.com/comment/42799740
comment on: http://stackoverflow.com/q/27152631
has text: They're similar to those or they're always in that specific format? Where do the strings come from?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42519187
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26993164
has text: You can use JSON as far as you are running it in the same server otherwise you will have CORS (Cross-origin resource sharing) problems. What you show doesn't seem to be an array of values. Basically the Data needs to be an array and you are showing a `status` and something called `providerAccounts` that is shown just as `Object`. Where is the returned data? What do you see if you display the received data in the `success` function of the `ajax` call?
type: Comment

http://stackoverflow.com/q/27138193
has comment: http://stackoverflow.com/comment/42774765
type: Question
has title: Auto Nested Tree Auto Expand not working in IE11 but is working in Chrome
accepted answer: http://stackoverflow.com/a/27261587
has body: I have a nested tree which is an html table with buttons on each elements to get the child table via AJAX. This works when done manually in IE and in chrome but I have a link to "Expand All" which selects all down arrow images on the page and .click()'s them. This happens on a 600 millisecond loop until all images are clicked and tables are opened. Here is the code for the auto click loop. function autoClick(searchElement, clickElement) { setTimeout(function () { if ($(searchElement).length > 0) { $(searchElement).each(function () { $(this).click(); }); $(clickElement).click(); } }, 600); return ($(searchElement).length); } It doesn't even to click the first levels of the tree because when I watch for the ajax calls on the network monitor, none are fired. Here is the expand and collapse functions which utilize the autoclick loop. function expandClick() { if (!collapseExecuting) { expandExecuting = true; numOfExpandElements = autoClick('img[src="../Images/details_open.png"]', '#expandLink'); if (numOfExpandElements == 0) { expandExecuting = false; } } } function collapseClick() { if (!expandExecuting) { collapseExecuting = true; numOfCollapseElements = autoClick('img[src="../Images/details_close.png"]', '#collapseLink'); if (numOfCollapseElements == 0) { collapseExecuting = false; } } } Here's the Click event handler: $('#requestsTable tbody td img[data-description="toggle"]').live('click', function () { //alt="expand/collapse" // var nTr = this.parentNode.parentNode; var parentid = this.parentNode.parentNode.parentNode.parentNode.id; var item = this; if (parentid == "requestsTable") { getChild("request", requestTable, item, "RequestCustomers?RequestID=" + $(this).data("request")); } else if (parentid == "customerTable") { getChild("customer", requestTable, item, ".." + $(this).data('url') + "?RequestID=" + $(this).data("customer")); } else if (parentid == "accountTable") { getChild("account", requestTable, item, ".." + $(this).data('url') + "?AccountNum=" + $(this).…
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42805591
answer count: 1
tagged with: ajax
has answer: http://stackoverflow.com/a/27261587
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/42584632
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27031291
type: Comment
has text: Another note, I also tried using JQuery with: $('tr').click(blah blah blah) but it didn't work (I am guessing it had to do with the elements being created in JQuery)

http://stackoverflow.com/a/27039456
has comment: http://stackoverflow.com/comment/42600468
has comment: http://stackoverflow.com/comment/42600180
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42600311
has comment: http://stackoverflow.com/comment/42600163
accepted answer of: http://stackoverflow.com/q/27039320
has body: You can use the .submit() function to capture the actual submission of the form. Bind an event handler to the "submit" JavaScript event Then you can inject the hidden field with it's appropriate value: $( "#your_form" ).submit( function() { console.log( "Handler for .submit() called." ); $( "input", { "type": "hidden", "name": "x", "value": your_hidden_value } ).appendTo( "#your_form" ); }); If the hidden field is already in your HTML, you can just set the value: $( "#your_form" ).submit( function() { console.log( "Handler for .submit() called." ); $( "input:hidden[name='x']" ).val( your_hidden_value ) });
has comment: http://stackoverflow.com/comment/42600117
answers question: http://stackoverflow.com/q/27039320
type: Answer
has comment: http://stackoverflow.com/comment/42600325
has comment: http://stackoverflow.com/comment/42600451
has comment: http://stackoverflow.com/comment/42600225
downvote count: 0
score: 1

http://stackoverflow.com/q/27034944
tagged with: javascript
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42590606
favorite count: 0
type: UnansweredQuestion
has title: Check if tab is already open on mobile device?
score: 3
has answer: http://stackoverflow.com/a/27035860
upvote count: 3
type: Question
has body: I've got a button on my webpage that opens a new tab if my visitor is coming form a mobile device. Code: if (navigator.userAgent.match(/(iPhone|iPod|iPad|BlackBerry|Android|IEMobile)/)) { window.open(the_URL); } How can I check if the visitor has already got an open tab from this link and take the visitor back to the open tab? Meaning; I do not want to open a new tab every time the visitor clicks on this link. Any ideas how to accomplish this? Update I got this working in Safari (desktop) var newWin; if(newWin) { try { newWin.focus(); }catch(e) { newWin = window.open(the_URL); } } else { newWin = window.open(the_URL); } However its not switching to the other tab on iOS Safari.. Update 2 Tried to first close the window and then reopen it. However .close does not seem to work if(newWin) { setTimeout(newWin.close, 1000); try { newWin.close(); newWin.focus(); }catch(e) { newWin = window.open(the_URL); } } else { newWin = window.open(the_URL); }

http://stackoverflow.com/comment/42684623
type: Comment
has text: Can you please include a fiddle for this, I can't imagine most people out there could visualise the action of this script easily just from the code :)
score: 0
comment on: http://stackoverflow.com/q/27088499
type: QuestionComment

http://stackoverflow.com/a/27031608
has comment: http://stackoverflow.com/comment/63431828
upvote count: 3
type: AcceptedAnswer
has body: Just to let you know, you can only close windows with Javascript that were opened by it
type: Answer
has comment: http://stackoverflow.com/comment/42585099
downvote count: 0
has comment: http://stackoverflow.com/comment/42585104
score: 3
accepted answer of: http://stackoverflow.com/q/27031558
answers question: http://stackoverflow.com/q/27031558

http://stackoverflow.com/a/27088860
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/27088843
type: Answer
score: 2
has body: here is the proper way to bind such event with jQuery: &lt;script&gt; $(function(){ $('#boton2').click(function(){ getMEmberByName('nombre1', 'apellido1'); }); }); &lt;/script&gt; hope that helps.

ratchet
type: Tag
tag name: ratchet
tags question: http://stackoverflow.com/q/27114163

http://stackoverflow.com/q/27113329
accepted answer: http://stackoverflow.com/a/27113622
tagged with: conditional-operator
type: Question
has answer: http://stackoverflow.com/a/27113622
tagged with: javascript
has title: Javascript ternary operator with object
has comment: http://stackoverflow.com/comment/42729409
answer count: 1
tagged with: arrays
downvote count: 0
has body: I came across a piece of code I am trying to figure out, the code basically stores the occurrence of the amount of time a word appears in a text document, so the function countWordsIntext takes in the desired text and displays the word and the number of occurrence in the text, e.g would: 3 but: 5 very: 6 while looking at the function that counts the word in the text I cant figure out how the conditional tenary operation is supposed to work. An explanation would be very much appreciated var wordCounts = {}; function countWordsInText(text) { var words = text.toString() .toLowerCase() .split(/\W+) .sort(); for(var index in words) { var word = words[index]; if(word) { wordCounts[word] = (wordCounts[word]) ? wordCounts[word] + 1 : 1; } } } function display() { for (var index in wordCounts) console.log(index + ': ' + wordCounts[index]); } I don't understand how the wordCounts[word] object property is updated.
favorite count: 0
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/q/27028217
has comment: http://stackoverflow.com/comment/42644772
has comment: http://stackoverflow.com/comment/42583318
has title: textarea slow loading times
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27065703
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27065703
type: Question
has comment: http://stackoverflow.com/comment/42579407
has comment: http://stackoverflow.com/comment/42644859
linked to: http://stackoverflow.com/q/454202
tagged with: http://stackoverflow.com/tag/html
tagged with: php
answer count: 1
has body: I'm having long loading times when using a lot of textareas. <?php foreach($hold as $value){ $card_key = $value['card_key']; $card_one = $value['card_one']; $card_two = $value['card_two']; $card_three = $value['card_three']; echo ' '.$i.'. '.$card_one.' '.$card_two.' '.$card_three .' '; echo ' '; $i++; } ?> When $hold contains 1-10 it doesn't take that long to load, but when it has 50 or so it takes 8+ seconds to load. Is there a faster way to load multiple textareas? Should I instead use AJAX to load them in one at a time so it appears seamless?
has comment: http://stackoverflow.com/comment/42644952
upvote count: 1

http://stackoverflow.com/q/27083685
type: Question
has answer: http://stackoverflow.com/a/27085791
tagged with: jquery-ui
has title: Updating the url with selected tabs href
tagged with: javascript
tagged with: jquery
has body: I'm using Jquery UI (gem "jquery-ui-rails", "~> 4.2.0") in my rails app and want to implement tabs so for this i have this code overview about people sit amet facilisis feugiat citudin mi sit amet mauris. Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.p> I want to make tabs linkable so when i click in the about tab I have a URL like this www.mysite.com/companies/google?tab=about is this possible if yes how can I do it?
tagged with: jquery-ui-tabs
score: 0
answer count: 2
favorite count: 0
tagged with: tabs
has answer: http://stackoverflow.com/a/27084445
type: UnansweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/42639740
type: Comment
type: QuestionComment
has text: The value of $target_file is "books/underscore.js" The value of $target_file = "./books/"; are "./books/underscore.js"
comment on: http://stackoverflow.com/q/27062629
score: 0

http://stackoverflow.com/a/27071981
has comment: http://stackoverflow.com/comment/42670024
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42670671
has comment: http://stackoverflow.com/comment/42669622
has comment: http://stackoverflow.com/comment/42669445
has comment: http://stackoverflow.com/comment/42670831
has comment: http://stackoverflow.com/comment/42670330
type: Answer
has comment: http://stackoverflow.com/comment/42670694
has comment: http://stackoverflow.com/comment/42670151
has comment: http://stackoverflow.com/comment/42670127
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42670111
has body: You can try this Click on this paragraph. 1 2 3 hi tahira hi sobia compare there is some useful link for you push-array and unique-value
has comment: http://stackoverflow.com/comment/42670404
has comment: http://stackoverflow.com/comment/42668360
has comment: http://stackoverflow.com/comment/42670592
has comment: http://stackoverflow.com/comment/42669692
answers question: http://stackoverflow.com/q/27071042
has comment: http://stackoverflow.com/comment/42669948
has comment: http://stackoverflow.com/comment/42667628
accepted answer of: http://stackoverflow.com/q/27071042

http://stackoverflow.com/comment/42619540
comment on: http://stackoverflow.com/q/27050901
score: 0
has text: This approach will result in a lot of `undefined` values if the conditions in the `map` functions are not true. Because in those cases nothing is returned instead.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27125622
has body: the problem is not you clear:both, it's clearing the float but the problem is the floating element's height. your rotating images is absolute while the container, eventhough it's relative and floating, doesnt get the height of the image inside it. try give a height value (the height of your slideshow image) instead of height:auto of the container.
type: Answer
answers question: http://stackoverflow.com/q/27125189
has comment: http://stackoverflow.com/comment/42751265
has comment: http://stackoverflow.com/comment/42751241
has comment: http://stackoverflow.com/comment/42751049
score: 0

http://stackoverflow.com/q/27095317
tagged with: forms
has comment: http://stackoverflow.com/comment/42696580
tagged with: code-injection
has title: Javascript in Squarespace isn't working?
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27095768
tagged with: jquery
has comment: http://stackoverflow.com/comment/42696978
has body: I have a custom form that uses javascript that I'd like to add to my site. What the form does, is in stead of having a text label it has an image label which will change when a user hovers over the image or selects the image. I have tested it outside of Squarespace and it seems to be working fine. It isn't working on Squarespace. I have tried putting the HTML/CSS/javascript together in a code block, I have tried putting the CSS in the custom CSS area, and I have tried using code injector to put the javascript in. Nothing seems to be working. The HTML/CSS show up perfectly, it's just that nothing happens when you hover or click on the image. Any ideas? Here is my code: Javascript: $('#spiritWhiskeyCandle img').hover( function () { if($(this).next().val() !== "1") { $(this).attr('src', 'http://i1380.photobucket.com/albums/ah191/thedetroitbox/SpiritWhiskeyh_zpsf291cbeb.png'); } }, function () { if($(this).next().val() !== "1") { $(this).attr('src', 'http://i1380.photobucket.com/albums/ah191/thedetroitbox/SpiritWhiskey_zps968a5a84.png'); } } ); $("#spiritWhiskeyCandle img").click(function() { if($(this).next().val() !== "1") { $(this).attr("src", "http://i1380.photobucket.com/albums/ah191/thedetroitbox/SpiritWhiskeyc_zps62af06c4.png"); $(this).next().val("1"); } else { $(this).attr("src", "http://i1380.photobucket.com/albums/ah191/thedetroitbox/SpiritWhiskey_zps968a5a84.png"); $(this).next().val("0"); } }); CSS: #spiritWhiskeyCandle { width:24%; height:0; padding-bottom:24%; position:relative; float:left; margin-right:1%; margin-bottom:1%; } #spiritWhiskeyCandle img { position:absolute; width:100%; height:100%; cursor:pointer; } HTML: &lt;form&gt; &lt;label for="T3I1" id="spiritWhiskeyCandle"&gt; &lt;img src="http://i1380.photobucket.com/albums/ah191/thedetroitbox/SpiritWhiskey_zps968a5a84.png"&gt; &lt;input name="T3I1" type="radio" id="T3I1" style="display:none"&gt; &lt;/label&gt; &lt;/form&gt;
type: UnansweredQuestion
tagged with: squarespace
has comment: http://stackoverflow.com/comment/42696330
type: Question
has comment: http://stackoverflow.com/comment/42696558
has comment: http://stackoverflow.com/comment/42696887
tagged with: javascript
has comment: http://stackoverflow.com/comment/42696915

http://stackoverflow.com/comment/42636085
has text: But how i use this function in the childs directives?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27059105

http://stackoverflow.com/comment/121623910
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/50384891
has text: window.onresize = function(e) { alert("resized"); }; This isn't working, or do I miss something? iOS 14.7
score: 0

http://stackoverflow.com/a/27147944
has body: You can use indexOf(), it returns the first index at which a given element can be found in the array, or -1 if it is not present. var arr = []; for (var i = 1; i &lt; 10; i++) { arr.push(i); } var xslot = 15; if (arr.indexOf(xslot) == -1) { alert('xslot is not in range') }; You could also use $.inArray()
answers question: http://stackoverflow.com/q/27147888
score: 2
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/42692445
type: Comment
has text: Form as an answer please. It will be checked as a solution.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26995154

http://stackoverflow.com/comment/94379589
has text: `var dict = <your-code>` issue is `dict.length === 0` so this doesn't work for even a basic c# dictionary.
type: Comment
comment on: http://stackoverflow.com/a/27109383
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42621104
has text: @user2417624 what u r getting in $(this).find("#memberOldPassword") alone
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27051905

http://stackoverflow.com/comment/42714345
comment on: http://stackoverflow.com/a/27103598
type: AnswerComment
score: 0
type: Comment
has text: Actually I'm using AngularJS, my methods looks like the following: `$scope.highlight = function(text, search) { if (!search) { return $sce.trustAsHtml(text); } return $sce.trustAsHtml(text.replace(new RegExp('([^&]|^)(' + search + ')', 'igm'), '$1')); };`

http://stackoverflow.com/q/27113837
has body: My understanding of meteor is ajax is not needed for form submission, however I am wondering how I take care of Template.form.event submit form event and do a POST rest submit in the javascript so the page does not continue on to the action destination it just sends the data and stays on the page. How do I do POST in javascript without ajax. I assume there is a obvious answer, just can't seem to think of it. Do I need to install a rest package. I dont want the form action to be ran, but passed into javascript and sent via POST, without refreshing the page in METEOR. Here is the form &lt;form accept-charset="UTF-8" action="https://formkeep.com/f/randomnumbers" method="POST" id="contact-form"&gt; &lt;input type="hidden" name="utf8" value="✓"&gt; &lt;input type="text" placeholder="Name"&gt; &lt;input type="phone" placeholder="Phone Number"&gt; &lt;input type="email" placeholder="Your Email"&gt; &lt;/form&gt;
score: 1
has comment: http://stackoverflow.com/comment/42730482
upvote count: 1
has comment: http://stackoverflow.com/comment/42731808
type: Question
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/42730848
has comment: http://stackoverflow.com/comment/42731843
tagged with: post
downvote count: 0
answer count: 1
tagged with: meteor
favorite count: 0
has title: How do I submit a form with a post method in meteor without ajax?
has answer: http://stackoverflow.com/a/27114641
type: UnansweredQuestion

http://stackoverflow.com/comment/42792430
has text: Oh yes @DominicTobias. Thanks. I assumed that he hasn't multiple classes.
score: 1
comment on: http://stackoverflow.com/q/27148562
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42772058
has text: Duplicate, check this http://stackoverflow.com/questions/20998541/get-the-value-of-input-text-when-enter-key-pressed
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27136847
score: 0

http://stackoverflow.com/a/27043935
answers question: http://stackoverflow.com/q/27043831
has comment: http://stackoverflow.com/comment/42607342
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27043831
has body: Got it : var res0 ='{ "cols": [{"id":"","label":"Date","type":"date"},{"id":"","label":"Accounts","type":"number"}],"rows": [{"c":[{"v":"Date(2014, 10, 20)"},{"v":3}]}, {"c":[{"v":"Date(2014,10,21)"},{"v":1}]}] } '; from https://developers.google.com/chart/interactive/docs/reference (end of the first LONG table) Previous answers but not the subject : You may use new Date("2014-10-21") And for more you can do new Date("2014-10-21 10:00:00") to setup this date at 10:00 AM Maybe using the new Date("2014-10-21").valueOf() same as +new Date("2014-10-21") do the thing. Or maybe a string with new Date("2014-10-21").toString() same as ""+new Date("2014-10-21")
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/q/27133375
tagged with: function
tagged with: javascript
has answer: http://stackoverflow.com/a/27141829
score: 0
answer count: 2
tagged with: nested
has title: Javascript \ Angular function help - mental block
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42766729
has body: I don't know what it is about JS, but I have a mental block. I apologize for the dumb question, but I'm at a loss because no matter how much I read I cannot get the academics into practice. Especially when it comes to nested functions. I have a controller, lets say FileCtrl. Inside of it I have the the following that listens for file added to an input field via a directive. I'm attempting to inject an Angular JS factory service service called fileReader (a queue service for HTML5 FileReader). However,I keep getting a undefined error on fileReader. I know why because, it cannot see fileReader, but injecting it at $scope.$on and then again on $scope.$apply doesn't work. Also, adding fileReader as a closure at the end of $scope.$on doesn't work either. I should add that I can see the args.file and if I remove the fileReader code it will push the file no problem, but I then have no thumbnail. So I it works, just not with the fileReader and that is because Im doing something wrong with injection. Side note, to Vals comment below I use apply as I found there was a image render sync issue without it which works fine for smaller images, but with larger images it freezes which is why I'm attempting to create and use a $q fileReader service. I suppose another way to solve for it would be to create a watch / directive on the array entry and when img comes back with the 64 encode string populate the html element ... like I said JS mental block :) myApp.controller('FileController', ['$scope', 'FileReaderService', function($scope, FileReaderService ){ $scope.$on("fileSelected", function (event, args) { $scope.$apply(function () { $scope.progress = 0; fileReader.readAsDataUrl(args.file, $scope) .then(function(result) { $scope.imageSrc = result; }); $scope.files.push(args.file); }); }); });
has comment: http://stackoverflow.com/comment/42765513
type: Question
has answer: http://stackoverflow.com/a/27133572

http://stackoverflow.com/q/26999180
tagged with: javascript
has body: Is it possible to send a parameter to a prototype to set new properties of an object? for example: function person(first, last, age, eyecolor) { this.firstName = first; this.lastName = last; this.age = age; this.eyeColor = eyecolor; } person.prototype = function(color) { this.hair_color = color; }; This may not have been implemented correctly, but my question is still the same. I am trying to make sure I understand prototypes so maybe I am missing a fundamental idea about them. It seems that everywhere I look prototypes are used to set defined variables as opposed to one that is input such as this person.prototype = function() { this.hair_color = "brown"; };
tagged with: prototype
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: parameters
type: Question
has title: Sending parameters to a prototype in Javascript
has answer: http://stackoverflow.com/a/26999316

http://stackoverflow.com/comment/42647754
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27066982
score: 0
has text: Why don't you do the URI encoding of `poster` and `file` in Java on the server side instead?

http://stackoverflow.com/q/27139331
has body: I have a voting system for a model Subrating where, if a user votes by clicking on an icon, then his ip address is added to a list, which prevents him from voting again, and the blank voting icon is replaced by a green voting icon, both of which are defined in seperate divs. I would like to ajaxify this process. I have figured out how to update the vote count with Ajax, but is there a way to switch the vote icon divs when the button is clicked? Here's what I have so far: Say I want to switch &lt;div id="&lt;%= subrating.name %&gt;upz"&gt; to &lt;div id="voted"&gt;. views/things/show.html.erb: &lt;% if ((!@subratingip.include? request.remote_ip) &amp;&amp; (!@subratingunip.include? request.remote_ip)) %&gt; &lt;div id="subratings" &gt; &lt;div id="&lt;%= subrating.name %&gt;"&gt;&lt;%= number_to_percentage(subrating.rating, precision: 0) %&gt;&lt;/div&gt; &lt;div id="&lt;%= subrating.name %&gt;upz"&gt; &lt;a id="&lt;%= subrating.name.downcase %&gt;_link"&gt;&lt;%= link_to image_tag("UpArrowGray.png", alt: "votedown", class: 'uparrowsub' ), upvote_subrating_path(:id =&gt; subrating.id), method: :get %&gt;&lt;/a&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $("#&lt;%= subrating.name.downcase %&gt;_link").click(function () { $.get( "&lt;%= upvote_subrating_path(:id =&gt; subrating.id) %&gt;", function( data ) { $('#&lt;%= subrating.name %&gt;').html(data + ' %'); }); }); &lt;/script&gt; controllers/subratings_controller.rb def upvote @subrating = Subrating.find(params[:id]) UpVote.create!(ip: request.remote_ip, vanishing: false, voteable_id: params[:id], voteable_type: 'Subrating') redirect_to @subrating.thing render text: ((@subrating.up_votes.count.to_f + 2).to_f / (@subrating.up_votes.count.to_f + @subrating.down_votes.count.to_f + 3 ).round(1).to_f * 100).to_s end
has answer: http://stackoverflow.com/a/27139764
has answer: http://stackoverflow.com/a/27139522
tagged with: ruby
tagged with: ruby-on-rails
possible better answer: http://stackoverflow.com/a/27139522
has answer: http://stackoverflow.com/a/27209941
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/27209941
type: Question
tagged with: javascript
has title: Can I use Ajax to switch divs?
tagged with: ajax
answer count: 3
tagged with: ruby-on-rails-4

http://stackoverflow.com/a/27048765
type: Answer
has comment: http://stackoverflow.com/comment/42615296
has comment: http://stackoverflow.com/comment/42615711
has body: About Linkedin Contact Firstly correct your HTML elements now try your jquery method on it. $(document).ready(function() { $("#linkedinlink").click(function(e) e.prevent default(); $(this).addClass('active') }); }),
score: 0
has comment: http://stackoverflow.com/comment/42615257
has comment: http://stackoverflow.com/comment/42615208
has comment: http://stackoverflow.com/comment/42615354
has comment: http://stackoverflow.com/comment/42616355
answers question: http://stackoverflow.com/q/27048603

http://stackoverflow.com/comment/42591865
comment on: http://stackoverflow.com/a/27034509
score: 0
type: AnswerComment
type: Comment
has text: Sorry, I didn't fully read the linked question. Seems like I missed some informations.

http://stackoverflow.com/comment/42781282
comment on: http://stackoverflow.com/a/27136271
type: Comment
type: AnswerComment
score: 4
has text: Setting `closable` to `false` is certainly the preferred way, since that will also disable handling of the escape key. Note that it's only supported in Dojo 1.9 and 1.10 though.

http://stackoverflow.com/comment/103607391
has text: Do you want your browser to expose your printer to random strangers on the net?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27062795
type: QuestionComment

http://stackoverflow.com/q/27073074
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17593391
type: Question
has body: Most of the code I've seen online uses document.onkeydown, but MDN only lists window.onkeydown. This comment also recommends using window.onkeydown. Is there a difference or a reason to use one over the other?
has title: Is there a difference between window.onkeydown and document.onkeydown?
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27073168
score: 13
upvote count: 13
accepted answer: http://stackoverflow.com/a/27073168

http://stackoverflow.com/comment/42623937
comment on: http://stackoverflow.com/a/27050511
type: AnswerComment
score: 0
type: Comment
has text: Ok, so all of these worked, but why *doesn't* my code work? Your second solution seems to be almost no different from my approach.

http://stackoverflow.com/comment/42799849
score: 0
type: AnswerComment
type: Comment
has text: It may be sufficient that it's in the comment.
comment on: http://stackoverflow.com/a/27135492

http://stackoverflow.com/q/27015107
has answer: http://stackoverflow.com/a/27016584
score: 0
tagged with: jquery-callback
answer count: 1
tagged with: jquery
linked to: http://stackoverflow.com/q/14220321
tagged with: ajax
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42556400
has comment: http://stackoverflow.com/comment/42556106
has body: Welcome, I want to call synchronous javascript method without callbacks. The method is a POST asynchronous. function someMethod() { var bean; //bean is a proxy object provide by external library if(clicked_onSpecial_field) { if(!bean.isAuthorized()) { //here is a async call return false; } } //a lot of other instructions... } From one hand usually clicked_onSpecial_field = false so I cannot put all other instructions in callback. From the another hand bean is a provide to me proxy object. In this case i don't know in which way I can use $.ajax. Could you please help?
type: Question
accepted answer: http://stackoverflow.com/a/27016584
tagged with: synchronous
tagged with: javascript
has title: Javascript method synchronous call without callback and $.ajax

http://stackoverflow.com/q/27116103
score: 11
upvote count: 11
has body: i'm trying to assert/verify multiple elements for an attribute with Nightwatch.js. I tried to use the "elements" command by selenium but it seems to not actually return a tag. browser.elements('css selector','icon_checkmark', function (result) { this.verify.attributeEquals(result.value, 'aria-hidden', 'true'); }) The console outputs this error: Testing if attribute aria-hidden of &lt;[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]&gt; equals "true". Element could not be located. - expected "true" but got: null ERROR: Unable to locate element: "[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]" using: css selector It seems like it finds the right things because there should be 6 but then somehow I read out the wrong thing? Console.log of result.value[0] gives just { ELEMENT: '19' } which seems correct. Any idea how could I make this work? I want to check if all elements with the class icon_checkmark have an attribute aria-hidden="true".
possible better answer: http://stackoverflow.com/a/29928705
tagged with: selenium
tagged with: functional-testing
type: AnsweredQuestion
tagged with: nightwatch.js
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/31552917
accepted answer: http://stackoverflow.com/a/31552917
answer count: 2
has answer: http://stackoverflow.com/a/29928705
has comment: http://stackoverflow.com/comment/45183661
downvote count: 0
has title: Nightwatch js how to assert multiple elements
favorite count: 0
has comment: http://stackoverflow.com/comment/50053416
tagged with: accessibility

http://stackoverflow.com/comment/42575592
has text: I'm afraid the answer is that you cannot obtain the url of an external frame
comment on: http://stackoverflow.com/a/27024592
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/42829510
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27134412
has text: Thanks for your response. I will switch to Tom's PWR fork. I do need to use a join in my case, because we do want to limit the results (limited number of conversationTopics not conversationMessages).

http://stackoverflow.com/a/27122765
downvote count: 0
answers question: http://stackoverflow.com/q/27122642
has body: Assuming you want to remove and not hide options(cause with remove element remove completly from the dom): $("select").on("change", function() { //find all options with specific value(from the selected one) and remove(excluding self) $("select").not(this).find("option[value='" + this.value + "']").remove(); }); 1 2 3 1 2 3 1 2 3 1 2 3 References .find() .not() .remove()
type: Answer
score: 6
upvote count: 6
accepted answer of: http://stackoverflow.com/q/27122642
type: AcceptedAnswer

http://stackoverflow.com/q/27120579
has answer: http://stackoverflow.com/a/46769617
score: 8
tagged with: jquery-ui
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27122472
has body: I'm trying to use bootstrap modal popup with jquery-ui draggable functionality. I use it like this: // Bootstrap modal $(element).modal({ keyboard: false, show: value }); // Jquery draggable $(element).draggable({ handle: ".modal-header" }); But when I try to drag the popup right scroller is dragging with popup. Thx for any advance.
favorite count: 0
tagged with: twitter-bootstrap
downvote count: 2
type: AnsweredQuestion
has title: Jquery draggable with bootstrap modal, scroller strange behaviour
upvote count: 10
has comment: http://stackoverflow.com/comment/42742657
possible better answer: http://stackoverflow.com/a/46769617
has answer: http://stackoverflow.com/a/27122472
type: Question
answer count: 2

http://stackoverflow.com/comment/47946305
type: Comment
has text: How to check those files are compressed or not ?
comment on: http://stackoverflow.com/a/27040709
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42622467
score: 1
comment on: http://stackoverflow.com/q/27052249
type: Comment
type: QuestionComment
has text: Do you think I would be better off using that "Page Visibility API". http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active/1060034#1060034

http://stackoverflow.com/q/27090550
accepted answer: http://stackoverflow.com/a/27090759
has body: I need a regular expression for a comma separated values, that accept positive/negative integer and also float numbers. Ej: 3,45,2.5,12,-20 How do I get it? Thanks I need to implement a function that adds values and returns the result, and it detects a pattern of incorrect entry such numbers separated by hyphens Ej: 3,45,2.5,12,-20 (Correct) Ej: 3-45-2.5-12-20 (Incorrect) but I do not get it, the code I have: &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function validar() { var patron = /^(-?\d*\.?\d*,?)+$/; var numeros = document.getElementById("numeros").value; if (!patron.test(numeros)) { alert("Introduzca los números que desee sumar separados por comas, Ej: 3,3.25,-1"); } else { suma(); } } function suma() { var entrada = document.getElementById("numeros").value; var numeros = entrada.split(","); var suma = 0; for(var i = 0; i &lt; numeros.length; i++) { suma += parseFloat(numeros[i]); } document.getElementById("resultado").value = suma; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; Números: &lt;input type="text" id="numeros" size="30"&gt; Resultado: &lt;input type="text" id="resultado" size="20"&gt; &lt;input type="button" value="SUMAR" onClick="validar()"&gt; &lt;/body&gt; &lt;/html&gt;
tagged with: javascript
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/9011524
has answer: http://stackoverflow.com/a/27090759
type: AnsweredQuestion
has title: Validate comma separated numbers with positive/negative integers and float
type: Question
linked to: http://stackoverflow.com/q/1396084

http://stackoverflow.com/a/27098917
has comment: http://stackoverflow.com/comment/42702925
type: AcceptedAnswer
has body: **Approach #1** function doSomething(){ //your code } $('#btn_add').click(doSomething); $('.btn_delete').click(doSomething); **Approach #2** $("#btn_add,a.btn_delete").on("click", function(event) { event.preventDefault(); alert("This action has been temporarily disabled!") });
accepted answer of: http://stackoverflow.com/q/27098758
answers question: http://stackoverflow.com/q/27098758
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/a/27152931
score: 0
has comment: http://stackoverflow.com/comment/42847012
has comment: http://stackoverflow.com/comment/42854177
has body: http://www.sql.org/sql-database/postgresql/manual/datatype-datetime.html time [ (p) ] [ without time zone ] times of day only 8 bytes 00:00:00.00 23:59:59.99 1 microsecond time [ (p) ] with time zone times of day only 12 bytes 00:00:00.00+12 23:59:59.99-12 1 microsecond Method -&gt;format() is for DateTime object. (see. http://php.net/manual/en/datetime.format.php) Change in Entity / document type of workingDuration field from "time" to "datetime" (http://symfony.com/doc/current/reference/forms/types/datetime.html)
has comment: http://stackoverflow.com/comment/42815168
has comment: http://stackoverflow.com/comment/42867253
has comment: http://stackoverflow.com/comment/42840071
type: Answer
has comment: http://stackoverflow.com/comment/42861119
has comment: http://stackoverflow.com/comment/42860110
has comment: http://stackoverflow.com/comment/42839483
answers question: http://stackoverflow.com/q/27152217
has comment: http://stackoverflow.com/comment/42860344
has comment: http://stackoverflow.com/comment/42862317
has comment: http://stackoverflow.com/comment/42821318

http://stackoverflow.com/q/27001530
favorite count: 0
tagged with: actionscript-3
has comment: http://stackoverflow.com/comment/42533095
score: -3
has answer: http://stackoverflow.com/a/27001611
accepted answer: http://stackoverflow.com/a/27001611
has body: Hi guys I have this AS code and I want it in JS is any chance to do it without to write the whole code. I know that are very similar codes but I don't know what I should to change to be JavaScript / LOCATIONAL var locationDefinesStandard:Boolean = true if(slideFrame.beachCheckBox.currentFrame == 2) locationDefinesStandard = false; if(slideFrame.parkCheckBox.currentFrame == 2) locationDefinesStandard = false; if(slideFrame.mountainCheckBox.currentFrame == 2) locationDefinesStandard = false; // standard, mpw, trekking var suggestedCar:String; // DAD if(parent_Gender == 'Daddy'){ if(number_Kids &lt; 3){ suggestedCar = 'trekking' }else{ suggestedCar = 'mpw' } // MUM }else { if(number_Kids &gt; 2){ suggestedCar = 'mpw' }else{ if(locationDefinesStandard == true){ if(live_location == 'Rural'){ suggestedCar = 'trekking' }else{ suggestedCar = 'standard' } }else{ suggestedCar = 'trekking' } } } //show result if(suggestedCar == 'trekking') trekkingFrame.visible = true; if(suggestedCar == 'standard') largeFrame.visible = true; if(suggestedCar == 'mpw') mpwFrame.visible = true;
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/42535219
type: Question
tagged with: javascript
downvote count: 3
has comment: http://stackoverflow.com/comment/42533875
has title: How can I convert this AS code in JS?
answer count: 1

http://stackoverflow.com/q/27070934
type: Question
tagged with: javascript
has title: Document.Onload doesn't work properly in Kik
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: android
tagged with: kik
has body: I was recently trying my best to create a Kik app that dynamically loaded some content -- messages -- into a textbox when the app launched. document.onload wasn't doing it for me. I tried JQuery's $(document).ready and $(window).load to no avail. Simple code snippets like this were failing, and I couldn't understand why. They would refuse to function until I attempted to interact with another UI element, resized the screen by rotating my phone, etc... $(document).ready(function() { kik.getUser(function(user) { $('#myDiv').html(user.username); }); } This was pretty infuriating... why could I not get Kik to do both in-getUser functions and regular onLoad ones?
has answer: http://stackoverflow.com/a/27070987

http://stackoverflow.com/q/27132253
type: Question
tagged with: node.js
score: 0
has answer: http://stackoverflow.com/a/27132391
answer count: 2
possible better answer: http://stackoverflow.com/a/27132463
has title: Unable to find module mongodb in simple node.js app
has answer: http://stackoverflow.com/a/27132463
linked to: http://stackoverflow.com/q/14226410
accepted answer: http://stackoverflow.com/a/27132391
tagged with: javascript
linked to: http://stackoverflow.com/q/22260677
tagged with: mongodb
type: AnsweredQuestion
has body: TL;DR: Following is a detailed explanation of the steps I followed to arrive at the error. To find the basic question, skip to the very bottom. I'm following this book addyosmani - backbone-fundamentals for creating a simple backbone.js app with node server and mongodb as backend. As instructed, I've installed the latest versions of Node.js fromnodejs.org and mongodb from www.mongodb.org and ran mongodb by followed the instructions. Now as per the tutorial, I've created the following: { //package.json "name": "backbone-library", "version": "0.0.1", "description": "A simple library application using Backbone", "dependencies": { "express": "~3.1.0", "path": "~0.4.9", "mongoose": "~3.5.5" } } at the root of my project and executed npm install, for some reason it didn't work out. I further ventured and installed express following these steps: npm init npm install express --save npm install express this created the following package.json which I believe to be essentially the same as the one mentioned in tutorial: { "name": "Backbone-Library", "version": "0.0.1", "description": "A simple library application using Backbone", "main": "index.html", "dependencies": { "express": "^3.18.3", "mongoose": "^3.5.16", "path": "^0.4.9" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" &amp;&amp; exit 1" }, "author": "", "license": "ISC" } This created the very same folder structure which is mentioned in the tutorial: node_modules |_ .bin |_ express |_ mongoose |_ path and then I've successfully executed npm install without any errors. Now once I create a simple server.js file and try to execute it using the command node server.js I get the following error: module.js:340 throw err; ^ Error: Cannot find module 'mongodb' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.&lt;anonymous&gt; (D:\&lt;-- path to project -&gt;\Backbone-Li…
tagged with: backbone.js

http://stackoverflow.com/comment/42538320
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27004462
type: AnswerComment
has text: No…I have complex data, which is a part of other system and it wants to have ID. So, model should still be just ID!

http://stackoverflow.com/comment/42642836
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27064371
has text: @DeeMac $(mydiv).html(returnedMessage), or normal jscript setting the innerHtml
score: 0

http://stackoverflow.com/comment/42664712
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27071696
has text: Which browsers do you care about?

http://stackoverflow.com/q/27113961
favorite count: 0
has comment: http://stackoverflow.com/comment/42837225
has comment: http://stackoverflow.com/comment/42943646
has comment: http://stackoverflow.com/comment/42730781
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: php
type: Question
has body: I would like to use AJAX with FLOT in order to chart some data from a MySQL database. I wrote the code below to get the data from the database and plot using FLOT, but something is not working correctly. Any assistance with making this work is appreciated. <?php require 'database_connect.php'; try { $sql = "SELECT ts, COUNT(*) FROM tablename WHERE time IS NOT NULL and ts > ( NOW() - INTERVAL 5 MINUTE)"; $result = $pdo->query($sql); } catch (PDOException $e) { $error = 'databaseQuery.php - Database access failed: ' . $e->getMessage(); include 'error.html.php'; exit(); } while ($row = $result->fetch()) { $five_mins[] = $row; } include 'databaseQuery.html.php'; $pdo = null; // Disconnect from the database server. ?> The database query correctly pulls from my database a UTC timestamp as element 0 and an integer as element 1. In order to display the numbers in a web page, I use the brief code below: Real-Time Metrics <?php foreach ($five_mins as $fm): echo " Here are the results for 5 minutes of actions 0: " . $fm[0] . " "; echo " Here are the results for 5 minutes of actions 1: " . $fm[1] . " "; ?> <?php endforeach; ?> I have attempted to plot the data using the code below: Real-Time Metrics <!--[if lte IE 8]> <![endif]--> Real-time Metrics
tagged with: mysql
has title: Plotting data from MySQL with FLOT and PHP
tagged with: flot
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42943717

http://stackoverflow.com/comment/42524868
has text: yes.. It will work but it will close the current window. What if I have to close a particular window.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26996286
type: Comment

http://stackoverflow.com/comment/42590339
comment on: http://stackoverflow.com/a/27027766
score: 0
type: Comment
type: AnswerComment
has text: Au... awesome... I was think that it works without http, now working fine.

http://stackoverflow.com/comment/42541795
score: 2
has text: Do you mean you neeed to get `someFile.txt`?
type: QuestionComment
comment on: http://stackoverflow.com/q/27006363
type: Comment

http://stackoverflow.com/comment/42737937
has text: I added the html code to the edit. I am getting no errors in the console. I broadcast using: $rootScope.$broadcast("link-created", eventData);
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27117486

http://stackoverflow.com/a/27063292
downvote count: 0
type: Answer
score: 7
type: AcceptedAnswer
upvote count: 7
accepted answer of: http://stackoverflow.com/q/27063269
answers question: http://stackoverflow.com/q/27063269
has body: var nodes = {}; for (var i = 0; i &lt;= 4; i++) { nodes[i] = { 'label': 'xpto'+i }; }

http://stackoverflow.com/comment/42646826
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27065688
has text: Thanks! Is there currently any way to check for death without worst-case iterating through all the creeps in the game?

http://stackoverflow.com/comment/42738093
comment on: http://stackoverflow.com/a/27117009
has text: thank you sir! by the way im having trouble inserting my json to my highcharts and i found out why, the numbers should be in square brackets [] i tried already inserting [] in 1 but still does not work please see my post i edit it
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27007501
has body: In Underscore.js library, there is a function named isFinite returning 'true' if the value is a number. Considering that the built-in function isFinite of Javascript is already returning 'true' if the value passed as argument is a number, why we also need to call !isNaN(parseFloat(obj))? // Is a given object a finite number? _.isFinite = function(obj) { return isFinite(obj) &amp;&amp; !isNaN(parseFloat(obj)); };
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/27007535
tagged with: underscore.js
has title: Underscore.js calling isNaN after isFinite function
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
upvote count: 3
accepted answer: http://stackoverflow.com/a/27007535

http://stackoverflow.com/a/27132706
has body: toggle() has a callback parameter that runs after it is complete. You would want to use it like this: $('.button').click(function () { $('#iframehide').toggle('slide', function() { $(".zelena-row").mThumbnailScroller("scrollTo", "left"); }); });
answers question: http://stackoverflow.com/q/27132578
has comment: http://stackoverflow.com/comment/42771158
has comment: http://stackoverflow.com/comment/42773790
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42772126
downvote count: 0
score: 1

http://stackoverflow.com/q/27014353
linked to: http://stackoverflow.com/q/1910095
has answer: http://stackoverflow.com/a/27014544
downvote count: 1
type: Question
tagged with: web.config-transform
has comment: http://stackoverflow.com/comment/42554607
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/27014487
answer count: 2
upvote count: 0
has body: How do we define a variable in web.config file and make use of the same in Javascript code? I made a try assigning key value pair but seems its not working!
has title: web.config variable declaration and use in javascript
has comment: http://stackoverflow.com/comment/45770974
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42728744
has text: Heh. I'm actually in the middle of doing that myself. I'm aware it's not much information to go off of which is why I'm having trouble debugging it myself tbh. Was hoping someone somewhere had had a similar problem.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27112061
score: 0

http://stackoverflow.com/q/27144334
answer count: 4
accepted answer: http://stackoverflow.com/a/27147731
tagged with: mapbox
score: 6
type: AnsweredQuestion
tagged with: leaflet
has answer: http://stackoverflow.com/a/53750257
type: Question
has answer: http://stackoverflow.com/a/27147731
has title: Open Leaflet Popup at bottom of marker
possible better answer: http://stackoverflow.com/a/53750257
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27144900
favorite count: 0
has body: I have placed several markers on my map and added popups to them. The following code is executed in a loop and works fine: L.marker([ item.Lat, item.Long ]).bindPopup(item.count + ' projects').addTo(map); The markers are shown and popups open when you click them. However, the popup opens always on the top side of the marker. Is there a way to open in at the bottom (or on any side) of the marker? The popup-options in the Leaflet documentation do not seem to provide an option to do so.
has answer: http://stackoverflow.com/a/27161380
upvote count: 6

http://stackoverflow.com/q/27050218
score: 0
accepted answer: http://stackoverflow.com/a/27050888
type: Question
type: AnsweredQuestion
tagged with: datestamp
has body: I need some help adding a feature to this code. So far if C 2 is modified it adds a date stamp on D 2 but I would like the date stamp to clear when I clear the content on C 2 and I have not been able to successfully achieve this. Any help would be highly appreciated. Thanks. function onEdit() { var s = SpreadsheetApp.getActiveSheet(); if( s.getName() == "Add Payroll" ) { //checks that we're on the correct sheet var r = s.getActiveCell(); if( r.getColumn() == 3 ) { //use getRow for row and getColumn for column var nextCell = r.offset(0, 1); //offset (row,column) if( nextCell.getValue() === "" ) //is empty? nextCell.setValue(new Date()); //will only put date, format "123/Date and time" if time needed } } }
tagged with: google-sheets
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27050888
has title: Date stamp for google-spreadsheet

http://stackoverflow.com/comment/42550917
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27011285
has text: I copied all of that from https://github.com/gulpjs/gulp/blob/433c8686ac7abc97e3f70ffa4852712cc2a3c373/docs/recipes/incremental-builds-with-concatenate.md where there's a watch in "watch" and one for the glob.
score: 0

http://stackoverflow.com/comment/43171354
has text: Use `console.log` in your script.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27022352
score: 0

http://stackoverflow.com/a/27072017
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27067605
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27067605
type: Answer
score: 1
upvote count: 1
has body: in responsive.css?t=1416605492 you have /* 768px */ @media screen and (max-width: 768px) { /* Hide */ #HomeSlideShow, #ProductBreadcrumb, .productlist-page .Left { display: none; } #HomeSlideShow is set to invisible remove #HomeSlideShow from this section

http://stackoverflow.com/q/27145258
has comment: http://stackoverflow.com/comment/42787476
has comment: http://stackoverflow.com/comment/42786370
has comment: http://stackoverflow.com/comment/42803474
has comment: http://stackoverflow.com/comment/42786427
answer count: 1
has body: Rewriting legacy code I've stumbled upon this intresting piece (*not actual code, just logic representation): if (1===1) {{ console.info(1) }} Why double { on opening and closing actually is working?
favorite count: 0
has comment: http://stackoverflow.com/comment/42824236
has title: Why double brackets in if {{ }} in Javascript if work?
has answer: http://stackoverflow.com/a/27145304
has comment: http://stackoverflow.com/comment/42787000
has comment: http://stackoverflow.com/comment/42786533
tagged with: syntax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42786610
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42786795
tagged with: javascript
score: -1
type: Question

http://stackoverflow.com/comment/42692949
has text: Is your app root directory also the the root of your web server or are you using a virtual directory for your app?
comment on: http://stackoverflow.com/q/27093344
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42676131
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27083497
score: 2
has text: True, but this locks up the browser and is generally not recommended

http://stackoverflow.com/comment/42613961
score: 1
comment on: http://stackoverflow.com/q/27045420
type: QuestionComment
has text: Oh, that is not possible, if it were a html table it would be easy, but with svg you would need to add and recreate some elements, pretty hard. Still, no reason you can´t have those 2 columns as a html table besides the google chart
type: Comment

http://stackoverflow.com/a/27091312
has comment: http://stackoverflow.com/comment/42692178
has comment: http://stackoverflow.com/comment/42691846
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42690699
answers question: http://stackoverflow.com/q/27091240
has comment: http://stackoverflow.com/comment/42692399
accepted answer of: http://stackoverflow.com/q/27091240
has body: var image = document.getElementsByClassName('image'); var mainImage = document.getElementById('main-image'); [].forEach.call(image,function(img){ img.onmouseover = function(){ mainImage.src = img.parentNode.href; }; }); getElementsByClassName returns a set of elements, so you have to iterate over them..

http://stackoverflow.com/q/27148545
has answer: http://stackoverflow.com/a/48060114
accepted answer: http://stackoverflow.com/a/27149286
tagged with: d3.js
has title: line chart of json data in d3
type: Question
has answer: http://stackoverflow.com/a/27149286
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has body: I am learning d3. I want to make a line chart using json data. The data I am using is: var data = [ { "at": "2014-11-18T07:29:03.859Z", "value": 0.553292}, { "at": "2014-11-18T07:28:53.859Z", "value": 0.563292}, { "at": "2014-11-18T07:28:43.859Z", "value": 0.573292}, { "at": "2014-11-18T07:28:33.859Z", "value": 0.583292}, { "at": "2014-11-18T07:28:13.859Z", "value": 0.553292}, { "at": "2014-11-18T07:28:03.859Z", "value": 0.563292}]; I want "at" on x axis and "value" on y axis. Also I need to parse the "at" as time only. Please provide me pointers how i will proceed further. The code till now I have implemented is below. I tried to look for documentation for this but found none. line chart on json
possible better answer: http://stackoverflow.com/a/48060114
answer count: 2
score: 5
downvote count: 0
favorite count: 0
upvote count: 5

http://stackoverflow.com/a/27115561
score: 1
accepted answer of: http://stackoverflow.com/q/27114739
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42761462
upvote count: 1
has body: In assuming that you know the basics of web design, I will give you the short explanation how the Bootstrap works. Bootstrap is HTML, CSS and JS framework that handles the responsiveness AUTOMATICALLY. You must only include the libraries correctly and know which Bootstrap css-classes have you too include into your HTML tags. For example, if you want to achieve the design part for search as in your drawing, you must do something like here in Bootstrap documentation or for navbar. I will give you quick hint for components structure of your problem (of course, there is a lot work in css :) ): Go! Menu1 Menu2 Menu3 Menu4 //HTML PART FOR SIDEBAR //HTML PART FOR MAIN CONTENT You must wisely include exact col-lg, col-md, col-sm and col-xs classes to reach the responsiveness for each browser sizes. One of the most important things also is to learn Boostrap grid system. This is unavoidable for components organization. Just practice as in documentation, learn the Bootstrap css-classes and organisations carefully and after are while, you will be able to design complexer stuffs. I hope I theoretically covered everything what you need to design with Boostrap framework.
answers question: http://stackoverflow.com/q/27114739

http://stackoverflow.com/a/27025256
type: Answer
has comment: http://stackoverflow.com/comment/42574127
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27025075
answers question: http://stackoverflow.com/q/27025075
has body: ng-show will be evaluated on every digest cycle - it doesn't know (at that level of abstraction) what is checked inside ng-show, so must reevaluate anytime the result could have changed. What you may want to do is something like: $scope.canDelete = checkIfCanDelete(); checkIfCanDelete = function() { //your check $scope.canDelete = Site.selected &amp;&amp; Site.selected.children.length; } $scope.$watch('Site.selected', function() { checkIfCanDelete(); } But honestly, if it's not computationally intensive (and this isn't), it's probably easier and clearer to just leave it as it.
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/27140372
tagged with: node.js
has body: When I want to use monk as a middleware to access the mongodb, it prompts that Failed to load c++ bson extension, using pure JS version My running evn is the following: OS X Yosemite Node v0.10.32 npm 1.4.28 Mongodb 2.6.5 monk 0.9.1 Does any of you know how to fix the issue?
has comment: http://stackoverflow.com/comment/42781434
tagged with: monk
type: Question
tagged with: javascript
has title: Failed to load c++ bson extension, using pure JS version when using monk to access Mongodb
linked to: http://stackoverflow.com/q/21656420
has comment: http://stackoverflow.com/comment/42944648
score: 0
tagged with: mongodb
answer count: 1
has answer: http://stackoverflow.com/a/32808164
linked to: http://stackoverflow.com/q/28651028
type: UnansweredQuestion

http://stackoverflow.com/a/27060370
answers question: http://stackoverflow.com/q/27059269
has comment: http://stackoverflow.com/comment/42637118
score: 0
has body: handle form submit in JQUERY instead on click on submit.Give submit button inside each div a common class name and different id based on which div they belong. Also give each form inside div unique id according to div they belong. After that you can try this : also define hidden input element as $(".submitClass").click(function(){ var id=$(this).attr("id"); if(id=="div1") // Need to Submit form1 { $("#CurrentActDiv").val("1"); $("#form1").submit(); } else if(id=="div2") // Need to Submit form2 { $("#CurrentActDiv").val("2"); $("#form2").submit(); } else if(id=="div3") // Need to Submit form3 { $("#CurrentActDiv").val("3"); $("#form3").submit(); } }); so you can know which form is submitted on server end and you can use if else to read from particular combobox String current=request.getParameter("CurrentActDiv"); if(current.equals("1")) { read from comobox1 } else if(current.equals("2")) { read from comobox2 } else if(current.equals("3")) { read from comobox3 }
type: Answer
has comment: http://stackoverflow.com/comment/42637185

http://stackoverflow.com/a/27067790
answers question: http://stackoverflow.com/q/27067490
has body: To retrieve the pubDate content you can use the casper.fetchText function, but it has a drawback that it concatenates all text nodes into one string: casper.echo(casper.fetchText("pubDate")); would print Fri, 21 Nov 2014 00:56:15 -0500Fri, 21 Nov 2014 00:47:34 -0500Fri, 21 Nov 2014 00:45:36 -0500 To actually retrieve the text separately you can use casper.getElementsInfo which works on multiple elements and provides the text property. A simple mapping afterwards generates an array that you can work on afterwards: var pubDates = casper.getElementsInfo("pubDate").map(function(elementInfo){ return elementInfo.text; // or even `return new Date(elementInfo.text)` }); But since you only want the latest one and RSS feed are sorted newest to oldest, you can simply use the first one (note the lack of an s in getElementInfo): var pubDate = casper.getElementInfo("pubDate").text; You previous approach would have worked, if you would have done this in the page context. The clientutils module is only accessible in the page context (inside casper.evaluate). var pubDate = this.evaluate(function(){ return __utils__.getElementByXPath('//pubDate').innerText; }); Note that __utils__ has two underscores on both sides. Also you cannot pass DOM elements from page context out to casper context, but you can pass strings and other primitive objects. Therefore I returned the innerText property of the DOM element. The documentation says this: Note: The arguments and the return value to the evaluate function must be a simple primitive object. The rule of thumb: if it can be serialized via JSON, then it is fine.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27067490
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/27048463
type: Question
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/27052597
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: google-drive-api
has body: I'm trying to write a script that will return the name of every file that has been shared with the active user. However I'm having problems with the .getAccess() method. EDIT: So I've been tinkering with the code a little and it turns out that the code is breaking on files that are shared with "Everyone in the domain who has the link". So now the issue is that of avoiding files that are shared with everybody but are still popping up in the user's drive without having been explicitly shared with them. Is there a way to say: if (file.getAccess(user) == "VIEW" &amp;&amp; file is explicitly shared with user) or &amp;&amp; file is not "Shared with everyone in the domain with the link" OLD QUESTION: When I use it on a file that was accessed from a specific ID, it works perfectly. For example: var id = "1HoJbszb1uLF1RZpU_IPv3O648pIeYs4IWK2kbbQ4IaA"; var file = DriveApp.getFileById(x); Logger.log(file.getAccess(user)); Log: EDIT However, if I try to iterate through every file in a user's drive, I will get an error "No Item with the given ID could be found, or you do not have permission to access it". I've tried it these two ways: while (files.hasNext()){ var raw = files.next(); var id = raw.getId(); var file = DriveApp.getFileById(id); if (file.getAccess(user) == "EDIT" ) Logger.log(file.getAccess(user)); } and: while (files.hasNext()){ var file = files.next(); if (file.getAccess(user) == "EDIT" ) Logger.log(file.getAccess(user)); } I get the same error trying it both ways. I've even checked to make sure that the .hasNext() method is working and to be sure when I ask the log to only list the names of each file it works fine as long as .getAccess() is never called (so no if statement). while (files.hasNext()){ var file = files.next(); Logger.log(file.getName()); } any idea what's wrong?
accepted answer: http://stackoverflow.com/a/27052597
upvote count: 1
type: AnsweredQuestion
score: 1
has title: Is there a way to exclude files not explicitly shared with the user from a script? ( aka files that are Shared with Everyone In Domain With The Link)

http://stackoverflow.com/comment/42691697
type: QuestionComment
type: Comment
has text: If you could provide the needed schema information, I could write an example.
comment on: http://stackoverflow.com/q/27089385
score: 1

http://stackoverflow.com/comment/42565267
has text: is the php script on a different domain than the where the javascript is executing (in the example, does the javascript run on a page of www.example.com) ?
type: Comment
comment on: http://stackoverflow.com/q/27020282
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42636088
comment on: http://stackoverflow.com/q/27060464
score: 0
type: QuestionComment
type: Comment
has text: Can you try: `$(".slides").append($(" "));` ?

http://stackoverflow.com/comment/42824247
comment on: http://stackoverflow.com/q/27105728
type: QuestionComment
has text: SO essentially once I have removed the svg as well as all of its components, I will have to rebuild everything within the "on click" function?
type: Comment
score: 0

http://stackoverflow.com/q/27099988
downvote count: 2
has comment: http://stackoverflow.com/comment/42704430
has answer: http://stackoverflow.com/a/27101518
accepted answer: http://stackoverflow.com/a/27101518
type: Question
has comment: http://stackoverflow.com/comment/42704317
has answer: http://stackoverflow.com/a/27100171
has answer: http://stackoverflow.com/a/27101728
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42707197
tagged with: dom
has title: Append a new table row with JavaScript
has answer: http://stackoverflow.com/a/27100167
upvote count: 1
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/27100171
has body: Following is the code to generate a table with input fields and buttons. Up Down Up Down Up Down I want to be able to append a similar row anywhere in the table using JavaScript. If I click the Up button I want a similar row to be appended just above that row, and if clicked down, just below that row. And finally I want to be able to get all the data from the table in the order as created by clicking the buttons. Please help. After receiving few answers this is what i did. $(document).ready(function(){ var html = ' Up Down '; $('.append_up').click(function(e) { e.preventDefault(); $(this).closest('tr').before(html); }); $('.append_down').click(function(e) { e.preventDefault(); $(this).closest('tr').after(html); }); }); I was able to append rows but clicking on the button from the new row does nothing.
has comment: http://stackoverflow.com/comment/42704370
linked to: http://stackoverflow.com/q/171027
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/42562965
comment on: http://stackoverflow.com/q/27019104
has text: You should look into NTP or any of the other network time protocols.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27119995
accepted answer of: http://stackoverflow.com/q/27119856
has comment: http://stackoverflow.com/comment/42741715
has comment: http://stackoverflow.com/comment/42741377
has body: Try something like this: HTML + Add JQuery $(document).on("click", ".add", function(){ $(this).before(" "); $('.full:empty').spectrum({ showPaletteOnly: true, // if you want to only have the palette showPalette:true, palette: [ // here the colors you want to have on your palette ['black', 'white', 'blanchedalmond', ['red', 'yellow', 'green', 'blue', 'violet'] ] }); });
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27119856
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42741768
has comment: http://stackoverflow.com/comment/42741861
has comment: http://stackoverflow.com/comment/42745555

http://stackoverflow.com/comment/42871086
type: Comment
has text: no wrong, but not what i am after. I have added some information to the question (which i think is the key to the solution). If you can take some time and take a look, please.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27040239

http://stackoverflow.com/comment/42711050
type: Comment
has text: why you want the order to be maintained? and also by `order`, do u mean the order in which is printed first?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27102182

http://stackoverflow.com/comment/42823807
score: 0
comment on: http://stackoverflow.com/q/27145572
type: Comment
type: QuestionComment
has text: @MikaelJumppanen I want the buttons to act solely as links rather than do anything dynamic (I have changed them to HTML buttons to avoid this confusion). Ideally I want all the updating to work the same as it does when selecting the data in a sidebar... http://shiny.rstudio.com/gallery/kmeans-example.html

http://stackoverflow.com/comment/42669692
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27071981
has text: yes i want to compare arr array with arrt if both same then alert or move to next page
type: AnswerComment

http://stackoverflow.com/a/55064554
type: Answer
has body: It looks like your timer is done not by timing events, but rather manipulated by the update function. This means that it is affected by the frame rate. I would suggest doing something like this: game.time.events.add(/*time in ms*/, /*func to be called after timer ends*/, this);
score: 0
answers question: http://stackoverflow.com/q/27098323

http://stackoverflow.com/comment/42673058
score: 2
type: QuestionComment
has text: Don't you think it's a server-side issue, yet you don't show anything related to server configuration?
type: Comment
comment on: http://stackoverflow.com/q/27081849

http://stackoverflow.com/q/27088455
has title: how to add selected option to a table dynamically
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27088502
has answer: http://stackoverflow.com/a/27088502
score: -1
type: Question
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/27088696
tagged with: javascript
tagged with: jquery
has body: I want to add the selected option in a select list to a table with delete option for each row created automatically. So when I click on delete option the entire row should be deleted in the table and that option should be available in the select list again. I added the select option to the table but it is not displaying as &lt;td&gt;, instead it displays as &lt;option&gt;.
favorite count: 0
accepted answer: http://stackoverflow.com/a/27088696
has comment: http://stackoverflow.com/comment/42684506

http://stackoverflow.com/comment/42551534
has text: Yes @huwence that is an option, but I would like to do it in PHP if posible
comment on: http://stackoverflow.com/q/27012242
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/96877479
type: Comment
score: 0
comment on: http://stackoverflow.com/a/45506857
has text: As noted below by @张浩然, both iso-8859-1 and windows-1252 have undefined characters. These really shouldn't be used.
type: AnswerComment

http://stackoverflow.com/q/27141528
has answer: http://stackoverflow.com/a/27141542
type: AnsweredQuestion
has body: I need some help to build a RegEx that match numeric values and allow also one dot between numbers, example of valid match: 25.23.25 25.2323.5656.5656 25 Example of invalid match: .25.23.25 25.2323.5656.5656. 25. 25. Can any give me some help?
upvote count: 1
downvote count: 1
type: Question
has title: Regular expression that allow dots between numbers
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27141542
score: 0
tagged with: preg-match
answer count: 1
tagged with: regex
favorite count: 0
tagged with: php

http://stackoverflow.com/comment/42736562
has text: `[object HTMLDivElement]` is the syntax error in the selector. `this` is a **DOM element**. What did you expect from concatenating a **DOM element** with a **string**?
comment on: http://stackoverflow.com/q/27117106
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/42690493
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27075857
type: AnswerComment
has text: @MuthuKumar: When putting explicit wait, for above, the wait time ranges till 10 seconds. It means, whenever the alert comes into picture, may it be some milliseconds, or more than that (at max 10 seconds), then it will be switched to, and further actions will proceed hence. But, if you want to wait till some milliseconds try this code: `Alert a = new WebDriverWait(driver,0,500).until(ExpectedConditions.alertIsPresent());` It will wait for 500 milliseconds for the alert.

http://stackoverflow.com/q/27142389
score: 1
has comment: http://stackoverflow.com/comment/45735467
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/48608045
tagged with: dimple.js
tagged with: d3.js
type: UnansweredQuestion
has body: I'm using dimple js to draw a pie chart. I want to display the percentage in pie chart. var svg = dimple.newSvg("#chartContainer", 590, 400); d3.tsv("/data/example_data.tsv", function (data) { var myChart = new dimple.chart(svg, data); myChart.setBounds(20, 20, 460, 360); myChart.addMeasureAxis("p", "Unit ales"); myChart.addSeries("Owner", dimple.plot.pie); myChart.addLegend(500, 20, 90, 300, "left"); myChart.draw(); }); Below is the link for reference. dimple js Pie Chart
upvote count: 1
has title: How to display percentage in Pie Chart for DIMPLE js
linked to: http://stackoverflow.com/q/28306308

http://stackoverflow.com/a/27102786
score: 0
answers question: http://stackoverflow.com/q/27074911
type: Answer
has body: You can develop / adapt this example: http://jsfiddle.net/Gv7Tg/33/ which allows to synchronise charts by using setExtremes()

http://stackoverflow.com/comment/106613286
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27117822
has text: @HeemanshuBhalla, while the question title uses the words AM/PM, OP's actual question was how to show that one time happened before another using date strings that include AM/PM. The jsfiddle is logging to the console; you'll need to open your developer tools in order to see the output :)
type: AnswerComment

http://stackoverflow.com/q/27118378
has title: count on bar graph jqflot
type: UnansweredQuestion
score: 0
tagged with: php
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I've created a bar graph using jq flot. I need to add the item count on the top of each bar graph columns. How can I achieve this using jqflot?
has answer: http://stackoverflow.com/a/27120558

http://stackoverflow.com/a/69684721
score: 0
answers question: http://stackoverflow.com/q/27132796
type: Answer
has body: I have an idea. If you know the screen is in a mobile size, you can detect when an input or textarea has the focusin and focusout event fired. If thats the case, the keyboard is probably opened. jQuery example $('input[type="text"], input[type="number"], input[type="password"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"], textarea') .on('focusin', function (){ if(window.innerWidth < 800){ // do stuff on keyboard opened... } }) .on('focusout', function (){ if(window.innerWidth < 800){ // revert changes on keyboard closed... } }); Or using the height with any input type let initHeight = window.innerHeight; $('input, textarea') .on('focusin', function (){ if(window.innerHeight < initHeight && window.innerWidth < 800){ // do stuff on keyboard opened... } }) .on('focusout', function (){ if(window.innerWidth < 800){ initHeight = window.innerHeight; // ensure initHeight is still accurate // revert changes on keyboard closed... } });

http://stackoverflow.com/a/26999170
type: Answer
has body: Most browsers have a function called setImmediate(callback) which queues the callback for execution immediately after the current event queue is empty. For browsers that don't support it, you can get almost the same thing with setTimeout(callback, 1).
has comment: http://stackoverflow.com/comment/42528866
has comment: http://stackoverflow.com/comment/42528826
answers question: http://stackoverflow.com/q/26998480
score: 0
has comment: http://stackoverflow.com/comment/42529143

angular-ui-typeahead
tags question: http://stackoverflow.com/q/27067523
tag name: angular-ui-typeahead
type: Tag

http://stackoverflow.com/q/27124298
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: jasmine
favorite count: 0
has answer: http://stackoverflow.com/a/27125016
tagged with: angularjs
has title: AngularJS $scope.$watch callback function parameter undefined in Jasmine test
type: Question
linked to: http://stackoverflow.com/q/25748001
upvote count: 3
answer count: 2
possible better answer: http://stackoverflow.com/a/33589537
accepted answer: http://stackoverflow.com/a/27125016
has answer: http://stackoverflow.com/a/33589537
has body: I have defined a $scope.$watch in my controller on a scope variable named ctrl.test. The $watch's callback function is called with the correct value (newVal) in a production deployment, but when called from a Jasmine test, it is called with undefined. Directly accessing the ctrl.test does yield the correct value. Could anybody shed some light on this? Here's a Plunk to fiddle around with.
has comment: http://stackoverflow.com/comment/42749123
tagged with: javascript
has comment: http://stackoverflow.com/comment/42748931

http://stackoverflow.com/comment/42765803
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27132112
type: AnswerComment
has text: ` `

http://stackoverflow.com/q/26994785
favorite count: 0
has comment: http://stackoverflow.com/comment/42520839
has comment: http://stackoverflow.com/comment/42520156
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42520219
accepted answer: http://stackoverflow.com/a/26994930
downvote count: 6
has comment: http://stackoverflow.com/comment/42520236
type: AnsweredQuestion
score: -5
has body: { "users":[ { "tab":"Tab1" }, { "tab":"Tab2" }, { "tab":"Tab3" }, { "tab":"Tab4" }, { "tab":"Tab5" }, { "tab":"Username" }, { "tab":"Password" }, { "tab":"State" }, { "tab":"Country" } ] } How can I add another array to this code? I tried adding a semicolon(;) but that does not work.
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has title: How can I add another array to this code? I tried giving a semicolon(;) but it does not work
has comment: http://stackoverflow.com/comment/42520138
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/42520238
has answer: http://stackoverflow.com/a/26994930
answer count: 1
tagged with: jquery

readonly
tag name: readonly
tags question: http://stackoverflow.com/q/27026989
type: Tag

http://stackoverflow.com/q/27040789
tagged with: php
has comment: http://stackoverflow.com/comment/42600925
answer count: 0
has comment: http://stackoverflow.com/comment/42600809
has title: syntax error when passing php variables to javascript
has body: I know that there're already a few questions asking about passing php variables to javascript. I looked at these questions and finally it leads me to one most popular answer. It suggests a very simple way to use php variables in javascript as below: 1 &lt;script&gt; 2 var data =&lt;?php echo json_encode("42");?&gt;; 3 //Don't forget the extra semicolon! 4 &lt;/script&gt; In sublime, line 2 is indicated as an error. I tried to either put the code in a .js file, or in a .php file with script tag. Both ways give me syntax errors. But it seems that others using this answer don't have this problem. I'm a beginner in web development and this may be some basic thing. But I really appreciate it if someone could help me with this.
has comment: http://stackoverflow.com/comment/42600912
has comment: http://stackoverflow.com/comment/42601228
type: Question
has comment: http://stackoverflow.com/comment/42600949
has comment: http://stackoverflow.com/comment/42602328
has comment: http://stackoverflow.com/comment/42601035
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42601335
type: UnansweredQuestion

http://stackoverflow.com/comment/42627995
type: QuestionComment
comment on: http://stackoverflow.com/q/27055867
has text: can you show how and where you define your methods?
score: 0
type: Comment

http://stackoverflow.com/comment/42565394
score: 0
type: AnswerComment
type: Comment
has text: is slide bar why to use carousel?
comment on: http://stackoverflow.com/a/27020351

http://stackoverflow.com/a/67268371
answers question: http://stackoverflow.com/q/27069823
score: 2
downvote count: 0
has body: Think this approach may be less duplicative. This outputs a full path name in the format: '/Root/Directory/Directory/Directory/...' Where the 'Logger' line is, you have access to the current folder object (callingFolder) so you can insert any action on that folder at this point. function myFunction() { var topFolder = DriveApp.getFolderById("0AMBwhqwkCWBbUk9PVA"); var topPath = "/"; iterateSubFolders(topFolder, topPath); } function iterateSubFolders(callingFolder, callingPath) { var callingFolderName = callingFolder.getName(); var callingFolderFullPath = callingPath + callingFolderName + "/"; Logger.log(callingFolderFullPath); var childSubFolders = callingFolder.getFolders(); while (childSubFolders.hasNext()) { var nextSubFolder = childSubFolders.next(); iterateSubFolders(nextSubFolder, callingFolderFullPath); } }
upvote count: 2
type: Answer

http://stackoverflow.com/q/27085979
score: 0
has title: How to update html page for all viewers?
answer count: 1
has answer: http://stackoverflow.com/a/27086204
has body: Basically I want to update a page with the name of the last person to submit a form. I have the following code but I can only get it to update on one device. When the page is viewed form another device it doesn't have the updated name. &lt;form name="leds" id="ledSend" method="get" target="_blank" action="https://agent.electricimp.com/Fk43xPMkSrWF"&gt; Lamp Control: &lt;input type="radio" name="led" value="0" checked&gt;Off &lt;input type="radio" name="led" value="1"&gt;On&lt;br&gt; How long should the Lights stay on? &lt;input type="text" name="timer" value="10"&gt;seconds&lt;br&gt; Your name? For Our Records &lt;input id="name" type="text" name="user" placeholder="Your name here"&gt;&lt;br&gt; &lt;br&gt; &lt;input type="submit" value="Update!" onclick="updateTable();"/&gt; &lt;/form&gt; &lt;p id="last"&gt;&lt;/p&gt; &lt;script&gt; function updateTable(){ document.getElementById("last").innerHTML =document.forms['leds'].elements[3].value; alert(document.forms['leds'].elements[3].value+", You are about to change the Lights! Beware that there is about a 30 second delay on the live stream."); } &lt;/script&gt; &lt;/html&gt;
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27086204
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42680593

http://stackoverflow.com/a/27098365
accepted answer of: http://stackoverflow.com/q/27098288
has comment: http://stackoverflow.com/comment/42701765
answers question: http://stackoverflow.com/q/27098288
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/42701697
type: Answer
has body: Looks like your dependency injection order is incorrect App.controller("AppCtrl", ["$scope", "FreshlyPressed", "$log", AppCtrl]); change to App.controller("AppCtrl", ["$scope", "$log","FreshlyPressed", AppCtrl]);
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/27128956
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27129719
type: Question
has comment: http://stackoverflow.com/comment/42757183
accepted answer: http://stackoverflow.com/a/27129408
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/27129119
answer count: 3
has body: I would like to remove all non-numeric characters from the user's input in an &lt;input type="number"&gt; element, but I cannot get this to work. I have code that works fine on an &lt;input type="text"&gt; element, but the exact same code is not working when you change text to number. HTML: &lt;input type="text"&gt; &lt;input type="number"&gt; jQuery: // Works $("[type='text']").on("change",function(){ var x = $(this).val(); x = parseInt(x.replace(/\D/g,''),10); if (isNaN(x)) {x = "";} $(this).val(x); }); // Doesn't work $("[type='number']").on("change",function(){ var x = $(this).val(); x = parseInt(x.replace(/\D/g,''),10); if (isNaN(x)) {x = "";} $(this).val(x); }); Fiddle. How do I get this to work? Update: @axlpl's answer below got us to what we needed. I used his code as a starting point and modified it to make sure it worked with Apple's command key and also to allow certain other things to be done in the cell. Fiddle.
has answer: http://stackoverflow.com/a/27129119
has title: Use regex on input type="number" to remove non-numerics
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27129408

http://stackoverflow.com/a/27013708
has comment: http://stackoverflow.com/comment/42553618
type: Answer
answers question: http://stackoverflow.com/q/27013417
score: 0
has body: Loop through json Array like, for(var i=0; i&lt; RelatedTopics.length;i++){ if($.isArray(RelatedTopics[i])){ for(var j=0; j&lt; RelatedTopics[i].Topics.length;j++){ var topics=RelatedTopics[i].Topics[j]; var text = topics.Text; var firsturl = topics.Firsturl; var url = topics.Icon.url; } } } if you want push it an array variable

http://stackoverflow.com/q/27132668
tagged with: anchor
has body: I programmed a website with reverse scrolling using this java script: &lt;script type="text/javascript"&gt; var winHeight = $(window).innerHeight(); $(document).ready(function () { $(".pan").height(winHeight); $("body").height(winHeight*$(".pan").length); }); window.addEventListener('resize', function (event) { $(".pan").height($(window).innerHeight()); }); $(window).on('scroll',function(){ $(".panelCon").css('bottom',$(window).scrollTop()*-1); }); The only problem that exists is that anchors to an id don't work anymore. It simply doesn't jump to the anchorpoint anymore. Are there any suggestions? Here's the website: http://www.kleinlautfestival.ch/index2.html on the top (bottom) of the page, there is a yellow arrow with #down.
has title: anchor vs. javascript reverse scrolling
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: css
score: 2
answer count: 0
upvote count: 2
type: Question

http://stackoverflow.com/a/28270634
score: 1
has body: I figured it out... I forgot to add ClientIDMode="Static" to all TextBoxes, so when the page is loaded the JavaScript doesn't "see" the fields it is looking for. Added that and it worked like a charm.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27053172
downvote count: 0

http://stackoverflow.com/a/27105353
has comment: http://stackoverflow.com/comment/50094047
has comment: http://stackoverflow.com/comment/77122156
type: Answer
has comment: http://stackoverflow.com/comment/50108255
has comment: http://stackoverflow.com/comment/137210867
has comment: http://stackoverflow.com/comment/52268702
has comment: http://stackoverflow.com/comment/65081622
has body: this.setState({ abc.xyz: 'new value' }); syntax is not allowed. You have to pass the whole object. this.setState({abc: {xyz: 'new value'}}); If you have other variables in abc var abc = this.state.abc; abc.xyz = 'new value'; this.setState({abc: abc}); You can have ordinary variables, if they don't rely on this.props and this.state.
downvote count: 1
has comment: http://stackoverflow.com/comment/61476525
has comment: http://stackoverflow.com/comment/50248499
has comment: http://stackoverflow.com/comment/70852145
has comment: http://stackoverflow.com/comment/107546976
answers question: http://stackoverflow.com/q/27105257
has comment: http://stackoverflow.com/comment/42717532
has comment: http://stackoverflow.com/comment/50116540
score: 93
upvote count: 94

http://stackoverflow.com/a/27031821
answers question: http://stackoverflow.com/q/27031769
upvote count: 3
downvote count: 1
type: Answer
score: 2
has body: You should use z-index property of css styles to set the stack order elements. An element with greater z-index is always in front of an element with a lower z-index. In your example: div#a { position: fixed; top: 0; left: 0; width: 300px; height: 100px; background-color: red; z-index: 1; } div#b { position: fixed; top: 0; left: 0; width: 300px; height: 100px; background-color: red; z-index: 2; }

http://stackoverflow.com/q/27014498
has comment: http://stackoverflow.com/comment/42555576
has comment: http://stackoverflow.com/comment/42555014
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42561336
has comment: http://stackoverflow.com/comment/42562888
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42555512
type: Question
has comment: http://stackoverflow.com/comment/42561105
has comment: http://stackoverflow.com/comment/42561088
possible better answer: http://stackoverflow.com/a/27020543
has answer: http://stackoverflow.com/a/27074567
has title: How to check whether the entered mobile is landline or mobile using PhoneFormat.js?
has answer: http://stackoverflow.com/a/27020543
has body: This is my example form. I just have take one text box, where I will enter mobile number and I will choose the country from the drop-box menu, for validating the mobile number with country I have used the http://www.phoneformat.com/. Here they have given one method isValidNumber(phno, country) which validate the phone number with the country (both landline number and mobile number). My requirement is I need to allow only mobile number, for that I have used the getNumberType(phno), but it is not giving any results, can anyone help me how to check whether the entered number is landline or mobile number? Select India Australia China America
tagged with: javascript
has comment: http://stackoverflow.com/comment/42555513
has comment: http://stackoverflow.com/comment/42561370
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42561142
has comment: http://stackoverflow.com/comment/42561181
has comment: http://stackoverflow.com/comment/42555721
favorite count: 0
has comment: http://stackoverflow.com/comment/42554905
has comment: http://stackoverflow.com/comment/42555174
accepted answer: http://stackoverflow.com/a/27074567
has comment: http://stackoverflow.com/comment/42555452
has comment: http://stackoverflow.com/comment/42561269
has comment: http://stackoverflow.com/comment/42555711
has comment: http://stackoverflow.com/comment/42561307

http://stackoverflow.com/comment/42745818
has text: Your fiddle needs to be `head` instead of `onload` what is the exact symptoms?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27122320
score: 0

http://stackoverflow.com/a/27073864
answers question: http://stackoverflow.com/q/27067254
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42719652
upvote count: 1
has body: When you call a function using Dust, the function is invoked with the arguments chunk, context, bodies, params. You can call context.get(name) to search the context stack for your desired variable. { "sayHello": function(chunk, context, bodies, params) { if(context.get("isAwesome")) { return "Hello awesome"; } return "Hello"; }, "names": ["One", "Two", "Three"], "isAwesome": true }
type: Answer
has comment: http://stackoverflow.com/comment/42724207

http://stackoverflow.com/comment/42602499
has text: To me the question seems to be: Should I use ID for styling? The answer being: apply a class instead.
comment on: http://stackoverflow.com/q/27041673
score: 6
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27027492
has comment: http://stackoverflow.com/comment/42578016
has comment: http://stackoverflow.com/comment/42610348
upvote count: 3
has comment: http://stackoverflow.com/comment/42578138
has comment: http://stackoverflow.com/comment/42581776
has comment: http://stackoverflow.com/comment/42578152
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27027004
type: Answer
accepted answer of: http://stackoverflow.com/q/27027004
has body: I'd suggest the following: // collating the 'regions': var regions = ['americas', 'emea', 'apac'], // initialising an array to use, later: foundClasses = []; // iterating over the 'tr' elements, filtering them: $('tr').filter(function () { // using Array.prototype.forEach to filter the classList of the element: foundClasses = Array.prototype.filter.call(this.classList, function (c) { // 'c' is the current class in the classList we're iterating over, // if it's in the array we return that array to the 'foundClasses': if (regions.indexOf(c) > -1) { return c; } }); // we keep the the element in the jQuery collection (of 'tr' elements), // if we have only 1 (or less...) classes found: return foundClasses.length < 2; // removing those 'tr' elements: }).remove(); var regions = ['americas', 'emea', 'apac'], foundClasses = []; $('tr').filter(function () { foundClasses = Array.prototype.filter.call(this.classList, function (c) { if (regions.indexOf(c) > -1) { return c; } }); return foundClasses.length < 2; }).remove(); americas emea apac emea americas apac emea To account for those browsers without access to Array.prototype.filter(), and possibly element.classList: var regions = ['americas', 'emea', 'apac'], classes, foundClasses = []; $('tr').filter(function() { // creating an array by splitting the className property by white-space: classes = this.className.split(/\s+/); // crudely emptying the initialised array: foundClasses = []; // iterating over the array of classes using a for-loop: for (var i = 0, len = classes.length; i < len; i++) { // if the current element in the classes array is in the // foundClasses array: if (regions.indexOf(classes[i]) > -1) { // we push the current class into the foundClasses array: foundClasses.push(classes[i]); } } // as above: return foundClasses.length < 2; }).remove(); var regions = ['americas', 'emea', 'apac'], classes, foundClasses = []; $('tr').filter(function() { classes = this.className.split(/\s+/); foundClasses = []; // crudely …
downvote count: 0
has comment: http://stackoverflow.com/comment/42603141
score: 3
has comment: http://stackoverflow.com/comment/42582002

http://stackoverflow.com/comment/42728958
type: Comment
comment on: http://stackoverflow.com/q/27113024
type: QuestionComment
score: 0
has text: If you align your brackets/parentheses, you'll see the problem

http://stackoverflow.com/comment/42745575
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27122356
has text: @Stefan Hey, I am really appreciate it if you can help me to add bxslider plugin to JSFIDDLE

http://stackoverflow.com/comment/42719062
has text: The customer is writing their own JS? Why?
comment on: http://stackoverflow.com/a/27107984
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42787759
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27145710
has text: just google that that thing

http://stackoverflow.com/q/27028560
tagged with: npm
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42580699
type: Question
has comment: http://stackoverflow.com/comment/42580068
score: 0
has title: Should browserify be in deps or devdeps?
has comment: http://stackoverflow.com/comment/42580208
tagged with: javascript
has body: I have a browserify app and it includes a few transforms. This app might be a top level app or a plugin. I put browserify transforms in deps because the app that require() my plugin might not include these transforms. But should I also put browserfiy in deps? I don't think a server side app would require() a browserify app as npm doesn't support transforms (so the browserify app might need to be pre-compiled before a server app can use it). If a client side app wants to require() my plugin it's most likely a browserify app and already include browserify in its deps or devdeps. So I don't think browserify should be in deps but devdeps but my co-worker says otherwise. Also I always use browserify as a top level app but no experience if it's a plugin. I can't find any relative reference online. If you have experience with browserify app as a plugin that would be great. Thanks
tagged with: browserify
tagged with: node.js
answer count: 0

http://stackoverflow.com/comment/42634544
comment on: http://stackoverflow.com/q/27059937
has text: If you haven't programmatically opened a window, browser security in general won't let you programmatically close it, certainly not without a popup warning to the user.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27109055
has answer: http://stackoverflow.com/a/27109632
has comment: http://stackoverflow.com/comment/42721466
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42721389
possible better answer: http://stackoverflow.com/a/27109109
type: Question
has answer: http://stackoverflow.com/a/27109109
has answer: http://stackoverflow.com/a/27109191
accepted answer: http://stackoverflow.com/a/27109632
has title: Let a link become "active" without class add/remove
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42721645
score: 0
has comment: http://stackoverflow.com/comment/42721208
has body: Is it possible to change a link to "active" without add/removing a class? The problem i´ve got is, that my other script will not work if the "a"-tag will be changed for example to "a.active". So this way works for the link, but not for my other script ;(, because a class will be add and remove. &lt;script&gt; $(function(){ $('.mydiv a').click(function(){ $('.mydiv .active').removeClass('active'); $(this).addClass('active'); }); }); &lt;/script&gt; Can anybody help me? UPDATE 2 Thats the script I work with: http://jsfiddle.net/7n2d4b44/2/
has answer: http://stackoverflow.com/a/27109558

http://stackoverflow.com/comment/42610648
has text: Could you make an image of desired output?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27045420
type: QuestionComment

http://stackoverflow.com/q/27109740
has comment: http://stackoverflow.com/comment/42722783
tagged with: http://stackoverflow.com/tag/html
tagged with: input
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42723112
has comment: http://stackoverflow.com/comment/42723226
has comment: http://stackoverflow.com/comment/42722693
has title: Retrieving HTML Table Values
has answer: http://stackoverflow.com/a/27109939
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27109939
has body: I created a table and borrowed a javascript function from http://www.fourfront.us/blog/store-html-table-data-to-javascript-array to retrieve the contents of the table the way I wanted to. It almost works, but for some reason I cannot access the value that the user inputs. I have made a JS fiddle at http://jsfiddle.net/danielmdavies/4mu80x2L/1/ The code is also posted below. If I use "time_cutoff": $(tr).find('td:eq(2)').html() instead of "time_cutoff": $(tr).find('td:eq(2)').val(), I get the html code that is correct I believe. This is the relevant html code: Cycle Step Mode Time Cutoff Voltage Cutoff Current Cuttoff 1 Galvanostatic Potentiostatic Rest 2 Galvanostatic Potentiostatic Rest 3 Galvanostatic Potentiostatic Rest 4 Galvanostatic Potentiostatic Rest Waiting for Properties to be Confirmed Send the Setup And the Javascript $(document).ready(function () { console.log("ready!"); storeAndShowTableValues(); }); function storeAndShowTableValues() { var TableData; TableData = storeTblValues(); $('#tbTableValuesArray').val('TableData = \n' + print_r(TableData)); } function storeTblValues() { var TableData = new Array(); $('#cycler_table tr').each(function (row, tr) { TableData[row] = { "cyc_mode": $(tr).find('td').eq(1).val(), "time_cutoff": $(tr).find('td:eq(2)').val(), "voltage_cutoff": $(tr).find('td:eq(3)').val(), "current_cutoff": $(tr).find('td:eq(4)').val() } }); TableData.shift(); // first row will be empty - so remove return TableData; } function convertArrayToJSON() { var TableData; TableData = $.toJSON(storeTblValues()); $('#tbConvertToJSON').val('JSON array: \n\n' + TableData.replace(/},/g, "},\n")); } function print_r(arr, level) { var dumped_text = ""; if (!level) level = 0; //The padding given at the beginning of the line. var level_padding = ""; for (var j = 0; j < level + 1; j++) level_padding += " "; if (typeof (arr) == 'object') { //Array/Hashes/Objects for (var item in arr) { var value = arr[item]; if (typeof (value) == 'object') { //If it is an …
tagged with: html-table
score: 0
has comment: http://stackoverflow.com/comment/42723080
answer count: 1

http://stackoverflow.com/comment/42635922
has text: @LinuxNoob1337 Content of `ng-style` attribute is an [Angular expression](https://docs.angularjs.org/guide/expression) that evaluates to an object. This means that the object you provide needs to use valid JavaScript syntax.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27058150
type: Comment

http://stackoverflow.com/comment/42623759
score: 0
type: Comment
type: QuestionComment
has text: I'm sorry if i get it wrong, but I want to pass a date, isn't `parseInt()` or `parseFloat()` will take it wrong way?
comment on: http://stackoverflow.com/q/27053222

http://stackoverflow.com/comment/42754361
score: 0
type: QuestionComment
type: Comment
has text: @DavidThomas: Actually I want to create it inside . I want the content to be added after the line
comment on: http://stackoverflow.com/q/27127087

http://stackoverflow.com/comment/42718587
type: Comment
type: QuestionComment
has text: If current time is higher than time in input box, and you click into text box, datepicker open and it change time to current time. may be geographic issue, you can change value of input box according to your location.
comment on: http://stackoverflow.com/q/27100420
score: 0

http://stackoverflow.com/a/27088925
downvote count: 0
score: 1
type: Answer
upvote count: 1
has body: If you're using modern browsers, this should do the magic: function include(arr,obj) { return (arr.indexOf(obj) != -1); } or in jquery $.inArray(value, array) In response to your comment, check this link, this will also address your problem in the comment.
answers question: http://stackoverflow.com/q/27088876
has comment: http://stackoverflow.com/comment/42690358

http://stackoverflow.com/comment/42778055
score: 2
has text: So your calculator requires more than 1MB of data, includes bootstrap twice and by that overrides the bootstrap styles of the page if its using bootstrap aswell. Look at how other plugins, widgets, libraries etc. do it.
type: QuestionComment
comment on: http://stackoverflow.com/q/27140168
type: Comment

http://stackoverflow.com/a/27106936
type: Answer
has body: I am not sure why you are not using driver.navigate().back(). It's the recommended one. Anyways, below is the way to do in javascript: JavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("window.history.back();"); Note: Might require a sleep time of 2-3 seconds. But, it works, nonetheless.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27104652

http://stackoverflow.com/q/27151023
tagged with: jquery
linked to: http://stackoverflow.com/q/34351044
linked to: http://stackoverflow.com/q/19297520
possible better answer: http://stackoverflow.com/a/27151242
favorite count: 0
has comment: http://stackoverflow.com/comment/42797171
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/43146084
accepted answer: http://stackoverflow.com/a/27151250
has body: I've a few modals build on top of Twitter Bootstrap Modal, each have at least one submit button which is the default action I need to trigger in most cases since the second button is for go back (dismiss the modal), how, on a modal, when I hit enter I can trigger whatever action that submit has? For example right now, as they are button I have something like: $("#btn").on("click", function(e){ e.preventDefault(); // wait... not send form yet, will be a Ajax call }); Any help? Example code? For reference, this is the modal content (I using with Twig as part of a Symfony2 project so don't worry about {{ }}): &lt;div class="modal fade " id="addNorma" tabindex="-1" role="dialog" aria-labelledby="addNorma" aria-hidden="true"&gt; &lt;div class="modal-dialog modal-lg"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;{{ 'boton.cerrar'|trans({}, 'AppBundle') }}&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;{{ 'modal.normas.titulo'|trans({}, 'AppBundle') }}&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;form id="buscadorNorma" method="POST"&gt; &lt;div class="spacer10"&gt;&lt;/div&gt; &lt;div class="row"&gt; &lt;div class="col-md-5 col-lg-5 col-sm-5 col-xs-5"&gt; &lt;label for="codigo_norma"&gt;{{ 'modal.normas.codigo'|trans({}, 'AppBundle') }}&lt;/label&gt; &lt;input type="text" class="form-control" id="codigo_norma" name="codigo_norma" placeholder="{{ 'modal.normas.codigoPlaceholder'|trans({}, 'AppBundle') }}"&gt; &lt;/div&gt; &lt;div class="col-md-5 col-lg-5 col-sm-5 col-xs-5 col-md-offset-2"&gt; &lt;label for="ano_publicacion"&gt;{{ 'modal.normas.anno'|trans({}, 'AppBundle') }}&lt;/label&gt; &lt;input type="text" class="form-control" id="ano_publicacion" name="ano_publicacion" placeholder="{{ 'modal.normas.annoPlaceholder'|trans({}, 'AppBundle') }}"&gt; &lt;/div&gt;…
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27151242
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27151250
has title: Trigger onClick event when Enter keypress in a Twitter Bootstrap Modal
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/100714812
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/24958558

http://stackoverflow.com/q/27102760
has comment: http://stackoverflow.com/comment/42710092
has comment: http://stackoverflow.com/comment/42709863
has comment: http://stackoverflow.com/comment/42710487
has comment: http://stackoverflow.com/comment/42709690
has comment: http://stackoverflow.com/comment/42711136
tagged with: header
tagged with: javascript
type: UnansweredQuestion
has title: PHP reload website once
has comment: http://stackoverflow.com/comment/42709426
has comment: http://stackoverflow.com/comment/42710373
has comment: http://stackoverflow.com/comment/42709855
has comment: http://stackoverflow.com/comment/42710698
has comment: http://stackoverflow.com/comment/42709742
type: Question
has comment: http://stackoverflow.com/comment/42710127
has answer: http://stackoverflow.com/a/27103778
score: 0
answer count: 2
has body: My Code looks like this. fileA.php: Item stored in DB: <?php echo $stored_item; ?> //displays the last selected item Save Save fileB.php: changeItem(); ... //Changes the entries in the database, works correctly header('Location: fileA.php'); Now the entries have been changed in the database, but $stored_item shows the old entry, until i reload the page. Now I would like to know, how I can refresh the fileA.php automatically after the header('Location: fileA.php'); from fileB.php I already tried things like: echo ' '; header("Refresh:0"); But with them the website gets into a infinity-refreshing-loop, also if i use an if-Statement before: if(isset($_POST)){ echo ' '; unset($_POST);}
tagged with: php
has comment: http://stackoverflow.com/comment/42710861
has answer: http://stackoverflow.com/a/27103154
has comment: http://stackoverflow.com/comment/42709402
has comment: http://stackoverflow.com/comment/42709978
tagged with: reload

http://stackoverflow.com/comment/42723542
type: Comment
comment on: http://stackoverflow.com/a/27110304
has text: Very clever use of `reduce`. It's possible, of course, to modify the code so that push is done only if some condition is true, leaving just a single `return prev`, but that's a minor nitpick. )
score: 0
type: AnswerComment

http://stackoverflow.com/a/27087525
score: 2
answers question: http://stackoverflow.com/q/27087499
downvote count: 0
has body: Cancel See documentation.
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27087499

http://stackoverflow.com/comment/42529786
type: QuestionComment
has text: What is the javascript that isn't working for you?
type: Comment
comment on: http://stackoverflow.com/q/26999700
score: 0

http://stackoverflow.com/q/26993756
score: 0
has body: I'm looking at the SonarQube product for use on a project, and we have a historical issue in making sure that all literal strings are pushed out to a resource file ready for internationalization. Does the SonarQube regime include any checks to find literal strings that should be moved to a resource file? Our tech stack is Java and Javascript.
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27012462
tagged with: java
tagged with: sonarqube
type: Question
has title: SonarQube and checking for literal strings
tagged with: javascript

http://stackoverflow.com/a/27555756
has body: I wanted to provide a definitive answer to this question I was also asking myself, so I had a look at the Object.observe spec. Here's what you need to know about what Object.getNotifier(obj).performChange(changeType, changeFn) does: It runs changeFn While changeFn is running, it purposely doesn't notify any observer of the changes that may happen to properties of obj You can make changeFn return an object: obj's observers will be notified with that object's own properties To see for yourself, %NotifierPrototype%.performChange(changeType, changeFn) is what you're looking for in the spec. Applied to your examples, this means these two lead to exactly the same result, while doing things a little differently: Example 1: increment: function(amount) { var notifier = Object.getNotifier(this); notifier.performChange(Thingy.INCREMENT, function() { this.a += amount; this.b += amount; }); notifier.notify({ object: this, type: Thingy.INCREMENT, incremented: amount }); } In this first example: As per performChange()'s behavior, changes to the object's properties inside the callback function will be kept silent Since the callback function returns undefined, performChange() won't notify any observer of anything else However, calling notify() at the end explicitly notifies the appropriate observers with the change record passed Example 2: increment: function(amount) { var notifier = Object.getNotifier(this); notifier.performChange(Thingy.INCREMENT, function() { this.a += amount; this.b += amount; return { incremented: amount }; }); } In this second example: As per performChange()'s behavior, changes to the object's properties inside the callback function will be kept silent Since the callback function returns an object, performChange() will notify the appropriate observers with an object that looks the same as the one resulting from explicitly calling notify() in example 1: { object: Object, type: Thingy.INCREMENT, increment: amount } These two examples should cover most cases wher…
score: 5
has comment: http://stackoverflow.com/comment/44396522
has comment: http://stackoverflow.com/comment/53415745
upvote count: 5
answers question: http://stackoverflow.com/q/27119307
has comment: http://stackoverflow.com/comment/53423307
type: Answer
downvote count: 0

http://stackoverflow.com/a/27127903
has comment: http://stackoverflow.com/comment/42756129
has comment: http://stackoverflow.com/comment/42756507
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42756312
has comment: http://stackoverflow.com/comment/42755281
type: Answer
has comment: http://stackoverflow.com/comment/42756007
has body: The problem as I see it is not the plugin jQuery Maphilight, but with the other one - the jQuery Panzoom, it appears that Internet Explorer versions below v.9 are not supported: Panzoom uses CSS transforms and matrix functions to take advantage of hardware/GPU acceleration in the browser, which means the element can be anything: an image, a video, an iframe, a canvas, text, WHATEVER. And although IE&lt;=8 is not supported, this plugin is future-proof. See here for details - https://github.com/timmywil/jquery.panzoom/blob/master/README.md You say however, that you test with IE 9, how exactly do you perform the tests, is this genuine IE 9 or you run IE 11 in simulated version mode? I can confirm, that jsfiddle code works just fine under IE 9 in simulated mode, EXCEPT the zooming with the mouse wheel, it works only with the buttons Zoom In / Zoom Out.
score: 1
answers question: http://stackoverflow.com/q/27127222
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27127222
has comment: http://stackoverflow.com/comment/42755595
has comment: http://stackoverflow.com/comment/42755386

http://stackoverflow.com/a/27094010
type: Answer
answers question: http://stackoverflow.com/q/27093912
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42695598
has body: Returning inside the then promise method doesn't return any to the caller of getItems (like in any other callback). I suggest you to manage that kind of situation in this way: app.factory('ItemsFactory',function($http){ return { getItems: function() { return $http.get('js/items.json'); } }; }); app.controller('ListCtrl', function($scope, ItemsFactory) { ItemsFactory.getItems().then(function(res){ $scope.items = res.data; }); }); Hope it helps. Dario
upvote count: 1

http://stackoverflow.com/q/27101010
answer count: 1
has comment: http://stackoverflow.com/comment/42706499
has comment: http://stackoverflow.com/comment/42706174
has body: I have used embed src in a part of my project, but when it get loaded in mozilla it asks for plugin does not show any content, while it is smooth in other browsers and display all content of embed. &lt;table width="89%" border="0" align="center" id="activity_gallery" style="background-image:url(images/background/bg2_2.jpg)"&gt; &lt;tr &gt; &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt; &lt;td width=""&gt; &lt;embed src="gallery/activity/trk/trk.html" width="280" height="350"&gt;&lt;br&gt;&lt;/embed&gt; &lt;/td&gt; &lt;td width=""&gt; &lt;embed src="gallery/activity/rope/rope.html" width="280" height="350"&gt;&lt;/embed&gt; &lt;/td&gt; &lt;td width=""&gt; &lt;embed src="gallery/activity/rock/rock.html" width="280" height="350"&gt; &lt;/embed&gt; &lt;/td&gt; &lt;td width=""&gt; &lt;embed src="gallery/activity/group/rock.html" width="280" height="350"&gt;&lt;/embed&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; please suggest me how to make it relax for mozilla and IE both.
has comment: http://stackoverflow.com/comment/42706366
has comment: http://stackoverflow.com/comment/42706217
tagged with: http://stackoverflow.com/tag/html
has title: Why mozilla asks for plugin, on embed html code
tagged with: css
has comment: http://stackoverflow.com/comment/42706240
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42706488
has comment: http://stackoverflow.com/comment/42706208
type: Question
tagged with: javascript
tagged with: mozilla
score: 0
has comment: http://stackoverflow.com/comment/42706418
has answer: http://stackoverflow.com/a/27101162

http://stackoverflow.com/a/27057112
has body: =[A-Za-z0-9] You are not matching the =.Include it in prodcuturl or regex match.
answers question: http://stackoverflow.com/q/27057092
score: 0
type: Answer

http://stackoverflow.com/comment/42794625
type: Comment
comment on: http://stackoverflow.com/a/27149904
has text: I just edited the security to give all users permission to use the map. Did not change much. THough your link solution worked fine! So I will go with it:)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42549813
has text: "SELECT * FROM Dozent;"
comment on: http://stackoverflow.com/q/26995938
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42572288
type: QuestionComment
comment on: http://stackoverflow.com/q/27023655
score: 0
has text: in alert is working fine ..when i am try to display then again i m getting [object object]..can u tell me why this thing happen
type: Comment

http://stackoverflow.com/comment/42752321
has text: The first one to be executed. If the if condition there is true, then it'll be that one, otherwise, the last return will be the one that gets executed. Remember that when a return statement is reached in JS, nothing else below it (inside the function) will be executed.
type: Comment
comment on: http://stackoverflow.com/a/27126199
score: 0
type: AnswerComment

http://stackoverflow.com/a/27104680
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27104615
score: 1
has body: try to remove before adding: $('#ID1').removeClass('circleStatsItemBox orange').addClass('circleStatsItemBox green');
accepted answer of: http://stackoverflow.com/q/27104615
has comment: http://stackoverflow.com/comment/42713336
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27133645
has comment: http://stackoverflow.com/comment/42765858
tagged with: javascript-objects
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42765982
score: 1
has comment: http://stackoverflow.com/comment/42765905
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27133722
accepted answer: http://stackoverflow.com/a/27133722
type: Question
has comment: http://stackoverflow.com/comment/42765926
has title: How can I convert an array of key value pair objects into an associative array in javascript
has body: You guys never let me down and I am kind of in a tight spot on this one, I needed to maintain the order of a java map while converting it into a JSON object, I realized that this was nearly impossible and decided that I would use a JSON array. The only way that this would work for my particular data however was to use a JSON array of JSON objects. so it looks like this: [{"2014-11-18":0},{"2014-11-19":0},{"2014-11-20":0},{"2014-11-21":0},{"2014-11-22":0},{"2014-11-23":0},{"2014-11-24":0}] the code that got me here: public static JSONArray dataGenerationDay(ArrayList&lt;String&gt; comp, int days) { DateTimeFormatter formatter = DateTimeFormat.forPattern("MM-dd-yyyy"); Map&lt;LocalDate, Integer&gt; compMap = new TreeMap&lt;LocalDate, Integer&gt;(); JSONArray orderedJSON = new JSONArray(); //create map of data with date and count for (String date : comp) { DateTime dt = formatter.parseDateTime(date); LocalDate dateTime = new LocalDate(dt); if (!compMap.containsKey(dateTime)) { compMap.put(dateTime, 1); } else { int count = compMap.get(dateTime) + 1; compMap.put(dateTime, count); } } //if there were days missing in the DB create those days and put them in the map //with a zero count if (compMap.size() &lt; days){ LocalDate today = LocalDate.now(); for (int i = 0; i &lt; days; i++){ LocalDate dayCount = today.minusDays(days- i); if (!compMap.containsKey(dayCount)) { compMap.put(dayCount, 0); } } } //json object does not hold order of tree map, create json array //of ?json objects? to maintain order for the graph for (Map.Entry&lt;LocalDate,Integer&gt; entry : compMap.entrySet()){ JSONObject object = new JSONObject(); object.put("" + entry.getKey(), entry.getValue()); orderedJSON.put(object); //test the order of the map for validity System.out.println("Key Value Pair Is: " + entry.getKey() + " : " + entry.getValue()); } //test the order of the array for validity System.out.println("Ordered JSON List: " + orderedJSON.toString()); return orderedJSON; } Hope my code is up to…
upvote count: 1
tagged with: arrays
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42766064
has comment: http://stackoverflow.com/comment/42766273
linked to: http://stackoverflow.com/q/1168807
has comment: http://stackoverflow.com/comment/42766052

http://stackoverflow.com/q/27044742
has comment: http://stackoverflow.com/comment/42611308
answer count: 2
has title: bcrypt compare returning false when password contains numbers
has comment: http://stackoverflow.com/comment/42616425
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/42609245
tagged with: express
favorite count: 0
has answer: http://stackoverflow.com/a/27349477
accepted answer: http://stackoverflow.com/a/27349477
has comment: http://stackoverflow.com/comment/42994914
possible better answer: http://stackoverflow.com/a/27322777
upvote count: 4
tagged with: node.js
has comment: http://stackoverflow.com/comment/42995419
downvote count: 0
has comment: http://stackoverflow.com/comment/42995105
tagged with: bcrypt
has comment: http://stackoverflow.com/comment/42608431
has body: I'm using node-bcrypt along with PostgreSQL (via Sequelizejs to hash and save passwords. The user's password is hashed in a beforeValidate hook like so: beforeValidate: function(user, model, cb) { bcrypt.hash(user.password, 10, function(err, hash) { if ( err ) { throw err; } user.password = hash; cb(null, user); }); } The column on the User model in which the hash is stored is defined as: password: { type: DataTypes.STRING, allowNull: false } When a user is logging in (I'm using Passport for authentication), the function looks like this: passport.use(new LocalStrategy(function(username, password, done) { models.User.find({ username: username }).then(function(retrievedUser) { if ( !_.isEmpty(retrievedUser) ) { retrievedUser.verifyPassword(password, function(err, result) { if ( err || !result ) { return done(null, false, { message: 'Incorrect password.' }); } else { return done(null, retrievedUser); } }); } else { return done(null, false, { message: 'User could not be found at that username.' }); } }).catch(function(err) { return done(err); }); })); Which retrieves the user correctly. And the comparison, defined here on the User model: instanceMethods: { verifyPassword: function(password, cb) { bcrypt.compare(password, this.password, cb); } } The verification passes just fine if the password only contains letters and/or symbols. However, any passwords with numbers never pass the comparison. Any ideas?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27322777
has comment: http://stackoverflow.com/comment/42995412
has comment: http://stackoverflow.com/comment/42611372
type: Question

http://stackoverflow.com/comment/42693001
has text: @Qantas94Heavy yes the second link definitely helps a lot. Thanks! Should I delete this question or something?
type: QuestionComment
comment on: http://stackoverflow.com/q/27085269
score: 0
type: Comment

http://stackoverflow.com/q/27106308
has comment: http://stackoverflow.com/comment/42715942
score: 0
has comment: http://stackoverflow.com/comment/42716249
has comment: http://stackoverflow.com/comment/42716139
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has body: I have two forms with one radio button for each form. How can I fix so that only one radio button can be checked at a time when multiple forms are involved? Here are the essential parts of the two forms: Use form1 Use form2
favorite count: 0
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27106657
accepted answer: http://stackoverflow.com/a/27106657
has title: Allow only one radio button checked in two forms
tagged with: forms
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27000846
has comment: http://stackoverflow.com/comment/42532168
has comment: http://stackoverflow.com/comment/42532666
score: 0
has comment: http://stackoverflow.com/comment/42681162
has body: I think it should be something like: obj.addEventListener("newWord", function(e) {alert(e.detail);}); var wordCreated = Object.create(CustomEvent.prototype, { "newWord": { detail: { word: "hola", translation: "hi", }, bubbles: true, cancelable: true } });
type: Answer
answers question: http://stackoverflow.com/q/27000520
has comment: http://stackoverflow.com/comment/42535162
has comment: http://stackoverflow.com/comment/42681182

http://stackoverflow.com/comment/42760282
type: Comment
has text: I would like the menu to stay open unless you click on another item in the menu and then it closes.
score: 1
comment on: http://stackoverflow.com/a/27130507
type: AnswerComment

http://stackoverflow.com/comment/42683328
score: 0
type: AnswerComment
has text: Your code, based on browser console, contain several syntax errors so it'll be hard to get it to work withouth tidying it up first. Besides I'm not sure what your output should look like but I don't think you need this amount of jQuery to make transition effect, most of it can be probably achieved in css only. In any way if you want to do transition that changes the visual aspect of `#outside` element only, it's easily achievable, but again, you need to be more specific... and cleaner :) [jsfiddle](http://jsfiddle.net/w4xzae4s/5/)
type: Comment
comment on: http://stackoverflow.com/a/27087015

http://stackoverflow.com/a/27087163
score: 105
type: AcceptedAnswer
type: Answer
has body: This should do the magic var date = "03-11-2014"; var newdate = date.split("-").reverse().join("-");
has comment: http://stackoverflow.com/comment/42682674
has comment: http://stackoverflow.com/comment/93301162
downvote count: 1
has comment: http://stackoverflow.com/comment/42682640
accepted answer of: http://stackoverflow.com/q/27087128
upvote count: 106
answers question: http://stackoverflow.com/q/27087128

http://stackoverflow.com/comment/42786685
comment on: http://stackoverflow.com/a/27145293
type: AnswerComment
score: 0
type: Comment
has text: hi, thank you @salman.. but how can i make it work using a classname to target the header i want to sort to? thanks ^_^

http://stackoverflow.com/comment/42588811
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27002377
score: 0
has text: Welcome to StackOverflow! Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not".

http://stackoverflow.com/a/27002654
has body: You need to pass the $index to the delete method and remove that item from data object HTML {{row.ID}} {{row.subject}} {{row.body}} Delete JS $scope.delete = function(deletingId, index){ $http.get("delete.php?id=" + deletingId) .success(function(data){ $scope.data.splice(index, 1); }) } Also Don't do's Use different name for ng-repeat key (Now I changed to row instead of data) Don't empty the attribute href="" becase when you click this entire page may refresh (Now I removed this) Don't use deprecated syntax in PHP. Use PDO istead of mysql_*
has comment: http://stackoverflow.com/comment/42535396
has comment: http://stackoverflow.com/comment/42535351
accepted answer of: http://stackoverflow.com/q/27002494
type: Answer
has comment: http://stackoverflow.com/comment/42535407
has comment: http://stackoverflow.com/comment/42535343
has comment: http://stackoverflow.com/comment/42535176
has comment: http://stackoverflow.com/comment/42535262
has comment: http://stackoverflow.com/comment/53421703
score: 0
answers question: http://stackoverflow.com/q/27002494
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42535398

http://stackoverflow.com/comment/42570187
has text: More discussion of the issue: http://stackoverflow.com/questions/14826783/bootstrap-datepicker-not-responding-in-ie8
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27012315

http://stackoverflow.com/comment/42552402
type: QuestionComment
has text: I've tried to add `needsclick` class to everything, as stated by fastclick documentation, with no luck.
comment on: http://stackoverflow.com/q/27012847
score: 0
type: Comment

http://stackoverflow.com/comment/42684753
comment on: http://stackoverflow.com/q/27088440
score: 0
type: Comment
type: QuestionComment
has text: Yeah I wasn't thinking.

http://stackoverflow.com/a/27047589
has body: To format your date try this: var d = new Date(); var formatD = d.toLocaleFormat("%d.%m.%Y %H:%M (%a)"); Reference: Javascript to convert UTC to local time
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27047264

http://stackoverflow.com/q/27032043
has comment: http://stackoverflow.com/comment/42586037
has comment: http://stackoverflow.com/comment/42585936
has comment: http://stackoverflow.com/comment/42586009
type: UnansweredQuestion
has body: I need to fetch data from ubuntu local text file. I tried with XMLHttpRequest, where readyState is always 1 and Status is always 0. ResponseText is null and statusText is also null. If this doesn't work for local file, what is an alternative for this?? My requirement is to fetch content from the local file and parse it and use it. I even tried AJAX which has same origin policy(this doesn't help me). Please help!!
answer count: 0
score: 0
type: Question
has title: trying to fetch content from local text file XMLHttprequest in Ubuntu
tagged with: javascript
tagged with: jquery
tagged with: ubuntu

http://stackoverflow.com/comment/42738552
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27118291
has text: I didn't find any problem in your code . it working fine.

http://stackoverflow.com/comment/42799964
type: QuestionComment
comment on: http://stackoverflow.com/q/27152631
has text: And where do the strings you're checking come from? Are they already in an array in your code? Are they typed in by the user? Read from a file? Sounds like you know what you want to do - use a loop and regular expressions - so what specifically is stopping you from doing that?
score: 0
type: Comment

http://stackoverflow.com/q/27003898
type: Question
has title: Map function in javascript with splice
has answer: http://stackoverflow.com/a/27004227
has comment: http://stackoverflow.com/comment/42537388
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42537511
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27005019
has comment: http://stackoverflow.com/comment/42537591
has body: Can anyone explain me how does this function return [0,1] when we pass 2,0,1 function processData(input) { var parse_fun = function (s) { return parseInt(s, 10); }; var lines = input.split('\n'); console.log(lines) var T = parse_fun(lines.shift()); console.log(T) var data = lines.splice(0, T).map(parse_fun); console.log(data); } The part which is confusing this line. var data = lines.splice(0, T).map(parse_fun); console.log(data); lines.splice(0,T) returns me [] then how come [].map(parse_fun) return [0,1]
has comment: http://stackoverflow.com/comment/42537369

http://stackoverflow.com/comment/42528642
type: AnswerComment
score: 0
has text: wow, spot on! thanks, still have a lot to learn with angular! :)
type: Comment
comment on: http://stackoverflow.com/a/26997862

http://stackoverflow.com/q/27036492
tagged with: javascript
score: 0
has title: Highcharts - Get and plot data with MySQLi + JSON (step by step)
has answer: http://stackoverflow.com/a/27036732
tagged with: highcharts
answer count: 1
type: UnansweredQuestion
tagged with: mysqli
has comment: http://stackoverflow.com/comment/42601275
tagged with: php
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: I'm tryng to plot a simple series into a pie chart; my data come from an SQL database, and I want to keep the Mysqli query in a separate file (in order to dinamically change my data series if I need). I'll try to describe you step-by-step what I'm doing, asking you to correct me if I'm doing something wrong (I'm a total newbie in Highcharts and javascript...). 1) MySqli query and json_encode: in a PHP file I'm using this code to fetch data and to convert them into JSON format: $query=$mysqli-&gt;query("SELECT nickname, count(nickname) as np FROM rating limit 10"); $rows = array(); while($row = mysqli_fetch_assoc($query)) { $rows[] = $row; } $rowsjson = json_encode($rows, JSON_NUMERIC_CHECK); echo $rowsjson; // I'm using "numeric_check" option to avoid numbers to be formatted as strings 2) Getting data from the external file through $.get: &lt;script src="inc/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $.get("test.php", function(ris) { var result = JSON.parse(ris); var valori_array = []; var nick_array = []; var dati_array = []; for (j = 0; j &lt; 10; j++) { // values_array[j] = parseFloat(result[j].np); // first attempt (getting just numeric data): it works data_array[j] = '["' + result[j].nicktrasf + '", ' + parseFloat(result[j].np) + ']'; // second attempt (getting the whole thing, Nicknames+Numbers array): it doesn't work } Many questions on this part: -Is there a way I can use directly the JSON object, not having to extract single values through the loop? -Is the object in this format [{"nickname":"Name1","np":55},{"nickname":"Name1","np":20}] usable to plot a pie chart which needs data in this other format: [["Name1",55],["Name2",20]]?? 3) Plotting a pie chart using Highcharts: $('#container').highcharts({ title: {text: 'Pie Chart Test'}, series: [{ type: 'pie', name: "test", // data: values_array // It works, It draws a pie without names // data: [["Name1",55],["Name2",20]] // Manually, it works // data: result // It doesn't work, obvoi…
has comment: http://stackoverflow.com/comment/42595001

http://stackoverflow.com/a/27130858
score: 2
has body: This line form.setAttribute("onsubmit","solve()"); isn't doing what you think it does. If it was in the actual html it would work but not now. What it does is just make the attribute appear in the console. The event handler isn't actually being set. Instead do it via onsubmit property or addEventListener form.onsubmit = solve; // now it must work
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27130818
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27130818
type: Answer
has comment: http://stackoverflow.com/comment/42761005

http://stackoverflow.com/a/27157366
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/135167030
downvote count: 0
type: AcceptedAnswer
has body: PIXI.InteractionManager handles mouseover and mouseout events in its update() function. You need to continuously update the renderer each frame in order to get a response from those events var renderer = PIXI.autoDetectRenderer(500, 500, null, true); var stage = new PIXI.Stage(0xFFFFFF); stage.interactive = true; document.getElementById("canvas").appendChild(renderer.view); var rect = new PIXI.Graphics(); rect.lineStyle(1, 0x000); rect.interactive = true; rect.hitArea = new PIXI.Rectangle(0,0, 200, 200); rect.drawRect(0,0, 200,200); rect.click = function(ev) { console.log("clicked"); } rect.mouseover = function(ev) { console.log("over"); } stage.addChild(rect); update(); function update(){ requestAnimFrame(update); renderer.render(stage); }; http://jsfiddle.net/anps0abt/3/
type: Answer
accepted answer of: http://stackoverflow.com/q/27025843
answers question: http://stackoverflow.com/q/27025843

http://stackoverflow.com/q/27105536
has body: Using Tooltipster, I want to populate tooltips with words selected from a English/Thai glossary set up as a js 2D array. The intention is that as an English word is tooltipped it will be used to access and display the paired Thai word(s). All of this is in a modal dialog. Here is the html: &lt;div id="modal_text"&gt; &lt;p id="modal_text01"&gt;The &lt;span class="tooltip"&gt;boy&lt;/span&gt;&amp;#xa0;is&amp;#xa0;&lt;span class="tooltip"&gt;walking&lt;/span&gt;&lt;span&gt;&amp;#xa0;&lt;/span&gt;&lt;span class="tooltip" &gt;home&lt;/span&gt;&lt;/p&gt; here is the js code (the array is set as a global variable) var eng_thai_glossary=[["the","คำนำหน้านามเจาะจง"], ["and","และ"], ... ["dependent","ซึ่งพึ่งพา ผู้อาศัย"]]; jQuery(document).ready(function () { "use strict"; var modalIndex = ""; var ws_dlog = jQuery("div#ws_dialog").dialog({ ... /* dialog setup */ jQuery("span.ws_dialog_icon").on("click",function(evnt) { evnt.stopPropagation(); ws_dlog.dialog("open"); jQuery("#ui-dialog-title-dialog").hide(); jQuery(".ui-dialog-titlebar").removeClass('ui-widget-header'); var elementId = evnt.target.id; modalIndex = elementId.substr(7); var modalId = "modal_text" + modalIndex, modalText = document.getElementById(modalId).innerHTML; var ws_modal_html = '&lt;div class = "ws_dialog_box"&gt;&lt;p class = "ws_dialog_text"&gt;Here is the word in a sentence&lt;/p&gt;&lt;p class="ws_dialog_thai"&gt;คำในประโยค&lt;/p&gt;&lt;p class = "ws_dialog_sentence"&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="fa fa-volume-up fa_volume_ws"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;'; ws_dlog.html(ws_modal_html); jQuery("div.ws_dialog_box p.ws_dialog_sentence").append(modalText); jQuery('span.tooltip').tooltipster({ functionAfter: function(evnt) { var eng_word = jQuery(this).evnt.innerHTML, thai_word = ""; for( var i=0; i&lt;eng_thai_glossary.length; i++) { if(eng_thai_glossary[i][0] === eng_word) { thai_word = eng_thai_glossary[i][1]; return thai_word; } } } }); }); ... /* audio code */ }); Firebug shows the …
score: 0
answer count: 1
tagged with: jquery
tagged with: tooltipster
type: UnansweredQuestion
has title: How to get Tooltipster to access data in a js array
has answer: http://stackoverflow.com/a/27139461
type: Question
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/46123271
comment on: http://stackoverflow.com/a/27054006
type: Comment
has text: thanks for your answer. im trying to do the same thing that 4chan does, just find a thread with embed webms and you will understand my question.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42768948
has text: Is there a problem with the code you have? What is it?
comment on: http://stackoverflow.com/q/27135191
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42750639
has text: This way I can decide when I want to use this pattern, and when not to. Thanks! I also discovered why using prototype is preferable to using this method. In this way, every object has a copy of the function, causing a larger memory footprint. Using prototypes, every object is slimmer. Thanks!
type: AnswerComment
comment on: http://stackoverflow.com/a/27122869
type: Comment
score: 6

http://stackoverflow.com/q/27023201
has comment: http://stackoverflow.com/comment/42570468
has body: i was wondering how to change a picture's size with a dynamic variable, but i cant make it work for some reason. here is my code: i have a variable named picH inside my javascript block: var picH = 2; and then i have my html code which supplies the image with the height property: img src="img/1.png" height="picH" I tried to supply the variable but it doesn't seem to work. the size does change if i enter a number instead.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27023567
score: -3
has comment: http://stackoverflow.com/comment/42571484
has comment: http://stackoverflow.com/comment/42570404
has comment: http://stackoverflow.com/comment/42570681
downvote count: 4
has comment: http://stackoverflow.com/comment/42570389
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/42570491
favorite count: 0
has title: how can i combine javascript variables inside html
has answer: http://stackoverflow.com/a/27023567
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42570459
type: Question
linked to: http://stackoverflow.com/q/1297449
has comment: http://stackoverflow.com/comment/42570518

http://stackoverflow.com/q/27151994
score: 0
possible better answer: http://stackoverflow.com/a/27152188
tagged with: news-ticker
answer count: 3
has answer: http://stackoverflow.com/a/27152595
tagged with: jquery
tagged with: mouseover
type: AnsweredQuestion
has title: Pause Jquery script on mouseover
has answer: http://stackoverflow.com/a/27152244
has answer: http://stackoverflow.com/a/27152188
accepted answer: http://stackoverflow.com/a/27152244
has comment: http://stackoverflow.com/comment/42799639
type: Question
tagged with: ticker
tagged with: javascript
has body: I use this little code snippet for a jquery news ticker: var speed = 5; var items, scroller = $('#scroller'); var width = 0; scroller.children().each(function(){ width += $(this).outerWidth(true); }); scroller.css('width', width); scroll(); function scroll(){ items = scroller.children(); var scrollWidth = items.eq(0).outerWidth(); scroller.animate({'left' : 0 - scrollWidth}, scrollWidth * 100 / speed, 'linear', changeFirst); } function changeFirst(){ scroller.append(items.eq(0).remove()).css('left', 0); scroll(); } I try to pause the script when mouseover. Using stop() function, it works but it loses speed every time I pass my mouse over. I know their is something to do with width / distance / speed but I'm unable to correct it. Here is the full script: http://codepen.io/anon/pen/wBayyz Thank You.

http://stackoverflow.com/comment/42579372
score: 1
comment on: http://stackoverflow.com/q/27028010
has text: @sixfingeredman: Ah, I see what you mean.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27146403
linked to: http://stackoverflow.com/q/704758
type: Question
score: 20
has title: Efficiently get an element's visible area coordinates
linked to: http://stackoverflow.com/q/19669786
tagged with: javascript
tagged with: jquery
has body: StackOverflow is loaded with questions about how to check if an element is really visible in the viewport, but they all seek for a boolean answer. I'm interested in getting the element's actual areas that are visible. function getVisibleAreas(e) { ... return rectangleSet; } Putting it more formally - the visible areas of elements is the set of (preferably non-overlapping) rectangles in CSS coordinates for which elementFromPoint(x, y) will return the element if the point (x, y) is contained in (at least) one of the rectangles in the set. The outcome of calling this function on all DOM elements (including iframes) should be a set of non-overlapping area sets which union is the entire viewport area. My goal is to create some kind of a viewport "dump" data structure, which can efficiently return a single element for a given point in the viewport, and vice versa - for a given element in the dump, it will return the set of visible areas. (The data structure will be passed to a remote client application, so I will not necessarily have access to the actual document when I need to query the viewport structure). Implementation requirements: Obviously, the implementation should consider element's hidden state, z-index, header &amp; footer etc. I am looking for an implementation that works in all common used browsers, especially mobile - Android's Chrome and iOS's Safari. Preferably doesn't use external libraries. Of course, I could be naïve and call elementFromPoint for every discrete point in the viewport, But performance is crucial since I iterate over all of the elements, and will do it quite often. Please direct me as to how I can achieve this goal. Disclaimer: I'm pretty noob to web programming concepts, so I might have used wrong technical terms. Progress: I came up with an implementation. The algorithm is pretty simple: Iterate over all elements, and add their vertical / horizontal lines to a coordinates map (if the coordinate is within the viewport). Call `document.ele…
answer count: 3
tagged with: visibility
upvote count: 21
has comment: http://stackoverflow.com/comment/42788639
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/27263050
tagged with: css
linked to: http://stackoverflow.com/q/19498068
favorite count: 0
has comment: http://stackoverflow.com/comment/42789099
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42789010
has answer: http://stackoverflow.com/a/36669244
has answer: http://stackoverflow.com/a/27360488
has comment: http://stackoverflow.com/comment/42796081
linked to: http://stackoverflow.com/q/24768795
has comment: http://stackoverflow.com/comment/43133255

http://stackoverflow.com/q/27029748
has title: How to get the date/time in a specific timezone?
tagged with: momentjs
has body: I've been using moment.js to work with date/times in javascript. My goal is to determine what time it is in PST regardless of where a user is. I had been using this method: var pstTime = moment().utc().subtract('hours', 7); Which worked up until daylight savings time a few weeks back. Now it is one hour off and causing some problems. Is there a way (either in moment.js or standard JS) to just pull the time for a specific time zone?
type: UnansweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/42582090
type: Question
has comment: http://stackoverflow.com/comment/42582184
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27029859

google-apps-script
tags question: http://stackoverflow.com/q/27042074
tags question: http://stackoverflow.com/q/27052024
tags question: http://stackoverflow.com/q/27059193
tags question: http://stackoverflow.com/q/27145916
tags question: http://stackoverflow.com/q/27067095
tags question: http://stackoverflow.com/q/27133202
tags question: http://stackoverflow.com/q/27075546
tags question: http://stackoverflow.com/q/27128922
tags question: http://stackoverflow.com/q/27026071
tags question: http://stackoverflow.com/q/27001676
type: Tag
tag name: google-apps-script
tags question: http://stackoverflow.com/q/27003467
tags question: http://stackoverflow.com/q/27010119
tags question: http://stackoverflow.com/q/27078975
tags question: http://stackoverflow.com/q/27069823
tags question: http://stackoverflow.com/q/27129973
tags question: http://stackoverflow.com/q/27150751
tags question: http://stackoverflow.com/q/27063220
tags question: http://stackoverflow.com/q/27035972
tags question: http://stackoverflow.com/q/26995478
tags question: http://stackoverflow.com/q/27082885
tags question: http://stackoverflow.com/q/27048463
tags question: http://stackoverflow.com/q/27044520
tags question: http://stackoverflow.com/q/27013143
tags question: http://stackoverflow.com/q/27063246
tags question: http://stackoverflow.com/q/27073383
tags question: http://stackoverflow.com/q/27117422
tags question: http://stackoverflow.com/q/27127191

http://stackoverflow.com/q/27146094
score: 1
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/21988581
type: Question
tagged with: php
has title: umlaut symbol is not accepted in csv
has comment: http://stackoverflow.com/comment/42787820
upvote count: 1
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has body: Using php to i created csv file. we using umlaut symbols in my csv file, is not show correct form in .csv files. I adding spanish text is " DIRECCIÓN ", but i got result like this " DIRECCIÃ“N " $filename = "ConnectionsData.csv"; header('Content-Encoding: UTF-8'); header('Content-type: text/csv; charset=UTF-8'); header("Content-Disposition: attachment; filename=\"$filename\""); //header("Content-Type: text/csv"); $display = fopen("php://output", 'w'); $flag = false; while($row = mysql_fetch_assoc($query_profiler)) { if(!$flag) { // display field/column names as first row if($x==0){ fputcsv($display, str_replace($tab_name, $rep_tab,array_keys($row)), ",", '"'); $flag = true; } } fputcsv($display, array_values(str_replace("&amp;#039;","'",str_replace("~/"," ",$row))), ",", '"'); } fclose($display); }
has comment: http://stackoverflow.com/comment/42787781
has comment: http://stackoverflow.com/comment/42794729
downvote count: 0

http://stackoverflow.com/a/51493084
score: 12
has body: I've just needed a throttle/debounce function for window resize event, and being curious, I also wanted to know what these are and how they work. I've read multiple blog posts and QAs on SO, but they all seem to overcomplicate this, suggest libraries, or just provide descriptions and not simple plain JS implementations. I won't provide a description since it's plentiful. So here's my implementation: function throttle(callback, delay) { var timeoutHandler = null; return function () { if (timeoutHandler == null) { timeoutHandler = setTimeout(function () { callback(); timeoutHandler = null; }, delay); } } } function debounce(callback, delay) { var timeoutHandler = null; return function () { clearTimeout(timeoutHandler); timeoutHandler = setTimeout(function () { callback(); }, delay); } } These might need tweaks (e.g., initially the callback isn't called immediately). See the difference in action (try resizing the window): function throttle(callback, delay) { var timeoutHandler = null; return function () { if (timeoutHandler == null) { timeoutHandler = setTimeout(function () { callback(); timeoutHandler = null; }, delay); } } } function debounce(callback, delay) { var timeoutHandler = null; return function () { clearTimeout(timeoutHandler); timeoutHandler = setTimeout(function () { callback(); }, delay); } } var cellDefault = document.querySelector("#cellDefault div"); var cellThrottle = document.querySelector("#cellThrottle div"); var cellDebounce = document.querySelector("#cellDebounce div"); window.addEventListener("resize", function () { var span = document.createElement("span"); span.innerText = window.innerWidth; cellDefault.appendChild(span); cellDefault.scrollTop = cellDefault.scrollHeight; }); window.addEventListener("resize", throttle(function () { var span = document.createElement("span"); span.innerText = window.innerWidth; cellThrottle.appendChild(span); cellThrottle.scrollTop = cellThrottle.scrollHeight; }, 500)); window.addEventListener("resize", debounce…
type: Answer
has comment: http://stackoverflow.com/comment/91929450
has comment: http://stackoverflow.com/comment/118750520
downvote count: 2
has comment: http://stackoverflow.com/comment/91140347
answers question: http://stackoverflow.com/q/27078285
upvote count: 14
has comment: http://stackoverflow.com/comment/118753393

http://stackoverflow.com/a/26999529
type: Answer
has body: If I understand correctly, you want one console log if the response is 9 - 10 and another if it's 0 - 8. In that case you can use this: { var feedback = Number( prompt("Please rate this game from 1 - 10.")); if (feedback &gt;= 9 &amp;&amp; feedback &lt;= 10) { console.log("Thank you! We should race at the next concert!"); } else if (feedback &lt;=8) { console.log("I'll keep practicing coding and racing."); } }
score: 0
has comment: http://stackoverflow.com/comment/42529360
answers question: http://stackoverflow.com/q/26999419

http://stackoverflow.com/q/27063188
answer count: 2
has answer: http://stackoverflow.com/a/27302600
favorite count: 0
tagged with: screeps
accepted answer: http://stackoverflow.com/a/27063189
type: AnsweredQuestion
score: 3
has title: Game Screeps - Snapshots
downvote count: 0
has body: I'm playing Screeps (http://screeps.com/) Simulation Room mode. I've tested some stuff and I don't want to lose my progress. Can I make snapshots and save my room state on the Simulation Room mode, so I don't have to start all over?
has answer: http://stackoverflow.com/a/27063189
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27302600
upvote count: 3

http://stackoverflow.com/comment/42755043
type: QuestionComment
comment on: http://stackoverflow.com/q/27127758
has text: @hon2a, yeah, I know, but it was an offshoot, and I was trying to be helpful. :-)
score: 0
type: Comment

http://stackoverflow.com/q/27075606
answer count: 1
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has body: I have 5 dropdowns menu for users to select their preferences. All the dropdowns have the same choices. If the user has chosen a value for dropdown 1, that option should not be available for the other dropdowns. And it goes on so, for the last dropdown, there should be 4 unselectable options. It's similar to what is done on this link. But now we have more than 2 dropdowns. (For illustration, I show three dropdowns only) 1 2 3 1 2 3 1 2 3 The below codes works fine for two dropdowns, but not for more than 2. var $select = $("select[id$='go']"); $select.change(function() { $select .not(this) .find('option') .prop('disabled', '') .filter('[value='+this.value+']') .prop('disabled','disabled'); }); $select.eq(0).trigger('change'); I thing to notice is that a user may accidentally clicked for a wrong option for one of the dropdowns, so if the user select again, the original value should be enabled again. Please suggest a way. Thanks in advance.
type: Question
type: AnsweredQuestion
has title: How to prevent duplicate values in multiple dropdowns using jQuery
score: 1
linked to: http://stackoverflow.com/q/10808113
has answer: http://stackoverflow.com/a/27077009
accepted answer: http://stackoverflow.com/a/27077009
upvote count: 1

http://stackoverflow.com/q/27025784
has answer: http://stackoverflow.com/a/27026229
answer count: 1
has comment: http://stackoverflow.com/comment/42575181
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27026229
has comment: http://stackoverflow.com/comment/42575090
has title: How to pass variables to jQuery validation
score: 1
has comment: http://stackoverflow.com/comment/42575322
has body: Building off of this SO question, I'm trying to pass two variables to a custom validator method. Using console.log I can see that the upper & lower ranges are defined in the HTML, but are not being passed correctly to the options, instead I'm getting NaN instead. The problem seems to be that the values of the two text boxes are not defined or set yet (when they're sent in the validation rules below), but are when they arrive to the validator (this is just a guess, and I haven't been able to come up with a method to sniff their values prior to the validation attempt). So if I log them inside the validator method, they show up fine, but if I pass them as variables, they show up as NaN inside the PCBID object (Chrome browser): Object {PCBID: Object} PCBID: Object lower: NaN upper: NaN __proto__: Object __proto__: Object Here's the validator, there are other rules set to prevent anything from integers being entered, so that shouldn't be the problem: //this validator checks to make sure the user has entered the PCBIDs in //the correct order in the range form. $.validator.addMethod("highLowCheck", function (value, element, options) { console.log("Inside highLowCheck validator"); console.log(parseInt($('#pcbid_range_lower').val(),10)); //shows expected values console.log(parseInt($('#pcbid_range_upper').val(),10)); //shows expected values console.log(options.PCBID.upper); //NaN console.log(options.PCBID.lower); //NaN //evaluates to false because NaN is falsey console.log(options.PCBID.upper > options.PCBID.lower); console.log("Done logging"); return options.PCBID.upper > options.PCBID.lower; } ); Here are the variables I'm trying to pass: pcbid_range_upper: { required: true, digits: true, rangelength: [3, 6], highLowCheck: { PCBID: { //this doesn't work lower: parseInt($('#pcbid_range_lower').val(),10), upper: parseInt($('#pcbid_range_upper').val(),10) } }, If I pass in primitive values like this: highLowCheck: { PCBID: { lower: 1000, //works upper: 2000 } }, This method w…
upvote count: 1
tagged with: jquery-validate
type: Question
linked to: http://stackoverflow.com/q/1366858
has comment: http://stackoverflow.com/comment/42575257
has comment: http://stackoverflow.com/comment/42575306
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42578015

http://stackoverflow.com/a/27004385
has body: http://nodejs.org/api/http.html#http_server_timeout server.timeout Number Default = 120000 (2 minutes) The number of milliseconds of inactivity before a socket is presumed to have timed out. Note that the socket timeout logic is set up on connection, so changing this value only affects new connections to the server, not any existing connections. Set to 0 to disable any kind of automatic timeout behavior on incoming connections.
answers question: http://stackoverflow.com/q/27004316
type: Answer
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27004316

http://stackoverflow.com/a/27080092
answers question: http://stackoverflow.com/q/27079986
type: Answer
has comment: http://stackoverflow.com/comment/42669995
has body: Use this var y = x.match(/(red|green)/gi); Answer is y = ["red"]
score: 0

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/26992767
tags question: http://stackoverflow.com/q/27032656
type: Tag

http://stackoverflow.com/comment/42639016
score: 0
type: Comment
has text: Further testing on the Blueimp script: full EXIF data is also successfully extracted using Samsung Galaxy Android phone and a Nokia Windows. Only iphone is the problem. The mystery deepens.
type: QuestionComment
comment on: http://stackoverflow.com/q/27061122

http://stackoverflow.com/comment/42650159
type: QuestionComment
has text: Refer this solution - http://stackoverflow.com/a/1129270/2231822
comment on: http://stackoverflow.com/q/27068443
score: 0
type: Comment

http://stackoverflow.com/comment/42528886
type: QuestionComment
has text: @Sparky Surely, i don't know this plugin :(
comment on: http://stackoverflow.com/q/26999047
score: 0
type: Comment

http://stackoverflow.com/a/27150087
downvote count: 0
type: Answer
score: 1
has body: This is the solution to get the value in javascript . var myvalue = result.akch_chassis[0].akch_sp[0].akch_faulted
answers question: http://stackoverflow.com/q/27149601
upvote count: 1
has comment: http://stackoverflow.com/comment/42797903

http://stackoverflow.com/a/27129199
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/44744335
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27012242
has comment: http://stackoverflow.com/comment/130488629
answers question: http://stackoverflow.com/q/27012242
has comment: http://stackoverflow.com/comment/130488548
has body: We figured out the koala-framework has done an implementation of (de)obfuscating of source maps in PHP. Add koala-framework/sourcemaps as dependency via composer ( https://packagist.org/packages/koala-framework/sourcemaps ) https://github.com/koala-framework/sourcemaps For deobfuscating you are interested in Kwf_SourceMaps_SourceMap(source_map) and getMappings() afterwards.
downvote count: 0
type: Answer

http://stackoverflow.com/q/27036286
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42593259
has answer: http://stackoverflow.com/a/27036353
score: 0
type: Question
has title: javascript - making a setTimeout inside a setTimeout to stop
has answer: http://stackoverflow.com/a/27036380
tagged with: javascript
has body: I have this code - function example() { var i = 0; function add() { i++; } setTimeout(function doSomething() { add(); setTimeout(doSomething, 1000); }, 1000); } Now basically I want by a pressed on a button to make the "setTimeout" to stop - any ideas how may i do that? thanks for any kind of help
has comment: http://stackoverflow.com/comment/42593050
has comment: http://stackoverflow.com/comment/42593090
answer count: 3
has answer: http://stackoverflow.com/a/27036875
tagged with: jquery

http://stackoverflow.com/a/27036353
has body: You need to use clearTimeout: var timer = setTimeout(doSomething, 1000); //store setTimeout in a variable //now when you need clear it: clearTimeout(timer)
score: 0
answers question: http://stackoverflow.com/q/27036286
type: Answer

http://stackoverflow.com/q/27064797
type: Question
type: AnsweredQuestion
has body: I am adding a label before a div on button click like this: $(".deletebutton").before(" "); where .deletebutton is a div. But I see that with multiple clicks multiple labels are added. I want to check if a label exists before the div already. If it does I don't want to add another one. My HTML structure is this: Please suggest [UPDATE] any better solution ? This worked for me if ($(".deletebutton").prev().get(0).tagName != 'LABEL') { $(".deletebutton").before(" "); } else { $(".deletebutton").prev().remove(); $(".deletebutton").before(" "); } what if we want to check for parents: @silentw what if there is a div added each time around .deletebutton ? i used following code but it is not working: var parentTag = $(".ruRemove").parent().get(0).tagName; if (parentTag == 'LI') { $(".ruRemove").wrap(" "); $(".deletebutton").before(" "); } else { var par = $('.deletebutton').parent(); if (par.is('div')) par.remove(); $(".ruRemove").wrap(" "); var prev = $('.deletebutton').prev(); if (prev.is('label')) prev.remove(); $('.deletebutton').before(" "); }
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/27067777
tagged with: jquery
has title: Adding element before div only after checking using jquery
score: 0
has answer: http://stackoverflow.com/a/27064865
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27064865

http://stackoverflow.com/q/27040813
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42600845
downvote count: 1
has comment: http://stackoverflow.com/comment/42601418
type: Question
has comment: http://stackoverflow.com/comment/42628974
has comment: http://stackoverflow.com/comment/42601072
has body: I am getting a json through url and i have parsed it. Resultant json is [{ "id": "675285" ,"t" : "BBG" ,"e" : "ASX" ,"l" : "0.645" ,"l_fix" : "0.645" ,"l_cur" : "A$0.64" ,"s": "0" ,"ltt":"4:10PM GMT+11" ,"lt" : "Nov 20, 4:10PM GMT+11" ,"lt_dts" : "2014-11-20T16:10:58Z" ,"c" : "+0.010" ,"c_fix" : "0.010" ,"cp" : "1.57" ,"cp_fix" : "1.575" ,"ccol" : "chg" ,"pcls_fix" : "0.635" } ,{ "id": "690577" ,"t" : "PBG" ,"e" : "ASX" ,"l" : "0.515" ,"l_fix" : "0.515" ,"l_cur" : "A$0.52" ,"s": "0" ,"ltt":"4:11PM GMT+11" ,"lt" : "Nov 20, 4:11PM GMT+11" ,"lt_dts" : "2014-11-20T16:11:05Z" ,"c" : "0.000" ,"c_fix" : "0.000" ,"cp" : "0.00" ,"cp_fix" : "0.000" ,"ccol" : "chb" ,"pcls_fix" : "0.515" }] Is there anything wrong with this json? I cannot get the length of this json (i.e 2) and having problem in getting value.
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42601326
has title: Length and iterate JSON object
has comment: http://stackoverflow.com/comment/42601385
upvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42600947
favorite count: 0
has comment: http://stackoverflow.com/comment/42600824
has comment: http://stackoverflow.com/comment/42601437
has answer: http://stackoverflow.com/a/27040849
score: -1

http://stackoverflow.com/a/27092754
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27092688
score: 9
answers question: http://stackoverflow.com/q/27092688
type: AcceptedAnswer
upvote count: 9
has body: This is an interesting one. It all boils down to an unfortunate choice of variable name. Unfortunately name is a property of the window object. When you refer to name you are actually referring to window.name, not the array called name. If you rename name to something else, it should work just fine.
type: Answer

http://stackoverflow.com/q/27011696
tagged with: javascript
tagged with: gruntjs
has body: I find there to be a lot of confusion/lack a specific way of handling building with require in grunt. I'm just confused what configuration should go directly in Grunt task options: grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), requirejs: { compile: { options: { baseUrl: './js', mainConfigFile: 'config.js', optimize: 'none', include: ['./main'], out: 'optimized.js' } } } }); And then in config file: ({ appDir: './', baseUrl: './js', dir: './dist', optimize: 'none', optimizeCss: 'standard', removeCombined: true, paths: { jquery: './js/jQuery/jquery', } }) Obviosuly there seems to be some redundancy but that is mostly what I've found. Can someone explain why or if I'm mistaken? Can I place all config in one or the other? I'm only planning on working off of the optimized single file with almond. Also do I only state the initial single point of entry to build the dependency chain from ie my main.js file and any require calls in there or can I state a wildcard list of files that calls modules: include: ['./variousFiles/*.js'] Any and all clarifications of how to best utilize require with Grunt will be appreciated. Thank you!
has title: Requirejs and Grunt: mainConfigFile vs grunt task options
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27018940
tagged with: requirejs
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27018940

http://stackoverflow.com/comment/42634947
comment on: http://stackoverflow.com/a/27059623
score: 0
type: AnswerComment
has text: That's not an issue, I want it to be all public anyway. Although it seems that firebase is also giving `simple user authentication`.. ;)
type: Comment

web-audio-api
tags question: http://stackoverflow.com/q/27070807
type: Tag
tag name: web-audio-api

http://stackoverflow.com/q/27109556
possible better answer: http://stackoverflow.com/a/27109669
has answer: http://stackoverflow.com/a/27110044
type: AnsweredQuestion
has title: JQuery ASP hidden issues
type: Question
answer count: 3
has answer: http://stackoverflow.com/a/27109669
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/25450939
tagged with: asp.net
has body: Depending on the result of a checkbox, I want to hide/reveal a hidden table (hidden from page load), asking for more information. The JQuery and ASP is below, can someone point me in the right direction and let me know what I'm doing wrong with this approach. ASP Table Heading <asp:Table ID="tbl1" runat="server"> <asp:TableHeaderRow> <asp:TableHeaderCell> One </asp:TableHeaderCell> </asp:TableHeaderRow> <asp:TableRow> <asp:TableCell> <asp:CheckBox ID=""Yes" runat="server" Checked="false" Text="Yes" /> <asp:CheckBox ID="No" Text="No" runat="server" Checked="false" /> </asp:TableCell> </asp:TableRow> </asp:Table> <asp:Table ID="tbl2" runat="server" Visible="false"> <asp:TableHeaderRow> <asp:TableHeaderCell> Additional information </asp:TableHeaderCell> </asp:TableHeaderRow> <asp:TableRow> <asp:TableCell><asp:TextBox ID="AddInfo" runat="server" TextMode="MultiLine"></asp:TextBox></asp:TableCell> </asp:TableRow> </asp:Table> JQuery Update 1 As suggested I removed the wrapping function, this still didn't work. Raw HTML Yes No
score: 0
has answer: http://stackoverflow.com/a/27110118
accepted answer: http://stackoverflow.com/a/27110118

http://stackoverflow.com/comment/42638835
has text: thanks, but `without manual converting?`. In their api docs I've found only one reference to coordinate formats - that `geocoder` recognise `+-deg° mm' ss", +-deg° mm' ss"` but looks like returns only in decimal format. https://tech.yandex.ru/maps/doc/geocoder/desc/concepts/input_params-docpage/
type: Comment
comment on: http://stackoverflow.com/a/27062195
score: 0
type: AnswerComment

http://stackoverflow.com/a/27095849
score: 1
has body: To change value reactively you need to have a helper which returns a reactive variable. Template.editorder.helpers({ dateCreated: function() { return Session.get('dateCreated'); } }); And the onDateChanged function will look like this: $('.datepicker').datepicker({ onDateChanged: function(date) { Session.set('dateCreated', date); } });
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27095656
downvote count: 0

http://stackoverflow.com/q/27081957
type: Question
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27082178
has body: I am fairly new to Javascript and I am trying to integrate this Javascript code with HTML. At the moment, when you run the script in the browser, it asks 5 math questions, shows how many you got correct, and then displays 5 alert boxes showing the question, your answer, the correct answer, and whether or not you are correct. Now what I want to do is instead of this information showing up in alert boxes, I want all of the questions to show up in HTML instead. So the output on HTML would look something like THIS. &lt;--- And here is the javascript code I have so far &lt;script&gt; function ask() { var a = Math.floor(Math.random() * 10) + 1; var b = Math.floor(Math.random() * 10) + 1; var op = ["*", "+", "/", "-"][Math.floor(Math.random()*4)]; return { question : "How much is " + a + " " + op + " " + b + "?", ansGiven: prompt("How much is " + a + " " + op + " " + b + "?"), ansCorrect : eval( a + op + b), get isCorrect(){return this.ansGiven == this.ansCorrect} }; } var questions = [ask(), ask(), ask(), ask(), ask()] total = questions.length, correct = questions.filter(function(ans){return ans.isCorrect}).length; window.alert( "You got "+correct+"/"+total+" correctly"); questions.forEach(function(q, i){ alert("Question " +(i+1)+ " : " + q.question + "\nAnswer: " + q.ansGiven + "\nCorrect Answer: " + q.ansCorrect + "\nYou were " + ((q.isCorrect)?"Correct!":"Wrong!")); }); &lt;/script&gt; And you can test out the javascript code HERE I know you probably have to use a form layout. But I'm not sure how to show the same message layouts that appear on the alerts, to show up in the same format, but as a list in html, so it shows all of the questions, not just one at a time. Any help would be much appreciated!
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27082065
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27082033
has title: Javascript and HTML. How to make alerts show up on an HTML form instead alert boxes
has answer: http://stackoverflow.com/a/27082033
accepted answer: http://stackoverflow.com/a/27082178
tagged with: forms

http://stackoverflow.com/comment/42669268
type: Comment
has text: Oh...no...Its still sticked at the same point. I wonder lets try to print some thing before we take control of another window..
comment on: http://stackoverflow.com/a/27064465
type: AnswerComment
score: 0

http://stackoverflow.com/a/27147830
type: Answer
answers question: http://stackoverflow.com/q/27147166
score: 0
has body: Both pattern will essentially produce the same effect and its third party library/framework which adopted this approach to minimize the accidental redifinition of undefined. undefined is a property of the global object, i.e. it is a variable in global scope. The initial value of undefined is the primitive value undefined. Prior to ECMAScript 5/modern browsers anyone could configure/rewrite this variable to any value. This posed a problem with third part libraries/frameworks where undefined = 5;//now undefined is of type number //code inside library (function (arg1){ if(somevar === undefined){//unintentionally it will compare somevar to 5 } })(arg1); Thus to minimize the effect from global variables they adopted below approach (function (arg1, undefined){//since only one param is passed the second param undefined would indeed will be of type undefined if(somevar === undefined){//it will compare somevar to undefined } })(arg1);

http://stackoverflow.com/comment/42627840
type: Comment
score: 1
has text: [here](http://screeps.com/docs/Room.php) under `find(type, [opts])`. Took a bit of searching, not really sure why it's on the room page.
comment on: http://stackoverflow.com/a/27055032
type: AnswerComment

http://stackoverflow.com/comment/42683740
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27087499
has text: Why the heck is this tagged as `jquery`?
score: 0

http://stackoverflow.com/q/27018257
has answer: http://stackoverflow.com/a/27018359
tagged with: mean-stack
tagged with: javascript
has answer: http://stackoverflow.com/a/27042848
answer count: 2
downvote count: 0
has title: Mongo and Node.js: Finding a document by _id using a UUID (GUID)
tagged with: mongodb-query
has comment: http://stackoverflow.com/comment/106527936
favorite count: 0
has comment: http://stackoverflow.com/comment/42563443
upvote count: 2
tagged with: node.js
accepted answer: http://stackoverflow.com/a/27042848
score: 2
type: AnsweredQuestion
has body: I'm developing a restAPI using node.js and i'm trying to query a mongo collection. I can query using strings (for example "companyname") but I need to be able to query the "_id" element in the document. In mongo the _id is currently stored like this (as a GUID): { "_id" : new BinData(3, "MH+t3q6PD0SxVR5z7/pzfw=="), "companyname" : "TestCompany", "databasename" : "TestDataBase", } This is what my current GET method looks like: exports.getBusinessCardData = function(req, res) { var id = req.params.id; //"id" = MH+t3q6PD0SxVR5z7/pzfw== tradeShowAdminDB.collection('clients', function(err, collection) { collection.findOne({'_id': id}, function(err, item) { res.send(item); }); }); }; The "id" coming into the method is Base64 string format ("MH+t3q6PD0SxVR5z7/pzfw==") and using that the query returns nothing (i'm assuming as it's not the correct type/format). My question is how do I get that "id" into the correct format so that I can query mongo using the _id? I've been looking for ages and can't seem to find a solution and the documentation seems very vague on anything that isn't a 24 character hex ObjectId. Any help would be very much appreciated! Additional information: I'm using node v0.10.33 and express v4.x The mongo driver I am using is just the base javascript mongo driver for node. (found here: http://docs.mongodb.org/ecosystem/drivers/node-js/)
type: Question
possible better answer: http://stackoverflow.com/a/27018359
tagged with: mongodb
has comment: http://stackoverflow.com/comment/42561549

http://stackoverflow.com/comment/42537456
has text: I learn something new every time you answer a question! Thanks, Oleg
comment on: http://stackoverflow.com/a/27002151
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27064021
has comment: http://stackoverflow.com/comment/42750248
score: 1
has comment: http://stackoverflow.com/comment/42707922
has body: The problem lies with a misplaced ,. This is your code currently &lt;script type="text/javascript"&gt; $(document).ready(function() { $.fn.fullpage({ anchors: ['home','aboutus','ourblog','yourhost','thecollection','thehouse','exclusivehire',] menu: '.nav', scrollOverflow: true, }); }); &lt;/script&gt; The anchors has an extra , in the [] but there isn't one after to say there are more elements coming. Try this: &lt;script type="text/javascript"&gt; $(document).ready(function() { $.fn.fullpage({ anchors: ['home','aboutus','ourblog','yourhost','thecollection','thehouse','exclusivehire'], menu: '.nav', scrollOverflow: true, }); }); &lt;/script&gt; jQuery Problem Try this: &lt;script type="text/javascript"&gt; jQuery(document).ready(function() { jQuery('#fullpage').fullpage(); jQuery.fn.fullpage({ anchors: ['home','aboutus','ourblog','yourhost','thecollection','thehouse','exclusivehire'], menu: '.nav', scrollOverflow: true, }); }); &lt;/script&gt;
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42703512
has comment: http://stackoverflow.com/comment/42750221
has comment: http://stackoverflow.com/comment/42752911
downvote count: 0
answers question: http://stackoverflow.com/q/27063769
has comment: http://stackoverflow.com/comment/42703515
has comment: http://stackoverflow.com/comment/42749832

http://stackoverflow.com/comment/42535523
comment on: http://stackoverflow.com/q/27002848
has text: In your `stylers: [{hue: hue}, {saturation: -20}],` line in your js you've got an extra comma at the end.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/27147270
has comment: http://stackoverflow.com/comment/42790533
has body: why bother when there is an eazy to use plugin, go with datatables $(function(){ $('#example').DataTable(); }); if you need to sort same data, doing it at client side is more preferable than sorting with ajax call. Datatables will handle it nicely for you. Its installation is pretty basic just follow the instructions in the following page
score: 0
answers question: http://stackoverflow.com/q/27147128
type: Answer
has comment: http://stackoverflow.com/comment/42790957

http://stackoverflow.com/q/27089506
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/27089586
score: 0
answer count: 3
tagged with: web
has answer: http://stackoverflow.com/a/27089648
has title: Javascript repeating function
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27089586
has answer: http://stackoverflow.com/a/27089618
accepted answer: http://stackoverflow.com/a/27089618
has body: recently I've tried to Design a slider Using Javascript and HTML . Here is what I have in HTML : each slide is a division Content For Slider1 Content For Slider2 Content For Slider3 And Here Is JS scripts : function show_slider(){ document.getElementById('slide1').style.display="none"; document.getElementById('slide2').style.display="block"; document.getElementById('slide3').style.display="none"; } function show_slider2(){ document.getElementById('slide1').style.display="none"; document.getElementById('slide2').style.display="none"; document.getElementById('slide3').style.display="block"; } function show_slider3(){ document.getElementById('slide1').style.display="block"; document.getElementById('slide2').style.display="none"; document.getElementById('slide3').style.display="none"; } window.onload = function() { setTimeout(show_slider, 8000); setTimeout(show_slider2, 16000); setTimeout(show_slider3, 24000); } I'm New to JavaScript . This Works for 1 round of 24 seconds and shows each slide for 8 second and in the end shows the first slide . But what I'm looking for is to repeat the whole thing again after round finishes so the slider will continue forever . Can You Please Help Me Out ??! MORE To Say : I'm not sure if I can write window.onload = function() inside another function . but I did something Like below After function show_slider3() : function repeat() { window.onload = function() { setTimeout(show_slider, 8000); setTimeout(show_slider2, 16000); setTimeout(show_slider3, 24000); } } and I added setTimeout(repeat, 25000); to window.onload = function() but it did not help me out . Special Thanks ;

http://stackoverflow.com/q/27093599
has answer: http://stackoverflow.com/a/27093916
has answer: http://stackoverflow.com/a/27093718
type: Question
has answer: http://stackoverflow.com/a/27093864
has comment: http://stackoverflow.com/comment/42693287
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/42693165
favorite count: 0
has comment: http://stackoverflow.com/comment/42693069
tagged with: ajax
has comment: http://stackoverflow.com/comment/42693125
has answer: http://stackoverflow.com/a/27093997
accepted answer: http://stackoverflow.com/a/27093997
possible better answer: http://stackoverflow.com/a/27093916
upvote count: 4
answer count: 4
linked to: http://stackoverflow.com/q/20860207
has title: Should I use angularjs $http service for requests or jquery ajax if possible?
tagged with: angularjs
downvote count: 0
has body: In my project, I use angularjs framework and love using the $http service whenever I make an ajax call. But in parts of the project, where an UI is not directly updated by the ajax call and angularjs bindings are not required, should I use $http service or plain jquery.ajax? More specifically speaking, should I minimize angularjs dependencies in my project where UI is not concerned or tightly wrap the whole project with angular services and directives?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12131659

http://stackoverflow.com/comment/42544392
type: QuestionComment
has text: @RobG. That's not true. I'm using it in my code now and it works perfectly.
comment on: http://stackoverflow.com/q/27007709
score: 0
type: Comment

http://stackoverflow.com/q/27073901
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42659886
has comment: http://stackoverflow.com/comment/42659719
has answer: http://stackoverflow.com/a/27073925
score: 0
has answer: http://stackoverflow.com/a/27074257
type: Question
tagged with: javascript
tagged with: jquery
has body: there is a script I'm trying to use for Blogger. It works when you enter your domain URL into the src, but I'm trying to find a way to do it using hostname to insert the domain. Original script: I also tried document.write: '); Neither of the attempts seem to work. Any ideas on how to do this without manually inserting the domain URL into the script src?
answer count: 3
linked to: http://stackoverflow.com/q/2067472
has title: Run File From Address Using hostname
has answer: http://stackoverflow.com/a/27073993

http://stackoverflow.com/a/27067931
has comment: http://stackoverflow.com/comment/42649162
has comment: http://stackoverflow.com/comment/42649943
downvote count: 1
has comment: http://stackoverflow.com/comment/42649375
has comment: http://stackoverflow.com/comment/42649105
has comment: http://stackoverflow.com/comment/42649572
has body: If you look at html sources (Ctr + Shift + I in Chrome) you can see this element &lt;div class="image-compare-tool ICT-theverge"&gt; &lt;div class="image-compare-images"&gt; &lt;div class="image-compare-bottom"&gt;&lt;img src="http://cdn2.vox-cdn.com/uploads/chorus_asset/file/2455624/khyzyl-saleem-plain-copylow.0.jpg"&gt;&lt;/div&gt; &lt;div class="image-compare-top" style="width: 6.158357771261%; background-image: url(http://cdn0.vox-cdn.com/uploads/chorus_asset/file/2455620/khyzyl-saleem-plain-copylow1.0.jpeg);"&gt;&lt;img src="http://cdn0.vox-cdn.com/uploads/chorus_asset/file/2455620/khyzyl-saleem-plain-copylow1.0.jpeg"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; So here are images! So next you need to look at css. .image-compare-tool { max-width:100%; width:100%; z-index:999; margin:0 auto 1.5em 0; } .image-compare-images { font-size:0; position:relative; height:100%; -ms-touch-action:none; -webkit-touch-callout:none; -webkit-user-select:none; } .image-compare-images:hover { cursor:col-resize; } .image-compare-images img { display:block; height:auto; width:100%; } .image-compare-top,.image-compare-bottom { z-index:0; height:100%; } .image-compare-top { background-size:cover; height:100%; left:0; position:absolute; top:0; width:50%; } .image-compare-top:after { background-color:#fff; content:''; height:50px; left:calc(100%-5px); top:calc(50%-25px); position:absolute; width:10px; } .image-compare-top img { display:none; } .ICT-SBNation .image-compare-top:after { background-color:#c52126; } .ICT-SBNation .image-compare-top:before { background-color:#c52126; content:''; height:100%; left:calc(100%-2.5px); top:0; position:absolute; width:5px; } .ICT-TheVerge .image-compare-top:after { background-color:#fa4b2a; } .ICT-TheVerge .image-compare-top:before { background-color:#fa4b2a; content:''; height:100%; left:calc(100%-2.5px); top:0; position:absolute; width:5px; } .ICT-Polygon .image-compare-top:after { background-color:#ff0052; } .ICT-Polygon .image-compare-top:before…
has comment: http://stackoverflow.com/comment/42649278
type: Answer
has comment: http://stackoverflow.com/comment/42649816
answers question: http://stackoverflow.com/q/27067743
upvote count: 2
score: 1

http://stackoverflow.com/comment/42628572
comment on: http://stackoverflow.com/a/27056275
has text: This is my favorite answer since it fits my needs perfectly, this is my fault and nobody else's however clicking AAACCCBBB should display this same output too, this code does that even without me having to ask. Which is great, but thank you to everyone else too.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27058035
tagged with: backpressure
answer count: 1
tagged with: webrtc
has comment: http://stackoverflow.com/comment/42641619
favorite count: 0
has answer: http://stackoverflow.com/a/27089173
upvote count: 5
type: UnansweredQuestion
downvote count: 0
has title: WebRTC DataChannel flow/control/back-pressure
has body: The RTCDataChannel API does not provide any kind of flow/control or back-pressure, does this mean, that a sender could, theoretically, crash the browser of the receiver ? In my opinion the browser, (Chrome, Firefox, etc. all use SCTP under the hood), reads from the SCTP connection and schedules to run the js-callback consuming the packet. If the event queue cannot not keep up with the sender, the browser basically reads continuously packets while storing the packets in a buffer, which grows indefinitely. So when you connect two browsers, the sender can actually always overwhelm the other one, because there is no barrier like TCP receive windows or something similar. This applies to the websocket api as well. Do I just miss something or are these API just broken ? If I'm right, this would be a severe security issue when talking to unauthenticated browsers (in a torrent scenario for instance).
tagged with: flow-control
type: Question
score: 5
tagged with: websocket
tagged with: javascript
has comment: http://stackoverflow.com/comment/42640277

http://stackoverflow.com/comment/42645051
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27065824
has text: Provide the task description and the code for the merge function.
type: Comment

http://stackoverflow.com/comment/42542318
has text: @Anubhav, fiddle is running the script on page load change the setting to run in the head of the document.
comment on: http://stackoverflow.com/q/27006652
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27089470
score: 0
type: Answer
has body: Since you're not getting a connect error for port 443 (the default for https) from the browser, it looks like it could be a certificate issue. SSL requires the server to have an SSL certificate that allows connecting clients (i.e. browsers) to validate the identity of the server and encrypt data sent over that secure stream. You need to obtain a certificate (if you don't already have one for that machine) from a certificate vendor like Thawte or Verisign, then make sure the web server is configured to use it.
answers question: http://stackoverflow.com/q/27089292

http://stackoverflow.com/a/27014822
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27014664
score: 2
has comment: http://stackoverflow.com/comment/42555378
has comment: http://stackoverflow.com/comment/42565310
has body: PHP doesn't have nested functions, so in your example bar is essentially global. You can achieve what you want by using closures (=anonymous functions), which support binding as of PHP 5.4: class A { function foo() { $bar = function($arg) { echo $this-&gt;baz, $arg; }; $bar-&gt;bindTo($this); $bar("world !"); } protected $baz = "Hello "; } $qux = new A; $qux-&gt;foo(); UPD: however, bindTo($this) doesn't make much sense, because closures automatically inherit this from the context (again, in 5.4). So your example can be simply: function foo() { $bar = function($arg) { echo $this-&gt;baz, $arg; }; $bar("world !"); } UPD2: for php 5.3- this seems to be only possible with an ugly hack like this: class A { function foo() { $me = (object) get_object_vars($this); $bar = function($arg) use($me) { echo $me-&gt;baz, $arg; }; $bar("world !"); } protected $baz = "Hello "; } Here get_object_vars() is used to "publish" protected/private properties to make them accessible within the closure.
has comment: http://stackoverflow.com/comment/42574293
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42586885
has comment: http://stackoverflow.com/comment/42572458
type: Answer
answers question: http://stackoverflow.com/q/27014664
has comment: http://stackoverflow.com/comment/42564857
has comment: http://stackoverflow.com/comment/42590523
has comment: http://stackoverflow.com/comment/42555413

http://stackoverflow.com/q/27128914
has body: I'm reading a csv file, and need to compute two figures from this data using D3.js or normal JavaScript: This might be able to be done in one step, but I've broken it down for the purposes of explanation: Once my data is read in, I need to iterate through each of the columns, labelled "one" to "ten" (the length of this data is an unknown length, so it might go up to twelve or twenty), ...each time multiplying each column which comes after "multiplier" by variable called "multiplier" (in the data, I gave it arbitrary values of 1.5, 1, 0,5 to make reading visually clearer). This gives a new grid of figures from which a maximum score and minimum score of each of these new figures must be calculated for each ID from 1 to n. So each ID will have a max and minimum. I need to know the maximum and minimum of these new scores across the entire data returned as variables. The data is read in: d3.csv("data.csv", function(csv) { var mydata = bars .selectAll("rect") .data(csv) .enter()}; The example data appears as: ID,total,mutiplier,one,two,three,four,five,six,seven,eight,nine,ten 1,16500,1.5,0.362,0.37,0.1,0.101,0.035,0.362,0.37,0.1,0.101,0.035 2,61000,1,0.426,0.382,0.115,0.084,0.053,0.426,0.382,0.115,0.084,0.053 3,48700,1.5,0.156,0.531,0.195,0.399,0.14,0.156,0.149,0.106,0.399,0.14 4,33000,0.5,0.462,0.409,0.149,0.106,0.149,0.106,0.085,0.1,0.106,0.051 5,8000,0.5,0.327,0.316,0.085,0.1,0.085,0.1,0.057,0.245,0.1,0.057 6,12760,1,0.149,0.195,0.057,0.245,0.057,0.245,0.119,0.114,0.245,0.08 This original data cannot be replaced as I reference it later. So from this data, after iterating through all columns, and taking the max and min from each over the whole data --- the minimum is 0.003535 and the maximum is 3.8875575 ...and I need the function to return a var min and var max for next calculation. Hope someone out there can help!
answer count: 1
has answer: http://stackoverflow.com/a/27132781
accepted answer: http://stackoverflow.com/a/27132781
tagged with: d3.js
has title: Calculate Max of Sum Product of D3 array
type: AnsweredQuestion
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/27106509
score: 1
tagged with: mysql
has body: I have an HTML list and I want to change their order with drag and drop and also update in database. But I do not know how it is done. Can you helpl me? I used HTML5sortable plugin, but it does not update in db. Here is my list: &lt;ul class="sortable grid" &gt; &lt;?php $images = get_children(array('post_parent' =&gt; $id, 'post_status' =&gt; 'inherit', 'post_type' =&gt; 'attachment', 'order' =&gt; 'ASC', 'orderby' =&gt; 'menu_order ID')); $i = 0; foreach ($images as $value) { ?&gt; &lt;li style='list-style-type: none' &gt; &lt;img src='&lt;?php echo $value-&gt;guid;?&gt;' width='90' /&gt; &lt;a class='btn btn-danger' href='#' onclick='deletePic(&lt;?php echo $i;?&gt;)'&gt; &lt;i class='icon-trash icon-white'&gt;&lt;/i&gt; Delete &lt;/a&gt; &lt;/li&gt; &lt;?php $i++; } ?&gt; &lt;/ul&gt;
type: Question
has title: Change order of images and update in database
upvote count: 1
has answer: http://stackoverflow.com/a/27106916
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/42716494
downvote count: 0
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/comment/42728204
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65546/discussion-between-greg-and-docodemore).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27107704

http://stackoverflow.com/a/52729481
answers question: http://stackoverflow.com/q/27111342
score: 0
type: Answer

http://stackoverflow.com/comment/42762219
type: Comment
type: QuestionComment
has text: possible duplicate of [Why not use tables for layout in HTML?](http://stackoverflow.com/questions/83073/why-not-use-tables-for-layout-in-html)
comment on: http://stackoverflow.com/q/27131495
score: 0

http://stackoverflow.com/comment/42799370
score: 1
has text: @sємsєм that I have made. So now can you please suggest to send the row id of that checked amount to the server. By row Id meant the id in the database for the respective costs. Thank you
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27152183

http://stackoverflow.com/q/27101588
favorite count: 0
has answer: http://stackoverflow.com/a/27108261
accepted answer: http://stackoverflow.com/a/27108261
possible better answer: http://stackoverflow.com/a/27101645
has comment: http://stackoverflow.com/comment/42707942
tagged with: css
has answer: http://stackoverflow.com/a/27101645
type: AnsweredQuestion
downvote count: 2
upvote count: 1
type: Question
tagged with: jquery-ui-resizable
has title: Resizing one element using jQuery UI changing the position of another
tagged with: jquery-ui
tagged with: javascript
score: -1
has body: I am trying to make resizible and draggable lines out of labels using jQuery UI. The problem is, if I add two labels and try to resize the first label, it changes the position of the second label (but if I resize the second label it does not change the position of the first label). How to prevent labels from changing other label's position while resizing..? HTML: add line JS: function makeline() { $t = $(".dra", "#line").clone(true).draggable().resizable({ handles: "s, n" }); $("#main").append($t); } $("#s").click(function () { makeline(); }); CSS: .dra { display: block; background-color:red; width: 7px; height: 80px; border: 1px solid red; } .hidden { display: none; } #main { border: 1px solid black; width:500px; height: 300px; } UPDATE: Full code in JSFiddle
has comment: http://stackoverflow.com/comment/42719339
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/42718982

http://stackoverflow.com/q/27123895
accepted answer: http://stackoverflow.com/a/27125026
score: 2
has title: which one is best to repeat functions continiously either setInterval or callback function in jquery?
type: AnsweredQuestion
upvote count: 2
linked to: http://stackoverflow.com/q/750486
type: Question
has comment: http://stackoverflow.com/comment/42748702
has comment: http://stackoverflow.com/comment/42748844
has answer: http://stackoverflow.com/a/27125026
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/9319573
has body: Actually in my project I have to reapeat few functions continiously,for that i have to use setinterval or call back.which one is the best way to repeat function either call back or setInterval.lightAnim() same kind of functions i have more than 8.If i use setInterval what will be happened and if use callback what will be happened with respect to browser.which way one is best. 1st way:Using setInterval &lt;script&gt; lightAnim(); setInterval(lightAnim,5000); function lightAnim() { $(".bulb1").fadeIn(1000, function() { $(".bulb2").fadeIn(1000, function() { $(".bulb3").fadeIn(1000, function() { $(".bulb4").fadeIn(1000, function() { $(".bulb5").fadeIn(1000, function() { $(".bulb6").fadeIn(1000); }) }); }); }); }) } &lt;/script&gt; 2nd way:On complete i am calling again &lt;script&gt; lightAnim(); function lightAnim() { $(".bulb1").fadeIn(1000, function() { $(".bulb2").fadeIn(1000, function() { $(".bulb3").fadeIn(1000, function() { $(".bulb4").fadeIn(1000, function() { $(".bulb5").fadeIn(1000, function() { $(".bulb6").fadeIn(1000); lightAnim(); }) }); }); }); }) } &lt;/script&gt;

http://stackoverflow.com/a/27046377
has body: http://jsfiddle.net/16Lj1whL/2/ function addValue(id_name,result) { $s=$('#'+id_name); $s.find('option[value="'+result+'"]').prop('selected',true); $s.trigger("chosen:updated"); }
answers question: http://stackoverflow.com/q/27045021
score: 1
has comment: http://stackoverflow.com/comment/42613883
accepted answer of: http://stackoverflow.com/q/27045021
has comment: http://stackoverflow.com/comment/42613645
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42614123
downvote count: 0

http://stackoverflow.com/comment/42564135
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27019062
has text: thanks a lot i figured out a way to add in Js file. thanks for the hint ;)

http://stackoverflow.com/a/28458254
type: Answer
has body: Just noticed this question from quite awhile ago. In this example, you could just run the animation from the template (see http://jsfiddle.net/w1n3rqvc/5/): &lt;div style="background-color: rgba(0, 128, 0, {{opacity}});width: 100px; height: 100px;"&gt; &lt;/div&gt; &lt;input type="button" value="Click me!" on-click="animate('opacity', 1, { duration: 1000 })"&gt; For more complex uses, you could look at using a custom event or a decorator to separate that code from the controller/view model.
accepted answer of: http://stackoverflow.com/q/27103683
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27103683
score: 0

http://stackoverflow.com/q/27122320
has comment: http://stackoverflow.com/comment/42746116
has comment: http://stackoverflow.com/comment/42752886
has answer: http://stackoverflow.com/a/27122832
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42745818
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Jquery changing table th tag is not working properly
type: UnansweredQuestion
type: Question
has body: I have tried to implement resizable table columns as follow function mousemove(event) { var parent = $element.parent(); var next = parent.next(); var th = parent.parent(); var oldParentWidth = $(parent).width(); var oldNextWidth = $(next).width(); var totalWidth = oldParentWidth + oldNextWidth; var newParentWidth = event.pageX -$(parent).offset().left; if( newParentWidth &gt; totalWidth ) return; if( newParentWidth &gt;= oldParentWidth ) { $(next).css({ width: (totalWidth - newParentWidth) + "px" }); $(parent).css({ width: totalWidth - $(next).width() + "px" }); } else { $(parent).css({ width: newParentWidth + "px" }); $(next).css({ width: (totalWidth - $(parent).width()) + "px" }); } } The working demo is here: http://jsfiddle.net/4kc873ec/3/ When I am trying to resize the width of th its not working properly first time. Then after it is working correctly. After that it is working properly. What am I doing wrong? Thanks in advance.

http://stackoverflow.com/q/27019060
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27019119
has title: What is a constructor function's prototype?
has body: Say, I have a constructor function called MyClass. And I create an object obj out of it. obj inherits from MyClass.prototype. So here is my question: Where is the MyClass.prototype from? Is it just a plain object with a constructor property? Thanks for your answers. // Constructor function MyClass() { } var obj = new MyClass; // object inherits from MyClass.prototype obj.__proto__ == MyClass.prototype; // =&gt; true // MyClass.prototype inherits from Object.prototype MyClass.prototype.__proto__ == Object.prototype; // =&gt; true
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27019203
has answer: http://stackoverflow.com/a/27019203
has answer: http://stackoverflow.com/a/27019119
type: Question
tagged with: javascript

http://stackoverflow.com/comment/42631353
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27058162
has text: Amazing. Thanks man (sorry for the amount of functions I have for password and repeat)
type: AnswerComment

http://stackoverflow.com/a/27086970
answers question: http://stackoverflow.com/q/27085650
has comment: http://stackoverflow.com/comment/42682850
type: Answer
has comment: http://stackoverflow.com/comment/42682414
has comment: http://stackoverflow.com/comment/42682625
has comment: http://stackoverflow.com/comment/42700373
has comment: http://stackoverflow.com/comment/42682691
has body: By comparing a click event's .hostname with location.hostname you can easily check if a link is still local. In the code below I apply a .click event to the class link : Meaning many elements can use the link class to be included in the event handling. I personally find it preferable to use this method as it requires no changes to the main HTML document. That being said, you could always use onclick="function()" and get the same results. $(".link").click( function(e) { if (e.target.hostname === location.hostname) { console.log("going local") return true; } else if (confirm("Do you with to leave this website?")) { console.log("Leaving Website"); return true; } else { console.log("Staying here"); return false; } }); somewebsite.com # (local)
has comment: http://stackoverflow.com/comment/42682605
has comment: http://stackoverflow.com/comment/42682503
has comment: http://stackoverflow.com/comment/42707204
has comment: http://stackoverflow.com/comment/42699772
has comment: http://stackoverflow.com/comment/42705021
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27085650
has comment: http://stackoverflow.com/comment/42698610

http://stackoverflow.com/a/27055091
score: 5
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42626819
answers question: http://stackoverflow.com/q/27054448
upvote count: 5
has body: Generators are not more than syntax sugar for closures, try this: function foo(x) { var step = 0; var y; var z; function next(p) { switch( step++ ) { case 0: return { done:false, value:x + 1 }; break; case 1: y = 2 * p; return { done:false, value:y / 3 }; break; case 2: z = p; return { done:true, value: x + y + z }; break; default: return; } } return {next:next}; } var it = foo( 5 ); console.log( it.next() ); // { value:6, done:false } console.log( it.next( 12 ) ); // { value:8, done:false } console.log( it.next( 13 ) ); // { value:42, done:true }

http://stackoverflow.com/comment/42780902
comment on: http://stackoverflow.com/q/27101658
score: 0
type: QuestionComment
type: Comment
has text: I've used backbone for cordova applications. Just start and post a question when you get stuck. https://github.com/nitinsurana/Backbone-Cordova-Bootstrap-Boilerplate

http://stackoverflow.com/q/26998550
tagged with: html5-canvas
answer count: 1
tagged with: javascript
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has title: HTML5 canvas touch panning/scrolling?
has answer: http://stackoverflow.com/a/27002555
type: UnansweredQuestion
has body: I'm working on my first ever HTML5 canvas project. It presents a grid, for simplicity say the size is 4x4. It must be zoomable, for time being pinch zoom is not needed, it's enough to use zoom in/out buttons. I have it working so that the first zoom in doubles the visible size to 2x2 and next one shows area of 1 square, to the user it seems that the center of the grid does not move while zooming, further zooming is not possible. So I have scale() and translate() under control. Initial view 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 After the first zoom 6 7 10 11 I created buttons to move the visible area fixed amount of pixels using translate(), so basically I only need to listen to correct touch event and do a bit more, right? But regardless whatever I try, I cannot figure out how to do it using touch screen (I'm developing on Android). I've seen many examples, including well known http://phrogz.net/tmp/canvas_zoom_to_cursor.html I would appreciate if someone could point me back to the right direction? Also, currently my "step scrolling" can go over the canvas borders, which would be the correct property to monitor to know the border is near? I'm using pure Javascript, jQuery is used for other parts of the project. I would prefer to stick with those two, this is also a learning project for me. But if nothing else works, I can include another library.
has comment: http://stackoverflow.com/comment/42527551
type: Question
score: 0
tagged with: canvas

http://stackoverflow.com/a/27149804
score: 1
upvote count: 1
downvote count: 0
has body: You have a big mess between native Javascript code and jQuery. Try this solution:
type: Answer
answers question: http://stackoverflow.com/q/27149304

http://stackoverflow.com/comment/42552247
score: 0
type: Comment
type: QuestionComment
has text: Did you want something like this??? http://jsfiddle.net/1torpj4j/1/
comment on: http://stackoverflow.com/q/27012845

response
tags question: http://stackoverflow.com/q/27119687
tag name: response
type: Tag

http://stackoverflow.com/comment/43107789
type: Comment
type: QuestionComment
has text: I'm experiencing this too and used the W3 school example. It'll request my location up to four times, but it's only ever the last input that takes effect. Also wrapped my function in jQuery's `one()` in an attempt to solve the problem.
comment on: http://stackoverflow.com/q/27150465
score: 0

http://stackoverflow.com/a/27123358
answers question: http://stackoverflow.com/q/27123264
has comment: http://stackoverflow.com/comment/42747146
score: 0
has body: If you don't want to mix PHP code with JS code you can run ajax call in javascript to a php function that returns JSON with data you need. End of function in PHP would be something like: exit(json_encode($data)); and in javascript (with jquery): $.post("script.php", {}, function(data) { var configParams = JSON.parse(data); });
type: Answer

http://stackoverflow.com/comment/42530172
has text: So is there a fix. that can be implemented by this solution?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26999990

http://stackoverflow.com/comment/42664598
has text: It says it's not defined.. that's weird
comment on: http://stackoverflow.com/a/27076488
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/27084201
has body: It's the controller's responsibility to determine what view should be presented. I would route the action back to the controller, let it decide what is to be done, and redirect_to the desired view. See http://guides.rubyonrails.org/layouts_and_rendering.html#using-redirect-to for various forms of redirect_to. It provides advice and examples. If you use something like: redirect_to action: :upload With this code, the browser will make a fresh request for the upload page, the code in the upload method will run. This presumes that you have a route set up to support that action. You can use "rake routes" to determine what routes are available. I can help more if you post your controller and your routes. Also post the specific errors you received.
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27072187
downvote count: 0
has comment: http://stackoverflow.com/comment/42909030
has comment: http://stackoverflow.com/comment/42678181
has comment: http://stackoverflow.com/comment/42904560
has comment: http://stackoverflow.com/comment/42677510
type: Answer
has comment: http://stackoverflow.com/comment/42678305

http://stackoverflow.com/q/27135571
has answer: http://stackoverflow.com/a/27135747
tagged with: carousel
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: hyperlink
has body: I need to provide direct links slides in one carousel. I have tried to implement this solution but with no success. I need some URL like: wwww.domain.com/index.html#slide20" to open directly the item slide. I have a carousel with a 59 items, and like to be able to open in any one of them... from a external web page... There is any javascript configuration possible? Should use any of this id tags? &lt;div class="item" id="51" data-id="51" data-slide="51"&gt; ... &lt;/div&gt;
type: Question
answer count: 1
tagged with: javascript
has title: bootstrap carousel - external link to slide item
linked to: http://stackoverflow.com/q/20249841
score: 0

http://stackoverflow.com/comment/42777474
type: Comment
comment on: http://stackoverflow.com/a/27035804
has text: tried to do this and also get the first tab returned, and also the title is not yet, the url and tab id are!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42565133
type: AnswerComment
comment on: http://stackoverflow.com/a/27017121
score: 0
type: Comment
has text: it's working, thanks. But i need to set the property 'multiselects' dynamicly after ItemSelector element was rendered(maybe some method "setMultiselects" or somithing like that)

http://stackoverflow.com/comment/42563465
comment on: http://stackoverflow.com/q/27019247
has text: we can replace the string "test" by a password from the database but now i want just that this works
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27139070
has body: Possibly this might help, there is an javascript error: alet(xmlhttp.status); // you're missing here `r` alert(xmlhttp.status); Secondly, you have to print out some contents from servlet, use PrintWriter for that. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String stdkey=request.getParameter("key"); stdkey="%"+stdkey+"%" ; // test purpose PrintWriter pw = response.getWriter (); pw.print(stdkey); pw.close(); }
has comment: http://stackoverflow.com/comment/42779583
type: Answer
answers question: http://stackoverflow.com/q/27127263
has comment: http://stackoverflow.com/comment/42778429
accepted answer of: http://stackoverflow.com/q/27127263
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42752616
has text: @IsmaelMiguel its a re-implementation of jQuery's animate. In the docs it says its faster than css libraries but it creates css transforms effects so it should rely on css, doesn't it?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27125180
type: Comment

http://stackoverflow.com/comment/42756907
score: 0
type: AnswerComment
type: Comment
has text: no unfortunately there isn't thank you for your answer though.
comment on: http://stackoverflow.com/a/27128546

http://stackoverflow.com/comment/42787274
score: 0
comment on: http://stackoverflow.com/q/27145589
type: Comment
type: QuestionComment
has text: Thanks - added more details including the error message I am getting in Chrome's developer tools.

http://stackoverflow.com/comment/42575725
score: 0
comment on: http://stackoverflow.com/q/27025931
type: QuestionComment
type: Comment
has text: Please advise on how to or refer me to an example online. Thank You

http://stackoverflow.com/q/27105775
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27106250
has title: how to get content of search page of Krugle and open hub
type: AnsweredQuestion
tagged with: code-search-engine
has body: I want to make a tool to analyse the result of code search engine like Krugle or OpenHub. I've tried java and python to get html page of search result: import urllib2 def write_url(url, file_name, if_show): if (url is None) or (file_name is None): return req = urllib2.Request(url) resp = urllib2.urlopen(req) ret = resp.read() fp = open(file_name, "w") fp.write(ret) fp.close() if if_show: print ret if __name__ == "__main__": url_ = "http://www.krugle.org/document/search/#query=socket" file_n = "D:/tmp/test.txt" write_url(url_, file_n, True) print "Done" but I didn't get the content of the result. Part of the page I got is like this: I used chrome to check the result page of a search. It's something like this: ... ... ... ... And in the div.hit, the "..." stands for the content of the result Krugle searched. I'm not sure why there were nothing in the div.hit_list of the returned page I got by my python code. Maybe the content of the result was generated by js. But I don't know how to get it by codes.
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: python
has answer: http://stackoverflow.com/a/27106250

http://stackoverflow.com/comment/44272462
score: 0
type: Comment
type: QuestionComment
has text: No, local is the same issue, and I only need the json back, so I remove the front-end loading, thanks for reply
comment on: http://stackoverflow.com/q/27141711

http://stackoverflow.com/a/27152281
answers question: http://stackoverflow.com/q/27146602
has comment: http://stackoverflow.com/comment/42801810
downvote count: 0
has comment: http://stackoverflow.com/comment/42801212
has comment: http://stackoverflow.com/comment/42800276
has comment: http://stackoverflow.com/comment/42802056
score: 4
has body: Different browsers use different geolocation service providers to get an estimate of your location and that could explain why you're seeing different results with Google Maps. Google Chrome similarly uses Google Location Services. The default geolocation service provider of Firefox is Google Location Services as well. Safari uses Skyhook Wireless's service. Searching on the web, I could not find which specific geolocation service provider IE makes use of but the different results you see between browsers can be attributed to the quality of data provided by the geolocation service provider. So my guess is, you have to wait for the precision of the geolocation calculation in IE to improve as I haven't seen any documented way to change the geolocation service provider that a browser uses. Alternatively, see if Bing Maps works well in IE or try using a commercial IP-based Geolocation detector service like Maxmind to detect coordinates.
type: Answer
upvote count: 4

http://stackoverflow.com/q/27042749
has comment: http://stackoverflow.com/comment/42605422
has title: Anchor scrolling with pure js?
type: Question
linked to: http://stackoverflow.com/q/17733076
tagged with: javascript
has comment: http://stackoverflow.com/comment/42605634
score: 0
has comment: http://stackoverflow.com/comment/42605168
answer count: 0
type: UnansweredQuestion
has body: So all the solutions that I can find use jQuery. I understand it might be easier to use jQuery, but does anyone know of a pure Javascript method of anchor scrolling? Codepen to get started: http://codepen.io/mildrenben/full/Kwwdzb/[1][1] HTML: Section One Section Two Section Three Section Four Section Five SECTION ONE SECTION TWO SECTION THREE SECTION FOUR SECTION FIVE CSS: html, body { width: 100%; height: 100%; } * { margin: 0; font-family: sans-serif; } h1 { margin-bottom: 300px; } nav { width: calc(20% - 60px); height: calc(100% - 60px); background: aquamarine; float: left; padding: 30px; overflow-y: scroll; } nav ul { list-style: none; } nav li { margin: 30px 0; } main { width: calc(80% - 60px); height: calc(100% - 60px); background: darkseagreen; float: left; overflow-y: scroll; padding: 30px; } main p { width: 35%; margin: 10px 0 70px; }

http://stackoverflow.com/q/27110633
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42761955
has comment: http://stackoverflow.com/comment/42728562
has comment: http://stackoverflow.com/comment/42725279
answer count: 0
has comment: http://stackoverflow.com/comment/42725896
has comment: http://stackoverflow.com/comment/42732491
has body: I have an imagemap. On a click a jQuery function is called which evokes several fadeIn(). All this is happening in the Joomla CMS. Locally, and in this JSFiddle it works just fine (to trigger the fadeIn() click on the "¡Tocame!". But on this site http://fonag.org.ec/inicio/link7b the images which are faded in seem to jump. //FADEIN FUNCTION JQUERY $(document).ready(function() { $("#toca").click(function() { $("#step1D").fadeIn(500).delay(2000).fadeOut(500); $("#step2D").delay(2000).fadeIn(500).delay(2000).fadeOut(500); $("#step3D").delay(4000).fadeIn(500).delay(2000).fadeOut(550); $("#step4D").delay(60000).fadeIn(500).delay(2000).fadeOut(500); $("#plato").delay(8000).fadeIn(5000); }); }); .... .....
type: Question
tagged with: content-management-system
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: joomla
has comment: http://stackoverflow.com/comment/42725534
has title: jQuery FadeIn() evokes "jump" of the faded in picture

http://stackoverflow.com/a/27134807
answers question: http://stackoverflow.com/q/27134617
type: Answer
has body: In your .title set height equals to 100vh height: 100vh;
has comment: http://stackoverflow.com/comment/42768119
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/q/26995208
accepted answer: http://stackoverflow.com/a/26995367
type: AnsweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/26995417
upvote count: 1
type: Question
has body: I have got a table with a select option in it. After the select changes, the td's innerHTML should change to the selected value so the select disappears. Value 1 Value 2 So, when I select Value 2, the table should look like this: Value 2 How do I do this. I've tried things like parentNode, parent().. It has to be javascript or jQuery. function update(id, row) { var val = document.activeElement.value; var id = id; var row = row; if (val != '') { $.post('../inc/helikopter_beheer.php', {val: val, id: id, row: row}, function(data) {}); $.post('../inc/gereedstelling_get_info.php', {id: id, rij: row}, function(data) { var result = data.split(","); // this.parents('id').innerHTML = result; $(this).closest("td").html(result[0]); alert(result[0]); }); }; } This is what I got. It's getting some data out of my database, turns it into result and i have to get result in my td instead of the select.
has answer: http://stackoverflow.com/a/26995350
tagged with: javascript
score: -1
tagged with: html-table
answer count: 3
possible better answer: http://stackoverflow.com/a/26995417
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42521065
has title: How to select the td where my active element is in
has comment: http://stackoverflow.com/comment/42520941
has answer: http://stackoverflow.com/a/26995367

http://stackoverflow.com/comment/42625335
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27044933
score: 0
has text: i am also trying that way but enable to show the bars in browser

http://stackoverflow.com/q/27122356
has comment: http://stackoverflow.com/comment/42745575
has comment: http://stackoverflow.com/comment/42745700
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/27124253
has title: BxSlider is working but there is a blank space inside div
favorite count: 0
type: UnansweredQuestion
tagged with: bxslider
tagged with: css
has comment: http://stackoverflow.com/comment/42745726
score: 1
has comment: http://stackoverflow.com/comment/42745776
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42745445
has answer: http://stackoverflow.com/a/42855171
has comment: http://stackoverflow.com/comment/42745524
tagged with: javascript
tagged with: jquery
has body: my bxslider is totally fine but I am not sure why there is a blank space on the right side after image. First of all, I have imported the jquery library files. Secondly, I put a script for .bxslider. The following code are below: $(document).ready(function(){ $('.bxslider').bxSlider({ auto: true, controls:false }); }); Thirdly, I put a code in HTML something like below: Lastly, in CSS. I just put something like this below: .bxslider img { width:100%; } The images resolution is 2000x1000. I tried to make the images width become 100% so it won't leave any blank space on the right side. In conclusion, the sliders are working. But there are a blank space on the right side inside .bxslider. Any ideas? I tried to inspect element and debug, I couldn't figure it out. Here is JSFIDDLE. Thanks!
answer count: 2

http://stackoverflow.com/a/27065548
type: Answer
has body: I'm assuming you want it to animate between the first and last slide, but do not show the slides in between. This allows you to have as many slides as you want (within reason), and still keep the smooth animation effect. To do this you need to hide the slides in between and then animate. Then directly after the animation un-hide all the slides. JSFiddle Demo $(document).ready(function(){ var slides = $('.js-slide'); var i = 0; $('.navigation a.nav-right').click(function(){ i = ++i % slides.length; //if we're going from the last slide to the first, hide all the slides //and re-position the slide-wrapper if (i ==0) { $('.module-body').not(':first').not(':last').css('display','none'); $('.slide-wrapper').css('left', -(slides.eq(-1).position().left)); } $('.slide-wrapper').animate( { 'left' : -(slides.eq(i).position().left) },300, function() { //After we finish animating be sure to show the slides again //you could wrap this in a if statement if you wanted, to only try displaying //the slides if i is 0. Might save a bit, but for the example I didn't bother with //optimizations. $('.module-body').not(':first').not(':last').css('display','block'); }); }); $('.navigation a.nav-prev').click(function(){ i = --i % slides.length; if (i == -1) { $('.module-body').not(':first').not(':last').css('display','none'); $('.slide-wrapper').css('left', -(slides.eq(0).position().left)); } $('.slide-wrapper').animate( { 'left' : -(slides.eq(i).position().left) },300, function() { $('.module-body').not(':first').not(':last').css('display','block'); if (i == -1) { $('.slide-wrapper').css('left', -(slides.eq(-1).position().left)); } }); }); });
score: 0
answers question: http://stackoverflow.com/q/27062104

http://stackoverflow.com/comment/42683628
type: Comment
type: QuestionComment
has text: use $scope.user.username AND $scope.user.password
comment on: http://stackoverflow.com/q/27087902
score: 0

http://stackoverflow.com/comment/42622069
has text: @Mathletics its happening inside of the callback
comment on: http://stackoverflow.com/q/27052322
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42556401
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27014475
has text: as far as I can understand after getting your suggestion is that if we need complex business applications then we should know C and C++ and if we are developing a light weight application with no usage of business functions such as mathematical logics or stuff like that we can go for html5, css3, and javascript. Is that right?
score: 0

http://stackoverflow.com/comment/42663167
has text: Your code doesn't run. I want to enter text into text area, select the row, press button, the text is written to the specified row in html doc. Thanks.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27075973

http://stackoverflow.com/comment/42717447
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27103159
type: Comment
has text: Just a guess: your `ok`button doesn't have a attribute `data-id`, so if you click on it `data-id` must be `undefined`

http://stackoverflow.com/comment/42719923
type: Comment
type: QuestionComment
has text: You really should try to Google this **before** you post a question.
score: 1
comment on: http://stackoverflow.com/q/27108406

http://stackoverflow.com/comment/45896927
type: AnswerComment
comment on: http://stackoverflow.com/a/27148357
has text: Does anyone have an answer to the problem?
type: Comment
score: 0

http-status-code-404
tags question: http://stackoverflow.com/q/27056367
tags question: http://stackoverflow.com/q/27074035
type: Tag
tag name: http-status-code-404

http://stackoverflow.com/comment/42663636
type: QuestionComment
comment on: http://stackoverflow.com/q/27076333
score: 0
has text: I'm loading different html pages into div. and I dont want to load html page to the div if i have already loaded it. so i want to know what is the html page that is already inside div
type: Comment

http://stackoverflow.com/q/26998602
type: Question
has answer: http://stackoverflow.com/a/26999203
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/26999203
tagged with: datatable
has title: Filtering out with Datatable.net
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42528431
has body: I'm trying to filter out some information from my table generated using datatable.net I'm using the following code after the table is initiated: var filteredData = testTable .column( 2 ) .data() .filter( function ( value, index ) { return value = 'Product A' ? true : false; } ); No change is apply to my table nor any js error is flag... Anyone has an idea? Thanks, Crak.
has comment: http://stackoverflow.com/comment/42528237

http://stackoverflow.com/comment/42670327
comment on: http://stackoverflow.com/q/27078976
has text: Please provide a sample of you JSON format in the question.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42604872
comment on: http://stackoverflow.com/q/27042901
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [how to check if the url contains multiple strings. Javascript/jquery](http://stackoverflow.com/questions/11820480/how-to-check-if-the-url-contains-multiple-strings-javascript-jquery)

http://stackoverflow.com/q/26998883
has comment: http://stackoverflow.com/comment/42528164
has comment: http://stackoverflow.com/comment/42528276
has comment: http://stackoverflow.com/comment/42528625
has comment: http://stackoverflow.com/comment/42528438
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42528219
score: 1
has answer: http://stackoverflow.com/a/26999106
has body: I want to get the innermost element on a certain cursor position, i.e.: Text If I point my mouse cursor over the text, I want to retrieve the span tag, not the outermost div which is the default of JavaScript's elementFromPoint(x,y). (if it is of any help: I want to retrieve the element inside a JQuery keydown event handler)
has title: JavaScript or JQuery: get innermost element on position
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42528686
accepted answer: http://stackoverflow.com/a/26999106
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26999313
has answer: http://stackoverflow.com/a/26999313
has answer: http://stackoverflow.com/a/26999523
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42528445

http://stackoverflow.com/comment/44272533
type: QuestionComment
has text: What is in index.ejs?
comment on: http://stackoverflow.com/q/27141711
score: 0
type: Comment

http://stackoverflow.com/q/27136685
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/27136771
favorite count: 0
score: 8
upvote count: 8
possible better answer: http://stackoverflow.com/a/27136963
tagged with: d3.js
has body: I am trying to select all elements with a certain class. They might have different classes before, or after this class, but as long as they have this class they should be selected ex: <g class="classa classb classc"> <g class="classq classr classz"> <g class="classd classb classe"> I wish to select the 1st and 3rd elements, because they have are both under classb. Any suggestions? I thought d3.selectAll(".classb") would work, but it doesn’t.
has answer: http://stackoverflow.com/a/27136963
tagged with: css
type: AnsweredQuestion
has title: d3 select everything with specific CSS class
tagged with: select
has answer: http://stackoverflow.com/a/27136771
type: Question
tagged with: javascript

http://stackoverflow.com/comment/63780145
type: AnswerComment
type: Comment
has text: Same problem when you use ng-annotate, modelSetter does not work for me unless I use a service to share the variable.
comment on: http://stackoverflow.com/a/32529275
score: 0

file
type: Tag
tags question: http://stackoverflow.com/q/26995028
tag name: file
tags question: http://stackoverflow.com/q/27023181
tags question: http://stackoverflow.com/q/27147125
tags question: http://stackoverflow.com/q/26997884
tags question: http://stackoverflow.com/q/27090124
tags question: http://stackoverflow.com/q/27054058
tags question: http://stackoverflow.com/q/27122840
tags question: http://stackoverflow.com/q/27141522

http://stackoverflow.com/q/27007709
has comment: http://stackoverflow.com/comment/42552639
tagged with: validation
favorite count: 0
tagged with: form-submit
has comment: http://stackoverflow.com/comment/42544392
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27007724
has answer: http://stackoverflow.com/a/27007881
has answer: http://stackoverflow.com/a/27007724
score: 1
has comment: http://stackoverflow.com/comment/42543960
has comment: http://stackoverflow.com/comment/42544053
has title: Why is return false not keeping my form from submitting?
upvote count: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: http://jsfiddle.net/1z9Lr5rv/1/ I am creating a contact form for my website. I thought it was working fine, but it always submits the form, wether or not there's an error, where return false should keep the form from submitting. I'm sorry if this is really obvious and dumb, but I'm very new to this sort of thing . . .
accepted answer: http://stackoverflow.com/a/27007881

promise
tags question: http://stackoverflow.com/q/27126745
tags question: http://stackoverflow.com/q/27080653
tags question: http://stackoverflow.com/q/27043459
tags question: http://stackoverflow.com/q/27124110
tags question: http://stackoverflow.com/q/27111917
tags question: http://stackoverflow.com/q/27090589
tags question: http://stackoverflow.com/q/27149034
tag name: promise
tags question: http://stackoverflow.com/q/27109392
tags question: http://stackoverflow.com/q/27129683
type: Tag
tags question: http://stackoverflow.com/q/27048684
tags question: http://stackoverflow.com/q/27017788
tags question: http://stackoverflow.com/q/27045016
tags question: http://stackoverflow.com/q/27081390
tags question: http://stackoverflow.com/q/27044866
tags question: http://stackoverflow.com/q/27041236
tags question: http://stackoverflow.com/q/27093858
tags question: http://stackoverflow.com/q/27094523
tags question: http://stackoverflow.com/q/27028741
tags question: http://stackoverflow.com/q/27026227
tags question: http://stackoverflow.com/q/27142657
tags question: http://stackoverflow.com/q/27007565

http://stackoverflow.com/a/27050279
has comment: http://stackoverflow.com/comment/62786526
has body: The solution given by @MattD seems to work well, alternatively you could overwrite the slide function of the carousel plugin bu using the following code: &lt;script src="js/carousel.js"&gt;&lt;/script&gt; &lt;script&gt; $.fn.carousel.Constructor.prototype.cycle = function (e) { e || (this.paused = false) this.interval &amp;&amp; clearInterval(this.interval) this.options.interval &amp;&amp; !this.paused &amp;&amp; (this.interval = setInterval($.proxy(this.next, this), this.$element.find('.item.active').data('interval') || this.options.interval)) return this } &lt;/script&gt; The above enables you to set the interval per slide leveraging the data-interval attribute as shown below: &lt;div class="item" data-interval="500"&gt;
score: 2
type: Answer
has comment: http://stackoverflow.com/comment/62793116
upvote count: 3
has comment: http://stackoverflow.com/comment/88935930
downvote count: 1
answers question: http://stackoverflow.com/q/27047620

http://stackoverflow.com/comment/42782807
score: 0
has text: Okay. I added whole serverManage.js file
type: Comment
comment on: http://stackoverflow.com/q/27141546
type: QuestionComment

http://stackoverflow.com/comment/42573529
type: QuestionComment
has text: This is definitely not a aggregation pipeline use case.
comment on: http://stackoverflow.com/q/27014819
score: 0
type: Comment

http://stackoverflow.com/q/27087687
type: Question
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/105034
has body: I have a page that I receive donations with on my site. My bank's API requires that I generate a unique order id for each transaction. How can i implement this in my code using javascript? The code I'm using is shown below. Please enter the amount you wish to donate and click on the pay button. Thank you Amount:
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27087719
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27087719
score: 2
upvote count: 2
tagged with: uuid
has title: Generate unique product id
linked to: http://stackoverflow.com/q/105034

http://stackoverflow.com/a/27070364
score: 2
downvote count: 0
has body: Here you're using .val() as setter method and that return the input jQuery object it self. So you can't apply toPrecision() on that. toPrecision applied to Number object. You need to apply toPrecision on convert() returned value. $('.value_psi').val(convert(Number($('.value_psi').val()), "psi", "bar").toPrecision(4));
answers question: http://stackoverflow.com/q/27070309
upvote count: 2
type: Answer

http://stackoverflow.com/comment/42721329
type: AnswerComment
comment on: http://stackoverflow.com/a/27108257
type: Comment
has text: Tried a variant of this and tried again just now; thanks. Same results. is appended to the parent , script loads, but does not 'see' the appended and does not add the button to the site.
score: 0

http://stackoverflow.com/q/27029097
type: Question
tagged with: javascript
answer count: 2
upvote count: 1
has title: Change Element ScrollWidth
tagged with: jquery
has answer: http://stackoverflow.com/a/27029342
has comment: http://stackoverflow.com/comment/42581088
favorite count: 0
linked to: http://stackoverflow.com/q/1608793
has body: I have a case in which I need to change the scrollHeight and scrollWidth of an element. Is there any way that I could set this value? The options below didn't worked I think beacuse these are getters no setters: document.getElementById('test').scrollWidth = 3000; jQuery Way: $('#long')[0].scrollWidth = 2000;
has comment: http://stackoverflow.com/comment/42581262
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/27029203
score: 1

http://stackoverflow.com/comment/42778332
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27138305
score: 0
has text: thank you that part show me the id but in the DB dont save it... I put these code inside of signature.php: `$user_id = (isset($_POST['Data'])) ? $_POST['Data'] : "";` , `$user_id= (isset($_POST['user_id'])) ? $_POST['user_id'] : "";` , `$user_id=$_POST['Data'];` and `$user_id=$_POST['user_id'];` and always save it with `0`..where is the error?

http://stackoverflow.com/comment/42796912
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27149434
has text: awesome. thank you very much. Works like a charm :) Is this fit for the facebook 2015 login changes?
score: 0

http://stackoverflow.com/comment/42812269
type: Comment
comment on: http://stackoverflow.com/a/27141954
score: 0
has text: complete and thorough answer!
type: AnswerComment

http://stackoverflow.com/comment/138629565
comment on: http://stackoverflow.com/a/67783811
score: 0
type: AnswerComment
has text: @jasonseminara My answer was based on certain constraints regarding the backend of the system I was working on having a constantly fluctuating amount of key-value pairs but in hindsight breaking it up into its simple key-value pairs would have been a much better idea. Also, could you explain what you mean by anti-pattern?
type: Comment

http://stackoverflow.com/q/27029306
downvote count: 1
favorite count: 0
has title: Hide single markergroup on mapstart
type: AnsweredQuestion
score: 1
tagged with: toggle
has body: I createt a map wich hide/shows markers by their type on toggle. Now i want to hide a group (type) of marker on mapstart and only show it when a button is clicked. So i want the the group (buche) isn´t shown after map is starting. Hm i dont get it what i am doing wrong.. Anybody a solution? markerGroups = { "buche": [], "birke": [], "erle": [], "haselnuss": [], "rotbuche": [], "weide": [], "tanne": [], "lärche": [], "eibe": [], "walnuss": []}; function createMarker(latlng, name, address, tel, href, image, type) { var marker = new google.maps.Marker({ position: latlng, map: map, icon: images[type], zIndex: Math.round(latlng.lat()*-100000)&lt;&lt;5 }); markerGroups[type].push(marker); for (var i = 0; i &lt; markerGroups[type].length; i++) { var marker = markerGroups["buche"]; marker.setMap(null); } }
type: Question
upvote count: 2
tagged with: google-maps
has answer: http://stackoverflow.com/a/27031371
accepted answer: http://stackoverflow.com/a/27031371
answer count: 1
tagged with: javascript
tagged with: marker
linked to: http://stackoverflow.com/q/27077455
tagged with: types

http://stackoverflow.com/comment/42723076
comment on: http://stackoverflow.com/a/27109808
type: Comment
has text: @sp00m Thanks Sir. just one thing to know, i want to supply a flag as third parameter, depending on that `checkRepeat( 'aaa', 'aa', true)` will return `1` not `2`.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27061480
has body: I have the following regex which I'm applying to multiple url's on my page. (/Services\/(.*?)\/People\/(.*?(?=(\.aspx)))/gi) What I was trying to do was to match and then replace a url structure that looks like the following example: /Services/FoodService/People/JoeBloggs.aspx I have the regex working until the lookahead for the .aspx. So any help in spotting what the error with my lookahead is would be much appreciated! var res = str.match(/Services\/(.*?)\/People\/(.*?(?=(\.aspx)))/gi); I've broken down the bit I'm having problems with below: (.*? (?=(\.aspx))) Any character: .*? As long as the lookahead finds an instance of .aspx I've checked out these posts as well, but I'm still struggling so all help appreciated! Lookahead in JavaScript regex Lookahead in Regex
favorite count: 0
upvote count: 1
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27061539
linked to: http://stackoverflow.com/q/12466262
type: Question
answer count: 1
tagged with: javascript
score: 0
has title: Javascript regex lookahead syntax
has answer: http://stackoverflow.com/a/27061539
tagged with: regex
linked to: http://stackoverflow.com/q/14760355

http://stackoverflow.com/q/27079393
has body: I have such code ajaxButton Now I try to echo the Ajax returned value in php. I try echo json_encode($text); echo $text; echo $_GET['text']; Al are wrong. How to get it in PHP. Thanks
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has title: Pass variable from Ajax to PHP does not work
tagged with: ajax
possible better answer: http://stackoverflow.com/a/27079434
accepted answer: http://stackoverflow.com/a/27079546
has comment: http://stackoverflow.com/comment/42669002
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27079546
has comment: http://stackoverflow.com/comment/42669378
has comment: http://stackoverflow.com/comment/42669078
type: Question
has answer: http://stackoverflow.com/a/27079434

http://stackoverflow.com/q/27006520
answer count: 1
has comment: http://stackoverflow.com/comment/42547642
tagged with: backbone.js
has answer: http://stackoverflow.com/a/27007184
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9981975
linked to: http://stackoverflow.com/q/11359497
tagged with: php
tagged with: authentication
linked to: http://stackoverflow.com/q/5808655
has title: User Login using Backbonejs
type: Question
linked to: http://stackoverflow.com/q/10676714
has body: I am trying to develop an application using Backbonejs and SLIM php framework. Now I need to develop a user login. I read several posts in stackoverflow. Some of them are How can I deny users access to parts of my Backbone App if they have not logged in? Backbone.js Security Backbone.js and user authentication backbone.js + require.js + user authentication backbone.js - handling if a user is logged in or not I would like to know which is the appropriate and secure process/way in this regard ??
linked to: http://stackoverflow.com/q/11031481
tagged with: javascript
has comment: http://stackoverflow.com/comment/42542650
tagged with: slim
score: 0

http://stackoverflow.com/comment/42742395
comment on: http://stackoverflow.com/a/27110802
score: 0
type: AnswerComment
has text: It worked! Found a work around which includes your code snippet also.
type: Comment

http://stackoverflow.com/q/27081317
tagged with: javascript
linked to: http://stackoverflow.com/q/503093
score: 0
answer count: 2
has body: I am invoking a void method by using JQuery ajax call as below: var options = { url: "/Account/Login", data: formvalues, type: "post" }; $.ajax(options).done(function () { // how to redirect the user to home page? }); I want to redirect the user to the home page after he is logged in. Is there a way to accomplish this in jQuery? I tried window.location.replace, but it simply displays the page without maintaining any history as such. Is there any other way to do it?
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27081371
has answer: http://stackoverflow.com/a/27081358
has title: How to redirect to another page after ajax call is finished
type: Question

http://stackoverflow.com/comment/42637182
score: 0
comment on: http://stackoverflow.com/q/27061189
type: Comment
has text: The JSON array is in the question first code line
type: QuestionComment

http://stackoverflow.com/a/27082577
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4
answers question: http://stackoverflow.com/q/27081390
has body: As someone who usually promotes using promises, my suggestion is: Do not use promises here Promises represent one time events. They are an abstraction over values, one a promise changes its state it can no longer be changed. A promise starts off as pending and changes state once to either fulfilled or rejected. You are facing a scenario where you have many users, each user joins and needs to add events, the users might 'go away', your scenario simply doesn't describe the same linear flow promises excel at. Promises are useful for a certain scenario - they are not for every concurrency problem. Using an event-emitter here is perfectly appropriate. Your case (a user joining) does not really represent a resolved proxy operation. The code that "doesn't miss messages" is indeed more correct. If you still choose to use promises here There are a few things you can do: You can use Q's progression events and add a progress handler in the creation phase. Note that Kris (Q's author) has called progression broken, and it is being removed in the next version of Q. I recommend against it. You can wrap the message callback to only fire once a handler has been attached - accumulate items fired with a handler when it is created (in an array) and then trigger them all when the message handler is added (after you resolve, in a .then on the deferred you return.
accepted answer of: http://stackoverflow.com/q/27081390
has comment: http://stackoverflow.com/comment/42676536
upvote count: 4

http://stackoverflow.com/q/27082720
downvote count: 0
has answer: http://stackoverflow.com/a/27116534
favorite count: 0
has title: HTML5: Apply transparency to Canvas after drawing through JavaScript
has body: I'm attempting to draw multiple objects to a canvas element, and then fade them out cleanly. However, when attempting to use globalAlpha to achieve this, you can see pieces of objects that would normally be obscured, as each object becomes individually transparent. To explain: Consider the following code: context.fillStyle="yellow"; context.fillRect(0,0,100,100); context.fillStyle="blue"; context.fillRect(50,50,100,100); This will create an image like this: Y = Yellow, B = Blue Y Y Y Y Y Y Y Y Y Y B B B B Y Y B B B B B B B B B B B B The blue box completely covers the yellow box, as desired. However, when we start to add transparency into the mix: context.globalAlpha=0.5; context.fillStyle="yellow"; context.fillRect(0,0,100,100); context.fillStyle="blue"; context.fillRect(50,50,100,100); We end up with this: Y = Yellow, B = Blue, M = Mix of both Y Y Y Y Y Y Y Y Y Y M M B B Y Y M M B B B B B B B B B B Because the blue rectangle is transparent when it's being drawn, the corner of the yellow box that was previously obscured is now visible. And that's just ugly. Keep in mind: both the canvas that's being faded out and the elements behind it are a complicated, dynamic mess; manually tracking every object that's being drawn and how they overlap would get out of control very quickly, and it's likewise not a viable solution to use a solid-color overlay to "fake" a fade out. While I'm open to using CSS transparency to achieve this if it's really the best way to go, I'm hoping to accomplish this using canvas itself. I've come across canvas pixel manipulation, which might be an option, but I'm concerned I might be overlooking a much simpler, efficient way of handling this. Any ideas?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42674692
score: 2
has comment: http://stackoverflow.com/comment/42674901
upvote count: 2
accepted answer: http://stackoverflow.com/a/27116534
has answer: http://stackoverflow.com/a/27083040
has comment: http://stackoverflow.com/comment/42674711
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27082751
tagged with: javascript
has answer: http://stackoverflow.com/a/27082751
answer count: 3
tagged with: canvas

http://stackoverflow.com/comment/42659108
type: Comment
type: QuestionComment
has text: Have you given the event.stopPropagation() method a look? https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation
score: 1
comment on: http://stackoverflow.com/q/27073568

http://stackoverflow.com/q/27016718
answer count: 2
favorite count: 0
accepted answer: http://stackoverflow.com/a/27017005
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/27016862
downvote count: 0
has answer: http://stackoverflow.com/a/27017005
type: Question
has body: I want to leave a colored div trail without generating divs when the page loads. I want them to be appended when the mouse is over the parent div and position them where the mouse is within it. EDIT: I think I need to be more precise so I posted the code that I want to rewrite. I want it to do the same thing without generating the divs that become colored on mouseover when the page loads but to create a colored div when the mouse is over $(".container") at the current position of the mouse. THANKS! Mention: the script generates lots of divs - it might take a while for the page to load. $(document).ready( function() { var csize = $(".container").width() * $(".container").height(); var space = $(window).width() * $(window).height(); while ( csize * $(".container").length < space) { $("#space").append(" "); }; $(document).on("mousemove", function() { window.color = Math.floor(Math.random()*16777215).toString(16); }); $(".container").on("mouseover", function() { $(this).css("background-color", "#" + window.color); }); }); #space{ width: auto; height: auto; } .container { width: 15px; height: 15px; display: inline-block; float: left; border: none; } JqPractice
has title: How can one append a div exactly in the position where the mouse is over? jQuery
tagged with: javascript
tagged with: jquery
upvote count: 2
possible better answer: http://stackoverflow.com/a/27016862

http://stackoverflow.com/comment/42519444
has text: @ROX the unbind will be only for the pressed button, not both of them.
comment on: http://stackoverflow.com/q/26994274
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42596660
has text: @Uooo Thanks, have read up on EL now. It is not available to me. So no.
comment on: http://stackoverflow.com/q/27037972
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27084695
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27084486
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/27084486
has comment: http://stackoverflow.com/comment/42678398
type: Answer
has body: jQuery's wrap method clones the element. The following uses a cloned version of the container element: $(this.element).wrap(this.container) // `this.container` is cloned first When you try to apply the styles after the fact, those styles are applied to the non-cloned version that wasn't attached to the DOM. You can fix this by adding the styles prior to wrapping the element: container.css({"position": "relative", "overflow": "hidden", "backgroundColor": "#CCC"}); $(this.element).wrap(this.container) Also note that calling remove doesn't remove anything because only the cloned container was attached to the DOM. Instead clean it up by setting it to null. container = null; Here is a JSFiddle: http://jsfiddle.net/0db32Lzh/
score: 1

http://stackoverflow.com/q/27086829
type: UnansweredQuestion
has title: remember menu state vertical multilevel navigation
has body: I've tried to make a vertical multilevel navigation, but I can't seem to intergrate a code in order to make the last menu state be remembered when a new page is loaded. I've searched for options using hash location, and I tried using cookies, I just don't know how to include it into my excisting code. Well, I would like some help with this. You can see the menu here: http://blendit3d.nl/index_animatie.html Thnx Sandra $(document).ready(function() { $('.sub').hide(); $('.nav &gt; li &gt; a').click(function(e) { // if new link is opened: //function setCookie (GetElementById){ // document.cookie = cname + "=" + cvalue + "; " + expires; //} e.preventDefault(); $('.sub:visible').slideUp('slow'); $('.subsub').hide(); $('.open').removeClass('open'); $(this).parent().addClass('open').next().slideDown(400).not(':animated'); return false; }); $('.subsub').hide(); $('.sub li a').click(function() { $('.subsub:visible').slideUp('300'); $('.opensub').removeClass('opensub'); $(this).parent().addClass('opensub').next().slideDown('slow'); return false; }); });
tagged with: state
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27086857
type: Question
tagged with: menu
has comment: http://stackoverflow.com/comment/42682019
score: 0
tagged with: javascript

http://stackoverflow.com/comment/42593676
type: QuestionComment
has text: @Omar No, `changeHash` is enabled by default and I am not changing this in my code anywhere. I have updated my question to show the `addthis_share` variable that I set on page load. This shows the unshortened URL (before it goes to Bit.ly). This is the URL that I want to update and have AddThis recognise it, but it doesn't appear to be recognised when I use the `addthis.update` call above.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27023280

http://stackoverflow.com/q/27129788
has title: Show/Hide wordpress submenu
upvote count: 3
tagged with: wordpress
accepted answer: http://stackoverflow.com/a/27130507
has comment: http://stackoverflow.com/comment/42759116
answer count: 1
has comment: http://stackoverflow.com/comment/42760201
has comment: http://stackoverflow.com/comment/42759810
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27130507
has body: I am having some difficulty swapping the behaviour of my Wordpress menu. I am looking for it show when clicked and not when hovering: &lt;nav&gt; &lt;ul&gt; &lt;li&gt; &lt;?php wp_nav_menu( array( 'theme_location' =&gt; 'header-menu' ) ); ?&gt; &lt;li&gt; &lt;br /&gt; &lt;form method="get" id="search_form" action="&lt;?php bloginfo('home'); ?&gt;"&gt; &lt;input type="text" class="text searchForm" name="s" value="Search" &gt; &lt;/form&gt; &lt;/ul&gt; &lt;/nav&gt; jQuery(document).ready(function ($) { $(".sub-menu").hide(); $(".current_page_item .sub-menu").show(); $("li.menu-item").click(function () { // mouse CLICK instead of hover $(".sub-menu").hide(); // First hide any open menu items $(this).find(".sub-menu").show(); // display child }); }); When I change it to toggle it kills off the other links in the menu. I am not sure what the issue is here...
has comment: http://stackoverflow.com/comment/42759314
type: Question
score: 3

http://stackoverflow.com/a/29305074
score: 0
type: Answer
has body: You have three options in Javascript: //slice //syntax: string.slice(start [, stop]) "Good news, everyone!".slice(5,9); // extracts 'news' //substring //syntax: string.substring(start [, stop]) "Good news, everyone!".substring(5,9); // extracts 'news' //substr //syntax: string.substr(start [, length]) "Good news, everyone!".substr(5,4); // extracts 'news'
answers question: http://stackoverflow.com/q/27006765

http://stackoverflow.com/comment/42764007
score: 0
has text: sorry, by 'sound' I mean that it works as expected?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27132108

http://stackoverflow.com/q/27141103
favorite count: 0
has title: Slash escape in javascript
has answer: http://stackoverflow.com/a/27141171
has comment: http://stackoverflow.com/comment/42779602
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/42779624
type: Question
tagged with: escaping
has body: function slashEscape(strVar){ var retVal = strVar; retVal = retVal.replace(/\\/g,"\\\\"); return retVal; } I use that function to escape the slashes in a certain string. But the result is not right. var str = slashEscape("\t \n \s"); It will result to "s" instead of "\t \n \s"
score: 3
possible better answer: http://stackoverflow.com/a/27141171
accepted answer: http://stackoverflow.com/a/27141148
tagged with: slash
upvote count: 3
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27141148

http://stackoverflow.com/comment/101252519
has text: Works on Angular 8 and Net Core 2.2!
type: Comment
comment on: http://stackoverflow.com/a/41697301
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42628892
comment on: http://stackoverflow.com/q/27056629
score: 0
type: Comment
type: QuestionComment
has text: try with this post:http://stackoverflow.com/questions/1458724/how-to-set-unset-cookie-with-jquery

http://stackoverflow.com/comment/42772126
type: Comment
has text: @user2295265, what is happening? Are you getting any errors in your javascript console?
comment on: http://stackoverflow.com/a/27132706
score: 0
type: AnswerComment

http://stackoverflow.com/a/27411973
answers question: http://stackoverflow.com/q/27032207
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27032207
has body: So it seems like I was suffering from an intersection of issues. Using Karma the version of Jasmine it is based off uses Jasmine 1.x while the documentation page was 2.x My needs really revolved around the andCallThrough() Code relevant to 1.x spyOn(amplify, 'publish').andCallThrough(); spyOn(amplify, 'request'); viewModel.save(); expect(amplify.publish.calls[0].args).toEqual(['event-1']); expect(amplify.publish.calls[1].args).toEqual(['event-2']); expect(amplify.request.mostRecentCall.args[0].resourceId) .toEqual('my-resource-id-value'); Code relevant 2.x (untested) spyOn(amplify, 'publish').and.callThrough(); spyOn(amplify, 'request'); viewModel.save(); expect(amplify.publish.calls.argsFor(0)).toEqual(['event-1']); expect(amplify.publish.calls.argsFor(1)).toEqual(['event-2']); expect(amplify.request.calls.mostRecent().args[0].resourceId) .toEqual('my-resource-id-value');

http://stackoverflow.com/q/27110714
has comment: http://stackoverflow.com/comment/42729827
tagged with: ember.js
tagged with: ember-cli
type: UnansweredQuestion
has title: Uncaught Error: Could not find module ember-radio-button/components/radio-button
has body: Have added ember-radio-button to my project in ember-cli version: 0.1.2 node: 0.10.24 npm: 2.1.3 Works fine until I build in production mode. Then in the console I get : Uncaught Error: Could not find module ember-radio-button/components/radio-button Using the install instructions from ember-radio-button I did: npm install ember-radio-button --save-dev I notice that it doesn't end up in the bower_components folder. And bower has never heard of it. Not sure how to get it in there or what to put in the brocfile.js Any suggestions please? Thanks Vida
type: Question
has answer: http://stackoverflow.com/a/27113656
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42793048
type: Comment
comment on: http://stackoverflow.com/a/27066391
type: AnswerComment
has text: This works, thank you so much! Very clear explanation.
score: 0

http://stackoverflow.com/comment/42732159
type: Comment
comment on: http://stackoverflow.com/q/27114170
has text: I'm unsure why you can't use the [existing ng-minlength and ng-maxlength](https://docs.angularjs.org/api/ng/directive/input). I see that @Avraam seems to agree. Is there some reason why that won't work?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42798189
score: 2
has text: Why calculate the total cost in js unless you use it for display? You are just going to have to recalculate on the server side anyway to validate that the sum of items is correct. You should never trust client side input.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27151749

http://stackoverflow.com/comment/42706604
score: 0
type: Comment
type: QuestionComment
has text: I tested your link and it's still broken: you can test it with e.g. "Google Nexus 7 2" as the device. (iOS is detected by chosen and the native functionality is used ([see Github](https://github.com/harvesthq/chosen/pull/1388))
comment on: http://stackoverflow.com/q/27012847

http://stackoverflow.com/q/27141217
type: Question
has answer: http://stackoverflow.com/a/27141234
has answer: http://stackoverflow.com/a/27141274
has answer: http://stackoverflow.com/a/27141385
tagged with: javascript
tagged with: jquery
has title: How to optimize or make this dynamic (html javascript)
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27141385
has body: i'm still new in html javascript. I want to ask can i use for loop to optimize or make this dynamic var port = []; port[0]=$('#slcPort_0').val(); port[1]=$('#slcPort_1').val(); port[2]=$('#slcPort_2').val(); port[3]=$('#slcPort_3').val(); port[4]=$('#slcPort_4').val(); i used this code in function to retrieve data from html form thanks
upvote count: 1
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/27141234

http://stackoverflow.com/a/27033939
type: Answer
answers question: http://stackoverflow.com/q/27033903
score: 7
upvote count: 7
downvote count: 0
has body: Add overflow-x: hidden; to the Parent element.

wordpress
tags question: http://stackoverflow.com/q/27045536
tags question: http://stackoverflow.com/q/27129788
tags question: http://stackoverflow.com/q/27062769
tags question: http://stackoverflow.com/q/27006119
tags question: http://stackoverflow.com/q/27071799
tags question: http://stackoverflow.com/q/27074898
tags question: http://stackoverflow.com/q/27084980
tags question: http://stackoverflow.com/q/27042924
tags question: http://stackoverflow.com/q/27055423
tags question: http://stackoverflow.com/q/27084091
tags question: http://stackoverflow.com/q/26997757
tags question: http://stackoverflow.com/q/27081795
tags question: http://stackoverflow.com/q/26993788
tags question: http://stackoverflow.com/q/27040639
tags question: http://stackoverflow.com/q/27018416
tags question: http://stackoverflow.com/q/27063769
tags question: http://stackoverflow.com/q/27130771
tags question: http://stackoverflow.com/q/27127030
tags question: http://stackoverflow.com/q/27126390
tag name: wordpress
tags question: http://stackoverflow.com/q/26999651
tags question: http://stackoverflow.com/q/27143369
tags question: http://stackoverflow.com/q/27017402
tags question: http://stackoverflow.com/q/27086653
tags question: http://stackoverflow.com/q/27138050
tags question: http://stackoverflow.com/q/26994228
tags question: http://stackoverflow.com/q/27001518
tags question: http://stackoverflow.com/q/27131853
tags question: http://stackoverflow.com/q/27129927
tags question: http://stackoverflow.com/q/27137381
tags question: http://stackoverflow.com/q/27116762
tags question: http://stackoverflow.com/q/27063479
tags question: http://stackoverflow.com/q/27135191
tags question: http://stackoverflow.com/q/27069512
tags question: http://stackoverflow.com/q/26998145
type: Tag

http://stackoverflow.com/comment/42635636
has text: Well maybe you can paste your JS aswell then.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27060337
type: AnswerComment

http://stackoverflow.com/comment/42768310
has text: changing the following: 1) "if (document.getElementById('img1').src=a[0])" to "if (document.getElementById('img1').src==a[0])" 2) "else if (document.getElementById('img1').src=a[1])" to "else if (document.getElementById('img1').src==a[1])" 3) "else if (document.getElementById('img1').src=a[2])" to "else if (document.getElementById('img1').src==a[2])" actually makes things worse. After these changes I can't even switch from "1.jpg" to "2.jpg" Maybe the editor is bugged?? –
comment on: http://stackoverflow.com/a/27134652
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42769628
score: 1
has text: While this code snippet may solve the question, [including an explanation](http://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion.
type: AnswerComment
comment on: http://stackoverflow.com/a/27135216
type: Comment

http://stackoverflow.com/q/27024648
score: 0
has comment: http://stackoverflow.com/comment/42598317
tagged with: highcharts
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
tagged with: coldfusion
answer count: 0
has comment: http://stackoverflow.com/comment/42597142
has body: I'm trying to get a highcharts exported SVG into a Coldfusion . So far I have: Exported the SVG as text from highcharts Put the text into a hidden field in a form Submitted the form to a further Coldfusion page Dumped the form value into the page This works well and displays the SVG as an image but only when the 'page' isn't being rendered as a cfdocument. As soon as I add the tags around the HTML the image disappears and is replaced by a portion of the file in text. Selected code: Highcharts -> SVG -> form field var resultsChart = $('#chart_container').highcharts(); chartSvg = resultsChart.getSVG(); $('#chartSvg').val( chartSvg ); Form field -> HTML #FORM.chartSvg# When wrapped in <cfdocument pagetype="a4" format="pdf" margintop="1" marginbottom="1" marginleft="1" marginright="1" unit="cm"> Doesn't work but is fine in plain .cfm page rendered in the browser. There may be multiple things wrong here so any help is good !
has comment: http://stackoverflow.com/comment/42589683
type: Question
has title: How can I get a highcharts chart into a Coldfusion document (pdf)
tagged with: javascript
has comment: http://stackoverflow.com/comment/42573471

http://stackoverflow.com/q/27096590
tagged with: express
score: 0
answer count: 1
type: UnansweredQuestion
has title: Express 404 error message instead of routing to index.jade
tagged with: node.js
has comment: http://stackoverflow.com/comment/42700338
type: Question
has body: for some reason I am getting a 404 error message instead of my index.jade content fed into my index page. I don't know what I am doing wrong here but this getting boring. Here's my app.js var express = require('express'); var path = require('path'); var routes = require('./routes/index'); var app = express(); // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', routes); app.get('/', function(req, res){ res.render('index.jade', {title: 'index'}); }); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); module.exports = app; Here's my index.js /* GET home page. */ exports.index = function(req, res){ res.render('index', { title: 'Express' }); }; Any assistance is much appreciated!
has answer: http://stackoverflow.com/a/27098428
tagged with: javascript

http://stackoverflow.com/comment/43595323
has text: Thank you, I was calling the carousel before the DOM was loaded. It works great now!
type: Comment
comment on: http://stackoverflow.com/a/27320540
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42684152
has text: I added the missing part. JS is working but PUT function isn't. not sure why
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27085221

http://stackoverflow.com/comment/42734994
score: 0
has text: I've never made one of these. http://plnkr.co/edit/9ydzjIlDCETqCk8Vsu01?p=preview
type: Comment
comment on: http://stackoverflow.com/a/27115858
type: AnswerComment

http://stackoverflow.com/comment/42749998
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27124948
has text: Well, do you have a websocket connection open on client side listening on `message`?

http://stackoverflow.com/q/27019727
tagged with: orchardcms-1.8
tagged with: razor
type: AnsweredQuestion
has title: Calling Script.Require in Shape view returned from IResultFilter not working in Orchard CMS?
accepted answer: http://stackoverflow.com/a/27020873
tagged with: asp.net-mvc
type: Question
answer count: 3
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27023379
has body: I'm currently writing my own module that needs some scripts to be loaded on all pages, both on the front-end and the dashboard, where the user is authorized to edit content. I've written an implementation of the IResultFilter that adds a shape to the 'tail' zone in the site's theme. The shape is added to the page correctly and all is OK except for one thing. In the same shape I'm also trying to call Script.Require on a few scripts that I've added to the ResourceManifest, but they're not being loaded in to the page. @{ Script.Require("OrchardTinyMce"); Script.Require("jQueryColorBox"); } If I place this same code in a view that's not rendered using my IResultsFilter implementation then they are added to the page. I'd rather keep this bit of code in it's current view though as two alternates further down the line which require the same scripts and I don't really want to duplicate it. Does anyone have any ideas how I get the scripts to register? Thanks in advance for you help.
possible better answer: http://stackoverflow.com/a/27020881
tagged with: orchardcms
has answer: http://stackoverflow.com/a/27020873
has answer: http://stackoverflow.com/a/27020881

http://stackoverflow.com/q/27040730
tagged with: javascript
has comment: http://stackoverflow.com/comment/42601075
has comment: http://stackoverflow.com/comment/42600716
has body: I have a note taking application that im working on . Its made to look like Google Keep It saves each note in local storage . I would like to add a delete option to each of the notes (similar to Keep) , but don't know know to do it. The full code is on my Github page https://github.com/oxhey/keep HTML : &lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Notes&lt;/title&gt; &lt;link href="styles/normalize.css" rel="stylesheet" /&gt; &lt;link href="styles/main.css" rel="stylesheet" /&gt; &lt;link rel="stylesheet" type="text/css" href="window.css"&gt; &lt;/head&gt; &lt;script&gt; var nw = require('nw.gui'); var win = nw.Window.get(); win.isMaximized = false; &lt;/script&gt; &lt;body id="gui"&gt; &lt;header class="app-header"&gt; &lt;ul style="margin-top:0.3px"&gt; &lt;li&gt;&lt;a href='#' title='Close' id='windowControlClose'&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href='#' title='Maximize' id='windowControlMaximize'&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href='#' title='Minimize' id='windowControlMinimize'&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;h2 style="margin-top: 10px;margin-left: 20px;color: #fff;"&gt;Notes&lt;/h2&gt; &lt;/header&gt; &lt;section class="main-section"&gt; &lt;article class="note add-note"&gt; &lt;h1 class="note-title"&gt;&lt;/h1&gt; &lt;p class="note-content"&gt;Add a note&lt;/p&gt; &lt;/article&gt; &lt;/section&gt; &lt;script src="js/jquery.js"&gt;&lt;/script&gt; &lt;script src="js/main.js"&gt;&lt;/script&gt; &lt;script&gt; // Min document.getElementById('windowControlMinimize').onclick = function() { win.minimize(); }; // Close document.getElementById('windowControlClose').onclick = function() { win.close(); gui.App.closeAllWindows(); }; // Max document.getElementById('windowControlMaximize').onclick = function() { if (win.isMaximized) win.unmaximize(); else win.maximize(); }; win.on('maximize', function(){ win.isMaximized = true; }); win.on('unmaximize', function(){ win.isMaximized = false; }); &lt;/script&gt; &lt;/body&gt; &lt;/ht…
score: 0
tagged with: webkit
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42601119
has comment: http://stackoverflow.com/comment/42601008
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27040901
has comment: http://stackoverflow.com/comment/42600863
has comment: http://stackoverflow.com/comment/42600667
has comment: http://stackoverflow.com/comment/42601862
tagged with: local-storage
type: Question
has comment: http://stackoverflow.com/comment/42600766
has title: Delete specific item from local storage
has comment: http://stackoverflow.com/comment/42600698

http://stackoverflow.com/comment/42543887
comment on: http://stackoverflow.com/a/27007568
type: AnswerComment
has text: So theoretically after running the `loadGulp()` method, the gulp task should be registered, so then I should be able to run `gulp.start('build')` and it will be available...?
type: Comment
score: 1

http://stackoverflow.com/q/27121898
has title: Jquery multidimensional Json parse
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
answer count: 3
has body: Hey all below is my sample json data, I am good in php but new to jquery , "data":{ "cipher":"true", "size":[ "2.2 Mb", "6.11 Mb", "9.25 Mb", "18.49 Mb", "23.79 Mb", ], "prop":[ "small", "small", "small", "medium", "medium", ] } I want something like below php code in jquery. $i = 0 foreach($arr[data] as $test){ echo $arr[data][size][$i]; echo $arr[data][prop][$i]; $i++; } I tried something like below if(typeof response =='object'){ console.log("valid json"); $.each(response.data, function(i, object) { $.each(object, function(property, value) { }); }); }
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27122053
upvote count: 1
has comment: http://stackoverflow.com/comment/42744754
type: Question
has answer: http://stackoverflow.com/a/27122069
linked to: http://stackoverflow.com/q/2265167
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/4935632
possible better answer: http://stackoverflow.com/a/27122080
has answer: http://stackoverflow.com/a/27122080
accepted answer: http://stackoverflow.com/a/27122053

http://stackoverflow.com/a/27105240
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27105108
has body: You can use 'ng-maxlength' from angular input functionality, and watch when value is invalid. https://docs.angularjs.org/api/ng/directive/input , but it won't block the possibility to input. Also you could just set a watch for value: $scope.$watch('value', function(newVal, oldVal) { if(newVal.length &gt; 10) { $scope.value = oldVal; } });
answers question: http://stackoverflow.com/q/27105108
has comment: http://stackoverflow.com/comment/42718507
has comment: http://stackoverflow.com/comment/42714146
score: 15
has comment: http://stackoverflow.com/comment/60114123
has comment: http://stackoverflow.com/comment/42714213
has comment: http://stackoverflow.com/comment/42733113
type: AcceptedAnswer
upvote count: 15
type: Answer
has comment: http://stackoverflow.com/comment/42714098
has comment: http://stackoverflow.com/comment/42719030

http://stackoverflow.com/q/27142056
has title: Parenthesis placing after function
accepted answer: http://stackoverflow.com/a/27142203
has body: Which is the common best practice for where to place parenthesis after a function? I see at times function () and I see function(). With parameters I see function (param) and then I see function(param. Is this just a matter of preference or is there a reason as to why there would be whitespace after the function or there would not be whitespace?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42782188
has comment: http://stackoverflow.com/comment/42781177
upvote count: 1
linked to: http://stackoverflow.com/q/9765942
tagged with: code-standards
has answer: http://stackoverflow.com/a/27142203
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42781166
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27142282
score: 1
has answer: http://stackoverflow.com/a/27142282
has comment: http://stackoverflow.com/comment/42781416
favorite count: 0

http://stackoverflow.com/comment/42730354
score: 0
has text: I've just editted and added this example: `console.log(!(window.prop = true) || undefined);` just for that case..
type: Comment
comment on: http://stackoverflow.com/a/27113722
type: AnswerComment

http://stackoverflow.com/comment/88737523
type: Comment
has text: Yes, this is totally it. Thx
comment on: http://stackoverflow.com/a/27132800
type: AnswerComment
score: 0

http://stackoverflow.com/q/27102441
answer count: 3
tagged with: anchor
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: How to make anchor tags direct to the right location on the page with a "fixed" header?
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27102604
has answer: http://stackoverflow.com/a/27102753
tagged with: css
has body: I have a website with a position: fixed; header div that is always displayed on the top of the page. *text text with around 400px + height * *text text with around 400px + height * *text text with around 400px + height * *text text with around 400px + height * with buttons in the header that redirect to www.example.com/#first which uses a nice JavaScript code that scrolls down (with a slide effect) the page and subtracts the 184px of the header so it will scroll to the right position. this is the .js part: $(document).ready(function() { // Scroll the whole document $.localScroll({ offset:{left: 0, top:-184 } }); }); When using this: www.example.com/#third (from an external website for an example), this .js function doesn't run and it directs me straight to the middle of the and doesn't subtract the 184px. What is the best solution for this?
has answer: http://stackoverflow.com/a/27102605
score: 0

http://stackoverflow.com/q/27001784
tagged with: google-chrome-devtools
has comment: http://stackoverflow.com/comment/42534307
has comment: http://stackoverflow.com/comment/42535272
has body: The web appliation I am testing is making http calls out. I'm trying to set up a Qunit test to validate those calls. I need to be able to validate the data that is in the Request Payload of HTTP POST calls. I can already capture the call iteself but I don't have access to the Request Payload of that call. Here's what I have so far: XMLHttpRequest.prototype._originalOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(method, url, async, user, password) { if(url.match(/get/)) { QUnit.asyncTest("Validate URL", function( assert ) { assert.equal( url.match(my_regex)[0] , expected_url, "Matches"); // assert.equal( /*Validate Request Payload*/); start(); }); } this._originalOpen(method, url, async, user, password); } Is there any way to capture the request payload of the call in Javascript?
has title: Capture Request Payload in Javascript
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42533806
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/48231434
tagged with: qunit
upvote count: 2
type: UnansweredQuestion
tagged with: http
downvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/42759255

http://stackoverflow.com/q/27028096
linked to: http://stackoverflow.com/q/18082
score: 0
has answer: http://stackoverflow.com/a/27028292
has body: I need to make sure that my string is a number and for doing that, I was using isNaN function and everything was working but I got a problem when I typed in my input field '0e1'. I was wondering what's the best way to check if my string is a number and without scientific notation
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27028666
answer count: 4
type: Question
has comment: http://stackoverflow.com/comment/42579128
has answer: http://stackoverflow.com/a/27028286
has title: Best way to validate a string in js
tagged with: javascript
has answer: http://stackoverflow.com/a/27028540
has comment: http://stackoverflow.com/comment/42579279

http://stackoverflow.com/comment/42660749
score: 0
type: Comment
has text: i would add more context to your RegExp to handle spaces, negatives, etc.
comment on: http://stackoverflow.com/a/27074559
type: AnswerComment

http://stackoverflow.com/q/27038798
upvote count: 1
has comment: http://stackoverflow.com/comment/42597955
favorite count: 0
has comment: http://stackoverflow.com/comment/42599727
type: UnansweredQuestion
tagged with: node.js
has body: as the title stated, it works fine in desktop browser but not mobile browser. i check on https://www.sslshopper.com/ssl-checker.html in mobile browser, especially Android Google Chrome (ERR_CERT_AUTHORITY_INVALID) and its showing, the https missing its chains crt? Is there something missing in the ssl_option code? my SSL provider is Comodo. in NodeJS var express = require('express'); var app = express(); var ssl_options = { key: fs.readFileSync( 'ssl/' + 'mydomain.key'), cert: fs.readFileSync( 'ssl/' + 'mydomain.crt'), ca: fs.readFileSync( 'ssl/' + 'AddTrustExternalCARoot.crt'), ca: fs.readFileSync( 'ssl/' + 'COMODORSAAddTrustCA.crt'), ca: fs.readFileSync( 'ssl/' + 'COMODORSADomainValidationSecureServerCA.crt') }; var https = require('https').createServer( ssl_options, app);
downvote count: 0
answer count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42597519
tagged with: ssl
tagged with: javascript
has title: Nodejs https request certificate on mobile browser
has comment: http://stackoverflow.com/comment/42600534

http://stackoverflow.com/comment/42829066
has text: I am trying to get this basic example going - but not been able to invoke require properly - http://jsfiddle.net/HB7LU/8581/
type: Comment
comment on: http://stackoverflow.com/q/27103536
score: 0
type: QuestionComment

http://stackoverflow.com/q/27019165
has comment: http://stackoverflow.com/comment/42587450
accepted answer: http://stackoverflow.com/a/27033079
tagged with: cryptography
favorite count: 0
tagged with: wcf
tagged with: encryption
has comment: http://stackoverflow.com/comment/42565146
has body: I am trying to Encrypt a string using AES 128bit encryption. I have code for both Javascript and C#. The main objective is to encrypt the string using Javascript CryptoJS and then take the resultant cipher text and Decrypt it using C# AES AesCryptoServiceProvider. Javascript Code: function EncryptText() { var text = document.getElementById('textbox').value; var Key = CryptoJS.enc.Hex.parse("PSVJQRk9QTEpNVU1DWUZCRVFGV1VVT0="); var IV = CryptoJS.enc.Hex.parse("YWlFLVEZZUFNaWl="); var encryptedText = CryptoJS.AES.encrypt(text, Key, {iv: IV, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7}); //var decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase"); var encrypted = document.getElementById('encrypted'); encrypted.value = encryptedText; } C# Code: private String AES_decrypt(string encrypted) { byte[] encryptedBytes = Convert.FromBase64String(encrypted); AesCryptoServiceProvider aes = new AesCryptoServiceProvider(); aes.BlockSize = 128; aes.KeySize = 256; aes.Mode = CipherMode.CBC; aes.Padding = PaddingMode.Pkcs7; aes.Key = Key; aes.IV = IV; ICryptoTransform crypto = aes.CreateDecryptor(aes.Key, aes.IV); byte[] secret = crypto.TransformFinalBlock(encryptedBytes, 0, encryptedBytes.Length); crypto.Dispose(); return System.Text.ASCIIEncoding.ASCII.GetString(secret); } When using "hello" as the plain text for javascript i get this ciphertext: uqhe5ya+mISuK4uc1WxxeQ== When passing that into the C# application, upon running the Decrypt method i recieve: Padding is invalid and cannot be removed. I am stumped here and have tried many solutions resulting in the same error. When encrypting hello through the C# encryption AES method I receive: Y9nb8DrV73+rmmYRUcJiOg== I thank you for your help in advance!
has comment: http://stackoverflow.com/comment/42563854
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27020938
has answer: http://stackoverflow.com/a/27033079
type: Question
tagged with: c#
score: 5
upvote count: 5
has title: Encrypt text using AES in Javascript then Decrypt in C# WCF Service
downvote count: 0
has answer: http://stackoverflow.com/a/41697301
tagged with: javascript
has answer: http://stackoverflow.com/a/27035066
possible better answer: http://stackoverflow.com/a/41697301

http://stackoverflow.com/q/27093350
answer count: 1
tagged with: jquery
tagged with: ajax
has body: I want to display Products.MenuName in menuData.json but it doesn't work. How can I call Products data? Here are my json data and function. "d": { "PageCount": 4, "RowCount": 12, "ResultSet": [ { "Menu": "Hamburger Menu", "Price": -1, "Products": [ { "MenuName": "Chips ", "ExtendedPrice": "7,00", } ] } } $.getJSON('menuData.json', function(read_data){ $.each(read_data.d.ResultSet.Products,function(i,food){ $("#hims").append("Menus: "+food.MenuName); }); }); Click Me
tagged with: frontend
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has title: I want to display Products.MenuName in menuData.json
type: Question
accepted answer: http://stackoverflow.com/a/27094818
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27094818

http://stackoverflow.com/comment/42717405
type: Comment
score: 0
type: QuestionComment
has text: //email body $message_body = $message."\r\n\r\n".$user_name."\r\nEmail : ".$user_email."\r\nPhone Number : (".$country_code.") ". $phone_number ; So I need to add $obj, $product_code, $cart_item and $total to the piece above.
comment on: http://stackoverflow.com/q/27106589

http://stackoverflow.com/comment/42773215
type: QuestionComment
has text: You have to make a request to the server. How are you making such request?
comment on: http://stackoverflow.com/q/27137462
score: 0
type: Comment

http://stackoverflow.com/comment/42692083
comment on: http://stackoverflow.com/a/27035057
type: Comment
has text: Would you make create rectangles on their own and then bound with Element.getBoundingClientRect?
score: 0
type: AnswerComment

http://stackoverflow.com/a/52062414
has comment: http://stackoverflow.com/comment/91078567
upvote count: 3
has comment: http://stackoverflow.com/comment/91075847
downvote count: 0
has body: The way that we do this is by having the server check it. The flow we have is: The client makes an API call to the backend to fetch the price it should charge for a product. The client calls the stripe api to get the token and displays the amount from step 1 to the client Once the client has a token, call the backend API to make a charge passing both the token and amount (we call this a reconciliation amount). On the backend, before calling the stripe create charge api, we first reconcile the amount by comparing the amount given from the client in step 3 to the amount the product should be (from step 1). If these don't match we do not proceed and return an error to the client.
score: 3
has comment: http://stackoverflow.com/comment/91080600
has comment: http://stackoverflow.com/comment/91075448
answers question: http://stackoverflow.com/q/27040942
type: Answer
has comment: http://stackoverflow.com/comment/91075401

http://stackoverflow.com/comment/42635370
comment on: http://stackoverflow.com/q/27060218
type: Comment
type: QuestionComment
has text: Do you get an errors?
score: 0

http://stackoverflow.com/comment/42772203
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27133572
has text: In updated code example I don't see `$on` so I can't see where you get `undefined error on fileReader`. I assume that you passed it into `$on` listener, so it get overwritten with `undefined` when listener is been called.
score: 0

http://stackoverflow.com/comment/42649611
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27068207
score: 1
has text: [Not-A-Number](http://thecodelesscode.com/case/90).

http://stackoverflow.com/a/27042594
has body: You have 3 choices: Change serverside code Post form async(Recommended). Use iframe to post form. Here is jQuery code with post form async: $.post('http://www.myweb.com/serv/addquery.do', function(){ window.location="http://www.myweb.com/HTML/RuntimeMonitor.html"; }); Hope it helps.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42630184
has comment: http://stackoverflow.com/comment/42630570
has comment: http://stackoverflow.com/comment/56885688
has comment: http://stackoverflow.com/comment/42631035
accepted answer of: http://stackoverflow.com/q/27042151
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27042151
type: Answer

http://stackoverflow.com/comment/42634138
type: Comment
type: QuestionComment
has text: @balzafin do() is just an example.
comment on: http://stackoverflow.com/q/27059560
score: 0

http://stackoverflow.com/a/27145929
answers question: http://stackoverflow.com/q/27145896
has comment: http://stackoverflow.com/comment/42787723
downvote count: 0
score: 1
type: Answer
has body: Use the change event instead of keyup.
upvote count: 1

http://stackoverflow.com/q/27039849
has comment: http://stackoverflow.com/comment/42599615
has comment: http://stackoverflow.com/comment/42599440
score: -4
possible better answer: http://stackoverflow.com/a/27039906
has comment: http://stackoverflow.com/comment/42599384
accepted answer: http://stackoverflow.com/a/27039934
has answer: http://stackoverflow.com/a/27039906
tagged with: ternary
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42599657
type: Question
tagged with: shorthand
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/42602570
tagged with: javascript
has title: Return result from Ternary in one line (JavaScript)
favorite count: 0
has comment: http://stackoverflow.com/comment/42599347
has body: In JavaScript, rather than having to assign the result to a variable, is it possible to return the result of a ternary in one line of code? e.g. Instead of this: function getColor(val){ var result = val &lt;= 20 ? '#000' : val &gt;= 80 ? '#999' : '#555'; return result; } Can we do something like this... function getColor(val){ return val &lt;= 20 ? '#000' : val &gt;= 80 ? '#999' : '#555'; } I am asking this because I just tried the above and nothing was returned.
has answer: http://stackoverflow.com/a/27039934
answer count: 3
has answer: http://stackoverflow.com/a/27040045

http://stackoverflow.com/a/27119513
type: Answer
has comment: http://stackoverflow.com/comment/42740449
answers question: http://stackoverflow.com/q/27119463
has body: Absolute positioning places elements absolutely on the screen. Change it to relative? To adapt to screen resizing? Also this code if (e == '#comingSoon') { $(e).css("marginTop", $offsetH + 200 + "px"); } else if (e == '#smIcons') { $(e).css("marginTop", $offsetH + 50 + "px"); } else if (e == '#logo') { $(e).css("marginTop", $offsetH - 150 + "px"); } Executes for all screen sizes. It's fixed. The number of pixels get reduced substantially when resized. So it gets pushed further away on smaller screens than on larger.
score: 0

http://stackoverflow.com/comment/42970634
type: Comment
has text: Did it help? Did you try to debug your JS using browser develop. tools (eg. I use chrome, and writing to console `console.log()`)?
type: AnswerComment
comment on: http://stackoverflow.com/a/27213906
score: 0

http://stackoverflow.com/q/27148050
has title: mocha: Testing whether something takes *more* than an interval of time
tagged with: javascript
tagged with: mocha.js
has comment: http://stackoverflow.com/comment/42791728
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
has body: If you want to test that something takes under a certain amount of time, you can use the .timeout() function: it('should have preloaded the first image', function () { this.timeout(10); return promise.then(function (data) { return Monkey.helpers.preload(data.urls[0]); }); }); However, it's not quite so easy to test the other way round: if I want to test whether a task takes more than 30ms, I have to use a timeout: it('should not have preloaded the tenth image', function (cb) { return promise.then(function (data) { var finished = false; Monkey.helpers.preload(data.urls[10]) .then(function () { finished = true; }) setTimeout(function () { finished.should.be.False; cb(); }, 30); }); }); This isn't very simple! I would much prefer something like this: it('should not have preloaded the tenth image', function (cb) { this.shouldTake(30); return promise.then(function (data) { return Monkey.helpers.preload(data.urls[10]); }); }); Anyone know of a simpler way to do this?
answer count: 0
upvote count: 1
type: Question
tagged with: testing

http://stackoverflow.com/q/27087334
has answer: http://stackoverflow.com/a/27087507
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27087507
score: 0
type: Question
has title: jQuery click event handler attached to dom element
linked to: http://stackoverflow.com/q/1687296
tagged with: javascript
tagged with: jquery
has body: I am having hard time while building e-commerce cart module with jquery. Lets say that if i write a tags in html like this: &lt;div class="add-to-cart"&gt;+&lt;/div&gt; and then target it in my app: this.$products, this.$pa, this.$ip, this.$products = $('.shopperProducts'), this.$pa = this.$products.find('.shopperAdd'); var self = this; this.$ip = function() { var init = function(action, product) { /.../ }; self.$pa.on('click', function(event) { event.preventDefault(); init('add', this); }); }; This method is possible while im displaying products because they are displayed by php on page refresh so i have all the + links generated by php on html. The problem is on the checkout file, this is the page when i display entire cart filled with products, cart must be generated and handled in jQuery and AJAX. And code that i showed you doesnt work in cart page beacuse those links are appended for each product via jQuery into the DOM. I have been study possible methods and there are few, the most in favour is to do this: $(document).on('click', self.$pa, function(event) { The problem with that solution is that it also is considered practice to be avoided due to high resources drain, i can see the difference in execution time myselfe, it takes a lot longer on low end devices. Is there some neat trick that can be used or method that is considered good practice to do in that situation? &lt;--- EDIT (Solution) ---> Instead of calling: this.$products = $('.shopperProducts'), this.$pa = this.$products.find('.shopperAdd'); on the beginning, i have to call it after i load elements into DOM and then they became targetable, then i just have to use self.$ip(); and event handlers can be attached. Without using any sort of workarounds, the solution was just to change order of executing commands.
answer count: 1

http://stackoverflow.com/q/27071775
has comment: http://stackoverflow.com/comment/42655972
answer count: 1
has comment: http://stackoverflow.com/comment/42656003
type: UnansweredQuestion
has title: Include a Javascript function to HTML
has body: I've been trying to display an external javascript file to the browser that is included in the HTML file. I tried the script tag in the head of the html code: and nothing was displayed. I thought that this was occuring becuase I have to call specific functions within the html tags so I did this: Computer choice: Click Here And still no result displaying in neither the browser nor the console. What would be the proper way to include the external javascript file in a way that I just have to include event handlers within tags to add interactivity to the page. the code in cardGame.js: function Card(rank, suit) { this.rank = rank; this.suit = suit; this.toString = cardToString; this.createNode = cardCreateNode; } function cardToString() { var rank, suit; switch (this.rank) { case "A": rank = "Ace"; break; case "2": rank = "Two"; break; case "3": rank = "Three"; break; case "4": rank = "Four"; break; case "5": rank = "Five"; break; case "6": rank = "Six"; break; case "7": rank = "Seven"; break; case "8": rank = "Eight"; break; case "9": rank = "Nine"; break; case "10": rank = "Ten"; break; case "J": rank = "Jack"; break; case "Q": rank = "Queen"; break; case "K": rank = "King"; break; default: rank = null; break; } switch (this.suit) { case "C": suit = "Clubs"; break; case "D": suit = "Diamonds"; break; case "H": suit = "Hearts"; break; case "S": suit = "Spades"; break; default: suit = null; break; } if (rank == null || suit == null) { return ""; } return rank + " of " + suit; } var myCard = Card("3", "C"); document.write(myCard.toString());
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42660089
has answer: http://stackoverflow.com/a/27071823
type: Question
has comment: http://stackoverflow.com/comment/42655975
tagged with: javascript
has comment: http://stackoverflow.com/comment/42655965
score: 0

http://stackoverflow.com/q/27145287
score: 10
has answer: http://stackoverflow.com/a/27145574
upvote count: 10
has comment: http://stackoverflow.com/comment/42786445
answer count: 2
tagged with: cors
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27149703
tagged with: angularjs
tagged with: http-get
has body: I've an AngularJS application in which I'm trying to get an XML data with $http get from a server say http://example.com/a/b/c/d/getDetails?fname=abc&amp;lname=def (this when accessed manually by entering the link in a browser shows a tree structure of the XML file). When I run the application the data from that link is not fetched. Instead its showing an error with status 0. //url = http://example.com/a/b/c/d/getDetails?fname=abc&amp;lname=def $http.get(url).success(function (data){ alert("Success"); deferred.resolve(data); }).error(function (data, status){ console.log("Error status : " + status); }); I'm not sure why the $http.get fails and goes to the error function returning status 0. But if I pass an URL to the local server which has a JSON object, it works. Is the problem because of me trying to access the XML file from a different domain(CORS issue?) or something else? Please help me out!
has comment: http://stackoverflow.com/comment/54097066
tagged with: http://stackoverflow.com/tag/xml
has title: AngularJS - $http get returns error with status 0?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42786587
accepted answer: http://stackoverflow.com/a/27149703
type: Question
linked to: http://stackoverflow.com/q/17929804
possible better answer: http://stackoverflow.com/a/27145574

http://stackoverflow.com/q/27025418
has comment: http://stackoverflow.com/comment/42574358
upvote count: 1
answer count: 1
favorite count: 0
has body: I am trying to design the function in my GWT application to automatically refresh one of the pages every 5 minutes without clicking button before reloading.Most of the examples I have found in stackoverflow for this function are triggered after user click button or link. Like this example I just want page to be automatically refreshed every 5 minutes.
has title: GWT How to automatically refresh page every 5 minutes without clicking button for it?
tagged with: gwt
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/27028664
linked to: http://stackoverflow.com/q/12092705
type: Question
has comment: http://stackoverflow.com/comment/42574347
has answer: http://stackoverflow.com/a/27028664
tagged with: javascript

http://stackoverflow.com/q/27035823
has body: These days I’m having a training in Microsoft Reporting Service. Although it’s a good tool but I can’t find any examples that using it will be useful. To me is always better implementing reports using c# code in combination of javascript controls. With C# and javascript maybe it will be necessary more work but in the other hand I will get better maintainability and better automatic tests. Is there any situation where using reporting services will be the best choice?
favorite count: 0
accepted answer: http://stackoverflow.com/a/27036226
tagged with: code-maintainability
upvote count: 2
tagged with: reporting-services
has comment: http://stackoverflow.com/comment/42592621
score: 2
type: AnsweredQuestion
has title: When to use Microsoft Reporting Services
tagged with: unit-testing
type: Question
tagged with: c#
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42592436
has answer: http://stackoverflow.com/a/27036226
answer count: 1

http://stackoverflow.com/q/27147913
has comment: http://stackoverflow.com/comment/42791001
favorite count: 0
has body: I used the below function to auto adding comma in text box (Such as: 124355 => 124,355) function addCommas(num) { return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } And I use onKeyUp event: &lt;td&gt;&lt;input type="text" onkeyup="this.value=addCommas(this.value);"/&gt;&lt;/td&gt; If I enter the number quickly this is ok. But, if I enter number slowly I got the below result: 124355 =&gt; 1,2,4,355 135298532 =&gt; 1,3,5,2,9,8,532 Can you help me fix this ?
has comment: http://stackoverflow.com/comment/42790971
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42816807
downvote count: 2
has answer: http://stackoverflow.com/a/27147988
duplicate of: http://stackoverflow.com/q/2901102
has title: Auto add commas for number in javascript?
type: Question
has comment: http://stackoverflow.com/comment/42791066
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42790976
has comment: http://stackoverflow.com/comment/42790962
upvote count: 0
linked to: http://stackoverflow.com/q/2901102
answer count: 1

http://stackoverflow.com/q/27124155
tagged with: vue.js
answer count: 1
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27269758
favorite count: 0
tagged with: angularjs
has title: Angular/Vue.js loop through two objects in same directive
score: 2
upvote count: 2
has body: I don't know if what I'm trying to do is possible. I'm trying to create an Angular directive that repeats over a data object and prints out its values as well as the values of a second unrelated object with similar structure. I'm working on a translation app where the master version of the language file is shown in one column and the translation is shown in the next. I would like to repeat through the master object and then also show the translation where there is one. I do not want to merge the two objects, because I would prefer to maintain two-way binding between the translation object and the DOM so it can be saved easily. This is very simply what I'm trying to do: Objects var master: { face: { a: aaa, b: bbb, c: ccc, more: { d: ddd, e: eee } }, magic: magic, test: test } var translation: { face: { c: cccc, more: { d: dddd } }, test: testttt } DOM output face aaa bbb ccc cccc more ddd dddd eee magic test testttt I'm asking this as an Angular question, but I plan on using vue.js. I do this because the Angular community is much bigger and because I believe concepts learnt from Angular are easily transposed onto vue.js. I don't want to use Angular itself, because a full framework is way more than I need. Code example of vue.js redering an object as tree Here is the repo for the project: https://github.com/jdwillemse/translation-utility
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/15127834
has answer: http://stackoverflow.com/a/27269758
type: Question

http://stackoverflow.com/comment/42524023
has text: +1, when i comment those 2 lines at bottom, Eclipse does not propose.
comment on: http://stackoverflow.com/a/26996583
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/27079760
type: Question
tagged with: canvas
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/27080155
favorite count: 0
has title: delay execution of javascript for canvas until fonts have been loaded
tagged with: fonts
has body: I'm making something in canvas that uses fonts from a web service and what happens is that when the canvas is first loaded the fonts, which I'm loading from google fonts, haven't arrived yet so for the briefest of moments there's only plain font in the canvas and then it switches to my downloaded font. This is a minor detail but very annoying. I'm wondering if theres any way to preload the fonts, i.e. not execute the canvas associated javascript code until after I'm sure I have the fonts already. The font is placed in the header of the html: &lt;link href='https://fonts.googleapis.com/css?family=Stalinist+One' rel='stylesheet' type='text/css'&gt; and the js links at the bottom of the file, just before the closing of the body.
accepted answer: http://stackoverflow.com/a/27080155
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/a/27045881
has comment: http://stackoverflow.com/comment/42610758
type: Answer
accepted answer of: http://stackoverflow.com/q/27045343
has comment: http://stackoverflow.com/comment/42610532
has body: If you are sure that : you are entering the success callback function, the jqXHR data is correct, then try this inside your $.each() : Adding options to a using jQuery? That will give you : success : function(jqXHR, textStatus,response) { var $select = $("#userId"); $.each(jqXHR,function(index, data) { $select.append(' '+data.name+' '); }); } EDIT : Notice that you melted parameters order in the success function. jQuery doc says : success Type: Function( Anything data, String textStatus, jqXHR jqXHR)
has comment: http://stackoverflow.com/comment/42622975
answers question: http://stackoverflow.com/q/27045343
score: 0
has comment: http://stackoverflow.com/comment/42610437
has comment: http://stackoverflow.com/comment/42618207
type: AcceptedAnswer

http://stackoverflow.com/q/27011984
favorite count: 0
has answer: http://stackoverflow.com/a/33419466
type: Question
score: 3
has comment: http://stackoverflow.com/comment/42550670
answer count: 6
tagged with: twitter-bootstrap
upvote count: 3
has answer: http://stackoverflow.com/a/39977392
has answer: http://stackoverflow.com/a/27012071
has answer: http://stackoverflow.com/a/32905567
has body: I am using this Bootstrap validator github.com/1000hz/bootstrap-validator for my bootstrap forms but it appears there is no way to set some external JS conditional before submitting forms. For example, I would like to do the following from an external JS files: 1 # if form or some input of the form is invalid using validator() then I do some action. 2 # else Users will see some bootstrap button loading message until everything is submitted into the databases. You can have a single case here: $('button[data-loading-text]').click(function () { var btn = $(this); btn.button('loading'); $.blockUI(); // #1 if form is invalid using validator() then I unblock the please wait message $.unblockUI(); and reset the bootstrap loading button. // #2 else users will still see the "please wait" message + bootsrap loading button untill everything is submitted into the databases. }); http://jsfiddle.net/temgo/k07nx06k/12/ Any help will be appreciated as it appears the plugin events are only set for specific field not for full form validation. Regards
tagged with: forms
has comment: http://stackoverflow.com/comment/42556209
has answer: http://stackoverflow.com/a/27012102
has answer: http://stackoverflow.com/a/63406975
tagged with: validation
downvote count: 0
has title: Bootstrap JS validator and form submit
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/27070202
has comment: http://stackoverflow.com/comment/42654391
score: -2
has comment: http://stackoverflow.com/comment/42654538
upvote count: 1
has body: Try with $('#downloadTestModal1').preventDefault(); Since preventDefault() works only on elements with default event. In this case there is no default event for span element. Sorry for that. I used it earlier, but that was on click event atached to a element
downvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/27070153

http://stackoverflow.com/q/27124878
has comment: http://stackoverflow.com/comment/42749847
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42750350
has answer: http://stackoverflow.com/a/27125149
score: 2
has comment: http://stackoverflow.com/comment/42750579
type: Question
answer count: 2
downvote count: 0
linked to: http://stackoverflow.com/q/371875
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42749874
has body: Basically, is there a way for this to be done? I'm trying to create a site where when the correct "password" is entered, it takes the user to a page. I have this all working with the following code;- &lt;div class="row"&gt; &lt;center&gt; &lt;form name="login" style="margin: 0px"&gt; &lt;INPUT TYPE="text" NAME="pass" size="17" onKeyDown="if(event.keyCode==13) event.keyCode=9;" style="width: 152px; margin: 5px;"&gt;&lt;br&gt; &lt;input type="button" value="Click to submit!" style="width : 150px; margin: 3px" onClick="TheLogin(this.form)"&gt; &lt;/form&gt; &lt;/center&gt; &lt;/div&gt; And this script:- &lt;script language="JavaScript" type="text/javascript"&gt; function TheLogin() { var password = 'Mehra'; if (this.document.login.pass.value == password) { top.location.href="loginyes.html"; } else { location.href="loginno.html"; } } &lt;/script&gt; However I'm trying to get it so that if the user inputs something other than the password, it logs this data to a text file for example. So if I type "Mehra" it takes me to loginyes.html and if I type anything else such as "password", it takes me to loginno.html but creates a file called password.txt on my server. Thanks in advance :)
tagged with: http://stackoverflow.com/tag/html
has title: Using HTML/JS to save an input to text file?
has answer: http://stackoverflow.com/a/27124956
upvote count: 2

http://stackoverflow.com/a/27002705
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42535897
type: AcceptedAnswer
has body: Webpack just creates a client-side bundle; when you run your Node app, it doesn't use webpack to load the files. Prevously you could use something like node-jsx to require JSX files in Node.js, but that project has since been deprecated in favor of Babel. In particular, you can use babel-register to require JSX files in Node.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27001927
has comment: http://stackoverflow.com/comment/58267985
type: Answer
answers question: http://stackoverflow.com/q/27001927

angularjs-directive
tags question: http://stackoverflow.com/q/27093344
tags question: http://stackoverflow.com/q/27014155
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/27106661
tags question: http://stackoverflow.com/q/27064730
tags question: http://stackoverflow.com/q/27038150
tags question: http://stackoverflow.com/q/27142553
tags question: http://stackoverflow.com/q/27135056
tags question: http://stackoverflow.com/q/27013522
tags question: http://stackoverflow.com/q/26999938
tags question: http://stackoverflow.com/q/27037834
tags question: http://stackoverflow.com/q/27118509
tags question: http://stackoverflow.com/q/27088204
tags question: http://stackoverflow.com/q/27084763
tags question: http://stackoverflow.com/q/27098532
tags question: http://stackoverflow.com/q/27054523
tags question: http://stackoverflow.com/q/27123742
tags question: http://stackoverflow.com/q/27045450
tags question: http://stackoverflow.com/q/27028138
tags question: http://stackoverflow.com/q/27054180
tags question: http://stackoverflow.com/q/27056245
tags question: http://stackoverflow.com/q/27037109
tags question: http://stackoverflow.com/q/27040302
tags question: http://stackoverflow.com/q/27059763
tags question: http://stackoverflow.com/q/27120842
tags question: http://stackoverflow.com/q/27112672
tags question: http://stackoverflow.com/q/27112544
tags question: http://stackoverflow.com/q/27036752
tags question: http://stackoverflow.com/q/27139936
tags question: http://stackoverflow.com/q/27115984
tags question: http://stackoverflow.com/q/27090829
tags question: http://stackoverflow.com/q/27081320
tags question: http://stackoverflow.com/q/27106993
tags question: http://stackoverflow.com/q/27020113
type: Tag
tags question: http://stackoverflow.com/q/27071413
tags question: http://stackoverflow.com/q/27136803
tags question: http://stackoverflow.com/q/27150841
tags question: http://stackoverflow.com/q/27010113
tags question: http://stackoverflow.com/q/27012553
tags question: http://stackoverflow.com/q/26998462
tags question: http://stackoverflow.com/q/27119731
tags question: http://stackoverflow.com/q/26997602
tags question: http://stackoverflow.com/q/27074096
tags question: http://stackoverflow.com/q/27038799
tags question: http://stackoverflow.com/q/27073638

http://stackoverflow.com/comment/42545951
type: AnswerComment
comment on: http://stackoverflow.com/a/27008642
type: Comment
has text: Thank you. I would like to have the user enter "-1" to exit the loop. I tried replacing the cancel with "-1" and keeping the if(miles=="-1"){break;} as I originally had, but it didn't work properly.
score: 0

http://stackoverflow.com/comment/42755667
comment on: http://stackoverflow.com/q/27128112
type: QuestionComment
has text: Not sure what the goal is. You want to open up a link to another site when a button is clicked, but not actually show the site?
type: Comment
score: 0

http://stackoverflow.com/comment/42792768
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27146080
type: Comment
has text: what do i do if the array i want to encode is in another file?

http://stackoverflow.com/q/27097762
linked to: http://stackoverflow.com/q/2705727
possible better answer: http://stackoverflow.com/a/27097859
has body: Just as the title says...i'm trying to parse a string for example 2x + 3y and i'm trying to get only the coefficients (i.e. 2 and 3) I first tokenized it with space character as delimiter giving me "2x" "+" "3y" then i parsed it again to this statement to get only the coefficients var number = eqTokens[i].match(/(\-)?\d+/); I tried printing the output but it gave me "2," why is it printing like this and how do i fix it? i tried using: number = number.replace(/[,]/, ""); but this just gives me an error that number.replace is not a function
upvote count: 1
has comment: http://stackoverflow.com/comment/42700807
has comment: http://stackoverflow.com/comment/42700685
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27097784
score: 1
type: Question
has answer: http://stackoverflow.com/a/27097784
answer count: 2
has answer: http://stackoverflow.com/a/27097859
downvote count: 0
has title: Javascript regex match returning a string with comma at the end
tagged with: javascript
has comment: http://stackoverflow.com/comment/42700687
tagged with: regex
favorite count: 0

http://stackoverflow.com/comment/42703808
type: Comment
type: QuestionComment
has text: I have edited the same, with exact issue, can you please help now.
comment on: http://stackoverflow.com/q/27099343
score: 0

http://stackoverflow.com/comment/42638741
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27061532
has text: You can use [`keypress`](http://api.jquery.com/keypress/) event in conjunction with [`event.charCode`](https://developer.mozilla.org/en-US/docs/Web/API/event.charCode) property. Although now the latter is about to be deprecated, it is still supported by most browsers. It returns the Unicode value of the key pressed if it printable. Note that in Webkit browsers `keypress` doesn't fire if the pressed key isn't printable.
score: 0

http://stackoverflow.com/comment/42678016
score: 3
type: Comment
has text: `item1 == false` or `!item1`
type: QuestionComment
comment on: http://stackoverflow.com/q/27084528

http://stackoverflow.com/comment/42643765
has text: I can to write own function for my task. But I want to know: can I user regex in this task?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27064965
score: 0

http://stackoverflow.com/a/27101039
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27100759
answers question: http://stackoverflow.com/q/27100759
has body: Base URL should be defined in a special tag in header: &lt;head&gt; &lt;base href="http://example.com/project1/"&gt; &lt;/head&gt; Then you can read it with Javascript: in modern browsers var baseURL = document.baseURI or in older var baseURL = document.getElementsByTagName('base')[0].href

http://stackoverflow.com/q/27128509
tagged with: x-tag
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/35494861
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: custom-element
has title: How to set inner text of tag in web component
score: 1
has body: I am making use of the x-tags. Here is the code that I am working on. I need to set the content of these div boxes with value of custom elements attribute value. Is it possible to do this? I tried setting it but I got error "undefined is not a function". var template = xtag.createFragment(function(){/* */}); xtag.register('x-navbar', { lifecycle: { created: function() { this.appendChild(template.cloneNode(true)); this.getElementById("#box1").innerHTML = this.productName; }, accessors: { productName: { attribute: {}, get: function(){ return this.getAttribute('productName') || ""; }, set: function(value){ this.xtag.data.header.setAttribute('productName',value); } } } }); hii
downvote count: 1
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/33974448
tagged with: web-component
has comment: http://stackoverflow.com/comment/42759103

http://stackoverflow.com/comment/49319949
type: AnswerComment
has text: cool+useful code snippet, but the `valid_image_nodes` seems rather arbitrary. Really, there can be an image on *any* element, so why not just avoid that whole `if (this.valid_image_nodes...` condition?
type: Comment
comment on: http://stackoverflow.com/a/30626240
score: 0

http://stackoverflow.com/comment/42722488
has text: Well... if you are replacing the reference with another reference then that would make sense. They would actually point to two different objects.
type: Comment
comment on: http://stackoverflow.com/a/27106877
type: AnswerComment
score: 0

http://stackoverflow.com/a/49444793
score: 1
answers question: http://stackoverflow.com/q/27071949
upvote count: 1
has body: You may take following steps: Go to internet options. Select security tab. Under Custom level. Ensure that Initialize and script active x controls is not marked safe for scripting select the radio button enabled and try to run your code now. I am sure your problem will be solved.
type: Answer
downvote count: 0

http://stackoverflow.com/a/27022929
accepted answer of: http://stackoverflow.com/q/27022720
type: Answer
has body: Did you try moving the onclick handler outside the mouseover? startInspecting = function(){ $('section *').on('mouseover.INSPECTOR', function(e){ $('.hovered-element').removeClass('hovered-element'); $(e.target).addClass('hovered-element'); }).on('click.INSPECTOR', function (e) { $('section *').off('mouseover.INSPECTOR click.INSPECTOR'); console.log(e.target); }); }; DEMO
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27022720
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/27044596
type: Answer
answers question: http://stackoverflow.com/q/27044252
score: 0
has body: I did it so that I used array key for sorting and "synchronized" it with object property (because I needed it saved to DB and restored after) and it works as a charm :) So something like this, pseudo: var unsorted = [ 0:{"sort_key": "0", "data":"dataaa 0"}, 1:{"sort_key": "1", "data":"dataaa 1"}, ... n:{"sort_key": "n", "data":"dataaa n"} ]; function_sort(unsorted){ ... return sorted = [ 0:{"sort_key": "n", "data":"dataaa y"}, 1:{"sort_key": "44", "data":"dataaa x"}, ... n:{"sort_key": "0", "data":"dataaa z"} ]; } save = function_save(sorted){ ...update sort_key as array key... return for_saving; }

http://stackoverflow.com/comment/42642304
type: Comment
type: QuestionComment
has text: Sure, if it is mine I can, and it is!
score: 0
comment on: http://stackoverflow.com/q/27062441

http://stackoverflow.com/comment/42665868
type: Comment
type: QuestionComment
has text: You're talking about doing something when somebody clicks the buttons, so why are you using the blur event rather than the click event?
comment on: http://stackoverflow.com/q/27077656
score: 1

string
tags question: http://stackoverflow.com/q/27141715
tags question: http://stackoverflow.com/q/27113509
tags question: http://stackoverflow.com/q/27064389
tags question: http://stackoverflow.com/q/27096454
tags question: http://stackoverflow.com/q/27075049
tags question: http://stackoverflow.com/q/27017711
tags question: http://stackoverflow.com/q/27072578
tag name: string
tags question: http://stackoverflow.com/q/27006025
tags question: http://stackoverflow.com/q/27149043
tags question: http://stackoverflow.com/q/27080071
tags question: http://stackoverflow.com/q/27094754
tags question: http://stackoverflow.com/q/27138638
tags question: http://stackoverflow.com/q/27031237
type: Tag
tags question: http://stackoverflow.com/q/27144842
tags question: http://stackoverflow.com/q/27002184
tags question: http://stackoverflow.com/q/27074529
tags question: http://stackoverflow.com/q/27116725
tags question: http://stackoverflow.com/q/27068207
tags question: http://stackoverflow.com/q/27144918
tags question: http://stackoverflow.com/q/27069969
tags question: http://stackoverflow.com/q/27078682
tags question: http://stackoverflow.com/q/27055134

http://stackoverflow.com/comment/42655652
type: AnswerComment
has text: Thanks for your feedback. Unfortunately, further file will not load properly. Below the code json: http://pastebin.com/swTRGNgX The code:` series: [ { data: [] }, { yAxis: 1, // This means the second yAxis will be used to plot this series data: [] } ] }; $.getJSON('test/test.json', function (data) { options.series[0].data = data; options.series[1].data = data; chart = new Highcharts.Chart(options); });`
comment on: http://stackoverflow.com/a/27071254
type: Comment
score: 0

http://stackoverflow.com/q/27084591
has answer: http://stackoverflow.com/a/27118789
has comment: http://stackoverflow.com/comment/42682324
accepted answer: http://stackoverflow.com/a/27118789
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/svg
has title: snap.svg save element and paste it to another
type: AnsweredQuestion
type: Question
has body: I create some lines in my Paper: var svg = Snap("#svg_container"); var linesContainer = {}; var line = svg.line( 0, 0, 200, 200).attr(...); linesContainer[someID] = line; then i clear the Snap / create a new. I want to have the stored object also in my new snap: svg = Snap("#svg_container"); svg.clear(); //something like: //svg.append(linesContainer[someID]); is this possible?
tagged with: javascript

http://stackoverflow.com/comment/42547637
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27010167
has text: is this similar?http://stackoverflow.com/questions/8419354/get-html5-localstorage-keys
score: 0

http://stackoverflow.com/comment/42762008
score: 0
comment on: http://stackoverflow.com/q/27119394
type: Comment
has text: Does it every get to the alert() statement? Also, htmlContent variable never changes (bringing it up in case you are watching it)
type: QuestionComment

access-control
tag name: access-control
tags question: http://stackoverflow.com/q/26996446
type: Tag

http://stackoverflow.com/a/27032595
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/59515703
answers question: http://stackoverflow.com/q/27031189
type: Answer
upvote count: 1
has body: The behaviour which you are getting is because of Synthetic Click Activation. When a label is associated with some control(checkbox in this case), clicking the label will fire click event and since there is a controll associated, user agent will thereafter run synthetic click activation on the checkbox. Therefore you are getting the pre-click state of checkbox in your label click handler. However you can get the post-click checkbox state by attaching handler to checkbox instead of label. These events will be fired indirectly with label click (even if your checkbox is hidden) after modifying the checkbox state. $(checkBoxSelector).on('click or change', function () {...do something

http://stackoverflow.com/comment/42859069
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27140879
has text: what you have posted is error from console (yes it was helpful) but what Atul asked for is the request/response in network monitor.
score: 0

http://stackoverflow.com/a/27071882
answers question: http://stackoverflow.com/q/27071799
has body: Use an interaction testing framework like Ember.js. that should allow you to test your UI Interactions. See the link above to get some detailed information on how to use the library. Here is a code snippet from the Ember.js library to see if a user is redirected properly if not authenticated (100% javascript!): module('Integration: Transitions', { teardown: function() { App.reset(); } }); test('redirect to login if not authenticated', function() { visit('/'); click('.profile'); andThen(function() { equal(currentRouteName(), 'login'); equal(currentPath(), 'login'); equal(currentURL(), '/login'); }); }); Ember.js is an excellent way to test your user interactions and your UI components. Learn more here: http://emberjs.com/guides/testing/testing-user-interaction/ UPDATE: See this answer for another solution that combines CasperJS and PhantomJS to test user interfaces. Good luck!
upvote count: 1
has comment: http://stackoverflow.com/comment/42656456
score: 1
has comment: http://stackoverflow.com/comment/42656339
has comment: http://stackoverflow.com/comment/42656313
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27071799
downvote count: 0
has comment: http://stackoverflow.com/comment/42656398
type: Answer
has comment: http://stackoverflow.com/comment/42656536
has comment: http://stackoverflow.com/comment/42656367

http://stackoverflow.com/a/27050095
has comment: http://stackoverflow.com/comment/42617806
has body: If you load content dynamically then events won´t be hooked. Use "on" event instead of "click". It would be something like: $( "a" ).on( "click", function() { alert( $( this ).text() ); });
has comment: http://stackoverflow.com/comment/42617784
has comment: http://stackoverflow.com/comment/42617726
score: -1
downvote count: 2
upvote count: 1
answers question: http://stackoverflow.com/q/27050003
type: Answer
has comment: http://stackoverflow.com/comment/42676987

http://stackoverflow.com/a/27138795
answers question: http://stackoverflow.com/q/27138737
type: Answer
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42775545
has body: as your button gets added dynamically, you need to use jQuery.on() to attach event handler to your newly created button and ID's should be unique, so make sure you use different id in case you are generating multiple buttons: $(document).ready(function() { $(document).on('click', '#addOne', function() { var theAnswer = $('#myAnswer').val(); alert(theAnswer); }); });

http://stackoverflow.com/comment/42664558
type: Comment
type: QuestionComment
has text: There can be duplicates, in that case all of them should have the div appended
comment on: http://stackoverflow.com/q/27076931
score: 0

http://stackoverflow.com/a/27094074
score: 2
downvote count: 0
has body: You're using curly braces where you should be using parentheses. Try this: document.getElementById("text").innerHTML="Some more text";
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/27094048

http://stackoverflow.com/comment/42572552
score: 0
comment on: http://stackoverflow.com/q/27023916
has text: Thanks Artjom. I will try that out.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27012735
tagged with: settimeout
score: 0
has body: If I want to create a div that is as high a (responsive) image using javascript, I am resorting to setTimeout. For example I might have code like this setTimeout(function(){ var $imgheight = $('img').height(); $('.mydiv').height($imgheight); }, 400); Is there any alternative to this? I know about imagesloaded plugin, is there any simpler alternative? Many thanks
has answer: http://stackoverflow.com/a/27013034
type: Question
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/27013034
has answer: http://stackoverflow.com/a/27013065
has title: Alternative to setTimeout for images
possible better answer: http://stackoverflow.com/a/27013065
type: AnsweredQuestion

http://stackoverflow.com/a/26994109
answers question: http://stackoverflow.com/q/26993704
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: You could name them (and thus create a mapping between the radio group and the spans) so you can find them easily $('.views-exposed-widget').on('change', 'input', function () { var self = $(this), name = this.name, text = self.closest('.form-type-radio').find('label[class="option"]').text(), target = $('.views-widget-sort-by').find('[data-for="'+ name +'"]'); // find the related span // check if we found a related span, and if not create it if (target.length == 0){ target = $('&lt;span data-for="'+name+'"&gt;&lt;/span&gt;').appendTo('.views-widget-sort-by'); } // set the text of the span target.text( text ); }); Demo at http://jsfiddle.net/gaby/5nutt42g/1/ You also had a wrong id on the the first radio (it should be edit-tid-1-4 and not edit-tid-1-2)
accepted answer of: http://stackoverflow.com/q/26993704

http://stackoverflow.com/comment/42546326
has text: I think that's the reason http://bugs.jquery.com/ticket/14922
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/26996637

http://stackoverflow.com/comment/42611958
has text: put together a jsfiddle of this? are you using ajax to add remove tags to a database table?
comment on: http://stackoverflow.com/q/27031102
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42723140
type: Comment
type: QuestionComment
has text: Apparently it doesn't work properly on JSFiddle. I tried... http://jsfiddle.net/czk60ae1/2/embedded/result/#settings
comment on: http://stackoverflow.com/q/27103881
score: 0

http://stackoverflow.com/q/27037972
has comment: http://stackoverflow.com/comment/42596660
upvote count: 1
has comment: http://stackoverflow.com/comment/42596066
type: Question
has comment: http://stackoverflow.com/comment/42595714
tagged with: taglib
has comment: http://stackoverflow.com/comment/42595847
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/42595938
has body: An example will make this clearer! The jsp file... &lt;%@ taglib prefix ="jam" uri= "http://jam.tld" %&gt; &lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1"%&gt; &lt;% String targetPage = true ? "toast" : "bread"; %&gt; &lt;jam:text onmousedown="movePage('&lt;%=targetPage%&gt;');" id="&lt;%=targetPage%&gt;"&gt;&lt;%=targetPage%&gt;&lt;/jam:text&gt; Note - the taglib is not mine and I have no control over it. (it isn't really called jam either :). This then creates this HTML... &lt;td onmousedown="movePage('&lt;%=targetpage%&gt;;');" id="toast"&gt;toast&lt;/td&gt; Which as you can see: the &lt;%=targetPage%> was only replaced/parsed in the non-javascript bit? The compiled jsp file looks like this: jspx_th_jam_005ftext_005f2.setOnmousedown("movepage('&lt;%=targetpage%&gt;')"); Anyone know what is going on, or how to fix it? Why is the &lt;%=%&gt; tag being ignored when it is part of JavaScript statement? :)
has answer: http://stackoverflow.com/a/27038285
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42595939
favorite count: 0
has comment: http://stackoverflow.com/comment/42596111
type: UnansweredQuestion
has title: jsp command <%=%> being ignored when it is used in a Javascript statement, inside a taglib tag statement?
score: 1
tagged with: java

http://stackoverflow.com/q/27043972
type: Question
linked to: http://stackoverflow.com/q/13377398
answer count: 2
has answer: http://stackoverflow.com/a/29712713
tagged with: javascript
has body: Just started using Web Essentials and love its support of .coffee files. Big problem however: In Visual Studio, if you add the following reference to the top of a .js file, Visual Studio will include intellisense for the items in the referenced file: /// &lt;reference path="../../js/knockout-3.1.js" /&gt; So, while writing my code I can type something like ko. and intellisense shows me all the functions knockout has to offer. However the above XML reference is not allowed in .coffee files and in fact keeps them from being compiled. I can put the following in a .coffee file: # @reference ../../js/knockout-3.1.js This will compile but I lose the intellisense in Visual Studio. How can I "include" other .js files as a reference and trigger intellisense in a .coffee file?
has answer: http://stackoverflow.com/a/38759192
favorite count: 0
score: 8
type: UnansweredQuestion
tagged with: visual-studio
downvote count: 0
tagged with: coffeescript
has title: Javascript reference and Intellisense in Visual Studio 2013 .coffee files
upvote count: 8

http://stackoverflow.com/comment/42656441
type: Comment
has text: No problem. It just has to do with how strings are interpreted by the engine. You start off with a quote and it doesn't end until it reads another quote of the same type that doesn't have a backslash (\\) in front of it.
comment on: http://stackoverflow.com/a/27071970
type: AnswerComment
score: 0

http://stackoverflow.com/a/53631375
has body: I had the same error for the MediaStream. The solution is set a stream to the srcObject. From the docs: Important: If you still have code that relies on createObjectURL() to attach streams to media elements, you need to update your code to simply set srcObject to the MediaStream directly.
type: Answer
upvote count: 9
downvote count: 0
answers question: http://stackoverflow.com/q/27120757
score: 9

long-polling
tags question: http://stackoverflow.com/q/27123860
type: Tag
tag name: long-polling

http://stackoverflow.com/q/27070327
answer count: 1
tagged with: javascript
type: UnansweredQuestion
type: Question
has title: Angularjs filter list data using select value
has answer: http://stackoverflow.com/a/27070424
has body: I've json data in following format: { "id": "mypics-1", "imageThumbUrl": "img/small/1.jpg", "imageUrl": "img/large/1.jpg", "name": "1.jpg", "type": "imgage" }, { "id": "mypics-2", "imageThumbUrl": "img/small/2.jpg", "imageUrl": "img/large/2.jpg", "name": "2.jpg", "type": "image" } I need to filter image list on type base if user selects the selects a value from drop down. My code is as follows. I tried many ways but it didn't filtering data, rather it empties the list. All {{type.name}}
tagged with: angularjs
score: 0

http://stackoverflow.com/comment/42815285
type: Comment
has text: ;) Still don't know how to do it. As i said before i am a total beginner in jquery and my code source was from stackoverflow. I see in the fiddle that your code works very good but i don't know how to use it. After i put in the selectors as i think ;) it is giving me nAns on allmost all the tables from my form ;)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27128990

http://stackoverflow.com/a/27030773
accepted answer of: http://stackoverflow.com/q/27030744
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: Try: /\d+/g \d matches a single digit, so it will match each digit inidividually, hence multiple results. \d+ matches 1 or more digits, so it will match as many consecutive digits it finds.
answers question: http://stackoverflow.com/q/27030744

http://stackoverflow.com/a/27148493
has body: You need to keep in mind that localStorage can only store strings. When you need to save an array you therefore need to convert it into a string first, using JSON.stringify(). When retrieving the string from the storage you convert it back into an array with JSON.parse(). Please see this Plunker for a demonstration.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27147860

http://stackoverflow.com/a/27088741
has body: Even for public posts, you MUST use a User Token for the specific User, and you need to authorize him with the read_stream permission. That being said, you may want to read this: This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop and TV apps will not be granted this permission. Source: https://developers.facebook.com/docs/facebook-login/permissions/v2.2 That is for User profiles. If you want to retrieve a Page feed, you can even use an App Token without authorization, unless the Page is restricted (country, age) - in that case you need to use a User Token or Page Token. More information about Access Tokens: https://developers.facebook.com/docs/facebook-login/access-tokens/ http://www.devils-heaven.com/facebook-access-tokens/
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42688212
has comment: http://stackoverflow.com/comment/42687712
has comment: http://stackoverflow.com/comment/42687054
has comment: http://stackoverflow.com/comment/42689348
accepted answer of: http://stackoverflow.com/q/27088244
has comment: http://stackoverflow.com/comment/42689772
has comment: http://stackoverflow.com/comment/42688310
has comment: http://stackoverflow.com/comment/42688560
has comment: http://stackoverflow.com/comment/42686112
answers question: http://stackoverflow.com/q/27088244
has comment: http://stackoverflow.com/comment/42689265
has comment: http://stackoverflow.com/comment/42688112

http://stackoverflow.com/a/27019898
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27019372
has body: From what I understand you want your drop down to open to the right instead of straight to the center, to achieve this assign a margin to the ul and the dropdown window itself. Ie: .dropddownBox { margin-left: 50px; } in your CSS will push the dropdown to the right for you. Same goes for the left, you can create a negative left margin to push it to the left if you want. Edit: I noticed it shoots down the dropdown menu and button included in the jsfiddle so I modified it a little to make sure it doesn't do that you can do this: .dropddownBox { position: absolute; z-index: 10; margin-left: 50px; } I set the z-index just to make sure it shows up above other divs etc, if it does overlap.
accepted answer of: http://stackoverflow.com/q/27019372
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42591079
type: Answer

safari
tags question: http://stackoverflow.com/q/27024772
tags question: http://stackoverflow.com/q/27139508
tags question: http://stackoverflow.com/q/27021117
tags question: http://stackoverflow.com/q/27094981
tags question: http://stackoverflow.com/q/27080818
tags question: http://stackoverflow.com/q/27031558
tags question: http://stackoverflow.com/q/27114189
tags question: http://stackoverflow.com/q/27132249
tags question: http://stackoverflow.com/q/27107789
type: Tag
tags question: http://stackoverflow.com/q/27041685
tags question: http://stackoverflow.com/q/27150465
tags question: http://stackoverflow.com/q/27084743
tags question: http://stackoverflow.com/q/27027914
tags question: http://stackoverflow.com/q/26996619
tag name: safari

http://stackoverflow.com/comment/42940002
type: Comment
type: QuestionComment
has text: @Basj Nice app, but I don't see the gain from preventing browser zoom. (I see that it doesn't make sense to use browser zoom when using the app, but that's not the same thing.)
comment on: http://stackoverflow.com/q/27116221
score: 0

http://stackoverflow.com/q/27059455
tagged with: datatable
has title: how to filter certain rows from datatable based on some value which should not be added to the table display too
has answer: http://stackoverflow.com/a/27059566
score: 0
has answer: http://stackoverflow.com/a/27060006
type: Question
has body: I am rendering datatable in my jsp page. datatable receives json of array of objects from servlet. Now I have one parameter called id which should not be added to the table but i need to filter rows based on that id how to achieve this?? Here is my ajax call var table; function fetchClients(id){ //alert('Id received:'+id); $('document').ready(function(){ if(table) table.destroy(); table=$('#example').dataTable({ "processing":true, "serverSide":true, "ajax":{ "url":"/DashBoard/FetchClients", "dataType":"json", "data": {alertId: id}, "type":"POST" }, "aoColumns":[ {"mData": "clientId"}, {"mData":"clientName"}, {"mData": "AliasName"}, {"mData": "Status"}, {"mData": "Time"}, {"mData": "Date"} ] }); }); }
tagged with: javascript
tagged with: jquery
answer count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/27065679
has body: I have form with a textfield, a dropdown menu, some radiobuttons and a textarea. everything works fine except the dropdown menu. Here is it: Heino Michael Jackson Tom Waits Nina Hagen Marianne Rosenberg Send If i click the button my JS gets every value but the dropdown shows undefined $('#send').click(function() { var result=true; var name = $('input[name=name]'); var employee = $('input[name=employee)'; var product = $('input[name=product]:checked'); var knowledge = $('input[name=knowledge]:checked'); var message = $('textarea[name=message]'); // Data var data = 'name=' + name.val() + '&employee=' + employee.val() + '&product=' + product.val() + '&knowledge=' + knowledge.val() + '&message=' + encodeURIComponent(message.val()); product and knowledge are radiobuttons. they work. name and message also. Is there a way like the "checked" for the radio buttons? this script should show a little success message if the formular was send successfully as an email.
answer count: 3
has answer: http://stackoverflow.com/a/27066230
upvote count: 1
tagged with: javascript
favorite count: 0
has title: Get dropdown variable in JS returns undefined
possible better answer: http://stackoverflow.com/a/27066230
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42645436
has answer: http://stackoverflow.com/a/27065761
downvote count: 0
type: Question
type: AnsweredQuestion
score: 1
tagged with: forms
has answer: http://stackoverflow.com/a/27065856
accepted answer: http://stackoverflow.com/a/27065856
has comment: http://stackoverflow.com/comment/42644903

http://stackoverflow.com/comment/42792481
score: 0
type: Comment
has text: ``
comment on: http://stackoverflow.com/a/27129539
type: AnswerComment

http://stackoverflow.com/a/27002920
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/42535525
answers question: http://stackoverflow.com/q/26991953
has body: What you have already is pretty close. Looking at the documentation for grunt-contrib-clean, it seems you should take a look at their "long" usage example. I believe you can do this simply by configuring clean as so: clean: { target: { src: "path/to/target", options: { force: true }, all: { //.. } }, otherFolder: { src: "path/to/other/folder", options: { force: true }, all: { //.. } } } Then, you can register the task by referencing which clean you want: grunt.registerTask('build', ['clean:target', 'clean:otherFolder']); As a side note: I would double check if you really need to use the force option. Per the documentation: use with caution.
accepted answer of: http://stackoverflow.com/q/26991953
score: 4

http://stackoverflow.com/q/27026561
type: Question
tagged with: c#
tagged with: javascript
has title: Reaching AngularJS functions across files using Jasmine
answer count: 1
tagged with: jasmine
has body: So I am learning Jasmine and I am trying to apply it to a very large project right now to test some Angular JS methods. I have a Jasmine test file, which shows me the results from the tests, however it will only run/reach methods within that same JS test file. What I am trying to do is access methods in other files (different locations of my C# solution) and I am not sure how to do this. Right now I am just using the following as a sample function (helloWorld) and test (describe). //method to test function helloWorld() { return "Hello world!"; } //actual test describe("Hello world", function () { it("says hello", function () { expect("/app/views/dashboard/clientQuoteView.html/"+helloWorld()).toEqual("Hello world!"); }); }); I am trying to stick helloWorld() in a different file, and get the result passed back to my describe() statement. How do I do this or point to my method correctly? Lets say my pathway for the jasmine test file (the describe method) is ProjectName/app/tests/jasminetests.js, and I stick the helloWorld() function at pathway ProjectName/app/services/calculate.js Here is an example of what the jasmine page looks like, it currently is showing 5 of 6 (the 5 are within that js test file, while the 6th is the test trying to find and run the helloWorld method in a different file). It is not error'ing for the 6th test because it cannot find that helloWorld method.
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27032133
tagged with: unit-testing
score: 0

http://stackoverflow.com/q/27089385
has body: Using parse.com and JavaScript SDK. Created a fiddle to show this issue http://jsfiddle.net/Dano007/wj5vcd5m/12/ For example, at the moment you can add the user 'dave' multiple times. I'd like it to work that you can only add a user once. More info I want to be able to query the _User class and the FriendRequest class. Basically only returning a user that does not have a status of "Connected" from the FriendRequest class. Using the below I get an error saying both queries must use the same class, whats the alternative to this or work around? Could I use matchesKeyInQuery instead? var queryOne = new Parse.Query(Parse.User); queryOne.equalTo("username", friendName); // find users that match var queryTwo = new Parse.Query(FriendRequest); queryTwo.notEqualTo("status", "Connected"); // find users that match var mainQuery = Parse.Query.or(queryOne, queryTwo); mainQuery.find({ PARSE BACKEND. So there can be multiple records in both the fromUser and toUser columns, but only one request to each user should be possible. For example a3aePaphB4 can only have one record where a request is saved to netD5wqnRP
answer count: 1
accepted answer: http://stackoverflow.com/a/27094294
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/42690250
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42692638
has answer: http://stackoverflow.com/a/27094294
has title: Correctly returning results from multiple parse classes
type: Question
has comment: http://stackoverflow.com/comment/42691697
has comment: http://stackoverflow.com/comment/42690167
tagged with: javascript
score: 0

http://stackoverflow.com/q/27052504
type: Question
has answer: http://stackoverflow.com/a/27052539
accepted answer: http://stackoverflow.com/a/27052539
tagged with: javascript
has title: Check if specific set of checkboxes are checked
answer count: 2
has answer: http://stackoverflow.com/a/27052935
downvote count: 0
tagged with: jquery
has body: I'm trying to figuring out how to see if a certain set of checkboxes are checked. I can get my script to work to check if a single box, specific box is checked, but can't figure out the more complex case. Checkboxes: &lt;input type="checkbox" id="option1" value="1" &gt; &lt;input type="checkbox" id="option2" value="2"&gt; &lt;input type="checkbox" id="option3" value="3"&gt; The relevant part of the jquery: if ($('input[id=option1]').is(':checked')) { //do something } Basically, what I want to do is this (which I know doesn't work): if ($('input[id=option1]').is(':checked')) AND ($('input[id=option2]').is(':checked')) { //do something } How do I accomplish something like this? I need to be able to check a if a number of different combinations are true. Any help would be appreciated. Thanks.
favorite count: 0
tagged with: checkbox
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27052935
score: 1
upvote count: 1

variables
tag name: variables
tags question: http://stackoverflow.com/q/27000701
tags question: http://stackoverflow.com/q/27047956
tags question: http://stackoverflow.com/q/27024456
tags question: http://stackoverflow.com/q/27128873
type: Tag
tags question: http://stackoverflow.com/q/27082488
tags question: http://stackoverflow.com/q/27146961
tags question: http://stackoverflow.com/q/27090463
tags question: http://stackoverflow.com/q/27123776
tags question: http://stackoverflow.com/q/27099822
tags question: http://stackoverflow.com/q/27007231
tags question: http://stackoverflow.com/q/27060411
tags question: http://stackoverflow.com/q/27011366
tags question: http://stackoverflow.com/q/27005875
tags question: http://stackoverflow.com/q/27092175
tags question: http://stackoverflow.com/q/27073015
tags question: http://stackoverflow.com/q/27106008

http://stackoverflow.com/q/27116105
has title: Script to automatically bookmark the links on a page
has body: I want to bookmark all the links present on a site into a new bookmarks folder. Is there any script to do that? Example: From the Wikipedia page containing a list of American Scientists (http://en.wikipedia.org/wiki/List_of_American_scientists), I want to bookmark each and every link containing the scientist names into a new folder named "American Scientists". Thanks!
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/19655855
favorite count: 0
tagged with: regex
has answer: http://stackoverflow.com/a/27116211
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
tagged with: javascript
tagged with: bookmarks

http://stackoverflow.com/q/27113255
has comment: http://stackoverflow.com/comment/42729530
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/27113450
has answer: http://stackoverflow.com/a/27113395
has title: JavaScript increase and decrease font size
has comment: http://stackoverflow.com/comment/42729818
answer count: 2
upvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42729407
downvote count: 2
type: Question
has body: I am new to JavaScript. I would like to add to add two buttons for my visitors to control font size. I would like to include two tags - 'p' and 'blockquote". Can you please help me edit this code in order to include both? var min = 8; var max = 18; function increaseFontSize() { var p = document.getElementsByTagName('p'); for (i = 0; i &lt; p.length; i++) { if (p[i].style.fontSize) { var s = parseInt(p[i].style.fontSize.replace("px", "")); } else { var s = 12; } if (s != max) { s += 1; } p[i].style.fontSize = s + "px" } } function decreaseFontSize() { var p = document.getElementsByTagName('p'); for (i = 0; i &lt; p.length; i++) { if (p[i].style.fontSize) { var s = parseInt(p[i].style.fontSize.replace("px", "")); } else { var s = 12; } if (s != min) { s -= 1; } p[i].style.fontSize = s + "px" } } Thank you.

http://stackoverflow.com/comment/52026885
type: QuestionComment
has text: Yes it must be included the directive. Thanks to point it out.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27103867

http://stackoverflow.com/q/27126224
answer count: 5
has body: I have a .tpl file and I want to add a couple of charts to it. The values are to be fetched from MySQL database. For the charts, I am using Highcharts. Here is the fiddle I want my charts to look exactly like it, ofcourse the values would change. http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/column-basic/ So my code is: When I put this in my .tpl file, it shows nothing. Can anyone say what am I doing wrong. Should I add the latest version of jquery or something.. I have an additional thing to mention, when I try to use this in a separate jsfiddle, it doesn't work there as well.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27130011
upvote count: 1
has comment: http://stackoverflow.com/comment/42752267
has comment: http://stackoverflow.com/comment/42752349
has title: Highcharts not showing up
has answer: http://stackoverflow.com/a/27128421
has answer: http://stackoverflow.com/a/46326736
type: Question
has answer: http://stackoverflow.com/a/27142158
has comment: http://stackoverflow.com/comment/42761151
tagged with: highcharts
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42755715
has answer: http://stackoverflow.com/a/27142014
score: 1
favorite count: 0

http://stackoverflow.com/comment/42684601
score: 0
type: Comment
type: QuestionComment
has text: I edited the post cause I don't really understand how to put it in a comment, is that what you wanted? :)
comment on: http://stackoverflow.com/q/27088440

http://stackoverflow.com/a/27133192
accepted answer of: http://stackoverflow.com/q/27130073
answers question: http://stackoverflow.com/q/27130073
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43744461
type: Answer
downvote count: 0
score: 1
has body: Figured it out. One just has to watch for transition event. See API doc here. var fsm = new machina.Fsm({ initialState: 'A', states: { "A": {}, "B" : {}, "C" : {} } }); fsm.on('transition', function(transition){ console.log("[" + transition.fromState + "] -(" + transition.action + ")-&gt; [" + transition.toState + "]"); });

http://stackoverflow.com/q/27096983
tagged with: function
has comment: http://stackoverflow.com/comment/42699390
has title: Javascript - Function not activating?
favorite count: 0
has comment: http://stackoverflow.com/comment/42699695
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42699737
has comment: http://stackoverflow.com/comment/42699575
has comment: http://stackoverflow.com/comment/42699789
answer count: 0
has comment: http://stackoverflow.com/comment/42699451
tagged with: innerhtml
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42699392
has comment: http://stackoverflow.com/comment/42699658
has body: I've got a problem, I'm doing a program that updates a table on an html page to take an amount of dice rolls from a user, and then use an array to save the frequency of the numbers rolled and calculate the % they counted towards the total rolls of the user. I seem to be having an issue however, my debugger shows that my prompt message is getting a value from the user, the array is initialized to 0, but the array does not seem to be updated via my function like it should. On top of that, I was testing updating the id table data sections to prepare them to display this data, but nothing seems to be showing. Could anyone let me know what I'm doing wrong exactly? I know functions are usually activated by buttons, but I wasn't sure if the prompt button did this by default or not. Any help is very appreciated, thank you! UPDATE: With help from comments below the code is updated and the array is properly counting rolls. Woohoo! I still seem to be unable to get things to print over into table data tags on the html page however. I'll try placing it within the function and see if it helps. // Prompts the user to set the amount of desired rolls var rolls = prompt("How many rolls of the dice do you want?", ""); // Declare and initialize the frequencies array to 0 var frequencies = new Array(13); for (var index = 2; index <= 12; index++) { frequencies[index] = 0; } // Determine if user entered a valid number of rolls to make if (rolls != null) { calculateRolls(); } else { rolls = prompt("You did not enter a valid number. Please try again.", ""); } // Rolls the die and stores the frequency of rolls function calculateRolls() { for (var i = 0; i < rolls; i++) { var roll1 = Math.floor(Math.random() * 6) + 1; var roll2 = Math.floor(Math.random() * 6) + 1; sum = roll1 + roll2; frequencies[sum]++; } } // Display frequency and percentage of rolls on the main page var freq2 = document.getElementById("f2"); freq2.innerHTML = "test array should go here"; Here's the HTML code as well, f2 be…
has comment: http://stackoverflow.com/comment/42699607
score: 0

http://stackoverflow.com/a/27007535
answers question: http://stackoverflow.com/q/27007501
has comment: http://stackoverflow.com/comment/42543818
accepted answer of: http://stackoverflow.com/q/27007501
has comment: http://stackoverflow.com/comment/42544175
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42543786
type: Answer
has comment: http://stackoverflow.com/comment/42543984
score: 4
has body: This covers the case of isFinite(""), isFinite(null) and isFinite(false) all returning true, because isFinite blindly converts its argument to a number and treats any of these like 0. Starting with the numeric conversion... Number("") // 0 Number(false) // 0 Number(null) // 0 Number(undefined) // NaN ... isFinite has some surprising results: isFinite("") // true isFinite(false) // true isFinite(null) // true isFinite(undefined) // false Meanwhile, _.isFinite returns something more like you might expect, because parseFloat returns NaN for all these values _.isFinite("") // false _.isFinite(false) // false _.isFinite(null) // false _.isFinite(undefined) // false Note that you can get the same explicit checking with Number.isFinite, which doesn't attempt to convert its argument (but which is less well supported across browsers): Number.isFinite("") // false Number.isFinite(false) // false Number.isFinite(null) // false Number.isFinite(undefined) // false

http://stackoverflow.com/q/27099782
answer count: 0
type: UnansweredQuestion
tagged with: facebook
score: 0
has comment: http://stackoverflow.com/comment/42738349
type: Question
has comment: http://stackoverflow.com/comment/42707321
has comment: http://stackoverflow.com/comment/42707238
tagged with: javascript
has comment: http://stackoverflow.com/comment/42704526
has comment: http://stackoverflow.com/comment/42707034
has body: I am adding a facebook send button to my website, for users to invite their friends. When user click a tool image a dialog with the send button will show. However if the dialog is close and open again, the send button dispappears. The code to show the dialog is The blocked lines show will display the button. It is a tag actually. Before I call the button, the situation of the website is like this . And after I do it, the situation is like this . There are extra js files from four domains. I seriously doubt that they are the very reason why the button don't show.. Is there anyone know how to clear those cash files?
has title: How to clear cached JavaScript files from other domain?

http://stackoverflow.com/q/27128730
type: Question
tagged with: angular-google-maps
has answer: http://stackoverflow.com/a/33956362
tagged with: google-maps
tagged with: javascript
has title: Hiding all info windows on click with angular-google-maps
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/42757502
answer count: 1
downvote count: 0
has body: I am using the angular google maps api defined here: https://angular-ui.github.io/angular-google-maps/#!/api I have the following DOM structure I am trying to make it so that the info window closes when any other part of the map is clicked on, or when another window is opened. The closest I have gotten is calling: scope.infoWindows.getChildWindows() which gives access to the marker objects, however calling the associated hideWindow functions appears to do nothing. Does anyone know how to do this?
accepted answer: http://stackoverflow.com/a/33956362
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42757611
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/a/27084336
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42678281
downvote count: 0
answers question: http://stackoverflow.com/q/27082749
upvote count: 2
has comment: http://stackoverflow.com/comment/42678143
type: Answer
has comment: http://stackoverflow.com/comment/42678049
has body: One approach would be to use an ArrayController that renders itself again if a list of replies is available. Example: http://emberjs.jsbin.com/yamudi/1/edit?html,js,output
has comment: http://stackoverflow.com/comment/42733639
score: 2
accepted answer of: http://stackoverflow.com/q/27082749

http://stackoverflow.com/comment/42657200
has text: Thank you @Billy looking forward to hearing back :)
comment on: http://stackoverflow.com/q/27072114
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27043258
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27043157
upvote count: 2
type: Answer
has body: No, there is no way to do this in JavaScript. If you use the same variable name in the inner scope, the outer scope variable becomes completely inaccessible to that inner scope. Edit: Except, of course, when the outer scope is the global scope. Then you could use window.sample.
score: 2
has comment: http://stackoverflow.com/comment/42605633
has comment: http://stackoverflow.com/comment/42606191
has comment: http://stackoverflow.com/comment/42605523
accepted answer of: http://stackoverflow.com/q/27043157

http://stackoverflow.com/q/27127030
type: Question
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/29728709
has title: wp_localize_script with handle jquery - wordpress script
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: I'm looking for next solution. I want faster website so I concat all JS to one file and placed in footer. One of my js is jQuery and I use next hook and function: if (!function_exists("ef_theme_scripts")) { function ef_theme_scripts() { wp_deregister_script('jquery'); wp_register_script('jquery', get_template_directory_uri() . '/js/min/script.min.js', null, null, true); wp_enqueue_script('jquery'); $params = array( 'ajax_url' =&gt; admin_url('admin-ajax.php'), 'ajax_nonce' =&gt; wp_create_nonce('user_nonce'), ); wp_localize_script( 'jquery', 'ajax_object', $params ); } } add_action('wp_enqueue_scripts', 'ef_theme_scripts'); I called my handle "jquery" because there can be some scripts (e.g. from plugins) which wants use jquery so I need add called this handle "jquery". Everything works great except localize. When I rename script handle for example to "custom-jquery" then wp_localize_script works without problem. I use WP 4.0.1. Thanks for help
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27127471
upvote count: 1
tagged with: php
linked to: http://stackoverflow.com/q/29723872
score: 1
tagged with: wordpress

http://stackoverflow.com/comment/42520816
type: Comment
type: QuestionComment
has text: Seems to work, found a few tutorials which talk about it: http://s3.amazonaws.com/doc/s3-example-code/post/post_sample.html
comment on: http://stackoverflow.com/q/26994277
score: 0

http://stackoverflow.com/a/27116044
type: Answer
accepted answer of: http://stackoverflow.com/q/27115928
answers question: http://stackoverflow.com/q/27115928
type: AcceptedAnswer
score: 0
has body: I think you need to swap the order to stop() and fadeIn()/fadeOut(), because your second stop() may terminate the first fadeIn() when it is still running. $('#main_menu &gt; li').hover( function () { $('ul', this).fadeIn(300).stop(); }, function () { $('ul', this).fadeOut(300).stop(); } ); It may be easier if you can give out a JSFiddle.

http://stackoverflow.com/a/27095624
has body: I haven't used this Form Validator before, so I might be going out on a limb here. But, I'm looking through the documentation and I see nothing on support for AJAX forms. Instead of attaching your click event to the #submitComment element, you could instead run your ajax logic inside of your Validator's onSuccess callback, then return false at the end. This way your form would submit asynchronously and you'd still prevent the normal submission process from taking place.
type: Answer
answers question: http://stackoverflow.com/q/27095413
score: 0

http://stackoverflow.com/a/27104455
answers question: http://stackoverflow.com/q/27101875
has comment: http://stackoverflow.com/comment/42715724
upvote count: 3
score: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27101875
type: Answer
has body: Yes, default session manager (using files) locks the session file when you do session_start and releases it when you do session_write_close (or the scripts ends). Meanwhile other scripts trying to access session, wait to the release. a detailed article here or at the manual session-write-close

http://stackoverflow.com/q/27129939
tagged with: oauth.io
has body: I'm using oauth.io to handle authorization of users' Twitter accounts to pull data from the Twitter API. I use the code exactly as in the demo, inserting my public key and using 'twitter' as the provider: OAuth.initialize('key'); //OAuth.io public key OAuth.popup('twitter') .done(function (result) { // Perform API calls console.log(result); }) .fail(function (error) { // Handle errors }); When I open the page, a popup window opens, but then closes immediately before I can see anything or diagnose what's going wrong. I read this answer but it didn't seem to address the issue of the popup closing, just that the author needed to include jQuery, which I've already done. Questions: Is there anything I might have done wrong in configuring or setting up my apps, either on oauth.io or Twitter? Is there a way to diagnose what's happening in the popup between when it opens and closes?
linked to: http://stackoverflow.com/q/23083817
tagged with: twitter
upvote count: 1
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/43644037
type: UnansweredQuestion
has title: OAuth.io popup window closing immediately
downvote count: 0
has answer: http://stackoverflow.com/a/29084500
score: 1
favorite count: 0
tagged with: oauth
type: Question
has comment: http://stackoverflow.com/comment/43694522
has comment: http://stackoverflow.com/comment/43295508

http://stackoverflow.com/q/27040942
upvote count: 8
type: UnansweredQuestion
tagged with: php
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/52062414
has body: Is it possible to check whether or not the amount that the client sees and the amount that the server sees is the same? Here I set the amount on the client side: Purchase I am sending the token from client-side stripe callback to server: <?php require_once(dirname(__FILE__) . '/config.php'); $token = $_POST['stripeToken']; $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1000000000000, 'currency' => 'usd' 'email' => 'customer@example.com', 'card' => $token )); echo ' Successfully charged $2! '; ?> The client side number is clearly lower than the amount on the server side, and stripe charges the server side number.
has title: Stripe checkout. Checking client amount
answer count: 1
tagged with: stripe-payments
favorite count: 0
score: 8

http://stackoverflow.com/comment/42656844
has text: This memory object is messing with my brain.
comment on: http://stackoverflow.com/q/27072078
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27140243
has body: Solution: You cannot parametrize your query-selectors anywhere. It is only possible on data that you put into your query. The above wouldn't work, but following query would: var query = [ 'CREATE (p:LABEL {mdata})', 'RETURN p' ].join('\n').replace('LABEL', label); var params = { mdata : data }; this.db.query(query, params, function (err, results) { if (err) throw err; console.log(results); return results[0]; });
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27139988

http://stackoverflow.com/q/27066118
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27067466
type: UnansweredQuestion
has title: Json object to Google pie chart
tagged with: c#
has body: I cannot draw a Google pie chart that has it's DataTable populated by a Json object. This is my code to generate the data object (from my code behind). public string getJsonObj() { Utility utils = new Utility(); List&lt;Item&gt; dataList = new List&lt;Item&gt;(); dataList.Add(new Item("Mosta",50)); dataList.Add(new Item("Naxxar",60)); string json = utils.JsonString(dataList); this.ChartData.Value = json; return json; } Item Class public class Item { private string location = ""; private int frequency = 0; public Item(string location, int frequency) { this.Location = location; this.Frequency = frequency; } public string Location { get { return location; } set { location = value; } } public int Frequency { get { return frequency; } set { frequency = value; } } } HTML &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1", { packages: ["corechart"] }); google.setOnLoadCallback(drawChart); &lt;script type="text/javascript"&gt; function drawPieChart() { var data = google.visualization.DataTable(document.getElementById("ChartData").value)); var options = { title: 'Test Pie Chart' }; var chart = new google.visualization.PieChart(document.getElementById('piechart1')); chart.draw(data, options); } &lt;/script&gt; &lt;div id="piechart1" style="width: auto; height: auto;"&gt;&lt;/div&gt; Can some one please explain to me why this is not showing. Thanks.
type: Question
tagged with: google-visualization

http://stackoverflow.com/q/27066237
possible better answer: http://stackoverflow.com/a/27066452
tagged with: jquery
has comment: http://stackoverflow.com/comment/42645964
has answer: http://stackoverflow.com/a/27066452
has comment: http://stackoverflow.com/comment/42646045
has answer: http://stackoverflow.com/a/27066466
accepted answer: http://stackoverflow.com/a/27066466
has comment: http://stackoverflow.com/comment/42645903
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42645981
type: Question
has title: Javascript random number loop not working
has body: I have the following function that should return to me a generated number of the length I have input in the input field. Here is the example: http://jsfiddle.net/s91fb8jx/31/ As I click the button nothing is returned, why? $(document).ready(function(){ var $group = "09", $group_l = $group.length, $size = $('#size').val(); function num_gen(num){ var output = ""; if(size &gt; 0){ while(output.length &lt; num) { output += $group[Math.floor(Math.random() * $group_l)]; } return output; } else { return "" } } $('#btn').on('click', function(){ console.log(num_gen($size)); }); });
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/q/27150874
has answer: http://stackoverflow.com/a/27151159
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: How to create Checkbox with label on the left and styling
has comment: http://stackoverflow.com/comment/42800808
has comment: http://stackoverflow.com/comment/42800828
tagged with: checkbox
tagged with: css
has answer: http://stackoverflow.com/a/27151375
type: AnsweredQuestion
tagged with: stylesheet
has body: I've seen a visual design like below: basically it is a checkbox (with label on the left, and styled border and all...) works as a filter. I don't wanna reinvent the wheels but after half-day googling I found nothing fit or near to this design. First obstacle is move the label to the left which is normally on the right. Furthermore, the styling is pretty painful if using pure CSS. So I would ask your help on this, would you please provide some idea? any idea will be helpful. Thanks in advance!
type: Question
has answer: http://stackoverflow.com/a/27152113
accepted answer: http://stackoverflow.com/a/27152113
tagged with: javascript
has comment: http://stackoverflow.com/comment/42801659
has comment: http://stackoverflow.com/comment/42801842
possible better answer: http://stackoverflow.com/a/27151375
has comment: http://stackoverflow.com/comment/42796570
score: 0
has comment: http://stackoverflow.com/comment/42800723

http://stackoverflow.com/comment/42600433
has text: What exactly is 'not working'?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27040426

http://stackoverflow.com/comment/42612918
type: Comment
type: QuestionComment
has text: So the real question is why does .save() return a circular reference error, since clearly calling set() does not persist the changes to Firebase.
comment on: http://stackoverflow.com/q/27045483
score: 0

http://stackoverflow.com/q/27004430
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27004479
type: Question
has comment: http://stackoverflow.com/comment/42538243
linked to: http://stackoverflow.com/q/263965
score: 0
accepted answer: http://stackoverflow.com/a/27004479
answer count: 1
tagged with: javascript
has title: ng-checked not recognizing true/false when taken from localstorage
tagged with: angularjs
has body: I have the code snippet below inside of my controller. In my HTML, I have a checkbox with ng-checked="enterToSend" attached to it. As well as an ng-click="enterToSendCheck()" $scope.enterToSend = localStorage.getItem('enterToSend'); $scope.enterToSendCheck = function() { $scope.enterToSend = ($scope.enterToSend == false) ? true : false; localStorage.setItem('enterToSend', $scope.enterToSend); } It's updating properly in localstorage. I open up localstorage, check it on/off and it updates to true/false in my browser. However, when loading the page, using ng-checked or the regular checked attribute, it's checked (whether true or false). Why is this?

http://stackoverflow.com/a/27008111
answers question: http://stackoverflow.com/q/27008006
score: 0
type: Answer
has body: You should do it this way: Demo HTML: &lt;input type="password" /&gt; JavaScript: var inpt = document.querySelctor('input[type="password"]'); inpt.onkeydown = function() { alert(inpt.value); }

http://stackoverflow.com/q/27058077
tagged with: css
has title: How do I change css styles using AngularJS?
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27058150
score: 0
answer count: 2
has body: Although I'm normally able to make css styles for web pages, any change I try to make to css using AngularJS, even using ng-style="xy", doesn't seem to change anything on the page. Here is my code: <th ng-style="{ display: 'inline-block', white-space: 'nowrap', -webkit-transform: 'translate(0em, 0em) rotate(-90deg)', -moz-transform: 'translate(0em, 0em) rotate(-90deg)', -o-transform: 'translate(0em, 0em) rotate(-90deg)', transform: 'translate(0em, 0em) rotate(-90deg)', -webkit-transform-origin: '0em 0em', -moz-transform-origin: '0em 0em', -o-transform-origin: '0em 0em', transform-origin: '0em 0em', -ms-transform: 'none', -ms-transform-origin: 'none', filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)', position: 'absolute', bottom: '0em\9' }" ng-repeat="(key,headline) in model.headlines" ng-class="headline.classes" data-ng-bind="headline.name"> {{headline}} Speichern
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/27058223
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/27107782
has answer: http://stackoverflow.com/a/27108050
has comment: http://stackoverflow.com/comment/42719073
type: Question
has comment: http://stackoverflow.com/comment/42718706
has body: I am trying to grab user input from a dynamic form using jquery serialize. My form looks like this Search I want to take the input, and attach it to the end of websters dictionary URL to search for a word. http://www.merriam-webster.com/dictionary/ + (user input) When you run an alert to see what the value of 'q' is, you get q=input so for example if I put 'cats' the alert would say q=cats. I want the the string to just be what the user entered. However, you need to give the input a name to use seralize. So how can I take the user input, and strip out the 'q=' part. EDIT as requested here is the function I'm calling. Note. I HAVE to use serialize(); This isnt an option. function webster() { var stringHolder = $("#lookUpForm").serialize(); alert(stringHolder); $.ajax({ type: 'GET', crossDomain: 'true', url: "http://www.merriam-webster.com/" + stringHolder, success: function (data) { console.log(data); console.log("http://www.merriam-webster.com/" + stringHolder); }, error: function () { alert("Failed to get dictionary data"); console.log("http://www.merriam-webster.com/dictionary/" + stringHolder); } }); };
has comment: http://stackoverflow.com/comment/42718747
has title: parse name from user input when using jquery serialize
has comment: http://stackoverflow.com/comment/42718746
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27107873
score: 0
has answer: http://stackoverflow.com/a/27107873
answer count: 2
accepted answer: http://stackoverflow.com/a/27108050
has comment: http://stackoverflow.com/comment/42718657
type: AnsweredQuestion

http://stackoverflow.com/comment/42904046
type: Comment
comment on: http://stackoverflow.com/a/27164577
type: AnswerComment
score: 0
has text: That explains so much. I'm just wondering about one more thing. I was trying to load different meshes through separate buffers and that led me to your point----"If you set them up attributes #1 and #2 to buffers that each have 3 vertices but you ask to draw 6 vertices with gl.drawArrays you'll get an error"---- Does that mean that if I have separate buffers,for each geometry(I don't know if that's a best practice) I have to call drawxxx several times?

http://stackoverflow.com/a/27001375
has comment: http://stackoverflow.com/comment/46881853
accepted answer of: http://stackoverflow.com/q/27000366
downvote count: 0
has body: One option I could think of is As you get a model/object from service, create a replica of the model within the model and bind this new model to your view. Add a watch on the new Model and as the model changes, use the replica to compare old and new models as follows var myModel = { property1: "Property1", property2: "Property2", array1:["1","2","3"] } var getModel = function(myModel){ var oldData = {}; for(var prop in myModel){ oldData.prop = myModel[prop]; } myModel.oldData = oldData; return myModel; } var getPropChanged = function(myModel){ var oldData = myModel.oldData; for(var prop in myModel){ if(prop !== "oldData"){ if(myModel[prop] !== oldData[prop]){ return{ propChanged: prop, oldValue:oldData[prop], newValue:myModel[prop] } } } } }
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27000366
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42535402
score: 2
has comment: http://stackoverflow.com/comment/42547757

http://stackoverflow.com/q/27065230
tagged with: camanjs
has title: How to split up an image in pieces and reshuffle it, using HTML, Javascript or CamanJS?
tagged with: image-processing
downvote count: 1
type: AnsweredQuestion
has body: I want to create puzzle images out of original images, meaning that an image is cut into 9 pieces (3x3) and then shuffled and stored as a new image. Does anyone know which method is the best to do so and how to achieve it? Perhaps with CamanJS? Does anyone have an example code?
has answer: http://stackoverflow.com/a/27067519
upvote count: 5
tagged with: javascript
score: 4
type: Question
tagged with: html5-canvas
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27067519

http://stackoverflow.com/a/30906566
has comment: http://stackoverflow.com/comment/104260233
upvote count: 4
has comment: http://stackoverflow.com/comment/67124836
downvote count: 1
score: 3
has body: Better and clean example using JS only Reference: TheDeveloperBlog.com Step 1 - Create your java script and place it in your HTML page. &lt;script type="text/javascript"&gt; function ShowLoading(e) { var div = document.createElement('div'); var img = document.createElement('img'); img.src = 'loading_bar.GIF'; div.innerHTML = "Loading...&lt;br /&gt;"; div.style.cssText = 'position: fixed; top: 5%; left: 40%; z-index: 5000; width: 422px; text-align: center; background: #EDDBB0; border: 1px solid #000'; div.appendChild(img); document.body.appendChild(div); return true; // These 2 lines cancel form submission, so only use if needed. //window.event.cancelBubble = true; //e.stopPropagation(); } &lt;/script&gt; in your form call the java script function on submit event. &lt;form runat="server" onsubmit="ShowLoading()"&gt; &lt;/form&gt; Soon after you submit the form, it will show you the loading image.
answers question: http://stackoverflow.com/q/27026323
type: Answer

http://stackoverflow.com/a/27066349
has comment: http://stackoverflow.com/comment/42647424
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27066247
accepted answer of: http://stackoverflow.com/q/27066247
type: AcceptedAnswer
downvote count: 0
has body: You have to clone your vertices array, because otherwise it's always a reference to the original vert array. Try this: //Cube object function Cube(name, vertices, cubeVertInd, color, scale, positionX, positionY, positionZ) { // make a copy of the vertices vertices = vertices.slice(); this.name = name; this.vertices = vertices; this.cubeVertexIndices = cubeVertInd; this.positionX = positionX; this.positionY = positionY; this.positionZ = positionZ; this.setColor(color); this.setScale(vertices, scale); }

http://stackoverflow.com/comment/42733044
score: 0
type: QuestionComment
type: Comment
has text: @JamesThorpe I gave that a try. It still doesn't run.
comment on: http://stackoverflow.com/q/27114863

http://stackoverflow.com/a/36793937
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/85563471
answers question: http://stackoverflow.com/q/27047365
has body: In app.js change: pdf.addHTML(document.getElementById('pdfTable'),function() { }); pdf.save('pdfTable.pdf'); to pdf.addHTML(document.getElementById('pdfTable'),function() { pdf.save('pdfTable.pdf'); }); If you see a black background, you can add to sytle.css "background-color: white;"

http://stackoverflow.com/a/27123436
accepted answer of: http://stackoverflow.com/q/27081830
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: I sorted this by doing the following: if(media === null){media = new Media (src , onSuccess, onError);} Only create the new media object if it doesn't exist. If it does exist then its already playing and doesn't need this.
score: 2
answers question: http://stackoverflow.com/q/27081830
upvote count: 2

http://stackoverflow.com/a/27053071
score: 1
has body: requestAnimationFrame is not an element on which an event can be or is fired when the browser loses focus; it just sets up a callback. But standard behavior is that when the browser/tab goes out of focus, callbacks are paused. Therefore, most likely your code (if in a callback) is already being paused. There is a possibility that all browsers may not pause callbacks, but instead slow them down. However, the W3C spec would seem to imply pausing, not slowing: Whenever a Document's hidden attribute ([Page Visibility]) is false and the animation frame request callback list is not empty, the user agent MUST regularly queue a task... If d's hidden attribute is true, continue to the next entry in the contexts list. If you want to be absolutely sure your code is pausing when the tab is out-of-focus, or if the code you are trying to pause is not structured as part of a RAF callback, then you could consider using the Page Visibility API. Note that both RAF and Page Visibility API are available only in IE&gt;=10.
answers question: http://stackoverflow.com/q/27052249
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/a/27000930
upvote count: 6
score: 6
accepted answer of: http://stackoverflow.com/q/27000802
answers question: http://stackoverflow.com/q/27000802
type: AcceptedAnswer
downvote count: 0
has body: Try this: Move your button out of your div: HTML: Add content JS: var i = 1; var deletedDivs = 0; var createdDivs = 0; $(document).ready(function () { $(document).on('click', '.addcontent', function () { if (i == 1) $(".question").html(''); $(".question").append(' Remove Question ' + i + ' This is div text ').show('slow'); createdDivs++; i++; }); $(document).on('click', '.deleteButton', function () { var id = $(this).attr("id"); $("#" + id).remove(); deletedDivs++; if (createdDivs == deletedDivs) { i = 1; } }); }); JSFIDDLE: http://jsfiddle.net/ghorg12110/a7L3cn1a/1/
type: Answer

http://stackoverflow.com/q/27087376
score: 0
has body: I have markup of ul and li. what I need to do is get text value from direct descentc li a text only. Expected result is a,b,c. fiddle jquery $(function(){ $('ul').first().find(' > li').each(function(){ alert($('a',this).text()) }) }) HTML a a1 a2 b c
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27087856
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27087856
has title: get descent li anchor tag text using jquery
type: Question
tagged with: javascript

http://stackoverflow.com/q/27072023
has body: Again, let me start this by thanking for your time to read this and second by apologizing for not being able to actually paste my code.. it's located on a computer that doesn't have internet access. I am working to add an icon to a systray in a web application. The icon changes based on values contained in the model. The systray is has a controller located say myproject/myjs/main/controllers/systraycontroller.js myproject/myjs/main/models/myniftymodel.js myproject/myjs/main/mainModule.js I want to update the model based on user choices on a different page that also has a controller and it's own module myproject/myjs/colors/colorsModule.js myproject/myjs/colors/controllers/colorsController.js My question, what exactly is required in colorsModule.js to get colorsController.js to be able to not only see myniftymodel.js but update it? myniftymodel.js is just a simple model that returns a values array and is used by the DIV in systray.html to display info about the icon.
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/27072048
accepted answer: http://stackoverflow.com/a/27072048
type: Question
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/58447624
favorite count: 0
has title: updating a model in one controller that is watched and located in a different package and used by another controller
tagged with: angularjs

http://stackoverflow.com/comment/42723732
has text: We have all spent way too many hours finding little ones like that. :-) If someone wrote a jshint extension that actually figured out what we *meant* to do by reading our minds, I would pay good money for that!
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/27110369

http://stackoverflow.com/q/27076921
tagged with: ios
tagged with: javascript
has body: I want to update the selected value of checkbox for javascript function in iOS. This is the HTML code for checkbox: &lt;input type='checkbox' name='displayraw' value='yes' selected='true' &gt; I want to change the selected= "false" or "true" when checkbox is checked or unchecked. And here is my code: I used the webview to run submit function but cannot successful. I can change the value for textbox but cannot change the selected value for check box. Please help me. Thanks in advance. NSString* temp = [self.webView stringByEvaluatingJavaScriptFromString: [NSString stringWithFormat: @"document.getElementsByName('%@')[0].selected='%@'",elementName, value]];
type: Question
has title: update checkbox selected in javascript func in iOS
tagged with: uiwebview
has answer: http://stackoverflow.com/a/27076990
tagged with: checkbox
answer count: 1
score: 0
accepted answer: http://stackoverflow.com/a/27076990
type: AnsweredQuestion

http://stackoverflow.com/comment/42737820
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27117659
has text: no error ...combo boxes are shown but ..div are not displayed on changes made in comboxes

http://stackoverflow.com/a/27125851
accepted answer of: http://stackoverflow.com/q/27125641
answers question: http://stackoverflow.com/q/27125641
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42756275
has body: There are two ways you can go about this, one is binding this to the callback, the other is putting this into closure context of the callback funtion. So the first method would be: ... this.Switches = function(ElemIdentifier) { $(ElemIdentifier).bootstrapSwitch(); $(ElemIdentifier).on('switchChange.bootstrapSwitch', function(event, state) { ... }.bind(this)); } ... And the second would be .... var self = this; $(ElemIdentifier).on('switchChange.bootstrapSwitch', function(event, state) { // console.log( $(self).get('name')); var ModuleName = $(self).attr("name"); var name = $(self).data("name") ; var BtnValue = $(self).data("value") ; var url = $(self).data("addr") ; var BtnResult = ''; if (state) { // data-addr // data-name // data-value // result = True Or False BtnResult = 'True'; // alert('Enabling : ' + ModuleName ); } else { BtnResult = 'False'; // alert('Disabling : ' + ModuleName); } // alert(result); var data = { name:BtnValue , result : BtnResult }; console.log(data); console.log(url); self.AjaxCall(url,data); // &lt;&lt; Problem is exactly this line }); ...
score: 1
upvote count: 1

sails.js
tags question: http://stackoverflow.com/q/27028595
type: Tag
tags question: http://stackoverflow.com/q/27041236
tags question: http://stackoverflow.com/q/27025514
tags question: http://stackoverflow.com/q/27120430
tags question: http://stackoverflow.com/q/27145638
tags question: http://stackoverflow.com/q/27021844
tag name: sails.js
tags question: http://stackoverflow.com/q/27071545
tags question: http://stackoverflow.com/q/27024793

http://stackoverflow.com/a/27152078
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27151928
answers question: http://stackoverflow.com/q/27151928
score: 2
has body: Visual Event gives you an overview of all events bound on a particular page. If you are running chrome you can also get bound events on a DOM node using the command line API: getEventListeners(el); // {click: [..], mouseover: [..], ...} This feature can be wrapped in something like: // Run this in your console: var count = 0; // forEach on all elements in the DOM: [].slice.call(document.getElementsByTagName('*')).forEach(function(el) { // count all bound events using `getEventListeners` var events = getEventListeners(el); for ( var prop in events ) count += events[prop].length; }); console.log('Total events bound: %d', count); Hope you get the general idea.

http://stackoverflow.com/comment/42544925
type: Comment
has text: +1 but not so much "the caller", but "how it's called", if that's not splitting hairs too much (since it might be called from global code). ;-)
score: 0
comment on: http://stackoverflow.com/a/27008372
type: AnswerComment

http://stackoverflow.com/a/27079195
answers question: http://stackoverflow.com/q/27079194
has body: The null-coalescing operator usually works with a simple conditional expression. For example, this code in Spider: var name = options.name ?? "default name"; compiles to the following JavaScript: var name = options.name == null ? "default name" : options.name; (more about equals equals null) Undefined Identifier Problem Note that if the left expression is an identifier, and that identifier is undefined, then the JS interpreter would raise an error. To solve this, the Spider compiler adds an undefined check. For example this code in Spider: var name = name ?? "value"; compiles to the following code in JS: var name = typeof name === "undefined" || name == null ? "value" : name; Note that if you want to do something like options.name ?? "default" and you're not sure if options is defined or not, you can use the null propagating operator: var name = options?.name ?? "default"; Double Function Call Problem If the left expression is a call expression (e.g fn()), then it might get called twice - the first time for the null test, and the second time for the value. To solve this, the Spider compiler moves the call expression to a different variable. For example this code in Spider: var name = getName() ?? "default name"; is compiled into something like: var tmp = getName(); var name = tmp == null ? "default name" : tmp; Statement Problem If the null-coalescing operator is used as a statement and not as an expression, for example: a() ?? b(); then the Spider compiler uses an if statement instead of a conditional expression: if (a() == null) { b(); }
score: 5
accepted answer of: http://stackoverflow.com/q/27079194
type: Answer
upvote count: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27019807
has comment: http://stackoverflow.com/comment/42564479
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/27019915
has comment: http://stackoverflow.com/comment/42564312
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27019886
has answer: http://stackoverflow.com/a/27019903
downvote count: 0
has title: Get element by ID is not working
has answer: http://stackoverflow.com/a/27019847
accepted answer: http://stackoverflow.com/a/27019847
has comment: http://stackoverflow.com/comment/42564722
favorite count: 0
has comment: http://stackoverflow.com/comment/42564394
answer count: 5
has body: Verry simple question: I have this HTML: Some text And this JS in a seperate .js file: $('#test').hover(function(){ alert('it's working'); }); I get no errors from Fire Bug and I googled a lot on this. Please help: Why is my code not working? Thanks in advance
has answer: http://stackoverflow.com/a/27019887
has answer: http://stackoverflow.com/a/27019886
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42564303
has comment: http://stackoverflow.com/comment/42564348

http://stackoverflow.com/q/27087503
answer count: 2
has comment: http://stackoverflow.com/comment/42683043
has body: Allrighty, idea goes something like this ~ You click the middle button/wherever but you want to turn on "left + right + up &amp; down" buttons * * * * * * * 3 * * // "2" is where you click * 3 2 3 * // "3"s are where you want the results to be shown * * 3 * * * * * * * var divs = document.getElementsByTagName('div'); var selectionDiv = document.getElementById('MySecondDiv'); for(var i = 0; i &lt; divs.length;i++) { if(divs[i] == selectionDiv) { var previous = divs[i - 1]; var next = divs[i + 1]; } This is what I've done so far but it only works for sides. Anybody?! I couldn't figure out where to start at all... Thank you
has answer: http://stackoverflow.com/a/27087537
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27087920
tagged with: multidimensional-array
tagged with: css
accepted answer: http://stackoverflow.com/a/27087920
type: AnsweredQuestion
has title: coordinating in 2D array & express them in div's
type: Question
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27087537
score: 0

http://stackoverflow.com/q/26993273
type: Question
tagged with: arrays
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/26993807
has comment: http://stackoverflow.com/comment/42518878
tagged with: jquery
type: UnansweredQuestion
has title: Get Particular node value in array from xml
tagged with: xmlhttprequest
has body: I have one variable name as result in javascript Function. The result variable's value is xml, I need to form an Array with the opportunityid(which is highlighted in Image) values only. how to get from the particular node value and form a array.? I was used following Function, function guid(){ var xml = "&lt;?xml version='1.0' encoding='utf-8'?&gt;" + "&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&gt;" + GenerateAuthenticationHeader() + "&lt;soap:Body&gt;" + "&lt;RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"&gt;" + "&lt;query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\"&gt;" + "&lt;q1:EntityName&gt;opportunity &lt;/q1:EntityName&gt;" + "&lt;q1:ColumnSet xsi:type='q1:ColumnSet'&gt;" + "&lt;q1:Attributes&gt;" + "&lt;q1:Attribute&gt;opportunity id&lt;/q1:Attribute&gt;" + "&lt;/q1:Attributes&gt;" + "&lt;/q1:ColumnSet&gt;" + "&lt;q1:Distinct&gt;false&lt;/q1:Distinct&gt;" + "&lt;/query&gt;&lt;/RetrieveMultiple&gt;" + "&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;"; var xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP"); xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false); xmlHttpRequest.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple"); xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8"); xmlHttpRequest.setRequestHeader("Content-Length", xml.length); xmlHttpRequest.send(xml); var result = xmlHttpRequest.responseXML.xml; var doc = new ActiveXObject("MSXML2.DOMDocument"); doc.async = false; doc.loadXML(result); }
tagged with: http://stackoverflow.com/tag/xml
has answer: http://stackoverflow.com/a/26995674
score: 0

http://stackoverflow.com/q/27114408
has comment: http://stackoverflow.com/comment/50227609
has answer: http://stackoverflow.com/a/27114610
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42774879
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/50246458
type: UnansweredQuestion
score: 1
linked to: http://stackoverflow.com/q/24246811
has body: Following this question I'm using the following method to try to test whether ng-if tagged divs are displaying correctly using Karma, rather than Protractor: var element; beforeEach(inject(function ($rootScope, $templateCache, $compile) { scope = $rootScope.new(); fooController.init(scope); //Some controller function that sets properties on the scope //which are tested for in the template scope.$digest(); var template = $templateCache.get('/my/template'); //Get the cached template var compiled = compile(template)(scope); //Compile it element = angular.element(compiled); //Wrap it with jQuery functions })); it('should do something', function () { var div = element.find('#someDiv'); //Get some div that should be affected by ng-if expect(div.html()).toBeUndefined(); //Expect the div not to be shown due to properties that //were set by fooController.init }); My template has something like this: Foo Here, I'm using expect(div.html()).toBeUndefined(); because ngIf (unlike ngShow and ngHide) removes the entire div from the DOM if the condition inside evaluates to false (ngShow and ngHide apply classes to the div to cause it not to be shown instead). However, when I run this and print out the compiled variable, I find that the HTML of the ngIf div is ALWAYS taken away and replaced with a comment, regardless of the value of scope.shown. Does the Angular compile function used by Karma not work the same way as it does when it's actually rendered by Angular itself in a browser? I ask because when I test it with a browser, it displays correctly, but when I try to unit test it, it outputs the wrong info. Maybe it's also because I'm using PhantomJS for headless testing, but Google Chrome to test it myself?
upvote count: 1
has comment: http://stackoverflow.com/comment/42731844
has title: Testing ng-if divs are displaying correctly with unit tests
tagged with: unit-testing
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/27026596

http://stackoverflow.com/a/27045006
answers question: http://stackoverflow.com/q/27042770
score: 1
upvote count: 1
downvote count: 0
has body: What you could do is save height and width of screen once the page is shown pagecontainershow. And then, on swipe get the current height and width. If the current height/width is greater than inital height/width, ignore the swipe. /* vars */ var windowWidth, windowHeight, currentW, currentH; $(document).on("pagecontainershow", function (e, data) { windowWidth = window.innerWidth; windowHeight = window.innerHeight; }).on("swipeleft", "[data-role=page]", function (e) { currentW = window.innerWidth; currentH = window.innerHeight; if (currentW == windowWidth &amp;&amp; currentH == windowHeight &amp;&amp; $(this).next("[data-role=page]").length != 0) { $.mobile.pageContainer.pagecontainer("change", $(this).next("[data-role=page]"), { transition: "flip" }); } }).on("swiperight", "[data-role=page]", function (e) { currentW = window.innerWidth; currentH = window.innerHeight; if (currentW == windowWidth &amp;&amp; currentH == windowHeight &amp;&amp; $(this).prev("[data-role=page]").length != 0) { $.mobile.pageContainer.pagecontainer("change", $(this).prev("[data-role=page]"), { transition: "flip", reverse: true }); } }); Demo
type: Answer

http://stackoverflow.com/a/74448384
has body: decodeURIComponent(path.basename('http://localhost/node-v18.12.1-x64.msi')) node-v18.12.1-x64.msi
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27006363
score: 2

http://stackoverflow.com/comment/42661346
has text: the distance value is not in the array, I need to append into it.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27074842

awk
tag name: awk
type: Tag
tags question: http://stackoverflow.com/q/27090124

http://stackoverflow.com/comment/42670229
score: 0
type: Comment
type: AnswerComment
has text: I know how I can solve this problem using indexOf function but I was asked to achieve this same functionality without using any api
comment on: http://stackoverflow.com/a/27080206

http://stackoverflow.com/comment/42544434
has text: Remove this line: `send_current_password_for_check_incorrect_or_not();` and it works perfectly.
score: 0
comment on: http://stackoverflow.com/q/27008006
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27005473
has title: Javascript xor ^ with 0 return bad result
has body: I'm using the binary xor operator ^ with 2 variables like this : var v1 = 0; var v2 = 3834034524; var result = v1 ^ v2; The result is -460932772. Have you an idea why ? Thank you
has comment: http://stackoverflow.com/comment/42540076
type: AnsweredQuestion
score: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/27005613
has answer: http://stackoverflow.com/a/27005613
type: Question
has answer: http://stackoverflow.com/a/27005642
has answer: http://stackoverflow.com/a/27005559
has comment: http://stackoverflow.com/comment/42540753
accepted answer: http://stackoverflow.com/a/27005559
tagged with: javascript
upvote count: 3
answer count: 3
has comment: http://stackoverflow.com/comment/42540167
favorite count: 0
tagged with: xor
tagged with: bit-manipulation

http://stackoverflow.com/q/27015207
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/27015293
possible better answer: http://stackoverflow.com/a/27015289
has answer: http://stackoverflow.com/a/27015289
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42555975
type: Question
tagged with: javascript
has title: jQuery pre/append only within parent class name
tagged with: optimization
accepted answer: http://stackoverflow.com/a/27015293
has body: I have a page with lots of repeated items (a list of hotels) I'm using optimizely and I'm trying to move elements around with in each hotel. Every time I pre or append something it moves every element from every hotel into every element. So I'm trying to only pre/append from a class name to a class name if it's with in a parent of the class name. The class name of each hotel is .hotel: $('.rating').prependTo(function(){ $(this).parents('.hotel').prependTo('.price-tag'); }); This obviously isn't working, any help appreciated

http://stackoverflow.com/comment/42661875
comment on: http://stackoverflow.com/q/27055362
score: 0
type: Comment
type: QuestionComment
has text: @dandavis Can you help me, and post as answer what you mention in your comment, so that i can try it too. I tried all the four answer below But none of them worked

http://stackoverflow.com/comment/42747327
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27123360
has text: You're removing everything from the array in the second each loop, so it's always empty
score: 0

http://stackoverflow.com/q/27130882
type: UnansweredQuestion
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/27131056
tagged with: http://stackoverflow.com/tag/html
score: 0
tagged with: php
answer count: 1
has title: Can't get my slideshow to work through my database?
has body: For some reason it displays the first image but wont slide onto the next images. Image sources should be fine, but once i added in php tags for my images the slider functionality stoppe Script in head tags: var slideimages = new Array() // create new array to preload images slideimages[0] = new Image() // create new instance of image object slideimages[0].src = "&lt;?php echo "&lt;img src='images/$firstslider'/&gt;";?&gt;" slideimages[1] = new Image() slideimages[1].src = "&lt;?php echo "&lt;img src='images/$secondslider'/&gt;";?&gt;" slideimages[2] = new Image() slideimages[2].src = "&lt;?php echo "&lt;img src='images/$thirdslider'/&gt;";?&gt;" Code for slider in body: &lt;div id="slider"&gt; &lt;a href="#" id="slide" width="910px" height="250px"&gt;&lt;?php echo "&lt;img src='images/$firstslider' /&gt;";?&gt;&lt;/a&gt; &lt;script type="text/javascript"&gt; var step = 0 function slideit() { if (!document . images) return document.getElementById ('slide').src = slideimages[step].src if (step &lt; 2) step++ else step = 0 setTimeout("slideit()", 2500) } slideit() &lt;/script&gt;

http://stackoverflow.com/a/27106624
accepted answer of: http://stackoverflow.com/q/27099911
type: Answer
has comment: http://stackoverflow.com/comment/42719041
upvote count: 1
has body: i tried this on fiddle: function swap(e) { var src = e.attr('src'); var active = e.hasClass('active'); var dark = src.indexOf('_h.png', src.length - '_h.png'.length) !== -1; e.attr('data-src-dark', dark); if (active || e.attr('data-src-dark') == true) return; e.attr('src', e.attr('data-alt-src')); e.attr('data-alt-src', src); return active; } var sourceSwap = function () { if (!$(this).hasClass('active')) { swap($(this)); } }; var makeActive = function() { var active = $(this).hasClass('active'); $('img.active').each(function() { $(this).removeClass('active'); swap($(this)); }); if (active) $(this).removeClass('active'); else $(this).addClass('active'); swap($(this)); } $(function() { $('img[data-alt-src]') .each(function() { new Image().src = $(this).data('alt-src'); }) .hover(sourceSwap, sourceSwap); $('img[data-alt-src]').on('click', makeActive); }); $('img.active') is a complete set of elements so you should use the 'each' function to handle them all JUST COPY-AND-PASTE to fiddle to check it out yorself :)
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27099911
score: 1
has comment: http://stackoverflow.com/comment/42720363

http://stackoverflow.com/q/27105763
has answer: http://stackoverflow.com/a/27105871
type: Question
score: 7
has comment: http://stackoverflow.com/comment/42714932
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/27105875
has title: How to maintain the page state when browser back button is clicked?
has body: I have a page with Client side paggination and Filtration. The page lists around 200-300 prouducts. The page contains some filters like Category,Manufacturer and Weight. Clicking upon any of the page number or filter, I am manupulating the page content on client side using Jquery. Everything is working fine till this step. Now there is a usecase where I am facing problem. Lets say a user comes to our product listing page and click on some of the filters and gets a list of products. Now he clicks on a particular product , which redirects him to the product page to view the details of the product. But now when the user clicks on the back button , the user gets the page with the intial state without any filter selected. Is there any way user will get the page with the filters previously selected on clicking the back button?
favorite count: 0
has answer: http://stackoverflow.com/a/27105861
has comment: http://stackoverflow.com/comment/42714926
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42714881
tagged with: back-button
upvote count: 7

http://stackoverflow.com/comment/42656003
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27071775
has text: Why is this tagged `jquery` when you don't appear to be using it?
score: 0

http://stackoverflow.com/comment/42574062
has text: Basically, it means the server only returns responses, not rendered pages, e.g. JSON responses to ajax calls, but no server resources, like jsps are returned
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27024125

http://stackoverflow.com/comment/42574124
type: Comment
comment on: http://stackoverflow.com/a/27024911
score: 1
type: AnswerComment
has text: Thank you for the suggestion, but unfortunately this did not fix the issue.

http://stackoverflow.com/comment/42545610
comment on: http://stackoverflow.com/a/27007879
score: 0
type: Comment
has text: take the || isNAN of the location one, I didn't see you had that there
type: AnswerComment

http://stackoverflow.com/comment/42591915
has text: Refactor suggestion: Remove jQuery
score: 0
comment on: http://stackoverflow.com/q/27035519
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27029258
upvote count: 6
type: AnsweredQuestion
has title: how to make screen readers read entire page when angular changes states?
tagged with: nvda
has comment: http://stackoverflow.com/comment/42583236
accepted answer: http://stackoverflow.com/a/27050961
type: Question
has comment: http://stackoverflow.com/comment/42584106
tagged with: firefox
has comment: http://stackoverflow.com/comment/42583149
tagged with: javascript
linked to: http://stackoverflow.com/q/18853183
tagged with: accessibility
has body: Requirement: on each page change the screen reader must read the entire page content. We use firefox+NVDA to do our testing, and since angular doesnt "change pages" we have tried the following to make it read the entire page when changing states: aria-live="assertive" This for the most part read the changes in text in our site,but it only reads what its being added, in our case we have a table being filled with ng-repeat and it reads the information being added but without any context (it doesnt say what row or column is being read) Another issue was forms, when being filled by angular, the screen reader will read it before they were populated by angular, this was solved with a $timeout but still when aria-live reads the changes it would skip some parts, and if we added aria-atomic to force read, we had some selects with multiple options, and those were read (all of them, we have more than a hundred options). which is not how screen readers read, they only read the first ten options or the ones visible when you click on them. Remember that without any aria-live or aria-atomic, when you change states in angular the user is not notified of any changes. after almost giving up we decided that maybe our focus was wrong, we needed to make each state its own page so we used the following: function ForceNVDARead() { $(window).on('hashchange', function () { location.reload(); }); } This for every change in the URL will force a reload. This works GREAT, everything was being read correctly, we almost thought this solved everything. Except this causes double requests from the client to our server. Is there any way to make NVDA read the contents of an angular state like a regular page load, without having to force the reload of the page? Please dont say use aria-roles only or something like that that doesnt work for this and we already have them, we need the application to read everything when changing states. ANY help is appreciated, we are about to give up, and restart the pro…
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27050961
linked to: http://stackoverflow.com/q/18619186
tagged with: angularjs
score: 6

http://stackoverflow.com/q/26997246
tagged with: javascript
score: -1
downvote count: 1
tagged with: jquery
favorite count: 0
has body: i have 6 tabs in my page, they are custom tabs, from a html theme that i developed based in a .PSD file. every tab must open a "tab-content" with this data attribute data-tab-active="true"if is false, then in the CSS this set display: none; to the content. my main problem here, is set the class "active" at clicked tab, and remove from the previous tab and then set true at data-attribute of the tab-content. here my jsfiddle: http://jsfiddle.net/cout1ofr/1/ HMTL: 1 2 3 4 5 6 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam nisi tenetur ea culpa reprehenderit quisquam eos omnis numquam ratione delectus quo veniam obcaecati provident magni ut vel corrupti consequatur laboriosam. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam nisi tenetur ea culpa reprehenderit quisquam eos omnis numquam ratione delectus quo veniam obcaecati provident magni ut vel corrupti consequatur laboriosam. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam nisi tenetur ea culpa reprehenderit quisquam eos omnis numquam ratione delectus quo veniam obcaecati provident magni ut vel corrupti consequatur laboriosam. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam nisi tenetur ea culpa reprehenderit quisquam eos omnis numquam ratione delectus quo veniam obcaecati provident magni ut vel corrupti consequatur laboriosam. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam nisi tenetur ea culpa reprehenderit quisquam eos omnis numquam ratione delectus quo veniam obcaecati provident magni ut vel corrupti consequatur laboriosam. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam nisi tenetur ea culpa reprehenderit quisquam eos omnis numquam ratione delectus quo veniam obcaecati provident magni ut vel corrupti consequatur laboriosam. CSS: .tabs-container { width: 100%; position: relative; } .tabs-container .tabs-btn { } .tabs-container .tabs-btn ul { list-style-type: none; padding: 0; margin: 0; text-align: center; } .tabs-btn…
has answer: http://stackoverflow.com/a/26997605
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/26997509
tagged with: css
answer count: 4
possible better answer: http://stackoverflow.com/a/26997655
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/26997655
has answer: http://stackoverflow.com/a/26997509
has title: inserting active class between tabs
type: Question
has answer: http://stackoverflow.com/a/26997512

http://stackoverflow.com/a/27086709
score: 1
answers question: http://stackoverflow.com/q/27086483
has body: You need to call "fig build" to rebuild the container. I think it is easier to mount a directory on the host-system (via ADD in the dockerfile), you don't have to rebuild the container everytime then.
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42779659
comment on: http://stackoverflow.com/a/27141054
type: Comment
has text: Are you sure? It looks like the source tag is what has the src attribute.
score: 0
type: AnswerComment

http://stackoverflow.com/q/26996785
tagged with: angularjs
has comment: http://stackoverflow.com/comment/45190031
type: UnansweredQuestion
has title: ng-repeat not working in angular
has comment: http://stackoverflow.com/comment/42524484
type: Question
has comment: http://stackoverflow.com/comment/42524775
tagged with: laravel-4
tagged with: javascript
has answer: http://stackoverflow.com/a/26996969
score: 0
answer count: 1
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/42524865
has comment: http://stackoverflow.com/comment/42524495
has body: I am trying to pass a php Laravel array of objects with the name $event to my javascript part of the app and I am having issues with looping through the results later on. Basically what I am doing is this $events = Event::orderBy('id', 'DESC')->orderBy('resolved', 'desc')->get(); //get events return View::make('events.index', compact('events')); //pass events to view And then this is my view {{event.category}} This is my controller var myApp2 = angular.module('myApp2',[]); myApp2.controller('checkboxController', ['$scope', function($scope) { //var events = []; // $scope.some = 'hehehhehehe'; //events.($scope.event); $scope.myevents = myevents; console.log($scope.myevents); /*$scope.toggle = function(id) { alert(id); };*/ }]); The output I get is just {{event.category}} with no value at all. When I do console.log(myevents) or console.log($scope.myevents) in my controller I get the array of objects displayed in the console like this What am I doing wrong and how would I fix this?

http://stackoverflow.com/comment/42650449
comment on: http://stackoverflow.com/q/27067648
has text: Apply the modifications you're making in the zoom handler function to both layers.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42674396
type: Comment
score: 0
type: AnswerComment
has text: You can chain selectors in Jquery, so $('.hide-show , .SECOND_DIV, .THIRD_DIV , .FOURTH_DIV').slideToggle();
comment on: http://stackoverflow.com/a/27081854

http://stackoverflow.com/comment/42617118
score: 0
type: QuestionComment
type: Comment
has text: @IbrahimAsad, I don't know whatz wrong actually I tried it on JSFiddle and it worked nicely.
comment on: http://stackoverflow.com/q/27049577

http://stackoverflow.com/a/27148703
upvote count: 3
answers question: http://stackoverflow.com/q/27148681
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
has body: $(document).on('mousemove', '.box', function (event) { }); This is a delegated event handler and works by listening for the event to bubble up to a non-changing ancestor. It then applies the jQuery selector at event time to the elements in the bubble chain. It then applies the function to any matching elements that caused the event. The upshot of this is that the elements only need to exist when the event happens, not when the event is registered. document is the default if nothing is closer. Do not use 'body' as the default as it will not always respond to mouse events (styling can cause it to have a zero computed height).
accepted answer of: http://stackoverflow.com/q/27148681

http://stackoverflow.com/q/27038581
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/27038928
accepted answer: http://stackoverflow.com/a/27038928
type: AnsweredQuestion
has body: Because I want attach files to upload I'm trying to send a form using new FormData(myForm), however I want to add to post some data which not coming from the form. Previously before I needed to upload file I used serializeArray() and it was pretty easy to add some data to array. I know that I can add some hidden inputs but I don't like this solution. Is there any better solution to manipulate form data before send it with FormData()?
downvote count: 1
type: Question
has title: Add post variables to form send with FormData() via AJAX
tagged with: forms
tagged with: post
has comment: http://stackoverflow.com/comment/42596821
score: 0

http://stackoverflow.com/q/27070369
tagged with: angularjs
has title: AngularJS - How to make a cascading select and save to API
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42728278
has answer: http://stackoverflow.com/a/27156010
type: Question
answer count: 2
has body: I have the following JSON file that lists Countries and their states : [ { "value": "Australia", "text": "Australia", "states": [ { "value": "Australian Capital Territory", "text": "Australian Capital Territory" }, { "value": "New South Wales", "text": "New South Wales" } ] } ] I load the data in a variable called countriesAndStates and then I display this on the frontend : Country Select State Select I'm also loading data from a REST API to display it on the frontend : var detailProject = Restangular.one('projects', $routeParams.projectId); detailProject.get().then(function (project) { $scope.project = project; $scope.saveProject = function () { project.put().then(processSuccess, processError); }; }); Once I click on save, a saveProject function puts back the data to the API. Now... How do I link up the states with the Countries? From what I understood in the documentation, I would need to change the ng-model properties to reflect country and state... like so : But I'm a bit confused, how can I do that when I want the API data to be loaded in the select boxes?
accepted answer: http://stackoverflow.com/a/27156010
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27070821
has answer: http://stackoverflow.com/a/27070821
score: 0

http://stackoverflow.com/a/27055165
type: Answer
has comment: http://stackoverflow.com/comment/42663049
answers question: http://stackoverflow.com/q/27054951
upvote count: 19
score: 19
has comment: http://stackoverflow.com/comment/117536310
has comment: http://stackoverflow.com/comment/114748904
has comment: http://stackoverflow.com/comment/109971840
accepted answer of: http://stackoverflow.com/q/27054951
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/105269597
has body: And for the credit card expiration validation you can do like this. var today, someday; var exMonth=document.getElementById("exMonth"); var exYear=document.getElementById("exYear"); today = new Date(); someday = new Date(); someday.setFullYear(exYear, exMonth, 1); if (someday &lt; today) { alert("The expiry date is before today's date. Please select a valid expiry date"); return false; }

http://stackoverflow.com/comment/42545406
type: QuestionComment
comment on: http://stackoverflow.com/q/27008585
has text: How can I get javascript to examine the hash of the current url?
score: 0
type: Comment

http://stackoverflow.com/comment/42581465
type: Comment
has text: yes the reason is I like the way fabric handles animations, but after all I think I have to use the build-in method.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27029000

http://stackoverflow.com/comment/42619187
has text: Yes, window.history follow yours its flow.. :) But do you try to use session storage to create your history and use it to manage back button
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27049764
score: 0

http://stackoverflow.com/q/27071919
tagged with: css
type: AnsweredQuestion
score: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/27072073
type: Question
possible better answer: http://stackoverflow.com/a/27072208
tagged with: javascript
has answer: http://stackoverflow.com/a/27072208
has answer: http://stackoverflow.com/a/27071970
has comment: http://stackoverflow.com/comment/42656464
has title: Implementing JavaScript and text into a URL
tagged with: wallpaper
tagged with: random
answer count: 3
has body: I posted before asking for a way to produce a random wallpaper from a list I had, but I was now wondering if instead of having 'images/bg-N.png' (N being a number), I could have something along the lines of this? &lt;script type="text/javascript"&gt; var images = ['1', '2', '3', '5', '6', '7', '8', '9', '10']; document.getElementsByClassName('mainview')[0].style.backgroundImage = 'url('"images/bg-" + images[Math.round(Math.random() * images.length)] + ".png"')'; &lt;/script&gt; This doesn't work, as I have very little knowledge about javascript itself. If anyone would be able to fix this for me I would be very grateful!
favorite count: 0
has answer: http://stackoverflow.com/a/27072073
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42656275

http://stackoverflow.com/comment/42527877
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26998729
score: 2
has text: No, adding methods to the constructor's prototype will share the same function for all instances. It would be different if you added the method to `this` inside the constructor, which would create a different privileged method for each instance.

orchardcms-1.8
type: Tag
tag name: orchardcms-1.8
tags question: http://stackoverflow.com/q/27019727

http://stackoverflow.com/comment/42694708
type: Comment
comment on: http://stackoverflow.com/a/27094080
has text: Thanks don't know how I missed that.
type: AnswerComment
score: 0

oauth
tags question: http://stackoverflow.com/q/27129939
tag name: oauth
type: Tag
tags question: http://stackoverflow.com/q/27115890
tags question: http://stackoverflow.com/q/27052024
tags question: http://stackoverflow.com/q/27059193
tags question: http://stackoverflow.com/q/27118174

http://stackoverflow.com/a/27026105
has comment: http://stackoverflow.com/comment/42576399
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42576318
type: Answer
has comment: http://stackoverflow.com/comment/42576158
accepted answer of: http://stackoverflow.com/q/27026055
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27026055
has comment: http://stackoverflow.com/comment/42575818
has body: You can do it like this by moving all your methods to the prototype of the constructor: function DisplaySettings() { // constructor initialization code here } DisplaySetttings.prototype = { //Default display settings for each producer type HandleAssignedView: function () { var producerType = $('#drpProducerType :selected').text(); switch (producerType) { case "Agency": this.AgencyView(); this.AgencyOptions(); break; case "Sole Proprietor": this.NonProducerView(); this.NonAgencyOptions(); break; default: this.ProducerView(); break; } }, //Preserves database values on Edit page load LoadAssignedView: function () { var producerType = $('#drpProducerType :selected').text(); switch (producerType) { case "Agency": this.AgencyView(); break; case "Sole Proprietor": this.NonProducerView(); break; default: this.ProducerView(); break; } }, AgencyView: function() { this.DisplayAgencyFields(); this.AgencyLabels(); }, ProducerView: function () { this.DisplayProducerFields(); this.NonAgencyLabels(); }, NonProducerView: function() { this.DisplayNonProducerFields(); this.NonAgencyLabels(); }, DisplayAgencyFields: function() { $('.AgencyFields').show(); $('.NonProducerFields').show(); $('.NonAgencyFields').hide(); $('.ProducerFields').hide(); }, DisplayProducerFields: function () { $('.AgencyFields').hide(); $('.NonProducerFields').hide(); $('.NonAgencyFields').hide(); $('.ProducerFields').show(); }, DisplayNonProducerFields: function() { $('.AgencyFields').hide(); $('.NonProducerFields').show(); $('.NonAgencyFields').show(); $('.ProducerFields').show(); }, NonAgencyLabels: function() { //Change DRM labels $('label[for=DRMCompanyName]').text('DRM Company Name'); $('label[for=DRMCompanyId]').text('DRM Company Id'); //Replace header text var newval = $('#HeaderText').text().replace("Agency", "Agent"); $('#HeaderText').text(newval); //Adjust fieldset legend text $('#AgentTypeFields').children('legend:first').text('Producer Info'); }, AgencyLabels: function() { //Change DRM labels $('lab…

http://stackoverflow.com/q/27014449
has body: I'm having some issues with a system I am building. SHORT STORY I want to insert a row after I press a button but the row has 2 s and they have to get the names for the modal's day so if I press on the button for Monday, the 's name has to be name="Ma0_HrFrom". And the next row after that has to have the name Ma1_HrFrom. LONG STORY I am working on adding an Expert availability section to it, where experts can fill in a week number and then they see a week with the week days and dates. After the days there is a button which pops up a bootstrap modal. There is a table with one row already. But on one day experts can work from 0800 till 1000 and between 1000 until 1400. They can also have breaks. So I want to insert a new row when I press on an . The row adding works almost, the problem is I can't get to figure out how to fill in the selects and the name of the select. My code for now is below: var dagen = ["Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"]; var lengte = dagen.length; var i = 0; var s; $('[name="addRow"]').click(function () { s = 0; do { var test = $('select [name="'+ dagen[i] +'_uurVan"]').clone().attr('name', dagen[i] + i + '_uurVan').val(); console.log(test); console.log("Dagen i = " + dagen[i]); if (s < 1) { $(' ' + test + ' ' + 'selectTot' + ' ').insertBefore($(this).closest('tr')); //test.append('[name="test"]'); } s++; i++; }while(i < lengte); });
tagged with: jquery
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42558826
has comment: http://stackoverflow.com/comment/42582110
tagged with: row
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/42556597
tagged with: javascript
has comment: http://stackoverflow.com/comment/42591386
score: 0
has title: Inserting rows with input names

http://stackoverflow.com/comment/42624846
type: AnswerComment
score: 0
has text: Thank you! Do you know how I can append it inside an ? whenever I do a append, the newly added text doesn't get removed.
type: Comment
comment on: http://stackoverflow.com/a/27053958

http://stackoverflow.com/comment/42622565
comment on: http://stackoverflow.com/a/27032175
type: AnswerComment
score: 0
type: Comment
has text: It is unclear what you are trying to do. please clarify. or provide another code example.

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/26998476
tags question: http://stackoverflow.com/q/27008744
tags question: http://stackoverflow.com/q/27034580
tags question: http://stackoverflow.com/q/27057551
tags question: http://stackoverflow.com/q/27037378
tags question: http://stackoverflow.com/q/27136086
tags question: http://stackoverflow.com/q/27029059
tags question: http://stackoverflow.com/q/27045016
tags question: http://stackoverflow.com/q/27150751
tags question: http://stackoverflow.com/q/27097757
tags question: http://stackoverflow.com/q/27151114
tags question: http://stackoverflow.com/q/27087540
tags question: http://stackoverflow.com/q/27105728
tags question: http://stackoverflow.com/q/26995028
tags question: http://stackoverflow.com/q/27143363
tags question: http://stackoverflow.com/q/27125287
tags question: http://stackoverflow.com/q/27013963
tags question: http://stackoverflow.com/q/27041758
tags question: http://stackoverflow.com/q/27005029

http://stackoverflow.com/comment/42621956
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27051845
has text: i use json for verificate one if in php and need show also contebt in div , the problem it´s that use json and show code in div created from php

http://stackoverflow.com/comment/42570677
type: QuestionComment
comment on: http://stackoverflow.com/q/27023056
has text: Both your `ClientView` and `ClientCollectionView` have the template set as `#ClientData` which is surely going to result in an error for the collection. Also on `AddClient` you are calling render on the clientView but you are never appending its el to the DOM
score: 0
type: Comment

http://stackoverflow.com/comment/42520071
score: 0
type: Comment
type: QuestionComment
has text: @empiric I also want the parent menu link working too... :(
comment on: http://stackoverflow.com/q/26994519

http://stackoverflow.com/comment/43721255
has text: Use try catch in your C# class and get exception.
comment on: http://stackoverflow.com/q/27023303
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27108958
tagged with: ionic-framework
type: Question
answer count: 2
upvote count: 1
has body: It's an ad (discount codes for e-shops) app I'm trying to make. Ads are listed in to Array , each ad having 4 things (name, image link , discount (%) , discount code) This is how I list the ads (ng-repeat is used) : {{item.name}} Nuolaida : {{item.discount}} % So when you click the one you want, modal opens. In the modal , I need to show the same {{item.name}} again and give it's {{item.discountcode}}. How am i supposed to do this ? I can't use ng-repeat because there are other items in the same array as well.
tagged with: javascript
has title: Import same information to modal
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: cordova
tagged with: angularjs
has answer: http://stackoverflow.com/a/27109346
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27109050
downvote count: 0
score: 1

http://stackoverflow.com/q/27015459
has comment: http://stackoverflow.com/comment/42557311
has comment: http://stackoverflow.com/comment/42558325
has answer: http://stackoverflow.com/a/27015557
has comment: http://stackoverflow.com/comment/42556895
has comment: http://stackoverflow.com/comment/42557901
has body: I have a dropdown were I can select multiple options. If I select one option in that, I need the rest of the options disabled. For example : In the below code, if I select the option All, I need the rest of the options disabled. Choose Region(s) All East North West South image
type: Question
has comment: http://stackoverflow.com/comment/42557059
has comment: http://stackoverflow.com/comment/42556864
has comment: http://stackoverflow.com/comment/42558369
score: -2
has comment: http://stackoverflow.com/comment/42557966
tagged with: javascript
has comment: http://stackoverflow.com/comment/42556536
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/42556592
upvote count: 0
has comment: http://stackoverflow.com/comment/42557788
has comment: http://stackoverflow.com/comment/42556771
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42556541
favorite count: 0
has comment: http://stackoverflow.com/comment/42556533
has title: Disable other options in a dropdown, if clicked on the first option
type: UnansweredQuestion
downvote count: 2
linked to: http://stackoverflow.com/q/10953589
has answer: http://stackoverflow.com/a/27015579
has comment: http://stackoverflow.com/comment/42556549
has comment: http://stackoverflow.com/comment/42557043
has comment: http://stackoverflow.com/comment/42556608
has comment: http://stackoverflow.com/comment/42558897

http://stackoverflow.com/q/27012845
favorite count: 0
tagged with: css
type: AnsweredQuestion
tagged with: toggle
has answer: http://stackoverflow.com/a/27013336
type: Question
tagged with: if-statement
tagged with: javascript
has body: I have a piece of code that's not working and I just can't figure out why. Here's the simplified code: HTML: &lt;div id="objInfo"&gt; &lt;div id="button"&gt;&lt;/div&gt; &lt;img src="img/x.png" class="obj_x"&gt; &lt;/div&gt; CSS: #objInfo { opacity: 0; display: none } JAVASCRIPT: if ($('#objInfo').css('opacity') != "1") { $("#button").click(function(){ $("#objInfo").css("display", "block"); $("#objInfo").animate({opacity: 1, top: "-25px"}); }); } else { $(".obj_x").click(function(){ $("#objInfo").css("display", "none"); $("#objInfo").animate({opacity: 0, top: "+25px"}); }); } So basically, I wanna have a popup (#objInfo) that appears when #button is clicked and disappears when .obj_x is clicked. And also, I want #objInfo to disappear when I click outside of it. (I haven't added that to the code, because there's no need to. Once the if statement works that'll be the least problem to be solved. And that's why I need that statement) The if statement is just there to check whether the box is displayed or not, and when it IS, I want to be able to toggle it back off using either the dedicated obj_x button or the click outside the box. I hope I explained it well enough for you guys. This is my first post, so please be gentle... ;) Help would be greatly appreciated!
score: 4
possible better answer: http://stackoverflow.com/a/27015681
has comment: http://stackoverflow.com/comment/42552247
has answer: http://stackoverflow.com/a/27015681
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/27013336
downvote count: 0
tagged with: jquery
has title: if element has opacity=1 not working

http://stackoverflow.com/q/26992768
score: 6
tagged with: chromium
upvote count: 6
tagged with: qt
tagged with: c++
type: Question
has title: Qt 5.4 beta WebEngineView Debugging
tagged with: qtwebengine
linked to: http://stackoverflow.com/q/28297469
tagged with: javascript
has body: I'm currently working on a VS2013 project which uses Qt 5.4. beta. I use a QWebEngineView (which is part of the Chromium based QWebEngine), which loads Javascript/HTML pages from a webserver. I would like to know if there are any possibilities debugging javascript and HTML for that QWebEngineView (or more generally QWebEngine). I saw some notions of "devtools" in the webengine source code, maybe that could be a solution.
has answer: http://stackoverflow.com/a/28444391
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/27111917
tagged with: promise
has body: I tried to use Promises and Futures in Scala.js. Promise works, as soon as it comes to Futures I get warnings and errors. Try: val p1 = Promise[Int] val f1: Future[Int] = p1.future val p2 = Promise[Int] val f2: Future[Int] = p2.future val res1 = for { v1 &lt;- f1 v2 &lt;- f2 } yield v1 + v2 val res2 = f1.flatMap(x =&gt; f2.map(y =&gt; x + y)) res1 onSuccess { case x: Int =&gt; g.console.log(x); } res2 onSuccess { case x: Int =&gt; g.console.log(x); } // callback in dom, using ScalaTags // div(`class` := "btn btn-default", `type` := "button", onclick := click(1, p1)) def click(i: Int, p: Promise[Int])(x: dom.MouseEvent): Unit = { g.console.log(i); try { p success i } catch { case x: Throwable =&gt; println("again") } } f1 onSuccess { case x: Int =&gt; 1 } And I get in sbt fastOptJs: [warn] Referring to non-existent class jl_Thread$UncaughtExceptionHandler [warn] called from s_concurrent_impl_ExecutionContextImpl.init___ju_concurrent_Executor__F1 [warn] called from s_concurrent_impl_ExecutionContextImpl$.fromExecutor__ju_concurrent_Executor__F1__s_concurrent_impl_ExecutionContextImpl [warn] called from s_concurrent_ExecutionContext$Implicits$.global$lzycompute__p1__s_concurrent_ExecutionContextExecutor [warn] called from s_concurrent_ExecutionContext$Implicits$.global__s_concurrent_ExecutionContextExecutor [warn] called from Lexample_H2$class.Lexample_H2$class__$init$__Lexample_H2__V [warn] And I get in the browser: uncaught exception: java.lang.RuntimeException: System.getProperty() not implemented What is missing/unimplemented? How can I implement it? Is there a workaround? How can I implement an ExecutionContext that is makes sense to handle Events withing the browser?
accepted answer: http://stackoverflow.com/a/27113712
type: Question
tagged with: scala
tagged with: future
score: 27
has title: Futures in Scala.js
answer count: 1
upvote count: 27
has answer: http://stackoverflow.com/a/27113712
tagged with: javascript
tagged with: scala.js
type: AnsweredQuestion
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/42778732
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27140556
has text: Do you get any errors in your browser's console? I see nothing wrong with how you have on JSFiddle besides the broken images. Something is different on your site perhaps.
score: 0

http://stackoverflow.com/comment/42706284
type: QuestionComment
comment on: http://stackoverflow.com/q/27092299
score: 0
type: Comment
has text: Hi @Arcy, is it a jQueryUI Modal or a Bootstrap Modal you are trying to show?

http://stackoverflow.com/comment/42691199
type: QuestionComment
has text: @Grundy I'm still working on the JSFiddle (I'm having trouble importing the Polymer elements)
comment on: http://stackoverflow.com/q/27092250
score: 0
type: Comment

http://stackoverflow.com/comment/42583575
type: QuestionComment
has text: @Adjit, there is no certain HTML - this may be any page (I need this for scraping ads with Watir). Element may be flash for example. If I click on it, it will lead me somewhere, but can I determine where without going to that page? I need `event.where_the_click_would_redirect` kind of thing.
score: 0
comment on: http://stackoverflow.com/q/27030585
type: Comment

http://stackoverflow.com/comment/42625035
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27019135
has text: The code snippet now is as below: var text = '{\"listCompleteInjections\":[[\"05-06-2014\",0.5,[\"2114600271000185\"],\"0.50\",\"05 Jun 2014\"],[\"16-06-2014\",0.5,[\"2114600271000185\"],\"0.50\",\"16 Jun 2014\"],[\"20-06-2014\",0.5,[\"2114600271000185\"],\"0.50\",\"20 Jun 2014\"]]}'; var data = JSON.parse(text); I am able to access the values for the key "listCompleteInjections". But only if I explicitly mention that name. This way i wil have to manually find out all the keys in the array and then use them to extract the values. is there a way to get the keys and subsequently its values?
score: 0

http://stackoverflow.com/q/27031456
linked to: http://stackoverflow.com/q/11143702
has comment: http://stackoverflow.com/comment/42585003
has body: Same question has been asked here: How to pass a regular expression as a function parameter, but I still can't get it work. This is the string expression of regular expression that I used to test email: var regexp="^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$"; and if I put it to firebug execute like this: /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$"/.test("test@domain.com") it will give what I want,but If taking it as parameter to passing it to function: function bool validate(var value, var regexp){ //escape special characters regexp=String(regexp).replace(/([-()\[\]{}+?*.$\^|,:#&lt;!\\])/g, '\\$1').replace(/\x08/g, '\\x08'); return new RegExp(regexp,'g').test(value) } like this: validate("test@domain.com",regexp); It will give me false.Please tell what mistakes I have made,thanks. Update: sorry,as @Bhojendra - C-Link Nepal said,there is a typing mistake when translating gwt's jsni code to this,right code should be: function validate(value, regexp){ //escape special characters var regexp = regexp.replace(/([-()\[\]{}+?*.$\^|,:#&lt;!\\])/g, '\\$1').replace(/\x08/g, '\\x08'); return new RegExp(regexp,'g').test(value); } but it doesn't work still.
has comment: http://stackoverflow.com/comment/42586642
has title: How to create regular expression from string?
favorite count: 0
type: Question
tagged with: regex
answer count: 1
has answer: http://stackoverflow.com/a/27031490
downvote count: 3
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
score: -3

http://stackoverflow.com/a/27055012
answers question: http://stackoverflow.com/q/27054924
type: Answer
downvote count: 0
score: 1
has body: you need to add external loop: for(var j=0; j &lt; array.length; j++){ for( var i=0; i&lt;array.length; i++ ) { if ( array[i][0] == array[j][0] &amp;&amp; i != j) { array[i][0]=''; } } }
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27054924
type: AcceptedAnswer

http://stackoverflow.com/comment/42548099
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27010402
has text: I have initial blank loaded page with button on it .Then on button click hidden div shows form using javascript .I want hidden from with combobox should show database values loaded in combobox.then on selecting values on combobox the html form should load the corresponding values from db
type: AnswerComment

http://stackoverflow.com/comment/42573666
has text: Thanks, Sam. For some reason this isn't working for me. I"m a little confused on how the image source is working. The thumbnail image and larger image are completely separate files.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27024551
type: AnswerComment

http://stackoverflow.com/a/45564611
answers question: http://stackoverflow.com/q/27020054
has body: If you want to get every image corresponding your needs, loop through every image in your page and check for it : var img = document.getElementsByTagName('img'); for(var i = 0; i &lt; imgs.length ; i++) { if (img[i].width &gt; 2) { // Do your thing } } And if you have a particular image target and know it's ID, it's even easier : if (document.getElementById('#theone').width() &gt; 2) { // Do your thing } Note : this is plain javascript, if you use jQuery just change the bits of syntax that corresponds var img = $('img'); for(var i = 0; i &lt; imgs.length ; i++) { if (img[i].width &gt; 2) { // Do your thing } } and if ($('#theone').width() &gt; 2) { // Do your thing }
score: 0
type: Answer

http://stackoverflow.com/q/27020084
tagged with: ajax
score: 0
has title: jQuery AJAX Button Click - Remove Table Row after AJAX Call is Successful
type: AnsweredQuestion
has body: I'm displaying an HTML table and would like to include a button in the last column that, when clicked, performs an AJAX call which will result in the removal of the table row from the table. I'm new to jQuery and AJAX and working things out as I go - I've managed to setup some AJAX calls that run when a field is edited, but now I'm struggling to attach one to a button in a table row. Here's how the table looks: Store 1 lorem ipsum John Smith 20/11/2014 12:53:52 AM Acknowledge Store 2 lorem ipsum Sally Jones 20/11/2014 12:53:52 AM Acknowledge Store 3 lorem ipsum Bill Howden 12/11/2014 01:43:03 PM Acknowledge I know that the ID for the button is not unique - at the moment the script only fires when the button in the first row is clicked. I'm not sure how to assign a unique ID for each button which the script can see. Here's my script: I just need some help in bring this altogether so that when the button is clicked on any row it calls the script which in turn, if the PHP script it then calls is successful, it then removes the row where the button was clicked.
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27020308
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27020308

http://stackoverflow.com/comment/42658902
type: Comment
type: QuestionComment
has text: I think you should first compact your question. Trust me, no one's gonna read all of that
score: 0
comment on: http://stackoverflow.com/q/27073383

http://stackoverflow.com/a/30152937
downvote count: 0
score: 1
has body: I've opened a bug report at https://crbug.com/486505. The issue is caused by the fact that an event page performs a relatively expensive I/O operation (write to disk) when you add, modify or remove a context menu item in an event page. Currently, the only work-around is to use a background page instead of an event page.
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27103694
answers question: http://stackoverflow.com/q/27103694
type: Answer

http://stackoverflow.com/a/27096684
upvote count: 1
has body: Use the jQuery selector $("[name^='modal']"). See http://api.jquery.com/attribute-starts-with-selector/
answers question: http://stackoverflow.com/q/27096591
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/42714832
comment on: http://stackoverflow.com/a/27044823
type: AnswerComment
has text: I think, according to the github page, that you should target a server.js file which launch you app.
type: Comment
score: 0

http://stackoverflow.com/comment/42793318
comment on: http://stackoverflow.com/a/27149254
type: AnswerComment
has text: hey #hon2a can you help me more..by explain it in example in fiddle or plunkr.
score: 0
type: Comment

http://stackoverflow.com/q/27030849
has comment: http://stackoverflow.com/comment/42583968
tagged with: angularjs
has answer: http://stackoverflow.com/a/27030885
type: AnsweredQuestion
has title: Change font color of text in $scope variable in AngularJS
accepted answer: http://stackoverflow.com/a/27030885
tagged with: javascript
type: Question
score: 0
answer count: 1
has body: I am using AngularJS. I have a scope variable $scope.TextToUser which is printed in html to be shown to user on website. In my controller, the code is simple and looks like this; $scope.TextToUser='UserText' On the corresponding html page, the code is just {{TextToUser}}. I tried to turn the text to red by using the following code in the controller; $scope.TextToUser = '&lt;font size="3" color="red"&gt; 'UserText'&lt;/font&gt;' Unfortunately, on the html page, the entire string was printed and not UserText in red. How can I turn the text red? Simple, straight-forward methods will be preferred.

http://stackoverflow.com/comment/42685887
type: Comment
type: QuestionComment
has text: What language is this? I guess it's "JSML"?
score: 0
comment on: http://stackoverflow.com/q/27087900

http://stackoverflow.com/comment/42773128
has text: @jfriend00. I'm not saying yours wouldn't work; or won't; I'm saying that since what you are actually doing is preventing the default action of a form submission, semantically it makes sense to use the JavaScript method designed to prevent default responses associated with events.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27116342
type: AnswerComment

http://stackoverflow.com/comment/42940549
type: AnswerComment
has text: I fixed the crash issue by removing all URI before page download. I'm not looking to save an image, I want to display it in the page when the user selects it.
type: Comment
comment on: http://stackoverflow.com/a/27221174
score: 0

http://stackoverflow.com/q/27063407
has answer: http://stackoverflow.com/a/27063614
type: Question
has title: Hide div on page but div shows before being hidden
has comment: http://stackoverflow.com/comment/42640771
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27063478
has body: How do I get the not to show at all when the page loads? The div is set to hidden in JS and the hides but its after the has already shown on the page for a brief second. I am using this popup in my website. http://mootools.net/forge/p/popupwindow Here is my code :- <?php function JSLink($text, $onclick) { return "$text"; } $asklink=JSLink(' Ask me a question ', 'App.popUp1.open(); App.popUp1.positionTo(this, 1180, 100);'); ?> <?php echo $asklink; ?> <?php $this->load->view('popup/popupaskmequestion',$results); ?>
has answer: http://stackoverflow.com/a/27063450
type: UnansweredQuestion
tagged with: css
score: 0

http://stackoverflow.com/comment/42694725
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27080895
type: AnswerComment
has text: Oh, for enter, you'll need to pass the correct `keycode` (which isn't 42, I believe). How does your code check to see if it's an enter key? Are you using `e.which`? I'll throw together a fiddle for you really quickly...

http://stackoverflow.com/q/27115817
type: Question
has body: I´m trying to get the value from a dropdown when submitting a form in AngularJS but ends up with an undefined value. See this fiddle: http://jsfiddle.net/ironhead/Td2NZ/280/ textfields works with $scope.nameoftextbox but how to get the name/value of a dropdown?
tagged with: javascript
has title: AngularJS dropdown value from form undefined
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27115884
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27115884
has comment: http://stackoverflow.com/comment/42734324
downvote count: 0
score: 1

http://stackoverflow.com/q/27030913
has answer: http://stackoverflow.com/a/27031273
type: AnsweredQuestion
tagged with: typeerror
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27031273
has body: Recently, I've been working on a cookie system for my website using JavaScript. Now when I put them together, they refuse to run in Chrome's JavaScript console. It says TypeError: undefined is not a function though everything seems be defined properly. I have run this through JSLint and JSHint and they don't find any errors. //Date finder var day = new Date(); day = day.substring(4, 100); //Pause function for later use function sleep(ms) { var currentTime = new Date().getTime(); while (currentTime + ms &gt;= new Date().getTime()) { alert("Please be patient while we connect..."); } } //Sets cookie with cookie name, cookie value, and cookie expiry (converted into milliseconds by function) function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } //Uses a while loop to search through cookies outputed by "document.cookie" and find desired cookie function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i &lt; ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') { c = c.substring(1); } if (c.indexOf(name) != -1) { return c.substring(name.length, c.length); } } return ""; } //Option to delete cookies if client desires function deleteCookie(del) { if (del == "Y") { var checkDel = confirm("Are you sure? Your username will be lost."); if (checkDel === false) { document.cookie = "username=; day"; } } } //User input area - either uses cookie to identify user or requests user to input value function checkCookie() { var user = getCookie("username"); if (user !== "") { alert("Welcome again " + user); var clearCookie = prompt("Do you wish to remove your cookie from this site?", "Y or N").toUpperCase(); deleteCookie(clearCookie); } else { user = prompt("Please enter your name:").toUpperCase(0,1); if (user !== "" &amp;&amp; user !== null) { setCookie("username", user, 91); } } } al…
tagged with: cookies
score: 0
tagged with: function
possible better answer: http://stackoverflow.com/a/27032319
tagged with: javascript
has answer: http://stackoverflow.com/a/27032319
has title: Undefined function uncaught by JSHint and JSLint

http://stackoverflow.com/q/27032128
has comment: http://stackoverflow.com/comment/42586190
tagged with: javascript
has title: Display a css style using the get url in php
score: 0
has comment: http://stackoverflow.com/comment/42586216
answer count: 1
has answer: http://stackoverflow.com/a/27032366
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42586605
tagged with: php
has body: I want to display a content that have a style css and im using the $_GET function of php my code is working but when I put a font-color style the url will be destroy, example= "&text= dummy dummy <font+color="#33cc33">dummy <font+color="#993399">dummy " What should be the best solution with this problem
type: Question

http://stackoverflow.com/comment/42735195
comment on: http://stackoverflow.com/q/27116166
score: 0
has text: you have to be in the same location as the href to jump to the anchro, else do it in jQuery
type: Comment
type: QuestionComment

openlayers-3
type: Tag
tags question: http://stackoverflow.com/q/27085538
tags question: http://stackoverflow.com/q/27017188
tag name: openlayers-3
tags question: http://stackoverflow.com/q/27108522
tags question: http://stackoverflow.com/q/27108422
tags question: http://stackoverflow.com/q/27121195
tags question: http://stackoverflow.com/q/26997637

http://stackoverflow.com/q/27042121
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42604349
has comment: http://stackoverflow.com/comment/42603609
has comment: http://stackoverflow.com/comment/42603463
type: Question
has body: I'm working on a layout for a client which includes a carousel of product icons at the top of every page, the idea being visitors can jump to that section of the site from the carousel. However when loading the page the icons are initially displayed as a list until snapping into place once the page is done. I've tried things like setting the display to none, then using javascript to show it when the page has loaded and also after the carousel has initialised, but that didn't seem to work. Understandably the problem is getting worse as the page below gets more complicated. Any bright ideas as to what to try? The page uses Jquery &amp; Bootstrap with Slick.js for the carousel. Here's a sample page from the layout: http://www.webeditors.co.uk/se/course.php
has answer: http://stackoverflow.com/a/27042569
tagged with: javascript
score: 0
has title: How to avoid carousel items loading as a list on page build
has comment: http://stackoverflow.com/comment/42604601
has comment: http://stackoverflow.com/comment/42604994
has comment: http://stackoverflow.com/comment/42603879
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42604623

http://stackoverflow.com/q/27065720
has comment: http://stackoverflow.com/comment/42644978
score: 0
has answer: http://stackoverflow.com/a/27065918
has comment: http://stackoverflow.com/comment/42645151
type: Question
has body: I'm working on javascript and html. I have a javascript function, called login, and I want to call this function in HTML. I saw some codes that includes the javascript function directly in the HTML. I don't want to do it because the code is very long. Here is the HTML: &lt;input class="form-control form-stacked" name="username" placeholder="Username" type="text" required="true" id="username"&gt; &lt;input class="form-control form-stacked last" name="password" placeholder="Password" type="password" required="true" id="password"&gt; &lt;script&gt; window.onload = login() &lt;/script&gt; &lt;input class="btn btn-beats btn-block btn-stacked" value="Tune in" type="submit"&gt; And the Javascript function is: function login(){ var userName = document.getElementById("username").value; var password = document.getElementById("password").value; console.log(userName); console.log(password); var data = { userName : userName, password : password }; console.log(data); doJSONRequest("POST", "/login", {}, data, function(location){ document.location = location.location; }); } I included a window.onload because I want to call the function when the page started. The console (obliviously) says to me that "login in not defined" and, of course, it has reason. But I don't want to put all the code into the HTML (also because there are like 30 lines more). Can you help me please? Thanks to everyone :)
has comment: http://stackoverflow.com/comment/42647672
has comment: http://stackoverflow.com/comment/42644899
has comment: http://stackoverflow.com/comment/42644982
tagged with: javascript
has comment: http://stackoverflow.com/comment/42648059
answer count: 3
has answer: http://stackoverflow.com/a/27067447
has comment: http://stackoverflow.com/comment/42644918
has comment: http://stackoverflow.com/comment/42644930
has comment: http://stackoverflow.com/comment/42648155
has comment: http://stackoverflow.com/comment/42645888
has title: Calling a javascript function in html
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27065796
has comment: http://stackoverflow.com/comment/42645112
has comment: http://stackoverflow.com/comment/42644886

http://stackoverflow.com/a/27084549
downvote count: 0
score: 6
answers question: http://stackoverflow.com/q/27080653
upvote count: 6
has comment: http://stackoverflow.com/comment/42727799
has body: Answering my own question, hopefully it will help someone. On digging a bit into the q library code, it looks like all unhandled exceptions are put in an array called unhandledRejections, by default. Not sure why it was implemented like this, but presumably to help developers track down un-handled exceptions. This behavior can be changed by calling Q.stopUnhandledRejectionTracking(). When I did this, the memory leak went away, even without the .done() call.
type: Answer

http://stackoverflow.com/q/27048073
accepted answer: http://stackoverflow.com/a/27048222
type: Question
has comment: http://stackoverflow.com/comment/42614109
tagged with: javascript
has body: Soooo I want to use these images I have so that when they are clicked it opens a modal dialog for a staff page on my site and I'm not sure how to do it PS: I have seen something like this on here but its not what I wanted &lt;img src="https://minotar.net/helm/EpicMinerBackup"&gt; &lt;img src="https://minotar.net/helm/kingpooper27s"&gt; EDIT~~~: Resolution to issue ~~~EDIT END~~ &lt;!--####################### Start of the staff list ############################### --&gt; &lt;img src="https://minotar.net/helm/EpicMinerBackup" data-toggle="modal" data-target="#Staff1" /&gt; &lt;div class="modal fade" id="Staff1" tabindex="-1" role="dialog" aria-labelledby="StaffModalLabel1" 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"&gt; &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;span class="sr-only"&gt;Close&lt;/span&gt; &lt;/button&gt; &lt;h4 class="modal-title" id="StaffModalLabel1"&gt;EpicMinerBackup&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; The Owner of the site and server. &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!--########################################################################## --&gt;
has comment: http://stackoverflow.com/comment/42614225
answer count: 1
has title: Image opens modal dialog bootstrap
has answer: http://stackoverflow.com/a/27048222
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42614172
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/42614194
score: 0

http://stackoverflow.com/q/27048891
type: AnsweredQuestion
has title: How to toggle visibility property (billboard.show) of a CZML entity's billboard?
has answer: http://stackoverflow.com/a/27049067
type: Question
tagged with: cesiumjs
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: According to the Cesium API, to toggle the visibility of an asset's billboard (or label) you can simply assign the billboard.show property to false. When I attempted to do this, Cesium would error with An error occurred while rendering. Rendering has stopped. TypeError: undefined is not a function ... This discussion from the cesium-dev google group includes some example code to toggle billboard visibility on/off. The same code does not work if you attempt show = false on an entity from CZML (this example does not use CZML). Here is what I tried var asset = loadedCZML.entities.getById(id); asset.billboard.show = false; //Error! (loadedCZML is a Cesium.CzmlDataSource)
accepted answer: http://stackoverflow.com/a/27049067
upvote count: 2

http://stackoverflow.com/q/27019657
type: AnsweredQuestion
tagged with: nav
has comment: http://stackoverflow.com/comment/42564190
type: Question
has comment: http://stackoverflow.com/comment/42564010
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/27019805
answer count: 1
has answer: http://stackoverflow.com/a/27019805
has title: Making a navbar disappear
has body: I truly hope this question have not been asked before. First of all, I wanted my navbar to appear after a specific number of pixels and I found that: &lt;script type="text/javascript"&gt; (function($) { $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() &gt; 725) { $('#nav-principale').fadeIn(500); } else { $('#nav-principale').fadeOut(500); } }); }); })(jQuery); &lt;/script&gt; And it worked. Now, I'm looking for a way to make my navbar, which is fixed at the top of the screen, disappear, if it's possible, after a specific number of pixels. It might be really easy, but I have no knowledge in Javascript/jquery. Thanks for your help, Zhyrmar
has comment: http://stackoverflow.com/comment/42566851
tagged with: navbar

http://stackoverflow.com/comment/42618549
type: QuestionComment
comment on: http://stackoverflow.com/q/27049675
has text: sorry wrote wrong. if the code were var b=5; var a=f(b)+5+b; The helperF should be helperF('Temp1+5+b','f(b)'); The helper function evaluates and logs all the blocks after the first string parameter and then replaces Temp1,Temp2,... with the values that are returned and then evaluates (25+5+b) the string then return it.
score: 0
type: Comment

http://stackoverflow.com/comment/42762141
comment on: http://stackoverflow.com/a/27124330
has text: It's fine, no worries :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42841848
type: QuestionComment
comment on: http://stackoverflow.com/q/27144843
has text: do you have test your code on any device?
score: 0
type: Comment

http://stackoverflow.com/a/27000238
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/26999796
has body: Your are selecting the span element, not the select. To correct this, you can change the "on" statement as follows: $("select[name=party]").on("change", function() { //your handler code });
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42530907
has comment: http://stackoverflow.com/comment/42532175
accepted answer of: http://stackoverflow.com/q/26999796

http://stackoverflow.com/comment/42623705
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27053172
has text: Answer added, hopefully this is will help you out.
type: Comment

dom
tags question: http://stackoverflow.com/q/27046545
tags question: http://stackoverflow.com/q/27085044
tags question: http://stackoverflow.com/q/27064703
type: Tag
tags question: http://stackoverflow.com/q/27135863
tags question: http://stackoverflow.com/q/27031291
tags question: http://stackoverflow.com/q/27084322
tags question: http://stackoverflow.com/q/27074732
tags question: http://stackoverflow.com/q/27087723
tags question: http://stackoverflow.com/q/27038036
tags question: http://stackoverflow.com/q/27104394
tags question: http://stackoverflow.com/q/27075416
tags question: http://stackoverflow.com/q/27063246
tags question: http://stackoverflow.com/q/27076588
tags question: http://stackoverflow.com/q/27138749
tags question: http://stackoverflow.com/q/27054964
tags question: http://stackoverflow.com/q/27140118
tags question: http://stackoverflow.com/q/27044191
tags question: http://stackoverflow.com/q/27103580
tags question: http://stackoverflow.com/q/27054983
tags question: http://stackoverflow.com/q/26999189
tags question: http://stackoverflow.com/q/27109390
tags question: http://stackoverflow.com/q/27030914
tags question: http://stackoverflow.com/q/27099988
tags question: http://stackoverflow.com/q/27045258
tags question: http://stackoverflow.com/q/26996423
tags question: http://stackoverflow.com/q/27088967
tags question: http://stackoverflow.com/q/27071405
tags question: http://stackoverflow.com/q/27075827
tags question: http://stackoverflow.com/q/27080266
tags question: http://stackoverflow.com/q/27136591
tags question: http://stackoverflow.com/q/27125634
tags question: http://stackoverflow.com/q/27040981
tags question: http://stackoverflow.com/q/27089862
tags question: http://stackoverflow.com/q/27116849
tags question: http://stackoverflow.com/q/27042491
tags question: http://stackoverflow.com/q/27147654
tag name: dom
tags question: http://stackoverflow.com/q/27132702
tags question: http://stackoverflow.com/q/27013633
tags question: http://stackoverflow.com/q/27141588
tags question: http://stackoverflow.com/q/27029259

http://stackoverflow.com/a/27076394
answers question: http://stackoverflow.com/q/27062863
has body: I just added extra field(text/ textarea) inside "" just like the code in my question. I can able to get the extra in action class with any change in jquery.fileupload.js. I think formData: function (form) { return form.serializeArray(); }, will handle the process.
type: Answer
score: 0

http://stackoverflow.com/comment/42677109
type: Comment
has text: I saw that but figured it had something to do with the JSFiddle. I couldn't figure out the actual cause, but this will fix it: var mouseX = e.clientX + bounds.left - 20;
type: AnswerComment
comment on: http://stackoverflow.com/a/27080124
score: 0

http://stackoverflow.com/q/27067329
has body: I am trying to use the response.redirect command in call webmethod and it does not work, see how is my code: HTML: Próxima Aula -> JS: function proximaAula() { var tipo = getParameterByName('t'); if (tipo == "1") { //PageMethods.MyMethod(projekktor('player_a').getPosition(), projekktor('player_a').getDuration(), getParameterByName('codaula')); PageMethods.NextAula(projekktor('player_a').getPosition(), projekktor('player_a').getDuration(), getParameterByName('codaula')); } //alert(tipo); if (tipo == "3") { var iframe = document.getElementById('viewer'); var iframeDocument = iframe.contentDocument || iframe.contentWindow.document; var pag; var npag; if (iframeDocument) { elem = iframeDocument.getElementById('pageNumber').value; npag = iframeDocument.getElementById('numPages').innerHTML; npag = npag.substring(3, npag.length); } //return "asasdas"; // //alert(elem + " - " + npag); PageMethods.NextAula(elem,npag,getParameterByName('codaula')); } if (tipo == "4") { PageMethods.NextAula("-1","-1",getParameterByName('codaula')); } } C#: [WebMethod] public static string NextAula(string tempo, string tempomax, string codaula) { escolawebEntities DB = new escolawebEntities(); string link = ""; int icodaula = int.Parse(codaula); eadaulaaluno eaula = (from x in DB.eadaulaaluno where x.codeadaula == icodaula select x).FirstOrDefault(); tempo = tempo.Substring(0, tempo.IndexOf('.')); tempomax = tempomax.Substring(0, tempomax.IndexOf('.')); int ntempo = ((int.Parse(tempo) * 100) / int.Parse(tempomax)); if (tempo == tempomax || eaula.percentual == eaula.percentualmax || ntempo >= 95 )//ou perc ser maior 98% { eadaula aaula = (from x in DB.eadaula where x.eadcodaula == icodaula select x).FirstOrDefault(); eadaula paula = (from x in DB.eadaula where x.eadcodcursomodulo == aaula.eadcodcursomodulo where x.ordem == aaula.ordem + 1 select x).FirstOrDefault(); if (paula != null) { //link = "eadVerAula.aspx?codaula=" + paula.eadcodaula + "&t=" + paula.eadcodmidia; HttpContext.Current.Respon…
tagged with: javascript
tagged with: asp.net
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27067421
tagged with: response.redirect
has comment: http://stackoverflow.com/comment/42648077
tagged with: webmethod
has answer: http://stackoverflow.com/a/27067658
has comment: http://stackoverflow.com/comment/42650450
has comment: http://stackoverflow.com/comment/42648151
has title: Response.Redirect in a Webmethod
tagged with: c#
has comment: http://stackoverflow.com/comment/42648049
downvote count: 3
score: -1
type: Question
has comment: http://stackoverflow.com/comment/42648234
answer count: 2

http://stackoverflow.com/comment/42726549
comment on: http://stackoverflow.com/a/27111715
type: Comment
has text: Fancy recursion you have there. This looks better than the way I was planning on extracting text. I'll try this out.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27039690
favorite count: 0
possible better answer: http://stackoverflow.com/a/27040647
downvote count: 2
has answer: http://stackoverflow.com/a/27040647
upvote count: 1
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27053959
score: -1
type: Question
answer count: 2
has title: regex to replace alphanumeric strings only
tagged with: javascript
has body: I am working on a tool that tags alphanumeric words with the option selected from right click context menu. I am having issues when group of words are selected with some special characters in it. I am using this RegEx that I found on this site itself: /(\s[a-zA-Z0-9]+)/g To reproduce the problem, select 123b @#$@#$ or @#$@#$ a from the text and right click and select any option. The expected result is [TAG] 123b @#$@#$ or @#$@#$ [TAG] a respectively. Also, it doesn't work if I try to tag the following complete string: rahul@gmail.com 123a % / ! @$# % % %^* && ^ Lorem ipsum The expected result for this is: [TAG] rahul@gmail.com [TAG] 123a % / ! @$# % % %^* && ^ [TAG] Lorem [TAG] ipsum. Ideally, it should tag strings like 123abc, abc123, 12ab3 - with any number of digits and letters. If a string like email address is selected, that should be tagged as well. How do I fix this? jsFiddle HTML: rahul@gmail.com 123a % / ! @$# % % %^* && ^ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer augue tortor, dictum a turpis non, dapibus vehicula neque. 123b @#$@#$ a quam vel cursus. Duis at mattis quam, ornare consequat enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer augue tortor, dictum a turpis non, dapibus vehicula neque. Aliquam dictum a quam vel cursus. Duis at mattis quam, ornare consequat enim. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. JS: function replaceText(selectedText, selectedTag){ if(selectedText == "") return false; if(selectedText.match(/^[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/)) replacedText = selectedText.replace(/(\s[a-zA-Z0-9]+)/g, " " + selectedTag + " " + "$1"); else replacedText = selectedTag + " " + selectedText.replace(/(\s[a-zA-Z0-9]+)/g, " " + selectedTag + " " + "$1"); originalText = $('p').html(); newText = originalText.replace( new RegExp(selectedText,"g") , replacedText); $…
has answer: http://stackoverflow.com/a/27053959

http://stackoverflow.com/comment/42595328
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27037380
has text: I worked with it and it printed a modal on the screen when the browser doesn't support WebRTC. I had this feature free because Tokbox itself check it.

http://stackoverflow.com/q/27043338
has comment: http://stackoverflow.com/comment/42610411
tagged with: dynamics-crm-2011
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/27048202
has comment: http://stackoverflow.com/comment/42611091
has body: I have some custom script that adds the latest note value to a hidden text field, and the hidden text field is subsequently displayed in one of my views for the entity. When I click save and close after adding a new note, the view does not update with the newest note since the form was not refreshed. What can I do so that the form will be refreshed if the user clicks on save and close? EDIT: @Arthur For some reason, I cannot add a comment to your post. Anyhow, I tried as you have suggested. When I tried to click on "save" alone, the form refreshed and the value returned was true, so the flag was tripped. However, when I tried the same with "save and close" the form did not refresh, and consequently the flag was not tripped. This is leading me to assume that I must refresh the form in order for the view to update. EDIT 2: Here is the code that retrieves the information. function GetLatestNote() { var req = new XMLHttpRequest(); req.open("GET", encodeURI(Xrm.Page.context.getClientUrl() + "/XRMServices/2011/OrganizationData.svc/AnnotationSet?" + "$select=NoteText&amp;$filter=ObjectId/Id eq guid'" + Xrm.Page.data.entity.getId() + "'&amp;$orderby=CreatedOn desc&amp;$top=1"), true); req.setRequestHeader('Accept', 'application/json'); req.setRequestHeader('Content-Type', 'application/json; charset=utf-8'); req.onreadystatechange = function() { if (this.readyState === 4) { req.onreadystatechange = null; if (this.status === 200) { var note = JSON.parse(req.responseText).d; var results = note.results; var NoteText = results[0].NoteText; var newnote = Xrm.Page.getAttribute("new_lastcomment").setValue(NoteText); } } }; req.send(); } new_lastcomment is the hidden field. What I am trying to do now is that if the user clicks on save and close, to stop the save event, reload the page, and use the script to close the form. Here is the code for that function: function save(executionObj) { var savestate = executionObj.getEventArgs.getsavemode(); if (savestate == 2) { executionObj.getE…
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/42610456
upvote count: 2
has comment: http://stackoverflow.com/comment/42609640
accepted answer: http://stackoverflow.com/a/27048202
has title: Refresh form after save and close
possible better answer: http://stackoverflow.com/a/27043964
has answer: http://stackoverflow.com/a/27043964
has comment: http://stackoverflow.com/comment/42612645
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/42528866
type: Comment
comment on: http://stackoverflow.com/a/26999170
has text: Also, based on NodeJS docs, `setImmediate` callbacks fire *before* `setTimeout`/`setInterval`, which makes it a bad candidate for making stuff "last".
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42570420
comment on: http://stackoverflow.com/a/27021475
has text: So, it doesn't return error? Is loginWithPassword is being started? After submitting this form try type in console Meteor.user()
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42688906
type: Comment
score: 0
type: AnswerComment
has text: Yes, that's the point. First time usually shows correctly, but it seems to save a cached copy and then it is when showed wrong. That's why I want to get a way of avoiding cache
comment on: http://stackoverflow.com/a/27089323

http://stackoverflow.com/comment/42664150
type: QuestionComment
comment on: http://stackoverflow.com/q/27076716
score: 0
type: Comment
has text: $(#form1).hide(); $(#form2).show() and $(#form1).show(); $(#form2).hide()

http://stackoverflow.com/comment/42788507
type: AnswerComment
score: 0
type: Comment
has text: Thank you. That works. You mean i should make a unique id for each button?
comment on: http://stackoverflow.com/a/27146382

http://stackoverflow.com/comment/42605644
score: 0
has text: it may not be showing because of an error. Open your dev tools and see what the console says (most browsers support `<F12>` as the keyboard shortcut to open the dev tools)...
type: QuestionComment
comment on: http://stackoverflow.com/q/27043170
type: Comment

http://stackoverflow.com/a/27111988
type: Answer
has body: I'd suggest using CSS: li:hover { background-color: #eee; } JS Fiddle demo. Obviously adjust selector-complexity as necessary.
answers question: http://stackoverflow.com/q/27111929
score: 2
has comment: http://stackoverflow.com/comment/42727108
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/66648320
score: 0
has text: Hey @Tony, thanks. I have already solved this. Somehow, I managed to find this file, that you mentioned in your post. But what I didn't understatnd that, in this file already password validation code is already available, but still it is not working in SugarCRM CE edition. Let me know, if you know anything. I am closing this question by accepting your answer.
comment on: http://stackoverflow.com/a/39661535
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27032741
has comment: http://stackoverflow.com/comment/42587030
type: Answer
has body: Something do like this. var listColor = function(){ var list = document.getElementsByTagName("li"); for (i = 0; i &lt; list.length; i++) { if(i%2==0) list[i].style="color:red"; else list[i].style="color:blue"; } } listColor();
answers question: http://stackoverflow.com/q/27032628
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42587041
downvote count: 0

http://stackoverflow.com/q/27028520
score: 0
has comment: http://stackoverflow.com/comment/42580058
has answer: http://stackoverflow.com/a/27028731
answer count: 1
accepted answer: http://stackoverflow.com/a/27028731
has title: having trouble disabling/re-enabling javascript webui-popover
type: AnsweredQuestion
has body: I'm using this script here: https://github.com/sandywalker/webui-popover I'm initializing a popover on an element but wanting to disable it under certain circumstances. I want to then re-enable it, but my code is not working You can see it here: http://jsfiddle.net/z613fsnu/1/ function enablePopover() { $('#popover').webuiPopover(); } function disablePopover() { $('#popover').webuiPopover().off(); } $('#enable').click(function() { enablePopover(); }); $('#disable').click(function() { disablePopover(); }); enable disable popover Calling enablePopover() does indeed enable it. Calling disablePopover() then disables it. But then if I call enablePopover() again after disablePopover() it does not re-initialize the popover. What am I doing wrong?
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27128492
has comment: http://stackoverflow.com/comment/42756901
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/42756884
has comment: http://stackoverflow.com/comment/42756141
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a JS file which runs the canvas animation. What I do is create a function to grab its contents by toDataURL and push that URL data to array. At the end I send the ajax request to process that array and create images of it. When I do this on firefox it works fine , But when try to do it on chrome , the error message comes. I think the problem is the post data i.e the array becomes too large that it crashes. function encode_array() { var myjson = JSON.stringify(imgg); $.post('localhost:82/html5-video-maker/presentation/array_data1', { data: my‌json }); // return; } function makevideo() { if (anim) { if (flag_video == 1) { imgg[cnt] = cs.toDataURL(); } else { imgg[cnt] = canvas.toDataURL(); } cnt++; } else { encode_array(); // doRequest(0); clearInterval(t); } } var t = setInterval('makevideo()', 0.0003); When can be the solution regarding this ?
has title: Saving canvas images around 300 in an array and sending it once to process it crashes in chrome but works fine in firefox
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/42756365
has answer: http://stackoverflow.com/a/27137630
has comment: http://stackoverflow.com/comment/42756765

http://stackoverflow.com/comment/42547961
type: Comment
has text: You've basically implemented `.indexOf()` behaviour right there :P
comment on: http://stackoverflow.com/a/27010333
type: AnswerComment
score: 0

http://stackoverflow.com/a/27024510
score: 0
has body: What if you used button a to hide button b until a is clicked and then show button b and so fourth until your results are displayed as you with. example: $('.btnB').hide(); $('.btnA').on('click', function() { $('.btnB').toggle(); }); Unless it needs to all display at one time this method wouldn't be able to work in that type of situation
answers question: http://stackoverflow.com/q/27024172
type: Answer

http://stackoverflow.com/a/35803568
has body: Looks like Angular 1.3 fixed this (https://stackoverflow.com/a/32907176/3854385) This is now possible with Angular 1.3+: Enter a name Demo In some cases an inner form is a good solution if you can just pass the information: (https://stackoverflow.com/posts/12044600/) To solve the 'dynamic name' problem you need to create an inner form (see ng-form): URL error Test The other alternative would be to write a custom directive for this. Here is the jsFiddle showing the usage of the ngForm: http://jsfiddle.net/pkozlowski_opensource/XK2ZT/2/
answers question: http://stackoverflow.com/q/27071413
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27071413
has comment: http://stackoverflow.com/comment/69976581
has comment: http://stackoverflow.com/comment/69976345
upvote count: 26
type: Answer
has comment: http://stackoverflow.com/comment/69977264
has comment: http://stackoverflow.com/comment/69978407
downvote count: 0
has comment: http://stackoverflow.com/comment/69976716
score: 26

http://stackoverflow.com/comment/42598706
comment on: http://stackoverflow.com/q/27039224
score: 0
type: Comment
type: QuestionComment
has text: thank you very much. its very kind of you

http://stackoverflow.com/q/27119684
has title: Concat objects is not working or I need to convert values to the right format?
accepted answer: http://stackoverflow.com/a/27120315
tagged with: object
type: AnsweredQuestion
has body: I need to get data.entities.paises from the first $.post and concat() with data.entities from the second $.post and this is how I'm doing: var paisesFromEntity; $.post(Routing.generate('productoGuardarPasoCinco'), $form.serialize(), 'json').done(function (data, textStatus, jqXHR) { if (data.entities !== "undefined" || data.entities != "") { paisesFromEntity = data.entities.paises; } }).fail(function () { return false; }); var returnList = function (entities) { if (entities.length &gt; 0) { var items = []; entities.forEach(function (value, index, array) { items.push(value.pais); }); return items.join(', '); } }; var fullList = []; $.post(Routing.generate('agregarPaisesDistribuidor'), $form.serialize(), 'json').done(function (data, textStatus, jqXHR) { fullList = fullList.concat(data.entities, JSON.stringify(paisesFromEntity)); var displayText = returnList(fullList); $('#td-' + data.idToUpdate).html(displayText); }).fail(function () { return false; }); Taking this output for first $.post(): { "success":true, "entities":{ "id":13, "nombre":"dsdsfsdfsd", "direccion":"fsdfsdfsdf", "telefono":"4234234", "paises":[ "Bolivia", "Costa Rica", "Ecuador" ] } } And the this for the second $.post(): { "success":true, "entities":[ { "pais":"Colombia" }, { "pais":"Panam\u00e1" }, { "pais":"Ciudad del Vaticano" } ], "idToUpdate":"14" } The expected output in displayText should be something like: Bolivia, Costa Rica, Ecuador, Colombia, Panam\u00e1, Ciudad del Vaticano but I get this output instead Colombia, Panamá, Ciudad del Vaticano, and some values are missing the ones from data.entities.paises. I suspect the error is that data.entities.paises is not in the same format as data.entities and for that the function on returnList doesn't do the job god, so where is the error on the concat() function or on the data.entities.paises format? If is the second one how can I convert to the same format as data.entities before concatenate both?
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42741515
type: Question
linked to: http://stackoverflow.com/q/27127758
has comment: http://stackoverflow.com/comment/42741479
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27120315
score: 0
has comment: http://stackoverflow.com/comment/42741535
answer count: 1

http://stackoverflow.com/comment/42543839
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27007572
has text: @DavidThomas ???? Is this not "experiment / learn"? Hahah, I simply posted this as I am learning.
score: 0

http://stackoverflow.com/q/27048482
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: angular-ngmodel
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/27048629
tagged with: validation
answer count: 1
downvote count: 0
has title: How can I watch an ngModel value before it's valid?
favorite count: 0
tagged with: angularjs
tagged with: angular-directive
has body: I have a password field with a passwordStrengthMeter element directive beside it. I'd like the passwordStrengthMeter to observe changes to the password field and update in real time -- not just on blur or when the password field's model passes validation. I'm using Angular validation on the password field, I'm finding that my directive cannot observe changes to the password field until the password field is valid. I want password validation to remain intact, but I also want realtime strength indication. How can I make this work? Here is what I have so far... HTML: &lt;input class="control" type="password" name="password" placeholder="Password" ng-model="account.password" ng-minlength="8" ng-maxlength="15" ng-pattern="VALIDATION_PATTERNS.passwordStrength" required ng-focused /&gt; &lt;password-strength-meter password-field="account.password"&gt;&lt;/password-strength-meter&gt; And the directive: angular.module('app.directives').directive('passwordStrengthMeter', function() { 'use strict'; return { restrict: 'E', replace: true, template: '&lt;div class="password-strength-meter"&gt;&lt;/div&gt;', link: function(scope, element, attrs) { // Map scores to CSS classes. var scoreClasses = { 0: 'blank', 1: 'weak', 2: 'moderate', 3: 'strong', 4: 'very-strong' }; var scorer = function() { // Get password value. var password = scope.$eval(attrs.passwordField); // Calculate a score. // TODO Replace this with an actual calculation. return password.length; } scope.$watch(scorer, function(score) { // Remove any score classes for the element. for (var i in scoreClasses) { element.removeClass(scoreClasses[i]); } // Set class based on score. element.addClass(scoreClasses[score]); }); } }; });

http://stackoverflow.com/a/27133082
score: 1
has comment: http://stackoverflow.com/comment/42765664
has comment: http://stackoverflow.com/comment/42778357
has comment: http://stackoverflow.com/comment/42777401
has comment: http://stackoverflow.com/comment/42778045
has comment: http://stackoverflow.com/comment/42776545
has comment: http://stackoverflow.com/comment/42765994
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27130876
has comment: http://stackoverflow.com/comment/42777529
answers question: http://stackoverflow.com/q/27130876
has body: http://jsfiddle.net/5TTm4/2100/ you have DIV and TABLE with same id=slider. Change TABLE id to "slider_table" in event "slide" change $("slider").find ... to $("#slider_table").find HTML: Hide A Raw Name Release Rating Country GoodFilm 2013 9 USA BadFilm 2014 4 USA JQ: $("#slider").slider({ value: 1, min: 0, max: 10, step: 1, slide: function (event, ui) { $("#slider_table").find("td:nth-child(3)").filter(function () { return parseInt($(this).text()) < 5; }).parent().hide(); } })
type: Answer
upvote count: 1

http://stackoverflow.com/q/27060617
has body: I want to randomly (of a selected list) change the color of the background of my header which I've done and is working great, using this JS: var bgcolorlist=new Array("#ef5c20", "#a7dbca", "#c5e53f", "#ffad14") $(".cbp-hsinner").css("background-color",bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]); but I want the same random color to apply to the 'border-top-color' of this a:after tag here: .cbp-hsmenu > li.cbp-hsitem-open > a:after { top: 100%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; border-color: transparent; border-top-color: #ef5c20; border-width: 10px; left: 50%; margin-left: -10px; } HTML: <img width="145" alt="Hello Archie" src="<?php echo theme_url('/img/HA-LOGO3.png'); ?>" /> Home Categories Personal Monthly Updates Informative Reviews Guides About Elsewhere Portfolio The Baby Project Is this possible?
tagged with: background
has comment: http://stackoverflow.com/comment/42636160
type: Question
linked to: http://stackoverflow.com/q/17788990
answer count: 1
tagged with: header
tagged with: javascript
has answer: http://stackoverflow.com/a/27063072
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Changing random css colour to background of one DIV and border-top-color of another
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42635940
linked to: http://stackoverflow.com/q/5041494
has comment: http://stackoverflow.com/comment/42636370

http://stackoverflow.com/q/26996051
has comment: http://stackoverflow.com/comment/42528077
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26998353
upvote count: 1
downvote count: 1
has body: I am using jQuery UI dialog, as soon as page is reloaded it works fine, but if I have awaited for some time, or doesn't do any action, then I clicked again on button to open that dialog, then it is giving error: Uncaught TypeError: undefined is not a function deleteNode (anonymous function) My code sample is as following: function deleteNode(d) { $("#deleteNodeDialog").dialog({ /*My delete node functionality here*/ }); }
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
score: 0
has title: Dialog is not opening after some time
has comment: http://stackoverflow.com/comment/42522710
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/26998353
has comment: http://stackoverflow.com/comment/42522867

http://stackoverflow.com/a/27049095
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42616826
answers question: http://stackoverflow.com/q/27048694
has body: On my system 5000 is still ok, but do you really need to render > 1000 dom nodes in a real world scenario? If you care that much about performance maybe you could consider Mithril. It too uses a virtual dom approach but is really small and fast.
downvote count: 0
has comment: http://stackoverflow.com/comment/42623996
has comment: http://stackoverflow.com/comment/42617133
type: Answer

http://stackoverflow.com/a/27071923
has comment: http://stackoverflow.com/comment/42988969
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42820900
has comment: http://stackoverflow.com/comment/42747908
has comment: http://stackoverflow.com/comment/43001823
has comment: http://stackoverflow.com/comment/42766915
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/42681556
has body: You can load the content in an iframe, and use gesture detection and css transforms to scale the content. You will have to set the source of an tag to the DOM, so your setup would look like this and imageViewer.html you can use the jquery plugin jquery.panzoom to do the scaling. That should do it. Another option is to enable viewport scaling on a different html page, if that navigation doesn't disrupt the state of your your application since the page will be reloaded when you return. The meta tag setting that allows for scaling is this and cordova has a preference in your config.xml <preference name="EnableViewportScale" value="true" /> Its suggested in some other answers on SO, but I haven't tried it. Sadly, you can't load the other page in an iframe since your page viewport settings prevent scaling.
has comment: http://stackoverflow.com/comment/42986466
downvote count: 0
has comment: http://stackoverflow.com/comment/42681585
accepted answer of: http://stackoverflow.com/q/27070550
answers question: http://stackoverflow.com/q/27070550
score: 4

http://stackoverflow.com/q/27097296
has answer: http://stackoverflow.com/a/27097355
has title: Delaying the Submit button click using Jquery
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/27097414
has answer: http://stackoverflow.com/a/27097380
has body: I am new to Jquery and my Question is can i delay the click on the submit button for example, you cannot click the submit button for 1 second after submitting so I can prevent the Click spamming on the submit button this is my Click event $("#btnConfirmEditNo").click(function (e) { e.preventDefault(); $('#editContactForm').validationEngine('hide'); editwnd.close(); }); also tried the settimeout() but it delays the closing of the window
accepted answer: http://stackoverflow.com/a/27097380
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42699952
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27097355

twebbrowser
tags question: http://stackoverflow.com/q/27091639
type: Tag
tag name: twebbrowser
tags question: http://stackoverflow.com/q/27081532
tags question: http://stackoverflow.com/q/27005017

http://stackoverflow.com/q/27123872
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
upvote count: 2
tagged with: fancybox-2
has comment: http://stackoverflow.com/comment/42776828
has body: How can i open html page in fancybox and redirect this html to another html page in fancybox with fancybox re-sizing? I have tried below code yet: Href is the another page link which i want to open in fancy box on click id fancybox-manual-e Link: Forgot Password? Jquery: $("#fancybox-manual-e").click(function() { $.fancybox.open({ 'href' : 'loginby.html', 'type' : 'iframe', 'padding' : 5, 'width': 800, 'height': 500, }); });
tagged with: javascript
type: UnansweredQuestion
score: 2
has title: How can i open html page in fancybox and redirect this html to another html page in fancybox with fancybox resizing?
downvote count: 0
answer count: 0

http://stackoverflow.com/a/27061852
score: 0
has body: First add an id to the button - &lt;input type="button" id="myColorButton" value="BLUE" name="button_blue" /&gt; Then add the following piece of code to your script - document.getElementById("myColorButton").onclick = function() { this.value="RED"; };
type: Answer
answers question: http://stackoverflow.com/q/27061665
has comment: http://stackoverflow.com/comment/42637948

http://stackoverflow.com/comment/42606909
comment on: http://stackoverflow.com/q/27044101
type: Comment
type: QuestionComment
has text: Very Difficult to answer without HTML mark-up!
score: 1

http://stackoverflow.com/a/27083475
has body: This should work for you: (It's submit's the form when the document is ready) $(document).ready(function(){ $("#form").submit(); }); To automatic submit your form use: &lt;script language="javascript"&gt; $(function(){ $("form").submit(); }); &lt;/script&gt; (But be sure your action is not on the same page!) EDIT: So your script should look something like this: &lt;script language="javascript"&gt; $(document).ready(function() { $.ajax({ type: 'POST', url: $(this).attr('action'), data: $(this).serialize(), success: function(data) { $('#result').html(data); } }) }) &lt;/script&gt;
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42676249
has comment: http://stackoverflow.com/comment/42676626
answers question: http://stackoverflow.com/q/27083453
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42676611
has comment: http://stackoverflow.com/comment/42676161
has comment: http://stackoverflow.com/comment/42676153

http://stackoverflow.com/comment/42584507
comment on: http://stackoverflow.com/q/27031237
has text: How would I confirm it?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/35050259
downvote count: 0
upvote count: 2
has body: I just create one object with all variables in it that I export as a module so I can use it throughout all my task files. For example js/tasks/variables.js module.exports = { myBool: true }; js/tasks/sass.js var gulp = require('gulp'), $ = require('gulp-load-plugins')(), log = $.util.log, vars = require('./variables'); gulp.task('sass', function () { log('myBool: ' + vars.myBool); // logs "myBool: true" vars.myBool = false; }); js/tasks/build.js var gulp = require('gulp'), $ = require('gulp-load-plugins')(), log = $.util.log, vars = require('./variables'); gulp.task('build', function () { log('myBool: ' + vars.myBool); // logs "myBool: false" }); /gulpfile.js Then you can get/set those variables from anywhere: var gulp = require('gulp'), $ = require('gulp-load-plugins')(), runSequence = require('run-sequence'), vars = require('./js/tasks/variables'), requireDir = require('require-dir')('./js/tasks'); gulp.task('production', function(){ runSequence('sass', 'build'); });
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27007445

http://stackoverflow.com/a/27144810
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27135056
type: Answer
answers question: http://stackoverflow.com/q/27135056
has body: Discussion in the question comments appeared to have helped the OP. $parsers was causing user-specified input values to be stored to the model value as the filter number format. For example, if 123456 was entered, the underlying model value would be set to 123,456. The point here is that the model value should be storing the raw user input, not the user input after formatting is applied. A simple implementation to parse the user input for $parsers would be to use parseFloat(), like so: ngModelController.$parsers.push(function (data) { return parseFloat(data); }); To be safe, this parsing function should be improved to accommodate for bad user input. I've provided a rudimentary example of this in my demonstration Plunker. On blur, the value in the input field should be set to the filtered version of the model value. DEMO
upvote count: 3
score: 3

http://stackoverflow.com/comment/42516558
type: Comment
score: 1
comment on: http://stackoverflow.com/a/26992244
type: AnswerComment
has text: Try to use Javascript so

http://stackoverflow.com/q/27036862
type: Question
has title: Json receive a request
score: 1
tagged with: http://stackoverflow.com/tag/json
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42594526
tagged with: jquery
favorite count: 0
has body: Hi i have generate this jsonWriter .key(FEEDBACK) .object() .key(DOCUMENT) .value(idDocument) .endObject(); When it come it coming something like this : {"feedback":{"document":"0.23106060923811467"} When i try to create the object json it gives me an error: JSONTokener json = new JSONTokener(request.getParameter("id")); Thanks in advance
has comment: http://stackoverflow.com/comment/42594029
answer count: 0
type: UnansweredQuestion
upvote count: 1

postback
tag name: postback
tags question: http://stackoverflow.com/q/27071191
type: Tag

http://stackoverflow.com/a/27009941
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27009696
has body: For the orderBy filter, it's trying to evaluate the property on your scope for a function or string. So, it's not looking at the current value in the list; it's trying $scope.value which is probably undefined. Rather, it's expecting a string property on each member of your list (or a function to evaluate the sort with). For example, if you had a list of people objects that you wanted to sort by name, you would use orderBy:"name":reverse. So, you would just supply whatever property exists on your list members that you want to sort by, or implement a function to compare members of your list and pass that to orderBy. If you're not dealing with objects, but just numeric/string values, then you can do what's suggested in this question: orderBy array item value in Angular ng-repeat. Docs: https://docs.angularjs.org/api/ng/filter/orderBy

http://stackoverflow.com/a/27100606
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27100341
answers question: http://stackoverflow.com/q/27100341
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I'd suggest the following approach: // binding a change event-handler to elements: $('input[type=checkbox]').change(function() { // assuming you want this to run only when the checkbox is checked: if (this.checked) { // find the elements: var ID = $('th').filter(function() { // find those elements whose trimmed-text is exactly 'ID': return $.trim($(this).text()) === 'ID'; // get the cellIndex property of that element (or the first matched element): }).prop('cellIndex'), // find the closest element from the checked : IDVal = $(this).closest('tr') // find the descendant elements: .find('td') // find the with the same cellIndex as the .eq(ID) // retrieve the text: .text(); console.log(IDVal); } }); $('input[type=checkbox]').change(function() { if (this.checked) { var ID = $('th').filter(function() { return $.trim($(this).text()) === 'ID'; }).prop('cellIndex'), IDVal = $(this).closest('tr').find('td').eq(ID).text(); console.log(IDVal); } }); Select Des ID col 2, row 1 col 3, row 1 col 2, row 2 col 3, row 2 If, however, you use a class-name to identify which cells contains the 'id' associated value, such as , this all becomes much simpler: $('input[type=checkbox]').on('change', function() { if (this.checked) { // find the closest element from the :checked : var idValue = $(this).closest('tr') // find the element with the class of 'id': .find('.id') // retrieve the text of that element: .text(); console.log(idValue); } }); $('input[type=checkbox]').on('change', function() { if (this.checked) { var idValue = $(this).closest('tr').find('.id').text(); console.log(idValue); } }); Select Des ID col 2, row 1 col 3, row 1 col 2, row 2 col 3, row 2 References: JavaScript: cellIndex. jQuery: closest(). eq(). filter(). find(). jQuery.trim(). on(). prop().

http://stackoverflow.com/a/27033560
answers question: http://stackoverflow.com/q/27033216
score: 1
downvote count: 0
has body: Show link -3456 Hide link -n 1234 - 4567 -7777 -3456 Without JQuery: var ShowInfo = function (showLong) { if (showLong) { document.getElementById("shortInfo").style.display = "none"; document.getElementById("longInfo").style.display = "block"; } else { document.getElementById("shortInfo").style.display = "block"; document.getElementById("longInfo").style.display = "none"; } } With JQuery: var ShowInfo = function (showLong) { if (showLong) { $("#shortInfo").hide(); $("#longInfo").show(); } else { $("#shortInfo").show(); $("#longInfo").hide(); } }
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42582436
comment on: http://stackoverflow.com/a/27029914
score: 0
type: AnswerComment
type: Comment
has text: thanks its working but with this code first time my function called but when i click on my image no event calling now what is my wrong?

http://stackoverflow.com/q/27004960
type: Question
tagged with: javascript
tagged with: gruntjs
tagged with: pug
upvote count: 1
answer count: 1
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion
has title: Gruntfile Jade task compiling weird template
tagged with: node.js
has body: I have a pretty simple jade template with a single variable. However, when I generate the html file, a bunch of jade javascript is pushed in and a runtime.js file is created. Here is my task: jade: { prod: { options: { data : { mainJs: 'dist/main.js', }, pretty: true, extension: ".html" }, files:[{ src: '&lt;%= yeoman.app %&gt;/index.jade', dest: '&lt;%= yeoman.app %&gt;', }] } } Any idea what I'm missing here?
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27008871

http://stackoverflow.com/comment/42686956
type: AnswerComment
has text: Copy. Paste. It's not hard, then you can do what you want with it.
type: Comment
comment on: http://stackoverflow.com/a/27086672
score: 0

http://stackoverflow.com/a/27144613
has comment: http://stackoverflow.com/comment/42815791
has comment: http://stackoverflow.com/comment/42785723
has comment: http://stackoverflow.com/comment/42786041
type: Answer
answers question: http://stackoverflow.com/q/27142553
has comment: http://stackoverflow.com/comment/42837110
has body: This is the solution! Fix your JS to be angular.module('dgUi', ['ui.select', 'ngSanitize']) .config(['uiSelectConfig', function(uiSelectConfig){ uiSelectConfig.theme = 'bootstrap'; }]) .controller('BaseController', ['$scope', function($scope) { // changed here to use $scope.data instead of $scope.input $scope.data = {"results":{ id:0, name:'item0'} }; }]) .controller('DropdownSelectController', ['$scope', function ($scope) { $scope.items = []; $scope.refresh = function (text) { $scope.items = []; for (var i = 0; i < 100; i++) { $scope.items.push({id: i, name: 'item ' + i}); } }; }]) .directive('dropdownSelect', function () { 'use strict'; // do not want to change ng-model="input.name" to anything else as // this should be a directive and cannot be changed return { restrict: 'A', scope: false, controller: 'DropdownSelectController', template: '{{data.results}} ' + ' {{$select.selected.name}} ' + ' ' + ' ' + ' ' + ' ', link: function (scope, element, attrs, ctrl) { } } }); your HTML will be value in $scope.input: {{ data.results }} select an item Working example: http://plnkr.co/edit/VuktEq?p=info
has comment: http://stackoverflow.com/comment/42805757
has comment: http://stackoverflow.com/comment/42834991
has comment: http://stackoverflow.com/comment/42836532
has comment: http://stackoverflow.com/comment/42808265
has comment: http://stackoverflow.com/comment/42837201
has comment: http://stackoverflow.com/comment/42820183
has comment: http://stackoverflow.com/comment/42805902
has comment: http://stackoverflow.com/comment/42826583
score: 0
has comment: http://stackoverflow.com/comment/42806498
has comment: http://stackoverflow.com/comment/42834870
has comment: http://stackoverflow.com/comment/42788609

http://stackoverflow.com/a/27034838
has body: You have a syntaxt error, check the documentation You have to change the event to $('.carousel-stats').on('slide.bs.carousel', function () { As the documentation says slide.bs.carousel This event fires immediately when the slide instance method is invoked. slid.bs.carousel This event is fired when the carousel has completed its slide transition.
accepted answer of: http://stackoverflow.com/q/27034552
answers question: http://stackoverflow.com/q/27034552
type: Answer
has comment: http://stackoverflow.com/comment/42592777
score: 0
has comment: http://stackoverflow.com/comment/42590803
type: AcceptedAnswer

http://stackoverflow.com/comment/42787900
score: 0
type: Comment
has text: Its a `repeater` control, you will have multiple dropdown on page.
comment on: http://stackoverflow.com/a/27145904
type: AnswerComment

http://stackoverflow.com/q/27025628
downvote count: 2
has answer: http://stackoverflow.com/a/27025669
possible better answer: http://stackoverflow.com/a/27025884
type: Question
has answer: http://stackoverflow.com/a/27025884
has comment: http://stackoverflow.com/comment/42574647
has title: What part of this simple Javascript calculator is wrong?
has comment: http://stackoverflow.com/comment/42574660
answer count: 2
has body: I've recently wrote this simple javascript calculator but it will not work, got any ideas? function calculateMe() { var x = document.getElementById("x"); var y = document.getElementById("y"); var e = x + y; document.getElementById("a").innerHTML = e; } + Submit
accepted answer: http://stackoverflow.com/a/27025669
tagged with: javascript
favorite count: 0
score: 0
type: AnsweredQuestion
upvote count: 2

http://stackoverflow.com/comment/42796043
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27150735
has text: It says "10" in the console
type: AnswerComment

http://stackoverflow.com/comment/42619827
score: 0
type: QuestionComment
type: Comment
has text: `v = JSON.parse(JSON.stringify(v).replace(/"@(.+?)":/g, '"$1":'));` if not an object, but a string in the beginning - omit `JSON.stringify` step
comment on: http://stackoverflow.com/q/27051060

http://stackoverflow.com/comment/42718785
score: 0
has text: yes.. i am doing this backend coding in node js
comment on: http://stackoverflow.com/q/27107778
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42707221
score: 0
has text: Does it support `:before` and `:after` pseudo selectors? I can't see any documentation! And on the home page, `:before` and `:after` are not mentioned in the list!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27064010

http://stackoverflow.com/a/27028555
has comment: http://stackoverflow.com/comment/43097911
has comment: http://stackoverflow.com/comment/43009790
has comment: http://stackoverflow.com/comment/43098129
score: 0
accepted answer of: http://stackoverflow.com/q/27028010
has comment: http://stackoverflow.com/comment/43098287
type: AcceptedAnswer
has body: When you need to eek out every last bit of performance, you probably need to ditch abstractions. If you do your own delegation, you'll certainly see a performance improvement. Because in the example you gave, all the delegation is identical except for the class name, I'd bind a single handler, put the code in separate functions, and then examine the e.target and its ancestors manually looking for the .menu li. If that's found, then check the class of the li, and invoke the correct handler. var handlers = { remove: function() {/*your code*/}, edit: function() {/*your code*/}, action: function() {/*your code*/}, anotherAction: function() {/*your code*/} }; var targets = Object.keys(handlers); document.onclick = function(e) { e = e || window.event; var li; var node = e.target || e.srcElement; var targetClass; do { if (!li) { if (node.nodeName === "LI") { li = node; } } else if (node.className.indexOf("menu") &gt; -1) { targetClass = li.className break; } } while(node = node.parentNode); if (!targetClass) return; for (var i = 0; i &lt; targets.length; i++) { if (targetClass.indexOf(targets[i]) &gt; -1) { handlers[targets[i]].call(li, e); } } } In the code above, as we traverse up from the e.target, we first check to see if we're on an li. If so, grab it and continue one. As we continue, we no longer need to check for li elements, but we now need to check for an element with the menu class. If we find one, we grab the class name of the li we previously found and then halt the loop. We now know we have our menu li.someClass element. So then we can use the class that we found on the li to look up the proper function to invoke from our list of functions we made above. You should note that my .indexOf() class testing is ad hoc, and could result in false positives. You should improve it. Also, the code needs more tweaking since we're caching the li without knowing if it actually has a class that we're interested in. That should be fixed as well. I'll leave it to you to add th…
has comment: http://stackoverflow.com/comment/43097544
has comment: http://stackoverflow.com/comment/43097738
type: Answer
has comment: http://stackoverflow.com/comment/43097147
has comment: http://stackoverflow.com/comment/43097996
has comment: http://stackoverflow.com/comment/43097289
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27028010

http://stackoverflow.com/q/27003906
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has body: Based off of I dont know how many examples. This should work, yet it does not. I am so new to backbone.js that this just hurts my head cause I can write jquery based code with my eyes close, I can write native javascript no problem. But this, what? Why? the click will not work, the "events" as far as I can tell just don't register. Can I not do event's on divs? or what am I missing? Now I know this will be flagged a duplicate, I know people will just link to some other example. The problem is I've likely already seen it, compared it, and still for the life of me can't figure out what is wrong. It works up until the events, when I click on the div I'd assume the event be fired and its not. This is my issue I don't know why, and not knowing why is whats causing the headache Test
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/27004293
downvote count: 0
has title: backbone.js events not firing and I don't understand why
score: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27004293
tagged with: javascript
type: Question

http://stackoverflow.com/comment/42589683
has text: Chris - I think I realised that on the walk to work this morning. <cfdocument> has a limited sub-set of HTML it will render (div, table, etc.) but SVG isn't amoungst that sub-set :(
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27024648

http://stackoverflow.com/comment/42588190
has text: 6 digits. It's miliseconds to wait. It adds up correctly.
score: 0
comment on: http://stackoverflow.com/q/27033174
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42694656
score: 0
type: Comment
type: QuestionComment
has text: I understand. and that if I am on the second view , this after searching redirect me to the home page with a list of search results ?
comment on: http://stackoverflow.com/q/27094278

http://stackoverflow.com/a/27102289
has comment: http://stackoverflow.com/comment/42709908
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42709551
upvote count: 1
has body: No, try understanding the MVC pattern, the idea is that the model is not aware of the view and doesn't have to be. Also you can't call JS with php, which is a server side language and doesn't know anything about the client side scripts. What you want is to implement long polling. I recommend you to learn and read about the basic technologies involved before trying to implement something. http://en.wikipedia.org/wiki/Push_technology http://en.wikipedia.org/wiki/Comet_%28programming%29
type: Answer
has comment: http://stackoverflow.com/comment/42709318
has comment: http://stackoverflow.com/comment/42714806
answers question: http://stackoverflow.com/q/27101115

http://stackoverflow.com/q/27097549
has answer: http://stackoverflow.com/a/27098960
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42703160
accepted answer: http://stackoverflow.com/a/27098960
has comment: http://stackoverflow.com/comment/42702331
type: Question
answer count: 1
tagged with: javascript
has body: i am following Discover meteor book and in one of the chapter author taught me to use Meteor.logginIn() method. The goal is Simple, there is a submit page for new post and if there are no users logged in, it should display access denied template, else it should display post submit template. But if the user is loggin in or in wait state it should display loading template. I followed the tutorial and did what was told, the code looks exactly the same as the book. But, when user is logged in it rightfully display the submit page and when user is logged out it should display the access denied page but instead shows the loading template, while showing loading template if i log in, then it also display the submit page. The only trouble is while it should display the access denied, it is showing loading template. Here is the routing code Router.route('/submit', {name: 'postSubmit'}); var requireLogin = function(){ if(!Meteor.user()){ if(Meteor.logginIn()){ this.render(this.loadingTemplate); }else{ this.render('accessDenied'); } }else { this.next(); } } Router.onBeforeAction('dataNotFound', {only:'postPage'}); Router.onBeforeAction(requireLogin, {only:'postSubmit'});
score: 0
tagged with: meteor
has title: Meteor LogginIn() shows loading when not needed
tagged with: url-routing

http://stackoverflow.com/comment/42580789
has text: It may be simpler to convert your current structure to a single object with many properties aka flatten, this could be done dynamically. Refer to http://stackoverflow.com/questions/19436457/how-flatten-object-literal-properties If you needed a/b/c to convert to abc you can modify the answer to include each level's parent property name.
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27028868

http://stackoverflow.com/comment/42586239
type: AnswerComment
type: Comment
has text: could you provide an example?
comment on: http://stackoverflow.com/a/27032304
score: 0

http://stackoverflow.com/comment/42765679
comment on: http://stackoverflow.com/q/27133534
score: 0
type: Comment
type: QuestionComment
has text: try `$(this).index()`

http://stackoverflow.com/comment/42784280
type: AnswerComment
comment on: http://stackoverflow.com/a/27143745
score: 0
type: Comment
has text: Hi i've tried this code but it seems has an error i also tried to instantiate my view model and through that i access the observable array and subscribe and the error is gone but whenever i push a data into the array the function that i subscribe is not firing at all

http://stackoverflow.com/a/27109904
answers question: http://stackoverflow.com/q/27109783
has body: $(this).css("background", "#000"); alert($(this).attr('id')); Fiddle http://jsfiddle.net/cLws40vr/5/
score: 0
type: Answer

http://stackoverflow.com/comment/42767507
type: Comment
has text: It is working for me. Check your browser. What is your browser?
comment on: http://stackoverflow.com/a/27134318
score: 0
type: AnswerComment

http://stackoverflow.com/q/27127913
tagged with: javascript
type: AnsweredQuestion
tagged with: max
has title: Highest value of an array inside an array
has comment: http://stackoverflow.com/comment/42755080
type: Question
accepted answer: http://stackoverflow.com/a/27128023
has body: I have an array with these values (returned from google.maps.LatLng): var polygon = [ { k=50.882917044569744, B=6.003985404968262}, { k=50.88289589175401, B=6.003938466310501}, { k=50.882934389871465, B=6.003895550966263}, { k=50.88295554266969, B=6.003943160176277} ] And I want the key of the one with the highest B value so in this case it would be polygon[0] I don't know how exactly the array is made actually but console.log() returns me this exactly: [df { k=50.882917044569744, B=6.003985404968262, toString=function(), meer...}, df { k=50.88289589175401, B=6.003938466310501, toString=function(), meer...}, df { k=50.882934389871465, B=6.003895550966263, toString=function(), meer...}, df { k=50.88295554266969, B=6.003943160176277, toString=function(), meer...}] And polygon[0] would return me the first object.
score: 0
answer count: 1
tagged with: arrays
has answer: http://stackoverflow.com/a/27128023

http://stackoverflow.com/comment/42641083
comment on: http://stackoverflow.com/q/27063558
type: Comment
type: QuestionComment
score: 1
has text: Change the z-index to be higher than your other blocks?

http://stackoverflow.com/q/27004316
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42538073
has answer: http://stackoverflow.com/a/27004965
favorite count: 0
has answer: http://stackoverflow.com/a/27004385
accepted answer: http://stackoverflow.com/a/27004385
has title: maximum execution time for long process in node.js
tagged with: node.js
score: 2
type: AnsweredQuestion
upvote count: 5
downvote count: 3
possible better answer: http://stackoverflow.com/a/27004965
has body: Maximum HTTP Request execution time is 120sec in Node.js , how can i increase max execution time on http get/post requests? NOTE:I'm using expressjs framework
type: Question

http://stackoverflow.com/a/27099161
upvote count: 2
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27099105
type: Answer
has body: It should work with this codesnippet: for(key in list) { var elementOfList = list[key]; } key could be 'FiveSStatus' and elementOfList 0

http://stackoverflow.com/a/27096831
downvote count: 0
has comment: http://stackoverflow.com/comment/42699368
type: Answer
has comment: http://stackoverflow.com/comment/42699219
has body: There are no enumerable properties on an empty slots array like that. In addition, you almost never want to use for ( in ) loop for going over an array's indexes. You should use a regular for loop, or Array.prototype.forEach() (if the array had values, of course). function printArray(a) { for (var i = 0; i &lt; a.length; i++) { console.log(a[i]); } } // or function printArray(a) { a.forEach(function(i) { console.log(i); }); } Keep in mind that Array.prototype.forEach() may not be supported in all your target platforms.
has comment: http://stackoverflow.com/comment/42699084
accepted answer of: http://stackoverflow.com/q/27096820
answers question: http://stackoverflow.com/q/27096820
has comment: http://stackoverflow.com/comment/42700255
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/a/27122053
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27121898
type: Answer
downvote count: 0
has body: Please don't use jQuery for that. jQuery is a tool for HTML DOM operations. You can just use regular JavaScript. You can do either a for loop on your data, or use .forEach on an Array: arr.data.size.forEach(function (value, index) { console.log('arr.data.size[' + index+ ']=', value) console.log('arr.data.prop[' + index+ ']=', arr.data.prop[index]) }) This will output: arr.data.size[0]= 2.2 Mb arr.data.prop[0]= small arr.data.size[1]= 6.11 Mb arr.data.prop[1]= small arr.data.size[2]= 9.25 Mb arr.data.prop[2]= small arr.data.size[3]= 18.49 Mb arr.data.prop[3]= medium arr.data.size[4]= 23.79 Mb arr.data.prop[4]= medium
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27121898
has comment: http://stackoverflow.com/comment/42745237
has comment: http://stackoverflow.com/comment/42752130

http://stackoverflow.com/comment/46121603
has text: Any luck with this? I'm running into the same issue.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27094908

http://stackoverflow.com/q/27055362
has comment: http://stackoverflow.com/comment/42627044
score: 2
linked to: http://stackoverflow.com/q/10025856
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42631105
tagged with: ajax
has comment: http://stackoverflow.com/comment/42627051
type: Question
has comment: http://stackoverflow.com/comment/42645011
has answer: http://stackoverflow.com/a/27055812
has comment: http://stackoverflow.com/comment/42631297
has comment: http://stackoverflow.com/comment/42631723
has comment: http://stackoverflow.com/comment/42628074
upvote count: 2
has comment: http://stackoverflow.com/comment/42631556
has answer: http://stackoverflow.com/a/27090151
has comment: http://stackoverflow.com/comment/42631301
has comment: http://stackoverflow.com/comment/42626978
has title: How to display alert value inside nested table td
has comment: http://stackoverflow.com/comment/42631424
has comment: http://stackoverflow.com/comment/42631381
has comment: http://stackoverflow.com/comment/42627012
has body: i am calling ajax in a loop which is residing inside as below, i am able to alert the value correctly perfectly while iterating the loop, What i want is to show the same value in the &lt;td&gt; section, instead of giving alert, Is this possible? &lt;!-- The template to display files available for download --&gt; &lt;script id="template-download" type="text/x-tmpl"&gt; {% for (var i=0, file; file=o.files[i]; i++) { %} &lt;tr class="template-download fade"&gt; &lt;td&gt; &lt;span&gt;{%=file.name%}&lt;/span&gt; &lt;!----- Ajax function call --------&gt; var a= file.name; $.ajax({ type: "POST", url: "http://localhost/myappproject/trips_controller/showStatus/", dataType: "text", data: {image_name: a,trip_id: '2'}, success: function(msg){ alert(msg);//how can i display this value in this place } }); &lt;/td&gt; &lt;/tr&gt; {% } %} &lt;/script&gt; About x-templ used in this above code what is x-templ? Demo Please write to me, if you could not understand my question, i will try to explain you in some other way. From two two days i tried , and finally thought to ask Genius people who sees StckOverflow everyday :) –
has comment: http://stackoverflow.com/comment/42627081
answer count: 5
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27055621
has comment: http://stackoverflow.com/comment/42626991
has answer: http://stackoverflow.com/a/27055485
has answer: http://stackoverflow.com/a/27058263
has comment: http://stackoverflow.com/comment/42661875

http://stackoverflow.com/a/27015289
has body: Try $('.rating').prependTo(function(){ if ($(this).parent().hasClass('hotel')) { $(this).prependTo('.price-tag'); } });
answers question: http://stackoverflow.com/q/27015207
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/42605186
comment on: http://stackoverflow.com/q/27043007
type: QuestionComment
type: Comment
has text: Its really not clear what you trying to do here.
score: 1

http://stackoverflow.com/q/27055105
has comment: http://stackoverflow.com/comment/42626663
has title: onchange jquery validation for file type
has comment: http://stackoverflow.com/comment/42626670
score: 0
answer count: 2
tagged with: validation
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27055407
type: AnsweredQuestion
has body: Here is my Fiddle What i have is to display the image name near the upload text in the onchange event. Here i need to have the validation on the onchange and it should display the error along with the file name Here is what i have tried. Upload&lt;input type="file" onchange=" document.getElementById('spanFileName').innerHTML = this.value;" style="display:block;margin-top: -20px;opacity: 0;" &gt; Note : I don't want to do the validation in a seperate by setting rules, i want to do it in onchange, but it will be ok if i have the script inside the input type file code Update : It will be better if i have the file name to be displayed and hide in 5 seconds, as i don't know to write script inside the input type file code How can i do this, Help please
possible better answer: http://stackoverflow.com/a/27055541
upvote count: 1
has answer: http://stackoverflow.com/a/27055541
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27055407

http://stackoverflow.com/q/27125168
has comment: http://stackoverflow.com/comment/42750519
type: Question
tagged with: datepicker
has comment: http://stackoverflow.com/comment/42754253
has answer: http://stackoverflow.com/a/27128100
tagged with: css
has comment: http://stackoverflow.com/comment/42750663
has body: I've been using bootstrap datepicker for a while now. But I'm encountering a glitch on the UI side when the datepicker is being displayed. I'm not sure what is causing this. I checked everything even, updated my datepicker.css file and bootstrap-datepicker.js file from this link Here's its current UI: I'm expecting this kind of UI Any ideas what's causing this? Thanks
has comment: http://stackoverflow.com/comment/42750550
has comment: http://stackoverflow.com/comment/42750694
tagged with: twitter-bootstrap
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42750690
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42751074
has title: Bootstrap datepicker UI issue
tagged with: javascript

http://stackoverflow.com/q/27073151
has comment: http://stackoverflow.com/comment/42658879
score: 0
tagged with: onkeydown
has answer: http://stackoverflow.com/a/27073180
accepted answer: http://stackoverflow.com/a/27073180
type: AnsweredQuestion
has body: I am developing a web application with javascript in which if the right arrow is pressed, we go to the next level. if the minus sign is pressed, we reduce the difficulty. if the space bar is pressed, we pause. Because I want to check for arrows as well, I can't use the keypress event, so instead I'm using the keydown event. A simplified section of code (using jQuery) is the following. $(document).keydown(dealWithKeyDown); function dealWithKeyDown(evt) { if (evt.which == 39) // Right arrow. nextLevel(); if (evt.which == 189) // Minus sign. reduceDifficulty(); if (evt.which == 32) // Space. pause(); } The problem I'm having now is that it doesn't work in Firefox. In FF the keycode for the minus sign is 173 instead of 189. (And there are more differences like that.) Can anyone suggest an easy/elegant work-around? The easiest work-around I can think of is to use the 'evt.key' property, but 'evt.key' is undefined in Chrome, while for the space button IE gives 'evt.key == "Spacebar"' as true while Firefox gives 'evt.key == " "' as true. It's an inconsistency nightmare.
has comment: http://stackoverflow.com/comment/42658704
type: Question
tagged with: keypress
tagged with: firefox
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Javascript keydown: checking both for arrows and the minus sign, work-around for Firefox

http://stackoverflow.com/comment/42672678
type: Comment
type: QuestionComment
has text: thank you for your input i shall add one :)
score: 0
comment on: http://stackoverflow.com/q/27081428

http://stackoverflow.com/comment/42748271
type: AnswerComment
type: Comment
has text: I am looking for an "official" answer but this seems like a workaround.
comment on: http://stackoverflow.com/a/27123915
score: 0

http://stackoverflow.com/comment/42681409
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27085450
has text: Thanks for your feedback on the order and placement of the variables! That did the trick. I would not have thought that was the problem. Also I appreciate the refactor offer, but as mentioned I'm not worried about refactoring or direct solutions. I just need to understand what I have and what it actually does so I can figure it out as much as I can on my own. Thank you again.

http://stackoverflow.com/q/27048381
tagged with: javascript
has comment: http://stackoverflow.com/comment/42744471
linked to: http://stackoverflow.com/q/9793774
answer count: 3
has answer: http://stackoverflow.com/a/27129734
has comment: http://stackoverflow.com/comment/42769498
downvote count: 0
tagged with: jquery
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42759275
has body: I was asked to take a look at what should be a simple problem with one of our web pages for a small dashboard web app. This app just shows some basic state info for underlying backend apps which I work heavily on. The issues is as follows: On a page where a user can input parameters and request to view a report with the given user input, a button invokes a JS function which opens a new page in the browser to show the rendered report. The code looks like this: $('#btnShowReport').click(function () { document.getElementById("Error").innerHTML = ""; var exists = CheckSession(); if (exists) { window.open('&lt;%=Url.Content("~/Reports/Launch.aspx?Report=Short&amp;Area=1") %&gt;'); } }); The page that is then opened has the following code which is called from Page_Load: rptViewer.ProcessingMode = ProcessingMode.Remote rptViewer.AsyncRendering = True rptViewer.ServerReport.Timeout = CInt(WebConfigurationManager.AppSettings("ReportTimeout")) * 60000 rptViewer.ServerReport.ReportServerUrl = New Uri(My.Settings.ReportURL) rptViewer.ServerReport.ReportPath = "/" &amp; My.Settings.ReportPath &amp; "/" &amp; Request("Report") 'Set the report to use the credentials from web.config rptViewer.ServerReport.ReportServerCredentials = New SQLReportCredentials(My.Settings.ReportServerUser, My.Settings.ReportServerPassword, My.Settings.ReportServerDomain) Dim myCredentials As New Microsoft.Reporting.WebForms.DataSourceCredentials myCredentials.Name = My.Settings.ReportDataSource myCredentials.UserId = My.Settings.DatabaseUser myCredentials.Password = My.Settings.DatabasePassword rptViewer.ServerReport.SetDataSourceCredentials(New Microsoft.Reporting.WebForms.DataSourceCredentials(0) {myCredentials}) rptViewer.ServerReport.SetParameters(parameters) rptViewer.ServerReport.Refresh() I have omitted some code which builds up the parameters for the report, but I doubt any of that is relevant. The problem is that, when the user clicks the show report button, and this new page opens up, dependin…
linked to: http://stackoverflow.com/q/10223388
tagged with: vb.net
has answer: http://stackoverflow.com/a/27143748
accepted answer: http://stackoverflow.com/a/27129734
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27146517
has comment: http://stackoverflow.com/comment/42769603
has answer: http://stackoverflow.com/a/27146517
upvote count: 3
tagged with: reporting-services
type: Question
has title: ReportViewer Web Form causes page to hang
score: 3

http://stackoverflow.com/a/27013783
type: Answer
has comment: http://stackoverflow.com/comment/42554499
has body: The show_value() function will be called when the button is clicked. Inside the function, I have set the value of the textbox with the value of the select list. function show_value() { $("#selectedvalue").val($("#list").val()); }
score: 0
answers question: http://stackoverflow.com/q/27013645
has comment: http://stackoverflow.com/comment/42554795

http://stackoverflow.com/comment/42696566
comment on: http://stackoverflow.com/a/27095388
score: 0
type: AnswerComment
has text: Displays blank page when I try, am I doing something wrong?
type: Comment

http://stackoverflow.com/comment/42561536
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27018207
has text: thank you for the reply but i want to learn that code which they did on there website barlasapaydin.com.
score: 0

http://stackoverflow.com/comment/42709003
comment on: http://stackoverflow.com/q/27102224
has text: Oh, so it's a hardware problem. I guess there is no workaround then ?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27112324
type: UnansweredQuestion
has title: HTML5 video tag in IE plays 2 tracks simultaneously instead of one
type: Question
score: 1
has comment: http://stackoverflow.com/comment/42727685
has body: I have this page http://joewillhelpyou.com Users click the blue botton and a video page begins to play. I have it simple. an iframe so the Jquery dows not mess with my tag that I found would not allow me to autoplay the next video, and 2 src for each video. In all the browswers they work okay, only one video is played back mp4 or webm. but in IE I keep hearing two playing back and I cannot figure out why you can visit the page and tell me if you catch my mistake or a workaround for IE &lt;div id="videodiv"&gt; &lt;iframe src="http://joewillhelpyou.com/videos/step2/play02_01.html" width="1000" height="750"&gt;&lt;/iframe&gt; &lt;/div&gt; then this leads to a page where I have the video &lt;video controls autoplay width="936" height="624"&gt; &lt;source src="002_001.mp4" type="video/mp4"&gt; &lt;source src="002_001.webm" type="video/webm"&gt; Your browser does not support the video tag. &lt;/video&gt; under normal situations the code only plays one choce right? but in IE it seems to play 2 things at once, the rest of the browsers only sound out one track and that is what I want
has comment: http://stackoverflow.com/comment/42727661
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: video
has comment: http://stackoverflow.com/comment/42728128
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/42566274
comment on: http://stackoverflow.com/q/27020822
type: Comment
type: QuestionComment
has text: BTW `y.toString();` is a noop.
score: 0

http://stackoverflow.com/comment/53028855
comment on: http://stackoverflow.com/a/27028976
score: 0
has text: DUDE! Thank you so much. I've been searching for two days for a solution. We didn't really have the exact same problem, but your solution got me where I needed to be.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/27139944
accepted answer: http://stackoverflow.com/a/27140006
tagged with: asp.net
has body: I was trying to do validations before submitting the asp.net form. However , it keeps getting submitted. Below is code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %> <asp:Label ID="Name" runat="server" Text="Full Name" CssClass="tabClass"></asp:Label> <asp:TextBox ID="TextBox_FName" Height="25px" Width="300px" runat="server" ></asp:TextBox> <asp:Label ID="uName" runat="server" Text="User Name" CssClass="tabClass"></asp:Label> <asp:TextBox ID="TextBox_UName" Height="25px" Width="200px" runat="server"></asp:TextBox> <asp:Label ID="p1" runat="server" Text="Password" CssClass="tabClass"> </asp:Label> <asp:TextBox ID="Password1" runat="server" Height="25px" TextMode="Password" Width="200px"></asp:TextBox> <asp:Label ID="Label2" runat="server" Text="Retype Password"></asp:Label> <asp:TextBox ID="Password2" runat="server" Height="25px" TextMode="Password" Width="200px"></asp:TextBox> <asp:Button ID="Button3" runat="server" OnClientClick="return !!DoValidation()" Text="Register" style="display:none;" /> <asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="HiddenRegister" style="display:none;"/> Reg1 My form always gets posted even if i get alert prompt of the "else condition of doValidation() method.
possible better answer: http://stackoverflow.com/a/27141383
has answer: http://stackoverflow.com/a/27141383
linked to: http://stackoverflow.com/q/925334
has title: asp.net form getting auto submitted
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27140006
has comment: http://stackoverflow.com/comment/42777798
has comment: http://stackoverflow.com/comment/42777751
type: Question
tagged with: c#
answer count: 2
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42592903
type: QuestionComment
has text: You can refer this https://developers.google.com/drive/web/integrate-create . But you will need a Drive UI. Although not sure how to do that but still this can be helpful
score: 0
comment on: http://stackoverflow.com/q/27035972
type: Comment

http://stackoverflow.com/comment/42548975
has text: @Cheery I am not using Node.js
comment on: http://stackoverflow.com/q/27011001
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27007264
score: 0
type: Question
has answer: http://stackoverflow.com/a/27007434
tagged with: javascript
has answer: http://stackoverflow.com/a/27007406
has answer: http://stackoverflow.com/a/27007265
tagged with: meteor
has answer: http://stackoverflow.com/a/33512208
type: UnansweredQuestion
answer count: 4
has title: Exception in setInterval callback
has body: I'm getting this error after calling a callback function like so: function callbackInterval(test) { Meteor._debug("Test"); } Meteor.setInterval(callbackInterval(test), 60000); This is the error output Exception in setInterval callback: TypeError: undefined is not a function at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56) at packages/meteor/timers.js:6 at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108)

http://stackoverflow.com/q/27008585
has body: I have a set of 3 tabs on my homepage. The one with the class of "current" is the one that is shown. How would be able to link from pageX to my homepage, and tell it which tab to have open? For example, if I click on the "Missions" link, I want it to go to the homepage, with the "Missions" tab shown (with "current" class). I am using Ruby on Rails for this project. But I would prefer a jQuery/JavaScript solution.
has title: Click link to a new page, change class on new page
score: 0
has answer: http://stackoverflow.com/a/27008729
has comment: http://stackoverflow.com/comment/42545318
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
tagged with: ruby-on-rails
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42545406

http://stackoverflow.com/comment/42537224
type: Comment
type: QuestionComment
has text: It doesn't contain a name, use name="somename" to send it with the form
score: 1
comment on: http://stackoverflow.com/q/27003788

http://stackoverflow.com/comment/42580165
type: Comment
score: 0
type: QuestionComment
has text: @self `pageResults` is an array of objects, what I want to do is return the object next to the matched one. @Shiala thanks by your answer but it only returns me `{}` in the console.
comment on: http://stackoverflow.com/q/27028394

http://stackoverflow.com/comment/42604961
has text: What browser are you using? In Firefox it works!
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/27042953

http://stackoverflow.com/a/27089258
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
has body: I think the simple answer is to match a backslash followed by either a backslash or a digit sequence. If it's followed by a digit sequence, check the value and do your substitution: var input = "Do these: \\65\\97 \\66#\\97 But not: \\\\65\\\\97 Do this: \\\\\\65"; snippet.log("Before: " + input); input = input.replace(/\\(\\|\d+)/g, function(m, c) { var val; if (c !== "\\") { val = +c; if (val &gt;= 0 &amp;&amp; val &lt;= 255) { return String.fromCharCode(val); } } return m; }); snippet.log("After: " + input); &lt;!-- Script provides the `snippet` object, see http://meta.stackexchange.com/a/242144/134069 --&gt; &lt;script src="http://tjcrowder.github.io/simple-snippets-console/snippet.js"&gt;&lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/27089212
answers question: http://stackoverflow.com/q/27089212
upvote count: 1
has comment: http://stackoverflow.com/comment/42685824

http://stackoverflow.com/q/27113943
tagged with: scrolltop
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: parallax
favorite count: 0
has body: I have some CSS-driven parallax scrolling on my site, and I would also like to have a fixed top navigation bar appear when the user begins to scroll down the page. Currently, the nav bar only appears after you have scrolled PAST the end of the window (and disappears again when the window has "rubber banded" back into position). I'm using Chrome v38 on a Macbook. It looks like the overflow-x in my CSS is causing the scroll not to register/fire, but that's necessary for the parallax effect. Any help would be appreciated. Thanks. CodePen example: http://codepen.io/anon/pen/jEPqYL (doesn't work exactly like in a browser, but that is my current code.) My JS is: (function($) { $(document).ready(function() { $(window).scroll(function() { if ($(this).scrollTop() &gt; 0) { $('#header').fadeIn(500); } else { $('#header').fadeOut(500); } }); }); })(jQuery);
type: UnansweredQuestion
has title: Overflow Breaking ScrollTop / Not Registering Scroll
tagged with: overflow
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/27057281
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27057202
answers question: http://stackoverflow.com/q/27057202
type: Answer
has body: first , use a class instead of id then $(document).ready(function(){ $(".title").click(function(){ $(this).closest('tr').next().find(".desc").toggle(500); }); });

http://stackoverflow.com/comment/44082921
type: Comment
comment on: http://stackoverflow.com/a/27149886
has text: If you are using this snippet to do conversion tracking, make sure that google_remarketing_only is false, not true!
type: AnswerComment
score: 2

http://stackoverflow.com/comment/42798324
comment on: http://stackoverflow.com/a/27151695
type: AnswerComment
score: 0
type: Comment
has text: Just that it (the relevant part, aka function) is identical to the op's code.. I'm wondering what the OP's question is..

http://stackoverflow.com/comment/42736742
has text: I'd truly hope not; I don't want my browsers to know *anything* of my machine.
score: 2
comment on: http://stackoverflow.com/q/27114154
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27039474
tagged with: javascript
tagged with: jquery
has body: I am using var tableToExcel = (function() { var uri = 'data:application/vnd.ms-excel;base64,' , template = ' <!--[if gte mso 9]> <x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook> <![endif]--> {table} ' , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }; return function(table, fileName) { if (!table.nodeType) table = document.getElementById(table) var ctx = { worksheet: fileName || 'Worksheet', table: table.innerHTML } $("").appendTo("body"); document.getElementById("dlink").href = uri + base64(format(template, ctx)) document.getElementById("dlink").download = fileName; document.getElementById("dlink").click(); } })(); for exporting datatables to excel and it works fine in both chrome and firefox. however it gives The data area passed to a system call is too small. error in all IE versions. Please give me some workaround as how to solve this problem or suggest any new method that works in all browsers. I am googling about the same since yesterday but all in vain... Any help would be apperciated .. thanks :Edit i have tried downloadify.js, filesaver but didn't worked for me .
favorite count: 0
has comment: http://stackoverflow.com/comment/42598943
tagged with: datatables
has comment: http://stackoverflow.com/comment/42599026
upvote count: 2
has title: How to export Datatables table to Excel which works in IE as well
tagged with: export-to-excel
linked to: http://stackoverflow.com/q/18619902
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42635562
has answer: http://stackoverflow.com/a/27297238
has comment: http://stackoverflow.com/comment/42642830
accepted answer: http://stackoverflow.com/a/27297238
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/q/27084763
type: Question
tagged with: angularjs-directive
score: 2
tagged with: angularjs-scope
has body: I have created a directive for creating a dropdown with search feature. In this directive I have used a flag called 'searchSearchBtn', based on this I am displaying a button. Ok, let me show my code, for a clear idea, Angular directive angObj.directive('largeListSearch', function(domainReports){ return { restrict: 'AE', scope:{ selectedObj:"=", listColumns: "=", showSearchBtn:"=" }, template: '...'+ '&lt;input style="width: 350px;" class="dropdown-toggle inactive dd_txt" ng-model="selectedObj.name" id="campaignDropdown" title="{{selectedObj.name}}" placeholder="{{selectedObj.name }}" /&gt;'+ '&lt;input type="button" value="Search" id="element" style="display: none" data-ng-click="filterDropDown()" /&gt;'+ '...', link: function ($scope, element, attrs) { $scope.filter = function(val) = { //Logic to filter the campaigns } $scope.originalCampaingList = $scope.$parent.campaigns; //Check the status and load the function accordingly for the campaigns list if(attrs.showSearchBtn === "true") { $scope.filterDropDown = function(){ //Function to filter the searched campaign $scope.filter(val); }; }else{ $scope.$watch('selectedObj.name', function(oldValue, newValue){ console.log(oldValue + " "+ newValue); if(oldValue === newValue) { return; } //Function to filter the searched campaign $scope.filter(val); /HERE Could not able to call the filter function, Is it that, we can not call a function inside $scope.$watch } }); } } } }); My problem : Not able to call the function inside the $scope.$watch
has title: Calling a function inside $scope.$watch
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/27085012
tagged with: javascript
favorite count: 0
tagged with: angularjs
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/27003485
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27003189
type: Answer
answers question: http://stackoverflow.com/q/27003189
score: 0
has body: Here's one way to do it using pure javascript. You can replace some of the selectors like document.getElementById with jQuery selectors like $("id") if you like. window.onscroll = function(){ var el = document.getElementById('sticky'), s = window.pageYOffset || document.documentElement.scrollTop, // how much page is scrolled t = document.getElementById('main').getBoundingClientRect().top; // top of main div if(s > t){ el.style.position = 'fixed'; //make position fixed instead of absolute }else{ el.style.position = ''; //clear styles if back to original position } } body { min-height: 200em; margin: 0; padding: 0; } header { background: black; color: white; padding: .5em; } #main { position: relative; } /* important so the sticky box positions relative to this */ #sticky { background: cornflowerblue; padding: .5em; position: absolute; right: 1em; top: 1em; width: 10em; color: white; } This is just a page header or toolbar. This should stick to the top when scrolled.

http://stackoverflow.com/comment/42780646
comment on: http://stackoverflow.com/q/27121171
has text: FYI, npm is a package manager. You can install different packages using npm. You can refer http://howtonode.org/introduction-to-npm to get more insight into npm
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/26991984
type: Question
tagged with: javascript
score: 0
has title: Image does not appear on div even though div class changes
answer count: 1
has body: I am trying to show an animation on .gif format, before the page loads JSON data on the div. But It does not show gif. I check in the console if it does not change the class, but it changes. Basically code should work like this: 1- Press Button 2- Load image (css class: "loading") 3- Start json call (It takes around 8 secs) 4- Load table (css class: "loaded") HTML and javascript are in seperate files gif animation loads when I change the classes into the opposite. But this time it loads on the json table data. CSS: div.loading { width: 600px; height: 600px; background: #FFF url('loading.gif') no-repeat 50% 50%; } div.loaded { width: 600px; height: 600px; } Javascript: function loadOutputs() { console.log(document.getElementById('loadingElement').className); document.getElementById("loadingElement").className = "loading"; console.log(document.getElementById('loadingElement').className); makeProxyCall( "http://localhost:9090/myService/tool/runTool?tool=myTool", function(data) { var globalCounter = 0; var tbody = document.getElementById('tbody'); var trheader = " Name Value Type UnitOfMeasure Mode " tbody.innerHTML = trheader; for ( var i = 0; i < 10; i++) { var tr = " "; //if (obj[i].value.toString().substring(obj[i].value.toString().indexOf('.'), obj[i].value.toString().length) < 2) obj[i].value += "0"; tr += " " + data[0][i].name + " " + " " + data[0][i].value + " " + " " + data[0][i].type + " " + " " + data[0][i].unitOfMeasure + " " + " " + data[0][i].mode + " "; tbody.innerHTML += tr; } }); document.getElementById("loadingElement").className = "loaded"; console.log(document.getElementById('loadingElement').className); } HTML: Load Outputs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27016368

http://stackoverflow.com/comment/42648090
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27067196
has text: When I hit /list, it's working. But when I hit /list/ or /list/[something], Im not redirected to the index
score: 0

http://stackoverflow.com/q/27136283
upvote count: 2
type: UnansweredQuestion
tagged with: authentication
has comment: http://stackoverflow.com/comment/42808084
has title: Parse.com Javascript API Login
has comment: http://stackoverflow.com/comment/42807756
has comment: http://stackoverflow.com/comment/42807072
has comment: http://stackoverflow.com/comment/42772145
tagged with: javascript
has comment: http://stackoverflow.com/comment/42808763
has comment: http://stackoverflow.com/comment/42808137
type: Question
has comment: http://stackoverflow.com/comment/42808200
has comment: http://stackoverflow.com/comment/42771895
has comment: http://stackoverflow.com/comment/42771411
has comment: http://stackoverflow.com/comment/42770916
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42807265
has comment: http://stackoverflow.com/comment/42807984
favorite count: 0
has comment: http://stackoverflow.com/comment/42808279
tagged with: parse-platform
has answer: http://stackoverflow.com/a/27193228
has comment: http://stackoverflow.com/comment/42808856
has comment: http://stackoverflow.com/comment/42808826
score: 2
has comment: http://stackoverflow.com/comment/42808563
has body: I'm trying to create a user login using Parse.com's JS SDK. I try logging in a user I've created in the database, the page reloads and nothing happens. I don't receive any error messages. function Login() { &lt;!--Connect to JS SDK--&gt; Parse.initialize("", ""); event.preventDefault(); //Assign form values to JS variables var username = $("#login-username").val(); var password = $("#login-password").val(); //Log the user in Parse.User.logIn("username", "password", { success: function(user) { alert("Welcome back, " + username) var currentUser = Parse.User.current(); if(currentUser) window.location.href = 'gameslist.html'; }, error: function(user, error) { // The login failed. Check error to see why. } }); } My HTML form: &lt;form class="form" id="loginForm" role="form"&gt; &lt;div class="inputs"&gt; &lt;input type="text" id="login-username" name="username" placeholder="Username"/&gt; &lt;/div&gt; &lt;div class="inputs"&gt; &lt;input type="password" id="login-password" name="password" placeholder="Password"/&gt; &lt;/div&gt; &lt;div&gt; &lt;input type="submit" id="Login" value="Login" onclick="Login()"/&gt; &lt;/div&gt; &lt;/form&gt; Some help with this issue would be much appreciated, Thanks!
has comment: http://stackoverflow.com/comment/42808156

currency
tag name: currency
type: Tag
tags question: http://stackoverflow.com/q/27110469

http://stackoverflow.com/a/27026355
score: 33
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27026323
type: Answer
has body: The show() method only affects the display CSS setting. If you want to set the visibility you need to do it directly. Also, the .load_button element is a button and does not raise a submit event. You would need to change your selector to the form for that to work: $('#login_form').submit(function() { $('#gif').css('visibility', 'visible'); }); Also note that return true; is redundant in your logic, so it can be removed.
has comment: http://stackoverflow.com/comment/42576081
upvote count: 33
answers question: http://stackoverflow.com/q/27026323

http://stackoverflow.com/a/27078511
answers question: http://stackoverflow.com/q/27078398
has body: You check the position of the tool tip, add it's dimensions, and compare that to the size of the viewport which is in this case window. http://codepen.io/anon/pen/myygmQ jQuery(function() { var moveLeft = 20; var moveDown = 10; jQuery('.box').hover(function(e) { jQuery('div.hidden').show(); }, function() { jQuery('div.hidden').hide(); }); jQuery('.box').mousemove(function(e) { var newY = e.pageY + moveDown; var newX = e.pageX + moveLeft; var yOver = (newY + $('.hidden').height()) - $(window).height(); var xOver = (newX + $('.hidden').width()) - $(window).width(); if(yOver > 0) newY -= yOver; if(xOver > 0) newX -= xOver; jQuery("div.hidden").css({top: newY, left: newX}); }); }); .box{ width:200px; height:100px; background-color:gray; } .mid{ float:none; margin:0 auto; } .right{ float: right; } .box.hidden{ height: auto; position: absolute; display:none; } I am a regular box with a link I am a regular box with a link I am a regular box with a link I am a hidden box with some content. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fuga, laudantium accusamus magnam id molestias tempore excepturi molestiae repellat voluptatum sunt aspernatur ab, voluptates officiis rerum amet similique, libero ea a.
score: 0
type: Answer

http://stackoverflow.com/a/27112486
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27111836
upvote count: 1
has body: Your code seems to do what you've instructed it to do. During onmouseover, it sets the select's width to 27px, because the longest option is one character. During onmouseout, it sets the select's width to 7px. Note that 27px is not wide enough to show a single character within the select. 7px is barely wide enough to show the drop-down arrow. In the snippet below, I've added divs that are 27px and 7px. You'll see that your select box matches each of them during onmouseover and onmouseout. If you want the select to be wider, use values larger than 27 and 7. You may need to experiment to find what works best for you. If you want the select to return to its original width during onmouseout, you can do so like this: function AdjustWidthOut(ddl) { ddl.style.width = 'auto; } Snippet: function AdjustWidth(ddl) { var maxWidth = 0; for (var i = 0; i &lt; ddl.length; i++) { if (ddl.options[i].text.length &gt; maxWidth) { maxWidth = ddl.options[i].text.length; } } ddl.style.width = maxWidth * 24 + "px"; } function AdjustWidthOut(ddl) { var maxWidth = 0; for (var i = 0; i &lt; ddl.length; i++) { if (ddl.options[i].text.length &gt; maxWidth) { maxWidth = ddl.options[i].text.length; } } ddl.style.width = maxWidth * 7 + "px"; } #D1 { width: 27px; height: 20px; background: green; } #D2 { width: 7px; height: 20px; background: green; } &lt;table&gt; &lt;tr&gt; &lt;td&gt;27px: &lt;td&gt;&lt;div id="D1"&gt;&lt;/div&gt; &lt;tr&gt; &lt;td&gt;7px: &lt;td&gt;&lt;div id="D2"&gt;&lt;/div&gt; &lt;tr&gt; &lt;td valign="top"&gt;&lt;strong style="color: #3265a6"&gt;Area:&amp;nbsp;&lt;/strong&gt;&lt;/td&gt; &lt;td&gt; &lt;select onmouseover="AdjustWidth(this)" onmouseout="AdjustWidthOut(this)"&gt; &lt;option value=""&gt;x&lt;/option&gt; &lt;option value=""&gt;y&lt;/option&gt; &lt;option value=""&gt;z&lt;/option&gt; &lt;option value=""&gt;x&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;
score: 1
accepted answer of: http://stackoverflow.com/q/27111836
type: AcceptedAnswer

http://stackoverflow.com/a/27020274
score: 1
has body: You must use the $(document).ready() method like this: function floatTextField(classname) { $('input.' + classname).keypress(function (event) { var charCode = (event.which) ? event.which : event.keyCode; if (event.which == 0)//common keys return true; var value = $(this).val(); if (charCode == 45 &amp;&amp; value.indexOf('-') != -1) { return false; } else if (charCode == 46 &amp;&amp; value.indexOf('.') != -1) return false; else if (charCode != 46 &amp;&amp; charCode != 45 &amp;&amp; charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57)) return false; return true; }); $('input.' + classname).keyup(function (event) { var value = $(this).val(); if (value &lt;= 0 &amp;&amp; value.indexOf('.') == -1 &amp;&amp; value.indexOf('-') == -1) { $(this).val(''); } if (value.indexOf('-') &gt; 0) { value = value.replace('-', ''); $(this).val(value); } }); $('input.' + classname).change(function (event) { var value = $(this).val(); if (value.indexOf('.') == 0) { value = '0' + value; $(this).val(value); } }); } $(document).ready(function(){ floatTextField('myclass'); });
downvote count: 0
has comment: http://stackoverflow.com/comment/42565352
answers question: http://stackoverflow.com/q/27020189
type: Answer
has comment: http://stackoverflow.com/comment/42565991
has comment: http://stackoverflow.com/comment/42565806
upvote count: 1

http://stackoverflow.com/a/26998228
type: AcceptedAnswer
type: Answer
has body: My opinion is that ; you shouldn't do it because of causing bad user engagement. It also makes your page untrustable. But for chrome and firefox this should be work; Put This script on head of your page and change 'pagename' to your page name. &lt;script type = "text/javascript" &gt; history.pushState(null, null, 'pagename'); window.addEventListener('popstate', function(event) { history.pushState(null, null, 'pagename'); }); &lt;/script&gt; Note: This script must be on head of your page.
accepted answer of: http://stackoverflow.com/q/26997867
answers question: http://stackoverflow.com/q/26997867
score: 0

http://stackoverflow.com/q/27149034
upvote count: 12
possible better answer: http://stackoverflow.com/a/27153445
linked to: http://stackoverflow.com/q/20279484
tagged with: javascript
score: 12
answer count: 2
has body: I am using node v0.11.14-nightly-20140819-pre on Windows with harmony flag. I have JavaScript object with two methods defined in its prototype: function User (args) { this.service= new Service(args); } User.prototype.method2 = function (response) { console.log(this); // &lt;= UNDEFINED!!!! }; User.prototype.method1 = function () { ............. this.service.serviceMethod(args) .then(this.method2) .catch(onRejected); }; function onRejected(val) { console.log(val); } serviceMethod of Service object returns a promise. When I use User object like below: let user = new User(args); user.method1(); this in method2 of object User ends up undefined when called by then once promise is fulfilled. I tried using both ES6 and Bluebird promise implementation. Why this ends up being undefined in this case?
downvote count: 0
has answer: http://stackoverflow.com/a/27149227
favorite count: 0
tagged with: promise
tagged with: node.js
type: AnsweredQuestion
tagged with: bluebird
has title: Object method with ES6 / Bluebird promises
accepted answer: http://stackoverflow.com/a/27149227
has answer: http://stackoverflow.com/a/27153445
type: Question

http://stackoverflow.com/comment/42765809
comment on: http://stackoverflow.com/a/27133233
score: 0
type: AnswerComment
has text: D'oh, of course, a `while` loop. I'll give it a try and report back.
type: Comment

http://stackoverflow.com/q/27067387
has answer: http://stackoverflow.com/a/27077476
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has body: Please help in the implementation of the following problem. Need to perform a click on a particular element, but with an offset. If i use a standard click - element.click(), then click occurs in the upper left corner of the element: But i need to do click here: Can I perform a click on an element + offset? Something like this - element.click().offset('top: 32, left: 32') p.s. Ssory for my english.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27067506
score: 1
has title: Clicking on element (with offset)
upvote count: 1

http://stackoverflow.com/comment/42698747
score: 0
type: AnswerComment
has text: This feels like a hacky approach. Is there a more standard Rails way to do this?
type: Comment
comment on: http://stackoverflow.com/a/27096611

http://stackoverflow.com/comment/42660863
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27047570
type: Comment
has text: How can I reduce the page load time when the page is first loads I have implemented Y-slow features. Need help to improve SQL operations, any ideas?

http://stackoverflow.com/comment/42694887
type: QuestionComment
has text: can store the results in a service that makes them available anywhere in the app
comment on: http://stackoverflow.com/q/27094278
score: 0
type: Comment

http://stackoverflow.com/a/27112394
type: Answer
has comment: http://stackoverflow.com/comment/42728057
has body: I am not sure what do you want to test but you are trying to use an html as module which I think is not correct and probably you have to use $httpbackendto mock the GET request. I made a dummy example: 'use strict'; describe('TestMyDirective', function() { var $compile, $http, $httpBackend, $rootScope, $scope, template; beforeEach(module('myApp')); beforeEach(inject(function($injector) { $rootScope = $injector.get('$rootScope'); $compile = $injector.get('$compile'); // Inject $httpBackend service $httpBackend = $injector.get('$httpBackend'); // Mock request to your html $httpBackend.whenGET('my.html').respond("GotIT"); $scope = $rootScope.$new(); template = $compile("&lt;my-directive&gt; &lt;/my-directive&gt;")($scope); $scope.$digest(); })); /* * * Tests * */ describe('Test something', function() { it('should test something', function() { // You can test that your directive add something on the $scope }); }); });
answers question: http://stackoverflow.com/q/27112008
score: 0

http://stackoverflow.com/a/27121908
downvote count: 0
has comment: http://stackoverflow.com/comment/42745292
has body: Just use the getDate() and getMonth() Date Object Methods : Your billDetail.invoiceDate is a String so make it a Date then manage it. var d = new Date(billDetail.invoiceDate); var dat = d.getDate()+"-"+parseInt(d.getMonth()+1); This is the working fiddle. That should do it.
has comment: http://stackoverflow.com/comment/42745001
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42745270
has comment: http://stackoverflow.com/comment/42744989
has comment: http://stackoverflow.com/comment/42744950
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27121804
has comment: http://stackoverflow.com/comment/42746390
answers question: http://stackoverflow.com/q/27121804
has comment: http://stackoverflow.com/comment/42745141

http://stackoverflow.com/a/27002205
type: Answer
accepted answer of: http://stackoverflow.com/q/27001630
downvote count: 0
answers question: http://stackoverflow.com/q/27001630
has body: TL;DR Why aren't you using .each()? You seem to be using jQuery anyway ... function GetAddress() { $.each(loationsArray, function(i, v) { $.getJSON("https://maps.googleapis.com/maps/api/geocode/json?latlng=" + v.position.lat() + ',' + v.position.lng(), function (result) { v.address = result.results[0].formatted_address; } ); console.log(v); }); } ... admittedly untested. But, if I've "transliterated" it correctly, your v should be properly scoped in that implementation. It's not that your callback can't see locationsArray. If that were the case, your error would complain about locationsArray or property 0 of locationsArray not being defined. The real trouble is, your callback refers to the i from the for-loop's scope. After the last iteration, it actually increments i to be locationsArray.length. The loop-condition is tested, fails, and the loop is exited. But, i is still locationsArray.length -- a value that never existed. (Though, in a related problem, the collection could also be modified before the callback fires.) Let's take an example: var arr = [1,2,3]; for (var i = 0; i &lt; arr.length; i++) { setTimeout(function() { console.log(i, arr, arr[i]); }, i * 100); } The Chrome console will show the following: &gt; 3 [1, 2, 3] undefined &gt; 3 [1, 2, 3] undefined &gt; 3 [1, 2, 3] undefined To fix our example, we would "scope out" a reference to the particular item and put that in our callback. Something like this: var arr = [1,2,3]; for (var i = 0; i &lt; arr.length; i++) { // create a scope (function() { var v = arr[i]; setTimeout(function() { console.log(v); }, i * 100); })(); } ... And the console shows: &gt; 1 &gt; 2 &gt; 3
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/69977264
type: Comment
has text: It seems to be a difference with how ngMessages reads in the value vs ngShow. https://plnkr.co/edit/clYtzWGC4CJl7xgI2UJO?p=preview My method works with ng-show, but your method works with both so it is a better solution. I'll update the answer.
comment on: http://stackoverflow.com/a/35803568
type: AnswerComment
score: 0

http://stackoverflow.com/comment/73493730
has text: The cost has changed again, instead of the object literal you can use the BODYPART_COST constant in the API (it's exactly the same, with current values).
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27113792
score: 0

http://stackoverflow.com/a/27083975
score: 1
has comment: http://stackoverflow.com/comment/42735452
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27083925
upvote count: 1
has body: Did you see the yellow box in the documentation ? The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases. Use a setTimeout instead var approveTimeout; $("button.approve").on('click', function(e){ var self = $(this); self.hide().siblings('button.undo').show(); approveTimeout = setTimeout(function(){ self.siblings("form.update-comment.approve").trigger('submit'); }, 20000); }); $("button.undo").on('click', function(e){ $(this).hide().siblings('button.approve').show(); clearTimeout( approveTimeout ); });

http://stackoverflow.com/a/35200810
type: Answer
answers question: http://stackoverflow.com/q/27009514
has body: Since @wesbos answer did not do the trick for me here is what I found out. Sublime 3 does not extract packages. You will find your packages (on linux) in either /opt/sublime_text/Packages/ for default packages or ~/.config/sublime-text-3/Installed Packages for packages you installed, in a zip archive with the extension .sublime-package. To change the content of a package install the Package Resource Viewer and execute the command : Open resource browse to the file you want to change (if.sublime-snippet, I would also change the for-()-{}.sublime-snippet since it has the same strange semicolon in there) and edit it. Once you save the file it will save it to ~/.config/sublime-text-3/Packages/JavaScript/if.sublime-snippet. This file then overwrites the default file in the original zip package. As I understood it is important to know that files that you overwrite in this way will not be updated when you update packages, since they overwrite whatever is in the updated package!
score: 0

http://stackoverflow.com/a/27126180
type: Answer
has comment: http://stackoverflow.com/comment/42752424
has comment: http://stackoverflow.com/comment/42752186
accepted answer of: http://stackoverflow.com/q/27126157
answers question: http://stackoverflow.com/q/27126157
has body: By doing it the normal way. elem.parentNode.removeChild(elem); .remove is a jQuery method, not JavaScript. EDIT: Apparently, it's planned to be a JavaScript method. Kind of daft in my opinion, but there you go. Since it's experimental, it is not necessarily supported in all browsers.
upvote count: 5
score: 5
has comment: http://stackoverflow.com/comment/42752260
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42752165

http://stackoverflow.com/comment/42553588
has text: It's not letting me edit my comment above so I'll post it here. Thank you Noitidart. I really appreciate it. The other events are `engine-added` `engine-loaded` `engine-current` `engine-default` `engine-removed` . When a new one is added it fires two events first , engine-added and then engine-loaded . `engine-current` fires if you set the new engine to be used straight away and `engine-removed` is when its removed.
comment on: http://stackoverflow.com/a/27013073
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42616805
comment on: http://stackoverflow.com/a/27048964
type: Comment
score: 0
has text: Trying to implement this now. Confused about the second block of code. In the controller I'm sending an array of strings to the provider that it can iterate through to build the URL. I want to abstract as much of the code away to the controller as possible.I'll keep trying things with this answer and hopefully get it working.
type: AnswerComment

http://stackoverflow.com/q/27145638
has comment: http://stackoverflow.com/comment/42790430
type: Question
tagged with: sails.js
has title: How to use several grunt tasks within the same closure?
tagged with: javascript
has body: I have several grunt tasks performing operations on my MySql database. In order to expose the database ORM, I first need to instantiate it and then run the database calls within the callback. The problem is that since every grunt task run separately, I have to instantiate the ORM for every tasks. Here is the snippet I use to instantiate the DB Let's say for instance, I'm trying to do this: grunt.registerTask('import:cleanUsers', 'Clean the DB', function() { var done = this.async(); var sql = 'delete from user'; sailsTasksModels.init(function(ontology) { ontology.collections.country.query(sql, function(err, results) { if (!err) console.log('User table has been emptied'); done(results); }); }); }); grunt.registerTask('import:cleanRadios', 'Clean the DB', function() { var done = this.async(); var sql = 'delete from radio'; sailsTasksModels.init(function(ontology) { ontology.collections.country.query(sql, function(err, results) { if (!err) console.log('Radio table has been emptied'); done(results); }); }); }); grunt.registerTask('import:cleanCampaigns', 'Clean the DB', function() { var done = this.async(); var sql = 'delete from campaign'; sailsTasksModels.init(function(ontology) { ontology.collections.country.query(sql, function(err, results) { if (!err) console.log('Campaign table has been emptied'); done(results); }); }); }); grunt.registerTask('import:deleteAll', [ 'import:cleanUsers', 'import:cleanRadios', 'import:cleanCampaigns' ]); When running grunt import:deleteAll, the script will crash on the second tasks telling me the adapter has already been intitialized. So my question is, how can I run my three tasks within the same sailsTasksModels.init callback? Thanks
tagged with: gruntjs
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27182699
accepted answer: http://stackoverflow.com/a/27182699
tagged with: node.js
type: AnsweredQuestion
tagged with: waterline

http://stackoverflow.com/q/27018022
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/8560960
tagged with: treeview
has title: JSON printing (treeview)
has answer: http://stackoverflow.com/a/27019597
accepted answer: http://stackoverflow.com/a/27019597
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I have a complex json string that looks like this: { "id":"2016666", "dt":"2012", "object_extends":[ { "extend1":{ "id":"2016666", "dt":"2012", "active":"true", "object_extend":[ { "extend2": { "id":"2016666", "secondary":null }, "extend3": { "id":"2016666", "pet":"willy" } } ] } } ] } Now i want to print this like a tree, but when searching for days i have to modify the json(which is not a option). How can i print this in a treeview? I tried for loops but each extend can have other attributes then other objects. Hope somebody can help me with this!
type: Question

http://stackoverflow.com/q/27092105
has comment: http://stackoverflow.com/comment/42775849
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
has comment: http://stackoverflow.com/comment/42692514
has comment: http://stackoverflow.com/comment/42690474
answer count: 1
tagged with: javascript
has title: how to make program keep tract of data entered (numeric)
has comment: http://stackoverflow.com/comment/42771348
favorite count: 0
has comment: http://stackoverflow.com/comment/42768683
has answer: http://stackoverflow.com/a/27146816
accepted answer: http://stackoverflow.com/a/27146816
has body: I need this code to be able to open a promt on button click then take the number it recieves and add it into 1 of 3 cases and be able to tell me how many are in each case at end of program (very simplified). What am I doing wrong or how do I fix it? this is part of the code that I think needs work. Toddler Ticket Junior Ticket Adult Ticket var MAX_SEAT_COUNT = 10 var amountTicket var grossProfit var adulTicket = 0 var junTicket = 0 var todTicket = 0 var totalSales = 0 var adulNum = 0 var junNum = 0 var todNum = 0 var extraNum = 0 function parseFloat(amountTicket) { if (amountTicket >= MAX_SEAT_COUNT) { extraNum = amountTicket - MAX_SEAT_COUNT; document.getElementById('msg').innerHTML = "Tickets have now sold out thank you for purchasing." // important to stop after limit //end loop and display all data here like shown below remember to line up columns }else if (amountTicket > 10) { document.getElementById('msg').innerHTML = "The maximum number of tickets that can be done in one transaction is 10" }else { amountTicket = prompt("Valued customer, please enter the number of tickets you would like to purchase."); parseFloat(amountTicket); } return; } function Calculate(ticket) { //set zeroes for all values adulTicket = 0 junTicket = 0 todTicket = 0 amountTicket = 0 totalSales = 0 adulNum = 0 junNum = 0 todNum = 0 extraNum = 0 grossProfit = //get user input switch(ticket){ case 0: todNum = amountTicket break; case 1: junNum = amountTicket break; case 2: adulnum = amountTicket break; } //get user input amountTicket = prompt("Valued customer, please enter the number of tickets you would like to purchase."); parseFloat(amountTicket); grossProfit = (adulTicket * adultNum) + (junTicket * junNum)
has comment: http://stackoverflow.com/comment/42775764
upvote count: 0
has comment: http://stackoverflow.com/comment/42771613
has comment: http://stackoverflow.com/comment/42788617
has comment: http://stackoverflow.com/comment/42771721

http://stackoverflow.com/a/52419763
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/27037380
has body: Opentok has better APIs now: You can use network-test. otNetworkTest.testQuality(null, function updateCallback() { // process intermediate results }).then(results) { // Display UI based on results }).catch(error, results) { switch (error.name) { case ErrorNames.UNSUPPORTED_BROWSER: // Display UI message about unsupported browser break; case ErrorNames.CONNECT_TO_SESSION_NETWORK_ERROR: // Display UI message about network error break; default: console.error('Unknown error .'); } });
type: Answer
score: 2

http://stackoverflow.com/a/27151175
downvote count: 0
type: Answer
has body: well you'll need to be worried about the public face of your site you shouldn't be considered anything behind a log-in screen, to me the snapshot with a headless browser approach using the farment_scape seems is the way to go, it's the one that will consume less time and as you looked at mean-seo isn't that hard to implement. take a look to this question, there are some answers about how to creates links on the pages to be SEO friendly, almost all the recent posts fit together one to each other. https://support.google.com/webmasters/answer/174992?hl=en and also try to register to https://webmasters.stackexchange.com/ you'll find more about seo
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27150592

http://stackoverflow.com/a/27147360
upvote count: 2
has body: function runMeLater() { var script = document.createElement('script'); script.setAttribute('src', '//www.google-analytics.com/analytics.js'); document.body.appendChild(script); window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', 'UA-XXXX-Y', 'auto'); ga('send', 'pageview'); }
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/42930839
has comment: http://stackoverflow.com/comment/42940891
downvote count: 0
answers question: http://stackoverflow.com/q/27147197

http://stackoverflow.com/a/27006562
answers question: http://stackoverflow.com/q/27006482
has comment: http://stackoverflow.com/comment/42542091
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42542535
accepted answer of: http://stackoverflow.com/q/27006482
has comment: http://stackoverflow.com/comment/42542393
has comment: http://stackoverflow.com/comment/42542312
type: Answer
has comment: http://stackoverflow.com/comment/42542614
has body: Basically just add this in your Javascript: document.getElementById('your-element').onkeypress = function(evt){ return isNumberKey(evt); }
has comment: http://stackoverflow.com/comment/42542645
upvote count: 1
score: 1

http://stackoverflow.com/a/27082481
has body: There is not an easy way to do this. You could integrate some kind of control panel with PHP and SQL, but that's about it.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27082386
has comment: http://stackoverflow.com/comment/42700036
answers question: http://stackoverflow.com/q/27082386
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42569844
type: QuestionComment
comment on: http://stackoverflow.com/q/27022697
has text: Write `debugger;` in your script. If developer tools is open, it'll hit it like a breakpoint.
score: 0
type: Comment

http://stackoverflow.com/comment/42652930
comment on: http://stackoverflow.com/q/27064696
has text: You said that it breaks when it is 37,417 lines long, so I wondered if you could just remove the line breaks and always send just a single line. It's a serialization of the DOM, so line breaks shouldn't matter.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27067169
answer count: 1
has body: How do i write regex so it matches A-Z but not characters b,h,i. Only way i could think of is by using custom ranges. /[[A][C-G][J-Z]]/gi This is what i can think of, i don't think this is correct regex, even. i'd like to not write custom ranges if possible. As it's complicate things a lot more. What i'm trying to do is make characters increase by one so a becomes b, c -> d, z -> a. Except some words. And this is my strategy... find all words except them, run them through match string and replace them with character that is one ahead using charcode.
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27067197
has comment: http://stackoverflow.com/comment/42652082
score: 2
has title: regex match range but not certain characters
downvote count: 0
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/42652497
tagged with: regex
upvote count: 2

http://stackoverflow.com/q/27108725
has answer: http://stackoverflow.com/a/27108893
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27108934
tagged with: ajax
has answer: http://stackoverflow.com/a/27108843
answer count: 3
possible better answer: http://stackoverflow.com/a/27108934
score: 1
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/27108843
type: AnsweredQuestion
has title: Ajax/jQuery live search is duplicating the output results
tagged with: http://stackoverflow.com/tag/json
has body: I'm currently working on Ajax and jQuery live search which finds a results in a JSON file. Script is working fine, but the is only one problem - it's duplicating the result data. EXAMPLE: MARKUP: Live Search Results event_name | club_name | memberid SCRIPT: $('#search').keyup(function() { var searchField = $('#search').val(); var $update = $('#update'); $update.empty(); $.get("getEventsWithVideos.php?text=" + searchField, function(data) { var vals = jQuery.parseJSON(data); if($.isArray(vals['Event'])) { $.each(vals['Event'], function(k,v){ $update.append(" " + v['event_name'] + " "); }); } else { $update.append(" " + vals['Event']['event_name'] + " "); } }); }); I've tried to debug and stop the error, but it was unsuccessful. Can anyone help me please with that?
type: Question

dbus
tags question: http://stackoverflow.com/q/27059555
type: Tag
tag name: dbus

http://stackoverflow.com/comment/42701765
comment on: http://stackoverflow.com/a/27098365
type: Comment
has text: Yes it does matter. :) As per the arguments passed FreshlyPressed is referring to $log, however $log doesn't have any method called getBlogs.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27078766
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
has body: Having issue auto-fill of form-field datetime-local, with button calling function of Javascript Date() method to .value in HTML5 form. I have tested multiple formats and can auto-fill text field with ISO datetime but not datetime-local? Desire to have (for ease of UI) a button to side of field for auto-fill of current locale time (client side) into standard Chrome date-time local format in addition to Chrome browser datetime picker for desktop clients. In mobile clients the webkit is calling native datetime picker with now button built in. NOTE: I am aware that this form data type is not available in all browsers and will probably be deprecated. However application users will be using chrome mobile and desktop as recommended browser ('Viewed best in...') for most consistency across hardware. Code follows: Date Now
type: Question
tagged with: datetime
tagged with: http://stackoverflow.com/tag/html
has title: datetime-local auto-fill Date() UTC with Chrome
has answer: http://stackoverflow.com/a/27089562
upvote count: 1
tagged with: google-chrome
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/27105092
has comment: http://stackoverflow.com/comment/42713507
tagged with: design-patterns
has comment: http://stackoverflow.com/comment/42713703
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42713658
has comment: http://stackoverflow.com/comment/42713790
tagged with: javascript
has body: I have started project in JQuery. I am using a lot of "click" and "onchange" events in my project. Initially it was ok ( when there were not more lines of code ) but after 500-600 lines of code my source code is getting VERY messy because I have a lots of click and onchange events everywhere in my code. I don't know how to handle this problem, how can I use click and onchange events properly, efficient and not messy? Is there any framework or special pattern for this kind of projects? Thanks in advance.
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42713635
answer count: 1
has comment: http://stackoverflow.com/comment/42714048
has answer: http://stackoverflow.com/a/27106726
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27106726
has title: JQuery - proper and efficient usage of events

http://stackoverflow.com/q/27141117
has comment: http://stackoverflow.com/comment/42779702
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42780285
has comment: http://stackoverflow.com/comment/42780264
type: Question
has comment: http://stackoverflow.com/comment/42779671
has comment: http://stackoverflow.com/comment/42780042
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/42780425
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42780900
answer count: 1
has title: how to pass hidden field values in MVC route object in BeginForm
has comment: http://stackoverflow.com/comment/42779816
has comment: http://stackoverflow.com/comment/42779833
tagged with: angularjs
has body: I have a textbox and a button as shown below. In the hdnCityAreaService I am setting Id of the item that user will be selecting in angular typeahead textbox inside callBack($item,$model,$label) from js. @using (Html.BeginForm("TestAction", "Customer", FormMethod.Post, new { strTest = "@hdnCityAreaService.value to be passed here" })) { &lt;div data-ng-app="v"&gt; &lt;div ng-controller="TypeAheadController"&gt; &lt;input type="text" id="txtType" ng-model="selected" typeahead-on-select="callBack($item,$model,$label)" typeahead="state as state.Name for state in states | filter:$viewValue | limitTo:8" class="form-control"&gt; @Html.Hidden("hdnCityAreaService") &lt;input type="submit" id="sub" name="sub" value="click"/&gt; &lt;/div&gt; &lt;/div&gt; } My TestAction looks like: public ActionResult TestAction(string strTest) { return View(); } I want to send the value of "hdnCityAreaService" route value object so that it will appear at strTest parameter in Action. How can I do this besides using FormCollection?
has comment: http://stackoverflow.com/comment/42781067
has answer: http://stackoverflow.com/a/27141211
accepted answer: http://stackoverflow.com/a/27141211

http://stackoverflow.com/q/27120809
accepted answer: http://stackoverflow.com/a/27120887
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/27120887
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42742642
tagged with: ruby-on-rails
has body: I want to create a form inside a popover and use jQuery and Ajax to submit the form(do some calculation while submitting the form). But somehow jQuery is not working at all. I'm using ruby on rails. Here is my code on the view: %a.btn.btn-small{:id =&gt; "example", "data-toggle" =&gt; "popover", :type =&gt; "button"} %i.icon-calendar .head.hide Do Something .content.hide =form_for :object, action: '#', :html =&gt; { :class =&gt; "form", remote: true} do |c| =c.number_field :var_1 =c.number_field :var_2 %buttion.btn.btn-default{id: "submit", type: "button"}Click Here is my code in js and jQuery under app/assets/javascript, $(function () { $('#example').popover({ html : true, title: function () { return $(this).parent().find('.head').html(); }, content: function () { return $(this).parent().find('.content').html(); } }).popover('show'); }); $(function(){ $('.form').submit(function(e) { alert(1); e.preventDefault() var datastring = $(this).serializeArray(); datastring.push({name:"post", value:"Post"}); var request = $.ajax({ type: "POST", url: $(this).attr('action'), data: datastring}); request.success(function(data) { console.log(data); }) }); }); When I click "Click" button, there is even no alert(1) showing up, so i think the jQuery is not working but I can't work out what is going wrong?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42742667
possible better answer: http://stackoverflow.com/a/27121906
has answer: http://stackoverflow.com/a/27121906
type: Question
answer count: 2
has title: jQuery is not working with my form in popover

http://stackoverflow.com/q/27006550
tagged with: wget
answer count: 1
tagged with: javascript
has title: Wget on HTML once JavaScript is executed
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27006899
has comment: http://stackoverflow.com/comment/42542008
downvote count: 1
type: Question
score: -1
has body: I am trying to get the HTML of a page with wget, but the problem is that I'd like to get all the content of the page once the JavaScript is executed. Is there a way to simulate the browser to get the complete HTML after the JavaScript document.ready function?
has comment: http://stackoverflow.com/comment/42542333
upvote count: 0
linked to: http://stackoverflow.com/q/5901661

http://stackoverflow.com/q/27143646
tagged with: inheritance
favorite count: 0
has comment: http://stackoverflow.com/comment/42786025
has body: Object inherits from Function.prototype which in turn inherits from Object.prototype. this is because internally, Object is actually a function function Object(){[native code]} which is why we can write code like var ob=new Object(); Object inherits properties like 'caller' , 'arity' ,etc from Function.prototype However (and this is what's confusing) alert(Object.hasOwnProperty('caller')); //returns TRUE ! surprising shouldn't it return false since Object actually inherits 'caller' property from Function.prototype ? Same way alert(Function.hasOwnProperty('caller')); /*returns True. expected 'false' as Function object has no property of its own and inherits everything from Function.prototype*/ alert(Number.hasOwnProperty('caller')); //again returns true, unexpectedly So, someone has any idea about why this is happening ? thank you very much. I hope I am not sounding naive EDIT trying Object.getOwnPropertyNames(Object) indeed returned 'caller' as a property directly on Object itself. So Object.hasOwnProperty('caller') is factually correct But , now the question is why in MDN documentation, 'caller' is mentioned as inherited from Function. So it definitely leading to confusion . So is this some mistake in the documentation ? thank you. EDIT-2 Can I reach the conclusion that Object has its own caller, length, etc properties as even Object.length and Object.__proto__.length is not the same . It should have been equal if indeed Object was inheriting length property from its prototype , i.e Function.prototype but its not the case The thing is why does MDN mention that Object just inherits caller, length, arity , etc from its prototype object ? its a bit misleading IMHO
has answer: http://stackoverflow.com/a/27144599
type: UnansweredQuestion
has title: Javascript :: Why Object.hasOwnProperty('caller') returns true?
type: Question
upvote count: 5
has comment: http://stackoverflow.com/comment/42785336
score: 5
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42659665
score: 0
type: Comment
has text: You'll have to adapt to your implementation, but the only real complexity here is achieving a dynamic reference to window.innerWidth
type: AnswerComment
comment on: http://stackoverflow.com/a/27073749

http://stackoverflow.com/a/27088564
has comment: http://stackoverflow.com/comment/42687175
downvote count: 0
has comment: http://stackoverflow.com/comment/42685292
has comment: http://stackoverflow.com/comment/42686723
score: 1
has body: You shouldn't use the same id on two HTML elements. If you need to have a shared selector, you should use a class. Then your script becomes: &lt;script type="text/javascript"&gt; function toggleDiv(divClass){ var divs = document.getElementsByClassName(divClass); for(var i = 0; i &lt; divs.length; i++){ if(divs[i].style.display == 'none'){ divs[i].style.display = 'block'; // Not sure what this is doing, you may want to move it outside of the loop document.pageLoading.TCallLabel('/','restart_function'); }else{ divs[i].style.display = 'none'; } } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/42685011
has comment: http://stackoverflow.com/comment/42686047
upvote count: 1
has comment: http://stackoverflow.com/comment/42685114
type: Answer
has comment: http://stackoverflow.com/comment/42685478
answers question: http://stackoverflow.com/q/27088440
has comment: http://stackoverflow.com/comment/42685213

http://stackoverflow.com/q/27002108
has body: For some reason my slideshow is not looped. The whole website is fairly old and running on Joomla, I've been asked to transform a Flash-based slideshow into a jQuery one. http://www.colours.ltd.uk/lazzari/index2.php With help of one of you I managed to get the slideshow running but now for some reason, after it goes through all of them it's not looped, it stops on a white screen. Any ideas on how to fix this? //Slideshow jQuery(function() { jQuery("#slideshow1 &gt; li:gt(0)").hide(); setInterval(function() { jQuery('#slideshow1 &gt; li:first') .fadeOut(1000) .next() .fadeIn(1000) .end() .appendTo('#slideshow1'); }, 6000); }); I noticed that for some reason "opacity: 0;" stays, while on one of my other sites it disappears asap, allowing the loop to continue.
tagged with: javascript
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/27002288
tagged with: slideshow
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27007439
possible better answer: http://stackoverflow.com/a/27002288
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27007439
downvote count: 0
has title: Why is my slideshow not looped
type: Question
score: 1

http://stackoverflow.com/comment/42570882
score: 0
type: AnswerComment
has text: There are a lot of answers to my question. However, I do not want to simply pick the one that is upvoted. Please give a detailed explanation of why your regex works, and maybe why mine doesn't.
type: Comment
comment on: http://stackoverflow.com/a/27023249

http://stackoverflow.com/a/27044421
has body: It is possible to evaluate values using the current context within the helper. Example, http://emberjs.jsbin.com/dixokezafe/1/edit?html,js hbs {{#each model }} {{#ifCond title Raja}} equal to {{else}} not equal to {{/ifCond}} {{/each}} add random object js App.IndexRoute = Ember.Route.extend({ model: function() { return posts; } }); App.IndexController = Em.ArrayController.extend({ actions:{ addObject:function(){ this.get("model").pushObject({ title: Math.floor(Math.random()*2)===0?"Raja":"something else", body: "James Coglan wrote a lengthy article about Promises in node.js." }); } } }); var posts = [{ title: "sample", body: "There are lots of à la carte software environments in this world." }, { title: "Broken Promises", body: "James Coglan wrote a lengthy article about Promises in node.js." }, { title: "Raja", body: "James Coglan wrote a lengthy article about Promises in node.js." }]; Handlebars.registerHelper('ifCond', function (v1, v2, options) { var _v1 = Em.get(this,v1); var _v2 = Em.get(this,v2); v1 = Em.isEmpty(_v1)?v1:_v1; v2 = Em.isEmpty(_v2)?v2:_v2; if (v1 === v2) { return options.fn(this); } return options.inverse(this); }); It seems that it is not possible to register a bound helper and use it in block form. Checkout some links with interesting approaches tackling this issue. http://discuss.emberjs.com/t/a-way-to-let-users-define-custom-made-bound-if-statements/2583 https://gist.github.com/slindberg/9924116 http://paarsgames.nl/2014/02/02/creating-your-own-custom-handlebars-bounded-ifs-in-ember/
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42792852
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27041859
answers question: http://stackoverflow.com/q/27041859
type: Answer

http://stackoverflow.com/a/26992779
type: Answer
has comment: http://stackoverflow.com/comment/42516891
has comment: http://stackoverflow.com/comment/42517178
has comment: http://stackoverflow.com/comment/42517001
has comment: http://stackoverflow.com/comment/42516977
has body: You could get the JSON string of the array, and then split it for each character: var myArray = [[7.54629420634032, 80.49201965332031],[7.532680021759206, 80.50506591796875],[7.517023180703112, 80.50506591796875]]; var splitObject = JSON.stringify(myArray).split(''); This will return an array contaning each character in the stringified representation. myArray just defines your array from the question. Then it gets stringified (the JSON representation). That string is then split into an array, with each character given its own item. That is saved as splitObject.
has comment: http://stackoverflow.com/comment/42516871
answers question: http://stackoverflow.com/q/26992706
has comment: http://stackoverflow.com/comment/42516756
score: 0

http://stackoverflow.com/a/27117120
has comment: http://stackoverflow.com/comment/42776791
has body: If you wanted a time from lets say December 25 2013 var date = new Date("December 25, 2013 00:00:00"); document.write( dt.getTime() );
type: Answer
has comment: http://stackoverflow.com/comment/42736667
upvote count: 2
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42739710
answers question: http://stackoverflow.com/q/27117071
has comment: http://stackoverflow.com/comment/42736622

http://stackoverflow.com/comment/42689961
score: 0
type: AnswerComment
type: Comment
has text: Thank you. It doesn't give me any errors in the console. It just doesn't do anything when I click. Nothing happens. I'll edit my question with the code I've got now so you see.
comment on: http://stackoverflow.com/a/27090520

http://stackoverflow.com/comment/42574881
type: QuestionComment
comment on: http://stackoverflow.com/q/27009176
has text: Despite the overflow set on #contact-list, the popup should open exactly as it opens when the overflow isn't set on #contact-list
score: 0
type: Comment

http://stackoverflow.com/a/27047376
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27047343
answers question: http://stackoverflow.com/q/27047343
type: Answer
upvote count: 9
has comment: http://stackoverflow.com/comment/42612864
downvote count: 0
has body: You are concatenating strings. Any data input in a prompt is treated as a string. You need to convert to integer using parseInt() before adding to get proper integer math. function wh(){ var i = 0; var counter = 0; while(counter &lt; 100){ i++; var input = prompt("Give me num"); var number = parseInt(input, 10); counter = counter + number; } alert(i); alert(counter); }
score: 9
has comment: http://stackoverflow.com/comment/42612925

http://stackoverflow.com/comment/42653172
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27068720
has text: i thought fancybox had a `modal:true` option which did this for you
score: 0

http://stackoverflow.com/q/27081194
has comment: http://stackoverflow.com/comment/42693151
has answer: http://stackoverflow.com/a/27094035
accepted answer: http://stackoverflow.com/a/27094035
tagged with: google-maps
linked to: http://stackoverflow.com/q/19113477
has body: Research following example: google map with search box html + javascipt: Places search box after I input miamy I should press 'enter' and after map will focus on another place. I want press enter programatically on this map. What should I write in browser console? P.S. I tried this: var event = new KeyboardEvent('keydown'); $("#pac-input").trigger(event); But nothing happens P.S Yes I understood that specifically for link provided above it doesn't work because $("#pac-input") is empty But I rewrite this code locally and '$("#pac-input")' is not empty but nothing happens P.S. topic related with last comment: similar question
tagged with: javascript
tagged with: jquery
score: 4
tagged with: google-maps-api-3
upvote count: 4
linked to: http://stackoverflow.com/q/28058833
has comment: http://stackoverflow.com/comment/42692973
answer count: 1
downvote count: 0
tagged with: dom-events
favorite count: 0
has comment: http://stackoverflow.com/comment/42692995
has comment: http://stackoverflow.com/comment/42693548
has comment: http://stackoverflow.com/comment/42693163
has title: How to invoke event of enter pressed programatically for google.maps.places.SearchBox?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42692914
type: Question

http://stackoverflow.com/comment/42633118
score: 0
has text: Spawn creeps with roles already assigned so that if one dies another one spawns.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27058687

http://stackoverflow.com/q/27140934
has answer: http://stackoverflow.com/a/27141118
tagged with: excel
score: 0
tagged with: loops
has title: Javascript: Looping a Textarea list into an Array
answer count: 1
accepted answer: http://stackoverflow.com/a/27141118
has comment: http://stackoverflow.com/comment/42779310
tagged with: arrays
tagged with: javascript
type: AnsweredQuestion
tagged with: textarea
has comment: http://stackoverflow.com/comment/42779417
type: Question
has body: I am trying to retrieve information typed into a Textarea element, load that into an array so that I can output a string. To be more specific, I have an excel sheet with a number, a name, and another number. i want to paste that list into the Textarea, populate an array and output messages custom to the array information per line. (So a message that would have the number, the name, and then another number, go to the next line and do a whole new message with the next three array indexes.) I can create an array from the Textfield using a for loop and the split() method. Now how do I get Javascript to go to the next line and treat that as a new message and load the new indexes for my next message for as long as the length of the list? this is my test script so far. function resultFunction(){ var x = document.getElementById("statusForm"); var text = " "; var i; for (i = 0; i &lt; x.length; i++){ text += x.elements[i].value; } var loadArray = text.split(","); var loadID = loadArray[0]; var carrierID = loadArray[1]; var poID = loadArray[2]; console.log(loadArray); console.log(loadArray.length); document.getElementById("resultsArea").innerHTML = "Hello " + carrierID + ", &lt;br /&gt;Please send me status on the following loads &lt;br /&gt;" + loadID + " &lt;br /&gt;Thank you!"; };

http://stackoverflow.com/comment/42725223
comment on: http://stackoverflow.com/q/27110568
has text: Did you check whether the success callback is firing..? Have you tried adding a failure callback as well..?
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/27076120
favorite count: 0
tagged with: angularjs
score: 2
downvote count: 0
type: UnansweredQuestion
tagged with: coffeescript
type: Question
has answer: http://stackoverflow.com/a/31873496
tagged with: javascript
upvote count: 2
has body: I am wondering what the best way to tackle down a has many relationship between models in angularjs and with promises. Allow me to show an example, I'd love your feedback on if there could be a better way to implement this. A Surah has many Ayahs My Surah model: angular.module('qurancomApp') .service 'Surah', (Restangular, userOptions, Ayah) -&gt; class Surah constructor: (obj) -&gt; for key of obj @[key] = obj[key] getAyahs: (from, to) -&gt; self = @ @ayahs = Ayah.all surah_id: @id, from: from, to: to .then (ayahs) -&gt; self.ayahs = ayahs @new: (id)-&gt; return Restangular.one('surahs', id).get().then (data)-&gt; return new Surah(data) @all: -&gt; return Restangular.all("surahs").getList() My Ayah model: angular.module('qurancomApp') .service 'Ayah', (Restangular, userOptions) -&gt; # AngularJS will instantiate a singleton by calling "new" on this function class Ayah constructor: (obj)-&gt; for key of obj @[key] = obj[key] @all: (hash) -&gt; Restangular.one('surahs', hash.surah_id).getList 'ayat', content: userOptions.content, quran: userOptions.quran, audio: userOptions.audio .then (data)-&gt; ayahs = data.map (ayah) -&gt; # The ayah object is returned from Restangular and given all the properties that restangular gives it. For example, you can call # ayah.save() or ayah.remove() which will make API calls accordingly. This is power and will be perserved when creating the Ayah object return new Ayah(ayah) return ayahs And the corresponding controller: angular.module('qurancomApp') .controller 'AyahsCtrl', ($scope, $routeParams, Surah) -&gt; rangeArray = $routeParams.range.split("-") Surah.new($routeParams.id).then (surah) -&gt; $scope.currentSurah = surah console.log $scope.currentSurah.getAyahs(rangeArray[0], rangeArray[1]) Really, the question is: in the controller, I call function Surah.new() which then goes ahead and fetches that Surah from the backend, and then wants to create it's associated Ayahs, which I inject the Ayah model into the Surah model and have …
has title: Angularjs dealing with promises and models
answer count: 1

http://stackoverflow.com/q/27140207
has answer: http://stackoverflow.com/a/27140266
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has body: Trying to make my own responsive mobile drop-down menu with its corresponding sub-menus. So far I have the basic layout. The user should be able to toggle between showing those sub-menus. When "WORK" is clicked no other sub-menu should be open. I've gone ahead and added the "display: none;" property to hide the sub-menus. Trying to use jQuery to show() and hide() them when they are clicked. I've looked around and test various methods. So far none worked. The code is as follows HTML &lt;nav id="nav"&gt; &lt;ul class="topLinksUL"&gt; &lt;li class="topLinksLI"&gt;&lt;a class="topLinksA" title="Home" id="home" href=""&gt;HOME&lt;/a&gt; &lt;ul class="abtDropUL"&gt; &lt;li class="abtDropLI"&gt;&lt;a class="dropLinksA" href=""&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li class="topLinksLI"&gt;&lt;a class="topLinksA" title="Work" id="wrk" href=""&gt;WORK&lt;/a&gt; &lt;ul class="workDropUL"&gt; &lt;li class="workDropLI"&gt;&lt;a class="dropLinksA" href=""&gt;Projects&lt;/a&gt;&lt;/li&gt; &lt;li class="workDropLI"&gt;&lt;a class="dropLinksA" href=""&gt;Education&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li class="topLinksLI"&gt;&lt;a class="topLinksA" title="About Me" id="abt" href=""&gt;ABOUT ME&lt;/a&gt; &lt;ul class="abtDropUL"&gt; &lt;li class="abtDropLI"&gt;&lt;a class="dropLinksA" href=""&gt;Bio&lt;/a&gt;&lt;/li&gt; &lt;li class="abtDropLI"&gt;&lt;a class="dropLinksA" href=""&gt;Interests&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li class="topLinksLI"&gt;&lt;a class="topLinksA" title="Contact Me" id="contact" href=""&gt;CONTACT&amp;nbsp;ME&lt;/a&gt; &lt;ul class="contactDropUL"&gt; &lt;li class="contactDropLI"&gt;&lt;a class="dropLinksA" href=""&gt;Email&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt;&lt;!-- ends nav --&gt; CSS nav{ width: 100%; text-align: center; margin: 0 auto; } /* Centering the LIST ITEMS within the UL List ITems*/ nav ul li ul.workDropUL, nav ul li ul.abtDropUL, nav ul li ul.contactDropUL{ padding-lef…
score: 1
linked to: http://stackoverflow.com/q/707865
linked to: http://stackoverflow.com/q/17350181
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27140266
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27140294
answer count: 2
has answer: http://stackoverflow.com/a/27140294
downvote count: 0
tagged with: drop-down-menu
tagged with: jquery
has title: DropDown Menu won't show for more than a second..not working.
favorite count: 0

http://stackoverflow.com/q/27087723
has title: Why doesn't 'return' stop the function completely inside an 'if' statement?
upvote count: 3
answer count: 3
accepted answer: http://stackoverflow.com/a/27087780
favorite count: 0
has comment: http://stackoverflow.com/comment/42683373
has body: I'm currently doing this small tutorial on accessing the DOM. Right at the bottom of the page, there's a small excersise on creating a function to go through all the nodes in the DOM and get the next node. I've got the code working, but I'm not sure exactly HOW it's working. This is less to do with the DOM and more to do with if/while loops. This is the code: nextNode = function(node) { if (node.firstChild) { return node.firstChild; } while (node) { if (node.nextSibling) { return node.nextSibling; } node=node.parentNode; }; return node; }; My questions are: What is the first step that this function will take? For instance, it first checks if there's a child node for the selected node. If there is, it'll 'return' it. Shouldn't this end the function? I thought returning was a way to break out of a function? Why does it continue? When it continues on to the while loop, it checks if there's a next sibling. It 'returns' this too. What is it returning it to? It then jumps to the parent node, and then checks again. I hope my question makes sense. I'm just trying to understand the steps that are being taken during the execution of this function.
has answer: http://stackoverflow.com/a/27087809
has answer: http://stackoverflow.com/a/27087780
type: AnsweredQuestion
score: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/27087767
has answer: http://stackoverflow.com/a/27087767
tagged with: dom
type: Question
tagged with: javascript

canvas
tags question: http://stackoverflow.com/q/27082720
tags question: http://stackoverflow.com/q/27076951
tags question: http://stackoverflow.com/q/27141638
tags question: http://stackoverflow.com/q/27065029
tags question: http://stackoverflow.com/q/27088828
tags question: http://stackoverflow.com/q/27030172
tags question: http://stackoverflow.com/q/27089160
tags question: http://stackoverflow.com/q/27140026
tags question: http://stackoverflow.com/q/27152052
tags question: http://stackoverflow.com/q/27104991
tags question: http://stackoverflow.com/q/27146120
tags question: http://stackoverflow.com/q/27031042
tags question: http://stackoverflow.com/q/26998675
tags question: http://stackoverflow.com/q/27079760
tags question: http://stackoverflow.com/q/27033370
tags question: http://stackoverflow.com/q/27088485
tags question: http://stackoverflow.com/q/27126178
tags question: http://stackoverflow.com/q/27084360
tags question: http://stackoverflow.com/q/27134879
tags question: http://stackoverflow.com/q/27128492
tags question: http://stackoverflow.com/q/27069513
tags question: http://stackoverflow.com/q/26997470
tags question: http://stackoverflow.com/q/27064929
tags question: http://stackoverflow.com/q/27134462
tags question: http://stackoverflow.com/q/27022915
tags question: http://stackoverflow.com/q/27065281
tags question: http://stackoverflow.com/q/27139935
tags question: http://stackoverflow.com/q/27042139
tags question: http://stackoverflow.com/q/27020560
tag name: canvas
tags question: http://stackoverflow.com/q/27079583
tags question: http://stackoverflow.com/q/27136030
tags question: http://stackoverflow.com/q/27114087
tags question: http://stackoverflow.com/q/26998550
tags question: http://stackoverflow.com/q/27079713
tags question: http://stackoverflow.com/q/27092263
type: Tag
tags question: http://stackoverflow.com/q/27133558
tags question: http://stackoverflow.com/q/27089340
tags question: http://stackoverflow.com/q/27038263
tags question: http://stackoverflow.com/q/27108283
tags question: http://stackoverflow.com/q/27038658
tags question: http://stackoverflow.com/q/27072550
tags question: http://stackoverflow.com/q/27123547
tags question: http://stackoverflow.com/q/27083971
tags question: http://stackoverflow.com/q/27058380
tags question: http://stackoverflow.com/q/26995131
tags question: http://stackoverflow.com/q/27013564
tags question: http://stackoverflow.com/q/27062282
tags question: http://stackoverflow.com/q/27135938
tags question: http://stackoverflow.com/q/27090916
tags question: http://stackoverflow.com/q/27068334
tags question: http://stackoverflow.com/q/26996978

http://stackoverflow.com/a/27122864
type: Answer
answers question: http://stackoverflow.com/q/27121422
has body: Just figured out a solution. Basically, I added a class to each of the elements that the click event is on, then called '.off()' on that class, within the BindUserControls function. I had tried using '.off()' earlier, but in a different manner - I had done something along the lines of '$(button).off(...).on(...)', which didn't work for me. Thanks for all the answers! Below is my code: var BindUserControls = function(button, path) { $(button).on('click', function() { $.ajax({ method: 'GET', url: path }) .done(function(data){ $('.modal-content').empty() $('.modal-content').prepend(data) $('.modal').modal('show') }) $('.user_controls').off() }) }
score: 0
has comment: http://stackoverflow.com/comment/42746376

http://stackoverflow.com/comment/42732087
comment on: http://stackoverflow.com/a/27114465
score: 0
type: AnswerComment
has text: Is there a way I can move this then to sit on top of the canvas I have? Like to change its position relative to the html page?
type: Comment

http://stackoverflow.com/comment/42678973
type: Comment
type: QuestionComment
has text: So if you have done the the profiling didn't that tell you the answer?
score: 3
comment on: http://stackoverflow.com/q/27085054

web-services
type: Tag
tags question: http://stackoverflow.com/q/27105539
tags question: http://stackoverflow.com/q/27109734
tags question: http://stackoverflow.com/q/27119464
tags question: http://stackoverflow.com/q/27081156
tags question: http://stackoverflow.com/q/27101108
tags question: http://stackoverflow.com/q/27039084
tags question: http://stackoverflow.com/q/27102629
tags question: http://stackoverflow.com/q/27077747
tags question: http://stackoverflow.com/q/27108056
tags question: http://stackoverflow.com/q/27083797
tags question: http://stackoverflow.com/q/27091602
tag name: web-services

http://stackoverflow.com/comment/42665348
has text: Just a hunch, you are in the Pacific timezone?
comment on: http://stackoverflow.com/q/27077389
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27117386
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27037625
downvote count: 0
type: Answer
has body: Per the ECMAScript 3.0 specification (Pages 46 - 47): 11.4.3 The typeof Operator The production UnaryExpression : typeof UnaryExpression is evaluated as follows: Evaluate UnaryExpression. If Type(Result(1)) is not Reference, go to step 4. If GetBase(Result(1)) is null, return "undefined". Call GetValue(Result(1)). Return a string determined by Type(Result(4)) according to the following table: Type Result Undefined "undefined" Null "object" Boolean "boolean" Number "number" String "string" Object (native and doesn’t implement Call) "object" Object (native and implements Call) "function" Object (host) Implementation-dependent I couldn't find any reference to typeof in the 1.0 specification, and while wikipedia references a 2.0 specification, I couldn't find it online. While georg makes a lovely sentiment, it would appear that the typeof unary operator was added to JavaScript sometime after the initial release (so some thought had to have been put into it). That said, there are many ways around the limitations. Just google "fixing typeof"... there's around 41.7 million results. :)

http://stackoverflow.com/comment/42628022
score: 0
type: AnswerComment
type: Comment
has text: But there is no fix number of `div` elements, it is generated dynamically.
comment on: http://stackoverflow.com/a/27056034

http://stackoverflow.com/comment/42748936
score: 1
comment on: http://stackoverflow.com/a/27123797
type: AnswerComment
type: Comment
has text: I am very confused on where I should be adding the no wap option and where to check if id's match.

http://stackoverflow.com/comment/42526026
has text: @dayuloli, OK, I added an answer
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26997647

http://stackoverflow.com/q/27001664
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: submit
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27002487
tagged with: settimeout
has answer: http://stackoverflow.com/a/27002305
has body: I want to make a 5-second countdown inside my button so you can see how much time is left before I submit some content after I click the button. I get the value he has to count down from "data-delay" inside my HTML tag });
has title: How do make a count down inside the button?
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27109930
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27110335
type: Question
tagged with: conditional-statements
has title: How to include a condition into a combined JSP and JavaScript function?
tagged with: javascript
has body: Now I have 2 following JavaScript functions : function clearBillingCache(){ window.location = "billingSearchClear.html" } function clearBillingCache_1(){ &lt;% request.getSession().setAttribute("stickyCarrier", null); request.getSession().setAttribute("stickyAgency", null); %&gt; } How to have a combined function, so only when request.getSession().getAttribute("stickyCarrier") != null do the following : &lt;% request.getSession().setAttribute("stickyCarrier", null); request.getSession().setAttribute("stickyAgency", null); %&gt; window.location = "billingSearchClear.html" otherwise do nothing. Edit : Thanks Bhaskara ! But actually it's more than what I showed, it might get into an infinite loop, because there is a redirect in : @RequestMapping(value = "/billingSearchClear.html", method = RequestMethod.GET) public String clearCache(HttpServletRequest request) { String returnVal = "redirect:/billingSearch.html"; request.getSession().setAttribute("stickyCarrier", null); request.getSession().setAttribute("stickyAgency", null); return returnVal; } And I'm calling clearBillingCache() in &lt;body onload=...&gt;
score: 0
has comment: http://stackoverflow.com/comment/42805645
answer count: 1
tagged with: jsp

http://stackoverflow.com/comment/42608423
comment on: http://stackoverflow.com/a/27044823
type: Comment
has text: I have installed `grunt-mocha`, `mocha` and `chai` via npm. They are all in my node_modules folder. In my Gruntfile I use: `require('load-grunt-tasks')(grunt);`
score: 0
type: AnswerComment

iron-router
tags question: http://stackoverflow.com/q/26997708
tags question: http://stackoverflow.com/q/27044613
tags question: http://stackoverflow.com/q/27058136
tags question: http://stackoverflow.com/q/27135534
tags question: http://stackoverflow.com/q/27021381
tags question: http://stackoverflow.com/q/27044900
tag name: iron-router
type: Tag

http://stackoverflow.com/q/27098874
has answer: http://stackoverflow.com/a/27098941
tagged with: javascript
has body: I take text form the user with an html input tag. When the user types a character into the input element, I want to console.log the text they have just typed; it would look like I am console.loging for each letter. I attempted this by adding an event listener for 'change' on the input tag. To demonstrate what I mean, I have simplified my problem in the code below... &lt;input type="text" id='userInput' placeholder='enter characters here'/&gt; In JS script: text = document.getElementById('userInput'); text.addEventListener('change', function() { console.log('hello world'); }); I chose the 'change' event because I thought that typing text into an input tag element would equate to changing that element, such that every time the user types into the input element, it logs 'hello world'. However, the 'change' event for the input element is not what I expected. What actually happens is that 'hello world' is not logged until you hit 'enter' inside of the input element (ie a 'change' event for a div might look different than a 'change' event for a button). I have been experimenting with this inside of Firebug, and I was looking at the addEventListener and change documentation on MDN, and have read that the change event listens to various tags differently. Does anyone know a way to modify the input change event for addEventListener to register actual text changes, not only just when someone hits enter inside input? or else If I cannot specify the 'change' event for input, does anyone know of another way to console.log each character as it is typed into input?
favorite count: 0
accepted answer: http://stackoverflow.com/a/27098941
tagged with: http://stackoverflow.com/tag/html
tagged with: input
tagged with: events
answer count: 4
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/27099029
type: Question
has answer: http://stackoverflow.com/a/27098907
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42702545
possible better answer: http://stackoverflow.com/a/27099046
has answer: http://stackoverflow.com/a/27099046
has title: How to change the input tag's response to addEventListener('change')?
has comment: http://stackoverflow.com/comment/42702482
tagged with: addeventlistener
downvote count: 0

http://stackoverflow.com/a/27148188
has comment: http://stackoverflow.com/comment/42791628
has comment: http://stackoverflow.com/comment/42793636
has comment: http://stackoverflow.com/comment/42792459
type: Answer
answers question: http://stackoverflow.com/q/27147855
has body: The problem is that you are using closures to access the index, thus the lastest value assinged to that variable is accessible in the app function. For example, if results.length equlas 11, index in app function will always be 11. The soltion is to declare a variable inside the for loop, assign the index value to that variable, and pass the variable to app function. //Create a factory function for the app function //Outside the for loop. var createAppFunc = function (i) { return function () { console.log(i); }; }; for (var index = 0, l = results.length; index &lt; l; index++) { var newVar = index; var app = createAppFunc(index); //Now, app is a function. } Good Luck :).
has comment: http://stackoverflow.com/comment/42791582
score: 0

http://stackoverflow.com/comment/42617461
has text: You just have to return all of the possible methods that the object expects.
score: 0
comment on: http://stackoverflow.com/q/27049850
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27073532
upvote count: 2
answers question: http://stackoverflow.com/q/27073494
type: Answer
score: 2
downvote count: 0
has body: Take a look in the API, it seems there is events. player.addEventListener('onStateChange', function(e) { if (e.data === 0) { // If state is 0 (ended), do something } }); API provided by Google. Events API Embedding via JavaScript Also, on the side note: It looks like your YouTube video needs to be embed via JavaScript for events. To do so,

http://stackoverflow.com/comment/42776844
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27138664
has text: Also, you can prevent jQuery from claiming the `$` global, and then call it using `jQuery("#gallery a").photoSwipe();` instead of `$("#gallery a").photoSwipe(); `.
score: 0

http://stackoverflow.com/a/27138712
score: 3
answers question: http://stackoverflow.com/q/27138638
downvote count: 0
type: Answer
has body: What's wrong with the obvious? var i, x, constructors = [ String, Object, Boolean ]; for(i = 0; i &lt; constructors.length; i++){ x = new constructors[i]; } Bear in mind that anything in JS is an object (including "class names") and may be used, pretty much, however you want.
upvote count: 3

header
type: Tag
tags question: http://stackoverflow.com/q/27102760
tags question: http://stackoverflow.com/q/27033631
tags question: http://stackoverflow.com/q/27059118
tag name: header
tags question: http://stackoverflow.com/q/27060617

http://stackoverflow.com/a/31552917
type: Answer
score: 11
upvote count: 11
has body: attributeEquals locate element using css selector, while elements returns ID of element, so you can't locate the element that way. You can use elementIdAttribute to get the element and verify it. browser.elements('css selector','icon_checkmark', function (result) { result.value.map(function (v, k) { browser.elementIdAttribute(v.ELEMENT, 'aria-hidden', function (res) { // true return browser.assert.equal(res.value, 'expected value'); }); }); })
answers question: http://stackoverflow.com/q/27116103
accepted answer of: http://stackoverflow.com/q/27116103
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42784168
score: 0
type: AnswerComment
type: Comment
has text: Yep. That's a better answer. Thanks
comment on: http://stackoverflow.com/a/27143745

http://stackoverflow.com/comment/42589440
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27033968
has text: I know buddy. I am also a developer. I could not solve the problem. That's why I posted the question here.
type: Comment

http://stackoverflow.com/q/27119731
accepted answer: http://stackoverflow.com/a/27120567
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42740856
has comment: http://stackoverflow.com/comment/42740962
answer count: 1
has title: calling angular directive without element
has comment: http://stackoverflow.com/comment/42741298
favorite count: 0
has body: I am trying to build a notification service in angular without having to add in a random element in the code. Most notifications repo's require an element be added into the code to call the directive: HTML &lt;div notifications&gt;&lt;/div&gt; DIRECTIVE myApp.directive('notifications', function() {}); It seems like the only reason this code exists is because a directive needs to be called. All the 'settings' can be handled in the provider when the notification is called: $notify(settings) Also, if it is possible to call the directive without the element, how can the directive create a 'notification' element at the bottom of the body, and bind itself to it? So I ask, is it possible to call a directive without this arbitrary code? or is there an easier way to do this? or is this a stupid question? thanks in advance :)
has comment: http://stackoverflow.com/comment/42741779
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42740925
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/42741081
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/27120567

http://stackoverflow.com/q/27105418
upvote count: 1
tagged with: methods
type: Question
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: jstorage
has title: JavaScript: Keep methods after serialization
has body: I am stuck with a greater JavaScript application (using jQuery Mobile) with big parts of the program logic realized already. Now I want to add serialization to it (using a plugin called JStorage). In this code example, I stringify an object to JSON and then turn it into an object again (all without JStorage), but the methods I added to the original object get lost as in this code: function TestObject() { this.lang = "English"; } // This is the method I want to keep TestObject.prototype.showLang = function() { console.log(this.lang) }; var test1 = new TestObject(); var test2 = $.parseJSON(JSON.stringify(test1)); // After save and reload test1.showLang(); // This works test2.showLang(); // This causes an error The problem has one other constraint: In the code, I often use the point operator to call functions as in test1.showLang(). I know I could add a "global" function like this, it works with the original as well as with the copy: function showLang(obj) { console.log(obj.lang); } But then I'd have to change each and every existing call to the function from test1.showLang() to showLang(test1) which - in my real project - I would have to do hundreds of times within the entire code. So is there an easier solution how I can use my existing functions on objects after serialization?
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: serialization
has answer: http://stackoverflow.com/a/27106722
possible better answer: http://stackoverflow.com/a/27105874
accepted answer: http://stackoverflow.com/a/27106722
has answer: http://stackoverflow.com/a/27105874

http://stackoverflow.com/comment/110582385
type: Comment
has text: You could add an if statement in the for loop to remove that case, but if you want to recursively remove files and folders, you may want to use some npm package. https://www.npmjs.com/package/fs-extra
comment on: http://stackoverflow.com/a/42182416
score: 0
type: AnswerComment

http://stackoverflow.com/q/27037723
type: Question
score: 1
has title: How to disable the auto re-alignment behavior of fullPage.js when scrolling ends between the middle of two sections?
has body: I don't know what is the best description for such issue to search for the answers. It looks to me like the fullPage.js has some build-in triggers that allows it to auto re-adjusting to align the section while scrolling ends in the middle part between two sections. In normal scrolling mode, this behavior by default still exists, and would be quite annoying when user just want to scroll down precisely to view more text or want the page scroll to the wanted position. Normalscrollbar mode url: http://alvarotrigo.com/fullPage/examples/normalScroll.html (when testing on device such as iPAD, when scroll ends between Dividing line, will trigger auto align. In desktop chrome or safari browser, this issue is not evident or hardly trigger at all.) I've checked the resizeHandler in fullPage.js //when resizing the site, we adjust the heights of the sections, slimScroll... $(window).resize(resizeHandler); But it seems not the exact trigger for that scroll readjust function. I would like to disable auto align because it would conflict with normal scrolling behavior when users are scrolling the screen near the edge of two sections.
has answer: http://stackoverflow.com/a/27043651
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27043651
tagged with: fullpage.js
tagged with: css
type: AnsweredQuestion
tagged with: twitter-bootstrap
upvote count: 1

http://stackoverflow.com/comment/42731120
has text: or find() if you can to use ECMAScript 6 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
score: 1
comment on: http://stackoverflow.com/a/27114151
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27445318
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27149177
has body: By creating a folder C:/Users//AppData/Roaming/npm solved my problem.

http://stackoverflow.com/q/27109510
tagged with: clojurescript
has comment: http://stackoverflow.com/comment/42724722
downvote count: 8
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/56768476
has comment: http://stackoverflow.com/comment/42726979
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/42725429
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27110481
has title: How to compile clojurescript to javascript?
has comment: http://stackoverflow.com/comment/42740656
possible better answer: http://stackoverflow.com/a/56768476
has body: I have a big question to authors of clojurescript. And to all clojurescript community. ClojureScript tutorial is unefficient and broken. It doesn't help with this problem. (see picture) How to compile clojurescript to javascript?
upvote count: 6
has answer: http://stackoverflow.com/a/27110481
tagged with: clojure
favorite count: 0

http://stackoverflow.com/a/27104720
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27104668
answers question: http://stackoverflow.com/q/27104668
type: Answer
has body: Something like D3JS sounds like it would suit you. http://d3js.org/ Here's something similar to what you are looking for specifically: http://bl.ocks.org/mbostock/4339083
score: 0

http://stackoverflow.com/a/27043431
upvote count: 4
has body: You will have to execute the function on page load (or DOM ready), in addition to calling it during scroll or touchmove events. Instead of repeating the function twice, you can do this: jQuery(document).ready(function($) { var tinyHead = function() { $('#header').toggleClass('tinyHead', $(document).scrollTop() &gt; 0); } // Call tinyHead() when DOM is ready / upon page load tinyHead(); // Call tinyHead() when scroll or touchmove events are registered $(window).on('scroll touchmove', tinyHead); }); p/s: On a side note, you might want to look into throttling your scroll event — some browsers "overfire" the event (i.e. calling it too frequently). Since tinyHead() is a rather lightweight function, I personally don't think throttling the scroll event will bring about massive performance improvements, but if your tinyHead() function is computationally heavy, you might want to look into this option :)
answers question: http://stackoverflow.com/q/27043273
type: Answer
downvote count: 1
score: 3

http://stackoverflow.com/a/27148400
has comment: http://stackoverflow.com/comment/82281763
type: Answer
has body: In the end I didn't use the Frogaloop stuff - I did some simple jQuery to append "?autoplay=1" to the end of the iframe source (which refreshes the iframe and plays it). Obviously this will only work if the src of the video doesn't already have anything else on the end, but it works for my use case. My solution: http://jsfiddle.net/cqpwn2vh/ JS // When you click the play button image $('.play-button').click(function(){ // Find the iframe in the same element as the image and replace it's src with its own source + "?autoplay=1" $(this).siblings("iframe").attr('src', $(this).siblings("iframe").attr('src')+'?autoplay=1'); // Then in my case I hid the image, but you could do whatever after this, but this wont support pausing. $(this).hide(); }); HTML
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27145511
downvote count: 0

http://stackoverflow.com/comment/42740992
comment on: http://stackoverflow.com/q/27119291
has text: This is incorrect ` `. `ng-model` attribute should be on an input element (including selects and textareas), not a div
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/38957408
answers question: http://stackoverflow.com/q/27023768
type: Answer
has body: 'use strict'; /** * Vertically scroll top-left corner of the given element (y-direction) into viewport. * @param scrollToElement element to be scrolled into visible area */ function scrollTo(scrollToElement) { var wd = browser.driver; return scrollToElement.getLocation().then(function (loc) { return wd.executeScript('window.scrollTo(0,arguments[0]);', loc.y); }); }; Usage: scrollTo(element(by.css("div.someclass"))); Disclaimer: this code is from sg-protractor-tools's scroll.js. Code is licensed under the MIT license.
upvote count: 5
score: 5
downvote count: 0

http://stackoverflow.com/a/27087716
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27087444
has body: use target="iframe" here is the example http://jsfiddle.net/47tub983/
answers question: http://stackoverflow.com/q/27087444
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/27096842
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27096548
answers question: http://stackoverflow.com/q/27096548
type: Answer
has comment: http://stackoverflow.com/comment/74069135
has comment: http://stackoverflow.com/comment/43183899
has body: If I needed to add another text element to each div box, is there a way that all text in each div could be searchable? Here's the fiddle with one additional text element - jsfiddle.net/point71echo/mttgj1tt/1 – point71echo Here is a solution to search two elements at once in native JavaScript, without any libraries. document.getElementById("box").onkeyup=function(){ var matcher = new RegExp(document.getElementById("box").value, "gi"); for (var i=0;i&lt;document.getElementsByClassName("connect-cat").length;i++) { if ( matcher.test(document.getElementsByClassName("name")[i].innerHTML) || matcher.test(document.getElementsByClassName("category")[i].innerHTML) ) { document.getElementsByClassName("connect-cat")[i].style.display="inline-block"; } else { document.getElementsByClassName("connect-cat")[i].style.display="none"; } } } JSFiddle If you want to use jQuery to make it more readable (those stupid long DOM functions): $("#box").on('keyup', function(){ var matcher = new RegExp($(this).val(), 'gi'); $('.connect-cat').show().not(function(){ return matcher.test($(this).find('.name, .category').text()) }).hide(); }); JSFiddle
upvote count: 14
has comment: http://stackoverflow.com/comment/52044119
score: 14

http://stackoverflow.com/a/27206057
upvote count: 1
score: 1
has body: You can load Project.prx in an iframe.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27056123

http://stackoverflow.com/q/27138749
upvote count: 1
tagged with: http
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27138810
possible better answer: http://stackoverflow.com/a/27138762
score: 1
has answer: http://stackoverflow.com/a/27138762
tagged with: dom
type: Question
answer count: 2
has title: Stop submit from refreshing from the DOM
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42775534
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42775465
has body: Say I have a form like so on a page: Submit The problem is when I click on the submit button the page tries to load http://localhost/add as a URL. All I want to do is simply make the HTTP post request from the form, and then not reload the page, is this even possible to do with HTML semantics, or will I have to use some javascript to prevent the default action somehow and then make the request? I know there have been many question on the topic, but they all seem to be making the requests via a library or javascript, and not utilising the built in form methods as I am?
linked to: http://stackoverflow.com/q/20813627
has answer: http://stackoverflow.com/a/27138810

http://stackoverflow.com/q/27093248
upvote count: 1
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Today Date + Link
has comment: http://stackoverflow.com/comment/42692522
has answer: http://stackoverflow.com/a/27093703
has comment: http://stackoverflow.com/comment/42692558
has comment: http://stackoverflow.com/comment/42692860
possible better answer: http://stackoverflow.com/a/27093544
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/27093544
favorite count: 0
accepted answer: http://stackoverflow.com/a/27093703
has body: I want to make a link depend on current date. Here is my Javascript: Above Javascript will show, example: 1124 (month/day) I want to make this link follow the current day: http://example.com/JS-RESULT Today date is 24 11 2014 so the url will be like this Today Budget How can I make this work? p.s: i love jquery.
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/27141198
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27141982
accepted answer: http://stackoverflow.com/a/27141982
possible better answer: http://stackoverflow.com/a/27141758
type: AnsweredQuestion
has body: Street The above code works with thanks to stack overflow. Basically at the moment this code displays images in sequence non randomly, it uses the array to fetch them, and show them. The code then regulates the speed of the image display. There is also a sound player, and a button with a sound. I managed after some considerable searching to animate a simple sequence of png files. However I have been trying to ad start stop button and a math random function (preferably the music on-click would start everything going). I want to add a random function to the array,so that it displays images randomly. however the best I could do was, not to brake the code, or to get is to speed up the animation. Can some one please modify my code to add these functions or please point me to some place that would help. The randomized array would be really useful.
has comment: http://stackoverflow.com/comment/42782816
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/27141758
linked to: http://stackoverflow.com/q/18826147
tagged with: javascript
linked to: http://stackoverflow.com/q/25407926
score: 0
has title: randomise array html5 java script

http://stackoverflow.com/comment/42774741
comment on: http://stackoverflow.com/a/27137784
type: AnswerComment
score: 0
type: Comment
has text: thank you for the awesome and fascinating answer. I had no idea I could do that with CSS. I suppose I could use some clever *attribute contains* css magic to get elements with inline-images etc. However, while this does look useful, I'm looking for a JS solution.

http://stackoverflow.com/comment/42517458
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/26993211
score: 1
has text: `schema` is an expression (as if it was wrapped with `{{` and `}}`), not a string, so use `schema="'urn:jsonschema:net:example:net:myschema'"`.

http://stackoverflow.com/comment/42586830
type: AnswerComment
comment on: http://stackoverflow.com/a/27032611
score: 0
type: Comment
has text: @WASasquatch I get the same results as dandavis

http://stackoverflow.com/comment/42704963
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27100303
type: QuestionComment
has text: can you post your table in a jsfiddle? I got a idea how to fix your problem! :-)

http://stackoverflow.com/q/27147115
tagged with: javascript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/xlsx
score: 1
favorite count: 0
type: Question
has body: I am using SheetJS / XSLX / J to extract and parse JSON from Excel documents. 1.) I am facing the issue that in an Excel file I need to parse, I need to discard the 6 first rows. 2.) As an aside I am also facing the issue of extracting only the first sheet, and as it stands at the moment I am parsing all sheets, then accessing only the first one. This overhead I would like to reduce if possible Code workbook = J.readFile(filefullpath); var tmpArray = J.utils.to_json(workbook) var first = function (obj) { for (var a in obj) return a; }; var firstSheet = first(tmpArray); tmpArray[firstSheet].forEach(function(item) { // ... do stuff with item here }
upvote count: 1
tagged with: node.js
has title: HowTo filter Rows in XLSX's J?
downvote count: 0
answer count: 0

http://stackoverflow.com/comment/42841664
has text: If not jQuery, what about [darkroom](http://mattketmo.github.io/darkroomjs/)?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27119223

http://stackoverflow.com/a/27114600
score: 4
accepted answer of: http://stackoverflow.com/q/27108397
answers question: http://stackoverflow.com/q/27108397
type: Answer
has body: Ok, check this fiddle: http://jsfiddle.net/8hmcfmLh/1/ you don't need jquery-ui or bootstrap-datepicker, just bootstrap-datetimepicker and moment.js $(document).ready(function () { // DateTime picker for Dates $("#startDate").datetimepicker(); });
upvote count: 4
downvote count: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42716816
type: QuestionComment
comment on: http://stackoverflow.com/q/27101230
type: Comment
score: 1
has text: Do you really need it to be? In your test I guess all you want to do is make sure the values are correctly set on the scope? If so, you don't need the actual json, just use an empty structure that you can compare the scope values against.

http://stackoverflow.com/comment/42648692
comment on: http://stackoverflow.com/a/27067619
has text: The speed is 100% fine with the thing, its just its not actually rewriting the numbers in the block div, @elzi . I mentioned the gen_nums cause I thought it was a conflict with the rewrite.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/27016660
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42582890
answers question: http://stackoverflow.com/q/27016577
has comment: http://stackoverflow.com/comment/42706329
has body: The "best" way to create a global is to add "window." in front of your variable. window.GV = 0; function testOne() { window.GV = 'Hi !'; } testOne(); setTimeout(function () { alert(window.GV); }, 500);

http://stackoverflow.com/q/27054847
type: Question
tagged with: charts
tagged with: highcharts
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42750384
has body: I'm making an angular app for stock marketing.In this app the data is't the same and I should first check the type of data and after find out the data that should be show is chart data,then draw the chart if the content of page was known, then there was no problem I make a directive for chart and put it in view and just make data in controller .But problem is that I don't know how many chart do we have in each page maybe one chart,in one page and more chart in other so I can't make my view and I should make it after get data. I make confuse and can't design my view I appreciate someone can help me.
has comment: http://stackoverflow.com/comment/42710779
tagged with: angularjs
type: UnansweredQuestion
answer count: 0
has title: how to draw a dynamic chart with angularjs?

http://stackoverflow.com/comment/42525219
type: Comment
has text: @user1918641 If that helped, let me know and I'll post it as an answer. If not, edit your question and include your XHR code, and I'll see if I can suggest what to modify exactly.
comment on: http://stackoverflow.com/q/26995243
score: 0
type: QuestionComment

http://stackoverflow.com/a/32636866
type: Answer
has body: Is phantomjs installed/accessible to the script on the remote host? I installed a more sophisticated spiderable package: https://atmospherejs.com/jazeee/spiderable-longer-timeout that showed me an actual error message instead of irrelevant Error: Meteor code must always run within a Fiber. The error code appeared to be: spiderable: phantomjs not installed. Download and install from http://phantomjs.org/ Things started to work immediately after: sudo apt-get install phantomjs
score: 0
answers question: http://stackoverflow.com/q/27135534

http://stackoverflow.com/comment/42770574
score: 0
has text: Not really less hacky but you can tidy by chaining lines 1 with 2 and 3 with 4.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27136133

http://stackoverflow.com/comment/42555877
type: AnswerComment
comment on: http://stackoverflow.com/a/27014654
score: 0
type: Comment
has text: sorry for undoing acceptance, Joe showed a better way. I think others gonna need it

http://stackoverflow.com/q/27110423
has answer: http://stackoverflow.com/a/27110527
has body: The product page on my website displays the #productID within a string i.e "Product ID: 743961". Using jQuery I want to take this #productID string and compare it to the array of IDs. If the #productID matches an ID within the array I want to append a message. &lt;div id="productID"&gt; Product ID: 743961 &lt;/div&gt; I was initially trying to do the following, but was struggling to get the desired results. var myArray = [ 743961, 743963, 743965 ]; $( "#prod_code:contains('myArray')" ).css( "text-decoration", "underline" ); My array has over 2,000 items, so this may not be the best solution. I am aware that Ajax would be the best solution, but am unable to use it in this instance.
accepted answer: http://stackoverflow.com/a/27110527
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Jquery if string matches value in array

http://stackoverflow.com/a/27030336
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27029736
type: Answer
answers question: http://stackoverflow.com/q/27029736
has body: You can try something like this: var _preflag = -1; var _unbindScroll = function(){}; // it will be fired only once (when flag is changed) function headerParallax(flag){ if (flag === _preflag){ return; } _preflag = flag; if (flag){ // TODO adjust the UI for true window.requestAnimationFrame(theCalculatedValue); _unbindScroll(); // It's duplicate work to unbind scroll here, but there's no harm calling it :) $(window).on('scroll', _onscroll); // update the ubind scroll so that anyone can ubind it safely _unbindScroll = function(){ $(window).off('scroll', _onscroll); _unbindScroll = function(){}; }; } else { // TODO adjust the UI for false window.requestAnimationFrame(theCalculatedValue); _unbindScroll(); // unbind scrolling, this is what you want, right? } function _onscroll(){ // TODO } } function resize(){ // this will be fired multipe times, need to check it in sub functions to take it once headerParallax($(window).width() &lt; 1200); } $(window).resize(resize); resize();
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/27151238
answers question: http://stackoverflow.com/q/27150850
score: 1
downvote count: 0
has body: Even though I don't see much animations on your example, I would like to to answer your question. You can set an eventListener, which resizes and realigns the page, depending on the size. Within the eventListener you have certain breakpoints for certain layouts. A surely more elegant way would be just to manipulate the css depending though media queries and use transitions to change to corresponding values. font-size: 200px; transition: color 12s, font-size 12s; Here a small example: (not to good to view in fiddle, copy paste it into your local IDE). http://jsfiddle.net/jcyacdmv/ cheers,
type: Answer
upvote count: 1

http://stackoverflow.com/q/27043112
has body: here is my css .node.selectedNode { width:50px; height:50px; stroke-width: 3px; stroke: #f00; } .node.unselectedNode { width:35px; height:35px; stroke-width: 3px; stroke: #000; } i want to click on a node making it selected (giving it the selected attributes), click again and make it unselected. Here is a piece of code where i check if the id of a node is in an array, if it isnt its adds it too it, giving me the ability to easily print out the selected nodes. if(selectedNodesArray.indexOf(d.coreId)==-1){ selectedNodesArray.push(d.coreId); d.selectedNode = true; //change style d.unselectedNode = false; d3.select(this).classed("selectedNode", true); console.log("clicked"); }else{ selectedNodesArray.pop(d.coreId); d.unselectedNode = true; d.selectedNode = false; d3.select(this).classed("unselectedNode", true); console.log("pulled"); } as you may notice i try change the style. Now this works twice; when i select it and when i deselect it. It doesnt work again after that. Any ideas ? Also, i have created a button so that it clears all highlighted nodes. Like i have here, when i click the node it changes its property to fixed function dragstart(d) { d.fixed = true; d3.select(this).classed("fixed", true); I want to do that when i click a button, so it changes the css attributes of the node. I dont know how to pick out all of the nodes and give them all the same css attribute instead of doing it through D3 and changing the .style that way. Sorry for the long winded essay i just want to give you as much detail as possible making it easier for everyone.
tagged with: css
tagged with: node.js
type: AnsweredQuestion
type: Question
has title: How do i change the styling of a nodes CSS through javascript(d3)
tagged with: javascript
has answer: http://stackoverflow.com/a/27047792
score: 0
accepted answer: http://stackoverflow.com/a/27047792
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: d3.js

http://stackoverflow.com/comment/42616960
comment on: http://stackoverflow.com/a/27049076
score: 1
type: AnswerComment
has text: Oh, duh -- using `.href` includes the full URL even if the `href` attribute only specifies a fragment id.
type: Comment

http://stackoverflow.com/comment/42569569
has text: Well the `.alert#rowcounter` works just fine by itself, and I know the extra selectors are unnecessary but I've just been trying anything...to no avail. Selecting only the #rowcounter works and makes clicks log but anything deeper than that fails
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27022697

http://stackoverflow.com/comment/42832449
has text: @jasonscript: Look at http://jsfiddle.net/OlegKi/wdwdxLuk/14/ . One needs just change `savedRows = [];` to `p.savedRow = [];`
type: Comment
comment on: http://stackoverflow.com/a/27146298
score: 0
type: AnswerComment

gulp
tags question: http://stackoverflow.com/q/27003879
tags question: http://stackoverflow.com/q/27145244
tags question: http://stackoverflow.com/q/27007445
type: Tag
tags question: http://stackoverflow.com/q/27005614
tags question: http://stackoverflow.com/q/27112704
tag name: gulp
tags question: http://stackoverflow.com/q/27011285
tags question: http://stackoverflow.com/q/27017644
tags question: http://stackoverflow.com/q/27073595
tags question: http://stackoverflow.com/q/27076745
tags question: http://stackoverflow.com/q/27046466
tags question: http://stackoverflow.com/q/27114000
tags question: http://stackoverflow.com/q/27017683
tags question: http://stackoverflow.com/q/27110271
tags question: http://stackoverflow.com/q/27047510
tags question: http://stackoverflow.com/q/27100383

http://stackoverflow.com/comment/42783544
type: Comment
has text: open bug exists in pdf.js: https://github.com/mozilla/pdf.js/issues/2802
comment on: http://stackoverflow.com/q/27143506
score: 0
type: QuestionComment

split
tags question: http://stackoverflow.com/q/27084516
tag name: split
tags question: http://stackoverflow.com/q/27129020
tags question: http://stackoverflow.com/q/27014418
type: Tag

http://stackoverflow.com/comment/42646447
score: 0
has text: you can get the width and height via javascript and change the width and height of the panel each time you rotate it :)
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27066493

http://stackoverflow.com/comment/42515609
type: Comment
type: QuestionComment
has text: `float` and `position:absolute` don't go together.
comment on: http://stackoverflow.com/q/26992090
score: 0

http://stackoverflow.com/q/27117659
has body: I have three combobox that has each one should display and hide the respective div if selection is made. Three dropdown list with div are given : Select one... Walmart Appliance Beyond Presedential Select one... Walmart Appliance Beyond Presedential Select one... Walmart Appliance Beyond Presedential default content1 content2 content3 it is running on http://jsfiddle.net/ ..but if i save it in notepad as php or html file and run through wamp server it just showing the comboboxes but not showing divs...please solve this problem
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27118011
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42737704
has answer: http://stackoverflow.com/a/27118146
has title: JQuery show /hide div from drop down list change
has comment: http://stackoverflow.com/comment/42737820
type: Question

http://stackoverflow.com/a/27075857
type: Answer
has comment: http://stackoverflow.com/comment/86473250
upvote count: 4
has comment: http://stackoverflow.com/comment/42690493
downvote count: 0
has comment: http://stackoverflow.com/comment/42690309
has body: Implicit waits are for assigning global timeout(s), that means once assigned, selenium will wait for that amount of time (at max), each time it tries to find an element. On the other hand, Explicit waits are useful in assigning timeouts exclusively to any element in the webpage, and it overrides the timeout so set by implicit wait. So, for the above, you can try Explicit wait instead like this: public boolean isAlertPresent(){ try{ Alert a = new WebDriverWait(driver, 10).until(ExpectedConditions.alertIsPresent()); if(a!=null){ System.out.println("Alert is present"); driver.switchTo().alert().accept(); return true; }else{ throw new Throwable(); } } catch (Throwable e) { System.err.println("Alert isn't present!!"); return false; } } This will check the existence of alert within 10 seconds. If it finds the alert within that, it will return 'true' else it will return 'false'.
score: 4
answers question: http://stackoverflow.com/q/27074625
has comment: http://stackoverflow.com/comment/86262423

http://stackoverflow.com/comment/42718790
comment on: http://stackoverflow.com/q/27107899
has text: Because `0.1` is not one tenth (type `(0.1).toFixed(20)` in the console).
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/q/27029570
answer count: 4
upvote count: 3
type: UnansweredQuestion
type: Question
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/79502345
tagged with: types
downvote count: 0
tagged with: static-analysis
favorite count: 0
tagged with: programming-languages
has answer: http://stackoverflow.com/a/27030114
has title: How best for an old timer to manage type safety in Javascript
has body: I've been writing C/C++/C# for decades, and have used JavaScript as needed for web projects, but want to expand that and do some more in-depth development with Canvas and JavaScript. My concern is how easily you can make mistakes like setinterval() instead of setInterval(), for example. I'm using VisualStudio and have Telerik's JustCode plugin that does some static analysis, but there's so much that it doesn't check. I also worry about calling object methods or properties that just don't exist. I understand why these things empower the language and developer with greater flexibility, but how do I best protect myself from the unintended consequences of that flexibility?
has answer: http://stackoverflow.com/a/27029666
has comment: http://stackoverflow.com/comment/42581822
has answer: http://stackoverflow.com/a/27029694
has comment: http://stackoverflow.com/comment/42618402

http://stackoverflow.com/a/27071435
accepted answer of: http://stackoverflow.com/q/27070858
answers question: http://stackoverflow.com/q/27070858
has comment: http://stackoverflow.com/comment/42728214
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42727127
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42726559
has body: Event handling for the select element can vary greatly from browser to browser. A somewhat hacky solution, which seems to work consistently cross-browser, is to simulate opening the select element on focus, then closing it on blur: var newOpts = "&lt;option value='ccc'&gt;ccc&lt;/option&gt;&lt;option value='ddd'&gt;ddd&lt;/option&gt;&lt;option value='bbb'&gt;bbb&lt;/option&gt;"; var $select = $("select"); var selectedOpt = $select.val(); $select.focus(function() { if(!$(this)[0].size) { $(this) .empty() .append(newOpts) .val(selectedOpt) $(this)[0].size= $(this)[0].options.length; } }); $select.on('change blur', function() { $(this)[0].size= 0; }); select { position: absolute; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;span style="position:relative;width:4em;float:left"&gt; &amp;nbsp; &lt;select&gt; &lt;option value='aaa'&gt;aaa&lt;/option&gt; &lt;option value='bbb' selected="selected"&gt;bbb&lt;/option&gt; &lt;/select&gt; &lt;/span&gt; &lt;input&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.
upvote count: 1
has comment: http://stackoverflow.com/comment/42728875
type: Answer

http://stackoverflow.com/comment/42797321
comment on: http://stackoverflow.com/a/27151219
score: 0
type: AnswerComment
type: Comment
has text: I'm sorry for my ignorance, but what do i need to pass as parameters for this function? if I just call `fragment();` in my `load_class` function it doesn't work

http://stackoverflow.com/q/27133479
type: Question
has answer: http://stackoverflow.com/a/27133931
has comment: http://stackoverflow.com/comment/42765559
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/42765598
has answer: http://stackoverflow.com/a/27133625
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to change the css using javascript
has body: I need a function to change the appearance of some elements in my HTML page but I am not able to do it. The problem is that I cannot use a command like document.getElementById('') because I need to make the changes effective when the page is already loaded and I use Django and python. My html page looks like this. &lt;html&gt; &lt;style type="text/css"&gt; .bs-sidebar.affix { position: static; } .sideheading{ background-color: #e0e0e0; background-image: -moz-linear-gradient(#fafafa, #e0e0e0); background-image: -webkit-linear-gradient(#fafafa, #e0e0e0); background-image: linear-gradient(#fafafa, #e0e0e0); background-repeat: repeat-x; display: block; padding: 10px 10px; border-bottom: 1px solid #ccc; color: #222; font-weight: bold; font-size: 20px; line-height: 20px; border-left: 0 none; } /* First level of nav */ .bs-sidenav { /*margin-bottom: 30px;*/ padding-top: 10px; padding-bottom: 10px; background-color: #fafafa; border-radius: 5px; border:1px solid #CCC; } .bs-sidebar .nav &gt; li &gt; a { font-size: 1.2em; display: block; color: #716b7a; padding: 10px 20px; border-right: 4px solid transparent; } .bs-sidebar .nav &gt; li &gt; a:hover, .bs-sidebar .nav &gt; li &gt; a:focus { text-decoration: none; background-color: #fff; border-right: 4px solid #dbd8e0; } .bs-sidebar .nav &gt; .active &gt; a, .bs-sidebar .nav &gt; .active:hover &gt; a, .bs-sidebar .nav &gt; .active:focus &gt; a { font-weight: bold; color: #418cd1; background-color: #fff; border-right: 4px solid #418cd1; } .xgap{ margin-top:60px; } .wrap { margin: 0 auto; } .progress-radial { float: left; margin-right: 30px; position: relative; width: 100px; height: 100px; border-radius: 50%; border: 2px solid #2f3439; .progress-radial .overlay { position: absolute; width: 60px; height: 60px; background-color: #fffde8; border-radius: 50%; margin-left: 20px; margin-top: 20px; text-align: center; line-height: 60px; font-size: 16px; } .progress-0 { background-image: linear-gradient(90deg, #2f3439 50%, transparent 50…
downvote count: 1

http://stackoverflow.com/comment/42539221
score: 1
comment on: http://stackoverflow.com/q/27004944
type: QuestionComment
has text: Applying `list-style: none` to your ` ` element should work ([see this example](http://jsfiddle.net/vLp8t0kw/1/)). If it doesn't, it means there is either a) a typo in your CSS or the more likely b) some other CSS has a more specific selector and is overriding your selections. Open your browser's dev tools by selecting `<F12>` and view the CSS being applied to the element.
type: Comment

primefaces
tags question: http://stackoverflow.com/q/27043371
tags question: http://stackoverflow.com/q/27063518
tag name: primefaces
type: Tag

http://stackoverflow.com/comment/42529041
type: Comment
comment on: http://stackoverflow.com/q/26999107
has text: Add HTML and explanation.
score: 0
type: QuestionComment

http://stackoverflow.com/a/27032939
has body: You have a timing issue. app.controller('app1cont', ['$scope', 'solrser', 'solrresult', function($scope,solrser,solrresult){ console.log("Start"); var res = solrser.query({'q':'potato'}); console.log(res) console.log(res.getdocs()) }]); When you call solrser.query() it runs async to get the data. So the res is not populated with any real value until after the promise returns inside the "solrser" service. You would need to do something more like: solrser.query({'q':'potato'},function(res) { console.log(res); console.log(res.getdocs()); }); // could be done as a promise as well.... Separately, you also are doing something really strange when the response is called inside the solrser service. this.query = function (p) { this.res.get(p).$promise.then(function(d) { return solrresult(d); }); } Calling return from within the promise handler is not going to do you very much. You need to either call a callback or resolve a deferred. Something like this would work better: this.query = function (p,callback) { this.res.get(p).$promise.then(function(d) { callback(solrresult(d)); }); } Or as a promise this.query = function (p) { var defer = $q.defer(); this.res.get(p).$promise.then(function(d) { defer.resolve(solrresult(d)); }); return defer.promise; } Or you could just pass the get(p).$promise through, etc. UPDATE: Since this is an async action, there will always be a promise or callback. You have to do one of: app.controller('app1cont', ['$scope', 'solrser', 'solrresult', function($scope,solrser,solrresult){ var res = solrser.query({'q':'potato'},function() { res.getDocs(); }); }]); Or just straight callback app.controller('app1cont', ['$scope', 'solrser', 'solrresult', function($scope,solrser,solrresult){ solrser.query({'q':'potato'},function(res) { res.getDocs(); }); }]);
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42603043
type: Answer
has comment: http://stackoverflow.com/comment/42604234
has comment: http://stackoverflow.com/comment/42602699
has comment: http://stackoverflow.com/comment/42605953
has comment: http://stackoverflow.com/comment/42605777
has comment: http://stackoverflow.com/comment/42604828
has comment: http://stackoverflow.com/comment/42604482
accepted answer of: http://stackoverflow.com/q/27031739
has comment: http://stackoverflow.com/comment/42608921
score: 0
has comment: http://stackoverflow.com/comment/42602878
answers question: http://stackoverflow.com/q/27031739

http://stackoverflow.com/q/27005963
has body: I'm having trouble adding an observer to watch for changes in firefox's search engines. I read the nsIBrowserSearchService page on the Mozilla Developer Site which suggests to use the init() method of the Services.search object. void init([optional] in nsIBrowserSearchInitObserver observer); I tried that and I managed to get it to execute the function once on start up but it never calls it again when I add or remove or reorder the search engines. So I'm doing something wrong. I have experience with observers but only with using general preferences and I generally use add them and remove them using the code below. I'm not sure how to do it with the nsIBrowserSearchService . I would like to observe the nsIBrowserSearchService in the same or a similar way but I'm not sure what I would put for branch = Services.prefs.getBranch("preferenceNameHere"); I'm not observing Services.prefs but Services.search I assume, and that has no getBranch method as far as I can tell. This is how I normally add and remove the observer in Chrome.js const {Ci, Cu} = require("chrome"); const {Services} = Cu.import("resource://gre/modules/Services.jsm", {}); branch = Services.prefs.getBranch("preferenceNameHere"); branch.addObserver("", observe, false); function observe(subject, topic, data) { // instanceof actually also "casts" subject if (!(subject instanceof Ci.nsIPrefBranch)) { return; } //do stuff here }; exports.onUnload = function(reason) { // Need to remove our observer again! This isn't automatic and will leak // otherwise. branch.removeObserver("", observe); if(reason == "disable" || reason == "uninstall"){ //restore changes made by addon } }; Can anyone advise me on how to do this so I can observe for changes and ensure that I remove the observer properly with the search object. Thanks
tagged with: observers
type: Question
tagged with: firefox
tagged with: javascript
has title: How to add observer for nsIBrowserSearchService
tagged with: firefox-addon
upvote count: 1
answer count: 1
tagged with: firefox-addon-sdk
favorite count: 0
accepted answer: http://stackoverflow.com/a/27013073
has answer: http://stackoverflow.com/a/27013073
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/42652093
has text: @ISFO, that's not true. There are several alternatives to WebMethod (which is no longer supported). [Web API](http://www.asp.net/web-api) is one of the easiest to use at the moment.
comment on: http://stackoverflow.com/a/27067421
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42727763
comment on: http://stackoverflow.com/a/27110804
type: Comment
type: AnswerComment
has text: This is perfect for what I was trying to achieve, thanks a bunch!
score: 0

http://stackoverflow.com/q/27091871
tagged with: facebook
type: AnsweredQuestion
downvote count: 2
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42690129
upvote count: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27092011
accepted answer: http://stackoverflow.com/a/27092011
favorite count: 0
has body: I need to show a facebook box with like and share options on my website. The box should pop-up 5 seconds after the visitor hit the page and should not disappear unless Like, Share or Close is pressed. Moreover, I would like to show the box only to those who did not like the page yet (if they are logged on facebook) and also only to those who, based on their IP addresses were not shown the box in the last 30 days. Thank you.
has title: How can I show a facebook box modal seconds after a visitor hits my site?

http://stackoverflow.com/comment/42665403
type: AnswerComment
score: 0
type: Comment
has text: What I meant to ask is if the two were interchangeable. I now understand that my statement could possibly return undefined rather than false.
comment on: http://stackoverflow.com/a/27077464

http://stackoverflow.com/q/27149931
has answer: http://stackoverflow.com/a/27150061
score: 0
has comment: http://stackoverflow.com/comment/42794404
accepted answer: http://stackoverflow.com/a/27150215
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27150076
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27150004
has title: Store Jquery object and access later?
upvote count: 1
has answer: http://stackoverflow.com/a/27150004
has answer: http://stackoverflow.com/a/27150215
downvote count: 1
type: Question
has body: I'm trying to store Jquery object into an array and access later to apply Jquery methods. Something like: var myArr = []; myArr.push($('div#id1')); myArr.push($('div#id2')); $(myArr).show(); This is not working
tagged with: javascript

http://stackoverflow.com/comment/42777936
type: Comment
has text: What do you get from var_dump($photos) done right before you try to output into JavaScript.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27140102

http://stackoverflow.com/comment/42538055
comment on: http://stackoverflow.com/a/27004323
has text: `async: false` is pretty much NEVER recommended as it just locks up the browser during the ajax call and is not a good design pattern for browser/javascript development.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42719544
has text: You can calculate the difference between the customers local time, and your time zone. Create a new time object and apply the difference, but !!! you are depending on the local time zone and that person's computer to be correct ... If done on the server using PHP to make the page you can have assuranced the time is correct
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27107587

http://stackoverflow.com/a/27070247
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/27069519
downvote count: 0
has body: I found this article by Zakas explaining it clearly, that it's just syntactic sugar, and at the end of the day Javascript will work the same way. Don't worry about having to learn classes or having to shift your programming styles, nothing changes. :)
score: 4

http://stackoverflow.com/a/27010333
type: Answer
has comment: http://stackoverflow.com/comment/111814860
has comment: http://stackoverflow.com/comment/42547991
has comment: http://stackoverflow.com/comment/42547961
score: 5
upvote count: 5
answers question: http://stackoverflow.com/q/27010306
has body: Try this: var match = ['eu', 'fr-CA', 'lt', 'sv', 'zh-CN', 'zh-TW'].filter(function(item){ return item === 'eu'; }); console.log(match); // an array of matches, only one item in this case Though your could should work fine. Perhaps you missed something else? http://jsfiddle.net/ydm7k6xm/
downvote count: 0

http://stackoverflow.com/comment/42768555
has text: UM, JavaScript is the wrong place to be doing the validation on it. Anyone can get around the clientside validation. Hopefully you do the check on the sever also.
score: 1
comment on: http://stackoverflow.com/q/27134614
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42921741
score: 0
has text: seeing any errors at all ?
type: Comment
comment on: http://stackoverflow.com/q/27092855
type: QuestionComment

http://stackoverflow.com/comment/42591079
type: Comment
has text: Thank you a lot TimeDead! It works like a charm, well not 100% but at least i know now how i can do it and tweak it! Besides that, i now know how to use the z-index and what it is good for:)
comment on: http://stackoverflow.com/a/27019898
type: AnswerComment
score: 0

http://stackoverflow.com/q/27099834
favorite count: 0
tagged with: angularjs
has title: ng-change delay, angularjs
score: 5
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/28643369
answer count: 4
has answer: http://stackoverflow.com/a/27100010
has answer: http://stackoverflow.com/a/27100082
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27100010
upvote count: 5
possible better answer: http://stackoverflow.com/a/27100082
tagged with: javascript
has answer: http://stackoverflow.com/a/27100006
has body: I'm developing an application with angularjs, which shows some textfields in the screen with numeric data. They look quite like this: &lt;input type="text" ng-model="value" ng-change="controller.functions.valueChanged(value)"&gt; The problem is everytime I write a number or I delete a number from the textfield, ng-change directive calls to the function. Is it possible to apply some king of delay to ng-change function?
downvote count: 0

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/27012939
tags question: http://stackoverflow.com/q/27001704
tags question: http://stackoverflow.com/q/26994424
tags question: http://stackoverflow.com/q/27007147
tags question: http://stackoverflow.com/q/27022221
tags question: http://stackoverflow.com/q/27100030
type: Tag
tags question: http://stackoverflow.com/q/26993699
tags question: http://stackoverflow.com/q/27108406

http://stackoverflow.com/a/26994178
type: Answer
has body: How about if you try removing those jquery.js in one.php. because the jquery is already included in the page once when you again include it in the page "one.php", I gets included again which causes JQuery Conflict
answers question: http://stackoverflow.com/q/26994112
score: 0

http://stackoverflow.com/a/27041601
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27041008
score: 1
has body: In the comments you said that the data returned from the Ajax call is Object { nama_perusahaan="1", alamat="1", telp=null, more...} and you are looping it like it is an array, in reality you are looping over the keys in the object. $.each(GetData, function(index, loaddata) { var Nama_perusahaan = loaddata.nama_perusahaan; var Alamat = loaddata.alamat; That is wrong! If you added a console.log(loaddata) line inside of the each, you would see &gt; "1" &gt; "1" &gt; null &gt; ERROR In order for your code to work, your JSON would need to look like [{ nama_perusahaan:"1", alamat:"1", telp:null}] To make your code work, get rid of the each and just reference the properties of the object. var loaddata = GetData; var Nama_perusahaan = loaddata.nama_perusahaan; var Alamat = loaddata.alamat;

http://stackoverflow.com/comment/42702059
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27098511
has text: Cruiser, thanks for the response mate. The issue here is if I do: JSON.parse("[{'SE':'click','MEM':[{'MEC':'NotificationManager','ME':'DismissNotification'}]}]"); I get Uncaught SyntaxError: Unexpected token '.
type: AnswerComment

http://stackoverflow.com/a/27072611
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27072578
answers question: http://stackoverflow.com/q/27072578
has body: I guess it is because it compare ascii values of chars and 3 had greater ascii value than 2. In string it compare char by char if 1 char is false it wont compare else
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42566366
has text: @CreateSean Do you have javascript errors? Are you sure the locale files are being loaded ?
score: 0
comment on: http://stackoverflow.com/q/26999206
type: QuestionComment
type: Comment

http://stackoverflow.com/a/27104583
has comment: http://stackoverflow.com/comment/42713176
has comment: http://stackoverflow.com/comment/42712998
score: 0
has comment: http://stackoverflow.com/comment/42714843
has comment: http://stackoverflow.com/comment/42712706
answers question: http://stackoverflow.com/q/27103056
has comment: http://stackoverflow.com/comment/42744557
type: Answer
has comment: http://stackoverflow.com/comment/42712881
has body: Let datatables take care of the ajax call: var oTable = $('#example').dataTable( { "bServerSide": true, "iDeferLoading": 1, "sAjaxSource": "/project/getDetails", "fnServerParams": function (aoData) { aoData.push({ "name": "fromDate", "value": $('#from').val() }); aoData.push({ "name": "toDate", "value": $('#to').val() }); }, "bProcessing": true, "aoColumns": [ { "sName": "Loan_ID", "bSearchable": false, "bSortable": false }, { "sName": "Date" }, { "sName": "Loan_Amount" }, { "sName": "Loan_Type" } ] } ); $('#recv').click(function(){ oTable.fnDraw(); }); Points to note: fnServerParams this passes your start &amp; end date to the getDetails function iDeferLoading - prevent table population on page load fnDraw() populates the datatable from your click event
has comment: http://stackoverflow.com/comment/42716237
has comment: http://stackoverflow.com/comment/42715903
has comment: http://stackoverflow.com/comment/42713078

http://stackoverflow.com/q/27081150
tagged with: angular-ui-router
has body: I'm trying to make two copies of the same AngularJS application co-exist peacefully on the same page at the same time while having them be able to operate, route, independently. I've gotten the two applications to work at the same time, on the same page using a combination of angular.bootstrap and giving them individual application names. However, when a link is clicked in one application they both route to the same place. app.js function bootstrap(id) { 'use strict'; /* App Module */ var viewName = id + 'view'; var $urlRouterProviderRef = null; var $stateProviderRef = null; var app = angular.module(id, [ 'core', 'widgets', 'directives', /* * Feature Areas */ 'layout', 'barChartExample', 'dataTableExample' ]); app .config(config); var states = [{ "name": "barChartExample", "url": "/", "views": [{ 'name': viewName, 'templateUrl': '/angularjs-boilerplate-portlet/app//barchart-example/barchart-example.html', 'controller': 'BarChartExampleCtrlAs', 'controllerAs': 'vm' }] }, { "name": "dataTableExample", "url": "/dataTableExample", "views": [{ 'name': viewName, 'templateUrl': '/angularjs-boilerplate-portlet/app/datatable-example/datatable-example.html', 'controller': 'DataTableExampleCtrlAs', 'controllerAs': 'vm' }] }]; config.$inject = ['$locationProvider', '$urlRouterProvider', '$stateProvider']; function config($locationProvider, $urlRouterProvider, $stateProvider) { $urlRouterProviderRef = $urlRouterProvider; $locationProvider.html5Mode(false); $stateProviderRef = $stateProvider; } app.run(['$state', function($state) { angular.forEach(states, function(value, key) { var state = { "url": value.url, "views": {} }; angular.forEach(value.views, function(view) { state.views[view.name] = { templateUrl: view.templateUrl, }; }); $stateProviderRef.state(value.name, state); }); $state.go("barChartExample"); } ]); angular.bootstrap(document.getElementById(id), [id]); } index.html topnav.html {{vm.title}} Bar Chart Example DataTable Example
type: Question
has comment: http://stackoverflow.com/comment/42696759
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42679891
has comment: http://stackoverflow.com/comment/42677682
has comment: http://stackoverflow.com/comment/42722790
has title: How do I make two copies of the same AngularJS application navigate independently using UI.Router?
tagged with: angularjs
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42706491
type: AnswerComment
comment on: http://stackoverflow.com/a/27101064
has text: Where i will give `target="_blank"`
type: Comment
score: 0

http://stackoverflow.com/a/27108165
accepted answer of: http://stackoverflow.com/q/27108056
answers question: http://stackoverflow.com/q/27108056
has body: The JSONP data format is a JavaScript program consisting of a function call (to a function defined in the URL) with the requested data as the argument. You are getting the error because you are making a JSONP request and getting XML. Change the server so it returns JSONP or change the JavaScript so it expects XML (and also change the server so it gives your site permission to read the XML using CORS).
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42719632

http://stackoverflow.com/comment/42723763
comment on: http://stackoverflow.com/q/27110144
has text: is your code in a .html page or in a razor .cshtml? and what does the link actually look like in the view source rendered in the browser?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42765482
type: AnswerComment
type: Comment
has text: Yes found the mistake. Firefox appends a %22 to the url it's a double quote. Try this: http://jsfiddle.net/KunZ4/538/
comment on: http://stackoverflow.com/a/27132747
score: 0

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/27119307
tags question: http://stackoverflow.com/q/27094680

http://stackoverflow.com/comment/137287364
type: AnswerComment
has text: I ran into an infinite loop with this code where if the requested image URL returns a non-success code and invalid image data (404, 401, etc.) the `createObjectURL()` method will set the image to the text of the error message, causing the `onerror` function to trigger again and again. I fixed it using a fallback image url and a little bit of error checking: ` r.ok??r.blob()).then(d=>d?this.src=window.URL.createObjectURL(d):'fallback-image.png');" />`
type: Comment
comment on: http://stackoverflow.com/a/60727290
score: 2

http://stackoverflow.com/a/27088383
score: 0
answers question: http://stackoverflow.com/q/27088283
type: Answer
has body: I'd do it slightly differently Add both markup to the page, and show/hide as approproate: hello This is my news page I have assumed you have JQuery since it is tagged

http://stackoverflow.com/a/27032611
downvote count: 0
answers question: http://stackoverflow.com/q/27032597
has comment: http://stackoverflow.com/comment/42586830
has comment: http://stackoverflow.com/comment/42586808
has comment: http://stackoverflow.com/comment/42586873
has body: you need to pass the same function to remove as add. the easy way to do that is to give the function a name and pass the name to removeEventListener(): document.addEventListener("contextmenu", function me(e){ alert("Please remember this is someone's art! Give credit where it is deserved!"); document.removeEventListener("contextmenu", me, false); }, false); see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.removeEventListener for a good overview obligatory fiddle: http://jsfiddle.net/w1kzLkoL/ tested in chrome, firefox, and IE10
type: AcceptedAnswer
upvote count: 6
type: Answer
score: 6
accepted answer of: http://stackoverflow.com/q/27032597

http://stackoverflow.com/comment/42550540
type: Comment
type: QuestionComment
has text: @SLaks, now am able to save webpage and retive sucess. but inside webpage some of javascript file, images are there. how to get those files...
comment on: http://stackoverflow.com/q/26999202
score: 0

http://stackoverflow.com/comment/42621202
comment on: http://stackoverflow.com/a/27051335
score: 0
type: Comment
has text: actually I don't need the original text at all. I just entered it to create the element. What I really need is the changed texts per language
type: AnswerComment

http://stackoverflow.com/comment/42556180
comment on: http://stackoverflow.com/a/27015271
type: AnswerComment
type: Comment
score: 0
has text: @alisa: It depends on what you want it to do. If your goal is to have the `select` control which of those divs is shown, hiding all others, I'd put a `value` on the option, use `$(this).val()` in the callback to get it, and either use that as an `id` on the `.bigandsmall` divs or a `data-xyz` attribute. Then I'd hide all `.bigandsmall` that weren't a match for the value, and show the one that was.

http://stackoverflow.com/a/27147183
has comment: http://stackoverflow.com/comment/42789980
score: 1
has body: The only way to do this in a browser is eval eval(ui.item.value); Node supports more advanced things like vm.runInNewContext(value,{/* context */}). But beware of eval, it is dangerous. https://www.google.com/?q=eval+is+evil
has comment: http://stackoverflow.com/comment/42790077
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27146961
answers question: http://stackoverflow.com/q/27146961
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42654955
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27058263
has text: the localhost is fine, because its calling on my server-side & returning correct results in success of ajax.. what kind of line you are saying ?,, it took long time, but still i am hoping to solve this issue, but for now i did this in this way http://my.jetscreenshot.com/demo/20141121-iuaa-98kb.jpg instead of showing status of each images on page load ... but it could be better if your answer worked for me.
type: Comment

http://stackoverflow.com/comment/42761091
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27128421
has text: Yes I did not include the above script and when I added, it worked, but only in jsfiddle. The graph still does not show up in my file...
score: 0

http://stackoverflow.com/a/27111837
answers question: http://stackoverflow.com/q/27102978
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Maintainability is a function of a lot of different parameters. A maintainability around 70 is usually perfectly acceptable. ~70+ is good, 30-70 is in a warning zone, and under 30 is usually a problem. If you want to improve your score, try to move some of those css properties into css classes with animations. You also rely on jquery simply to do the selections in the init and select a custom container in the search. The initial selections could be passed in as parameters, and the support for a custom class seems like it's a bit of a hack that was probably added in to support something after the fact (why? because of the function name animateSearch and then having support for any arbitrary class that may or may not have anything to do with search). Both those changes would improve "maintainability" but, again, ~70 is not necessarily a problem. The scores are only important as they relate to the other code in an application and the comfort level of the developers. That said, this code is simple but could easily get out of hand as one off solutions are added. A generic animation solution would be one abstraction. Using css animations and simply adding classes by convention or some app-level framework would be another; eg some backbone component, angular directive or web component that managed their own states based off emptiness or otherwise. Those individual implementations would also very likely be just as "maintainable," score-wise, but it's limiting the scope and potential future creep that is important. If a file never changes and never needs to be understood after being written then maintainability is irrelevant. If a file will undergo many changes or needs to be fully understood in order to address all future code, then maintainability is a priority.
accepted answer of: http://stackoverflow.com/q/27102978
score: 4

http://stackoverflow.com/comment/42615248
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27048659
has text: Hi @ptd. It's false.
score: 0

http://stackoverflow.com/q/27102674
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27102895
tagged with: css
has comment: http://stackoverflow.com/comment/42709264
favorite count: 0
has comment: http://stackoverflow.com/comment/42709463
possible better answer: http://stackoverflow.com/a/27102736
has body: I'm trying to get the value that is stored inside hidden input field. 'onchange' or 'onfocusout' events I am invoking JavaScript function, but I am unable to get the right value inside 'id' variable. This is my HTML: Client * Project * Category * Description Time * Overtime Choose client Client 1 Client 2 Choose project Project 1 Project 2 Choose category Front-End Development Design And this is my script for now: What is a proper way of using parent() function in jquery? I was reading the documentation and as I've understood parent() finds only parent div tag. Is there some other function that can work with tables and find the hidden input that is in the same div tag as table is?
has answer: http://stackoverflow.com/a/27102736
downvote count: 1
has comment: http://stackoverflow.com/comment/42709381
type: AnsweredQuestion
has title: Get value of hidden input using jquery parent function
score: -1
has answer: http://stackoverflow.com/a/27102895
type: Question
answer count: 2
upvote count: 0

http://stackoverflow.com/a/27004454
answers question: http://stackoverflow.com/q/27004198
has body: This one seems to do the trick: ^(((\(012\))\d|2)\d{6}|2\d{2}(-\d{2}){2})$ It's like this: ^ and $ are start and end... The regular expression is like this ^( x | y )$ where x is ((\(012\))\d|2)\d{6}, this will match (012)d or a 2 with ((\(012\))\d|2) and 6 digits with \d{6} and where y is 2\d{2}(-\d{2}){2}, for a 2 followed by 2 digits \d{2}, and followed by two times -dd (-\d{2}){2}
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42538890
upvote count: 1
has comment: http://stackoverflow.com/comment/42538724
has comment: http://stackoverflow.com/comment/42538862
score: 1
accepted answer of: http://stackoverflow.com/q/27004198
has comment: http://stackoverflow.com/comment/42538586

http://stackoverflow.com/q/27060704
tagged with: colorbox
score: 0
answer count: 1
tagged with: asp.net
has answer: http://stackoverflow.com/a/27061408
has title: Prevent jquery colorbox closing on postback
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27061408
type: Question
tagged with: c#
tagged with: javascript
has body: I am using jquery colorbox to call an external page from codebehind like this String URL = "Default.aspx"; ScriptManager.RegisterStartupScript(this, this.GetType(), "openWindow", "$.colorbox({ href: '" + URL + "', closeButton: false, overlayClose: false });", true); Below is html of Default.aspx &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:Button ID="btn" runat="server" Text="Submit" OnClick="btn_Click" /&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; Currently nothing is written on button click event, but as soon as I submit the button, the model window is getting closed. How do I prevent this? I want to be able to do certain calculation codebehind and then close the modelwindow if everything is fine. Thanks, Vinay
tagged with: jquery

http://stackoverflow.com/a/27029694
has body: I struggled with JavaScript's dynamically-typed nature for a long time too. It turned out to be quite liberating when I finally made peace with it. Here's the mantra that has worked for me: Program correctness is the most important thing. If I am confident my program exhibits the correct behavior, either my types are correct, or any existing typing errors don't effect program behavior. This shift in thinking puts more of an emphasis on testing -- which is a good thing. If your tests are well-written, and comprehensive, then type errors will be caught. I also tend to employ much more of a functional paradigm in my JavaScript coding: if you are not mutating state, strong typing has less meaning. Of course if you really feel that strong typing is important, there is always TypeScript, which compiles directly to JavaScript and is, by all accounts, an excellent language.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27029570
upvote count: 1
type: Answer

http://stackoverflow.com/comment/42676153
type: Comment
has text: Thanks, but it just load the results.php page instead of load it inside the
type: AnswerComment
comment on: http://stackoverflow.com/a/27083475
score: 0

http://stackoverflow.com/comment/42732024
has text: I just added the jade, and its running from an express application where I have to call my REST service to print my data in a jade website
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27114454

http://stackoverflow.com/q/27094981
has answer: http://stackoverflow.com/a/27095050
has comment: http://stackoverflow.com/comment/42695825
type: Question
has body: This works in IE Mozilla Chrome etc. This works not in Safari. foo is value from radio button by name alert(document.form.foo.value); The Value in IE Mozilla Chrome is correct. In Safari is the Value "undefined".
score: -2
tagged with: javascript
has title: Get radio value not working in safari, but in mozilla
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/42696092
favorite count: 0
has comment: http://stackoverflow.com/comment/42695789
accepted answer: http://stackoverflow.com/a/27095050
tagged with: safari
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/q/27125189
has title: Floated divs with absolute images not clearing
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/27125289
has answer: http://stackoverflow.com/a/27125622
has comment: http://stackoverflow.com/comment/42750408
score: -1
type: Question
has comment: http://stackoverflow.com/comment/42750531
upvote count: 0
has answer: http://stackoverflow.com/a/27125310
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27125785
has body: In this link, you see a page I am working on. When you change your window size, you will see that it is responsive. However, the three rotating image boxes that are floated, with height auto and a clearing div under them, are not clearing. The aim is to have the div containing these rotating images, and 20px padding on both top and bottom of it. My css currently: .rightbox{width:100%; clear:both; float:none; height:auto; min-height:inherit;} #rotating-item-wrapper, #rotating-item-wrapper2, #rotating-item-wrapper3 {margin: 10px 20px 0px; float: left; left:0; transform:none; height:auto;} less than 576px: #rotating-item-wrapper, #rotating-item-wrapper2, #rotating-item-wrapper3 {margin: 5px 10px 0px; float: left; left:0; transform:none; width:26%;} .rotating-item, .rotating-item2, .rotating-item3{width:100%; height:auto;}
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4

http://stackoverflow.com/comment/42730392
comment on: http://stackoverflow.com/a/27053697
type: AnswerComment
has text: That works perfectly for me. Literally the only thing I changed in your code was the location of the jquery and multifile libraries. Try changing your jquery library to http://code.jquery.com/jquery-1.8.0.min.js and see if it works. Otherwise you can put copies of the javascript libraries in the data/domino/html directory on your Lotus Domino Server, and reference them as http://servername/domino/html/file.name.js Or you could put them in the 'Style Sheets' section of your notes application and reference them in your code like http://servername/filename.nsf/stylesheetname.css
score: 0
type: Comment

http://stackoverflow.com/comment/42593128
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27036380
score: 3
has text: no, `setTimout` executes once. did you mean to change it for a `setInterval`?

http://stackoverflow.com/a/28959656
has body: I also encountered the same issue but with wkhtmltopdf 0.11. I found out that these pre 0.12 versions does not support the --viewport-size parameter, the application will not have a proper "window" width. Also notice that none of your HTML elements have an explicit width value set. This will result in a very thin "virtual window" where the application renders your HTML. And this will result in having the inner text split in multiple lines, with the node having very high height value. What i could do to fix this issue is to explicitly set the desired width of one of the html elements. (the widest one so the wkhtmltopdf could use that as "window" width)
score: 0
answers question: http://stackoverflow.com/q/27098360
type: Answer

http://stackoverflow.com/q/27127930
has answer: http://stackoverflow.com/a/27127968
accepted answer: http://stackoverflow.com/a/27127968
possible better answer: http://stackoverflow.com/a/27128003
type: AnsweredQuestion
has title: Set attribute on multiple selectors
has answer: http://stackoverflow.com/a/27128003
type: Question
tagged with: javascript
score: 0
answer count: 2
has body: I'm trying the following, which doesn't work, but am wondering if there is something similar? Basically, I'm trying to set the same attribute on multiple elements: document.querySelectorAll("#id1, #id2, #id3").setAttribute('onclick','return false;'); I'm using vanilla Javascript, no library.

http://stackoverflow.com/comment/42745555
type: AnswerComment
has text: Thanks @twain... I think this should do :)
type: Comment
comment on: http://stackoverflow.com/a/27119995
score: 0

http://stackoverflow.com/comment/42700315
has text: I didn't define TackleController at all. My point in showing the errors was that they do not indicate at which line I tried to reference an undefined variable. That's what I want to get, the actual line number that an error is at. I don't care about this specific error because I already know why it got thrown.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27097384

http://stackoverflow.com/comment/42744847
type: Comment
has text: @AquaQuartz: I have added a simple enough example.
type: QuestionComment
comment on: http://stackoverflow.com/q/27120829
score: 0

http://stackoverflow.com/comment/42737866
type: Comment
comment on: http://stackoverflow.com/a/27117822
score: 0
type: AnswerComment
has text: glad to help, dont forget to mark an answer as accepted so future visitors can find the solution that helped you

http://stackoverflow.com/q/27084744
has answer: http://stackoverflow.com/a/27092655
answer count: 1
has title: Put dates into a calendar using Javascript and HTML Table
tagged with: jquery
has comment: http://stackoverflow.com/comment/50415842
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: calendar
has body: So I (again) am starting web design and decided to try my luck with a very complex website for my father's business. He teaches baseball, and so I'm trying to make a calendar. I finally got it looking exactly how I like using HTML Tables, so now I want to put dates into the calendar but don't want to delete the table since it took so long to perfect. So the ways I was thinking about doing this was giving a value to all the cells with the first sunday being set to 1 and so on and so forth until I hit 42, but don't know if you could give values to anything other than form fields/objects. I tried using divs and it just got too confusing and impossible for me at my current skill level to get the divs to fall in line how I wanted them to. I plan on having the calendar display openings based off of the admin view of the calendar. I just can't logic my way through it, so how would you guys do it. I want the day values to appear in the proper position, that I can do on my own. I just need the initial month code and then I can go from there. Here's the JSFiddle link: http://jsfiddle.net/rccrf/m9kny41m/ HTML <image id="ball" src="ball.png" /> John Martin Baseball Schedule <image id="john" src="John4.png"> Home Professional History Philosophy Schedule Lessons Driving Directions Contact Me November Sunday Monday Tuesday Wednesday Thursday Friday Saturday Disclaimer!!! &copy 2014 RCCRF: Function
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42696756
comment on: http://stackoverflow.com/q/27093858
has text: I understand your comment. It is not really a duplicate, but it is related. When I published the other question I thought it was related to jQuery-tmpl. As I wasn't receiving any feedback I rewrited it with the new approach. I understand this shouldn't be done.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42775787
has text: Changed the child theme back to the original parent... file still not firing, so actually it's something to do with the theme update which I applied I think. Could it be a js conflict?
type: AnswerComment
comment on: http://stackoverflow.com/a/27138314
score: 0
type: Comment

http://stackoverflow.com/q/27076886
has comment: http://stackoverflow.com/comment/42664928
has title: Creating dynamically large table using JavaScript
type: Question
accepted answer: http://stackoverflow.com/a/27077056
answer count: 1
has comment: http://stackoverflow.com/comment/42664609
score: 0
tagged with: loops
has body: I'm trying to create dynamically a table using JavaScript. Here is the code I'm using (or here http://liveweave.com/mqG5iT): function Process(){ CreatTable(['First Name', 'Last Name', 'Email']); } function CreatTable(data) { var checkbox; var table; var thead; var tr; var th; var tbody; tablearea = document.getElementById('ShowDataID'); table = document.createElement('table'); table.id = "ContactsTable"; thead = document.createElement('thead'); tr = document.createElement('tr'); tbody = document.createElement('tbody'); //create columns input checkbox column checkbox = CreateHTMLElement("chkBoxAllEmails", "chkBoxAllEmails", "SelectAllEmails()", "checkbox", "false"); th = document.createElement('th'); th.appendChild(checkbox); tr.appendChild(th); thead.appendChild(tr); //create columns FirstName,LastName,Emails for (var i = 0; i &lt; data.length; i++) { var headerTxt = document.createTextNode(data[i]); th = document.createElement('th'); th.appendChild(headerTxt); tr.appendChild(th); thead.appendChild(tr); } table.appendChild(thead); //create rows and addind to table for (var i = 0; i &lt; 2000; i++) { tr = document.createElement('tr'); checkbox = CreateHTMLElement("11", "11", "11", "checkbox", "11"); tr.appendChild(document.createElement('td')); tr.appendChild(document.createElement('td')); tr.appendChild(document.createElement('td')); tr.appendChild(document.createElement('td')); tr.cells[0].appendChild(checkbox); tr.cells[1].appendChild(document.createTextNode('John'+i.toString())); tr.cells[2].appendChild(document.createTextNode('McDowell')); tr.cells[3].appendChild(document.createTextNode('ddd@gmail.com')); tbody.appendChild(tr); table.appendChild(tbody); } document.getElementById("TablePagingArea").appendChild(table); //return table; } function CreateHTMLElement(id, name, onclick, type, value) { var HTMLElement = document.createElement('input'); HTMLElement.id = id; HTMLElement.name = name; HTMLElement.onclick = onclick; HTMLElement.type = type; HTMLElement.value…
has comment: http://stackoverflow.com/comment/42664642
tagged with: javascript
has answer: http://stackoverflow.com/a/27077056
type: AnsweredQuestion

http://stackoverflow.com/comment/42688255
has text: It is your job to _make_ things happen – that’s what the `popstate` event is for, so that you you know when the user uses the back/forward buttons, and your script can react to it, by displaying the appropriate content again.
type: Comment
comment on: http://stackoverflow.com/q/27090692
type: QuestionComment
score: 1

http://stackoverflow.com/comment/42655108
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27049413
has text: @minseong, okay, glad you figured it out. You should enter your answer in as a second answer, and then select your own answer as the right one so that it doesn't remain "unanswered." Then, the next person that comes along trying to fix the same problem will be able to learn from your solution.
score: 0

http://stackoverflow.com/comment/42654246
comment on: http://stackoverflow.com/a/27070759
score: 1
type: AnswerComment
type: Comment
has text: @JeremyW - sure, there are plenty of ways, see plbsam's answer below for a raw JS version. But if you're using node already, as the OP's tags indicated, this is the easy way.

http://stackoverflow.com/q/27024634
has comment: http://stackoverflow.com/comment/42573458
type: UnansweredQuestion
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/42575353
has comment: http://stackoverflow.com/comment/42575721
has comment: http://stackoverflow.com/comment/42575170
type: Question
has title: xmlhttp.request fails to open local file
has comment: http://stackoverflow.com/comment/42574732
has answer: http://stackoverflow.com/a/27026672
tagged with: javascript
has comment: http://stackoverflow.com/comment/42574329
has comment: http://stackoverflow.com/comment/42575524
score: 0
answer count: 1
has body: The following javascript used to work but now does not. xmlhttp.status is 0. The file "SBL_Stats.htm" resides in the same directory as the javascript. I'm using firefox. Can anyone help me out? var filePath = "SBL_Stats.htm"; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); Log("Firefox"); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); Log("IE6"); } xmlhttp.overrideMimeType('text/plain'); // don't scan for html xmlhttp.open("GET",filePath,false); // false means sync request xmlhttp.send(null); if (xmlhttp.status != 200) { Log("get_SBL_Stats_Data failed: " + xmlhttp.status); return ""; }

http://stackoverflow.com/q/27076200
favorite count: 0
has answer: http://stackoverflow.com/a/36873332
has body: I'm trying to make a script, saved as an application bundle, that handle custom URL schemes. I know how to handle it in Applescript: on open location theURLtext do things here end open location But I don't know how to do it with javascript, there's not much documentation about JS for automation yet. Thank you and excuse my bad english.
type: UnansweredQuestion
upvote count: 1
tagged with: applescript
has title: Javascript for Automation custom URL in Yosemite
score: 1
tagged with: url-scheme
has answer: http://stackoverflow.com/a/27084323
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: javascript-automation
tagged with: osx-yosemite

http://stackoverflow.com/a/27099969
accepted answer of: http://stackoverflow.com/q/27091678
type: Answer
answers question: http://stackoverflow.com/q/27091678
score: 2
has body: In order to have achieve this structure you will need to pull your second div to right for xs,sm and to left for md.bootstrap-pull-left-for-small-devices This link will help you to do so.. So, html will be and CSS will be @media (max-width: 767px) { .pull-xs-right { float: right; } } @media (min-width: 768px) and (max-width: 991px) { .pull-sm-right { float: right; } } @media (min-width: 992px) and (max-width: 1199px) { .pull-md-right { float: right; } }
downvote count: 0
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/47582978
comment on: http://stackoverflow.com/a/29688727
has text: The first is running chrome with the `--nolazy` command line flag (you must choose all open chrome windows for this to take effect). It stops v8 from compiling your code, and the issue is possibly that the line numbers that compiled code spits out doesn't get transformed by the source map.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/56666688
has comment: http://stackoverflow.com/comment/119085212
upvote count: 9
score: 9
downvote count: 0
has body: 100% working // for andriod if(navigator.userAgent.match(/Android/i)){ window.open('sms://1900/?body=encodeURIComponent('sms body......'),'_blank') } // for IOS if(navigator.userAgent.match(/iPhone/i)){ window.open('sms://1900/&amp;body=encodeURIComponent('sms body......'),'_blank') } replace 1900 with the number you want to send message Body = sms body credit goes to :- https://codepen.io/gil--/pen/KMaRmp
type: Answer
answers question: http://stackoverflow.com/q/26993504

http://stackoverflow.com/comment/42737373
score: 0
comment on: http://stackoverflow.com/a/27117331
type: AnswerComment
has text: Declaring a controller by using .Controller won't work, .controller will. Also, there is absolutely no need to assign the application instance to a variable, it's even discouraged because of scopepolution. Instanciating an application like angular.module('myApp') and afterwards hooking up your controllers, directives and such like: angular.module('myApp').controller('myController') is perfectly fine and even better than declaring everything in scope.
type: Comment

http://stackoverflow.com/comment/42722160
score: 0
has text: this should work regardless of the file being included or not - having a javascript library configured should be enough. What JQuery version do you work with? Looks similar to http://youtrack.jetbrains.com/issue/WEB-10908. I can suggest using JQuery Typescript community stubs as a workaround: in Settings/javaScript/Libraries, press Download..., select 'Typescript community stubs' from dropdown, choose 'jquery' there. Note that stubs will only be used for completion, to get your code working in browser you still need to reference actual jquery file from your PHP
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27082238

design-patterns
tags question: http://stackoverflow.com/q/27099028
tags question: http://stackoverflow.com/q/27105092
tags question: http://stackoverflow.com/q/27133555
tag name: design-patterns
tags question: http://stackoverflow.com/q/27121406
type: Tag
tags question: http://stackoverflow.com/q/27055183
tags question: http://stackoverflow.com/q/27011043
tags question: http://stackoverflow.com/q/27137632
tags question: http://stackoverflow.com/q/27045430

http://stackoverflow.com/comment/42792852
type: Comment
comment on: http://stackoverflow.com/a/27044421
has text: hi melc.if u have a time please see my stackoverflow question http://stackoverflow.com/questions/27148706/second-dropdown-not-calling-everytime-based-on-first-drop-down
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42710512
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27102746
has text: What makes you think {} is an expression, or that this is just a single statement? An opening brace is usually interpreted as the start of a block.

http://stackoverflow.com/comment/42766064
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27133645
has text: @FelixKling I've never liked the term "associative array" anyway, since it is easily confused by some with a normal array.
score: 0

http://stackoverflow.com/q/27020042
accepted answer: http://stackoverflow.com/a/27020246
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42565137
has body: I'm implementing a sort function and came across the following: '49' &gt; '5' // false '49' &gt; '4' // true new String(49).localeCompare('4') // 1 new String(49).localeCompare('5') // -1 Expected behaviour is obviously that 49 > 4 or 5 should be true. Is there any way to solve this without converting the strings to numbers?
has answer: http://stackoverflow.com/a/27020246
type: AnsweredQuestion
has title: Comparing numbers of type string
tagged with: javascript
has comment: http://stackoverflow.com/comment/42565003
has comment: http://stackoverflow.com/comment/42564975
linked to: http://stackoverflow.com/q/7087811
type: Question
has comment: http://stackoverflow.com/comment/42564831

http://stackoverflow.com/a/27039466
answers question: http://stackoverflow.com/q/27039277
has body: In your backup.js file you load jquery from the server if it does not yet exist. Loading something from the server through an Asynchronous call means it won't stop the page rendering, so what happens is: The page starts rendering, it comes to backup.js, starts loading jquery from the server, keeps rendering the page while loading jquery, goes all the way to the bottom and then finds $(".link");. In this line of code the symbol "$" means jQuery (I want to use jquery for this part of code), but it might happen that jquery is not yet completely loaded, and so the program breaks and tells you ReferenceError: $ is not defined (or in human: you're trying to use $ but it doesn't exist). To fix this, you can create a function that gets called when jquery has loaded: if(typeof jQuery=='undefined') { var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= 'https://code.jquery.com/jquery-1.11.1.js'; script.onload = function() { runAfterjQueryLoad(); } head.appendChild(script); console.log('jquery not found'); } else { console.log('jquery found'); } function runAfterjQueryLoad() { var find = $('.link'); console.log(find); } Working fiddle: http://jsfiddle.net/aj803z7u/ You're right about the page rendering top-down, but always be careful for asynchronous calls (also know as ajax, in case you want to search for more information on the web). The best way of learning is by doing. Think of a page you want to create and try to do it, searching for tutorials for each single small step (you can always come here on SO and ask questions) .
score: 1
accepted answer of: http://stackoverflow.com/q/27039277
has comment: http://stackoverflow.com/comment/42598830
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42598628
type: Answer
has comment: http://stackoverflow.com/comment/42599030
upvote count: 1
has comment: http://stackoverflow.com/comment/42599679

http://stackoverflow.com/comment/42750323
type: Comment
comment on: http://stackoverflow.com/q/27125080
score: 0
type: QuestionComment
has text: It's unclear what the problem is or why you'd even need a regular expression for this.

http://stackoverflow.com/comment/42770458
type: Comment
type: QuestionComment
has text: Looking at that code block, I'd recommend reading up on the [async library](https://github.com/caolan/async). Beyond that, the fact that you aren't nesting documents somewhat defeats the point of Mongo. The idea isn't that it just fits in with "the node way", the idea is to make the data more accessible to prevent making multiple queries for reading data. Nesting documents (or minimized document schemas) allows you to do single database queries instead of the 3 that you're doing.
score: 0
comment on: http://stackoverflow.com/q/27134592

http://stackoverflow.com/comment/76542875
type: Comment
comment on: http://stackoverflow.com/a/27152246
type: AnswerComment
has text: @RohnAdams not as far as I know - but why would you do that?
score: 0

http://stackoverflow.com/comment/42619933
type: QuestionComment
comment on: http://stackoverflow.com/q/27047767
has text: It may be useful: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
score: 0
type: Comment

http://stackoverflow.com/q/27136985
answer count: 1
has answer: http://stackoverflow.com/a/27137070
accepted answer: http://stackoverflow.com/a/27137070
tagged with: node.js
type: AnsweredQuestion
has body: i'm using GET method with a parameter(:slug) to show my post in my website ; app.get('/:slug', function(req, res) { var slug = req.param("slug"); //other codes... } if i click "domain.com/pink-car" , app.get('/:slug' works and response to "pink car" post from mongodb but i also have other GET methods like /login /admin , if i enter these ,app.get('/:slug' fired again. So , i think ,if i change my get method to like this; app.get('/posts/:slug', function(req, res) { } In this time , my url will be "domain.com/posts/pink-car" , but for the SEO , i want to reWrite this url to "domain.com/pink-car" . What is your suggestions , thank you . Versions: Node.js - 0.10.33 , Express - 5.0.0-alpha.1
type: Question
tagged with: javascript
tagged with: express
score: 0
has title: Rewrite URL in Node.js and Express Application

http://stackoverflow.com/comment/42700261
has text: Aha! We're already assigning ids to our related models, but we're doing it in the prototype, not in defaults. Will update our code to use defaults so the id gets applied on the instance itself. Thanks!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27097251
type: Comment

http://stackoverflow.com/q/27097203
type: Question
score: 5
has body: I've tried the usual things to change the broken link icons (see below), but they don't seem to be working in my Ember app. Currently, the model fetches the data from an external API. One of the pieces of data is a link url. This link url (product_link) is inserted into the template, specifically at this point: &lt;img {{bind-attr src=product_link}} /&gt; This is part of a handlebars {{#each}} loop. Several of the links refer to dead URLs and I don't have a way to fix the URLs themselves at this moment. I'd like to replace the generic broken icon link with one of my own. How can I do this? Things I've tried: &lt;img {{bind-attr src=favorite.product_image onError="this.onerror=null;this.src='/img/error.png';"}} /&gt; //still shows the standard broken image icon -- $('img').error(function(){ $(this).attr('src', 'img/error.png'); }); //nothing happens if I include this in a called javascript file Any suggestions?
has comment: http://stackoverflow.com/comment/42712105
tagged with: javascript
tagged with: image
possible better answer: http://stackoverflow.com/a/29565185
answer count: 3
has answer: http://stackoverflow.com/a/29565185
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/27107157
accepted answer: http://stackoverflow.com/a/27107157
tagged with: ember.js
has answer: http://stackoverflow.com/a/36731314
type: AnsweredQuestion
has title: Change broken link icon in Ember
downvote count: 0

http://stackoverflow.com/comment/42612708
comment on: http://stackoverflow.com/a/27046992
score: 0
type: AnswerComment
has text: @LeroyJenkins it works much better for this site if you set up your tests/demos on a site like CodePen, jsbin, or jsfiddle.
type: Comment

http://stackoverflow.com/q/27093209
has title: React Router 0.11.1 routes all requests to Home
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42693131
answer count: 0
type: UnansweredQuestion
has body: I am having the problem that React Router 0.11.1 routes all paths to my default handler, i.e. Home, even though I have a specific handler for the /about path: var routes = ( &lt;Route path="/" handler={App}&gt; &lt;DefaultRoute name="home" handler={Home}/&gt; &lt;Route name="about" handler={About}/&gt; &lt;/Route&gt; ) ReactRouter.run(routes, function (Handler) { React.render(&lt;Handler/&gt;, document.body) }) Also, the router seems to attach #/ automatically to the end of the URL, which is confusing. Can someone please tell me how to fix my routing, so that I can access the About handler? See my full project at GitHub.
tagged with: react-router
type: Question
has comment: http://stackoverflow.com/comment/42693490
tagged with: reactjs

http://stackoverflow.com/comment/42783354
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27139457
has text: Can you please make it clearer of what you want to make the screenshot (I think the icon?), where should it go (you say a folder, but on what system) and how exactly the communication should be? It doesn't help when you use signal/message/request/corsrequest for the same thing. Just stick to one of them and edit your question. Also, do you want to take image screenshots (png, jpg) or pdf?
score: 0

http://stackoverflow.com/a/27126889
has body: The first problem is that you only calculated the window's width once (on page load). It isn't updated, once you resized. That's why the whole resize logic doesn't have any effect. Another mistake you made was calling the removePin method on the controller. It's a scene method. Lastly your logic would create a new scene every time instead of updating the existing one. So here's how you properly achieve your desired logic: var controller = new ScrollMagic(); var sidebar = new ScrollScene({triggerHook: 0}) .addTo(controller); // page load if($(window).width() &gt;= 500) { sidebar.setPin("#sidebar-pin"); } // resize $(window).on('resize',function(){ var w = $(window).width(); if(w &lt; 500) { sidebar.removePin("#sidebar-pin",true); } else if (w &gt;= 640) { sidebar.setPin("#sidebar-pin"); } }); And here's your fiddle: http://jsfiddle.net/jxoewzoo/1/ hope this helps, J
upvote count: 1
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/27052645

http://stackoverflow.com/comment/42650895
type: QuestionComment
has text: Thank-you for your consideration in wanting to follow the rules. In this case, it's best for me to just mark this as a "duplicate" since you've confirmed what I said originally. In the future, you could also post an answer yourself and "accept" it.
comment on: http://stackoverflow.com/q/27024772
score: 0
type: Comment

http://stackoverflow.com/comment/42687996
has text: What is ultimate goal? Sounds like you might want to use FormData API which will give you access to files themselves
comment on: http://stackoverflow.com/q/27090477
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42643265
comment on: http://stackoverflow.com/a/27064385
score: 0
type: Comment
has text: Have you declared `unselectAllNodes` **before** using it in the `on` function?
type: AnswerComment

http://stackoverflow.com/q/27109048
has title: Advice on integrating Closure Compiler to build process
tagged with: continuous-integration
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: google-closure
has answer: http://stackoverflow.com/a/29141604
upvote count: 2
tagged with: jenkins
score: 1
downvote count: 1
type: Question
tagged with: google-closure-compiler
tagged with: javascript
has body: We want to use Google Closure in our build process as follows: when in development mode, include base.js and dynamically add script tags when in production, use minification and all the other cools stuff This is a Java project running on Tomcat and we are transitioning from Maven to Gradle, and have continuous integration set up using Jenkins. We use Apache Tiles as a frontend technology. I came up with a possible solution, but I feel it painful and ugly, and would like to know if there are better (cleaner, simpler, etc...) solutions. My stinky solution: Use a Tomcat context parameter to identify production mode. In the JSP files, check for this variable and include Closure's base.js or the minified js file accordingly. So... any other suggestions? Possibly with pros/cons?

http://stackoverflow.com/q/27081513
type: Question
tagged with: javascript
score: 0
tagged with: flexbox
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27210578
tagged with: css
favorite count: 0
has body: I'm making a simple IDE for a educational programming language similar to Karel the Dog. And I have trouble with making base html page. I have 4 areas: Toolbox (for buttons like open, save as, run etc.) Field (canvas for drawing executor that can move on the field and do some stuff) Code (CodeMirror editor for writing executor's commands) Console (place where IDE can print messages like compilation errors or runtime debug output) I wrote what I want from every area in my code so I'll say only what is not working now: The page should fill 100% screen's height. Cannot set CodeMirror to fill all available to its parent height. And when its size is greater than parent's height, scrollbars should appear. The same problem with canvas - but only on vertical. Is there a way to make a separator between code and field areas that can be used to redistribute horizontal space between areas? There is another difficulty. If the item number 4 requires JavaScript, then I'll ask to help me with solving it with WinJS 3.0 library because I won't add to the project jQuery or other heavy stuff only for this resize capability. So, can anyone help me? I loaded my code to jsfiddle.net and pasted it here: var ce = CodeMirror(document.getElementById('b-codemirror'), { value: "\n\n\nIt is CodeMirror element. [PARAMS ALL] " + "width: 100% of parent element, height: always 100% of" + " parent element + both scrollbars if needed\n\n\n", lineNumbers: true }); var cc = document.getElementById("canvas").getContext("2d"); cc.font = "16px Helvetica"; cc.fillText("It is canvas. Can be resized from", 10, 30); cc.fillText("JS. If it is larger than parent element,", 10, 60); cc.fillText("corresponding scrollbar should appear.", 10, 90); @import url("http://codemirror.net/lib/codemirror.css"); /* overriding default codemirror.css */ .CodeMirror { font-family: monospace; height: 100%; } html, body { height: 100%; margin: 0; padding: 0; } .b-section { margin: 2px; padding: 4px; border-radius: 4px; } #b-field…
upvote count: 1
downvote count: 1
has title: Using CSS display:flex (flexbox) and/or JavaScript to make adjustable page
tagged with: codemirror
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27210578

http://stackoverflow.com/a/27144622
has comment: http://stackoverflow.com/comment/42785606
type: Answer
has body: $(document).ready(function() { $('.ns2-category a').each(function(i, v) { if(v.html().indexOf('Sport') != -1 || v.html().indexOf('Television') != -1 || v.html().indexOf('Airline') != -1) { v.parent().remove(); } }); }); Try this. Basically I am iterating through all the divs with the calss and checking if the contents of them have the strings you specified. If so, I remove them.
answers question: http://stackoverflow.com/q/27144518
score: 0
has comment: http://stackoverflow.com/comment/42785685

http://stackoverflow.com/comment/42749173
comment on: http://stackoverflow.com/q/27124393
has text: sorry it is typing mistake.. thanks for that
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27034985
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: how to Fadein elements when it's visible
tagged with: fadein
has body: I'm using this code I found to fadein elements(with class:hideme) when I scroll to it, but it fades in only when it's fully visible, is there a way I can adjust the code so it fades in as soon as it appears in the browser? I tried to change the ">" to "=" in this line and it kinda works: if( bottom_of_window &gt; bottom_of_object ){ but it's not working when i apply to the second elements thanks! original link: http://jsfiddle.net/tcloninger/e5qaD/ here's the code: $(document).ready(function() { /* Every time the window is scrolled ... */ $(window).scroll( function(){ /* Check the location of each desired element */ $('.hideme').each( function(i){ var bottom_of_object = $(this).position().top + $(this).outerHeight(); var bottom_of_window = $(window).scrollTop() + $(window).height(); /* If the object is completely visible in the window, fade it it */ if( bottom_of_window &gt; bottom_of_object ){ $(this).animate({'opacity':'1'},500); } }); }); });
score: 2
type: AnsweredQuestion
type: Question
upvote count: 2
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27035070
accepted answer: http://stackoverflow.com/a/27035070

http://stackoverflow.com/comment/42655067
score: 0
has text: Good question. But I don't think so, they seem to want to keep Node itself pretty light. I guess it is really a different use case. The async and similar libraries are just convenience added on to the native async nature of Node. They massively simplify your own code. You could probably do this with events but I think it would be more complex.
comment on: http://stackoverflow.com/a/27070991
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27017202
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Rather than pass anonymous functions, you can save a reference to a function in a variable, and pass that reference to jQuery. For example: var validateFunc = function(e) { e.preventDefault(); if (!$('#formValidator').data('bootstrapValidator').isValid()) $('#formValidator').bootstrapValidator('validate'); if (!$('#jobValidator').data('bootstrapValidator').isValid()) $('#jobValidator').bootstrapValidator('validate'); if(($('#formValidator').data('bootstrapValidator').isValid()) &amp; ($('#jobValidator').data('bootstrapValidator').isValid())) { var clickButton = document.getElementById("&lt;%=saveButton.ClientID %&gt;"); clickButton.click(); } }; $("#submitButton").click(validateFunc); $(document).keypress(function(e) { if(e.which == 13) { validateFunc(e); } });
answers question: http://stackoverflow.com/q/27017079
upvote count: 3
accepted answer of: http://stackoverflow.com/q/27017079
score: 3

http://stackoverflow.com/q/27131806
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/28083195
has title: Can i perform form based http authentication for my TP-Link Wireless Router(IP: 192.168.0.1)
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: basic-authentication
tagged with: xmlhttprequest
accepted answer: http://stackoverflow.com/a/28083195
has comment: http://stackoverflow.com/comment/42763701
type: AnsweredQuestion
type: Question
has body: Here is the code i trying but it says "Login Fail"(My Defined Message) ... MY wireless Router is TP-Link 740N. var form = document.forms[0]; var address = "http://192.168.0.1/"; var username = "admin"; var password = "admin"; var xmlhttp; if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { alert("Log In Successful"); } else { alert("Log In Fail"); } } xmlhttp.open("GET", address, true, username, password); xmlhttp.send();

http://stackoverflow.com/q/27131848
score: 0
has answer: http://stackoverflow.com/a/27131995
tagged with: timer
type: UnansweredQuestion
has title: jQuery Timer Countdown within Session
has body: Good day, I'm creating a basic webpage/game where I need a countdown timer. I have found http://keith-wood.name/countdown.html Timer, which is great for what I need. However the game goes from page to page based on varying rounds. ie.) On each new round the time will of course restart. As I'm using below for the one minute countdown. How can I implement the timer that it travels across different page, is this the recommended way to solve this problem? I'm thinking that I could use session, for the countdown. $(document).ready(function () { $('#timer').countdown({ until: +60, compact: true }); });
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27164178
has body: JSHint (forked from JSLint) is a popular "lint checker" that's run on JavaScript code. It doesn't execute or modify the code, but analyzes it and reports a variety of different potential errors or bad practices that it finds. If you have 'use strict'; at the top of your JavaScript file, outside of any JavaScript functions, it will enable strict mode for the entire file. By default, JSHint will report a warning if it sees this. 'use strict'; window.permissions = null; function initialize() { window.permissions = 0; } Warnings 1: Use the function form of "use strict". This is because many people automatically concatenate their JavaScript files together before sending them to the user, and in those cases the top-level 'use strict;' can cause bugs. For example, if you have 'use strict'; at the top of main.js, and it's concatenated with the non-strict-mode controls.js, strict mode will unintentionally also be applied to the code from controls.js, potentially changing its behaviour. // This code is fine on its own, but will break if strict mode is applied. document.querySelector('.upgade').onclick = function() { window.permissions = 0777; } If this could happen in your case, you should avoid 'use strict'; at the top-level of your file. You could the entire file in a self-executing function to avoid side-effects of concatenation. (function() { 'use strict'; window.permissions = null; function initialize() { window.permissions = 0; } }()); However, if you're sure that you don't need to worry about concatenation and don't want to modify your code, the globalstrict option for JSHint will disable this warning. It's also possible to specify JSHint options using a .jshintrc file or the --config command-line flag, but in many cases the this "inline configuration" you saw—using a comment in the file—is easiest. /* jshint globalstrict: true */
answers question: http://stackoverflow.com/q/27114933
type: AcceptedAnswer
downvote count: 0
score: 6
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/42839762
has comment: http://stackoverflow.com/comment/42844764
accepted answer of: http://stackoverflow.com/q/27114933

http://stackoverflow.com/a/29700002
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27127479
score: 0
answers question: http://stackoverflow.com/q/27127479
type: Answer
has body: I ran into the same problem in IE 9 with jspdf.plugin.addimage.js, where atob is not implemented. Would you be able to try this polyfill? https://github.com/davidchambers/Base64.js

http://stackoverflow.com/a/27061436
has body: It is true what xaris08 said about loading the tabs without reloading the page, you should use the tab specific ajax which I recommend, but to answer you question if you are stuck with the reload page which I would not recommend you can do some dirty way like the code below. require(["dijit/layout/TabContainer", "dijit/layout/ContentPane", "dojo/parser"]); setTimeout(function () { location.reload(true);}, 8000); require(["dojo/html", "dojo/dom", "dojo/on", "dojo/domReady!"], function(html, dom, on){ setTimeout(function () { html.set(dom.byId("content1"), "11"); html.set(dom.byId("content2"), "22222"); html.set(dom.byId("content3"), "33333333"); }, 1000); }); This way every time you load the page you give sometime for the tabs to render and one second is enough then you inject the values in the dom using the html.set. look at it here
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27045299
downvote count: 0

http://stackoverflow.com/q/27049640
type: Question
has title: HTML tags in prompt (JavaScript)
tagged with: javascript
has comment: http://stackoverflow.com/comment/42616801
downvote count: 0
linked to: http://stackoverflow.com/q/10502102
has comment: http://stackoverflow.com/comment/42616886
favorite count: 0
duplicate of: http://stackoverflow.com/q/10502102
type: UnansweredQuestion
has body: I need to use HTML tags in the prompt in JavaScript. It is possible to do this? For example: var x = prompt ("&lt;img src = 'image.png'&gt;");
answer count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/70707975
type: Comment
score: 14
has text: This is a debounce, not a throttle. If i call this 100 in 1000ms, it will fire 1 time after 1200ms. A throttled function should fire 5 times
comment on: http://stackoverflow.com/a/40214341
type: AnswerComment

http://stackoverflow.com/comment/42569932
score: 0
comment on: http://stackoverflow.com/q/27022242
has text: Why only the first one? Because only one is syntactically valid. A `label` can be tied to only one element. Either by wrapping the element inside the `label`, or by setting the `label`'s `for` attribute to the element's `id`.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42536715
type: QuestionComment
comment on: http://stackoverflow.com/q/27003505
has text: All columns seem to be sorting with the exception of `First Name`. Is that the behavior you're trying to fix?
score: 0
type: Comment

http://stackoverflow.com/q/27055578
upvote count: 0
has answer: http://stackoverflow.com/a/27055699
accepted answer: http://stackoverflow.com/a/27055699
tagged with: arrays
downvote count: 5
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27055628
has title: Arrays inside objects
has body: I'm trying to create an object that inside him have some fields, one of them supposed to be an array. var ob= { name : "asdad" array ? } But I dont know how to. Can anyone help me? Thank you!
favorite count: 0
has comment: http://stackoverflow.com/comment/42627276
has answer: http://stackoverflow.com/a/27055628
type: AnsweredQuestion
tagged with: object
score: -5
type: Question
answer count: 2

http://stackoverflow.com/comment/42543751
comment on: http://stackoverflow.com/a/27007564
has text: that's a really bad idea, especially if any other module taps into the global state. You should never pollute the global state, just make your module return a generator function that you pass your arguments into, to get the fully qualified function you actually need to run.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27084634
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/27084360
answers question: http://stackoverflow.com/q/27084360
score: 2
has comment: http://stackoverflow.com/comment/42681560
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42678302
has body: The problem lies with your rect function. Specifically, with the usage of the .rect() member of the ctx. The rect member creates a path, which you then fill with ctx.fill() - only problem is, it doesn't close the path, so it remains open and is added to when the second call to poles comes along. You can either close the path before exiting the rect function, or even more simply, avoid paths altogether by defining and filling the rectangle in a single call, by using ctx.fillRect. The following change makes the code function as expected: function rect(w, h, x, y) { // ctx.rect(x, y, w, h); // ctx.fill(); ctx.fillRect(x,y,w,h); }
has comment: http://stackoverflow.com/comment/42699321

http://stackoverflow.com/q/27111731
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/27111758
type: Question
type: AnsweredQuestion
tagged with: multipartform-data
tagged with: form-data
linked to: http://stackoverflow.com/q/4295782
has title: How to get post parameter in node.js?
duplicate of: http://stackoverflow.com/q/4295782
accepted answer: http://stackoverflow.com/a/27111758
answer count: 1
tagged with: node.js
score: 0
has body: I'm using Node.js express and httpAsyncClient library in android. I was send request to express use Post include parameter. Request is does work. but I can't get parameter in Post I used this " var id = req.body.id; " I think httpAsyncClient parameter type is form-data. but express is handle x-www-form-urlencoded. How can i do?

http://stackoverflow.com/q/27107899
tagged with: floating-point
has comment: http://stackoverflow.com/comment/42718823
type: Question
accepted answer: http://stackoverflow.com/a/27108070
has comment: http://stackoverflow.com/comment/42718835
downvote count: 0
answer count: 1
has body: I just stumble accross something really odd in Javascript. My script was multiplying 13596 by 0.1, and the output was : 1359.6000000000001 We can agree that 0.1 = 1/10, so I tried it : 13596/10 = 1359.6 I tested it with Firefox and Chrome, the same results occurs. I wondered if it was related to floating, so I tried the following : 13596 * parseFloat(0.1) = 1359.6000000000001 Nope. By the way, this is not equal : (13596*0.1) === (13596/10) =&gt; false Does anyone has an idea about this result ? (Here's the JSFiddle.)
tagged with: javascript
has title: Why 13596*0.1 is different than 13596/10?
tagged with: precision
favorite count: 0
has comment: http://stackoverflow.com/comment/42718790
has answer: http://stackoverflow.com/a/27108070
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42718848
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/42718814

http://stackoverflow.com/comment/42747296
type: Comment
type: AnswerComment
has text: I want on unselect it remove from the array
comment on: http://stackoverflow.com/a/27123443
score: 0

http://stackoverflow.com/a/27382185
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27022352
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/43222832
has body: You can find scripts injected into head or evaluated, here is a break point added on youtube evaluated (another js file). You can find this in chrome as well, adding console.log (click on message shown), and voila you have source code you can add break points. Here mozila print debugging/breakpoint over evaluated script on utube page: Update Sorry, I understand chrome was out of the scope, my engrish :) How I did debugging on chrome over injected scripts, but there are cases when you cannot attach to execution if script is active (page load plus few milliseconds), you need to search for workarounds. Added this at the begin of the script injected: //@ sourceURL=jseinjectedsource.js console.log("evaluated"); and voila console: Better check this way better than my explanation chrome developer

http://stackoverflow.com/comment/42681649
has text: Apart you have two select inputs and you did not explained how they should perform together, you have also a class `Election Night` and also `ElectionNight` and you did not explained what about them.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27086415
score: 1

http://stackoverflow.com/a/27011098
type: Answer
has comment: http://stackoverflow.com/comment/42549903
score: 1
upvote count: 1
has body: This should give you an idea: var firstFields = data.Item[0].Fields.map(function(field){ return { key: field.Key, value: field.Value }; }); console.log(firstFields); map() the data and create the structure that you prefer. I will update with an example on how to differentiate between employees and departments. http://jsfiddle.net/kwpy35hg/ Update: // filter out departments var departments = data.Item.filter(function(item){ var section = item.Fields[item.Fields.length -1]; return section.Value === 'Department'; }); // flatten result: deps = []; for(var i = 0; i &lt; departments.length; i++){ for(var j = 0; j &lt; departments[i].Fields.length; j++){ deps.push({ key: departments[i].Fields[j].Key, value: departments[i].Fields[j].Value }) } } console.dir(deps); http://jsfiddle.net/kwpy35hg/1/ To get departments as 2 arrays: var departments = data.Item.filter(function(item){ var section = item.Fields[item.Fields.length -1]; return section.Value === 'Department'; }).map(function(deps){ return deps.Fields; });
has comment: http://stackoverflow.com/comment/42549974
downvote count: 0
answers question: http://stackoverflow.com/q/27010870

http://stackoverflow.com/comment/42743410
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27121234
type: QuestionComment
has text: Sorry, table doesn't display properly, I'm trying to improve it.

http://stackoverflow.com/comment/42748860
type: Comment
comment on: http://stackoverflow.com/a/27124038
has text: It's not relevant though.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27151448
type: AnsweredQuestion
has title: Dynamically create and append ul after existing ul in div in jquery
has answer: http://stackoverflow.com/a/27151498
downvote count: 3
linked to: http://stackoverflow.com/q/1126055
type: Question
has body: I have a menu and I need to dynamically add another ul.nav.navbar-nav.navbar-right with one li. Here is my actual HTML: ... ... and after that ul I need to append another ul via jQuery (this is result what I need after run script) ... ... ** Profil **
has comment: http://stackoverflow.com/comment/42797513
has answer: http://stackoverflow.com/a/27151550
upvote count: 0
accepted answer: http://stackoverflow.com/a/27151495
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42797476
possible better answer: http://stackoverflow.com/a/27151550
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/42797519
has comment: http://stackoverflow.com/comment/42797624
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/42797537
score: -3
has answer: http://stackoverflow.com/a/27151495

gmaps4rails
tags question: http://stackoverflow.com/q/27131476
tag name: gmaps4rails
type: Tag

http://stackoverflow.com/q/27116473
has comment: http://stackoverflow.com/comment/42737224
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42735563
type: UnansweredQuestion
tagged with: node.js
answer count: 0
type: Question
has body: I'm new to angular js and having some troubles make my first project works. Here is the github of my project : https://github.com/User199011/ClientCrossPlateform I'm also using node.js with node-webkit. When I launch my application I have this error : includes\routes\routes.js:10 templateUrl : '../includes/files/home/home.html', ^^^^^^^^^^^ SyntaxError: Unexpected identifier at exports.runInThisContext (vm.js:69:16) at Module._compile (module.js:437:25) at Object.Module._extensions..js (module.js:472:10) at Module.load (module.js:354:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:362:17) at require (module.js:378:17) I've tried several syntaxes (using "/" before, without, etc) without success. I thought maybe you could help me with this ? Second question about best pratices. I've read some articles about architecture in Angular but they were not really answering my questions. Now I just want a simple application where an un logged user can just connect itself, and a logged user can access to the content. So was thinking of these modules for my application, correct me if there are better answers please (I'm more used to models under C#/C++/java) : - module loggedContent (dependencies : modules about the logged possibilies : messages, settings ...) - module unlogged - module application (dependencies : loggedContent, unlogged) This way I was able to add as many content as I want without touching the application, Is this a good understanding of angular/js architecture ? But as the services in angular/js seems to be injected in a module (I want some of the services to be accessible to all modules, example "getCurrentUser") I was not able to find how my "loggedContent" module could have access to the services defined in my application.
has title: Angularjs' routes and best practices
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42770827

http://stackoverflow.com/comment/42763019
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27130878
score: 0
has text: Not sure what you mean by "extension frame". Whenever I've done anything with extensions they've all run in the same window. Do you literally mean you're running the script in another frame (as in an iframe)?

http://stackoverflow.com/comment/42595583
has text: sorry I meant typeof, I have edit the message body
type: QuestionComment
comment on: http://stackoverflow.com/q/27037625
score: 0
type: Comment

http://stackoverflow.com/q/27150850
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27151067
type: Question
has body: I am trying to mimic a specific type of responsive functionality and I'm finding it hard to research specifically what I want. Basically it is a form of responsive design wherein if the window is resized, there is a slight pause, and then the entire site layout smoothly animates to correctly fit the new window or device size. You can see an example of what I'm talking about here: http://www.briannathanhartwell.com/ I usually use media queries and work through breakpoints. The only way I can see this working is through some global JavaScript function, that fires on a window resize and then causes a whole bunch of JavaScript animations. Would that be accurate?
possible better answer: http://stackoverflow.com/a/27151238
has title: Transition effects between responsive designs
tagged with: responsive-design
tagged with: javascript
has answer: http://stackoverflow.com/a/27151067
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/27151238
tagged with: animation

http://stackoverflow.com/q/27103867
has answer: http://stackoverflow.com/a/33428513
tagged with: javascript
has comment: http://stackoverflow.com/comment/52026885
downvote count: 0
tagged with: angular-ui
has body: THE SITUATION: I have an angular app using angular ui-select to search and select people from a database. It is working fine, except one thing. The user should be able to filter among the people using two criteria: name and email. Using the normal angular filter I am able to filter only one of them. If I try to filter both fields, it does not work anymore. WORKING EXAMPLE WITH ONE FIELD: &lt;ui-select multiple ng-model="database_people.selectedPeople" theme="select2" ng-disabled="disabled" style="width:100%"&gt; &lt;ui-select-match placeholder="Select person..."&gt;{{$item.name}} &amp;lt; {{$item.email}} &amp;gt;&lt;/ui-select-match&gt; &lt;ui-select-choices repeat="person2 in list_people | filter: {name: $select.search, db_data_type_id: 5}"&gt; &lt;div ng-bind-html="person2.name | highlight: $select.search"&gt;&lt;/div&gt; &lt;small&gt; email: &lt;span ng-bind-html="''+person2.email | highlight: $select.search"&gt;&lt;/span&gt; &lt;/small&gt; &lt;/ui-select-choices&gt; &lt;/ui-select&gt; NOT WORKING EXAMPLE WITH TWO FIELDS IN THE FILTER: &lt;ui-select multiple ng-model="database_people.selectedPeople" theme="select2" ng-disabled="disabled" style="width:100%"&gt; &lt;ui-select-match placeholder="Select person..."&gt;{{$item.name}} &amp;lt; {{$item.email}} &amp;gt;&lt;/ui-select-match&gt; &lt;ui-select-choices repeat="person2 in list_people | filter: {name: $select.search, email: $select.search, db_data_type_id: 5}"&gt; &lt;div ng-bind-html="person2.name | highlight: $select.search"&gt;&lt;/div&gt; &lt;small&gt; email: &lt;span ng-bind-html="''+person2.email | highlight: $select.search"&gt;&lt;/span&gt; &lt;/small&gt; &lt;/ui-select-choices&gt; &lt;/ui-select&gt; The strange thing is that it actually works BUT only for the first character. When I type the first character it highlights it in both fields, name and email. But when I type the second character it does not work anymore (I got no error in console). ATTEMP USING PROPSFILTER FROM ANGULAR SAMPLES: &lt;ui-selec…
accepted answer: http://stackoverflow.com/a/27147101
favorite count: 0
has comment: http://stackoverflow.com/comment/52014147
tagged with: angularjs
tagged with: filter
possible better answer: http://stackoverflow.com/a/32861302
answer count: 4
has answer: http://stackoverflow.com/a/32861302
type: AnsweredQuestion
has title: Angular ui-select filtering only one field
score: 17
upvote count: 17
type: Question
has answer: http://stackoverflow.com/a/27147101
has answer: http://stackoverflow.com/a/51380476

http://stackoverflow.com/a/78647931
type: Answer
answers question: http://stackoverflow.com/q/27100030
has body: My solution for this very old question is to create a css class that sets the z-index to a number above anything else on my page, and then on creating the dialog I pass that class. On css file: .zIndexTop { z-index: 999999; } On Javascript: $("#abcdef").dialog({ classes: { "ui-dialog": "zIndexTop" } });
score: 0

http://stackoverflow.com/a/45035115
type: Answer
upvote count: 2
downvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27022527
has body: To get Full version of Chrome, then Try this: var v = navigator.userAgent.match(/Chrome\/(\S+)/); console.log(v[0]); // you will get: Chrome/58.0.3029.110 var r = v[0].split('/'); console.log(r[1]); //you will get: 58.0.3029.110

http://stackoverflow.com/a/27015392
has body: You can use attribute equals selector with .is() and :checked-selector if($('input[name="usernames[]"]').is(':checked')){ //at least one is checked }
upvote count: 4
score: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27015356
answers question: http://stackoverflow.com/q/27015356

http://stackoverflow.com/a/27100969
has comment: http://stackoverflow.com/comment/42706700
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42708291
has comment: http://stackoverflow.com/comment/42708632
has comment: http://stackoverflow.com/comment/42708522
has comment: http://stackoverflow.com/comment/42710259
accepted answer of: http://stackoverflow.com/q/27099650
has comment: http://stackoverflow.com/comment/42708198
answers question: http://stackoverflow.com/q/27099650
score: 0
has body: It is required to associate the controller that will hold the selected value with the current context. So in the following example it is assumed that the current context is the index route and the model returns an array of objects. example hbs &lt;script type="text/x-handlebars" data-template-name="index"&gt; &lt;div&gt; {{view "select" content=model prompt="Please select a name" selectionBinding="controllers.selectedComboBox.model" optionValuePath="content.fullName" optionLabelPath="content.title" }} &lt;/div&gt; - &lt;p&gt; Selected: {{controllers.selectedComboBox.model.title}} &lt;/p&gt; &lt;/script&gt; js App.IndexRoute = Ember.Route.extend({ model: function() { return [ {fullName:"the full name1", title:"the title1"}, {fullName:"the full name2", title:"the title2"}, {fullName:"the full name3", title:"the title3"} ]; } }); App.IndexController = Em.ArrayController.extend({ needs:["selectedComboBox"] }); App.SelectedComboBoxController = Em.ObjectController.extend({ model:null }); http://emberjs.jsbin.com/jodaqumoba

http://stackoverflow.com/q/27135761
tagged with: javascript
has comment: http://stackoverflow.com/comment/42769680
has comment: http://stackoverflow.com/comment/42769817
score: 0
has comment: http://stackoverflow.com/comment/42770244
answer count: 1
tagged with: jquery
tagged with: asp.net
has body: I need to place an entire javascript function in a div and show it for testing purposes, how can I accomplish this? I am doing this from code behind in asp.net EDIT &lt;!-- Facebook Conversion Code for Website Purchase --&gt; &lt;script type='text/javascript'&gt; (function() { var _fbq = window._fbq || (window._fbq = []); if (!_fbq.loaded) { var fbds = document.createElement('script'); fbds.async = true; fbds.src = '//connect.facebook.net/en_US/fbds.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(fbds, s); _fbq.loaded = true; } })(); window._fbq = window._fbq || []; &lt;/script&gt;
has comment: http://stackoverflow.com/comment/42769805
has title: Display complete Javascript tag in div
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42769742
linked to: http://stackoverflow.com/q/11386586
has answer: http://stackoverflow.com/a/27137331
type: Question

http://stackoverflow.com/a/27008485
has comment: http://stackoverflow.com/comment/42568407
answers question: http://stackoverflow.com/q/27008439
downvote count: 0
has comment: http://stackoverflow.com/comment/42546943
score: 1
type: Answer
has body: JavaScript and window.location.href won't get you a referrer unless you explicitly pass the value of window.location.href as a parameter to your next request. As for which is better, it depends on what you are doing. If you are making a analytics tracker, window.location.href is more-reliable, but requires JavaScript be enabled. If you are using it for CORF protection, definitely use $_SERVER['HTTP_REFERER'] (in addition to other, more-reliable validation).
upvote count: 1

http://stackoverflow.com/q/27053488
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42691338
has title: How to set the active class on progress bubbles in Javascripts
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27092724
downvote count: 1
score: -1
has body: I am trying to set the active class on my progress bubbles with a click of a button on my web page 1 2 3 4 I have four steps and each step pass in the step number to my javascript method Register I tried something like this: $scope.setNavigation = function(num) { var nextStep; nextStep = num + 1; return $("#gs" + nextStep).addClass('active'); }; This is not working. What am I doing wrong here?

http://stackoverflow.com/a/27105216
has comment: http://stackoverflow.com/comment/42713978
has comment: http://stackoverflow.com/comment/42714204
type: Answer
answers question: http://stackoverflow.com/q/27105108
downvote count: 3
score: 23
has comment: http://stackoverflow.com/comment/52604917
upvote count: 26
has body: You should try using maxlength attribute. The code would be something like {{1000 - comment.Comment.body.length}} remaining

http://stackoverflow.com/q/27142767
favorite count: 0
has answer: http://stackoverflow.com/a/27142799
upvote count: 1
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27142799
score: 1
has body: Just a thought experiment .. no use case concat docs Note: Concatenating array(s)/value(s) will leave the originals untouched. Furthermore, any operation on the new array will have no effect on the original arrays, and vice versa. Is there a function to make a copy an array that could have an effect on the original arrays, and vice versa? example: var data = [1,2,3] var copyData = makeCopy(data); if data changes so does copyData and vice versa. what would be a practical use case for this?
has comment: http://stackoverflow.com/comment/42782360
has title: a function to copy an array that could effect the original array?
tagged with: arrays
downvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/27011225
upvote count: 12
score: 12
downvote count: 0
has body: You can use pattern attribute of HTML5 and give regex expression to avoid spaces &lt;form action="someaction"&gt; &lt;input type="text" id="fullname" name="fullname" required class="textbox" placeholder="Lastname Firstname Middlename" pattern="^\S+$"&gt; &lt;input type="submit" value="submit"&gt; &lt;/form&gt;
answers question: http://stackoverflow.com/q/27011061
type: Answer

http://stackoverflow.com/comment/44193747
has text: True. You would've to create object of **Select class**, like this `Select sel = new Select(driver.findElement(By.xpath("//xpath of the element")));` and then use **'selectByValue or selectByVisibleText or selectByIndex'** method(s) to select the proper dropdown value. On the other hand, **sometimes the dropdown is not made by using "select" tag**, therein you would've to **click on the dropdown first, and then click on the resultant option in the dropdown.**
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27099495

http://stackoverflow.com/comment/42718659
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27107587
has text: So I should forget my current approach and learn to use momentjs.com?

http://stackoverflow.com/comment/42652459
comment on: http://stackoverflow.com/q/27069721
has text: @isherwood That works fine however I cannot call the centerAlign function from resize for some reason.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/88998718
type: Comment
comment on: http://stackoverflow.com/a/42975776
has text: I would suggest firing the callback like so: `callback(...arguments)` to keep the original arguments. very handy
score: 3
type: AnswerComment

http://stackoverflow.com/comment/42744635
comment on: http://stackoverflow.com/a/27119051
type: AnswerComment
has text: Wow!It is truly helpful! Thanks so much for pointing out the problems and updating my code! I feel very grateful for your help! As a d3 beginner, I sometimes feel really frustrated to self-study all the stuff and debug the code. Thank you for being here for us!
score: 0
type: Comment

http://stackoverflow.com/comment/42754797
comment on: http://stackoverflow.com/q/27127606
has text: Did you search that error message on the web, second hit: http://www.codeproject.com/Articles/317704/JScript-Debugger-Unable-to-attach-the-process-Anot
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27078975
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27079252
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/42668228
downvote count: 0
type: UnansweredQuestion
score: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42668181
tagged with: google-apps-script
has body: I'm new to Google Apps Scripts and am trying to implement a spacegallery into my google site. I have separated my css stylesheets &amp; .js files into .html in the script editor and written my html page(minigallery.html), and now I'm trying to link them all in the Code.gs section. Here's what I have so far having used examples from here: https://developers.google.com/apps-script/guides/html/best-practices#separate_html_css_and_javascript Here's what I currently have in my Code.gs, but when I run the published version the css &amp; js files appear not to be linked (granted I haven't put pics yet). You can find the published link here: //script.google.com/macros/s/AKfycbybCtW9y-iCT81WvBoCmfGnXWhSwQ5dpa7xyHU_H1ot/dev ` // Script-as-app template. function doGet() { var app = UiApp.createApplication().setTitle('Business Card Mini Gallery | MAvC Graphics.').setHeight(50).setWidth(100) return HtmlService.createTemplateFromFile('minigallery') .evaluate(); }function include(customcss) { return HtmlService.createHtmlOutputFromFile('customcss') .getContent(); }function include(layoutcss) { return HtmlService.createHtmlOutputFromFile('layoutcss') .getContent(); }function include(minigallerycss) { return HtmlService.createHtmlOutputFromFile('minigallerycss') .getContent(); }function include(eyesjs) { return HtmlService.createHtmlOutputFromFile('eyejs') .getContent(); }function include(jqueryjs) { return HtmlService.createHtmlOutputFromFile('jqueryjs') .getContent(); }function include(layoutjs) { return HtmlService.createHtmlOutputFromFile('layoutjs') .getContent(); }function include(utilsjs) { return HtmlService.createHtmlOutputFromFile('utilsjs') .getContent(); }function include(minigalleryjs) { return HtmlService.createHtmlOutputFromFile('minigalleryjs') .getContent(); } ` And here is my ill-written minigallery.html code to link the css &amp; js (the first &amp; last lines being the most important): &lt;?!= include('customcss'), ('layoutcss'), ('minigallerycss'); ?&gt; ...//le…
upvote count: 1
has title: Google Apps Script with multiple stylesheet & js links
has comment: http://stackoverflow.com/comment/42668053

http://stackoverflow.com/comment/42553046
type: Comment
score: 0
has text: in jsfiddle when i red div darg left to right black div not adjust to screen automatically so Please help me
comment on: http://stackoverflow.com/a/27011683
type: AnswerComment

http://stackoverflow.com/comment/42652497
score: 0
has text: customization would be harder, error prone, etc
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27067169

http://stackoverflow.com/q/27150917
tagged with: angularjs
has body: I have this form and I have used ng-hide to hide some fields when meeting certain requirements. I have used validation for all the fields ( When a field is kept empty, it'll validate and ask to be fill the field). The problem is when my fields get hidden, still it seems to be validating. So I cannot proceed my form. How can I solve this problem? I've used ng-required to the fields I've hidden and set it to false when that field is not needed, but it does not seem to work. This is part of the form that I'm referring to: &lt;div class="form-group" ng-class="{ 'has-error' :submitted &amp;&amp; (myForm.scheduler.$pristine || myForm.scheduler.$invalid)}"&gt; &lt;label class="labelColor"&gt;&lt;h5&gt;&lt;b&gt;Payment Type *&lt;/b&gt;&lt;/h5&gt;&lt;/label&gt; &lt;select type="select" class="textbox-n" id="scheduler" ng-model="data.scheduler" ng-change="scheduleChange()" ng-options="Scheduler.name for Scheduler in SchedulersArr" name="scheduler" required&gt; &lt;option id="default" value="" selected="selected"&gt;--Select--&lt;/option&gt;&lt;/select&gt; &lt;span class="help-inline" ng-show="submitted &amp;&amp; (myForm.scheduler.$pristine || myForm.scheduler.$invalid)" &gt;A Payment Type is required.&lt;/span&gt; &lt;/div&gt; &lt;!-- Effective Date:--&gt; &lt;div ng-hide = "hideFutureDate"&gt; &lt;div class="form-group" ng-class="{ 'has-error' : myForm.effectiveDate.$invalid &amp;&amp; myForm.effectiveDate.$dirty &amp;&amp; submitted || (myForm.effectiveDate.$invalid &amp;&amp; myForm.effectiveDate.$pristine) &amp;&amp; submitted }"&gt; &lt;label class="labelColor" &gt;&lt;h5&gt;&lt;b&gt;Effective Date*&lt;/b&gt;&lt;/h5&gt;&lt;/label&gt;&lt;br&gt; &lt;input style="width:100%" class="item-input-wrapper" type="date" id="effectiveDate" name="effectiveDate" ng-model="data.effectiveDate" placeholder="Effective Date" ng-required="!hideFutureDate" /&gt; &amp;nbsp; &lt;span class="help-inline" ng-show="submitted &amp;&amp; myForm.startDate.$error.required" &gt;A Effective date is r…
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: forms
type: Question
has title: Prevent validation of hidden fields in angularJS/ionic
has answer: http://stackoverflow.com/a/27154632
tagged with: javascript
tagged with: ionic-framework
upvote count: 1
tagged with: validation
answer count: 1
favorite count: 0

http://stackoverflow.com/q/27004103
has title: Callback function Jquery/javascript returning an array
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42537842
has answer: http://stackoverflow.com/a/27004323
has answer: http://stackoverflow.com/a/27004194
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/27004323
has body: I dont know if i'm doing this the wrong way but I can't think of another way to do it. I have a function in php that i'm calling with $.post and I want it to return an array. It sounds like I need to use a callback function and i'm trying but it just wont work. Here is the code: Jquery: $("#e_del_date_btn").click(function(){ var new_date = $("#edited_del_date").val(); if (new_date == '') {new_date = $("#edited_del_date").attr("placeholder");} var new_time = $("#edited_del_time").val(); var non = $("#non").html(); function getarray(new_date, new_time, non, callback) { $.post('http://localhost:8080/wsad2/post.php',{'new_date':new_date,'new_time':new_time,'non':non}, function(data) { callback(data); }); } getarray(new_date,new_time,non, function(data) { alert(data[0]); $("#odi_span").html(data[0]); $("#e_del_date_pencil").attr("value",data[1]); $("#e_del_date_pencil").attr("value2",data[2]); }); $("#e_del_date").hide(); $("#e_del_date").css("z-index","0"); $("#po_main_div_test").css({ opacity : 1.0 }); }); PHP Code: $returndata = array(); $returndate = $returntime = $returntext = ''; if ($fail == "false") {if ($row['complete'] == "no") {$returntext .= '(When Completed) ';}} $returntext .= 'This order is scheduled to be delivered on&lt;br&gt;'; if ($fail == "false") {$returntext .= $new_date_2;$returndate = $new_date_2;} else {$returntext .= $orig_deldate;$returndate = $orig_deldate;} $returntext .= ' between '; if ($fail == "false") {$returntext .= $new_time_2;$returntime = $new_time_2;} else {$returntext .= $orig_time;$returntime = $orig_time;} if ($fail == "true") {$returntext .= '&lt;br&gt;The New Delivery Date must be tomorrow or later.';} $returndata[0] = $returntext; $returndata[1] = $returndate; $returndata[2] = $returntime; //echo ($returntext); return $returndata; from some of the things I've read I might be trying to use $.post improperly, but basically I need to pass the date/time variables and then have the php return the value but they can be changed in th…
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27004194
type: Question
tagged with: javascript

http://stackoverflow.com/q/27131853
has comment: http://stackoverflow.com/comment/42762652
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42762994
tagged with: css
type: UnansweredQuestion
tagged with: wordpress
has answer: http://stackoverflow.com/a/27131947
has title: One div and its content on website loading last
type: Question
has comment: http://stackoverflow.com/comment/42762732
has comment: http://stackoverflow.com/comment/42762695
score: 0
has body: UPDATE : With help from @TrueBlueAussie, Yes, since I am not hiding the div, the code below is useless. So ignoring it (The script I used below) , is there a proper solution to my problem. I have a website, http://frankvinyl.com/ It is a wordpress website. The featured image at the top, it loads after all the website is loaded. I tried for different solutions for loading the DIV first, but its not working. $(document).ready(function() { $("#main1").show(); }); The problem is, the content of #main1 loads after all the website and content is loaded. I just want to load the div with the flow as the rest of the content. Have been tweaking around but cannot find a appropriate solution.
answer count: 1
has comment: http://stackoverflow.com/comment/42763224
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42564208
comment on: http://stackoverflow.com/a/27019089
type: AnswerComment
has text: See my edit, using that for loop, what gets printed to the console?
score: 0
type: Comment

http://stackoverflow.com/comment/42609392
comment on: http://stackoverflow.com/q/27044364
has text: I've to call it from a function I've developed on my own, if called from Page_Load it works.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42638173
has text: it gives 00:020 expected- 02:00.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27061982

http://stackoverflow.com/comment/73565257
has text: @evilReiko: That's an issue with the JavaScript Date object, not my answer. **;-)**
type: AnswerComment
score: 4
type: Comment
comment on: http://stackoverflow.com/a/27093173

http://stackoverflow.com/comment/42797366
has text: actually. 10e12 is 1e13
comment on: http://stackoverflow.com/q/27151311
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/27121501
has comment: http://stackoverflow.com/comment/42744816
has body: The property data of jQuery Ajax accept this type of data Type: PlainObject or String or Array Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below). Note The form fields must have the name attribute set, using only ID does not work as documented Only "successful controls" are serialized to the string. No submit button value is serialized since the form was not submitted using a button. For a form element's value to be included in the serialized string, the element must have a name attribute. Values from checkboxes and radio buttons (inputs of type "radio" or "checkbox") are included only if they are checked. Data from file select elements is not serialized. So , this &lt;form id="gfkf"&gt; &lt;input type="hidden" value="credits" name="type" /&gt; &lt;input type="submit" id="g5k" value="GIVE 5K (CREDITS) [OFF CLIENT ONLY]" style="background-color:rgba(0, 0, 0, 0);width:100%;border:none;color:white;text-shadow: 0px 0px 8px rgba(150, 232, 255, 1);text-align:left;font-size:1.4em;"/&gt; &lt;/form&gt; should be something like this &lt;form id="gfkf" name="gfkf"&gt; &lt;input type="hidden" value="credits" id="test" name="test" /&gt; &lt;input type="submit" id="g5k" name="g5k" value="GIVE 5K (CREDITS) [OFF CLIENT ONLY]" style="background-color:rgba(0, 0, 0, 0);width:100%;border:none;color:white;text-shadow: 0px 0px 8px rgba(150, 232, 255, 1);text-align:left;font-size:1.4em;"/&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/42744498
downvote count: 0
has comment: http://stackoverflow.com/comment/42744053
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42744719
answers question: http://stackoverflow.com/q/27121327
type: Answer
accepted answer of: http://stackoverflow.com/q/27121327
has comment: http://stackoverflow.com/comment/42744347
score: 1
upvote count: 1

http://stackoverflow.com/comment/42785577
has text: it was added on jquery Version 1.4 so ny version after that should have it
comment on: http://stackoverflow.com/a/27144591
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42772781
type: QuestionComment
score: 0
has text: This doesn't sound too difficult for an initial implementation. You can create n # of "circle" div's, set their position to absolute, and move them around (adjust css top/left) via JS or JQ. The trickiest part is probably figuring out how to avoid individual circles from overlapping (unless you want that) ie. if you were placing them at random based on some radius.
type: Comment
comment on: http://stackoverflow.com/q/27137274

http://stackoverflow.com/q/27048293
score: 0
has comment: http://stackoverflow.com/comment/42614590
has answer: http://stackoverflow.com/a/27048749
favorite count: 0
has comment: http://stackoverflow.com/comment/42614565
accepted answer: http://stackoverflow.com/a/27048562
has comment: http://stackoverflow.com/comment/42614583
has answer: http://stackoverflow.com/a/27048578
has comment: http://stackoverflow.com/comment/42614550
upvote count: 1
has comment: http://stackoverflow.com/comment/42614620
downvote count: 1
type: AnsweredQuestion
has body: var times = 0; $(selector).on('click',function(){ times += 1; if(times &gt; 3){ times = 0 } console.log(times); }); This will log: 1,2,3,0,1,2,3,0,and so on ... But I want to get the result like this: 1,2,3,0,0,0,0, ..... , 0 It means after the number 3 the times variable should always be 0. How should I do that?
has title: timer increase upto 3 after then set to 0 for always
possible better answer: http://stackoverflow.com/a/27048404
type: Question
has answer: http://stackoverflow.com/a/27048404
has comment: http://stackoverflow.com/comment/42614472
has answer: http://stackoverflow.com/a/27048562
tagged with: javascript
answer count: 6
tagged with: jquery
has answer: http://stackoverflow.com/a/27048491
has answer: http://stackoverflow.com/a/27048469

http://stackoverflow.com/q/26995320
tagged with: regex
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26995368
possible better answer: http://stackoverflow.com/a/26995404
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/26995404
has title: Javascript Wrapping Contents of Brackets in quotes
tagged with: jquery
has body: I want to wrap the contents of some brackets in quotes. I have test(ab) as an input (in a string) and I want the output to be test('ab'), with the addition of the quotes around the ab. I have looked at several answers to similar questions, but cannot get any to wrap the string correctly, input = input.replace(/\([^\)]*?\)/g, "'$&amp;'"); Wraps the input like so test'(ab)' Demo in action: http://jsfiddle.net/adminb/upczrogn/ Does anyone have any ideas. Thanks.
accepted answer: http://stackoverflow.com/a/26995368

http://stackoverflow.com/comment/42660467
type: QuestionComment
has text: look like there's no need, answer looks close to what i would have done, even has defaults up top....
type: Comment
comment on: http://stackoverflow.com/q/27074345
score: 0

http://stackoverflow.com/a/27071653
type: Answer
answers question: http://stackoverflow.com/q/27071191
has body: Your doPostBack call is wrong. It should be __doPostBack() not _doPostBack() - there are supposed to be two underscores, you have one. Which is probably why it failed to begin with. Try this instead: buttons: { Yes: function () { var btn = document.getElementById('&lt;%=btnSubmit.ClientID%&gt;'); __doPostback(btn, 'OnClick'); }, UPDATE Try this: In your code behind add this in your page load function if (Page.IsPostBack) { var param = Request["__EVENTARGUMENT"]; if (target == "Submit") btnSubmit_Click(sender, e); } In your Javascript you would do __doPostBack(btn, 'Submit'); That should do it.
has comment: http://stackoverflow.com/comment/42659451
has comment: http://stackoverflow.com/comment/42656674
score: 0

http://stackoverflow.com/comment/42767432
type: Comment
comment on: http://stackoverflow.com/a/27133594
has text: This won't work: `.click()` triggers only events attached by jQuery, not native ones.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27041835
answer count: 3
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have a span that is positioned absolutely in a div. The span is wider than the div, with an overflow of hidden, so I want to animate the span to the position right: 0; similar to a marquee effect. How do I get it to slide from the starting position, to the position of right: 0;? CSS .auto-option__name-container { display: inline-block; margin-left: 20px; margin-top: 20px; @include font-paragraph; overflow-x: hidden; position: relative; height: 1.618em; width: 11em; background-color: red; } .animateLongName{ -webkit-animation: marquee 2s ease-in-out infinite; position: absolute; background-color: rgba(255,255,255,0.4); white-space: nowrap; } @-webkit-keyframes marquee { 0% { right: auto; } 100% { right: 0px; } } HTML &lt;body&gt; &lt;div class="auto-option__name-container"&gt; &lt;span class="animateLongName"&gt; This is a really long name that won't fit in the div &lt;/span&gt; &lt;/div&gt; &lt;/body&gt; JSFiddle http://jsfiddle.net/WM9nQ/16/
tagged with: animation
tagged with: css
has answer: http://stackoverflow.com/a/27043825
has answer: http://stackoverflow.com/a/27042229
upvote count: 2
type: UnansweredQuestion
downvote count: 1
type: Question
has title: CSS Animation of span with position right: auto to right: 0 won't animate
score: 1
has answer: http://stackoverflow.com/a/27042077
tagged with: css-animations

http://stackoverflow.com/comment/42713770
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27104962
has text: You also have to parse your values to Integers otherwise your trying to add strings which means 5+2=52. So the following `var box1 = parseInt(document.getElementById("val1").value);` will nean that 5+3=7
score: 0

http://stackoverflow.com/q/27089292
tagged with: https
type: Question
has comment: http://stackoverflow.com/comment/42686046
tagged with: webserver
tagged with: javascript
has title: HTTPS Protocol blocks JS
tagged with: block
tagged with: apache2
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27089470
type: UnansweredQuestion
has body: the HTTPS version of my website refuses to load JavaScript. All scripts are located on the same server. I tried: &lt;script type="text/javascript" src="https://server.tld/js/jquery.js"&gt; &lt;script type="text/javascript" src="//server.tld/js/jquery.js"&gt; &lt;script type="text/javascript" src="js/jquery.js"&gt; But all browsers are blocking the content. "This page includes script from unauthenticated sources." EDIT It was my fault. I used some "http" links in the JavaScript file, so the browser didn't block the whole script but just because it uses some unencrypted urls.

http://stackoverflow.com/a/27026672
type: Answer
answers question: http://stackoverflow.com/q/27024634
score: 0
has body: Thanks to dandavis who started me down the right track. The problem occurs because I was using local files. I guess that means using the file:: protocol as opposed to the the http:: protocol. No status is returned when accessing local files. Removing the status check corrects the problem. However I wanted to be able to detect if the file could be opened so I added a try catch block around the send call as follows... try { xmlhttp.send(null); } catch(err) { Log("xmlhttp.send error " + err); return ""; }

http://stackoverflow.com/comment/42580691
type: Comment
comment on: http://stackoverflow.com/a/27028972
score: 0
type: AnswerComment
has text: hasClass includes all rows that have that class. I need to be more specific. I need to say how many rows ONLY have americas as the class; not how many rows contain americas

http://stackoverflow.com/q/27131595
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27131741
answer count: 2
possible better answer: http://stackoverflow.com/a/27131745
has answer: http://stackoverflow.com/a/27131745
tagged with: javascript
score: 0
tagged with: datetime
has answer: http://stackoverflow.com/a/27131741
has body: I am getting a set of JSON results back from a server. Each result has a property called CreatedOn. I peaked at the value of CreatedOn using the following code: var results = getResultsFromServer(); for (var i=0; i&lt;results.length; i++) { console.log(results[i].CreatedOn); } This code prints out values like the following: 2014-10-23T17:15:55.624 2014-10-22T16:13:55.342 2013-12-21T12:26:55.912 My question is, how do I convert those values to local time in JavaScript? For instance, what about the following: var results = getResultsFromServer(); for (var i=0; i&lt;results.length; i++) { var utc = results[i].CreatedOn; var local = ?; console.log('UTC: ' + utc + ' Local: ' + local); } Thank you for your help.
has title: Convert UTC Date to Local Date in JavaScript
has comment: http://stackoverflow.com/comment/42762366
type: Question

http://stackoverflow.com/a/32496488
score: 0
has comment: http://stackoverflow.com/comment/52853038
type: Answer
has body: I am creating dynamic image with php with `GDLibrary. Here is the script of creating dynamic image.
answers question: http://stackoverflow.com/q/26996304

http://stackoverflow.com/comment/42539847
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27005035
type: Comment
has text: possible duplicate of [How to convert some multibyte characters into its numeric html entity using PHP?](http://stackoverflow.com/questions/5123638/how-to-convert-some-multibyte-characters-into-its-numeric-html-entity-using-php)

http://stackoverflow.com/a/27035457
has body: This should work: $('.groupf-more').hide(); $('.groupf-title').click(function() { $('.groupf-more').slideUp(); $(this).closest('li').find('.groupf-more').slideDown(); return false; });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27035366

http://stackoverflow.com/q/27060248
tagged with: javascript
has answer: http://stackoverflow.com/a/27060311
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/27060317
tagged with: hash
type: AnsweredQuestion
tagged with: sha256
score: 1
accepted answer: http://stackoverflow.com/a/27060311
upvote count: 1
has body: what is the simplest way to calculate the SHA-256 of a file in JavaScript? (using the File API of W3C) Once I have the sha-256 hash of this file, I need to generate the base64 of this hash? What libraries do you suggest me to do that? thanks in advance
has title: Calculate SHA-256 hash and B64 of a file in JavaScript
type: Question
possible better answer: http://stackoverflow.com/a/27060317

http://stackoverflow.com/q/27074583
tagged with: javascript
has comment: http://stackoverflow.com/comment/42660798
score: 0
tagged with: hierarchy
has body: the below table is used to store my folder structure parent id associated with child id , the child id who dont have any parentid than it is 0, i want all folder structure of a particular user . # id, cid, pid, userid '1', '2', '1', '1' '2', '3', '2', '1' '3', '4', '8', '1' '4', '5', '3', '1' '5', '6', '3', '1' '6', '7', '6', '1' '7', '8', '7', '1' '8', '9', '7', '1' '9', '10', '8', '1' '10', '11', '0', '2' '11', '12', '11', '2' '12', '13', '0', '2' '13', '1', '0', '1' result set for user=1 select * from rec where userid=1 # id, cid, pid, userid '1', '2', '1', '1' '2', '3', '2', '1' '3', '4', '8', '1' '4', '5', '3', '1' '5', '6', '3', '1' '6', '7', '6', '1' '7', '8', '7', '1' '8', '9', '7', '1' '9', '10', '8', '1' '13', '1', '0', '1' now i need to generate a json hierarchy of this data like { 1:[{ 2:[( 3:[{ 5:[ ], 6:[{ 7:[{ 8:[{ 10:[] }], 9:[] }] }] }] }] }] }
has comment: http://stackoverflow.com/comment/42660998
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42660884
tagged with: directory-structure
type: Question
has title: creating folder structure hierarchy in json using mysql result set
tagged with: mysql

http://stackoverflow.com/q/27120526
tagged with: javascript
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/27120578
has body: I was wondering if its able to have a square that has a point on the right side of it something like this in just one css: http://prntscr.com/59wn94 I tried to make one just by using one div I wasn't able to manipulate enough its much easier for when creating a square then just add up a triangle right to it. but I want something that is on just on css like a combination of square and triangle-right. Here is my http://jsfiddle.net/wbZet/1311/ . I just improvised some fiddle to create this stuff. PLAY #triangle-up { width: 0; height: 0; border-left: 35px solid red; border-bottom: 25px solid transparent; border-top: 25px solid transparent; float: left; } #nav { float:left; display: block; height:50px; padding: 0px 10px; background: red; } #nav a { margin: 25px 0px; }
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27120578
score: 1
type: Question
has title: is it possible for a css sqaure/rectangle to have the right side to look like a triangle right

http://stackoverflow.com/q/27044806
score: 1
favorite count: 0
has title: Triggering a keyframe animation on a specific js variable value
has comment: http://stackoverflow.com/comment/42642497
type: Question
has body: I am writing a sequence of animations that I require to start when the value of the js variable (trigger) equals 1. Frankly, I don’t know where to start. A internet search has not helped! For a click event I’m using the following &lt;script type="text/javascript"&gt; jQuery(document).ready(function() { jQuery("#forwards").click(function() { jQuery("#stone").addClass("reveal"); jQuery("#forwards, #buttonbox").addClass("fadeOut"); jQuery("#cover_2").addClass("fadeIncover_2").css('z-index', '10'); jQuery("#left_plinth, #right_plinth, #left_pillar, #right_pillar, #head, #cornice, #cornice_minor_left, #cornice_minor_right, #innerbox, #messagebox").addClass("fadeIn"); jQuery("#screen").addClass("fadeOutSlower"); jQuery("#accessbox").addClass("expandScreen"); }); }); &lt;/script&gt; I’d really appreciate some help with this as my javascript knowledge is basic to say the least. Many thanks Philip Note. I have already posted this on one other site.
upvote count: 1
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/42608331
has comment: http://stackoverflow.com/comment/42667649

http://stackoverflow.com/a/27080434
answers question: http://stackoverflow.com/q/27080357
downvote count: 0
score: 5
type: Answer
has comment: http://stackoverflow.com/comment/42682607
has body: JavaScript does not have integer arithmetic, and all numbers are stored as 64-bit floats (double in Java). When JavaScript sees a bit-handling operator like &lt;&lt; or ^, it temporarily converts the operands to 32-bit integers to perform the arithmetic, but then converts them back to 64-bit float. Thus, the last multiplication is performed as a floating-point operation in JavaScript. In Java, it is still an integer operation. This code performs the same operation in Java (I have now tested it, and the result is the same): int n = 4451 + 554 * 57; n = n &lt;&lt; 13 ^ n; double x = n; System.out.println(x * (x * x * 15731 + 789221) + 1376312589); If you want JavaScript code that works the same as Java, you will need a way to perform multiplication and addition that works the same way as Java does when you overflow. That is, it must treat the results of all operations as if they were in the range -231 and 231-1. There really isn't a reliable way to do this in JavaScript using its native arithmetic; even if you give it two values that have only 31 significant bits, when you multiply them you will get 62 significant bits, while JavaScript's "number" type only has 52 bits, which means some bits will get lost. There may be a JavaScript library that would allow you to do this kind of exact integer arithmetic, but I'm not an expert on JavaScript frameworks so I don't know what that would be. Maybe someone else will chime in.
has comment: http://stackoverflow.com/comment/42671237
has comment: http://stackoverflow.com/comment/42670589
has comment: http://stackoverflow.com/comment/42670726
has comment: http://stackoverflow.com/comment/42670750
upvote count: 5
has comment: http://stackoverflow.com/comment/42671271
has comment: http://stackoverflow.com/comment/42672066

http://stackoverflow.com/q/27098360
tagged with: wicked-pdf
has body: I am using wkhtmltopdf 0.9.9. I need to know the offsetHeight of a dynamically generated HTML element; this is done via Javascript, before wkhtmltopdf converts to PDF file. However, I am noticing value difference when I tested it out in HTML and in PDF result. Here is the standalone test case: Test Hello Test Test Test Test Test In HTMl (via browser), the #test element contains value of 110. However, in the generated PDF, the #test element contains value of 343. How is this happening, and what could be the solution for this inconsistency?
has title: wkhtmltopdf offsetHeight difference
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/30162997
has answer: http://stackoverflow.com/a/28959656
type: UnansweredQuestion
tagged with: wkhtmltopdf
tagged with: javascript
type: Question
score: 0
answer count: 2

http://stackoverflow.com/comment/42756017
score: 0
comment on: http://stackoverflow.com/a/27128402
type: Comment
type: AnswerComment
has text: Actually the printing the text is just a test. Normally I would like to populate a javascript array. But this doesn't work either.

http://stackoverflow.com/comment/42784496
comment on: http://stackoverflow.com/q/27128321
has text: @ArabCheese Very well, I posted it as an answer for everyone's pleasure :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42779833
comment on: http://stackoverflow.com/q/27141117
score: 0
has text: Did you remove it from the route parameter in the `Html.BeginForm` method? The route values take precedence over the form values so it will always return the initial value of `@hdnCityAreaService` if you don't remove it.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42771721
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27092105
type: QuestionComment
has text: Exactly - see the _Poor Pedagogy_ section of the article. Anyway, this is no place to hold this discussion. Sorry if my comments offended you; I'll say no more.

http://stackoverflow.com/comment/42742470
score: 0
type: Comment
has text: Take a look to hammerJs
type: QuestionComment
comment on: http://stackoverflow.com/q/27120577

http://stackoverflow.com/q/27128411
tagged with: asp.net
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27128934
type: Question
tagged with: c#
has body: I have a problem, and looking for a solution for 2 days Target : Create/edit client... in HTML build a dialog with and asp fields with clientIDMode static &lt;div id="divDialog" runat="server" clientidmode="Static" style="display: none;"&gt; &lt;div class="DialogFields"&gt; &lt;asp:Label ID="Label1" runat="server" Text="Firstname"&gt;&lt;/asp:Label&gt; &lt;br /&gt; &lt;asp:TextBox ID="tbxFirstName" runat="server" ClientIDMode="Static"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; ... In script $("#btnShowDialog").click(function () { openDialog(); }); function openDialog() { $("#divDialog").dialog('open'); $("#divDialog").parent().appendTo($("form:first")); } When I click the button btnShowDialog it works fine... But Beneath it I have a gridview within it a edit button (asp:Linkbutton) with a event to the codebehind it looks like: &lt;asp:TemplateField&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton ID="Edit" OnCommand="Edit_Click" CommandArgument='&lt;%#Eval("RelationID") %&gt;' runat="server"&gt;&lt;img src="../images/Edit-item.png" alt="Edit" /&gt;&lt;/asp:LinkButton&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; In codebehind take the parameter from commandargument and fire LoadInfo (specific data to all the fields in de dialog). LoadInfo(e.CommandArgument != null ? int.Parse(e.CommandArgument.ToString()) : -1); but no way I get the dialog open. I tried ClientScript.RegisterStartupScript(this.GetType(), "Popup", "openDialog();", true); and ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "script", "openDialog();", true); after this LoadInfo, push btnShowDialog button and it opens the dialog and all data perfect in place. Also tried the other way around as Directly to Jquery function, get all data loaded and open the dialog. 2 problems, loading in codebehind was not even started before the dialog opens. and I only can get a static function in the codebehind. A lot of ground to cover for me, but can any body help me out (even for a part). ...Thanx
tagged with: javascript
tagged with: jquery
has title: Data from entity framework displayed in javascript/Jquery dialog
score: 0
answer count: 1

http://stackoverflow.com/comment/42635186
comment on: http://stackoverflow.com/q/27059802
type: QuestionComment
has text: try to use jquery `position` instead http://api.jquery.com/position/
score: 0
type: Comment

onclicklistener
tag name: onclicklistener
tags question: http://stackoverflow.com/q/27037272
type: Tag

extjs
tags question: http://stackoverflow.com/q/27108686
tags question: http://stackoverflow.com/q/27108078
tags question: http://stackoverflow.com/q/27109594
type: Tag
tags question: http://stackoverflow.com/q/27016894
tags question: http://stackoverflow.com/q/27030384
tags question: http://stackoverflow.com/q/27106084
tags question: http://stackoverflow.com/q/27151409
tags question: http://stackoverflow.com/q/27066966
tags question: http://stackoverflow.com/q/27027132
tags question: http://stackoverflow.com/q/27000332
tags question: http://stackoverflow.com/q/27123277
tags question: http://stackoverflow.com/q/27069808
tags question: http://stackoverflow.com/q/26997176
tags question: http://stackoverflow.com/q/27111263
tag name: extjs
tags question: http://stackoverflow.com/q/27007652
tags question: http://stackoverflow.com/q/27100740
tags question: http://stackoverflow.com/q/27052166
tags question: http://stackoverflow.com/q/27102400
tags question: http://stackoverflow.com/q/27040297
tags question: http://stackoverflow.com/q/27147334
tags question: http://stackoverflow.com/q/27033700
tags question: http://stackoverflow.com/q/27036843

http://stackoverflow.com/comment/42800952
type: Comment
type: QuestionComment
has text: Also how would I do if I wanted to assign 2 different results to two separate DIVs. As it is now I can only output the entire HTML result of the updating page.
comment on: http://stackoverflow.com/q/27148490
score: 0

http://stackoverflow.com/q/27027821
has answer: http://stackoverflow.com/a/27028436
type: Question
possible better answer: http://stackoverflow.com/a/27028427
answer count: 2
has answer: http://stackoverflow.com/a/27028427
accepted answer: http://stackoverflow.com/a/27028436
linked to: http://stackoverflow.com/q/14324451
tagged with: javascript
score: 0
has title: Angular JS Service DI from another module
tagged with: module
tagged with: angularjs
type: AnsweredQuestion
has body: I am running into an issue injecting a service from an angular js module into my main controller. I am getting this error: https://docs.angularjs.org/error/$injector/unpr?p0=aProvider%20%3C-%20a%20%3C-%20solrquery My code is below: var app = angular.module('app1',[ 'solr' ]); app.controller('app1cont', ['$scope', 'solrquery', function($scope,solrquery){ console.log("Start"); $scope.value = 1; solrquery('aaa'); }]); The solr module looks like this: var solr1 = angular.module('solr', []); solr1.run(function(){ console.log("Module Loaded"); }); solr1.service('solrquery',function(a) { console.log('searching for: ' + a); } ); When I run it, I see Module Loaded printed to the console and an error. If I remove the injection from the app.controller and solrquery('aaa'); the code runs fine... Spent several hours on this already, any help would be much appreciated. Thanks in advance. EDIT: Thanks to Anthony for the answer, after re-working the code, the module looks like this: var solr1 = angular.module('solr', []); solr1.run(function(){ console.log("Module Loaded"); }); //as a factory solr1.factory('solrquery',function() { return function(a) { console.log('searching for: ' + a); } } ); //as a service solr1.service('solrser', function() { this.test = function(a) { console.log(a); } }); And the controller: var app = angular.module('app1',[ 'solr' ]); app.controller('app1cont', ['$scope', 'solrquery', 'solrser', function($scope,solrquery,solrser){ console.log("Start"); $scope.value = 1; solrquery('a'); solrser.test('a'); }]);

http://stackoverflow.com/a/27102549
type: Answer
score: 6
has comment: http://stackoverflow.com/comment/42709019
upvote count: 7
has body: If by equality you mean the array contents have same elements in the same order, then the shortest (though not the fastest) way will be: JSON.stringify(array1) === JSON.stringify(array2) This will work with arrays of any dimensions. UPDATE: If you need a really fast algorithm then simple iteration will work better. However it is less fool-proof, hence to make it really safe and secure you'll need to spend more development time. Here is one possible solution for modern browsers: function equal(array1, array2) { if (!Array.isArray(array1) &amp;&amp; !Array.isArray(array2)) { return array1 === array2; } if (array1.length !== array2.length) { return false; } for (var i = 0, len = array1.length; i &lt; len; i++) { if (!equal(array1[i], array2[i])) { return false; } } return true; } The following JSPerf speed test shows the supremacy of this algorithm over the short JSON approach: http://jsperf.com/2d-array-comparion.
downvote count: 1
has comment: http://stackoverflow.com/comment/42709389
has comment: http://stackoverflow.com/comment/42709129
has comment: http://stackoverflow.com/comment/42710041
answers question: http://stackoverflow.com/q/27102507

http://stackoverflow.com/comment/42580356
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27028010
has text: thank you Mr six fingered man, you really helped me, especially with your manual delegation... And this is the test for class selectior and tag.class selector. http://jsperf.com/jquery-class-vs-tag-qualfied-class-selector/2. in this test, class selectors do better.
score: 0

http://stackoverflow.com/q/27148623
accepted answer: http://stackoverflow.com/a/27149434
has title: Transform Facebook fb:login-button into SDK javascript login
has body: I need a custom facebook login button. The fb:login-button solution with medium, large etc. is not what I need. I know the FB TOS. My button will be very similiar. How is it possible to tranform my button into a javascript onlick solution with a custom button? The "onlogin="top.location.href='example.com/facebook_connect.php" link is very important. Here my code: <fb:login-button scope="email, public_profile" size="xlarge" onlogin="top.location.href='example.com/facebook_connect.php'">Connect with Facebook</fb:login-button> Thank you very much.
has answer: http://stackoverflow.com/a/27148858
tagged with: javascript
has answer: http://stackoverflow.com/a/27149434
answer count: 2
tagged with: facebook-graph-api
favorite count: 0
tagged with: facebook
type: AnsweredQuestion
score: 2
linked to: http://stackoverflow.com/q/9769868
upvote count: 3
possible better answer: http://stackoverflow.com/a/27148858
downvote count: 1
type: Question

http://stackoverflow.com/a/27143745
answers question: http://stackoverflow.com/q/27143541
type: Answer
accepted answer of: http://stackoverflow.com/q/27143541
has comment: http://stackoverflow.com/comment/42784168
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42784280
has body: You can subscribe to any ko.observable or ko.observable array. WT.BM.BarsViewModel.BarsDataHolder.subscribe(function(newArray) { console.dir(newArray); }); you can find this in the knockout documentation on the observables page
has comment: http://stackoverflow.com/comment/42783909
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42784362
has comment: http://stackoverflow.com/comment/42784083

http://stackoverflow.com/q/27051849
score: 0
has answer: http://stackoverflow.com/a/27051929
linked to: http://stackoverflow.com/q/70579
type: AnsweredQuestion
has title: Getting Uncaught Error: Syntax error, unrecognized expression
linked to: http://stackoverflow.com/q/11982184
possible better answer: http://stackoverflow.com/a/27051936
has comment: http://stackoverflow.com/comment/42620879
type: Question
has answer: http://stackoverflow.com/a/27051936
answer count: 2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27051929
has body: I am trying get the value of Contact_LastName from the HTML pasted below but I am getting the following error Uncaught Error: Syntax error, unrecognized expression: div #u1@g.com Javascript : $('.rdContact').off("click").on("click", function (e) { e.preventDefault(); $(this).next("div").toggle(); $('.btn-success').off('click').on('click', function (e) { e.preventDefault(); var divId = $(this).closest('div').parent().attr('id'); var lnameval = $("div #"+ divId).closest('#Contact_LastName').val(); alert(lnameval); }); }); HTML : Last Name: First Name:

http://stackoverflow.com/comment/42659697
has text: Yes, but it's not as simple as replacing all commas with semicolons. pattern based matching couldn't tell the difference between commas between arguments and the actual comma operator. I want to convert it because of readability (with a large chunk of these, it's very hard to read)
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27073896

http://stackoverflow.com/comment/42748039
score: 0
type: Comment
type: QuestionComment
has text: <?php $data = json_decode(file_get_contents("php://input")); $uname = mysql_real_escape_string($data->uname); $uid = mysql_real_escape_string($data->uid); $uemail = mysql_real_escape_string($data->uemail); $servername = "localhost"; $username = "root"; $password = ""; $conn = mysqli_connect($servername, $username, $password); $db=mysqli_select_db($conn,'mydbtest'); $sql='INSERT INTO formdetails (firstName,lastName,enrollNumber) VALUES ("'.$uname.'","'.$uemail.'",'.$uid.')'; $inserts=mysqli_query($conn,$sql); echo "Record inserted successfully "; ?>
comment on: http://stackoverflow.com/q/27123641

http://stackoverflow.com/comment/42699575
type: Comment
type: QuestionComment
has text: Just a note: the max value you can get for `roll` is **6**.
comment on: http://stackoverflow.com/q/27096983
score: 0

http://stackoverflow.com/q/27033836
tagged with: payment-processing
downvote count: 0
score: 1
has title: how to check response of stripe transaction using simple form and js
tagged with: stripe-payments
favorite count: 0
accepted answer: http://stackoverflow.com/a/27046499
type: Question
tagged with: php
has body: I am trying to setup stripe checkout and i can get the payment form up and running just fine, however i need to redirect the user to another page only after payment has been successfull. This is the javascript I am using to display the form and to process it but I need to know how and where can i add the code of redirect? &lt;script src="https://checkout.stripe.com/checkout.js"&gt;&lt;/script&gt; &lt;button id="customButton" style="border: none" &gt;&lt;img src="/orange_pay_now.png" style="width: 265px;height: 66px;"&gt;&lt;/button&gt; &lt;script&gt; var handler = StripeCheckout.configure({ key: 'pk_test_..............', image: '/orange_pay_now.png', token: function(token) { // Use the token to create the charge with a server-side script. // You can access the token ID with `token.id` } }); document.getElementById('customButton').addEventListener('click', function(e) { // Open Checkout with further options handler.open({ name: 'Name of Product', description: 'description goes here', amount: 800, currency: 'GBP' }); e.preventDefault(); }); // Close Checkout on page navigation window.addEventListener('popstate', function() { handler.close(); }); &lt;/script&gt; I will really appreciate any assistance.
upvote count: 1
answer count: 1
tagged with: payment-gateway
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27046499

http://stackoverflow.com/a/27139956
has comment: http://stackoverflow.com/comment/101561918
has comment: http://stackoverflow.com/comment/101562444
has comment: http://stackoverflow.com/comment/101562493
has comment: http://stackoverflow.com/comment/101561284
has comment: http://stackoverflow.com/comment/101561215
has comment: http://stackoverflow.com/comment/95755606
has comment: http://stackoverflow.com/comment/101561267
has comment: http://stackoverflow.com/comment/101562316
has comment: http://stackoverflow.com/comment/101562309
has comment: http://stackoverflow.com/comment/101562510
type: Answer
score: 19
has comment: http://stackoverflow.com/comment/101562560
upvote count: 19
has comment: http://stackoverflow.com/comment/101562416
answers question: http://stackoverflow.com/q/27139725
has comment: http://stackoverflow.com/comment/101562640
accepted answer of: http://stackoverflow.com/q/27139725
has body: Browsers enforce "same-origin" access control unless the site explicitly allows cross origin requests (either via CORS or JSONP). So, if the site you are trying to access does not allow cross origin requests, then you cannot get the data directly from the site using only a browser. The browser is enforcing the same origin restrictions requested by the target site. This is NOT security for a server at all as there are many ways around it. It only applies to one specific type of access from a browser (though that one specific type of access protection is useful). This means to get the data into a browser you will need to use some sort of third party agent (other than the browser) that can get the data for you. The two most common ways of doing that are: Your own server. You make a request of your own server to get some content from some other server. Your server then fetches the data from the other server and returns it to you in the browser. A proxy server. There are some preconfigured proxy servers that are built just for doing what is described in option #1. You can either use a proxy service or install your own proxy server to do this for you or configure your own web server to have this capability. So, you can't bypass cross origin restrictions from a cooperating browser. But, you can bypass them from a server. This is because CORs restrictions are implemented only in the browser. They aren't a server-enforced restriction. The browser asks the target server what CORs policies are in play and enforces them in the browser only. Some other server making a request to that server does not need to pay any attention to CORs policies.
has comment: http://stackoverflow.com/comment/101561226
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/101560520

http://stackoverflow.com/a/27114675
upvote count: 1
type: Answer
has body: As I understand it, you want it so that when the page first loads, the image will be sized so it fills the full height of the browser. When the user resizes the browser afterwards, you want it to stay this size and not shrink or grow. If so, this can be done with a simple jQuery function that is only called when the document is first loaded. HTML &lt;img id="hero" src="http://placekitten.com/g/2000/3000"&gt; jQuery $(document).ready(function(){ $("#hero").css('height',$(window).height()); }); Live example: http://codepen.io/anon/pen/raVebQ
has comment: http://stackoverflow.com/comment/42732244
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27114405
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27114405

http://stackoverflow.com/q/27059555
type: Question
tagged with: connman
has comment: http://stackoverflow.com/comment/42695731
tagged with: javascript
has comment: http://stackoverflow.com/comment/42696432
tagged with: dbus
has answer: http://stackoverflow.com/a/27145487
downvote count: 0
answer count: 1
tagged with: wifi
has comment: http://stackoverflow.com/comment/42658096
score: 1
has body: Hi I have been having this problem for the last couple of days, while trying to connect to a protected WiFi network using dbus. So the code I have developed so far is: Register Agent var dbus = require('dbus-native'); var bus = dbus.systemBus(); bus.invoke({ destination: 'net.connman', path: '/', 'interface': 'net.connman.Manager', member: 'RegisterAgent', type: dbus.messageType.methodCall, signature: 'o', body: [ '/test/agent' ] }, function(error, response) { if (error) { console.error('Error', error); //process.exit(1); } else { console.info('Success', response); // process.exit(0); } }); Output &gt; Success Scan Wifi var dbus = require('dbus-native'); var bus = dbus.systemBus(); bus.invoke({ destination: 'net.connman', path: '/net/connman/technology/wifi', 'interface': 'net.connman.Technology', member: 'Scan', type: dbus.messageType.methodCall, }, function(error, response) { if (error) { console.error('Error', error); //process.exit(1); } else { console.info('Success', response); //process.exit(0); } }); Output &gt; Success Connect to WiFi Service var dbus = require('dbus-native'); var bus = dbus.systemBus(); bus.invoke({ destination: 'net.connman', path: '/net/connman/service/wifi_00e04c81923e_4469676957494649_managed_psk', 'interface': 'net.connman.Service', member: 'Connect', type: dbus.messageType.methodCall, }, function(error, response) { if (error) { console.error('Error', error); //process.exit(1); } else { console.info('Success', response); //process.exit(0); } }); Output &gt; Error ['Invalid Arguments'] Output fropm connMan logs connmand[1899]: src/agent.c:agent_receive_message() agent 0x55640fe8 req 0x55644378 connmand[1899]: src/service.c:request_input_cb() RequestInput return, 0x55649ad0 connmand[1899]:src/service.c:request_input_cb()error:org.freedesktop.DBus.Error.UnknownService connmand[1899]: src/service.c:__connman_service_return_error() service 0x55649ad0 error 22 user_data (nil) connmand[1899]: src/service.c:__connman_service_set_hidden_data() …
favorite count: 0
has comment: http://stackoverflow.com/comment/42658305
has comment: http://stackoverflow.com/comment/42657806
has comment: http://stackoverflow.com/comment/42657816
type: UnansweredQuestion
tagged with: node.js
has title: Node dbus-native - Passing Passphrase while connecting to WiFi service using connMan
upvote count: 1

http://stackoverflow.com/a/27007419
has body: I did not test your AJAX call but the String concatenation can be done like this: function xmlhttpcode() { var fooValue = "fooValueOfOne"; var barValue = "barValueOfTwo"; var url = "myfile.php?foo=" + fooValue + "&amp;bar=" + barValue; // verify your URL prints as desired alert(url); } xmlhttpcode();
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27007231
has comment: http://stackoverflow.com/comment/42545410

http://stackoverflow.com/q/26994623
has comment: http://stackoverflow.com/comment/42525121
type: Question
tagged with: javascript
has title: Google Maps API V3 Marker Cluster with filterable markers
tagged with: google-maps-api-3
tagged with: google-maps
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -3
has body: There are lots of questions on Stackoverflow where people have kindly helped fix issues with MarkerClusterer, however, I am using a great little project from Twilliamson90 over on Github. Basically, it has allowed me to do some nice filtering of the markers and allowed me to link in some nice external data sets. My issue now though is that I have too much data to easily display on the page without it looking too crowded. The obvioust solution is to add in marker clustering - unfortunately, I've not found it as easy as that. I've been through several tutorials but I just can't make it work with the filtering. I've pasted the javascript below, any help would be hugely appreciated. Hugely. var TEST_MAP = 'custom_style'; var myMap = function() { var featureOpts = [ { stylers: [ { hue: '#782B8B' }, { visibility: 'simplified' }, { gamma: 0.5 }, { weight: 0.5 } ] }, { elementType: 'labels', stylers: [ { visibility: 'off' } ] }, { featureType: 'water', stylers: [ { color: '#782B8B' } ] } ]; var options = { zoom: 7, center: new google.maps.LatLng(53.967397, -2.043457), streetViewControl: false, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }, mapTypeControl: false, mapTypeControlOptions: { mapTypeIds: [TEST_MAP] }, mapTypeId: TEST_MAP } /* Load the map then markers @param object settings (configuration options for map) @return undefined */ function init(settings) { map = new google.maps.Map(document.getElementById( settings.idSelector ), options); var styledMapOptions = { name: 'Custom Style' }; var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions); map.mapTypes.set(TEST_MAP, customMapType); markerLocation = settings.markerLocation; loadMarkers(); } /* ======= MARKERS ======= */ markers = {}; markerList = []; /* Load markers onto the Google Map party a provided array or demo personData (data.js) @param array personList [optional] (list of people to load) @return undefined */ function loadMarkers(personList) { // optional argument …
downvote count: 3
has answer: http://stackoverflow.com/a/26995676

http://stackoverflow.com/comment/42590803
type: Comment
has text: I've tried altering the event as you suggested, but the count still remains blank until the first scroll event, I'm not sure if it's the syntax causing the issue. See http://jsfiddle.net/1pv3e87t/10/
type: AnswerComment
comment on: http://stackoverflow.com/a/27034838
score: 0

http://stackoverflow.com/q/27052249
tagged with: requestanimationframe
has comment: http://stackoverflow.com/comment/42622649
tagged with: javascript
linked to: http://stackoverflow.com/q/1060008
has body: From what I have read requestAnimationFrame can tell when the browser loses focus. Is there some kind of event that fires when this occurs? I'm looking to pause and resume code in connection with requestAnimationFrame.
upvote count: 3
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42622178
favorite count: 0
has answer: http://stackoverflow.com/a/27053071
has comment: http://stackoverflow.com/comment/42622781
has title: requestAnimationFrame - Tell when browser loses focus
has comment: http://stackoverflow.com/comment/42623084
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42622651
has comment: http://stackoverflow.com/comment/42622343
score: 3
has comment: http://stackoverflow.com/comment/42621983
has comment: http://stackoverflow.com/comment/42622415
type: Question
has comment: http://stackoverflow.com/comment/42622689
has comment: http://stackoverflow.com/comment/42622467

http://stackoverflow.com/a/27072249
upvote count: 1
has body: I found the answer while writting the question :) It seems like if I simply use items as the key for the children, I don't need to specify the schema.model.children option so the tree still works with remote data: homogeneous.pushCreate( {"EmployeeId":2,"FullName":"Andrew Fuller","HasEmployees":true,"ReportsTo":null, "items": [ {"EmployeeId":1,"FullName":"Nancy Davolio","HasEmployees":false,"ReportsTo":2}, {"EmployeeId":3,"FullName":"Janet Leverling","HasEmployees":false,"ReportsTo":2}, {"EmployeeId":4,"FullName":"Margaret Peacock","HasEmployees":false,"ReportsTo":2}, {"EmployeeId":5,"FullName":"Steven Buchanan","HasEmployees":true,"ReportsTo":2}, {"EmployeeId":8,"FullName":"Laura Callahan","HasEmployees":false,"ReportsTo":2} ] } ); Here's the working example. I don't know if that's and unintended feature but works for adding a whole subtree to the root (which solves my problem). However the question still stands, can I use pushCreate to add a child element to another one?
score: 0
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/52176985
answers question: http://stackoverflow.com/q/27072248

http://stackoverflow.com/q/27037182
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/27039654
type: AnsweredQuestion
upvote count: 1
type: Question
has body: When I have a stream of objects, e.g. values = Bacon.fromArray([ {'status':"active"}, {'status':"inactive"} ]); I can apply a short form filter, like this: activeStates = values.filter( ".status", "active" ); But when the original stream contains only primitives: states = Bacon.fromArray( ["active", "inactive" ] ); Then I can no longer use that form, and I have to write a function literal. I have tried using ".", "", null, for the property name argument but that doesn't work. I can define a function like this: function equals( val ){ return function( obj ){ return obj === val; } } And then write: activeStates = values.filter( equals( "active" ) ); Is this the best I can do? Or is there either a Bacon function that I'm missing, or a common lodash function that saves me from writing my own equals function?
has title: How to filter a stream using short syntax, when the values are primitives
tagged with: bacon.js
score: 1
has answer: http://stackoverflow.com/a/27039654
downvote count: 0
answer count: 1

linechart
tag name: linechart
type: Tag
tags question: http://stackoverflow.com/q/27117022

http://stackoverflow.com/comment/42555362
comment on: http://stackoverflow.com/a/27014597
score: 0
type: AnswerComment
type: Comment
has text: Its in the body of the linked HTML We have a HTML, the "Home HTML", its the main page. There is a button which should load a new page, the linked HTML and then it should display a Calculator. But the Buttons of the Calculator wont work, whatever we do, it doesnt work. I can upload the full App Folder if somebody needs it

http://stackoverflow.com/comment/42637492
score: 1
comment on: http://stackoverflow.com/q/27052166
type: Comment
type: QuestionComment
has text: Btw. I would recommend to read .sencha/app/microloader/production.js in your Touch project directory. That should make it clear what happens under the hood. :)

http://stackoverflow.com/q/27060321
type: Question
has comment: http://stackoverflow.com/comment/42635149
has answer: http://stackoverflow.com/a/27060793
has comment: http://stackoverflow.com/comment/42635450
score: -2
has comment: http://stackoverflow.com/comment/42635362
tagged with: javascript
has comment: http://stackoverflow.com/comment/42636184
answer count: 2
upvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/27060793
has comment: http://stackoverflow.com/comment/42635101
has comment: http://stackoverflow.com/comment/42635097
accepted answer: http://stackoverflow.com/a/27060803
has body: I have 3 tabs and depending on which tab is click I want the form action to change. I have this: $('#myTab li').click(function(){ if ($('#action1').hasClass('active')){ $('#my-form').attr('action', '/order/signup1') } else if ($('#action2').hasClass('active')){ $('#my-form').attr('action', '/order/signup2') } else if ($('#action3').hasClass('active')){ $('#my-form').attr('action', '/order/signup3') } });` Is actually happening is that the first changes the action to the wrong form action, then the second click corrects the form action. I need this to be correct form the first click.
type: AnsweredQuestion
has title: click function needs 2 clicks
downvote count: 2
has answer: http://stackoverflow.com/a/27060803

http://stackoverflow.com/comment/42798713
type: Comment
type: QuestionComment
has text: change the callback function to `function(err, data)`.. the data parameter will have the id of the user saved
score: 1
comment on: http://stackoverflow.com/q/27151993

http://stackoverflow.com/a/27087715
type: Answer
answers question: http://stackoverflow.com/q/27087548
score: 2
upvote count: 2
has body: First create a function to set cookies: function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires; } Then, a function to get a cookie: function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i&lt;ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) != -1) return c.substring(name.length,c.length); } return ""; } and finally, check if cookie is set or else do the work and set the cookie function checkCookie() { var lightbox = getCookie("lightbox"); if (lightbox === "") { // Cookie not set lightbox_open(); setCookie("lightbox", "seen", 7); } }
downvote count: 0

http://stackoverflow.com/q/27076333
favorite count: 0
has comment: http://stackoverflow.com/comment/42663566
has comment: http://stackoverflow.com/comment/42663573
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27077240
accepted answer: http://stackoverflow.com/a/27077240
has answer: http://stackoverflow.com/a/27076477
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42663595
has body: I'm using this command : $( "#result" ).load( "ajax/test.html" ); to load html page's content into div. My question is how to know what I entered after I enterd it. A function that return the html page that is already inside the div.
type: Question
has title: What page is loaded in div
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42663777
possible better answer: http://stackoverflow.com/a/27076477
has comment: http://stackoverflow.com/comment/42663602
has comment: http://stackoverflow.com/comment/42663563
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42663723
has comment: http://stackoverflow.com/comment/42663636
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27120248
type: Question
tagged with: c#
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/42742745
score: 1
has comment: http://stackoverflow.com/comment/42741869
has title: Date does not validate with given Format value (MVC 4)
tagged with: validation
downvote count: 0
has body: The View Model: [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)] [Required(ErrorMessage = "*")] public DateTime? TransferDate { get; set; } The Javascript $("#TransferDate").datepicker({ dateFormat: 'mm/dd/yy' }); The View @Html.EditorFor(model => model.TransferDate) Although I have also change the culture information in Web.Config <globalization uiCulture="en-US" culture="en-US"/> Reference to this post validating date format not working But still validation is coming false and Model Value coming NULL. Kindly Suggest me some solution
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42750283
has comment: http://stackoverflow.com/comment/42743306
has comment: http://stackoverflow.com/comment/42742035
has comment: http://stackoverflow.com/comment/42747967
tagged with: asp.net-mvc-4
linked to: http://stackoverflow.com/q/21563388
answer count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/27108082
linked to: http://stackoverflow.com/q/368280
downvote count: 1
tagged with: c#
type: AnsweredQuestion
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/42719274
has comment: http://stackoverflow.com/comment/42719191
has comment: http://stackoverflow.com/comment/128711981
has comment: http://stackoverflow.com/comment/42719287
upvote count: 18
has title: C# Dictionary equivalent in JavaScript
type: Question
has answer: http://stackoverflow.com/a/27109417
tagged with: asp.net-web-api
tagged with: javascript
favorite count: 0
has body: Is there exist any kind of c# dictionary in JavaScript. I've got an app in angularjs that requests data from an MVC Web Api and once it gets, it makes some changes to it. So the data is an array of objects, which is stored in the MVC Web Api as a Dictionary of objects, but I convert it to list before passing it throug network. If I convert the Dictionary directly to JSon I get something like: array = [ {Id:"1", {Id:"1", Name:"Kevin Shields"}}, {Id:"2", {Id:"2", Name:"Natasha Romanoff"}} ]; Well the objects are a little more complex, but you've got now an idea. The problem is that this format is even harder to operate with (I've got alphabetical keys or ids). So is there any equivalent to a dictionary? It's quite simple to do thing like: Object o = dictionary["1"]; So that's it, thank in advance.
possible better answer: http://stackoverflow.com/a/46547616
has answer: http://stackoverflow.com/a/27109383
has answer: http://stackoverflow.com/a/46547616
tagged with: dictionary
accepted answer: http://stackoverflow.com/a/27109417
answer count: 4
score: 17
has answer: http://stackoverflow.com/a/27121494

http://stackoverflow.com/comment/42754838
type: Comment
has text: I guess this needs a extra function that search for the text and identify the node then apply the wrap. The code is mostly like a guess.
type: AnswerComment
comment on: http://stackoverflow.com/a/27123650
score: 0

http://stackoverflow.com/comment/42772043
type: Comment
type: QuestionComment
has text: I originally had the target="_blank", but didn't know about the a:visited feature, so thank you! I do still like the JS implementation a little better on a personal level of scripting style and preferences.
comment on: http://stackoverflow.com/q/27133129
score: 0

http://stackoverflow.com/q/27097571
tagged with: code-formatting
score: 14
type: AnsweredQuestion
has title: Auto indent method chaining in Sublime Text 3
downvote count: 0
tagged with: auto-indent
has answer: http://stackoverflow.com/a/35381840
type: Question
tagged with: sublimetext
has comment: http://stackoverflow.com/comment/46272166
has body: As I type the following javascript code (exact keystrokes): myObject .doSomething() .doSomethingElse(); I'd expect it to automatically become the following... myObject .doSomething() .doSomethingElse(); ... as would any other programmer, right? How do I enable this, and why isn't it enabled by default?
tagged with: javascript
upvote count: 14
accepted answer: http://stackoverflow.com/a/31766413
answer count: 2
tagged with: sublimetext3
possible better answer: http://stackoverflow.com/a/35381840
favorite count: 0
has answer: http://stackoverflow.com/a/31766413

http://stackoverflow.com/q/26997141
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26997253
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42526012
has title: Javascript instance variable showing as undefined
answer count: 3
linked to: http://stackoverflow.com/q/3127429
favorite count: 0
has answer: http://stackoverflow.com/a/26997236
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42524861
upvote count: 1
has comment: http://stackoverflow.com/comment/42526783
tagged with: oop
linked to: http://stackoverflow.com/q/4886632
has body: I have created a Javascript object that adds a click listener onto certain classes which then in turn calls a PHP function to generate results from a MYSQL/PHP driven backend. The backend is working fine (and the results are being returned correctly). I am having an issue where the instance thinks that a property (a string) of the instance is empty, even after I have directly assigned values to that property. Here is my code: //Workout Videos Class var Workout = function(offset, limit, element, categoryId) { this.offset = offset; this.html = ""; this.limit = limit; this.element = element; this.categoryId = categoryId var self = this; jQuery(this.element).on("click", function(e) { e.preventDefault(); self.seeMoreClick(this, self.videoCallBack, self) }); } Workout.prototype.seeMoreClick = function(item, videoCallBack, thisArg) { jQuery.ajax({ type : 'POST', dataType : 'json', url : 'api/get-videos', data : 'category_id=' + this.categoryId + "&offset=" + this.offset + "&limit=" + this.limit, success : function(data) { videoCallBack.call(thisArg, data, item); } }); } Workout.prototype.videoCallBack = function(response, item) { this.offset = response.offset; if(response.videos) { jQuery(response.videos).each(function(key, video) { this.html += " "; this.html += ''; this.html += ' '; this.html += ' ' + video.videoName + ' '; this.html += ' ' + video.videoDesc + ' '; this.html += ' Equipment: '; jQuery(video.equipment).each(function(equipKey, equipmentItem) { this.html += '' + equipmentItem.equipmentName + ''; }); this.html += " "; this.html += ' '; this.html += " "; this.html += ' '; this.html += " "; }); } else { this.html += " No more videos to show "; } console.log(this.html); jQuery("#" + jQuery(this.element).attr("data-related") + " .col-md-8").append(this.html); } The problem I am having is in the 'videoCallBack' function which I am using to pass to the AJAX function in order to ensure it resolves before all the code is run. The 'this.html' property is showing as em…
has answer: http://stackoverflow.com/a/26997260

http://stackoverflow.com/comment/42666846
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27078314
has text: Given that your function is called from the form's `onsubmit`, what effect do you think programmatically pressing the submit button will have? Please describe what you are trying to achieve from the user's point of view.
type: Comment

http://stackoverflow.com/a/27019527
type: AcceptedAnswer
downvote count: 0
has body: You could just try e.preventDefault. From the jQuery documentation we have this Description: If this method is called, the default action of the event will not be triggered. So, if you change your code to the following: $(document).on('click', '#btnSelectAll', function (event) { event.preventDefault(); var $modal = $('#MyPanel'); $modal.find('#aCheckBox').prop('checked', true); }); your problem will be solved.
type: Answer
answers question: http://stackoverflow.com/q/27019369
upvote count: 5
accepted answer of: http://stackoverflow.com/q/27019369
score: 5

http://stackoverflow.com/q/27028595
tagged with: sails.js
has title: Sails.js how to set up HTML 5 App-Cache?
tagged with: javascript
upvote count: 2
has body: Anyone know of a guide, sample project, blog post, or something in the Sails docs about the best practice for configuring the app-cache? Cheers, JL
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
score: 2
answer count: 0
tagged with: html5-appcache
type: Question

http://stackoverflow.com/a/27024256
has comment: http://stackoverflow.com/comment/42572657
downvote count: 0
has comment: http://stackoverflow.com/comment/42572481
has body: The problem is that you need to run the datepicker() init AFTER the element gets compiled. So you should do it after you replace the actual html. The code you have above runs one time on page load (or wherever it is) and won't create datepickers for html elements created AFTER that point. backendApp.directive('customHtml', function($compile, $http){ return { link: function($scope, element, attrs) { $http.get(attrs['url']).then(function (result) { element.html(result.data); element.replaceWith($compile(element.contents())($scope)); // DO DATEPICKER INIT HERE ON NEW ELEMENT }); } } }); The better way to do it is a datepicker directive so you know the datepicker element has been compiled before you init it (in the link function) backendApp.directive('myDatepicker', function($compile, $http){ return { link: function($scope, element, attrs) { // ONLY JOB IS INITING DATE PICKER HERE } } });
answers question: http://stackoverflow.com/q/27024129
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42572732
type: Answer
accepted answer of: http://stackoverflow.com/q/27024129
has comment: http://stackoverflow.com/comment/42572380
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42573237

http://stackoverflow.com/a/27020605
score: 1
downvote count: 1
has body: Check that your css isn't overriding the cursor. If you add a rule like a { cursor: pointer; } that should make your cursor into the hand when you hover over a link.
accepted answer of: http://stackoverflow.com/q/27020563
has comment: http://stackoverflow.com/comment/42566276
answers question: http://stackoverflow.com/q/27020563
type: AcceptedAnswer
type: Answer
upvote count: 2

http://stackoverflow.com/comment/42530643
has text: Or something horrible with Ajax and datastring images
type: Comment
comment on: http://stackoverflow.com/a/27000206
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42580742
has text: So you can combine this script with http://stackoverflow.com/questions/14771521/how-to-check-if-the-element-has-multiple-css-class-in-jquery
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27028972

http://stackoverflow.com/comment/42636721
comment on: http://stackoverflow.com/q/27060930
type: Comment
type: QuestionComment
has text: Can you link to the contents of the combined JS?
score: 0

http://stackoverflow.com/comment/55617169
type: Comment
score: 1
has text: Please include the content you are linking directly in your answer; links rot.
comment on: http://stackoverflow.com/a/27056743
type: AnswerComment

http://stackoverflow.com/comment/42724652
score: 0
type: AnswerComment
type: Comment
has text: sir please see it now (not working) bdshowbiz.com/loginfinal/demo.php
comment on: http://stackoverflow.com/a/27108585

http://stackoverflow.com/comment/42647702
comment on: http://stackoverflow.com/q/27066661
has text: Does Google read JavaScript generated markup?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27107494
accepted answer: http://stackoverflow.com/a/27107822
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has body: I have the following view HTML Upload and the script My controller method is [AllowAnonymous] public async Task<ActionResult> Upload(string fileName) { string path = @"C:\GambitTests\blue-g-logo.jpg"; // Do stuff. return RedirectToAction("Index", "Tools"); } this method fires but I am not getting the text from the input box and fileName is null. What am I doing wrong here how can I pass the text from the input control to this method? Thanks for your time.
has title: Button Click Event not Passing input String to MVC Controller Method
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27107822
has comment: http://stackoverflow.com/comment/42718502
type: AnsweredQuestion

http://stackoverflow.com/comment/42709440
score: 0
type: AnswerComment
type: Comment
has text: Not sure what language that's meant to be (the question is about JavaScript), but other than relying on overloading (which JS doesn't have), certainly the above has the advantage of early termination.
comment on: http://stackoverflow.com/a/27102807

apache
tag name: apache
tags question: http://stackoverflow.com/q/27101875
type: Tag

http://stackoverflow.com/comment/42720280
score: 0
type: QuestionComment
has text: see this tutorial https://docs.angularjs.org/tutorial/step_10
comment on: http://stackoverflow.com/q/27108462
type: Comment

http://stackoverflow.com/comment/42652535
type: Comment
comment on: http://stackoverflow.com/q/27069880
has text: That's not HTML encoding that's URI encoding
score: 0
type: QuestionComment

http://stackoverflow.com/a/27021805
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42567913
has comment: http://stackoverflow.com/comment/127138621
type: AcceptedAnswer
upvote count: 3
has body: I think the CSS you provided might be missing something, but I think I understand what's happening. When you scroll the page passed the height of your header, you set it to position:fixed. By doing this, you remove some of the height of the page, which means jQuery(window).scrollTop() changes (scrollTop is now lower than your header height - 42). This is what causes it to constantly flicker between addClass("stick") and removeClass("stick"), causing that "jumpy" feeling. You need to add a placeholder that's the same height as the header when you stick the header to the top. With the CSS you gave me, that height was 80px. So I added padding to the top of your content to compensate. $(function() { jQuery(window).scroll(function(){ var top = jQuery(window).scrollTop(); if(top&gt;42) { // height of float header jQuery('#header_stick').addClass('stick'); jQuery('.width-container').css("paddingTop", "80px"); } else { jQuery('#header_stick').removeClass('stick'); jQuery('.width-container').css("paddingTop", "0px"); } }); }); See an example here: http://jsfiddle.net/hzn6map1/
accepted answer of: http://stackoverflow.com/q/27020723
answers question: http://stackoverflow.com/q/27020723
type: Answer
has comment: http://stackoverflow.com/comment/42569362

http://stackoverflow.com/q/27127087
has comment: http://stackoverflow.com/comment/42754443
answer count: 2
tagged with: text
has answer: http://stackoverflow.com/a/27127112
score: 0
has comment: http://stackoverflow.com/comment/42754332
has comment: http://stackoverflow.com/comment/42754361
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42754494
tagged with: javascript
type: UnansweredQuestion
has body: I've following HTML code: &lt;div class="modal-body"&gt; &lt;p style="text-align: justify;"&gt;Some text paragraph&lt;/p&gt; &lt;br/&gt; &lt;form&gt;&lt;/form&gt; &lt;/div&gt; I want to add following HTML dynamically to above HTML after &lt;br/&gt;. How should I do? &lt;div class="alert alert-danger alert-dismissible" role="alert"&gt; &lt;button type="button" class="close" data-dismiss="alert"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; response&lt;!-- response is the variable containing the text to be added---&gt; &lt;/div&gt;
has title: How to add text between div using jQuery?
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27127108

http://stackoverflow.com/q/27018073
favorite count: 0
has comment: http://stackoverflow.com/comment/42561395
tagged with: angularjs
has body: I have a complex structure of data (products of a shopping cart), like this: items = [ { id_product: 5, combinations: [ { id_product_attribute: 35, quantity: 1, price: 25.60 }, { id_product_attribute: 38, quantity: 4, price: 25.60 } ] }, { id_product: 5, combinations: [ { id_product_attribute: 35, quantity: 1, price: 28.60 } ] } ]; I also have a ng-repeat that lists, in a li elements, every combination of a product retrieved from a $resource. Each li element looks like this: Combination {{ combination.id }} - Price {{ combination.price }} - In your shopping cart {{ function_goes_here(product.id, combination.id) }} I'm wondering if it's possible to write some kind of function that would search in the shopping cart data structure (by product id and combination id) and return the quantity element, in a such way that would update the view if another combination of the same type is added to the shopping cart?
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42563302
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27018361
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Setting a function as a ng-model
score: 0
accepted answer: http://stackoverflow.com/a/27018361

http://stackoverflow.com/a/27072864
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27072733
has body: There are many differents in the way of instantiating objects that are created and accessed from these functions. For example: function createFoo(){ var _foo = { id: 1 }; return _foo; } var foo = createFoo(); If you want to get value of id property, you have to iterate over properties in foo object, like this: for(var prop in foo){ //if you want to set new value then foo[prop] = 5; //then getting value is like this console.log(foo[prop]); } In your second example it is different in way of getting/setting value: function Foo(){ this.id = 1; } var foo2 = new Foo(); foo2.id = 2;//set new value console.log(foo2.id); That is all I can think of.

http://stackoverflow.com/q/27066678
has body: Is there anyway with JavaScript to add an additional class to every element that has a certain class on the page. So for example: Button but I want to manipulate this so it adds a class (with a counter to the end)
tagged with: css
has title: Append class based on originating class name
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27066742
type: Question
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/27066742
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/26998033
has answer: http://stackoverflow.com/a/33925089
has body: I'm getting the following error on a hasMany call using Bookshelf: A valid target model must be defined for the roles hasMany relation Role.js var Data = require('../server-includes/Data'), User = require('./User'); var Role = Data.bookshelf.Model.extend({ tableName: 'roles', users: function() { return this.hasMany(User, 'role_id'); } }); module.exports = Role; User.js var Data = require('../server-includes/Data'), Role = require('./Role'); var User = Data.bookshelf.Model.extend({ tableName: 'users', role: function() { return this.belongsTo(Role, 'id'); }, }; module.exports = User; Usage: new Role({ id: req.params.id }) .fetch({ require: true, withRelated:['users'] }) .then(function (role) { role.users().fetch().then(function(users) { console.log('users: ' + users); }); })
type: Question
has answer: http://stackoverflow.com/a/26998548
tagged with: bookshelf.js
tagged with: javascript
answer count: 2
has title: bookshelf.js relationship hasMany error
tagged with: relationship
downvote count: 0
favorite count: 0
type: UnansweredQuestion
score: 6
upvote count: 6
tagged with: node.js

http://stackoverflow.com/comment/63990328
score: 1
comment on: http://stackoverflow.com/a/27069634
type: AnswerComment
has text: `indexOf(anything) === false` will actually never work. Not finding anything will return -1
type: Comment

http://stackoverflow.com/a/27072026
score: 1
upvote count: 1
has body: Arrays in JS can be of any size and any type. You can combine number and strings in array. var twoDArray = [[1], ["one", "two"], ["i", "ii", "iii"]]; for(var i = 0; i &lt; twoDArray.length; i++) { for(var j = 0; j &lt; twoDArray[i].length; j++) { print(twoDArray[i][j]); } } var threeDArray = [[["1.1.1", "1.1.2"], ["1.2.1", "1.2.2"]], [["1.2.1", "1.2.2"], ["1.2.1", "1.2.2"]], [["2.1.1", "2.1.2"], ["2.2.1", "2.2.2"]], [["2.2.1", "2.2.2"], ["2.2.1", "2.2.2"]]]; for(var i = 0; i &lt; threeDArray.length; i++) { for(var j = 0; j &lt; threeDArray[i].length; j++) { for(var k = 0; k &lt; threeDArray[i][j].length; k++) { print(twoDArray[i][j][k]); } } }
type: Answer
has comment: http://stackoverflow.com/comment/42664277
answers question: http://stackoverflow.com/q/27071720
downvote count: 0

http://stackoverflow.com/a/27038952
upvote count: 1
answers question: http://stackoverflow.com/q/27038855
downvote count: 0
score: 1
has body: If you are using .animate() function, you need to insert .stop(true) before .animate(), so it will look like this .stop(true).animate(); You can use .stop() on any function with animations. I guess that is your problem.
type: Answer

sapui5
tags question: http://stackoverflow.com/q/27110194
tags question: http://stackoverflow.com/q/27124995
tags question: http://stackoverflow.com/q/27135788
tag name: sapui5
type: Tag
tags question: http://stackoverflow.com/q/27148363
tags question: http://stackoverflow.com/q/27095330

http://stackoverflow.com/q/27070742
tagged with: javascript
has comment: http://stackoverflow.com/comment/42654985
score: 0
tagged with: jquery
has body: My game I've been working on for quite a while now is running into an issue. I am ready to add in level 2 so when you complete level 1 it takes you back to the main menu. The problem is that if you try and click level one again it will not load? Is it because I'm not calling another one of my functions that I'm supposed to? Below is some code as well as the link to my fiddle. if (collides($('#nineObs'), $('#player'))) { $('#levelOne').stop(); $('#player').css('border', 'solid 1px yellow'); $('#nineObs').css('border', 'solid 1px yellow'); $('#levelComplete').show(); $('#levelOne').hide(); $('#GameOver').hide(); $("#mainMenu").show(); $('#level2').show(); } Thanks
favorite count: 0
type: UnansweredQuestion
answer count: 0
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/42654544
type: Question
has comment: http://stackoverflow.com/comment/42654483
has title: Javascript game development having an issue
has comment: http://stackoverflow.com/comment/42654503
has comment: http://stackoverflow.com/comment/42654516
has comment: http://stackoverflow.com/comment/42654426

http://stackoverflow.com/comment/42750953
type: AnswerComment
has text: Thank you for your response, but still not getting anything after the first "else if" statement even with ==
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27125438

http://stackoverflow.com/comment/42528872
has text: did you add jquery.js ? Parsley relies on jQuery (>= 1.8), and it would need to be included before including Parsley.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26999206
score: 1

http://stackoverflow.com/comment/42776336
has text: For example if you click the "the line selection i should be able to hide some options in the quantity.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27139202

http://stackoverflow.com/comment/42546573
comment on: http://stackoverflow.com/q/27009161
has text: Why are you calling `e.preventDefault()` on all `` tags. This prevents the redirect!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42547796
type: Comment
has text: I understand what you are saying but I am not sure how to implement it. The promise object is only called in MainController which doesn't have any idea about the existence of OtherController (the one that controls modal). How do I do "display if user click but only if data is available, if data isn't available display after the data is available" in the OtherController. Thank you for your help!
comment on: http://stackoverflow.com/a/27010036
type: AnswerComment
score: 0

http://stackoverflow.com/a/27049196
answers question: http://stackoverflow.com/q/27048839
type: Answer
has body: One potential solution is this: https://stackoverflow.com/a/7828579/1742747 Which is to detect navigator.userAgent.match(/mobile/i) and make a determination about which listener to apply based on that. fiddle: http://jsfiddle.net/dira/Ke2px/2/
score: 0

http://stackoverflow.com/comment/42980681
comment on: http://stackoverflow.com/a/27213906
type: AnswerComment
score: 0
type: Comment
has text: Did you play with suggested JS, where did you place it? It must be loaded by browser before ajax call. Did you specify '.elementCausingEvent' correctly? Try to use `console.log()` inside callback, to recognize, if it was called.

http://stackoverflow.com/a/27007724
has body: You need to handle the event object that is automatically passed into the submit handler and call preventDefault(). Example: var myForm = document.forms["contact-me"]; myForm.onsubmit = function(e) { if(!warnsub()) { e.preventDefault(); } } As @Pointy has commented: IE9 does not automatically pass the event object to the onsubmit delegate. Discussion of how to shiv this is outside the scope of this question. But just a side note - its good to try and avoid function calls in inline html (e.g. &lt;form onsubmit=//your function() /&gt; calls. Your Google-Fu can teach you why.
has comment: http://stackoverflow.com/comment/42544059
score: 2
has comment: http://stackoverflow.com/comment/42544181
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27007709
upvote count: 2

http://stackoverflow.com/comment/42714563
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27105522
has text: But in this case when I instantiate the new Audio object, I'm already setting the source: var audio = new Audio(source); Or not?
score: 1

http://stackoverflow.com/comment/42550247
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27011690
has text: @Brij Raj Singh i tried but it isn't working

http://stackoverflow.com/comment/42899105
comment on: http://stackoverflow.com/q/27116221
score: 0
type: Comment
type: QuestionComment
has text: @David: here is my website, you will see why I want to avoid "standard" browser zooming : http://bigpicture.bi/demo

http://stackoverflow.com/comment/42788989
type: AnswerComment
comment on: http://stackoverflow.com/a/27146723
score: 0
type: Comment
has text: Please explain what you did and why it will fix the problem.

http://stackoverflow.com/comment/42823112
type: QuestionComment
comment on: http://stackoverflow.com/q/27148032
has text: @Lueschee you happen to have it on some jsfiddle or similar?
score: 0
type: Comment

http://stackoverflow.com/q/27111255
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27111327
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27111412
has body: I've tested this code in an old IE and it works, but on everything else that is modern it seems not to work. The thing is it works only if the textarea hasn't been modified in any way, then after that it doesn't work. Any changes to the page and suddenly it ceases to function. Click me to clear area Any idea what could be causing this?
score: -1
has title: innerHTML not changing the innerHMTL
tagged with: innerhtml
downvote count: 2
possible better answer: http://stackoverflow.com/a/27111424
answer count: 3
has comment: http://stackoverflow.com/comment/42725490
upvote count: 1
has answer: http://stackoverflow.com/a/27111424
has answer: http://stackoverflow.com/a/27111327
tagged with: javascript

http://stackoverflow.com/q/27007443
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/27007557
has title: SVG Marker Not Working
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
has body: I've got a little issue with a marker that I can't seem to resolve. The marker-end isn't rendering: Here's the code responsible for defining the marker itself: this.svg.insert('defs', ':first-child') .append('marker') .attr('id', 'arrow') .attr('markerUnits', 'strokeWidth') .attr('markerWidth', 12) .attr('markerHeight', 12) .attr('viewBox', '0 0 12 12') .attr('orient', 'auto') .append('path') .attr('d', 'M0, 0 V12 L12,12 Z'); Then here's where I render a line and reference the marker (the x/y coords of the line are set later). this.line = container.append('line') .classed('arc', true) .attr('marker-end', 'url(#arrow)'); And lastly LESS related to the marker and arc: #arrow { stroke-fill: @light-gray; fill: @light-gray; stroke-width: 2px; } .arc { stroke: @light-gray; stroke-width: 4px; &amp;:hover { stroke: @orange; } } I appreciate any help! Thanks.
tagged with: d3.js
upvote count: 3
has answer: http://stackoverflow.com/a/27007557

http://stackoverflow.com/q/26999227
has comment: http://stackoverflow.com/comment/42533177
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27004601
has body: I have a property in my viewModel seeing if my application is either open or closed. Based on that variable it will show a different interface to the user (open hours if closed or the actual application). My question is is there a way to check and see if that variable has changed in the viewmodel and if it has refresh the page? My viewModel property looks kind of like this viewModel.Open = ko.observable(this.base.get('Status')); I was playing with a timer function, but I'm not really keen on putting a function like that within my createViewModel. Any ideas?
tagged with: backbone.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42531718
has comment: http://stackoverflow.com/comment/42530025
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/42532397
type: Question
has title: Detecting if viewModel property changes without refreshing
has comment: http://stackoverflow.com/comment/42709092
has comment: http://stackoverflow.com/comment/42531549
tagged with: javascript

http://stackoverflow.com/q/27009540
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has body: I've used this all the time in the past without any problems. I can't seem to figure out what's wrong this time; maybe I just need a second set of eyes. This is my HTML code: Product Price 2014 HK Army Hardline Paintball Jersey $89.95 Planet Eclipse 2013 Distortion Gloves $34.95 Eclipse Geo 3.5 Paintball Marker $1,600.00 How many Paintball Jerseys would you like to order? How many Paintball Gloves would you like to order? How many Paintball Markers would you like to order? And my JavaScript code: function submit() { document.getElementById("result").innerText = "hi"; } Obviously I used "hi" as a test. It does not show up where my cursor is in p id="result" when I open the website up. Any suggestions are appreciated. EDIT: I know it says document.getElementById("result").innerText = "hi";, but I have tried it with .innerHTML as well and still nothing.
has comment: http://stackoverflow.com/comment/42546909
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42546756
linked to: http://stackoverflow.com/q/19030742
score: 3
has answer: http://stackoverflow.com/a/27009712
tagged with: innerhtml
has comment: http://stackoverflow.com/comment/42546788
has comment: http://stackoverflow.com/comment/42546775
has answer: http://stackoverflow.com/a/27009841
has comment: http://stackoverflow.com/comment/42546769
type: Question
has title: document.getElementById.innerHTML is not working correctly?
tagged with: javascript
upvote count: 3
answer count: 2
linked to: http://stackoverflow.com/q/6941483

http://stackoverflow.com/a/27118648
has comment: http://stackoverflow.com/comment/42739171
downvote count: 0
answers question: http://stackoverflow.com/q/27118567
upvote count: 3
has body: The issue that you are having is related to DOM rendering. When you are echoing the &lt;script&gt; tag to the browser, the browser has not yet fully rendered the Document Object Model. So, what is happening is the call to document.getElementById("error") is not retuning any results, and therefore the call to .innerHtml accomplishes nothing. What you need to do is defer the call to document.getElementById("error") until after the DOM is available. In common JavaScript libraries like jQuery, a utility method to defer parsing of JavaScript is provided: $(document).ready(function() { document.getElementById("error").innerHTML = "Invalid username or password. }); This can be done in vanilla JavaScript too. If you don't care about IE8 or earler: document.addEventListener("DOMContentLoaded", function() { document.getElementById("error").innerHTML = "Invalid username or password. });
type: Answer
score: 3

http://stackoverflow.com/a/27012124
type: Answer
accepted answer of: http://stackoverflow.com/q/27009512
has body: Use percolatestudio:synced-cron: meteor add percolatestudio:synced-cron Then in your Javascript on the server: if (Meteor.isServer) { Meteor.startup(function () { SyncedCron.add({ name: 'Remove unverified users', schedule: function(parser) { // parser is a later.parse object return parser.text('every Wednesday at 12am'); }, job: function() { //TODO: implement RemoveUnverifiedUsers function var numUsersRemoved = RemoveUnverifiedUsers(); return numUsersRemoved; } }); // start the cron daemon SyncedCron.start(); } } Edit #1: The Meteor user will have an email object with verified:false in the Meteor.users collection. This part of the meteor docs provides the following example: { _id: "bbca5d6a-2156-41c4-89da-0329e8c99a4f", // Meteor.userId() username: "cool_kid_13", // unique name emails: [ // each email address can only belong to one user. { address: "cool@example.com", verified: true }, { address: "another@different.com", verified: false } ], createdAt: Wed Aug 21 2013 15:16:52 GMT-0700 (PDT), profile: { // The profile is writable by the user by default. name: "Joe Schmoe" }, services: { facebook: { id: "709050", // facebook id accessToken: "AAACCgdX7G2...AbV9AZDZD" }, resume: { loginTokens: [ { token: "97e8c205-c7e4-47c9-9bea-8e2ccc0694cd", when: 1349761684048 } ] } } }
answers question: http://stackoverflow.com/q/27009512
has comment: http://stackoverflow.com/comment/42587249
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27028394
has body: I have this javascript line which returns me a matching object I search by passing an ID var result = $.grep(pageResults, function(e){ return e.id == id; }); But I'm not interested in retrieve the matching object with the ID, what I need is to retrieve in var result the next object to the matching one. And of course in the same way the previous object as well.
answer count: 1
has title: Return next and previous object of matching object id
tagged with: jquery
has comment: http://stackoverflow.com/comment/42579807
favorite count: 0
accepted answer: http://stackoverflow.com/a/27028493
score: -1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42579920
has comment: http://stackoverflow.com/comment/42579774
downvote count: 2
upvote count: 1
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/42579796
has comment: http://stackoverflow.com/comment/42579788
tagged with: javascript
has comment: http://stackoverflow.com/comment/42579833
has answer: http://stackoverflow.com/a/27028493
has comment: http://stackoverflow.com/comment/42580165

http://stackoverflow.com/q/27059983
answer count: 4
has body: I'm new at my current company and refactoring code from my predecessor. &lt;th ng-repeat="(key,headline) in model.headlines" ng-class="headline.classes" data-ng-bind="headline.name"&gt; {{headline}} &lt;/th&gt; I discovered that removing {{headline}} changes nothing (or adding anything e.g. text to the content of the object does nothing as well). Removing the data-ng-bind="headline.name" and replacing {{headline}} with a {{headline.name}} enables me to add further content just like in any other html object. As I'm new to angular and I deem my predecessor quite competent, does the data-ng-bind="headline.name" have any benefits compared to the "inline-version" {{headline.name}}? I want to add additional style to the object and putting another div into it would be great, but I can't do it with the data-ng-bind because it eats the content and just replaces it. Could this change mess anything up ? I'm quite confused why the more experienced predecessor would have written the code in a way that made it less agile in the first place, so I want to double check, that I'm not overlooking anything. &lt;th ng-repeat="(key,headline) in model.headlines" ng-class="headline.classes""&gt; &lt;div ng-class="additional styling"&gt; {{headline.name}} &lt;/div&gt; &lt;/th&gt;
has answer: http://stackoverflow.com/a/27847482
tagged with: javascript
type: UnansweredQuestion
has title: Angular redundant databinding?
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
upvote count: 1
has answer: http://stackoverflow.com/a/27060539
has answer: http://stackoverflow.com/a/27062571
has answer: http://stackoverflow.com/a/27062482

http://stackoverflow.com/a/27152860
has body: polygon.split(""); returns an array. You have to assign it to something in order to use it. Perhaps you wanted: polygon = polygon.split(""); FYI, you can chain some calls together like this: polygon = polygon.toLowerCase().split(""); In addition, your function permuter1() doesn't do anything with the result it calculates to make it visible. If you want to see it in the web page, you would have to join the array back together into a string with something like polygon.join("") and then assign it back to the .innerHTML of some DOM element.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27152701
answers question: http://stackoverflow.com/q/27152701
has comment: http://stackoverflow.com/comment/42839498
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/27049850
answer count: 4
has comment: http://stackoverflow.com/comment/42617424
has answer: http://stackoverflow.com/a/27052579
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/27051101
has comment: http://stackoverflow.com/comment/42617496
has answer: http://stackoverflow.com/a/27051163
has answer: http://stackoverflow.com/a/27050697
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/42617309
tagged with: javascript
tagged with: date
has comment: http://stackoverflow.com/comment/42618629
tagged with: prototype
upvote count: 1
has title: Edit Date object Javascript
has comment: http://stackoverflow.com/comment/42617633
has comment: http://stackoverflow.com/comment/42623500
has comment: http://stackoverflow.com/comment/42618139
favorite count: 0
has comment: http://stackoverflow.com/comment/42617590
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42617308
has comment: http://stackoverflow.com/comment/42617461
has body: I'm trying to edit the javascript date object's way of retrieving a date from the system clock. I am testing a Javascript application and this isn't a change that would be for production, strictly for testing purposes. I would like to pass a parameter with year, month, and day and let the date object retrieve that rather than getting the date from the system clock. The problem with creating a new instance is it will return the same date without updating the time with the system clock. I.e. returning Date {Fri Jan 20 2012 00:00:00 GMT+0700 (SE Asia Standard Time)} Date {Fri Jan 20 2012 00:00:00 GMT+0700 (SE Asia Standard Time)} Date {Fri Jan 20 2012 00:00:00 GMT+0700 (SE Asia Standard Time)} Date {Fri Jan 20 2012 00:00:00 GMT+0700 (SE Asia Standard Time)} By editing the year, month and day only, I need to keep the minutes, second, etc. to update with the system clock and not be static for testing purposes. This is what I'm doing do far, but has not worked for me. Date = function (Date) { return function () { var date = new Date(); date.setFullYear(%s) date.setMonth(%s); date.setDate(%s); return date; } }(Date) alert(new Date()) EDIT: The main problem with this that I'm having is I need to open the console in the window that I'm testing in and have this appear to be the date that I want while if it does not keep the seconds constant http://postimg.org/image/6hzjw4h7j/ EDIT: The solution that has worked to change the browsers time is as follows Date = function(Date){ return function() { date = new Date(); date.setTime(date.getTime() - %d); return date; } }(Date); Thanks to everyone for their input and hope this helps others.
has comment: http://stackoverflow.com/comment/42618248

http://stackoverflow.com/comment/42753599
comment on: http://stackoverflow.com/q/27126682
score: 0
type: QuestionComment
type: Comment
has text: `` is supposed for inline text/markup; use ` ` for block-level contents.

http://stackoverflow.com/comment/42693610
type: Comment
type: QuestionComment
has text: Why do you need to do this?
score: 0
comment on: http://stackoverflow.com/q/27093788

http://stackoverflow.com/comment/42620726
type: Comment
type: QuestionComment
score: 0
has text: Did you look at the documentation on "callback"? http://malsup.com/jquery/form/#ajaxForm
comment on: http://stackoverflow.com/q/27051761

http://stackoverflow.com/a/27087384
accepted answer of: http://stackoverflow.com/q/27085963
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: if in a meteor file you have MyModule = {} function cantSeeMe() { } MyModule.doesStuff =function() { } in a test you can access it ( and in other files in meteor ) describe("Modules", function(){ it("should be exposed", function(){ chai.assert.equal(typeof MyModule.doesStuff, 'function'); }); it("should not be exposed", function(){ chai.assert.equal(typeof cantSeeMe, 'undefined'); }); }); this is using mike:mocha basically, global isn't a bad thing. In more traditional languages like java / C#, classes are globals the provide things to instantiate objects. In javascript, you need some object to be global that provides access to functions, or "classes". What you don't want to do, generally, is introduce functions or variables into the global namespace ( or window ) unless they have a good reason for being there.
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42691390
answers question: http://stackoverflow.com/q/27085963

http://stackoverflow.com/a/27106903
accepted answer of: http://stackoverflow.com/q/27106716
score: 0
answers question: http://stackoverflow.com/q/27106716
has comment: http://stackoverflow.com/comment/42717201
type: AcceptedAnswer
type: Answer
has body: In your code you repleces your table with image. Try this function addImage(event) { if(event.target.dataset != undefined || event.target.dataset.state == 'red') { event.target.innerHTML="&lt;img src='red.jpg' /&gt;"; event.target.dataset.state = 'red'; } else { event.target.innerHTML="&lt;img src='yellow.jpg' /&gt;"; event.target.dataset.state = 'yellow'; } } ... &lt;table id="gameboard" border=1&gt; &lt;tr&gt; &lt;!-- Row - Zeile - Spalte (von oben nach unten)--&gt; &lt;td id="r-1-1" onclick="addImage(event);"&gt;&lt;/td&gt; ...
has comment: http://stackoverflow.com/comment/42717292

http://stackoverflow.com/comment/77419729
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27034897
has text: Can you create the array on a server and have the Java code in your android app request it via HTTP?

http://stackoverflow.com/q/27014133
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/34986719
tagged with: angularjs
has answer: http://stackoverflow.com/a/34986719
accepted answer: http://stackoverflow.com/a/27470257
type: AnsweredQuestion
has title: Error with ngDialog
type: Question
has body: I'm using the ngDialog project in order to display a popup on my website. I downloaded the project zip from github, it comes with examples data, this works , but when I work with external templates and controller it doesn't work .. I already search for solutions on SO but everybody seems to forget to include ngDialog which is not my case (if it is I will be the dumbest person on earth) Here is my code : in the index.html : ... in the controllers.js file : var blackoutApp = angular.module('blackoutApp', ['ngRoute', 'ngDialog']); blackoutApp.config(['$routeProvider', 'ngDialogProvider', function($routeProvider, ngDialogProvider) { $routeProvider.when('/', { templateUrl: 'templates/Body.tpl.html', controller: 'BodyCtrl' }); ngDialogProvider.setDefaults({ className: 'ngdialog-theme-default', plain: false, showClose: true, closeByDocument: true, closeByEscape: true, appendTo: false, preCloseCallback: function () { console.log('default pre-close callback'); } }); }]); blackoutApp.controller('OpenCtrl', ['$scope', function ($scope) { $scope.name = "Popup"; }]); blackoutApp.controller('BodyCtrl', ['$scope', function ($scope, $rootScope, ngDialog) { $scope.menus = [ {'link' : '#/', 'name' : 'main'}, ]; $scope.videoButtons = [ {'class' : 'tubular-play', 'name' : 'Play'}, {'class' : 'tubular-pause', 'name' : 'Pause'}, ]; $scope.open = function () { ngDialog.open({template: 'templates/Popup.tpl.html', controller: 'OpenCtrl'}); }; }]); And the Bdoy.tpl.html : Open via service All my scripts are included at the end of my index.html body tag. When i click on my link Open via service I got this error : TypeError: Cannot read property 'open' of undefined at k.$scope.open (http://nico.local:5757/Blackout/js/controllers.js:36:13) at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js:177:68 at f (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js:194:174) at k.$eval (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js:112:68) at k.$a…
tagged with: javascript
tagged with: ng-dialog
has answer: http://stackoverflow.com/a/27470257
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/30704393

http://stackoverflow.com/q/27062404
has comment: http://stackoverflow.com/comment/42709764
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/30423177
type: Question
has comment: http://stackoverflow.com/comment/42651620
has comment: http://stackoverflow.com/comment/42712620
accepted answer: http://stackoverflow.com/a/30423177
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has body: Here we have code jsfiddle.net/zvgnq84v Is it possible to add Highchart tooltip(for example). I mean not to implement myself, but just call internal ready HighChart functions.
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42712179
has comment: http://stackoverflow.com/comment/42710672
favorite count: 0
has comment: http://stackoverflow.com/comment/42711406
has title: HighChart table with tooltip
has comment: http://stackoverflow.com/comment/42643186

http://stackoverflow.com/comment/42565332
type: Comment
comment on: http://stackoverflow.com/q/27020282
type: QuestionComment
score: 0
has text: And the dataType `jsonp` does require json to be returned, if it is HTML you are expecting, change it to `html`

http://stackoverflow.com/comment/42652321
comment on: http://stackoverflow.com/a/27069442
score: 0
type: AnswerComment
type: Comment
has text: Thanks for the correction! @AshadShanto I didn't noticed that

http://stackoverflow.com/q/27052626
has body: I have a ton of little div's getting generated by php that need to form columns when they reach the max-height of their parent div. ... They are all 22*22 squares and need to stack in a div with max-height of 115px, infinite width with bottom and right margins of 1. When 5 formed a column, the 6th needs to be at the right of the 1st. I read elsewhere this can only be achieved through js, how would I go about doing this? And is it really not possible through css without adding a column system?
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27052743
type: Question
has title: Rearrage divs to the right when max height reached
score: 0
has answer: http://stackoverflow.com/a/27052743
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/42766353
type: Comment
has text: Yes-yes, I would advice to read about ngModel: [official docs](https://docs.angularjs.org/api/ng/directive/ngModel)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27133864

http://stackoverflow.com/comment/42777918
type: QuestionComment
has text: http://jsfiddle.net/9Ltvhkqb/2/ is this you wanted?
score: 0
comment on: http://stackoverflow.com/q/27139880
type: Comment

http://stackoverflow.com/a/42264162
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27143209
has body: I don't know what blog post is being referenced, because there is no link, but vernak2539's solution seems really long-winded to me. Why not keep the play and pause buttons in the DOM and just toggle them visually. In the css: #playButton{display:none;} In the js, add toggle() lines inside existing play/pause.onclick functions: $('#playButton').click(function(){ $('#playButton,#pauseButton').toggle(); $('#homeCarousel').carousel('cycle'); }); $('#pauseButton').click(function(){ $('#playButton,#pauseButton').toggle(); $('#homeCarousel').carousel('pause'); });
type: Answer

http://stackoverflow.com/a/27019432
has comment: http://stackoverflow.com/comment/42594299
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27013911
has comment: http://stackoverflow.com/comment/42592653
answers question: http://stackoverflow.com/q/27013911
upvote count: 3
type: Answer
has body: For the input field you should add an OnChange to it. This event should call a function which will then set your link's value. You can see an example of this here (it uses a button press though and not an input OnChange Event): http://www.java2s.com/Code/JavaScript/HTML/ChangeURLandtextofahyperlink.htm Edit: Added a Stack Snippet illustrating the solution. function SetSuggestLink() { var suggest = document.getElementById('partnumber').value; document.getElementById('innerSpan').innerHTML = "Suggest Link: suggest.asp?partnumber=" + suggest; document.getElementById('QueryLink').href = "suggest.asp?partnumber=" + suggest; } .style11 { color:black; } .style2 { text-decoration:none; } Suggest Link
has comment: http://stackoverflow.com/comment/42592713
downvote count: 0
has comment: http://stackoverflow.com/comment/42591443
score: 3

http://stackoverflow.com/comment/42725022
type: AnswerComment
comment on: http://stackoverflow.com/a/26993755
type: Comment
has text: Yeah this is really nice... what I was saying is possibly true but this way's better.
score: 0

http://stackoverflow.com/a/27037794
has body: You're not adding a function to the array. You're calling the function, and adding what it returns to the array. But the function doesn't return anything, so you're pushing undefined onto the array. What I think you want is: var param1 = "param1"; var fArr = []; fArr.push(function() { test(param1)); }); for (var i = 0; i &lt; fArr.length; i++) { fArr[i](); } function test(param){ console.log('param is '+param); } P.S. Get out of the bad habit of omitting ; at the end of statements.
answers question: http://stackoverflow.com/q/27037671
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/42596190
has comment: http://stackoverflow.com/comment/42596390
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42596256
upvote count: 3
type: Answer
accepted answer of: http://stackoverflow.com/q/27037671

http://stackoverflow.com/comment/42727703
type: QuestionComment
comment on: http://stackoverflow.com/q/27111211
has text: Agree with @hon2a, you return json BEFORE the .done is completed
score: 2
type: Comment

http://stackoverflow.com/a/27147099
type: Answer
answers question: http://stackoverflow.com/q/27146901
has comment: http://stackoverflow.com/comment/42789720
has body: Without rebuilding the code it looks like the second time you 'setInterval' you're not assigning it to the 'interval' variable. Try modifying your code like this: $('#newsContainer').on('mouseover', function () { clearInterval(interval); console.log('Interval disabled'); }).on('mouseleave', function () { interval = setInterval(triggerNextNewsitem, 5000) console.log('Interval enabled'); }); (Add 'interval =' before the setInterval statement)
score: 0

http://stackoverflow.com/comment/42630290
type: Comment
has text: Thank you, but now i am getting an "undefined" ID.
comment on: http://stackoverflow.com/a/27057070
score: 0
type: AnswerComment

http://stackoverflow.com/a/27228429
score: 1
has comment: http://stackoverflow.com/comment/42934585
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27065430
type: Answer
has body: I managed to get it working via pure CSS. I put visibility: hidden on the jac-rollover__link, then I used a CSS transition on visibility, with a length of 0s but with a delay of 0.5s, which is the same time the hover effect takes to complete. So, viola no javascript and it works really well on everything I've tested on so far. I suppose pretty much all touch devices with have support for CSS transitions, so it should be fine. code in case it helps others: .jac-rollover { ... &amp;:hover, &amp;:focus { .jac-rollover__link { visibility: visible; transition: visibility 0s 0.5s; } } } .jac-rollover__link { ... visibility: hidden; }
accepted answer of: http://stackoverflow.com/q/27065430
upvote count: 1

http://stackoverflow.com/a/27152214
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42805512
score: 5
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/52497560
answers question: http://stackoverflow.com/q/27151258
accepted answer of: http://stackoverflow.com/q/27151258
downvote count: 1
has body: I use the momentjs library http://momentjs.com/ calling moment().format() will give you the date time in timestamptz format. There are also many reasons why you should use moment because it is a solid library that deals away with many problems associated with manipulating time. However I am interested to see if there are other vanilla solutions.
has comment: http://stackoverflow.com/comment/88838184

http://stackoverflow.com/q/27038791
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27039124
has body: Firstly apologies if this is a) has been asked before b) a stupid question but I am new to AngularJS and I have a form that I need to add some validation. I have multiple input fields. For the sake of argument lets call them client, counterpart and group and initially are all blank. In english, the rule I am trying to enforce is "If a user enters a group, then either the client or counterpart must be entered. If the user chooses to enter a client, the client should be [a|b|c]" I am sure that there must be an easy way to achieve this but I am not sure where to start. Thanks in advance Jon
tagged with: forms
type: Question
has title: AngularJS - Newbie form validation across multiple fields
tagged with: javascript
score: 0
tagged with: validation

http://stackoverflow.com/comment/42930393
comment on: http://stackoverflow.com/q/27144245
has text: To all those who say it can't be done, Atom editor uses Google Analytics. https://github.com/atom/metrics
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42685958
comment on: http://stackoverflow.com/q/27054448
type: QuestionComment
has text: Ok, so does that mean that the first time that the next() goes through it suspends and then does an evaluation before hitting the next yield? If that is the case then you have just made it to be complete sense for me on how the yield works.
type: Comment
score: 0

http://stackoverflow.com/q/27022542
has body: I am using this amchart.. When I am applying toggle for two chart it is displaying nothing there.. I think there is something invalid size method will be used for this if yes where to where to use invalid size method? One more thing I want to achieve something like when clicking on each bar of chart1 seperate values will placed in chart2 and chart 3. . This is something I found on stackoverflow but not sure it is good solution or not. http://stackoverflow.com/questions/10013408/amcharts-doesnt-display-chart-for-initially-hidden-divs?lq=1 My JSFiddle http://jsfiddle.net/umairorana/b72fvqyt/12/
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10013408
has title: Amcharts toggle not displaying
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27406594
tagged with: amcharts
accepted answer: http://stackoverflow.com/a/27406594

http://stackoverflow.com/q/27072815
possible better answer: http://stackoverflow.com/a/27072947
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/27073798
has answer: http://stackoverflow.com/a/27073798
has answer: http://stackoverflow.com/a/27072947
type: AnsweredQuestion
has body: In rails I have two js files, one called welcome.js and one called about.js. I have the same code in them. I am using require_tree . in the application.js welcome.js: var loadw = function() { console.log("Hello from welcome js!"); } $(document).ready(loadw); // for regular page load $(document).on('page:load', loadw); // for turbolink about.js: var loada = function() { console.log("Hello from about js!"); } $(document).ready(loada); // for regular page load $(document).on('page:load', loada); // for turbolink I have two pages right now, my home page and a calc page which has a calculator written in Javascript (that js file also has $(document).ready functions like about.js and welcome.js, if that matters.) The JS output in the console on the browser when I load the respective pages is: Loading home page: "Hello from about js!" Loading calculator page: "Hello from about js!" "Hello from welcome js!" My question is why doesn't the code from welcome.js run when I load home page? What I was trying to do originally is add code to highlight some buttons when they are clicked, and I added this code to welcome.js but it wouldn't work, except when I loaded the calculator page, but worked if I put it in about.js (the buttons are in the header). After a couple hours of trying to debug this I am here - I removed everything but console.log and it's still happening. I am new to rails and I'm probably missing something really simple. I'm debating whether or not to get rid of require_tree and load js files only wherever they're needed, and see if that resolves the issue, but I shouldn't have to do that, right?
tagged with: ruby-on-rails
type: Question
has title: Rails: Javascript runs from one file but not another
tagged with: javascript

http://stackoverflow.com/comment/42567955
comment on: http://stackoverflow.com/q/27021141
score: 0
type: QuestionComment
type: Comment
has text: ui-sref does the same.

http://stackoverflow.com/comment/42776078
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27124902
has text: Thanks! This is what Jasmine must of felt like with Aladdin on the magic carpet. A whole new world! It worked great for what I was trying to do. Still have a lot to learn and this helped a lot.

http://stackoverflow.com/comment/42702295
has text: On your jsfiddle, if you have selected '2' on the first dropdown, and when you inspect element using Chrome, you can see that the selected option becomes 2 , that means the option of the selected dropbox is also disabled. HTML don't post the disabled values to forms, so it's the problem. Thanks!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27077009

http://stackoverflow.com/comment/42744611
type: QuestionComment
has text: Well, why shouldn't it? [`readable`](http://nodejs.org/api/stream.html#stream_event_readable) is supposed to do that.
comment on: http://stackoverflow.com/q/27121219
score: 0
type: Comment

http://stackoverflow.com/a/27192620
upvote count: 1
type: AcceptedAnswer
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/27001894
answers question: http://stackoverflow.com/q/27001894
downvote count: 0
has body: I finally found a solution, which seems to indicate a bug in Firefox. Although not shown in my example code, the server requires HTTP BASIC authentication, which is provided as follows: request.open('GET', href, true, username, password); request.withCrednetials = true; This is in accordance with the MDN specification for XMLHttpRequest. While this works for Chrome, with Firefox it results in the ajax request not being sent (at least it doesn't appear in the console or net panes of Firebug) and the send() method throwing an exception which claims that the request is being made to an illegal domain. The following solution works for FF and Chrome: var href = ... var username = ... var password = ... var request = new XMLHttpRequest(); request.open('GET', href, true); //do not include credentials, or FF will fail to send the request request.setRequestHeader("Accept", "application/json"); request.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password)); request.onload = ... request.onerror = ... try { request.send(); } catch (e) { console.log(e.message); } Note that if the username and password are provided as parameters to open(), Firefox fails to send the request and throws an illegal domain exception, even though the credentials were set in the Authorization header.

http://stackoverflow.com/q/27013685
has body: when I use mathematical operators with window.innerWidth it returs NaN. I just tried to add numeric 1 to the window.innerWidth. What's wrong with my code? Click the button to display this window's height and width (NOT including toolbars and scrollbars). Try it View sample at Plunker
has comment: http://stackoverflow.com/comment/42553487
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 1
linked to: http://stackoverflow.com/q/4234533
favorite count: 0
has comment: http://stackoverflow.com/comment/42553426
score: -3
has comment: http://stackoverflow.com/comment/42558478
has comment: http://stackoverflow.com/comment/42553601
downvote count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27016668
has title: The Mathematical Operators not working on window.innerWidth
type: Question
has answer: http://stackoverflow.com/a/27016668

http://stackoverflow.com/q/27014849
answer count: 2
downvote count: 0
favorite count: 0
has title: Create multiple rows in table from array?
upvote count: 30
tagged with: sequelize.js
has answer: http://stackoverflow.com/a/71145550
accepted answer: http://stackoverflow.com/a/27015861
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/71145550
tagged with: orm
type: Question
has body: Is possible to add multiple rows at once from array with sequelize.js? This is my code: var user = User.build({ email: req.body.email, password: req.body.password, userlevel: '3', }); User .find({ where: { email: req.body.email } }) .then(function(existingUser){ if (existingUser) { return res.redirect('/staff'); } user .save() .complete(function(err){ if (err) return next(err); res.redirect('/staff'); }); }).catch(function(err){ return next(err); }); Thanks for any advise!
score: 30
tagged with: javascript
has answer: http://stackoverflow.com/a/27015861

http://stackoverflow.com/comment/43504750
type: Comment
comment on: http://stackoverflow.com/a/27140262
has text: Ah, thank you for the details yes. This answers my question.
type: AnswerComment
score: 0

http://stackoverflow.com/q/27115372
has answer: http://stackoverflow.com/a/27115980
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1
score: 1
has title: AngularJS directive doesn't render javascript on templateUrl page
type: Question
has comment: http://stackoverflow.com/comment/42733729
has body: I created an AngularJS directive that uses templateUrl to link to an html page which contains a graph. Basically I want to re-render a graph based on the users input. I thought the easiest way would be to make the graph a directive, and set the graphs input on a scope model. My directive: app.directive('ngGraph', function(){ return {templateUrl:'graph.html'} }); Graph.html hello Basically what is happening the hello renders in my index.html when I reference the directive but not the graph.
tagged with: javascript

http://stackoverflow.com/comment/42770282
has text: Is `alert`, and `console.log` are the only 2 ways to print out the value base on ID if an element ? I'm looking for a better alternative.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27135884
type: AnswerComment

http://stackoverflow.com/comment/42547734
score: 0
has text: first of all you will have to provide hidden input fields with unique id, since they are in while loop the form repeats with same content
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27010152

http://stackoverflow.com/q/27114198
answer count: 1
tagged with: sortedlist
has title: Order an HTML list and then target elements
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42731304
tagged with: toggle
has comment: http://stackoverflow.com/comment/42769918
type: Question
has answer: http://stackoverflow.com/a/27114318
accepted answer: http://stackoverflow.com/a/27114318
has body: I am working on a function to order a HTML list. I've found the following code on StackOverflow (thx!!) and I tweaked a little bit. My goal is to sort the list and then, once sorted, display the undisplayed (!(":visible")) lis elements. The function works perfectly without the particular part made for displaying the undisplayed elements. function sortList(ul){ var new_ul = ul.cloneNode(false); // Add all lis to an array var lis = []; for(var i = ul.childNodes.length; i--;){ if(ul.childNodes[i].nodeName === 'LI') lis.push(ul.childNodes[i]); } // Sort the lis in descending order lis.sort(function(a, b){ return parseInt(b.getElementsByClassName(variable)[0].innerHTML , 10) - parseInt(a. getElementsByClassName(variable)[0].innerHTML , 10); }); if (order == 'asc') {lis.reverse();} // Add them into the ul in order for(var i = 0; i < lis.length; i++) { //THIS IS THE PART that makes the function not working anymore if (!lis[i].is(":visible")) { lis[i].fadeToggle("slow","linear"); } //END OF THE PART new_ul.appendChild(lis[i]); } ul.parentNode.replaceChild(new_ul, ul); } I call the function like this : sortList(document.getElementsByClassName('list')[0],'date','asc'); My HTML looks like this: 1 2 3 4 Thanks for you help !
tagged with: javascript
score: 0

http://stackoverflow.com/a/27039993
has body: Out of the box it will not work and is wrong, but a work around and a bit more correct way is this. Instead of using model: use collection: and wrap it into new Backbone.Collection skip use of default el and pass it as result placeholder and then use it when rendering var searchApp = new SearchApp({collection: new Backbone.Collection([searchModel1, searchModel2, searchModel3]), placeholders: [$("#results1"),$("#results2"),$("#results3")]}); SearchApp = Bb.View.extends({ initialize: function (options) { this.placeholders = options.placeholders } render: function() { //for each this.placeholders render searchModel (event better wrap it in new view) } }); However this way your searchApp actually becomes not a view but a manager of some instance. I would suggest that each view should have its own model, my guess is that you already know how many search models and their view objects there will be. So just create a method that accepts your model and $ and creates you a view. function(model, $el) { return new SearchApp({model: model, $el: $el}); } And then in that view listen when you get an search response and render accordingly.
answers question: http://stackoverflow.com/q/27038366
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27038366
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42793070
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27148637
type: Comment
has text: It seems that the new results will be appended to the old ones! How to avoid that?

http://stackoverflow.com/q/27151799
tagged with: jquery
tagged with: ajax
type: Question
score: 0
has body: I'm adding some content through form to the database and then reload this part of page to update the content. And then I want to add the next content and again reload but the .submit method I use, sends undefined instead of the written content. Here's the HTML code: &lt;form id="addForm" method="post" action="/addContent"&gt; &lt;input type="text" id="content" name="name" value="" placeholder="New content" required/&gt;&lt;br/&gt;&lt;br/&gt; &lt;input name="submitted" id="submitted" value="Add content" class="submit" type="submit" /&gt; &lt;/form&gt; And here's JS: &lt;script&gt; $('#addForm').submit(function() { $.post('/addContent', { data: $('#addForm').serializeArray(), }, function(response) { $('#contentPart').html(response); }); return false; }); &lt;/script&gt; Can anyone help me? I'll be gratefull.
has answer: http://stackoverflow.com/a/27151909
answer count: 1
has title: jQuery .submit() method sends undefined instead of written content after AJAX call
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27151909

http://stackoverflow.com/comment/42709389
comment on: http://stackoverflow.com/a/27102549
score: 0
type: AnswerComment
type: Comment
has text: Well, that's basically what I'm wondering about, given it happens within the engine, the string generation may be efficient. Or not :-) Be an interesting thing to check. blenddd [makes a good point](http://stackoverflow.com/a/27102807/157247) about early termination, though, which obviously the `stringify` aspect wouldn't really offer. So the answer may well relate to the frequency with which they're the same or different.

http://stackoverflow.com/comment/42529869
type: Comment
has text: +1, OK this works. But do you any ideas why innerHTML only works once? My guess is browser may cache it and prevent it. does not make any sense.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26999744

http://stackoverflow.com/comment/42651023
comment on: http://stackoverflow.com/a/27067113
type: Comment
score: 0
has text: This is what we are using now for our REST services with large result sets.
type: AnswerComment

http://stackoverflow.com/comment/42547656
type: Comment
type: QuestionComment
has text: So how to add value in array for each item
comment on: http://stackoverflow.com/q/27010167
score: 0

http://stackoverflow.com/q/27044725
type: Question
has comment: http://stackoverflow.com/comment/42608213
has body: I am trying to get the following into a js regex: I need to include the following gtm.click gtm.linkClick gtm.formSubmit There are other things that start with gtm. so it cannot just be "gtm.*" I don;t use regular expressions often enough. Any help on this appreciated. I was trying the following without luck: gtm\.*click|gtm.formSubmit What would be the right way to do this?
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27044832
accepted answer: http://stackoverflow.com/a/27044831
has comment: http://stackoverflow.com/comment/42608164
has title: Regular expression needed for 3 variants that all start the same and must be one of the three
tagged with: regex
has comment: http://stackoverflow.com/comment/42608132
has answer: http://stackoverflow.com/a/27044831
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27044832
has answer: http://stackoverflow.com/a/27044833

http://stackoverflow.com/comment/42958832
has text: Of the HTML you've provided, is all of it added via ajax or just part of it?
score: 0
comment on: http://stackoverflow.com/q/27009120
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27132674
has title: Internet Explorer getClientRects absolute positioned elements
tagged with: internet-explorer-11
has comment: http://stackoverflow.com/comment/98395256
type: Question
has body: I'm currently experiencing an issue with text selection in IE 11 (though it happens in previous IEs as well). My goal is to get text selection working where it returns to me the getClientRects. What I have is a simple setup. I have a container div and within that div I've placed two spans: Span 1 Span 2 Both spans are positioned absolutely to the top/left and bottom/right corners. The container has a height of 100px; On mouse up this function is ran: function mouseup(){ var selectObj = ((window.getSelection)?window.getSelection():document.getSelection()); alert(selectObj.getRangeAt(0).getClientRects().length); } On chrome if you try to select the text from span 1 to span 2 it will alert a length of 3, which is what I want as that lets me know where the bounding boxes are for the text selection. On internet explorer though it always returns 0. If I select text only within a single span it will work, but as soon as you go to multiple it fails. Here is a jsFiddle of this all set up: http://jsfiddle.net/v6sa71hs/
has comment: http://stackoverflow.com/comment/98392759
tagged with: javascript
has answer: http://stackoverflow.com/a/27173808
score: 0
answer count: 1
tagged with: highlight
has comment: http://stackoverflow.com/comment/98435041
accepted answer: http://stackoverflow.com/a/27173808
type: AnsweredQuestion
tagged with: internet-explorer

http://stackoverflow.com/comment/42715556
type: AnswerComment
score: 0
type: Comment
has text: Yep. But I'll move this option to the bottom of the list, because it causes page reload on each filter selection. If your application is purely client-based, I'd suggest using cookies or local storage.
comment on: http://stackoverflow.com/a/27105861

http://stackoverflow.com/comment/42532780
has text: IE11 now shows 'Netscape' instead of 'Microsoft Internet Explorer'. See http://stackoverflow.com/questions/17907445/how-to-detect-ie11
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27000983

http://stackoverflow.com/q/27064176
upvote count: 127
has comment: http://stackoverflow.com/comment/98154277
has body: I have a bootstrap 2.32 modal which I am trying to dynamically insert into the HTML of another view. I'm working with Codeigniter 2.1. Following Dynamically inserting a bootstrap modal partial view into a view, I have: as the target div for insertion. I have a button in my view that looks like: Message My JS has: $.ajax({ type : 'POST', url : "AjaxUpdate/get_modal", cache : false, success : function(data){ if(data){ $('#modal_target').html(data); //This shows the modal $('#form-content').modal(); } } }); The button of the main view is: Modal powers, activate! Here is what I'd like to store separately as a partial view: × Send me a message modalForm User help Old password help New password help Repeat new password help Nah. When I click the button, the modal is inserted correctly, but I get the following error: TypeError: $(...).modal is not a function How can I fix this?
has answer: http://stackoverflow.com/a/39307691
has answer: http://stackoverflow.com/a/78685376
has comment: http://stackoverflow.com/comment/67645005
favorite count: 0
has title: TypeError: $(...).modal is not a function with bootstrap Modal
has answer: http://stackoverflow.com/a/76213260
has comment: http://stackoverflow.com/comment/42650076
downvote count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42644183
tagged with: twitter-bootstrap-2
tagged with: css
has answer: http://stackoverflow.com/a/48298241
has answer: http://stackoverflow.com/a/34972241
has comment: http://stackoverflow.com/comment/42648488
has answer: http://stackoverflow.com/a/37515775
has answer: http://stackoverflow.com/a/57085622
score: 127
has comment: http://stackoverflow.com/comment/110559810
has answer: http://stackoverflow.com/a/31874599
type: Question
has answer: http://stackoverflow.com/a/28173513
has answer: http://stackoverflow.com/a/30897746
has answer: http://stackoverflow.com/a/27064457
has answer: http://stackoverflow.com/a/45222086
tagged with: javascript
has comment: http://stackoverflow.com/comment/42642396
tagged with: jquery
has answer: http://stackoverflow.com/a/55801570
answer count: 16
has comment: http://stackoverflow.com/comment/42642425
has answer: http://stackoverflow.com/a/55688518
linked to: http://stackoverflow.com/q/27022715
has answer: http://stackoverflow.com/a/58898000
has answer: http://stackoverflow.com/a/46998261
has comment: http://stackoverflow.com/comment/63532686

http://stackoverflow.com/q/27112531
tagged with: javascript
score: -7
favorite count: 0
has comment: http://stackoverflow.com/comment/42728415
has comment: http://stackoverflow.com/comment/42728025
accepted answer: http://stackoverflow.com/a/27112639
has comment: http://stackoverflow.com/comment/42727914
downvote count: 7
has body: // Check if the user is ready to play! var userAnswer = prompt("Do you want to race Bieber on stage?") console.log("Suddenly, Bieber stops and says, 'Who wants to race me?'") if userAnswer === "yes" { console.log("You and Bieber start racing. It's neck and neck! You win by a shoelace!"); } else { console.log("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'"); } I'm trying to do this: If userAnswer is yes, print out "You and Bieber start racing. It's neck and neck! You win by a shoelace! Otherwise, print out: "Oh no! Bieber shakes his head and sings I set a pace, so I can race without pacing. But it gives me a syntax error. Any help appreciated.
type: AnsweredQuestion
type: Question
has title: Javascript code giving error
upvote count: 0
has answer: http://stackoverflow.com/a/27112639
answer count: 1

http://stackoverflow.com/a/46935825
answers question: http://stackoverflow.com/q/27096548
has comment: http://stackoverflow.com/comment/80822356
score: 0
has comment: http://stackoverflow.com/comment/80818786
type: Answer
has body: Filter by search using text found in element within each div click button:

http://stackoverflow.com/a/78824024
answers question: http://stackoverflow.com/q/27132153
score: 0
has body: With vanilla js you can check like this if(element.matches(':hover')){ // do your thing }
type: Answer

android
tags question: http://stackoverflow.com/q/27123502
tags question: http://stackoverflow.com/q/27026368
tags question: http://stackoverflow.com/q/27007652
tags question: http://stackoverflow.com/q/27034897
tags question: http://stackoverflow.com/q/27121320
tags question: http://stackoverflow.com/q/27120280
tags question: http://stackoverflow.com/q/27138694
tags question: http://stackoverflow.com/q/27070934
tags question: http://stackoverflow.com/q/26999774
tags question: http://stackoverflow.com/q/27043943
tags question: http://stackoverflow.com/q/27034291
tags question: http://stackoverflow.com/q/27149155
tags question: http://stackoverflow.com/q/27145561
tags question: http://stackoverflow.com/q/27119227
tags question: http://stackoverflow.com/q/27073814
tags question: http://stackoverflow.com/q/27013996
tags question: http://stackoverflow.com/q/27094145
tags question: http://stackoverflow.com/q/27054969
tags question: http://stackoverflow.com/q/27135176
tags question: http://stackoverflow.com/q/27043534
tags question: http://stackoverflow.com/q/27051826
tags question: http://stackoverflow.com/q/27081830
tags question: http://stackoverflow.com/q/27110919
tags question: http://stackoverflow.com/q/26998550
tags question: http://stackoverflow.com/q/27032181
tags question: http://stackoverflow.com/q/27104533
tags question: http://stackoverflow.com/q/27083939
tags question: http://stackoverflow.com/q/27090445
tags question: http://stackoverflow.com/q/27038544
tags question: http://stackoverflow.com/q/27126173
tags question: http://stackoverflow.com/q/27117362
tags question: http://stackoverflow.com/q/27049275
tags question: http://stackoverflow.com/q/27099507
tags question: http://stackoverflow.com/q/27065188
tags question: http://stackoverflow.com/q/26993504
tags question: http://stackoverflow.com/q/27035859
tags question: http://stackoverflow.com/q/27132796
tags question: http://stackoverflow.com/q/26999202
tags question: http://stackoverflow.com/q/27041460
tags question: http://stackoverflow.com/q/27032088
tags question: http://stackoverflow.com/q/27119026
tags question: http://stackoverflow.com/q/27102958
tag name: android
tags question: http://stackoverflow.com/q/27043403
tags question: http://stackoverflow.com/q/27098323
tags question: http://stackoverflow.com/q/27033916
tags question: http://stackoverflow.com/q/27000201
type: Tag
tags question: http://stackoverflow.com/q/27104686
tags question: http://stackoverflow.com/q/27134846
tags question: http://stackoverflow.com/q/27037002

http://stackoverflow.com/comment/42718723
type: Comment
has text: @LarsKotthoff it returns some kind of a chart width. For example: "10.95". If I make chart smaller it will return something like: "7.65".
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27107528

http://stackoverflow.com/comment/42860314
type: QuestionComment
comment on: http://stackoverflow.com/q/27126938
score: 0
has text: I understood whre is a mistake. I must change position of mesh, but not edges.
type: Comment

http://stackoverflow.com/q/27141256
type: Question
has answer: http://stackoverflow.com/a/27142040
tagged with: javascript
tagged with: ajax
has body: I have below form, where each .form-row is dynamically added using jQuery when user clicks on Add New button. My html form (simplified) Item 1 Item 2 Item 3 Item 1 Item 2 Item 3 Item 1 Item 2 Item 3 And what I am trying to achieve is two-folded: calculate the sum of each line (.form-row) and display the sum in each line (in sum[] field) calculate the sum of all sums and discounts of all lines (all .form-rows) and display them in #total_sum, #total_discount, and #total_net. I believe I need something that gets all .form-rows, which is triggered whenever there is a change in the form (or every 1 second, perhaps?), and loop through them to calculate respective sum, and calculate the total of sums and discounts when looping is over. I can do this if it's PHP, but I am quite new to jQuery or Javascript so I have no idea where to look into first. [Adddd] One thing I did not mention in above explanation is that unit[] has default value of 1 and price[] is at first automatically appended using AJAX, and then users can change the value. My AJAX to automatically retrieve price when user selects an item. Thanks to the advice from Manish Jangir Blogadditic, I came to have below code: However, it works when the form is manually changed, but doesn't work when price is automatically appended by ajax. Any other suggestions?
upvote count: 1
possible better answer: http://stackoverflow.com/a/27141449
has comment: http://stackoverflow.com/comment/42780271
favorite count: 0
has comment: http://stackoverflow.com/comment/42780406
has answer: http://stackoverflow.com/a/27141449
has answer: http://stackoverflow.com/a/27141640
has answer: http://stackoverflow.com/a/27141319
has title: calculating sums for dynamically added form elements
accepted answer: http://stackoverflow.com/a/27141319
tagged with: php
answer count: 4
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/42586132
type: Comment
comment on: http://stackoverflow.com/q/27032078
score: 0
has text: What happens when you run it from the command line?
type: QuestionComment

http://stackoverflow.com/comment/42606323
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27043007
has text: "Don't work" doesn't explain anything to us. What's happening, and what do you want to happen instead? Each class will be added or removed independently from the others. If you want them to be *dependent* on each other, you need to explain how.
score: 0

http://stackoverflow.com/q/27106462
answer count: 2
possible better answer: http://stackoverflow.com/a/32921760
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27134412
favorite count: 0
linked to: http://stackoverflow.com/q/15153349
tagged with: meteor
has title: Using Meteor publish-with-relations package where each join cannot use the _id field
upvote count: 3
has comment: http://stackoverflow.com/comment/42752492
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27134412
score: 3
has answer: http://stackoverflow.com/a/32921760
has body: I am working to solve a problem not dissimilar to the discussion present at the following blog post. This is wishing to publish two related data sets in Meteor, with a 'reactive join' on the server side. https://www.discovermeteor.com/blog/reactive-joins-in-meteor/ Unfortunately for me, however, the related collection I wish to join to, will not be joined using the "_id" field, but using another field. Normally in mongo and meteor I would create a 'filter' block where I could specify this query. However, as far as I can tell in the PWR package, there is an implicit assumption to join on '_id'. If you review the example given on the 'publish-with-relations' github page (see below) you can see that both posts and comments are being joined to the Meteor.users '_id' field. But what if we needed to join to the Meteor.users 'address' field ? https://github.com/svasva/meteor-publish-with-relations In the short term I have specified my query 'upside down' (as luckily I m able to use the _id field when doing a reverse join), but I suspect this will result in an inefficient query as the datasets grow, so would rather be able to do a join in the direction planned. The two collections we are joining can be thought of as like a conversation topic/header record, and a conversation message collection (i.e. one entry in the collection for each message in the conversation). The conversation topic in my solution is using the _id field to join, the conversation messages have a "conversationKey" field to join with. The following call works, but this is querying from the messages to the conversation, instead of vice versa, which would be more natural. Meteor.publishWithRelations({ handle: this, collection: conversationMessages, filter: { "conversationKey" : requestedKey }, options : {sort: {msgTime: -1}}, mappings: [{ //reverse: true, key: 'conversationKey', collection: conversationTopics, filter: { startTime: { $gt : (new Date().getTime() - aLongTimeAgo ) } }, options: { sort: { create…
has comment: http://stackoverflow.com/comment/42725585

http://stackoverflow.com/a/27068711
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27066966
has body: May be this is the way: run a task which will update the grid in some time interval so that there is no need to handle at java side. var updateGrid=function(){ grid.store.load(); } var task = Ext.TaskManager.start({ run: updateGrid, interval: 1000 });
type: Answer
accepted answer of: http://stackoverflow.com/q/27066966
has comment: http://stackoverflow.com/comment/42657247
has comment: http://stackoverflow.com/comment/42653173

http://stackoverflow.com/comment/42587520
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27032973
score: 0
has text: I think my answer addresses your question, as edited

http://stackoverflow.com/comment/42554668
type: AnswerComment
comment on: http://stackoverflow.com/a/26995118
score: 0
type: Comment
has text: You are right, forget what I have written. Can I downvote myself? :P

http://stackoverflow.com/q/27109653
has comment: http://stackoverflow.com/comment/42722501
has answer: http://stackoverflow.com/a/27109717
has answer: http://stackoverflow.com/a/27109746
has body: I'm wondering if it is possible to check if a particular less file has called in the header section. If it is there, I'd like to perform some js action. Do you know any solution how could I check this? Thank you in advance!
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/27109712
has answer: http://stackoverflow.com/a/27109712
accepted answer: http://stackoverflow.com/a/27109717
has title: check if less file exists or not
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42723726
score: 0
answer count: 3

http://stackoverflow.com/comment/42583016
type: Comment
comment on: http://stackoverflow.com/a/27030328
score: 0
has text: Thanks dude !, appriciate it so much !!, it works !!,
type: AnswerComment

http://stackoverflow.com/comment/42692345
comment on: http://stackoverflow.com/a/27092847
type: AnswerComment
score: 0
has text: @MartynA: You know that you just can use HTMLWindow.execScript WITHOUT the need to add js to the DOM, right?
type: Comment

http://stackoverflow.com/comment/42682669
has text: Thanks a lot, this sloved my problem.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27084270

http://stackoverflow.com/q/27125061
answer count: 0
tagged with: d3.js
linked to: http://stackoverflow.com/q/5338594
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42754066
has comment: http://stackoverflow.com/comment/42751306
type: Question
has body: I am using d3 tree, and on hover of node I am showing tooltip, but in firefox the position of tooltip is not showing properly.. On chrome it is showing fine.I want it to look as it is like on chrome. I am using below code: var element = $("#" + d.nodeId); var pos = element.find('circle.nodeCircle').position(); var rad = element.find('circle.nodeCircle').attr('r');//radius of circle $('.tooltip').css('left', (pos.left - rad) + 'px'); $('.tooltip').css('top', pos.top + 'px'); Also check images for firefox and chrome.
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has title: element.find("circle").position() is not working in firefox
has comment: http://stackoverflow.com/comment/42755279
has comment: http://stackoverflow.com/comment/42758750

http://stackoverflow.com/q/27140838
answer count: 1
tagged with: arrays
has answer: http://stackoverflow.com/a/27141137
has body: I ran into an issue where I am using a library called postcss and it is tokenizing the css and putting those tokens in the array. If the number of tokens is the array is 114456 the code executes instantaneously but if I add one more selector which adds few more token totaling 114468 tokens in the array then the same code slows down a lot. The tokens are exactly the same and it is not going in a different code path. Here is the gist https://gist.github.com/ankurp/e64e9aa2dbcfe0350963 In the gist the code being called is the function and the two css files are shown. The slow one has one more css selector than the other one. The issue seems to start if array is greater than 114456. Is that some magic number in nodejs and are there techniques to speed this up?
type: UnansweredQuestion
tagged with: css
tagged with: node.js
has title: node.js huge slow down when array exceeds a certain size limit
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/q/26992496
answer count: 1
favorite count: 0
has title: Chrome 38: networkPredictionEnabled not accessible
has body: I have an extension that disallows networkPredictionEnabled like this: chrome.privacy.network.networkPredictionEnabled.set({ value: false }) If I execute it on the extension console it works properly on Chrome 32, but it doesn't on Chrome 38. I've done some research and I've seen that in chrome://settings the checkbox has changed its name from Chrome 32 &lt;input id="dnsPrefetchingEnabled" metric="Options_DnsPrefetchCheckbox" type="checkbox" pref="dns_prefetching.enabled"&gt; to Chrome 38 &lt;input id="networkPredictionOptions" metric="Options_DnsPrefetchCheckbox" type="checkbox"&gt; Chrome.privacy.network nor chrome.privacy objects have any other "Prediction" settings. The only thing that I've found is this issue regarding Chromium, but nothing about Chrome. http://code.google.com/p/chromium/issues/detail?id=423748 Is it possible that the didn't remove the object networkPredictionEnabled and didn't add the new one "networkPredictionOptions"? Thanks.
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: google-chrome
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26993319
accepted answer: http://stackoverflow.com/a/26993319
tagged with: google-chrome-extension
upvote count: 1

http://stackoverflow.com/q/27138405
type: Question
has body: When using vanilla node.js' http.createServer, you can get the url that the client requested with req.url. When using express.js, the code for responding to a HTTP GET request is something like: app.get('/', function (req, res) { res.send('Hello World!') }) My problem with this is that it requires you to have an individual app.get for every single page or item on the server. How do I use express.js like the vanilla node.js server to deal with each get request within the callback generated by the http.createServer?
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/42774898
downvote count: 0
has answer: http://stackoverflow.com/a/27138882
has title: What is the express.js equivalent of the node.js http module's "req.url"?
tagged with: javascript
tagged with: express
favorite count: 0
has answer: http://stackoverflow.com/a/27138596
tagged with: node.js
possible better answer: http://stackoverflow.com/a/27138882
accepted answer: http://stackoverflow.com/a/27138885
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27138885

http://stackoverflow.com/q/27106634
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has title: Change cell color via ng-click
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27107104
score: 1
has answer: http://stackoverflow.com/a/27106974
upvote count: 1
type: Question
answer count: 2
has body: I have change color of my cell when I click in my button but when I click second time my color cell is not keep. I wish that when I click a second time on another button my first cell keeps color First click: Second click: HTML: Key Valeur version {{application.version}} Valeur version {{applicationcible.version}} {{group.name}} {{ member.name }} {{ member.valueRef }} {{ member.valueCible }} CSS: .selected { background-color: #ffff05; } JS: scope.moveLeft = function (index, group) { move(scope.properties, group.id, index, 'left'); }; scope.moveRight = function (index, group) { move(scope.propertiescible, group.id, index, 'right'); }; var move = function (properties, groupId, origin, destination) { unregister(); var value; if (destination === 'right') { scope.selectedRowRight = origin; } else { scope.selectedRowLeft = origin; } ...
tagged with: javascript
downvote count: 0

http://stackoverflow.com/a/27039961
has body: Here is the solution. Your browser does not support the HTML5 canvas tag.
has comment: http://stackoverflow.com/comment/42604981
answers question: http://stackoverflow.com/q/27038263
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/27076004
answer count: 1
accepted answer: http://stackoverflow.com/a/27258476
type: AnsweredQuestion
tagged with: imagemap
has body: Image Map Welcome to USA Map Click on Map to find out Take a pick on the map Wyoming Arizona The map will be launched in a child window and Listbox in parent window. On click event of Javascript I want to be able to multi select same items(States) in a Listbox. Can you please help.
type: Question
has answer: http://stackoverflow.com/a/27258476
has title: Clickable USA Map bound to Multi select ListBox -jQuery click event not firing
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42778143
type: QuestionComment
has text: Then mention your research efforts/results in your question, create a jsfiddle.net and properly describe your problem instead of writing a high level concept of what you want to accomplish.
comment on: http://stackoverflow.com/q/27140131
type: Comment
score: 0

http://stackoverflow.com/a/27143844
score: 11
has body: Disclaimer: I'm a software engineer on the Chakra Javascript engine in Internet Explorer 9 and later (Hello from Building 18!) In short: "it depends" - we need to know how many objects you're creating, how complex they are (as JavaScript does not have classes, but prototypes and instances), how frequently you're creating them, and if your script/program would cause the GC to collect the objects (and GC runs aren't pretty). Some tips: If you're storing lots of simple data objects, use an array to take advantage of whatever optimizations the runtime will have. And if you are using an array, ensure all of the elements have the same underlying type (e.g. don't mix JavaScript objects with numbers in the same array). JavaScript is garbage-collected - which means it has all of the downsides associated with it, including pausing the entire script execution while the GC runs. If a lot of objects become available for collection all at once then the GC pause will run for a while. Watch out for memory fragmentation too. Avoid instance properties (i.e. use prototype properties or constructor properties), i.e.: Bad: for(var i = 0; i &lt; 1000; i++ ) { var foo = { baz: function() { return 5; } }; foo.bar(); } Good: function Foo() { } // `Foo` constructor. Foo.prototype.baz = function() { return 5; }; for(var i=0; i &lt; 1000; i++ ) { var foo = new Foo(); foo.bar(); } Also good: function Foo() { } Foo.baz = function(foo) { return 5; }; for(var i=0; i &lt; 1000; i++ ) { var foo = new Foo(); Foo.bar( foo ); } As for your code example, if you're in the root scope (called global, which in browsers is aliased by the window object) then the var keyword has the effect of making a property. So this: var Obj1 = somethig; var obj200 = something; window.Obj1 = Obj1; // there is no `window.global` object window.Obj200 = Obj200; ...doesn't actually do anything: var Obj1 is the same thing as window.Obj1. Finally, a protip: only give Constructor functions TitleCase names, otherwise everything els…
has comment: http://stackoverflow.com/comment/42788424
answers question: http://stackoverflow.com/q/27143720
downvote count: 0
has comment: http://stackoverflow.com/comment/42788526
has comment: http://stackoverflow.com/comment/42788111
type: Answer
has comment: http://stackoverflow.com/comment/42789963
upvote count: 11
has comment: http://stackoverflow.com/comment/42788693

http://stackoverflow.com/q/27069920
has body: I am trying to build an auto-complete for airports using Googles auto-complete places API. I found the following code in an question here, but it returns no results: Setting Google Places 'Types' on Dropdown Input Can anyone help me?
has answer: http://stackoverflow.com/a/27094315
favorite count: 0
tagged with: google-maps-api-3
score: 5
upvote count: 6
type: AnsweredQuestion
tagged with: google-places-api
accepted answer: http://stackoverflow.com/a/27094315
downvote count: 1
type: Question
has title: Google Places autocomplete for Airports
possible better answer: http://stackoverflow.com/a/38828349
has answer: http://stackoverflow.com/a/38828349
answer count: 2
linked to: http://stackoverflow.com/q/12690865
tagged with: javascript
has comment: http://stackoverflow.com/comment/42656394
has comment: http://stackoverflow.com/comment/42653232

http://stackoverflow.com/comment/42778162
comment on: http://stackoverflow.com/a/27140126
type: AnswerComment
score: 0
type: Comment
has text: Ah, I was under the impression that Lync runs in a separate app :)

http://stackoverflow.com/q/27092053
score: 7
upvote count: 7
type: Question
has title: HTML5 Drag and Drop only images
has answer: http://stackoverflow.com/a/27094617
accepted answer: http://stackoverflow.com/a/27094617
tagged with: javascript
tagged with: jquery
tagged with: image
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
tagged with: drag-and-drop
has body: What i'm trying to do is : if all the dragged files was images drop them, but if there was other file exstensions don't drop them, but drop the images only. Here's my try : HTML : &lt;div id="dropzone"&gt;&lt;/div&gt; Javascript : var dropzone = document.getElementById("dropzone"); dropzone.ondrop = function (e) { e.preventDefault(); e.stopPropagation(); var files = e.dataTransfer.files; for(x = 0; x &lt; files.length; x = x + 1){ if(files[x].type.split("/")[0] == 'image') { console.log(files[x].name + "is image"); }else { console.log(files[x].name + "is not image"); } } } i need to loop through the files that i dragged and if the file was image do something otherwise do something else, for example file.jpeg is image file.txt is not image But using my code if i dragged other file extension with the image it's not dropping the image, it's skipping both files. The point is : Dropping only images.
type: AnsweredQuestion

http://stackoverflow.com/q/27053755
type: Question
type: AnsweredQuestion
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42624444
has answer: http://stackoverflow.com/a/27053893
answer count: 3
has answer: http://stackoverflow.com/a/27053828
upvote count: 0
has comment: http://stackoverflow.com/comment/42624432
has title: how to expand onclick
has comment: http://stackoverflow.com/comment/42624377
favorite count: 0
tagged with: expand
has body: here's my html code: echo "&lt;div&gt;"; echo '&lt;video controls&gt;&lt;source src="stuff/' . $entry . '"&gt;&lt;/video&gt;'; echo "&lt;/div&gt;"; here's my js code: &lt;script&gt; var videou = $( "video" ).attr("width", "150") + $( "video" ).attr("height", "80"); $( "video" ).click(function() { $(this).attr("width","500"); $(this).attr("height","500"); var open = true; }); &lt;/script&gt; i want to go back to the original attributes. But i already tried everything. Should i use divs?
tagged with: php
possible better answer: http://stackoverflow.com/a/27054006
accepted answer: http://stackoverflow.com/a/27053893
tagged with: video
has answer: http://stackoverflow.com/a/27054006
has comment: http://stackoverflow.com/comment/42624378
downvote count: 1

http://stackoverflow.com/comment/42661805
has text: I would like to filter by gender. The second API call gives me a dataset based on the gender filter. So if searchVal = 'female', I get a dataset containing only female entries. Hope this clarifies.
score: 0
comment on: http://stackoverflow.com/q/27075165
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27148360
score: 9
has title: Chromecast HTML button
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/41886433
favorite count: 0
upvote count: 9
type: UnansweredQuestion
downvote count: 0
tagged with: chromecast
has comment: http://stackoverflow.com/comment/70857035
has body: Is it possible to call chrome cast via a HTML button? I've written a web page that uses a custom receiver and basically allows a user to show reports to a room of people in the form of stats/charts, but they see controls on their screen. However because this is PURELY a cast app, I want to show a button on the webpage that shows when the user isn't casting and then disappears when they are not casting. So something like: Start Stop And then some JS like: if( CASTAVAILBLE ) { if( CASTING ) { $('#castStart').hide(); $('#castStop').show(); } else { $('#castStart').show(); $('#castStop').hide(); } $('#castStart').on('click', function(e){ startCasting(); $('#castStart').hide(); $('#castStop').show(); }); $('#castStop').on('click', function(e){ sttopCasting(); $('#castStart').show(); $('#castStop').hide(); }); } So basically the plan is to hide and show the buttons based on when they are casting and ONLY if they are ABLE to cast (i.e. the cast extension is installed). Is this possible? Update: This seems to do what I want: https://chrome.com/photowall so it is possible!
type: Question
has comment: http://stackoverflow.com/comment/70763064
has comment: http://stackoverflow.com/comment/44460380

http://stackoverflow.com/a/33512208
answers question: http://stackoverflow.com/q/27007264
type: Answer
downvote count: 0
score: 1
has body: If still needing, or for those who needs it, the correct way would be: function callbackInterval(test) { Meteor._debug("Test"); } Meteor.setInterval(callbackInterval, 60000); as the test parameter would be injected on the function, but i don't know if set Interval would receive a parameter...
upvote count: 1

http://stackoverflow.com/a/27071786
has comment: http://stackoverflow.com/comment/42737313
has body: I get a message when I open the map ( https://www.google.com/fusiontables/data?docid=1gn80WesAXCFzuJ0E41l-5Y0odAnkCCdkYZ3oak0J#map:id=3 ) The message should be clear: This map may not display correctly because the location column does not have map coordinates for all its rows. Someone with edit privileges must geocode the column to fix this The Location-column contains adresses which must be geocoded before the markers may be drawn. Go to File->Geocode to start the automatic geocoding.
has comment: http://stackoverflow.com/comment/42711381
accepted answer of: http://stackoverflow.com/q/27071399
has comment: http://stackoverflow.com/comment/42734632
answers question: http://stackoverflow.com/q/27071399
has comment: http://stackoverflow.com/comment/42736325
has comment: http://stackoverflow.com/comment/42737243
has comment: http://stackoverflow.com/comment/42738045
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42730464
has comment: http://stackoverflow.com/comment/42736914
score: 0
type: Answer

http://stackoverflow.com/comment/42567913
type: Comment
comment on: http://stackoverflow.com/a/27021805
has text: sounds like the problem you identified is probably true
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42582304
type: QuestionComment
has text: Yes, I can control markup
comment on: http://stackoverflow.com/q/27029732
score: 0
type: Comment

http://stackoverflow.com/q/27069969
answer count: 1
tagged with: javascript
tagged with: string
favorite count: 0
type: UnansweredQuestion
has title: Trying to add linebreaks to every found pattern in string
has comment: http://stackoverflow.com/comment/42652751
has answer: http://stackoverflow.com/a/27070385
has comment: http://stackoverflow.com/comment/42652729
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42652903
has body: I have a long string of email addresses, and I need to add a line break to the end of every ".edu" in javascript and write it to the innerHTML of a I'm not very sure how to do this though. Any thoughts?
score: -1
upvote count: 0

http://stackoverflow.com/comment/42613774
type: AnswerComment
has text: Yes, of course. But it will work in cases where the library keeps a handle to the XMLHttpRequest object. If you change the XMLHttpRequest object before the library makes a handle to it then it will end up keeping a handle to your object. So short of completely recreating your own version of XMLHttprequest, I think that would be the best way around it.
score: 0
comment on: http://stackoverflow.com/a/27000541
type: Comment

http://stackoverflow.com/comment/42800392
type: QuestionComment
comment on: http://stackoverflow.com/q/27129195
has text: @ceejayoz Yes. You are right. Tnx on your great help. Your experience with app is really helpful. Can I pay to you somehow?
score: 0
type: Comment

amazon-s3
tags question: http://stackoverflow.com/q/27029229
type: Tag
tag name: amazon-s3
tags question: http://stackoverflow.com/q/27070533
tags question: http://stackoverflow.com/q/26994277

size
type: Tag
tag name: size
tags question: http://stackoverflow.com/q/27133558

http://stackoverflow.com/comment/62220080
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/33507629
has text: I believe there is not any dependencies, so you can use wherever you like.

http://stackoverflow.com/a/27081854
has comment: http://stackoverflow.com/comment/42674396
has body: Your issue might be with part of the code here: " $(this).parent().next " you can try simply: $('.hide-show').slideToggle(); This will select your div with the class hide-show and apply .slidetoggle(); to it. Instead of what you currently have which is looking for the parent of the link with class status_1 and finding the next link.
answers question: http://stackoverflow.com/q/27081751
score: 0
has comment: http://stackoverflow.com/comment/42673454
has comment: http://stackoverflow.com/comment/42673669
type: Answer

http://stackoverflow.com/a/27011648
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27010152
answers question: http://stackoverflow.com/q/27010152
has body: for image form &lt;form action="crop_image.php?id=&lt;?php echo $id;?&gt;" method="post" onsubmit="return checkCoords('&lt;?php echo $j;?&gt;')"&gt; &lt;input type="text" id="x_&lt;?php echo $j;?&gt;" name="x" value="" /&gt; &lt;input type="text" id="y_&lt;?php echo $j;?&gt;" name="y" value=""/&gt; &lt;input type="text" id="w_&lt;?php echo $j;?&gt;" name="w" value=""/&gt; &lt;input type="text" id="h_&lt;?php echo $j;?&gt;" name="h" value=""/&gt; &lt;input type="submit" value="crop"&gt; &lt;input type="reset" value="cancel"&gt; &lt;/form&gt; for updateCoords(c) function function updateCoords(c) { for(i=0; i&lt;count;i++) { var x = $('#x_'+i).val(c.x); var y = $('#y_'+i).val(c.y); $('#w_'+i).val(c.w); $('#h_'+i).val(c.h); } }; function checkCoords(k) { if (parseInt($('#w_'+k).val())) return true; alert('Please select a crop region then press submit.'); return false; }; hi sujan try this
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/27136779
has comment: http://stackoverflow.com/comment/42772255
type: Question
accepted answer: http://stackoverflow.com/a/27137016
answer count: 2
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/42771807
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27136816
has answer: http://stackoverflow.com/a/27136816
has body: I simply have this ternary operator. So I can do movements on a grid that has locations of 0 and -0 since -0 + 1 returns 1; -0 + 1 === 1 ? 0 : -0 + 1; Will I run into hell from some unknown javascript thingy seeing as Math.sign() is not even in beta yet? Right now I was just saving the coordinates as strings and requiring the user do the same but that seems stupid.
favorite count: 0
has answer: http://stackoverflow.com/a/27137016
downvote count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42771914
has title: javascript calculating for math sign of 0 and -0 without ECMA 6, will i run into hell doing this?
has comment: http://stackoverflow.com/comment/42771991

http://stackoverflow.com/a/27040752
downvote count: 0
answers question: http://stackoverflow.com/q/27036392
score: 5
has comment: http://stackoverflow.com/comment/42606362
accepted answer of: http://stackoverflow.com/q/27036392
has body: .content doesn't appear to have any width (look at the tooltip in the upper right-hand corner of your last screenshot). Give it some width: .wizard &gt; .content { ... width: 100%; }
has comment: http://stackoverflow.com/comment/42600913
type: AcceptedAnswer
upvote count: 5
has comment: http://stackoverflow.com/comment/42630989
type: Answer
has comment: http://stackoverflow.com/comment/42600930

http://stackoverflow.com/comment/42626545
comment on: http://stackoverflow.com/q/27055065
type: Comment
score: 0
type: QuestionComment
has text: http://www.designchemical.com/blog/index.php/jquery/create-add-remove-select-lists-using-jquery/

http://stackoverflow.com/q/27123360
has answer: http://stackoverflow.com/a/27123514
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
tagged with: jquery-ui-multiselect
has answer: http://stackoverflow.com/a/27123775
has comment: http://stackoverflow.com/comment/42747327
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27123443
has title: select and unselect from a dropdown list
accepted answer: http://stackoverflow.com/a/27123443
has body: In multiselect jquery dropdown, I want if an item checked it gors to an array and if an item is unchecked it removes from that array. I did: var optionValues = []; $("#myselect").change(function() { $("select option:selected").each(function() { optionValues.push($(this).val()); }); $('select option:not(:selected)').each(function() { itemtoRemove = $(this).val(); optionValues.splice($.inArray(itemtoRemove, optionValues), 1); }); $('#this').val(optionValues.join()); }).trigger( "change" ); &lt;input type="text" id="this"&gt; but it shows nothing in the textbox. Any idea?
type: Question
possible better answer: http://stackoverflow.com/a/27123514

http://stackoverflow.com/comment/42792626
type: Comment
comment on: http://stackoverflow.com/a/27148204
score: 0
type: AnswerComment
has text: Hi. thanks, it looks good. Though my data source is json object format and not array. Am still trying to make you array data source object...:-)

http://stackoverflow.com/comment/107546976
has text: This answer looks suspiciously like OP is modifying state directly, which is a big no-no. Assuming that `abc` has only primitive fields, the proper first line should be `var abc = { ...this.state.abc };`
type: Comment
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/27105353

http://stackoverflow.com/q/27041611
answer count: 1
tagged with: javascript
score: 0
tagged with: knockout-2.0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27041665
accepted answer: http://stackoverflow.com/a/27041665
has body: I'm using knockout with typescript for building the UI of my application. I want to use a knockout binding to notify my typescript if something in my UI changes. My code works, but unfortunately only in one-way. The initial value 5 is shown after page was loaded, but if I change something in the breakTime input, the subscribe-method is never entered. The selectedDates array contains objects which contain the breakTime properties. The HTML code: &lt;!-- ko 'foreach': $root.selectedDates--&gt; &lt;td&gt; &lt;input type="text" name="breakTime" data-bind="value: breakTime()" class="bookingTextBox" /&gt; &lt;/td&gt; &lt;!-- /ko --&gt; The typescript code: public breakTime: KnockoutObservable&lt;string&gt;; constructor(date: Date, viewModel: Booking.BookingViewModel) { this.breakTime = ko.observable("30"); this.breakTime.subscribe((newValue) =&gt; { alert(newValue); }); } I never worked with knockout foreach-element before, maybe the error is caused by that. Do I have to do something else ot get this working?
type: AnsweredQuestion
tagged with: typescript
tagged with: knockout.js
has title: Knockout-Binding only works One-Way
type: Question

http://stackoverflow.com/comment/42573997
type: Comment
has text: Is working, that is not working is the feed of the hour: http://json-time.appspot.com/time.json
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27019252

http://stackoverflow.com/comment/42597027
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27038507
type: Comment
has text: There is no need for your `$(li.get().reverse())`, it works just with the `li.filter` like in the `prev` event.

http://stackoverflow.com/q/27057984
has comment: http://stackoverflow.com/comment/42631058
has comment: http://stackoverflow.com/comment/42631216
has body: I'm doing a client side in javascript and html. I have a problem. I want to check if password and repeat password are the same. In that case I want to disable an input. I saw some codes around but I don't understand why it doesn't work. Can you help me? Here is my HTML: &lt;input class="form-control form-stacked last" name="repeatPassword" id="repeat" placeholder="Repeat password" type="password"&gt; &lt;input class="btn btn-beats btn-block btn-stacked" value="Sign up" onkeydown="enable()" id = "btnPlaceOrder" type="submit"&gt; &lt;input class="form-control form-stacked" name="password" id = "password" placeholder="Password" type="password" required="true"&gt; And then here is my javascript function: var password = document.getElementById("password"); var repeat = document.getElementById("repeat"); function enable(){ if (password.value() == repeat.value()){ document.getElementById("btnPlaceOrder").disabled = false; } else{ document.getElementById("btnPlaceOrder").disabled = true; } } Just to be precise, I did the import of the javascript in my HTML
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/42631420
has comment: http://stackoverflow.com/comment/42631150
has answer: http://stackoverflow.com/a/27058200
has comment: http://stackoverflow.com/comment/42630999
has comment: http://stackoverflow.com/comment/42631228
favorite count: 0
has comment: http://stackoverflow.com/comment/42631156
has title: Disable an input with javascript. Checking the code
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42631139
has comment: http://stackoverflow.com/comment/42631046
has comment: http://stackoverflow.com/comment/42631284
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42631324
has comment: http://stackoverflow.com/comment/42631049
downvote count: 0
has comment: http://stackoverflow.com/comment/42631467
score: 1
possible better answer: http://stackoverflow.com/a/27058200
has comment: http://stackoverflow.com/comment/42631068
type: Question
has comment: http://stackoverflow.com/comment/42631326
has comment: http://stackoverflow.com/comment/42631029
has answer: http://stackoverflow.com/a/27058162
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27058162
has comment: http://stackoverflow.com/comment/42631104
has comment: http://stackoverflow.com/comment/42631169

http://stackoverflow.com/a/27063654
has comment: http://stackoverflow.com/comment/42641537
downvote count: 0
answers question: http://stackoverflow.com/q/27063573
type: Answer
score: 1
has body: As others have mentioned in the comments, this will work for you: &lt;a href="#" ng-click="searcher(update.host)"&gt;{{update.host}}&lt;/a&gt; &lt;/td&gt; Check out the documentation for ng-click, which indicates it accepts an expression (so you don't need the {{binding}} syntax).
upvote count: 1
has comment: http://stackoverflow.com/comment/42641734

http://stackoverflow.com/comment/42556858
comment on: http://stackoverflow.com/a/27015395
has text: Anyway, what does OP mean. I prefer this because this solution doesn't need much identity since I will use a php looping.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42770661
type: AnswerComment
comment on: http://stackoverflow.com/a/27135596
type: Comment
has text: That's helpful. Thanks!
score: 0

http://stackoverflow.com/q/27071286
has comment: http://stackoverflow.com/comment/42655136
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/46322684
favorite count: 0
has answer: http://stackoverflow.com/a/27071333
has comment: http://stackoverflow.com/comment/42655171
has answer: http://stackoverflow.com/a/27071371
has answer: http://stackoverflow.com/a/27071332
has answer: http://stackoverflow.com/a/27071325
has answer: http://stackoverflow.com/a/27071370
has body: I want to remove the last &lt;BR&gt;s in a div with jQuery. I tried this code but it removes the line break tags at the first and the middle too. HTML Code &lt;div class="topic"&gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.&lt;br/&gt; Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes,&lt;br/&gt; nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. DonecLorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;/div&gt; jQuery Code $(document).ready(function(){ $('.topic').find('br').remove(); });
tagged with: css
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/27071325
has comment: http://stackoverflow.com/comment/42655142
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/42655125
has comment: http://stackoverflow.com/comment/42655249
accepted answer: http://stackoverflow.com/a/27071370
has title: How to remove last BR elements in a div with jQuery
tagged with: javascript
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/42655188
has comment: http://stackoverflow.com/comment/42655191

http://stackoverflow.com/comment/42658041
score: 0
type: Comment
has text: @Guffa: well, in JS characters are compared by code points. That's comprehensive and correct (from the ECMAScript point of view).
comment on: http://stackoverflow.com/a/27072608
type: AnswerComment

http://stackoverflow.com/comment/42644756
score: 0
comment on: http://stackoverflow.com/a/27065182
type: AnswerComment
type: Comment
has text: Perhaps I misunderstood the problem. My code should do the same as yours using vanilla JavaScript, but Angular may do something I'm unaware of.

http://stackoverflow.com/q/27076345
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27077310
score: 0
has answer: http://stackoverflow.com/a/27076395
type: Question
possible better answer: http://stackoverflow.com/a/27077310
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/27076395
has body: I'm having some trouble running some JS inside a html5 body. Here's what's happening, whenever I remove all instances of the arrays from the JS file I am using, the script loads fine in the index file, however, when I add src to the attribute and/or mention an array name from said file, it breaks. simple as that. since I'm planning on making a pretty big site, I have already begun organizing my root. here's a little demo: rootFolder/ index.htm js/targetJS.js here's the code Whenever i add the src in the attribute and the lines that are commented out, the code does not work, however, when I omit the src and the lines that are currently commented out, the code works fine. even JSfiddle reports it working fine. The contents of the JS file are 3 arrays with 5 indexes.
has title: Beginner HTML5 path/to/jsFile. Unable to load script?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/123316261
type: Comment
has text: Check my answer follow, just add {passive: false} when addEventerListener window.addEventListener("wheel", handleWheel, {passive: false}); https://stackoverflow.com/questions/27116221/prevent-zoom-cross-browser/69709413#69709413
type: AnswerComment
comment on: http://stackoverflow.com/a/27184644
score: 0

http://stackoverflow.com/q/27026227
has body: I am using the node.js libraries nomnom for command line parsing and bluebird's promises. Nomnom offers to execute commands via a callback. Unfortunately, the callback doesn't support returning promises. I was wondering, what is the best way to handle this interface mismatch? I was thinking adding a busy loop that blocks until a promise is resolved / rejected (using isPending ) in this case. Is there a better way ? var parser = require("nomnom"); parser.command('somecommand').callback(function(opts) { var p = thisFuncReturnsAPromise(); //have to block here since //nomnom expects at the end of the callback that processing of the command is done. })
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42578587
has comment: http://stackoverflow.com/comment/42575961
tagged with: node.js
score: 2
linked to: http://stackoverflow.com/q/22519784
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/42577559
has comment: http://stackoverflow.com/comment/42576521
has title: What to do when a promise cannot be passed down to a thirdparty library?
has comment: http://stackoverflow.com/comment/42575787
has comment: http://stackoverflow.com/comment/42576632
tagged with: javascript
has comment: http://stackoverflow.com/comment/42578272
has answer: http://stackoverflow.com/a/27026313
has comment: http://stackoverflow.com/comment/42577293
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42577170
favorite count: 0
tagged with: promise

http://stackoverflow.com/comment/42518546
has text: http://i.imgur.com/OragoZN.png This is what I'm trying to avoid, I dont want this annoying GUI login page, I just want it to back end authenticate, as this script is supposed to run automatically on its own monthly
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/26993067

http://stackoverflow.com/q/27117337
tagged with: express
favorite count: 0
has answer: http://stackoverflow.com/a/38639555
has answer: http://stackoverflow.com/a/44464276
possible better answer: http://stackoverflow.com/a/51981393
has answer: http://stackoverflow.com/a/75553176
has body: I have a node app sitting like a firewall/dispatcher in front of other micro services and it uses a middleware chain like below: ... app.use app_lookup app.use timestamp_validator app.use request_body app.use checksum_validator app.use rateLimiter app.use whitelist app.use proxy ... However for a particular GET route I want to skip all of them except rateLimiter and proxy. Is their a way to set a filter like a Rails before_filter using :except/:only?
has answer: http://stackoverflow.com/a/61492286
score: 50
has answer: http://stackoverflow.com/a/51981393
has answer: http://stackoverflow.com/a/57255764
has comment: http://stackoverflow.com/comment/57095048
has title: Exclude route from express middleware
has answer: http://stackoverflow.com/a/27118077
tagged with: node.js
has answer: http://stackoverflow.com/a/74311427
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/60741359
has answer: http://stackoverflow.com/a/76062038
tagged with: coffeescript
answer count: 11
tagged with: middleware
accepted answer: http://stackoverflow.com/a/27118077
type: Question
upvote count: 50
has answer: http://stackoverflow.com/a/32627407
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/27049066
type: AnsweredQuestion
type: Question
score: 0
has answer: http://stackoverflow.com/a/27096097
tagged with: javascript
has answer: http://stackoverflow.com/a/27049441
has body: I have a TextArea, and underneath is a character count. The html is the following: &lt;textarea class="form-control rows="7" ng-model="feedback" maxlength="1000"&gt;&lt;/textarea&gt; &lt;span&gt;{{1000 - feedback.length}}&lt;/span&gt; The controllers are all wired up properly and so forth, but the issue is with how the two counters are counting. The max length attribute (as well as the ng-maxlength, for that matter), will include carriage returns. However, feedback is just a string in my scope, which excludes any carriage returns. As a result, every time I press "Enter", I get a little closer to the max length without impacting the character count. The result is that if the user presses enter 8 times, then he is blocked from typing once the character count says there are still 8 characters remaining. How can I solve this using Angular?
accepted answer: http://stackoverflow.com/a/27096097
tagged with: angularjs
answer count: 3
possible better answer: http://stackoverflow.com/a/27049155
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27049155
has title: How can I make my textarea maxlength correspond to its current length as determined by ng-model?

http://stackoverflow.com/a/27073626
upvote count: 1
has comment: http://stackoverflow.com/comment/43597163
accepted answer of: http://stackoverflow.com/q/27072903
has comment: http://stackoverflow.com/comment/43647112
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27072903
has comment: http://stackoverflow.com/comment/43615298
has comment: http://stackoverflow.com/comment/42694109
has body: Seu navegador não suporta o recurso "canvas" do HTML 5. You need to debounce the event, so it's not firing every millisecond. Underscore's throttle or Underscore's debounce methods are what you need here depending on your requirement.
type: Answer
score: 1

http://stackoverflow.com/a/40437495
has comment: http://stackoverflow.com/comment/73667230
has comment: http://stackoverflow.com/comment/68122224
upvote count: 3
has body: It is simple: function load(){ document.body.addEventListener("wheel", zoomShortcut); //add the event } function zoomShortcut(e){ if(e.ctrlKey){ //[ctrl] pressed? event.preventDefault(); //prevent zoom if(e.deltaY<0){ //scrolling up? //do something.. return false; } if(e.deltaY>0){ //scrolling down? //do something.. return false; } } } p { display: block; background-color: #eeeeee; height: 100px; } Mousewheel control! If your Mouse is in this Box, you can't zoom.
score: 1
answers question: http://stackoverflow.com/q/27116221
downvote count: 2
type: Answer

http://stackoverflow.com/a/27116056
type: Answer
has body: cloneNode() does not clone event handlers. So you should move the callback function to a separate variable/named function and register it every time you clone it. Alternatively use event bubbling
answers question: http://stackoverflow.com/q/27115974
score: 0

http://stackoverflow.com/comment/42791317
has text: The `click` event on `option` elements is not supported everywhere.
comment on: http://stackoverflow.com/q/27147982
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/42707741
type: AnswerComment
score: 0
type: Comment
has text: make html in global scope
comment on: http://stackoverflow.com/a/27101728

http://stackoverflow.com/comment/42823378
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27121171
has text: After creating folder, installation works fine in my local machine but it is not working in my office machine. Please find the link with details http://stackoverflow.com/questions/27165638/network-error-while-installing-selenium-webdriver-package-using-npm

http://stackoverflow.com/q/27011527
tagged with: angular-file-upload
has answer: http://stackoverflow.com/a/27033461
tagged with: request-headers
type: AnsweredQuestion
has body: I am using angular-file-upload in my application especially for IE compatability, before I have Used Formdata to upload files, Its working fine chrome, but its not working in IE9+ browser, The problem is the provisional headers set by me are not sent to server which causes the problem Can anyone helpme on the same? Thanks and Regards, Satish
type: Question
has title: angular-file-upload provisional headers are not sent in IE browser
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/27033461
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs

http://stackoverflow.com/comment/42750738
has text: Can't do that, the images change in height to the div needs to change with them. The div also needs to be their permanently as it is premium advertising space.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27125310

http://stackoverflow.com/a/27127594
answers question: http://stackoverflow.com/q/27127490
type: Answer
type: AcceptedAnswer
has body: If you are trying to declare ugu in the global namespace you should use var. var ugu={ temp:function(s){ alert(s); } }; File 2 will have to be loaded before file 3 will run. You might consider looking into require.js it is handy for this.
accepted answer of: http://stackoverflow.com/q/27127490
score: 0

http://stackoverflow.com/a/27028292
score: 2
has body: Try using regex. Here are some examples. The result is null if no match was found. alert("0e1".match(/^[-+]?[0-9]*\.?[0-9]+$/)) // null alert("1".match(/^[-+]?[0-9]*\.?[0-9]+$/)) // 1 alert("-1".match(/^[-+]?[0-9]*\.?[0-9]+$/)) // -1 alert("1.0".match(/^[-+]?[0-9]*\.?[0-9]+$/)) // 1.0 alert("-1.5".match(/^[-+]?[0-9]*\.?[0-9]+$/)) // -1.5 alert("-1.5 4".match(/^[-+]?[0-9]*\.?[0-9]+$/)) // null
downvote count: 0
answers question: http://stackoverflow.com/q/27028096
upvote count: 2
type: Answer

http://stackoverflow.com/q/27008960
score: 0
has comment: http://stackoverflow.com/comment/42546085
tagged with: http://stackoverflow.com/tag/html
has title: jquery autocomplete results to html/div
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27009202
has answer: http://stackoverflow.com/a/27009146
tagged with: autocomplete
tagged with: mysql
has body: I need to output results from a database to jquery autocomplete that will put the results dynamically into html as the user types the search. 1) html tags of input and div elements 2) javascript/jquery a) calls to call the json url for getting data b) jquery/javascript to fill html div tags list (and remove elements as they search broadens. Search Name: Hitlon i've searched for similar questions but can't find a complete solution. this is similar to Google search results. HTML output would be div tags that show Trade Name and Location in the results on the same page. var myJSONObject = {"searchResults": [ {"id": "10", "permit": "MB863880", "trade_name": "HILTON GARDEN INN", "location":"4449 RIDGEMONT DR ABILENE, TX, 79606"}, {"id": "213", "permit": "MB850728", "trade_name": "HILTON GARDEN INN - ADDISON", "location":"4090 BELT LINE RD ADDISON, TX, 75001"}, {"id": "273", "permit": "RM766705", "trade_name": "HILTON GARDEN INN-ALLEN", "location":"705 CENTRAL EXPY S ALLEN, TX, 75013"} ] };
has comment: http://stackoverflow.com/comment/42546032
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/26999381
has comment: http://stackoverflow.com/comment/42533745
has body: Say I want to be able to detect if someone calls the following method: document.querySelectorAll('input'); Is it possible for me to hook this call so that if any other scripts loaded in my context, I can log its execution? Context: I'm thinking of ways to mitigate Man in the Browser Attacks via a chrome extension, and function hooking is one thing I thought of. This question neatly demonstrates that I can hook a call for my own uses, but clearly other scripts would have to use MY hooked function, which defeats what I'm after. I'd like to be able to hook document.querySelectorAll() at a level that all other scripts are invisibly using it. [EDIT] Additional information Specifically, I'm looking for a way to be able to detect when document.querySelectorAll('input'); gets called, anywhere in my context, period. The context in this case would be a loaded page with multiple scripts imported. For the record, I'm pretty sure that this can't be done via javascript alone without modifying the interpreter its running on.
has comment: http://stackoverflow.com/comment/42530167
has comment: http://stackoverflow.com/comment/42612815
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/42609353
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42533654
favorite count: 0
accepted answer: http://stackoverflow.com/a/27035250
type: AnsweredQuestion
has title: Can you hook "low level" calls in javascript so that you can log execution?
has comment: http://stackoverflow.com/comment/42529177
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42609140
linked to: http://stackoverflow.com/q/10273309
type: Question
has answer: http://stackoverflow.com/a/27035250
tagged with: javascript
has comment: http://stackoverflow.com/comment/42534102

http://stackoverflow.com/q/26993657
type: Question
has answer: http://stackoverflow.com/a/26993755
accepted answer: http://stackoverflow.com/a/26993755
has body: I have this code, that works: function getSomeValue(property) { var obj = { lvl1: { lvl2: { lvl3: 'hi' } } }; //Is it ok to use eval? return eval('obj.' + property); } //I would like to return the value of obj.lvl1.lvl2.lvl3 getSomeValue("lvl1.lvl2.lvl3"); It is the first time I feel the need to use eval. Is eval evil? Is there another quick way to achieve this?
tagged with: javascript-objects
upvote count: 1
linked to: http://stackoverflow.com/q/8051975
has title: Is it achievable without eval?
possible better answer: http://stackoverflow.com/a/26993749
duplicate of: http://stackoverflow.com/q/8051975
has answer: http://stackoverflow.com/a/26993749
answer count: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42518140
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/comment/42619199
comment on: http://stackoverflow.com/q/27050784
type: Comment
score: 3
has text: That's just how it is. If you don't like this requirement, you should probably talk to the Google Closure devs.
type: QuestionComment

http://stackoverflow.com/comment/42712010
type: Comment
comment on: http://stackoverflow.com/a/27103686
type: AnswerComment
has text: Yes, I think that the `newVal !== oldVal` is redundant in this case. Or maybe both conditions... :)
score: 0

http://stackoverflow.com/comment/42800066
comment on: http://stackoverflow.com/a/27133793
type: AnswerComment
score: 0
type: Comment
has text: Great! We need to document the chart registry; it's useful stuff.

http://stackoverflow.com/comment/42530809
type: Comment
has text: PLEASE HELP : Why I get this erros: http://i.imgur.com/h85awlo.png when I try to run this : https://github.com/jkvoorhis/userAuth/blob/master/index.js Please help, its so important to me to understand basic of this tehnologies
type: AnswerComment
comment on: http://stackoverflow.com/a/26999195
score: 0

http://stackoverflow.com/q/27079920
type: UnansweredQuestion
has title: in chrome just typing id of element automatically selects it
has answer: http://stackoverflow.com/a/27081504
tagged with: google-chrome
type: Question
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42671004
has body: So if i have element with id asd. And i go write asd in console it will get selected. And if i write asd.addEvent...etc in script file it will work. I didn't use getElementById(.. or anything. I am confused since when did it start happening. And is it only chrome specific thing. Or Firefox and other browsers have it too. Then Why even type documentGetElementById()... I tried incognito mode and it worked there too. So it's not some plugins messing up. Summary: I type id and element is selected.
has comment: http://stackoverflow.com/comment/42671446
linked to: http://stackoverflow.com/q/3434278

http://stackoverflow.com/q/27084433
answer count: 1
has body: I try to display json data on alert but cannot display anything. I have a json file named json_data.txt and here are my codes; $.getJSON('json_data.txt', function(read_data){ $.each(read_data.movies,function(i,movie){ alert("Movie Name:"+movie.name+" Actresses:"+movie.actress+" Actors"+movie.actor) }); });
has comment: http://stackoverflow.com/comment/42678068
has comment: http://stackoverflow.com/comment/42678101
has title: I try to display json data on alert but cannot display anything
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42677830
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/42677908
has comment: http://stackoverflow.com/comment/42677836
tagged with: javascript
has answer: http://stackoverflow.com/a/27084461
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27084461
tagged with: ajax
has comment: http://stackoverflow.com/comment/42677848
score: 0

http://stackoverflow.com/comment/42645393
has text: Did you put that inside the tags?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27065796
type: Comment

http://stackoverflow.com/q/27047067
score: 0
tagged with: google-maps
tagged with: alt
answer count: 1
has title: add alt tag inside of infowindow for google maps v3 javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27050484
has body: I have an application in which i draw items on a google map. In doing so, i have multiple markers with defined infowindows for each. Inside the infowindow, i would like to display an image (this works). Associated to that image i would like an ALT tag associated on scroll over. This however, does not seem to work when used as seen in my example code below. Does anyone have any reason/ideas here to assist? var contentString = ' ' + 'Device Name: ' + devicesArray[value][1] + ' ' + 'Type: ' + devicesArray[value][3] + ' ' + 'IP : ' + devicesArray[value][8] + ' ' + 'Availabiliy: ' + devicesArray[value][9] + '% ' + 'Events: ' + devicesArray[value][10] + '% ' + ' '; infowindow = new google.maps.InfoWindow({ content:contentString }); So when i scroll over the image, nothing at all happens. Thanks in advance.
type: Question
tagged with: javascript
tagged with: image
tagged with: google-maps-api-3

http://stackoverflow.com/comment/42655299
has text: I think you should initialize masonry via JS in the rendered callback, this works fine for me.
score: 1
comment on: http://stackoverflow.com/q/27071187
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27119755
type: Question
has comment: http://stackoverflow.com/comment/42741625
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
has title: Trying to put list data into another list
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: In the program below I am using fee head id and trying to access dynamic data but when I select or click on any element of the first list it does not go to the next list. After clicking on any element in first list, the element should disappear from first list and display in the second list. I am using a theme which has built-in classes in JS and JSP.
tagged with: css
has comment: http://stackoverflow.com/comment/42741837
upvote count: 0
has answer: http://stackoverflow.com/a/27120362
has comment: http://stackoverflow.com/comment/42740845
has comment: http://stackoverflow.com/comment/42740827

http://stackoverflow.com/comment/130464523
score: 0
has text: For those who were searching for an exact answer in one go: [Appending HTML using native JavaScript](https://stackoverflow.com/questions/42517697/appending-html-using-native-javascript)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27079598

http://stackoverflow.com/comment/42634303
type: Comment
has text: possible duplicate of [How to open a file / browse dialog using javascript?](http://stackoverflow.com/questions/6463439/how-to-open-a-file-browse-dialog-using-javascript)
score: 1
comment on: http://stackoverflow.com/q/27059830
type: QuestionComment

http://stackoverflow.com/comment/42642172
type: QuestionComment
comment on: http://stackoverflow.com/q/27046466
score: 0
has text: Did you try just ` {{password}} `? Could just be a closed tag issue
type: Comment

http://stackoverflow.com/a/27138447
has body: Of course! the variable item holds the current iteration match. After the for cycle completes, it will naturally hold the last matched element. Javascript is executed sequentially, meaning the return statement will be executed after the forcycle.
type: Answer
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/27138391

http://stackoverflow.com/a/27013860
answers question: http://stackoverflow.com/q/27013096
has comment: http://stackoverflow.com/comment/42554502
has body: I think you can better use Custom Validator and use its ClientValidationFunction functions that may somehow look like: &lt;asp:CustomValidator id="CustomValidator1" ClientValidationFunction="MyClientValidationFunction" /&gt; &lt;script language="javascript"&gt; function MyClientValidationFunction(sender, args){ sender.errormessage = "Validation failed"; args.IsValid = true; // false based upon your conditions... return; } &lt;/script&gt; Client Validation Function Reference
has comment: http://stackoverflow.com/comment/42554698
score: 0
has comment: http://stackoverflow.com/comment/42553890
has comment: http://stackoverflow.com/comment/42555226
has comment: http://stackoverflow.com/comment/42555901
type: Answer

http://stackoverflow.com/q/27073492
favorite count: 0
possible better answer: http://stackoverflow.com/a/27073526
has body: I have some problem with this code, in this case i set div as a button, when I click the button everything is working as expected but when I want to stop animation with clearInterval it doesn’t work, just keeps looping... What I am doing wrong? var timeout; var d1=$(".drum1"); function dani1(){ d1.animate({height:'150px', width:'150px', opacity:'0.4'},"slow"); d1.animate({height:'100px', width:'100px',opacity:'0.8'},"fast"); } d1.click(function(){ if (!timeout){ timeout = setInterval(dani1, 200); } else { clearInterval(timeout); timeout = null; } }); &lt;div class="drum1" style="background:#98bf21;height:100px;width:100px;position:absolute;"&gt; &lt;/div&gt;
has comment: http://stackoverflow.com/comment/42658933
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/27073559
type: Question
answer count: 2
tagged with: jquery-animate
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: clearinterval
accepted answer: http://stackoverflow.com/a/27073559
has title: Can't clearInterval on animation
tagged with: setinterval
has answer: http://stackoverflow.com/a/27073526

http://stackoverflow.com/comment/42618529
type: AnswerComment
has text: This solution is more complex than the others because you need to understand what the DOM is AND you need to know what all that jQuery stuff is about, to do exactly the same thing!
comment on: http://stackoverflow.com/a/27050445
type: Comment
score: 1

http://stackoverflow.com/q/27095912
has body: I noticed that when i try to get the new content from a div, the browser returns the old content of the div. Old text Now the div text has changed: New text But when i try to alert the innerHTML of the div, i get the old text. Can you please tell me why, and how can i get the new text? EDIT Excuse me, i have provided a wrong javascript code. This is corect: var text = document.getElementById('here').innerHTML; document.getElementById('here').innerHTML = "New text"; alert(text); // returns "Old text"
has title: Locate new created elements
has comment: http://stackoverflow.com/comment/42697413
has comment: http://stackoverflow.com/comment/42697309
has comment: http://stackoverflow.com/comment/42697312
linked to: http://stackoverflow.com/q/1308624
type: AnsweredQuestion
downvote count: 3
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42697467
has answer: http://stackoverflow.com/a/27096009
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42697445
answer count: 1
accepted answer: http://stackoverflow.com/a/27096009
favorite count: 0

http://stackoverflow.com/comment/42761899
score: 0
has text: yes, each tab is it's own DIV
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27115790

http://stackoverflow.com/q/27126343
has comment: http://stackoverflow.com/comment/42763145
has comment: http://stackoverflow.com/comment/42786303
has comment: http://stackoverflow.com/comment/42783307
has comment: http://stackoverflow.com/comment/42765243
has comment: http://stackoverflow.com/comment/42780566
tagged with: selectionchanged
has title: JavaScript selectionchange-EventListener, triggering infinitely on document.execCommand
type: Question
tagged with: addeventlistener
answer count: 1
has comment: http://stackoverflow.com/comment/42759803
downvote count: 0
has comment: http://stackoverflow.com/comment/42786026
tagged with: javascript
has comment: http://stackoverflow.com/comment/42755186
has comment: http://stackoverflow.com/comment/42785053
has comment: http://stackoverflow.com/comment/42753958
favorite count: 0
has comment: http://stackoverflow.com/comment/42779812
has comment: http://stackoverflow.com/comment/42753250
has body: I have added an event listener for selectionchange as below, document.addEventListener("selectionchange", function() { highlight(); console.log("selectionchange-triggered"); }, false); then I have added the below code, to highlight selected text. function highlight() { document.designMode = "on"; document.execCommand("hiliteColor", false, "#ff0000"); document.designMode = "off"; } When the highlight function is called, the EventListener for selectionchange is fired infinitely until I clear the selection. have any one faced the same issue ? can any one suggest a solution to solve this issue ?
tagged with: designmode
has answer: http://stackoverflow.com/a/27145318
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42760243
score: 2
has comment: http://stackoverflow.com/comment/42754189
has comment: http://stackoverflow.com/comment/42783455
upvote count: 2
has comment: http://stackoverflow.com/comment/42755322
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42764889

http://stackoverflow.com/comment/42619296
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27050809
has text: Hi, are you sure? i tried but doesn't works. Can you do a JF?
type: Comment

http://stackoverflow.com/comment/42705486
score: 0
comment on: http://stackoverflow.com/q/27100596
type: Comment
type: QuestionComment
has text: Back in the early days of the web, TCL was competing with JavaScript and VBScript as a web scripting language. The W3C probably used it as an example as JavaScript is outside the W3C's remit (ECMA publishes the ECMAScript/JavaScript standards and specifications, not the W3C).

http://stackoverflow.com/comment/42704497
comment on: http://stackoverflow.com/a/27099595
score: 1
has text: I would suggest you to read a book "JavaScript: The Good Parts" by Douglas Crockford
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27057246
score: 1
accepted answer of: http://stackoverflow.com/q/27057234
upvote count: 1
answers question: http://stackoverflow.com/q/27057234
type: AcceptedAnswer
has body: both foobar and foobaz are jQuery object, you can't use + to add them $('div.masterButtons').after(function () { var foobar = $(' foo bar '); var foobaz = $(' foo baz '); return foobar.add(foobaz) });
type: Answer
downvote count: 0

http://stackoverflow.com/comment/42657896
has text: Aah, sorry I misunderstood. I'll work on it when I have time.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27072545
type: Comment

http://stackoverflow.com/comment/71169459
comment on: http://stackoverflow.com/a/27041383
score: 1
type: AnswerComment
type: Comment
has text: This is an old answer, but the suggested solution doesn't work because of sandboxing for Chrome extensions. You can't dynamically create script blocks. You can insert a as long as it's just text and not running from JS.

http://stackoverflow.com/q/27054983
has comment: http://stackoverflow.com/comment/42626639
has comment: http://stackoverflow.com/comment/42630127
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42639946
has answer: http://stackoverflow.com/a/27055033
upvote count: 3
tagged with: dom
accepted answer: http://stackoverflow.com/a/27055033
type: Question
score: 3
has title: retrieve a text from paragraph and change its color
tagged with: javascript
has comment: http://stackoverflow.com/comment/42638978
has comment: http://stackoverflow.com/comment/42634360
has body: search.lengthIs there a way to retrieve a text from paragraph and change its color? i tryed: 1,2,3,4,5,6,7,some text,another text var qq = document.getElementById("userInput").innerHTML.match(/5/g); var blaaa = qq.style.color = "red"; document.getElementById("userInput").innerHTML = blaaa; EDIT: var search = ['new', 'and']; $(document).ready(function () { for(var i = 0;i<2;i++){ $("div:contains('"+search[i]+"')").each(function () { var regex = new RegExp(search[i],'gi'); $(this).html($(this).text().replace(regex, ""+search[i]+"")); }); } });
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/42626589

http://stackoverflow.com/q/27088573
has body: I am cloning a div with two input field where one is hidden field. Now I want to remove the hidden field from cloned div before append. I have no idea how to do it. I have goggled for it but no suitable code for my work or may be I am not understanding properly. Can anyone please help me on this please ?!!! Here are my code below :: my div which I want to clone >>> <g:message code="so" default="Member Name" /> <g:textField id="participatedWcMemberName${i}" name="participatedWcMemberName${i}" value="${wcMembers?.participatedWcMemberName}" class="form-control" required=""/> <g:hiddenField name="participatedWcMemberId${i}" value="${wcMembers?.id}"/> Add More || Remove my function to clone the div >>> function addAnotherWcMemberEdit(){ var memberSign = 'participatedWcMemberName' + wcMemberCounterEdit $('#wcmEdit').clone().find('input').attr({ value: '', id: memberSign, name: memberSign }).end().appendTo('#wcMember'); wcMemberCounterEdit++; }
upvote count: 1
has answer: http://stackoverflow.com/a/27089086
favorite count: 0
has comment: http://stackoverflow.com/comment/43126317
type: UnansweredQuestion
answer count: 4
has title: how to remove a input field after cloning in jquery
has answer: http://stackoverflow.com/a/27092646
score: 1
has answer: http://stackoverflow.com/a/27088949
type: Question
has answer: http://stackoverflow.com/a/27089015
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: grails

http://stackoverflow.com/q/27080912
has comment: http://stackoverflow.com/comment/42671462
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27084183
tagged with: php
has comment: http://stackoverflow.com/comment/42671387
type: Question
tagged with: javascript
has body: I want to pass id from home page to edit page . i can see it in home page . th code is : {{data.ID}} {{data.subject}} Edit here i can't see the id page with data binding ? edit page {{data.ID}} the question is how to edit data with specefic Id ? Thx
score: 0
has title: Pass id from home page in edit page
answer count: 1

http://stackoverflow.com/a/29637674
answers question: http://stackoverflow.com/q/27074593
downvote count: 0
score: 1
has body: We might have to move to Index-Time Search, which uses a 1-character ngram and do a normal _search query.
type: Answer
has comment: http://stackoverflow.com/comment/47417758
upvote count: 1
has comment: http://stackoverflow.com/comment/47418532
has comment: http://stackoverflow.com/comment/47418293

http://stackoverflow.com/a/27012786
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42552161
type: Answer
answers question: http://stackoverflow.com/q/27012692
accepted answer of: http://stackoverflow.com/q/27012692
has body: === is a logical operator so it return a bool value So you can do return $( "strong", this ).length === 1; instead of if($( "strong", this ).length === 1){ return true; }else{ return false; } For the edit: the filter method is used to select a list of "li" that you want. so i think that if the $( "strong", this ).length === 1 is false, the current this li will not be in the list. Then it will execute the css method on all li that are in the list.

http://stackoverflow.com/a/27074229
has comment: http://stackoverflow.com/comment/56733945
type: Answer
score: 8
upvote count: 8
has body: For any number x, we should have x + 1 - x == 1, right? Well, Infinity + 1 == Infinity So what should Infinity + 1 - Infinity be? Is it 1? Then we have Infinity - Infinity == 1, which seems weird and arbitrary. There is no infinity in the real numbers. There is an infinity in floating-point because it's convenient for some numerical algorithms to get a result when you do things like 1 / 0, but floating-point infinity cannot have all the nice properties you would like a number to have. In particular, there's no sensible number to return for Infinity - Infinity, so we get NaN.
answers question: http://stackoverflow.com/q/27074158
downvote count: 0

http://stackoverflow.com/q/27082488
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42674393
type: Question
has title: How to store common strings in a variable in mustache.js
has answer: http://stackoverflow.com/a/27613705
has body: Is there a way in mustache to store common strings in the template? E.g., I have three inputs below but I don't want to enter { "ID":{{ID}},"table":"log_candidates" } three times: &lt;input data-data='{ "ID":{{ID}},"table":"log_candidates" }' ... &lt;input data-data='{ "ID":{{ID}},"table":"log_candidates" }' ... &lt;input data-data='{ "ID":{{ID}},"table":"log_candidates" }' ... In anycase I am putting all my templates in a php file so I can simple to this: &lt;?php $data = '{ "ID":{{ID}},"table":"log_candidates" }'; ?&gt; &lt;td&gt;&lt;input data-data='&lt;?= $data ?&gt;' ..
tagged with: javascript
tagged with: variables
score: 0
answer count: 1
tagged with: mustache

http://stackoverflow.com/a/27133573
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27133534
upvote count: 1
score: 1
has body: Yes, with index(), which returns the zero-based index of the element from amongst its sibling elements: $('body').on('click','.tab',function(){ var clicked = $(this).index(); switch (clicked) { // if the index is 0, call functionOne(): case 0: functionOne(); break; // if the index is 0, call functionTwo(): case 1: functionTwo(); break; // if the index is is not identified, // use the default, and call functionDefault(): default: functionDefault(); break; } }); References: index().

http://stackoverflow.com/q/27137869
score: 0
has comment: http://stackoverflow.com/comment/42773796
has title: Create a new function generically
has comment: http://stackoverflow.com/comment/42774560
has answer: http://stackoverflow.com/a/27138047
has comment: http://stackoverflow.com/comment/42773766
has comment: http://stackoverflow.com/comment/42774627
tagged with: generics
has body: I dont know if the question is right, but I want to know is it possible to create functions generically? Lets say instead of doing this: function f1{ $("#pictureID1").remove(); } and function f2{ $("#pictureID2").remove(); } JSON var content = [ {"functionname": "f1", "image": "pictureID1"}, {"functionname": "f2", "image": "pictureID2"}, ]; I want to create them automatically like this: for(var i=1;i&lt;=2;i++{ new function content[i].functionname(){ $("#"+content.image).remove(); } } Thanks in advance, Marc
has answer: http://stackoverflow.com/a/27137951
type: UnansweredQuestion
answer count: 4
has answer: http://stackoverflow.com/a/27137945
has answer: http://stackoverflow.com/a/27137973
type: Question
has comment: http://stackoverflow.com/comment/42773822
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/42842502

websocket
tags question: http://stackoverflow.com/q/27028229
tags question: http://stackoverflow.com/q/27114163
tags question: http://stackoverflow.com/q/27058035
tags question: http://stackoverflow.com/q/27145175
tags question: http://stackoverflow.com/q/27094205
tags question: http://stackoverflow.com/q/27006294
type: Tag
tags question: http://stackoverflow.com/q/27003148
tag name: websocket
tags question: http://stackoverflow.com/q/27139326

http://stackoverflow.com/a/27139523
score: 1
has comment: http://stackoverflow.com/comment/42777266
has comment: http://stackoverflow.com/comment/42777045
has comment: http://stackoverflow.com/comment/42776896
has comment: http://stackoverflow.com/comment/42776932
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27139392
has body: you can use a div that will wrap the entire document: http://jsfiddle.net/ymzrocks/un8b6rbc/ html: content here css: .frame { position:fixed; top:0; left:0; right:0; bottom:0; ; } js: $('div.frame').css('cursor', 'help');
has comment: http://stackoverflow.com/comment/42776995
downvote count: 0

http://stackoverflow.com/comment/42728214
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27071435
type: Comment
has text: One last question. Normally after a select tag is opened, clicking an option or highlighting one with the arrow keys and hitting enter closes the tag. Can I preserve that functionality here? I tried adding handlers to the focusin and click events that check the size of the tag and if it's not zero calls blur, but I can't get it to work either way. [Here's my fiddle.](http://jsfiddle.net/bzfr2up3/3/) Thanks again for all your help!

http://stackoverflow.com/q/27144358
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42785241
has body: i seems to be having problem formatting an array string provide by my ajax method. I been trying to put in the data value directly in userCoor but it came out as an array only it should be (please refer to the picture) Can somebody tell me how am i suppose to format into an array provided in the picture So data is returning a single array instead of a dimensional array so how am i suppose to change to make into a dimensional array Thanks Sample Code $.ajax({ url: "#", type: "POST", dataType: "json", success: function(data, textStatus, jqXHR) { var userCoor = [ ['300 Tanglin Halt Road, Singapore 148812', 1.3000, 103.8000], ['Temasek Poly, Singapore', 1.346753, 103.932577], ['Temasek Poly, Singapore', 1.346368, 103.932175] ]; console.log(userCoor); console.log(data); } }) Update I have now change dataType to text and it returns as seen below now is how to convert this text to an array Raw data from source ['300 Tanglin Halt Road, Singapore 148812',1.3000,103.8000],['Temasek Poly, Singapore',1.346753,103.932577],['Temasek Poly, Singapore',1.346368,103.932175] The problem i am facing is that i hardcod in the userCoor it work but i retrieve in the ajax method it doesnt userCoor[data] it will give a single line array instead of 3 dimensional array Here is a Sample of what it is SupposeTwo same String but second link not known to be an array
has answer: http://stackoverflow.com/a/27145048
has comment: http://stackoverflow.com/comment/42785968
has title: Javascript retrieve String Array Value Error
score: 0
has comment: http://stackoverflow.com/comment/42784967
has comment: http://stackoverflow.com/comment/42785116
type: Question
has comment: http://stackoverflow.com/comment/42796504
tagged with: arrays
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/42788993
accepted answer: http://stackoverflow.com/a/27145048
answer count: 1
has comment: http://stackoverflow.com/comment/42789347
has comment: http://stackoverflow.com/comment/42799438
has comment: http://stackoverflow.com/comment/42789153
has comment: http://stackoverflow.com/comment/42788770

http://stackoverflow.com/q/27119867
type: AnsweredQuestion
has body: I've searched many links for my query. But couldn't get the one I want. Am using in window.open(url, '_blank') in my script on click of button(am not using any html here, I want it to be on button click only). Its working in Chrome, IE8. I want to open a new tab in the same window in IE11. I don't want to do any settings in Internet Options of IE. Because the script has to work in every system, if I go with manual settings the script won't run in all the systems where ever I test. Is there any bug with IE11 ?
has title: window.open() not working in IE11
type: Question
answer count: 2
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/27120129
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27120263
has answer: http://stackoverflow.com/a/27120263
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/27120129
score: 6
upvote count: 6

http://stackoverflow.com/a/27102065
has body: It's obviously an issue with the encoding(JSON is always encoded in UTF-8). For me the result of the returned JSON is equal to the result of the clientside geocoding: https://maps.googleapis.com/maps/api/geocode/json?latlng=25.01482,121.42633&amp;language=zh-TW&amp;sensor=false When your application doesn't use UTF8 you'll need to convert the encoding of the returned string from UTF8 to the charset of your application before you print it.
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27099330
accepted answer of: http://stackoverflow.com/q/27099330
type: Answer

http://stackoverflow.com/q/27123782
has comment: http://stackoverflow.com/comment/42788486
type: Question
has body: I want to disable the right click on CKEditor version 4.4.2. I create my editor in a JSP like this: Case Summary I found the following solution, but the menu still works fine! config.removePlugins = menu,menubutton,toolbar,contextmenu'; How can I disable it if this does not work?
possible better answer: http://stackoverflow.com/a/27127015
has answer: http://stackoverflow.com/a/27149425
has answer: http://stackoverflow.com/a/27127015
tagged with: javascript
tagged with: ckeditor
score: -1
has title: Cannot disable right click menu in CKEditor 4.4.2
has comment: http://stackoverflow.com/comment/42792797
answer count: 3
accepted answer: http://stackoverflow.com/a/67432690
has comment: http://stackoverflow.com/comment/42755321
has comment: http://stackoverflow.com/comment/42755271
favorite count: 0
has comment: http://stackoverflow.com/comment/42753605
linked to: http://stackoverflow.com/q/2246631
downvote count: 2
has comment: http://stackoverflow.com/comment/42790546
has comment: http://stackoverflow.com/comment/42781757
upvote count: 1
has comment: http://stackoverflow.com/comment/42753524
has comment: http://stackoverflow.com/comment/42792695
has comment: http://stackoverflow.com/comment/42792203
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/67432690
has comment: http://stackoverflow.com/comment/42791983

http://stackoverflow.com/a/27075122
answers question: http://stackoverflow.com/q/27066838
has body: A couple of problems: For creating a menu I think that you should use a HierarchicalDataSource and not a DataSource. DataSources do not have nesting. There is a spelling error, it is schema and not scheme. And the most important, data needs to be an array and not an object.
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27066838

http://stackoverflow.com/comment/42528818
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/26999199
type: Comment
has text: Not needed *per se*, but the code in the question does use delegation, albeit not with an explicit selector, so the code in your answer may have a different behavior if the table is populated dynamically.

http://stackoverflow.com/comment/42597490
type: Comment
score: 0
has text: Well during debugging I don't go on error function. It goes straight to success function. When I put ar variable in alert after it's being created it gives me: undefined...
comment on: http://stackoverflow.com/a/27038769
type: AnswerComment

http://stackoverflow.com/q/27130312
favorite count: 0
has comment: http://stackoverflow.com/comment/42761699
has comment: http://stackoverflow.com/comment/42760685
has title: RegEx for email to allow Empty spaces, vaild email address and multiple email addresses
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42760024
tagged with: regex
has answer: http://stackoverflow.com/a/27131648
has comment: http://stackoverflow.com/comment/42760387
has body: I have this RegEx which I use for CC and BCC email fields reg = /(^\s*$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.(?:[a-zA-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)$)/; This allows for the email field to be empty, or have a valid email address, otherwise it will error. I would like to extend the RegEx to allow mutiple emails also e.g. a@a.com, b@b.com, c@c.com I have tried adding [,;] to allow comma or semicolon seperated values, but i can't seem to get it to work. Any one know if i'm on the right lines with [,;] and where I should be placing it? Update: I've updated the RegEx to, so it doesn't look for gTLDs: reg = /(^\s*$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[A-Za-z]{2,4}[,;]?)+$/; thanks
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42760434
has comment: http://stackoverflow.com/comment/42759829
has comment: http://stackoverflow.com/comment/42760129
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/42759741
linked to: http://stackoverflow.com/q/1710505
upvote count: 0
answer count: 1
tagged with: email

http://stackoverflow.com/q/27048839
tagged with: javascript
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27056866
favorite count: 0
tagged with: backbone.js
has title: Handling touch events in a Backbone View
has body: I want my backbone app to behave nicely on mobile devices. Does it makes sense to replace 'click' events with 'touchend' events? var CoolView = Backbone.View.extend({ el : $("#coolEl"), events: { 'touchend' : 'clickHandler' } }); add it to the events object? var CoolView = Backbone.View.extend({ el : $("#coolEl"), events: { 'click' : 'clickHandler', 'touchend' : 'clickHandler' } }); something else? fiddle
tagged with: touch-event
type: AnsweredQuestion
score: 1
tagged with: backbone-views
possible better answer: http://stackoverflow.com/a/27049196
accepted answer: http://stackoverflow.com/a/27056866
upvote count: 1
has answer: http://stackoverflow.com/a/27049196
type: Question
linked to: http://stackoverflow.com/q/7828054

http://stackoverflow.com/q/27057165
tagged with: asp.net-web-api
tagged with: javascript
has answer: http://stackoverflow.com/a/27057289
has title: How to use display instead of visibility in web api mvc project?
answer count: 1
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/27057289
tagged with: css
type: AnsweredQuestion
score: 2
type: Question
has body: I'm developing WebApi Project. In index.cshtml file I try to show and hide div according to button click. now I am using Visibility hidden and visible . instead of this I need to use display none and show because visibility="hidden" method just hide the div it's not remove the div space .if i show the second div it's comes under the first div. My Code @Html.Raw(@TempData["tranresult"]) @Html.Raw(@TempData["Result"]) Script Code How to use display:none and show for my above code?
downvote count: 0

http://stackoverflow.com/comment/42795272
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27149966
type: AnswerComment
has text: its returning undefined if i am clicking on the following div. Dubai Marina

http://stackoverflow.com/q/27101808
upvote count: 2
has comment: http://stackoverflow.com/comment/42707900
has comment: http://stackoverflow.com/comment/42713589
type: Question
tagged with: c#
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/27109259
has comment: http://stackoverflow.com/comment/42707766
has title: How to speed up image loads from Angular/Mvc.net
has body: I have an MVC.net website which serves images based on this old article: http://blogs.msdn.com/b/miah/archive/2008/11/13/extending-mvc-returning-an-image-from-a-controller-action.aspx My c# controller code looks like this: public ActionResult GetThumbnail(string code) { byte[] image = _dataProvider.GetThumbnailImage(code); return this.Image(image, "image/jpeg"); } On the client side I have an AngularJS controller which loads up a search result set from the server. The result set includes a number of image URLs like this: &lt;tr ng-repeat="item in data.items | filter:filter" class="fixed-height-80"&gt; &lt;td&gt; &lt;a href="{{ item.viewDetailUrl }}"&gt;&lt;img ng-src="{{item.thumbnailUrl}}"/&gt;&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; The thumbnailUrl points to the GetThumbnail action on my MVC controller and is constructed server side in a model factory and returned to the Angular ready for use. The problem is that the images load very slowly even thought they are only about 3kb per image. After the async search return is completed in the javascript the images appear one at a time, about one per second, until they are all loaded. I put a Stopwatch in the C# on the .net controller and the loading of the image data from the dataProvider on the server side takes about 0.9ms But even with just ten images to serve it takes about six seconds before all the images are loaded in the page. The JS renders the links almost immedialtly, it's just the images that are slow. How can I speed up image loading in this context? Update If I move the images into ~/images/image.jpg and route the url to point directly at the folder using Url.Content it doesn't seem to have the same issue. therefore the problem seems to be with the way the controller is serving the images - sometimes if can take &lt; 10ms and other times over 2000ms for the same image, but it's unclear why.
has answer: http://stackoverflow.com/a/27101954
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27101860
has answer: http://stackoverflow.com/a/27101956
has comment: http://stackoverflow.com/comment/42710811
favorite count: 0
has answer: http://stackoverflow.com/a/27101860
accepted answer: http://stackoverflow.com/a/27109259
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42716277
has comment: http://stackoverflow.com/comment/42708350
has comment: http://stackoverflow.com/comment/42711583
answer count: 4
type: AnsweredQuestion
score: 2

http://stackoverflow.com/a/27116279
has body: Improving upon the answer you already provided, you can do it this way that avoids creating the extra deferred and just uses the promise that $.when() already returns. : getBlog: function(blogId, model){ var blogcomments = new Entities.BlogCommentCollection(); var fullBlog; return $.when( $.get("/lightning/presentation/blogs/?blogId=" + blogId, function(full){ fullBlog = full; }), $.get("/lightning/presentation/blogs/?comments=" + blogId, function(res){ var models = initializeBlogComments(JSON.parse(res)); blogcomments.reset(models); }) ).then(function() { model.set('full', fullBlog); model.set('comments', blogcomments); return model; }); }, Or, you could additionally use the return values from $.when() to avoid the separate ajax callbacks like this: getBlog: function(blogId, model){ var blogcomments = new Entities.BlogCommentCollection(); return $.when( $.get("/lightning/presentation/blogs/?blogId=" + blogId), $.get("/lightning/presentation/blogs/?comments=" + blogId) ).then(function(r1, r2) { model.set('full', r1[0]); var models = initializeBlogComments(JSON.parse(r2[0])); blogcomments.reset(models); model.set('comments', blogcomments); return model; }); },
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27104747
answers question: http://stackoverflow.com/q/27104747

http://stackoverflow.com/q/27112727
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27113471
accepted answer: http://stackoverflow.com/a/27113231
has title: Change text and image onclick
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/42728242
tagged with: ajax
answer count: 3
has comment: http://stackoverflow.com/comment/42728635
has comment: http://stackoverflow.com/comment/42729069
has answer: http://stackoverflow.com/a/27113231
favorite count: 0
has answer: http://stackoverflow.com/a/27113229
has body: I am trying to figure out how to do this, but I can't get it. It's supposed to be like a step by step-thing. When pressing the image, both the text and image will change. There are supposed to be 3 steps. I have been trying a little bit js and php, but it haven't helped yet. Also CSS, but it's a little bit hard because it's 3, and not 2 steps. (I have been trying this e.g.: http://jsfiddle.net/eliranmal/2rwnz/) Step 1 Text 1 out of 3 <img src="<?php bloginfo('stylesheet_directory'); ?>step1.png"> One of the codes I have been trying to use is the following: $('.slider_innbokskontroll').click(function(){ var $this = $(this); $this.toggleClass('slider_innbokskontroll'); if($this.hasClass('slider_innbokskontroll')){ $this.text('Les mer'); } else { $this.text('Les enda mer'); } }); But it was not what I have was looking for. By pressing the image (see code below) it should change. <img src="<?php bloginfo('stylesheet_directory'); ?>step1.png"> It should be changing like step1.png => step2.png (don't bother about the details with the link, I just made it simple to get it easier to understand) The text below should also change: Step 1 Text 1 out of 3 E.g like: Step 1 -> Step 2 Text 1 out of 3 -> Text 2 out of 3 And so forth... As I see it, it is relatively simple, but I have really no idea of what I am doing. Is there someone who could help me finding the solution? A short code I may understand would be fine. Thank you.
tagged with: css
possible better answer: http://stackoverflow.com/a/27113229

http://stackoverflow.com/q/27031289
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27031996
accepted answer: http://stackoverflow.com/a/27031996
has title: Javascript. How to return the questions and correct answers to a Math.random
type: Question
has answer: http://stackoverflow.com/a/27031561
has body: I'm fairly new to javascript and am having an issue. I found this code snippet and am trying to display the question, user answer, and correct answer from ask() after the user inputs their answers from all the questions. I've tried a for loop to display each index, but that simply returns true or false. Here's the code: &lt;script&gt; function ask() { var a = Math.floor(Math.random() * 10) + 1; var b = Math.floor(Math.random() * 10) + 1; var op = ["*", "+", "/", "-"][Math.floor(Math.random()*4)]; return prompt("How much is " + a + " " + op + " " + b + "?") == eval( a + op + b); } var questions = [ask(), ask(), ask(), ask(), ask()], total = questions.length, correct = questions.filter(Boolean).length; alert( "You got "+correct+"/"+total+" correctly"); &lt;/script&gt; And you can test the current code here
answer count: 2
tagged with: arrays
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/27031561

http://stackoverflow.com/a/27002786
answers question: http://stackoverflow.com/q/27001726
type: Answer
upvote count: 1
has body: Edit: Updated, fixed a split I forgot. Here's how I have this setup. Each TR has a unique ID (in the format of cl_#id#) and shares a class, for the click event. JS Fiddle http://jsfiddle.net/zct0c7ww/2 JQuery is used to populate a hidden field in the form, and the form is displayed in a div. The styling is generic but you can do with it what you like. There's a bonus line in there that just shows you how it's working, you can remove it. On your form submit, or ajax submit, you'd use #form.commentID# and #form.comment# $(function() { $(".commentlink").on("click", function(e) { var cl_index = $(this).attr('id').split("_")[1]; $("#comment_box").show(); $("#comment_box").css('visibility','visible'); $("#commentID").val(cl_index); // This next line is just for demonstration. $("#commentTA").val("The hidden field in this form, 'commentID' has had it's value set to " + cl_index + "."); }); }); #comment_box {display: none; visibility: hidden} Click to add a comment Click to add a comment
accepted answer of: http://stackoverflow.com/q/27001726
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/a/27007114
answers question: http://stackoverflow.com/q/27007089
has body: You are declaring "b" inside of a function. Because you want it to be globaly accessible outside of the function it was created in, remove the var from in front of it in the first statement. document.getElementById("qr1").onclick = function() { if (this.checked) { b = 1; } else { b = 0; } }; Alternatively you could set b outside of the function to 0 b = 0; then document.getElementById("qr1").onclick = function() { if (this.checked) { b = 1; } }; As an aside, global s are usually frowned upon (I use them a lot) so you could create an object to house everything. This way you are nice and tidy. Also, as mentioned in the comments, the qr1 click handler should be placed outside of the calculate total function.
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42605560
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27007089
score: 1

http://stackoverflow.com/comment/42656357
score: 0
has text: Have you tried any debugging?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27070792

http://stackoverflow.com/comment/42710772
comment on: http://stackoverflow.com/q/27102649
score: 0
type: Comment
type: QuestionComment
has text: You can use http://php.net/manual/en/function.json-decode.php in server side to decode this.

http://stackoverflow.com/a/27018356
score: 23
has comment: http://stackoverflow.com/comment/69163556
has comment: http://stackoverflow.com/comment/59830478
has comment: http://stackoverflow.com/comment/69157973
has comment: http://stackoverflow.com/comment/59829165
has comment: http://stackoverflow.com/comment/78271085
has body: First of all, stop doing Child.prototype = new Parent(); for inheritance, unless your browser doesn't support any other alternative. That's a very bad style and can have undesired side effects, since it actually runs the constructor logic. You can use Object.create in every modern browser now. Child.prototype = Object.create(Parent.prototype); Please note that after this you should also fix the constructor property of Child.prototype so that it correctly points to Child rather than Parent. Child.prototype.constructor = Child; Next, how call works? Well call allows to specify which object will be referenced by the this keyword when the function will be executed. function Child(name){ //When calling new Child(...), 'this' references the newly created 'Child' instance //We then apply the 'Parent' constructor logic to 'this', by calling the 'Parent' function //using 'call', which allow us to specify the object that 'this' should reference //during the function execution. Parent.call(this, name); }
upvote count: 24
has comment: http://stackoverflow.com/comment/46596287
answers question: http://stackoverflow.com/q/27018033
has comment: http://stackoverflow.com/comment/69163811
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/69162583
has comment: http://stackoverflow.com/comment/69161458

http://stackoverflow.com/comment/42798409
type: Comment
comment on: http://stackoverflow.com/a/27149434
has text: Thanks for your quick reply. I mean this notice from facebook you too?: At f8 2014, we launched a new Facebook Login experience that gives people more control over the information they share with apps. The new Login contains significant differences from the version you have today and will need to be implemented before the breaking change date on April 30, 2015. To ensure enough time for your users to upgrade to the latest version of your mobile app, we recommend you start upgrading today. https://developers.facebook.com/docs/apps/upgrading/
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42625980
comment on: http://stackoverflow.com/a/27054603
type: Comment
has text: I tried calling ng-repeat="myFunction()". Angularjs throws an exception
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42693761
comment on: http://stackoverflow.com/a/27089769
type: AnswerComment
score: 0
type: Comment
has text: Thanks fort the reply. I have tried it substituting the original code in the CSS of the plugin but seems not work. I have noticed that the div linked with a slide and containing the control disappears setting the border in none.

http://stackoverflow.com/comment/42752595
has text: Sorry i didn't get u, pls explain.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27126420

http://stackoverflow.com/comment/42764380
type: Comment
comment on: http://stackoverflow.com/q/27132832
score: 0
type: QuestionComment
has text: I couldn't came up with an idea. :/

http://stackoverflow.com/a/27138314
has comment: http://stackoverflow.com/comment/42776965
answers question: http://stackoverflow.com/q/27138050
has comment: http://stackoverflow.com/comment/42777202
has comment: http://stackoverflow.com/comment/42777792
accepted answer of: http://stackoverflow.com/q/27138050
has comment: http://stackoverflow.com/comment/42777164
has comment: http://stackoverflow.com/comment/42774626
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42775787
has comment: http://stackoverflow.com/comment/42775592
has comment: http://stackoverflow.com/comment/42776137
has comment: http://stackoverflow.com/comment/42776933
has body: id say offhand somewhere in the parent theme will be define(THT_WATCHLIST_DIR, get_stylesheet_directory() ); it needs to be: define(THT_WATCHLIST_DIR, get_template_directory() ); so you can use child themes. Either change in the theme and let the developer know about this or copy your js folder over to the child theme! update I am getting a 404 error for all your js files and pages as well. There may be a few things that are causing this. Dealing with your 404 issues first flush your permalinks, copy your .htaccess file and save somewhere replace the contents of your .htaccess file with this: # BEGIN WordPress &lt;IfModule mod_rewrite.c&gt; ErrorDocument 404 /index.php?error=404 RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] &lt;/IfModule&gt; # END WordPress undo the theme change you made. check your wp-options db table - what value for home_url / site_url? apache mod_rewrite enabled on your server? For your files 1. check the folder js actually exists in your theme 2. check folder permissions for js file ->should be 755 for the directories in your theme. 3. try the 2014 theme -> check your browser console (right click on a page element->inspect element and click on console in the pop up window) is there any errors? If not check your theme urls to js folder again, if there is errors, contact your hosting or check your apache settings again.
type: Answer
has comment: http://stackoverflow.com/comment/42776830
has comment: http://stackoverflow.com/comment/42777515
has comment: http://stackoverflow.com/comment/42777436
score: 1
has comment: http://stackoverflow.com/comment/42774604
has comment: http://stackoverflow.com/comment/42776920
upvote count: 1
has comment: http://stackoverflow.com/comment/42776781

http://stackoverflow.com/comment/42567242
score: 0
comment on: http://stackoverflow.com/q/27021399
type: QuestionComment
type: Comment
has text: What does your console say?

http://stackoverflow.com/a/27130152
type: Answer
has comment: http://stackoverflow.com/comment/42761448
has comment: http://stackoverflow.com/comment/42761963
answers question: http://stackoverflow.com/q/27129925
score: 0
has body: Initially when loading the page the hover function is created. Therefore the hover still works after you change the hoverEnabled var. You should check the state of the hoverEnabled within the function like so: //written this way, the function seems to make more sense $('#ussfcanl').on('mouseenter', function() { //checking the type just in case if(hoverEnabled === true) { $('#imageholder').html('&lt;img src="http://www.hpc.ncep.noaa.gov/sfc/satsfc.gif" /&gt;'); } });

http://stackoverflow.com/a/28291416
accepted answer of: http://stackoverflow.com/q/27038704
type: Answer
answers question: http://stackoverflow.com/q/27038704
score: 16
type: AcceptedAnswer
downvote count: 0
upvote count: 16
has body: You can use the buffer property, i.e. data_8 = new Uint8Array(data_16.buffer, data_16.byteOffset, data_16.byteLength).
has comment: http://stackoverflow.com/comment/105601291

http://stackoverflow.com/comment/42581337
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27028052
has text: @Jeeped do you think it has something to do with mouse actions since it's a hover dropdown? Like in the second question I linked?
score: 0

http://stackoverflow.com/q/27062304
accepted answer: http://stackoverflow.com/a/27062480
has title: use php variable inside javascript retuns null
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42638668
possible better answer: http://stackoverflow.com/a/27062521
has body: I have the following code: <?php include('Connection.php'); $query = $conn->prepare("SELECT DISTINCT c.movieName, c.castName, c.movieImdbId, f.year, f.posterLink FROM cast_movie as c JOIN film_info as f ON c.ImdbId = f.ImdbId WHERE c.castName = :q"); $query->execute(array(':q' => $searchText )); while($row = $query->fetch(PDO::FETCH_ASSOC)): ?> <a href="http://www.imdb.com/title/<?php echo urlencode($row['ImdbId']); ?>"><?php echo $row['movieName']; ?> Add to list <?php endwhile; ?> My question: When I click on "add to list" link, it add Nothing to the basket (I mean, the function addToBasket works fine, but the value of "selected" is null.. Could someone kindly let me know how should I use <?php echo $row['movieName']; inside my javascript code? I know I have to put it between "", but I think there should be another problem.. (maybe because this row is not known in javascript code, but I have no idea how to fix it..) I add also this image to clarify the problem: Thanks in advance,
has comment: http://stackoverflow.com/comment/42638736
favorite count: 0
has answer: http://stackoverflow.com/a/27062521
has comment: http://stackoverflow.com/comment/42639073
downvote count: 2
tagged with: php
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27062601
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/27062646
has answer: http://stackoverflow.com/a/27062480

http://stackoverflow.com/comment/42652789
type: AnswerComment
has text: Thank you, that fixed the first problem but I still have a problem with utilizing the data in an XML file. The biggest problem is that it won't display images that have their paths in the XML and I have searched all over the internet for a fix.
score: 0
comment on: http://stackoverflow.com/a/27066957
type: Comment

http://stackoverflow.com/q/27067001
has body: I have a json file that is approximately 2-3 MB in size. I want to compress this json in the server side when we are sending to client and decompress in the client side. My Client is built on AngularJS SPA and getting the json output from Web API. { "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021" }, "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] }
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
upvote count: 2
answer count: 1
tagged with: asp.net-web-api
favorite count: 0
has comment: http://stackoverflow.com/comment/42647420
tagged with: angularjs
type: UnansweredQuestion
has title: Big JSON file - how to compress in the server and decompress in the client side?
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/27067113
type: Question
tagged with: c#

http://stackoverflow.com/q/27078039
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42666780
has title: Calling function from a variable
has answer: http://stackoverflow.com/a/27078311
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: I want to call a function and the function name is stored into a variable, but it is giving error. I am trying to call a function uploadDocumentCallback but its name is stored into a variable $scope.uploadDocumentCallback(data,status,headers,config); //its working fine if i'm passing callback function name directly. $scope.callback = "uploadDocumentCallback"; //this is my variable where I store function name var callbackFunction = $scope.callback; $scope.callbackFunction(data,status,headers,config); //not working callbackFunction(data,status,headers,config); //not working $scope.callback(data,status,headers,config); //not working Please suggest me that how can I achieve this?
tagged with: angularjs

http://stackoverflow.com/comment/42689967
comment on: http://stackoverflow.com/a/27091545
score: 0
type: Comment
type: AnswerComment
has text: Never knew about `index()`... it did what I wanted to do with my 2nd idea. Neat. Thanks!

http://stackoverflow.com/q/27098297
tagged with: winjs
tagged with: javascript
tagged with: windows-runtime
has answer: http://stackoverflow.com/a/27098424
answer count: 1
downvote count: 0
favorite count: 0
has title: How to acces a file in App package for Windows store app
tagged with: windows-store-apps
has body: I am trying to access a particular file from my app installed package but im gettin Javascript type mismatch error. what am i doing wrong. Please tell me a good way to access any file from my installed package. Windows.Storage.StorageFile.getFileFromApplicationUriAsync("ms-appx://PackageName/images/appicon.png").done( function (file) { // Process file } );
accepted answer: http://stackoverflow.com/a/27098424
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: windows-phone-8
type: Question

http://stackoverflow.com/a/27070734
type: Answer
has comment: http://stackoverflow.com/comment/42715788
downvote count: 0
has comment: http://stackoverflow.com/comment/42675914
has body: you should use your resource to send an action to your endopint, not the response you got from the resource try something like var scacTaskRes = $resource("api/ScacTaskPLDetails"); $scope.scacTaskRes.$save(function (results) { if (results.successful) { Notifications.success(results.serverMessage); $scope.onReloadPage(); } else { Notifications.error(results.serverMessage); } });
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27070683
has comment: http://stackoverflow.com/comment/42715252
has comment: http://stackoverflow.com/comment/42716979

http://stackoverflow.com/comment/42559133
type: Comment
type: QuestionComment
has text: Have you tried setting the `dataType` to `jsonp` rather than using `json`?
comment on: http://stackoverflow.com/q/27015750
score: 0

http://stackoverflow.com/comment/42607527
comment on: http://stackoverflow.com/a/27014370
has text: see comment in question
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/27005875
tagged with: variables
favorite count: 0
has body: I'm fairly new to JavaScript and its functionalities. I am currently trying to make a basic calculator to try out some skills, and have encountered a problem. When i try to put in a double digit number, it add the 2 numbers together, Ex: I put in 12 + 5, and the answer i get is 8. It add the double digit together and cannot figure out how to fix it. Thanks, and I am open to any suggestions :) PS: Sorry its a lot ` 1 2 3 + 4 5 6 - 7 8 9 * C 0 = / var input = document.getElementsByClassName("inputButton"); //var valueBox = document.getElementById("answer"); var answer = document.getElementById("answer"); // var xValue = do i += var xValue = 0; var yValue = 0; var plusButton = 0; //var finalAnswer function putToScreen (x) { var node = document.createTextNode(x); answer.appendChild(node); } function clearScreen() { answer.innerHTML = ""; xValue = 0; yValue = 0; plusButton = 0; } function add () { if (plusButton >= 1) { document.getElementsByClassName("input").onclick = "yValue +="; } var sum = parseInt(xValue) + parseInt(yValue); answer.innerHTML = sum; } //var sum = parseInt(xValue) + parseInt(yValue); function compute () { if(plusButton >= 1) { add(); } } `
has answer: http://stackoverflow.com/a/27006000
linked to: http://stackoverflow.com/q/197769
has answer: http://stackoverflow.com/a/27006533
has answer: http://stackoverflow.com/a/27006340
possible better answer: http://stackoverflow.com/a/27006000
linked to: http://stackoverflow.com/q/6479236
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27006533
score: 1
upvote count: 1
type: Question
tagged with: javascript
has title: Adding double digit variables together
answer count: 3
downvote count: 0

http://stackoverflow.com/a/27119308
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/27119171
upvote count: 1
has body: please check this. $( ".dropdown-header" ).each(function(){ $(this).prev().find('a').removeAttr("href"); $(this).find('a').removeAttr("href"); $(this).next().find('a').removeAttr("href"); $(this).next().next().find('a').removeAttr("href"); });

http://stackoverflow.com/a/27050497
downvote count: 0
answers question: http://stackoverflow.com/q/27050496
has comment: http://stackoverflow.com/comment/44286091
has body: Update Please consider using method specified in the «Asynchronously Bootstrapping AngularJS Applications with Server-Side Data» article if possible. You can use the angular-deferred-bootstrap module to achieve that now! I'm not sure about validity of this answer anymore, you can still use the ideas, but be sure to properly test it with your actual code. I will try to keep this answer up to date with never technologies. Old answer There are several approaches to the problem of asynchronous application initialization. When it comes to data that must be resolved before a single controller is called - you can easily use resolve option of ngRoute's $routeProvider. However, when you need some global data to be loaded before ANY controller is called - you have to improvise. I've tried to collect all possible solutions in this answer. I'm providing them in the order of preference. 1. Using ui-router When using ui-router instead of native ngRoute you can create an abstract root state and resolve all data in it, before sub-states are activated. I would recommend to use this approach. ui-router provides a lot of additional features including ability to resolve dependencies hierarchically and is well accepted by the developer community. Example module.config(function($urlRouterProvider, stateHelperProvider) { $urlRouterProvider.otherwise('/404'); stateHelperProvider.setNestedState({ name: 'root', template: '&lt;ui-view/&gt;', abstract: true, resolve: { user: function(UserService) { // getCurrentUser() returns promise that will be resolved // by ui-router before nested states are activated. return UserService.getCurrentUser(); } }, children: [{ name: 'index', url: '/', templateUrl: '/partials/index' }, { name: 'not-found', url: '/404', templateUrl: '/partials/404' }, { name: 'balance', url: '/balance', templateUrl: '/partials/balance', resolve: { balance: function(UserService, user) { // Using data resolved in parent state. return UserService.getBalanceByAccountId(user.accountI…
score: 22
type: AcceptedAnswer
type: Answer
upvote count: 22
accepted answer of: http://stackoverflow.com/q/27050496

http://stackoverflow.com/a/27308316
type: AcceptedAnswer
score: 1
accepted answer of: http://stackoverflow.com/q/27030047
type: Answer
answers question: http://stackoverflow.com/q/27030047
upvote count: 1
downvote count: 0
has body: If you didn't give a value for _id when inserting an item to your Mongo db directly, it will use a special ObjectID for _id. If you insert an item using Meteor Collection it will use a random 17 character string by default for _id. Just add data using Meteor collections or manually set the _id to a random 17 character string when you add data.

http://stackoverflow.com/q/27034797
answer count: 1
linked to: http://stackoverflow.com/q/18128323
favorite count: 0
has title: Input won't clear after form submission in AngularJS using Ionic framework
tagged with: angularjs
upvote count: 1
has body: I have this weird problem. When I clear the model in the controller, the input field binded to the model with ng-model wont clear when the form is submitted. Controller angular.module('starter.controllers', []) .controller('DashCtrl', ["$scope", function($scope) { $scope.clearInput = function() { console.log("I get there..."); //Here's the issue!!! It's not working as expected! $scope.message = ""; }; }]); Template button-positive I get the console output "I get there", so the function gets activated. What am I missing here?
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27036829
accepted answer: http://stackoverflow.com/a/27036829
tagged with: ionic-framework
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/42930839
type: AnswerComment
score: 0
has text: This will work, but I'm looking for a way that avoids to get into (and modify) the script tag contents.
type: Comment
comment on: http://stackoverflow.com/a/27147360

http://stackoverflow.com/a/27050600
accepted answer of: http://stackoverflow.com/q/27050553
has comment: http://stackoverflow.com/comment/42618830
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/42618716
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27050553
has comment: http://stackoverflow.com/comment/42618834
has body: steps.push({"Name": "abc", "RequestParams": RequestParams}); What you want to achieve is having inside your steps array a javascript object with a property Name that has value "abc", and a property named RequestParams that has the value of your RequestParamsvariable.

http://stackoverflow.com/comment/42590072
score: 0
type: Comment
type: QuestionComment
has text: Could you show some code?
comment on: http://stackoverflow.com/q/27013856

http://stackoverflow.com/comment/42685014
has text: no. after it become > 100 i need to return. until i will call the function to increment the number. Just to practice recursion.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27088739

http://stackoverflow.com/comment/42799884
type: AnswerComment
score: 0
type: Comment
has text: @René Do you mean that I could not make checkbox like that ` ` ?
comment on: http://stackoverflow.com/a/27152183

http://stackoverflow.com/comment/42576656
type: QuestionComment
has text: No answers? Anyone who had an opportunity to work with both frameworks?
comment on: http://stackoverflow.com/q/27012521
score: 0
type: Comment

http://stackoverflow.com/q/27119165
tagged with: javascript
upvote count: 2
answer count: 1
downvote count: 1
favorite count: 0
tagged with: handlebars.js
tagged with: ember.js
has answer: http://stackoverflow.com/a/27119561
accepted answer: http://stackoverflow.com/a/27119561
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has body: here my code . and my arraycontroller App.IndexRoute = Ember.Route.extend({ }); App.IndexController = Ember.ArrayController.extend({ model1: function () { return posts; } }); And My Json posts = [{ title: "Raja", body: "There are lots of à la carte software environments in this world." }, { title: "Broken Promises", body: "James Coglan wrote a lengthy article about Promises in node.js." }]; Please tell me If it's possible to call model1 from controller
score: 1
has title: Assertion Failed: The value that #each loops over must be an Array Embers js
type: Question

http://stackoverflow.com/comment/42538461
type: AnswerComment
score: 0
type: Comment
has text: that actually crashed it with no results.
comment on: http://stackoverflow.com/a/27004378

http://stackoverflow.com/comment/42618223
type: QuestionComment
has text: just try `eval` instead `new Function`
comment on: http://stackoverflow.com/q/27050203
score: 0
type: Comment

http://stackoverflow.com/q/27043896
has body: Using Knockout.js, is there a way to have an element's original content show if the observable bound to it is undefined? Show this text if message is undefined. I know there are workarounds using visible, hidden or if but I find those too messy; I don't want the same element written out twice, once for each condition. Also, I don't want to use any sort of default observable values. Going that route, if JS is disabled then nothing shows up. Same for crawlers: they would see nothing but an empty tag. To summarize, I want to say "Show this message if it exists, otherwise leave the element and its text alone." The reasoning behind this is that I want to first populate my element using Razor. @Model.Message And then, in the browser, if JS is enabled, I can do with it as I please. If, however, there is no JS or the user is a crawler, they see, at minimum, the default value supplied server side via Razor.
answer count: 3
upvote count: 2
tagged with: razor
has answer: http://stackoverflow.com/a/27044486
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27044413
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/27044422
has answer: http://stackoverflow.com/a/27044413
score: 2
downvote count: 0
has title: Show default value when Knockout observable undefined or JS disabled
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27044486
favorite count: 0

slideshow
tags question: http://stackoverflow.com/q/27141917
tags question: http://stackoverflow.com/q/27002108
type: Tag
tag name: slideshow
tags question: http://stackoverflow.com/q/27007414

http://stackoverflow.com/a/27132342
answers question: http://stackoverflow.com/q/27132153
score: 0
type: Answer
has body: If you necessarily need is as a variable: var test = false; $("#main-nav").on("mouseenter", function (e) { test = true; }); $("#main-nav").on("mouseout", function (e) { test = false; }); //.... if (test === true) { //do something } else { //something different }

http://stackoverflow.com/comment/42660363
has text: Also found this one: http://stackoverflow.com/questions/7223717/differentiating-0-and-0
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27074330

http://stackoverflow.com/q/27017984
tagged with: laravel
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42562827
has title: Data insertion into database after clicking onto button
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42562785
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27019226
accepted answer: http://stackoverflow.com/a/27019226
has body: I would like to insert some data into my database using laravel eloquent after pressing a button. My controller, controller method, route, js files are ready. I just don't know how to connect these together. Should i fire an event after clicking the button, if yes how can i do that using blade ? I have a main page and form like this. This is my main page : {{ Form::open(array('action'=&gt;'Mycontroller@myMethod')) }} &lt;!--Some html here !--&gt; &lt;div class="row form-group"&gt; &lt;div class="col-sm-4"&gt; &lt;div class="btn btn-success" id="add" onclick=""&gt; Here is my button &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; {{ Form::close() }} I need to insert some data after clicking this button. How can i do this ? As like i said all my routes controller and function are ready for this. Thanks in advance.

http://stackoverflow.com/a/27072339
type: Answer
answers question: http://stackoverflow.com/q/27072078
downvote count: 0
score: 1
has body: Woops. Remember that every tick the entire script gets run over again.. Which I forgot. At the beginning of my script I was initializing Memory.q = {}; every tick, so it was emptying the object and then filling it back up again, which is why the check was failing. I changed the initial code to: if (typeof Memory.q == "undefined") { Memory.q = {}; } Cheers!
upvote count: 1

http://stackoverflow.com/q/27134890
linked to: http://stackoverflow.com/q/18043452
has comment: http://stackoverflow.com/comment/42768492
has body: I'm trying to show a div of another set of radio boxes but only depending on which radio button is first selected. If option option one is selected, I would like condition one div to show and if option two is selected I would like condition two div to show. $(document).ready(function() { $('#condition-one').hide(); $('#condition-two').hide(); if ($("id=[option-one]").is(":checked")) { $('#visible-condition-one').show("slow"); } else if ($("id=[option-two]").is(":checked")) { $('#visible-condition-two').show("slow"); }; }); Would you like option 1 or option 2 Option 1 Option 2 If you pick option 1, you see this div Option 3 Option 4 If you pick option 2, you see this div Option 5 Option 6
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42768759
has title: jQuery checking radio box status and showing an element
has comment: http://stackoverflow.com/comment/42768173
has comment: http://stackoverflow.com/comment/42768535
has answer: http://stackoverflow.com/a/27135309
type: Question
has answer: http://stackoverflow.com/a/27135195
has answer: http://stackoverflow.com/a/27135022
has comment: http://stackoverflow.com/comment/42768398
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27135195
score: 0
answer count: 3
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27135022
has comment: http://stackoverflow.com/comment/42768208

http://stackoverflow.com/a/27030368
has body: You don't need javaScript to animate Use CSS instead it's better performance wise .trigger { transition: all 0.75s ease-in-out; } .trigger:hover { background-color:red; }
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/27030308
has comment: http://stackoverflow.com/comment/42583139
answers question: http://stackoverflow.com/q/27030308
type: AcceptedAnswer

http://stackoverflow.com/comment/42771523
has text: Yeah, I see. Sorry, I have no more idea what is wrong, but it seems that the canvas is greater phisically than it seems on the screen.
comment on: http://stackoverflow.com/a/27094149
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/27067766
type: Answer
answers question: http://stackoverflow.com/q/27067546
has body: self is defined inside of the inner MyClass function and thus is only visible within that scope. Your styleIt method is not defined within that scope and thus cannot see the self variable. If you want your methods to be self-referential (e.g. not rely on this), then you have to define the methods within the constructor (not on the prototype) so they can see the self variable. Here's one way to do that: var MyClass = (function() { function MyClass(data) { var self = this; this._element = $('.someSelector'); this.styleIt = function() { self._element.css('display', 'block'); return self; } } })(); In your code that calls styleIt() like this: $('#id').click(function(evt) { evt.preventDefault(); for (int i = 0; i &lt; self._objects.length; i++) { [i].styleIt(); } } this code is simply not correct (two coding errors) and should not need the self referential feature above. This code can be done like this: $('#id').click(function(evt) { evt.preventDefault(); for (var i = 0; i &lt; self._objects.length; i++) { self._objects[i].styleIt(); } } When calling a method using obj.method() this will be set to obj inside of the method so you wouldn't need the self feature in the styleIt() method. You could just rely on the value of this.
score: 0
accepted answer of: http://stackoverflow.com/q/27067546
type: AcceptedAnswer

http://stackoverflow.com/comment/42664415
has text: You have to use overflow-x:scroll property for horizontal scrolling
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27075744
type: AnswerComment

http://stackoverflow.com/q/27069457
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27074479
accepted answer: http://stackoverflow.com/a/27070591
has answer: http://stackoverflow.com/a/27074479
favorite count: 0
tagged with: screeps
has comment: http://stackoverflow.com/comment/42651925
type: Question
has body: In game each structures have property structureType that may be one of the following: spawn, extension, road, constructedWall, rampart. http://www.screeps.com/docs/Structure.php#structureType So in the simulation we can see that the extension structure may contain some amount of energy. But API Docs the structures don't have energy property.
upvote count: 3
score: 0
answer count: 2
downvote count: 3
has comment: http://stackoverflow.com/comment/42652110
has title: How to get amount of energy from extension structure?
tagged with: javascript
has answer: http://stackoverflow.com/a/27070591

http://stackoverflow.com/a/27069302
type: Answer
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42652966
answers question: http://stackoverflow.com/q/27069169
score: 0
has body: since your html code of the page with buttons is missing, i am just guessing. put Agree into quotation marks, like it's done in this example. buttons: { "Agree": function () { $(this).dialog("close"); } } otherwise your function may apply to all buttons on your page.

http://stackoverflow.com/comment/97341449
comment on: http://stackoverflow.com/a/27067348
type: AnswerComment
type: Comment
score: 0
has text: I disagree, I say avoid _not_ using IE=edge :)

http://stackoverflow.com/a/27150355
answers question: http://stackoverflow.com/q/27112303
type: Answer
has body: Creating an array of objects was the best route to go. I actually ended up with a multidimensional array. var maps = new Array(); function doMaps(){$.getJSON("map-locations.json", function(results) { //var JSONdata = JSON.parse(results); //alert(results); $.each(results, function(index, val) { var mapdiv = results[index].mapdiv; var destlat = results[index].destination.lat; var destlon = results[index].destination.lon; var desttitle = results[index].destination.title; var orglat = results[index].origin.lat; var orglon = results[index].origin.lon; var cntlat = results[index].center.lat; var cntlon = results[index].center.lon; var zoom = results[index].zoom; var route; var map; map = new GMaps({ el: '#'+mapdiv, lat: cntlat, lng: cntlon, width: '750px', height: '580px', zoom: zoom }); map.addMarker({ lat: destlat, lng: destlon, title: desttitle, infoWindow: { content: ' '+desttitle+' ' } }); map.addMarker({ lat: orglat, lng: orglon, title: 'You Are Here', infoWindow: { content: ' You Are Here ' } }); setTimeout(function() { map.getRoutes({ origin: [orglat, orglon], destination: [destlat, destlon], travelMode: 'driving' }); }, 1000); var mapData = new Array(); mapData[0] = mapdiv; mapData[1] = map; maps.push(mapData); }); }); }; //retrieve mapData var mapData = $.grep(maps, function(mapData) { return mapData[0] === mapdiv; }); map = mapData[0][1];
score: 0

http://stackoverflow.com/q/27062769
type: Question
has body: I'm having a problem with my live site. When we made the site the sound worked completely but then when we put it up on the domain the sound doesn't seem to work. We've ran error tests and it seems that the sound is running in the console log but not actually running on the site. sound only appearing in the console log. https://i.sstatic.net/F5oAd.jpg //////////////////////////////////////////////////////////////////////////////////////////////////////////// playSound: function (clip) { //plays the sound that corresponds to the pad chosen if ($("#sound").is(":checked")) {//Check Box Function var sound = $('.sound' + clip)[0]; console.log(sound); console.log($('.sound' + clip)); sound.currentTime = 0; //resets audio position to the start of the clip sound.play(); //play the sound } }, this is the javascript that actually runs the code offline it plays the code but when we put it up online it only plays in the console log. we are looking for help getting the sound to play heres a link to live version so you can see that the sound doesnt work - http://e-lemon-ators.com/ thanks for the help in advance.
tagged with: audio
score: 0
tagged with: wordpress
has title: no sound playing on live site
answer count: 1
has answer: http://stackoverflow.com/a/27062886
tagged with: javascript
type: UnansweredQuestion
tagged with: console

http://stackoverflow.com/q/27069711
has title: Angularjs binding not working when called from ng-click
tagged with: typescript
has body: What am I doing wrong? search() works when called within the controller but not when called through ng-click="search()" $scope.search = () =&gt; { $scope.getLocation() .then(location =&gt; xhr('/venues/search', { lat: location.lat, lng: location.lng, category: $scope.category })) .then(data =&gt; { $scope.venues = data; $scope.apply(); }); }
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42652360
tagged with: javascript
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42652754
has answer: http://stackoverflow.com/a/27070656
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/42652975

http://stackoverflow.com/comment/42776881
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27139104
type: Comment
has text: Thanks @RobG , So if I create an element using `document.createElement()`, I can actually also use the var to 'get / reference' the element later on? That is a pretty handy trick to save some lines of code!

http://stackoverflow.com/q/27095936
answer count: 1
has body: Cant get this form to even run the javascript validation. I have tried changing onclick to onsubmit in the form but havent ever got it to run the script. Sorry if this is an obvious error but ive been searching the internet for a while now. Thanks Email Form Page Send me an Email First Name: Last Name: Your Email: Subject: Message:
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42697404
type: Question
has answer: http://stackoverflow.com/a/27095973
has title: Javascript form validation not running
tagged with: javascript
score: 0

http://stackoverflow.com/comment/42765334
type: Comment
comment on: http://stackoverflow.com/a/27132747
score: 0
type: AnswerComment
has text: For me it does. Just updated it. Which browser are you using to test it?

http://stackoverflow.com/q/27126263
type: Question
tagged with: arrays
tagged with: javascript
tagged with: sorting
has title: How to sort an array of names, relevant to the value of an integer in the same object as the name?
upvote count: 2
has answer: http://stackoverflow.com/a/27126636
accepted answer: http://stackoverflow.com/a/27126636
linked to: http://stackoverflow.com/q/1129216
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/27126589
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27126589
downvote count: 0
has body: This is the object for the array below. function Employee (name,preference,man,max){ // Defines the object employee with the relevant fields this.name = name; // slot preference in order this.preference = preference; // Number of mandatory slots required this.man = man; // Maximum number of slots that can be allocated this.max = max; } This is the array below. The second fields values (which represent slots in a timetable) are ordered by preference already. I want to be able to choose a particular slot and alert a list which contains all those who have it in their preference field and in order of who placed it of the highest preference. var staff = new Array(); staff.push(new Employee("john",[1,2,3],1,3)); staff.push(new Employee("Conrad",[2,1,4],1,3)); staff.push(new Employee("Elliot",[8,2,6,7,1],3,5)); staff.push(new Employee("Sarah",[3,1,4,2,6],3,5)); staff.push(new Employee("Emily",[7,2,8,1,4],3,5)); staff.push(new Employee("Mark",[3,4,1,2],1,3)); staff.push(new Employee("Lucy",[5,1,4],1,3)); staff.push(new Employee("Sam",[6,2,7],1,3)); showEmployees(staff);

http://stackoverflow.com/q/26997647
downvote count: 2
has comment: http://stackoverflow.com/comment/42525973
has comment: http://stackoverflow.com/comment/42528259
has comment: http://stackoverflow.com/comment/42530129
has comment: http://stackoverflow.com/comment/42526026
tagged with: object
has answer: http://stackoverflow.com/a/26997843
has comment: http://stackoverflow.com/comment/42525906
tagged with: literals
type: Question
has comment: http://stackoverflow.com/comment/44135295
has title: Don't understand why you should not use an object literal at the beginning of a statement
has comment: http://stackoverflow.com/comment/42526000
tagged with: javascript
has comment: http://stackoverflow.com/comment/42526243
has comment: http://stackoverflow.com/comment/42528110
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/27864423
has comment: http://stackoverflow.com/comment/42525910
has comment: http://stackoverflow.com/comment/42526027
favorite count: 0
has comment: http://stackoverflow.com/comment/42527715
has comment: http://stackoverflow.com/comment/42525849
has body: Just reading some of the JS tuts on Mozilla and came across the statement "You should not use an object literal at the beginning of a statement. This will lead to an error or not behave as you expect, because the { will be interpreted as the beginning of a block." I don't understand what they mean. Could someone shed some light on this please
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/27140327
tagged with: javascript
has comment: http://stackoverflow.com/comment/42778303
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42778258
type: UnansweredQuestion
has body: i am new to this site and JavaScript and am trying to build a fake username and password log in site. i want people to be able to make a username and password on one page and then log on in another. for now the username and password creation portion is limited to premade usernames and passwords for now. i am trying to use the sessionStorage. method to retrieve a defined variable from one web page and bring the data to another page. i am having trouble getting the username and password to the other page in an array with the sessionStorage. method which is what i think the problem is. please explain in grate simple detail for i remind you i am new to this. thank you! this is the code for the page where the variables are defined. create account this is the code for the page with the log in. log on page ENTER USER NAME ENTER PASSWORD
has title: i am confused on how to make the sessionStorage. transfer arrays across different web pages
has answer: http://stackoverflow.com/a/27140480
type: Question
has comment: http://stackoverflow.com/comment/42778376

http://stackoverflow.com/comment/42542118
comment on: http://stackoverflow.com/a/27006533
has text: Thanks a lot, I had been trying to fix this for a long time
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42691523
has text: It would be amazing if it is that simple. I'll be working on it in about an hour and will post back the results then. Thanks.
score: 0
comment on: http://stackoverflow.com/q/27048496
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27070675
score: 1
has comment: http://stackoverflow.com/comment/42722963
upvote count: 1
answers question: http://stackoverflow.com/q/27062967
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27062967
has comment: http://stackoverflow.com/comment/42707287
type: Answer
has body: You should not be calling app.render() to re-render your application. As you say, you don't want to re-render the whole thing each time. Are you stuck on Enyo 2.3 or can you update to a more recent version? Controllers have been largely deprecated, for one. I suggest taking a look at the Panels component. You can place a Panels component within your area that changes and navigate to a panel and push whatever content you want into that panel. You individual sections would be Panel components and you can push and pop those as needed. If you need to replace the panel. If you really want to do it that way, you can modify your BaseLayout component so that it uses createComponent() to create whichever partial view you want. enyo.kind({ name : "BaseLayout", // This can be just a plain enyo.Control components: [ {content: "this content of the View never changes"}, // next content should be changed. It's for renderTarget {name: "renderContentSection"} // How to render new content form Index or Edit view here? ], replacePartial: function(partial) { this.$.renderContentSection.destroyClientControls(); this.$.renderContentSection.createComponent({kind: partial}); this.$.renderContentSection.render(); } }); Here's a fiddle showing that off: http://jsfiddle.net/RoySutton/LhjLv6hy/ You could create a new control with a 'chrome' controls and a client area that controls get rendered into, but this is pretty simple. Still, take a look at Panels. It's what they were designed for.
downvote count: 0

http://stackoverflow.com/q/26992002
possible better answer: http://stackoverflow.com/a/26992045
has answer: http://stackoverflow.com/a/26992103
has answer: http://stackoverflow.com/a/26992043
answer count: 3
upvote count: 1
downvote count: 0
favorite count: 0
has title: Run script on clicked div only
has answer: http://stackoverflow.com/a/26992045
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/42515203
accepted answer: http://stackoverflow.com/a/26992043
has body: I have a smal portfolio with images and I want to show text (info) when this images are clicked. Fade or slide away the image and show the text "behind" when the div is clicked. When the div is clicked again, hide text and show image. This fiddle I made may clear this up. http://jsfiddle.net/0sr26qf4/ Question is, as you may see, all the div responds to the script. Only the clicked div have to show the text. I have tried with jQuery .next() but don't get this to work properly. $(".text").hide(); $(".container").click(function(){ $("#image, #text").slideToggle("slow"); }); SOLUTION: This worked like a charm :) Also changed id to class, thank you for this! $(".text").hide(); $(".container").click(function(){ $(this).find(".image, .text").slideToggle("slow"); });
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27072850
favorite count: 0
accepted answer: http://stackoverflow.com/a/27072891
has comment: http://stackoverflow.com/comment/42657943
has answer: http://stackoverflow.com/a/27072894
has title: Do image URLs in a Javascript array automatically get pre-loaded into the browser?
has comment: http://stackoverflow.com/comment/42657772
has answer: http://stackoverflow.com/a/27072891
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27072893
linked to: http://stackoverflow.com/q/476679
upvote count: 2
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/42658212
has body: I'm just looking for confirmation on an question I haven't seen directly answered. I am building a site and I'd like to load many image urls into a Javascript array without actually sending the images to the browser. To cut down on server bandwidth usage, I'd like to store the URLs in the document and only load them one at a time when the user takes a specific action to do so. I suppose my question is the opposite of the many "how do I use Javascript to pre-load an image" question like the one found here. The prevalence of these questions suggests that it's safe to stick the urls in a Javascript array at the top of the document and the browser will not automatically pre-load them. Is my assumption correct?
tagged with: arrays
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27072893
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42705203
type: AnswerComment
score: 0
type: Comment
has text: @user3610374 i mean View("Index")
comment on: http://stackoverflow.com/a/27100328

http://stackoverflow.com/comment/42746639
has text: @Bergi is there any alternative method that I could use? Could you give me one?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27121219
type: QuestionComment

http://stackoverflow.com/q/27056975
type: Question
has answer: http://stackoverflow.com/a/27057004
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27057103
answer count: 6
has answer: http://stackoverflow.com/a/27057018
has title: Get childnode from element
possible better answer: http://stackoverflow.com/a/27057004
has answer: http://stackoverflow.com/a/27057013
has answer: http://stackoverflow.com/a/27057007
has body: I have the following code: some text some text some text I'd like to give the span of the clicked element some styling but I'd prefer to use the parent element's id for reference rather than giving each span an id as well. I have tried this, but it doesn't work: function selPic(id) { document.getElementById(id).childNone[0].style.opacity = "1"; } Any ideas?
has answer: http://stackoverflow.com/a/27057044
tagged with: css
has answer: http://stackoverflow.com/a/27057103
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/27146130
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27146030
score: 1
downvote count: 0
has body: In the AJAX backend file, send some parameter like from where the request came. If its JSON, then put proper json header. And exit there. Else, show plain HTML. This way, your file should also work for plain HTML along with this JSON request. Just writing exit in your code will break your functionality where this file's HTML is required.

http://stackoverflow.com/a/27144515
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/42785959
has comment: http://stackoverflow.com/comment/42785699
has comment: http://stackoverflow.com/comment/42785489
has comment: http://stackoverflow.com/comment/42785314
has body: yes it is enought add animation: { duration: 1000 } have a look in this example that I have found refer this page for documentation about animation property example function init() { var options = { width: 400, height: 240, animation:{ duration: 1000, easing: 'out' }, vAxis: {minValue:0, maxValue:1000} };
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27144409
answers question: http://stackoverflow.com/q/27144409
has comment: http://stackoverflow.com/comment/42785935

http://stackoverflow.com/comment/42770531
comment on: http://stackoverflow.com/q/27135939
has text: @g.d.d.c I am not parsing dom. Those are messages generated by me. And anyway that is not the problem.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27093703
accepted answer of: http://stackoverflow.com/q/27093248
has body: JQuery Solution: $(function(){ var currentTime = new Date(); var month = currentTime.getMonth() + 1 var day = currentTime.getDate(); $("#content").append("Today Budget"); }); JSFiddle: http://jsfiddle.net/ehLku1oq/
answers question: http://stackoverflow.com/q/27093248
type: Answer
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42776896
has text: Thanks, I prefer not to use a div wrapper as I need to click on the html. I would like to use something like `mouse.cursor('crosshair')` so its easier and cleaner.
type: Comment
comment on: http://stackoverflow.com/a/27139523
score: 0
type: AnswerComment

http://stackoverflow.com/a/27081812
type: Answer
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/27081759
has body: Use a config-module and include it if needed: //conf.js module.exports = { DEBUG: true } //other.js if(require('./conf').DEBUG)

http://stackoverflow.com/comment/42777540
has text: FYI, if you just want to display the data, perhaps you could use an iframe? But if you want the actual data in your app, the iframe won't allow you to access the data.
type: Comment
comment on: http://stackoverflow.com/q/27139725
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42546289
type: QuestionComment
has text: I tried both overflow: auto and overflow-y: auto;
comment on: http://stackoverflow.com/q/27009176
score: 0
type: Comment

http://stackoverflow.com/q/27016432
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27016631
accepted answer: http://stackoverflow.com/a/27016687
type: AnsweredQuestion
type: Question
has title: Click a link with href attribute and execute the Javascript function
has answer: http://stackoverflow.com/a/27016620
has answer: http://stackoverflow.com/a/27016687
has body: My script contains a link a element with href attribute of "#login" as below. Login I want to my Javascript function detect the "href" element in the link and execute. How can I do this? My Javascript function is window.onload = function() { document.getElementsByTagName("a[href=#login]").onclick = function(e) { e.preventDefault(); alert("working"); } }
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27016620
score: 0

http://stackoverflow.com/q/27119822
tagged with: javascript
has body: Login from here Now I want to traverse this form and get all parents of last div#req_val, so the output should be a string i.e. form.register div.form-group.needAccount#req_val
score: 0
answer count: 2
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42741522
has comment: http://stackoverflow.com/comment/42750091
has title: Get all parent and store them in string
has answer: http://stackoverflow.com/a/27120201
has answer: http://stackoverflow.com/a/27120209
type: Question

http://stackoverflow.com/comment/42791340
has text: Although nobody likes PHP filter 'cause of security reasons, one of my backup sites uses it, and it works perfectly there. Your choice.
comment on: http://stackoverflow.com/q/27136471
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27068248
tagged with: colors
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/27068564
has answer: http://stackoverflow.com/a/27068468
accepted answer: http://stackoverflow.com/a/27068468
has answer: http://stackoverflow.com/a/27068973
has answer: http://stackoverflow.com/a/27068456
type: AnsweredQuestion
has body: At the moment I have two buttons, "Green" and "Red". Once "Green" is clicked the text in the div (red as default) goes green. And when the "Red" button is clicked the text goes red. These are two separately working buttons that carry out the function I want. But I want there to be just one button. The Default button will be called "Green", once clicked it will change the font of the div to green and the button will change name to "Red". Once "Red" is clicked it will turn the font back to red and the button back to "Green". How do I go about this using javascript? JQuery won't be much help to me as I am trying to master javascript at the moment. Here is my current html with my two working buttons: Clock Part III Green Red Clock Thanks in advance!:)
type: Question
score: 0
has title: How to make my button change once clicked to carry out a different function?
tagged with: button
possible better answer: http://stackoverflow.com/a/27068456
tagged with: javascript

http://stackoverflow.com/q/27074705
score: -1
tagged with: forms
has body: I am calculating TAX/TDR automatically in the form. But, it is not working. What am I doing wrong here? The form tab includes : Amount : user entered Card type : select option Visa (add 20% to amount) Amex card(add 17.5% to amount) other (add 15% to amount) Grand Total : Amount + selected card type % amount Amount: TDR included?: Card Type : VISA Amex card other VAT/Tax: Total:
type: Question
has answer: http://stackoverflow.com/a/27074747
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42661011
tagged with: http://stackoverflow.com/tag/html
has title: Calculate Tax/TDR automatically in web form
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27074747
has comment: http://stackoverflow.com/comment/42661003
has comment: http://stackoverflow.com/comment/42660992

http://stackoverflow.com/q/27102165
accepted answer: http://stackoverflow.com/a/27102419
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27102419
type: Question
has body: I have a buttons who insert different text into the textarea, now I also want different help text then mouseover the buttons, but I cant get it to work Tip code I try to combine with the fiddle, but i cant get it to work together Insert1 asdad Insert2 Fiddle to insert text into textaarea when click button http://jsfiddle.net/rmDzu/19 Fiddle to get help text when mouseover buttons http://jsfiddle.net/fTpwF Anyone can help me to combine this fiddles into 1? It dont need to be this code in the fiddles at all.
tagged with: javascript
score: 0
has title: Insert text into textarea and help text when mouseover buttons with jQuery/Javascript
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/27023214
accepted answer of: http://stackoverflow.com/q/27022628
answers question: http://stackoverflow.com/q/27022628
type: Answer
has body: As a general rule, if you're not going to use the variable or function in the view, don't attach it to the scope. So declare your variables and functions within the controller or on the scope based on it's use. You don't want to put unnecessary stuff on the $scope, as this will slow down the digest cycle. As a best practise I follow this format in my controller: app.controller('MainCtrl', function($scope) { // controller variables var age = 123; // scope variables $scope.name = 'John'; // controller functions var helloWorld = function() { console.log('do work'); } // scope functions $scope.isOld = function() { return age &gt; 50; } });
score: 3
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42570706
downvote count: 0
has comment: http://stackoverflow.com/comment/42571527

http://stackoverflow.com/a/27032836
score: -1
has body: modify .htaccess file to make short URLs the way you want them to look like
has comment: http://stackoverflow.com/comment/42588186
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/27032119
downvote count: 1

http://stackoverflow.com/comment/42776687
type: Comment
score: 1
has text: In your first example, `playlist1` is a string, in the second a variable.
type: QuestionComment
comment on: http://stackoverflow.com/q/27139418

http://stackoverflow.com/q/27119291
score: 1
has answer: http://stackoverflow.com/a/27120053
accepted answer: http://stackoverflow.com/a/27120053
upvote count: 1
type: Question
tagged with: javascript
has body: I have this directive to increment and decrement variable like this angular.module('shopping') .directive('myDir', function () { return { restrict: 'AE', scope: { dirModel: '=' }, template: ' - ' + ' {{ value }} ' + ' + ', link: function (scope, iElement, iAttrs) { scope.increment = function () { scope.value += 20; } scope.decrement = function () { scope.value -= 20; } } }; }); I am using like this Now when i click on edit form where my scope already have user.interval = 30 then that does not get set. For new form it works ok
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42740992
has comment: http://stackoverflow.com/comment/42740554
has title: How can i use ng-model with directive in angular js
type: AnsweredQuestion

http://stackoverflow.com/q/27090142
tagged with: javascript
score: 0
answer count: 1
tagged with: asp.net-web-api
tagged with: rest
has answer: http://stackoverflow.com/a/32470622
type: UnansweredQuestion
has title: Restangular does not give back the objects coming from REST api
has body: I would like to ask some help. I have a service can be called using the domain/service/webapi/ url. When the domain/service/webapi/menu/getmenucategory then it gives back the JSON string below which represents the menu structure of the application: My issue is that if I call this url using restangular then I got and empty object back. However, Fiddler says that Restangular calls the webapi service and it gives back the json below. I don't understand why restangular does not give back the javascript objects I expect. I went through the documentation, but I haven't found anything. I assume I did something very simple thing wrong. Here are the scripts: Controller: 'use strict'; dilibApp.controller('NavigationMenuController', function ($scope, navigationMenuService) { $scope.menuCategories = navigationMenuService.GetMenuCategories(); }); Service: 'use strict'; dilibApp.factory('navigationMenuService', function(Restangular) { return { GetMenuCategories: function() { //var menuCategories = Restangular.all('menu', 'getmenucategory'); var menuCategories = Restangular.all('menu/getmenucategory'); console.log(JSON.stringify(menuCategories.getList())); return menuCategories.getList(); } } }); Result in Chrome Console: {"restangularCollection":true,"$object":[]} JSON string: [{"$id":"1", "Id":1, "Name":"File", "SortNo":0, "IsEnabled":1, "MenuItems":[{"$id":"2", "Id":1, "Name":"File menu item 1", "IsEnabled":1}, {"$id":"3", "Id":2, "Name":"File menu item 2", "IsEnabled":1}]}, {"$id":"4", "Id":2, "Name":"Administration", "SortNo":1, "IsEnabled":1, "MenuItems":[{"$id":"5", "Id":4, "Name":"Administration menu item 1", "IsEnabled":1}, {"$id":"6", "Id":5, "Name":"Administration menu item 2", "IsEnabled":1}]}, {"$id":"7", "Id":3, "Name":"Modules", "SortNo":2, "IsEnabled":1, "MenuItems":[{"$id":"8", "Id":6, "Name":"Modules menu item 1", "IsEnabled":1}, {"$id":"9", "Id":7, "Name":"Modules menu item 2", "IsEnabled":1}]}]
tagged with: restangular
has comment: http://stackoverflow.com/comment/42730240
type: Question
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/27108585
type: Answer
has comment: http://stackoverflow.com/comment/42721384
answers question: http://stackoverflow.com/q/27107806
has body: If I understand correctly your problem is that you have multiple reply text areas but only one of them works. I like to start with the simplest errors and I say that is because you only have ONE id for the textarea in the reply form. HTML will pull the first id/name it seems and discard the rest if they share the same name and if the first one is null then that's what is posted. So at some point you need to iterate the 'replycom' name/id THIS IS JUST AN EXAMPLE: $replyNumber = 0; ... EDIT I just remembered that you can define a variable as an array in HTMl
has comment: http://stackoverflow.com/comment/42724652
has comment: http://stackoverflow.com/comment/42721192
has comment: http://stackoverflow.com/comment/42720825
score: 0

http://stackoverflow.com/comment/42785053
score: 0
type: Comment
type: QuestionComment
has text: the selectstart works on desktop Safari, but not on mobile Safari. I tried http://jsfiddle.net/rzmstcot/ also in mobile Safari, the event is not fired.
comment on: http://stackoverflow.com/q/27126343

http://stackoverflow.com/comment/42607877
type: AnswerComment
type: Comment
has text: @RichardGuay totally understand. Can you try the updated script I just made? I made the searching more flexible so that it just searches by name of objects, not by their position in the array.
score: 0
comment on: http://stackoverflow.com/a/27032465

http://stackoverflow.com/q/27123999
answer count: 0
upvote count: 2
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14767136
linked to: http://stackoverflow.com/q/568977
type: Question
score: 2
has body: I want to do somethin when users closing my webs. So I'd done like this: window.onbeforeunload = function(){ #do something } But it's dispoint that I can't know the uers is doing close or not, because it's also can be refresh (like F5); do anybody would like to help me?
tagged with: internet-explorer
linked to: http://stackoverflow.com/q/14767136
has title: how to know the ie's table is closed but not refreshed
downvote count: 0
tagged with: javascript
favorite count: 0
duplicate of: http://stackoverflow.com/q/568977

http://stackoverflow.com/a/27141703
answers question: http://stackoverflow.com/q/27141607
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42805419
accepted answer of: http://stackoverflow.com/q/27141607
has body: Just add ngRoute as dependency var pfcModule = angular.module('pfcModule', ['ngRoute']); Here is angular docs with more details https://docs.angularjs.org/api/ngRoute/service/$route#example

http://stackoverflow.com/q/26996438
has comment: http://stackoverflow.com/comment/42524688
score: 0
has title: RequireJS script in an AngularJS directive
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
tagged with: requirejs
has body: I have a website based on AngularJS. To load js applications I use requirejs as follow: Now I need to include the require.js script in an angular directive template. But, after checking the network with chrome, it seems that the request for require.js and then myjsapp.js doesn't trigger. This only when I include the script in an AngularJS directive. Any suggestion?
has comment: http://stackoverflow.com/comment/42524984
type: Question
has comment: http://stackoverflow.com/comment/42525365
tagged with: javascript

http://stackoverflow.com/comment/42674311
type: Comment
has text: well, +1 for no plugin. I'm too far into my project to figure out what's wrong with my CSS, it hasn't worked for me but I'll look at it when I have time!
comment on: http://stackoverflow.com/a/27081980
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42617067
has text: .replace ("["+digit+"]",1.toString())
comment on: http://stackoverflow.com/q/27049747
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42760553
type: Comment
type: QuestionComment
has text: I think form.setAttribute("onsubmit","solve()"); should be form.setAttribute("onsubmit",solve());, passing function as second parameter, not string.
comment on: http://stackoverflow.com/q/27130818
score: 0

http://stackoverflow.com/q/26999781
has body: I'd like to ask for some help because I've been trying to solve this for some time now. I've read Derick Bailey's blog post on tree structures and CompositeViews. I also read David Sulc's but I have what I think is a slightly different use case than the one described there. Note: My project uses Marionette.js 1.0.3. I am trying to build something that will work like an inbox with emails displayed in a table. An email may be a thread, meaning that it will have other emails that are linked to it. The inbox view is being rendered in a &lt;table&gt; where each &lt;tr&gt; is an email. My JSON looks like: [ {id: 1, subject: 'One', threads: []}, {id: 2, subject: 'Two', threads: [ {id: 3, subject: 'Three', threads: []}, {id: 4, subject: 'Four', threads: []} ]}, {id: 5, subject: 'Five', threads: []} ] My views are configured like this: InboxView = Marionette.CompositeView.extend({ // edited for brevity initialize: function(options) { this.itemView = EmailView; } // edited for brevity }); EmailView = Marionette.CompositeView.extend({ // edited for brevity tagName: 'tr', initialize: function(options) { this.collection = this.model.get('threads'); }, onRender: function() { if (this.model.isThread()) this.$el.addClass('thread'); } // edited for brevity }); The issue I'm having is that if I let CompositeView work its magic for me by rendering the model once and then the collection of threads once, I end up with two table rows &lt;tr&gt; (one for each thread) inside the &lt;tr&gt; for the original email (parent). There exists functionality in the InboxView and EmailView that I'm trying to reuse. What I'm trying to end up with is a table that has all rows shown at the same level. If you're reading this and want to help me, thank you in advance!
answer count: 1
has title: Marionette.js CompositeView - How to render model and collection without nesting
tagged with: marionette
tagged with: backbone.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27001845
score: 0
accepted answer: http://stackoverflow.com/a/27001845
type: Question
tagged with: nested-views
tagged with: javascript

http://stackoverflow.com/comment/43094560
type: QuestionComment
comment on: http://stackoverflow.com/q/27114154
has text: maybe adobe flash can detect it, and you can create some callback from flash to javascript to pause you slideshow, and you can embed this with no visibility. or use ajva, but user neet to allow its execution. or silverlight
score: 0
type: Comment

http://stackoverflow.com/comment/42665313
has text: In fact, the link explain what I've done ... sorry... could somebody help me ?
comment on: http://stackoverflow.com/q/27070922
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/27142214
tagged with: angularjs
has answer: http://stackoverflow.com/a/27143150
has title: how do display tooltip when move mouse to for each item in editable-select
has body: I'm trying display tooltip when move mouse into each item in editable-select. click me When I click on the link "click me", the editable select preview. I want display tooltip when I move mouse to each item in editable select. I'm tried search on the internet but could not find I need. So, who can any ideal for my question? Please help me... thanks so much.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27142304
has answer: http://stackoverflow.com/a/27148953
type: Question
accepted answer: http://stackoverflow.com/a/27143150
has answer: http://stackoverflow.com/a/27142304
tagged with: javascript
score: 0
answer count: 3

http://stackoverflow.com/a/26995329
has comment: http://stackoverflow.com/comment/42521361
upvote count: 1
has comment: http://stackoverflow.com/comment/42521230
has comment: http://stackoverflow.com/comment/42521189
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/26995223
downvote count: 0
answers question: http://stackoverflow.com/q/26995223
has comment: http://stackoverflow.com/comment/42521280
type: Answer
has body: markerA.getLatLng() returns a Leaflet LatLng object. To get the numbers individually, do something like: var ll = markerA.getLatLng(); alert("latitude: " + ll.lat); alert("longitude: " + ll.lng); Then assign it to the input boxes as you would with any other Javascript task: var ll = markerA.getLatLng(); document.querySelector('#userLat').value = ll.lat; document.querySelector('#userLng').value = ll.lng;
has comment: http://stackoverflow.com/comment/42521210
score: 1

http://stackoverflow.com/a/27108861
type: Answer
has body: Because if you are on the page1 with $location path /link1, and then you click on the link /link1 location path does not change again of course, hence route won't change either. And because of that $routeChangeSuccess event never occurs, which is being listened by ngView directive. This ngView directive internal event listener responsible for controller instantiating, which of course won't happen too.
answers question: http://stackoverflow.com/q/27108640
score: 0

http://stackoverflow.com/q/27049682
tagged with: javascript
tagged with: compass
has answer: http://stackoverflow.com/a/27049912
has title: Javascript wheel dynamic abilities
score: 0
has body: I came across this wheel script that I'd like to possibly implement. However, I need the $ of wheel panels to be dynamic. The SASS had a variable in it already, but if I modify it to say 20, and add more div elements, the wheel still only shows 10. It looks like the mixins that calculate the angle use the $num-sides variable. I do see extra elements when it first loads, but they disappear as soon as the wheel is touched. What am I missing? http://codepen.io/Aldlevine/pen/yGLqd $num-wheels: 1; $num-sides: 20; $wheel-height: 10rem;
accepted answer: http://stackoverflow.com/a/27049912
type: AnsweredQuestion
type: Question
tagged with: sass
answer count: 1

http://stackoverflow.com/q/27057269
answer count: 1
tagged with: javascript
tagged with: angularjs
tagged with: datepicker
has answer: http://stackoverflow.com/a/27103350
type: AnsweredQuestion
has body: I was using a angularUI datepicker in my webapp when I suddently came across this: http://plnkr.co/edit/MLnWCtYHMNqLeuFOetWH?p=preview In particular I am setting the date in my controller like this: $scope.getDate = function() { $scope.dt = new Date(2015,0,1); }; $scope.getDate(); then in my html I display the date in this two ways: With angular date filter date is: Without angular date filter is: {{dt}} As you can see in this plunker, I have selected the date "01/01/2015" (january 1st, 2015) and if I see the plunker with the Angular date filter I get the correct date and time. However, if I remove the filter, I get the same date 1 hour in the past. It is surely a problem of timezones, but I cannot find any sources of this behavior, so I wanted to understand what's going on. Is there any explanation or a website to browse? Also, what will arrive at the server? Do I have to do some special formatting on the server? (i cannot test this atm) Don't know if this matters (I think yes), but my browser lives in Italy.
type: Question
accepted answer: http://stackoverflow.com/a/27103350
tagged with: date
has title: AngularUI Datepicker without filter, what's happening?
score: 0

http://stackoverflow.com/comment/42681946
type: QuestionComment
has text: Sry my fault, You are right. But however according to that link: http://stackoverflow.com/questions/802854/why-is-document-write-considered-a-bad-practice, maybe You should try to modify DOM in another way? And You must double check what String projection really do for this undescribed type of object (text_content). I think this projection is the clue...
comment on: http://stackoverflow.com/q/27086662
score: 0
type: Comment

http://stackoverflow.com/comment/42569799
has text: You could change the return line to `return $(' ' + this.innerHTML + ' ')` but that would include undefined classes for divs that didn't have a class, so you might want to expand the logic to check for empty classes first.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27020858

http://stackoverflow.com/comment/42791582
comment on: http://stackoverflow.com/a/27148188
type: Comment
has text: Now Each time I'm Getting the last count value of index now inside function apa() , how can i pass correct values ? if index count 0 means i need to pass 0 to apa(). Thanks inadvance.
score: 0
type: AnswerComment

http://stackoverflow.com/a/57976396
answers question: http://stackoverflow.com/q/27108333
has body: FWIW and to complete the accepted answer: I came here to find out if a function scheduled with requestAnimationFrame, which mutates an element already removed (aka. unmounted) from the DOM when executed, would throw an error. It doesn't, ie.: let el = document.getElementById('element'); setTimeout(() =&gt; el.remove(), 20); setTimeout(() =&gt; { el.style.transform = 'scale(2)' console.log(el instanceof HTMLElement) // el is kept in memory but removed from the DOM , 40) // true`. To sum up, you SHOULD use cancelAnimationFrame to prevent side effects from a function auto-scheduled with requestAnimationFrame, and you CAN optionally use it to (micro-)optimize by avoiding its execution even if it has no side effects.
score: 0
type: Answer

http://stackoverflow.com/comment/42874188
comment on: http://stackoverflow.com/a/27116906
has text: Rafael, have you used any modern web frameworks like AngularJS, Meteor, Flex, Polymer, etc? All of these frameworks depend on javascript being enabled. I don't know of a single team who builds an entirely separate backup app without JS just to satisfy the few fools who disable it.
score: 0
type: Comment
type: AnswerComment

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/27012242

http://stackoverflow.com/q/27030159
possible better answer: http://stackoverflow.com/a/27030279
has answer: http://stackoverflow.com/a/27030213
favorite count: 0
has answer: http://stackoverflow.com/a/27030279
tagged with: node.js
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27030213
upvote count: 1
has body: I was trying to create a module for node.js and i noticed something. Example function Example() { this.property = "something"; } Example.prototype.run = function() { console.log('hello world') } module.exports = Example; with this code it say's that there's no method run. I need it to declare like Example.prototype.run = function run() {} to work. Why is that happening ?
type: Question
tagged with: javascript
has title: Difference between javascript class declaration
answer count: 2
has comment: http://stackoverflow.com/comment/42582748
downvote count: 0

http://stackoverflow.com/comment/59654867
score: 0
type: QuestionComment
has text: Possible duplicate of [How can I create a XMLHttpRequest wrapper/proxy?](http://stackoverflow.com/questions/4809342/how-can-i-create-a-xmlhttprequest-wrapper-proxy)
type: Comment
comment on: http://stackoverflow.com/q/27118558

http://stackoverflow.com/comment/42636020
type: Comment
type: QuestionComment
has text: @JanAagaardMeier Please take a look, now it is clear enough.
comment on: http://stackoverflow.com/q/27029555
score: 0

http://stackoverflow.com/a/27097724
upvote count: 1
score: 1
has body: First of all, it's probably a good idea to put your upper level navigation into a &lt;ul&gt;&lt;li&gt; structure. Now, what you can do is use jQuery to build a 'mobile menu' when the page loads, eg. var menu1 = $('ul.primary-menu').html(); var menu2 = $('ul.secondary-menu').html(); $('body').append('&lt;div class="mobile-menu"&gt;&lt;ul class="primary-menu"&gt;' + menu1 + '&lt;/ul&gt;&lt;ul class="secondary-menu"&gt;' + menu2 + '&lt;/ul&gt;&lt;/div&gt;'); You can then style this and then hide for the full website and display it (while hiding the full navigation) for mobile screens. After this you can setup a trigger to hide/show or slide etc. from a menu link. I find that this is probably the easiest way for long navigation items. Here is a quick fiddle I made: http://jsfiddle.net/pavkr/8cg7bLjL/8/
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27095975

http://stackoverflow.com/a/27094080
score: 2
answers question: http://stackoverflow.com/q/27094048
downvote count: 0
has comment: http://stackoverflow.com/comment/42694708
type: Answer
has body: document.getElementById("text").innerHTML="Some more text"; You have the wrong type of brackets. Use ()
upvote count: 2

http://stackoverflow.com/q/27111738
tagged with: javascript
has comment: http://stackoverflow.com/comment/42726773
has comment: http://stackoverflow.com/comment/42726544
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42726431
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/42726396
upvote count: 1
has answer: http://stackoverflow.com/a/27112266
tagged with: css
has comment: http://stackoverflow.com/comment/42726574
has comment: http://stackoverflow.com/comment/42726381
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10961697
possible better answer: http://stackoverflow.com/a/27112269
has title: How to replace HTML with another chunk of HTML Using JS
has answer: http://stackoverflow.com/a/27112269
has body: so I'm attempting to make a page where I click on a button and the HTML code of the div next to it changes. Essentially, I want to be able to click a link and my code inside the div changes. Here are the two different HTML codes: Number One: (id = contentPOP) Hit like a girl entry, "Little Black Dress" by One Direction Remembering Steve Jobs Number Two (id = "contentNEW") Slow Motion War! 1 Year Aniversary of Teddy Bear Productions! Here is an example of all the code NOTE: I have no idea how to do this, so a detailed explanation would be very helpful. Also, I want to be able to do this with only JS, no JQuery
score: -1
has comment: http://stackoverflow.com/comment/42726346
duplicate of: http://stackoverflow.com/q/10961697
has comment: http://stackoverflow.com/comment/42726652
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/27112266

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/27032953
tags question: http://stackoverflow.com/q/27033004
type: Tag

http://stackoverflow.com/comment/42570158
comment on: http://stackoverflow.com/q/27022697
score: 0
type: Comment
type: QuestionComment
has text: You're at that point in debugging then when I'd strip everything away, and build it all back up slowly until you hit your problem. Starting with javascript, then your markup (classes etc.). Sorry I can't be of any help.

http://stackoverflow.com/comment/42556866
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27015609
score: 0
has text: Do you mean for example if they choose _BMW_ in `carmakes` then only show _X5_ in `names`? And only show _Q5_ if they choose _Audi_?

http://stackoverflow.com/comment/42751554
has text: No code for the copy pieces. I'm looking for a general approach as resolution for this question. Essentially I start with a single TAB with an "Add New". I have a form with about 20 unique elements on this tab and about a thousand lines of java script code that works on these elements. I have a single page app using ajax. When user selects the "Add new Server" I need all the content in the original TAB to show up in the new TAB. (And I need the js functionality to work). So my thoughts are that I need unique ID's for the new tabs and my JS needs to be able to support both/multiple tabs.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27115790
type: QuestionComment

http://stackoverflow.com/q/27019523
has comment: http://stackoverflow.com/comment/42563642
has title: Javascript and php Round Up decimals
type: AnsweredQuestion
upvote count: 0
has body: I am having values like 7030.56,5875.78,8852.67. I want to round up value when .7 and above come on after decimal point. Eg I want round up when coming like this: (i) 5875.78 -rounded value 5876 (i) 8978.78 -rounded value 8979 I dont want round up when coming like this: (i) 5875.58 -rounded value 5875.58 (i) 8978.68 -rounded value 8978.68 I want to implement client side and server side also.Php and javascript also.
downvote count: 2
tagged with: php
type: Question
score: -2
has comment: http://stackoverflow.com/comment/42563734
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27019616
accepted answer: http://stackoverflow.com/a/27019616

http://stackoverflow.com/comment/56736661
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27074158
has text: then u should open another question why on earth Math.pow gives us such wrong answer.
type: Comment

http://stackoverflow.com/q/27081849
downvote count: 0
answer count: 1
has title: browser load error only with certain file path - internal server error 500
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/42674214
has body: I am getting internal server error 500 for only one js file and when I change the path of the file it works fine. Here is the snippet from my index file: &lt;script type="text/javascript" src="/users/users.client.module.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/users/services/authentication.client.service.js"&gt;&lt;/script&gt; 'users.client.module.js' doesn't load and gives 'internal server error' and the network tab in chrome shows it as 'text/html' type. The other file 'authentication.client.service.js' loads fine. There are other js files as well and they all load fine. Here is the server error: GET /users/users.client.module.js 500 6.716 ms - 1529 this is what network tab shows: Remote Address:127.0.0.1:3000 Request URL:`http://`127.0.0.1:3000`/users/users.client.module.js` Request Method:GET Status Code:500 Internal Server Error Request Headersview source Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:max-age=0 Connection:keep-alive Host:localhost:3000 Referer:http://localhost:3000/ User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 Response Headersview source Connection:keep-alive Content-Length:1529 Content-Type:text/html; charset=utf-8 Date:Sat, 22 Nov 2014 20:02:07 GMT X-Content-Type-Options:nosniff X-Powered-By:Express ConsoleSearchEmulationRendering However when I put the file 'users.client.module.js' in the subfolder 'services', it loads fine. Here is the example: &lt;script type="text/javascript" src="/users/services/users.client.module.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/users/services/authentication.client.service.js"&gt;&lt;/script&gt; The above works fine. I am confused as to why the browser doesn't load the file in the first case. I have tried it in both chrome as well as safari. Any help would be appreciated. Here is the code from express.js file that shows server side routing …
has comment: http://stackoverflow.com/comment/42673058
has answer: http://stackoverflow.com/a/28067212
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/42673848
tagged with: internal-server-error

http://stackoverflow.com/a/27084995
type: Answer
answers question: http://stackoverflow.com/q/27084923
has body: Not quite sure what you're asking, but I think this is what you're looking for: var test = $('#test'), a = $('a'); a.click(function(e) { e.preventDefault(); var $this = $(this), speed = 500; $this.next('.hide-show').slideToggle(speed); });
score: 0

http://stackoverflow.com/comment/42660795
type: AnswerComment
score: 0
type: Comment
has text: @dandavis Expression strings **are** complicated. Regexes are nice but they cannot solve every problem. Regexes do not deal well with things like nested parentheses.
comment on: http://stackoverflow.com/a/27074559

http://stackoverflow.com/q/27121510
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42810368
has comment: http://stackoverflow.com/comment/42744118
has title: Express server shows invalid JSON, works well in POSTMAN
tagged with: http://stackoverflow.com/tag/json
type: Question
score: 0
tagged with: arrays
tagged with: javascript
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/42745998
has body: I have a rest service built with node.js/express.js. I am using backbone in the frontend and when I do a save, following is sent in the payload: This results in parse error on express server: SyntaxError: Unexpected token e&lt;br&gt; &amp;nbsp; &amp;nbsp;at Object.parse (native)&lt;br&gt; &amp;nbsp; &amp;nbsp;at exports.CreateQuestion But works just fine when sent this using postman:

http://stackoverflow.com/a/27114641
score: 1
answers question: http://stackoverflow.com/q/27113837
downvote count: 0
has body: You're right in assuming that you don't need to use AJAX to perform a form request submission, you should use Meteor DDP protocol instead, by using a Meteor method. First, define your Meteor method to perform the action required, here is an example : Meteor.methods({ addContact: function(contact){ check(contact, { name: String, phoneNumber: String, email: String }); // return Contacts.insert(contact); } }); This method simply adds a contact to a collection after checking the argument has the correct format. Next you need to call this method in your form submission event handler like this : Template.myForm.events({ "submit": function(event, template){ // prevent default form submission handler : which is // performing an HTTP POST request that will reload the page event.preventDefault(); // construct the contact object that will be passed to the method var contact = { // assuming each input fields have ids attribute name: template.$("#name").val(), phoneNumber: template.$("#phoneNumber").val(), email: template.$("#email").val(), }; // perform the server-side asynchronous call Meteor.call("addContact",contact); } });
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42767779
type: QuestionComment
comment on: http://stackoverflow.com/q/27128404
has text: also getting this error, just today. only a few hours ago in fact.
score: 1
type: Comment

http://stackoverflow.com/q/27105754
tagged with: javascript
has comment: http://stackoverflow.com/comment/42724350
score: -1
has comment: http://stackoverflow.com/comment/42723178
accepted answer: http://stackoverflow.com/a/27110802
upvote count: 0
tagged with: highcharts
answer count: 1
has body: $http.post(galileoServer + "actions.php", { "action": "get-attendance-graph", "user": window.localStorage.getItem("username") }).success(function(result){ //console.log(result) busyIndicator("hide"); $('#attendance-graph').highcharts({ credits: 0, tooltip:{ enabled: false }, chart: { type: 'bar' }, title: { text: '', style: { display: "none" } }, xAxis: { categories: ['June', 'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May'] }, yAxis: { min: 0, title: { text: 'No. of days' }, gridLineWidth: 0, minorGridLineWidth: 0, labels: { //to disable points displayed enabled: false } }, legend: { reversed: true }, plotOptions: { series: { stacking: 'normal', dataLabels: { enabled: true, color: (Highcharts.theme &amp;&amp; Highcharts.theme.dataLabelsColor) || 'white', formatter: function() { //function to avoid displaying zero values if (this.y != 0) { return this.y; } else { return null; } } /*style: { textShadow: '0 0 3px black, 0 0 3px black' }*/ } } }, series: [{ name: 'Absent', data: [result.absentData] }, { name: 'Present', data: [result.presentData] }] }); }).error(function(result, status){ alert(status + "\nCouldn't connect to Galileo server due to network problem") }); I am trying to load the data via ajax but the graph doesn't gets loaded the graph loaded is blank. The coding snippet is provided. I also tried with the getJSON part, but it also didn't worked. Kindly let me know the solution, as I'm unable to get the graph since last two days. The console output is {"absentData":"0,0,2,0,0,1,0,0,0,0,0,0","presentData":"30,31,29,30,31,29,31,31,28,31,30,31"}
tagged with: jquery
has comment: http://stackoverflow.com/comment/42720893
favorite count: 0
tagged with: angularjs
has title: Highcharts with dynamic data $http.post angular js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42724211
has answer: http://stackoverflow.com/a/27110802
has comment: http://stackoverflow.com/comment/42724159
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42724337

http://stackoverflow.com/a/27150005
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42794704
has body: Your click handler has the requirement that the click target should have the class castor-close but when you are calling click via JavaScript you are clicking the parent element instead (.castor-tab), and the click handler doesn't react.
answers question: http://stackoverflow.com/q/27149859

http://stackoverflow.com/a/27105699
has body: isNaN coerces its value to a number. (See MDN) Because the string representation of an array is all of its items concatenated with a comma. And the numerical representation of that is NaN because of the comma. But if there's only one item, hence no comma, it's able to be converted to a number.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42714749
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/27105631
has comment: http://stackoverflow.com/comment/42714684
has comment: http://stackoverflow.com/comment/42714827
has comment: http://stackoverflow.com/comment/42715097
accepted answer of: http://stackoverflow.com/q/27105631

http://stackoverflow.com/q/27115572
score: 0
has answer: http://stackoverflow.com/a/27192295
type: AnsweredQuestion
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/27192295
type: Question
has body: I am using the code below to drag and scale some images. Also I am using the code below to print a specific div. All elements inside this div are print well, but when I am dragging the new images on it and trying to print... images doesn't show up. I am using jQuery and jQuery-UI. JavaScript: Printing Code: jQuery drag and scale: Draggable images: Printable div: And the button for print:
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: jquery-draggable
has title: append draggable image to a div for print

http://stackoverflow.com/comment/42731738
type: QuestionComment
comment on: http://stackoverflow.com/q/27114454
has text: Will you post your jade file as well?
score: 0
type: Comment

http://stackoverflow.com/comment/42786732
comment on: http://stackoverflow.com/a/27145293
type: Comment
score: 0
has text: You read the manual! It seems datatables changed a lot of things recently so I am not sure.
type: AnswerComment

tcp
type: Tag
tags question: http://stackoverflow.com/q/27123152
tags question: http://stackoverflow.com/q/27039328
tag name: tcp
tags question: http://stackoverflow.com/q/27096910

http://stackoverflow.com/q/27067777
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27068218
type: UnansweredQuestion
has title: adding div around link using jquery
has answer: http://stackoverflow.com/a/27068348
has body: I am adding a div around a link on click of a button. but when i click button multiple times, it adds multiple divs. How can i make sure that it first checks if there is a div around link and then adds. I am using following code: var parentTag = $(".ruRemove").parent().get(0).tagName; if (parentTag == 'LI') { $(".ruRemove").wrap(" "); $(".deletebutton").before(" "); } else { var par = $('.deletebutton').parent(); if (par.is('div')) par.remove(); $(".ruRemove").wrap(" "); var prev = $('.deletebutton').prev(); if (prev.is('label')) prev.remove(); $('.deletebutton').before(" "); } it should become this: when i click button. before clicking html is:
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/42649079

http://stackoverflow.com/a/40214341
has body: Below is the simplest throttle I could think of, in 13 LOC. It creates a timeout each time the function is called and cancels the old one. The original function is called with the proper context and arguments, as expected. function throttle(fn, delay) { var timeout = null; return function throttledFn() { window.clearTimeout(timeout); var ctx = this; var args = Array.prototype.slice.call(arguments); timeout = window.setTimeout(function callThrottledFn() { fn.apply(ctx, args); }, delay); } } // try it out! window.addEventListener('resize', throttle(function() { console.log('resize!!'); }, 200));
answers question: http://stackoverflow.com/q/27078285
has comment: http://stackoverflow.com/comment/70707975
downvote count: 4
type: Answer
upvote count: 2
score: -2

http://stackoverflow.com/comment/42669620
comment on: http://stackoverflow.com/a/27079837
type: Comment
has text: Because you haven't added your brackets correctly. Check for the closing brackets on `.mouseenter()` in you code. I haven't checked the rest of your code but I think it is the same problem every where.
score: 0
type: AnswerComment

papaparse
type: Tag
tag name: papaparse
tags question: http://stackoverflow.com/q/27086025

http://stackoverflow.com/a/27192295
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/27115572
accepted answer of: http://stackoverflow.com/q/27115572
type: Answer
has body: The jQuery UI draggable widget does not actually append the element being dragged into the element above which you visually drop it. Instead it just manipulates the CSS position properties of draggables and the position of those elements in DOM does not change on drop. So $(elem).html() doesn't actually contain the elements you dropped into it. For achieving this, you should initialize the drop target as a droppable widget, and manually append the draggable to the droppable on drop event. Something along: $("#contentHolder").droppable({ accept: "img.dragger", drop:function(event,ui){ $(this).append(ui.draggable); // actually append the item on drop } });
score: 3
upvote count: 3

http://stackoverflow.com/q/27001953
tagged with: rest
tagged with: wcf
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/112187743
answer count: 0
has comment: http://stackoverflow.com/comment/42540710
type: Question
has comment: http://stackoverflow.com/comment/42535621
has comment: http://stackoverflow.com/comment/42535912
score: 4
has body: I'm trying to enter data into a table using REST (WCF CORS) call from an ASP.NET page via jquery/javascript. The initial call works perfectly. Once I get the record key, i know the call is good, and I fire a toast message that indicates such, then i clear the text boxes to allow another re-entry. On the second entry, once the info is filled out and passes validation. I get this error in Chrome No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost' is therefore not allowed access. The response had HTTP status code 400. - You can see the first call is succesfully, but then the 2nd fails with the above error. It seems i have CORS set up correctly since i'm able to make the initial call successfully. I've even tried a redirect, and it only works for the first entry. In order to get another successful post I must 'physically' refresh the page, then reenter that data. Any ideas here? Thanks in advance! UPDATE: this only appears to be an issue in Chrome v 38.02.2125.111. IE 11.0.9600 works fine. UPDATE 2: this appears to be an issue with the URL length.... i think... UPDATE 3: it appears there is a 310 character limit for URIs? Anyone know how to get around that?
upvote count: 4
has comment: http://stackoverflow.com/comment/42538745
tagged with: cors
has title: CORS/REST URI limit?
downvote count: 0
tagged with: javascript
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42566766

http://stackoverflow.com/comment/43117754
type: QuestionComment
has text: I still don't understand why it submits twice... I found a hack to avoid entering the handling loop but the page still loads twice...
comment on: http://stackoverflow.com/q/27126390
score: 0
type: Comment

http://stackoverflow.com/comment/42628550
type: Comment
type: QuestionComment
has text: The child directives can `require` the parent. Angular will pass an instance of the parent controller as the 4th argument to the child's `link` function. https://docs.angularjs.org/guide/directive
comment on: http://stackoverflow.com/q/27056245
score: 0

http://stackoverflow.com/q/27019679
favorite count: 0
type: Question
tagged with: datepicker
has answer: http://stackoverflow.com/a/27022500
upvote count: 2
answer count: 2
has body: i have a problem with my js i have to find the difference between two days and have to disable the past dates too.. i tried many scripts but all have these functions separately.. like past disabling alone.. or date calculation.. i need both the functions combined together in my work. i tried out some js you can check out my js below link [http://jsfiddle.net/w5eta8rm/2/][1] kindly check the link above.. i combined them both.. but unable to make it to work.. i dont need an alert function.. i need to show it as text below the datepicker. thanks in advance.
has answer: http://stackoverflow.com/a/27039619
has comment: http://stackoverflow.com/comment/42564077
has title: how to display date difference using javascript and disable old dates
accepted answer: http://stackoverflow.com/a/27022500
possible better answer: http://stackoverflow.com/a/27039619
tagged with: javascript
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/a/27025886
downvote count: 4
has body: ngSubmit allows you to press Enter while typing on the textbox to submit. If that behavior isn't important, just use 2 ngClick. If it is important, you can modify the second button to use ngClick. So your code becomes: Save Save and Add Another
accepted answer of: http://stackoverflow.com/q/27025618
has comment: http://stackoverflow.com/comment/95692797
answers question: http://stackoverflow.com/q/27025618
has comment: http://stackoverflow.com/comment/46483872
has comment: http://stackoverflow.com/comment/50584222
score: 12
type: AcceptedAnswer
upvote count: 16
has comment: http://stackoverflow.com/comment/60329055
has comment: http://stackoverflow.com/comment/42575304
type: Answer

http://stackoverflow.com/comment/42632105
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27058588
has text: Where do I need to place this?
type: AnswerComment

http://stackoverflow.com/a/67528126
has body: here's my working code, hope it helps import path from 'path' const getBasenameFormUrl = (urlStr) =&gt; { const url = new URL(urlStr) return path.basename(url.pathname) }
answers question: http://stackoverflow.com/q/27006363
type: Answer
score: 10
upvote count: 10
downvote count: 0

http://stackoverflow.com/q/27103051
has body: This is my jquery <?php if (is_array($empOffice) && count($empOffice)) : foreach ($empOffice as $row ) : ?> <?php echo $row->employee_id;?> <?php echo $row->employee_first_name; ?> <?php echo $row->employee_last_name; ?> <?php echo $row->employee_position; ?> <?php echo $row->employee_address; ?> <?php echo $row->employee_mobile; ?> <a class="btn btn-danger btn-setting" href="<?php echo base_url(); ?>admin/vwDeleteModal" data-id="<?php echo $row->employee_id;?>" > <?php endforeach; ?> <?php endif; ?> this is the html part with view and delete option where I set the data-id and is link to vwDeleteModal × Please Confirm Are you sure? Close OK vwDeleteModal is loaded using <?php echo $this->load->view();?> Now when I click Ok button in vwDeleteModal, the segment(4) in the url which supposedly the employee_id is declared undefined and i cant delete the employee please can someone help me?!!
favorite count: 0
type: UnansweredQuestion
tagged with: php
upvote count: 1
has answer: http://stackoverflow.com/a/27118922
type: Question
has title: how to set href modal using jquery with CI
tagged with: continuous-integration
tagged with: javascript
tagged with: jquery
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27103159
downvote count: 0
score: 1

http://stackoverflow.com/comment/42745998
type: Comment
comment on: http://stackoverflow.com/q/27121510
type: QuestionComment
has text: its something which is sent by backbone directly and works fine otherwise. It has some problem with quotes
score: 0

http://stackoverflow.com/q/27135120
has comment: http://stackoverflow.com/comment/42771959
tagged with: javascript
has comment: http://stackoverflow.com/comment/42776515
tagged with: express
tagged with: drag-and-drop
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42769631
type: Question
accepted answer: http://stackoverflow.com/a/27139505
has comment: http://stackoverflow.com/comment/42776752
has title: Drag n Drop Uploader with Nodejs and Express 500 error code
has body: I'm trying to add the example of "simple file uploader"(https://github.com/merty/simple-file-uploader) to a Node.js and Express.js project, but I'm getting a 500 Internal Server Error from Express. I have tried multiple articles from this site but so far nothing. Here are my files index.ejs File Uploader Drop the files here... routes/index.js var multipart = require('connect-multiparty'); var multipartMiddleware = multipart(); var express = require('express'); var fs= require('fs'); router.post('/upload',multipartMiddleware,function (request, response) { console.log(JSON.parse(request.body)); console.log(JSON.parse(request.file)); console.log("\n ======> postData"); }); module.exports = router; Express js configuration app.set('views', path.join(config.rootPath, 'views')); app.set('view engine', 'ejs'); app.use(favicon()); app.use(logger('dev')); app.use(bodyParser.json({limit:'10000mb'})); app.use(bodyParser.urlencoded({limit:'10000mb'})); app.use(cookieParser()); app.use(express.static(path.join(config.rootPath, 'public'))); // Setting ExpressSessions to store in MongoDB app.use(expressSession({ secret: 'keyboard sdfgsdf', cookie: {maxAge: 60*60*1000}, resave: true, saveUninitialized:true, store: new mongoStore({ db: mongoose.connection.db, collection:'sessions' }) }));
has answer: http://stackoverflow.com/a/27139505
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42771445

http://stackoverflow.com/q/27132363
tagged with: arrays
downvote count: 0
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/23809597
has comment: http://stackoverflow.com/comment/42763898
favorite count: 0
has answer: http://stackoverflow.com/a/27132447
tagged with: angularjs-ng-repeat
linked to: http://stackoverflow.com/q/24353119
tagged with: angularjs
upvote count: 2
accepted answer: http://stackoverflow.com/a/27132447
score: 2
type: AnsweredQuestion
has body: I am trying to remove an item from AngularJS's scope array variable using the index of the item. (if you're to stop reading here thinking this is a duplicate, please jump to foot note links, I was able to find similar but not same questions which were answered - Or, I could have missed something so if you find EXACTLY same question I'd appreciate if you would please share the SO link for it ! Thx) here is my example : http://jsbin.com/seyaje/3/edit?html,output The problem I see is, the index does not get updated automatically - every time - hence wrong item gets deleted or if the index is 'out of bounds' the item does not get deleted at all. What I personally prefer is to pass index in my scenario, and I think it is relatively less work about not having to figure out indexes repetitively. (if the index is correct !) How could I possibly fix this using AngularJS 1.25 ? Your constructive help is always appreciated ! This might be a similar question to followings : AngularJS remove item from scope How to remove an Item from scope AngularJS What I am trying to accomplish, seems little similar to : https://stackoverflow.com/a/23810035 or http://plnkr.co/edit/51SNVMQjG3dsmpYI5RyY?p=preview Somewhat similar unanswered question (finds the object and deletes by index): remove clicked item angularjs
has title: AngularJS : index not updating after removing array item(s) by index
tagged with: array-splice
type: Question

http://stackoverflow.com/comment/42711563
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27103791
has text: I've been using http://regexr.com/ to test it for matches, and whilst it matches for aab... aab. abc It doesn't match for a.b.c. a..bc

http://stackoverflow.com/comment/42750564
type: QuestionComment
comment on: http://stackoverflow.com/q/27125270
score: 0
has text: Do you want `_img = _img.replace(/^public\:\/\//,'')` ?
type: Comment

http://stackoverflow.com/a/26993742
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42519715
accepted answer of: http://stackoverflow.com/q/26993363
type: Answer
answers question: http://stackoverflow.com/q/26993363
has comment: http://stackoverflow.com/comment/42535363
has comment: http://stackoverflow.com/comment/42518314
upvote count: 1
has comment: http://stackoverflow.com/comment/42521200
score: 1
has body: No, it cant be done without a loop, you want to act on multiple elements, you need a loop window.onload = function() { var elems = document.querySelectorAll('.content[href="this.com"]'); for(var i=0;i<elems.length;i++){ elems[i].innerHTML = "Im changed." } } I should change! I don't change I should change! too I don't change I also should change! As noted in the comments, the above could be changed to: window.onload = function() { [].forEach.call(document.querySelectorAll('.content[href="this.com"]'),function(e){ e.innerHTML = "Im changed by forEach, its still a loop!"; }); } But its still just a loop, just hidden behind a method which calls a delegate for each item in the supplied array! As for unwrapping your his might be useful: Removing wrapper div without Jquery (raw javascript) (The procedure for doing this with a would be more or less the same).

http://stackoverflow.com/q/27110441
has answer: http://stackoverflow.com/a/27111140
tagged with: ruby-on-rails
has body: I have a nested assets resource on my character resource. I've read all over SO that I should be able to use this.modelFor to get the associated parent model, but when I use it, my result is undefined. Where am I going wrong? models/character.js export default DS.Model.extend({ assets: DS.hasMany('asset', { async: true }), ... }); models/asset.js export default DS.Model.extend({ character: DS.belongsTo('character', { async: true }), ... }); router.js Router.map(function() { this.resource('characters', function () { this.route('show', { path: '/:character_id'} , function() { this.resource('assets', function() { }); }); }); ... }); routes/character/show.js export default Ember.Route.extend({ model: function(params) { return this.store.find('character', params.character_id); } }); routes/assets/index.js export default Ember.Route.extend({ model: function() { return this.modelFor('character').get('assets'); } }); templates/characters/show.hbs &lt;div class="row"&gt; &lt;h2&gt;{{name}}&lt;/h2&gt; {{#link-to 'assets' this}}Assets{{/link-to}} &lt;/div&gt; As the this.modelFor('character') returns undefined: Error while processing route: assets.index Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined My routes look as I'd expect, yielding me a /chararcters/:charater_id:/assets route:
has title: Another Dynamic Segments issue in Ember.js
type: Question
tagged with: javascript
score: 0
tagged with: ember.js
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/q/27069528
tagged with: regex
has title: Javascript RegEx for HH:mm string
has body: Currently I have 5 time ranges I need to create a regular expression for 1) &lt; 18:00 2) >= 18:00 &lt; 20:00 3) >= 20:00 &lt; 24:00 4) >= 24:00 &lt; 30:00 5) > 30:00 My string data is in string format "HH:mm" So as an e.g. 7AM would be 07:00 4:30PM would be 16:30 I've created the RegEx but cannot seem to figure out why they are not working *PRINT 'var regExCat1 = "^(0[0-9]|1[0-7]+):([0-5]?[0-9]+)$";' *PRINT 'var regExCat2 = "^(|1[8-9]+):([0-5]?[0-9]+)$";' *PRINT 'var regExCat3 = "^(2[0-3]+):([0-5]?[0-9]+)$";' *PRINT 'var regExCat4 = "^(2[4-9]+):([0-5]?[0-9]+)$";' *PRINT 'var regExCat5 = "^([3-9]?[0-9]+):([0-5]?[0-9]+)$";' Any ideas?
possible better answer: http://stackoverflow.com/a/27069595
has answer: http://stackoverflow.com/a/27069595
has comment: http://stackoverflow.com/comment/42652058
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/42652051
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/27159511
accepted answer: http://stackoverflow.com/a/27159511

http://stackoverflow.com/comment/42783601
type: AnswerComment
has text: addEventListener is not supported by IE8so there needs to be additional code to support IE8.
comment on: http://stackoverflow.com/a/27122187
score: 0
type: Comment

http://stackoverflow.com/comment/42614759
type: QuestionComment
has text: yes, it shows script error. Please use onchange instead of onclick. Based on dropdown selected value you can use `$(this).val()` selected item to process the functionality.
comment on: http://stackoverflow.com/q/27047999
score: 0
type: Comment

http://stackoverflow.com/a/27017169
answers question: http://stackoverflow.com/q/27017079
type: Answer
score: 0
upvote count: 1
downvote count: 1
has body: you have to trigger click event $( "#submitButton" ).trigger( "click" );
has comment: http://stackoverflow.com/comment/42559716

http://stackoverflow.com/comment/42531512
type: QuestionComment
has text: @MattBurland i was thinking it would start from the right, determine what is about to be stored, then where, not the other way around...i would think there is considerable savings in both time and space complexity
comment on: http://stackoverflow.com/q/27000386
score: 0
type: Comment

http://stackoverflow.com/comment/42594447
comment on: http://stackoverflow.com/a/27037143
score: 0
type: AnswerComment
has text: He wants a string of 14 - 16 alphanumeric characters. You have given him a random number between 14 & 16
type: Comment

http://stackoverflow.com/q/27068667
type: AnsweredQuestion
has body: I am trying to use Redirect::route() with my SPA ajax based app, but it is not working for some reason, I mean, the location of the page doesn't change to where it's supposed to be redirected. I am trying to use this when a user is logging in and logging out. Routes: Route::get('/', ['as' =&gt; 'root','uses' =&gt; 'HomeController@index']); Route::group(['before' =&gt; 'ajax'], function() { Route::get('/login', ['as' =&gt; 'login', 'uses' =&gt; 'UserController@login'])-&gt;before('guest'); Route::post('/login', ['as' =&gt; 'signin', 'uses' =&gt; 'UserController@signin']); Route::get('/logout', ['as' =&gt; 'logout', 'uses' =&gt; 'UserController@logout'])-&gt;before('auth'); }); Controller's methods: public function signin() { $user = [ 'email' =&gt; Input::get('email'), 'password' =&gt; Input::get('password') ]; if (Auth::attempt($user)) { //return Redirect::route('root')-&gt;with('flash_notice', 'You are successfully logged in!'); // not redirecting // I have to use a json response instead and refresh from the js function, but I am losing the notice return Response::json([ 'status' =&gt; true, 'notice' =&gt; 'You are successfully logged in!' ]); } return Response::json([ 'status' =&gt; false, 'error' =&gt; 'Your email or password combination was incorrect.' ]); } public function logout() { Auth::logout(); return Redirect::route('root')-&gt;with('flash_notice', 'You are successfully logged out.'); // not redirecting } As I commented, I can't use Redirect::route(). Instead I am forced to use window.location.replace() in my js functions when responding to a successfull ajax request: /* Login */ $(document).on('click', '#login-submit', function(event) { event.preventDefault(); $.post('/login', $('#login-form').serialize(), function(data) { if (data['status'] == true) { window.location.replace('/home/main'); } else { $('#error').removeClass('hidden'); $('#error').html(data['error']); } }); }); Doing it this way is not only undesirable for me, but I am also losing the noti…
score: 1
has answer: http://stackoverflow.com/a/27069546
type: Question
tagged with: laravel-4
linked to: http://stackoverflow.com/q/901115
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
answer count: 1
accepted answer: http://stackoverflow.com/a/27069546
upvote count: 1
has title: Laravel Redirect::route not working
tagged with: laravel

http://stackoverflow.com/a/64155166
has body: if (document.referrer == "") { window.open("index.php"); } else { window.history.go(-1); return false; }
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/113449025
answers question: http://stackoverflow.com/q/27046851

http://stackoverflow.com/comment/99131408
has text: in our case the offending variable was oa
type: AnswerComment
comment on: http://stackoverflow.com/a/27497700
score: 0
type: Comment

http://stackoverflow.com/comment/42674425
type: AnswerComment
comment on: http://stackoverflow.com/a/27082292
score: 0
type: Comment
has text: @sln Flubbed up and deleted my comment, but you're absolutely right, [\W] would have permitted `_` which is the goto character for trying to bypass something (that and `.`). In this case, I'm thinking good old `a-z` is the better option, with a variable to hold the character class for easiest change.

http://stackoverflow.com/comment/42610531
score: 0
type: Comment
has text: Ho yeah ! We could use other syntax more readable for the for, like forEach https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array/forEach
type: AnswerComment
comment on: http://stackoverflow.com/a/27045055

http://stackoverflow.com/comment/42718076
has text: Does your php return json ending with a semicolon? If so, that's not valid json
comment on: http://stackoverflow.com/q/27107333
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27032256
upvote count: 2
has comment: http://stackoverflow.com/comment/121343809
has comment: http://stackoverflow.com/comment/42588151
has comment: http://stackoverflow.com/comment/42588651
has body: You may use any one of the following: Use POST method instead of GET Use Ajax, with either POST or GET method Use encryption and decryption if you really wish to send secured way i.e dem/?p=ENCRYPTED_STRING. Here ENCRYPTED_STRING will have all the GET data
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/42594804
answers question: http://stackoverflow.com/q/27032119
score: 2

http://stackoverflow.com/comment/42589195
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/27034185
has text: If you need to select multiple elements, why not apply class for them?

http://stackoverflow.com/a/27293012
score: 25
has body: You can't. There are ways to deal with this condition, but none of them are simple. If you want, you have to tell user to do like this: How to geek From docs: Data stored using sessionStorage do not persist across browser tabs, even if two tabs both contain webpages from the same domain origin. In other words, data inside sessionStorage is confined to not just the domain and directory of the invoking page, but the browser tab in which the page is contained in. Contrast that to session cookies, which do persist data from tab to tab.
has comment: http://stackoverflow.com/comment/118122359
upvote count: 26
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27137562
has comment: http://stackoverflow.com/comment/125130565

http://stackoverflow.com/comment/42825607
has text: I updated the jsfiddle link and added replication steps, I made a stupid mistake with the original fiddle, FastClick didn't actually load.
type: Comment
comment on: http://stackoverflow.com/q/27012847
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42556831
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27015379
has text: Yes I know but I don't think that it's the problem

http://stackoverflow.com/comment/42626876
has text: http://jsfiddle.net/et2nLwfb/12/ This is the fiddle link and i want to add the search button in the top header ie. contact directory and it should search the data
comment on: http://stackoverflow.com/a/27055240
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/57453300
score: 1
type: Comment
has text: Remember: Be sure to check ajax called files for jQuery too.
type: AnswerComment
comment on: http://stackoverflow.com/a/30897746

http://stackoverflow.com/comment/42660455
type: Comment
comment on: http://stackoverflow.com/a/27074395
score: 1
type: AnswerComment
has text: like my mom answered for questions with unimportant answers: "it's there to make little boys ask why it's there"

http://stackoverflow.com/q/26998372
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/26998801
has comment: http://stackoverflow.com/comment/42527535
has comment: http://stackoverflow.com/comment/42527377
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42527933
has title: Why do checkbox property show as 'false' (not checked) when checked?
has comment: http://stackoverflow.com/comment/42527275
accepted answer: http://stackoverflow.com/a/26998801
has comment: http://stackoverflow.com/comment/42527320
tagged with: checkbox
has body: My issue is that I have created a working CodePen that demonstrates my idea perfectly. When implementing the code on the web server it stops working correctly. Specifically, my checkboxes should only allow one checkbox to be checked at a time. When the user attempts to check more than one, it unchecks the most recent, and gives an alert. It does this by checking for the "checked" property when the function is called. Depending on the property, a point is added or subtracted from the checkbox counter. Following, the checkbox counter is checked to ensure only one is selected - otherwise, it subtracts a point and unchecks the most reset checkbox. When demonstrating on the web server, clicking each box subtracts from the checkbox counter. This in turn only allows for a constantly downward counting counter - no check really going on. So my question: Why does the checkbox seem to ignore the fact that it is checked? HTML Ha Mwaha Hi Hello JS var DATA = { incomeChecks: 0 }; function incomeCheck(e) { $('h3').text("income check, launched. DATA: "+DATA.incomeChecks); var targ = "#"+e.target.id; if( $(targ).prop( "checked" ) ) { DATA.incomeChecks += 1; }else{ DATA.incomeChecks -= 1; } if( DATA.incomeChecks > 1 ) { $('h3').text($(targ).prop("checked")); $(targ).prop( "checked", false ); DATA.incomeChecks -= 1; alert("Please select only one."); } } $('#container input').on( "click", incomeCheck ); CodePen here. Project here. Go to the question that references income (page 12).
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42527767
has comment: http://stackoverflow.com/comment/42527867
possible better answer: http://stackoverflow.com/a/26998737
has answer: http://stackoverflow.com/a/26998737
type: Question

http://stackoverflow.com/q/27102274
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/27102382
accepted answer: http://stackoverflow.com/a/27102382
has comment: http://stackoverflow.com/comment/42708587
tagged with: highlight
has comment: http://stackoverflow.com/comment/42736363
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42709241
has comment: http://stackoverflow.com/comment/42718453
tagged with: evernote
has title: Highlight text in javascript like Evernote Web Clipper
upvote count: 1
downvote count: 1
type: Question
has body: My current solution is: Get selected html (include text and html tag), namely: selText highlightText = selText Find selText in innerHTML of the body or document (or the element which the mouse dragged in) Replace with highlightText But if the document is: a a a a a a and user selects the last a. My function will highlight the first or all a. Any suggestion? Thank you.
linked to: http://stackoverflow.com/q/8644428
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42579043
score: 0
comment on: http://stackoverflow.com/q/27022392
type: Comment
type: QuestionComment
has text: I don't see anything strange except for `UploadImage(url, fichier); ` which I'm guessing is a typo from copying and translating (?). At least on the client side... can't help you with php

google-chrome
tags question: http://stackoverflow.com/q/27022352
tags question: http://stackoverflow.com/q/27079920
tags question: http://stackoverflow.com/q/27031729
tags question: http://stackoverflow.com/q/27022527
tags question: http://stackoverflow.com/q/27085257
tags question: http://stackoverflow.com/q/27151488
tags question: http://stackoverflow.com/q/27103694
tags question: http://stackoverflow.com/q/27130878
tags question: http://stackoverflow.com/q/27039308
tags question: http://stackoverflow.com/q/27030839
tags question: http://stackoverflow.com/q/27139703
tags question: http://stackoverflow.com/q/27040297
tags question: http://stackoverflow.com/q/27034026
tags question: http://stackoverflow.com/q/27151404
tags question: http://stackoverflow.com/q/27128492
tags question: http://stackoverflow.com/q/27048881
tags question: http://stackoverflow.com/q/27083707
tags question: http://stackoverflow.com/q/27028239
tags question: http://stackoverflow.com/q/27131801
tags question: http://stackoverflow.com/q/27130563
tags question: http://stackoverflow.com/q/27026368
tags question: http://stackoverflow.com/q/27078766
tags question: http://stackoverflow.com/q/27072244
tags question: http://stackoverflow.com/q/26992496
tags question: http://stackoverflow.com/q/27111414
tags question: http://stackoverflow.com/q/27014339
tags question: http://stackoverflow.com/q/27062795
tags question: http://stackoverflow.com/q/27031558
tags question: http://stackoverflow.com/q/26999464
tags question: http://stackoverflow.com/q/27055915
tags question: http://stackoverflow.com/q/27097974
tags question: http://stackoverflow.com/q/27114087
tags question: http://stackoverflow.com/q/27126686
tags question: http://stackoverflow.com/q/27149282
tags question: http://stackoverflow.com/q/27098910
tags question: http://stackoverflow.com/q/27007911
tags question: http://stackoverflow.com/q/27043943
tags question: http://stackoverflow.com/q/27137896
tags question: http://stackoverflow.com/q/27102224
tags question: http://stackoverflow.com/q/27057816
type: Tag
tags question: http://stackoverflow.com/q/27084795
tags question: http://stackoverflow.com/q/27004569
tags question: http://stackoverflow.com/q/27117750
tag name: google-chrome
tags question: http://stackoverflow.com/q/27071752
tags question: http://stackoverflow.com/q/27137194
tags question: http://stackoverflow.com/q/27138132
tags question: http://stackoverflow.com/q/27105664
tags question: http://stackoverflow.com/q/27140190
tags question: http://stackoverflow.com/q/27040128
tags question: http://stackoverflow.com/q/27057889
tags question: http://stackoverflow.com/q/27014005
tags question: http://stackoverflow.com/q/27129078
tags question: http://stackoverflow.com/q/27127222
tags question: http://stackoverflow.com/q/27021674
tags question: http://stackoverflow.com/q/27131822
tags question: http://stackoverflow.com/q/27047972
tags question: http://stackoverflow.com/q/27126269
tags question: http://stackoverflow.com/q/27064696
tags question: http://stackoverflow.com/q/27087019
tags question: http://stackoverflow.com/q/27141890
tags question: http://stackoverflow.com/q/27118935
tags question: http://stackoverflow.com/q/27031663
tags question: http://stackoverflow.com/q/27136260

http://stackoverflow.com/a/27027164
has body: There are a few things wrong. txt needs to be initialized to an empty string because you are appending to it. x has no property named elements; rather it is the array of elements returned by getElementsByClassName(), in this case they are &lt;img&gt; elements which have a src property. I am not sure why you are using the &lt;object&gt; tags since you are building an HTML string in your loop. Give this a shot: var x; var i; var txt = ""; function foo() { x = document.getElementsByClassName("gallery"); for (i = 0; i &lt; x.length; i++) { //txt = txt + x.elements[i].src + "&lt;br&gt;"; txt = txt + x[i].src.replace(/^.*[\\\/]/, '') + "&lt;br/&gt;"; // use this regex to get only the filename as in your example } //document.getElementById("txt").innerHTML = '&lt;object type="text/html" data=txt &gt;&lt;/object&gt;'; document.getElementById("txt").innerHTML = txt; } function load_test() { document.getElementById("content").innerHTML = '&lt;object type="text/html" data="test.html" &gt;&lt;/object&gt;'; }
downvote count: 0
has comment: http://stackoverflow.com/comment/42577775
type: Answer
answers question: http://stackoverflow.com/q/27026872
upvote count: 1
score: 1

http://stackoverflow.com/comment/42736693
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27116962
has text: This seems to work in IRB, but when I return this data as JSON via Rails controller, the strings turn into black diamond characters (when I console.log the JavaScript strings). Thus, when I use decocdeURIComponent, it has no effect.

http://stackoverflow.com/a/26993313
has comment: http://stackoverflow.com/comment/42660811
type: Answer
answers question: http://stackoverflow.com/q/26992318
has comment: http://stackoverflow.com/comment/42524189
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42524347
has body: You are looking for something you can put in the configuration you pass to RequireJS that would do what you want. There is no analogue to shim for modules that call define. However, what you could do is add the deps option to your configuration: deps: ['module', 'dep1', 'dep2', 'dep3'] This will tell RequireJS to start loading immediately your module and the dependencies. You will have to maintain this list yourself but this would be true with shim too. Otherwise, you can do what kryger suggested in a comment: use r.js to build module into a single bundle that contains it and all of its dependencies. Whenever module is loaded, all of its dependencies are loaded at the same time. This is more efficient than using deps but might make things slightly more complicated if you ever need to load any of the dependencies by themselves. You'd have to use the runtime option bundles to tell RequireJS where these modules are. And just like deps you'd have to maintain this list yourself.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/26992318

http://stackoverflow.com/comment/42605235
has text: Yeah I just found some code that was very similar to this. Thanks
comment on: http://stackoverflow.com/a/27042748
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42660049
type: QuestionComment
comment on: http://stackoverflow.com/q/27074135
score: 0
has text: Have a look at https://github.com/gemgento/rails_script. This gem is a way that you can use page specific coffeescript without including everything into each page view. There are several different ways of doing page specific JS.
type: Comment

http://stackoverflow.com/comment/42753587
type: Comment
type: QuestionComment
score: 1
has text: I think you have to be clearer; the above code would return an object, unless `test` is not defined, in which case you would see an error.
comment on: http://stackoverflow.com/q/27127065

http://stackoverflow.com/q/27122035
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27122171
has comment: http://stackoverflow.com/comment/42745145
has comment: http://stackoverflow.com/comment/42744998
type: UnansweredQuestion
has body: Is there a library or native javascript way for calculating the amount of data that was send and received in bytes by visiting a site? e.g. How do I measure the size of a get request in bytes?
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/890221
has title: How to measure data consumed on a site with javascript
score: -1
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/27064765
type: Answer
answers question: http://stackoverflow.com/q/27064287
accepted answer of: http://stackoverflow.com/q/27064287
score: 5
upvote count: 5
type: AcceptedAnswer
downvote count: 0
has body: Removing position:absolute; from the footer in the css appears to work. Perhaps consider having it set to absolute at wider screen sizes using media queries if having position:absolute is absolutely (pardon the pun) necessary. I provided a snippet with the absolute positioning removed, as well as the potential addition to a media query, which is commented out, but there to demonstrate. /* Sticky footer styles -------------------------------------------------- */ html { position: relative; min-height: 100%; } body { /* Margin bottom by footer height */ margin-bottom: 60px; } footer { width: 100%; /* Set the fixed height of the footer here */ height: 340px; background-color: #f5f5f5; } /* Custom page CSS -------------------------------------------------- */ /* Not required for template or sticky footer method. */ body &gt; .container { padding: 60px 15px 0; } .container .text-muted { margin: 20px 0; } footer &gt; .container { padding-right: 15px; padding-left: 15px; } code { font-size: 80%; } /*! * Start Bootstrap - Freelancer Bootstrap Theme (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ body { overflow-x: hidden; } header { text-align: center; color: #fff; background: #18bc9c; } header .container { padding-top: 100px; padding-bottom: 50px; } @media(min-width:768px) { header .container { padding-top: 200px; padding-bottom: 69px; } header .intro-text .name { font-size: 4.75em; } header .intro-text .skills { font-size: 1.75em; } /* ****Optional**** footer{ position:absolute; bottom:0px; }*/ } @media(min-width:768px) { .navbar-fixed-top { padding: 25px 0; -webkit-transition: padding .3s; -moz-transition: padding .3s; transition: padding .3s; } .navbar-fixed-top .navbar-brand { font-size: 2em; -webkit-transition: all .3s; -moz-transition: all .3s; transition: all .3s; } .navbar-fixed-top.navbar-shrink { padding: 10px 0; } .navbar-fixed-top.navbar-shrink .navbar-brand { font-size…

http://stackoverflow.com/a/27134178
has comment: http://stackoverflow.com/comment/42767079
upvote count: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/27134112
has comment: http://stackoverflow.com/comment/42766972
answers question: http://stackoverflow.com/q/27134112
type: AcceptedAnswer
has body: You're using the identity operator. You're not assigning a value. cost === (cost + parseInt(this.items[i].price)); Should be: cost += parseInt(this.items[i].price); And the rest: var basket = {}; basket.items = [{price:10}, {price:"10"} /*,{price:"nan"}*/]; basket.costCalculate = function () { var cost = 0; for (var i = 0; i < this.items.length; i++) { // Breaks for NaN values cost = (cost + parseInt(this.items[i].price)); } return cost; }; basket.print = function () { var basketCon = document.getElementById("basket"), html = ""; basketCon.innerHTML = " Basket - Cost: " + this.costCalculate() + " "; for (var i = 0; i < this.items.length; i++) { html += ' '; for (var prop in this.items[i]) { if (prop != "id") { html += ' ' + prop + ': ' + this.items[i][prop] + ' '; } } html += ' '; } basketCon.innerHTML += html; }; function init() { //shop.print(); basket.print(); } window.onload = init; Fiddle
score: 0
has comment: http://stackoverflow.com/comment/42766945
type: Answer

http://stackoverflow.com/a/26997880
answers question: http://stackoverflow.com/q/26997409
has comment: http://stackoverflow.com/comment/42526555
type: Answer
has body: if (document.getElementsByTagName('button')[0].onmousedown) You are missing the s after elements. It returns an array, Hence the [0]. If this isn't the first button on the page than this won't work, Use the code below if there's more than 1 button, var buttons=document.getElementsByTagName('button'); for(var i=0;i &gt; buttons.length; i++){ buttons[i].addEventlistener("mousedown", MyFunction); } This will call a function called MyFunction on the press of any buttons
score: 0

nightwatch.js
tags question: http://stackoverflow.com/q/27050189
tag name: nightwatch.js
type: Tag
tags question: http://stackoverflow.com/q/27116103
tags question: http://stackoverflow.com/q/27070361

http://stackoverflow.com/a/27012770
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27012576
has body: In mymodule.js as the error states you need a ); after here: var fs = require('fs') var path = require('path') module.exports = function(dir, extension, callback){ fs.readdir(dir, function(error, files){ if(error) return callback(error) else { var res = files.filter(function(file){ return path.extname(file).slice(1) === extension;}); callback(null, res) } }); /* here */ }
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42566921

http://stackoverflow.com/q/27047365
tagged with: jspdf
has answer: http://stackoverflow.com/a/47551154
favorite count: 0
has answer: http://stackoverflow.com/a/28896492
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/49699224
has answer: http://stackoverflow.com/a/36793937
has title: jsPDF: addHTML method not working
score: 3
has answer: http://stackoverflow.com/a/44024043
upvote count: 3
has answer: http://stackoverflow.com/a/30826778
has body: I created html table and tried to generate pdf using jsPDF. I have used following code: var pdf = new jsPDF('p','pt','a4'); pdf.addHTML(document.getElementById('pdfTable'),function() { console.log('pdf generated'); }); pdf.save('pdfTable.pdf'); I am getting blank pdf file. Am I doing anything wrong? Here is a plunker for this. Working demo of jsPDF with addHTML function.
type: Question
linked to: http://stackoverflow.com/q/28807755
has answer: http://stackoverflow.com/a/29022670
downvote count: 0
tagged with: javascript
answer count: 6

drupal
type: Tag
tags question: http://stackoverflow.com/q/27136471
tag name: drupal
tags question: http://stackoverflow.com/q/27141094

http://stackoverflow.com/comment/42540662
score: 2
has text: Scope of `map` variable... define `var map` out of function, make it global. In the function just use `map = new google.maps.Map(...)`.
comment on: http://stackoverflow.com/q/27005706
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27004569
answer count: 1
has comment: http://stackoverflow.com/comment/42538803
accepted answer: http://stackoverflow.com/a/27022206
has title: Why example code with two variable names in for..of loop does not work?
has comment: http://stackoverflow.com/comment/42538426
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42550227
tagged with: google-chrome
type: Question
tagged with: ecmascript-6
has body: Why example code with two variable names in for..of loop does not work? Is it so because ECMAScript 6 is still in beta mode? Here is the code: let arr = ['foo', 'bar', 'baz']; for (let [index,element] of arr.entries()) { console.log(index + '. ' + element); } The error: Uncaught SyntaxError: Unexpected identifier ('[', of course) My browser: Google Chrome 39.0.2171.65 (64-bit)
has answer: http://stackoverflow.com/a/27022206
tagged with: javascript
has comment: http://stackoverflow.com/comment/42538417
score: 0

http://stackoverflow.com/a/27040368
upvote count: 2
answers question: http://stackoverflow.com/q/27034771
accepted answer of: http://stackoverflow.com/q/27034771
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42599995
has body: According to the json structure of the the input data in question, using the following line for x-axis helped: svg.append("g") .attr("class", "x axis") .attr("id", "xaxis") .attr("transform", "translate(0," + height + ")") .call(xAxis) .selectAll('text') .text(function (d,i) { return data.categories[i].name; })
type: Answer
score: 2

http://stackoverflow.com/comment/42693626
has text: Also, tried using `encodeURIComponent` to encode the image path, and it was essentially the same as `..%2F`
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27093344

http://stackoverflow.com/comment/42537629
has text: In the first file is the html, the css is included using . thanks
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27003355
score: 0

http://stackoverflow.com/comment/42653699
has text: i am trying to find a way to attach the viewsource, after the pageload and after a click_event of a button...
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27069169

http://stackoverflow.com/q/27100030
has title: jquery dialog is not popping up above all elements
tagged with: dialog
upvote count: 1
type: Question
has body: The jquery dialog is not popping up above all elements.First thing is I have pre-built framework which contains lot of sections. In one of the sections, I coded separate jsp page to display some graph and linked that jsp page in that section. On a button click in that jsp page, I am displaying one dialog. Below is the code snippet. &lt;body&gt; &lt;div id="container" style="min-width: 320px; height: 370px; margin: 0 auto"&gt;&lt;/div&gt; &lt;div id="hugedialog" title="dialog"&gt;&lt;/div&gt; &lt;script type="text/javascript"&gt; $(function() { $("#hugedialog").dialog({ autoOpen : false, modal : true, show : "blind", hide : "blind", width: 900, height: 700 }); }); function popupdlg() { $("#hugedialog").dialog("open"); } &lt;/script&gt; &lt;/body&gt; So, I am calling the above function popupdlg when button is clicked. But the thing is if I open that page independently, it pops up correctly. When I embed this in pre-built section and click the button, the pop up displays only in that section rather than popping up over all the elements. I tried below things, but no luck 1).ui-dialog { z-index: 1000 !important ;} 2) Tried movetotop but still didn't work Have been trying every possible answer, but couldn't succeed. Can someone please help how to overcome this issue such that dialog should display top of all the elements in that page? One idea comes to my mind is like I have to bind this div to top element in the page. So, by any chance can I get top reference and attach the dialog div to it from the current jsp page itself?
tagged with: javascript
tagged with: jquery
answer count: 3
linked to: http://stackoverflow.com/q/2006134
downvote count: 0
has answer: http://stackoverflow.com/a/27100124
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/78647931
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27100154

http://stackoverflow.com/a/27210355
accepted answer of: http://stackoverflow.com/q/27122842
answers question: http://stackoverflow.com/q/27122842
type: Answer
has body: I mixed filelist and folderlist together causing the app to crash. Creating functions for each process was the solution. var sourceFolder = Windows.ApplicationModel.Package.current.installedLocation; var destinationFolder = Windows.Storage.ApplicationData.current.localFolder; copyDirectories(sourceFolder,destinationFolder); function copyFiles(source, destination) { source.getFilesAsync().done(function (fileList) { if (fileList.size &gt;= 1) { fileList.forEach(function (subFile) { subFile.copyAsync(destination, subFile.name, Windows.Storage.NameCollisionOption.replaceExisting).done(function () { }); }); } }); } function copyDirectories(source,destination){ source.getFoldersAsync().done(function (folderList) { if(folderList.size&gt;1){ folderList.forEach(function (subFolder) { destination.createFolderAsync(subFolder.name).done(function (newFolder) { copyFiles(subFolder, newFolder); copyDirectories(subFolder,newFolder); }); }); } }); }
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/27081949
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42673984
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27082450
has comment: http://stackoverflow.com/comment/42673883
has comment: http://stackoverflow.com/comment/42673807
tagged with: javascript
has title: Node.js respond with asynchronous data
answer count: 1
downvote count: 0
score: 1
tagged with: asynchronous
accepted answer: http://stackoverflow.com/a/27082450
tagged with: callback
has body: Recently I started learning a little bit about Node.js and it's capabilities and tried to use it for some web services. I wanted to create a web service which will serve as a proxy for web requests. I wanted my service to work that way: User will access my service -> http://myproxyservice.com/api/getuserinfo/tom My service will perform request to -> http://targetsite.com/user?name=tom Responded data would get reflected to the user. To implement it I used the following code: app.js: var express = require('express'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); var proxy = require('./proxy_query.js') function makeProxyApiRequest(name) { return proxy.getUserData(name, parseProxyApiRequest); } function parseProxyApiRequest(data) { returned_data = JSON.parse(data); if (returned_data.error) { console.log('An eror has occoured. details: ' + JSON.stringify(returned_data)); returned_data = ''; } return JSON.stringify(returned_data); } app.post('/api/getuserinfo/tom', function(request, response) { makeProxyApiRequest('tom', response); //response.end(result); }); var port = 7331; proxy_query.js: var https = require('https'); var callback = undefined; var options = { host: 'targetsite.com', port: 443, method: 'GET', }; function resultHandlerCallback(result) { var buffer = ''; result.setEncoding('utf8'); result.on('data', function(chunk){ buffer += chunk; }); result.on('end', function(){ if (callback) { callback(buffer); } }); } exports.getUserData = function(name, user_callback) { callback = user_callback options['path'] = user + '?name=' + name; var request = https.get(options, resultHandlerCallback); request.on('error', function(e){ console.log('error from proxy_query:getUserData: ' + e.message) }); request.end(); } app.listen(port); I wish I didn't screwed this code because I replaced some stuff to fit my example. Anyway, the problem is that I want to post the response to the us…
favorite count: 0
tagged with: proxy
tagged with: node.js

http://stackoverflow.com/a/27091860
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 6
upvote count: 6
has body: angularModalService requires bootstrap js. Call the following file in your index.html file and try.
has comment: http://stackoverflow.com/comment/42690498
accepted answer of: http://stackoverflow.com/q/27091757
answers question: http://stackoverflow.com/q/27091757
has comment: http://stackoverflow.com/comment/42690222
has comment: http://stackoverflow.com/comment/42690270

http://stackoverflow.com/q/27115890
answer count: 0
downvote count: 0
has title: Is there a technical limitation that prevents a pure javascript client (running in the browser) from using the Feedly Cloud API?
type: Question
tagged with: javascript
has body: I'd like to use the Feedly Cloud API, but I'm hoping to build my app in a pure client-side fashion. From what I can see on the Feedly developer docs, there is no client-side JavaScript library available to access the API. This seems strange to me, since the API is RESTful and serializes to JSON. Why is there no pure JavaScript client for the Feedly Cloud API that runs inside the browser? Is there some kind of technical limitation caused by OAuth or the design of the Feedly API that prevents a client from connecting strictly through the end user's browser? If it is simply an issue of "nobody has built one yet", that's fine. I just want to make sure that I'm not doing something crazy before I write a JS client.
upvote count: 2
has comment: http://stackoverflow.com/comment/42945240
tagged with: feedly
tagged with: client-side
favorite count: 0
tagged with: oauth
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/42848016

http://stackoverflow.com/comment/42713078
type: Comment
comment on: http://stackoverflow.com/a/27104583
has text: The error is *datatables warning:table id=example-ajax error.for more information about this error,please see http://datatables.net/tn/7*
type: AnswerComment
score: 0

http://stackoverflow.com/q/27143352
score: 0
answer count: 1
tagged with: c#
linked to: http://stackoverflow.com/q/10045419
tagged with: javascript
tagged with: user-controls
has body: I have a UserControl (with FileUpload) included on a Master Page as follows: Master Page &lt;uc:uploadFiles ID="UC1" runat="server"/&gt; uploadFiles.ascx &lt;script type="text/javascript"&gt; function ValidateUpload() { var FileUpload_function = document.getElementById('myfile'); if (FileUpload_function.value == '') { return false; } else { //do stuff } return true; } &lt;/script&gt; &lt;div id="div_FileUpload" class="FileUpload_content" runat="server"&gt; &lt;asp:FileUpload ID="myfile" class="FileUpload" runat="server" /&gt; &lt;asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="myfile" ClientValidationFunction="ValidateUpload" /&gt; &lt;/div&gt; When I run the page I get the following error caused by the CustomValidator: Unable to get property 'value' of undefined or null reference. My guess is that the FileUpload value is validated before the entire page is rendered because when I delete the UserControl and move the codes to the MasterPage directly, the CustomValidator works fine. How can I solve the problem?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42783294
accepted answer: http://stackoverflow.com/a/27143492
has comment: http://stackoverflow.com/comment/42783320
tagged with: asp.net
type: Question
has answer: http://stackoverflow.com/a/27143492
has title: Unable to get property 'value' of FileUpload in a UserControl using javascript

http://stackoverflow.com/a/27123466
has comment: http://stackoverflow.com/comment/42752337
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27123393
has comment: http://stackoverflow.com/comment/42752623
type: Answer
has comment: http://stackoverflow.com/comment/42752357
has comment: http://stackoverflow.com/comment/42752674
has comment: http://stackoverflow.com/comment/42800916
answers question: http://stackoverflow.com/q/27123393
upvote count: 1
has comment: http://stackoverflow.com/comment/42753140
score: 1
has body: Two solutions here : 1 : If you don't have any binding on other elements of the form, you may simply do a replace of the HTML : $('form').html(function(_,h){ var t = "Please select country for delivery"; return h.replace(t, '&lt;span&gt;'+t+'&lt;/span&gt;'); }); 2 : If you have bindings, you can't do that as it would delete all elements, you need to do it cleanly, not modifying other elements. You may use a library for that like my own groumf : Groumf.replaceTextWithHTMLInHTML(document.body, t, function(s){ return '&lt;span&gt;'+t+'&lt;/span&gt;' });

http://stackoverflow.com/a/27041998
type: Answer
answers question: http://stackoverflow.com/q/27041711
has comment: http://stackoverflow.com/comment/42604441
has comment: http://stackoverflow.com/comment/42603282
has comment: http://stackoverflow.com/comment/42604017
has comment: http://stackoverflow.com/comment/42603398
has comment: http://stackoverflow.com/comment/42604605
has comment: http://stackoverflow.com/comment/42605275
has body: You have spaces in ALL of your post parameters: $fname = $_POST['fname ']; ^-- That space DOES count for naming purposes, and is NOT the same as 'fname'. The keys in _POST/_GET must match EXACTLY what you have in the html: &lt;input type="text" name="foo"&gt; -&gt; $_POST['foo'] // note the LACK of a space &lt;input type="text" name="bar "&gt; -&gt; $_POST['bar '] // note the space
has comment: http://stackoverflow.com/comment/42603134
has comment: http://stackoverflow.com/comment/42604056
has comment: http://stackoverflow.com/comment/42604640
has comment: http://stackoverflow.com/comment/42603121
score: 0
has comment: http://stackoverflow.com/comment/42603157

http://stackoverflow.com/q/27090124
has title: node.js dynamic javascript execution performance
downvote count: 0
answer count: 1
tagged with: awk
has body: I'd like to execute an arbitrary - user supplied - piece of javascript code on each line of a file. I created a simple node command line application, that will - as an example - just take each line and will output its length: #!/usr/bin/env node // eachline.js - execute some js per line in a file var fs = require('fs'), readline = require('readline'); vm = require('vm'); var args = process.argv.slice(2); if (args.length &lt; 1) { console.log("Usage: eachline.js FILENAME") process.exit(code=1) } var rd = readline.createInterface({ input: fs.createReadStream(args[0]), output: process.stdout, terminal: false }); var context = vm.createContext({}); // this snippet should be user supplied, arbitrary javascript var script = vm.createScript('output = input.length'); rd.on('line', function(line) { context.input = line; script.runInContext(context); console.log(context.output); }); The performance is not optimal. For a file with 1 million lines, it takes several minutes: $ time ./eachline.js 1M.txt &gt; /dev/null real 4m14.366s user 4m12.200s sys 0m4.545s With awk this simple operation takes about five seconds. With a similar program, that executes arbitrary javascript a bit more than ten seconds. I haven't worked with node before, so the program above is my first uneducated guess at a solution. How could I improve performance? Edit: Above source code in a gist: https://gist.github.com/miku/31864156938fcd0c8430 PS. Goal is to have a program that can run arbitrary javascript on each line of a file fast.
has comment: http://stackoverflow.com/comment/42688334
favorite count: 0
has comment: http://stackoverflow.com/comment/42689468
upvote count: 2
has comment: http://stackoverflow.com/comment/42687312
tagged with: node.js
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27092047
tagged with: performance
tagged with: file
has comment: http://stackoverflow.com/comment/42687344
type: Question
has comment: http://stackoverflow.com/comment/42687320
has comment: http://stackoverflow.com/comment/42687536
has comment: http://stackoverflow.com/comment/42687246
has comment: http://stackoverflow.com/comment/42688989
has comment: http://stackoverflow.com/comment/42687374
tagged with: javascript
has comment: http://stackoverflow.com/comment/42688016
accepted answer: http://stackoverflow.com/a/27092047
has comment: http://stackoverflow.com/comment/42687459
has comment: http://stackoverflow.com/comment/42689608

http://stackoverflow.com/q/26999107
tagged with: angularjs
has answer: http://stackoverflow.com/a/27017847
has comment: http://stackoverflow.com/comment/42529041
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/42528878
tagged with: bindonce
possible better answer: http://stackoverflow.com/a/27690704
type: Question
has comment: http://stackoverflow.com/comment/42528969
upvote count: 2
has title: Angular BindOnce, what can prevent it to work?
accepted answer: http://stackoverflow.com/a/27017847
answer count: 2
has body: We're currently migrating to Angular 1.3 while testing the bindOnce functionality I encountered this problem: the exact piece of code... Controller Code: this.value = 'value'; this.clickTest = function () { this.value = 'changed'; }; HTML: //cm is the ControllerAs variable defined in the route &lt;p&gt; &lt;/p&gt; &lt;button ng-click="cm.clickTest()"&gt; CLICK &lt;/button&gt; ...works fine in a controller but does not in another one - in the working controller the click event will not change the value, while in the non-working one it will change the value - (the code is exactly the same in both controllers, routing changes and apparently something else changes too). Both controllers were emptied in order to have a better testing environment. Now what I'd like to know is: is there something that can prevent the bindOnce functionality to work as expected? Is there something that force angular code to not delete the watcher or to enable it again despite the correct syntax (::) has been used in the view? I am working with Angular 1.3.2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27690704

http://stackoverflow.com/comment/42622781
type: QuestionComment
has text: So to use it I should start off with some thing like function pauseResumeCode(function() { ...... })();
score: 0
comment on: http://stackoverflow.com/q/27052249
type: Comment

http://stackoverflow.com/comment/42794251
has text: Somehow I managed to made a solve of the problem I'm using page.viewportSize property to set the height and width as page.viewportSize = { width: 1920, height: 1080 }; now i'm getting a untrimmed image the rest will i perform using photoshop
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27147980
type: Comment

http://stackoverflow.com/comment/42677259
type: QuestionComment
type: Comment
has text: have you considered underscore's filters and chaining?
comment on: http://stackoverflow.com/q/27084018
score: 0

http://stackoverflow.com/q/27115950
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27116023
possible better answer: http://stackoverflow.com/a/27115992
favorite count: 0
accepted answer: http://stackoverflow.com/a/27116023
has body: im making a website and i want to protect my downloads so people don't download all the time. I need a code that makes a button appear after 5 seconds. I also need the codes to the scripts (Like JQuery) because i cant find them anywhere on the web Or its just that i cant find them because im from holland? Please i need help :) I found one from JSFiddle but it didnt have the codes of JQuery in it and i really dont know where to find them. By the way im using bootstrap! http://getbootstrap.com/
score: -3
tagged with: php
type: AnsweredQuestion
downvote count: 3
tagged with: http
has answer: http://stackoverflow.com/a/27115992
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has title: How do i make a download button that appears after 5 seconds with countdown

http://stackoverflow.com/q/27131495
has comment: http://stackoverflow.com/comment/42762369
linked to: http://stackoverflow.com/q/83073
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27132497
accepted answer: http://stackoverflow.com/a/27132497
has title: Position DOM elements without CSS
score: 1
has comment: http://stackoverflow.com/comment/42762412
has comment: http://stackoverflow.com/comment/42762165
has comment: http://stackoverflow.com/comment/42762023
has comment: http://stackoverflow.com/comment/42761912
has comment: http://stackoverflow.com/comment/42764030
type: Question
has body: There are several methods for (absolute) positionning of a DOM element in a HTML page : style directly in the CSS with top / left : position: absolute; top: 100px; left: 50px; style directly in the CSS with transform: transform: translate(50,100) and of course, CSS style modification with Javascript : element.style.top = "100px"; ... But these are all CSS methods. Question: Is it possible to set DOM elements' position without CSS? (for example thanks to some methods that were available in browsers before CSS became famous or simply before CSS was added to browsers) Note: This question is for pure knowledge / browsers' history / culture. I won't necessarily want to use it.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42762310
has comment: http://stackoverflow.com/comment/42762039
has comment: http://stackoverflow.com/comment/42762240
upvote count: 2
has comment: http://stackoverflow.com/comment/42762468
possible better answer: http://stackoverflow.com/a/27131721
has comment: http://stackoverflow.com/comment/42762219
answer count: 2
has comment: http://stackoverflow.com/comment/42761934
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42762710
has answer: http://stackoverflow.com/a/27131721
has comment: http://stackoverflow.com/comment/42761811
has comment: http://stackoverflow.com/comment/42762068
has comment: http://stackoverflow.com/comment/42761929
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27141571
has comment: http://stackoverflow.com/comment/42783832
answers question: http://stackoverflow.com/q/27140738
score: 0
has body: I'm pretty sure you need a printer app or at least AirPrint enabled on your iPad/network. I don't think iPads come with native printing facilities bundled into the OS browser therefore the browser doesn't know what to do with a print request. Additionally I'm not sure that you'll be able to invoke a print call from the browser without some user actions. http://support.apple.com/en-us/HT201311 http://support.apple.com/en-us/HT6220
type: Answer

http://stackoverflow.com/q/27138174
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27138386
has answer: http://stackoverflow.com/a/27138246
has body: I like to use javascript to submit a form. I'm new with javascript and I don't know how to simplify the next code: (This code is working but I think it's possible to simplify): <?php $actual_link = "$_SERVER[REQUEST_URI]"; ?> <input type="hidden" name="gobackto" value="<?php echo htmlspecialchars($actual_link);?>"> <input type="hidden" name="gobackto" value="<?php echo htmlspecialchars($actual_link);?>"> <input type="hidden" name="gobackto" value="<?php echo htmlspecialchars($actual_link);?>"> <input type="hidden" name="gobackto" value="<?php echo htmlspecialchars($actual_link);?>"> <?php echo $_COOKIE["cbccountry"]; ?> Germany Italy United States Canada Thank you for your help.
has title: Simplifying a Javascript Form Submit
has answer: http://stackoverflow.com/a/27138380
accepted answer: http://stackoverflow.com/a/27138380
type: AnsweredQuestion
tagged with: form-submit
has comment: http://stackoverflow.com/comment/42802964
has comment: http://stackoverflow.com/comment/42775672
tagged with: forms
possible better answer: http://stackoverflow.com/a/27138386
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42774429

http://stackoverflow.com/a/27082602
score: 0
type: Answer
has body: Check out this example, which uses d3.layout.force(). A force layout's data structure involves 2 arrays: an array of nodes [{id: 1}, {id: 2}, {id: 3}, {id: 4}]` and array of links [ { source: {id: 1}, target: {id: 2} }, { source: {id: 1}, target: {id: 3} }, { source: {id: 2}, target: {id: 4} } ] The objects used in the nodes array and links array should be the same objects. I.e, in the example above, nodes[0] == links.source[0] should be true.
has comment: http://stackoverflow.com/comment/42692309
answers question: http://stackoverflow.com/q/27081990

http://stackoverflow.com/comment/58447624
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27072023
has text: Gotta love the downvotes on this ..where has the helpful community of the old days gone?
score: 0

http://stackoverflow.com/comment/62746394
type: Comment
has text: @ArtjomB. I have stumbled on this question looking for the same thing as the OP, the problem cannot be resolved with a simple HttpXmlRequest like yours. We can clearly see that nightmare first logs in before trying to fetch the file. Using a basic (or 'nude') GET request would not be able to obtain the file... I think one should take all cookies from nightmare and use them correctly.
comment on: http://stackoverflow.com/a/27114340
type: AnswerComment
score: 0

http://stackoverflow.com/a/27429357
type: Answer
has body: You need to return js files for yep. When true, use a callback to initialize the functions. Modernizr.load([{ test : Modernizr.touch, yep : ['FastClick.js', 'Hammer.js'], callback: function(){ // yepnope creates a key of the basename resource loaded 'FastClick.js': function() { fastClickURL(); }, 'Hammer.js': function() { hammerURL(); }, } }]);
answers question: http://stackoverflow.com/q/26993207
accepted answer of: http://stackoverflow.com/q/26993207
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/27024233
score: 9
type: AcceptedAnswer
upvote count: 10
downvote count: 1
has body: Browsers have a native method for accomplishing this: document.querySelectorAll( ".div a" ); You can retrieve only the first match with querySelector.
answers question: http://stackoverflow.com/q/27024211
type: Answer
accepted answer of: http://stackoverflow.com/q/27024211
has comment: http://stackoverflow.com/comment/42572426
has comment: http://stackoverflow.com/comment/42572607

http://stackoverflow.com/a/27000545
answers question: http://stackoverflow.com/q/27000351
type: Answer
accepted answer of: http://stackoverflow.com/q/27000351
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42542774
has body: The most likely reason your feature is failing in IE has to do with the transform-style: preserve-3d; rule applied to figure#spinner1. IE support for CSS3 3D features has improved, but according to caniuse IE10 and 11 still do not support that particular feature of the 3D transform API. When I remove the rule from your CSS, I can see that the whole 3d layout fails when that feature is missing. There may be another way of nesting and formatting your 3d objects that will achieve the same visual effect without 'preserve-3d', but it will likely be much more complicated than the implementation you have now. Another option you might consider is using threejs and WebGL to handle your 3d carousel when necessary CSS 3D attributes are not available in the target browser.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27091390
has comment: http://stackoverflow.com/comment/42690351
has comment: http://stackoverflow.com/comment/42689576
downvote count: 0
has answer: http://stackoverflow.com/a/27091545
tagged with: javascript
tagged with: jquery
has body: I have a nested list. One element inside that list contains a class called "special". This particular node can be present anywhere within the nested list. E.g., 1 2 3 4 5 6 When I click a button, I need to apply two classes, say "up" and "down" to the nodes above and below the special node. So in the case of above example, the resulting list should look like this: 1 2 3 4 5 6 As you can see, since my list is a nested list and the special node can be present at any position, hence the "up" and "down" may be required to be placed inside some other as well. MY IDEA My initial idea was to do DOM traversing but it soon became very complicated. Next I thought I will create an array of all inside my list ($("#mylist").find ("li")), then find out which of these has "special" class (hasClass("special")) and once I know that array index where "special" occurs, i will do +1, -1 to get the lower and upper nodes. But I don't know how to do this..
has comment: http://stackoverflow.com/comment/42689546
has comment: http://stackoverflow.com/comment/42689481
has comment: http://stackoverflow.com/comment/42689799
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/42690506
favorite count: 0
has answer: http://stackoverflow.com/a/27092000
has comment: http://stackoverflow.com/comment/42689447
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/27091545
possible better answer: http://stackoverflow.com/a/27092000
has comment: http://stackoverflow.com/comment/42689900
answer count: 3
has answer: http://stackoverflow.com/a/27091721
has title: Determine adjacent inside a nested HTML list

http://stackoverflow.com/q/27119062
has comment: http://stackoverflow.com/comment/42740172
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42740066
tagged with: php
has comment: http://stackoverflow.com/comment/42739786
tagged with: laravel
has comment: http://stackoverflow.com/comment/42739844
has answer: http://stackoverflow.com/a/27119265
has title: Laravel 4 different pages @section are breaking scripts
type: Question
has comment: http://stackoverflow.com/comment/42740037
has comment: http://stackoverflow.com/comment/42740042
tagged with: javascript
has comment: http://stackoverflow.com/comment/42739963
has body: I'm very new to laravel 4 and am trying to extend my layout with another view. I have this in the end of my layout.blade.php: {{ HTML::script('js/jquery.nicescroll.min.js') }} {{ HTML::script('js/jquery.pickmeup.min.js') }} {{ HTML::script('js/myscript.js') }} Then I have a file page1.blade.php in which I have quite much, to show just the essentials: @extends('layout/layout') @section('contents') ...... @stop In this file, all the javascript functions from myscript.js are running without any problems, though they are included only in layout.blade.php Now I created another view, called 'bookings' with its corresponding file 'bookings.blade.php' Here is bookings.blade.php: @extends('layout/layout') @section('contents') {{ Form::open(array('url' => 'bookings', 'class' => 'form-inline', 'role' => 'form')) }} Date available? {{ Form::text('from1',Input::get('from'),array('class' => 'form-control', 'id' => 'fromforma')) }} - {{ Form::text('to1',Input::get('to'),array('class' => 'form-control', 'id' => 'toforma')) }} for {{ Form::select('persons1', array('1' => '1','2'=>'2','3'=>'3','4'=>'4'),Input::get('persons'),array('class' => 'form-control')) }} {{ Form::submit('Request!', array('class' => 'btn btn-success')) }} {{ Form::close() }} @stop Basically I'm doing exactly the same with @section and @stop and @extends as in page1.blade.php, but I can't use any of the javascript functions. To be exact, if I call a var a = document.getElementById('bookingform'); withing myscript.js, the javascript breaks for the page1.blade.php's content, too. (And isn't working in bookings.blade.php) My routes.php file is the following: Route::get('/', function() { return View::make('page1'); }); Route::get('index', function() { return View::make('page1'); }); Route::get('bookings', 'BookingController@getBooking'); Route::post('bookings','BookingController@getBookingDates'); And the BookingController: class BookingController extends BaseController { public function getBooking(){ return View::m…
score: 0
tagged with: laravel-4
answer count: 1
has comment: http://stackoverflow.com/comment/42739871

http://stackoverflow.com/a/27130730
has comment: http://stackoverflow.com/comment/42764732
score: 0
has comment: http://stackoverflow.com/comment/42761659
has comment: http://stackoverflow.com/comment/42761484
type: Answer
answers question: http://stackoverflow.com/q/27129925
has body: This allows the hover event to become re-enabled after 10 seconds: $('.toqc').click(function(){ hoverEnabled = false; clearTimeout(timer); timer= setTimeout(function(){ hoverEnabled= true; },10000); }); Replace your hover events with the following, which allows you to change images on click even when hoverEnabled is false: $('#ussfcanl').on('mouseover click', function(event) { if(event.type!=='mouseover' || hoverEnabled) { $('#imageholder').html('&lt;img src="http://www.hpc.ncep.noaa.gov/sfc/satsfc.gif" /&gt;'); } }); $('#mexsfcanl').on('mouseover click',function(event) { if(event.type!=='mouseover' || hoverEnabled) { $('#imageholder').html('&lt;img src="http://www.hpc.ncep.noaa.gov/sfc/namaksfcwbg.gif" /&gt;'); } }); Working Fiddle

http://stackoverflow.com/q/27123264
has answer: http://stackoverflow.com/a/27123358
has comment: http://stackoverflow.com/comment/42747060
tagged with: javascript
score: 0
tagged with: browserify
answer count: 1
tagged with: node.js
has title: Passing config options from file to javascript
type: UnansweredQuestion
tagged with: php
has body: In my PHP project, there is a javascript code that is supposed to use some values defined in a config file. So, I'm looking for best way to to pass config values to javascript, without mixing php and js. I was thinking that this might be accomplished with Node.js, where config file would be read and parsed, and then this Node module would be converted into browser JS with browserify. Is this even possible ?
has comment: http://stackoverflow.com/comment/42747029
type: Question

http://stackoverflow.com/comment/95325570
comment on: http://stackoverflow.com/a/52519737
has text: But, per my trial, this method won't send the cookie values for image requests from the page where document.cookie is set. It will do so for future requests. Pl let know if this is not the case you observe.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42671179
has text: How did you determine that a memory leak is occurring? Also just curious, any reason you're wrapping this whole thing in an anonymous function?
comment on: http://stackoverflow.com/q/27080653
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42631183
type: Comment
has text: I have to format the values of $city_name as above also. How can I do that?
comment on: http://stackoverflow.com/a/27057692
score: 0
type: AnswerComment

http://stackoverflow.com/a/27101293
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/27002194
has body: In order to achieve transparency with Pebble.js, the compositing property is required. You will need to use two sets of the same images. The reason is that Pebble.js uses the same image tools as the native SDK. The SDK doesn't directly support transparent images since it converts all PNGs to 1-bit black and white Pebble images, discarding the transparency information. However, I don't recommend using this method unless it's absolutely required. The performance penalty is roughly equal to drawing a regular image four times. Times two for two images, and enabling compositing doubles it. It is better to make a single image with faux transparency -- the background baked in. With that out of the way, here is how you can do it. You can make one image, image_mask_white.png where the originally white pixels stay white and everything else is black, and another image image_mask_black.png where originally black pixels become white and everything else is black. In other words, you would have two masks of the two color channels using white to represent opaque and black to represent transparent. With these two masks, you can then composite them together to form a single image with transparency. var wind = new UI.Window(); var iconWhite = new UI.Image({ position: new Vector2(100, 20), size: new Vector2(25, 26), compositing: 'or', // White pixels are shown, black pixels are clear. image: 'images/icon_mask_white.png' }); var iconBlack = new UI.Image({ position: new Vector2(100, 20), size: new Vector2(25, 26), compositing: 'clear', // The image’s white pixels are painted as black, and the rest are clear. image: 'images/icon_mask_white.png' }); wind.add(iconWhite); wind.add(iconBlack); wind.show(); Other than 'or' and 'clear', there is 'and' and 'set' which are the respective opposites. You can create a composite image with other combinations depending on your source images. This is just one possible combination. The official Pebble C SDK has more information on the compositing modes …
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42706781

http://stackoverflow.com/comment/42776608
score: 1
comment on: http://stackoverflow.com/q/27139295
has text: I am sure that : <div id="navbar navbar-default navbar-static-top" should actually be 'class' instead of 'id'
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27148174
accepted answer of: http://stackoverflow.com/q/27093932
has comment: http://stackoverflow.com/comment/43067194
has comment: http://stackoverflow.com/comment/43013703
has comment: http://stackoverflow.com/comment/43027494
answers question: http://stackoverflow.com/q/27093932
has body: My mistake, defining arrays instead of objects. Try this: var w=960, h=1160; var gssCode = { "S12000005":"central", "S12000014":"central", "S12000030":"central", "S12000006":"dg", "S12000008":"strathclyde", "S12000011":"strathclyde", "S12000018":"strathclyde", "S12000021":"strathclyde", "S12000028":"strathclyde", "S12000029":"strathclyde", "S12000035":"strathclyde", "S12000038":"strathclyde", "S12000039":"strathclyde", "S12000044":"strathclyde", "S12000045":"strathclyde", "S12000046":"strathclyde", "S12000010":"lothian", "S12000019":"lothian", "S12000026":"lothian", "S12000036":"lothian", "S12000040":"lothian", "S12000013":"highland", "S12000017":"highland", "S12000023":"highland", "S12000027":"highland", "S12000015":"fife", "S12000020":"grampian", "S12000033":"grampian", "S12000034":"grampian", "S12000024":"tayside", "S12000041":"tayside", "S12000042":"tayside" }; // use your CSV here. You will need to either use queue or wrap the d3.json inside d3.csv var pLoad = [ {reg:"tayside",party:"Scottish Labour"}, ... ]; var party={}; pLoad.forEach(function(d){ party[d.reg]=d.party; }); var color = { "Scottish Conservative and Unionist Party" : "#5ABFF4", "Scottish Labour" : "#846DD4", "Scottish Liberal Democrats" : "#FA6485", "Scottish National Party" : "#F6DC60", "Scottish Green Party" : "#31C48E", "Independent" : "#986561", "No Party Affiliation" : "#475070" }; var projection = d3.geo.albers() .center([0, 55.4]) .rotate([4.4, 0]) .parallels([50, 60]) .scale(10000) .translate([w/2, h/2]); var path = d3.geo.path() .projection(projection); var svg = d3.select("body") .append("svg") .attr("width",w) .attr("height",h); d3.json("scotland-topojson-file.json",function(err,load){ svg.selectAll("path") .data(topojson.feature(load,load.objects.layer1).features) .enter().append("path") .attr("d",path) .style("fill",function(d){return color[party[gssCode[d.properties.gss]]];}) .append("title") .text(function(d){return gssCode[d.properties.gss]+"\n"+d.properties.gss;}); });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43012818
score: 0
has comment: http://stackoverflow.com/comment/43067037
has comment: http://stackoverflow.com/comment/43027634
type: Answer

http://stackoverflow.com/comment/42776436
score: 0
has text: if you can explain me step for step I would be grateful so much. :-)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27039881

http://stackoverflow.com/comment/42637526
has text: `appendChild` callback? Are you looking for an event instead? Eg [`loadedmetadata`](http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#event-media-loadedmetadata) for example?
comment on: http://stackoverflow.com/q/27061544
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/42580792
score: 0
type: Comment
type: QuestionComment
has text: Don't use `new function(){};` to create functions. Use `function Game(){}` or `var Game = function() {};`. Or `new Function(str)` to create a function from string, but better avoid that.
comment on: http://stackoverflow.com/q/27029001

http://stackoverflow.com/comment/42634599
type: Comment
has text: I'm confused by this answer, and more so why it would be accepted. From the OP's question it sounds like he's looking for an **alternative** to a waiting duration, in other words, waiting for a condition to be fulfilled rather than waiting for some specified period of time. That sounds like promises to me.
type: AnswerComment
comment on: http://stackoverflow.com/a/27059705
score: 0

http://stackoverflow.com/q/27078386
tagged with: javascript
tagged with: mocha.js
possible better answer: http://stackoverflow.com/a/32719893
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/29403145
accepted answer: http://stackoverflow.com/a/29403145
has title: In unit test how can I compare original object with scope copy and avoid angular $$hashKey
upvote count: 1
has answer: http://stackoverflow.com/a/32719893
tagged with: unit-testing
type: Question
type: AnsweredQuestion
tagged with: chai
score: 1
has body: I can explain my question in one image. In my unit test after some manipulations I want to check that $scope.data (first log message) is equal to original data object (second log message). I use mocha + chai and expect(innerScope.data).to.deep.equal(data); It is used in directive, so angular adds $$hashKey's to each object and of course my expectation is wrong. How can I test it in other way?
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/42926165
type: QuestionComment
comment on: http://stackoverflow.com/q/27058386
score: 0
has text: That would be a great but how can you do that with a URL ?
type: Comment

http://stackoverflow.com/q/27137888
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42774094
has comment: http://stackoverflow.com/comment/42774241
has comment: http://stackoverflow.com/comment/42774109
has title: Dynamically create EditorFor using Jquery...?
has comment: http://stackoverflow.com/comment/42774657
has comment: http://stackoverflow.com/comment/42992691
type: Question
has comment: http://stackoverflow.com/comment/42773892
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has body: I was wondering if there was some way to create EditorFor textboxes dynamically when selecting a value in a dropdown list. Here is the example in html/javascript that I found: http://jsfiddle.net/JvqTW/3/ I'm hoping it will just be a minor tweak to the above example. My issue is that I would still like to use the model values. So, if I select a value from the dropdown, we'll say 3, it will dynamically create the following: @Html.EditorFor(model =&gt; model.AnswerText) @Html.EditorFor(model =&gt; model.AnswerText2) @Html.EditorFor(model =&gt; model.AnswerText3)

qt
tags question: http://stackoverflow.com/q/27076986
type: Tag
tags question: http://stackoverflow.com/q/27075268
tag name: qt
tags question: http://stackoverflow.com/q/26992768

http://stackoverflow.com/comment/42542032
type: Comment
comment on: http://stackoverflow.com/q/27000983
score: 0
has text: Why are you treating modern versions of Internet Explorer differently than Chrome? What problems are you attempting to solve with this script?
type: QuestionComment

http://stackoverflow.com/q/27055875
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: bootstrapValidator ajax request, prevent closing bootstrap modal after submitting
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: hi im using bootstrapValidator to validate my form and i have no idea where to add ajax request after validating form. and also want to prevent closing bootstrap modal after submitting the form. i referred similar questions and still couldn't make it work. here is my bootstrap modal &lt;a href="#"class="btn btn-lg btn-black ico-windows" data-backdrop="static" data-keyboard="false" data-toggle="modal" data-target="#AddAlbum" &gt; Create New Album &lt;/a&gt; &lt;!-- Modal --&gt; &lt;div class="modal fade" id="AddAlbum" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" 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"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Create New Album&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div id="formregister"&gt; &lt;form action="" class="form-horizontal" role="form" id="newAlbum" &gt; &lt;p class="qc-errmsg" style="display: none;"&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="form-group"&gt; &lt;label for="inputEmail3" class="col-sm-2 control-label"&gt;Album Name&lt;/label&gt; &lt;div class="col-sm-10"&gt; &lt;input type="text" class="form-control" id="inputEmail3" name="albumName" placeholder="Album Name"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="form-group"&gt; &lt;label for="inputEmail3" class="col-sm-2 control-label" &gt;Description&lt;/label&gt; &lt;div class="col-sm-10"&gt; &lt;textarea class="form-control" rows="3" name="description"&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="form-group"&gt; &lt;div class="col-sm-offset-2 col-sm-10"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;button type="submit" onclick="send()" value="cart" class="btn btn-primary"&gt;Save Changes&lt;/button&gt; …
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/27056709
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27056709

http://stackoverflow.com/comment/42786302
comment on: http://stackoverflow.com/a/27144856
score: 0
type: AnswerComment
type: Comment
has text: Yes, I did try "From" then I will get "Error processing request stream. The property name 'From' specified for type 'Microsoft.Crm.Sdk.Data.Services.PhoneCall' is not valid."

http://stackoverflow.com/comment/42531625
score: 0
has text: Do you want to display the selected p (i.e. the option) as a label or pair up a label with each option in the select tag?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27000579

http://stackoverflow.com/a/27138380
answers question: http://stackoverflow.com/q/27138174
score: 0
has body: http://jsfiddle.net/tracker1/9pfxL4Lz/ Just used styled submit buttons with the name matching the key/value you want to pass. <?php $actual_link = "$_SERVER[REQUEST_URI]"; ?> <input type="hidden" name="gobackto" value="<?php echo htmlspecialchars($actual_link);?>"> Germany Italy United States Canada
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27138174

http://stackoverflow.com/a/27097527
score: 3
upvote count: 4
has comment: http://stackoverflow.com/comment/42700258
type: AcceptedAnswer
has body: In jQuery, $(this) refers to the DOM element that invokes the current function. Since you are calling $(this) in the document 'ready' event, $(this) refers the document (DOM), which is the reason why your code doesn't work. To apply the CSS rule, you'll have to target the body tag instead. Therefore, you'll have to change this: $(this).css("background-color","green"); to that: $('body').css("background-color","green");
has comment: http://stackoverflow.com/comment/42711383
type: Answer
has comment: http://stackoverflow.com/comment/42700493
accepted answer of: http://stackoverflow.com/q/27097507
has comment: http://stackoverflow.com/comment/42701838
answers question: http://stackoverflow.com/q/27097507
downvote count: 1

http://stackoverflow.com/q/27053182
downvote count: 0
has body: I'm trying to build the following functionality: The webpage has checkboxes that define characteristics of movies, for example "comedy", "drama", "english", "spanish". When the user clicks on one of the checkboxes, divs that have the same class will get displayed on the page. Here's the part I'm having trouble implementing in a sensible way: If the user selects a second checkbox, the displayed divs should get "filtered" some more. In other words, if the user has first selected "drama" and then "english", only those divs that have both classes should remain visible. Here is my code so far (it will simply toggle the "comedy" div on/off): Movies Movies Comedy Drama English Spanish Comedy in english.. content Comedy in spanish.. content Drama in spanish.. content Drama in english.. content
has answer: http://stackoverflow.com/a/27053794
accepted answer: http://stackoverflow.com/a/27053794
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27053310
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27053310
favorite count: 0
has title: Show divs with certain classes based on checkboxes
tagged with: checkbox
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/26993348
upvote count: 0
has answer: http://stackoverflow.com/a/26993526
tagged with: push
tagged with: arrays
tagged with: javascript
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/26993801
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Save Data in Array, NOT TEMPORALLY
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42517722
has answer: http://stackoverflow.com/a/26993801
has body: I use the following code to add entrys to a knowledgebase, this should be for me and my colleagues, but my Problem is that the entrys are only avaible in the actually session, when I has add them, but when I reload the site, they are lost, can you help me? My code: js: var knowledgebase = angular.module('knowledgebase', []); ///////// --- Start of Data Simulation --- ////////// knowledgebase.controller('kbControl', function ($scope, $sce, $http) { $scope.tutorials = [ { 'topic': 'Oracle Metalink Porsche', 'body': 'https://support.oracle.com/CSP/ui/flash.html</a', 'tags': 'Oracle,Metalink,Porsche,Login,Zugangsdaten', 'value': '0', 'negative': '0' }, { 'topic': 'Oracle Metalink', 'body': 'https://support.oracle.com/CSP/ui/flash.html', 'tags': '', 'value': '0', 'negative': '0' }, { 'topic': 'Oracle Metalink MLP', 'body': 'https://support.oracle.com/CSP/ui/flash.html', 'tags': '', 'value': '0', 'negative': '0' }, ]; $scope.predicate = 'topic'; $scope.trust = function (html_code) { return $sce.trustAsHtml(html_code); } $scope.quicklinks = [...]; $scope.experts = [...]; ///////// --- End of Data Simulation --- ////////// ///////// --- Start of Lync Integration --- ////////// $scope.getID = function (username) { return username.replace('@', '_').replace('.', '_').replace('.', '_'); }; $scope.showLyncPresencePopup = function (event, userName) {... }; $scope.getStatus = function (userName) {... }; $scope.hideShowExperts = false; $scope.expertSort = function (expert) {... } var tutorial; tutorial = { 'customer': '', 'technology': '', 'topic': '', 'description': '' } $scope.submit = function (tutorial) { $scope.tutorials.push({ 'customer': $scope.tutorial.customer, 'technology': $scope.tutorial.technology, 'topic': $scope.tutorial.topic, 'body': $scope.tutorial.description }) }; }); ///////// --- End of Lync Integration --- ////////// ///////// --- Data Templates --- ////////// /* tutorials: {'topic':'','body':'','tags':'','customers':'','technology':''}, quicklinks: {'name':'…
score: -1
possible better answer: http://stackoverflow.com/a/26993526
answer count: 2

http://stackoverflow.com/q/27038382
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27044108
has comment: http://stackoverflow.com/comment/42599129
tagged with: cordova
has title: How to update cordova.js?
has comment: http://stackoverflow.com/comment/42597637
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27042939
type: Question
has body: I need to update cordova.js in order to have issue CB-7868 fixed on a Cordova project of mine. I ran all commands stated in this post but I can't get cordova.js updated. My Cordova project is for the Android platform.
has comment: http://stackoverflow.com/comment/42602487
has comment: http://stackoverflow.com/comment/42600381
has comment: http://stackoverflow.com/comment/42598613
has comment: http://stackoverflow.com/comment/42602533

http://stackoverflow.com/a/27052350
has comment: http://stackoverflow.com/comment/42639107
score: 0
has comment: http://stackoverflow.com/comment/42636947
has comment: http://stackoverflow.com/comment/42645661
has body: If you start Firefox from a terminal window, you should see the output there.
answers question: http://stackoverflow.com/q/27050682
type: Answer

http://stackoverflow.com/q/27050311
tagged with: inheritance
has answer: http://stackoverflow.com/a/27050779
score: 0
has comment: http://stackoverflow.com/comment/42618667
has answer: http://stackoverflow.com/a/27051354
has body: I have written stuff in other languages where you inherit a class, and the super class constructor is called when and object is created of the subclass. However, in the pattern I find all over for inheritance from javascript, the super constructor is actually run when inheritance is established. Example: var thingy = function(){ this.constructionTime = new Date() }; var thing2 = function(){ this.type="thing2" }; thing2.prototype = new thingy();//thingy constructor actually runs here var t2 = new thing2();//does NOT call thingy constructor setTimeout(function(){ var t3 = new thing2(); t3.constructionTime == t2.constructionTime; // TRUE },100); Then I found a few, much less common, examples where they did something like this: var athing = function(){ this.constructionDate = new Date(); } athing.prototype.showDate = function(){ console.log(this.constructionDate) }; var something = function(){ athing.apply(this); this.note = "I'm something"; } var x = new something(); then calling x = new something() does run the constructor, but does not inherit methods. So I add something.prototype = athing.prototype; which does not give x the methods, but new objects y = new something(); y.showDate();//shows the date generated during its construction do have them. So here's my perhaps overly broad question(s): am I missing something? Is there a reason NOT to use this pattern other than wanting your super constructor to only be run once?
has comment: http://stackoverflow.com/comment/42620381
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/42618256
type: Question
answer count: 2
has title: Inherit construction logic, but run Super constructor on Sub object creation
tagged with: javascript

http://stackoverflow.com/a/27132397
has comment: http://stackoverflow.com/comment/42763613
accepted answer of: http://stackoverflow.com/q/27131611
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can try something like this DEMO http://jsfiddle.net/cdcjy1mg/7/ $(".ctable &gt; * &gt; * &gt; :nth-child(" + index + ")").toggleClass('hidden'); CSS .hidden { width: 0; opacity: 0; font-size: 0; padding: 0; margin: 0; border: 0; } .htable tr, th, td { border: 1px solid black; width: 100px; transition: all 0.3s ease-in-out; opacity: 1; border-collapse: collapse; padding: 0; margin: 0; }
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27131611

http://stackoverflow.com/q/27013560
tagged with: knockout.js
type: Question
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/27014089
has answer: http://stackoverflow.com/a/27014509
has title: Knockout.js: Sort on multiple keys
answer count: 3
accepted answer: http://stackoverflow.com/a/27014509
downvote count: 0
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/27014132
has answer: http://stackoverflow.com/a/27014132
type: AnsweredQuestion
has body: In Knockout.js, is it possible to sort by multiple keys? For example: var anotherObservableArray = ko.observableArray([ { name: "Bungle", type: "Bear" }, { name: "Boogle", type: "Bear" }, { name: "George", type: "Hippo" }, { name: "Zippy", type: "Unknown" } ]); For example, I might want to sort ASC by type first, and then by DESC name. Is this possible with KO observable arrays? Thanks
upvote count: 1

http://stackoverflow.com/q/27085054
has comment: http://stackoverflow.com/comment/42679034
has body: Javascript arrays used to be just objects with some special syntax, but JIT engines can optimize the array to behave like a true array with O(1) access rather than O(log n) access. I am currently writing a cpu intensive loop where I need to a certain I get O(1) access rather than O(log n). But the problem is that I may need to do array [5231] = obj1 right after its created but the array will eventually be filled. I am worried that such behaviour may trick the JIT to thinking that I am using it as a sparse array and thus I wouldnt get O(1) access time I require. My question is that is there ways I can tell or at least hint the javascript engine that I want a true array? In particular, do I need to initialize the array with values first? Like fill all of it with reference to a dummy object (my array will only contain references to objects of same prototype or undefined). Would just set the array.length = 6000 be enough? EDIT: based on http://jsperf.com/sparse-array-v-true-array, it seems filling the array beforehand is a good idea.
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/42678936
has comment: http://stackoverflow.com/comment/42679140
has title: Javascript forcing array to behave like array
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42678946
has comment: http://stackoverflow.com/comment/42678928
has comment: http://stackoverflow.com/comment/42679033
has comment: http://stackoverflow.com/comment/42679052
has comment: http://stackoverflow.com/comment/42679232
upvote count: 2
has comment: http://stackoverflow.com/comment/42679269
downvote count: 2
has comment: http://stackoverflow.com/comment/42679117
type: Question
has comment: http://stackoverflow.com/comment/42679200
has comment: http://stackoverflow.com/comment/42678973
has comment: http://stackoverflow.com/comment/42679241
has comment: http://stackoverflow.com/comment/42679098
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/27086705
score: 0

http://stackoverflow.com/q/27052937
has answer: http://stackoverflow.com/a/27053015
has comment: http://stackoverflow.com/comment/42622967
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27053081
answer count: 4
has body: I know this has been asked a thousand times, but I can't get this to work. I'm trying to get an aside to show up after the page has been scrolled 500px. I'm fairly new to javascript, so I'm not really sure what I'm doing. Any help getting this working would be great! $(window).scroll(function() { // find the id with class 'active' and remove it $(".work-col-1-2").removeClass("visible"); // get the amount the window has scrolled var scroll = $(window).scrollTop(); // add the 'active' class to the correct id based on the scroll amount if (scroll <= 500) { $(".work-col-1-2").addClass("visible"); } }); .work-col-1-2 { position: fixed; right: 6%; top: 0; width: 25%; padding: 1%; margin: 0; display: inline-block; box-sizing: border-box; z-index: -1; visibility: hidden; } .work-col-1-2.visible { visibility: visible; } Text here.
has answer: http://stackoverflow.com/a/27053026
has comment: http://stackoverflow.com/comment/42623004
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/27053231
score: 0
tagged with: scroll
upvote count: 1
has title: How to add a class after element reaches some point?
downvote count: 1

http://stackoverflow.com/q/26998724
has body: I'm currently using the latest version of Fabric.js which is 1.4.0. Text editing is now possible using Itext object. I'd like to execute something whenever an IText object is edited. So far I have found the modified and moving events but they do not work the same way as I want them to. canvas.on('object:modified', function(e) { //do something, maybe count the number of characters }); They only work when the object is moved. Is there anyway we can execute something whenever Itext's text changes? That is... using the new feature available in 1.4.0, which is the direct text editing. Thank you very much.
tagged with: javascript
tagged with: fabricjs
has answer: http://stackoverflow.com/a/27007140
answer count: 2
downvote count: 0
tagged with: web
has title: Text changed event supported in Fabric.js
favorite count: 0
accepted answer: http://stackoverflow.com/a/27007140
score: 6
upvote count: 6
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26998807
has answer: http://stackoverflow.com/a/26998807
type: Question

http://stackoverflow.com/q/27100373
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27101722
accepted answer: http://stackoverflow.com/a/27101722
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42705656
score: 0
has title: Scripts don't load: Using AngularJS with JSON (Firebase)
has comment: http://stackoverflow.com/comment/42705079
answer count: 1
has comment: http://stackoverflow.com/comment/42713916
has comment: http://stackoverflow.com/comment/42705516
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42705033
has body: I've tried to build an application that let's you input data into several fields, uses AngularJS to put data into a Firebase JSON, and outputs that data into nicely laid out "cards". Initially I could input and output data, but as soon as I hooked it up to AngularJS and Firebase I just got '{{ 1 + 2 }}' instead of '3' in my browser. I'm running this code on my webserver, I hope you can help me figure out what the problem is – the page is pretty much blank. Everything that depends on Angular isn't showing up. Link to live page: repertoire.me/anustart Here's my code: index.html Repertoire Beta 1 + 2 = {{ 1 + 2 }} repertoire venue-list.html {{venueCtrl.venue.name}} {{venueCtrl.venue.location}} {{venueCtrl.venue.price}} {{venueCtrl.venue.species}} {{venueCtrl.venue.genre}} {{venueCtrl.venue.description}} {{venueCtrl.venue.tags}} venue-form.html Price Have you already been? venueForm is {{venueForm.$valid}} app.js (function() { var app = angular.module('repertoire', ['repertoire-venues']); //var app = new Firebase('https://xyz.firebaseio.com/'); app.controller("VenueController", ['$http', function($http){ var venue = this; venue.info = [ ]; $http.get('venues.json').success(function(data){ venue.info = data; }); }]); })(); repertoire-venues.js (function() { var app = angular.module('repertoire-venues', []); app.directive('venueList', function(){ return { restrict: 'E', templateUrl: 'venue-list.html' }; }); app.directive('venueForm', function(){ return { restrict: 'E', templateUrl: 'venue-form.html' controller: function(){ this.venue = {}; this.venueForm = function(info){ info.venues.push(this.venue); this.venue = {}; }; }, controllerAs: 'venueCtrl' }; }); })(); Thank you so much <3

http://stackoverflow.com/a/27119399
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27116138
has body: Alright, I found the problem, just because I was posting in very quick successions, only the last input was being checked. So I just used a delay of a few seconds and it worked. for(i=0; i&lt;4;i++) { for(j=0; j&lt;4;j++) { var delay=5000;//1 seconds setTimeout(function(){ dictionary_run(user_name[i],pass_word[j]); },delay); } } Thanks !

http://stackoverflow.com/q/27082058
has title: How do I filter out words that have been separated by spaces?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27082292
has body: I am writing a word filter used by people, and as people do, they want to subvert the filter. For my purposes, I want to filter out the word "hello", but I also want to filter out "h e l l o" or "h.e.l.l.o" as well. I've tried mucking about with word boundaries, but with no luck. // works message = message.replace(/\bhello\b/gi, "hello"); // doesn't message = message.replace(/\bh\b\be\b\bl\b\bl\b\bo\b/gi, "hello");
accepted answer: http://stackoverflow.com/a/27082108
has comment: http://stackoverflow.com/comment/42673537
type: Question
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27082292
has answer: http://stackoverflow.com/a/27082108
has comment: http://stackoverflow.com/comment/42673750
tagged with: regex

buttonclick
type: Tag
tags question: http://stackoverflow.com/q/27130750
tag name: buttonclick
tags question: http://stackoverflow.com/q/27088669

http://stackoverflow.com/comment/42716078
comment on: http://stackoverflow.com/a/27106342
has text: If the data attribute doesn't exist then the JQuery data call will return undefined, if the attribute exists but it's blank then JQuery will return an empty string. Both of those evaluate to false, so the exclamation mark at the beginning says to take the opposite of that, which is true, therefore you'll get the alert if the data-tablet attribute is either blank or doesn't exist.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/27004479
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27004430
answers question: http://stackoverflow.com/q/27004430
score: 3
has body: localStorage stores string representations only and "true" or "false" is not the same as true or false. $scope.enterToSend = booleanFromString(localStorage.getItem('enterToSend')); function booleanFromString(s) { if (s == 'true') return true; if (s == 'false') return false; throw new Error("Unable to convert '" + s + "' to a boolean, valid arguments are 'true' or 'false'"); }
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/q/27071133
has answer: http://stackoverflow.com/a/27093622
accepted answer: http://stackoverflow.com/a/27093622
has comment: http://stackoverflow.com/comment/42655241
favorite count: 0
tagged with: d3.js
has title: D3: update data in group selection with additional ('g')
has comment: http://stackoverflow.com/comment/42660593
has comment: http://stackoverflow.com/comment/42662051
type: AnsweredQuestion
score: 2
downvote count: 0
type: Question
linked to: http://stackoverflow.com/q/24912274
has body: For my chart I had to create groups which contain several elements (line, rect, text). I did my setup like in this question: D3: update data with multiple elements in a group I defined my groups like this: var group = groupContainer.selectAll('g') .data(items); var groupEnter = group.enter() .append('g'); For each group element I appended a rect and did the update (later for my brushing event). // append groupEnter.append('rect') .attr('class', 'item') .style('fill', function (d) { return d.color; }) .attr('x', function (d) { return x1(d.x); }) .attr('y', function (d) { return y1(d.y); }) .attr('width', '50') .attr('height', '50'); //update group.select('rect') .attr('x', function (d) { return x1(d.x); }) .attr('y', function (d) { return y1(d.y); }); This works! Now when I want to put another group element between my group and the rect, the update won't work anymore. // append groupEnter.append('g').append('rect') // here is the change .attr('class', 'item') .style('fill', function (d) { return d.color; }) .attr('x', function (d) { return x1(d.x); }) .attr('y', function (d) { return y1(d.y); }) .attr('width', '50') .attr('height', '50'); //update group.select('rect') .attr('x', function (d) { return x1(d.x); }) .attr('y', function (d) { return y1(d.y); }); The selection group.select('rect') is the same as before. What am I doing wrong? EDIT: I investigated my problem furthermore. It seems like the update method has the wrong data mapping. Without the group element (the working example), I get for group.select('rect') .attr('x', function (d) { console.log(d); return x1(d.x); }) .attr('y', function (d) { return y1(d.y); }); the ouput: item 1 item 2 item 3 item 4 item 5 item 6 item 7 item 8 item 9 item 10 For the version with the group element I just get the output: item 2 item 2 item 4 item 4 item 6 item 6 item 8 item 8 item 10 item 10 Some rects get drawn as well, but not all. I guess only 2, 4, 6, 8, 10. Whats wrong with the mapping? Do I have to re-map my data?
tagged with: javascript
upvote count: 2
answer count: 1

http://stackoverflow.com/comment/42530766
score: 0
type: Comment
type: QuestionComment
has text: The next line directive, I want the quickPick on his scope to be trigger.
comment on: http://stackoverflow.com/q/26999938

http://stackoverflow.com/comment/42555226
type: Comment
has text: found the problem; I was calling that function also somewhere else; is working now
comment on: http://stackoverflow.com/a/27013860
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42524388
has text: @user3684675 Updated, and added what you asked in comments.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26996484

http://stackoverflow.com/a/27098821
upvote count: 1
answers question: http://stackoverflow.com/q/27098758
type: Answer
has body: $(document).ready(function() { $("#btn_add,.btn_delete").on("click", function(event) { event.preventDefault(); alert("This action has been temporarily disabled!") }); });
downvote count: 0
score: 1

http://stackoverflow.com/a/27034419
has comment: http://stackoverflow.com/comment/42594803
has comment: http://stackoverflow.com/comment/42594654
upvote count: 1
has comment: http://stackoverflow.com/comment/42597379
has comment: http://stackoverflow.com/comment/42597498
has body: Hope this is the working you wanted The p#list was outside #snaptarget hence the newly created items were placed outside. Bring the p tag inside #snaptarget &lt;div id="snaptarget" class="ui-widget-header"&gt; &lt;p id="list"&gt;&lt;/p&gt; &lt;/div&gt; The below js code was setting float to spans with ids but all these spans had another span as a wrapper hence the floats never worked as intended. $('#s' + i).each(function () { $(this).css({ "float": "left" }); }); You can add a class say item while creating the span. var span = document.createElement('span'); span.className = "item"; And in alignment function add a class say float-left to all spans having class item $('.item').addClass('float-left'); And in CSS .float-left{ float: left} Demo Fiddle
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27033297

http://stackoverflow.com/comment/42561487
type: QuestionComment
score: 0
has text: Though I'm not sure it is possible without google.com :)
comment on: http://stackoverflow.com/q/27018233
type: Comment

http://stackoverflow.com/q/27089862
has title: How To Get Slider Value of Next Column In Table
tagged with: javascript
has body: I'm trying to get the slider value of the current row when the users changes any of the inputs for class="entryprice_class". Commented out in the code is some of what I have tried. I have been at this for hours. Still no luck. Where am I going wrong? &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css"/&gt; &lt;script src="http://code.jquery.com/jquery-1.8.3.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"&gt;&lt;/script&gt; &lt;body&gt; &lt;div data-role="page"&gt; &lt;div data-role="content"&gt; &lt;!-- entry points table --&gt; &lt;section id="entry_points_section"&gt; &lt;div class="input_fields_wrap"&gt; &lt;table class="responsive" id="input_entries_table"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th scope="col" id="entry_price_column"&gt;Entry price&lt;/th&gt; &lt;th scope="col"&gt;Percent&lt;/th&gt; &lt;th scope="col"&gt;Order amount&lt;/th&gt; &lt;th scope="col"&gt;Capital value&lt;/th&gt; &lt;th scope="col"&gt;Breakeven&lt;/th&gt; &lt;th scope="col"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="17%" style="min-width:3em"&gt;&lt;input type="number" class="entryprice_class" id="entryprice_1" size="5" min="0" placeholder="0" value="0"&gt;&lt;/td&gt; &lt;td style="min-width:2em"&gt;&lt;input type="range" name="slider-fill_1" class="entry_percent" id="entry_percent_1" value="50" placeholder="50%" min="0" max="100" data-highlight="true"/&gt;&lt;/td&gt; &lt;td width="17%" style="min-width:3em"&gt;&lt;input type="text" class="order_amount" name="order_amount" size="5" min="0" placeholder="0" length="10px" disabled&gt;&lt;/td&gt; &lt;td width="17%" style="min-width:3em"&gt;&lt;input type="text" class="capital_value" name="capital_value" size="5" min="0" placeholder="0" disabled&gt;&lt;/td&gt; &lt;td width="17%" style="min-width:3em"&gt;&lt;input type="text" class="breakeven" name="breakeven" size="5" min="0" placeholder="0" di…
answer count: 3
has answer: http://stackoverflow.com/a/27090137
downvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27090137
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27091638
possible better answer: http://stackoverflow.com/a/27090155
score: 1
has answer: http://stackoverflow.com/a/27090155
upvote count: 1
tagged with: dom
type: Question

http://stackoverflow.com/q/26996619
has body: No matter what is passed on the url, window.location.hash returns nothing on iPhone safari, but works well on other devices and pc browser. var testhash =window.location.hash; alert(testhash); if I redirect to window.location.href = "example.com/somepage.php?param=1#googletranlsate" On iphone I'm redirected to window.location.href = "example.com/somepage.php?param=1" Is there any issue specific to iphone or safari I dont know of? Thanks
tagged with: iphone
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has title: window.location.hash not returning anything on iPhone
has comment: http://stackoverflow.com/comment/42523922
score: 1
favorite count: 0
type: Question
upvote count: 1
linked to: http://stackoverflow.com/q/6970769
has comment: http://stackoverflow.com/comment/42526517
tagged with: safari

http://stackoverflow.com/q/27085700
type: Question
has answer: http://stackoverflow.com/a/27085749
tagged with: javascript
downvote count: 0
answer count: 1
has body: function generateload_Click(form1) { window.text="Thishasto"; window.key = "hello"; var useHashing = true; var encrypted; if (useHashing){ key = CryptoJS.MD5(key).toString(); } window.options = { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }; window.textWordArray = CryptoJS.enc.Utf8.parse(text); window.keyHex = CryptoJS.enc.Hex.parse(key); window.encrypted = CryptoJS.TripleDES.encrypt(textWordArray, keyHex, options); alert(encrypted); } returns the below error when run in IE Error: Unable to get property 'createEncryptor' of undefined or null reference.
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42685752
tagged with: cryptography
has title: Error: Unable to get property 'createEncryptor' of undefined or null reference
score: 1
upvote count: 1

http://stackoverflow.com/comment/42718766
comment on: http://stackoverflow.com/q/27107794
score: 0
type: QuestionComment
type: Comment
has text: Can you show some code?

http://stackoverflow.com/a/27104237
score: 0
has body: You can use attr methods like $("button").click(function(){ alert("Width of div: " + $("#a div").attr("width")); });
type: Answer
has comment: http://stackoverflow.com/comment/42711945
answers question: http://stackoverflow.com/q/27104200

http://stackoverflow.com/q/27119687
upvote count: 1
has comment: http://stackoverflow.com/comment/42740791
has answer: http://stackoverflow.com/a/27123944
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/5525795
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27128285
has comment: http://stackoverflow.com/comment/42740847
has title: AJAX response is not retaining the order of LinkedHashMap returned from the server
has body: I am using a LinkedHashMap to store map entries sorted by some business rule and I am sending it to the client, but my AJAX response always gets sorted by the map key. My sort function: protected Map&lt;Long, String&gt; sortWarehousesMap(Map&lt;Long, String&gt; warehousesMapTemp) { List&lt;Map.Entry&lt;Long, String&gt;&gt; entries = new ArrayList&lt;Map.Entry&lt;Long, String&gt;&gt;(warehousesMapTemp.entrySet()); Collections.sort(entries, new Comparator&lt;Map.Entry&lt;Long, String&gt;&gt;() { public int compare(Map.Entry&lt;Long, String&gt; a, Map.Entry&lt;Long, String&gt; b) { return a.getValue().compareTo(b.getValue()); } }); Map&lt;Long, String&gt; sortedWarehousesMapTemp = new LinkedHashMap&lt;Long, String&gt;(); for (Map.Entry&lt;Long, String&gt; entry : entries) { sortedWarehousesMapTemp.put(entry.getKey(), entry.getValue()); } return sortedWarehousesMapTemp; } Please help me what am I doing wrong.
downvote count: 0
type: Question
tagged with: linkedhashmap
score: 1
tagged with: java
tagged with: javascript
tagged with: response
answer count: 2

http://stackoverflow.com/a/27059490
has body: Of course you could "delete" rows in a Table(?) only via "HTML". You only need a &lt;form&gt;-Element which transfers your wishes to the server, which in response sends you an updated version of the page. Although that is awkward and not really smart - it is possible.
has comment: http://stackoverflow.com/comment/42633725
upvote count: 1
has comment: http://stackoverflow.com/comment/42633798
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27059384
type: Answer
answers question: http://stackoverflow.com/q/27059384
has comment: http://stackoverflow.com/comment/42634254

http://stackoverflow.com/a/27076583
type: Answer
answers question: http://stackoverflow.com/q/27076431
score: 1
has body: Try this $('.trash').on('ss-trashed', function (e, selected) { console.log($(selected).attr('id')) }) DEMO: http://jsfiddle.net/LNysC/2245/
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27076431
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42649079
comment on: http://stackoverflow.com/q/27067777
type: Comment
has text: Its not very clear to me what you are looking for. Can you show before and after HTML fragments to describe the effect desired?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42792937
comment on: http://stackoverflow.com/q/27149043
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
score: 1
type: QuestionComment
type: Comment

http://stackoverflow.com/q/27013363
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42558628
has comment: http://stackoverflow.com/comment/42553602
score: 0
has title: getElementById inside a div
has comment: http://stackoverflow.com/comment/42552957
tagged with: getelementbyid
has comment: http://stackoverflow.com/comment/42555361
has body: I'm using a Javascript to change the text on a form submit button, this is the code I'm using: &lt;script type="text/javascript"&gt; $(document).ready(function(){ document.getElementById("button").value="New Button Text"; }); &lt;/script&gt; The code work perfectly, but I need to change it so that it effects the id #button within a div with the id of #formwrap. So basically I need to .getElementById("button") contained within the div with a id of #formwrap
has answer: http://stackoverflow.com/a/27013406
accepted answer: http://stackoverflow.com/a/27013406
has comment: http://stackoverflow.com/comment/42553655
type: AnsweredQuestion

asp.net-web-api
tags question: http://stackoverflow.com/q/27057165
tags question: http://stackoverflow.com/q/27108082
tags question: http://stackoverflow.com/q/27028070
tags question: http://stackoverflow.com/q/27067001
tag name: asp.net-web-api
tags question: http://stackoverflow.com/q/27013958
type: Tag
tags question: http://stackoverflow.com/q/27002273
tags question: http://stackoverflow.com/q/27128888
tags question: http://stackoverflow.com/q/27090142
tags question: http://stackoverflow.com/q/27006767

http://stackoverflow.com/a/33589537
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27124298
has body: In my case the best solution was to keep the watch like usually $scope.$watch( 'myController.varToWatch', function(newVal,oldValue) { //blabla }); and attach the controller scope to the property: $scope.myController = myController; beforeEach(inject(function(_$controller_, _$httpBackend_,_$rootScope_){ $httpBackend = _$httpBackend_; $scope = _$rootScope_.$new(); $controller = _$controller_; myController = $controller('settingsController', { $scope: $scope }); $scope.myController = myController; })); inspired from here : http://juristr.com/blog/2014/11/learning-ng-testing-watch-expressions/

http://stackoverflow.com/comment/42529095
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26999233
has text: You should use "var" before your variables declaration inside your closure so it keeps them private

http://stackoverflow.com/comment/42592952
has text: yeah as i said... too early in the morning, need more coffee before trying to find solutions ;) but this task is done now. glad i could help
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27034608
type: Comment

http://stackoverflow.com/q/27148793
tagged with: angularjs
has title: AngularJS input[number] doesn't convert "5008" into number
has answer: http://stackoverflow.com/a/27149194
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27150583
type: Question
has answer: http://stackoverflow.com/a/27149309
tagged with: javascript
has comment: http://stackoverflow.com/comment/42793394
has body: I have a number input bound to a property that is a string that contains a number. When displayed the number fails to validate because it is expecting a number and the model then gets set to undefined and the number is never shown. Aside from manually going in the model and converting it using parseInt or something is there anything I can do? &lt;input type="number" ng-model="val.Value" required /&gt; The value is actually 5008 before it gets rendered: val.Value = "5008"; And once the page gets rendered it gets set to undefined by Angular
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/27150583
accepted answer: http://stackoverflow.com/a/27149194

http://stackoverflow.com/a/27148888
answers question: http://stackoverflow.com/q/27148584
type: Answer
has comment: http://stackoverflow.com/comment/42812634
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27148584
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Have you included jQuery in your HTML? &lt;script src="https://code.jquery.com/jquery-2.1.1.min.js"&gt;&lt;/script&gt; Also check if any relative links to jQuery (Example, a link without http: src="//code... ) is not breaking on your local machine. Here is my exact code not in a fiddle that I open on my local machine without errors.: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;Generic&lt;/title&gt; &lt;link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet"&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="maintain_execute_suite" style="margin-left: 169px; margin-top: 102px;"&gt; &lt;div class="row"&gt; &lt;div class="col-sm-3"&gt; &lt;div class="panel panel-default"&gt; &lt;div class="panel-body"&gt; &lt;div class="btn-group"&gt; &lt;button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"&gt; &lt;span data-bind="label"&gt;Select One Suite&lt;/span&gt;&amp;nbsp;&lt;span class="caret"&gt;&lt;/span&gt; &lt;/button&gt; &lt;ul class="dropdown-menu" role="menu"&gt; &lt;li&gt;&lt;a href="#"&gt;Item 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Another item&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;This is a longer item that will not fit properly&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;script src="https://code.jquery.com/jquery-2.1.1.min.js"&gt;&lt;/script&gt; &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;script&gt; $( document.body ).on( 'click', '.dropdown-menu li', function( event ) { var $target = $( event.currentTarget ); $target.closest( '.btn-group' ) .find( '[data-bind="label"]' ).text( $target.text() ) .end() .children( '.dropdown-toggle' ).dropdown( 'toggle' ); return false; }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;

http://stackoverflow.com/comment/42718982
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27101588
has text: Is it mandatory that the new line should appear below the previous one..?
score: 0

http://stackoverflow.com/comment/42614472
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27048293
type: Comment
has text: use a flag to determine when that happens.

http://stackoverflow.com/q/27068164
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/27068704
tagged with: php
has answer: http://stackoverflow.com/a/27074686
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42652652
has comment: http://stackoverflow.com/comment/42660948
score: 1
has comment: http://stackoverflow.com/comment/42650421
type: Question
answer count: 2
has title: AngularJS getting data from PHP file
possible better answer: http://stackoverflow.com/a/27068704
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27074686
favorite count: 0
has body: I'm pretty new to AngularJS. What I'm trying to do is to get data from a PHP file that will make requests on a DB and then will display them in a JSON format. For now I'm just testing to see if I can get the data from the PHP and is not working. It displays nothing. In console I get this message: SyntaxError: Unexpected token { at Object.parse (native) at cc (http://localhost/SiteKardinal/includes/angular.min.js:14:360) at Ud.e.defaults.transformResponse (http://localhost/SiteKardinal/includes/angular.min.js:69:261) at http://localhost/SiteKardinal/includes/angular.min.js:69:22 at r (http://localhost/SiteKardinal/includes/angular.min.js:7:290) at xc (http://localhost/SiteKardinal/includes/angular.min.js:69:4) at b (http://localhost/SiteKardinal/includes/angular.min.js:70:238) at F (http://localhost/SiteKardinal/includes/angular.min.js:100:187) at http://localhost/SiteKardinal/includes/angular.min.js:101:350 at k.$eval (http://localhost/SiteKardinal/includes/angular.min.js:112:68) angular.min.js:92 GET http://localhost/SiteKardinal/includes/angular.min.js.map 404 (Not Found) angular.min.js.map:1 My code is this: test.html nume.php

http://stackoverflow.com/q/27000493
score: 1
type: Question
answer count: 1
tagged with: javascript
upvote count: 1
favorite count: 0
tagged with: google-places-api
has title: google places search methods inconsistencies
has body: I have a question about how google places handles search requests. This is the situation: There is an app that looks for atm machines in a specific location. The lookup is handled with the following url: https://maps.googleapis.com/maps/api/place/search/json?location=49.338233,11.04442199999994&amp;radius=1000&amp;keyword=atm|geldautomat&amp;sensor=false&amp;key=KEY This works well enough. Now this atm lookup has to be transported into a web application using js. I am using the places api but I just can't figure out how to get the same results. For instance: Using new google.maps.places.PlacesService(map).search(request, callback) with the same parameters as above in the link the results will differ greatly! For some locations I get more results, for other locations I get less or null results back. I have tried to use a combination out of search (using keyword-parameter) radarSearch (using type atm) nearbySearch (using type atm, too) but these will produce too many results (e.g. banks which don't have atm machines). Also, I'd like to avoid firing three requests where one should suffice. I'd very much like to just use the url from above but that conflicts with the same origin policy. And as far as I can tell google prohibits jsonp in their v3 api standard. So, the question is: Using the current v3 js api of google places: How do I simulate the request that is done by the url above?
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/27169132

http://stackoverflow.com/comment/42672082
comment on: http://stackoverflow.com/q/27081234
type: QuestionComment
has text: @ThomasBormans Oh, let me get a new link for that then.
score: 0
type: Comment

http://stackoverflow.com/q/27029260
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27029387
score: 0
answer count: 1
has body: In the following, each element in "rows" has a jQuery .data('tag') value. var rows = $('#availableTagsTable &gt; tbody tr').has('td input:checked'); var usedTagRows = $('#usedTagsTable &gt; tbody tr'); $.merge(usedTagRows, rows); rows.remove(); After execution of $.merge() the elements in both "rows" and "usedTagRows" have the data('tag') value. However, after execution of rows.remove() the elements added to usedTagRows no longer have the data('tag') value. How do I select elements w/ a .data() value, merge those elements into another set of elements, then remove the original elements, and retain the .data() values?,
has comment: http://stackoverflow.com/comment/42581784
accepted answer: http://stackoverflow.com/a/27029387
has comment: http://stackoverflow.com/comment/42581304
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42581495
has title: How to preserve jQuery element data values when using $.merge()
has comment: http://stackoverflow.com/comment/42581395
type: Question
has comment: http://stackoverflow.com/comment/42581256
has comment: http://stackoverflow.com/comment/42581864

http://stackoverflow.com/q/27073538
type: UnansweredQuestion
tagged with: forms
has answer: http://stackoverflow.com/a/27073594
type: Question
has answer: http://stackoverflow.com/a/27108567
tagged with: javascript
tagged with: blueimp
score: 0
answer count: 2
has body: I am trying to pass an extra parameter to the blueimp file upload. And I tried using the file upload submit event: $('#fileupload').bind('fileuploadsubmit', function (e, data) { // The example input, doesn't have to be part of the upload form: var input = $('#input'); data.formData = {example: input.val()}; if (!data.formData.example) { data.context.find('button').prop('disabled', false); input.focus(); return false; } }); However I have no idea where that extra parameter is being passed to and how to access that extra paremeter? What I am trying to achieve is to assign a unique id to each row when the files are uploaded in the UI version. Any suggestions?
tagged with: jquery
tagged with: file-upload
has title: BlueImp File upload extra parameter

http://stackoverflow.com/q/27036485
downvote count: 0
has answer: http://stackoverflow.com/a/27038104
tagged with: jquery
has comment: http://stackoverflow.com/comment/42593400
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42593439
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/27036565
type: Question
tagged with: javascript
has body: OK, I have this html structure Name I wanted to send this table via email which will be no problem, the problem I am facing is if I send it exactly as what it is, its a bit wrong since there is an input element So my plan is I will replace that inputs with the plain value only and I can achieve this using the following code : $( ".myname" ).each(function( index ) { var name = this.val(); this.closest(".container").html(name); }); That would work if we are talking about the actual page but I don't want to alter the actual page so I came up with this : var html = jQuery("#list").html(); html = jQuery.parseHTML(html); Now, how can I do the same thing in the html variable?
has title: altering the parsed html of jQuery
answer count: 2

http://stackoverflow.com/comment/42731843
type: QuestionComment
has text: Because it doesn't, by you can prevent form loading, like this 'click form':function(e){e.preventDefault(); } and you have plenty tutorials how to get data form html via meteor
score: 0
comment on: http://stackoverflow.com/q/27113837
type: Comment

http://stackoverflow.com/a/27146541
score: 1
upvote count: 1
has body: Since it seems your starting values are strings, the easiest way is to parse the values and create a new date object with the right parameters using string methods. Below is an example code with the data you provided : function testDate(){ var date = convertToDate("2014-11-26", "09"); Logger.log(date); } function convertToDate(dateString,timeString){ var dateData = dateString.split("-"); var hour = Number(timeString); var date = new Date(new Date().setFullYear(dateData[0],dateData[1]-1,dateData[2])).setHours(hour,0,0,0); return new Date(date); } The date object is directly useable in the calendar event creation method.
answers question: http://stackoverflow.com/q/27145916
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/27145916

http://stackoverflow.com/q/27037565
upvote count: 1
has body: I am trying to color code my table using bootstrap. The table implements four different classes for showing the booking status which is retrieved from the database using ajax. I am appending the table rows dynamically to the table. I want my rows to change color based on the 'status' value retrieved from the database. If it is "Waiting" it has to add "warning" class to the row, if it is "Confirmed" it should add "info", if it is "success" it has to add "success"and finally it has to add "danger" for cancelled bookings. I have done the the part for cancel Booking which changes the row color to red when the user clicks cancel button. But i want to add these classes to appended to the current rows when i am populating the table data... Pls help.Thanks in advance... $("#searchMobile").keyup(function(){ if( $("#searchMobile").val().length == 10 ) { console.log("Entering searchMobile...."); $.ajax({ url: "/customerDetails", dataType: "json", data: {mobileNumber: $("#searchMobile").val()}, success: function(response) { var name,id,address; console.log(response); for ( var i = 0; i < response.length; i++ ) { name = response[i].nameBooking; id = response[i].customerId; address = response[i].pickuplocation; status = response[i].status; console.log("Iterating : " + i + " status: " + status); var $line = $( " " ); $line.append( $( " " ).html( i + 1 ) ); $line.append( $( " " ).html( response[i].date ) ); $line.append( $( " " ).html( response[i].bookingId ) ); $line.append( $( " " ).html( response[i].datepicker ) ); $line.append( $( " " ).html( response[i].pickuplocation ) ); $line.append( $( " " ).html( response[i].droplocation ) ); $line.append( $( " " ).html( response[i].status ) ); $line.append( $( " " ).html( response[i].cabType ) ); $line.append( $( " " ).html( response[i].cabFare ) ); $line.append( $( " Details " ) ); $line.append( $( " Cancel " ) ); $('#searchTableAppend').append($line); } }); For Cancel Booking function loadcancel() { $(".cancelBooking").click(function()…
accepted answer: http://stackoverflow.com/a/27037722
has comment: http://stackoverflow.com/comment/42595110
has answer: http://stackoverflow.com/a/27037877
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/42595253
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27037877
downvote count: 0
has title: Add classes dynamically to the table based on the variable value
score: 1
favorite count: 0
type: Question
tagged with: twitter-bootstrap
answer count: 2
has answer: http://stackoverflow.com/a/27037722

http://stackoverflow.com/q/27031291
tagged with: http://stackoverflow.com/tag/html
has title: Making table rows generated via JQuery act as onClick page redirects
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27031405
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/27031530
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27031530
has comment: http://stackoverflow.com/comment/42584632
score: 0
answer count: 2
has body: So I am pretty new to JQuery/HTML development of all kinds. Basically I am working on a project where I make an AJAX call that gets a bunch of usernames, dates, etc. regarding Craiglist-like sales that I put into a table format dynamically using JQuery and DOM. I want to be able to make these elements in the table act as links so that if I click on a certain username, it will take me to their profile. I've tried different suggestions out there but none of them are for tables that are generated with JQuery and I think this is causing problems (but I don't think there is any way around that either). Some snippets of my code are as follows: function displayCurrentSales(description, seller, date) { var sale = document.createElement("p"); var table = document.getElementById("currentSalesTable"); var row = table.insertRow(-1); var descriptionRow = row.insertCell(0); var userRow = row.insertCell(1); var dateRow = row.insertCell(2); descriptionRow.innerHTML = description; userRow.innerHTML = seller; userRow.onClick = "window.location.href = '../profilePage/index.html?username=' + seller;"; dateRow.innerHTML = date; } This is my code that I started with except for the userRow.onClick part which I added to try and make it work. Any help is appreciated, Thanks.
accepted answer: http://stackoverflow.com/a/27031405

replace
tags question: http://stackoverflow.com/q/26993855
tags question: http://stackoverflow.com/q/27090575
tags question: http://stackoverflow.com/q/27046799
tags question: http://stackoverflow.com/q/27085199
tags question: http://stackoverflow.com/q/27042038
tags question: http://stackoverflow.com/q/27131346
tags question: http://stackoverflow.com/q/27105755
type: Tag
tags question: http://stackoverflow.com/q/27047794
tag name: replace
tags question: http://stackoverflow.com/q/27129020
tags question: http://stackoverflow.com/q/27052621
tags question: http://stackoverflow.com/q/27054924
tags question: http://stackoverflow.com/q/27009433

http://stackoverflow.com/comment/42559786
comment on: http://stackoverflow.com/q/27017071
type: Comment
has text: Sorry, my dodgy explanation at fault, should be n % 6 != 0, which would select 1000 and omit 200.
score: 0
type: QuestionComment

http://stackoverflow.com/q/27000366
has answer: http://stackoverflow.com/a/42609532
linked to: http://stackoverflow.com/q/26620660
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27001375
upvote count: 3
has comment: http://stackoverflow.com/comment/42535560
type: Question
has title: AngularJS : check if a model value has changed
score: 3
linked to: http://stackoverflow.com/q/14849857
accepted answer: http://stackoverflow.com/a/27001375
has comment: http://stackoverflow.com/comment/42530960
has answer: http://stackoverflow.com/a/42608300
answer count: 3
downvote count: 0
tagged with: javascript
has body: IS there a way to check a dirty flag on the model itself, independent of the view? I need the angular controller to know what properties have been changed, in order to only save changed variables to server. I have implemented logic regarding if my entire form is dirty or pristine, but that is not specific enough I could just slap a name and ng-form attribute on every input, to make it recognizable as a form in the controller, but then I end up with a controller that is strongly coupled with the view. Another not-so appealing approach is to store the initial values that every input is bound to in a separate object, then compare the current values with the initial values to know if they have changed. I checked Monitor specific fields for pristine/dirty form state and AngularJS : $pristine for ng-check checked inputs
favorite count: 0
possible better answer: http://stackoverflow.com/a/42608300
tagged with: angularjs
linked to: http://stackoverflow.com/q/26702124

http://stackoverflow.com/comment/42772125
has text: added `...> ` to select.html in my plunkr, and didn't conflict with any CSS. Amazingly quick fix.
type: AnswerComment
comment on: http://stackoverflow.com/a/27121646
score: 0
type: Comment

http://stackoverflow.com/comment/42698054
type: Comment
score: 0
comment on: http://stackoverflow.com/a/27087259
type: AnswerComment
has text: I think the first test is sufficient and as reliable as is possible.

http://stackoverflow.com/comment/42692743
score: 1
comment on: http://stackoverflow.com/q/27093415
has text: use || for or not just | one
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42574547
score: 0
type: Comment
type: QuestionComment
has text: @Invent-Animate No worries - no idea whats happening below.
comment on: http://stackoverflow.com/q/27025354

http://stackoverflow.com/q/27063225
has comment: http://stackoverflow.com/comment/42640492
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27064735
has title: insert data into specific column cell using datatables jquery
has comment: http://stackoverflow.com/comment/42640400
has comment: http://stackoverflow.com/comment/42640869
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27064735
has body: I've searched into the documentation of data tables of how one can add data to the table here https://datatables.net/examples/data_sources/index.html but no where I could find a way to insert data into a single cell for a given column. For example, I need sth like: "columns": [ {target (0), "value which will be inserted"} ] There is a way to inser data from an array but each section of the array contains values for the whole row ( see here https://datatables.net/examples/data_sources/js_array.html) but I need to insert data into different cells in respect with the columns since I don't know the column labels initially. This is because the data will be in json format and first I need to extract the unique dates for each json object. These will be my column headers. And then for each of the objects based on its date I need to put it into the relevant date column. So the logic should be sth like: if this date column (from the table) == json object date then put it there Thanks
has comment: http://stackoverflow.com/comment/42640729
tagged with: datatables
answer count: 1
favorite count: 0
type: AnsweredQuestion
upvote count: 2
score: 1

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/27014849
tags question: http://stackoverflow.com/q/27029555
tag name: sequelize.js
tags question: http://stackoverflow.com/q/27065154
tags question: http://stackoverflow.com/q/27151258

http://stackoverflow.com/q/27114282
has body: I'm trying to test a JavaScript function nested within a jQuery function using Jasmine in a Rails application as follows: jQuery (function () { var javascriptFunction = function () { ...functionality being tested... } } When I run the Jasmine test, I get the following error: "ReferenceError: Can't find variable: javascriptFunction" If I place the JavaScript function outside of the jQuery function, I no longer receive that error; however, that JavaScript function needs to remain within the jQuery function in order for the rest of the application to work. Is there a way to specify to Jasmine to look for the JavaScript function within the jQuery function?
has comment: http://stackoverflow.com/comment/42733117
has comment: http://stackoverflow.com/comment/42733274
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27135596
has comment: http://stackoverflow.com/comment/42732199
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/42732029
has title: Test Javascript Function Wrapped in jQuery using Jasmine
has comment: http://stackoverflow.com/comment/42732400
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/42732178
answer count: 1
has answer: http://stackoverflow.com/a/27135596
tagged with: jquery
has comment: http://stackoverflow.com/comment/42759162
tagged with: jasmine

http://stackoverflow.com/comment/42691976
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27092250
has text: @PhilipAdler I updated the question with JSFiddle. There you can see the VM*xxxx* file.
score: 0

http://stackoverflow.com/a/27124126
has comment: http://stackoverflow.com/comment/42749608
has comment: http://stackoverflow.com/comment/42750150
type: Answer
answers question: http://stackoverflow.com/q/27123911
has comment: http://stackoverflow.com/comment/42748541
has comment: http://stackoverflow.com/comment/42749304
has body: Please try this out:
score: 0
has comment: http://stackoverflow.com/comment/42749214

http://stackoverflow.com/comment/42775167
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27138311
score: 0
has text: Is the [pod structure](http://www.ember-cli.com/#pod-structure) of Ember CLI pod structure what you're looking for? I believe this will support what you're looking for.

http://stackoverflow.com/comment/42834634
type: Comment
has text: In jsp (cart shopping) i have a list of Articles . I scan the list with foreach tag and with your code i can update only the first article, which is on top of the list .The articles from the second to the last are not updated
comment on: http://stackoverflow.com/a/27149059
type: AnswerComment
score: 0

http://stackoverflow.com/q/27020189
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42566235
score: 0
tagged with: javascript
has body: i have a table where the first row are all text inputs sharing the same class name. i would like to set a validation so that user only enters float numbers. Does anyone know what i may be missing on the following code? $('input.' + classname) or $('.classname) doesn't fire any event when calling floatTextField() function HTML code: &lt;td&gt;&lt;div class="input-group"&gt;&lt;input type="text" class="form-control myclass" value="2.8"&gt;&lt;/div&gt; &lt;/td&gt; JavaScript code: floatTextField('myclass'); function floatTextField(classname) { $('input.' + classname).keypress(function (event) { var charCode = (event.which) ? event.which : event.keyCode; if (event.which == 0)//common keys return true; var value = $(this).val(); if (charCode == 45 &amp;&amp; value.indexOf('-') != -1) { return false; } else if (charCode == 46 &amp;&amp; value.indexOf('.') != -1) return false; else if (charCode != 46 &amp;&amp; charCode != 45 &amp;&amp; charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57)) return false; return true; }); $('input.' + classname).keyup(function (event) { var value = $(this).val(); if (value &lt;= 0 &amp;&amp; value.indexOf('.') == -1 &amp;&amp; value.indexOf('-') == -1) { $(this).val(''); } if (value.indexOf('-') &gt; 0) { value = value.replace('-', ''); $(this).val(value); } }); $('input.' + classname).change(function (event) { var value = $(this).val(); if (value.indexOf('.') == 0) { value = '0' + value; $(this).val(value); } }); }
has title: keypress,keyup and change events on inputs with same class name
type: Question
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/27020274

http://stackoverflow.com/comment/42603439
type: AnswerComment
score: 0
has text: Yeah agreed wait time is a must, but thanks for your assistance :)
type: Comment
comment on: http://stackoverflow.com/a/27042065

http://stackoverflow.com/comment/42726000
type: AnswerComment
type: Comment
has text: Is there a method such that I can pass a variable to an HTML property? I'd rather not have 10 or more CSS classes for each score, but alter the image dynamically.
comment on: http://stackoverflow.com/a/27111530
score: 0

http://stackoverflow.com/comment/42688915
has text: @code-jaff Is this a solution that works only in Mozilla Firefox? Because I tried the example (of the site) in Google Chrome and nothing happened.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27090102

http://stackoverflow.com/comment/42580822
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27028868
type: QuestionComment
has text: Path is coming from URL

http://stackoverflow.com/comment/42697461
comment on: http://stackoverflow.com/a/27095787
type: Comment
has text: the line alert(testfunct) produces the function code as a string, that the original assignment makes, in the alert dialog.
score: 0
type: AnswerComment

http://stackoverflow.com/q/27102746
answer count: 1
downvote count: 0
favorite count: 0
has body: I am writing a JavaCC-based parser for JavaScript (ECMAScript 5.1) and have an interesting corner case with regular expressions. Here it is. Consider the following statement: {}/a/g My question: From the specification point of view, should it be interpreted as ObjectLiteral divided by Identifier a divided by Identifier b or Block followed by RegularExpressionLiteral /a/g? For instance, Chrome interprets it as the latter and other parsers as well. From the specification point of view, is /a/g in {}/a/g a regex or a division? Here is what I think to be a relevant part of the specification: There are no syntactic grammar contexts where both a leading division or division-assignment, and a leading RegularExpressionLiteral are permitted. Quoting another answer on the relevant question: The division operator must follow an expression, and a regular expression literal can't follow an expression, so in all other cases you can safely assume you're looking at a regular expression literal. My understanding is that {} is an expression. ObjectLiteral, even an empty one is a PrimaryExpression. So the following /a/g must be a division, not a regular expression literal. Or am I wrong with this?
linked to: http://stackoverflow.com/q/5519596
upvote count: 1
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42710512
has answer: http://stackoverflow.com/a/27103543
score: 1
type: Question
tagged with: grammar
has title: Is /a/g in {}/a/g a regex or a division?
tagged with: ecmascript-5
tagged with: javascript
tagged with: language-lawyer
accepted answer: http://stackoverflow.com/a/27103543

http://stackoverflow.com/q/27149647
linked to: http://stackoverflow.com/q/2082129
type: Question
has title: How to implement a Google Adwords "conversion pixel" using ajax on a submit button (no "thank you" page)
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/27149886
has answer: http://stackoverflow.com/a/38788268
tagged with: google-ads-api
favorite count: 0
has answer: http://stackoverflow.com/a/27149886
upvote count: 21
has answer: http://stackoverflow.com/a/50461376
answer count: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/38788268
has body: I want to implement an adwords "conversion pixel" script - this is the script: &lt;!-- Google Code for General_Lead Conversion Page --&gt; &lt;script type="text/javascript"&gt; /* &lt;![CDATA[ */ var google_conversion_id = 000; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "hahaha"; var google_remarketing_only = false; /* ]]&gt; */ &lt;/script&gt; &lt;script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"&gt; &lt;/script&gt; &lt;noscript&gt; &lt;div style="display:inline;"&gt; &lt;img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/975247275153/?label=IiuoCNO17lcQgZ2P0QM&amp;amp;guid=ON&amp;amp;script=0"/&gt; &lt;/div&gt; &lt;/noscript&gt; to a contact form on my website which doesn't lead to a "thank you" page. This is my submit form code. (The validation isn't 100% done :P ) // Send button for the "contact form". $('#sendBtn').click(function(){ //get info var fullname = $("#fullname").val(); var email = $("#email").val(); var text = $("#text").val(); //send info to php $.ajax({ beforeSend: function() { if ( IsEmail(email) == false) { $('#aboutUnsuccess').show("slow"); $('#contactform').hide("slow"); } }, url: 'http://www.example.com/contact.php', type: "POST", data: ({ "fullname": fullname, "email": email, "text": text }), success: function (results){ if ( IsEmail(email) == true) { //hide table $('#contactform').hide('slow', function() { $('#contactform').hide( "slow" ); }); //show textboxes $('#aboutSuccess').show("slow"); } } }); }); I tried using .append that I found out it doesn't work after googleing. and tried to follow this post: How to track a Google Adwords conversion onclick? - which didn't work too
score: 21
has answer: http://stackoverflow.com/a/48646174

http://stackoverflow.com/q/27072187
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27253447
answer count: 3
tagged with: ruby-on-rails-4
has answer: http://stackoverflow.com/a/27213906
has title: How do I fire another modal when a button is pressed on the current modal?
favorite count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/27084201
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/27253447
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27084201
has comment: http://stackoverflow.com/comment/42736590
type: Question
linked to: http://stackoverflow.com/q/15395105
score: 5
has comment: http://stackoverflow.com/comment/42714626
has body: So I have a modal that has a form. When the 'submit' button is pressed on that modal, I want another modal to be executed. How do I do that? This is my first modal - views/shared/_upload_video_popup.html.erb: &lt;div id="overlay"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="popup" id="add-video-step-1"&gt; &lt;div class="titles clearfix"&gt; &lt;h2&gt;Upload a Video&lt;/h2&gt; &lt;p&gt;&lt;i&gt;Step 1 of 2 - TEST&lt;/i&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="content"&gt; &lt;% if @family_tree %&gt; &lt;%= simple_form_for([@family_tree, @video], :remote =&gt; true) do |f| %&gt; &lt;div class="column"&gt; &lt;div class="f-row"&gt; &lt;%= f.input :title, label: "Title:" %&gt; &lt;/div&gt; &lt;div class="f-row"&gt; &lt;%= f.input :description,label: "Description:" %&gt; &lt;/div&gt; &lt;div class="f-row"&gt; &lt;%= f.input :circa, as: :datepicker, start_year: Date.today.year - 5, label: "Circa:" %&gt; &lt;/div&gt; &lt;div class="f-row"&gt; &lt;label for="family"&gt;Family in this video:&lt;/label&gt; &lt;%= f.collection_select :user_ids, @family_tree.members.order(:first_name), :id, :first_name, {}, {multiple: true} %&gt; &lt;/div&gt; &lt;/div&gt; &lt;%= f.button :submit, "Add Video", id: "video-submit" %&gt; &lt;% end %&gt; &lt;% end %&gt; &lt;/div&gt; &lt;!-- //content --&gt; &lt;/div&gt; &lt;!-- //popup --&gt; That is executed by this button: &lt;%= link_to "&lt;i class='fa fa-film fa-lg'&gt;&lt;/i&gt; Upload".html_safe, "#", class: "upload popupbox", data: { popup: "add-video-step-1"} %&gt; When the f.button :submit, "Add Video", id: "video-submit" is hit, I want this modal to be executed: views/videos/upload.html.erb &lt;div class="bootstrap-styles"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt; &lt;h3 id="myModalLabel"&gt;Upload your Video&lt;/h3&gt; &lt;p&gt;&lt;i&gt;Step 2 of 2 - TEST&lt;/i&gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="form"&gt; &lt;…
linked to: http://stackoverflow.com/q/22281918
upvote count: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/42726045

http://stackoverflow.com/a/27619301
type: Answer
has body: I think You can use File Reader object to read file data dynamically Refer: https://developer.mozilla.org/en-US/docs/Web/API/FileReader Also you can use FormData object to create file objcet or any other form data dynamically Refer: https://developer.mozilla.org/en-US/docs/Web/API/FormData Solution: On selecting a file, you can read the file using file reader object and append to form data using the form data object. Refer: https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications
answers question: http://stackoverflow.com/q/27095190
score: 0

http://stackoverflow.com/comment/42754534
has text: adding fit layout to my component that is inside the Dashboard panel seems to have no affect other than the horizontal fit. thanks for the suggestion I'll continue to try fit some more.
comment on: http://stackoverflow.com/q/27108078
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/27003514
has comment: http://stackoverflow.com/comment/42537205
answers question: http://stackoverflow.com/q/27003355
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/27003355
has body: That is some strange case mixing for class names and function names. To each their own, I suppose. Anyway! I think you might want .clone() var newDiv = $('#SHOW-DISPLAY-k').clone(); // do whatever, ex: give it a new id and append it to body newDiv.attr('id', 'SHOW-DISPLAY-x'); $('body').append(newDiv); Though I'm not sure I 100% understood your question. Does this accomplish what you're trying to do?
has comment: http://stackoverflow.com/comment/42537058
type: Answer
has comment: http://stackoverflow.com/comment/42537287
has comment: http://stackoverflow.com/comment/42537240

http://stackoverflow.com/comment/42824562
comment on: http://stackoverflow.com/a/27147511
score: 0
type: AnswerComment
has text: We will work on the GitHub issue you posted, see https://github.com/highslide-software/highcharts.com/issues/3622.
type: Comment

http://stackoverflow.com/comment/42747683
type: Comment
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65582/discussion-between-biz-dev-and-gillesc).
comment on: http://stackoverflow.com/q/27123191
score: 0

http://stackoverflow.com/q/27138638
has answer: http://stackoverflow.com/a/27138712
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9803947
has body: I have a few strings strings = [ "String", "Object", "Boolean" ] and I would like to use them to declare new objects for(var i = 0; i &lt; strings.length; i++){ var x = new strings[i]; } but instead I get this error: TypeError: string is not a function at Object.&lt;anonymous&gt; (/Users/path/code.js) at Object.&lt;anonymous&gt; (/Users/path/code.js) at Module._compile (module.js:456:26) How can I treat strings as their underlying types? Aside: I know that I could do something like type_map = { String: String, Object: Object, Boolean: Boolean } and then go for(var i = 0; i &lt; strings.length; i++){ var x = new type_map[strings[i]]; } which works, but I'm looking for something slightly more elegant if it exists.
type: Question
has comment: http://stackoverflow.com/comment/42775252
tagged with: javascript
tagged with: string
has comment: http://stackoverflow.com/comment/42775223
has answer: http://stackoverflow.com/a/27138750
score: 0
has comment: http://stackoverflow.com/comment/42775291
answer count: 3
tagged with: types
has title: How to get data type from string javascript
has comment: http://stackoverflow.com/comment/42775748
has answer: http://stackoverflow.com/a/27138700

http://stackoverflow.com/q/27082445
has answer: http://stackoverflow.com/a/27082713
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27082738
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: count
score: 0
has comment: http://stackoverflow.com/comment/42674300
has title: From an API call, how can I grab a field and see how many times that value is being repeated?
has body: Code: var textArray = new Array(); var allText = results.data._contained.text; for (var i = 0; i &lt; allText.length; i++) { var text1 = allText[i]; var textHtml = "&lt;div id='text_item'&gt;"; textHtml += "&lt;span class='some_div'&gt;{0}&lt;/span&gt;".replace("{0}", text1.text_is); textHtml += "&lt;/div&gt;"; textArray.push(text1.texts.priority); $("#text_box").append(textHtml); } if (foo === 'Some text') { document.write("match"); } else { document.write("not match"); } } I have the above logic which is working fine but I am stuck on something I haven't done before. This is what I want to do: The span .some_div will contain string values. What I want to do is count how many times the same value repeats. How can I do that? Example: let's the say the value is "Medicine" and it repeats 10 times in independently in .some_div. How can I return a count of how many times it has repeated?

http://stackoverflow.com/comment/42532589
type: Comment
type: QuestionComment
has text: Since people here don't seem to like your question and keep downvoting without any comments, feel free to post your question in our StackOverflow chat room for genuine help. http://chat.stackoverflow.com/rooms/65162/javascript-jquery-html-and-css
score: 1
comment on: http://stackoverflow.com/q/27001252

http://stackoverflow.com/a/27113792
has comment: http://stackoverflow.com/comment/43894994
downvote count: 0
has body: A more JavaScripty like solution, eliminating the need for a switch, could look like this: var _ = require("lodash"); var body = [Game.WORK, Game.CARRY, Game.MOVE, Game.TOUGH]; var bodyCost = { "move": 50, "carry": 50, "work": 20, "heal": 200, "tough": 20, "attack": 80, "ranged_attack": 150 }; var cost = 0; _.forEach(body, function(part) { cost += bodyCost[part]; }); console.log("Cost of construction: " + cost); In fact, I'm going to use this thing for my own creepfactory to calculate cost. Thanks for figuring out the various costs :)
answers question: http://stackoverflow.com/q/27101080
type: Answer
has comment: http://stackoverflow.com/comment/44634881
upvote count: 7
has comment: http://stackoverflow.com/comment/73493730
score: 7
has comment: http://stackoverflow.com/comment/43747357

http://stackoverflow.com/q/27143404
has answer: http://stackoverflow.com/a/27143441
accepted answer: http://stackoverflow.com/a/27143441
tagged with: javascript
possible better answer: http://stackoverflow.com/a/27143436
tagged with: scope
has answer: http://stackoverflow.com/a/27143436
score: 0
has comment: http://stackoverflow.com/comment/42783315
answer count: 2
duplicate of: http://stackoverflow.com/q/14220321
has title: riptscope of a variable in jQuery
tagged with: jquery
linked to: http://stackoverflow.com/q/14220321
tagged with: ajax
has body: I have following AJAX. And what I need to do is to use the variable tax_rate outside of $.ajax call. My ajax call is working properly since the variable tax_rate shows proper value in [1], but the variable becomes useless in [2]. Am I doing something wrong with variable scope? &lt;script&gt; jQuery(document).ready(function($) { $(document).on('blur','#form',function() { var subsum = 0; var tax_rate = 0; var tax_amount = 0; $('.form-row').each(function() { // calculate sums and totals per each form-row subsum = Number( $(this).find('.unit').val() * $(this).find('.price').val() ).toFixed(2); $(this).find('.subsum').empty().val(subsum); // calculate tax amount var tax_id= $(this).find('.tax_code').val(); var ajaxurl = '&lt;?php echo admin_url('admin-ajax.php'); ?&gt;'; // call ajax to retrieve the tax rate $.ajax({ url: ajaxurl, data:' action=get_tax_rate_by_id&amp;tax_id='+tax_id, type:'GET', success:function(results) { tax_rate = results; alert( tax_rate ); // [1] Obviously, this one properly alerts tax rate. } }); alert( tax_rate ); // [2] This one always alerts 0. }); }); });
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/42645374
type: QuestionComment
comment on: http://stackoverflow.com/q/27065659
has text: @Pointy, code is added.
score: 0
type: Comment

http://stackoverflow.com/a/27085936
type: Answer
has comment: http://stackoverflow.com/comment/42699456
has body: In order to treat your playlist elements as objects, you need to wrap them with brackets instead of quotes. The final array output should look like this: [ {"title":"Song1","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song1.mp3"}, {"title":"Song2","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song2.mp3"}, {"title":"Song3","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song3.mp3"}, {"title":"Song4","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song4.mp3"}, {"title":"Song5","artist":"Choir","mp3":"C:\xampp\htdocs\media\Song5.mp3"} ] Also, I'm not sure how you're preparing the file paths, but you should know that \ is an escape character in JavaScript. You have to either "escape the escape character" by using \\ instead, or else use the escape() and unescape() functions to convert the file paths.
has comment: http://stackoverflow.com/comment/42780157
has comment: http://stackoverflow.com/comment/42693506
score: 0
answers question: http://stackoverflow.com/q/27085811
has comment: http://stackoverflow.com/comment/42698110
has comment: http://stackoverflow.com/comment/42738590

http://stackoverflow.com/comment/47280999
has text: @Ciwan For that circumstance, I would use the `trueSize` parameter approach instead. See here: http://deepliquid.com/content/Jcrop_Sizing_Issues.html
type: Comment
comment on: http://stackoverflow.com/a/27152639
score: 2
type: AnswerComment

http://stackoverflow.com/comment/42738171
has text: See also http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27117850
type: Comment

http://stackoverflow.com/comment/42570269
type: Comment
type: QuestionComment
has text: i given require commands.. But its not working. @rejnev
score: 0
comment on: http://stackoverflow.com/q/27021399

http://stackoverflow.com/q/27015151
has title: Applying Javascript classes to generated content before it is applied to DOM
has answer: http://stackoverflow.com/a/27015312
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42555932
tagged with: javascript
tagged with: jquery
tagged with: class
score: 0
accepted answer: http://stackoverflow.com/a/27015312
has body: I have a situation whereas I am generating content (video links) via an AJAX call in a Javascript Object. Once this content is returned from the backend, an HTML string is generated and appended to the current HTML in the DOM. This HTML string contains video links wrapper in a 'div'. I need to apply a new Javascript object to each of these new generated divs and have done so using the following code: if(response.videos.length != 0) { jQuery(response.videos).each(function(key, video) { self.html += " "; self.html += ''; self.html += ' '; self.html += ' ' + video.videoName + ' '; self.html += ' ' + video.videoDesc + ' '; self.html += ' Equipment: '; self.html += " "; ......................................MORE CODE self.html += " "; self.html += ' '; self.html += " "; newRatingArrayKey.push("#" + self.relatedDiv + " div[data-related-video=" + video.videoId + "] .video-rating"); }); jQuery("#" + jQuery(self.element).attr("data-related") + " .col-md-8").append(self.html); jQuery(newRatingArrayKey).each(function(key, element) { element = jQuery(element); newRatingObject[key] = new Rater(element, jQuery(element).attr("data-rel"), jQuery(element).find(".star"), jQuery(element).attr("data-user-id")); }); } As you can see, after I have generated the new HTML string, I add this to the DOM then loop through the new divs to apply the 'rater' class to them. My question is, is there a way to apply the 'rater' class to each new generated div before it gets applied to the DOM? It just makes me think the page may be open to error if something fails between the new content being added and the rater class being applied to the new content. Thanks!
has comment: http://stackoverflow.com/comment/42555928
type: AnsweredQuestion
tagged with: oop

http://stackoverflow.com/q/27116166
score: 0
has comment: http://stackoverflow.com/comment/42740244
has body: I have a website that's mostly generated via PHP and uses the jQuery library (v1.11.1). My problem is that I would like to link to anchor tags that are generated dynamically on separate pages. For example, I have the following link on index.php?page=Home: &lt;A HREF="http://URLhere/index.php?page=ABC#firstItem"&gt;&lt;/a&gt; And on the page that's loaded when $_GET[page] == "ABC," I have the anchor: &lt;a name="firstItem"&gt;&lt;/a&gt; So far, so good. But when I try to click the link, it redirects to the page without jumping to the anchor. The same behaviour happens if I click Reload. However, if I enter the URL directly into the browser window, it DOES jump to the anchor. I've found that the problem goes away if I delete the "function detach()" from the jQuery file, but then some other libraries that I've loaded fail to work. Any suggestions?
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/42739164
answer count: 0
has comment: http://stackoverflow.com/comment/42735195
has title: Using Javascript to redirect to an anchor
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27097384
has comment: http://stackoverflow.com/comment/42712710
has body: I'm trying to get stack traces in Angular which tell me where I went wrong. Instead, I simply get a list of where the error propagated through Angular. Sometimes the error message helps, but not always, but that's beside the point for me: I want to know the exact line number, as well as the file name, where my code bugged out. For example, here is a typical Firebug message: Error: [ng:areq] Argument 'TackleController' is not a function, got undefined http://errors.angularjs.org/1.3.3/ng/areq?p0=TackleController&amp;p1=not%20a%20function%2C%20got%20undefined minErr/&lt; @http:// localhost:63342/fishing/bower_components/angular/angular.js:63:12 assertArg@http:// localhost:63342/fishing/bower_components/angular/angular.js:1560:1 assertArgFn@http:// localhost:63342/fishing/bower_components/angular/angular.js:1570:1 $ControllerProvider/this.$get&lt; /&lt;@http:// localhost:63342/fishing/bower_components/angular/angular.js:8347:9 nodeLinkFn/&lt;@http:// localhost:63342/fishing/bower_components/angular/angular.js:7517:34 forEach@http:// localhost:63342/fishing/bower_components/angular/angular.js:330:11 nodeLinkFn@http:// localhost:63342/fishing/bower_components/angular/angular.js:7504:11 compositeLinkFn@http:// localhost:63342/fishing/bower_components/angular/angular.js:7003:13 compositeLinkFn@http:// localhost:63342/fishing/bower_components/angular/angular.js:7006:13 publicLinkFn@http:// localhost:63342/fishing/bower_components/angular/angular.js:6882:30 bootstrapApply/&lt; @http:// localhost:63342/fishing/bower_components/angular/angular.js:1439:11 $RootScopeProvider/this.$get&lt; /Scope.prototype.$eval@http:// localhost:63342/fishing/bower_components/angular/angular.js:14204:16 $RootScopeProvider/this.$get&lt; /Scope.prototype.$apply@http:// localhost:63342/fishing/bower_components/angular/angular.js:14302:18 bootstrapApply@http:// localhost:63342/fishing/bower_components/angular/angular.js:1437:9 invoke@http:// localhost:63342/fishing/bower_components/angular/angular.j…
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/55945316
tagged with: stack-trace
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42700315
tagged with: firebug
has answer: http://stackoverflow.com/a/28156497
favorite count: 0
has comment: http://stackoverflow.com/comment/42700235
tagged with: angularjs
type: UnansweredQuestion
has title: Firebug: Angular stack traces do not show the source of the error(line number, file)

http://stackoverflow.com/a/32947181
has body: The easier way for me was: Run project(F5) in Firefox (or any other browser, not IE). Copy adress. Close Firefox (project will keep running, atleast did in myn). Open IE and input address manually (ex: http://localhost:58100/) by pasting what you copied in '2.'. IE Debugger should work at this point.
type: Answer
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/67635527
upvote count: 6
answers question: http://stackoverflow.com/q/27127606

http://stackoverflow.com/q/27047510
type: AnsweredQuestion
tagged with: gulp-inject
possible better answer: http://stackoverflow.com/a/46604433
upvote count: 7
has answer: http://stackoverflow.com/a/46604433
type: Question
has answer: http://stackoverflow.com/a/27059237
score: 7
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27059237
answer count: 2
has body: I am trying to use both gulp-watch and gulp-inject to build my Node Web app. However, it seems that the build step involving gulp-inject won't work once gulp-watch gets involved. Seemingly, the reason is that the watch stream never ends and gulp-inject doesn't know when to start. My gulpfile looks as follows: var gulp = require('gulp') var inject = require('gulp-inject') var sass = require('gulp-sass') var path = require('path') var bower = require('gulp-bower') var bowerFiles = require('main-bower-files') var react = require('gulp-react') var watch = require('gulp-watch') var plumber = require('gulp-plumber') var bowerDir = './bower_components/' gulp.task('bower', function () { return bower() }) gulp.task('default', function () { var css = watch('./stylesheets/*.scss') .pipe(plumber()) .pipe(sass({ includePaths: [ bowerDir + 'bootstrap-sass-official/assets/stylesheets', ] })) .pipe(gulp.dest('./public/css')) var jsxFiles = watch(['./jsx/about.js', './jsx/home.js', './jsx/app.js']) .pipe(plumber()) .pipe(react()) .pipe(gulp.dest('./public/js')) var bowerJs = gulp.src(bowerFiles(), {read: false}) watch('./views/index.html') .pipe(plumber()) // Does not produce output - presumably because watch source hasn't ended its stream .pipe(inject(css)) .pipe(inject(bowerJs, {name: 'bower'})) .pipe(inject(jsxFiles, {name: 'jsx'})) .pipe(gulp.dest('./public/html')) }) How can I successfully combine gulp-watch and gulp-inject? You can see my full project on GitHub.
downvote count: 0
tagged with: gulp
favorite count: 0
tagged with: gulp-watch
has title: How to combine gulp-watch and gulp-inject?
tagged with: node.js

http://stackoverflow.com/comment/42596991
score: 1
has text: What are you expecting `closest()` to do here???
comment on: http://stackoverflow.com/q/27038690
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27024567
type: Answer
has body: in your module just do module.exports = { mySetter: function (value) {...}, myGetter: function () {return ...} }; and than you can use your module everywhere like var myModule = require('my-module); myModule.mySetter(...) myModule.myGetter(...) and so on.... or maybe i didn't understand the question.
score: 0
answers question: http://stackoverflow.com/q/27024447

http://stackoverflow.com/comment/42677277
type: AnswerComment
comment on: http://stackoverflow.com/a/27084105
score: 0
type: Comment
has text: Maybe but it appears he wants the js variable to contain that, and not just echo it out

http://stackoverflow.com/comment/42733138
has text: Create a JS fiddle and people may be able to help easier http://jsfiddle.net/
type: Comment
comment on: http://stackoverflow.com/q/27115146
score: 0
type: QuestionComment

http://stackoverflow.com/a/27133931
type: Answer
answers question: http://stackoverflow.com/q/27133479
has body: If you want a progressbar to fill up to a certain value, try the following: HTML: &lt;div class="progressbar"&gt;&lt;div class="progress"&gt;&lt;/div&gt;&lt;/div&gt; CSS: .progressbar { height: 30px; position: relative; border: 1px solid #ccc; } .progressbar .progress { position: absolute; height: 30px; left: 0; top: 0; width: 0%; transition: width 0.3s ease-out; background: #f00; } JS: document.getElementsByClassName('progress')[0].style.width = '10%'; If you call the above JS line at the bottom of the page (right before &lt;/body&gt;) it should work like a charm :)
has comment: http://stackoverflow.com/comment/42784145
has comment: http://stackoverflow.com/comment/42784695
score: 0

http://stackoverflow.com/a/27071254
answers question: http://stackoverflow.com/q/27070426
upvote count: 3
has comment: http://stackoverflow.com/comment/42655825
type: AcceptedAnswer
has body: There are a few issues: You've stored numeric data as strings. While trying to find a solution, I had to strip the "'s off the temperature and wind speed values or I'd get Highcharts Error #14 You have two data series, yet you are only creating one object in options.series. You should be creating two series objects and adding them to the options.series array. For the second series, you must specify which y axis to use. In this case yAxis == 1. The max value for your second y axis is too low to display the data. Here's an example to showcase the above: http://jsfiddle.net/6yvdkp20/1/ $(function () { var options = { chart: { renderTo: 'container', type: 'spline', zoomType: 'xy' }, title: { text: 'Temperatura' }, subtitle: { text: '5 dni' }, xAxis: { type: 'datetime', }, yAxis: [ { // Primary yAxis labels: { format: '{value}°C', style: { color: Highcharts.getOptions().colors[1] } }, title: { text: 'Temperature', style: { color: Highcharts.getOptions().colors[1] } }, min: -25, max: 25, }, { // Secondary yAxis title: { text: 'Prędkość wiatru', style: { color: Highcharts.getOptions().colors[0] } }, labels: { format: '{value} m/s', style: { color: Highcharts.getOptions().colors[0] } }, min: 0, max: 200, opposite: true } ], tooltip: { shared: true }, series: [ { data: [ [ "2014-11-19 06:00:00", 1.1 ], [ "2014-11-19 14:00:00", 4.9 ], [ "2014-11-19 15:00:00", 4.9 ], [ "2014-11-19 16:00:00", 4.9 ], [ "2014-11-19 17:00:00", 4.9 ], [ "2014-11-19 18:00:00", 4.9 ] ] },{ yAxis: 1, // This means the second yAxis will be used to plot this series data:[ [ "2014-11-13 23:00:00", 194 ], [ "2014-11-14 00:00:00", 195 ], [ "2014-11-14 01:00:00", 187 ], [ "2014-11-14 02:00:00", 191 ], [ "2014-11-14 03:00:00", 218 ], [ "2014-11-14 04:00:00", 170 ] ] } ] }; $('#container').highcharts(options); }); Since you mentioned in the comments that you cannot change the format of the data you are fetching, you will need to correct the format after receiving the data. The following function should correc…
has comment: http://stackoverflow.com/comment/42655652
has comment: http://stackoverflow.com/comment/42656072
has comment: http://stackoverflow.com/comment/42656847
type: Answer
has comment: http://stackoverflow.com/comment/42672696
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/42656213
accepted answer of: http://stackoverflow.com/q/27070426
has comment: http://stackoverflow.com/comment/42674107

http://stackoverflow.com/a/27112029
accepted answer of: http://stackoverflow.com/q/27073126
answers question: http://stackoverflow.com/q/27073126
has comment: http://stackoverflow.com/comment/67587560
has comment: http://stackoverflow.com/comment/69090060
score: 4
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/50048465
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/69090450
has body: This answer shows how to manually build a multipart/form request body that includes the binary, and that bypasses the standard UTF-8 encoding done by browsers. This is done by passing the entire request as an ArrayBuffer. Here's the code I'm using to resolve the problem (as seen in this answer): // { // Body: base64EncodedData, // ContentType: '', // Additional attachment info (i.e. ParentId, Name, Description, etc.) // } function uploadAttachment (objectData, onSuccess, onError) { // Define a boundary var boundary = 'boundary_string_' + Date.now().toString(); var attachmentContentType = !app.isNullOrUndefined(objectData.ContentType) ? objectData.ContentType : 'application/octet-stream'; // Serialize the object, excluding the body, which will be placed in the second partition of the multipart/form-data request var serializedObject = JSON.stringify(objectData, function (key, value) { return key !== 'Body' ? value : undefined; }); var requestBodyBeginning = '--' + boundary + '\r\n' + 'Content-Disposition: form-data; name="entity_attachment";' + '\r\n' + 'Content-Type: application/json' + '\r\n\r\n' + serializedObject + '\r\n\r\n' + '--' + boundary + '\r\n' + 'Content-Type: ' + attachmentContentType + '\r\n' + 'Content-Disposition: form-data; name="Body"; filename="filler"' + '\r\n\r\n'; var requestBodyEnd = '\r\n\r\n' + '--' + boundary + '--'; // The atob function will decode a base64-encoded string into a new string with a character for each byte of the binary data. var byteCharacters = window.atob(objectData.Body); // Each character's code point (charCode) will be the value of the byte. // We can create an array of byte values by applying .charCodeAt for each character in the string. var byteNumbers = new Array(byteCharacters.length); for (var i = 0; i &lt; byteCharacters.length; i++) { byteNumbers[i] = byteCharacters.charCodeAt(i); } // Convert into a real typed byte array. (Represents an array of 8-bit unsigned integers) var byteArray = new Uint8Array(byteNumbers)…

http://stackoverflow.com/comment/42586589
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27032463
score: 2
has text: As a sidenote, that loop will run 16 times. Change the condition to `i < 15`.

http://stackoverflow.com/q/27085702
upvote count: 1
has title: AngularJs: ngAnimate issue when routing
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: ng-animate
answer count: 0
downvote count: 0
score: 1
has body: Update: I can avoid by using setTimeOut function. I put all config or init function in timeline Controller into setTimeOut function, but I dont really understand the ngAnimate I have an Angular Application with some templates, and I use ngRoute to switch. In a template and its controller, I create a map View with google maps API. If I didn't inject ngAnimate to my app modules, everythings is ok. But, if I injected ngAnimate to my app modules: If I use to routing to this template, googleMapsAPI does not work, but no any Error throw in Console. I use sly.js to make timeline slider. And its init function not work too. If I refresh this template (F5), everything work normally. My code like that: My module file var app = angular.module("application", ['application.services','ngAnimate','ngRoute','angular-loading-bar']); app.config(function($routeProvider, $locationProvider) { $routeProvider.when('/home', { templateUrl: base_url + "/index.php" + "/app/home", controller: "homeCtrl" }) .when('/search', { templateUrl: base_url + "/index.php" + "/app/search", controller: "searchCtrl" }) .when('/lesson/:lessonId', { templateUrl: base_url + "/index.php" + "/app/lesson", controller: "lessonCtrl" }) .when('/groups/:groupId', { templateUrl: base_url + "/index.php" + "/app/groups" }) .when('/timeline/:region', { templateUrl: base_url + "/index.php" + "/app/timeline", controller: "timelineCtrl" }) .when('/timeline', { redirectTo: '/timeline/vn' }) .otherwise({ redirectTo: '/home' }); My Timeline Controller File angular.module("application") .controller('timelineCtrl', function($scope, $http, $routeParams, $location, mapTimelineProcess, renderProcess, BASE_URL) { if($routeParams.region != 'vn' && $routeParams.region != 'wo') { $location.path('/'); } $scope.events = []; $scope.timeline = []; var swFlag = 0; $scope.region = $routeParams.region; // Choose VN or WO Timeline $scope.curCentury = 0; $scope.curYear = 0; // Create map $scope.$on('$routeChangeSuccess', function() { mapTimeline…
has comment: http://stackoverflow.com/comment/54934348
type: Question
tagged with: javascript
tagged with: google-maps

http://stackoverflow.com/a/27080336
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27080054
type: Answer
score: 0
has body: Assuming you don't have any conflicts, then it is placed in the same DOM. You just need to properly wait for it to be loaded: $("#t1").load("./page2.html",function(text,status,jqXHR){ $("#text1").html("This is the internal we are editing"); }); The documentation for it is here http://api.jquery.com/load/
has comment: http://stackoverflow.com/comment/42670699
accepted answer of: http://stackoverflow.com/q/27080054
has comment: http://stackoverflow.com/comment/42670977
has comment: http://stackoverflow.com/comment/42670573

http://stackoverflow.com/comment/42541393
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27006181
has text: Do not use `document.write` when page is loaded! Read this - http://stackoverflow.com/questions/10873942/document-write-clears-page
score: 0

http://stackoverflow.com/comment/42527336
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/26998069
score: 1
has text: Here are some ways to do it http://stackoverflow.com/questions/249192/how-can-you-programmatically-tell-an-html-select-to-drop-down-for-example-due

http://stackoverflow.com/comment/42562682
type: AnswerComment
has text: Thank you. These are both viable options in my use case. I'm not sure though if this is the best possible behavior from Meteor. I can imagine there are other cases where code that can be invoked by both the server and client would want to test if Meteor.user() is available, and doing a try - catch block each time does not seem ideal. Returning undefined from Meteor.user() when in server code outside methods and publish functions would seem reasonable to me. Perhaps I should submit an issue to Meteor about this.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27017766

http://stackoverflow.com/comment/42722524
type: Comment
type: QuestionComment
has text: It must be a bug with angular.copy() in my application's version of angular. If you look here (http://jsfiddle.net/2ngtw4bw/4/) this prints out `false true false` as expected. When I copy that code *exactly* into my application, it prints out `false true true`.
comment on: http://stackoverflow.com/q/27107204
score: 0

http://stackoverflow.com/comment/42620090
score: 0
type: AnswerComment
type: Comment
has text: I modified my code but the map taking it forever to load and it's got stuck.
comment on: http://stackoverflow.com/a/27051377

http://stackoverflow.com/comment/42551532
type: Comment
comment on: http://stackoverflow.com/q/27012556
has text: what's inside those functions ?, in jquery animate (if you are using it) the only thing you can use is the callback function to execute your next animation
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42724235
comment on: http://stackoverflow.com/q/27109299
type: QuestionComment
has text: Yes, you should call `remove`, that's where all the view's cleanup should be. Check the [jQuery docs](http://api.jquery.com/html/#html2) to see what `$('body').html(...)` will do.
score: 1
type: Comment

http://stackoverflow.com/q/27098264
has body: I have the following html: Yes The attribute data-mistro-events contains some JSON data that I extract in code and parse into an object. I am now writing some code that is saving some of the markup from a html page into a database as a template. When I get this html using jquery: $('#ma-uitemplates-container').html(); It gives the following result: Yes You can see that jquery has converted single quotes I had on the attribute data-mistro-events='' to be double quotes data-mistro-events="", and then converted all the double quotes in the attribute value to ". How can I get it to not do this, and instead, write the html as I have written it in the page? Regards, Scott
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/42701764
upvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
has title: Quotes in html attributes getting marked up as &quot; in result from element.html()
score: -1
has answer: http://stackoverflow.com/a/27098511
type: Question
has comment: http://stackoverflow.com/comment/42702852
has comment: http://stackoverflow.com/comment/42701576
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/42734554
type: AnswerComment
has text: Oki let me try this :D
comment on: http://stackoverflow.com/a/27115992
type: Comment
score: 0

http://stackoverflow.com/comment/42599487
comment on: http://stackoverflow.com/a/27039920
has text: Thnx @Rickyrock This is working fine for html. but when i am using PHP to make it dynamic i am unable to capture all the hidden fields ids.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42744708
comment on: http://stackoverflow.com/a/27121790
type: Comment
score: 0
type: AnswerComment
has text: Glad you find the answer to your question, you needed then to pass your function by name and not calling it with `()`, good to know ;)

http://stackoverflow.com/a/27029000
has comment: http://stackoverflow.com/comment/42581465
score: 1
upvote count: 1
has body: What about drawing an arc via fabric.Path? Try something like this: var arc1 = new fabric.Path("M 255 135 A 50 50 0 0 1 200 110", { stroke: 'black', fill: "white" }); Also see: https://groups.google.com/forum/#!msg/fabricjs/fp19BLlqauw/a-smtqe5ms8J You could write a function that accepts params and generates the path. Looks like fabric also has a static function in fabric.util.drawArc which you could use: http://fabricjs.com/docs/fabric.util.html#drawArc
has comment: http://stackoverflow.com/comment/42581567
has comment: http://stackoverflow.com/comment/42580886
accepted answer of: http://stackoverflow.com/q/27028898
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/27028898
downvote count: 0
has comment: http://stackoverflow.com/comment/42581277
has comment: http://stackoverflow.com/comment/42581354
has comment: http://stackoverflow.com/comment/42581084
type: Answer

http://stackoverflow.com/comment/42669730
type: Comment
has text: @tymeJV - your example is working flawlessly, thank you very much.
type: AnswerComment
comment on: http://stackoverflow.com/a/27079628
score: 0

http://stackoverflow.com/q/27137955
tagged with: html.dropdownlistfor
type: Question
score: 1
downvote count: 0
tagged with: javascript
tagged with: sharepoint-2010
favorite count: 0
has title: xsl trigger drop down with onchange using a custom attribute
tagged with: onchange
has body: I am creating a drop down using xsl for a dynamic list in SharePoint 2010. I am trying to trigger the value of a custom attribute instead of the value attribute. Ideally if i was not using a drop down i would have the a tag with href = # and then "data-reveal-id" would trigger my popup box. &lt;a href="#" class="thedistributor" data-reveal-id="{@Location}"&gt; &lt;xsl:value-of select="@Title"/&gt; &lt;/a&gt; However when using the drop down I am using so I cannot figure out how to trigger the "data-reveal-id" Any suggestions? &lt;select name="distributors" id="distributors" class="dropdown-select" onChange="window.location.href=this.value"&gt; &lt;option value="#" data-reveal-id="{@Location}"&gt; &lt;xsl:value-of select="@Title"/&gt; &lt;/option&gt;
answer count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/42771001
comment on: http://stackoverflow.com/a/27136368
has text: Wow. good to know that. It's totally worth mentioning.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42672055
comment on: http://stackoverflow.com/q/27081234
has text: The website is not working @Bast
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/42650876
has text: This is either a duplicate of [Sorting JavaScript Object by property value](http://stackoverflow.com/questions/1069666/sorting-javascript-object-by-property-value) or [Sorting a JavaScript object by property name](http://stackoverflow.com/questions/1359761/sorting-a-javascript-object), depending on whether you want to order by name or value.
comment on: http://stackoverflow.com/q/27068443
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/73070991
has comment: http://stackoverflow.com/comment/135598956
upvote count: 2
has comment: http://stackoverflow.com/comment/129085087
has body: //my code was: this._videoEl = videoEl; navigator.mediaDevices.getUserMedia({ video : true }).then(stream =&gt; { this._videoEl.src = URL.createObjectURL(stream); this._videoEl.play(); }).catch(err =&gt; { console.log(err); }); //and replace to this worked for me : this._videoEl = videoEl; navigator.mediaDevices.getUserMedia({ video : true }).then(stream =&gt; { this._videoEl.srcObject = stream; this._videoEl.play(); }).catch(err =&gt; { console.log(err); });
type: Answer
answers question: http://stackoverflow.com/q/27120757
score: 2
downvote count: 0

http://stackoverflow.com/comment/42757619
has text: It seems that I have deleted unintentionally from the ``index.html`` part I've shown in order to make the content as small as possible : this is what I have before the ``javascript`` code : `` ``, and it worked only in ``Firefox`` - ``IE`` and ``Chrome`` failed to load the map.
type: QuestionComment
comment on: http://stackoverflow.com/q/27125796
score: 0
type: Comment

http://stackoverflow.com/comment/42759221
type: Comment
comment on: http://stackoverflow.com/a/27130003
has text: How can i add values to array as numbers? By default it is adding as strings .
type: AnswerComment
score: 0

http://stackoverflow.com/a/27112988
type: Answer
score: 2
upvote count: 2
has body: To update existing style you can use jquery .css(): $('#template').css('color', 'red'); blabla... jquery .attr() add a custom attribute to the element. In your OP it will change attribute style with the new: $('#template').attr('style', 'color:red;border: solid 1px'); blabla... As you can see will keep only the new one. Same way will work .prop() in your OP.
downvote count: 0
answers question: http://stackoverflow.com/q/27112933

http://stackoverflow.com/q/27139230
has comment: http://stackoverflow.com/comment/42777329
downvote count: 0
has answer: http://stackoverflow.com/a/27139399
tagged with: javascript
linked to: http://stackoverflow.com/q/275781
linked to: http://stackoverflow.com/q/6107464
tagged with: asp.net
favorite count: 0
tagged with: visual-studio-2013
possible better answer: http://stackoverflow.com/a/27139399
type: AnsweredQuestion
score: 2
has title: How would I refer to a javascript file in a c# library project from an ASP.NET MVC project?
has body: normally I would go &lt;script src="~/Scripts/Controls/SomeScript.js"&gt;&lt;/script&gt; and this finds SomeScript.js in the "Scripts/Controls" folder of the same project that the ASP.NET .cshtml page is in. The time has come however to share the javascript file between two projects. I need to move it to a library project. What would the value of the src attribute have to be to locate the javascript file in a completely different project in the same solution? Do I have to do something else? How is this problem usually solved? I have tried "Copy to output directory" on the "SomeScript.js" properties page and this copies the script and its containing folder to the 'bin' directory. However chrome reports "Not allowed to load local resource" when trying to access .js files in the bin folder.
has answer: http://stackoverflow.com/a/27139380
accepted answer: http://stackoverflow.com/a/27139380
type: Question
upvote count: 2
answer count: 2

http://stackoverflow.com/comment/42712265
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27103639
has text: @TheParamagneticCroissant Can you tell me a little more? Some link for some information?

http://stackoverflow.com/q/26993935
has body: I'm trying to send some XML via POST to an API, using AngularJS's $resource, but I'm not really sure how I'm supposed to pass the data I want to send. This is what I have currently: "Cart": $resource("http://........../api?ws_key=*********", { ws_key: ws_key }, { save: { method: "POST", isArray: false, headers:{ 'Content-Type':'raw; charset=UTF-8' } } }) Say I want to send a simple string (xml). Where should I pass it?
accepted answer: http://stackoverflow.com/a/26994539
tagged with: javascript
tagged with: post
score: 0
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/26994539
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has title: POST-ing a raw XML using AngularJS's $resource (v1.2.x)
type: Question

http://stackoverflow.com/comment/42723912
type: QuestionComment
comment on: http://stackoverflow.com/q/27110144
has text: .cshtml. The link looks like so: Click for profile
score: 0
type: Comment

http://stackoverflow.com/a/27059575
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27058687
has body: You can do something like this: if(Number(Harvesters.name.slice(-1)) &lt; 3) Game.spawns.Spawn1.createCreep([Game.WORK, Game.CARRY, Game.MOVE],'Harvester'+ Harvesters.length, 'Harvester'); The thing to note here is that index is not a property and the deceptive id property is unique and therefore not what you're looking for. This code instead looks at the name of the current creep and gets the last character, then turns that into a number, and compares it to 3. The way you're assigning to memory is fine though. You could do an object there if you really wanted, but that seems unnecessary with how you have it set up right now. It would look like this: Game.spawns.Spawn1.createCreep([Game.WORK, Game.CARRY, Game.MOVE],'Harvester'+ Harvesters.length, {role: 'Harvester'}); And you'd have to be sure to change your memory checks to memory.role. Rereading and I think what I did is not really what you were asking. If I understand correctly this should work better (not pretty though) module.exports = function() { var totalHarv = 0; for(var q in Game.creeps) if (Game.creeps[q].memory == 'Harvester') totalHarv++; for(var i in Game.creeps) { if(Game.creeps[i].memory == 'Harvester') { while(totalHarv &lt; 3) { Game.spawns.Spawn1.createCreep([Game.WORK, Game.CARRY, Game.MOVE], 'Harvester'+ totalHarv, 'Harvester'); totalHarv++; } } } } This loops through the creeps and increments a counter if it finds a Harvester, then later when you're trying to spawn and stuff, it can check to see if there are enough of them and add more if necessary.

vb.net
tags question: http://stackoverflow.com/q/27050737
tags question: http://stackoverflow.com/q/26997412
tags question: http://stackoverflow.com/q/27078192
tags question: http://stackoverflow.com/q/27048381
tags question: http://stackoverflow.com/q/27142761
type: Tag
tags question: http://stackoverflow.com/q/27070120
tags question: http://stackoverflow.com/q/27104133
tag name: vb.net

http://stackoverflow.com/q/27010552
answer count: 1
tagged with: javascript
has body: I have the following view Hierarchy, &lt;Container&gt; &lt;OrderList data="orders" &gt; &lt;Order data={orders[0]} /&gt; &lt;Order data={orders[1]} /&gt; &lt;Order data={orders[2]} /&gt; ... &lt;/OrderList&gt; &lt;OrderList data="orders" &gt; &lt;Order data={orders[0]} /&gt; &lt;Order data={orders[1]} /&gt; &lt;Order data={orders[2]} /&gt; ... &lt;/OrderList&gt; .... &lt;/Container&gt; Updates for individual orders come in via pusher. I am new to React and want to know which of the following is a good way to update the already mounted component a) All updates to orders under an OrderList is handled by a function in OrderList component function handleChange(order_index, updated_order){ var orders = _.clone(this.state.orders); orders[order_index] = updated_order this.setState(orders); } v/s b) Update to an order is handled by a function in Order component function handleChange(updated_order){ this.setState({order: updated_order}); }
score: 0
has comment: http://stackoverflow.com/comment/42548233
accepted answer: http://stackoverflow.com/a/27036953
has title: setState on owner/parent vs ownee/individual children
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27036953
type: Question
tagged with: reactjs

http://stackoverflow.com/a/27126899
score: 0
has body: You are not to pass the parameter. You just need to declare it in your function definition. Either use an "external" function declaration function onPromiseResolved(timestamp) { secondModel.logPromiseResults('this promise has been resolved with ' + timestamp); } function onPromiseRejected(err) { secondModel.logPromiseResults('this promise has been rejected with ' + err); } ….then(onPromiseResolved, onPromiseRejected) or a named function expression: .then(function onPromiseResolved(timestamp) { secondModel.logPromiseResults('this promise has been resolved with ' + timestamp); }, function onPromiseRejected(err) { secondModel.logPromiseResults('this promise has been rejected with ' + err); }) The goal here is to make sure that there is no function declared within a function, so that each function is named and declared at the same level That's rather futile. Sometimes, you just need closures (as you don't want all variables to be static globals). Of course, you can still move them out and pass the closure variables explicitly as arguments: function makeOnPromiseResolvedHandler(closurevars) { return function onPromiseResolved(timestamp) { secondModel.logPromiseResults('this promise has been resolved with ' + timestamp); // use closurevars in here }; } ….then(makeOnPromiseResolvedHandler(…), …)
has comment: http://stackoverflow.com/comment/42755791
has comment: http://stackoverflow.com/comment/42761887
answers question: http://stackoverflow.com/q/27126745
has comment: http://stackoverflow.com/comment/42761739
has comment: http://stackoverflow.com/comment/42755819
type: Answer
has comment: http://stackoverflow.com/comment/42753865

http://stackoverflow.com/comment/42728242
type: QuestionComment
comment on: http://stackoverflow.com/q/27112727
score: 3
has text: So what is your question? What is the result you are expecting? What have you tried? Etc...
type: Comment

http://stackoverflow.com/comment/42591727
type: QuestionComment
comment on: http://stackoverflow.com/q/27034853
score: 0
has text: @Sacho I know that it's possible to work around "angular depending on DI being synchronous" because we used require.js together with angular before. I was wondering maybe someone already did something like that or knows what is the best way to do that because I couldn't find anything on net so far
type: Comment

http://stackoverflow.com/q/27025179
possible better answer: http://stackoverflow.com/a/27025297
tagged with: javascript
linked to: http://stackoverflow.com/q/5874609
favorite count: 0
has answer: http://stackoverflow.com/a/27025525
has comment: http://stackoverflow.com/comment/42573833
has body: I have this string = rgb(192, 194, 194) -10px -10px 0px; I need to get the first -10px in that string and store as a variable. That number is dynamic and will change. Thanks for the help. Here is what I have. I'm grabbing the text-shadow of a span and need to get the -10px value which will be added to the tooltip. This is a dynamic number that will change based on where a user clicks on a slider. I just cant figureout how to parse that string to get the -10px value. $('.slider-track.shadow').on('click', function (e) { e.preventDefault(); var currentValue = $('.editing').find('span').css('text-shadow'); var replaceValue = currentValue.replace(/\D/g, ''); console.log(currentValue); $('.tooltip-inner.shadow').text(currentValue); });
has title: How to get value at a specific index In JavaScript?
answer count: 4
downvote count: 4
has answer: http://stackoverflow.com/a/27025297
type: AnsweredQuestion
upvote count: 0
score: -4
accepted answer: http://stackoverflow.com/a/27025452
type: Question
has comment: http://stackoverflow.com/comment/42573870
has answer: http://stackoverflow.com/a/27025350
has answer: http://stackoverflow.com/a/27025452

http://stackoverflow.com/a/27095453
has body: They are not bundled together in the docs. They are described under the methods that use them. The ones you asked for are at: http://screeps.com/docs/Room.php#find http://screeps.com/docs/Spawn.php#createCreep
answers question: http://stackoverflow.com/q/27057305
score: 0
type: Answer

http://stackoverflow.com/q/27142433
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42790235
has answer: http://stackoverflow.com/a/39959306
score: -1
answer count: 2
tagged with: google-maps
has answer: http://stackoverflow.com/a/27146110
upvote count: 0
has title: Dynamic Route with Google Directions API: Getting route on click
tagged with: javascript
favorite count: 0
has body: The route path is not getting generated on click of destination. function calcRoute() { var request = { origin: geolocate, destination: destLoc, travelMode: google.maps.TravelMode["Driving"] }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); } } fiddle : http://jsfiddle.net/Wrishi/w8n7p7sf/ Please help me identify the problem.
type: UnansweredQuestion

http://stackoverflow.com/comment/42711125
type: Comment
score: 1
comment on: http://stackoverflow.com/q/27103756
type: QuestionComment
has text: How are you telling to PHP that there is a `data` paramenter posted? Try `data: { data: svghead } ` in your ajax call.

http://stackoverflow.com/a/36217176
has body: I also faced the same problem see my question anchor links referring to the page sections not working on browser refresh, back and forward But I had to do it the way normal links work so what I did was I manually go to that section by getting the element from the hash. $(window).on('hashchange', function () { var top = $(window.location.hash).offset().top; $(window).scrollTop(top); }); This works for forward and back buttons. And for refresh also you need to do the same thing. Get the element from the hash and scroll to that element manually.
type: Answer
answers question: http://stackoverflow.com/q/27046851
upvote count: 6
downvote count: 1
score: 5

http://stackoverflow.com/a/27155260
upvote count: 7
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/27139176
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27139176
score: 7
has body: Thanks for this solution goes to @dbugger who commented the answer I needed: Looks like the server needs to give permission to see the headers. Check out this: Reading response headers when using $http of Angularjs The proper way to make headers available outside of your local domain is to set: Access-Control-Expose-Headers on your webserver. In this particular case, you would put X-Auth-Token.

http://stackoverflow.com/q/26994271
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: backbone.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26995795
tagged with: backbone-views
has comment: http://stackoverflow.com/comment/42520222
has title: Create new Backbone Views in click event of Backbone View
type: Question
has answer: http://stackoverflow.com/a/26995795
has body: in the click event of the PodcastView I would like to create multiple new PodcastItemView objects. The jquery $.get works flawlessly, btw. If I do console.debug(this.pinfo) in the start-function, I receive the JSON array of my podcast items (title, desc, url,...), so this is not the problem. Also it iterates x times through this array, so this works, too. PodcastView = Backbone.View.extend({ tagName: "li", itemTpl: _.template($("#podcast-item").html()), events: { "click .p-click" : "start" }, initialize: function() { this.listenTo(this.model, "change", this.render); }, render: function() { this.$el.html(this.itemTpl(this.model.toJSON())); return this; }, start: function() { $.get(restUri + "podcast/" + this.model.get("title") + "/items", _.bind(function(data) { this.pinfo = data; _.each(this.pinfo, function(o) { var v = new PodcastItemView({model: o}); $("#podcast-items").append(v.render().el); }, this); })); } }); What does not work, however, is the the creation of new PodcastItemView and to append them to #podcast-items. I get the following error: TypeError: obj[implementation] is not a function (Backbone.js:225) This is my PodcastItemView. PodcastItemView = Backbone.View.extend({ tagName: "div", itemTpl: _.template($("#podcast-item-list").html()), initialize: function() { this.listenTo(this.model, "change", this.render); }, render: function() { this.$el.html(this.itemTpl(this.model.toJSON())); return this; } }); I am thankful for every tip or response.
has comment: http://stackoverflow.com/comment/42520513

http://stackoverflow.com/a/27047989
upvote count: 3
has comment: http://stackoverflow.com/comment/42613966
has comment: http://stackoverflow.com/comment/42614283
accepted answer of: http://stackoverflow.com/q/27047968
answers question: http://stackoverflow.com/q/27047968
type: AcceptedAnswer
downvote count: 0
score: 3
type: Answer
has body: Yes, use an array. Example: var myList = []; myList.push("myString"); In C# arrays are fixed size, but in Javascript you can add items to them just like lists in C#.

http://stackoverflow.com/comment/42637269
type: Comment
has text: `did work`. Isn't it work now? Or you about your console error? :)
comment on: http://stackoverflow.com/a/27061392
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42581229
comment on: http://stackoverflow.com/a/27023206
type: Comment
has text: @CasimiretHippolyte Explain.
score: 0
type: AnswerComment

http://stackoverflow.com/a/27070821
score: 1
has comment: http://stackoverflow.com/comment/42715127
has body: I think something like this would work.... You can filter off the options by project.country. I also placed a ng-disabled directive to prevent them from selecting an option in this dropdown if they haven't selected a country first.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/27070369
upvote count: 1

http://stackoverflow.com/a/27024545
type: Answer
has body: Using setTimeout or setInterval should be a good way to ensure that a function is called repeatedly after a certain amount of time. If you don't want to use that, then have the update function of your spawner object use the current world time instead of just the delta of the current frame. Also, have the object record the last time it spawned something. This way, you just have to do: // maybe it should be 2000, in milliseconds, idk if (currentTime - this.lastTimeSomethingSpawned &gt;= 2) { spawn(); this.lastTimeSomethingSpawned = currentTime; } If you want to randomize the interval instead of having a constant 2 seconds, just recompute a new random interval every time: // maybe it should be 2000, in milliseconds, idk if (currentTime - this.lastTimeSomethingSpawned &gt;= this.spawningInterval) { spawn(); this.lastTimeSomethingSpawned = currentTime; this.spawningInterval = 2 + (2*Math.random()-1)*this.intervalDeviation; } where this.intervalDeviation is something like 0.5. This way, this.spawningInterval will be between 1.5 and 2.5 every time something spawns. Finally, this question is better suited for the Gamedev Stackexchange
accepted answer of: http://stackoverflow.com/q/27024079
answers question: http://stackoverflow.com/q/27024079
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/42679414
has text: Welcome to [so]. It appears that your question is the same as [How to return value from an asynchronous callback function?](http://stackoverflow.com/questions/6847697/how-to-return-value-from-an-asynchronous-callback-function) Please take a look at that and see if it answers your question. Thanks!
comment on: http://stackoverflow.com/q/27085269
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42746763
type: Comment
type: QuestionComment
has text: So basically you want someone else to do it for you?
comment on: http://stackoverflow.com/q/27122686
score: 2

http://stackoverflow.com/a/27081176
type: Answer
accepted answer of: http://stackoverflow.com/q/27080780
score: 0
type: AcceptedAnswer
has body: You need some variables to keep the current color and shape. Then every time you change the color or the shape you'll update this variable and then load the image accordingly. Trying to keep as much as possible your current code, you could just move your color and shape variables outside the functions. Then changecolor changes the current color and changeshape changes the current shape. You can initialize the color and shape variables to the initial values. In your case orange and square. var color = 'orange'; var shape = 'square'; function changecolor(elem) { color = elem.getAttribute("data-color"); var newImageSrc = "img/" + shape + "_" + color + "_" + "img.jpg"; document.getElementById("myimg").src = newImageSrc; } function changeshape(elem){ shape = elem.getAttribute("data-shape"); var newImageSrc = "img/" + shape + "_" + color + "_" + "img.jpg"; document.getElementById("myimg").src = newImageSrc; } See a demo. This won't work because the images are not available but should work in your environment.
answers question: http://stackoverflow.com/q/27080780

http://stackoverflow.com/a/27027259
has comment: http://stackoverflow.com/comment/42577802
has comment: http://stackoverflow.com/comment/42577587
has comment: http://stackoverflow.com/comment/42577628
has comment: http://stackoverflow.com/comment/42577801
type: Answer
has body: You use for that the function "filter": (UPDATE after another requirement to filter it) $("tr"). filter(function(index){ var classes = $(this).attr("class").split(" "); var regions = "americas,emea,apac,"; var counter = 0; for(var i = 0, j = classes.length;i < j;i++){ if(regions.indexOf(classes[i] + ",") >= 0){counter++;} } return counter != 2; }) .remove(); That code will remove all the rows with less or more than 2 region classes. FIDDLE HAS BEEN UPDATED TOO: http://jsfiddle.net/fac5tapz/8/ If you were using a custom attribute, it would be possible to spare some code: first row do not remove second row do not remove third will be removed fourth will be remove fifth row do not remove sixth will be removed seventh will be removed eighth row do not remove $("tr"). filter(function(index){ var regions = $(this).attr("regions").split(" "); return regions.length != 2; }) .remove(); Another fiddle for this version: http://jsfiddle.net/dkseknyw/2/
score: 0
has comment: http://stackoverflow.com/comment/42577773
answers question: http://stackoverflow.com/q/27027004

http://stackoverflow.com/q/27044779
has body: I have a calculator that works with buttons to assign values. The main idea is to generate formulas. The values are added seamlessly into an "input". All the brackets when entering your respective button, I need to happen is to continue entering values in the parenthesis Jquery $(document).ready(function () { $("input:button").click(function () { valor = $(this).val(); actual = $("#ContentPlaceHolder1_formula").val(); if (valor == "C") { $("#ContentPlaceHolder1_formula").val(""); } else { if (valor == "=") { $("#ContentPlaceHolder1_formula").val(eval(actual)); } else { $("#ContentPlaceHolder1_formula").val(actual + valor); } } }); }); Html &lt;div class="form-group"&gt; &lt;input class="btn" type="button" value="()" id="parentesis" /&gt; &lt;input class="btn" type="button" value="1" id="1" /&gt; &lt;input class="btn" type="button" value="2" id="2" /&gt; &lt;input class="btn" type="button" value="3" id="3" /&gt; &lt;input class="btn" type="button" value="+" id="sumar" /&gt;&lt;br /&gt; &lt;input class="btn" type="button" value="4" id="4" /&gt; &lt;input class="btn" type="button" value="5" id="5" /&gt; &lt;input class="btn" type="button" value="6" id="6" /&gt; &lt;input class="btn" type="button" value="-" id="restar" /&gt;&lt;br /&gt; &lt;input class="btn" type="button" value="7" id="7" /&gt; &lt;input class="btn" type="button" value="8" id="8" /&gt; &lt;input class="btn" type="button" value="9" id="9" /&gt; &lt;input class="btn" type="button" value="*" id="multiplicar" /&gt;&lt;br /&gt; &lt;input class="btn" type="button" value="0" id="0" /&gt; &lt;input class="btn" type="button" value="=" id="igual" /&gt; &lt;input class="btn" type="button" value="C" id="C" /&gt; &lt;input class="btn" type="button" value="/" id="dividir" /&gt; &lt;asp:Button ID="btn_login" OnClick="docreateformula" CssClass="btn btn-primary btn-lg center-block" Text="Guardar" runat="server"/&gt; &lt;/div&gt; With that code this happen: 5+()3*()+5+3 and I need: 5+(3*(5+3)) How can I do that?
has answer: http://stackoverflow.com/a/27151002
has comment: http://stackoverflow.com/comment/42616232
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/27058152
has answer: http://stackoverflow.com/a/27147503
upvote count: 6
tagged with: javascript
has answer: http://stackoverflow.com/a/27174379
has comment: http://stackoverflow.com/comment/42790135
score: 5
answer count: 7
has title: How to focus cursor in between two brackets (parentheses) with Jquery?
tagged with: calculator
has answer: http://stackoverflow.com/a/27149455
tagged with: jquery
has answer: http://stackoverflow.com/a/27147399
accepted answer: http://stackoverflow.com/a/27149455
favorite count: 0
has answer: http://stackoverflow.com/a/27058152
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27150107

http://stackoverflow.com/comment/42582942
type: QuestionComment
has text: there is no module called `loggedDirectives`, you defined it as `logged-directives`.
comment on: http://stackoverflow.com/q/27030282
score: 0
type: Comment

http://stackoverflow.com/comment/42715724
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27104455
type: Comment
has text: I thought this was the case. Thanks for the confirmation. I'm trying to use the framework's session implementation instead of PHP's native session to no success. But at least I can move on to banging my head against another wall. Thanks.

http://stackoverflow.com/comment/42720991
type: QuestionComment
has text: @Konstantin they are in the same folder yes. I even tried to use a full link (includig C:\... etc etc), but that didn't help as well.
comment on: http://stackoverflow.com/q/27108698
score: 0
type: Comment

http://stackoverflow.com/q/27086400
has answer: http://stackoverflow.com/a/27086459
type: Question
has title: how to use JavaScript to force a HTML page scroll to the top in all mobile browsers?
tagged with: javascript
has body: Is it possible to use JavaScript to scroll a HTML page scroll to the top? Hope to implement this with an animation and make it be working in all mobile browsers. I use jQuery on that page. Thanks,
score: 0
answer count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27086468

http://stackoverflow.com/comment/42542560
comment on: http://stackoverflow.com/q/26995381
score: 0
type: QuestionComment
type: Comment
has text: second print appears after first print

http://stackoverflow.com/comment/42618667
score: 0
comment on: http://stackoverflow.com/q/27050311
type: QuestionComment
type: Comment
has text: Okay, I've seen code where the prototype doesn't initialize any variables, etc., but only provides some methods, so in that case running the super constructor is unnecessary, right? But taking my code as an example, where the constructor not only does something, but it does more than initialize variables to fixed values...

http://stackoverflow.com/a/27087517
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27087453
score: 3
has body: The third argument to open is whether the XHR object should work asynchronously (true) or synchronously (false). The latter has the negative effect of locking up the UI of the browser while the request is being handled, so is best avoided whenever possible (and it's essentially always possible).
upvote count: 3

http://stackoverflow.com/comment/42667886
has text: _"will remove only a dd which is the last one among dd's"_ - that is not correct. `:last-child` selects only elements that are the last child of their parent _regardless of type,_ not the last of similarly typed elements. (As you can see [here](http://jsfiddle.net/chwh013e/).) The OP's code works because it removes the dd element first, so then when it gets to `dt:last-child` the dt actually is the last child of its parent.
type: Comment
comment on: http://stackoverflow.com/a/27078897
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42781796
type: Comment
comment on: http://stackoverflow.com/a/27142347
has text: Yes, I was wrong. I didn't pay attention to the add last listener.
score: 0
type: AnswerComment

http://stackoverflow.com/a/26998353
answers question: http://stackoverflow.com/q/26996051
type: AcceptedAnswer
score: 0
type: Answer
has body: Without having more information, I would try to just "open" the dialog with your deleteNode function rather than re-initializing it every time. $("#deleteNodeDialog").dialog({ /*My delete node functionality here*/ }); Then function deleteNode(d) { $("#deleteNodeDialog").dialog("open"); } This way you aren't recreating it when it isn't necessary.. UNLESS there is more going on inside the function we don't know about yet that makes it necessary.
accepted answer of: http://stackoverflow.com/q/26996051

http://stackoverflow.com/comment/42589458
type: Comment
type: QuestionComment
has text: I was talking about the code snippet in my edited part. ob1 and ob2 have same prototype object. The prototype object stores 'name' and 'age' property , right ? if prototype object is same for both ob1 and ob2 , then how are ob1 and ob2 able to store unique 'name' and 'age' in 2 different objects ? I hope you understood my question. thanks
comment on: http://stackoverflow.com/q/27033151
score: 0

http://stackoverflow.com/comment/42637070
comment on: http://stackoverflow.com/q/27052166
has text: I mean when and how these files app.js/app.json/app.css, which are cached in client, will be updated. Will Sencha check the delta folder to look for delta files (there are many of them) to determine if an upgrade is needed? if there are many delta files, which one or ones will be picked up?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/26999766
favorite count: 0
has body: Here i'm using Jplayer an open source plugin for mp3 player. myPlaylist.add({ title:"Tempered Song", artist:"Miaow", mp3:"http://www.jplayer.org/audio/mp3/Miaow-01-Tempered-song.mp3", }); But suppose If i've three anchor tag which contains three different music. This is song 1 This is song 2 This is song 3 Obviously, i cannot put the music URL into href. After click, it'll start download automatically or open window media player. So, How do you put three different music source file into this jquery script? Or what do you use for playing mp3 files rather using anchor tag or not? myPlaylist.add({ title:"<Song name>", artist:"<singer name>", mp3:"<MP3 URL of three different song>", }); I want to play these three different mp3 files into one player but confused. I'm unable to find in google that jplayer tend to use different multiple mp3 files with jplayer. Please help how to do that? HELP, WOULD BE APPRECIATED!!
accepted answer: http://stackoverflow.com/a/27001056
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10472594
has comment: http://stackoverflow.com/comment/42530229
tagged with: jplayer
upvote count: 1
tagged with: php
has title: How to play multiple mp3 files with Jplayer?
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/27001056
has comment: http://stackoverflow.com/comment/42530488
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42530271
tagged with: jquery

http://stackoverflow.com/comment/42725332
type: Comment
has text: And what's your relevant, minimal (simple, *representative*) HTML?
type: QuestionComment
comment on: http://stackoverflow.com/q/27111218
score: 0

http://stackoverflow.com/a/27138750
has comment: http://stackoverflow.com/comment/42775765
has comment: http://stackoverflow.com/comment/42775998
has comment: http://stackoverflow.com/comment/42775445
has body: Found a great way to do it with the eval function strings = [ "String", "Object", "Boolean" ] for(var i = 0; i &lt; strings.length; i++){ var x = new (eval(strings[i])); } so to summarize eval("String") === [Function: String]
type: Answer
has comment: http://stackoverflow.com/comment/42775957
answers question: http://stackoverflow.com/q/27138638
score: 0
has comment: http://stackoverflow.com/comment/42775474

http://stackoverflow.com/a/30358962
has body: For Chrome on Android, this does not seem to be possible - there is currently a bug for it. (it was closed and marked as fixed, but as you can see from the comments, doesn't work for everyone - including myself).
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27096508

http://stackoverflow.com/q/27082794
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42759764
tagged with: php
has comment: http://stackoverflow.com/comment/42675006
downvote count: 0
has comment: http://stackoverflow.com/comment/42682892
has title: Ajax form with separate action values
score: 1
has comment: http://stackoverflow.com/comment/42695158
type: Question
has answer: http://stackoverflow.com/a/27082842
has body: I have a contact form with multiple submit buttons which have different action values. &lt;form action="confirm.php" data-query="send.php" method="POST" class="form"&gt; I am using data-query attribute to fetch action link for one of the submit buttons. &lt;input type="submit" name="submit1" id="submit1"&gt; &lt;input type="submit" name="submit2" id="submit2" value="Submit B"&gt; Ajax code is below: &lt;script&gt; $(function() { $('#submit2').click(function(e) { var thisForm = $('.form'); e.preventDefault(); $('.form').fadeOut(function() { $("#loading").fadeIn(function() { $.ajax({ type: 'POST', url: thisForm.attr("data-query"), data: thisForm.serialize(), success: function(data) { $("#loading").fadeOut(function() { $("#success").fadeIn(); }); } }); }); }); }) }); &lt;/script&gt; I am getting the success message but the php code isn't getting executed. The PHP code is working fine without the AJAX method.
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/42995412
comment on: http://stackoverflow.com/q/27044742
type: QuestionComment
type: Comment
has text: are these chars encoded?
score: 0

http://stackoverflow.com/a/27014533
has body: You need to use explicit wait, as explained here. Then your script will wait for that particular "frameid" to display, before switching to it. Edited: Added sample code: driver.wait(function() { return driver.findElement(webdriver.By.id('frameid')).isDisplayed(); }, 30);
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27014354
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27014354
has comment: http://stackoverflow.com/comment/42555334
type: Answer
score: 1

http://stackoverflow.com/a/72074817
type: Answer
score: -1
answers question: http://stackoverflow.com/q/27078285
downvote count: 1
upvote count: 0
has body: if there will be more than one function defining them one by one would not be maintainable so i would suggest use a helper class to keep values for each class slowDown { constructor(cb,timeGap){ this.last = 0 this.run = function(){ let current = Date.now(), shouldRun = (current - this.last) &gt;= timeGap if(shouldRun){ cb(current - this.last) this.last = current } } } } // example use const press = new slowDown(timeElapsed =&gt; { // define function here which you wanted to slow down console.log("pressed after " + timeElapsed + " ms") },750) window.addEventListener("keydown",()=&gt;{ press.run() })

http://stackoverflow.com/q/27083675
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15363333
score: 1
type: Question
has answer: http://stackoverflow.com/a/27083725
tagged with: javascript
answer count: 1
downvote count: 0
has title: What are side loaded objects?
favorite count: 0
has body: I have read a few threads where they mention side loaded objects. I can't find a clear deffinition on what they are though. What are side loaded objects?
accepted answer: http://stackoverflow.com/a/27083725
linked to: http://stackoverflow.com/q/20027412
upvote count: 1
tagged with: ruby-on-rails

http://stackoverflow.com/comment/42642698
type: QuestionComment
score: 0
has text: $(mydiv).append($(returnMessage));
comment on: http://stackoverflow.com/q/27064371
type: Comment

cryptography
tag name: cryptography
tags question: http://stackoverflow.com/q/27085700
type: Tag
tags question: http://stackoverflow.com/q/27019165

http://stackoverflow.com/a/27136892
type: Answer
has comment: http://stackoverflow.com/comment/42772709
score: 0
has body: Although it's not an "easy" solution, I would suggest tracking the navigation from the server via Google's Analytics API. That's going to be the cleanest and most holistic approach.
answers question: http://stackoverflow.com/q/27136743
has comment: http://stackoverflow.com/comment/42772460

http://stackoverflow.com/q/27005179
has answer: http://stackoverflow.com/a/27011392
tagged with: fancytree
score: 0
tagged with: drag-and-drop
has title: Drop draggable data/rows into Fancytree?
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27019249
has body: I need the ability to drag and drop data from outside the Fancytree into the tree and save it. I have the key and title for any droppable (row) available but how can I add this to the tree exactly where the user drops it? http://jsfiddle.net/nwntpd15/5/ $("#tree").fancytree({ rootVisible: false, checkbox: false, selectMode: 1, clickFolderMode: 4, debugLevel: 0, source: [ {title: "Node 1"}, {title: "Node 2", key: "id2"}, {title: "Folder 3", folder: true, children: [ {title: "Node 3.1"}, {title: "Node 3.2"} ]}, {title: "Folder 2", folder: true} ], extensions: ["dnd"], dnd: { autoExpandMS: 400, focusOnClick: false, preventVoidMoves: true, // Prevent dropping nodes 'before self', etc. preventRecursiveMoves: true, // Prevent dropping nodes on own descendants dragStart: function(node, data) { return true; }, dragEnter: function(node, data) { return true; }, dragDrop: function(node, data) { /** This function MUST be defined to enable dropping of items on * the tree. */ data.otherNode.moveTo(node, data.hitMode); /**/ return false; } } }); $( ".drag").draggable();
tagged with: jquery-ui
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/42800311
type: Comment
comment on: http://stackoverflow.com/a/27115480
score: 0
has text: right, with using the latitude absolute limit, it seems to work. or it always has and I missed it. It doesn't really the question, though the information is quite useful, so I guess I should mark it. thanks.
type: AnswerComment

http://stackoverflow.com/comment/42753316
score: 0
type: AnswerComment
has text: Why does Chrome shows me this in F12 tools? http://cs622931.vk.me/v622931078/c446/8sacc6SSJ0k.jpg
comment on: http://stackoverflow.com/a/27126738
type: Comment

http://stackoverflow.com/comment/49725836
type: Comment
comment on: http://stackoverflow.com/a/30826778
has text: I have updated the answer now using 'addHTML' function. @vinesh
type: AnswerComment
score: 0

http://stackoverflow.com/a/27028709
has body: Also consider Math.max: document.getElementById("div").innerHTML = "Value: " + Math.max(0, values[i]);
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/27028637
answers question: http://stackoverflow.com/q/27028637
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/42637170
has text: Why would you want to refresh an external page?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27061451
score: 0

http://stackoverflow.com/a/27137064
type: Answer
has comment: http://stackoverflow.com/comment/42884278
score: 2
has comment: http://stackoverflow.com/comment/42773077
upvote count: 2
has body: This should work. $('#menu').menu({ select: function(event, ui) { alert(ui.item.text()); } }); jQuery UI's menu has a select method where you can access the event and the UI widget. This adds an event listener, whereby you have access to the data.
accepted answer of: http://stackoverflow.com/q/27137034
answers question: http://stackoverflow.com/q/27137034
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42607562
score: 1
has text: This doesn't help when JavaScript is disabled, as stipulated by the OP
comment on: http://stackoverflow.com/a/27044486
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42690864
type: AnswerComment
has text: Yes, I would create separate handler functions for each button.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/27088902

http://stackoverflow.com/q/27003184
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27003332
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I want to create a jquery fullscreen popup and put a radio button in it. I have a code that works fine but not for that radio button! please check my code here sample code The popup window works great but after first click on a radio button,all radio buttons will be locked. Can sb tell me about this problem? tnx html code: hello everyone! Male Female
type: AnsweredQuestion
tagged with: popup
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/27003332
has title: radio button doesn't work in a jquery popup box
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/42625908
type: Comment
has text: I guess you meant `if(typeof emptyData == 'object')` and `if(typeof emptyJSOn == 'object')`
type: AnswerComment
comment on: http://stackoverflow.com/a/27054305
score: 0

http://stackoverflow.com/comment/42660379
has text: Ok, thanks. I am reading about `$.fn` now.. But how do I put the other behavioural functions (such as color changing and appending etc.) inside my new function?
score: 0
comment on: http://stackoverflow.com/q/27074345
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42533781
comment on: http://stackoverflow.com/a/27001921
has text: It's probably best to note that, in this case (and since it's linked), the MDN docs are actually inaccurate by putting `this` on a list of operators on the linked page.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42800007
type: Comment
has text: According to the [Mongoose documentation](http://mongoosejs.com/docs/api.html#model_Model-save) it should be passing in the saved data as the second parameter. Try printing out id instead of _id. Also try printing out the whole returned object to see what you're getting.
comment on: http://stackoverflow.com/a/27152180
type: AnswerComment
score: 0

http://stackoverflow.com/q/27129973
type: Question
has body: I am using an accordion in a dialog to go through different steps that the end user will need to do. Each step has a button or text box with a button. How can I get it so that when a user hits the enter key it activates the button associated with the active heading. Step 1: To get started click "Setup" and it will configure this spreadsheet for use with the Connected Groups Add-on. Setup Step 2 To get started enter the name of your first contact group below then click "Create". Create Done Thank you for using Connected Groups. More information or help can be found: Close
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/27137590
has comment: http://stackoverflow.com/comment/42767502
has comment: http://stackoverflow.com/comment/42879902
linked to: http://stackoverflow.com/q/15387457
tagged with: google-apps-script
has comment: http://stackoverflow.com/comment/42768501
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jQuery Accordion how to get enter to select button for active heading
score: 0
has comment: http://stackoverflow.com/comment/42843131
type: UnansweredQuestion

http://stackoverflow.com/a/27132447
has comment: http://stackoverflow.com/comment/42763922
has comment: http://stackoverflow.com/comment/42763690
type: AcceptedAnswer
has body: The myIndex property gets set by the initialization of the repeat and it isn't updated appropriately. Instead you could just work with $index. This will update appropriately when the array changes and delete the correct elements. &lt;tr ng-repeat="i in items"&gt; &lt;td&gt;{{$index}}&lt;/td&gt; &lt;td&gt;{{i.Id}}&lt;/td&gt; &lt;td&gt;{{i.Name}}&lt;/td&gt; &lt;td&gt;{{i.Type}}&lt;/td&gt; &lt;td&gt; &lt;button data-ng-click="deleteItemByIndex($index)"&gt;&amp;times;&lt;/button&gt; &lt;/td&gt; &lt;/tr&gt;
downvote count: 0
answers question: http://stackoverflow.com/q/27132363
type: Answer
has comment: http://stackoverflow.com/comment/42763756
accepted answer of: http://stackoverflow.com/q/27132363
score: 5
upvote count: 5

http://stackoverflow.com/q/27041711
has comment: http://stackoverflow.com/comment/42602807
tagged with: upload
type: Question
tagged with: php
has title: why is it that my script only uploads the last image to my ftp and database?
score: 0
has answer: http://stackoverflow.com/a/27041998
tagged with: mysql
has body: i have a uploading script and works like a charm but i wanted to expand it with not only uploading one image, but several images. That resulted in my script only uploading the last image and not all of them with the text included with them in the textarea. i just can't figure out why it just won't upload all images. my upload.php: <?php // Start a session for error reporting session_start(); // Call our connection file require( "includes/conn.php"); // Check to see if the type of file uploaded is a valid image type function is_valid_type($file) { // This is an array that holds all the valid image MIME types $valid_types=a rray( "image/jpg", "image/jpeg", "image/bmp", "image/gif"); if (in_array($file[ 'type'], $valid_types)) return 1; return 0; } // Just a short function that prints out the contents of an array in a manner that 's easy to read // I used this function during debugging but it serves no purpose at run time for this example function showContents($array) { echo " "; print_r($array); echo " "; } // Set some constants // This variable is the path to the image folder where all the images are going to be stored // Note that there is a trailing forward slash $TARGET_PATH = "content/uploads/"; // Get our POSTed variables $fname = $_POST['fname ']; $lname = $_POST['lname ']; $image = $_FILES['image ']; // Sanitize our inputs $fname = mysql_real_escape_string($fname); $lname = mysql_real_escape_string(nl2br($lname)); $image['name '] = mysql_real_escape_string($image['name ']); // Build our target path full string. This is where the file will be moved do // i.e. images/picture.jpg $TARGET_PATH .= $image['name ']; // Make sure all the fields from the form have inputs if ( $fname == "" || $lname == "" || $image['name '] == "" ) { $_SESSION['error '] = "All fields are required"; header("Location: indexbackup.php"); exit; } // Check to make sure that our file is actually an image // You check the file type instead of the extension because the extension can easily be f…
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: image

http://stackoverflow.com/a/27020858
has comment: http://stackoverflow.com/comment/42569799
accepted answer of: http://stackoverflow.com/q/27020727
answers question: http://stackoverflow.com/q/27020727
has comment: http://stackoverflow.com/comment/42569415
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Use .replaceWith() and .wrap(): $("form div").replaceWith(function(){ $(this).find('label').wrap(''); return $(' ' + this.innerHTML + ' ') }); jsFiddle example This will give you: First Name * Email *
has comment: http://stackoverflow.com/comment/42570309
has comment: http://stackoverflow.com/comment/42568214
has comment: http://stackoverflow.com/comment/42567459
type: Answer
has comment: http://stackoverflow.com/comment/42570354
score: 1

http://stackoverflow.com/q/27101078
answer count: 1
downvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27104783
accepted answer: http://stackoverflow.com/a/27104783
favorite count: 0
score: 0
type: AnsweredQuestion
has title: Convert Scala Map to Json in JavaScript
tagged with: scala
type: Question
tagged with: http://stackoverflow.com/tag/json
has body: Trying to convert: Map(1416479696353 -&gt; Map(name -&gt; You,savePoint -&gt; 4), 1416479788969 -&gt; Map(name -&gt; You, savePoint -&gt; 9), 1416479801372 -&gt; Map(name -&gt; govind,savePoint -&gt; 10)) into JavaScript json by: &lt;script&gt; var info=@Json.toJson(data.toMap) &lt;/script&gt; but giving me this error: SyntaxError: invalid property id var info={&amp;quot;1416479696353&amp;quot;:{&amp;quot;name&amp;qu ----------^ How to get in the correct manner?
tagged with: playframework
upvote count: 1

http://stackoverflow.com/comment/42790704
has text: You generally can't, HTML is stateless, and so is javascript in the browser enviroment. You'd have to device some sort of system that stores the changes the user does and then write a script that reimplements those changes, there are no silver bullets.
type: QuestionComment
comment on: http://stackoverflow.com/q/27147750
type: Comment
score: 1

http://stackoverflow.com/q/27058461
type: AnsweredQuestion
has body: My dialogue code is following.. &lt;?php $this-&gt;beginWidget('zii.widgets.jui.CJuiDialog', array( 'id'=&gt;'pagetemplate', 'options'=&gt;array( 'title'=&gt;'Page Template', 'autoOpen'=&gt;false, 'modal'=&gt;true, 'width'=&gt;1000, 'height'=&gt;300 ), ));?&gt; when a javascript function CLICK is calling , i want to define this code under click function. how can i convert this to javascript?
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27058525
tagged with: yii
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/27058525
upvote count: 0
answer count: 1
favorite count: 0
has title: How can I define a widget using javascript
tagged with: php

http://stackoverflow.com/a/27018104
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/27018063
type: Answer
has body: You can use the onChange() event of your email input to call your validate() method instead of your submit button or you can call on both events... Example: &lt;input id='email' placeholder="example@example.com" size="21" onchange="validate()"&gt;
downvote count: 0

http://stackoverflow.com/comment/42618283
has text: @flyandi Can you explain more? `Bla` is just a local variable within the function and effectively ceases to exist as soon as the function returns. The object returned from the function certainly does contain both `variable` and `get`: http://imgur.com/VLm4b7y
comment on: http://stackoverflow.com/a/27050319
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/42670527
score: 0
type: Comment
type: QuestionComment
has text: Try using `double` (Or `BigInteger`, if you want an exact result)
comment on: http://stackoverflow.com/q/27080357

http://stackoverflow.com/q/27143096
possible better answer: http://stackoverflow.com/a/27143139
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27143139
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: How could I make my div move to the top of a page while scrolling as it does by default, but then once it reaches the top of the page, stay there? I have seen this done on other pages, and my guess is that it might not be able to be done with CSS alone, but might need jQuery and JavaScript as well. I would prefer using just CSS, but using jQuery and JavaScript is an option.
has answer: http://stackoverflow.com/a/27143153
accepted answer: http://stackoverflow.com/a/27143153
has title: Move div to top while scrolling and stay there
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/comment/42582981
type: QuestionComment
comment on: http://stackoverflow.com/q/27030326
has text: See [Javascript by reference vs. by value](http://stackoverflow.com/questions/6605640/javascript-by-reference-vs-by-value). Objects are assigned or shared or passed by pointer, all others by value.
score: 0
type: Comment

http://stackoverflow.com/comment/42631731
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27056438
has text: Continued ... When i click the dropdown for 2nd time the both audi and mercedes should be displayed in dropdown along with the key A in the display item . I have images to clearly tell whats my requirement. But im not able to post images :(

http://stackoverflow.com/comment/42780192
type: Comment
has text: @Loa There is a way as I mentioned in the [above comments](http://stackoverflow.com/questions/27118491/show-and-hide-different-elements-on-focus/27118896?noredirect=1#comment42739378_27118491) but that will not let you click the link or button inside that container.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27118896

zurb-foundation
tags question: http://stackoverflow.com/q/27139466
type: Tag
tags question: http://stackoverflow.com/q/27021811
tags question: http://stackoverflow.com/q/27086307
tags question: http://stackoverflow.com/q/27094365
tag name: zurb-foundation
tags question: http://stackoverflow.com/q/27030991
tags question: http://stackoverflow.com/q/27029434
tags question: http://stackoverflow.com/q/27102105
tags question: http://stackoverflow.com/q/27079623

http://stackoverflow.com/comment/42761875
has text: if you want to call this function for two different divs why not use their IDs and call the function twice?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27131474
score: 0

session-timeout
type: Tag
tags question: http://stackoverflow.com/q/26993567
tag name: session-timeout

http://stackoverflow.com/q/27130455
tagged with: google-chrome-devtools
type: Question
has answer: http://stackoverflow.com/a/27130728
tagged with: javascript
score: 0
answer count: 1
tagged with: backbone.js
has body: I'd like to have access to my Backbone View object from inside the console. So for example lets say I have mySlider = new SliderView( el: $('.slider')[0] ) and that SliderView has a goTo(idx) method. How can I do this inside the console: mySlider.goTo(1)
has title: Call Backbone view method from inside google chrome console
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27130728
tagged with: backbone-views

http://stackoverflow.com/comment/42794410
score: 0
comment on: http://stackoverflow.com/q/27148032
type: Comment
type: QuestionComment
has text: @adeneo 'var width = 420, barHeight = 20;' my variables should definitely be numbers..

http://stackoverflow.com/a/27141787
type: Answer
answers question: http://stackoverflow.com/q/27141522
score: 1
upvote count: 1
has body: This worked great! Thanks everyone! var quotes = [ "Time is of the essence! Comb your hair.", "Sanity is a golden apple with no shoelaces.", "Repent! The end is coming, $9.95 at Amazon.", "Honesty blurts where deception sneezes.", "Pastry satisfies where art is unavailable.", "Delete not, lest you, too, be deleted.", "O! Youth! What a pain in the backside.", "Wishes are like goldfish with propellors.", "Love the river's \"beauty\", but live on a hill.", "Invention is the mother of too many useless toys.", "Things are only impossible until they're not." ]; var randQuote = quotes[Math.floor(Math.random()*quotes.length)]; document.write(randQuote);
downvote count: 0

http://stackoverflow.com/q/26998818
has comment: http://stackoverflow.com/comment/42549449
upvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/42528193
has body: I'm trying to create master pages using javascript. I created Javascript objects containing the html code then including the js the html files. The problem is that I cant inject css in the head of the html. the jquery append function is not working..
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/42528118
has comment: http://stackoverflow.com/comment/42549430
has comment: http://stackoverflow.com/comment/42528026
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42567204
downvote count: 2
has title: How to create Master pages using Javascript
type: Question
score: -2
has answer: http://stackoverflow.com/a/26999082
tagged with: javascript

http://stackoverflow.com/comment/42777521
has text: Repeat after me. There is no way to do it in a browser (for security reasons). There is no way. You will have to involve a 3rd agent (either a proxy or your own server) that you can request the data from and it can fetch it from the web site for you and then return it to you.
type: QuestionComment
type: Comment
score: 3
comment on: http://stackoverflow.com/q/27139725

http://stackoverflow.com/a/27073244
has comment: http://stackoverflow.com/comment/42993557
type: Answer
answers question: http://stackoverflow.com/q/27073232
has body: In your code, you did't consider that the value property could be undefined yet, instead of checking the length, check the type with typeof: this.textActive = this.focused || (typeof this.element.value == 'undefined' &amp;&amp; this.element.value !== this.origValue);
score: 0

http://stackoverflow.com/q/27051579
has title: File diff souce code highlighting
answer count: 1
tagged with: web
favorite count: 0
tagged with: editor
type: AnsweredQuestion
score: 3
tagged with: syntax
accepted answer: http://stackoverflow.com/a/27051788
downvote count: 0
has body: various JavaScript libraries provide syntax highlighting functionality to display code on a webpage. Some example for those libraries are: Ace (http://ace.c9.io/) - yes, I am aware that this is a whole editor Prism JS (http://prismjs.com/) SyntaxHighlighter (http://alexgorbatchev.com/SyntaxHighlighter/) ...and many more... However, these editors do not support highlighting chunks of a source file. I want to enable syntax highlighting for a diff like this one: https://github.com/reviewninja/review.ninja/commit/9bd4844f0009d3471dc010d9939262f4eb2603e5 . I could not find a library supporting the describes scenario. Does any one of you guys know of a JavaScript library describing this scenario? Thank you very much and best Regards, Fabian
tagged with: syntax-highlighting
type: Question
has answer: http://stackoverflow.com/a/27051788
tagged with: javascript
upvote count: 3

http://stackoverflow.com/comment/42572015
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27024000
has text: postcodes[i].postcode under function AddUser() that is assigned to the newUser variable will not work. "i" is not assigned a value.

http://stackoverflow.com/a/27084134
type: Answer
score: 0
answers question: http://stackoverflow.com/q/27081499
has body: It looks like (from your example) that you are trying to get the function to execute immediately and then run periodically. I've marked the lines that you need to remove if you don't want them to run immediately. function timer2() { var t = 0; function timerImg() { alert(t); t++; } timerImg(); // Remove to not run immediately setInterval(timerImg, 1000); } timer2(); // Remove to not run immediately setInterval(timer2, 1000);

http://stackoverflow.com/comment/42712503
comment on: http://stackoverflow.com/a/27104484
type: Comment
score: 0
type: AnswerComment
has text: Similar, but with the mouse. Most like [fullPage.js](http://alvarotrigo.com/fullPage/)

http://stackoverflow.com/a/27140265
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: I figured it out - once I am running browserify using node.exe with my above method, as long as brfs is in my node_modules folder, node/browserify will search the node_modules folder for brfs. Thus, the following works: .\node.exe .\browserify\bin\cmd.js -t brfs index.js -o app.js
answers question: http://stackoverflow.com/q/27119617

http://stackoverflow.com/a/30686154
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/27012823
score: 1
has body: Please check this code , small change in previous code. This code works fine.. $('.jstree-open').on('click', function(event){ event.preventDefault(); event.stopPropagation(); alert('test result'); }); Hope this will help you.
downvote count: 0

http://stackoverflow.com/q/27079376
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/27079391
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27079391
has body: I am using this code to check the Internet end user. myapp.run(function($window, $rootScope) { $rootScope.online = navigator.onLine; $window.addEventListener("offline", function () { $rootScope.$apply(function() { $rootScope.online = false; }); }, false); $window.addEventListener("online", function () { $rootScope.$apply(function() { $rootScope.online = true; }); }, false); }); I have a div on my page that way. By default it is as display:none; &lt;div id="connec_failed"&gt;...&lt;/div&gt; How do I display this div starting the code that checks the internet if the result return false? How to hide the div again when the result returns true?
type: AnsweredQuestion
upvote count: 0
has title: how to hide a div starting the code, angularjs
type: Question
score: -1

http://stackoverflow.com/q/27120935
type: Question
possible better answer: http://stackoverflow.com/a/27121484
answer count: 2
accepted answer: http://stackoverflow.com/a/27121468
has comment: http://stackoverflow.com/comment/42742863
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42743056
has comment: http://stackoverflow.com/comment/42742871
score: 0
has comment: http://stackoverflow.com/comment/42743382
tagged with: jquery-ui-multiselect
has comment: http://stackoverflow.com/comment/42743650
has body: How can I put selected value of jquery multiselect dropdown into a hidden element's id? I need that id be an array so I can get the selected values of the multiselect into that. What I tried is: $( "#Myselect" ).change(function(){ var str = ""; $( "select option:selected" ).each(function() { str += $( this ).val() + " "; }); document.getElementById("objecttype").value = str; }).trigger( "change" ); &lt;html:hidden styleId="objecttype" property="objecttype" name="Myobjecttype"/&gt; but objecttype is just an id and isn't an array!
has answer: http://stackoverflow.com/a/27121468
has comment: http://stackoverflow.com/comment/42742962
has comment: http://stackoverflow.com/comment/42743244
has title: How can I put selected value of jquery multiselect dropdown into a hidden element's id
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27121484
has comment: http://stackoverflow.com/comment/42743359

http://stackoverflow.com/comment/42587450
comment on: http://stackoverflow.com/q/27019165
score: 0
type: Comment
type: QuestionComment
has text: Hi Uwe, if you post this comment as an answer i will gladly mark it as answer. It worked changing it to utf8! Thanks a million!

http://stackoverflow.com/comment/42667082
type: Comment
has text: is it ok if i just use the latest jquery ui and css? i think i cant customize the old theme. the theme roller generated the latest version.
type: AnswerComment
comment on: http://stackoverflow.com/a/27078169
score: 0

http://stackoverflow.com/comment/116922446
has text: Umer: Did this with out?
comment on: http://stackoverflow.com/a/27067197
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/27035872
type: Question
tagged with: backbone-routing
has answer: http://stackoverflow.com/a/27036011
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
tagged with: backbone.js
type: UnansweredQuestion
has title: How to destroy previously created view instance while creating the new instance for the same view in Backbone.js
has body: I am using Backbone.js in my project. I have created a new instance of a view in a render function of another view render: function (data) { var newView = new View(); } need to call same render function again and again without refreshing the page. if i do so, it creates multiple instances. How do i destroy/hide the previously created instance before creating the new one?
has answer: http://stackoverflow.com/a/27036404
score: 2
upvote count: 2
tagged with: backbone-events
tagged with: backbone-views

http://stackoverflow.com/a/26994609
type: Answer
answers question: http://stackoverflow.com/q/26994481
has body: Add this in your ajax. async : false
score: 0

http://stackoverflow.com/q/27096548
has title: Filter by search using text found in element within each div
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: show-hide
has answer: http://stackoverflow.com/a/27096842
has answer: http://stackoverflow.com/a/46935825
favorite count: 0
tagged with: filter
possible better answer: http://stackoverflow.com/a/27096791
accepted answer: http://stackoverflow.com/a/27096842
has answer: http://stackoverflow.com/a/27096791
has answer: http://stackoverflow.com/a/27096766
upvote count: 6
answer count: 4
has body: I found a fiddle that was useful for hiding text based on the text used in a search box, but have not been able to figure out how to adapt this method to a div with multiple elements in it. How could I change the jQuery in the attached fiddle to make it filter the div elements that match the search entered instead of the text found in the list items? http://jsfiddle.net/point71echo/rof67uy6/2/ apples apricots acai blueberry bananas cherry coconut donut durean apples apricots Here's the jQuery used: $('#box').keyup(function(){ var valThis = $(this).val().toLowerCase(); if(valThis == ""){ $('.navList > li').show(); } else { $('.navList > li').each(function(){ var text = $(this).text().toLowerCase(); (text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide(); }); }; });
score: 6
type: Question
type: AnsweredQuestion
tagged with: filtering

http://stackoverflow.com/a/27085544
has body: Yes, this surely can be done with JQuery &amp; Ajax. So your code will look something like $(document).on("change","#dropDownSelector", function(){ var changedVal = $("#dropDownSelector").val(); $.ajax({ type: 'POST', url: 'actionUrl', //logic for getting the data based on dropdown valur from db data: { "value": changedVal, }, beforeSend:function (){ //Do something before request is sent like showing loading image }, success:function (data){ //Success . Use the data and show it on ui }, error: function(xhr, textStatus, errorThrown){ // failed request; give feedback to user }, complete:function (){ //Do something after request is complete. } }); You still need to create the url and action for that based on the server side language and database you are working on. But overall your javascript code should follow this. Hope this be of some help. Happy Learning :)
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27084970
score: 0
answers question: http://stackoverflow.com/q/27084970
type: Answer

http://stackoverflow.com/comment/42562257
has text: Thanks but You just remove margins from element.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27018702
type: Comment

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/27128805
tags question: http://stackoverflow.com/q/27036937
tags question: http://stackoverflow.com/q/27131755
type: Tag

http://stackoverflow.com/q/26997727
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/26997968
has comment: http://stackoverflow.com/comment/42526001
type: Question
has body: I have an array of dicts returned by the server in an ajax request as: var obj = [{'id': '111', 'name': 'test1'}, {'id': '1975', 'name': 'test2'}] When I try to access each dictionary as: $.each(obj,function(index,value){ alert(index + " : " + value); }); I get the error: Uncaught TypeError: Cannot use 'in' operator to search for '193' in [{'id': '111', 'name': 'test1'}, {'id': '1975', 'name': 'test2'}] How can you access each dictionary in the array?
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42526140
has answer: http://stackoverflow.com/a/26997968
has answer: http://stackoverflow.com/a/26997996
has title: JQuery iterate over array of dictionaries
has comment: http://stackoverflow.com/comment/42526246
favorite count: 0
has answer: http://stackoverflow.com/a/26997917
upvote count: 3
has answer: http://stackoverflow.com/a/26997819
has comment: http://stackoverflow.com/comment/42526147
possible better answer: http://stackoverflow.com/a/26997917
has comment: http://stackoverflow.com/comment/42526086
has comment: http://stackoverflow.com/comment/42526017
answer count: 4

http://stackoverflow.com/a/32616134
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/27075416
has body: @AshishKumar I am afraid you will not be able to do this since DOMElement class doesn't actually render to the Canvas. All it does is it transforms the target element within the DOM. Moving the x/y position for instance. Sorry for the late response.

http://stackoverflow.com/comment/42723940
score: 3
has text: Dont think this is doable, have had a good look around. Read this: https://mail.mozilla.org/pipermail/es-discuss/2012-July/024066.html
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27110305

http://stackoverflow.com/a/27071448
score: 1
has comment: http://stackoverflow.com/comment/42655694
answers question: http://stackoverflow.com/q/27071349
has comment: http://stackoverflow.com/comment/42655621
type: AcceptedAnswer
downvote count: 0
has body: Uhh, this is quite a bad implementation :( First, you need to change the event for $("#searchInputCompanies") to make it all a bit easier. So, it will become $("#searchInputCompanies").on("input", function() {... $("#resetAction").on("whatEventYouWant", function() { $("#searchInputCompanies").val("").trigger("input"); }); This will trigger input event on $("#searchInputCompanies") and because the text box is empty all rows will become visible.
type: Answer
accepted answer of: http://stackoverflow.com/q/27071349
has comment: http://stackoverflow.com/comment/42655655
upvote count: 1

http://stackoverflow.com/q/27123318
upvote count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27123440
accepted answer: http://stackoverflow.com/a/27123440
type: Question
has body: Hi guys I need to know is it possible to know a file(say .txt) is open or used in any applications before uploading it using ajax in js.
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
has title: is it possible to know a file(say .txt) is open in client side using javascript
downvote count: 2
favorite count: 0

http://stackoverflow.com/a/27077009
type: Answer
accepted answer of: http://stackoverflow.com/q/27075606
has comment: http://stackoverflow.com/comment/42702295
answers question: http://stackoverflow.com/q/27075606
upvote count: 7
has comment: http://stackoverflow.com/comment/42701810
has body: Instead of changing the status of the option right away, first you need to get current values in the select fields, so that you can disable them in other select fields demo $(".go").change(function(){ var selVal=[]; $(".go").each(function(){ selVal.push(this.value); }); $(this).siblings(".go").find("option").removeAttr("disabled").filter(function(){ var a=$(this).parent("select").val(); return (($.inArray(this.value, selVal) &gt; -1) &amp;&amp; (this.value!=a)) }).attr("disabled","disabled"); }); $(".go").eq(0).trigger('change'); the above code can be used with any number of select boxes :)
has comment: http://stackoverflow.com/comment/42703293
type: AcceptedAnswer
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/42700116

http://stackoverflow.com/a/27084536
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27065567
answers question: http://stackoverflow.com/q/27065567
type: Answer
has body: If I understand the question, maybe this can help //it is easier to handle with json array var scale = [{'class': 'abovePlus', 'r1': 20, 'r2': 20}, {'class': 'above', 'r1': 5, 'r2': 6}, {'class': 'high', 'r1': 2, 'r2': 1}, {'class': 'at', 'r1': 0, 'r2': 0}, {'class': 'low', 'r1': -1, 'r2': -2}, {'class': 'below', 'r1': -2, 'r2': -4}, {'class': 'belowPlus', 'r1': -9, 'r2': -9}]; //three columns with data. skipping first var column = [ [0, 1], [1, 1], [2, 2] ]; $(function () { //finds each row $("tr").each(function () { //in row find each cell (td), but not the first $(this).find('td').not(':first').each(function (index) { var $td = $(this); //get score var score = $(this).text(); //moves through a variable $.each(scale, function (i, scl) { //get class, and value 1 i 2 var newClass = scl.class; var r1 = scl.r1; var r2 = scl.r2; //get rul for column var rule = column[index][1]; //based on the rules and values, add class to cell (td) if (rule == 1 &amp;&amp; score &lt; r1) $td.addClass(newClass); if (rule == 2 &amp;&amp; score &lt; r2) $td.addClass(newClass); }) }); }) }); TEST
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/42687098

http://stackoverflow.com/a/27137927
has comment: http://stackoverflow.com/comment/42773879
has comment: http://stackoverflow.com/comment/42773958
type: AcceptedAnswer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27137848
type: Answer
has body: Try using click event: $('#arrange-delivery-table :checkbox').click(function(e){ updateTotals(); });
accepted answer of: http://stackoverflow.com/q/27137848
upvote count: 1

http://stackoverflow.com/comment/42891071
type: Comment
type: QuestionComment
has text: How is the javascript cookie sent to the server to authenticate?
comment on: http://stackoverflow.com/q/27137562
score: 0

http://stackoverflow.com/q/27062749
tagged with: image
tagged with: colors
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/27292291
answer count: 2
has title: Get first pixel's color of an image ( JS / jQuery )
linked to: http://stackoverflow.com/q/7985722
has answer: http://stackoverflow.com/a/27062921
tagged with: pixel
score: 0
possible better answer: http://stackoverflow.com/a/27062921
accepted answer: http://stackoverflow.com/a/27292291
has body: I have - for example - this pic: var imgSrc = "http://scottkleinberg.com/wp-content/uploads/2012/10/icon-512x512.png"; And i need only variable with RGB or RGBA or HEX color on first position pixel (0,0): var color = getFirstPixelColor( imgSrc ); // Should return #AAE8FE or 170,323,254 or 170,323,254,1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/27032289
answers question: http://stackoverflow.com/q/27031981
score: 4
has body: In case this helps somebody else, I made a few dumb mistakes: You need to be sure you are added it to the metadata property result.metadata = {'team': $scope.team}; You need to make sure you grab the metadata var team = req.body.metadata; You need to pass it in as metadata metadata: team
downvote count: 0
type: Answer
upvote count: 4

http://stackoverflow.com/comment/42758750
has text: Let me guess the way you wrote it does not work? It is the same situation as before. `offset` is the global position. The `left` and `right` is the local position relative to the offset parent. Thats hay I said that you should use `.offset` to _get_ **AND** _set_ the positions.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27125061
score: 0

http://stackoverflow.com/q/27136086
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to parse a csv file into javascript. I downloaded https://github.com/evanplaice/jquery-csv into a local directory under the name seen in line 8. The map doesn't display at all. If I take out line 14, the map displays perfectly. Any assistance is appreciated. Google Maps Multiple Markers
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42770789
score: 0
has comment: http://stackoverflow.com/comment/42770893
has comment: http://stackoverflow.com/comment/42770473
has comment: http://stackoverflow.com/comment/42770786
tagged with: jquery
tagged with: parsing
tagged with: http://stackoverflow.com/tag/csv
has title: Parsing csv into JSON
answer count: 0

http://stackoverflow.com/a/27052570
score: 6
type: Answer
upvote count: 6
has body: Angular Fire will not broadcast an event on the scope. You will need to do that from within the promise completion callback. I would recommend doing so in your Authentication service. myApp.factory('Authentication', function ($rootScope, $firebase, $firebaseAuth, FIREBASE_URL, $location) { var ref = new Firebase(FIREBASE_URL); console.log(FIREBASE_URL); var simpleLogin = $firebaseAuth(ref); var myObject = { login: function (user) { return simpleLogin.$authWithPassword({ email: user.email, password: user.password }).then(function(authData){ $rootScope.$broadcast('$firebaseAuth:authWithPassword',authData); return authData; }); } //login } //myObject return myObject; }) You return authData at the end of your handler so you can chain additional actions on to the same promise (as you do in RegistrationController).
answers question: http://stackoverflow.com/q/27051669
accepted answer of: http://stackoverflow.com/q/27051669
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/42649196
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27067950
type: QuestionComment
has text: Why dont you try and send the Current date from the server side instead

http://stackoverflow.com/q/27121150
has answer: http://stackoverflow.com/a/27121338
type: Question
has comment: http://stackoverflow.com/comment/42743492
tagged with: javascript
has answer: http://stackoverflow.com/a/27121275
score: 0
tagged with: validation
has answer: http://stackoverflow.com/a/27121354
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42744114
has title: My html form validation is not working
has answer: http://stackoverflow.com/a/27121298
type: UnansweredQuestion
answer count: 4
has body: I'm a beginner, and I need some help with my assignment. I can't work out what I've done wrong. The label and submit button appear in html, but when I click on the submit button it doesn't validate the form. My assignment is to produce a form to enter your name. Onsubmit a function to validate the name is called that will validate that the name cannot be blank and must be more than 6 characters. First name (required)
has comment: http://stackoverflow.com/comment/42743291

http://stackoverflow.com/a/27141012
score: 1
upvote count: 2
type: AcceptedAnswer
downvote count: 1
answers question: http://stackoverflow.com/q/27140952
accepted answer of: http://stackoverflow.com/q/27140952
type: Answer
has body: It would be easier is to give your object an ID. and reference the object by the ID using document.getElementById and document.addEventListener Change your HTML: Source 1

http://stackoverflow.com/q/27003788
has body: Here is the dom: This is how I am submitting: function createOrderItems(){ showCustomPanel(" Creating Order Items "); $("#order_items")[0].submit(); return false; } Here you can see that the text field isnt getting picked up:
has title: Why cant I get the text boxes to POST/GET when I submit
type: Question
has answer: http://stackoverflow.com/a/27003868
has comment: http://stackoverflow.com/comment/42537224
answer count: 2
possible better answer: http://stackoverflow.com/a/27004016
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27003868
has answer: http://stackoverflow.com/a/27004016

http://stackoverflow.com/a/29165107
has body: There are some alternatives that could solve your problem: Open the Test Object Map; select from the map the object that represents the document document_eBenefitsHome; modify the .url property using regular expression, so that the URLs of the two pages you cited in your question match the regex. Find dinamically the document object using the find method. Once the page containing the link you want to click was fully loaded, try to use this code to find the document: find(atDescendant(".class", "Html.HtmlDocument"), false). The false boolean value allow the find method to search also among object that are not previously recorded.
answers question: http://stackoverflow.com/q/27043345
score: 0
type: Answer

http://stackoverflow.com/a/27019092
has body: You forgot to bind the event to the continent select. document.getElementById("continent").addEventListener("change", showhide); function showhide() { var sel = document.getElementById("continent").value; if (sel == 'Africa') { document.getElementById('africa').style.display = 'inline-block'; document.getElementById('america').style.display = 'none'; } else { document.getElementById('america').style.display = 'inline-block'; document.getElementById('africa').style.display = 'none'; } } #africa, #america { display: none; } Pick a Continent First. Africa America Asia Europe Oceania and Pacific Pick a Sub-Region. North Africa East Africa Central Africa West Africa Southern Africa Pick a Sub-Region. North America Central America South America
type: Answer
answers question: http://stackoverflow.com/q/27018650
score: 0

http://stackoverflow.com/q/27024882
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/42573398
tagged with: javascript
has comment: http://stackoverflow.com/comment/42573413
favorite count: 0
has answer: http://stackoverflow.com/a/27024958
has answer: http://stackoverflow.com/a/27025022
has title: Regex Javascript matching all
tagged with: regex
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/42573315
has body: I have a string var str='[match1] text [match2] [match3] text'; I need all the words enclosed by [] the result should be match1, match2,match3 I tried str.match(/\[([^]]+)\]/); what would be the correct Regex?
has comment: http://stackoverflow.com/comment/42573457
type: Question
has answer: http://stackoverflow.com/a/27024963
answer count: 3

http://stackoverflow.com/q/27070425
score: 0
has answer: http://stackoverflow.com/a/27070594
type: Question
possible better answer: http://stackoverflow.com/a/27070594
accepted answer: http://stackoverflow.com/a/27070507
has title: Adding the total for a form Javascript
tagged with: javascript
has answer: http://stackoverflow.com/a/27071131
has body: I have been working on this form and can't get past the CalculateTotal. I am completely lost on how to get this to add up and display in the box. Can anyone help? Here is my jsfiddle http://jsfiddle.net/clbacon70/x6kjqbop/1/ var gc_fSandwichPrice = 5.99; // Price for each sandwich var gc_fExtrasPrice = 1.50; // Price for each extra item // GLOBAL VARS // Global object vars var divErrors; var radSandwich; var radSize; var chkExtras; // Other global vars var g_fTotal; var g_sSandwich; var g_sSize; var g_sExtras; window.addEventListener('load', Init); function Init() { document.getElementById("h1Title").innerHTML = "Dirty Deli 1.0"; var spanExtrasPrice = document.getElementById("spanExtrasPrice"); var btnCalculateTotal = document.getElementById("btnCalculateTotal"); divErrors = document.getElementById("divErrors"); radSandwich = document.getElementsByName('radSandwich'); radSize = document.getElementsByName('radSize'); chkExtras = document.getElementsByName('chkExtras'); spanExtrasPrice.innerHTML = gc_fExtrasPrice.toFixed(2); btnCalculateTotal.addEventListener('click', CalculateTotal); } // function Init() function CalculateTotal() { divErrors.innerHTML = ''; if (radSandwich[0].checked) { g_sSandwich = radSandwich[0].value; } else if (radSandwich[1].checked) { g_sSandwich = radSandwich[1].value; } else if (radSandwich[2].checked) { g_sSandwich = radSandwich[2].value; } else if (radSandwich[3].checked) { g_sSandwich = radSandwich[3].value; } else { divErrors.innerHTML = "Select a Sandwich"; return; } if (radSize[0].checked){ g_fTotal = radSize[0].title; } else if (radSize[1].checked) { g_fTotal = radSize[1].title; } else if (radSize[2].checked) { g_fTotal = radSize[2].title; } else { divErrors.innerHTML = "Please choose a size"; return; } if (chkExtras[0].checked) { g_sExtras = chkExtras[0].value; g_fTotal = g_fTotal + gc_fExtrasPrice; } if (chkExtras[1].checked) { g_sExtras = g_sExtras + ',' + chkExtras[1].value; g_fTotal = g_fTotal + gc_fExtrasPrice; } if (chkExtras[2…
answer count: 4
has answer: http://stackoverflow.com/a/27070507
has answer: http://stackoverflow.com/a/27070607
type: AnsweredQuestion

http://stackoverflow.com/comment/42555617
comment on: http://stackoverflow.com/q/27014591
type: Comment
has text: How many element on your page have the class "content" ?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42549816
type: Comment
has text: @kunalManwar that's what mentioned in the answer, but glad you get it resolved.
comment on: http://stackoverflow.com/a/27011109
score: 0
type: AnswerComment

http://stackoverflow.com/q/27068976
has answer: http://stackoverflow.com/a/27069279
has answer: http://stackoverflow.com/a/27069445
type: AnsweredQuestion
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27069279
has body: I have this html: some text some text some text some text some text some text some text some text There are multiple parent-div divs and like I said in comments I need to close opened div after first and then open new div with same class, then after last close that div. With this code I get n number (for each parent-div) of under first in first parent-div. $('.parent-div').each(function() { $('.parent-div ul').first().after(' '); $('.parent-div ul').last().after(' '); }) How can I insert needed code in each parent-div after first and last ?
favorite count: 0
has title: Add elements after first and last ul in multiple divs
upvote count: 1
has comment: http://stackoverflow.com/comment/42651330
has comment: http://stackoverflow.com/comment/42651018
possible better answer: http://stackoverflow.com/a/27069445

http://stackoverflow.com/q/27119223
has comment: http://stackoverflow.com/comment/42834219
tagged with: raphael
has body: I am building a web application and for this I am building a basic Image Editor using HTML5 and Raphael js. I have implemented some features like: Resize Flip horizontal and/or vertical Drag Some more features I need to implement are : Crop Undo/Redo Changing background colour and opacity. I am mainly looking for crop and undo functionality. Can anyone help me to achieve this using RaphaelJs and HTML5? My Code: var r, c, d; var paper = Raphael("editor", 600,450); var canvas = document.getElementById('editor'); canvas.style.backgroundColor='gray'; $scope.current; var someFunction = function(e) { e.data('dragged', false); e.drag(dragmove, dragstart, dragend); for(var i in elements) { var thisShape = elements[i]; var ft = paper.freeTransform(thisShape,{draw:['bbox']}); ft.hideHandles(); thisShape.click(function(){ paper.forEach(function(el) { if(el.freeTransform.handles.bbox != null) el.freeTransform.hideHandles(); }); this.freeTransform.showHandles(); }); } }; function dragmove(dx, dy, x, y, e) { this.transform(this.current_transform+'T'+dx+','+dy); } function dragstart(x, y, e) { this.current_transform = this.transform(); } function dragend(e) { this.current_transform = this.transform(); }; var elements = []; $scope.raph = function () { c= paper.circle(40,40,40).click(function() { someFunction(this); $scope.current= this; }); r = paper.rect(50, 60, 100,100,25).click(function() { someFunction(this); $scope.current= this; }); d = paper.rect(70, 60, 100,100,25).click(function() { someFunction(this); $scope.current= this; }); elements.push(c,r,d); c.attr({ fill:'red', cursor:'pointer' }); r.attr({ fill:'green', cursor:'pointer' }); d.attr({ fill:'blue', cursor:'pointer' }); }; $scope.back = function () { $scope.current.toBack(); } $scope.front = function () { $scope.current.toFront(); } $scope.clear = function () { paper.clear(); }; $scope.flips = function () { $scope.current.rotate(180); }; //function for cloning element $scope.clones = function () { var n = $scope.curr…
has comment: http://stackoverflow.com/comment/42801728
has answer: http://stackoverflow.com/a/27533235
has comment: http://stackoverflow.com/comment/42749623
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has title: How to build Image Editor using HTML5 and Raphael JS?
has comment: http://stackoverflow.com/comment/42823300
has comment: http://stackoverflow.com/comment/42922518
accepted answer: http://stackoverflow.com/a/27533235
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42922553
has comment: http://stackoverflow.com/comment/42841664
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42751086
has comment: http://stackoverflow.com/comment/42749242
type: Question
has comment: http://stackoverflow.com/comment/42750186
tagged with: javascript
has comment: http://stackoverflow.com/comment/42826468

http://stackoverflow.com/q/27119394
type: Question
has comment: http://stackoverflow.com/comment/42762008
answer count: 1
downvote count: 0
tagged with: javascript
has body: Here I am trying to insert JSON Parsed Data into MYSQL Database. I created Table in MYSQL with 3 columns - link,url,description.My Table name in MYSQL is information.. My code does not working. I am unable to find the mistake.. Can anyone help me!! Here is my code dbStore.js var express=require('express'); var mysql=require('mysql'); var config = require('./config.json'); var dbConnect = mysql.createConnection({ user : config.user, password : config.password, database : config.database }); dbConnect.connect(function(err){ if(err){ console.log(err); }else{ console.log("connection success"); } }); function insert() { var key = $("#search1").val(); var htmlContent = ""; $.ajax({ type: "GET", url: "http://api.duckduckgo.com/?q=" + key + "&amp;format=json&amp;pretty=1", dataType: "jsonp", success: function (data, status, jqXHR) { alert("on success"); if (data.RelatedTopics.length != "") { for (var i = 0; i &lt; data.RelatedTopics.length; i++) { var desc = data.RelatedTopics[i].Text; var url = data.RelatedTopics[i].Icon.URL; var link = data.RelatedTopics[i].FirstURL; var data={ link: link, url: url, description: desc }; dbConnect.query('INSERT INTO information SET?',data,function(err,res){}); htmlContent += ""; $('#div1').html(htmlContent); } } }, error: "error" }); }; Table name is information(columns- link,url,description) .From my html page on-click event I called the insert() function in dbStore.js that will parse json data from api and insert data in table. Thank you in advance.
tagged with: parsing
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27119836
tagged with: node.js
score: 2
tagged with: http://stackoverflow.com/tag/json
has title: How to Insert JSON Parsed data into MYSQL
tagged with: mysql

http://stackoverflow.com/comment/42757565
has text: key word indicates that cells belonging to the column key. in your case, define your data-id by adding the word key + object.key
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27114019

http://stackoverflow.com/comment/42560560
type: QuestionComment
has text: You need to escape your quotes (`"{firstName: \"Pan\"}"`) or use alternate quotes (`'{firstName: "Pan"}'`).
score: 0
comment on: http://stackoverflow.com/q/27017711
type: Comment

http://stackoverflow.com/q/27071903
has body: I have a 'Save' button on my form that has knockout enable binding. I added valueUpdate: 'keypress' to my knockout binding expression hoping for save button to become enabled on keypress. I have a simple input textbox with value knockout binding. Instead, page still requiring user to click away for save button to become enabled. HTML below. when user types in input, canSave becomes true enabling save button. Save First Name:
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Knockout JS valueUpdate keypress not working for enable binding
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27072108
possible better answer: http://stackoverflow.com/a/27072376
has answer: http://stackoverflow.com/a/27072376
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/27072108
tagged with: knockout.js
has answer: http://stackoverflow.com/a/75649562

http://stackoverflow.com/q/27059335
accepted answer: http://stackoverflow.com/a/27062383
type: Question
has comment: http://stackoverflow.com/comment/42637529
tagged with: javascript
has comment: http://stackoverflow.com/comment/42633607
has comment: http://stackoverflow.com/comment/42633561
has comment: http://stackoverflow.com/comment/42633767
score: 0
has title: Problems displaying data from nested JSON structure
has body: I'm working on Sharepoint page where i want to retrieve data from the build in REST service. The data resides in a multilayer JSON structure. The JSON structure: JSON file I want to fetch data from the first entry (entry[0]), located under Feed->Entry But I can't seem to find the right way to collect and display this. My code: &lt;script&gt; $( document ).ready(function() { $.ajax({ url: "http://intra.site.com/_vti_bin/ListData.svc/ExchangeRates? $orderby=Modified%20desc", headers: { 'accept': 'application/json;odata=verbose', 'content-type': 'application/json;odata=verbose'}, success: function(data){ document.getElementById("rest_test").innerHTML = "&lt;b&gt;" + data.feed.entry[0].title + "&lt;/b&gt;"; } }); }); The code should display the title object from the first entry (entry[0]), but doesn't return, not even undefined. Any advice on how I can retrieve data from a nested JSON structure? Thx in advance. EDIT: Image of console output: Link
answer count: 1
has comment: http://stackoverflow.com/comment/42635723
has comment: http://stackoverflow.com/comment/42637214
has answer: http://stackoverflow.com/a/27062383
has comment: http://stackoverflow.com/comment/42638447
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42633898
has comment: http://stackoverflow.com/comment/42633558
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42636015

http://stackoverflow.com/q/27102185
has title: How To Get Value of Slider Before Slider Manipulation Event?
type: AnsweredQuestion
has body: I need to get the value of a slider before the start of the slider manipulation. Using an on focus event works if the user clicks with the Jquerymobile slider input box. But it doesn't work if the user manipulates the slider. A slidestart event doesn't work. It's always a little off the slider value before the slidestart event?? Is there a way to call the last value of a slider input? Or capture the slider value before it's manipulated? Here's what I've tried so far... (In this example, I want to listen for any changes to sliders in class entry_percent.) var entry_percent_class = $('.entry_percent'); var previous_value; var change; $( ".entry_percent" ).on( 'slidestart', function( event ) { previous_value = $(this).val(); alert(previous_value); }); entry_percent_class.on('tap', function() { // if the user inputs a number in the slider box, capture the number before it's changed. previous_value = $(this).val(); alert(previous_value); }); entry_percent_class.on('focus', function() { // if the user inputs a number in the slider box, capture the number before it's changed. previous_value = $(this).val(); //alert(previous_value); }); entry_percent_class.on('change', function() { // if the user inputs a number in the slider box, capture the number before it's changed. previous_value = $(this).val(); //alert(previous_value); });
has answer: http://stackoverflow.com/a/27102707
type: Question
accepted answer: http://stackoverflow.com/a/27102707
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/q/27003911
type: Question
answer count: 2
has title: mouseover for multiple
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/27005482
has body: What do I have to add/change to my js for multiple mouseovers from I have a mouseover to show an image, but I would like to use it on multiple lines, with different image, which are placed all in the same div What I have: function ShowPicture(id,Source) { if (Source=="1"){ if (document.layers) document.layers[''+id+''].visibility = "show" else if (document.all) document.all[''+id+''].style.visibility = "visible" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible" } else if (Source=="0"){ if (document.layers) document.layers[''+id+''].visibility = "hide" else if (document.all) document.all[''+id+''].style.visibility = "hidden" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" } } Trompetten NameA NameB NameC
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42537368
possible better answer: http://stackoverflow.com/a/27005569
has answer: http://stackoverflow.com/a/27005482
has answer: http://stackoverflow.com/a/27005569

http://stackoverflow.com/comment/42523101
type: Comment
type: QuestionComment
has text: @mplungjan Yes, it was a different domain URL. http://theinside.example.com vs http://inside.example.com Doesn't make sense as to why it was not an issue on other workstations. Thanks much!
score: 0
comment on: http://stackoverflow.com/q/26995962

http://stackoverflow.com/q/27013005
type: AnsweredQuestion
score: 1
has body: I want to give permission to the user to select only one check box. $jsqla = mysql_query("select * from products where id='$product_id'") or die(mysql_error()); $jfeta = mysql_fetch_assoc($jsqla); $formats = explode(";", $jfeta['formats']); <?php foreach($formats as $v){ ?> <input class="format_cheks" type="checkbox" value="<?php echo $v; ?>" style="visibility:hidden;"/> <?php echo $v; ?> <?php } ?>
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/27013056
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27013056
has title: How to select only one checkbox when data comes from database
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
downvote count: 0
tagged with: php

http://stackoverflow.com/comment/42983726
score: 0
comment on: http://stackoverflow.com/q/27046210
type: Comment
type: QuestionComment
has text: no dear! i mean how to write html code using javascript.

http://stackoverflow.com/comment/42770091
has text: `document.getElementById('email').value`. Incidentally if you are debugging interactively with chrome $0 to $4 remembers the last five DOM elements you've selected in the developer tools so you can simply run $0.value in the console.
comment on: http://stackoverflow.com/q/27135846
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/27016716
linked to: http://stackoverflow.com/q/1378433
answer count: 1
has comment: http://stackoverflow.com/comment/42559376
has answer: http://stackoverflow.com/a/27017136
favorite count: 0
has comment: http://stackoverflow.com/comment/42559167
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/729577
tagged with: http://stackoverflow.com/tag/html
has body: I have an iframe. When the page loads, the page makes a queryString. I need to access the query string that is generated after the page is loaded But with this code just I can access the src without the query string alert(document.getElementById('myframe').src);
duplicate of: http://stackoverflow.com/q/1378433
has title: get iframe query string with javaScript
type: Question
downvote count: 0
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/comment/42536142
type: QuestionComment
has text: have you tried anything?
comment on: http://stackoverflow.com/q/27003243
score: 0
type: Comment

joomla
tags question: http://stackoverflow.com/q/27110633
tags question: http://stackoverflow.com/q/27046985
type: Tag
tags question: http://stackoverflow.com/q/27066190
tags question: http://stackoverflow.com/q/27145752
tag name: joomla

http://stackoverflow.com/q/27097642
has comment: http://stackoverflow.com/comment/42711946
tagged with: ember-cli
favorite count: 0
has title: Ember Cli append HTML to body tag, before the script tags
has comment: http://stackoverflow.com/comment/42700580
type: UnansweredQuestion
tagged with: ember.js
has comment: http://stackoverflow.com/comment/42714757
has comment: http://stackoverflow.com/comment/42711803
has body: The default ember cli app would add html to body tag, after script tags. So, it will be kinda like this: Page Title I want to put the code right after the body tag, before the script tags: Page Title I can specify the rootElement in app.js, but if I specify body tag, it still adds the html code below script tags. The only way it works is if i set kind of a 'wrapper' like so: rootElement: '.wrapper' and the result will be: Page Title But why the hell on earth would I need this wrapper ? (it is like a stone age, i hate that approach) Is there a way to specify the location right after the body tag, before the scripts tag?
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/42711751
has comment: http://stackoverflow.com/comment/42711233
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42712061
has comment: http://stackoverflow.com/comment/42700544
downvote count: 0
has comment: http://stackoverflow.com/comment/42721594
tagged with: javascript
has comment: http://stackoverflow.com/comment/42775105

http://stackoverflow.com/q/27007995
type: AnsweredQuestion
has body: My application displays dates in different formats based on user settings. I want to test that it displays correct date format. I have the displayed date as a string (2014/12/31). I do not want to verify the actual date, but just the format. Ex: When user selects yyyy/dd/MM format, it should display it in that format.
tagged with: java
downvote count: 1
has comment: http://stackoverflow.com/comment/42544436
has comment: http://stackoverflow.com/comment/42545045
type: Question
possible better answer: http://stackoverflow.com/a/27008075
has answer: http://stackoverflow.com/a/27008156
tagged with: javascript
tagged with: date
has title: how to compare date format
score: 0
has answer: http://stackoverflow.com/a/27008075
upvote count: 1
has comment: http://stackoverflow.com/comment/42545000
has answer: http://stackoverflow.com/a/27008189
favorite count: 0
has comment: http://stackoverflow.com/comment/42544490
has answer: http://stackoverflow.com/a/27008043
accepted answer: http://stackoverflow.com/a/27008043
tagged with: robotium
answer count: 4
has comment: http://stackoverflow.com/comment/42544577

http://stackoverflow.com/comment/42579407
type: QuestionComment
has text: What defines `$hold`?
comment on: http://stackoverflow.com/q/27028217
score: 0
type: Comment

http://stackoverflow.com/a/27040124
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27039830
has body: Turns out you can actually use Cat.prototype instanceof Pet MDN's examples of instanceof shows this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
answers question: http://stackoverflow.com/q/27039830
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/comment/42604408
type: Comment
type: QuestionComment
has text: I think that you forget the port at localhost. by default mongo running at 27017.
comment on: http://stackoverflow.com/q/27042535
score: 0

http://stackoverflow.com/comment/42534758
type: Comment
comment on: http://stackoverflow.com/a/26995154
has text: I am not allowed to use JQuery or other libs.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/42755715
score: 0
has text: But your head tag is shown in the provided code and you do not include jquery there
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27126224

http://stackoverflow.com/a/27154102
has body: It's quite easy to access to KO viewModel if you have acces to any of the bound elements (i.e. you don't need to be on the root of the binding). If you have the root of the binding, this will return the bound viewmodel: ko.dataFor(rootElement); If your viewmodel is flat (i.e. it doesn't contain sub-objects or collections) you can do exactly the same to access the bound view model from any of the inner dom objects. But, if your viewmodel is hierarchical, you should use ko.contextFor(someElement), that will give you access to the full context, i.e. $data, $parent, $parents, $root... See this knockout documentation: Using unobtrusive event handlers
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/27144402
has comment: http://stackoverflow.com/comment/42825443
has comment: http://stackoverflow.com/comment/42814569
answers question: http://stackoverflow.com/q/27144402

http://stackoverflow.com/q/27043157
tagged with: javascript
tagged with: scope
answer count: 2
has answer: http://stackoverflow.com/a/27043533
accepted answer: http://stackoverflow.com/a/27043258
has comment: http://stackoverflow.com/comment/42605379
has comment: http://stackoverflow.com/comment/42605342
possible better answer: http://stackoverflow.com/a/27043533
has comment: http://stackoverflow.com/comment/42605884
has comment: http://stackoverflow.com/comment/42605413
has comment: http://stackoverflow.com/comment/42605453
type: AnsweredQuestion
score: 0
type: Question
has title: Accessing "Parent Scope"
has body: Disclaimer: I'm not sure that I'm using the correct terminology. Given this code: var sample = 'Text'; var test = function(sample) { console.log(sample); }; test('Text Too'); I am aware that if the function parameter had a different name, the console.log() call would output "Text". Is there a way for the test() function to reference the "parent scope" variable, sample without changing the name of the function parameter? If so, how?
has answer: http://stackoverflow.com/a/27043258

http://stackoverflow.com/comment/42657887
type: QuestionComment
type: Comment
has text: I just modified your alert() to show `SomaFilhos[0]` and it shows up as 10 no problems
score: 0
comment on: http://stackoverflow.com/q/27072903

http://stackoverflow.com/q/27133395
type: Question
has body: There is a ruleset in Bootstrap that demands that we never exceed a 12 column layout. I read the docs on why this is, but in the way I'm using the grid for this little module, I'm not sure the ruleset applies. Here is my fiddle demo: http://jsfiddle.net/6Lcx2k2t/ Here is a portion of the markup: glyphicon glyphicon-asterisk glyphicon glyphicon-plus glyphicon glyphicon-cloud glyphicon glyphicon-envelope glyphicon glyphicon-pencil glyphicon glyphicon-glass This is a demo toolbar, and if you notice when you resize the output, the tiles adjust to the change of the viewport. However, if you notice my markup, I'm really using bootstrap grid classes incorrectly (I've leveraging the fact that if you exceed 12, anything after that point will wrap to the next line). I've cross browser tested this, but can anyone tell me why my approach may be volatile in the end? By the way, I wrapped a div with a grid class of col-xs-12 around the tiles so that I could get the padding that my tiles are not applying, since I am not using bootstrap like I should. I do know that this approach will skew centering and such, but in my case, not an issue.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42767275
has comment: http://stackoverflow.com/comment/42772048
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Using Bootstrap Grid for a Tile System but without JS
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/27134253

http://stackoverflow.com/comment/42770109
type: Comment
has text: I'm not sure why people even do alerts anymore.. just use the console.log.. it's much easier to test code using the intermediate console, developers need to become more familiar with it.
score: 2
comment on: http://stackoverflow.com/a/27135901
type: AnswerComment

http://stackoverflow.com/q/27126197
has comment: http://stackoverflow.com/comment/42753601
has comment: http://stackoverflow.com/comment/42752924
has comment: http://stackoverflow.com/comment/42758040
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27130261
score: 9
type: Question
has comment: http://stackoverflow.com/comment/42753015
has comment: http://stackoverflow.com/comment/42759499
upvote count: 9
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/42758692
has comment: http://stackoverflow.com/comment/42758073
has comment: http://stackoverflow.com/comment/42752988
tagged with: cross-domain
accepted answer: http://stackoverflow.com/a/27130261
tagged with: google-chrome-extension
answer count: 1
has comment: http://stackoverflow.com/comment/42758935
has title: Modify headers on onHeadersReceived
has body: In my chrome extension I need to add a line to header of every site browsed. In background.js file I add such code: var responseListener = function(details){ var rule = { "name": "Access-Control-Allow-Origin", "value": "*" }; details.responseHeaders.push(rule); return {responseHeaders: details.responseHeaders}; }; chrome.webRequest.onHeadersReceived.addListener(responseListener, {urls: [ "*://*/*" ] }, ["blocking", "responseHeaders"]); While debugging the handler is called and newly added header successfully passes any filters I have found upper in the stack. But it is not seen on network tab's Response headers section and does not effects any code. I use these permissions: "tabs","&lt;all_urls&gt;", "http://*/*" ,"webRequest","webRequestBlocking", "webNavigation" Is there a new policy or API changed which disallow to do such things or there is some bug in my 10 lines of a code?
favorite count: 0
has comment: http://stackoverflow.com/comment/42753191
has comment: http://stackoverflow.com/comment/42759094

http://stackoverflow.com/q/27117823
has comment: http://stackoverflow.com/comment/42738285
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/27118162
favorite count: 0
has body: I have this javascript code that inserts a label into an existing html page. However, it only shows when i reload the page. Like if i visit the page it doesn't show. once im at the page and reload, it then shows. How do i fix it so it shows right when i visit the page? $(document).ready(function () { insertlabel(); }); function insertlabel() { var $label = $(' test '); //place them on the page $('.div1').after($label); }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42738294
has title: HTML elements only show after i reload page?
upvote count: 0
type: Question
tagged with: javascript
tagged with: jquery
score: -1

http://stackoverflow.com/a/27133712
type: Answer
score: 8
answers question: http://stackoverflow.com/q/27133690
downvote count: 0
upvote count: 8
has body: Those are IE's non-standard conditional comments. They allow conditional loading of parts of an HTML page in IE. They're no longer supported since IE version 10. That particular use is conditionally determining which &lt;html&gt; tag to use so that it has a different class based on the browser. This lets you target CSS rules in the document based on that class, which is helpful for legacy support.

http://stackoverflow.com/comment/137719161
comment on: http://stackoverflow.com/a/27028258
type: Comment
score: 0
type: AnswerComment
has text: Warning this function is deprecated see https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand

http://stackoverflow.com/a/43529690
upvote count: 5
downvote count: 0
has body: Using lodash's sum method, it's even easier: let cost = _.sum(creep.body.map(function (b) { return BODYPART_COST[b]; })); The arrow method makes it more elegant: let cost = _.sum(creep.body.map((b) =&gt; BODYPART_COST[b]));
type: Answer
score: 5
answers question: http://stackoverflow.com/q/27101080

http://stackoverflow.com/comment/42660791
has text: if you mandate parens around replaced subsets, you _might_ be able to get away with naive substitution, we would need to know more about the input possibilities. if not a parser is a sure fire, if complicated, way to solve the problem.
type: Comment
comment on: http://stackoverflow.com/q/27074529
score: 0
type: QuestionComment

http://stackoverflow.com/comment/42783104
has text: check dynamically generated content with inspect Element and see if there is any missing code or improper class definitions, it may be styling issue.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27142580

http://stackoverflow.com/comment/42676762
type: QuestionComment
has text: I imagine I just got my first negative feedback because you think this is too simple a question to ask?
comment on: http://stackoverflow.com/q/27083790
score: 0
type: Comment

http://stackoverflow.com/comment/42790802
comment on: http://stackoverflow.com/q/27147750
has text: @adeneo what is stateless? HTML or HTTP?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/27040430
has answer: http://stackoverflow.com/a/64063221
has body: I am learning javascript and I want to initialize a boolean array in javascript. I tried doing this: var anyBoxesChecked = []; var numeroPerguntas = 5; for(int i=0;i&lt;numeroPerguntas;i++) { anyBoxesChecked.push(false); } But it doesn't work. After googling I only found this way: public var terroristShooting : boolean[] = BooleanArrayTrue(10); function BooleanArrayTrue (size : int) : boolean[] { var boolArray = new boolean[size]; for (var b in boolArray) b = true; return boolArray; } But I find this a very difficult way just to initialize an array. Any one knows another way to do that?
tagged with: javascript
has answer: http://stackoverflow.com/a/61230699
tagged with: boolean
has answer: http://stackoverflow.com/a/58362794
tagged with: arrays
downvote count: 0
answer count: 7
has answer: http://stackoverflow.com/a/27040476
favorite count: 0
score: 32
has title: How to initialize a boolean array in javascript
upvote count: 32
has answer: http://stackoverflow.com/a/27040674
possible better answer: http://stackoverflow.com/a/42386154
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42386154
accepted answer: http://stackoverflow.com/a/27040476
has answer: http://stackoverflow.com/a/77903398
type: Question

http://stackoverflow.com/a/37847956
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27122559
type: Answer
has body: Here's a working sliding menu in Onsen UI. Two changes you should make is to put the sliding-menu element is outside of the navigator, and to reference it with a variable, var="menu". Using a variable simplifies your script. Click below for a simple example. ons.bootstrap(); Page 1 Next Page Toggle Menu Page 2 Back First option Second option
score: 1

http://stackoverflow.com/comment/42565328
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27020237
has text: I used a comment-toggle, but i decided to change the functionality to a model window. The problem that i haven't work with it until now.

http://stackoverflow.com/comment/42627260
type: Comment
type: QuestionComment
has text: no servlet is not problem here.. the problem is you are initialising datatable on click of button more than once. Can you brief me about scenario/requirement.
score: 0
comment on: http://stackoverflow.com/q/27055273

http://stackoverflow.com/comment/42681167
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27082178
type: AnswerComment
has text: Ah, I see. I also put the window.onload = function() { at the beginning of all the code and an ending bracket to make it work as well. You were extremely helpful to me and I thank you for spending your time to help me out.

http://stackoverflow.com/comment/42956179
type: Comment
type: QuestionComment
has text: Where is it getting `markup.dev` from?
score: 0
comment on: http://stackoverflow.com/q/27015379

http://stackoverflow.com/comment/42621015
comment on: http://stackoverflow.com/a/27051953
type: Comment
has text: Nope, this doesn't seem to work either, not that moving it about should really make much of a difference as the dialog is asynchronous so it should pass right though.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42656645
type: QuestionComment
has text: Wait, it works for you? What the...
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27072078

http://stackoverflow.com/comment/42871548
has text: Do you mean your tiff-to-pdf converter produces invalid PDF, however other online converters produce good PDFs? Did you contact viewer.js support?
comment on: http://stackoverflow.com/q/27143506
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42589402
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65262/discussion-between-manivasagam-and-anpsmn).
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27033297

http://stackoverflow.com/comment/42642985
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27064486
has text: Please include some code on what you have tried doing so far and any traceback on what hasn't worked.

http://stackoverflow.com/comment/42519526
comment on: http://stackoverflow.com/q/26994440
score: 0
has text: Alright, please post the response that ASP.NET is sending (find it in F12 -> Network). Or check IIS logs for any errors or exceptions.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/52309452
has comment: http://stackoverflow.com/comment/93321049
has comment: http://stackoverflow.com/comment/92483459
downvote count: 1
score: 1
answers question: http://stackoverflow.com/q/27078285
has comment: http://stackoverflow.com/comment/93345368
has comment: http://stackoverflow.com/comment/92493051
has body: This is not a throttle function by definition but a debouncer. A callback function takes arguments (args), and still it works wrapped with the debouncer function. Be free to customize delay time according to your app needs. 1 time per 100ms is used for development mode, event "oninput" is just an example for the frequent case of its use: const callback = (...args) => { console.count('callback throttled with arguments:', args); }; const debouncer = (callback, limit) => { let timeoutHandler = 'null' return (...args) => { if (timeoutHandler === 'null') { timeoutHandler = setTimeout(() => { callback(...args) timeoutHandler = 'null' }, limit) } } } window.addEventListener('oninput', debouncer(callback, 100));
has comment: http://stackoverflow.com/comment/93277793
type: Answer
upvote count: 2

http://stackoverflow.com/comment/42724762
score: 0
has text: @feeela accoring to [this](http://www.w3.org/TR/html401/types.html#type-name), no. That said, it works in Chrome 41.0.2228.2 (Official Build) canary.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27110430

http://stackoverflow.com/a/27121646
has comment: http://stackoverflow.com/comment/42772125
type: Answer
score: 2
answers question: http://stackoverflow.com/q/27117133
has body: W3schools is incorrect as usual. Useful references like MDN on select tell that required is supported by modern versions of all major browsers; the main problem with support is lack of support in IE 9 and older. However, you need to note the definition of the attribute: it means that the control satisfies the constraint if and only if its value is nonempty. Since the first option is selected by default (unless you make another option initially selected using the selected attribute), you need to make its value empty. Example: :invalid { outline: solid red } &lt;form&gt; &lt;select name=fruit required&gt; &lt;option value=""&gt;Please select a fruit &lt;option&gt;apple &lt;option&gt;orange &lt;/select&gt; &lt;input type=submit value=Submit&gt; &lt;/form&gt; If you need to cover IE 9 and older, too, just add simple JavaScript code that checks that value property of the select element is not empty when the form is to be submitted (or whenever you are checking the form data in the browser).
accepted answer of: http://stackoverflow.com/q/27117133
type: AcceptedAnswer
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/42527307
comment on: http://stackoverflow.com/a/26998333
type: AnswerComment
has text: This has the same problem too. If it's working for the OP, then it's likely that the image was cached. But you're going to load a new image when a click happens, which means its `width` and `height` won't be available.
type: Comment
score: 2

http://stackoverflow.com/comment/42706636
type: Comment
has text: Adding x to the columns data (your way) allows for the axis information to be updated dynamically.
comment on: http://stackoverflow.com/a/27077829
score: 0
type: AnswerComment

http://stackoverflow.com/q/27141657
answer count: 3
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27141893
favorite count: 0
has answer: http://stackoverflow.com/a/27141873
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/27141882
upvote count: 1
has title: How change the jquery position on screen?
type: Question
possible better answer: http://stackoverflow.com/a/27141873
has body: In the html file top I have included the css file and javascript: The jquery is thee cycle2 The jquery is working also the second one the caroufredsel both are working. But i want to move the cycle2 to the left so it will be on the left side of the caroufredsel. In the html bottom inside the body I have: And the cycle2 css file content: .vertical-slider-container { background: #fff; border: 20px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); margin: 40px auto; position: relative; width: 120px; } .slideshow { background: #fff; position: relative; overflow: hidden; width: 100%; } .slideshow img { display: block; width: 100px; height: 100px; padding: 10px; } .vertical-slider-nav { color: rgba(0,0,0,0.8); cursor: pointer; display: block; height: 40px; margin-left: -20px; left: 50%; z-index: 10; position: absolute; overflow: hidden; opacity: 0; text-decoration: none; width: 40px; transition: all .3s ease; } .vertical-slider-nav-up { top: -60px; } .vertical-slider-container:hover .vertical-slider-nav-up:hover { opacity: 1; } .vertical-slider-container:hover .vertical-slider-nav-up { top: -20px; opacity: 0.7; } .vertical-slider-nav-down { bottom: -60px; } .vertical-slider-container:hover .vertical-slider-nav-down:hover { opacity: 1; } .vertical-slider-container:hover .vertical-slider-nav-down { bottom: -20px; opacity: 0.7; }![enter image description here][1] I tried to change values of many properties in the css code but it didn't effect anything. EDIT What I mean is that I have one jquery already in the middle. I want to move the cycle2 a bit to the left so it will be on the left side of the other big image. This is edited screenshot I did I took the cycle2 from the center and pasted it where I want it to be.
has answer: http://stackoverflow.com/a/27141882

http://stackoverflow.com/comment/42722210
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27109592
has text: It seems to be that `checkRepeat('cccaacddcccc', '')` should return 13, since it "occurs" in between each letter. By the way, it's highly unlikely regexp is going to work for this, since you're looking for matches which are overlapping. Your solution is not working how? @Begueradj Downvotes are not unreasonable for "gimme-some-code" questions, not matter what the rep is.

http://stackoverflow.com/q/26992931
score: 1
has title: Can't do a post with angular cause ng-controller
favorite count: 0
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/26992993
tagged with: angularjs-ng-click
upvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/26992993
has body: I've a problem with angularjs. When i Try to get elements from my database all is fine. But now, I've added a controller that i use to do a post called hb2Controller and it gives me this error: Error: error:areq Bad Argument Argument 'hb2Controller' is not a function, got undefined What Have i done wrong? Why it gives me this error? hEY bOss <!--[if lt IE 9]> <![endif]--> HeyBossTeam TABELLA TEMPI Gioco Pista Nome Tempi Aggiungi Tempo Gioco Pista Nome Tempi {{x.Gioco}} {{x.Pista}} {{x.Nome}} {{x.Tempi}} Thanks!
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/27083971
answer count: 0
score: 0
type: Question
tagged with: canvas
has title: Drawing two images in Canvas at the same time
tagged with: javascript
has body: I try to program an online version of Kara (the little ladybug you can program to find the leafs laying in the grid). For that, I programmed some functions to draw the needed objects into the grid. Those functions are: Kara.prototype.draw_object = function (x, y, asset) { pos = this.calc_pos(x,y); var img = new Image(); img.onload = function() { c.drawImage(img, pos.x, pos.y, 40, 40); } img.src = asset; } Kara.prototype.draw_tree = function(x,y) { this.draw_object(x,y,this.assets.asset_tree); } Kara.prototype.draw_leaf = function(x,y) { this.draw_object(x,y,this.assets.asset_leaf); } Kara.prototype.draw_mush = function(x,y) { this.draw_object(x,y,this.assets.asset_mush); } The asset object is defined in the init functions and point to png files like img/tree.png. calc_pos calculates the absolute x and y position depending on the position in the grid. There is a lot work to do. Because I would like to draw some sample content every time the browser reloads, I wrote a sample function: Kara.prototype.sample = function() { kara = this; kara.draw_kara(1,1); // Not listed above. Draws the little laddybug setTimeout(function() { kara.draw_tree(2,1); }, 4); setTimeout(function() { kara.draw_mush(3,1); }, 8); setTimeout(function() { kara.draw_leaf(4,1); }, 12); } Without the timeout everything is drawn to [4][1]. Because it worked when I typed every single command in the Developer console I tried to find the root of the bug by placing some waiting time between the draw commands. If there are 0.5 seconds between the commands everything works perfect. With 4 miliseconds it could work properly or some objects are placed above each other. Does anybody know an issue where this occured or can give me a hint for the origion of this bug?
linked to: http://stackoverflow.com/q/18974517
has comment: http://stackoverflow.com/comment/42685537
tagged with: html5-canvas
has comment: http://stackoverflow.com/comment/42683390
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42678337
has comment: http://stackoverflow.com/comment/42678266

http://stackoverflow.com/comment/42589215
type: QuestionComment
comment on: http://stackoverflow.com/q/27033297
has text: yes that green border. so is there any other option to make arrange orderly?
score: 0
type: Comment

http://stackoverflow.com/comment/42660259
has text: Thank you for the quick response. SlidingDiv2 no longer displays upon calling the refresh function, however as the Javascript isn't loaded/executed, there is no way to make the div visible again.
comment on: http://stackoverflow.com/a/27074297
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/27137646
score: 0
has comment: http://stackoverflow.com/comment/42774596
tagged with: templates
has title: uncaught typerror cannot set propt position of undefined googlemap in a view
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/42773511
type: Question
tagged with: javascript
tagged with: jquery
has body: Any idea what i am doing wrong here with this google map view?? I get this error from the code below. Uncaught TypeError: Cannot set property 'position' of undefined var MapView = function () { // var latlong; this.initialize = function() { $(document).ready(function() { //initializeMap(); }); this.$el = $('&lt;div/&gt;'); this.render(); }; initializeMap = function() { console.log("initializing map"); var mapc = $("#map-canvas"); console.log(mapc); var mapOptions = { center: { lat: -34.397, lng: 150.644}, zoom: 8 }; console.log(mapOptions); var map; if (mapc){ map = new google.maps.Map(mapc, mapOptions); } if (map){ console.log(map); } else {console.log("no map") }; } this.render = function() { this.$el.html(this.template()); google.maps.event.addDomListener(window,"load", initializeMap(), false); return this; }; this.initialize(); } console log initializing map MapView.js:16 2014-11-25 15:51:20.181[context: document, selector: "#map-canvas", jquery: "2.1.1", constructor: function, toArray: function…] MapView.js:21 2014-11-25 15:51:20.184Object {center: Object, zoom: 8} MapView.js:26 2014-11-25 15:51:20.188Ln {gm_bindings_: Object, __gm: Wh, gm_accessors_: Object, center: df, zoom: 8…} MapView.js:35 2014-11-25 15:51:20.189initializing map MapView.js:16 2014-11-25 15:51:20.189[context: document, selector: "#map-canvas", jquery: "2.1.1", constructor: function, toArray: function…] MapView.js:21 2014-11-25 15:51:20.191Object {center: Object, zoom: 8} MapView.js:26 2014-11-25 15:51:20.192Ln {gm_bindings_: Object, __gm: Wh, gm_accessors_: Object, center: df, zoom: 8…} MapView.js:35 2014-11-25 15:51:20.226Uncaught TypeError: Cannot set property 'position' of undefined

http://stackoverflow.com/a/27033071
accepted answer of: http://stackoverflow.com/q/27032973
answers question: http://stackoverflow.com/q/27032973
score: 0
has body: javascript has first class functions so you can do something like this: function drawLoop(action) { var drawx = 0; var drawy = 0; while(drawy &lt; 22){ while(drawx &lt; 10){ action(drawx, drawy); drawx++; } drawx = 0; drawy++; } } And then call it like this: drawLoop(function(drawx, drawy){ if(nextBlock[drawx][drawy] != false){ base[drawx][drawy] = nextBlock[drawx][drawy]; } }); And of course, you can change the function you pass to drawLoop to suite your needs.
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/42778135
has text: It's just a little sample piece I was working on to get familiar with the practice - I know it's terrible. Is there a simple example out there that you know of? Thanks for the feedback, though!
type: QuestionComment
comment on: http://stackoverflow.com/q/27140168
score: 0
type: Comment

http://stackoverflow.com/a/27073030
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/42726480
type: Answer
answers question: http://stackoverflow.com/q/27071097
has body: This happens because inside the .wrap() the dropdown element is cloned. While it's still bound to the scope, this has no effect on internal expressions and directives and must be recompiled. The easier solution is to create a wrapping <my-directive> so that dropdown becomes the topmost element in this structure. input may be inserted using transclude. //within directive return { transclude: true, template: ' ' + ' ' + ' ' + // UL template goes here ' ', link: function (scope, element) { //... link function code } } And it seems that you don't need to compile in this case.
upvote count: 0
has comment: http://stackoverflow.com/comment/42726209

http://stackoverflow.com/comment/42637183
type: Comment
has text: Thanks a lot. Your example works perfect for me. Unfortunatly I have no 15 reputation to vote this answer up.
comment on: http://stackoverflow.com/a/27059865
score: 0
type: AnswerComment

http://stackoverflow.com/q/27109164
has answer: http://stackoverflow.com/a/27119701
has answer: http://stackoverflow.com/a/47425021
has title: Meteor - Wrapping NPMs with Meteor.wrapAsync()
possible better answer: http://stackoverflow.com/a/27110078
tagged with: javascript
has answer: http://stackoverflow.com/a/27110078
accepted answer: http://stackoverflow.com/a/27119701
has answer: http://stackoverflow.com/a/27111795
downvote count: 0
tagged with: meteor
favorite count: 0
has body: I'm trying to wrap the superagent NPM with Meteor.wrapAsync, everything works fine until the last line of the code below, which causes my meteor app to crash. var superagent = Meteor.npmRequire('superagent'); // Example of how superagent works superagent.get('http://127.0.0.1:8080/json/', function(result){ console.log(result); // Works, shows the result }); // This appears to work too var agentAsync = Meteor.wrapAsync(superagent.get); // This crashes app agentAsync('http://127.0.0.1:8080/json/'); I've also tried passing a context to wrapAsync() and it makes no difference: var agentAsync = Meteor.wrapAsync(superagent.get, superagent); Here is the console output: W20141124-17:31:32.094(0)? (STDERR) W20141124-17:31:32.136(0)? (STDERR) /home/ciwolsey/.meteor/packages/meteor-tool/.1.0.35.1bjny7b++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:206 W20141124-17:31:32.136(0)? (STDERR) throw(ex); W20141124-17:31:32.137(0)? (STDERR) ^ W20141124-17:31:32.137(0)? (STDERR) [object Object] W20141124-17:31:32.137(0)? (STDERR) at Object.Future.wait (/home/ciwolsey/.meteor/packages/meteor-tool/.1.0.35.1bjny7b++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:326:15) W20141124-17:31:32.137(0)? (STDERR) at packages/meteor/helpers.js:118 W20141124-17:31:32.137(0)? (STDERR) at app/server/main.js:5:1 W20141124-17:31:32.137(0)? (STDERR) at app/server/main.js:8:3 W20141124-17:31:32.137(0)? (STDERR) at /home/ciwolsey/projects/hello/.meteor/local/build/programs/server/boot.js:168:10 W20141124-17:31:32.138(0)? (STDERR) at Array.forEach (native) W20141124-17:31:32.138(0)? (STDERR) at Function._.each._.forEach (/home/ciwolsey/.meteor/packages/meteor-tool/.1.0.35.1bjny7b++os.linux.x86_64+web.browser+web.cordova/meteor-tool-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11) W20141124-17:31:32.138(0)? (STDERR) at /home/ciwolsey/projects/hello/.m…
upvote count: 2
answer count: 4
score: 2
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/42638939
comment on: http://stackoverflow.com/a/27031221
has text: Hi, I can't belive that I didn't see that the returned element is an array and now I can see the content asking the first element like result[0]. Thanks!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42827475
score: 0
type: AnswerComment
type: Comment
has text: Mathieu, for the simple solution you are correct. But sean's table add codes to the user table (i think that's what it is doing for what i have tried). I have tried adding div between header and data, when I run it, the div somehow is before the .
comment on: http://stackoverflow.com/a/27039999

http://stackoverflow.com/q/27131259
has title: Get session value with jQuery
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/27131334
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27131334
upvote count: 3
has comment: http://stackoverflow.com/comment/42761356
tagged with: php
type: Question
score: 3
tagged with: session
has body: I would like to retrieve data from a session variable on a button click, without reloading the page. My getter function is the following one: function GetSession() { var value; function GetValue(data) { value = data; } $.get("sessionAPI.php?action=get", function(data) { GetValue(data); }); return value; } Yet the "value" variable stays undefined after I call this function. How could I give the value of "data" to the "value" variable? Thanks for the answers!
has comment: http://stackoverflow.com/comment/42761324
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/27074417
score: 2
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/27082884
has body: How to highlight all the cells between drag start and drag end in current row, Drag can be only possible the current selection row, need to prevent vertical dragging check my fiddle http://jsfiddle.net/kannankds/3xakkja9/3/ $(function () { var isMouseDown = false; $("#mytable td") .mousedown(function () { isMouseDown = true; $(this).toggleClass("hilight"); var $this = $(this); parent = $this.closest('tr').get(0); return false; // prevent text selection }) .mouseover(function () { if (isMouseDown) { $(this).toggleClass("hilight"); } }); $(document) .mouseup(function () { isMouseDown = false; }); });
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: How to highlight all cells between drag start and drag end in current row, Drag can be only possible the current selection row
favorite count: 0
possible better answer: http://stackoverflow.com/a/27074487
has answer: http://stackoverflow.com/a/27074487
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 2
has answer: http://stackoverflow.com/a/27082884

http://stackoverflow.com/comment/42659419
has text: Thanks a lot guys, really appreciated. Not bad posting here for the first time and having the problem solved in 10 mins :)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/27073713
type: Comment

series
tag name: series
type: Tag
tags question: http://stackoverflow.com/q/27146881

http://stackoverflow.com/comment/121118789
comment on: http://stackoverflow.com/a/27187499
score: 0
type: AnswerComment
has text: Apparently it changed to https://docs.mongodb.com/manual/applications/data-models-tree-structures/
type: Comment

http://stackoverflow.com/comment/42573695
has text: I told that the array can be changed, so I don't have a possibility to write that by hands. I need a function to do it automatically depending on the array.
comment on: http://stackoverflow.com/q/27025066
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/74746624
answers question: http://stackoverflow.com/q/27040090
type: Answer
has body: I found adding formnovalidate to the button skipped form validation for the form only when clicking that button.
score: 0

http://stackoverflow.com/comment/42791983
type: QuestionComment
has text: Sir i add ' config.removePlugins = menu,menubutton,toolbar,contextmenu';' in **config.js** of Ck editor i disable right click functionality on the whole page but only on CK editor when i press right click it works fine
score: 0
comment on: http://stackoverflow.com/q/27123782
type: Comment

http://stackoverflow.com/q/27148013
score: 0
tagged with: google-chrome-extension
answer count: 1
has answer: http://stackoverflow.com/a/27153337
has body: I am writing an auto-login script for Chrome Extension, I would like to use Protractor to be able to run multiple test against different web pages. Chrome Extension is adding JavaScript code into the webpage/tab. Can use Protractor to do the same? i.e. Create a script tag inside tested page &amp; run the code? Any suggestions much appreciated.
accepted answer: http://stackoverflow.com/a/27153337
type: AnsweredQuestion
type: Question
has title: Protractor - inject JavaScript into tested page
tagged with: protractor
tagged with: javascript

arrow-functions
tag name: arrow-functions
type: Tag
tags question: http://stackoverflow.com/q/27046007

http://stackoverflow.com/q/27131002
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27135942
has comment: http://stackoverflow.com/comment/42762575
type: Question
tagged with: mongodb
accepted answer: http://stackoverflow.com/a/27135942
has comment: http://stackoverflow.com/comment/42766868
tagged with: mongoose
has body: On my web app's homepage I fire off a GET request to my API in order to pull a current list of Stadiums in my database. I need certain parts of each Stadium object (name, city, state, prim_hex, sec_hex, active). The problem is that these Stadium objects also contain a "photos" array with tens of thousands of 'photo' objects. Since my get request pulls back all Stadium objects my homepage takes 5-10 seconds to load (due to the large "photos" arrays). My relevant code is below. How would I go about altering my GET request to only pull back the pieces I need (in other words, do not pull in "photos" arrays on homepage load)? Example Stadium object: { "_id": { "$oid": "54148f29e4b01927d54d26bc" }, "name": "High Point Solutions Stadium", "division": "East", "team": "Rutgers Scarlet Knights", "city": "Piscataway", "city_norm": "Piscataway", "state": "NJ", "loc": [ -74.465573, 40.513676 ], "loc_id": 300149, "prim_hex": "#d21034", "sec_hex": "#000000", "logo": "rutgers", "active": false, "photos": [...] } Current GET code in 'routes.js' on my nodejs server: // get all stadia app.get('/api/stadia', function(req, res) { // use mongoose to get all stadia in the database Stadium.find(function(err, stadia) { // if there is an error retrieving, send the error. nothing after res.send(err) will execute if (err) res.send(err) res.jsonp(stadia); // return all stadia in JSON format }); }); I believe the res.jsonp(stadia) code is what needs to be altered, but am not sure how to properly alter it to only pull certain pieces of each Stadium object.
tagged with: javascript
has comment: http://stackoverflow.com/comment/42772233
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/27137222
has title: Only pull certain parts of objects through GET request
possible better answer: http://stackoverflow.com/a/27137222
has comment: http://stackoverflow.com/comment/42770045
tagged with: angularjs
tagged with: node.js

http://stackoverflow.com/comment/42793596
type: AnswerComment
has text: The Chrome behaves normally when I try to Print Preview any page on the web. So I'm positive that its not the problem about my browser installation :)
comment on: http://stackoverflow.com/a/27149435
type: Comment
score: 0

http://stackoverflow.com/comment/42529259
type: Comment
comment on: http://stackoverflow.com/a/26999490
has text: input should remain in DIV
type: AnswerComment
score: 0

http://stackoverflow.com/q/27046193
has title: Use a variable as a JSON key
tagged with: javascript
answer count: 3
upvote count: 1
accepted answer: http://stackoverflow.com/a/27046275
favorite count: 0
has answer: http://stackoverflow.com/a/27046398
has answer: http://stackoverflow.com/a/27046275
has answer: http://stackoverflow.com/a/27047872
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I want to shorten my code and I am stuck. I have a quiz and for each question the answers are loaded. But I want to have a variable that does that for me. Here is the code: if (nr === 1) { $('#questionmobile').html(content.inst3.question1); $('#answer1').html(content.inst3.q1a1); $('#answer2').html(content.inst3.q1a2); $('#answer3').html(content.inst3.q1a3); $('#answer4').html(content.inst3.q1a4); } else if (nr === 2) { $('#questionmobile').html(content.inst3.question2); $('#answer1').html(content.inst3.q2a1); $('#answer2').html(content.inst3.q2a2); $('#answer3').html(content.inst3.q2a3); $('#answer4').html(content.inst3.q2a4); }...... As you can see its very redundant, so I thought to include the variable "nr" that has the information of the number of question. So I want something like: $('#questionmobile').html(content.inst3.question+nr); $('#answer1').html(content.inst3.q+nr+a1); The concatenation +nr+ is not working, since it doesn't direct to the right JSON content.
type: Question
possible better answer: http://stackoverflow.com/a/27046398

http://stackoverflow.com/a/53791705
answers question: http://stackoverflow.com/q/27078528
has body: You can use data.sort([{column: 0}]); for sorting it based on x-axis, Here column:0 indicates x-axis.https://developers.google.com/chart/interactive/docs/reference#DataTable_getSortedRows If the value you are trying to pass is through some xml or json and it has null values inside it will not plot properly and will be scattered or as dotted lines in line graph so to plot them, have a condition to remove all null values and then it will plot correctly.
score: 0
type: Answer

http://stackoverflow.com/a/27149547
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27149332
has body: once try this.. if(isset($_POST['submit'])) { if($row['cqid']=="") { echo "Please select an answer"; } } I don't know whether it works or not.. but once give it a try...

http://stackoverflow.com/q/27030172
tagged with: animation
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/42582968
type: Question
has comment: http://stackoverflow.com/comment/42582793
has comment: http://stackoverflow.com/comment/42583558
has comment: http://stackoverflow.com/comment/42583071
tagged with: javascript
has title: Efficient way to animate grass in canvas
linked to: http://stackoverflow.com/q/17171010
score: 4
has comment: http://stackoverflow.com/comment/42590547
has answer: http://stackoverflow.com/a/27051315
tagged with: canvas
answer count: 1
favorite count: 0
has body: I have been playing around with the capabilities of the 2d context of the canvas element to try to create relatively realistic 3d scenes and am currently trying to create a plain of 3d 'ish' grass as per fiddle: http://jsfiddle.net/PlacidCow/j6h7sajz/ My question is, what is the most efficient way to animate the grass to take in the effects of wind/physics etc? Currently I've just drawn to screen - I have tried storing the dimensions of each blade in a large array which ofc then takes ages to loop through to animate (hence is laggy and pointless). Is there an efficient way to draw per blade? Or would people recommend animating per block (but then how to fix as clearing a patch will mess up blades in front)? repeating blades so they batch animate? Have looked online (maybe I lack googling skills...) but I either find nothing, cagey webgl demos or examples for C etc but this use shaders which aren't available for 2d canvas. c = document.getElementsByTagName('canvas')[0]; ctx = c.getContext('2d'); var v = { w: c.clientWidth, h: c.clientHeight }; c.width = v.w; c.height = v.h; var base = { c: [ [-1, -1, 0], [-1, -1, -1], [1, -1, -1], [1, -1, 0] ], f: 'brown', d: -3 }; draw(base.c, base.f, base.d); for (var j=1; j&lt;120; j++) { for (var k=1; k&lt;200; k++) { var z = -1 + 2*j/199; var x = -1 + (2*Math.random())/1.01; var y = 0.06+Math.random()*0.04; var fl = Math.pow(-1, (Math.random()*1000)|0) * Math.random()/20; var blade = { c: [ [x, -1, z-Math.random()/1000], [x+0.002+fl, -1+y, z-Math.random()/1000], [x+0.007+fl, -1+y, z-Math.random()/1000], [x+0.02, -1, z-Math.random()/1000] ], f: 'green', d: 2 }; draw(blade.c, blade.f, blade.d); } } function draw(cds, fill, d) { var v = { w: c.clientWidth, h: c.clientHeight }; ctx.beginPath(); ctx.moveTo(((cds[0][0] * (1 / (1 - cds[0][2])) + 1) * v.w / 2)|0, ((v.h - (cds[0][1] + 1) * v.h / 2) * (1 / (1 - cds[0][2])))|0); for (var i = 1; i &lt; cds.length; i++) { ctx.lineTo(((cds[i][0] * (1 / (1 - cds[i][2])) + 1) * v.w / 2)|0, ((v.…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42582757

http://stackoverflow.com/a/27114202
score: 0
type: Answer
has body: You probably don't have a file called myApp/nls/jsapi.js in your application, so require can't find it and can't run your function that initializes the map. As the documentation says: After creating the resource bundle for the new locale, load the resource module You should read the documentation for dojo/i18n. It makes more clear what you need to do.
answers question: http://stackoverflow.com/q/27093722

http://stackoverflow.com/comment/42567648
has text: my problem is that it never seems to get as far as the if/else statement - regardless of what the user enters, (even if he/she leaves the password field blank), login is successful. For testing purposes, all that is in the text file is abcd.
type: QuestionComment
comment on: http://stackoverflow.com/q/27021410
score: 0
type: Comment

http://stackoverflow.com/a/27102707
accepted answer of: http://stackoverflow.com/q/27102185
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/42711214
upvote count: 1
answers question: http://stackoverflow.com/q/27102185
has body: Use the stop event to save the value and rescue it whenever you want. Better than using variables, use data: $( ".entry_percent" ).on( 'slidestart', function( event ) { previous_value = $(this).data("oldvalue"); alert(previous_value); }); $( ".entry_percent" ).on( 'slidestop', function( event ) { $(this).data("oldvalue",$(this).val()); }); FIDDLE
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/27151183
tagged with: apple-push-notifications
tagged with: cordova
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/47878156
score: 2
type: Question
tagged with: ios
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have an issue with push plugin version 2.4.0 In ios 8, it works pretty well, but in ios 6 and ios 7, badge count is not showing up. I can receive push on these devices, only the badge count is missing. Interestingly, i could see the badge coming in ios 6 once when i installed my app. At that time , I could see an additional message saying i should allow app to use push notifiication. Accidently i clicked the wrong button and the push was disabled. Later i turned it on in settings. After that, the badge is working properly. Anybody have any idea why this is happening? Any help will be appreciated. Thanks.
tagged with: phonegap-pushplugin
has title: Phonegap : PushPlugin badge issue version 2.4.0

http://stackoverflow.com/a/27122873
type: AcceptedAnswer
downvote count: 0
has body: I replaced: filesattached = $("input:File")[0].files.length; With: var areFilesAttached = document.getElementById('ctl00_ContentPlaceHolder1_fuAttachment').value ? true : false; Within the VesselDetails function. Then replaced the if statement within ins_client with the following: if (pagemode == 'NewVessel') { if (insurancestart !== '' &amp;&amp; insuranceend !== '' &amp;&amp; areFilesAttached == true) { e.IsValid = true; } else { e.IsValid = false; } } This was an alternative approach which enabled me to check whether or not a file had been provided without using the files.length property which is not compatible with IE9.
answers question: http://stackoverflow.com/q/26996339
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/26996339
score: 1

http://stackoverflow.com/a/27142917
has body: You may format the date to string as you want, using the next function: function formatDate(date) { var ans = date.getFullYear(); ans += "-" + (date.getMonth()+1); ans += "-" + date.getDay(); ans += " " + date.getHours(); ans += ":" + date.getMinutes(); document.write (ans); } This way, even if the user's browser converts date to string on different order (longer format etc.) you have full control on the output string.
type: Answer
answers question: http://stackoverflow.com/q/27142682
score: 0

http://stackoverflow.com/a/27042006
has comment: http://stackoverflow.com/comment/111306670
type: Answer
has comment: http://stackoverflow.com/comment/111306523
downvote count: 0
score: 3
upvote count: 3
has body: Your question actually has a couple of interesting components, let me try to answer them as good as I can :-) "Is it an ok practice to change an ID using javascript if the element is unique?" You could say it's a justifiable case, if the element really is unique, then there's no real harm in "moving" the ID with JavaScript. BUT In your description you touch on something more fundamental: "On click of a different item, I am using js to switch the id to a different item in the list, so that styling could be applied." If this is the case (you change the ID for styling), then I'd recommend using a class instead. People previously already gave you a good hint, something like an "is-active" class would be very useful as it's less specfic than an ID, can be used on multiple items if needed and if you use classes that determine a state (like "is-active", "has-children", "is-animating", etc.), it's really easy to re-use them in later parts of code as well and it is clear what the element is doing at the moment. A little code for reference: HTML Some item Some item Some item Some item CSS .is-active { color: #eee; background-color: #222; } jQuery // You probably want a bit more specific selector, but it's just an example. $('li').on('click', function() { var $element = $(this), $elements = $('li'); if (!$element.hasClass('is-active')) { $elements.removeClass('is-active'); $element.addClass('is-active'); } });
has comment: http://stackoverflow.com/comment/111339799
answers question: http://stackoverflow.com/q/27041673

http://stackoverflow.com/q/27040090
tagged with: jquery
has answer: http://stackoverflow.com/a/74746624
has title: Parsley: How to prevent validation when pressing buttons other than submit?
favorite count: 0
has body: Thank you for any help. I am trying to use Parsley for Form Validation. My form has one submit button and some other buttons to dynamically add inputs to the form. But when I press these other buttons, form validation is carried out. But I am not submitting any form. How to prevent form validation from happening when I press other buttons than submit button? Sorry, I dont know how to JS Fiddle. My code is like the following: Add When I press Add, the form is validated. How should I prevent this? Thank you very much.
has comment: http://stackoverflow.com/comment/42599500
has answer: http://stackoverflow.com/a/27040410
accepted answer: http://stackoverflow.com/a/27040410
score: 2
upvote count: 2
possible better answer: http://stackoverflow.com/a/74746624
type: AnsweredQuestion
tagged with: parsley.js
tagged with: javascript
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/42696721
score: 0
type: AnswerComment
has text: @DinoBicBoi I have updated the code so that you can now have the **index** and **question title** separated by the "-" char. You can then use the php `explode()` function to separate the **index** and the **question title** in the second part.
type: Comment
comment on: http://stackoverflow.com/a/27095452

http://stackoverflow.com/comment/42525791
type: AnswerComment
score: 0
type: Comment
has text: If validation is not the case in this scenario, then please add you .aspx page full code, so that I can see why it is not working? Because I try your code on new .aspx page and it is working for me. Definitely, something is weirdin your .aspx page
comment on: http://stackoverflow.com/a/26995890

http://stackoverflow.com/a/27115686
downvote count: 0
answers question: http://stackoverflow.com/q/27115536
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/42734059
has body: Although caslaner's answer seems to be the easiest way to achieve this, for educational purposes, here's a recursive function that does the same. function generate(str,rm) { if(rm === undefined) rm = Math.floor(Math.random() * 500); return rm ? generate((str||'') + '.',rm-1) : str; } document.write(generate());

http://stackoverflow.com/a/27136963
type: Answer
downvote count: 0
has body: Classes are separated by spaces, not commas! &lt;g class="classa classb classc"&gt; &lt;g class="classq classr classz"&gt; &lt;g class="classd classb classe"&gt; or better yet, &lt;g class="class-a class-b class-c"&gt; &lt;g class="class-q class-r class-z"&gt; &lt;g class="class-d class-b class-e"&gt; with the selector being d3.selectAll(".class-b"). Classes and selections for svg elements are the same as for html elements. Your selection of d3.selectAll(".class b") would be selecting all &lt;b&gt; elements who are children of elements with the class class.
score: 1
answers question: http://stackoverflow.com/q/27136685
upvote count: 1

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/27143058

http://stackoverflow.com/comment/42649816
type: AnswerComment
comment on: http://stackoverflow.com/a/27067931
score: 0
type: Comment
has text: @SimplyCraig It is an attempt to answer.

http://stackoverflow.com/a/26993594
has body: Test it : &lt;script&gt; window.onload = function() { var contentClass = document.getElementsByClassName("content"); for (var i = 0; i &lt; contentClass.length; i++) { if (contentClass.item(i).getAttribute("href") == "this.com") { contentClass.item(i).innerHTML = "Changed !"; } } } &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/26993363
score: 1
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/42518019

http://stackoverflow.com/q/27102086
has title: fabric js canvas getting duplicated (after continous drag )
has answer: http://stackoverflow.com/a/27120252
type: Question
accepted answer: http://stackoverflow.com/a/27247665
tagged with: javascript
tagged with: fabricjs
score: 0
answer count: 3
has body: i see unexpected error while adding object to canvas i see duplicated object created some where on page .this problem occurs only in when object are dragged into droppable area continously i am stucked up and could not find solution complete code :http://liveweave.com/f9z1Bq what i think 1: when object is dragged continously on to canvas a:when i drag first object to canvas object and is not reverted at all and 2 nd object also dragged then 1st object gets stucked on to canvas with below errors in console Uncaught TypeError: Cannot read property 'alt' of null :Script stops or Uncaught TypeError: Cannot read property 'tittle ' of null :Script stops and first object can not be used also or abc.com/alldevice/undefined 404 (Not Found) 2: i think some time drag event unable to get object when dragged fast or ??.. please help me how to solve it
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27247665
has answer: http://stackoverflow.com/a/27247512
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/27120252

http://stackoverflow.com/comment/42724963
has text: You code works fine if you set `numImages` correctly: http://jsfiddle.net/8wn39Lys/
score: 0
type: Comment
comment on: http://stackoverflow.com/q/27110691
type: QuestionComment

http://stackoverflow.com/a/75553176
answers question: http://stackoverflow.com/q/27117337
type: Answer
has body: Improved upon @Geelie's answer with added types: import {Request, Response, NextFunction, Handler} from "express"; const unless = (middleware: Handler, ...paths: RegExp[]): Handler => { return function (req: Request, res: Response, next: NextFunction) { const pathCheck = paths.some(path => path.test(req.path)); pathCheck ? next() : middleware(req, res, next); }; }; app.use(unless(redirectPage, new RegExp("/user/login"), new RegExp("/user/register")));
score: 0

http://stackoverflow.com/a/27113524
type: Answer
has body: Found one here: http://www.programmableweb.com/api/stock-quote http://dev.markitondemand.com/#doc_lookup Probably not 100% real time, but close enough. Example: http://dev.markitondemand.com/Api/v2/Quote/jsonp?symbol=AAPL&amp;callback=myFunction
upvote count: 2
has comment: http://stackoverflow.com/comment/76260795
answers question: http://stackoverflow.com/q/27051174
score: 1
downvote count: 1

http://stackoverflow.com/comment/42752886
score: 0
type: QuestionComment
has text: You are not getting it because your mousedown is the one that assigns the event handlers. You need to assign it for ANY mousedown on the element.
type: Comment
comment on: http://stackoverflow.com/q/27122320

http://stackoverflow.com/comment/42534581
score: 0
type: Comment
has text: Not sure if this is the best method for what you're trying to accomplish, but I know you could improve the `if` statement. See my edits.
type: AnswerComment
comment on: http://stackoverflow.com/a/27002199

http://stackoverflow.com/q/27003250
has answer: http://stackoverflow.com/a/27003386
answer count: 3
accepted answer: http://stackoverflow.com/a/27003386
tagged with: backbone.js
possible better answer: http://stackoverflow.com/a/27003361
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27003361
score: 0
has title: Need help setting up backbone.js: Uncaught ReferenceError: Backbone is not defined
type: Question
has answer: http://stackoverflow.com/a/27003390
has body: I am trying to set up a backbone driven web application but cannot get Backbone to load correctly. I get two errors when I load the required files: -Uncaught ReferenceError: Backbone is not defined test.html: 17 -Uncaught TypeError: Cannot read property 'each' of undefined backbone.min.js: 1 I have tried multiple sources for the backbone, underscore and jquery files and am still having the same errors. Any help would be appreciated. Thanks.
tagged with: javascript

http://stackoverflow.com/comment/42591424
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27035366
has text: What version of jQuery are you using? The two-function form of `.toggle` was removed in jQuery 1.9.
score: 0

http://stackoverflow.com/comment/42615385
has text: I must admit it does work! And I really spent too much time with it before I posted that question! Too many hours of work I guess! Thank you for your help and your time!
comment on: http://stackoverflow.com/a/27048736
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/44464766
has text: No, I used used in place of as a workaround. But is downgraded the performance of my application.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27021315
score: 1

http://stackoverflow.com/q/27047794
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27048219
tagged with: replace
score: 0
has body: I have a little jQuery script that works like Emmet/ZenCoding and that expands keywords to a snippet on the press of the TAB key in a textarea. It works fine when there's only one occurence of the keyword, but I don't know how to replace only the last occurence of a word in a string. Here's an example string that would be typed in the textarea : Have a look at the rules : rules In this case, the user would press the TAB key after the second rules, and the script fetches the corresponding value in an array, to replace the word with an actual link to the rules. It should (in theory) be replaced by this : Have a look at the rules : http://website.com/rules.php My problem is that I'm using replace and it will replace all occurences of that word, which is not the desired behavior. Here is the relevant part of the script : var content = $(this).val(); content = content.replace(lastWord, insertSnippets[lastWord]); $(this).val(content); It first gets the content in the textarea at the time, replace the word (rules) with the corresponding value (the actual link). Is there any way to replace only the last occurence? It won't always be the word "rules", there are a dozen of other keywords of unknown length. TL;DR How do I replace only the last occurence of a word with jQuery/Javascript? I was thinking of getting the current position of the caret and replace only the word to its left, but getting the position of the caret seems rather tedious - and I still wouldn't know how to do the replace.
has title: Replace the last occurence of a random word
favorite count: 0
has answer: http://stackoverflow.com/a/27048504
has answer: http://stackoverflow.com/a/27048132
has answer: http://stackoverflow.com/a/27049535
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 4

http://stackoverflow.com/comment/92896788
has text: path.posix.basename will return the filename on windows and linux, path.basename only returns filename on windows https://nodejs.org/api/path.html#path_windows_vs_posix
comment on: http://stackoverflow.com/a/27006391
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/a/29022670
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/27047365
upvote count: 1
has comment: http://stackoverflow.com/comment/56941445
type: Answer
has body: I took out everything but these: then I used this: $(document).ready(function() { $("#pdfDiv").click(function() { var pdf = new jsPDF('p','pt','letter'); var specialElementHandlers = { '#rentalListCan': function (element, renderer) { return true; } }; pdf.addHTML($('#rentalListCan').first(), function() { pdf.save("rentals.pdf"); }); }); }); I can print the table... looks great with chrome, safari or firefox, however, I only get the first page if my table is very large.

http://stackoverflow.com/q/27143217
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/27143278
has body: I am creating a website and I was planning on having the website containing only one page with multiple sections through out the page, with a navigation bar at the top of the screen to make it to where you can click on the section on the navigation bar at will scroll you to the section. When you click on the section it will also highlight the section you are currently on. The problem I am having is when I click on the section it will not highlight/select the section. BOS Contact Services About Home This is the JavaScript i was using to select the section: var main = function () { $('.nav-bar #btn').click(function() { $(".nav-bar #btn").removeClass("selected"); $(this).addClass("selected"); }); }; $(document).ready(main); Also, I am using Brackets (brackets.io), and it will work correctly when using the "live preview" within Brackets but won't work on any browser I test it on.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27143278
has title: Navigation bar bugs
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/42900663
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27209253
score: 0
has text: This is probably the best way to go about and covers all scenarios. And the `detect-zoom` script does not work with new versions of Chrome and Firefox. But as stated, Safari and Opera are supported.

http://stackoverflow.com/q/27092601
has comment: http://stackoverflow.com/comment/42691310
tagged with: angularjs
tagged with: node.js
answer count: 0
type: UnansweredQuestion
score: 0
type: Question
has comment: http://stackoverflow.com/comment/42763084
tagged with: mean-stack
has comment: http://stackoverflow.com/comment/42693790
has title: Want to load same Javascript file in both client-side and server-side scripts on MEAN-stack app
tagged with: javascript
has body: I developed a MEAN-stack web app generated by angular-fullstack. I wrote a file, date.js, that appends some helpers to Date.prototype. I want to load this file to access these helpers both on the server (in the API handlers) and on the client. Server-side code can load anything with "require([path/to/...]module-name)" whereas client side code gets loaded explicitly by &lt;java src="path/to/my-code.js"&gt;&lt;/java&gt; tags in the page. My goal is to place data.js (and other common utilities) in a place where it can be easily accessed from either client-side or server-side code without having to maintain a copy on each. While developing on my local box I solved this by placing it in my-app/client/assets/js/ where it can be loaded from the index.html page, and load it from server-side scripts with require("path/to/my-app.../client/assets/js/my-code.js"). That works fine on my local box but wreaks havoc when I try to deploy it to Heroku. Heroku renames my-app/client as "public" so those server-side require() calls no longer work. There has to be a better way to do this. Libraries like "lodash" are loaded both as Bower packages and as Node packages. Do I have to publish my little date.js library as a separate project available to both Bower and npm?

http://stackoverflow.com/comment/42696663
score: 2
has text: That doesn't answer my question, I'm rolling my own load testing suite, because hey, it's fun.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27095275

http://stackoverflow.com/q/27045016
has answer: http://stackoverflow.com/a/27045187
downvote count: 0
score: 1
type: Question
tagged with: javascript
has title: How can I resolve a promise once a CSV is done reading?
upvote count: 1
answer count: 1
favorite count: 0
tagged with: promise
accepted answer: http://stackoverflow.com/a/27045187
has body: I'm using the 'fast-csv' module found here (https://www.npmjs.org/package/fast-csv), but I'm willing to change that. I tried promised-csv (https://www.npmjs.org/package/promised-csv) but I couldn't wrap my head around it. I'm also using q (https://www.npmjs.org/package/q). This is part of a long chain of promised functions, so I'll only bother you with this one and the one immediately after. var csvRows = []; var parseCSV = function(){ var d = q.defer(); csv .fromPath(school+'_export1.csv') .on('data', function(data){ csvRows.push(data); }) .on('end', function(){ done = true; d.resolve(); }); return d.promise; } var updateSchedule = function(){ var d = q.defer(); console.log(csvRows); // csvRows.forEach(function(row){ // console.log(row); // connection.query('INSERT INTO schedule SET section_id = "'+data[0]+'", student_id = "'+data[1]+'", course_number = "'+data[2]+'", period = "'+data[3]+'", teacher_id = "'+data[4]+'", school_id = "'+school_id+'"', function(err, rows){ // if(err){ // console.log(err); // d.reject(); // } // }); // }); d.resolve(); return d.promise; } When I console.log(csvRows) from the .on('data') method, it logs each row individually, as it should. If I then console.log(csvRows) from the .on('end') method, it logs the entire array at once. Perfect. I then tried to resolve the promise here, but when it moves to the next function and I try to console.log(csvRows) I get an empty array. So I get that the promise isn't actually resolving, but I'm not quite sure how to resolve it. I'd really appreciate your help! EDIT: This is my promise chain: deleteRows() .then(function(){ parseCSV(); }) .then(function(){ updateSchedule(); }) .done();
tagged with: http://stackoverflow.com/tag/csv
tagged with: node.js
linked to: http://stackoverflow.com/q/26919251
type: AnsweredQuestion

http://stackoverflow.com/comment/65359766
type: Comment
comment on: http://stackoverflow.com/q/27102771
type: QuestionComment
has text: Did you ever come up with a solution for this?
score: 0

http://stackoverflow.com/comment/132225001
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/74916785
has text: This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/33494703)

http://stackoverflow.com/comment/42727040
has text: @MattBurland can you show me an example of what you mean? Thanks.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/27111865

http://stackoverflow.com/comment/42544886
type: QuestionComment
type: Comment
has text: To get it to function the way I want it to (just to take a quick baby step) at max-width : 480px I'd like an alert that says 'your screen is under 480px' and at another, I'd like for an alert to say 'your screen is over 480px' without having both alerts pop up regardless of screen size.
comment on: http://stackoverflow.com/q/27008004
score: 0

http://stackoverflow.com/q/27113874
has title: How to get option text not value with only static options
has answer: http://stackoverflow.com/a/27113972
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27113972
has comment: http://stackoverflow.com/comment/42730640
has body: How to extract the text of an option (select) when I am having hard coded options only? Afrikaans ... (374563 options more) ... So how can I get "Afrikaans" in my addLanguage()? Please note, the options are hard in the html, no json.
has comment: http://stackoverflow.com/comment/42730603
type: Question
answer count: 2
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27113960
has answer: http://stackoverflow.com/a/27113960
tagged with: angularjs

http://stackoverflow.com/comment/42709343
has text: Python has a good handling of exceptions, there is no reason to avoid using it just because you are used to another way (which is heavily based on asynchronous programming) from another language.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/27102639
type: Comment

http://stackoverflow.com/comment/42645237
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27061561
has text: Thanks for your effort for this, I really appreciate it!

http://stackoverflow.com/comment/42709584
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27101954
has text: Because the actual image files are outside the root of the website directory on the server - this is because the images are shared across more than one site. In the future they may also be server direct from the DB.
score: 0

http://stackoverflow.com/comment/43010006
comment on: http://stackoverflow.com/a/27263050
score: 1
type: AnswerComment
has text: Thanks, but your script doesn't handle overlapping elements, which is realy my problem...
type: Comment

email
tags question: http://stackoverflow.com/q/27150138
tags question: http://stackoverflow.com/q/27133489
tags question: http://stackoverflow.com/q/27130312
tags question: http://stackoverflow.com/q/27082885
tags question: http://stackoverflow.com/q/27144949
tags question: http://stackoverflow.com/q/27012236
tags question: http://stackoverflow.com/q/27140508
tags question: http://stackoverflow.com/q/27084159
type: Tag
tag name: email

http://stackoverflow.com/comment/42580928
score: 0
type: AnswerComment
has text: Amazing, just want I needed. I thought there may have been a more dynamic way to do this but this is working and just what I needed. Thanks, Pete!
comment on: http://stackoverflow.com/a/27029117
type: Comment

http://stackoverflow.com/comment/42632225
score: 1
type: AnswerComment
has text: Great. Good to know. in CC and CC 2014 .js and .jsx work
type: Comment
comment on: http://stackoverflow.com/a/27042152

http://stackoverflow.com/comment/42578765
has text: See the comment from Dave on your original question. What you need to do is load the `object`, and then run something like `document.getElementById('content').getElementsByClassName('gallery');` to search inside it (that specifically doesn't work, but that's the idea).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27027177
type: AnswerComment

http://stackoverflow.com/comment/42596245
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27037548
has text: @victor I think I have to make it work through javascript.
score: 0

http://stackoverflow.com/comment/42767782
comment on: http://stackoverflow.com/q/27134616
score: 0
type: Comment
type: QuestionComment
has text: We can't tell what you're doing wrong, until you show how you're trying to use that constant. An example from one of my apps: `app.constant('FBURL', "https://trenches.firebaseio.com/");` and `app.controller("TrenchesCtrl", function($scope, FBURL, $firebase) {`. https://trenches.firebaseapp.com/app.js

highcharts
tags question: http://stackoverflow.com/q/27105754
tags question: http://stackoverflow.com/q/27042952
tags question: http://stackoverflow.com/q/27148112
tags question: http://stackoverflow.com/q/27151114
tags question: http://stackoverflow.com/q/27089623
tags question: http://stackoverflow.com/q/27033536
tags question: http://stackoverflow.com/q/27151187
tags question: http://stackoverflow.com/q/27144479
tags question: http://stackoverflow.com/q/27036492
tags question: http://stackoverflow.com/q/27136310
tags question: http://stackoverflow.com/q/27144967
tags question: http://stackoverflow.com/q/27120894
tags question: http://stackoverflow.com/q/26996571
tags question: http://stackoverflow.com/q/27051986
tags question: http://stackoverflow.com/q/27086691
tags question: http://stackoverflow.com/q/27102227
tags question: http://stackoverflow.com/q/27003650
tags question: http://stackoverflow.com/q/27148354
tags question: http://stackoverflow.com/q/27058856
tags question: http://stackoverflow.com/q/27146881
tags question: http://stackoverflow.com/q/27116134
tags question: http://stackoverflow.com/q/27074911
tags question: http://stackoverflow.com/q/27126224
tags question: http://stackoverflow.com/q/27010499
tags question: http://stackoverflow.com/q/27078596
tags question: http://stackoverflow.com/q/27015266
tags question: http://stackoverflow.com/q/27059961
tags question: http://stackoverflow.com/q/27141324
tags question: http://stackoverflow.com/q/26993366
tags question: http://stackoverflow.com/q/27151717
tags question: http://stackoverflow.com/q/27056123
tags question: http://stackoverflow.com/q/27070426
tags question: http://stackoverflow.com/q/27143270
tags question: http://stackoverflow.com/q/27109550
tags question: http://stackoverflow.com/q/27062404
tags question: http://stackoverflow.com/q/27089784
tags question: http://stackoverflow.com/q/27054847
tags question: http://stackoverflow.com/q/27079356
tags question: http://stackoverflow.com/q/27041811
tags question: http://stackoverflow.com/q/27024648
tags question: http://stackoverflow.com/q/27139743
tags question: http://stackoverflow.com/q/26999360
type: Tag
tags question: http://stackoverflow.com/q/27019858
tags question: http://stackoverflow.com/q/27056542
tags question: http://stackoverflow.com/q/27064732
tag name: highcharts
tags question: http://stackoverflow.com/q/27008055

http://stackoverflow.com/q/27074965
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/27074985
favorite count: 0
score: -1
has title: The div is already set as displayed, i didn't get fade in effect
type: UnansweredQuestion
downvote count: 1
has body: I have some div in my page. when i click some link in that page, i want to display the corresponding div in fade in effect. My problem is that the div is already set as display='block', i didn't get fade in effect. Can any one help

http://stackoverflow.com/comment/48811471
comment on: http://stackoverflow.com/a/27091099
type: AnswerComment
score: 0
type: Comment
has text: I've came across this issue again, with a requirement that the inner listener should affect the elements of the outer listener. But if it was always prevented from propagating then it wouldn't work. So I created a var that gets set the first time and is used to determine if it should stop propagating. See here http://jsfiddle.net/srga8hzk/4/

http://stackoverflow.com/a/58527202
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/27045704
has body: This is my aproach, also with jspdf and html2canvas which did a very good job for me: I am using a wrapper node which holds the content to be converted to pdf: &lt;div id="main-content"&gt; &lt;!-- the content goes here --&gt; &lt;/div&gt; &lt;!-- and a button somewhere in the dom --&gt; &lt;a href="javascript:genPDF()"&gt; &lt;i class="far fa-file-pdf"&gt;&lt;/i&gt; &amp;nbsp; Download PDF &lt;/a&gt; This is the JS integration ( I only checked this versions ) and call: &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.3/jspdf.min.js"&gt;&lt;/script&gt; &lt;script src="https://html2canvas.hertzen.com/dist/html2canvas.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; const documentSlug = "some Slug"; const documentTitle ="Some Title"; function genPDF(){ let html2pdf = new pdfView(); html2pdf.generate(); } &lt;/script&gt; And here you can see the pdf generation. I encapsulated the generation part in an extra js object (you need to include this file also): //assuming jquery is in use let pdfView = function(){ //assuming documentSlug is a constant set earlier this.documentSlug = documentSlug; //assuming documentTitle is a constant set earlier this.documentTitle = documentTitle; //in this html node the part which shall be converted to pdf this.nodeId = "main-content"; }; pdfView.prototype.generate = function(){ let self = this; this.prepareDocumentToPrint(); //variables let HTML_Width = $("#"+self.nodeId).width(); let HTML_Height = $("#"+self.nodeId).height(); let top_left_margin = 15; let PDF_Width = HTML_Width+(top_left_margin*2); let PDF_Height = (PDF_Width*1.5)+(top_left_margin*2); this.pdfWidth = PDF_Width; this.pdfHeight = PDF_Height; let canvas_image_width = HTML_Width; let canvas_image_height = HTML_Height; let totalPDFPages = Math.ceil(HTML_Height/PDF_Height)-1; html2canvas($("#"+self.nodeId)[0],{allowTaint:true, scale: 2}).then(function(canvas) { canvas.getContext('2d'); //console.log(canvas.height+" "+canvas.width); let imgData = canv…
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/119787185

http://stackoverflow.com/comment/42603271
has text: You should also add this class; the btn and btn-primary classes are likely to be used elsewhere in your code eventually and you don't want this click event binding to every button. I've amended the code in the answer to show you can keep your current classes. The user above is right that to add multiple classes to a selector you chain them using `.` characters, but you're best off using a specific class for this selector.
type: Comment
comment on: http://stackoverflow.com/a/27020308
score: 0
type: AnswerComment

http://stackoverflow.com/comment/42649662
has text: @ArtOfWarfare I never flagged this post, so what are you talking about?
comment on: http://stackoverflow.com/a/27067789
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/26994704
has body: i think you have to add border bottom to submenu ul(un ordered list) not to the li elemnt and hr is not good solution also. pls can you save page as html and upload anywhere download able in order to make problem understandable
score: 0
type: Answer
answers question: http://stackoverflow.com/q/26993788

http://stackoverflow.com/comment/42719652
comment on: http://stackoverflow.com/a/27073864
score: 0
type: AnswerComment
type: Comment
has text: Hmm.. It works but this means that my model has to know that DUST is used for rendering. So my "sayHello" method has an extra concern.. Which means I am chained to DUST if I am going this approach.

http://stackoverflow.com/comment/42689668
type: QuestionComment
comment on: http://stackoverflow.com/q/27091623
has text: Because of floating point imprecision, you cannot do this accurately.
score: 0
type: Comment

http://stackoverflow.com/a/27093868
downvote count: 0
answers question: http://stackoverflow.com/q/27093512
has body: async's methods will pass a callback function to the iterator, in this case find(), that it expects to be called to know when to continue. function find(model, callback) { st.find(param1, model, param2, param3, function (err, data) { callback(err, data); }); // or possibly just: // st.find(param1, model, param2, param3, callback); } Though, async.each() isn't defined to expect data to be provided to the callback. A method that will accept data is async.map(), which will already create a new collection that you can use as resultFound. var models = ["test1", "tes2"]; async.map(models, find, function (err, resultFound) { if (err) { res.json(400, err); } else { res.json(200, resultFound); } });
score: 2
type: AcceptedAnswer
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/27093512

http://stackoverflow.com/comment/42851011
type: QuestionComment
has text: possible duplicate of [jquery load issue](http://stackoverflow.com/questions/1370738/jquery-load-issue)
score: 1
comment on: http://stackoverflow.com/q/27146783
type: Comment

http://stackoverflow.com/comment/42593491
has text: Hi Cerlin, thanks for the reply, it works perfectly in fiddle. However, when i try to implement it in my code, it doesn't. Only the gets displayed and there is no activity on clicking. Am i missing something...
comment on: http://stackoverflow.com/q/27033367
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27104652
tagged with: selenium
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/42713700
has answer: http://stackoverflow.com/a/27106936
tagged with: javascript
has body: My code spinet is as follow: JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("window.history.go(-1);"); The above code doest work please suggest. I tried above code by casting webdriver instant but did not work every time I don’t want to use driver.navigate().back() command as it not recommended. Please suggest...
score: 0
has title: JS Script to go back to previous page using webdriver doesnt work
type: UnansweredQuestion

http://stackoverflow.com/q/27141124
has answer: http://stackoverflow.com/a/27141208
has answer: http://stackoverflow.com/a/27142900
type: Question
answer count: 8
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27141135
score: 0
accepted answer: http://stackoverflow.com/a/27141220
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/27141247
has answer: http://stackoverflow.com/a/27141354
has answer: http://stackoverflow.com/a/27141220
possible better answer: http://stackoverflow.com/a/27141208
has answer: http://stackoverflow.com/a/27141158
has answer: http://stackoverflow.com/a/27141226
has body: I figured out a way to do this however, there has got to be a cleaner way to do this where it's not so specific and more general. So if I add another link and div, it automatically picks up the association. $(".a1").click(function () { $(".div1").show("slow"); $(".div2").hide("slow"); $(".div3").hide("slow"); $(".div4").hide("slow"); return false; // avoid jump to '#' }); $(".a2").click(function () { $(".div1").hide("slow"); $(".div2").show("slow"); $(".div3").hide("slow"); $(".div4").hide("slow"); return false; // avoid jump to '#' }); $(".a3").click(function () { $(".div1").hide("slow"); $(".div2").hide("slow"); $(".div3").show("slow"); $(".div4").hide("slow"); return false; // avoid jump to '#' }); $(".a4").click(function () { $(".div1").hide("slow"); $(".div2").hide("slow"); $(".div3").hide("slow"); $(".div4").show("slow"); return false; // avoid jump to '#' }); HTML man, whateva man, whateva man, whateva man, whateva Health Research panel Healthcare Informatics Public Health informatics Capabilites
tagged with: css
has title: Hide and Show div based on clicked
type: AnsweredQuestion

http://stackoverflow.com/comment/42611059
comment on: http://stackoverflow.com/a/27045301
has text: Ah, thus we have light at the end of the tunnel. I'll update my answer now with the solution.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/tag/xml
tags question: http://stackoverflow.com/q/27108056
tags question: http://stackoverflow.com/q/26993935
tags question: http://stackoverflow.com/q/27047210
tags question: http://stackoverflow.com/q/27079615
type: Tag
tags question: http://stackoverflow.com/q/27111263
tags question: http://stackoverflow.com/q/27045584
tags question: http://stackoverflow.com/q/27071949
tags question: http://stackoverflow.com/q/27069355
tags question: http://stackoverflow.com/q/27087077
tags question: http://stackoverflow.com/q/27132702
tags question: http://stackoverflow.com/q/27036268
tags question: http://stackoverflow.com/q/27099375
tag name: xml
tags question: http://stackoverflow.com/q/27135531
tags question: http://stackoverflow.com/q/27131444
tags question: http://stackoverflow.com/q/27091948
tags question: http://stackoverflow.com/q/27098373
tags question: http://stackoverflow.com/q/27108216
tags question: http://stackoverflow.com/q/27116085
tags question: http://stackoverflow.com/q/27114078
tags question: http://stackoverflow.com/q/27066785
tags question: http://stackoverflow.com/q/27145287
tags question: http://stackoverflow.com/q/27067490
tags question: http://stackoverflow.com/q/26993273
tags question: http://stackoverflow.com/q/27141233
tags question: http://stackoverflow.com/q/27151521

http://stackoverflow.com/q/26994140
accepted answer: http://stackoverflow.com/a/26995209
possible better answer: http://stackoverflow.com/a/26994509
has answer: http://stackoverflow.com/a/26994509
type: AnsweredQuestion
has body: When I tried to change value on onchange function it only updates first one not second. I want to change value Manually. in this problem you see 2 and 2 is equal to 4 but when I want to change second row like there show 4 multiple 4 is equal 16. when change 4 as 5 then its conflict first row I want changes in same row . please help to sort out this problem. test.php Test <?php require_once('DB.class.php'); $db = new DB(); $db->connect(); $result=$db->SelectTable("multiple","",""); ?> Sr.No. one two Equal <?php if(count($result) > 0) { foreach($result as $rslist12){ ?> <?php $i =$i+1; ?> <?php echo $i;?> <input type="text" name="one" id="one" style="width:60px;" value="<?php echo $rslist12['one'];?>" onchange="taxapply()";> <input type="text" name="two" id="two" style="width:60px;" value="<?php echo $rslist12['two'];?>" onchange="taxapply()";> <input type="text" name="equal" id="equal" style="width:50px;" value="<?php echo $rslist12['equal'];?>" onchange="taxapply()";> <?php } } ?> DB.class.php <?php class DB { protected $db_name = 'plus2net'; protected $db_user = 'root'; protected $db_pass = ''; protected $db_host = 'localhost'; function __construct() { $connection = mysql_connect($this->db_host, $this->db_user, $this->db_pass); mysql_select_db($this->db_name); return true; } public function connect(){ $connection = mysql_connect($this->db_host, $this->db_user, $this->db_pass); mysql_select_db($this->db_name); return true; } public function processRowSet($rowSet, $singleRow=false) { $resultArray = array(); while($row = mysql_fetch_assoc($rowSet)) { array_push($resultArray, $row); } if($singleRow === true) return $resultArray[0]; return $resultArray; } public function SelectTable($table, $where="",$fieldarray="",$debug="") { if ($fieldarray=="") { $f_list = "*"; } else { $f_list = $fieldarray ; } $sql = "SELECT $f_list FROM $table "; if( ! empty( $where ) ) $sql .= " WHERE $where"; if($debug==1){echo $sql;exit();} $result = mysql_query($sql); if( ! $result ) return 0…
has answer: http://stackoverflow.com/a/26995062
tagged with: javascript
type: Question
has title: Tried to change value on "onchange" event, it only updates first not second
tagged with: php
has answer: http://stackoverflow.com/a/26995209
score: 0
answer count: 3

http://stackoverflow.com/q/27025843
answer count: 1
downvote count: 0
favorite count: 0
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: pixi.js
has answer: http://stackoverflow.com/a/27157366
type: Question
accepted answer: http://stackoverflow.com/a/27157366
tagged with: javascript
has body: Trying to fire events when hovering over Graphics element. click event works as expected, but mouseover does not seem to fire. Here's excerpt with fiddlejs link: var renderer = PIXI.autoDetectRenderer(500, 500, null, true); var stage = new PIXI.Stage(0xFFFFFF); stage.interactive = true; document.getElementById("canvas").appendChild(renderer.view); var rect = new PIXI.Graphics(); rect.lineStyle(1, 0x000); rect.interactive = true; rect.hitArea = new PIXI.Rectangle(0,0, 200, 200); rect.drawRect(0,0, 200,200); rect.click = function(ev) { console.log("clicked"); } rect.mouseover = function(ev) { console.log("over"); } stage.addChild(rect); renderer.render(stage); FiddleJS link: http://jsfiddle.net/anps0abt/ Maybe I should use sprites instead of Graphics elements? Thanks!
has title: Interactive Graphics with PixiJS - mouseover doesn't fire, while click does

http://stackoverflow.com/comment/66573284
score: 0
type: AnswerComment
has text: @Corey Looks fine, too.
comment on: http://stackoverflow.com/a/29122144
type: Comment

http://stackoverflow.com/a/27003827
score: 5
accepted answer of: http://stackoverflow.com/q/27003755
answers question: http://stackoverflow.com/q/27003755
type: AcceptedAnswer
has body: $(this) in your code refers to document instead of the input. This fixes it: $(document).ready(function() { if ($('input[type=radio]').is(':checked')) { $('input[type=radio]').parent('label').addClass('checked'); } }); You could also do it like this: $(document).ready(function() { $('input[type=radio]:checked').parent('label').addClass('checked'); });
upvote count: 5
type: Answer
downvote count: 0

http://stackoverflow.com/q/27060027
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/27060068
possible better answer: http://stackoverflow.com/a/27060070
has answer: http://stackoverflow.com/a/27060070
upvote count: 1
accepted answer: http://stackoverflow.com/a/27060068
has answer: http://stackoverflow.com/a/27061478
has answer: http://stackoverflow.com/a/27060087
tagged with: c#
answer count: 4
has title: Syntax for jquery data element
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/42634740
has body: I'm trying to pass two strings using ajax to code-behind method with this script: &lt;script type="text/javascript"&gt; $(function () { $('#updateMember').click(function () { var ar = $(this).closest('.details').prev('.heading').prop('id'); $.ajax({ type: "POST", url: 'team-members.aspx/UpdateTeamMember', data: JSON.stringify({ "ID": + ar + "," + "Name" + ":" + $('#tmname').val() }), contentType: "application/json; charset=utf-8", dataType: "json", success: fnsuccesscallback, error: fnerrorcallback, }); }); function fnsuccesscallback(data) { console(data); window.location.reload(); } function fnerrorcallback(result) { console.log(result); } }); &lt;/script&gt; I'm new to jquery and I'm not sure what I'm doing wrong but I guess I'm using quotation marks wrongly, cause in the code-behind method I get correct value of the ID argument, and null for Name. Name is argument who gets it's value from textbox with an ID='tmname' and ID is getting value from a variable ar, as it's shown in the code. Does someone knows what I'm going wrong with Name argument?
score: 1

http://stackoverflow.com/a/27085897
downvote count: 0
has comment: http://stackoverflow.com/comment/42681064
score: 1
has comment: http://stackoverflow.com/comment/42688047
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27085750
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42680533
has body: You can just add $("my_image_selector").show() before $.ajax(params) and hide it when "success" or "error" occurs by adding there $("my_image_selector").hide() Or you can use .ajaxStart and .ajaxStop. see jquery docs
has comment: http://stackoverflow.com/comment/42680819
answers question: http://stackoverflow.com/q/27085750
type: Answer
has comment: http://stackoverflow.com/comment/42681586
has comment: http://stackoverflow.com/comment/42680852
has comment: http://stackoverflow.com/comment/42680727

http://stackoverflow.com/comment/42723139
comment on: http://stackoverflow.com/a/27110059
type: AnswerComment
score: 0
has text: Still wrong) something like `backgroundColor of undefined` will thrown
type: Comment

http://stackoverflow.com/comment/42528979
type: QuestionComment
has text: Does the browser make more than one request to the 11th page?
score: 0
comment on: http://stackoverflow.com/q/26999189
type: Comment

http://stackoverflow.com/comment/42740244
comment on: http://stackoverflow.com/q/27116166
has text: an anchor link that you generate just pass one parameter/variable value read that parameter value on index.php and depending on that variable do operation that you want
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27006363
has title: Node.js, parse filename from URL
has answer: http://stackoverflow.com/a/67528126
has body: How can I parse a url? site.com:8080/someFile.txt?attr=100 or site.com:8080/someFile.txt/?attr=100 I need to get someFile.txt, where is a file name I set by myself as the format (txt or some other). UPDATE I tried var path = url.parse(req.url).path; But I still cannot get the path (someFile.txt).
has comment: http://stackoverflow.com/comment/42541934
answer count: 4
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/67528126
accepted answer: http://stackoverflow.com/a/27006391
downvote count: 1
score: 46
type: Question
has comment: http://stackoverflow.com/comment/42541736
has comment: http://stackoverflow.com/comment/42541880
tagged with: javascript
has comment: http://stackoverflow.com/comment/42541908
has answer: http://stackoverflow.com/a/37897650
upvote count: 47
has comment: http://stackoverflow.com/comment/42541795
has comment: http://stackoverflow.com/comment/42541981
has answer: http://stackoverflow.com/a/74448384
has comment: http://stackoverflow.com/comment/85050202
has answer: http://stackoverflow.com/a/27006391
favorite count: 0
has comment: http://stackoverflow.com/comment/42541811

http://stackoverflow.com/q/26997668
has answer: http://stackoverflow.com/a/26998320
favorite count: 0
has answer: http://stackoverflow.com/a/26998008
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/26997770
type: Question
has answer: http://stackoverflow.com/a/26997759
possible better answer: http://stackoverflow.com/a/26997719
linked to: http://stackoverflow.com/q/9330328
has answer: http://stackoverflow.com/a/26997719
has body: Suppose I have a list like this: Item 1 Item 2 Item 3 I need to retrieve only the number from the ID. Up till now I have being using the following: function getNum(element, attrPrefix){ //set prefix, get number var prefix = attrPrefix; var num = element.attr("id").substring((prefix.length)); return num; } function updateDish(field) { var num = getNum($(field), "item_"); //Rest of function ... console.log("Number = " + num);// 1_dish, 2_dish, 3_dish } How ever this return's 1_dish, 2_dish, 3_dish etc. I thought using this: function getNum() { var num = /\d+(?=\D*$)/.exec($("element").attr('id')); return num; } function updateDish(field) { var num = getNum($(field), "item_"); //Rest of function ... console.log("Number = " + num); //null } Would return what I needed after reading this post: Jquery: Getting the number from ID , unfortunatly I get 'null' back instead of the number I require. My ID's actually look like "_bc_inventorybundle_menu_product_0_dish" I just shortened them for example purposes. Thank's to all the quick replies. I went with the accepted answer as it was closest to what I already had.
tagged with: javascript
answer count: 6
has title: Retrieve only the Number from an ID field
has answer: http://stackoverflow.com/a/26998071
accepted answer: http://stackoverflow.com/a/26997770
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/27066757
tagged with: javascript
has title: how to load a .html page into another on the click of a button ?
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/42647131
type: UnansweredQuestion
has body: My application works as expected within Netbeans IDE , how ever when i try to run it locally there are jquery issues. I have a page with a button id="login" within a div id="main", when i click this button i wish to load a html page into this div which contains that button, as in i replace all original contents. This was simply done on netbeans but wont work locally, any ideas ? Login and the jquery. ( paths are correct as the browser sees the EventListener ) $(document).ready(function () { $("#login").click(function () { $("#main").load("table.html"); }); }); Thanks
tagged with: http://stackoverflow.com/tag/html
tagged with: netbeans
answer count: 0
tagged with: event-listener
type: Question
has comment: http://stackoverflow.com/comment/42647072

http://stackoverflow.com/comment/42675378
comment on: http://stackoverflow.com/a/27083029
type: AnswerComment
has text: see my edit please. Using this code with `disabled` results in `Uncaught TypeError: Cannot set property 'disabled' of undefined` showing in console. Why is this?? Please help!
score: 0
type: Comment

http://stackoverflow.com/a/27071170
downvote count: 0
answers question: http://stackoverflow.com/q/27069823
has comment: http://stackoverflow.com/comment/95347661
type: Answer
score: 13
upvote count: 13
has body: To access the sub folders, you can do in this way, function getSubFolders(parent) { parent = parent.getId(); var childFolder = DriveApp.getFolderById(parent).getFolders(); while(childFolder.hasNext()) { var child = childFolder.next(); Logger.log(child.getName()); getSubFolders(child); } return; } function listFolders() { var parentFolder = DriveApp.getFolderById("0B1n6YLYwFmK_dUpzRWhDRXNwdWc"); var childFolders = parentFolder.getFolders(); while(childFolders.hasNext()) { var child = childFolders.next(); Logger.log(child.getName()); getSubFolders(child); } }
accepted answer of: http://stackoverflow.com/q/27069823
type: AcceptedAnswer

http://stackoverflow.com/q/27135388
has comment: http://stackoverflow.com/comment/42773054
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/42775843
tagged with: php
has comment: http://stackoverflow.com/comment/42775625
has comment: http://stackoverflow.com/comment/42774937
score: 2
has title: unable to receive response from ajax post request using slim framework 3
downvote count: 2
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/42775034
tagged with: slim
upvote count: 4
has body: Edit: The problem has been corrected. The localhost address for the ajax request should have been 127.0.0.1 and not 121.0.0.1 on my client I have the following code to request a POST on localhost/login Welcome Enter user name : Enter your password : I have on my server side the following slim handler function : $app->post('/login', function () use ($app){ $req = $app->request(); $uname = $req->params('uname'); $pass = $req->params('pass'); $app->response()->header('Content-Type', 'application/json'); echo json_encode($uname); exit; }); My problem is that the ajax call is made to the server as a request is seen on the server. But no response is coming back from the server. here is are screen shots of what is happening in chrome developer tool http://s29.postimg.org/5379a7rt3/image.png I can see that the initial call to localhost is working but the next ajax call to login is not working since only request is produced but no response is received. Response subsequently times out
has answer: http://stackoverflow.com/a/27164675
has comment: http://stackoverflow.com/comment/42775553
answer count: 1
has comment: http://stackoverflow.com/comment/42775896

http://stackoverflow.com/a/27101266
score: 0
type: Answer
has body: give your navbar a id like this: &lt;div data-role="navbar" class="ui-navbar" id="navbar1" role="navigation"&gt; And then just use this css code: #navbar .ui-btn{height:100px}; This only changes the height from this navbar and doesnt affect the others.
answers question: http://stackoverflow.com/q/27100814
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27100814

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/27015642
tags question: http://stackoverflow.com/q/26996446
tags question: http://stackoverflow.com/q/27001894
tags question: http://stackoverflow.com/q/26994209
tags question: http://stackoverflow.com/q/27023089
tags question: http://stackoverflow.com/q/27083058
tags question: http://stackoverflow.com/q/27017274
tags question: http://stackoverflow.com/q/27019107
tags question: http://stackoverflow.com/q/27001711
tags question: http://stackoverflow.com/q/27001953
tags question: http://stackoverflow.com/q/27024522
tags question: http://stackoverflow.com/q/27145287
tags question: http://stackoverflow.com/q/27068647

http://stackoverflow.com/comment/42779869
type: Comment
type: QuestionComment
has text: You're selecting an element by its `id` (or at least *intending* to), and then comparing the `id` of the element you selected (*by its `id`*) against a string? Why not just test the `length` of the element you selected (or tried to select)?
comment on: http://stackoverflow.com/q/27141174
score: 0

http://stackoverflow.com/a/27066684
accepted answer of: http://stackoverflow.com/q/27066243
score: 0
type: AcceptedAnswer
type: Answer
has body: Your issue is the fact that \ is an escape sequesnce so it is escaping the [ caharacter. You would need to double up the \\ in the string.... BUT the design is bad, it makes no sense to append JavaScript. Well you are trying to run code for certain cases. It makes no sense why you are appending strings of code to the page. function linkify () { var topic = $(".post-body div").text(); topic = topic.split(/\[link\](.*)\[\/link\]/g); $(".article-title a").attr("href", topic[1]); } and the switch case 'untitle': linkify(); break;
answers question: http://stackoverflow.com/q/27066243
has comment: http://stackoverflow.com/comment/42646835

http://stackoverflow.com/q/27064682
has comment: http://stackoverflow.com/comment/42643317
has title: Jquery hide show not working properly
tagged with: hide
has comment: http://stackoverflow.com/comment/42643404
has answer: http://stackoverflow.com/a/27064870
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27064870
type: Question
score: 0
has comment: http://stackoverflow.com/comment/42643328
has body: I'm having trouble solving a problem that causes my script to fail. Here is the code I used. Although it works flawlessly in JsFiddle, when I implement it in my site it doesn't work at all. Link to site Thanks!
answer count: 1
tagged with: show
tagged with: jquery
has comment: http://stackoverflow.com/comment/42643185
tagged with: click

http://stackoverflow.com/a/27046871
upvote count: 3
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/47807562
has body: It seems a jquery conflicts. Cehck your jquery version and required jquery version for bootstrap datepicker, or may be you have imported two jquery versions in html page.
type: Answer
answers question: http://stackoverflow.com/q/27046708

http://stackoverflow.com/q/27147759
possible better answer: http://stackoverflow.com/a/27157017
tagged with: d3.js
has answer: http://stackoverflow.com/a/27147870
has answer: http://stackoverflow.com/a/27157017
has comment: http://stackoverflow.com/comment/42790995
has comment: http://stackoverflow.com/comment/42790809
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42791036
has title: mouseover in js throws undefined error
type: Question
score: 0
has answer: http://stackoverflow.com/a/27148524
tagged with: javascript
has body: In the following code snippet, when i try to add the mouseover functionality for the svg it throws Uncaught TypeError: undefined is not a function on mouseover. svg.selectAll(".bar1") .data(clensedData) .transition() .delay(function (d, i) { return i / clensedData.length * 10; }) .duration(500) .attr("class", "bar1") .attr("x", function (d) { return x(d.City) }) .attr("width", x.rangeBand()) .attr("y", function (d) { return y(d.Cases); }) .attr("height", function (d) { return height - y(d.Cases); }) .attr("fill", function (d, i) { if (d.diff == max_of_array) return "green"; if (d.diff == min_arr) return "red"; else return "orange"; }) .on("mouseover", function () { }); Any ideas? ps: new to js
answer count: 3
accepted answer: http://stackoverflow.com/a/27148524
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/comment/42571918
type: QuestionComment
has text: @sunglim I did. I was trying to keep the posted code to a minimum to show the problem. I'll post the rest of the comms module
score: 0
comment on: http://stackoverflow.com/q/27023834
type: Comment

http://stackoverflow.com/comment/42714141
type: Comment
comment on: http://stackoverflow.com/a/27105159
type: AnswerComment
score: 0
has text: yes, i want it to bee like the old spacegame where you shoot astroids

http://stackoverflow.com/comment/42710305
score: 0
type: AnswerComment
type: Comment
has text: @Markai This function gets executed immediately when the code is interpreted by a browser. But yeah, it will display the last value in the function body.
comment on: http://stackoverflow.com/a/27102758

http://stackoverflow.com/q/27001633
downvote count: 0
answer count: 1
tagged with: javascript
has title: A function that takes a callback and creates a new version of the callback that can only be called once. Javascript
tagged with: callback
favorite count: 0
accepted answer: http://stackoverflow.com/a/27001723
has comment: http://stackoverflow.com/comment/42533371
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: underscore.js
score: 1
has answer: http://stackoverflow.com/a/27001723
has body: I trying to create a function, that takes another function as the argument, and creates a new version of the callback function that can only be called once. Subsequent calls will return the output if the initial call. This is along the lines of recreating the Underscore .once method. Here is what I have thus far. I have created a chargeCreditCard function. I want to create a new version of this function that can only be called once (chargeOnce). Explanation is appreciated. Thanks. Edit. I want the once function to not rely on any code outside of the function to work (ie. an external counter variable). var chargeCreditCard = function(num, price){ return num*price; }; function once (func) { var hasActionBeenCalled = false; var call = function () { if(!hasActionBeenCalled) { hasActionBeenCalled = true; func; } } } var chargeOnce = once(chargeCreditCard); console.log(chargeOnce(2,3)); console.log(chargeOnce(4,5));

http://stackoverflow.com/q/27081390
tagged with: race-condition
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
favorite count: 0
has body: I just started using Promises in JavaScript using the Q library. I am running into a race condition and am wondering what would be the best way to resolve it. The problem is that Q always calls the callbacks using process.nextTick() (also mentioned in the Promises/A+ spec) which means that I might miss some state changes in the object in the time between the resolution of the promise and the time the callbacks are called. My concrete problem is that I have an incoming connection and am missing the first messages. Messages are distributed using EventEmitter. The code looks something like this. It uses the palava-client (but the problem should be universal) and is written in CoffeeScript: defer = q.defer() session.on 'peer_joined', (peer) -&gt; defer.resolve(peer) return defer.promise And somewhere else peer_promise.then (peer) -&gt; peer.on 'message', (msg) -&gt; console.log "Message received:", msg The first messages sometimes are lost because they got emitted before the promise ever got notified. The problem does not occur using only EventEmitter and Callbacks because the callbacks are always called immediately blocking the JavaScript Thread from handling the incoming messages. The following code never misses messages: session.on 'peer_joined', (peer) -&gt; peer.on 'message', (msg) -&gt; console.log "Message received:", msg Do you see any way I can solve the problem using promises? I really would like to keep using them in my abstraction layer to ensure that only one peer is accepted. Is there any other way to avoid such race conditions?
tagged with: promise
has answer: http://stackoverflow.com/a/27082577
accepted answer: http://stackoverflow.com/a/27082577
has title: JavaScript Promises and race conditions
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/42677265

http://stackoverflow.com/comment/42718928
type: Comment
type: QuestionComment
has text: You can try looking at this one: http://stackoverflow.com/questions/819416/adjust-width-height-of-iframe-to-fit-with-content-in-it
comment on: http://stackoverflow.com/q/27107915
score: 0

http://stackoverflow.com/comment/42787366
has text: @pieterbesje Use `location.reload();` for that. If you are satisfied with this answer, please mark this as accepted.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/27145817
type: Comment

fastclick.js
tags question: http://stackoverflow.com/q/27012847
tag name: fastclick.js
type: Tag

http://stackoverflow.com/comment/42606956
type: Comment
type: QuestionComment
has text: So you want to access the scope of an existing add-on? See here: [StackOverflow :: Controlling a Firefox Extension via Javascript](http://stackoverflow.com/questions/22057888/controlling-a-firefox-extension-via-javascript/22099148#22099148)
comment on: http://stackoverflow.com/q/27034198
score: 0

http://stackoverflow.com/a/27079546
score: 2
accepted answer of: http://stackoverflow.com/q/27079393
upvote count: 2
answers question: http://stackoverflow.com/q/27079393
has comment: http://stackoverflow.com/comment/42675617
type: AcceptedAnswer
downvote count: 0
has body: Set attributes for the form to get semantic correct html some 1 some 2 some 3 Send Your script Your php file(path to file set in action attribute of the form). <?php var_dump($_POST); ?>
type: Answer

http://stackoverflow.com/a/27094431
upvote count: 1
answers question: http://stackoverflow.com/q/27093403
score: 1
has body: Suggestions in typeAhead should be an object rather than plain strings. You have setup typeAhead to display 'value' property of object displayKey: 'value' The easiest way to solve this problem is to wrap source strings into JavaScript objects. Like this: stationsnamen.push({value: val['Namen'].Lang.toString() });
downvote count: 0
type: Answer

http://stackoverflow.com/comment/48483737
score: 0
type: Comment
has text: Please explain your answer, the code itself isn't usually enough to show what the problem is.
comment on: http://stackoverflow.com/a/30188966
type: AnswerComment

http://stackoverflow.com/comment/42626513
type: Comment
has text: you should need to build with new cordova CLI method hope it will works.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27054969

http://stackoverflow.com/comment/42637745
score: 0
has text: Please add html part as well so that we can suggest you a solution!
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27061704

http://stackoverflow.com/comment/42598169
score: 0
type: QuestionComment
type: Comment
has text: If I knew the name of the function or the behaiviour I would have added it. Hence I have explained as much as I can in the description so I can find out what the behaiviour it is called and how it works. Sorry if it wasn't descriptive enough, I just didn't know what you call it
comment on: http://stackoverflow.com/q/27039277

http://stackoverflow.com/comment/42709275
comment on: http://stackoverflow.com/q/27102612
score: 0
type: Comment
type: QuestionComment
has text: There is no error, i do not know how can i post the value of the selected list item thru ajax to the server side

http://stackoverflow.com/comment/42737432
has text: Simplified unshift example works here: http://jsfiddle.net/zv1a0ow1/, are you getting errors on the console at all? Can you show your ng-repeat html and a sample of the `newNews` data?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27117486

http://stackoverflow.com/q/27141708
tagged with: requirejs
score: 2
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/42780594
type: Question
tagged with: javascript
has title: Import file into an IIFE in JavaScript
upvote count: 2
tagged with: iife
favorite count: 0
has body: Is it possible to import files into an IIFE block in Javascript just like you do with the RequireJS? I.e. is it possible to do the following: define([ '/path/to/some/file' ], function (importedFile) { /* Now use imported file */ importFile.awesomeStuff(); }); But with IIFE?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42780601

http://stackoverflow.com/comment/42575181
has text: I've considered that, but there's no easy way (currently) to differentiate them between forms. I never expected to have to do this, so I didn't design to allow for it. I'm not sure how I'd go about it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27025784

http://stackoverflow.com/q/27060158
score: -3
has comment: http://stackoverflow.com/comment/42635287
answer count: 3
has answer: http://stackoverflow.com/a/27060645
upvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/27060337
favorite count: 0
has comment: http://stackoverflow.com/comment/42635089
tagged with: ajax
accepted answer: http://stackoverflow.com/a/27060645
has answer: http://stackoverflow.com/a/27060337
has body: I have a problem about parse data json, ajax. Example: 1. Latte +ice +bigger 2.pizza 3.Cocoa +ice how to parse data like type:["1","2","3"], extra:[["2","3"],[],["2"]]
has title: how to jquery parse array in elements?
has answer: http://stackoverflow.com/a/27060785
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/42635314
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/42600933
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27040553
score: 0
has text: To manipulate styles, manipulate the styles directly, as in `element.style.fontSize = '';`. CSS is a language, and it's never a good idea to try to parse or rewrite anything but the simplest language with regexps. They will break, and be hard to maintain. If you want to experiment with regexps, start with some sample problems which are more suited to regexps.

http://stackoverflow.com/comment/42808155
comment on: http://stackoverflow.com/q/27135139
has text: The sound is actually the final step for a chat. Already have the messages including someone typing and video for n users in the room. This part works fine, really fast, but when i start streaming the PCM the browser almost froze, in the sender and receiver, if i just through the PCM in the same browser the sound works perfectly, so i thought it was to many packedgs for the socket.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42648382
has text: Yes, because it's not the clients job to do that. Anything before the hash will be processed by the server. If there's not something on the server to handle that redirection, you won't get your desired results.
type: Comment
comment on: http://stackoverflow.com/a/27067196
score: 0
type: AnswerComment

http://stackoverflow.com/q/27136591
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42772744
has title: How can I unbind(remove) angular models when not in DOM
score: 0
tagged with: unbind
has comment: http://stackoverflow.com/comment/42779170
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/27138701
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/27138743
tagged with: angularjs
has body: Here is a simple demonstration of what I'm struggling to achieve. &lt;div ng-controller="MyCtrl"&gt; &lt;input type="button" ng-click="a=!a" value="toggle a"/&gt; &lt;div ng-if="a"&gt; &lt;input type="text" ng-model="del.a1" /&gt;{{del}} &lt;/div&gt; &lt;input type="text" ng-model="del.a2" /&gt; {{del}} &lt;/div&gt; Initially the value of del is {} and ng-if is false the property a1 is under ng-if condition. Test Case : step 1 : toggle the ng-if to true so that a1 is visible step 2 : enter some value into a1 (you can anytime enter value in property a2) step 3 : now if i again toggle ng-if to false what I'm looking for is the property a1 is to be removed from model.(i.e i just want angular to bind those models which are visible on DOM) like this Here is the FIDDLE for the above test case. I guess the problem is with model used as object. but I need a solution in model as object only as I have done lot of coding based on this. Hope I'm clear with the question. pls Help

http://stackoverflow.com/a/27022043
type: Answer
has body: Your use of the conditional operator is inside the if() statement, which only succeeds if there's a positive .length, so toggle will always be true. You should remove the if() statement. var toggle = data.entities.length ? true : false; $('#resultadoNorma').toggle(toggle); $("#sinResultadosBuscarNormas").toggle(!toggle); Or just get rid of the conditional, and pass the .length directly. Probably good idea to coerce to a boolean though. $('#resultadoNorma').toggle(!!data.entities.length); $("#sinResultadosBuscarNormas").toggle(!data.entities.length);
answers question: http://stackoverflow.com/q/27021991
upvote count: 1
accepted answer of: http://stackoverflow.com/q/27021991
has comment: http://stackoverflow.com/comment/42568886
score: 1
has comment: http://stackoverflow.com/comment/42568459
has comment: http://stackoverflow.com/comment/42568626
has comment: http://stackoverflow.com/comment/42568972
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/42568539
has comment: http://stackoverflow.com/comment/42568777

prototype
tags question: http://stackoverflow.com/q/27049850
tags question: http://stackoverflow.com/q/27020711
tags question: http://stackoverflow.com/q/27018033
tag name: prototype
tags question: http://stackoverflow.com/q/27133416
tags question: http://stackoverflow.com/q/27028176
tags question: http://stackoverflow.com/q/27035308
tags question: http://stackoverflow.com/q/27078531
tags question: http://stackoverflow.com/q/26999180
tags question: http://stackoverflow.com/q/27009400
type: Tag
tags question: http://stackoverflow.com/q/27097176
tags question: http://stackoverflow.com/q/27101649
tags question: http://stackoverflow.com/q/27072733
tags question: http://stackoverflow.com/q/26998489
tags question: http://stackoverflow.com/q/27084454
tags question: http://stackoverflow.com/q/27043009
tags question: http://stackoverflow.com/q/27074194
tags question: http://stackoverflow.com/q/27047222
tags question: http://stackoverflow.com/q/27079929

http://stackoverflow.com/comment/42549127
score: 1
type: Comment
type: QuestionComment
has text: its not possible with CSS, you will have to use Javascript
comment on: http://stackoverflow.com/q/27011139

http://stackoverflow.com/a/27143228
score: 2
answers question: http://stackoverflow.com/q/27143155
has body: This approach: var regexp = /\..*(\d)$/; var matches = "123.456".match(reg); if (!matches) { alert ("no decimal point or following digits"); } else alert(matches[1]); How this works: \. : matches decimal point .* : matches anything following decimal point (\d) : matches digit, and captures it $ : matches end of string
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/q/27106042
type: AnsweredQuestion
type: Question
tagged with: polymer
tagged with: javascript
has title: How to create a method for custom polymer element and call it in a main App?
has answer: http://stackoverflow.com/a/27106206
score: 0
answer count: 1
tagged with: jquery
has body: I am writing my custom polymer element. I need to define a method toggle for that element. Whenever I create that element in my main HTML, I should be able to call that method. The following code isn't working. What am I doing wrong? loader.html "{{message}}" Index.html Continue index.js jQ('#act-submit').click(function () { console.log("toggled"); jQ('#activationLoading').toggle(); }); P.S. - If I change the method name from toggle to foo, it throws a javascript error.
accepted answer: http://stackoverflow.com/a/27106206

http://stackoverflow.com/comment/42743248
has text: ok so all you have to do is not allow the user to enter **space only**. Correct?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27121092
score: 0

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/27085750
tags question: http://stackoverflow.com/q/27091757
type: Tag
tags question: http://stackoverflow.com/q/26995035
tags question: http://stackoverflow.com/q/27071191
tags question: http://stackoverflow.com/q/27067972
tags question: http://stackoverflow.com/q/27063718
tags question: http://stackoverflow.com/q/27000262
tags question: http://stackoverflow.com/q/27019369

http://stackoverflow.com/comment/42685125
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27088693
has text: have you tried $('img').click(sourceSwap);?
score: 0

http://stackoverflow.com/comment/42643239
score: 0
type: AnswerComment
type: Comment
has text: i put a console log within that variable to check if it was getting reached and nothing came of it
comment on: http://stackoverflow.com/a/27064385

http://stackoverflow.com/comment/42786548
type: Comment
has text: @VDesign should be formatted now.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/27144857

http://stackoverflow.com/q/27095134
downvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/27095388
accepted answer: http://stackoverflow.com/a/27095388
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/27095313
has title: Display Only the List of a YouTube Playlist Page
type: AnsweredQuestion
upvote count: 0
tagged with: iframe
tagged with: youtube
type: Question
has body: If I have a playlist url, say "https://www.youtube.com/playlist?list=PLRU-B1PBK4Buu_yoMI8V-eTel9O3gVMpB" and I put it in an iframe with: I get a blank iFrame, so how do I fix that? Also, I only want to display the "pl-video-list" div, not the rest of the web page. The other responses on stackoverflow were all website specific, or didn't seem to work.
score: -1
has answer: http://stackoverflow.com/a/27095313
answer count: 2

http://stackoverflow.com/comment/42748973
has text: I corrected it. But this is not the problem here.
comment on: http://stackoverflow.com/q/27124234
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/27118052
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/53136732
has answer: http://stackoverflow.com/a/27118505
has title: Can't load css, js and image with htaccess
type: Question
has comment: http://stackoverflow.com/comment/43233382
has body: I have problems in using the .htaccess file. css, js and image can't load if i use .htaccess file. this my structure simple web. I have some files and folders in the root directory : 1 css folder (include style.css). @charset "utf-8"; /* CSS Document */ h1 { color:#F00; } 1 index.php file Clean URL <?php include "bukafile.php"; ?> 1 bukafile.php file <?php switch ($_GET['page']){ case '' : if(!file_exists ("home.php")) die ("File Not Found"); include "home.php"; break; case 'artikel' : if(!file_exists ("artikel.php")) die ("File Not Found"); include "artikel.php"; break; default: break; } ?> 1 home.php file Clean URL <?php $sql=mysql_query("SELECT * FROM artikel order by id_artikel"); while ($r=mysql_fetch_array($sql)) { $judul2 = str_replace(" ","-",$r[judul]); ?> <?php echo"Judul : $r[judul]"; ?> <?php echo"detail artikel"; ?> <?php } ?> 1 artikel.php file Clean URL Percobaan <?php $detail=mysql_query("SELECT * FROM artikel WHERE id_artikel='$_GET[id]'"); $r = mysql_fetch_array($detail); echo " $r[judul] "; echo " $r[content] "; ?> 1 .htaccess file RewriteEngine on RewriteRule ^artikel/([0-9]+)/([A-Za-z0-9-]+)/?$ index.php?page=artikel&id=$1 [NC,L] In this case, css file can't load in artikel php (tag h1) if the source code but if i change source code it's running well.. so, how can I edit the file htacess without making changes to the source code css?? thank's for the answer
tagged with: javascript
upvote count: 2
linked to: http://stackoverflow.com/q/26654042
answer count: 2
tagged with: .htaccess
favorite count: 0

http://stackoverflow.com/q/27091678
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
downvote count: 0
score: 1
has body: So I have this layout in md - ___________________________________________________________________________ | [1] | [2] | [3] | | | | | |_______________________| | | | |____________________| | | | | |____________________________| In xs and sm, I want the structure to be this way - ______________________________________________________ | [1] | [2] | | | | |_______________________| | | [3] | | | | | |_______________________| | |____________________________| But the structure I am getting is - ______________________________________________________ | [1] | [2] | | | | |_______________________| | | | (Empty Space) | | | | ________________________|____________________________| | [3] | | | |_______________________| How do I fix this? My code goes like this - &lt;div class = "col-xs-5 col-sm-5 col-md-4"&gt;&lt;/div&gt; &lt;div class = "col-xs-7 col-sm-7 col-md-4"&gt;&lt;/div&gt; &lt;div class = "col-xs-5 col-sm-5 col-md-4"&gt;&lt;/div&gt;
has title: Bootstrap push/pull - Div not aligned properly
type: Question
has answer: http://stackoverflow.com/a/27099969
accepted answer: http://stackoverflow.com/a/27099969
tagged with: javascript
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/18329564
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/42714086
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27105351
score: 0
has text: What error u getting in console

http://stackoverflow.com/comment/42600591
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27040428
has text: @RGraham I'm not a fan of this either, unfortunately, every page in our application is formatted this way. With the web service, the .aspx page is served up from IIS, then javascript makes a call from the client to the webservice to get the variables?
score: 0

http://stackoverflow.com/a/27104180
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27104030
has body: Check how many times the first loop is looping. Because I think that the loop starts out good with removing the element by id 'sort_buttons' but because you are using 'id' it will only find one element with that 'id' (you can only have one element with the 'id' sort_buttons'). Thus when looping the second time it will not find an element with 'id' 'sort_buttons'. Check in console for any errors. Tip : Add 'console.log(i);' in for loop to see how many times the loop is looping.

http://stackoverflow.com/comment/42788717
score: 0
comment on: http://stackoverflow.com/a/27146501
type: Comment
has text: actually i have captured tab key. What i need is select each word in textbox while pressing tab key
type: AnswerComment

http://stackoverflow.com/comment/42636444
type: QuestionComment
has text: yes, but continue same problem.
type: Comment
comment on: http://stackoverflow.com/q/27060393
score: 0

http://stackoverflow.com/q/27068593
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/42650579
type: Question
has title: Setting the content for each marker Google Maps
tagged with: google-maps
has comment: http://stackoverflow.com/comment/42650723
accepted answer: http://stackoverflow.com/a/27069679
tagged with: javascript
has comment: http://stackoverflow.com/comment/42650455
tagged with: google-maps-api-3
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/42650423
has comment: http://stackoverflow.com/comment/42650503
has body: Need a quick help with setting up the content for each marker that I'm creating I'm looping through my Locations Obj that holds Lat,Lng for each marker (locationObj), the content for each marker is been hold by other obejct (PermutationObj). example: locationObj-- &gt; {"Lat":"34.163291","Lng":"-118.685123"} etc.... PermutationObj -- &gt; ElectronicPopContent,LocationName The thing is I'm getting for all the markers that I'm displaying on the map the first content and location name from the PermutationObj. How can I fix it??? JS Code: var locationObj; var PermutationObj; var map; var mapOptions; var shape = { coord: [1, 1, 1, 20, 18, 20, 18, 1], type: 'poly' }; function setMap(locationList, permutation) { // List of Lat,Lng locationObj = $.parseJSON(locationList); PermutationObj = $.parseJSON(permutation); var qMapTypeId = google.maps.MapTypeId.SATELLITE var LatLngCenter = new google.maps.LatLng(34.163291, -118.685123); var mapOptions = { zoom: 4, center: LatLngCenter, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU } } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var bounds = new google.maps.LatLngBounds(); for (i in locationObj) { var LatLngPair = new google.maps.LatLng(locationObj[i]["Lat"], locationObj[i]["Lng"]); bounds.extend(LatLngPair); map.fitBounds(bounds); // for (j in PermutationObj) { // // var image = PropObj[j]["ElectroincImageURL"]; // var content = PermutationObj[j]["ElectronicPopContent"]; // break // } var content = PermutationObj[i]["ElectronicPopContent"]; marker = new google.maps.Marker({ position: LatLngPair, map: map, draggable: false, // icon: image, shape: shape, anchorPoint: new google.maps.Point(12, -25) }); //Setting up the content of the info window dynamic wise. var infowindow = new google.maps.InfoWindow({ content: content }); //Setting up an event listener, When the user clicks the marker, an info window opens. google.maps.event.addListener(marke…
has answer: http://stackoverflow.com/a/27069679

http://stackoverflow.com/a/27146080
has body: Try ending the response from the server code by putting an exit; right after returning the json.
has comment: http://stackoverflow.com/comment/42792768
downvote count: 0
score: 4
upvote count: 4
answers question: http://stackoverflow.com/q/27146030
has comment: http://stackoverflow.com/comment/42792721
type: Answer
has comment: http://stackoverflow.com/comment/42792468

http://stackoverflow.com/comment/87093727
comment on: http://stackoverflow.com/a/27116581
score: 0
type: AnswerComment
has text: Fixed my issue with Firefox compatibility.
type: Comment

http://stackoverflow.com/comment/42652482
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27068445
has text: Thanks, and I would voteup for the codepen usage but.. rep not 15 :P

tabs
type: Tag
tags question: http://stackoverflow.com/q/26993567
tags question: http://stackoverflow.com/q/27105177
tags question: http://stackoverflow.com/q/27057237
tags question: http://stackoverflow.com/q/27011690
tags question: http://stackoverflow.com/q/27138588
tag name: tabs
tags question: http://stackoverflow.com/q/27083685
tags question: http://stackoverflow.com/q/27066969
tags question: http://stackoverflow.com/q/27137896

http://stackoverflow.com/a/27078189
type: Answer
has body: Replace .text(title) by .html(title). This causes the value of the variable title to be parsed as HTML, instead of being taken as plain text. $(document).ready(function() { $('.masterTooltip').hover(function(){ // Hover over code var title = $(this).attr('title'); $(this).data('tipText', title).removeAttr('title'); $('&lt;p class="tooltip"&gt;&lt;/p&gt;') .html(title) // THIS WAS CHANGED .appendTo('body') .fadeIn('slow'); }, function() { // Hover out code $(this).attr('title', $(this).data('tipText')); $('.tooltip').remove(); }).mousemove(function(e) { var mousex = e.pageX + 20; //Get X coordinates var mousey = e.pageY + 10; //Get Y coordinates $('.tooltip') .css({ top: mousey, left: mousex }) }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;img class='masterTooltip' title='Desc: &lt;br&gt; $xxx' id='xxx' width='50px' src='http://lorempixel.com/50/50/'/&gt;
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27078050
answers question: http://stackoverflow.com/q/27078050
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/26995296
type: Question
has answer: http://stackoverflow.com/a/26995426
has comment: http://stackoverflow.com/comment/42521103
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has body: How to call function xxx when input type text id="username" change value ? first, when you fill data into Then data in will change value. OK, when input name="thingy" change i want to call function xxx , i try this code but not work. How can i do that ? input1 : input2 :
answer count: 2
possible better answer: http://stackoverflow.com/a/26995426
has answer: http://stackoverflow.com/a/26995590
has title: How to call a function in Javascript when a input changes value?
accepted answer: http://stackoverflow.com/a/26995590
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42522624

http://stackoverflow.com/q/27086691
has answer: http://stackoverflow.com/a/27086761
type: Question
has answer: http://stackoverflow.com/a/27102514
tagged with: javascript
has title: How to convert php array into javascript array for Highchart JS
score: 0
answer count: 3
tagged with: highcharts
tagged with: arrays
tagged with: jquery
type: UnansweredQuestion
has body: I have a php array created according to the format I wish to insert into a javascript array variable. My php array values are currently : Array ( [0] =&gt; "Butter noob", 26375 [1] =&gt; "Crab Vermecilli", 0 [2] =&gt; "Salted Egg Yolk Crab", 0 ) Now , i need this array to replace the values within the javascript function code snippet below : series: [{ name: 'Delivered amount', data: [ ['Bananas', 8], ['Kiwi', 3], ['Mixed nuts', 1], ['Oranges', 6], ['Apples', 8], ['Pears', 4], ["Clementines", 4], ['Reddish (bag)', 1], ['Grapes (bunch)', 1] ] }] So after including my converted php array into the javascript function, it should look something like : series: [{ name: 'Delivered amount', data: [ ["Butter Noob", 26375], ["Crab Vermecelli", 0], ["Salted Egg Yolk Crab", 0], ] }] Can anyone assist me on this matter? I tried json_encode but im stucked now. How do i use converted php array with json_encode under such situation ?
tagged with: php
has answer: http://stackoverflow.com/a/27088355

http://stackoverflow.com/q/27102639
has answer: http://stackoverflow.com/a/27102806
type: Question
has body: I came to python from Node.js and I'm accustomed to such error handling: doSmth(function(err, data) { if (err) { log(err); } else { fooSmth(data, function(err, res) { if (err) ... }) } }) Is it acceptable in Python to handle errors like def do_smth(arg): try: data = int(arg) return None, data except Exception as e: logger(e) return e, None err, data = do_smth("1715") if not err: print data So that the function always return a tuple with exception and data values: (None, data) or (Exception, None)
has title: Handle Python Exceptions like in JS
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/27102970
answer count: 2
possible better answer: http://stackoverflow.com/a/27102970
favorite count: 0
tagged with: exception
tagged with: python
accepted answer: http://stackoverflow.com/a/27102806
tagged with: node.js
has comment: http://stackoverflow.com/comment/42709343
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42709484

http://stackoverflow.com/comment/42588364
type: QuestionComment
comment on: http://stackoverflow.com/q/27033287
score: 0
type: Comment
has text: ok i found the problem , was sending parameters to onload function thats y,,,

http://stackoverflow.com/comment/42597050
score: 1
has text: id can start with a number. For html its fine, only problem is css, that dont like that.
comment on: http://stackoverflow.com/q/27038690
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27071949
answer count: 2
has title: Loading XML into the DOM and replacing usage of Microsoft.XMLDOM
tagged with: javascript
upvote count: 3
tagged with: http://stackoverflow.com/tag/xml
favorite count: 0
has answer: http://stackoverflow.com/a/49444793
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27072072
score: 3
downvote count: 0
tagged with: internet-explorer-11
has body: I'm working with a some legacy code and in many places there's code to get XML data from some url. it's pretty straight forward. var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.load(url); and in some places var httpRequest= new ActiveXObject("Msxml2.XMLHTTP.6.0"); httpRequest.open('GET', url, false); httpRequest.send(null); in most cases we're picking results from response XML. I've seen in a number of places that the usage of "Microsoft.XMLDOM" is antiquated, replacing it in favor of ActiveXObject("Msxml2.XMLHTTP.6.0"). For other browsers I should use the standard W3C XMLHttpRequest. This seems to work without any problems. The problem is loading the result xml string. I see that loadXML is defined when using "Microsoft.XMLDOM" but not with ActiveXObject("Microsoft.XMLHTTP"); With other browsers DOMParser is the suggested method as well as IE-11. This is what I did to retrieve information from a url then parse that information and then finally attempt to load the XML string to the DOM. My main problem is I'm getting more and more confused as to what solution is appropriate when Manipulating XML with regards to Internet Explorer or maybe it's just too late in the day. I wanted to remove the usage of "Microsoft.XMLDOM" but to perform the loadXML I had to go back to it. is there a better way to approach this? // Get the information use either the XMLHttpRequest or ActiveXObject if (window.ActiveXObject || 'ActiveXObject' in window) { httpRequest = new ActiveXObject("Msxml2.XMLHTTP.6.0"); } else if (window.XMLHttpRequest) { httpRequest = new XMLHttpRequest(); if (httpRequest.overrideMimeType) { httpRequest.overrideMimeType('text/xml'); } } httpRequest.open('GET', url, false); httpRequest.send(); var xmlDoc = httpRequest.responseXML; // Retrieve the XML into the DOM var xml = xmlDoc.getElementsByTagName("XML_STRING_SETTINGS") // Load the XML string into the DOM if (window.DOMParser) { var parser = new DOMParser(); xmlDoc = parser.parseFr…
type: Question

http://stackoverflow.com/a/62901574
has body: The problem is with beta 8 version. Using npm i react-bootstrap@1.0.0-beta.9 fixed the issue.
type: Answer
has comment: http://stackoverflow.com/comment/111237548
answers question: http://stackoverflow.com/q/27012800
score: 0

http://stackoverflow.com/comment/43000603
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27051458
has text: yes it finally worked. Thank you. Probably should found this solution myself but glad I can move on now.

http://stackoverflow.com/a/27020845
score: 0
answers question: http://stackoverflow.com/q/27020791
has comment: http://stackoverflow.com/comment/42566492
has body: try this solution: javascript allow thread function :) ... You have array of class or id, you loop to get class or id and use example. for(var key in Alerts){ (function(key){ $("#"+key).on("click",function(){ alert(key); }); })(key); } this example. should you use this for your code :), My code very example, When you know how to store key in loop, you can see your problem so easy.. example: http://jsfiddle.net/v0Lhtwpe/2/
type: Answer

http://stackoverflow.com/q/27064730
has title: Re-evaluate attributes passed to directive after scope variable changes
type: Question
tagged with: angularjs-directive
has body: I have a series of element generated within an ng-repeat : &lt;tr ng-repeat="index in elements"&gt; &lt;td ng-click="doSomething(index)" my-tooltip tooltip="isInBasket(index.id) &amp;&amp; 'REMOVE FROM BASKET' || 'ADD TO BASKET'" &gt;&lt;/td&gt; &lt;/tr&gt; The directive MyTooltip is expecting a value passed to the tooltip attribute. This will work the first time, that means when the ng-repeat is executed. The tooltip will have a value of "REMOVE FROM BASKET" if the element is already in basket and a value of "ADD TO BASKET" otherwise. The function is defined as follow: $scope.isInBasket = (id){ return _.contains($scope.basket, id) } Now, other parts of my code will change $scope.basket, so I supposed that the isInBasket would be re-evaluated whenever the $scope.basket changed and as a consequence change the value passed to the tooltip attribute. The directive angular.module("tooltips", []) .directive("myTooltip", ($parse, $rootScope, $state){ return { restrict: 'A', priority: 999, link: function(scope, elm, attrs) { tooltip = scope.$eval(attrs.tooltip); // .... } } }) But this doesn't work, I'm quite sure I'm doing something wrong or I am missing something.
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: angularjs-ng-repeat
favorite count: 0
has comment: http://stackoverflow.com/comment/42643978
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27065172
has answer: http://stackoverflow.com/a/27064984
downvote count: 0
score: 1

http://stackoverflow.com/a/31535465
upvote count: 1
has body: Try to have no dash ( - ) in your selector.
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/26999184
type: Answer

http://stackoverflow.com/comment/42794479
score: 0
type: AnswerComment
type: Comment
has text: no, i have got the target already, i need to track the event handler associated with that element.
comment on: http://stackoverflow.com/a/27149966

http://stackoverflow.com/comment/42775705
score: 0
has text: Why don't you try SynWrite app? It has nested lexers, e.g. JS inside HTML. Guys may help you at forum.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27128693

http://stackoverflow.com/q/27139703
tagged with: google-chrome
type: Question
tagged with: asp-classic
has comment: http://stackoverflow.com/comment/42777315
has comment: http://stackoverflow.com/comment/42793165
tagged with: javascript
tagged with: jquery
has title: How to free memory on web application
tagged with: ajax
score: 0
has body: i have a web application in jquery and consume ws from a server in asp .net, and the browser show in the request a long time in blocking state, i see this in the console of the browser. I think, the problem is, the application consume a lot memory. Thanks for any solution of this problem :) This is a image of the console the times in the request is the problem, i have a long time in the blocking state.
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/42555640
score: 0
has text: You can build needed URL using [`URLUtils`](https://developer.mozilla.org/en-US/docs/Web/API/URLUtils)' properties. Or use `String`'s methods to manually cut hash from `href`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27014643

http://stackoverflow.com/comment/42682872
has text: @T.J.Crowder ok, i will do just that now
comment on: http://stackoverflow.com/q/27087381
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27152226
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/27152651
type: Question
tagged with: asp-classic
has body: I am trying to set a value in javascript via ASP foo('RequestMode', '&lt;%=Request.Querystring("Mode")%&gt;') What I'd like to do is something like this foo('RequestMode', '&lt;%=if (Request.Querystring("Mode")="") then Session("RequestMode")="" else Request.Querystring("Mode") end if%&gt;') If I use the opening tag &lt;%= I get an error saying 'If' operator requires either two or three operands. but if I use the opening tag &lt;&amp; I get an error saying Property access must assign to the property or use its value. Request.Querystring("Mode") &lt;--- highlighted Which makes me believe that there's no error with my code, per se. How can I accomplish my task?
has title: return classic ASP value via if statement into javascript
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/27152651

http://stackoverflow.com/q/27000817
type: Question
upvote count: 2
answer count: 1
favorite count: 0
has body: I am trying to build an app using Apache Cordova that involves using Microsoft EWS to access my Outlook account. I currently have a working app using MVC but I cannot add similar references to the Cordova project in order for me to make similar calls to EWS. Are there any javascript API's or anything that I can add to be able to gain access to the functions I need? thanks
score: 2
tagged with: cordova
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/39152138
has title: Microsoft EWS with Apache Cordova
tagged with: javascript

http://stackoverflow.com/a/27084382
answers question: http://stackoverflow.com/q/27034277
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27034277
has body: After some more researching around, I came across to this post which is helpful for my situation. Here's the link to it, maybe it will help someone else sharing the same problem. How do I use Browserify with external dependencies?
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/42536511
type: Comment
type: QuestionComment
has text: Can you give us a sample of your HTML, please?
comment on: http://stackoverflow.com/q/27003355
score: 0

http://stackoverflow.com/comment/42776695
comment on: http://stackoverflow.com/a/27139357
score: 0
type: Comment
has text: Could you provide a code snippet as I am unsure what you mean by "based on the dropdown selection"
type: AnswerComment

http://stackoverflow.com/q/27025636
has answer: http://stackoverflow.com/a/27026991
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27026991
score: 0
has title: Parse - Add an object to a pointer
answer count: 1
has body: I am trying to add an object to a pointer column. But I get this error. I2014-11-19T19:21:47.066Z] Failed while unmark/marking{"code":111,"message":"can't add a relation to an non-relation field"} This makes total sense because I am trying to access the pointer column using user.relation("favoritedDealsPointer"). Could someone please guide me how I can add an object to a pointer if (deal) { var userQuery = new Parse.Query(Parse.User); userQuery.equalTo("objectId", userObjectId); userQuery.include("favoritedDealsPointer"); userQuery.first({ success: function(user) { console.log("Found User. stringify now:" + JSON.stringify(user)); if (user) { Parse.Cloud.useMasterKey(); var dealRelation = user.relation("favoritedDealsPointer"); if (shouldMark == "mark") { dealRelation.add(deal); } else if (shouldMark == "unmark") { dealRelation.remove(deal); } user.save().then(function(user) { response.success(deal); }, function(error) { console.log("Failed while unmark/marking" + JSON.stringify(error)); response.error(deal, error); }); } else { console.log("No such user exists"); response.error(deal, "Not found"); } }, error: function(error) { console.log("Error in the outer" + JSON.stringify(error)); response.error(deal, "Not found"); } }); } else { console.log("No such deal exists"); response.error(deal, "Deal Not found"); }
tagged with: parse-platform

http://stackoverflow.com/a/27061837
has comment: http://stackoverflow.com/comment/42637895
score: 0
type: Answer
answers question: http://stackoverflow.com/q/27061665
has body: try this code $('button').on('click',function(){ $(this).val($(this).val() == "RED" ? "BLUE" : "RED") //OR //this.value = this.value == "RED" ? "BLUE" : "RED"; });
has comment: http://stackoverflow.com/comment/42638205

http://stackoverflow.com/comment/42706680
type: QuestionComment
score: 1
has text: Check your data structure. http://stackoverflow.com/questions/4816099/chrome-sendrequest-error-typeerror-converting-circular-structure-to-json
comment on: http://stackoverflow.com/q/27101240
type: Comment

http://stackoverflow.com/comment/42663923
comment on: http://stackoverflow.com/a/27076578
type: AnswerComment
has text: No, '=' is two way data binding between two scope properties. From the docs again: `= or =attr - set up bi-directional binding between a local scope property and the parent scope property of name defined via the value of the attr attribute.`
type: Comment
score: 0

http://stackoverflow.com/comment/42775417
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27133613
score: 0
has text: There is a recent change in Google Calendar's API, so you will need to update a file from the resources. You can find more information on this link: http://fullcalendar.io/docs/google_calendar/

http://stackoverflow.com/a/27076121
has comment: http://stackoverflow.com/comment/42663358
accepted answer of: http://stackoverflow.com/q/27075999
answers question: http://stackoverflow.com/q/27075999
type: AcceptedAnswer
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/42679106
downvote count: 0
has comment: http://stackoverflow.com/comment/42679195
has body: There are some errors with your code, you have missed the newlabour_date for the generated input field and table.insertRow(rowcount); giving out of rage error. A working example without Ajax: http://jsfiddle.net/qxarbpcc/ Here is the updated version of your addInput function: function addInput(table,counter,rowcount) { var counter = document.getElementById(counter); var number = counter.value; counter.value = ++counter.value; var rowcount = parseInt(rowcount)+1; // muliply the rowcount by 1 to ensure it doesn't get treated as a concatenation. var table = document.getElementById(table); var row = table.insertRow(0); row.align = "center"; var cell1 = row.insertCell(0); cell1.className = "bBottom"; cell1.width = "20%"; cell1.height = "21"; cell1.innerHTML = "&lt;input type=\"text\" style=\"position:relative; top:2px;\" class=\"noborder newlabour_date\" name=\"newlabour_date["+number+"]\" id=\"newlabour_date["+number+"]\" size=\"15\" maxlength=\"\" placeholder=\"\" value=\"\"&gt;"; } Then change your Ajax callback to this: if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("container").innerHTML=xmlhttp.responseText; $('body').on('focus',".newlabour_date", function(){ $(this).datepicker();}); } Don't forget to add jquery and jqueryui in head section.
has comment: http://stackoverflow.com/comment/42663520
score: 1

http://stackoverflow.com/comment/42637845
type: QuestionComment
comment on: http://stackoverflow.com/q/27061665
has text: Easy understandable solution if you want inline JS: ` `
score: 0
type: Comment

checkbox
tag name: checkbox
tags question: http://stackoverflow.com/q/27113246
tags question: http://stackoverflow.com/q/27105400
tags question: http://stackoverflow.com/q/27020756
tags question: http://stackoverflow.com/q/27052504
tags question: http://stackoverflow.com/q/27054487
tags question: http://stackoverflow.com/q/27088170
tags question: http://stackoverflow.com/q/27150480
tags question: http://stackoverflow.com/q/27015356
tags question: http://stackoverflow.com/q/27053182
tags question: http://stackoverflow.com/q/27069325
tags question: http://stackoverflow.com/q/27136796
tags question: http://stackoverflow.com/q/27150874
tags question: http://stackoverflow.com/q/26999683
tags question: http://stackoverflow.com/q/27112527
tags question: http://stackoverflow.com/q/26993222
tags question: http://stackoverflow.com/q/27076921
tags question: http://stackoverflow.com/q/27137848
tags question: http://stackoverflow.com/q/27080192
tags question: http://stackoverflow.com/q/27098265
tags question: http://stackoverflow.com/q/27024544
tags question: http://stackoverflow.com/q/27135396
tags question: http://stackoverflow.com/q/27148320
tags question: http://stackoverflow.com/q/27116676
tags question: http://stackoverflow.com/q/26998372
type: Tag
tags question: http://stackoverflow.com/q/27028914
tags question: http://stackoverflow.com/q/27026506
tags question: http://stackoverflow.com/q/27012038
tags question: http://stackoverflow.com/q/27046879
tags question: http://stackoverflow.com/q/27151749

http://stackoverflow.com/comment/42777591
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/27139508
has text: Safari might be trying to be smart and hide the div because nothing is in it. I would try putting something in it like a non-breaking space.
score: 0

http://stackoverflow.com/comment/42741224
score: 1
comment on: http://stackoverflow.com/a/27119509
type: AnswerComment
has text: try to remove the quotes around 2012
type: Comment

http://stackoverflow.com/q/27062930
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: regex
has title: Issue in URL Splitting
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/42639927
has body: I have write following code to split the URL var href = document.URL; var GlobalBoomGuid = href.split("="); var optionid = GlobalBoomGuid[1]; If i have URL like this : www.mydomain.com?optionid=655 It's giving me "655" . But in current scenario my URL is www.mydomain.com?optionid=655#&amp;ui-state=dialog and it's returning me 655#&amp;ui-state Now i want only id . How should i do that ? Please if you dont like the question don't mark as a Negative Thanx in Advance :)
accepted answer: http://stackoverflow.com/a/27063446
duplicate of: http://stackoverflow.com/q/901115
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27063446
tagged with: javascript
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/42662889
score: 0
comment on: http://stackoverflow.com/q/27075582
type: Comment
type: QuestionComment
has text: @slebetman i want to know how we used to do it before ajax. no reason for not to use ajax, just i want to know is there any alternative instead of using ajax...thanks for the response

http://stackoverflow.com/comment/42691110
has text: Please, try to be more clear. You want to do that on mouse hover? click? you want to trim the image?
comment on: http://stackoverflow.com/q/27092477
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27096357
score: -1
downvote count: 2
has answer: http://stackoverflow.com/a/27096466
has comment: http://stackoverflow.com/comment/42698246
upvote count: 1
type: Question
has title: Javascript - Make an element dissapear if an option is selected
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/42698231
has answer: http://stackoverflow.com/a/27096445
has body: I have a list of countries in a drop-down menu Please select USA Canada Rest of the World My goal is: If value 3 is selected, the input field "state" disappears. If option 1 or 2 are selected, it should show the field "state". In case the user has already entered a value in the input field "state" (because option 1 or 2 were previously selected) and he changes it to option 3, the code should first erase the value entered in the state field and then make that field disappear. How would the Javascript code look like? I appreciate your help! UPDATE: Apparently there is a function already running "onchange", so that the HTML looks this way: Select USA Canada Mexico " Argentina " Australia " This seems to be interfering with the codes suggested for this case. Is it there any way to run the code to hide the "state" after the "onchange" function "checkCountry()" has been run?
accepted answer: http://stackoverflow.com/a/27096466
possible better answer: http://stackoverflow.com/a/27096445
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/27096575
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/27035309
has comment: http://stackoverflow.com/comment/42591897
score: 2
has comment: http://stackoverflow.com/comment/42591562
has comment: http://stackoverflow.com/comment/42592725
has comment: http://stackoverflow.com/comment/42591509
has comment: http://stackoverflow.com/comment/42594025
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/42591614
downvote count: 1
has comment: http://stackoverflow.com/comment/42591286
has comment: http://stackoverflow.com/comment/42591961
has body: Extend Number.prototype. Numbers in Javascript are a data type that is associated with the built-in object "Number." Add the following polyfill block: if (!Number.prototype.round) { Number.prototype.round = function (decimals) { if (typeof decimals === 'undefined') { decimals = 0; } return Math.round( this * Math.pow(10, decimals) ) / Math.pow(10, decimals); }; } Anywhere after this, you can round numbers by sticking .round() to the end of them. It has one optional parameter that determines the number of decimals. For example: pi.round(2); You can also use backward rounding with negative numbers such as: x = 54321; x.round(-4); // 50000 Fiddle: http://jsfiddle.net/g2n2fbmq/ Related: Javascript Convert numbers to different formats or string alternative Extending Number.prototype in javascript and the Math object? Integer prototype
answers question: http://stackoverflow.com/q/27035308

http://stackoverflow.com/a/27082629
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42674624
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27082578
type: Answer
has body: When you use getElementsBy...it returns a list of elements, even if there is only one. (The plural Elements in getElementsBy gives it away). So you need to tell it to find a specific one in the list. If there is only one you can use document.getElementsByClassName('blah')[0] OR you can give your element an id and get it that way &lt;input type='button' id='blah'/&gt; document.getElementById('blah').style.visibility='hidden';
answers question: http://stackoverflow.com/q/27082578
upvote count: 1

http://stackoverflow.com/comment/42582325
score: 0
type: AnswerComment
has text: Exactly what I was looking for. I will definitely use the label method in the future - thanks for the idea!
type: Comment
comment on: http://stackoverflow.com/a/27029594

http://stackoverflow.com/comment/42567580
has text: That is not how selectors work. Space will indicate that you're looking for a descendant. You could do `$("button.btn.btn-primary")` or `$(".btn")` or `$(".btn-primary")` or `$(".btn.btn-primary")` or `$("button.btn")` or `$("button.btn-primary")` or '$(".btn-primary.btn")` or pretty much any combination that doesn't include spaces :)
type: Comment
comment on: http://stackoverflow.com/a/27020308
score: 0
type: AnswerComment

http://stackoverflow.com/a/27136884
type: Answer
has comment: http://stackoverflow.com/comment/42772345
has comment: http://stackoverflow.com/comment/42772290
score: 5
has comment: http://stackoverflow.com/comment/42771992
has comment: http://stackoverflow.com/comment/42772780
upvote count: 5
has body: Change the .input1 in your JS to #input1 When you use . it means it's a class, but you have an ID, which is #.
answers question: http://stackoverflow.com/q/27136847
downvote count: 0

http://stackoverflow.com/comment/42774038
has text: This is why you should not manipulate an array while looping over it. You can use the [Array filter method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) to filter out elements and return a new array.
type: QuestionComment
comment on: http://stackoverflow.com/q/27137919
score: 1
type: Comment

http://stackoverflow.com/q/27099375
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42736998
tagged with: php
type: Question
linked to: http://stackoverflow.com/q/486757
has title: An error occurs trying to output the xml data in php
has comment: http://stackoverflow.com/comment/42715014
tagged with: javascript
tagged with: ajax
score: 0
has body: I created the xml data from the db, and try to give the output in php page. function act_list(pagenum) { REQ = newXMLHttpRequest(); var handlerFunction = processReqList; REQ.onreadystatechange = handlerFunction; if( pagenum == 0 ){ pagenum = THISPAGE; }else{ THISPAGE = pagenum; } REQ.open("POST", "act/act_list.php", true); REQ.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); REQ.send("page="+pagenum); } First, when I requested a function in JavaScript to create an xml file in php <?php require_once "../include/config.php"; require_once "../include/DBAccess.php"; $rs = DBSelect("SELECT count(*) FROM {$tableName}"); $row = mysql_fetch_array($rs); $totalCnt = $row[0]; $thisPage = @(int)$_POST["page"]; if($thisPage <= 1){ $startNum = 0; }else{ $startNum = ($thisPage-1) * $listUnit; } $strSQL = ""; $strSQL = " SELECT seq, id, title, content, viewcount, write_time "; $strSQL .= " FROM {$tableName} "; $strSQL .= " ORDER BY seq DESC "; $strSQL .= " LIMIT {$startNum},{$listUnit} "; $rs = DBSelect($strSQL); $out = ""; $out = "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n"; $out .= " \n"; while ( $row = mysql_fetch_array($rs) ) { $out .= " \n"; $out .= " ".$row[1]." \n"; $out .= " ".$row[2]." \n"; $out .= " ".$row[3]." \n"; $out .= " ".$row[4]." \n"; $out .= " ".$row[5]." \n"; $out .= " \n"; } $out .= " \n"; header( "Content-type: application/xml; charset=utf-8" ); echo $out; ?> I try to output the generated xml file in php to html table list. However, page not found error occurs only firstChild.nodeValue. function processReqList() { // only if req shows "loaded" if (REQ.readyState == 4) { // only if "OK" if (REQ.status == 200) { printList(); } else { alert("There was a problem retrieving the XML data:\n" + REQ.statusText + REQ.status); } }//if } function printList() { var lists = REQ.responseXML.getElementsByTagName("lists")[0]; var output = document.getElementById("out"); var outhtml = ""; output.innerHTML = ""; var items = lists.getEle…
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/42703273

http://stackoverflow.com/comment/42579279
type: QuestionComment
has text: It's not really clear from your question if you **do** or **do not** want to match things like `0e1`
comment on: http://stackoverflow.com/q/27028096
score: 2
type: Comment

http://stackoverflow.com/a/27035352
has body: Some pages use frames even today. In contrast to the developer tools of your browser of choice PhantomJS doesn't include the DOM of the child frames in the main DOM. See for example this question which tries to overcome this: Dump HTML of page including iframes. If you actually want to print and manipulate the child frames you have to switch to them. This is usually done with page.switchToFrame. To get the content, you can log the page.frameContent property. page.render("Homepage.png"); console.log(page.frameContent); // same as page.content here console.log("############################################"); page.switchToFrame(0); // first child frame console.log(page.frameContent); // different as page.content here console.log("############################################"); page.switchToMainFrame(); // switch back up before switching to the second child page.switchToFrame(1); // second child frame console.log(page.frameContent); // different as page.content here console.log("############################################"); page.switchToMainFrame(); console.log(page.frameContent); // same as page.content here
upvote count: 1
answers question: http://stackoverflow.com/q/27032677
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/27032677
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/42671117
score: 1
has comment: http://stackoverflow.com/comment/42671046

http://stackoverflow.com/q/27076183
type: AnsweredQuestion
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/27082493
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: hyperlink
has title: D3: Hyperlinks in tree diagram
upvote count: 4
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/27082493
has body: I'm having trouble hyperlinking child elements in a Reingold-Tifold tree graph. The graph is built in D3 and is based on the one that Mike Bostock uses an example: http://bl.ocks.org/mbostock/4339184 My code and a segment of my JSON file are below. At this point, the graph works fine - if I click on a parent node, it expands to reveal a series of child nodes that are contained in my JSON file. But when I get to the child level, I want to make the word hyperlinked. I don't understand how to do that. I've used a previous SO question/answer - Hyperlinks in d3.js objects - to understand how to add a URL to my JSON data (at this point everything is just linking to Google.co.uk). But I don't understand how to link that URL to my tree graph so that the child nodes become hyperlinked. Can you let me know how I can do this? Thank you, in advance, for any help. (And thanks, @IH8, for your assistance so far.) Matt A portion of my JSON file: { "name": "turbo", "children": [ { "name": "Level 1", "children": [ { "name": "Google", "children": [ {"name": "Website", "size": 3938, "URL":"http://www.google.co.uk"}, {"name": "CommunityStructure", "size": 3812, "URL":"http://www.google.co.uk"}, {"name": "HierarchicalCluster", "size": 6714, "URL":"http://www.google.co.uk"}, {"name": "MergeEdge", "size": 743, "URL":"http://www.google.co.uk"} ] }, { "name": "graph", "children": [ {"name": "BetweennessCentrality", "size": 3534, "URL":"http://www.google.co.uk"}, {"name": "LinkDistance", "size": 5731, "URL":"http://www.google.co.uk"}, {"name": "MaxFlowMinCut", "size": 7840, "URL":"http://www.google.co.uk"}, {"name": "ShortestPaths", "size": 5914, "URL":"http://www.google.co.uk"}, {"name": "SpanningTree", "size": 3416, "URL":"http://www.google.co.uk"} ] }, { "name": "optimization", "children": [ {"name": "AspectRatioBanker", "size": 7074, "URL":"http://www.google.co.uk"} ] } ] }, . . .
linked to: http://stackoverflow.com/q/13104681

http://stackoverflow.com/q/27044900
downvote count: 0
score: 1
type: Question
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/27059633
has answer: http://stackoverflow.com/a/27045204
upvote count: 1
has body: I have a meteor project in which I'm trying to render a page with url data, however Meteor is not rendering the right template... This is my iron router code: Router.map(function() { this.route('profile', { path: '/profile/:_id', template: 'profile', data: function () { console.info(this); return Meteor.users.findOne({_id: this.params._id}); } }), this.route('info'), this.route('home', { path:'/', }), ... and the (simple) template: &lt;template name="profile"&gt; {{user}} &lt;/template&gt; with this helper function: Template.profile.helpers({ user: function() { return this; } )}; I know Meteor goes through the route since the console.info() in the router function dumps an object three(!) times in the console. However I only get to see my homepage and I never get to the profile page. All information I could find about this came from iron router tutorials or the docs and shows (about) the exact code I have. Has anyone had this problem before? What am I doing wrong? UPDATE: I also noticed that when I add an action function to the route, this function never runs... action : function () { console.info("action running!"); if (this.ready()) { this.render(); } }
has title: meteor iron router with data not rendering
tagged with: meteor
has answer: http://stackoverflow.com/a/27059633
favorite count: 0
tagged with: iron-router
possible better answer: http://stackoverflow.com/a/27045204
type: AnsweredQuestion

http://stackoverflow.com/q/27146959
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/27295994
has body: /* I have a handlebar template as */ {{#each values}} {{id}} {{/each}} /* problem: */ /* I could not able to click the dynamically created button id using events in layouts using backbone js*/
has title: How do I trigger the click event in handlebar?
type: Question
type: AnsweredQuestion
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/27295994

http://stackoverflow.com/comment/42761960
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27131385
score: 1
has text: Move the loop outside your `query` function. And create an array that you can pass to `Q.all` like you did in your first snippet.

http://stackoverflow.com/q/27109698
type: Question
has comment: http://stackoverflow.com/comment/42722617
tagged with: c#
has answer: http://stackoverflow.com/a/27145957
tagged with: javascript
has comment: http://stackoverflow.com/comment/42722672
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/42733512
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/27109922
has comment: http://stackoverflow.com/comment/42722907
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42722848
tagged with: razor
score: -2
tagged with: asp.net-mvc-4
has body: tl;dr I want to save the value of a textbox to the model ONLY IF the checkbox is checked. First off, I know my code is very messy. I've been trying to improvise my code off of another stack overflow question so it is first and foremost wrong. What I am trying to do is I have these restrictions to an event, some are bool and some are numbers. For example, no smoking is a bool, but minimum age is a number. These are optional though, the user doesn't have to set any. So I want to have a checkbox saying that they want the restriction but to also save the value to the model. Here is what I have so far: &lt;p&gt; &lt;input type="checkbox" id="ageLowCapCB" @(((Model.currentRestrictions.AgeLowCap != null) &amp;&amp; (Model.currentRestrictions.AgeLowCap != 0)) ? "checked = 'checked'" : "") /&gt; Low Age Limit @Html.TextBoxFor(e =&gt; e.currentRestrictions.AgeLowCap, new {id = "ageLowCap"}) &lt;/p&gt; and the script/jquery for this I have is: $("#ageLowCapCB").click(function () { var isChecked = $(this).is(":checked"); $("#ageLowCap").val(isChecked ? /*I don't know what to put here*/); }); The question I pulled this from was using values of "T" or "F" for true and false so it was easy for them to fill in the comment section putting "T" : "F" and that was it. But I need to pull the value of the text box and set it to the value of Model.currentRestrictions.AgeLowCap. Does anyone have any good ideas on what to do in a weird situation like this?
downvote count: 2
has title: Linking mvc razor checkbox to razor textbox

http://stackoverflow.com/a/27121118
has comment: http://stackoverflow.com/comment/42743538
has comment: http://stackoverflow.com/comment/42743822
score: 2
has body: Firstly, great question. I think you have the answer in your question. Obviously the minified can easily obfuscate a variable into a single letter, whereas it can't do that with 'this'. Technically, a minifier could analyze the code and do var s = this for you, but that would change the logic in the code itself and would be bad practice. So to answer your question- in terms of minification, it looks like a bound function with many uses of "this" in it would benefit from using a var instead. However, you would not be saving many characters and that's not what will cause your application to be served or run faster. This will also cause you to write your code differently and may cause it to be less legible, which will cost you more developer time in the future. These are not the micro-optimizations you should be looking for. If you asked this because you're looking to get a smaller file since you feel your app loads too slowly, then you have bigger problems to worry about.
downvote count: 0
has comment: http://stackoverflow.com/comment/42743193
upvote count: 2
answers question: http://stackoverflow.com/q/27120786
has comment: http://stackoverflow.com/comment/42743688
type: Answer
has comment: http://stackoverflow.com/comment/42758470
has comment: http://stackoverflow.com/comment/42743699

http://stackoverflow.com/a/27143184
has body: ^(0?[1-9]|[12][0-9]|3[01])[-][A-Z]{3}[-]\d{2}$ This should do the trick. The regex you tried was for the format of dd/mm/yyyy or dd-mm-yyyy.
has comment: http://stackoverflow.com/comment/42791591
accepted answer of: http://stackoverflow.com/q/27142916
answers question: http://stackoverflow.com/q/27142916
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42783067
type: Answer

http://stackoverflow.com/a/27110345
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/27110212
has comment: http://stackoverflow.com/comment/42723590
score: 0
has comment: http://stackoverflow.com/comment/66487805
has comment: http://stackoverflow.com/comment/42723610
type: Answer
has comment: http://stackoverflow.com/comment/42723821
has comment: http://stackoverflow.com/comment/42723888
has comment: http://stackoverflow.com/comment/42723902
has body: As was stated in the comments, you should combine this with a filter. Luckily, this is easy because you can chain array methods: ['apple','pear','banana', 'peach'].map(function(fruit){ if (fruit === 'apple') { return undefined; } return 'I love to eat ' + fruit; }).filter(function (item) { return item; }); update One of the tenants of functional programming like this is that you create simple building blocks that do not have side effects. What the OP is describing is essentially adding a side-effect to .map, and this type of behavior should be discouraged.

http://stackoverflow.com/q/27051174
downvote count: 1
score: 3
tagged with: stockquotes
has body: We have been using the yahoo rest api for years to get the current stock price for our company. Just noticed that it now provides the last closing price (i.e. if checking at 11:00, it gives the price at 4pm the previous day. Does anyone have a workaround? Or maybe a different rest api from someone besides yahoo??? All inputs appreciated! example: http://quote.yahoo.com/d/quotes.csv?s=tsla&amp;f=sl1d1t1c1ohgvj1pp2owern&amp;e=.csv
type: Question
upvote count: 4
answer count: 1
tagged with: javascript
has title: Yahoo Ticker API no longer real-time
favorite count: 0
tagged with: finance
has answer: http://stackoverflow.com/a/27113524
tagged with: yahoo-finance
has comment: http://stackoverflow.com/comment/42619877
has comment: http://stackoverflow.com/comment/42622092
type: UnansweredQuestion

http://stackoverflow.com/q/27001645
type: Question
accepted answer: http://stackoverflow.com/a/27004485
answer count: 1
tagged with: javascript
tagged with: google-chrome-app
has title: How to read file released with chrome app into blob?
has answer: http://stackoverflow.com/a/27004485
has body: I have a small file released with my chrome app that I'd like to read into memory. Everything I've found so far seems to be related to allowing a user to save to their filesystem or choose an file to upload from their filesystem. How can I access this small, internal-to-the-app file that is located at an arbitrary path in my app, e.g.: app/resources/myfiles/myfile.txt
score: 0
linked to: http://stackoverflow.com/q/26838004
type: AnsweredQuestion
tagged with: blob

http://stackoverflow.com/comment/42702088
comment on: http://stackoverflow.com/q/27087540
type: Comment
type: QuestionComment
has text: Hi, are you running it with on a server? Or are you trying to access the a file on your local machine without running a server( even if it is on your local machine)
score: 0

http://stackoverflow.com/a/27093494
has comment: http://stackoverflow.com/comment/42692853
upvote count: 0
answers question: http://stackoverflow.com/q/27093453
has comment: http://stackoverflow.com/comment/42693689
has body: If you know how to put their button on your page, you should also know how to put your own button on your page. It should be as easy as changing code between &lt;a href...&gt; and &lt;/a&gt; I just googled 2 min and came up with this: https://developers.facebook.com/docs/plugins/like-button It says: Use this URL in an iframe or as a link to your plugin. http://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fyoururl.com&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=true&amp;height=80 Just change yoururl.com to whatever it should like.
score: -1
downvote count: 1
type: Answer

http://stackoverflow.com/comment/42696610
type: AnswerComment
comment on: http://stackoverflow.com/a/27095388
type: Comment
score: 0
has text: may need this if not already got

http://stackoverflow.com/q/27084743
has comment: http://stackoverflow.com/comment/97146965
linked to: http://stackoverflow.com/q/12238587
answer count: 1
tagged with: safari
has title: Safari 300ms delay Apple devices
has answer: http://stackoverflow.com/a/27084797
score: 0
has comment: http://stackoverflow.com/comment/72380057
has body: In my game instant clicking is very important, the 300ms delay is really screwing with my movment on IOS Is there anyway to eleminate this? There is no code involved in this one, Thanks
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/27126215
score: 8
has answer: http://stackoverflow.com/a/27126855
has answer: http://stackoverflow.com/a/35766700
type: Question
tagged with: protractor
tagged with: javascript
has body: I'm on my third day working with Protractor and I'm constantly hitting bric walls in regards to waiting around for pages to load and elements to appear. This test case in particular has grown ugly and I would like to solve the issues without having to rely on sleeps. I am currently "outside of the land of AngularJS" it('it should reflect in both the field and the title when the personnel name is changed', function() { var inputField, personnelHeader, personnelName; personnelName = element(By.css(".overlay.editnameoverlay")).click(); personnelHeader = element(By.id("personnel_name_header")); inputField = element(By.css("input[name='newvalue']")); inputField.clear(); inputField.sendKeys("Test 123"); element(By.css("input[name='ok_button']")).click(); // browser.driver.sleep(2000); This test only works with this sleep added browser.wait(function() { console.log("Waiting for header to change..."); return personnelHeader.getText().then(function(text) { return text === "Test 123"; }); }, 5000); return expect(personnelHeader.getText()).toBe(personnelName.getText()); }); So the test here changes the name in an input field. submits it and waits for the changes to become reflected in the header of the modal. The problem is that without the browser.driver.sleep(2000) I get an error saying Stacktrace: StaleElementReferenceError: stale element reference: element is not attached to the page document How do I go about solving this in this particular case?
answer count: 2
downvote count: 0
favorite count: 0
has title: Wait for element to change its value(text)
tagged with: angularjs
upvote count: 8
type: UnansweredQuestion

http://stackoverflow.com/comment/42531528
has text: Why aren't you allowed to set headers? Note that the client has this restriction; you should be able to make the request from the server without issue, and thus could do CLIENT -> SERVER -> GOOGLE DRIVE
comment on: http://stackoverflow.com/q/27000511
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27099021
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/27098210
upvote count: 2
has body: You do not need to inject nvd3 in your controller: Change: myApp.controller('myCtrl',['$scope','nvd3', function($scope){ $scope.options = { /*my json chart options */ }; $scope.data = { /* my json data */ } }]); To: myApp.controller('myCtrl',['$scope', function($scope){ $scope.options = { /*my json chart options */ }; $scope.data = { /* my json data */ } }]);
type: Answer
answers question: http://stackoverflow.com/q/27098210

http://stackoverflow.com/comment/42771411
has text: In Firefox: TypeError: HTMLInputElement is not a function (evaluating 'Login()')
comment on: http://stackoverflow.com/q/27136283
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42635566
has text: In any case, overriding the `confirm()` function like that is not a very good idea. You should probably have `var confirmResult = window.confirm('Are you sure?');` to keep it clean
type: AnswerComment
score: 1
type: Comment
comment on: http://stackoverflow.com/a/27060576

http://stackoverflow.com/q/27149925
tagged with: javascript
tagged with: jquery
score: -1
answer count: 1
downvote count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42794647
tagged with: css
upvote count: 0
has title: How to make active class in menu visible at loading page first
type: Question
has comment: http://stackoverflow.com/comment/42794772
has body: I'm just begin learn js, and have a problem. This sidebar menu. http://jsfiddle.net/q8b041s5/ How i can get visible display block, if line &lt;li&gt; or &lt;ul&gt; is active? Tis need, when go to link, sidebar menu was in the same place of click. (function ($) { $(document).ready(function () { $(document).ready(function () { $('#cssmenu &gt; ul &gt; li ul').each(function (index, e) { $(e).closest('li').children('a'); }); $('#cssmenu &gt; ul &gt; li &gt; a').click(function () { $('#cssmenu li').removeClass('active'); $(this).closest('li').addClass('active'); var checkElement = $(this).next(); if ((checkElement.is('ul')) &amp;&amp; (checkElement.is(':visible'))) { return true; } if ((checkElement.is('ul')) &amp;&amp; (!checkElement.is(':visible'))) { $('#cssmenu ul ul:visible').slideUp('normal'); checkElement.slideDown('normal'); } if ($(this).closest('li').find('ul').children().length == 0) { return true; } return false; }); }); }); })(jQuery);
has answer: http://stackoverflow.com/a/27150258

http://stackoverflow.com/q/27009400
has title: Javascript prototype: how do I call a method within another method?
type: Question
accepted answer: http://stackoverflow.com/a/27009506
tagged with: javascript
tagged with: prototype
has body: This is my first attempt to javascript prototyping. I am using the Espruino(javascript interpreter for microcontrollers) to get data from environment sensors. I am trying to pause my code for 1000ms, then execute the getSensorReading() method which is(I think) located inside of another method. How do I execute getSensorReading() method? I believe the error is cause by this: setTimeout(function (e) { this.getSensorReading(); }, w); //Attempting to execute getSensorReading() I am receiving this error: Uncaught Error: Function "getSensorReading" not found! at line 1 col 8 { this.getSensorReading(); } ^ in function called from system Code: I2C1.setup({scl:b6, sda:b7}); function Sensor (theType, theAddress) { this.type = theType; //i.e. PH this.address = theAddress; //i2c Address this.sensorResult = 0; //Store sensor result this.cmdTable = { "Calibrate" : { //List of Calibration commands and timeout value. "clear" : { "cmd" : "Cal,Clear", "wait" : 300 }, "mid" : { "cmd" : "Cal,mid,7.00", "wait" : 1300 }, "low" : { "cmd" : "Cal,low,4.00", "wait" : 1300 }, "high" : { "cmd" : "Cal,high,10.00", "wait" : 1300 }, "query" : { "cmd" : "Cal,?", "wait" : 300 } }, "Information" : { //Device Information }, "LED" : { //Enable / Disable or Query the LEDs "L0" : { "cmd" : "L,0", "wait" : 300 }, "L1" : { "cmd" : "L,1", "wait" : 300 }, "L?" : { "cmd" : "L,?", "wait" : 300 } }, "Reading" : { //Takes a single reading "R" : { "cmd" : "R,25.6", "wait" : 1000 } //Takes a single temperature compensated reading }, "Serial" : { //Switch back to UART mode }, "Sleep" : { //Enter low power sleep mode }, "Status" : { //Retrieve status information }, "Temperature" : { //Set or Query the temperature compensation "T" : { "cmd" : "T,19.5", "wait" : 300 }, //Where the temperature is any value; floating point, or int, in ASCII form "T?" : { "cmd" : "T,?", "wait" : 300 } //Query the set temerature }, "Factory" : { //Factory reset }, }; } Sensor.prototype = { constructor: Sensor, getSensorType:function () {…
answer count: 3
linked to: http://stackoverflow.com/q/3127429
has answer: http://stackoverflow.com/a/27009548
has comment: http://stackoverflow.com/comment/42546513
possible better answer: http://stackoverflow.com/a/27009526
has answer: http://stackoverflow.com/a/27009506
has answer: http://stackoverflow.com/a/27009526
type: AnsweredQuestion
score: 0

http://stackoverflow.com/comment/42793581
type: Comment
type: AnswerComment
has text: I used `$('.left').html(html);` I called the div ´left´. Here is the div itself: ` `
score: 0
comment on: http://stackoverflow.com/a/27148637

http://stackoverflow.com/comment/42783248
comment on: http://stackoverflow.com/a/27143139
type: AnswerComment
has text: oh okk.. am sorry.. i thought u r asking for that... I don't know how to do it.. sorry..
score: 0
type: Comment

http://stackoverflow.com/a/27028963
type: AcceptedAnswer
has body: At this line ´Account = Me.find().fetch()[0];´, you're assuming that your query is returning at least 1 item, you should always check before trying to access the "maybe it exists object". In your case this might no be the issue but remember to check the object: if(Account){//your code} As Slava pointed, it's likely that your error is a typo @ console.log(Account.id); // this doesn't
has comment: http://stackoverflow.com/comment/42602967
type: Answer
has comment: http://stackoverflow.com/comment/42593588
answers question: http://stackoverflow.com/q/27028036
has comment: http://stackoverflow.com/comment/42602638
accepted answer of: http://stackoverflow.com/q/27028036
score: 0

http://stackoverflow.com/comment/42544697
type: Comment
score: 1
has text: Is your SPA being run like file://index.html? or is it on a webserver when you're testing with the json file?
comment on: http://stackoverflow.com/q/27008170
type: QuestionComment

http://stackoverflow.com/comment/42611046
type: QuestionComment
comment on: http://stackoverflow.com/q/27046363
score: 0
has text: What is your question exactly? What methods are you asking us to compare?
type: Comment

http://stackoverflow.com/comment/42720372
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27108401
has text: An `iframe` loads an entire html page and you should not try to fix a wrong path of that loaded page in the page that contains the `iframe`, but in the page you load. So you need to fix the problem in the `blablabla.php` file, just open the `blablabla.php` directly in your browser, check the paths and correct the relative paths so that it the images are displayed correctly.
score: 0

http://stackoverflow.com/a/27001513
has body: I'm a big fan of the $resource service in the Angular core. When you use this, the properties returned from your data are assigned to the object on the instance of the $resource object. So // js scope.myThing = $resource('thing_url').get(); // html {{ myThing.myProperty }} This works by taking advantage of Angular's digest cycles. When resource is returned, the template "magically" works. This is actually because the $resource service kicks off a digest cycle when it completes its request, and the bindings now display the correct information. You can do the same thing with watchers: scope.$watch('myThing.myProperty', function (newValue) { /... }); You could do something similar: create a service that returns an object containing the results from your server. Assuming you can connect to an event on your web-socket layer, you can then kick off a digest cycle whenever the data has been updated. In this way, the controllers and templates will be update. Question Author addition: Kicking of digest cycles in the service is only half of the work. The other half is making sure you don't overwrite the references to objects (a single model) and arrays (a collection of models). You can achieve this by using angular.copy when updating the local models inside your service. pseudo code of our working solution: Create a store object inside an API service (serves as a cache of all database data) Whenever a controller needs certain information it queries the API service. The API service requests that data from the backend and stores it locally in the store object. Besides the store object we also created a minimal query parser able to filter the store object in the same way the backend filters (we have a mongo style query API where queries are objects like {city: "amsterdam"} or {city: {"!": "amsterdam"}}). Run the query against the local store, save the query and the results and pass it back the requester (a directive or controller). Whenever a model updates, rerun all queries that…
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/27001385
answers question: http://stackoverflow.com/q/27001385
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/42540535

http://stackoverflow.com/q/26997763
tagged with: associative-array
upvote count: 1
possible better answer: http://stackoverflow.com/a/26997831
has answer: http://stackoverflow.com/a/26997831
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26998098
has answer: http://stackoverflow.com/a/26998147
tagged with: token
downvote count: 0
has title: Javascript tokenised list to associative collection
has body: I have a large collection of comma delimited tokens, kind of like this: let str = "Rock,Paper,Scissors"; // ... except much bigger. I need to pass over a large set of data, checking whether a parameter is in this list or not. My initial thought was to convert this collection to an object and search on key - there may be better ways. I know that: str.split(","); will give me an array. ["Rock", "Paper", "Scissors"] I'm guessing this is functionally equivalent to { "0": "Rock", "1": "Paper", "2": "Scissors" } but that doesn't really help me too much. Is there a way to simply transpose the key and value to give me an useful keyed collection? As in: { "Rock": "0", "Paper": "1", "Scissors": "2" } Naturally a simple loop would do it - just wondered if there's any language built-in way of doing this. And is this even the best way to deal with this problem in Javascript or are there better / more efficient ways?
favorite count: 0
has answer: http://stackoverflow.com/a/26997811
accepted answer: http://stackoverflow.com/a/26998098
answer count: 4
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/42658397
has text: I just read your last comment. I didn't mean to be obtuse. I am new to JS and wanted to make sure I was clear as to what I wanted. I almost never find helpful answers on this site because your vocabularies are beyond me lol.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/27073155

http://stackoverflow.com/comment/132922419
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27056084
has text: Reducing overhead, and is easier to implement. Sweet. Make sure you attach the event handler to an element the is not updated after loading; eg. body or document.
type: AnswerComment

http://stackoverflow.com/comment/42571682
has text: Oh, this is bad and you should feel bad :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/27013673

http://stackoverflow.com/q/27125080
has comment: http://stackoverflow.com/comment/42750323
has comment: http://stackoverflow.com/comment/42750935
has comment: http://stackoverflow.com/comment/42750292
has comment: http://stackoverflow.com/comment/42750810
answer count: 1
has answer: http://stackoverflow.com/a/27125553
tagged with: javascript
score: 0
tagged with: regex
has body: I don't have previous experience working with regex and that's why I need your help. I have 3 different web services which I'm using to grab data via live search. Here is the logic of my statement which I'm trying to implement. if(carName is entered) { getCarName.php?text=blablabla } elseif (carModel is entered) { getCarModel.php?text=blablabla } elseif (carNumer is entered) { getCarNumber.php?text=1337 } The idea is if carName is entered it could be a simple string like Pontiac Firebird 2002, then carModel can be OHC inline-6 and a single-barrel carburetor. carName and carModel may contain characters and numbers. carNumber can have numbers-only value like 194378. I've started evaluation regexr.com website, but still didn't came up with a possible solution to my problem. I want to have 1 input field (search field). I have different 3 web services. I have a working live search for 1 web service (carName). It's working fine, but I want to make a regex statement to find out when in the input search field is entered carName or carModel or even carNumber. How I can do it? As an example, here is a code snippet for my live search for carName web service: $('#search').keyup(function() { var searchField = $('#search').val(); var $update = $('#update'); $.get("getCarName.php?text=" + searchField, function(data) { $update.empty(); var vals = jQuery.parseJSON(data); if($.isArray(vals['Car'])) { $.each(vals['car'], function(k,v){ $update.append("&lt;li value='"+v['id']+"'&gt;&lt;a href='#'&gt;" + v['car_name'] + "&lt;/a&gt;&lt;/li&gt;"); }); } else { $update.append("&lt;li value='"+vals['car']['id']+"'&gt;&lt;a href='#'&gt;" + vals['car']['car_name'] + "&lt;/a&gt;&lt;/li&gt;"); } }); }); Based on a code above, I want to create an if/else statement to figure it what which web service it should use based on the input string. According to the regexr.com carName and carModel can be achieved from: abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 And carNumber from: 01…
has comment: http://stackoverflow.com/comment/42750262
accepted answer: http://stackoverflow.com/a/27125553
has title: Regex JavaScript If/Else statement
type: Question
type: AnsweredQuestion

http://stackoverflow.com/q/27149155
possible better answer: http://stackoverflow.com/a/27149970
has comment: http://stackoverflow.com/comment/42793255
has comment: http://stackoverflow.com/comment/42794420
has comment: http://stackoverflow.com/comment/42793114
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27149970
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/42797363
has comment: http://stackoverflow.com/comment/42794187
tagged with: javascript
tagged with: event-handling
tagged with: jquery
has title: jQuery on() click event handler not working
accepted answer: http://stackoverflow.com/a/27152751
has comment: http://stackoverflow.com/comment/42794164
tagged with: click
has comment: http://stackoverflow.com/comment/42794067
tagged with: android
has comment: http://stackoverflow.com/comment/42793897
has answer: http://stackoverflow.com/a/27152751
has body: I am trying to add a click event handler to dynamically added links to prevent the default behaviour (but allow propagation so that the click is passed to to another handler below). When i do: $('.menulink').on('click', function(e) { e.preventDefault(); console.log('menu clicked'); alert('now'); }); within $(window).load then it works correctly on desktop. However if i use: $(document).on('click', '.menulink', function(e) { e.preventDefault(); console.log('menu clicked'); alert('now'); }); within $(document).ready then it never fires. FYI I'm using Jquery 1.11.1. Can anyone suggest why the delegated version doesn't work (i've tried using other visible parent containers but went back to using $(document) for testing, but none work). Additionally even in the first working example it works correctly on desktops but on Android it sometimes fires and sometimes just follows the link url without firing the click handler but there doesn't seem to be any logic as to when it works and when it doesn't! Can anyone see what i'm doing wrong!! (please see 'UPDATE 2 AS REQUESTED' below which includes a fiddle showing the problem) UPDATE AS REQUESTED: I am using http://tikku.com/jquery-radmenu-plugin for a radial menu which takes a list and programatically creates another element for the menu using the list items. As a result the links are dynamically added into the radial menu (around each item) when the plugin loads, the initial HTML list is: OPT2 OPT14 OPT20 OPT74 After the plugin loads it generates the following markup: OPT2 OPT14 OPT20 OPT74 UPDATE 2 AS REQUESTED: I have created a massively simplified fiddle just showing the menu and associated links. If you visit http://jsfiddle.net/7asLq/2/ then you can see it correctly follows the onselect handler of radmenu and the click handler of .menulink and prevents direction to the menulink href due to preventdefault. If you replace "$('.menulink').on('click', function(e) {" with "$(document).on('click', '.menulink', function(e) {" (t…
has comment: http://stackoverflow.com/comment/42793179

http://stackoverflow.com/comment/42610463
comment on: http://stackoverflow.com/q/27045842
has text: As expected, the assertion that one is faster is simply wrong: http://jsperf.com/two-ways-of-swapping
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/27077747
tagged with: web-services
score: 2
has body: I'm trying to implement the feature "Image Profile". I use https://github.com/danialfarid/angular-file-upload to upload the image to webservice server (java) and now i want to get the image to display on user profile page. In the webservice server, I wrote the method: @GET @Path("/downloadFile") @Produces("application/octet-stream") public Response downloadFile(@FormParam("documentId") long documentId) { AssessmentDocument doc = this.documentRepository.findOne(documentId); File file = new File(doc.getDocumentPath() + doc.getDocumentName()); ResponseBuilder response = Response.ok((Object) file); response.header("Content-Disposition", "attachment; filename=\"" + doc.getDocumentName() + "\""); return response.build(); } and in the Angular Service, I wrote the function to call service download: /** * download file * @param user * @returns {*} */ this.downloadFilePromise = function (fileId) { var deferred = $q.defer(); $http({ method: 'GET', headers: {'Content-Type': 'application/octet-stream'}, url: '.../downloadFile?documentId=' + fileId }).success(function (data, status) { deferred.resolve(data); }).error(function (data, status) { deferred.reject(data); }); return deferred.promise; } Data is returned successfully but I don't know how to process with data returned from server to display to HTML Help is appreciated. Many Thanks,
tagged with: image
type: Question
has title: AngularJS Download Image and Show To HTML
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: download
tagged with: angularjs
answer count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/42657466
type: Comment
type: QuestionComment
has text: I think you would need make a copy of the `<path>`. Apply a `transform` that you have calculated yourself that makes it fit the screen. Then use that as your animateMotion path.
comment on: http://stackoverflow.com/q/27071709
score: 0

http://stackoverflow.com/q/27015800
answer count: 0
has comment: http://stackoverflow.com/comment/42558428
tagged with: angularjs-scope
type: Question
tagged with: javascript
score: 0
has title: Angular - Use $index to load product images
tagged with: angularjs-ng-repeat
tagged with: angularjs
has comment: http://stackoverflow.com/comment/42558505
type: UnansweredQuestion
has body: I have the following form in my AngularJS app: &lt;li ng-repeat="device in devices track by $index"&gt; &lt;div class="db-handset-image"&gt; &lt;span class="phone-silhouette"&gt;&lt;/span&gt; {{ relative image here }} &lt;/div&gt; &lt;div class="db-device"&gt; &lt;ul class="opts"&gt; &lt;li&gt; &lt;select name="manufacturer[ $index ]" ng-model="selectedManufacturer" ng-change="getManufacturerModels(selectedManufacturer)"&gt; &lt;option value=""&gt;Manufacturer&lt;/option&gt; &lt;option ng-repeat="manufacturer in manufacturers" value="manufacturer.id"&gt;manufacturer.name&lt;/option&gt; &lt;/select&gt; &lt;/li&gt; &lt;li&gt; &lt;select name="device[ $index ]" ng-model="selectedModel" ng-change="loadModelImage(selectedModel, $index)"&gt; &lt;option value=""&gt;Model&lt;/option&gt; &lt;option ng-repeat="model in manufacturerModels" value="model.id"&gt;[[model.model + '&amp;nbsp;' + model.variants[$index].memory + '&amp;nbsp;' + model.variants[$index].colour]]&lt;/option&gt; &lt;/select&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/li&gt; What happens in this form is that a user will select a manufacturer from the first dropdown and a model from the model dropdown. The model dropdown will populate with the relative models after a manufacturer has been selected using Angular's $filter. When the user has selected a model, loadModelImage is fired and what needs to happen here is that after a model selection, that model image is then loaded into the {{relative image here}} placeholder. This is currently being done like so: $scope.loadModelImage = function (modelId, $index) { $http.get(ajaxurl + '?action=get_handset&amp;hid=' + modelId) .success(function (data) { $scope.selectedHandsets++; $scope.modelImages.splice(0, 0, data.handset.images); }) } This issue with this is that if I replace the relative image here placeholder text with an &lt;img&gt; loading in the model images, each model that's been selected appears in every row. My other issue is that if…

http://stackoverflow.com/a/27027824
score: 1
type: AcceptedAnswer
upvote count: 1
has body: The background image for right door works, because the float causes it to move right as the door's width shrinks. The background image simply goes along for the ride. The background image for the left door does not work, because the door doesn't move left when its width shrinks. An alternative would be to animate the left door's position rather than its width. You can do this by removing float: left and adding absolute positioning for the left door. I don't think you can toggle left for this purpose. But you can animate it in one direction or the other based on its current offset. Snippet: $('.home-button').click(function(){ var d1= $('.door-one'); if(d1.offset().left < 0) { d1.animate({left: '0'}, 1000); } else { d1.animate({left: '-50%'}, 1000); } $('.door-two').animate({width: 'toggle'}, 1000); }); html,body { width: 100%; height: 100%; margin: 0px; } .door-one{ position: absolute; width: 50%; height: 100%; background-image: url("http://www.iconsdb.com/icons/preview/royal-blue/stackoverflow-4-xxl.png"); box-shadow: inset 0 0 10px black; } .door-two{ float: right; width: 50%; height: 100%; background-image: url("http://www.iconsdb.com/icons/preview/royal-blue/stackoverflow-4-xxl.png"); box-shadow: inset 0 0 10px black; } Click me
accepted answer of: http://stackoverflow.com/q/27026709
type: Answer
answers question: http://stackoverflow.com/q/27026709
downvote count: 0

http://stackoverflow.com/q/27075406
has comment: http://stackoverflow.com/comment/42662499
type: Question
has comment: http://stackoverflow.com/comment/42662124
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/42662429
score: 0
has answer: http://stackoverflow.com/a/27077987
accepted answer: http://stackoverflow.com/a/27077987
has comment: http://stackoverflow.com/comment/42662078
has body: I have a textbox with content. I just need like,when I select the text and right click, the appropriate ( reference) list should be displayed as pop up based on the selected text. For example. In the article, there would be "This is referred by (williams, 2012)". If I select Williams and right click , the reference list with the name williams should be listed as popup. javascript code: if (document.addEventListener) { document.addEventListener('contextmenu', function(e) { alert("You've tried to open context menu"); //here you draw your own menu e.preventDefault(); }, false); } else { document.attachEvent('oncontextmenu', function() { alert("You've tried to open context menu"); window.event.returnValue = false; }); } HTML: &lt;body&gt; Lorem ipsum... &lt;/body&gt; This code is from jsfiddle Right now, am just with this code only I don't have any idea how to build it to my requirement.When right click with the selected text how to pop up the appropriate list. Pls help!
has title: How to customize right click option in javascript?
type: AnsweredQuestion

http://stackoverflow.com/q/27058957
has answer: http://stackoverflow.com/a/27059215
accepted answer: http://stackoverflow.com/a/27059215
has answer: http://stackoverflow.com/a/27059276
has comment: http://stackoverflow.com/comment/42632946
possible better answer: http://stackoverflow.com/a/27059049
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27059049
has comment: http://stackoverflow.com/comment/42632970
has answer: http://stackoverflow.com/a/27059218
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42632915
score: 0
has body: I have 2 string like this var a= '12,13,14,15,16'; var b='p,q,q,p,q'; I just need like this 12,15 represents p and 13,14,16 represents q How can I do this in Jquery/javascript.
has title: seprate values from a string
has comment: http://stackoverflow.com/comment/42632851
has comment: http://stackoverflow.com/comment/42632968
has comment: http://stackoverflow.com/comment/42632832

http://stackoverflow.com/comment/42687558
score: 0
comment on: http://stackoverflow.com/q/27090301
type: Comment
type: QuestionComment
has text: what kind of element is txtArea? a div? an input? something else?

http://stackoverflow.com/a/27111486
score: 0
answers question: http://stackoverflow.com/q/27111431
type: Answer
has body: Include the if statement at the top of your clearCache function: function clearCache() { if (request.getSession().getAttribute("stickyCarrier") != null) { //Do stuff here } }
has comment: http://stackoverflow.com/comment/42725807

http://stackoverflow.com/a/27131321
answers question: http://stackoverflow.com/q/27130771
has body: You can check the URL hash using window.location.hash The easiest way for example to integrate this into your code is to add the href to your links Best Food Processors Buying Guide check if the URL has a hash and trigger the click if(window.location.hash){ $('a[href=' + window.location.hash + ']').trigger('click'); } You can also set a data-* attribute or an ID and check for that. Make sure you disable auto-scrolling if you choose to set an ID.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/42761632

http://stackoverflow.com/a/27152914
answers question: http://stackoverflow.com/q/27127588
score: 0
has body: For the reasons in this question in I don't think you can do this with client side code. As the link in my comment above explains, allowing webpages to control a user's machine would be a massive security hole which is why browsers prevent this. I can't gurarantee this will work, but you may have a chance if you change this file into an .asp page. ASP is server side code so it bypasses limitations on what browsers are able to do directly C:\inetpub\wwwroot\jarrS\res\include\createmport.vbs This path implies that you have a local version on IIS on your machine. Try renaming your file with it an .asp extension and surround all the code in the page with &lt;% %&gt; You would then be able to execute script via its local url ie http://localhost/yoursitepath/createimport.asp. As its talking to a .jar file then you'll need to give your local website's IUSR account execute permission on the .jar You could then execute the script with a simple html link or, presumably, with an ajax call - I'm no expert with ajax. The bottom line is that when you call the file it needs to be through a url so that the server executes it.
type: Answer

http://stackoverflow.com/comment/42615293
has text: Do you really want to have quotation marks in the **value**? Do you mean the result should be equal to the value created by the *string literal* `"600mins"`?
score: 0
comment on: http://stackoverflow.com/q/27048733
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42756114
has text: The code `img.src = URL;` and `console.log(img)` should _follow_ the code that assigns a handler to the onload event. I.e, you should set the behaviour for the onload event, _then_ you should set the source of the img element and attempt to load it. The `console.log` call could very well be taking longer than the loading of the image, in which case, the image has already loaded before you assign a handler for the onload event.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/27126763

http://stackoverflow.com/comment/42757091
has text: UPD: so, it works,but it creates "Installation" parse object, not connected to Installation object, that is used for pushes:)So, you need make POST request to https://api.parse.com/1/installations directly
score: 1
comment on: http://stackoverflow.com/q/27127502
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/42776209
has text: So if the value of *submit* is 'Germany' you assign the value 'Germany'?
comment on: http://stackoverflow.com/a/27138386
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/42769411
type: QuestionComment
has text: @George That's what I said
type: Comment
score: 0
comment on: http://stackoverflow.com/q/27135377

http://stackoverflow.com/q/27132589
upvote count: 2
has body: I have an object like this: var foo = { 'bar' : 'baz' } bar can be any word, I need to read baz. Since the object is always like this (one row) I find making an each cycle inefficient. $.each( body.message, function( key, value ) { alert(value); } Is there an smart way of doing this?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42764051
has answer: http://stackoverflow.com/a/27132722
duplicate of: http://stackoverflow.com/q/8312459
has answer: http://stackoverflow.com/a/27132814
score: 2
has title: Getting the the value of a Key without know the name of the key
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/42763930
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/27132630
favorite count: 0
linked to: http://stackoverflow.com/q/8312459
has comment: http://stackoverflow.com/comment/42788567

http://stackoverflow.com/comment/42712478
type: Comment
type: QuestionComment
has text: I don't think that's parallax at all...
score: 0
comment on: http://stackoverflow.com/q/27104303

http://stackoverflow.com/q/27112233
tagged with: jquery
tagged with: angularjs
type: UnansweredQuestion
tagged with: cordova
tagged with: iframe
type: Question
has title: Cordova/AngularJS UI-Router Wrapping External Site Without iFrame
has body: I am pretty sure I know the answer, but throwing this out in hopes that someone has an idea I have not thought of. I am doing a Cordova app for a client that wants one of the pages to have their current mobile site wrapped (below navigation bar). The app is using Angular JS and I was just going to wrap that page with an iFrame... but ran into the X-Frame-Options: Deny issue that they wrapped their entire site under. Ideally they will remove that, but with politics it might not be possible. Is there any way else that I can load this site up without an iframe? I am guessing not because of the security issues this was trying to solve in the first place.
tagged with: javascript
has answer: http://stackoverflow.com/a/28094579
score: 0
answer count: 1

http://stackoverflow.com/comment/42667476
has text: if the 3rd next returns the value of 42, does not x need to be 5? If it is 6 then it does not add up to 42?
comment on: http://stackoverflow.com/q/27054448
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/a/27065626
type: Answer
answers question: http://stackoverflow.com/q/27065496
has body: Why don't you try using the ondblclick event. May be a little easier. Attach with element.addEventListener("dblclick", /* whatever here */ )
score: 0

http://stackoverflow.com/a/27062374
accepted answer of: http://stackoverflow.com/q/27046007
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I benchmarked your two snippets along with two other fat-arrow solutions that I feel are more idiomatic as they use CoffeeScript's class syntax: class AccountWithFatCallback constructor: (@customer, @cart) -&gt; $('.shopping_cart').bind 'click', (event) =&gt; @customer.purchase @cart class AccountWithFatProtoMethod constructor: (@customer, @cart) -&gt; $('.shopping_cart').bind 'click', @onClickCart onClickCart: =&gt; @customer.purchase @cart All of these were compiled using the latest CoffeeScript compiler, v1.8.0, and you can see the benchmark on jsPerf. The performance difference between the four implementations was minimal (~5% or so), so I'd suggest that the determining factor of what to use should be readability and consistency of your codebase, but I'd strongly suggest you try using CoffeeScript classes as they've a lot to offer to that end. The only performance caveat I'd raise is to avoid creating fat-arrow anonymous functions many times if you have the option of creating them once and re-using the same bound function. Using fat-arrow prototype methods achieves this by implicitly binding the method once in the constructor.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/42639907
answers question: http://stackoverflow.com/q/27046007

http://stackoverflow.com/q/27061283
has comment: http://stackoverflow.com/comment/42638964
tagged with: formatting
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/27063009
has title: How to extend this regex to match this mask?
tagged with: regex
has body: I have found the following solution for adding dashes after every 4th character: $('.number_to_format').keyup(function() { var foo = $(this).val().split("-").join(""); if (foo.length &gt; 0) { foo = foo.match(new RegExp('.{1,4}', 'g')).join("-"); } $(this).val(foo); }); But I have a more difficult problem to solve, my input should match exactly this format as I type numbers: 99999999-9-99 So put dash after the 8th and 9th character automatically. I have tried the jQuery masking plugins already, but I want the solution without plugins. How should I extend the regex above to get this working? Thanks
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/42637372
score: 1

http://stackoverflow.com/q/27101658
tagged with: backbone-boilerplate
tagged with: boilerplate
tagged with: backbone.js
has body: I want to use backbone for phonegap. I am new to these framework. I spent quite a lot of time in understanding the structure, still I am not having clear picture.My plan is to use boilerplate for backbone. But I m still confused how to proceed with this. I would like to hear from anyone for step by step procedure of how to use boilerplate for backbone to develop phonegap application. Which boilerplate from the git is recommended? Can I get any link or video for the same? Can anyone suggest whether I should use Twitter Bootstrap or Jquery Mobile for frontend. Totally I have thought about the structure as boilerplate for backbone(require+underscore)+bootstarp (or jquery mobile). Can anyone guide me through the steps to follow. Thanks in advance,
tagged with: twitter-bootstrap
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/42871237
type: Question
tagged with: javascript
has title: Boilerplate for phonegap with backbone js
score: 0
has comment: http://stackoverflow.com/comment/42780902

http://stackoverflow.com/comment/42771593
type: Comment
type: QuestionComment
has text: Have you tried using floats with fluid (percentage) widths that can equally space out columns? Or do you mean you want fixed widths on the boxes that fill up the window width with spaces between them?
comment on: http://stackoverflow.com/q/27136553
score: 0

http://stackoverflow.com/a/27087249
type: Answer
has body: Use instanceof: dat instanceof Date
answers question: http://stackoverflow.com/q/27087236
has comment: http://stackoverflow.com/comment/42698077
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/42707852
type: QuestionComment
has text: This will help: http://stackoverflow.com/questions/18053889/confused-about-douglas-crockfords-object-function
comment on: http://stackoverflow.com/q/27101649
score: 0
type: Comment

http://stackoverflow.com/comment/42789108
type: QuestionComment
comment on: http://stackoverflow.com/q/27146691
score: 0
has text: what is `tblrw`? Also, I didn't understand `$(this).context.status` here...
type: Comment

http://stackoverflow.com/a/27098775
has body: Your code is quite close to what it should be. Change: $("button#btn_add.btn_delete") To: $("#btn_add,a.btn_delete")
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/27098758
type: Answer
upvote count: 1

http://stackoverflow.com/comment/42790689
type: Comment
has text: an where can i see it
comment on: http://stackoverflow.com/q/27147010
score: 0
type: QuestionComment