RSS

Posts in 2021

  • Most votes on json questions 2

    May 01, 2021 in FAQ

    Most votes on json questions 2. #11 Why can't Python parse this JSON data? #12 Safely turning a JSON string into an object #13 How to prettyprint a JSON file? #14 Convert JS object to JSON string #15 How do I write JSON data to a file? #16 What is the "right" JSON date format? #17 JavaScriptSerializer - JSON serialization of enum as string #18 How do I get ASP.NET Web API to return JSON instead of XML using Chrome? #19 Serializing to JSON in jQuery #20 How to parse JSON in Java

    Read all the top votes questions and answers in a single page. #11: Why can't Python parse this JSON data? (Score: 1482) Created: 2010-05-14 Last updated: 2019-03-19 Tags: python, json, parsing I have this JSON in a file: { "maps": [ { …

    Read more

  • Most votes on json questions 10

    May 01, 2021 in FAQ

    Most votes on json questions 10. #91 Is it not possible to stringify an Error using JSON.stringify? #92 How to get POSTed JSON in Flask? #93 Explanation of JSONB introduced by PostgreSQL #94 What are the differences between json and simplejson Python modules? #95 Converting dictionary to JSON #96 Parsing a JSON string in Ruby #97 How can I beautify JSON programmatically? #98 Jackson Vs. Gson #99 Loading local JSON file #100 Reverse of JSON.stringify?

    Read all the top votes questions and answers in a single page. #91: Is it not possible to stringify an Error using JSON.stringify? (Score: 397) Created: 2013-08-22 Last updated: 2017-05-23 Tags: javascript, json, node.js, error-handling Reproducing …

    Read more

  • Most votes on json questions 1

    May 01, 2021 in FAQ

    Most votes on json questions 1. #1 What is the correct JSON content type? #2 Can comments be used in JSON? #3 Why does Google prepend while(1); to their JSON responses? #4 How can I pretty-print JSON in a shell script? #5 How do I POST JSON data with cURL? #6 pretty-print JSON using JavaScript #7 What is JSONP, and why was it created? #8 How do I format a Microsoft JSON date? #9 Parse JSON in JavaScript? #10 Convert form data to JavaScript object with jQuery

    Read all the top votes questions and answers in a single page. #1: What is the correct JSON content type? (Score: 10679) Created: 2009-01-25 Last updated: 2019-05-02 Tags: json, http-headers, content-type I’ve been messing around with JSON for …

    Read more

  • Most votes on javascript questions 9

    May 01, 2021 in FAQ

    Most votes on javascript questions 9. #81 How do I empty an array in JavaScript? #82 How to decide when to use Node.js? #83 JavaScript chop/slice/trim off last character in string #84 Iterate through object properties #85 Get the size of the screen, current web page and browser window #86 $(document).ready equivalent without jQuery #87 Generating random whole numbers in JavaScript in a specific range? #88 Generate random string/characters in JavaScript #89 JavaScript equivalent to printf/String.Format #90 How does JavaScript .prototype work?

    Read all the top votes questions and answers in a single page. #81: How do I empty an array in JavaScript? (Score: 2197) Created: 2009-08-05 Last updated: 2015-11-11 Tags: javascript, arrays Is there a way to empty an array and if so possibly with …

    Read more

  • Most votes on javascript questions 8

    May 01, 2021 in FAQ

    Most votes on javascript questions 8. #71 Validate decimal numbers in JavaScript - IsNumeric() #72 Disable/enable an input with jQuery? #73 Get selected text from a drop-down list (select box) using jQuery #74 .prop() vs .attr() #75 Open a URL in a new tab (and not a new window) #76 How can I determine if a variable is 'undefined' or 'null'? #77 How to get the children of the $(this) selector? #78 What is JSONP, and why was it created? #79 What is the preferred syntax for defining enums in JavaScript? #80 Compare two dates with JavaScript

    Read all the top votes questions and answers in a single page. #71: Validate decimal numbers in JavaScript - IsNumeric() (Score: 2455) Created: 2008-08-20 Last updated: 2016-12-07 Tags: javascript, validation, numbers What’s the cleanest, most …

    Read more

  • Most votes on javascript questions 7

    May 01, 2021 in FAQ

    Most votes on javascript questions 7. #61 How do I pass command line arguments to a Node.js program? #62 Encode URL in JavaScript? #63 Length of a JavaScript object #64 How can I refresh a page with jQuery? #65 How do I get the current date in JavaScript? #66 Can (a== 1 && a ==2 && a==3) ever evaluate to true? #67 Is there a standard function to check for null, undefined, or blank variables in JavaScript? #68 Add table row in jQuery #69 Set a default parameter value for a JavaScript function #70 jQuery scroll to element

    Read all the top votes questions and answers in a single page. #61: How do I pass command line arguments to a Node.js program? (Score: 2600) Created: 2010-12-04 Last updated: 2018-06-14 Tags: javascript, node.js, arguments, command-line-arguments I …

    Read more

  • Most votes on javascript questions 6

    May 01, 2021 in FAQ

    Most votes on javascript questions 6. #51 How can I merge properties of two JavaScript objects dynamically? #52 Why does my JavaScript code receive a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error, while Postman does not? #53 pretty-print JSON using JavaScript #54 What is the JavaScript version of sleep()? #55 Storing Objects in HTML5 localStorage #56 How can I get query string values in JavaScript? #57 How can I check for "undefined" in JavaScript? #58 How do I detect a click outside an element? #59 How to format a JavaScript date #60 How do I modify the URL without reloading the page?

    Read all the top votes questions and answers in a single page. #51: How can I merge properties of two JavaScript objects dynamically? (Score: 2763) Created: 2008-10-05 Last updated: 2017-09-07 Tags: javascript, javascript-objects I need to be able to …

    Read more

  • Most votes on javascript questions 5

    May 01, 2021 in FAQ

    Most votes on javascript questions 5. #41 How can I upload files asynchronously? #42 Detecting an undefined object property #43 JavaScript closure inside loops – simple practical example #44 How can I change an element's class with JavaScript? #45 Is it possible to apply CSS to half of a character? #46 Creating multiline strings in JavaScript #47 Is there an "exists" function for jQuery? #48 How to append something to an array? #49 How can I convert a string to boolean in JavaScript? #50 How can I know which radio button is selected via jQuery?

    Read all the top votes questions and answers in a single page. #41: How can I upload files asynchronously? (Score: 3018) Created: 2008-10-03 Last updated: 2019-12-27 Tags: javascript, jquery, ajax, asynchronous, xmlhttprequest I would like to upload …

    Read more

  • Most votes on javascript questions 4

    May 01, 2021 in FAQ

    Most votes on javascript questions 4. #31 Checking if a key exists in a JavaScript object? #32 How do I correctly clone a JavaScript object? #33 Get the current URL with JavaScript? #34 What is the difference between call and apply? #35 How can I check for an empty/undefined/null string in JavaScript? #36 Sort array of objects by string property value #37 How to round to at most 2 decimal places, if necessary? #38 How do I loop through or enumerate a JavaScript object? #39 event.preventDefault() vs. return false #40 How to check if an object is an array?

    Read all the top votes questions and answers in a single page. #31: Checking if a key exists in a JavaScript object? (Score: 3341) Created: 2009-07-08 Last updated: 2020-01-30 Tags: javascript, arrays, object How do I check if a particular key exists …

    Read more

  • Most votes on javascript questions 3

    May 01, 2021 in FAQ

    Most votes on javascript questions 3. #21 Setting "checked" for a checkbox with jQuery #22 How do you get a timestamp in JavaScript? #23 Why does Google prepend while(1); to their JSON responses? #24 Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"? #25 How do I make the first letter of a string uppercase in JavaScript? #26 How do I copy to the clipboard in JavaScript? #27 How do I test for an empty JavaScript object? #28 What is the !! (not not) operator in JavaScript? #29 Loop through an array in JavaScript #30 How to insert an item into an array at a specific index (JavaScript)?

    Read all the top votes questions and answers in a single page. #21: Setting "checked" for a checkbox with jQuery (Score: 4299) Created: 2009-01-08 Last updated: 2020-03-08 Tags: javascript, jquery, checkbox, selected, checked I’d like …

    Read more