I know in javascript Objects double as hashes but i have been unable to find a built in function to get the keys
var h = {a:'b',c:'d'};
I want something like
var k = h.keys() ; // k = ['a','c'];
It is simple to write a function myself to iterate over the items and add the keys to an array that I return, but is there a standard cl...
A few months back I was tasked with implementing a unique and random code for our web application. The code would have to be user friendly and as small as possible, but still be essentially random (so users couldn't easily predict the next code in the sequence).
It ended up generating values that looked something like this:
Af3nT5Xf2
...
Hi,
I have a framework written in Perl that sets a bunch of environment variables to support interprocess (typically it is sub process) communication. We keep a sets of key/value pairs in XML-ish files. We tried to make the key names camel-case somethingLikeThis. This all works well.
Recently we have had occasion to pass control (c...
Here we go again, the old argument still arises...
Would we better have a business key as a primary key, or would we rather have a surrogate id (i.e. an SQL Server identity) with a unique constraint on the business key field?
Please, provide examples or proof to support your theory.
...
Where is the option in Visual Studio to make the Home key go to the start of the line?
Right now you have to do
Home,Home
or
Home, Ctrl+Left Arrow
i'd prefer that home goes to the start of the line. i saw it before, but now i cannot find it.
...
What's the fastest way to count the number of keys/properties of an object? It it possible to do this without iterating over the object? i.e. without doing
var count = 0;
for (k in myobj) if (myobj.hasOwnProperty(k)) count++;
Firefox provides a magic __count__ property, but this isn't available in other implementations.
...
Is it possible to make it appear to a system that a key was pressed, for example I need to make a the 'A' key be pressed thousands of times, and it is much to time consuming to do it manually, I would like to write something to do it for me, and the only thing I know well enough is Python.
A better way to put it, I need to emulate a ke...
I have to check some code and run it. I have the URL:
svn+ssh://[email protected]/home/svn/project/trunk
I have a file with their private key. What do I do to get this code?
...
Is there a better way to do the following:
$array = array('test1', 'test2', 'test3', 'test4', 'test5');
// do a bunch of other stuff, probably a loop
$array[] = 'test6';
end($array);
echo key($array); // gives me 6
This will give the key of the most recently add array element.
Is there a better way to do this?
...
I have a canvas inside a scrollview. I attached a keydown event handler to the scrollview. For most keys, the handler gets called.
However, for the arrow keys, the handler does not get called. Instead, the scrollview gets scrolled in the appropriate direction.
I also attached a keyup handler to the scrollview and the keyup does get ca...
Suppose a database table has a column "Name" which is defined as key for the table.
Usual name values will be "Bill", "Elizabeth", "Bob", "Alice". Lookups on the table will be done by the name key as well.
Does hashing the values optimize the operations in any way? i.e. entering each name as some hashed value of the name (suppose MD5 - ...
I plan on using MySQL and it's built-in encryption functionality to encrypt / decrypt certain columns in certain tables. The concern I have is that I need to store the key somewhere. I could certainly store the key in a file and control the permissions of that file and the permissions of the application that accesses it, but is that en...
Hi,
I am at the point where I need to add keys to my app. What are some of the possible solutions you guys used? I've looked at an earlier post so far, anything else before I decide. My 2 influencial factors are:
Price
Ease of use
Thanks
...
So I am getting ready to wrap up another project in VB and C# (written in Visual Studio 2008). Now I want to have the software only run in full version mode if the user enters a valid registration key (like xxxx-xxxx-xxxx-xxxx). What software are the guru's on this list using to manage the registration key generation and integration with...
Is there an easy way to verify that a given private key matches a given public key? I have a few *.pub, and a few *.key files, and I need to check which go with which.
Again, these are pub/key files, DSA.
I would really prefer a one-liner of some sort...
...
I have a Windows Mobile application using the compact framework (NETCF) that I would like to respond to someone pressing the send key and have the phone dial the number selected in my application. Is there a way using the compact framework to trap the send key? I have looked at several articles on capturing keys, but I have not found ...
How can I grab something like ^MM (CTRL + M + M) in .NET, using C#?
...
I remember there was a third party site that did all the sign up, quotas and key generation for API keys. I can not remember the name, so wondering if anyone knows about it?
...
I have a Div Tag which contains 4 child Div Tags
<Div id="Parent">
<div id="childOne">ChildOne div id="childOne">ChildTwo div id="childOne">ChildThree ...
I'm looking at building an API and was considering oauth for managing access to the api, but what I'm doing is more of a b2b system allowing businesses to access data to incorporate into their sites. I won't have any b2c at the beginning.
So oauth doesn't seem like the right tool for me, I've been looking for sources regarding building...