Search Results

Search found 1774 results on 71 pages for 'lookup'.

Page 8/71 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Nonstandard SSIS lookup

    - by Stefan
    I have a situation where I am trying to lookup a value in one table based on values in another table, using a BETWEEN operator and not an = operator. In one table, I have a value "EffectiveDate". I want to get a Weight number from another table, but the other table has two fields: "Inception" and "Termination". What I want to do is extract the Weight from that table for use where the EffectiveDate is between Inception and Termination. SSIS doesn't seem to provide a way to do this. It's good at matching one column to another column, but doesn't seem to allow one to many-column comparison/operations. Am I missing anything? Is this possible to do somehow?

    Read the article

  • etree.findall: 'OR'-lookup?

    - by piquadrat
    I want to find all stylesheet definitions in a XHTML file with lxml.etree.findall. This could be as simple as elems = tree.findall('link[@rel="stylesheet"]') + tree.findall('style') But the problem with CSS style definitions is that the order matters, e.g. <link rel="stylesheet" type="text/css" href="/media/css/first.css" /> <style>body:{font-size: 10px;}</style> <link rel="stylesheet" type="text/css" href="/media/css/second.css" /> if the contents of the style tag is applied after the rules in the two link tags, the result may be completely different from the one where the rules are applied in order of definition. So, how would I do a lookup that inlcudes both link[@rel="stylesheet"] and style?

    Read the article

  • API to lookup product information by UPC?

    - by officespace672
    Is there an API that allows lookup of product information by UPC? I know that Amazon has the Product Advertising API but don't think it can be used for any purpose other than sending traffic to amazon.com as per their license agreement here. Specifically, my application would not have the principal purpose of advertising and marketing the Amazon Site and driving sales of products and services on the Amazon Site Does such an API exist that I can do anything I want with the data? UPDATE I would want to use the API for my application, not create create such an API.

    Read the article

  • Large static arrays are slowing down class load, need a better/faster lookup method

    - by Visualize
    I have a class with a couple static arrays: an int[] with 17,720 elements a string[] with 17,720 elements I noticed when I first access this class it takes almost 2 seconds to initialize, which causes a pause in the GUI that's accessing it. Specifically, it's a lookup for Unicode character names. The first array is an index into the second array. static readonly int[] NAME_INDEX = { 0x0000, 0x0001, 0x0005, 0x002C, 0x003B, ... static readonly string[] NAMES = { "Exclamation Mark", "Digit Three", "Semicolon", "Question Mark", ... The following code is how the arrays are used (given a character code). [Note: This code isn't a performance problem] int nameIndex = Array.BinarySearch<int>(NAME_INDEX, code); if (nameIndex > 0) { return NAMES[nameIndex]; } I guess I'm looking at other options on how to structure the data so that 1) The class is quickly loaded, and 2) I can quickly get the "name" for a given character code. Should I not be storing all these thousands of elements in static arrays?

    Read the article

  • Windows XP clients do not update server 2008 DNS forward lookup zone.

    - by whatsisname
    I have a Cisco 5505 working as a DHCP server, and a server 2008 DNS server running an AD domain. I am having problems with all XP computers not updating the forward lookup zone. The reverse lookup zone updates are working. Windows vista and 7 computers update just fine. Additionally the DNS server accepts both secure and non-secure updates. When people are connected through the Cisco's VPN, they cannot resolve to any machines that have reverse lookup zones, but they can resolve entries in the forward lookup zone. I have tried ipconfig /registerdns, but the forward lookup zone entries for the XP clients are not being populated. How can I get the XP Dynamic DNS client to make the updates, or what can I do to debug what's going on? Thanks

    Read the article

  • Python point lookup (coordinate binning?)

    - by Rince
    Greetings, I am trying to bin an array of points (x, y) into an array of boxes [(x0, y0), (x1, y0), (x0, y1), (x1, y1)] (tuples are the corner points) So far I have the following routine: def isInside(self, point, x0, x1, y0, y1): pr1 = getProduct(point, (x0, y0), (x1, y0)) if pr1 >= 0: pr2 = getProduct(point, (x1, y0), (x1, y1)) if pr2 >= 0: pr3 = getProduct(point, (x1, y1), (x0, y1)) if pr3 >= 0: pr4 = getProduct(point, (x0, y1), (x0, y0)) if pr4 >= 0: return True return False def getProduct(origin, pointA, pointB): product = (pointA[0] - origin[0])*(pointB[1] - origin[1]) - (pointB[0] - origin[0])*(pointA[1] - origin[1]) return product Is there any better way then point-by-point lookup? Maybe some not-obvious numpy routine? Thank you!

    Read the article

  • Custom xsl rendering for lookup field in list view (SharePoint 2010)

    - by Luc
    I'm trying to change rendering of a list column on list view page. After a few tutorials and some hair pulling I managed to create an xslt for a calculated and currency field (from fldtypes_XXXXXX.xsl): <xsl:template match ="FieldRef[@Name='MarkCalc']" mode="Text_body"> <xsl:param name="thisNode" select="."/> <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping ="yes"/> </xsl:template> <xsl:template match="FieldRef[@Name='CurrencyTest']" mode="Number_body"> <xsl:param name="thisNode" select="."/> <b><xsl:value-of disable-output-escaping="yes" select="$thisNode/@*[name()=current()/@Name]" /></b> </xsl:template> Then I tried to do the same for a lookup field, but it just won't work. This is my last attempt (I copied it from SharePoint designer). What am I missing? <xsl:template match="FieldRef[(@Encoded) and @Name='Lookup1']" mode="Lookup_body"> <xsl:param name="thisNode" select="."/> <b><xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes" /></b> </xsl:template>

    Read the article

  • Nhibernate/Hibernate, lookup tables and object design

    - by Simon G
    Hi, I've got two tables. Invoice with columns CustomerID, InvoiceDate, Value, InvoiceTypeID (CustomerID and InvoiceDate make up a composite key) and InvoiceType with InvoiceTypeID and InvoiceTypeName columns. I know I can create my objects like: public class Invoice { public virtual int CustomerID { get; set; } public virtual DateTime InvoiceDate { get; set; } public virtual decimal Value { get; set; } public virtual InvoiceType InvoiceType { get; set; } } public class InvoiceType { public virtual InvoiceTypeID { get; set; } public virtual InvoiceTypeName { get; set; } } So the generated sql would look something like: SELECT CustomerID, InvoiceDate, Value, InvoiceTypeID FROM Invoice WHERE CustomerID = x AND InvoiceDate = y SELECT InvoiceTypeID, InvoiceTypeName FROM InvoiceType WHERE InvoiceTypeID = z But rather that having two select queries executed to retrieve the data I would rather have one. I would also like to avoid using child object for simple lookup lists. So my object would look something like: public class Invoice { public virtual int CustomerID { get; set; } public virtual DateTime InvoiceDate { get; set; } public virtual decimal Value { get; set; } public virtual InvoiceTypeID { get; set; } public virtual InvoiceTypeName { get; set; } } And my sql would look something like: SELECT CustomerID, InvoiceDate, Value, InvoiceTypeID FROM Invoice INNER JOIN InvoiceType ON Invoice.InvoiceTypeID = InvoiceType.InvoiceTypeID WHERE CustomerID = x AND InvoiceDate = y My question is how do I create the mapping for this? I've tried using join but this tried to join using CustomerID and InvoiceDate, am I missing something obvious? Thanks

    Read the article

  • Sort Dictionary<> on value, lookup index from key

    - by paulio
    Hi, I have a Dictionary< which I want to sort based on value so I've done this by putting the dictionary into a List< then using the .Sort method. I've then added this back into a Dictionary<. Is it possible to lookup the new index/order by using the Dictionary key?? Dictionary<int, MyObject> toCompare = new Dictionary<int, MyObject>(); toCompare.Add(0, new MyObject()); toCompare.Add(1, new MyObject()); toCompare.Add(2, new MyObject()); Dictionary<int, MyObject> items = new Dictionary<int, MyObject>(); List<KeyValuePair<int, MyObject>> values = new List<KeyValuePair<int, MyObject>> (toCompare); // Sort. values.Sort(new MyComparer()); // Convert back into a dictionary. foreach(KeyValuePair<int, PropertyAppraisal> item in values) { // Add to collection. items.Add(item.Key, item.Value); } // THIS IS THE PART I CAN'T DO... int sortedIndex = items.GetItemIndexByKey(0);

    Read the article

  • Linq to XML Read and output XML generated from lookup list

    - by Greg S
    I am trying to use XML created from a lookup list in SharePoint as a datasource for a treeview. It is in the form of : <NewDataSet> <test_data> <ID>1</ID> <Title>MenuItem_1</Title> <child_of /> </test_data> <test_data> <ID>2</ID> <Title>Subitem_1</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_1</child_of> </test_data> <test_data> <ID>3</ID> <Title>Subitem_2</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_1</child_of> </test_data> <test_data> <ID>4</ID> <Title>MenuItem_2</Title> <child_of /> </test_data> <test_data> <ID>5</ID> <Title>Subitem_2_1</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_2</child_of> </test_data> <test_data> <ID>6</ID> <Title>Subitem_2_2</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_2</child_of> </test_data> <test_data> <ID>7</ID> <Title>Subitem_2_2_1</Title> <Action>http://www.google.com</Action> <child_of>Subitem_2_2</child_of> </test_data> </NewDataSet> There may be N tiers, but the items relate to the parent via the <child_of> element. I can't seem to figure out how to write the LINQ in C# to nest the menu items properly. A friend recommended I post here. Any help is greatly appreciated.

    Read the article

  • Why does my macbook pro keep freezing?

    - by mac
    Once in a while my macbook pro 10.8.2 freezes for a couple of seconds, this is really annoying. Mouse gets frozen, I can't move it, and screen gets frozen. These are the last messages from the kernel, how to solve this? Sandbox: sandboxd(38380) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38410) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38429) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38463) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38495) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38513) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38550) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38581) deny mach-lookup com.apple.coresymbolicationd Sandbox: sandboxd(38599) deny mach-lookup com.apple.coresymbolicationd CODE SIGNING: cs_invalid_page(0x1000): p=38605[GoogleSoftwareUp] clearing CS_VALID Sandbox: sandboxd(38632) deny mach-lookup com.apple.coresymbolicationd

    Read the article

  • Postfix block senders outside from local domains

    - by Tibor Peter Toth
    I would like to block every mail that is coming in from a domain that is running on my server. Example: I have domain1.com on my mail server and I'm getting a mail from outside with an email address of [email protected] Then I know it's a Spam, because domain1.com is on my server, so the sender cannot come from outside. I want postfix to check for this, and simply block these kind of emails. I know this is a function in postfix, just don't know which one. Thanks.

    Read the article

  • Criteria strings, how many different criteria can be entered to retrieve specific data?

    - by Janet
    For our membership database we are currently using an old DOS program "Arclist". The program is old but the one feature we desperately need in a database program is to be able to enter multiple criteria at one time for more of a "one time" extraction of the data meeting all the various criteria entered in what I call a "criteria string". An example may be extracting only those records with zip codes matching (67893, 54235, 54323, 54201, 54302, 54303, 54301, 67894, 67895). Another set of criteria might be to omit records, not equal to, one type of criteria in one field and also extract records matching criteria in another field. So we would want records "not equal to" in one field, but whose information equals requested information in another field.

    Read the article

  • Why doesn't ADL find function templates?

    - by Huw Giddens
    What part of the C++ specification restricts argument dependent lookup from finding function templates in the set of associated namespaces? In other words, why won't the following compile? namespace ns { struct foo {}; template<int i> void frob(foo const&) {} } int main() { ns::foo f; frob<0>(f); }

    Read the article

  • Django: Setting up database code tables (aka reference tables, domain tables)?

    - by User
    Often times applications will need some database code tables (aka reference tables or domain tables or lookup tables). Suppose I have a model class called Status with a field called name that could hold values like: Canceled Pending InProgress Complete Where and at what point would I setup these values in Django? Its like a one time operation to setup these values in the database. Infrequently, these values could be added to.

    Read the article

  • What are the pitfalls of ADL?

    - by FredOverflow
    Some time ago I read an article that explained several pitfalls of argument dependent lookup, but I cannot find it anymore. It was about gaining access to things that you should not have access to or something like that. So I thought I'd ask here: what are the pitfalls of ADL?

    Read the article

  • localhost lookup fails, browser tries www.localhost.com instead

    - by Maen
    I used to run web applications all the time on my laptop, no problems, I am using VWD 2008 Express, i have the latest framework, Windows Vista Home Basic...etc.. Now, when ever i try to run a website, or even chose to Show a Page in Browser from Within VWD, the browser (both IE and Firefox) keeps looking for www.localhost.com... I tried to copy the address of and paste it directly in the title bar, nothing, same problem i tried to get that address from the balloon notification (the one that pops up when you run any ASP.net project), still nothing happens... My colleague is facing the same problem, but for him, he can simply copy and paste the url in the address bar, but its not working with me....Heeeeeellllllllllllllllp

    Read the article

  • IP Address Lookup in VB.net (XP vs Windows 7)

    - by TheHockeyGeek
    Currently I use the following code to retrieve the IP address of the local workstation... strIPAddress = System.Net.Dns.GetHostEntry(strComputerName).AddressList(0).ToString() This is fine for the Windows XP workstations. However, in Vista and Windows 7, this returns the IPv6 address which is not used at all. Is there a method of setting this to work so it always returns the IPv4 address regardless of platform? I know I can increment the AddressList value to 1 and get the correct IP in Windows 7. The bad part is that this requires going through the motions of identifying the OS and choosing one or the other. The must be some way of specifying IPv4 only. Perhaps getting a result from DNS on the network rather than the workstation itself?

    Read the article

  • Fastest distance lookup given latitude/longitude?

    - by Ryan Detzel
    I currently have just under a million locations in a mysql database all with longitude and latitude information. With this I use another lat/lng to find the distance of certain places in the database but it's not as fast as I want it to be especially with 100+ hits a second. Is there a faster formula or possibly a faster system other than mysql for this? The formula I'm using is this. select name, ( 3959 * acos( cos( radians(42.290763) ) * cos( radians( locations.lat ) ) * cos( radians( locations.lng ) - radians(-71.35368) ) + sin( radians(42.290763) ) * sin( radians( locations.lat ) ) ) ) AS distance from locations where active = 1 HAVING distance < 10 ORDER BY distance;

    Read the article

  • Ejb lookup failing on WAS7.0 with NamingException

    - by Ayush
    Hi, I have an application developed on RAD using WAS 6.0. I migrated the code to WID 7.0. After making some changes in the EJB modules(Had to remove the bnd.xmi file from each ejb module to deploy the application on Application Server)the application is running fine, but the EJB modules give the following error: NamingException has Occured While Getting Local Home javax.naming.NameNotFoundException:nullName ejb/com/igcc not found in context "local:". I am not able to figure out what changes do it need to make to run the application on WID. Any help is appreciated. Thanks, Ayush

    Read the article

  • Optimal storage of data structure for fast lookup and persistence

    - by Mikael Svenson
    Scenario I have the following methods: public void AddItemSecurity(int itemId, int[] userIds) public int[] GetValidItemIds(int userId) Initially I'm thinking storage on the form: itemId -> userId, userId, userId and userId -> itemId, itemId, itemId AddItemSecurity is based on how I get data from a third party API, GetValidItemIds is how I want to use it at runtime. There are potentially 2000 users and 10 million items. Item id's are on the form: 2007123456, 2010001234 (10 digits where first four represent the year). AddItemSecurity does not have to perform super fast, but GetValidIds needs to be subsecond. Also, if there is an update on an existing itemId I need to remove that itemId for users no longer in the list. I'm trying to think about how I should store this in an optimal fashion. Preferably on disk (with caching), but I want the code maintainable and clean. If the item id's had started at 0, I thought about creating a byte array the length of MaxItemId / 8 for each user, and set a true/false bit if the item was present or not. That would limit the array length to little over 1mb per user and give fast lookups as well as an easy way to update the list per user. By persisting this as Memory Mapped Files with the .Net 4 framework I think I would get decent caching as well (if the machine has enough RAM) without implementing caching logic myself. Parsing the id, stripping out the year, and store an array per year could be a solution. The ItemId - UserId[] list can be serialized directly to disk and read/write with a normal FileStream in order to persist the list and diff it when there are changes. Each time a new user is added all the lists have to updated as well, but this can be done nightly. Question Should I continue to try out this approach, or are there other paths which should be explored as well? I'm thinking SQL server will not perform fast enough, and it would give an overhead (at least if it's hosted on a different server), but my assumptions might be wrong. Any thought or insights on the matter is appreciated. And I want to try to solve it without adding too much hardware :) [Update 2010-03-31] I have now tested with SQL server 2008 under the following conditions. Table with two columns (userid,itemid) both are Int Clustered index on the two columns Added ~800.000 items for 180 users - Total of 144 million rows Allocated 4gb ram for SQL server Dual Core 2.66ghz laptop SSD disk Use a SqlDataReader to read all itemid's into a List Loop over all users If I run one thread it averages on 0.2 seconds. When I add a second thread it goes up to 0.4 seconds, which is still ok. From there on the results are decreasing. Adding a third thread brings alot of the queries up to 2 seonds. A forth thread, up to 4 seconds, a fifth spikes some of the queries up to 50 seconds. The CPU is roofing while this is going on, even on one thread. My test app takes some due to the speedy loop, and sql the rest. Which leads me to the conclusion that it won't scale very well. At least not on my tested hardware. Are there ways to optimize the database, say storing an array of int's per user instead of one record per item. But this makes it harder to remove items.

    Read the article

  • UITextField with the lookup

    - by leon
    Hello, I would like to achive the same functinoanlity in the UUTextField control as Google search web site (which uses Ajax for this): as user start typing, list of suggestion searches is shown. Then more letteres you type, suggestion list changes. So imaging I have array of words: Apple Abc Aman As user types A, all thress suggesions are shown, if user type one more letter p, then Apple is suggested. How would I do something like this? Mail type of applicatins do it, when receipent name is typed in the To: edit control I guess I can use UITableView with the search, is it correct approach?

    Read the article

  • ISBN -> bookdata Lookup to fill in a database

    - by oxinabox.ucc.asn.au
    Ok, I wanting to database a small library. I've only had limmited experience with databeses, and vnone with queerying a websever. I'm going to want to retrieve information like title, Publisher, maybe author, desciption the simplest way i can think of dooing this is looking them up via the isbn. I'm wondering how I should go about doing this. I've coma across isbndb.com before, but the api for accessing it seems rather complex.

    Read the article

  • How does lookup work?

    - by badgirl
    Hello. I have BeanTreeView, and some nodes in it. Every node has constructor public class ProjectNode extends AbstractNode { public ProjectNode(MainProject obj, DiagramsChildren childrens) { super (new ProjectsChildren(), Lookups.singleton(obj)); setDisplayName ( obj.getName()); } I set Rootnode as a root for tree in ExplorerTopComponent as this: private final ExplorerManager mgr = new ExplorerManager(); public ExplorerTopComponent(){ associateLookup (ExplorerUtils.createLookup(mgr, getActionMap())); mgr.setRootContext(new RootNode()); } And now, how I can get MainProject obj from some node? I need to get it in another class.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >