lookup

How do I wrangle python lookups: make.up.a.dot.separated.name.and.use.it.until.destroyed = 777

I'm a Python newbie with a very particular itch to experiment with Python's dot-name-lookup process. How do I code either a class or function in "make.py" so that these assignment statements work succesfully? import make make.a.dot.separated.name = 666 make.something.else.up = 123 make.anything.i.want = 777 ...

Can I create a lookup field that only returns "Current" list items?

I'm working with Sharepoint 2.0 (WSS2) and need to create a lookup field that draws the name of an Issue from an Issue List. The trouble is, it does not appear that I can filter this lookup so that only the current version of the Issue is pulled up. The result is that I have several selections for the same Issue that appear in the look...

Display and pipe only a specific line of text from a stream

Here is a command line script for a dictionary lookup using Wordnet: #!/bin/bash # Command line look up using Wordnet - command line dictionary echo "Type in your word:" read word /usr/bin/curl -s -A 'Mozilla/4.0' 'http://wordnetweb.princeton.edu/perl/webwn?s='$word'&sub=Search+WordNet&o2=&o0=1&o7=&o5=&o1=1&am...

Using google as a dictionary lookup via bash, How can one grab the first definition?

#!/bin/bash # Command line look up using Google's define feature - command line dictionary echo "Type in your word:" read word /usr/bin/curl -s -A 'Mozilla/4.0' 'http://www.google.com/search?q=define%3A+'$word \ | html2text -ascii -nobs -style compact -width 500 | grep "*" Dumps a whole series of definitions from google.com an examp...

SharePoint List Items with Lookup Fields - moving/copying to different site collection

Here is the scenario. Our SharePoint custom job archives list items (based on ceratin crteria) and copies/moves the items to a different site collection. In this scenario, if the list item has some lookup fields, how do preserve these when I copy/mpve to different site collection?. Thanks, Durga ...

Is there a way to improve the speed or efficiency of this lookup? (C/C++)

I have a function I've written to convert from a 64-bit integer to a base 62 string. Originally, I achieved this like so: char* charset = " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int charsetLength = strlen(charset); std::string integerToKey(unsigned long long input) { unsigned long long num = input; st...

Template lookup in class?

It's hard to get a word for this. Sometimes I see a class like this: template <typename T> class Wrapper { public: Wrapper(const T& t) : t_(t) {} Wrapper(const Wrapper& w) : t_(w.t_) {} private: T t_; } As far as I can tell this is legitimate code. However, why is the copy constructor allowed to accept a const Wrapper& wit...

Axapta: Lookup field display the string value instead of the ID?

When AX generates forms and grids, all the lookups are populated properly, but the ID of the lookup item is displayed in the form. The only way to see values that make sense is to click on the field--not really ideal. Is there a way to display the lookup value in the form instead of the id number behind it? I would like the "tableB" f...

Why is ToLookup() dependent on load options in Linq2Sql?

Lets say I have 3 tables Posts, PostTags and Tags defining a many-to-many relationship. I want to get a lookup table that will give me all the Posts related to a given tag so I use the following code: return dataContext.PostTags.ToLookup(pt => pt.Tag, pt => pt.Post); In unit test all went fine but in the real application, it didn't wo...

Linq Lookup dynamic list

Hi, I have a List of objects (string filename, BitmapImage image) to use as a cache of images. private static readonly List<ImageData> imageCache = new List<ImageData>(); I created a Lookup to check this cache for an image each time it is required. If the image is not in the list it is added to the list. The Looked is statically cre...

list? dictionary? array?

hi all i'm trying to come up with a very simple way to store a boolean value for each tabpage in a tabcontrol. each page has a textbox, and i would like to store a bool foreach page so if tabpage 1 has been saved, then bool1 is set to true, else false, and so on. then when they go to close the program it will go over all the tabpages a...

Retrieving display value of lookup field in Dynamics CRM C# plugin

Hi, I am trying to retrieve the display value of a lookup field in a plugin for MS Dynamics CRM 4.0. The value of the attribute is a GUID which points to another entity (owner of salesorder in this case). "Normal" attributes I retrieve with a code like this: CrmDateTime serviceOrderDateDT = (CrmDateTime)entity["submitdate"]; ...

ASP.net MVC how to get the value of the ID field for the list of items?

I have an application, that shows list of items bound to a typed model. In the list every item has an ID from a lookup table. How to show the value of the lookup data for each item instead of IDs? The best way has to link a html dropdownlist to each ID, from where I would be able to choose the appropriate value. Thanks in advance G...

how to add lookup/choice field with data from Active Directory to Sharepoint custom content type

Hi, I am trying to create a custom content type in Sharepoint where one of the multiple choice fields needs to get data from Active Directory. I've been looking on Google but haven't found any good solutions. Probably I'd have to create a custom field type? Thanks! ...

Excel: need help with unusual lookup function (sorted column is different from lookup column)

Hello, I am having trouble constructing a unusual lookup formula in Excel. Normally, I would use VLOOKUP(), but the pitfall is that I want to look up a number in a column from a table that is sorted on an other column. Vlookup can only lookup things on the sorted column itself. The scenario is as follows: The table is sorted ascend...

Getting JSON Key from Value or Inverting JSON Data

Getting single key from Value I would like to do a backwards selection from the following JSON. I'd like to extract the abbreviation for a particular state. In this situation, the abbreviation is the key, and the value that I'm starting with is the value. Certainly I can loop through each value, comparing the value to my value, and sel...

Google like edit/combo control for Delphi ?

Everyone probably knows what I mean, but to clarify the control would need to: Fire an event when user edits the text. The event would provide a SuggestionList: TStrings which you could fill with matches/suggestions. if the SuggestionList is not empty a drop down should appear. Unlike combo, the control should not attempt to automatica...

Joining SQL lookup table with data table

I have a lookup table say cities with fields CityId, CityName CityId CityName 1 New York 2 San Francisco 3 Chicago I have an orders table which has fields: CityId, CustId, CompletedOrders, PendingOrders CityId CustId CompletedOrders PendingOrders 1 123 100 50 2 123 75 2...

checking words in a dictionary

I need to determine if an unknown 5 or 6 letter string is a valid word, i.e. is in the dictionary. I could submit the string/word to an online dictionary, but I need to check this string/word, which will be different each time, for about 100 to 150 times. This seems to be a bit time consuming. My next thought would be to try to get a di...

Converting an IEnumerable to a lookup with multiple keys per value

What's the best way to transform an IEnumerable into a lookup- or dictionary-like structure, but with multiple keys per value? What I'm looking for is something that does roughly the same thing as this, and in a generic way: var wordsByLetter = new Dictionary<char, HashSet<string>>(); foreach (string word in words) { foreach (char l...