Search Results

Search found 203 results on 9 pages for 'ricardo rios'.

Page 7/9 | < Previous Page | 3 4 5 6 7 8 9  | Next Page >

  • Using an extended interceptor in struts2 does not work w/ action parameters

    - by Ricardo
    I have a default package w/ an interceptor configure, and i'm extending that package into another one and calling the same interceptor <action name="availability**"> <param name="subTab">availability</param> <interceptor-ref name="tabStack"/> <result>/WEB-INF/jsp/index.jsp?include=visibilit/availability.jsp</result> </action> The problem is that the param is not being read inside my interceptor code: Map params = invocation.getInvocationContext().getParameters(); subTab = params.get("subTab").toString(); //NULL exception Any idea how i can pass parameters to extended interceptors? Thanks!

    Read the article

  • How to set an empty value using XPath?

    - by Ricardo
    Using this xml example: <templateitem itemid="5"> <templateitemdata>%ARN%</templateitemdata> </templateitem> <templateitem itemid="6"> <templateitemdata></templateitemdata> </templateitem> I am using XPath to get and set Node values. The code I am using to get the nodes is: private static Node ***getNode***(Document doc, String XPathQuery) throws XPathExpressionException { XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression expr = xpath.compile(XPathQuery); Object result = expr.evaluate(doc, XPathConstants.NODESET); NodeList nodes = (NodeList) result; if(nodes != null && nodes.getLength() >0) return nodes.item(0); throw new XPathExpressionException("No node list found for " + XPathQuery); } To get %ARN% value: "//templateitem[@itemid=5]/templateitemdata/text()" and with the getNode method I can get the node, and then call the getNodeValue(). Besides getting that value, I would like to set templateitemdata value for the "templateitem[@itemid=6]" since its empty. But the code I use can't get the node since its empty. The result is null. Do you know a way get the node so I can set the value?

    Read the article

  • Accessing a database through Obj-c

    - by Ricardo
    Hey, I am trying to find some source code on how to access and store variables from a database to my program via obj-c(iPhone). I have look for many hours now and no one has provided a sure fire way on how to go about this. If you have any advice or recommendations please post some source code or a link to it. Thanks for the help.

    Read the article

  • jQuery: datepicker - Calendar activated by the icon and the date field at the same time

    - by Ricardo Zea
    Hello, I've already looked around but couldn't find the exact solution/problem I'm having right now. All I want is to have the calendar appear either by clicking on the calendar icon AND from the text field in which the date appears when selecting a date. Right now, after trying different properties, I can only have the calendar appear by one or the other, but not both: the icon and the field. This is the code I'm using to activate it via the icon: $("#datepicker").datepicker({ showOn: 'button', buttonImage: 'images/icon-calendar.gif', buttonImageOnly: true, changeMonth: true, changeYear: true, showAnim: 'slideDown', duration: 'fast' }); Is there a way to have the calendar appear by clicking on the icon AND the field as well? Thanks.

    Read the article

  • CollapsiblePanelExtender does not work with CollapsedSize="0"

    - by Ricardo Conte
    This "CollapsiblePanelExtender" works ok only if I use CollapsedSize="1". When using CollapsedSize="0" it collapses but does not show when clicked... Any ideas ? <asp:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="server" TargetControlID="pBody" CollapseControlID="pHeader" ExpandControlID="pHeader" Collapsed="false" TextLabelID="lblText" CollapsedText="Click to Show Content..." ExpandedText="Click to Hide Content..." CollapsedSize="1" AutoCollapse="False" AutoExpand="False" ScrollContents="True" ExpandDirection="Vertical" SuppressPostBack="true" > </asp:CollapsiblePanelExtender>

    Read the article

  • jQuery: show an element from select drop down, hide it when other option selected

    - by Ricardo Zea
    I've tried looking around and there are similar problems, but mine is way more simple, but yet, I can't find a solution within these forums. While learning jQuery, I'm trying to show a DIV when an item/option from a select drop down is selected, and hide that same DIV when any other option in the select drop down is selected. select HTML: <select name="source" id="source"> <option value="null" selected="selected">&mdash;Select&mdash;</option> <option value="s1">Source 1</option> <option value="s2">Source 2</option> <option value="sother">Other</option> </select> DIV I need to show when 'Other' is selected: <div id="specify-source">Other source here...</div> When any other option in the select menu is selected, the above DIV shouldn't be visible. I've tried this jQuery but of course it doesn't work properly: $(function() { $.viewMap = { 'sother' : $('#specify-source') }; $('#source').change(function() { // hide all $.each($.viewMap, function() { this.hide(); }); // show current $.viewMap[$(this).val()].show(); }); }); Any help you can give me, I'd greatly appreciate it. Thanks,

    Read the article

  • The explain tells that the query is awful (it doesn't use a single key) but I'm using LIMIT 1. Is th

    - by Ricardo
    The explain command with the query: explain SELECT * FROM leituras WHERE categorias_id=75 AND textos_id=190304 AND cookie='3f203349ce5ad3c67770ebc882927646' AND endereco_ip='127.0.0.1' LIMIT 1 The result: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE leituras ALL (null) (null) (null) (null) 1022597 Using where Will it make any difference adding some keys on the table? Even that the query will always return only one row.

    Read the article

  • Is it possible to have more than P2P on iPhone with Bluetooth

    - by Ricardo Ferreira
    Hi all, This seems like a straightforward google search answer, but after a while, I still can't be 100% sure of this. I've found Z2Live (http://www.z2live.com/), which is basically a layer above GameKit and they too use only P2P with Bluetooth. So I just want to be sure if I can only have P2P with Bluetooth or if I can have like 4 iPhones all connected to a server (who will also be a client) using Bluetooth. Thanks in advance.

    Read the article

  • What is the purpose of OCaml's Lazy.lazy_from_val?

    - by Ricardo
    The doc of Lazy.lazy_from_val states that this function is for special cases: val lazy_from_val : 'a -> 'a t lazy_from_val v returns an already-forced suspension of v This is for special purposes only and should not be confused with lazy (v). Which cases are they talking about? If I create a pair of suspended computation from a value like: let l1 = lazy 123 let l2 = Lazy.lazy_from_val 123 What is the difference between these two? Because Lazy.lazy_is_val l1 and Lazy.lazy_is_val l2 both return true saying that the value is already forced!

    Read the article

  • Switching layouts page jumping (improvement to script)

    - by Ricardo Zea
    Hello, I'm using this script to switch layouts in a page: $("span.switcher").click(function () { $("span.switcher").toggleClass("swap"); /*!*/ $("ol.search-results").fadeOut("fast", function() { $(this).fadeIn("fast").toggleClass("grid"); }); The script works fine, the problem I have is that if the switch view is down the page, the layout changes and then the page jumps back up. If I add 'return false' right where you see the /* ! */ in the second line the script doesn't work. Also, as you can see, I'm using < span instead of < a since I was told that using other element other than < a would stop the page from jumping. Any idea how to fix the jumping of the page? Thanks.

    Read the article

  • MySQL query : all records of one table plus count of another table

    - by Ricardo
    Hello Guys! I have 2 tables: User and Picture. The Picture table has the key of the user. So basically each user can have multiple pictures, and each picture belongs to one user. Now, I am trying to make the following query: I want to select all the user info plus the total number of pictures that he has (even if it's 0). How can I do that? Probably it sounds quite simple, but I am trying and trying and can't seem to find the right query. The only thing I could select is this info, but only for users that have at least 1 picture, meaning that the Pictures table has at least one record for that key... But I also wanna consider the users that don't have any. Any idea? Thanks!

    Read the article

  • Buttons, hover, text and transitions on pure css3

    - by Mascote Ricardo
    I bought a responsive html5 template to create a website for my band. But I miss a page of tour dates, and would create a unique content, simple and quick to load on any device. I have the idea ready, something like buttons (months) to change on hover and when clicked, shows the dates and cities, all with transitions and fadein / fadeout. (pure css3) to better explain and make me understand, follows an image I created in photoshop. http://img51.imageshack.us/img51/1542/l17u.jpg can someone give me a help, idea or tag to search the web, I thank you too!

    Read the article

  • Li with float in IE6/7. It disappears?

    - by Ricardo H.Bin
    Hi guys. Try test this code in IE 6/7: <html> <head> <title>Title</title> </head> <body> <ul> <li style="float:left">huisashaiuhs iuhuiahsiuhsaiu</li> </ul> </body> </html> Where is the circle of LI? I already do ALL types of workaround, in UL and LI. Nothing, NOTHING works. Do you have any idea? (BTW already tried hasLayout,padding-left,margin-left,display:inline, etc etc etc)

    Read the article

  • jQuery: Main nav items selected depending on URL or page name

    - by Ricardo
    Ok, I've looked all over for a solution for this but so far I'm unable to find anything related to what I need to accomplish. What I need is very simple as far as logic goes. I have a nav bar like this one: <nav> <ul> <li><a href="download.shtml">Download</a></li> <li><a href="documentation.shtml">Documentation</a></li> <li><a href="contact.shtml">Contact</a></li> <li><a href="about.shtml">About</a></li> </ul> </nav> And the URLs of the site are straightforward: http://domain.net/download.shtml http://domain.net/documentation.shtml http://domain.net/contact.shtml http://domain.net/about.shtml Question: How can I detect which page/URL I'm on and add a class of .active to the corresponding nav item? The end result would be, for example if I'm in the Download page: <nav> <ul> <li><a href="download.shtml" class="active">Download</a></li> <li><a href="documentation.shtml">Documentation</a></li> <li><a href="contact.shtml">Contact</a></li> <li><a href="about.shtml">About</a></li> </ul> </nav> Thanks in advance for any help on this matter.

    Read the article

  • C programming: hashtable insertion/search

    - by Ricardo Campos
    Hello i have a problem with my hash table its implemented like this: #define HT_SIZE 10 typedef struct _list_t_ { char key[20]; char string[20]; char prevValue[20]; struct _list_t_ *next; } list_t; typedef struct _hash_table_t_ { int size; /* the size of the table */ list_t ***table; /* first */ sem_t lock; } hash_table_t; I have a Linked list with 3 pointers because i want a hash table with several partitions (shards), here is my initialization of my Hash table: hash_table_t *create_hash_table(int NUM_SERVER_THREADS, int num_shards){ hash_table_t *new_table; int j,i; if (HT_SIZE<1) return NULL; /* invalid size for table */ /* Attempt to allocate memory for the hashtable structure */ new_table = (hash_table_t*)malloc(sizeof(hash_table_t)*HT_SIZE); /* Attempt to allocate memory for the table itself */ new_table->table = (list_t ***)calloc(1,sizeof(list_t **)); /* Initialize the elements of the table */ for(j=0; j<num_shards; j++){ new_table->table[j] = (list_t **)calloc(1,sizeof(list_t *)); for(i=0; i<HT_SIZE; i++){ new_table->table[j][i] = (list_t *)calloc(1,sizeof(list_t )); } } /* Set the table's size */ new_table->size = HT_SIZE; sem_init(&new_table->lock, 0, 1); return new_table; } Here is my search function to search in the hash table list_t *lookup_string(hash_table_t *hashtable, char *key, int shardId){ list_t *list ; int hashval = hash(key); /* Go to the correct list based on the hash value and see if key is * in the list. If it is, return return a pointer to the list element. * If it isn't, the item isn't in the table, so return NULL. */ sem_wait(&hashtable->lock); for(list = hashtable->table[shardId][hashval]; list != NULL; list =list->next) { if (strcmp(key, list->key) == 0){ sem_post(&hashtable->lock); return list; } } sem_post(&hashtable->lock); return NULL; } And my insert function: char *add_string(hash_table_t *hashtable, char *str,char *key, int shardId){ list_t *new_list; list_t *current_list; unsigned int hashval = hash(key); /*printf("|%d|%d|%s|\n",hashval,shardId,key);*/ /* Lock for concurrency */ sem_wait(&hashtable->lock); /* Attempt to allocate memory for list */ new_list = (list_t*)malloc(sizeof(list_t)); /* Does item already exist? */ sem_post(&hashtable->lock); current_list = lookup_string(hashtable, key,shardId); sem_wait(&hashtable->lock); /* item already exists, don't insert it again. */ if (current_list != NULL){ strcpy(new_list->prevValue,current_list->string); strcpy(new_list->string,str); strcpy(new_list->key,key); new_list->next = hashtable->table[shardId][hashval]; hashtable->table[shardId][hashval] = new_list; sem_post(&hashtable->lock); return new_list->prevValue; } /* Insert into list */ strcpy(new_list->string,str); strcpy(new_list->key,key); new_list->next = hashtable->table[shardId][hashval]; hashtable->table[shardId][hashval] = new_list; /* Unlock */ sem_post(&hashtable->lock); return new_list->prevValue; } My main class runs some of tests by executing the insertion / reading / delete from the elements of the hash table the problem is when i have more than 4 partitions/shards the tests stop at the first reading element saying it returned the wrong value NULL on the search function, when its less than 4 it runs perfectly well and passes all the tests. You can see my main.c in here if you want to give a look: http://hostcode.sourceforge.net/view/1105 My complete Hash table code: http://hostcode.sourceforge.net/view/1103 And other functions where hash table code is executed: .c file http://hostcode.sourceforge.net/view/1104 .h file http://hostcode.sourceforge.net/view/1106 Thank for you time, i appreciate any help you can give to me this is a college important project that I'm trying to solve and I'm stuck here for 2 days.

    Read the article

  • Native API window designer

    - by Ricardo
    Why isn't there a designer for native api forms in Visual Studio? Similar to Delphi? If there exist some programs, tools etc, please advice. What is the best approach to design complex windows in pure API?

    Read the article

  • Best way of showing more results with javascript/css

    - by Ricardo Neves
    I'm developing a website and i'm having troubles showing the search results to the user the way I want. Basically, after the user search, the page makes a couple of ajax requests and as soon as a response arrive it appends the info to a specific element on my page. Each results is shown as a line... The problem is that in most case there are going to be more than 1000 results and this would make the page have a large scroll. My idea was to show only the first 15 results and when the user clicks "show more" the element would expand and show the next 15 results and so on... This would be easier to do if the website wasn't responsive, but because it is I can't find the proper way of implementing what I want without lowering the website perfomance. I have "2 ideas": The first is by using something like #element .div:nth-child(-n+15) on my css and figure a way of changing the "15" to how much results I want to show... I don't know if this can be done. Is it possible to call css rules with parameters? Maybe with less css? The second option is probably a bad option if i don't want to lower the website performance. Using javascript I would check if there is a specific css class(like .show-15 .show30 .show45) and add that class to my element and if it don't exist, create it somehow.. Any help would be appreciated.

    Read the article

  • SQL database self interaction entity

    - by Ricardo Costa
    I've been working on a database, wich is referent to an Aeroport management. I'm having a problem that it's freaking me out.. What i'm trying to do is, assuming that a client wants to know the distance between 2 locations, in miles or kms. As an example, if the user wants to know the distance between London and Amsterdam, should that distance be calculated by a formule or should it be already stored on the database? (1,N) ____________ ____________|__ | | | | | City/Airport |<---------| |______________| How can i show to user the distance between his 2 choices? RicardoCosta

    Read the article

  • Are there any other ways to iterate through the attributes of a custom class, excluding the in-built ones?

    - by Ricardo Altamirano
    Is there another way to iterate through only the attributes of a custom class that are not in-built (e.g. __dict__, __module__, etc.)? For example, in this code: class Terrain: WATER = -1 GRASS = 0 HILL = 1 MOUNTAIN = 2 I can iterate through all of these attributes like this: for key, value in Terrain.__dict__.items(): print("{: <11}".format(key), " --> ", value) which outputs: MOUNTAIN --> 2 __module__ --> __main__ WATER --> -1 HILL --> 1 __dict__ --> <attribute '__dict__' of 'Terrain' objects> GRASS --> 0 __weakref__ --> <attribute '__weakref__' of 'Terrain' objects> __doc__ --> None If I just want the integer arguments (a rudimentary version of an enumerated type), I can use this: for key, value in Terrain.__dict__.items(): if type(value) is int: # type(value) == int print("{: <11}".format(key), " --> ", value) this gives the expected result: MOUNTAIN --> 2 WATER --> -1 HILL --> 1 GRASS --> 0 Is it possible to iterate through only the non-in-built attributes of a custom class independent of type, e.g. if the attributes are not all integral. Presumably I could expand the conditional to include more types, but I want to know if there are other ways I'm missing.

    Read the article

  • Div that follows scroll (not position:fixed)

    - by Ricardo Mustra
    I found it sometime ago and now I can't. I want to find something like the shopping cart at the apple store, it's a div thats not positioned absolute nor fixed, for instance, let's say it's at the center of the screen, and only when you scroll down it follows the scroll only to not disappear, when it reaches the border of the browser header... I'm not sure If i'm being clear. I've searched but all I found is the css position fixed stuff. Can you help me with a link or something? Best Regards

    Read the article

  • jQuery: Hide/Display tabs (and its corresponding content) with check boxes

    - by Ricardo
    Hello, Well, this must be very simple to do for most of you, but I have no idea how to accomplish this. I have a set of tabs and on top of the tabs is a set of checkboxes ; each checkbox 'corresponds' to a tab. What I need is to be able to activate/deactivate each checkbox and have its corresponding tab (and the tab's content) hide/display. Here's my HTML: <div class="show-results-from"> <ul> <li>See results from:</li> <li> <label> <input type="checkbox" name="a" id="a"> Products &amp; Services <span>(16)</span></label> </li> <li> <label> <input type="checkbox" name="b" id="b"> Publications <span>(9)</span></label> </li> <li> <label> <input type="checkbox" name="c" id="c"> Other <span>(150)</span></label> </li> </ul> </div> <ul class="tabs"> <li><span rel="tabs1" class="defaulttab">Products &amp; Services</span></li> <li><span rel="tabs2">Publications</span></li> <li><span rel="tabs3">Other</span></li> </ul> <div class="tab-content" id="tabs1">content</div> <div class="tab-content" id="tabs2">content</div> <div class="tab-content" id="tabs3">content</div> Any help with this is greatly appreciated.

    Read the article

< Previous Page | 3 4 5 6 7 8 9  | Next Page >