CORS synchronous requests not working in firefox

CORS synchronous requests not working in firefox

The official documentation of jQuery ( async ajax section ) says that: Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation.However this works in all recent browsers but firefox version >= 20. Here is

Elasticsearch phrase prefix query on multiple fields

Elasticsearch phrase prefix query on multiple fields

I'm new to ES and I'm trying to build a query that would use phrase_prefix for multiple fields so I dont have to search more than once.Here's what I've got so far:{ "query" : { "text" : { "first_name" : {

Type 'Headers' has no properties in common with type 'RequestOptionsArgs'?

Type 'Headers' has no properties in common with type 'RequestOptionsArgs'?

I just made two important upgrades to our Angular 4 application and build tools:@angular/core ^4.1.3 => ^4.2.4 (and /http, /forms, etc)tslint ^5.3.2 => ^5.4.3I have a Service which declares options like so:@Injectable()export class WorkOrde

REST and complex search queries

REST and complex search queries

I'm looking for a robust way to model search queries in a REST api.In my api, you can specify the search criteria in the URI of a resource using query parameters.For example: /cars?search=color,blue;AND;doors,4 Returns a list of blue cars

In app billing security

In app billing security

I've finished developing my app that uses in app billing v3. My app is an exam help app which has a list of questions which are inserted into a database. The thing that worries me is security as beyond proguard there is pretty much little e

How do I install the GSON module in Java

How do I install the GSON module in Java

I downloaded the Google JSON module a.k.a GSON. I'm ona windows system Could you tell me how to install the GSON module? I extracted the JAR into the following folder which was in my classpath:C:\Program Files\Java\jdk1.6.0_07\lib..but when

Haskell: Inserting every line from a file into a list

Haskell: Inserting every line from a file into a list

I'm currently working on project with Haskell, and have found myself some trouble. I'm supposed to read and insert into a list each line in a "dictionary.txt" file, but I can't seem to do so. I've got this code:main = do let list = []

Retrieve List of Tables from Specific Database on Server C#

Retrieve List of Tables from Specific Database on Server C#

Looking for some C# examples that can retrieve the tables' names from a specific database on a server. I already have a valid connection string, just looking for the right way of adding the names of each table into List for later retrieval

How to remove dot “.” after number in ordered list items in OL LI? [duplicate]

How to remove dot “.” after number in ordered list items in OL LI? [duplicate]

Possible Duplicate: HTML + CSS: Ordered List without the Period? Want to remove dot "." from OL (order list)OneTwo Result 1. One 2. TwoRequired Result 1 One 2 Two 1:This will work in IE8+ and other browsersol { counter-reset: i

Plotting xyplot with regression line on lattice graphics

Plotting xyplot with regression line on lattice graphics

I have loaded the lattice package. Then I run:> xyplot(yyy ~ xxx | zzz, panel = function(x,y) { panel.lmline(x,y)}This produces panels of plot, showing the regression line, without the xyplots. I am doing the panel.lmline without fully unde

Is there a way to check if a column is a Date in R?

Is there a way to check if a column is a Date in R?

This is a pseudo followup to this question: Why is ggplot graphing null percentage data points?Let's say this is my dataset:Date AE AA AEF Percent1/1/2012 1211 1000 3556 0.031/2/2012 100 2000 3221

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_

Gson. Deserialize integers as integers and not as doubles

Gson. Deserialize integers as integers and not as doubles

I have json object with arbitary values inside. And I want to deserialize it in a Map. Everything is ok except converting integers to a doubles. See example:{"id":1, "inner_obj":{"key":"value","num":666,"map":{"key":"value"}}}deserializes

Align controls to center in a FlowLayout

Align controls to center in a FlowLayout

I have a flowlayout as follows:I need to center all the controls on the form (In other words, let's say the form's width is 200. btnOpt1 to btnOpt4 should have their Left starting at 100 minus half of the button width, not 0.) 1:You can

Returning the timestamp field in elasticsearch

Returning the timestamp field in elasticsearch

Why can I not see the _timestamp field while being able to filter a query by it?The following query return the correct documents, but not the timestamp itself. How can I return the timestamp?{ "fields": [ "_timestamp", "_source" ],

Prevent XmlSerializer from emitting xsi:type on inherited types

Prevent XmlSerializer from emitting xsi:type on inherited types

I have managed to serialize a class that inherits from a base class to XML. However, the .NET XmlSerializer produces an XML element that looks as follows:This, however, causes the receiving end of a web service to choke and produce an error

How Do I Pull Maven Test Jars Using Gradle?

How Do I Pull Maven Test Jars Using Gradle?

In maven I can specify a "type" for dependency resolution. I am trying to pull down a tests.jar. How can I do this using Gradle?I have tried using the Gradle Dependency below, but this does not pull down test.jar. testCompile(group: 'org.a

python: in pdb is it possible to enable a breakpoint only after n hit counts?

python: in pdb is it possible to enable a breakpoint only after n hit counts?

In eclipse (and several other IDE's as well) there is an option to turn on the breakpoint only after a certain number of hits. In Python's pdb there is a hit count for breakpoints and there is the condition command. How do I connect them?

How to use bind1st and bind2nd?

How to use bind1st and bind2nd?

I would like to learn how to use binding functions.Here is the idea:I have this function which takes to parameters:void print_i(int t, std::string separator){ std::cout And I would like to do:std::vector elements;// ...for_each(eleme

Swift: how can String.join() work custom types?

Swift: how can String.join() work custom types?

for example:var a = [1, 2, 3] // Intsvar s = ",".join(a) // EXC_BAD_ACCESSIs it possible to make the join function return "1,2,3" ?Extend Int (or other custom types) to conform to some protocols ? 1:try thisvar a = [1, 2, 3] // In

radio Buttons and .attr('checked','checked')  does NOT work in IE7

radio Buttons and .attr('checked','checked') does NOT work in IE7

Is there any way to get radio buttons checked upon appending in IE7?What seems to work in every browser, doesn't look like it works in IE6,7 despite reading everywhere that I'm doing it correctly. I have absolutely no idea why it's not work

How to get the size of the content of a variable in PHP

How to get the size of the content of a variable in PHP

If I have the following variable in PHP:$Message='Hello, this is just test message';How can I get the size of its content in bytes? For instance, to print something like:Message size is 20KB 1:$start_memory = memory_get_usage();$foo = "S

SQL Server search for a column by name

SQL Server search for a column by name

I'm doing some recon work and having to dig through a few hundred SQL Server database tables to find columns. Is there a way to easily search for columns in the database and return just the table name that the column belongs to?I found this

What does Java Node normalize method do?

What does Java Node normalize method do?

I'm doing some tests, but I see no difference when I use or not the normalize() method.But the examples at ExampleDepot website use it.So, what is it for? (The documentation wasn't clear for me either) 1:You can programmatically build a

Why does Mongoose add blank arrays?

Why does Mongoose add blank arrays?

I am trying to start using Mongoose as an ODM for MongoDB with my node.js application. I have noticed that when I design a schema with an embedded document that if I don't add a value to it, it store a blank array "[]" in Mongo. Why is this