Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 60/433 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Java Frameworks that support Entity-Attribute-Value Models

    - by jm04469
    I am interested in developing a portal-based application that works with EAV models and would like to know if there are any Java frameworks that aid in this type of development? salesforce.com uses EAV and currently has twenty tables. The framework I seek should allow it to be configurable to different EAV implementations

    Read the article

  • Thinking Sphinx - sorting by a string attribute gets out of sync when changes are made

    - by Scott Brown
    I have a "restaurants" table with a "name" column. I've defined the following index: indexes "REPLACE(UPPER(restaurants.name), 'THE ', '')", :as => :restaurant_name, :sortable => true ... because I want to sort the restaurant names without respect to the prefix "The ". My problem is that whenever one of these records is updated (in any way) the new record jumps to the top of the sort order. If another record is updated, it also jumps ahead of the rest. I end up with two lists: a list of restaurants that have been updated since the last re-indexing and a list of those that haven't. Each respective list is in alphabetical order, but I don't understand why the overall list is getting segregated this way. I do have a delayed delta index set up, and I assume the issue is related to this.

    Read the article

  • Fastest way to iterate through an NSArray with objects and keys

    - by AppGolfer
    Hello, I have an NSArray called 'objects' below with arrayCount = 1000. It takes about 10 secs to iterate through this array. Does anyone have a faster method of iterating through this array? Thanks! for (int i = 0; i <= arrayCount; i++) { event.latitude = [[[objects valueForKey:@"CLatitude"] objectAtIndex:i] floatValue]; event.longitude = [[[objects valueForKey:@"CLongitude"] objectAtIndex:i] floatValue]; }

    Read the article

  • Remove Registry Keys for Windows Phone 7 Emulator

    - by Jake Pearson
    I am trying to get the updated Windows Phone 7 tools installed, but can't get rid of the old ones. The uninstaller wouldn't run, so I had to try more extreme means. I got everything removed except for "Microsoft Windows Phone Emulator x64". Does anyone know what vm_web.exe (the tool installer) is checking for (registry, file, etc.) that prevents the installer from running. I tried Aaron Stebner's clean up tool, and it helped a lot, but couldn't get rid of the emulator.

    Read the article

  • Get Attribute value in ViewEngine ASP.NET MVC 3

    - by Kushan Fernando
    I'm writting my own view engine. public class MyViewEngine : RazorViewEngine { public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) { // Here, how do I get attributes defined on top of the Action ? } } ASP.NET MVC Custom Attributes within Custom View Engine Above SO Question has how to get attributes defined on top of the Controller. But I need to get attributes defined on Action.

    Read the article

  • Find element with attribute with minidom

    - by Xster
    Given <field name="frame.time_delta_displayed" showname="Time delta from previous displayed frame: 0.000008000 seconds" size="0" pos="0" show="0.000008000"/> <field name="frame.time_relative" showname="Time since reference or first frame: 0.000008000 seconds" size="0" pos="0" show="0.000008000"/> <field name="frame.number" showname="Frame Number: 2" size="0" pos="0" show="2"/> <field name="frame.pkt_len" showname="Packet Length: 1506 bytes" hide="yes" size="0" pos="0" show="1506"/> <field name="frame.len" showname="Frame Length: 1506 bytes" size="0" pos="0" show="1506"/> <field name="frame.cap_len" showname="Capture Length: 1506 bytes" size="0" pos="0" show="1506"/> <field name="frame.marked" showname="Frame is marked: False" size="0" pos="0" show="0"/> <field name="frame.protocols" showname="Protocols in frame: eth:ip:tcp:http:data" size="0" pos="0" show="eth:ip:tcp:http:data"/> How do I get the field with name="frame.len" right away without iterating through every tag and checking the attributes?

    Read the article

  • Extracting table rows with a particular attribute from an HTML File, using HTMLAgilityPack

    - by Soham
    Consider this html snippet: <tr> <td valign=top class="tim_new"><a href="/stocks/company_info/pricechart.php?sc_did=MI42" class="tim_new">3M India</a></td> <td class="tim_new" valign=top><a href='/stocks/marketstats/indcomp.php?optex=NSE&indcode=Diversified' class=tim>Diversified</a></td> <td class="tim_new" align=right valign=top>2,487.25</td> <td class="tim_new" align=right valign=top><font color=#16a903>187.25</font></td> <td class="tim_new" align=right valign=top><font color=#16a903>8.14</font></td> <td class="tim_new" align=right valign=top>2,801.90</td> <td class="tim_new" align=right valign=top>0.06</td> </tr> Realize these three things: The HTML file from which this snippet has been taken, contains multiple number of HTML tables. The table from which this snippet has been extracted doesnt contain only rows of the shown format, but also of other formats like this, for example: <tr><td colspan=7><img src="http://img1.moneycontrol.com/images/blank.gif"height="5"></td></tr>` This same table contains multiple rows of the format which I need to extract. So given this scenario, is it possible to run a code, which extracts, the link with the class name = "tim_new"? Help Appreciated, Soham

    Read the article

  • Specificying a Page directive attribute on an NHaml page

    - by ManiacZX
    I am working on an MVC site using NHaml for the view engine. I have a page that needs to submit HTML code as a form value and am getting the System.Web.HttpRequestValidationException thrown at me. I want to specify the <%@ Page validateRequest="false" % so that this page will allow this data to be submitted but am unsure on how to do this with NHaml generating the pages.

    Read the article

  • XSLT 1.0 count element with the same value in an attribute, and show it

    - by Erick
    I have a variable containing: <col p1="Newman" p2="Paul"/> ... <col p1="Newman" p2="Paolo"/> <col p1="Newman" p2="Paul"/> i wold in output a table with in the first column the value of p2 and in the second the number of time it appear. For each value of p2 should i have only a row. <table> <tr><td>p2</td><td>num</td></tr> <tr><td>Pault</td><td>2</td> ... <tr><td>Paolo</td><td>1</td> </table>

    Read the article

  • jquery html attribute not working in IE

    - by Gopal
    I am using country and state dropdowns in my form. Whenever the user selects the country in the dropdown, the respective states of the country will populate in the states dropdown. I am populating the states in the dropdown using ajax call. The problem is that the states get populated in Mozilla but it doesnt work in IE. I guess there is some problem in jquery while loading the states in the states dropdown. The jquery code i am using is $('select#edit-country').change(function(e) { $.getJSON("loadContactUsStates",{id: $(this).val(), ajax: 'true'}, function(j){ var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } <!-----I guess the problem is with the below line------------------> $("select#edit-state").html(options); })//end json });

    Read the article

  • Linq Grouping by 2 keys as a one

    - by Evgeny
    Hello! I write a simple OLAP viewer for my web-site. Here are the classes (abstract example): Employee { ID; Name; Roles[]; //What Employee can do } Order { Price; Employee Manager; Employee Executive; //Maybe wrong english. The person which perform order } Employee can be Manager and Executive in the order at the same time. This means that Employee role is not fixed. I have to group orders by employees and finally get IGrouping with Employee key. So .GroupBy(el=new {el.Manager,el.Executive}) is not allowed. I considered some tricks with IEqualityComparable, but found no solution. If somrbody will help I'll be vary glad, thank you.

    Read the article

  • Change Large Number of Record Keys using Map Table

    - by Coyote
    I have a set of records indexed by id numbers, I need to convert these record's indexes to a new id number. I have a two column table mapping the old numbers to the new numbers. For example given these two tables, what would the update statement look like? Given: OLD_TO_NEW oldid | newid ----------------- 1234 0987 7698 5645 ... ... and id | data ---------------- 1234 'yo' 7698 'hey' ... ... Need: id | data ---------------- 0987 'yo' 5645 'hey' ... ... This oracle so I have access to PL/SQL, I'm just trying to avoid it.

    Read the article

  • Extracting a table row with a particular attribute,using HTMLAGILITY pack

    - by Soham
    Consider this piece of code: <tr> <td valign=top class="tim_new"><a href="/stocks/company_info/pricechart.php?sc_did=MI42" class="tim_new">3M India</a></td> <td class="tim_new" valign=top><a href='/stocks/marketstats/indcomp.php?optex=NSE&indcode=Diversified' class=tim>Diversified</a></td> I want to write a piece of code using HTMLAgility pack which would extract the link in the first line.

    Read the article

  • Extracting attribute data from a raster

    - by user308827
    Hi, I have a raster file (basically 2D array) with close to a million points. I am trying to extract a circle from the raster (and all the points that lie within the circle. Using ArcGIS is exceedingly slow for this. Can anyone suggest any image processing library that is both easy to learn and powerful and quick enough for something like this? Thanks!

    Read the article

  • Very long strings as primary keys in a database for caching

    - by Bill Zimmerman
    Hi, I am working on a web app that allows users to create dynamic PDF files based on what they enter into a form (it is not very structured data). The idea is that User 1 enters several words (arbitrary # of words, practically capped of course), for example: A B C D E There is no such string in the database, so I was thinking: Store this string as a primary key in a MySQL database (it could be maybe around 50-100k of text, but usually probably less than 200 words) Generate the PDF file, and create a link to it in the database When the next user requests A B C D E, then I can just serve the file instead of recreating it each time. (simple cache) The PDF is cpu intensive to generate, so I am trying to cache as much as I can... My questions are: Does anyone have any alternative ideas to my approach What will the database performance be like? Is there a better way to design the schema than using the input string as the primary key?

    Read the article

  • JSF/Facelets: set `action` attribute to a dynamically evaluated string

    - by harto
    In my JSF/Facelets application, I want to dynamically generate a breadcrumb trail from a list of page IDs using a custom tag: <foo:breadcrumbs trail="foo,bar,baz"/> This should generate something like: <h:commandLink action="foo" ... /> <h:commandLink action="bar" ... /> <!-- (etc.) --> My code looks something like this: <ui:repeat value="#{fn:split(trail, ',')}" var="key"> <h:commandLink action="#{key}" ... /> </ui:repeat> The problem with this code is that #{key} is interpreted as a method binding. However, I just want the string value of #{key} to be returned as the navigation outcome. How can I achieve this? The only thing I could think of was creating a dummy managed-bean that has an outcome field and an action handler, and invoke it like so: <h:commandLink action="#{dummy.click}" ...> <f:setPropertyActionListener target="#{dummy.outcome}" value="#{key}" /> </h:commandLink> with the dummy class defined like so: public class Dummy { private String outcome; public String click() { return outcome; } public void setOutcome(String outcome) { this.outcome = outcome; } public void getOutcome() { return outcome; } } That seems ugly though, and I don't know if it would work.

    Read the article

  • XML child node attribute value

    - by c0mrade
    I'm trying to read xml file, ex : <entry> <title>FEED TITLE</title> <id>5467sdad98787ad3149878sasda</id> <tempi type="application/xml"> <conento xmlns="http://mydomainname.com/xsd/radiofeed.xsd" madeIn="USA" /> </tempi> </entry> Here is the code I have so far : public void parseXML(String xml) { try { InputStream inputStream = new ByteArrayInputStream(xml.getBytes()); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(inputStream); doc.getDocumentElement().normalize(); System.out.println("Root element " + doc.getDocumentElement().getNodeName()); NodeList nodeLst = doc.getElementsByTagName("entry"); System.out.println("Information of all entries"); for (int s = 0; s < nodeLst.getLength(); s++) { Node fstNode = nodeLst.item(s); if (fstNode.getNodeType() == Node.ELEMENT_NODE) { Element fstElmnt = (Element) fstNode; NodeList title = fstElmnt.getElementsByTagName("title").item(0).getChildNodes(); System.out.println("Title : " + ((Node) title.item(0)).getNodeValue()); NodeList id = fstElmnt.getElementsByTagName("id").item(0).getChildNodes(); System.out.println("Id: " + ((Node) update.item(0)).getNodeValue()); NodeList contento= fstElmnt.getElementsByTagName("tempi").item(0).getChildNodes(); System.out.println("Contento : " + ((Node) content.item(0)).getFirstChild().getAttributes()); // with this line above I'm having problems, I get null pointer exception } } } catch (Exception e) { e.printStackTrace(); } } How can I read/get, contento tag attributes? I'm using org.w3c.dom lib.

    Read the article

  • perl hashes - comparing keys and values

    - by Aaron Moodie
    I've been reading over the perl doc, but I can't quite get my head around hashes. I'm trying to find if a hash key exists, and if so, compare is't value. The thing that is confusing me is that my searches say that you find if a key exists by if (exists $files{$key}) , but that $files{$key} also gives the value? the code i'm working on is: foreach my $item(@new_contents) { next if !-f "$directory/$item"; my $date_modified = (stat("$directory/$item"))[9]; if (exists $files{$item}) { if ($files{$item} != $date_modified { $files{$item} = $date_modified; print "$item has been modified\n"; } } else { $files{$item} = $date_modified; print "$item has been added\n"; } }

    Read the article

  • How to assign default values and define unique keys in Entity Framework 4 Designer

    - by csharpnoob
    Hello, I've had a look at the Entity Framework 4. While generating code for the SQL Server 2008 I came to the point where I want to define some default values for some fields. how to define in the designer for a Created DateTime Field the DateTime.Now default value? - Error 54: Default value (DateTime.Now) is not valid for DateTime. The value must be in the form 'yyyy-MM-dd HH:mm:ss.fffZ' how to make for code generation a string Field unique. Like E-Mail or Username can exists only once in the table. I've search alot in the internet and also checked my books Pro Entity Framework 4.0 and Programming Entity Framework. But none of them seems to come up with the default value issue, or using sql commands as default values for database generation. Another thing is, how to prevent on database generation always from droping tables? Instead i want to append non existing fields and keep the data. Thanks for any suggestions.

    Read the article

  • Nhibernate: one-to-many, based on multiple keys?

    - by e36M3
    Lets assume I have two tables Table tA ID ID2 SomeColumns Table tB ID ID2 SomeOtherColumns I am looking to create a Object let's call it ObjectA (based on tA), that will have a one-to-many relationship to ObjectB (based on tB). In my example however, I need to use the combination of ID and ID2 as the foreign key. If I was writing SQL it would look like this: select tB.* from tA, tB where tA.ID = tB.ID and tA.ID2 = tB.ID2; I know that for each ID/ID2 combination in tA I should have many rows in tB, therefor I know it's a one-to-many combination. Clearly the below set is not sufficient for such mapping as it only takes one key into account. <set name="A2" table="A2" generic="true" inverse="true" > <key column="ID" /> <one-to-many class="A2" /> </set> Thanks!

    Read the article

  • With regards to urllib AttributeError: 'module' object has no attribute 'urlopen'

    - by Matt
    import re import string import shutil import os import os.path import time import datetime import math import urllib from array import array import random filehandle = urllib.urlopen('http://www.google.com/') #open webpage s = filehandle.read() #read print s #display #what i plan to do with it once i get the first part working #results = re.findall('[<td style="font-weight:bold;" nowrap>$][0-9][0-9][0-9][.][0-9][0-9][</td></tr></tfoot></table>]',s) #earnings = '$ ' #for money in results: #earnings = earnings + money[1]+money[2]+money[3]+'.'+money[5]+money[6] #print earnings #raw_input() this is the code that i have so far. now i have looked at all the other forums that give solutions such as the name of the script, which is parse_Money.py, and i have tried doing it with urllib.request.urlopen AND i have tried running it on python 2.5, 2.6, and 2.7. If anybody has any suggestions it would be really welcome, thanks everyone!! --Matt ---EDIT--- I also tried this code and it worked, so im thinking its some kind of syntax error, so if anybody with a sharp eye can point it out, i would be very appreciative. import shutil import os import os.path import time import datetime import math import urllib from array import array import random b = 3 #find URL URL = raw_input('Type the URL you would like to read from[Example: http://www.google.com/] :') while b == 3: #get file name file1 = raw_input('Enter a file name for the downloaded code:') filepath = file1 + '.txt' if os.path.isfile(filepath): print 'File already exists' b = 3 else: print 'Filename accepted' b = 4 file_path = filepath #open file FileWrite = open(file_path, 'a') #acces URL filehandle = urllib.urlopen(URL) #display souce code for lines in filehandle.readlines(): FileWrite.write(lines) print lines print 'The above has been saved in both a text and html file' #close files filehandle.close() FileWrite.close()

    Read the article

  • Error in jquery attribute selector and IE6-7

    - by Guillermo Vasconcelos
    Hi, I'm trying to implement a JQuery script to process some areas inside an image map. I'm using $('area[shape="poly"]') as a selector to obtain the areas I'm interested in. It is working fine in IE8 and Firefox, but it is not selecting the elements in IE6 or IE7. This is a test page that shows this problem. I don't know if this is a JQuery bug or I am doing something wrong. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { var areas = $('area[shape="poly"]'); alert('areas: ' + areas.length); }); //]]> </script> <title>Test</title> </head> <body> <img id="img1" src="nothing.gif" style="width:300px; height:300px; border: 2px solid black" usemap="#map1"/> <map id="map1"> <area shape="rect" title="rectArea" coords="126,112,231,217" alt=""/> <area shape="poly" title="polyArea1" coords="274,72,262,70,251,68,240,67,228,66,217,67,206,68,194,70,183,72,181,63,192,60,204,58,216,57,228,56,240,57,252,58,264,60,276,63" alt=""/> <area shape="poly" title="polyArea2" coords="241,194,235,193,228,193,222,193,216,194,196,119,204,117,212,116,220,115,228,115,237,115,245,116,253,117,261,119" alt=""/> </map> </body> </html> This is showing 2 in IE8 and Firefox and 0 in IE6-7 Thanks, Guillermo

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >