What RESTful HTTP request for executing actions on the server?

What RESTful HTTP request for executing actions on the server?

I have a RESTFul server API which I've built. Some parts of it is not controlling resources and I'm having trouble mapping the relevant URL + HTTP-method to the actions that are executed on the server.e.g. I can backup every resource on the

Optimized dot product in Python

Optimized dot product in Python

The dot product of two n-dimensional vectors u=[u1,u2,...un] and v=[v1,v2,...,vn] is is given by u1*v1 + u2*v2 + ... + un*vn.A question posted yesterday encouraged me to find the fastest way to compute dot products in Python using only the

jqGrid - Inline edit - Detect dirty / changed cells

jqGrid - Inline edit - Detect dirty / changed cells

is there an example of using jqgrid's getChangedCellsmethod to determine if data has changed?I grepped getChangedCells in the downloadable demos forjqgrid, and could only find the function definition, not example usages of getChangedCells.W

Domain Entities, DTO, and View Models

Domain Entities, DTO, and View Models

I have an ASP.NET MVC 2 application with a POCO domain model and an NHibernate repository layer. My domain model has no awareness of my viewmodels so I use automapper to go from viewmodel to entity and vice/versa.When I introduced WCF to m

How can Excel 2007 / 2010 consume a REST web service?

How can Excel 2007 / 2010 consume a REST web service?

What options exist to consume a REST web service from within Excel 2007 / 2010? I can use XML Maps to consume a basic XML list, but that doesn't let me build a dynamic URL (so I could include parameters).For example, I can add an XML Map t

Java+DOM: How do I set the base namespace of an (already created) Document?

Java+DOM: How do I set the base namespace of an (already created) Document?

I am dealing with an already created Document object.I have to be able to set it's base namespace (attribute name "xmlns") to certain value.My input is DOM and is something like:...some content...What I need is DOM which is something like:.

How to turn a Ruby method into a block?

How to turn a Ruby method into a block?

Is there a way to simplify the following code?filenames is a list of filenames (strings), e.g. ["foo.txt", "bar.c", "baz.yaml"]filenames.map { |f| File.size(f) }Is there any way to turn "File.size" into a proc or block? For methods on exis

Xcode equivalent of ' __asm int 3 / DebugBreak() / Halt?

Xcode equivalent of ' __asm int 3 / DebugBreak() / Halt?

What's the instruction to cause a hard-break in Xcode? For example under Visual Studio I could do '_asm int 3' or 'DebugBreak()'. Under some GCC implementations it's asm("break 0") or asm("trap").I've tried various combos under Xcode withou

Binding JSON child object property into Java object field in Jackson

Binding JSON child object property into Java object field in Jackson

I have a JSON object, say:{ "foo": { "bar": 1 }, "baz": 2}and I want to bind it into a Java object, like:@JsonIgnoreProperties(ignoreUnknown = true)public class Foo { private int bar; @JsonProperty("baz") private int baz;}How can I

HTTP get with headers using RestTemplate

HTTP get with headers using RestTemplate

How can I send a GET request using the Spring RestTemplate?Other questions have used POST, but I need to use GET.When I run this, the program continues to work, but it seems that the network is clogged because this is in an AsyncTask, and w

Rails 3 routing - passing params from routes.rb

Rails 3 routing - passing params from routes.rb

In rails 2.3.5 you could do something like this inside the routes.rb file:map.root :controller => "pages", :action => "show", :id => 3In rails 3 I haven't found any way to pass a specific parameter (like in rails 2.3.5 with :id => 3). I kno

How can I convert Scala Map to Java Map with scala.Float to java.Float k/v conversion

How can I convert Scala Map to Java Map with scala.Float to java.Float k/v conversion

I would like to be able to perform the following, but it fails in the call to useMap. How can I perform this conversion?scala> import scala.collection.JavaConversions._import scala.collection.JavaConversions._scala> import scala.collection.

How can I add programmatically add a PushPin, and could I make it have a custom image?

How can I add programmatically add a PushPin, and could I make it have a custom image?

I'm trying to create a map application but the examples I find describes a myMap.Children list that my myMap object does not have :-(I've created a map, pretty much straight forward:So how can I in C# add PushPins, and could these have a im

IE8 Compatibility View Button is enabled even when IE=EmulateIE7

IE8 Compatibility View Button is enabled even when IE=EmulateIE7

For our web application, we are sending the X-UA-Compatible -> IE=EmulateIE7 for all the pages. However, the Compatibility View Button next to the Refresh button, is still displayed. 1) Is this expected behaviour? 2) Shouldn't the HTTP head

Running advanced MongoDB queries in R with rmongodb

Running advanced MongoDB queries in R with rmongodb

As MySQL is driving me nuts I'm trying to make myself acquainted with my first "NoSQL" DBMS and it happened to be MongoDB. I'm connecting to it via rmongodb.The more I play around with rmongodb, the more questions/problems come up with resp

styling icons markers - fusion tables

styling icons markers - fusion tables

This is offered as assistance to other newbies like myself.I struggled quite a while to figure out how to assign different icons to different categories of markers in my fusion table project. I found the documentation limited and confusing,

Can you explain why DirectoryInfo.GetFiles produces this IOException?

Can you explain why DirectoryInfo.GetFiles produces this IOException?

I have a WinForms client-server app running on a Novell network that produces the following error when connecting to the lone Windows 2003 Server on the network:TYPE: System.IO.IOExceptionMSG: Logon failure: unknown user name or bad passwor

How to find if a method is implementing specific interface

How to find if a method is implementing specific interface

I have a MehtodBase of a method and I need to know if that method is an implementation of a specific interface.So if I have the following class:class MyClass : IMyInterface{ public void SomeMethod();}Implementing the interface:interface

C - Design your own free( ) function

C - Design your own free( ) function

Today, I appeared for an interview and the interviewer asked me this, Tell me the steps how will you design your own free( ) function for deallocate the allocated memory. How can it be more efficient than C's default free() fu

XNA - Keyboard text input

XNA - Keyboard text input

Okay, so basically I want to be able to retrieve keyboard text. Like entering text into a text field or something. I'm only writing my game for windows.I've disregarded using Guide.BeginShowKeyboardInput because it breaks the feel of a self

D3: Merge interior svg paths?

D3: Merge interior svg paths?

I have an svg element composed of many different path objects, each of which represents one U.S state.http://jsfiddle.net/jGjZ2/I would like to merge the east territory (gold) into a single path object with no visible divisions.The end resu

Getting useful GCov results for header-only libraries

Getting useful GCov results for header-only libraries

For my header-only C++ library (lots of templates etc) I use GCov to check test coverage. However, it reports 100% coverage for all headers because the unused functions aren't generated by the compiler in the first place. Manually spotting

Mapping collections using AutoMapper

Mapping collections using AutoMapper

I'm trying to map an array into an ICollection of type .Basically I want to be able to do:Mapper.CreateMap();Where Y is CollectionAny ideas? 1:You don't need to setup your mapping for collections, just the element types.So just:Mapper.Cr

How to sort a Map[string]int by its values?

How to sort a Map[string]int by its values?

Given this code blockmap[string]int {"hello":10, "foo":20, "bar":20}I would like to print outfoo, 20bar, 20hello, 10In the order of highest to lowestThanks! 1:Found the answer on Golang-nuts by Andrew GerrandYou can implement the sort in

How to generate a list of random numbers?

How to generate a list of random numbers?

This might be the least important Scala question ever, but it's bothering me. How would I generate a list of n random number. What I have so far:def n_rands(n : Int) = { val r = new scala.util.Random 1 to n map { _ => r.nextInt(100) } }Wh