Search Results

Search found 53464 results on 2139 pages for 'find and replace'.

Page 15/2139 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Java - Could not find the main class?

    - by asmo
    I'm having a hard-time with a Java error. I'm getting this when double-clicking on my compiled project Jar file in order to run it: Could not find the main class: testPackage.testFrame. Program will exit. However, my main class is cleary defined in the project properties. Furthermore, everything works fine when I run the project directly from NetBeans. I'm using the ip2c.jar third-party library to determine countries from IP addresses. If I comment the class that is using the ip2c.jar file, I don't get the error. How can a third-party library be preventing the JVM from finding my main class?

    Read the article

  • How to find rows between other rows w/ID then add class

    - by Ravex
    Hi guys. i'm stuck with my table. need create toggle rows function. but i no idea how to find sub rows in table. Some one can help me? I have table with many rows 500 All Rows have class="row-1,row-2.....row-600 etc" And all main rows also have class="parent" between each "parent" rows i have 6 rows So i need for toggle/collapse purposes find all (sub)rows betwen parent rows. and add class with id like in prevous parent row. For example: parent have class="row-1 parent" all sub must have - class="child-row-1" default table <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table> in the end it should look like this: <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even child-row-1"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd child-row-1"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table>

    Read the article

  • Algorithm to find added/removed elements in an array

    - by jj
    Hi all, I am looking for the most efficent way of solving the following Problem: given an array Before = { 8, 7, 2, 1} and an array After ={1, 3, 8, 8} find the added and the removed elements the solution is: added = 3, 8 removed = 7, 2, 1 My idea so far is: for i = 0 .. B.Lenghtt-1 { for j= 0 .. A.Lenght-1 { if A[j] == B[i] A[j] = 0; B[i] = 0; break; } } // B elemnts different from 0 are the Removed elements // A elemnts different from 0 are the Added elemnts Does anyone know a better solution perhaps more efficent and that doesn't overwrite the original arrays

    Read the article

  • Cakephp, Retreive Data for HABTM Models using conditional find

    - by ion
    There are 2 Models: Project & Category that are bind with HABTM relationship. I would like to perform a search from projects controller that can do the following: FIND all DISTINCT Project.scedule WHERE Category.slug != 'uncategorised' Apologies for the syntax, I'm no sequel expert. What I have managed to do is to retrieve all projects that do not belong to Category uncategorised into an array however I'm not sure as to how to search again the array result for DISTINCT Project.schedule values (needed to fill out a form drop down) I hope I made myself clear.

    Read the article

  • How to replace part of an input value in jquery?

    - by WonderBugger
    I've been trying to figure out a way to replace part of a string in an input value, but haven't been able to get it working. the input field looks like this: <input type="text" value="20,54,26,99" name="ids" /> I've tried: $('input[name=ids]').val().replace("54,",""); and var replit = $('input[name=ids]').val(); replit.replace("54,",""); $('input[name=ids]').val(replit); but neither worked?

    Read the article

  • R: How to replace elements of a data.frame?

    - by John
    I'm trying to replace elements of a data.frame containing "#N/A" with "NULL", and I'm running into problems: foo <- data.frame("day"= c(1, 3, 5, 7), "od" = c(0.1, "#N/A", 0.4, 0.8)) indices_of_NAs <- which(foo == "#N/A") replace(foo, indices_of_NAs, "NULL") Error in [<-.data.frame(*tmp*, list, value = "NULL") : new columns would leave holes after existing columns I think that the problem is that my index is treating the data.frame as a vector, but that the replace function is treating it differently somehow, but I'm not sure what the issue is?

    Read the article

  • Visual Studio 2010 Find and Replace With Regular Expressions

    - by Lance Robinson
    Here is a quick notes about using regular expressions in the VS2010 Find Replace dialog.  1.  To create a backreference, use curly braces (“{“ and “}” ) instead of regular parentheses. 2.  To use the captured backreference, use \1\2 etc, where \1 is the first captured value, \2 is the second captured value, etc. Example: I want to find*: info.setFieldValue(param1, param2); and replace it with: SetFieldValue(info, param1, param2); To do this, I can use the following find/replace values: Find what: {[a-zA-Z0-9]+}.setFieldValue\({[a-zA-Z0-9., ]+}\); Replace with: SetFieldValue(\1, \2); Use Regular Expressions is checked, of course. *If you’re wondering why I’d want to do this – because I don’t have control over the setFieldValue function – its in a third party library that doesn’t behave in a very friendly manner. Technorati Tags: Visual Studio,Regular Expressions

    Read the article

  • Change find method in database search so that it isn't case sensitive in Rails app

    - by Ryan
    Hello, I am learning Rails and have created a work-in-progress app that does one-word searches on a database of shortcut keys for various programs (http://keyboardcuts.heroku.com/shortcuts/home). The search method in the Shortcut model is the following: def self.search(search) search_condition = "%" + search + "%" find(:all, :conditions => ['action LIKE ? OR application LIKE ?', search_condition, search_condition]) end ...where 'action' and 'application' are columns in a SQLite table. (source: https://we.riseup.net/rails/simple-search-tutorial) For some reason, the search seems to be case sensitive (you can see this by searching 'Paste' vs. 'paste'). Can anyone help me figure out why and what I can do to make it not case sensitive? If not, can you at least point me in the right direction? Database creation: I first copied shortcuts from various website into Excel and saved it as a CSV. Then I migrated the database and filled it with the data using db:seed and a small script I wrote (I viewed the database and it looked fine). To get the SQLite database to the server, I used Taps as outline by the Heroku website (http://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/). I am using Ubuntu. Please let me know if you need more information. Thanks in advance for you help, very much appreciated! Ryan

    Read the article

  • beautifulsoup: find the n-th element's sibling

    - by deostroll
    I have a complex html DOM tree of the following nature: <table> ... <tr> <td> ... </td> <td> <table> <tr> <td> <!-- inner most table --> <table> ... </table> <h2>This is hell!</h2> <td> </tr> </table> </td> </tr> </table> I have some logic to find out the inner most table. But after having found it, I need to get the next sibling element (h2). Is there anyway you can do this?

    Read the article

  • C++ find largest BST in a binary tree

    - by fonjibe
    what is your approach to have the largest BST in a binary tree? I refer to this post where a very good implementation for finding if a tree is BST or not is bool isBinarySearchTree(BinaryTree * n, int min=std::numeric_limits<int>::min(), int max=std::numeric_limits<int>::max()) { return !n || (min < n->value && n->value < max && isBinarySearchTree(n->l, min, n->value) && isBinarySearchTree(n->r, n->value, max)); } It is quite easy to implement a solution to find whether a tree contains a binary search tree. i think that the following method makes it: bool includeSomeBST(BinaryTree* n) { if(!isBinarySearchTree(n)) { if(!isBinarySearchTree(n->left)) return isBinarySearchTree(n->right); } else return true; else return true; } but what if i want the largest BST? this is my first idea, BinaryTree largestBST(BinaryTree* n) { if(isBinarySearchTree(n)) return n; if(!isBinarySearchTree(n->left)) { if(!isBinarySearchTree(n->right)) if(includeSomeBST(n->right)) return largestBST(n->right); else if(includeSomeBST(n->left)) return largestBST(n->left); else return NULL; else return n->right; } else return n->left; } but its not telling the largest actually. i struggle to make the comparison. how should it take place? thanks

    Read the article

  • What's the difference between find and findstr commands in Windows?

    - by Prashant Bhate
    In Windows, what are the differences between find and findstr commands? Both seems to search text in files: find c:\>find /? Searches for a text string in a file or files. FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]] /V Displays all lines NOT containing the specified string. /C Displays only the count of lines containing the string. /N Displays line numbers with the displayed lines. /I Ignores the case of characters when searching for the string. /OFF[LINE] Do not skip files with offline attribute set. "string" Specifies the text string to find. [drive:][path]filename Specifies a file or files to search. If a path is not specified, FIND searches the text typed at the prompt or piped from another command. findstr c:\>findstr /? Searches for strings in files. FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file] [/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]] strings [[drive:][path]filename[ ...]] /B Matches pattern if at the beginning of a line. /E Matches pattern if at the end of a line. /L Uses search strings literally. /R Uses search strings as regular expressions. /S Searches for matching files in the current directory and all subdirectories. /I Specifies that the search is not to be case-sensitive. /X Prints lines that match exactly. /V Prints only lines that do not contain a match. /N Prints the line number before each line that matches. /M Prints only the filename if a file contains a match. /O Prints character offset before each matching line. /P Skip files with non-printable characters. /OFF[LINE] Do not skip files with offline attribute set. /A:attr Specifies color attribute with two hex digits. See "color /?" /F:file Reads file list from the specified file(/ stands for console). /C:string Uses specified string as a literal search string. /G:file Gets search strings from the specified file(/ stands for console). /D:dir Search a semicolon delimited list of directories strings Text to be searched for. [drive:][path]filename Specifies a file or files to search. Use spaces to separate multiple search strings unless the argument is prefixed with /C. For example, 'FINDSTR "hello there" x.y' searches for "hello" or "there" in file x.y. 'FINDSTR /C:"hello there" x.y' searches for "hello there" in file x.y. Regular expression quick reference: . Wildcard: any character * Repeat: zero or more occurances of previous character or class ^ Line position: beginning of line $ Line position: end of line [class] Character class: any one character in set [^class] Inverse class: any one character not in set [x-y] Range: any characters within the specified range \x Escape: literal use of metacharacter x \<xyz Word position: beginning of word xyz\> Word position: end of word For full information on FINDSTR regular expressions refer to the online Command Reference.

    Read the article

  • Find next and previous link in a hierarchy

    - by rebellion
    I have a hierarchy with links nested in list element like this: <ul> <li><a href="#">Page 1</a> <ul> <li><a href="#">Page 1.1</a></li> <li><a href="#">Page 1.2</a> <ul> <li><a href="#">Page 1.2.1</a></li> <li><a href="#">Page 1.2.2</a></li> </ul> </li> <li><a href="#">Page 1.3</a></li> </ul> </li> <li><a href="#">Page 2</a> <ul> <li><a href="#">Page 2.1</a></li> <li><a href="#">Page 2.2</a></li> </ul> </li> <li><a href="#">Page 3</a> <ul> <li><a href="#">Page 3.1</a> <ul> <li><a href="#">Page 3.1.1</a></li> <li><a href="#">Page 3.1.2</a></li> </ul> <li><a href="#">Page 3.2</a></li> <li><a href="#">Page 3.3</a></li> <ul> <li><a href="#">Page 3.1.1</a></li> <li><a href="#">Page 3.1.2</a></li> </ul> </li> </ul> </li> </ul> Basically just a sitemap. But I want to make next and previous links with jQuery, which finds the active page you're on (probably by checking for a class), and finding the previous and next anchor element (taking no regards of the hierarchy). I've tried with next(), previous() and find() but can't seem to get it to work. What is the easiest way to get the anchor elements before and after the current one?

    Read the article

  • C# RegEx - find html tags (div and anchor)

    - by czesio
    Hi I have to retrieve several div section (of specific class name "row ") with it's content, and additionally find all anchor tags (link urls) (with class "underline red bold"). Shortly speaing : get section of: ... (divs, tags ...) and collections of urls string[] urls = {"/searchClickThru? pid=prod56534895&q=&rpos=109181&rpp=10&_dyncharset=UTF-8&sort=&url=/culture-and-gender-intimate-relation-ksiazka,prod56534895,p"} the entire page looks like that: <html> ... a lot of stuff <div class="row "> <div class="photo"> <a rel="nofollow" href="/searchClickThru?pid=prod56534895&amp;q=&amp;rpos=109181&amp;rpp=10&amp;_dyncharset=UTF-8&amp;sort=&amp;url=/culture-and-gender-intimate-relation-ksiazka,prod56534895,p"> <img alt="alt msg" src="/b/s/b9/03/b9038292d147a582add07ee1f0607827.jpg"> </a> </div> <div class="desc"> <div class="l1"> <div class="icons"> </div> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td> <div class="fleft"> <a class="underline red bold" href="/searchClickThru?pid=prod56534895&amp;q=&amp;rpos=109181&amp;rpp=10&amp;_dyncharset=UTF-8&amp;sort=&amp;url=/culture-and-gender-intimate-relation-ksiazka,prod56534895,p"> Culture And Gender <br>Intimate Relation</a> </div> <div class="fleft"> </div> </td> </tr> </tbody> </table> </div> <div class="l2"> <div> </div> <div> <div class="but"> </div> </div> </div> <div class="l3"> Long description <a class="underlinepix_red no_wrap" rel="nofollow" href="/searchClickThru?pid=prod56534895&amp;q=&amp;rpos=109181&amp;rpp=10&amp;_dyncharset=UTF-8&amp;sort=&amp;url=/culture-and-gender-intimate-relation-ksiazka,prod56534895,p"> more<img alt="" src="/b/img/arr_red_sm.gif"> </a> </div> </div> </div> <div class="omit"></div> <div class="row "> <div class="photo"> <a rel="nofollow" href="/searchClickThru?pid=prod56534895&amp;q=&amp;rpos=109181&amp;rpp=10&amp;_dyncharset=UTF-8&amp;sort=&amp;url=/culture-and-gender-intimate-relation-ksiazka,prod56534899,p"> <img alt="alt msg" src="/b/s/b9/03/b9038292d147a582add07ee1f06078222.jpg"> </a> </div> <div class="desc"> <div class="l1"> <div class="icons"> </div> <table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td> <div class="fleft"> <a class="underline red bold" href="/searchClickThru?pid=prod56534895&amp;q=&amp;rpos=109181&amp;rpp=10&amp;_dyncharset=UTF-8&amp;sort=&amp;url=/culture-and-gender-intimate-relation-ksiazka,prod5653489225,p"> Culture And Gender <br>Intimate Relation</a> </div> <div class="fleft"> </div> </td> </tr> </tbody> </table> </div> <div class="l2"> <div> </div> <div> <div class="but"> </div> </div> </div> <div class="l3"> Long description <a class="underlinepix_red no_wrap" rel="nofollow" href="/searchClickThru?pid=prod56534895&amp;q=&amp;rpos=109181&amp;rpp=10&amp;_dyncharset=UTF-8&amp;sort=&amp;url=/culture-and-gender-intimate-relation-ksiazka,prod56534895,p"> more<img alt="" src="/b/img/arr_red_sm.gif"> </a> </div> </div> </div> Can anybody help me to create suitable reg ex?

    Read the article

  • I want to replace a number with successive numbers, starting at 1 and going up.

    - by Pär-Magnus Green
    I'm aware that this is something people can easily program, but I'm not familiar with those things, so I was hoping there was an easier solution. I've edited a large database of questions, including sorting, and ended up getting all the question ID's mixed up. I'm trying to do this in Notepad++, but any other suggestions are welcome. I'm wondering if there's a way to search for a string (ex. "Question[any number]") and replace the numbers with first 1, then 2, et.c. For clarification, this is how one question looks like: TriviaBot_Questions[3]['Question'][63] = "Acronyms: What does WTT stand for?"; TriviaBot_Questions[3]['Answers'][63] = {"Want To Trade"}; TriviaBot_Questions[3]['Category'][63] = 7; TriviaBot_Questions[3]['Points'][63] = 1; TriviaBot_Questions[3]['Hints'][63] = {}; and the next question, as is now, is not followed by 64. It might be 245 or 1029, and regardless of which number it is, I want it replaced with "previous number + 1", basically.

    Read the article

  • How can I delete a specific file from a set of results using the find command in Linux?

    - by PeanutsMonkey
    I have the following command that lists all files with the extension doc, docx, etc. find . -maxdepth 1 -iname \*.doc\* The command returns numerous files some of which I would like to delete. So for example the results returned are Example.docx Dummydata.doc Sample.doc I would like to delete Sample.doc and Dummydata.docx. How do I delete the files using the -exec option. Am I able to pass in the names of the files e.g. rm Dummydata.docx Sample.doc hence the command would look as follows find . -maxdepth 1 -iname \*.doc\* -exec rm Dummydata.docx Sample.doc Can I pass the names of the files within {} afterrm`? e.g. find . -maxdepth 1 -iname \*.doc\* -exec rm {Dummydata.docx} Sample.doc Is there a better way of doing it?

    Read the article

  • I would like to pipe output of find into input list of scp, how?

    - by user13184
    I'm a novice linux user and I am trying to send a long list of files from one computer to another. The argument list is too long, so I am using find. I am having trouble setting up the expression, though. Can someone help? Here is what I would normally type for a short argument list. scp ./* phogan@computer/directory... Here's I think this might translate into with find. scp find . -name "*" phogan@computer/directory... Maybe I could use piping? Any suggestions would help. Thanks in advance.

    Read the article

  • Finding files at more speed

    - by Chaitanya
    I have been using find command to find files on my 1 tb hard disk. it takes very long. then I used locate which proved to be faster with regular update using updatedb. But the limitation of locate is that I cannot find files with certain size or modified/created time. can you suggest me any ideas on how to find files at more speed or in that case how to pipe output of locate command in a way that all other information like size, time, etc. can be displayed or redirected to a file.

    Read the article

  • Does apt-cacher Change Packages `Access Time`?

    - by tAmir Naghizadeh
    I tried to remove the long time unused packages from apt-cacher archive using find: 1. $find /var/cache/apt-cacher -atime +5 -type f -name ".*deb*" | wc -l 8471 2. $find /var/cache/apt-cacher -atime +9 -type f -name ".*deb*" | wc -l 2269 3. $find /var/cache/apt-cacher -atime +10 -type f -name ".*deb*" | wc -l 0 Can I depend on the Access Time for apt-cacher archive usage? That is, does Access Time change only when package get received by the user? (we are apt-cacher for more than 6 months).

    Read the article

  • WPF: How to dynamically find a usercontrol or datatemplate

    - by Elger
    I have a bunch of datatemplates I use to display various sql-views in an ItemsControl. I don't know which datatemplate i'm going to use until run-time. (every view has different columns) Next to that, I made a generic dynamic datatemplate for all those views that don't need anything special. When I display the view I want to first look in all the available datatemplates if there is one that matches, else use the default dynamic datatemplate. My question is how can I 'search' a datatemplate by name in code? Usercontrol is also possible. Thanks, Elger

    Read the article

  • find string in DataGridView

    - by LCountee
    I'm using a foreach loop to populate each row in a DataGridView with a string. I need to search the DataGridView to make sure that I don't add a string that is already there. What is the best way to do this? Here is my code so far: foreach (String file in openFileDialog.FileNames) { // todo: make sure file string does not already exist in DataGridView dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[1].Value = file; i++; }

    Read the article

  • Using find and tar with files with special characters in the name

    - by Costi
    I want to archive all .ctl files in a folder, recursively. tar -cf ctlfiles.tar `find /home/db -name "*.ctl" -print` The error message : tar: Removing leading `/' from member names tar: /home/db/dunn/j: Cannot stat: No such file or directory tar: 74.ctl: Cannot stat: No such file or directory I have these files: /home/db/dunn/j 74.ctl and j 75. Notice the extra space. What if the files have other special characters? How do I archive these files recursively?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >