Js object problem with nodejs express

I have some structure that I want to render to my JADE page, so I decided to make JSON-like object to render some kind of data (variables, text, js objects), this JSON object looks like : var dataSet1 = { meta: { "name": "Some text", &

IPhone: updating views with data from a socket

I have: A delegate to handle a socket connection that reads and writes data to the socket. A MyTableViewController with methods to fill a table in a view with data received from the socket. My question is the following: What would a valid design appr

Is the design of the HBase schema correct?

I would like to ask you if the current schema design on a HBase table is correct for the following scenario: I receive 10 million events per day each having a unix epoch timestamp and an id. I will have to group by day, so that I can easily scan for

Struct Pointers on a Linked List Implementation

I'm working on a linked list implementation in C to get the hang of pointers and structs. Here is the basic code for my LL data structure: struct Node { void *data; struct Node *next; }; struct List { struct Node *head; }; void initList(struct List *

How to calculate an arbitrary power / root?

I have a application which needs to raise a number to a fractional power. The target platform is an FPGA and I can get estimates on an FPU size for it, but I need an algorithm for raising a number to a fractional power just for a feasibility study. I

Google Maps api v2 does not work and closes unexpectedly

Im almost just a beginner in android. I was trying to make a very simple app with google maps, ie just displaying maps. I followed the following link: file:///C:/Android/Android%20Google%20Maps%20V2%20Tutorial.htm But when I test it on my device it s

PHP download a csv file while 2 files are created

So, whenever the user downloads a .csv file from the site, another .csv file gets created to my ../includes folder so it means there is a .csv file download located inside the downloads folder and another .csv file created where my .php files are loc

Ternary Numbers, regex

I'm looking for some regex/automata help. I'm limited to + or the Kleene Star. Parsing through a string representing a ternary number (like binary, just 3), I need to be able to know if the result is 1-less than a multiple of 4. So, for example 120 =

get a point after turning the rectangle

I got a sprite, I know the position, and the rectangle behind. I want to get the location behind the sprite, i know the offset. My point would be like Point p=new Point(sprite.getX()-offset,sprite.getY()-sprite.getHeight()/2); If I rotate my sprite a

Android Image Support

What is the simplest way to fetch an image from a url in an android program?I would strongly recommend using an AsyncTask instead. I originally used URL.openStream, but it has issues. class DownloadThread extends AsyncTask<URL,Integer,List<Bitmap>

Set Lat Lng values ​​in the hidden field before submitting

I'm using Google Maps Api (including autocomplete) for users to write an address into a form field, and then finding the latitude and longitude values of that entered address. Now, I would like to send those values back to the form (hidden fields) to

OOP: naming a class

In my application I have a Market with a bunch of Levels. Each level has Goods and Supply Chain Operations. Now, I'm stuck figuring out how to name a family of classes that populate Levels with these entities. I know that a name is important in a ses

PHP multidimensional array key value

I am working with multidimensional arrays; I use the arsort function to get the array that has been added the latest. This all works fine arsort($this->shoppingBag); $this->productToShow = key($this->shoppingBag); When i want to use this array i

WebSQL in synchronous mode and hellip; it's possible?

I've started using HTML5 and WebSQL, and I quickly ran into a problem: all the DB calls are asynchronous. I come from PHP programming, where all the calls are synchronous, and I'm at a loss with the asynch stuff. Basically, I open the DB and run a qu

C ++ Calculate Amount of time between twice

I have no experience in C++ whatsoever, so i'm a bit confused - i'm taking a high school programming class and we are expected to do this assignment when we barely know any c++ or programming skills in general. I'm supposed to write a program that re

Should I send Keep alive packets when I use a TCP connection?

My question is , I have create a TCP connection , and when it stays without transfering any data about 1 hour, It already disconnected from the server, but it do not notify me , that it's disconnected, Should I send keep alive packets to the server ?

ssl socket wrapper returns an error when connecting

When opening a ssl-wraped socket, I get the error ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:581) The server is running TLSv1.1 My code is import socket, ssl uw = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = ssl.wrap_sock