Remove duplicates from an array of objects in JavaScript

Remove duplicates from an array of objects in JavaScript

I have an object that contains an array of objects.things = new Object();things.thing = new Array();things.thing.push({place:"here",name:"stuff"});things.thing.push({place:"there",name:"morestuff"});things.thing.push({place:"there",name:"mo

Converting JSON data to Java object

Converting JSON data to Java object

I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string can look like:{ 'title': 'Computinga

How to enable PHP short tags?

How to enable PHP short tags?

I have a web application on a Linux server which starts with <?I needed to copy this application to a windows environment and everything is working fine except that an SQL statement is being rendered differently. I don't know if this has to

JSON Parse File Path

JSON Parse File Path

I'm stuck trying to get the correct path to the local file. I have the following directories:Resources -> data -> file.json js -> folder -> script.js html -> folder -> file1.htmlI'm executing script.js fr

PyDev for Eclipse - Resolve Python dependencies (unresolved imports)

PyDev for Eclipse - Resolve Python dependencies (unresolved imports)

I am using PyDev for Eclipse as my IDE and pip as my package management tool, running virtualenv. Every time I want to use/include some new libraries or new dependencies in my project, I add them into the pip-requires file. The dependencies

ASP.NET vNext - compile code dynamically not working for me

ASP.NET vNext - compile code dynamically not working for me

I've run through the tutorial on this here:http://www.asp.net/vnext/overview/aspnet-vnext/getting-started-with-aspnet-vnext-and-visual-studioI am following step 7 in section 2 - "With the browser still open, open Class1.cs and change the me

How to replace a JSON value in Play

How to replace a JSON value in Play

How do I replace a value in a JSON value in Play?Code to illustrate:def newReport() = Action(parse.json) { request => var json = request.body if((json \ "customerId").as[Int] == -1){ // replace customerId after some logic to find

Escaping JavaScript string literals in views

Escaping JavaScript string literals in views

Is there a utility function for escaping JavaScript in ASP.NET MVC views? I often need to init a little snippet of JavaScript using some values from the view; for instance I may have something like:I would expect something like:I could, of

Android get JSON key value

Android get JSON key value

I have question about parsing a specific json string. I didn't find anything which helps me in my situation. I have this json :{"AM": { "country_name": "Armenia", "data": { "180854": { "time_published": "2012-03-30

pass list item from c# to javascript array

pass list item from c# to javascript array

I have following code to show multiple marker on gmap I want to make this dynamic so i have to pass this var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach', -33.923036, 151.259052, 5],

JQuery UI Autocomplete with Zend Framework

JQuery UI Autocomplete with Zend Framework

I was wondering about how to add the autocomplete JQuery UI widget to a form I'm developing in the Zend Framework without using ZendX. The folders for the website are set up per the framework, but I'm not using Zend_Form.So I stripped every

Javascript Convert PHP Json into a javascript array

Javascript Convert PHP Json into a javascript array

So hi guys,lets make this very clear. In php i used json_encode(...) and then got the value in javascript, looks as the following:["float","float","float","float"] // PS: This is a string...And i would like to make this into a normal javas

In Ruby, how to output json from hash and give it line breaks and tabs

In Ruby, how to output json from hash and give it line breaks and tabs

I'm trying to format {"key" => "value"} to turn it into :{ "key" : "value"}for writing into a json file.right now im doing :hash = {"key" => "value"}puts hash.to_json.gsub('{', '{\n\t')to start. and this outputs {\n\t"key":"valu

How do I use multiple sources with the jQuery plugin fullCalendar?

How do I use multiple sources with the jQuery plugin fullCalendar?

I've got a functional fullCalendar http://arshaw.com/fullcalendar/ working retrieving a single source from Google Calendar for the events like so:$('#calendar').fullCalendar({ events: $.fullCalendar.gcalFeed( "http://www.google.com/c

Export data from DynamoDB

Export data from DynamoDB

Is it possible to export data from DynamoDB table in some format?The concrete use case is that I want to export data from my production dynamodb database and import that data into my local dynamodb instance so my application can work with l

How do I download binary files of a GitHub release?

How do I download binary files of a GitHub release?

I have a repo with binary files in it that I need. I cangit checkout tags/thetagofthereleasewhich seems to checkout the correct tag, but does not pull down the binary files. How can I pull down the binary files that were added to the releas

POST request with AFNetworking 2.0 - AFHTTPSessionManager

POST request with AFNetworking 2.0 - AFHTTPSessionManager

Hej,I am struggling with doing a POST request to the parse REST API. I am using AFNetworking 2.0. My code for the AFHTTPSessionManager Subclass looks as follows:+ (ParseAPISession *)sharedSession { static ParseAPISession *sharedSession

How to use an array value from php to javascript?

How to use an array value from php to javascript?

it was always a question for me that how can i use an array value in javascript while that array is defined in my php scripts For example consider reading some values from a file and use it in javascript.what's ur plan to do so ? 1:Yo

Using jQuery To Call A Controller Action

Using jQuery To Call A Controller Action

I have a nice page that does everything I need. However one of the elements (a partial page) takes a few seconds longer then I'd like to load. So what I'd like to do is to show the page without this partial first but show a "loading" gif

Generate page numbers using javascript/jquery?

Generate page numbers using javascript/jquery?

How to generate page numbers like the below using javascript/jquery?If the 5 th page is selected i have to show 3,4 and 6,7 and also 1,last page with prev,next...Any suggestion....EDIT:How to work with json data that use these pagination di

How to convert records including 'include' associations to JSON

How to convert records including 'include' associations to JSON

If I do something like:result = Appointment.find( :all, :include => :staff )logger.debug { result.inspect }then it only prints out the Appointment data, and not the associated staff data.If I do result[0].staff.inpsect then I get the staff

Why jQuery consider an 200 response Ajax request with empty content as fail()?

Why jQuery consider an 200 response Ajax request with empty content as fail()?

First, there's no cross-region problem at all.I found if the server response an empty content body, jQuery consider this as fail()?Why is this? 1:If you're using jQuery >= 1.9 an empty JSON response will be rejected, according to the API

How To Do Polling with Angular 2 Observables

How To Do Polling with Angular 2 Observables

Given the following code, how to I alter it to make the get request to "api/foobar" repeat every 500 milliseconds?import {Observable} from "RxJS/Rx";import {Injectable} from "@angular/core";import {Http} from "@angular/http";@Injectable() e

Are there any Objective-C web frameworks?

Are there any Objective-C web frameworks?

Are there any Objective-C web frameworks? The only frameworks I've found is frothkit.I'm primary looking for a way to write RESTful json web services in Objective-C. 1:GNUStepWeb is a web framework based on the Objective-C version of NeX

Rails Ajax Can't verify CSRF token Authenticity

Rails Ajax Can't verify CSRF token Authenticity

In my rails app I'm getting "WARNING: Can't verify CSRF token authenticity" on an ajax post to an api. app/views/layouts/application.html.haml :!!!%html %head = stylesheet_link_tag "application", :media => "all" = javascript_include_