Search Results

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

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

  • Resetting a while loop

    - by Patrick Beardmore
    I have found a confusing thing in a php script I am writing to generate some javascript. Here it is below, slightly simplified. The second while loop won't run unless I comment out the entire first while loop. Can anyone explain why? Many thanks. <?php $listid = 2; //DEMO ONLY $result1 = mysql_query("SELECT words.wid,words.wordmd5,words.word FROM words,instances WHERE words.wid = instances.wid AND instances.lid = \"$listid\""); $result1copy = $result1; $count1 = 1; while( $row = mysql_fetch_object( $result1 ) ) { print "words_left[$count1] = \"".$row->word."\";\n"; //Increment the array counter (starts at 1) $count1++; } ?> //Some javascript <?php $count2 = 1; while( $row = mysql_fetch_object( $result1copy ) ) { print " $count2 then $row->wordmd5 "; $count2++; } ?>

    Read the article

  • Mac OS X: getting file system changes of the last minute?

    - by Patrick
    From older times (Mac OS 10.4) I had found this command line on the web somewhere: mdfind '(kMDItemFSContentChangeDate >= $time.now(-60)) && (kMDItemFSContentChangeDate <= $time.now)' it gave me a list of files that where changed in the last minute. This does not work anymore on Mac OS 10.6. Can anybody explain why this doesn't work? And even suggest a working command line?

    Read the article

  • mix together cck imageField and videoField in one ordered list

    - by Patrick
    hi, I'm using imageField and videoField into each node of my website and I'm using multiple files option, so that I have 2 ordered lists. This works great, however I would like to have only 1 ordered list instead of 2, so that my customer can arrange video and images in the same list and ordered them i.e. video1 image1 video2 video3 image2 ... etc thanks

    Read the article

  • PHP: cannot matching string "<br />

    - by Patrick
    hi, I'm having problems with string matching in PHP. I've 2 html elements in my page, I've copy pasted here the content with Firebug <div class="field-item odd"> <div class="field-label-inline-first"> Year:</div> 2009 </div> <div class="field-item odd"> <div class="field-label-inline-first"> Synopsis:</div> &lt;br /&gt; </div> This php line works perfectly (the element with 2009 is detected) <?php if ($items[0]['view'] == '2009') : echo "ok"; ?> However I'm not able to match the string containing element: <?php if ($items[0]['view'] == '<br />') : echo "ok"; ?> //doesn't work <?php if ($items[0]['view'] == '&lt;br /&gt;') : echo "ok"; ?> //again doesn't work any tip ? To give you some context: The strings are produced by CKEditor, an editor I'm using in my Drupal back-end. When I leave empty this editor, the tag is displayed on the string as plain text (because I set "plain text" as formatting option in the back-end) Thanks

    Read the article

  • Drupal: does removing these lines from .htaccess cause security issues ?

    - by Patrick
    hi, I had to comment these lines from the htaccess files in my main Drupal folder and in sites folder # Don't show directory listings for URLs which map to a directory. #Options -Indexes # Follow symbolic links in this directory. #Options +FollowSymLinks ...in order to not get a 500 Internal Error on the new server. Can I leave them uncommented or am I going to have security issues ? ps. I've also set all content in files folder 777 permission. Is this ok ? thanks

    Read the article

  • problem using 'as_json' in my model and 'render :json' => in my controller (rails)

    - by patrick
    Hi everyone. I am trying to create a unique json data structure, and I have run into a problem that I can't seem to figure out. In my controller, I am doing: favorite_ids = Favorites.all.map(&:photo_id) data = { :albums => PhotoAlbum.all.to_json, :photos => Photo.all.to_json(:favorite => lambda {|photo| favorite_ids.include?(photo.id)}) } render :json => data and in my model: def as_json(options = {}) { :name => self.name, :favorite => options[:favorite].is_a?(Proc) ? options[:favorite].call(self) : options[:favorite] } end The problem is, rails encodes the values of 'photos' & 'albums' (in my data hash) as JSON twice, and this breaks everything... The only way I could get this to work is if I call 'as_json' instead of 'to_json': data = { :albums => PhotoAlbum.all.as_json, :photos => Photo.all.as_json(:favorite => lambda {|photo| favorite_ids.include?(photo.id)}) } However, when I do this, my :favorite = lambda option no longer makes it into the model's as_json method.......... So, I either need a way to tell 'render :json' not to encode the values of the hash so I can use 'to_json' on the values myself, or I need a way to get the parameters passed into 'as_json' to actually show up there....... I hope someone here can help... Thanks!

    Read the article

  • FLEX, Actionscript: how can I invoke a CustomEvent ?

    - by Patrick
    hi, I've created a custom MouseEvent in Flex: package { import flash.events.MouseEvent; public class CustomMouseEvent extends MouseEvent { public var tags:Array = new Array(); public function CustomMouseEvent(type:String, tags:Array) { super(type, true); this.tags = tags; } } } Now I would like to understand how to pass the parameter tags from both Actionscript and MXML: From actionscript I'm trying something like this, but it doesn't work: newTag.addEventListener(MouseEvent.MOUSE_UP, dispatchEvent(new CustomMouseEvent(MouseEvent.MOUSE_UP,[newTag.name]))); From MXML i'm doing this and it doesn't work as well: <mx:LinkButton click="dispatchEvent(new CustomMouseEvent(MouseEvent.MOUSE_UP, bookmarksRepeater.currentItem.tags))" /> thanks

    Read the article

  • FLEX: how to ignore MouseEvents from the container ?

    - by Patrick
    hi, I've some objects on the canvas, and I added eventListeners to these objects for MOUSE_UP event. I'm know checking if it works by tracing e.target.name, and I found out that the event is triggered twice, before on the element container (Canvas) and then the element itself. I read several times the documentation about Capture, Bubbling etc.. but I don't understand how to trigger the events only from the element itself... child.addEventListener(MouseEvent.MOUSE_UP, updateSelectedTags); private function updateSelectedTags(e:MouseEvent):void { Alert.show(e.currentTarget.name); //I have 2 alerts, one for canvas, the other one for the child } } thanks

    Read the article

  • Why doesn't these links work in IE7 ?

    - by Patrick
    hi, I don't understand why I cannot click the tags on top in IE7 on this website: http://www.sanstitre.ch/drupal/portfolio?tid[0]=38http://www.sanstitre.ch/drupal/portfolio?tid[0]=38 It says javascript error but I debugged with Firefox and I don't get any error... Could you give me some help ?

    Read the article

  • Background text in a Bootstrap WELL

    - by patrick
    I have a problem putting a text in the background of a Bootstrap well. I first posted the problem in this question, but that was a too simple representation of my problem. I'm looking for an effect created in this jFiddle, a text in the background of a menu. The example works how I want to to work, but when I put this in a Bootstrap Well I get this (http://jsfiddle.net/aBqw8/21/). The background text disappears, it's probably behind the Well. When I remove the background color from the well I can see the text. If I remove the "position:relative" from the span it shows the title, but then it interferes with the menu, which is what I am trying to avoid. Thanks for your help!

    Read the article

  • should i move the config file from codeigniter directory

    - by Patrick
    I've just published my site, created with codeigniter. the entire directory is in my public folder, including the config file (in public/system/application/config). I just wanted to double check: do I have to move this file to another, non public, directory? I think codeigniter doesn't allow any direct access, but I am not 100% sure.. thanks, P.

    Read the article

  • HTML - Javascript: I cannot click on the links on top in IE7

    - by Patrick
    hi, I cannot click on the links (tags) on top of the page in IE7. I tried to change z-index of the elements but it doesn't work. Could you tell me what's wrong with it ? http://www.sanstitre.ch/drupal/portfolio?tid[0]=38 The mouse click is handled by jQuery function .click() I'm sure javascript works because" Hide - Alphabetical Order menus" work thanks

    Read the article

  • SELECT DISTINCT multiple field search?

    - by Patrick
    I'm trying to search multiple fields zc_city and zc_zip for when user input and then return row results for zc_city zc_state and zc_zip $q = strtolower($_GET["q"]); if (!$q) return; $sql = "SELECT DISTINCT zc_city AS zcity FROM search_zipcodes WHERE zc_city LIKE '$q%'"; $rsd = mysql_query($sql); while($rs = mysql_fetch_array($rsd)) { $zcity = $rs['zcity']; echo "$zcity\n"; }

    Read the article

  • Generic SQL builder .NET

    - by Patrick
    I'm looking for a way to write an SQL statement in C# targeting different providers. A typical example of SQL statements differentiating is the LIMIT in PostgreSQL vs. TOP in MSSQL. Is the only way to solve SQL-syntax like the two above to write if-statements depending on which provider the user selects or using try catch statements as flow control (LIMIT didn't work, I'll try TOP instead)? I've seen the LINQ Take method, but I'm wondering if one can do this without LINQ? In other words, does C# have some generic SQL Provider class that I have failed to find that can be used?

    Read the article

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