Search Results

Search found 103 results on 5 pages for 'folding'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Why does F@H not bind to more than one core on Windows?

    - by warren
    I have been contributing to Stanford's Folding@Home project for some time with most of the computers I own. I just installed the Windows client on a new machine running Windows 7, but see that the F@H process only binds to one CPU core. Is this due to it being run on Windows? (I have the 64-bit edition of Windows 7 installed.) On the Mac and under 64-bit Linux distros, it will run across all available CPU cores.

    Read the article

  • Emacs Column based Narrowing or Folding

    - by froit
    Is there column based narrowing in emacs. I tend narrow in one everything between script tags but that still keeps the original indent (space before var). It would be great if I could actually column narrow to the the beginning of the indent since otherwise the electrict indent tries to bring it to column 0. var foo = 1; var bar = 2; Alternate solution could be to mark the starting indents as uneditable, but I am also not sure how to do this. P.S. I am aware of MMM and NXHTML and html-helper-modes, but I am not looking to use them due to complexities.

    Read the article

  • hierarchical html listbox with mimicking file explorer level folding

    - by collapsar
    hello everybody, i'm looking for a technique to adapt a html listbox to hierarchical content with an unlimited number of levels ( const 1 would be sufficient ). hierarchy levels should be collapsible as in the usual file explorer views. the html listbox behaviour should be preserved / mimicked as comprehensively as possible. do you have a hint on where to find or how to implement this ? jquery solutions are fine. firefox 3.5+, ie 8+, safari 5 must be supported; opera 11, chrome 9 would be nice. as far as i understand the issue, listbox contents are rendered inside their own browser window sporting none of the standard window adornments. a hint on how to obtain a handle on this window in js would be a sufficient starting point, as well as correcting me in case i misconceived the browser behaviour. thanks in advance for your efforts, best regards, carsten

    Read the article

  • Folding a list in F#

    - by bytebuster
    I have a pretty trivial task but I can't figure out how to make the solution prettier. The goal is taking a List and returning results, based on whether they passed a predicate. The results should be grouped. Here's a simplified example: Predicate: isEven Inp : [2; 4; 3; 7; 6; 10; 4; 5] Out: [[^^^^]......[^^^^^^^^]..] Here's the code I have so far: let f p ls = List.foldBack (fun el (xs, ys) -> if p el then (el::xs, ys) else ([], xs::ys)) ls ([], []) |> List.Cons // (1) |> List.filter (not << List.isEmpty) // (2) let even x = x % 2 = 0 let ret = [2; 4; 3; 7; 6; 10; 4; 5] |> f even // expected [[2; 4]; [6; 10; 4]] This code does not seem to be readable that much. Also, I don't like lines (1) and (2). Is there any better solution?

    Read the article

  • foldmethod=indent gets confused

    - by intuited
    Normally a great boon to humanity, on occasion vim's indent-based folding will get confused and need a reset via :set foldmethod=indent. Symptoms include the appearance of consecutive folded lines in the window. Is there a way to avoid having this happen? Is it just me?

    Read the article

  • PHP text formating: Detecting several symbols in a row

    - by ilnur777
    I have a kind of strange thing that I really nead for my text formating. Don't ask me please why I did this strange thing! ;-) So, my PHP script replaces all line foldings "\n" with one of the speacial symbol like "|". When I insert text data to database, the PHP script replaces all line foldings with the symbol "|" and when the script reads text data from the database, it replaces all special symbols "|" with line folding "\n". I want to restrict text format in the way that it will cut line foldings if there are more than 2 line foldings used in each separating texts. Here is the example of the text I want the script to format: this is text... this is text... this is text...this is text...this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... I want to restict format like: this is text... this is text... this is text...this is text...this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... So, at the first example there is only one line folding between 2 texts and on the second example there are 3 line foldings between 2 texts. How it can be possible to replace more than 2 line foldings symbols "|" if they are detected on the text? This is a kind of example I want the script to do: $text = str_replace("|||", "||", $text); $text = str_replace("||||", "||", $text); $text = str_replace("|||||", "||", $text); $text = str_replace("||||||", "||", $text); $text = str_replace("|||||||", "||", $text); ... $text = str_replace("||||||||||", "||", $text); $text = str_replace("|", "<br>", $text); HM, I HAVE PROBLEMS! THIS DOES NOT WORK WHEN TEXT DATA IS SENT IN POST METHOD. LOOK AT THIS: //REPLACING ALL LINE FOLDINGS WITH SPECIAL SYMBOL $_POST["text"] = str_replace("\n","|",$_POST["text"]); // REMOVING ALL LINE FOLDINGS $_POST["text"] = trim($_POST["text"]); // IF THERE ARE MORE THAN 3 LINE HOLDINGS - FORMAT TO 1 LINE HOLDING $_POST["text"] = preg_replace("/\|{3,}/", "||", $_POST["text"]); echo $_POST["text"];

    Read the article

  • PHP text formating: Detectng several symbols in a row

    - by ilnur777
    I have a kind of strange thing that I really nead for my text formating. Don't ask me please why I did this strange thing! ;-) So, my PHP script replaces all line foldings "\n" with one of the speacial symbol like "|". When I insert text data to database, the PHP script replaces all line foldings with the symbol "|" and when the script reads text data from the database, it replaces all special symbols "|" with line folding "\n". I want to restrict text format in the way that it will cut line foldings if there are more than 2 line foldings used in each separating texts. Here is the example of the text I want the script to format: this is text... this is text... this is text...this is text...this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... I want to restict format like: this is text... this is text... this is text...this is text...this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... this is text... So, at the first example there is only one line folding between 2 texts and on the second example there are 3 line foldings between 2 texts. How it can be possible to replace more than 2 line foldings symbols "|" if they are detected on the text? This is a kind of example I want the script to do: $text = str_replace("|||", "||", $text); $text = str_replace("||||", "||", $text); $text = str_replace("|||||", "||", $text); $text = str_replace("||||||", "||", $text); $text = str_replace("|||||||", "||", $text); ... $text = str_replace("||||||||||", "||", $text); $text = str_replace("|", "<br>", $text);

    Read the article

  • Is there a way to hide annotations in Netbeans or Eclipse?

    - by Boden
    Maybe a dumb question, but it would be nice if there was a way to hide or collapse Java annotations when viewing source in Netbeans (or Eclipse). I'm not finding an option and a quick search didn't turn anything up. Is this one of those "you should never want to do that, code folding is a sin!" things? Personally I'd find it useful for annotated entity classes. All the hibernate / etc annotations are just fluff that I never look at once my mapping is working fine. It's similar to imports, really. (Yes, I can use XML instead of annotations, which I might start doing. But I was just wondering...)

    Read the article

  • Is it possible in any Java IDE to collapse the type definitions in the source code?

    - by asmaier
    Lately I often have to read Java code like this: LinkedHashMap<String, Integer> totals = new LinkedHashMap<String, Integer>(listOfRows.get(0)) for (LinkedHashMap<String, Integer> row : (ArrayList<LinkedHashMap<String,Integer>>) table.getValue()) { for(Entry<String, Integer> elem : row.entrySet()) { String colName=elem.getKey(); int Value=elem.getValue(); int oldValue=totals.get(colName); int sum = Value + oldValue; totals.put(colName, sum); } } Due to the long and nested type definitions the simple algorithm becomes quite obscured. So I wished I could remove or collapse the type definitions with my IDE to see the Java code without types like: totals = new (listOfRows.get(0)) for (row : table.getValue()) { for(elem : row.entrySet()) { colName=elem.getKey(); Value=elem.getValue(); oldValue=totals.get(colName); sum = Value + oldValue; totals.put(colName, sum); } } The best way of course would be to collapse the type definitions, but when moving the mouse over a variable show the type as a tooltip. Is there a Java IDE or a plugin for an IDE that can do this?

    Read the article

  • PHP: Ajax ignores line foldings in the text

    - by ilnur777
    I don't understand why my AJAX script ignores all line foldings. I first type text to the textarea and then put onclick to send button. Here is my AJAX realization: // creating ajax object // ==================== function createRequestObject(){ try { return new XMLHttpRequest() } catch(e) { try { return new ActiveXObject('Msxml2.XMLHTTP') } catch(e) { try { return new ActiveXObject('Microsoft.XMLHTTP') } catch(e) { return null; } } } } // message options (save, cancel) // ============================== function form1(text){ var http = createRequestObject(); if(http){ http.open("GET", "my_script.php?text=" + text); http.onreadystatechange = function (){ if(http.readyState == 4){ alert("Ok!"); } } http.send(null); } else { document.location = "my_script.php?text=" + text; } } html form <p align="justify" style="margin-right:10; margin-left:10;"> <table style="margin-right:10; margin-left:10;" align="center" border="0" cellpadding="0" cellspacing="0" width="680"> <TBODY> <form name="fgform"> <tr> <td width="680" height="100" colspan="2"><p><textarea id="edit_text1" name="edit_text" rows="3" style="width: 680; height: 100;"></textarea></p></td> </tr> <tr> <td width="340"><p><input type="button" id="saveB" value="Save Text" style="color:rgb(0,204,0); background-color:white; border-width:1; border-color:rgb(225,218,202); border-style:solid; width:100;" onclick="form1(document.getElementById('edit_text1').value);"></p></td> <td width="340"><p align="right">&nbsp;</p></td> </tr> </form> </TBODY> </table>

    Read the article

  • How to implement a list fold in Java

    - by Peter Kofler
    I have a List and want to reduce it to a single value (functional programing term "fold", Ruby term "inject"), like Arrays.asList("a", "b", "c") ... fold ... "a,b,c" As I am infected with functional programing ideas (Scala), I am looking for an easier/shorter way to code it than sb = new StringBuilder for ... { append ... } sb.toString

    Read the article

  • How-to handle errors in Vim Script ?

    - by ereOn
    In my .vimrc file, I have the following function, which folds the licensing information on the top of some .hpp and .cpp files: " Skip license function! FoldLicense() if !exists("b:foldedLicense") let b:foldedLicense = 1 1;/\*\//fold endif endfunction au BufRead *.hpp call FoldLicense() au BufRead *.cpp call FoldLicense() This works well, but if I open a .cpp file which doesn't have any licensing information block, Vim complains that the pattern is not found. Fair enough, but is there a way so that he stops complaining and just does nothing if the pattern is not found ? Thanks !

    Read the article

  • MIME "Content-Type" folding and parameter question regarding RFCs?

    - by BastiBense
    Hello, I'm trying to implement a basic MIME parser for the multipart/related in C++/Qt. So far I've been writing some basic parser code for headers, and I'm reading the RFCs to get an idea how to do everything as close to the specification as possible. Unfortunately there is a part in the RFC that confuses me a bit: From RFC882 Section 3.1.1: Each header field can be viewed as a single, logical line of ASCII characters, comprising a field-name and a field-body. For convenience, the field-body portion of this conceptual entity can be split into a multiple-line representation; this is called "folding". The general rule is that wherever there may be linear-white-space (NOT simply LWSP-chars), a CRLF immediately followed by AT LEAST one LWSP-char may instead be inserted. Thus, the single line Alright, so I simply parse a header field and if a CRLF follows with linear whitespace, I simply concat those in a useful manner to result in a single header line. Let's proceed... From RFC2045 Section 5.1: In the Augmented BNF notation of RFC 822, a Content-Type header field value is defined as follows: content := "Content-Type" ":" type "/" subtype *(";" parameter) ; Matching of media type and subtype ; is ALWAYS case-insensitive. [...] parameter := attribute "=" value attribute := token ; Matching of attributes ; is ALWAYS case-insensitive. value := token / quoted-string token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> Okay. So it seems if you want to specify a Content-Type header with parameters, simple do it like this: Content-Type: multipart/related; foo=bar; something=else ... and a folded version of the same header would look like this: Content-Type: multipart/related; foo=bar; something=else Correct? Good. As I kept reading the RFCs, I came across the following in RFC2387 Section 5.1 (Examples): Content-Type: Multipart/Related; boundary=example-1 start="<[email protected]>"; type="Application/X-FixedRecord" start-info="-o ps" --example-1 Content-Type: Application/X-FixedRecord Content-ID: <[email protected]> [data] --example-1 Content-Type: Application/octet-stream Content-Description: The fixed length records Content-Transfer-Encoding: base64 Content-ID: <[email protected]> [data] --example-1-- Hmm, this is odd. Do you see the Content-Type header? It has a number of parameters, but not all have a ";" as parameter delimiter. Maybe I just didn't read the RFCs correctly, but if my parser works strictly like the specification defines, the type and start-info parameters would result in a single string or worse, a parser error. Guys, what's your thought on this? Just a typo in the RFCs? Or did I miss something? Thanks!

    Read the article

  • Multiple foldmethods in vim

    - by bjarkef
    I use the folding option of vim quite a lot, and have usually set foldmethod to syntax. Recently I discovered that it is possible to add custom folds, such that I can put whole blocks in /*{{{*/ and /*}}}*/ which is very useful for grouping large sections of a source file together. However to use that feature I need to set foldmethod to marker, and I loose the syntax folding. Is it possible to have two active foldmethods at the same time in vim? set foldmethod=syntax,marker does not work.

    Read the article

  • Silverlight Cream for May 25, 2010 -- #869

    - by Dave Campbell
    In this Issue: Miroslav Miroslavov, Victor Gaudioso, Phil Middlemiss, Jonathan van de Veen, Lee, and Domagoj Pavlešic. From SilverlightCream.com: Book Folding effect using Pixel Shader On the new CompleteIT site, did you know the page-folding was done using PixelShaders? I hadn't put much thought into it, but that's pretty cool, and Miroslav Miroslavov has a blog post up discussing it, and the code behind it. New Silverlight Video Tutorial: How to create a Slider with a ToolTip that shows the Value of the Slider This is pretty cool... Victor Gaudioso's latest video tutorial shows how to put the slider position in the slider tooltip... code and video tutorial included. Backlighting a ListBox Put this in the cool category as well... Phil Middlemiss worked out a ListBox styling that makes the selected item be 'backlit' ... check out the screenshot on the post... and then grab the code :) Adventures while building a Silverlight Enterprise application part #33 Jonathan van de Veen is discussing changes to his project/team and how that has affected development. Read about what they did right and some of their struggles. RIA Services and Storedprocedures Lee's discussing Stored Procs and RIA Services ... he begins with one that just works, then moves on to demonstrate the kernel of the problem he's attacking and the solution of it. DoubleClick in Silverlight Domagoj Pavlešic got inspiration from one of Mike Snow's Tips of the Day and took off on the double-click idea... project source included. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • How can I give some basic text editing functionality to a firefox plugin?

    - by roddik
    Hello. I'm writing a plugin to Firefox, which is basically a sidebar, that is filled with yaml-formatted information based on what user does on the page (just another web testing solution). I want to enable user to change generated text manually right in the sidebar and: Add code-folding (folding click: \n text: some text to a single line) Add highlighting of registered actions (click, fill and so on) and unregistered actions (syntax errors) How do I do that? Is placing an iframe to the sidebar and trying to do that with html/js the best solution (seen it in a similar one)? As you may have noticed, I'm a newbie in plugin writing, so please excuse if anything.

    Read the article

  • No architecture vs architecture-specific binaries

    - by Aaron
    From what I understand, the noarch suffix means that it's architecture independent and should work universally. If this is the case, why should I install architecture-specific packages at all? Why not just go straight for the noarch? Are there optimizations in the x86 or x64 binaries that aren't found in the noarch binaries? What's best for high performance applications? Folding@Home does this with their controller:

    Read the article

  • Good php editor

    - by Web Developer
    i have seen through other questions on the topic but most are a bit old. I looking for a good editor for developing on PHP in Linux(ubuntu). Here is my requirements Basic editor features Free Light-Weight Syntax highlighting Code Folding (class,function,if/else/while/foreach block) Code completion Invalid Syntax/Error highlighting as you type Auto code intending Snippet support(pieces of custom or language specific codes that i can insert) Extendable support It would be great if it had the following Debugging support WYSIWYG Code formatting Framework support(cakephp/yii/zend/smarty) Testing support Todo Native look and feel(Gnome) Flex/ROR support is welcome but not a requirement Mysql support I have tried the following editors Netbeans - it bloated, resource hogging and doesnt not have a native look and feel. Eclipse is okay but i cant fold if/while blocks and slow. Gedit can be extended and i have tried it but still i could not fold code or show error. I currently use Geany but it doesn't inform me of syntax errors as i type. If you have ways to solve the problems with above editors they too are also welcome

    Read the article

  • Printing in booklet fomat

    - by To Do
    In the past I had a printer that had the booklet format option that would print the document two pages at a time ordered in a way that folding the whole printout would produce a booklet which could be stapled in the middle. My current printer does not support this feature. I would like to use some utility or script to convert an A4 pdf to an A5 booklet one. I found this page but I'm getting an error : pdfjam ERROR: can't find pdflatex! How do I get past this issue? Does anybody know of any other solution? I'm on Ubuntu 12.10 AMD64

    Read the article

  • Fold a Papercraft Monster to Decorate Your Desk for Halloween

    - by Jason Fitzpatrick
    If you’re looking for a last minute and subtle way to add a little dash of Halloween to your office, these papercraft monsters are perfect for perching on your monitor stand. Courtesy of the designers at AnimateMe, there are a total of seven different papercraft monsters of all shapes and colors. Each free template includes the monster itself, plus tiny little humans to run in terror from the monster. Hit up the link below to download the templates and folding instructions. Monster Papercraft [via Neatorama] What Is the Purpose of the “Do Not Cover This Hole” Hole on Hard Drives? How To Log Into The Desktop, Add a Start Menu, and Disable Hot Corners in Windows 8 HTG Explains: Why You Shouldn’t Use a Task Killer On Android

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >