Search Results

Search found 922 results on 37 pages for 'patrick pellegrino'.

Page 33/37 | < Previous Page | 29 30 31 32 33 34 35 36 37  | Next Page >

  • CSS: is there any way to have the same relative positioning even if the previous element have differ

    - by Patrick
    hi, I have a sequence of couples of elements. (.div1, .div2) I'm using position:relative attribute on .div2 to move it a bit on top and right with respect to div1. However .div1 elements have different content and heights, so the relative positioning of .div2 is not consistent (they sometimes are too high, sometimes too low). .div2 { position:relative; left:200px; top:-300; } thanks

    Read the article

  • Drupal: $form['#redirect'] = FALSE; doesn't work.

    - by Patrick
    hi, I've tried to change the redirection when I submit my edit-node form, by addming the following line to my template.php file, in my theme $form['#redirect'] = FALSE; I'm sure the template.php file works well because I have other lines in which I change, for example, the weights of some elements. But the redirection doesn't work. I've also tried $form['#redirect'] = 'anotherPage'; without success. What am I doing wrong ? I'm following the Drupal APIs, about forms: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#redirect thanks

    Read the article

  • What's an effective way to reuse ArrayLists in a for loop?

    - by Patrick
    hi, I'm reusing the same ArrayList in a for loop, and I use for loop results = new ArrayList<Integer>(); experts = new ArrayList<Integer>(); output = new ArrayList<String>(); .... to create new ones. I guess this is wrong, because I'm allocating new memory. Is this correct ? If yes, how can I empty them ? Added: another example I'm creating new variables each time I call this method. Is this good practice ? I mean to create new precision, relevantFound.. etc ? Or should I declare them in my class, outside the method to not allocate more and more memory ? public static void computeMAP(ArrayList<Integer> results, ArrayList<Integer> experts) { //compute MAP double precision = 0; int relevantFound = 0; double sumprecision = 0; thanks

    Read the article

  • Why is this condition never satisfied ?

    - by Patrick
    I don't know why this condition is never satisfied: I'm comparing two ArrayList values, and it is always false. if ( (Integer) results.get(rank) == (Integer) experts.get(j)) I'm debugging and I have exactly the same 2 values: 3043 and 3043 However it doesn't work. thanks

    Read the article

  • Going from web browser to web request

    - by Patrick
    I am working on a program that automates tasks in a browser like entering text, clicking, etc and right now everything is working fine when using the Web Browser tool in Visual Studio 2010. What I'd like to know is how should I approach converting all of this so I can use send requests instead of the browser? I heard its a lot more efficient and a lot better if you are going to be using multi threading but I have so much code that already works now and am not sure how I should do this without scraping quite a bit of it.

    Read the article

  • Why use third-party vector libraries at all?

    - by Patrick Powns
    So I'm thinking of using the Eigen matrix library for a project I'm doing (2D space simulator). I just went ahead and profiled some code with Eigen::Vector2d, and with bare arrays. I noticed a 10x improvement in assigning values to elements in the array, and a 40x improvement in calculating the dot products. Here is my profiling if you want to check it out, basically it's ~4.065s against ~0.110s. Obviously bare arrays are much more efficient at dot products and assigning stuff. So why use the Eigen library (or any other library, Eigen just seemed the fastest)? Is it stability? Complicated maths that would be hard to code by yourself efficiently?

    Read the article

  • MySQL select column length in php

    - by Patrick
    Hello! How do i get the actual max length of a specified column in php? For instance, this table: id - int(11) name - string(20) I want in php to select the maximum number of characters that a field can have, like SELECT length(name) from table1 and it should then return 20 (since its the maximum number of characters for that field).

    Read the article

  • align input text with label in my Search gadget

    - by Patrick
    hi, I would like to align the label of my search widget with the input text (they are slightly not aligned on all browsers). Any css tip ? thanks This is my code: Search <span class="views-widget"> <span id="edit-search-wrapper" class="form-item"> <input type="text" class="form-text" title="Enter the terms you wish to search for." value="" size="15" id="edit-search" name="search" maxlength="128"> </span> </span> </div>

    Read the article

  • Calculating percent "x/y * 100" always results in 0?

    - by Patrick Beninga
    In my assignment i have to make a simple version of Craps, for some reason the percentage assignments always produce 0 even when both variables are non 0, here is the code. import java.util.Random; Header, note the variables public class Craps { private int die1, die2,myRoll ,myBet,point,myWins,myLosses; private double winPercent,lossPercent; private Random r = new Random(); Just rolls two dies and produces their some. public int roll(){ die1 = r.nextInt(6)+1; die2 = r.nextInt(6)+1; return(die1 + die2); } The Play method, this just loops through the game. public void play(){ myRoll = roll(); point = 0; if(myRoll == 2 ||myRoll == 3 || myRoll == 12){ System.out.println("You lose!"); myLosses++; }else if(myRoll == 7 || myRoll == 11){ System.out.println("You win!"); myWins++; }else{ point = myRoll; do { myRoll = roll(); }while(myRoll != 7 && myRoll != point); if(myRoll == point){ System.out.println("You win!"); myWins++; }else{ System.out.println("You lose!"); myLosses++; } } } This is where the bug is, this is the tester method. public void tester(int howMany){ int i = 0; while(i < howMany){ play(); i++; } bug is right here in these assignments statements winPercent = myWins/i * 100; lossPercent = myLosses/i* 100; System.out.println("program ran "+i+" times "+winPercent+"% wins "+ lossPercent+"% losses with "+myWins+" wins and "+myLosses+" losses"); } }

    Read the article

  • Please explain this delete top 100 SQL syntax

    - by Patrick
    Basically I want to do this: delete top( 100 ) from table order by id asc but MS SQL doesn't allow order in this position The common solution seems to be this: DELETE table WHERE id IN(SELECT TOP (100) id FROM table ORDER BY id asc) But I also found this method here: delete table from (select top (100) * from table order by id asc) table which has a much better estimated execution plan (74:26). Unfortunately I don't really understand the syntax, please can some one explain it to me? Always interested in any other methods to achieve the same result as well. EDIT: I'm still not getting it I'm afraid, I want to be able to read the query as I read the first two which are practically English. The above queries to me are: delete the top 100 records from table, with the records ordered by id ascending delete the top 100 records from table where id is anyone of (this lot of ids) delete table from (this lot of records) table I can't change the third one into a logical English sentence... I guess what I'm trying to get at is how does this turn into "delete from table (this lot of records)". The 'from' seems to be in an illogical position and the second mention of 'table' is logically superfluous (to me).

    Read the article

  • javascript - Google Chrome cluttering Array generated from .split()

    - by patrick
    Given the following string: var str = "one,two,three"; If I split the string on the commas, I normally get an array, as expected: var arr = str.split(/\s*,\s*/); Trouble is that in Google Chrome (for Mac), it appends extra properties to the array. Output from Chrome's debugger: arr: Array 0: one 1: two 2: three constructor: function Array() index: undefined input: undefined length: 3 So if I iterate over the array with a for/in loop, it iterates over the new properties. Specifically the input and index properties. Using hasOwnProperty doesn't seem to help. A fix would be to do a for loop based on the length of the Array. Still I'm wondering if anyone has insight into why Chrome behaves this way. Firefox and Safari don't have this issue.

    Read the article

  • CSS Style Firefox/Safari/Chrome

    - by patrick
    hi, i have a problem with css differences between browsers. i have a simple input textfield an a submit button. the should be arranged. with webkit (safari/webkit) everything looks fine but firefox doesnt do it. does anyone have an idea whats wrong? i have written a little test html page: <html> <head> <style type="text/css"> #input { background: none repeat scroll 0 0 white; border-color: #DCDCDC; border-style: solid; border-width: 1px 0 1px 1px; font: 13px "Lucida Grande",Arial,Sans-serif; margin: 0; padding: 5px 5px 5px 15px; width: 220px; outline-width: 0; height: 30px; } #submit { background: none repeat scroll 0 0 white; border: 1px solid #DCDCDC; font: 13px "Lucida Grande",Arial,Sans-serif; margin: 0; outline-width: 0; height: 30px; padding: 5px 10px; } </style> </head> <body> <input id="input" type="text" value="" /><input id="submit" type="button" value="Add" /> </body> </html>

    Read the article

  • drupal: [title] token... not filtered !?!

    - by Patrick
    hi, I'm using path auto module to automatically stores images in the projects subfolder. I'm using the [title] token and I had a unpleasent surprise: the title "abc / dce", creates 2 folders. I was not expecting this because in the pattern descrition, [title] is clearly distinguished by [title-raw]. [title] Node title [title-raw] Unfiltered node title. WARNING - raw user input. So, how can I fix this issue, I would like to use the title I have in the url "abc-dce" thanks

    Read the article

  • Error - Trying to get property of non-object

    - by Patrick Lanfranco
    I am currently getting this error on one of my files: /var/www/vhosts/httpdocs/generator/index.php on line 6 Line 6 would be resulting in: echo $results->GetBookCodesResult->BookCodes->BookInfo->ServiceCode; My code: <?php $config['soap_url'] = "http://myservice.com?WSDL"; if(isset($_REQUEST['codes'])) { $results = request_Data(explode("\n",$_REQUEST['codes'])); echo $results->GetBookCodesResult->BookCodes->BookInfo->ServiceCode; } .... What is the best method to have this fixed? Some advice would be appreciated.

    Read the article

  • CSS, HTML: Internet Explorer 7 doesn’t move the term to the next line

    - by Patrick
    hi, how can I fix this problem on Internet Explorer 7: If I resize the browser window you'll see that the letters of the last tag on the right (in the header) are displayed in vertical one above each other. This happen only in IE, and not in other browser (you can better see the bug by visiting the website: http://www.sanstitre.ch/drupal/portfolio How can I ask IE 7 to consider the word as block, and move it to next line instead of listing the letters in vertical ? thanks

    Read the article

  • How to share javascript libraries in between components of my website (i.e. lightbox)

    - by Patrick
    Can I share javascript libraries I've loaded in part of my website, with other components ? For example, I'm loading a node of my drupal website into a lightbox (rel="lightmodal"), so it is not a frame. I would like to have access from the content of the lightbox to qtip.js library (at the moment I'm using its functions but it doesn't find the library, so it doesn't work..) thanks

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37  | Next Page >