Search Results

Search found 2301 results on 93 pages for 'calico cat'.

Page 40/93 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • How to use NSPredicate to catch child objects?

    - by Konstantin
    I'm new to core data and try to get all children objects of various types with one query. Say there's an "Animal" type as parent and "Cat", "Dog" and "Bird" as children. I'd like to get both cats and dogs, but not Birds in single query returned as Animal objects. Is it possible?

    Read the article

  • Do fluent interfaces violate the Law of Demeter?

    - by Jakub Šturc
    The wikipedia article about Law of Demeter says: The law can be stated simply as "use only one dot". However a simple example of a fluent interface may look like this: static void Main(string[] args) { new ZRLabs.Yael.Pipeline("cat.jpg") .Rotate(90) .Watermark("Monkey") .RoundCorners(100, Color.Bisque) .Save("test.png"); } So does this goes together?

    Read the article

  • Java: how to use 3rd-party library?

    - by HH
    $ cat MultiTest.java import com.*; // CODE $ javac Code.java MultiTest.java:1: package com does not exist import com.*; ^ Google Collections Com-dir in the dir where the MultiTest.java -file is located.

    Read the article

  • PHP: How to find most used array key?

    - by oni-kun
    Lets say I have a simple 1D array with 10-20 entries. Some will be duplicate, How would I find out which entry is used the most? like.. $code = Array("test" , "cat" , "test" , "this", "that", "then"); How would I show "test" as the most used entry?

    Read the article

  • prepend to a file one liner shell?

    - by elmarco
    This is probably a complex solution. I am looking for a simple operator like "", but for prepending. I am afraid it does not exist. I'll have to do something like mv $F tmp cat header tmp $F Anything smarter? (I am not fond of tmp files)

    Read the article

  • Regex for finding an unterminated string

    - by Austin Hyde
    I need to search for lines in a CSV file that end in an unterminated, double-quoted string. For example: 1,2,a,b,"dog","rabbit would match whereas 1,2,a,b,"dog","rabbit","cat bird" 1,2,a,b,"dog",rabbit would not. I have very limited experience with regular expressions, and the only thing I could think of is something like "[^"]*$ However, that matches the last quote to the end of the line. How would this be done?

    Read the article

  • Replace Loops in R function

    - by David Hicks
    Hi, I'm new to R, and I'm having trouble figuring out how to replace the FOR loop in the function below. The function estimates a population mean. Any help at all would be much appreciated. Thank you! myFunc<- function(){ myFRAME <- read.csv(file="2008short.csv",head=TRUE,sep=",") meanTotal <- 0 for(i in 1:100) { mySample <- sample(myFRAME$TaxiIn, 100, replace = TRUE) tempMean <- mean(mySample) meanTotal <- meanTotal + tempMean } cat("Estimated Mean: ", meanTotal/100, "\n") #print result }

    Read the article

  • PHP mkdir issue!

    - by Richard González Alberto
    Hi, I trying to create some dirs like this: @mkdir("photos/$cat/$sku", 0777, true) it creates the first directory with 0777 permissions, but when it creates the second is uses 000 as it's perms, so it fails to create the third. A workaround this please? Thanks, Richard.

    Read the article

  • How can I position some divs inside an unordered list so they line up with the root element of the l

    - by Ronedog
    I want to position all the divs to line up to the left on the same x coordinate so it looks nice. Notice the picture below, how based on the number of nested categories the div (and its contents) show up at slightly different x coordinates. I need to have the div's line up at exactly the same x coordinate no matter how deeply nested. Note, the bottom most category always has a div for the content, but that div has to be situated inside the last < li . I am using an unordered list to display the menu and thought the best solution would be to grab the root category (Cat 2, and mCat1) and obtain their left offset using jquery, then simply use that value to update the positioning of the div...but I couldn't seem to get it to work just right. I would appreciate any advice or help that you are willing to give. Heres the HTML <ul id="nav> <li>Cat 2 <ul> <li>sub cat2</li> </ul> </li> <li>mCat1 <ul> <li>Subcat A <ul> <li>Subcat A.1 <ul> <li>Annie</li> </ul> </li> </ul> </li> </ul> </li> </ul> Heres some jquery I tried (I have do insert the div inside this .each() loop in order to retrieve some values, but basically, this selector is grabbing the last < li in the menu tree and placing a div after it and that is the div that I want to position. the 245 value was something I was playing around with to see how I could get things to line up, and I know its out of wack, but the problem is still the same no matter what I do: $("#nav li:not(:has(li))").each(function () { var self = $(this); var position = self.offset(); var xLeft = Math.round(position.left)- 245; console.log("xLeft:", xLeft ); self.after( '<div id="' + self.attr('p_node') + '_p_cont_div" class="property_position" style="display:none; left:' + xLeft + 'px;" /> ' ); }); Heres the css: .property_position{ float:left; position: relative; top: 0px; padding-top:5px; padding-bottom:10px; }

    Read the article

  • While loop: Output something different on every second result

    - by Wade D Ouellet
    Hi, I am running a plugin called Category Posts Widget for WordPress: http://wordpress.org/extend/plugins/category-posts/ It uses a while loop to display the names of all posts in a certain category. I want to get it so that there is a different class attached to the li tag on every second output. Here is the block of code for the plugin: // Post list echo "<ul>\n"; while ( $cat_posts->have_posts() ) { $cat_posts->the_post(); ?> <li class="cat-post-item"> <a class="post-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> <?php if ( function_exists('the_post_thumbnail') && current_theme_supports("post-thumbnails") && $instance["thumb"] && has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?> </a> <?php endif; ?> <?php if ( $instance['date'] ) : ?> <p class="post-date"><?php the_time("j M Y"); ?></p> <?php endif; ?> <?php if ( $instance['excerpt'] ) : ?> <?php the_excerpt(); ?> <?php endif; ?> <?php if ( $instance['comment_num'] ) : ?> <p class="comment-num">(<?php comments_number(); ?>)</p> <?php endif; ?> </li> <?php } echo "</ul>\n"; I am just trying to get it so on each second one in the output list, the li has a different class, so cat-post-item-alt for example. Thanks, Wade

    Read the article

  • How do I concatenate a lot of files into one inside Hadoop, with no mapping or reduction

    - by Leonard
    I'm trying to combine multiple files in multiple input directories into a single file, for various odd reasons I won't go into. My initial try was to write a 'nul' mapper and reducer that just copied input to output, but that failed. My latest try is: vcm_hadoop lester jar /vcm/home/apps/hadoop/contrib/streaming/hadoop-*-streaming.jar -input /cruncher/201004/08/17/00 -output /lcuffcat9 -mapper /bin/cat -reducer NONE but I end up with multiple output files anyway. Anybody know how I can coax everything into a single output file?

    Read the article

  • execute a command

    - by lakshmipathi
    I have script file where a command is stored in a variable First i got the command (assume "ls -l " command) cmd= cat /proc/2345/cmdline now doing echo $cmd outputs ls -l Now how to use $cmd to actually execute that command. which is ls -l

    Read the article

  • Is it possible to pass the value in php file using Ajax.Request?

    - by user309381
    function reload(form) { var val = $('seltab').getValue(); new Ajax.Request('Website.php?$cat = val', { method:'post', onSuccess: function(transport){ ..... code in php: echo "<select id = seltab onchange='reload(this.form)'>"; $querysel = "SELECT title_id,author FROM authors NATURAL JOIN books"; $result1 = mysql_query($querysel) ; while($rowID = mysql_fetch_assoc($result1)) {

    Read the article

  • linux grep question

    - by lepricon123
    how do i find a string in files in a directory. And these file names begin with letter a. I also want to get the number of occurrences of this string fromt he grep I run. I tried this cat * | grep -c string but it searches all files. I just want to search files that begin with letter a Thanks

    Read the article

  • Java: using foreach over strings from arrayList does not print anything

    - by HH
    $ javac ArrayListTest.java $ java ArrayListTest $ cat ArrayListTest.java import java.io.*; import java.util.*; public class ArrayListTest{ public static void main(String[] args) { try { String hello ="oeoaseu oeu hsoae sthoaust hoaeut hoasntu"; ArrayList<String> appendMe = null; for(String s : hello.split(" ")) appendMe.add(s+" "); for(String s : appendMe) System.out.println(s); //WHY DOES IT NOT PRINT? }catch(Exception e){ } } }

    Read the article

  • How to move a google doc into a folder using Zend Gdata

    - by Andre
    Hi Guys I am really struggling with moving a document from my root folder to another folder using zend gdata here is how i am trying to do it, but its not working. $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($gUser, $gPass, $service); $link = "https://docs.google.com/feeds/documents/private/full/spreadsheet:0AUFNVEpLOVg2U0E"; // Not real id for privacy purposes $docs = new Zend_GData_Docs($client); // Attach a category object of folder to this entry // I have tried many variations of this including attaching label categories $cat = new Zend_Gdata_App_Extension_Category('My Folder Name','http://schemas.google.com/docs/2007#folder'); $entry = $docs->getDocumentListEntry($link); $entry->setCategory(array($cat)); $return = $docs->updateEntry($entry,$entry->getEditLink()->href); When I run this I get No errors, but nothing seems to change, and the return data does not contain the new category. EDIT: Ok I realised that its not the category but the link that decides which "collection" (folder) a resource belongs too. https://developers.google.com/google-apps/documents-list/#managing_collections_and_their_contents says that each resource has as et of parent links, so I tried changing my code to do set link instead of set category, but this did not work. $folder = "https://docs.google.com/feeds/documents/private/full/folder%3A0wSFA2WHc"; $rel = "http://schemas.google.com/docs/2007#parent"; $linkObj = new Zend_Gdata_App_Extension_Link($folder,$rel,'application/atom+xml', NULL,'Folder Name'); $links = $entry->getLink(); array_push($links,$linkObj); $entry->setLink($links); $return = $docs->updateEntry($entry,$entry->getEditLink()->href); EDIT: SOLVED [nearly] OK Here is how to move/copy, sort of, from one folder to another: simpler than initially thought, but problem is it creates a reference and NOT a move! It now in both places at the same time.... // Folder you wnat to move too $folder = "https://docs.google.com/feeds/folders/private/full/folder%asdsad"; $data = $docs->insertDocument($entry, $folder); // Entry is the entry you want moved using insert automatically assigns link & category for you...

    Read the article

  • Float: left not showing up after a certain point.

    - by Bobby K
    http://test.jptgraphics.com/products?cat=APPAREL This works fine in Safari but shows incorrectly in the latest version of Firefox ( was fine in 3.5) and in some versions of IE. In the middle column the product thumbnails drop down below when the 'float: left;' parameter is used. It is as if it is being escaped by a tag from that point forward no 'float: left's work and all the items are centered moving forward.

    Read the article

  • Finding a Minimum Equivalent Graph of a Digraph

    - by kohlerm
    I'm looking for an implementation preferably in Java of an algorithm for finding a Minimum Equivalent Graph of a Digraph (http://portal.acm.org/citation.cfm?id=321526.321534). Even better would be an implementation of "Approximating the minimum equivalent digraph" http://cat.inist.fr/?aModele=afficheN&cpsidt=3634076 (requires ACM membership, sorry) alternative link http://www.cs.umd.edu/~samir/grant/kry94b.ps (postscript)

    Read the article

  • How can I extract all quotations in a text?

    - by secr
    I'm looking for a SimpleGrepSedPerlOrPythonOneLiner that outputs all quotations in a text. Example 1: echo “HAL,” noted Frank, “said that everything was going extremely well.” | SimpleGrepSedPerlOrPythonOneLiner stdout: "HAL," "said that everything was going extremely well.” Example 2: cat MicrosoftWindowsXPEula.txt | SimpleGrepSedPerlOrPythonOneLiner stdout: "EULA" "Software" "Workstation Computer" "Device" "DRM" etc. (link to the corresponding text).

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >