key

Can i sort the NSDictionary on basis of key in Objective-C?

Hello, Can i sort the NSDictionary on basic of key ? Thank You. ...

How to upgrade Session Keys to OAuth Access Tokens Facebook ?

Dear all, I novice with RestFB Java library. In fact, I don't understand very well how to get an OAuth access tokens ? Before I used Facebook Api Java with API key and Secret key for authentification. Now, I want to use RestFB to replace this library. Can you help me please ? Have you got some Java example for this new mechanism ? Tha...

Inject a keystroke in java

Hi there! I'm looking for a way to inject a keystroke into the OS keyboard input buffer, like when you click a button the program inserts one (or more) keyboard strokes. I wanted to do this in java because I want to run this in (win,linux and osx). I guess that I'll have to make use of the JNI, do anyone have some ideas? Thanks all sta...

how to check and alter constraints

hi can anyone tel me how to check whether a primary key exists or not in a table and add a primary key if not exixts in sql server compact(.sdf).. i'm using this, IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'PRIMARY KEY') BEGIN alter table [tablename] add constraint [name] PRIM...

integrating amazon mp3 in my android application

Hi all, in my android application i want to add the functionality the user to buy song from amazon. The easiest way to do is i think to use amazon mp3 application to communicate with amazon store. I found this piece of code from default music player Intent i = new Intent(); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.setAction(MediaSto...

Android handle all input key an touch event

How handle all input key an touch event incoming to my Android application? Is any one place where I can catch all this events? ...

Is there anyway to use a numeric type as an object key?

It seems that when I use a numeric type as a key name in an object, it always gets converted to a string. Is there anyway to actually get it to store as a numeric? The normal typecasting does not seem to work. Example: var userId = 1; console.log( typeof userId ); // number myObject[userId] = 'a value'; console.dir(myObject); Dir Out...

Enter key focus for a JButton in java swing?

How to make Enter key focus for a JButton in java swing? i have done like this btn_Login.registerKeyboardAction(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println("enter key pressed"); } },KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0,false), txt_Username.WHEN_FOCUSED); but not working ...

remove quotes from keys in a json string using jquery...

Consider this as my json string, {"Table" : [{"userid" : "11","name" : "KumarP","designation" : "Business Head", "phone" : "9789234793","email" : "[email protected]","role" : "Admin", "empId" : "EI003","reportingto" : "KumarP"}]} and i want to have my string like this, {Table:[{ userid: "11", name: "KumarP", designation: "Bus...

Finding unallocated key with emacs.

I came up with a elisp function, and tried to match a key to the file. (defun loadtopics () "Load the topics.org file" (interactive) (load "../topics.org")) (global-set-key (kbd "C-c C-a") 'loadtopics) The problem is it's hard to find an unallocated key combination. Is there any easy way to find key combinations that are not...

Inno Setup - How to keep registry keys after uninstall.

Hello, I am have an installer running for a shareware program that has a time limit. The installer saves an obscure key in the windows registry with the install date, and I do not want this key to be removed when uninstalling, so that the user cannot simply uninstall and reinstall the program in order to circumvent the time limit. I ha...

Enter Key Detect + Null Value Then Form should not be submitted

I have two text field as mandatory and rest of the of the fields are normal. Now i have to detect enter key and submit the form. I have done that but the issue is that when error occurs (for example : fields are null) then i have to stop submitting the form but still form is submitting. <input autocomplete="off" type="text" id="first_n...

[JS] Write to textarea when enter key is pressed?

I have a textarea, which will handle output, and a textfield which will handle user input. Focus will be entirely on the input field. I can't make it so that the user input field will add text when the form is submitted (enter key is pressed). It will only work if there is a button and this is clicked. How do I solve this issue? Below ...

Pressing Alt clears the embedded TWebBrowser

I have TWebBrowser embedded in a TForm. Whenever I press Alt button the browser window becomes white. If I drag the form around it repaints correctly. What I am doing wrong? I have DevExpress Bars and Quantum Grid if that matters? I use Delphi 2010 and Windows 7 and XP SP2. IE version is 7 and 8. Reproducible on all. Before pressing ...

unique database urlkey instead of id

I have a web application where users can login and read their messages. I use to use the ID primary key in database to access and deal with users message through the site such as (viewmessage/3) but I quickly realised I did not want to do that as it gave information to all users as to how many potential messages are stored in database. S...

Accessing a XML node directly via a key

$xml = simplexml_load_file($xmlPath); $items = $xml->list->item; ... echo $items[$currentIndex]->asXML(); When I print out $currentIndex on each iteration, I get 0, 1, 2, 3, 4, etc. When I hard code $items[0]->asXML(); $items[1]->asXML(); $items[2]->asXML(); etc. I get the data I want. But when I loop like I do in the first code segme...

Which sorted STL container to use for fast insert and find with a special key?

Hi, I have some data with a key associated with each data item. The key is made of two parts: let's call them color and id. I want to iterate the container by color to speed up rendering and I also want to find items in the container by id alone. I tried using std::map for this with a key class MyKey { public: int color; int id; ...

What needs to be passed to an editor from a keyboard app to move the cursor one char left?

What key code does an Android editor app expect the keyboard app to send when it is going to be interpreted as a left arrow? In other words, what is the keyboard program supposed to send to its calling program (some kind of editor) if the user intends to move the cursor one char to the left? A related issue: what do the minus values for ...

Is there a Python equivalent to Ruby symbols?

Is there a Python equivalent to Ruby symbols? If so then what is it? If not then are we stuck with using strings as our keys in dictionaries only? ...

How to find tables having foreign key to a table in Oracle ?

Hi, I plan to delete data from a table, i would like to know how many and which tables have a foreign key reference to this particular table in Oracle. As i will have to set the foreign keys to null. I would like to know list of all tables which have a FK to this particular table. ...