lookup

Additional hash lookup using 'exists'?

I sometimes access a hash like this: if(exists $ids{$name}){ $id = $ids{$name}; } Is that good practice? I'm a bit concerned that it contains two lookups where really one should be done. Is there a better way to check the existence and assign the value? ...

MySQL enum column from anothertable column

I'm sure this is either totally impossible or really easy: If I'm creating a table and I want one of the columns to have limited options, it seems that I use either the ENUM or SET value type. But I have to define the possible values at that moment. What if I have another table which has two columns, a primary key column and a data colu...

Fastest way to lookup keywords. Any language, any system.

Daily I have 5 million or so unique keywords with an impression count for each one. I want to be able to look these keywords up by certain words so for instance if I have "ipod nano 4GB" I want to be able to pull that out if I search for "ipod", "nano", or "4GB". mySQL can't seem to handle that much data for what I want, I've tried Ber...

How can I see if a Perl hash already has a certain key?

Hey simple question probably. I have a Perl script that is counting the number of occurrences of various strings in a text file. I want to be able to check if a certain string is not yet a key in the hash. Is there a better way of doing this altogether? Here is what I am doing: foreach $line (@lines){ if(($line =~ m|my regex|) ) ...

Lookup column with writeback

Hi there, Has anyone ever made a sharepoint lookup column that allows fill inn choices and does writeback to the list it does lookup from? what would it take to make such a column? If a 3.rd party solution is arround that would be realy great to :) Cheers! ...

What Http code should i return for "Thing not found"?

i'm constructing a web-service that is used, in this particular case, to ask for information about a patron. Let's say, for the sake of argument, that the lookup web hit is: GET /patrons/619 HTTP/1.1 If the patron is found, i return code 200: HTTP/1.1 200 OK If you omit, or give an account number that is not a number, i return 40...

Confused about lookup in a table

I have a table of person and a table of events. I want to find a person in a dropdown, select that person and then display all events for that person. I am confused about what commands to use. I get a lot of syntax errors. Any help will be appreciated Thanks ...

Ajax Security Question: Supplying Available usernames dynamically

I am designing a simple registration form in ASP.net MVC 1.0 I want to allow the username to be validated while the user is typing (as per the related questions linked to below) This is all easy enough. But what are the security implications of such a feature? How do i avoid abuse from people scraping this to determine the list of val...

lookup task (ssis)

I just need the confirmation. Tell me if I am wrong. A package consists of an oledb source editor which consists of a query followed by three lookups. If I do a preview on each task, every task (oledb source, and the first two lookups) except for the last lookup has values in the respective tables. So, my claim is: if there is no data ...

empty lookup table vs non-matching lookup table (lookup transform)

is empty lookup table the same as non-matching lookup table in lookup transform? what would be the result if no row redirection is configured? 1) an empty result set or 2) package failure at the lookup transform ...

how can I lookup a Java enum from its string value?

I would like to lookup an enum from its string value (or possibly any other value). I've tried the following code but it doesn't allow static in initialisers. Is there a simple way? public enum Verbosity { BRIEF, NORMAL, FULL ; private static Map<String, Verbosity> stringMap = new HashMap<String, Verbosity>(); private Verbosity() ...

where can i find a byte to float lookup table?

I initially was looking for a way convert byte to float, and found answers that indicate the fastest was is to create a lookup table. So i was wondering if anyone know of a pre-existing lookup table that i can use. ...

Access objects through JNDI from an external JVM in Atg Dyanmo Application Server

Hi Everyone, I am trying to access some objects using JNDI from an external JVM in Atg Dyanmo Application Server. I am using the following code - import java.util.Hashtable; import javax.naming.Context; import javax.naming.InitialContext; public class URLTest { public static Object getNamedObject() { Object o ...

Excel - Looping through data till it finds the right one

I'm pulling data from one Excel table into another using an IF statement. I want it to check two fields and if it is a match I want it to print something and if it doesn't then I want it to continue searching. If there is no absolute match then leave the field blank. I believe I'm running into an syntax issue but after numerous iteratio...

Sharepoint lookup column custimization

I'm developing a customized document library in the SharePoint 2007 environment. What I'm doing is creating a content type with multiple columns of information related to the document. Users will use this content type to upload new documents rather than the standard new document functionality. One of my columns in this content type is...

most efficient data structure for a read-only list of strings (about 100,000) with fast prefix search

I'm writing an application that needs to read a list of strings from a file, save them in a data structure, and then look up those strings by prefixes. The list of strings is simply a list of words in a given language. For example, if the search function gets "stup" as a parameter, it should return ["stupid", "stupidity", "stupor"...]. I...

BlackBery - List with checkbox along with search criteria

Hi, I am trying to display a list of data with checkboxes, where user can select multiple items at one time... I want a search field on top of the list which will search through the list... How do I do it? ...

MS Excel wildcard lookup

I have a lookup table in Excel with ColA and ColB : ColA ColB ColC va 1 value1 ColC is the actual value table I need to do a wildcard lookup with lookup_value = "value1" I need to perform an operation that if the value of ColC matches the characters in ColA then it should return me ColB value, i.e. 1 I want to use wil...

Static lookups in NHibernate

I want to use some of predefined lookups without roundrips to Database in NHibernate. Basically I would like to have code like this: public class Countries { static Countries() { Australia = new Country { Id = 14, Description = "Australia" } } public static Country Austrlia { get; protected set...

How to put std::dec/hex/oct into a look-up array

Hello. I have this generic string to number conversion : enum STRING_BASE : signed int { BINARY = -1, OCTAL = 0, DECIMAL = 1, HEX = 2, }; template <class Class> static bool fromString(Class& t, const std::string& str, STRING_BASE base = DECIMAL) { if (base == BINARY) { t = (std::bitset<(sizeof(unsigned long)*8)>(str...