Converting JSON to C # object classes

I have a JSON which basically looks like this: { "body": { "mode": "raw", "raw": "{ \"Token\" : \"123123\", \"queryName\" : \"testMethod\" ,\"dataTestToSEND\" :

Passing a large amount of class-to-class Android data

I'm developing an android application where a number of String, String[], int and int[] are used. I have to pass this variable from one activity to another using intent.putExtra(). But it seems to me a little bit disgusting.I love to optimize my code

Play video on website

I am using the following code to play a video inside my webpage. The player is shown with the image i have set,But the video doesnot play. Please anybody helps me:- <video width="420" height="340" poster="church.jpg" contr

Vim Settings for Erlang

Does anyone want to share their erlang vim settings? It seems I can't make it work at all and the worst part is that it doesn't auto-indent automatically. Is there something outhere called vim-erlang, as in vim-python or something?The first two hits

How to test an algorithm for a perfect optimization?

Is there any way to test an algorithm for perfect optimization?For those among us mortals that merely want to know if an algorithm: reasonably works as expected; is faster than others; there is an easy step called 'benchmark'. Pick up the best conten

How to create the correct relationship between classes

I have a feeling this question is going to be something really common sense that I am overcomplicating. I am working on a random maze generation program, so given a width, height, and maximum path length, it will randomly select a start point and gen

React to the update status if the image was not found.

I can't seem to wrap my head around this problem. What I'm trying to do is have React attempt to verify an image is not returning a 404 to display an alternative image instead. Something like the below does not work as React does not wait for the ima

Is it possible to browse objects in JavaScript?

I think JavaScript doesn't have anything like obj.first, but I was wondering if something like this can be achieved in any way: var foobar = { aint: "foo", an: "bar", array: "foobar" }; var recursiveObjDump = function (obj, i

How to install RubyForge gems?

I am trying to install ruby-mp3info as a gem on my computer. Running sudo gem install ruby-mp3info seems to work OK. In my environment.rb file, I added config.gem "ruby-mp3info". When I try to run the server, it fails, claiming I have some missi

Golang - Can not free memory once occupied by bytes.Buffer

I receive bytes of compressed ASCII text in compressedbytes of type []byte. The problem I face is that the following procedure occupies a lot of memory that does not get freed after the function reaches its end and remains occupied during the whole r

Bash script and comparison of 2 directories - Beginner

My problem is that i have to check what files are included in the $directory, then i have to make a new file with name specified by me and compare if the name doesn't already exist in this directory (compare 2 directories). Below is my code: director

Application Review Link

I am trying to link directly from my app to the review page of an app. This works perfectly with some of my App ID's, like this one [375031865]: NSString *reviewURL = @"itms-apps://

Replace a substring in each element of a string?

Hey, I have an array of strings and I want to replace a certain substring in each of those elements. Is there an easy way to do that besides iterating the array explicitly? Thanks :-)You could iterate the array implicitly arrayOfStrings = arrayOfStri

How to capture warnings with console output?

I am trying to capture complete console log of my R script. I want a chronological order of everything, warnings printed as they occur. I tried this: options(warn = 1) tmpSinkfileName <- tempfile() sink(tmpSinkfileName, split = TRUE) cat("Doing so

MySQL Count Comma Delimited

I have 3 tables like this: table_events +------+----------+----------------------+ | ID | Title | Employees | +------+----------+----------------------+ | 1 | Event1 | john,james | +------+----------+----------------------+ | 2 | Event2 | sarah,jessi

Java: Combobox does not indicate the selected image

I'm trying to show a 2 Dimensional ComboBox-Array (10 x 10) and have it represent a board. In each combobox i'm supose to select an image. This works but the only problem is that it doesn't show the selected image. Only for maybe 5 out of 10 combobox

How to measure the time to link / render a view or directive?

I have a view that contains two directives. I want to know how much time it takes to update/bind/display each part (the view, the first directive and the other directive). I'm looking for an end-to-end duration, including the time spent in JS and the

SGE - QSUB fails to submit jobs in synchronization mode

I have a perl script that prepares files for input to a binary program and submits the execution of the binary program to the SGE queueing system version 6.2u2. The jobs are submitted with the -sync yoption to permit the parent perl script the abilit

Does the object have an attribute

Given the class: [ProtoContract] [Serializable] public class TestClass { [ProtoMember(1)] public string SomeValue { get; set; } } And the method: public static void Set(object objectToCache) { } Is it possible to check if objectToCache has the attrib

How to find min / max per day?

I have a list of date and time rows, with multiple rows per day. For each unique date I want to get the min and max time values. How would one go about doing this in Excel v10 (aka 2002)?First, you could do this with Excel functions MIN(range) and MA

Best way to center dynamic division in the middle of the page

I know this sort of thing has been asked a lot but I want to be able to centre a div in the middle of the page and have it always stay in the middle of the page no matter how wide or tall it gets. I'm guessing that it would be best to use some javasc