IP to Country?
Does anyone know of a simple way to retrieve the country for a given IP Address? Preferably in ISO_3166-1 format?...
Does anyone know of a simple way to retrieve the country for a given IP Address? Preferably in ISO_3166-1 format?...
How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl? ...
I have a 2 variable 100x100 data table in excel. I need to have a function that returns all the possible sets of variables that yield a given target value. What I am looking at is some kind of a reursive 2 dimensional lookup function. Can someone point me in the right direction? ...
Hi, I have a dropdown list that stores name/value pairs. The dropdown appears in each row of a gridview. The values in the dropdown correspond to a third attribute (data type) not persisted in the dropdown list. I'd like to create a client-side "lookup" table so that when a user chooses a dropdown value, the proper data type populates ...
Hello: I have an application in which I have to store a couple of millions of integers, I have to store them in a Look up table, obviously I cannot store such amount of data in memory and in my requirements I am very limited I have to store the data in an embebedded system so I am very limited in the space, so I would like to ask you ab...
I have a program that needs to do a *compile time checkable** map from one known set of values to another known set of values: in out ------------ 8 37 10 61 12 92 13 1/4 109 15 1/4 151 etc This would be easy if the inputs were either integers or evenly spaced. I'm going to be iterating over the rows but also w...
Hi, I have a fairly expensive array calculation (SpectralResponse) which I like to keep to a minimum. I figured the best way is to store them and bring it back up when same array is needed again in the future. The decision is made using BasicParameters. So right now, I use a LinkedList of object for the arrays of SpectralResponse, and ...
When given a static set of objects (static in the sense that once loaded it seldom if ever changes) into which repeated concurrent lookups are needed with optimal performance, which is better, a HashMap or an array with a binary search using some custom comparator? Is the answer a function of object or struct type? Hash and/or Equal fu...
In this question, I asked about breaking a dataset into subsets, and got a good response. Now I have the opposite problem. I've got two different datasets, representing objects of two different subclasses of a common ancestor, and I need to have the same TDBLookupComboBox search both of them at the same time, using two properties, ID #...
I find this comes up a lot, and I'm not sure the best way to approach it. The question I have is how to make the decision between using foreign keys to lookup tables, or just taking the lookup table value and inserting it into the table requesting the data when you have tables that are mostly based on existing data. Points to keep in ...
I have a Question model & Form, one of the fields in this model is userid=ForeignKey(User), this Works perfectly well on the Question Model, am able to pick the user from a drop down. But kind a tricky when i want to list the question from the model, which is the best way to lookup the user name from the Users table? becouse at this po...
I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code: class A { public: void foo(string s){}; }; class B : public A { public: int foo(...
If we have to store the available positions at a company (i.e. Manager, Team Lead, ... etc). What are the best practices for storing it? I have two opinions with comments... "sure, welcoming yours" Storing it as DB table with columns ID and Name, and deal with it using queries and joins. Storing it as Enum and forget about the...
Hello, I need a hash function for a Look Up table, so that if my values are from 0 to N, I need a hash function that give me a value from 0 to n, being n << N. Another piece of information is that I already know N in advance. I have been investigatinv about different low cost hash functions and I have found only this: h = z mod n ran...
How do you create a lookup column to a Document Library that uses the 'Name' of the document as the lookup value? I found a blog post that recommends adding another custom field like "FileName" and then using a item reciever to populate the custom field with the value from the Name field but that seems cheesy. Link to the blog in case p...
Where can I find a list of the US States in a form for importing into my database? SQL would be ideal, otherwise CSV or some other flat file format is fine. Edit: Complete with the two letter state codes ...
I have an in-memory "table" that might looks something like this: Favorite# Name Profession --------- ---------- ------------------ 3 Names.Adam Profession.Baker 9 Names.Bob Profession.Teacher 7 Names.Carl Profession.Coder 7 Names.Dave Profession.Miner 5 Names.Fred Profession....
I would like to create a lookup table in OCaml. The table will have 7000+ entries that, upon lookup (by int), return a string. What is an appropriate data structure to use for this task? Should the table be externalized from the base code and if so, how does one go about "including" the lookup table to be accessible from his/her program?...
Currently in my ASP.Net applications web.config I have an application setting that stores a comma delimited list of mapping values, like the one below. In the code behind I need to perform a lookup on this data based on input values 1, 2, 3 etc. I can either string split it and loop until I find a match, or use Regex to pull the value fr...
I need to store a lookup table as an instance member in one of my classes. The table will be initialized when the object is constructed. Each "row" will have 3 "columns": StringKey (e.g., "car") EnumKey (e.g., LookupKeys.Car) Value (e.g, "Ths is a car.") I want to pick the data structure that will yield the best performance for doin...