Search Results

Search found 897 results on 36 pages for 'highlighting'.

Page 10/36 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Use LaTeX Listings to correctly detect and syntax highlight embedded code of a different language in

    - by D W
    I have scripts that have one-liners or sort scripts from other languages within them. How can I have LaTeX listings detect this and change the syntax formating language withing the script? This would be especially useful for awk withing bash I believe. Bash #!/bin/bash ... # usage message to catch bad input without invoking R ... # any bash pre-processing of input ... # etc echo "hello world" R --vanilla << EOF # Data on motor octane ratings for various gasoline blends x <- c(88.5,87.7,83.4,86.7,87.5,91.5,88.6,100.3, 95.6,93.3,94.7,91.1,91.0,94.2,87.5,89.9, 88.3,87.6,84.3,86.7,88.2,90.8,88.3,98.8, 94.2,92.7,93.2,91.0,90.3,93.4,88.5,90.1, 89.2,88.3,85.3,87.9,88.6,90.9,89.0,96.1, 93.3,91.8,92.3,90.4,90.1,93.0,88.7,89.9, 89.8,89.6,87.4,88.9,91.2,89.3,94.4,92.7, 91.8,91.6,90.4,91.1,92.6,89.8,90.6,91.1, 90.4,89.3,89.7,90.3,91.6,90.5,93.7,92.7, 92.2,92.2,91.2,91.0,92.2,90.0,90.7) x length(x) mean(x);var(x) stem(x) EOF perl -n -e ' @t = split(/\t/); %t2 = map { $_ => 1 } split(/,/,$t[1]); $t[1] = join(",",keys %t2); print join("\t",@t); ' knownGeneFromUCSC.txt awk -F'\t' '{ n = split($2, t, ","); _2 = x split(x, _) # use delete _ if supported for (i = 0; ++i <= n;) _[t[i]]++ || _2 = _2 ? _2 "," t[i] : t[i] $2 = _2 }-3' OFS='\t' infile Python #!/usr/local/bin/python print "Hello World" os.system(""" VAR=even; sed -i "s/$VAR/odd/" testfile; for i in `cat testfile` ; do echo $i; done; echo "now the tr command is removing the vowels"; cat testfile |tr 'aeiou' ' ' """)

    Read the article

  • Xcode: code loses syntax coloring

    - by ColorMeFamous
    I find that in various situations Objective-C code in Xcode 3.1 (Leopard) can fail to get appropriate syntax coloring after typing or lose coloring that it had. This isn't just a "refresh" issue with new custom symbols -- but affects Cocoa framework symbols as well. Sometimes CMD-a to select all text on the code page will make the coloring (re)appear, sometimes double-clicking on a line to select it will work, sometimes I have to add/delete a space in a symbol to get that symbol to (re)color. Rebuilding, or closing/reopening the project may or may not work. Is this a known issue with Xcode? For something so annoying to me, I'm not finding the plentiful discussions of it on SO and elsewhere I'd expect. And is there any command to force global syntax recoloring?

    Read the article

  • problems with chili source code highlighter (mysql)

    - by jason
    I am using Chili source code highlighter it works fine with php source using php as the class. But when i change it to mysql it doesnt highlight any SQL code i also tried sql as the classname, i double checked the recipes' and there is a mysql recipes in there. ... What could i be doing wrong? <pre><code id="code" class="php"></code></pre>

    Read the article

  • Silverlight DataGrid Updating SelectedItem from code

    - by Mark Cooper
    When I update a datagrid SelectedItem from code (via a bound object in a ViewModel), how to I get the visual grid to highlight the newly selected item? Thanks, Mark UPDATE: This is still an issue for me. My SelectedItem property already implements change notification, but the datagrid is not VISUALLY displaying which row has been selected - i.e. it is not getting highlighted.

    Read the article

  • Can any body help to split php source code

    - by joe-on-wp
    hi, can any body help me on separating this example of data that i need to parse and seperate text just like PHPDoc. It is PHP source code. The example string : function one_to_tree() { //bla bla bla return FALSE; } function two_to_tree() { //bla bla bla return FALSE; } function three_to_tree() { if ($sample){ //bla bla bla } return FALSE; } can anybody help me how to seperate above string based on "function" word and create and array. Thank you

    Read the article

  • Highlight overlapping text in JQuery

    - by Jasie
    I've got this plain HTML: "Many things are in my room: a bed, a desk, and a computer." And these phrases: "things are" "are in my room" "room: a bed" In JQuery, is there some way to loop through the phrase list, and highlight the phrases as they appear in the text, and have the overlap delineated by color, or border, etc? I know there are simple highlighters but that won't do the trick. Maybe something with overlaying opacities? Thanks!

    Read the article

  • codemirror fails when adding </textarea> tag inside it

    - by Jorre
    I'm using codemirror http://marijn.haverbeke.nl/codemirror/ to let users create their own web templates inside a web application. Codemirror works great, except for the time that users have put a tag inside their source code. When I load that up inside code mirror, it breaks everything in the source code that follows after because it thinks my codemirror text area is closed. I'm using the following way to launch codemirror: CodeMirror.fromTextArea('code') It works great on my existing textarea "code" except when users add inside their templates (in the codemirror textarea). Any help is much appreciated!

    Read the article

  • C#/.NET library for source code formatting, like the one used by Stack Overflow?

    - by Lasse V. Karlsen
    I am writing a command line tool to convert Markdown text to html output, which seems easy enough. However, I am wondering how to get nice syntax coloring for embedded code blocks, like the one used by Stack Overflow. Does anyone know either: What library StackOverflow is using or if there's a library out there that I can easily reuse? Basically it would need to have some of the same "intelligence" found in the one that Stack Overflow uses, by basically doing a best-attempt at figuring out the language in use to pick the right keywords. Basically, what I want is for my own program to handle a block like the following: if (a == 0) return true; if (a == 1) return false; // fall-back Markdown Sharp, the library I'm using, by default outputs the above as a simple pre/code html block, with no syntax coloring. I'd like the same type of handling as the formatting on Stack Overflow does, the above contains blue "return" keywords for example. Or, hmm, after checking the source of this Stack Overflow page after adding the code example, I notice that it too is formatted like a simple pre/code block. Is it pure javascript-magic at works here, so perhaps there's no such library? If there's no library that will automagically determine a possible language by the keywords used, is there one that would work if I explicitly told it the language? Since this is "my" markdown-commandline-tool, I can easily add syntax if I need to.

    Read the article

  • How to highlight text automatically inside an UIAlertView text field

    - by user333624
    Hello everyone I have an UIAlertView with a textfield that shows a default value and two buttons, one to cancel and the other one to confirm. What I am trying to do is that when the alert view is popped up the default value is highlighted so the user can override the whole value faster than manually erasing it. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Title" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Continue",nil]; [alerta addTextFieldWithValue:@"87893" label:@"value"]; UITextField *textField = [alert textField]; campoTexto.highlighted = YES; campoTexto.keyboardType = UIKeyboardTypeNumbersAndPunctuation; [alertt show]; [alert release]; } for some reason there is a highlighted attribute for the textfield but it doesn't seem to work and there is no trail of that attribute in the Class documentation.

    Read the article

  • TextMate: Conditional formatting?

    - by Nebs
    I want to be able to color lines differently based on the starting character. eg.: - This is line 1 - This is line 2 x This is line 3 - This is line 4 x This is line 5 So lines 1,2,4 (starting with '-') should be blue while lines 3,5 (starting with 'x') should be red. Is this possible? How would you do it? Thanks.

    Read the article

  • Add links to specific words within span tag in PHP

    - by dazhall
    I have a list of words that I'd like to add a link to, I can do this fairly easily using preg_match_all and preg_replace: $str = "<span class=\"cz\">Dám si jedno pivo prosím.</span> = I'll have a beer please."; preg_match_all('/[a-ztúuýžácdéeínórš]+/i',$str,$matches); $matches = array_unique($matches[0]); foreach ($matches as $match) { if(!empty($words[$match])) { $str = preg_replace("/(^|[^\w]){1}(".preg_quote($match,"/").")($|[^\w]){1}/i", '\\1<a href="#">\\2</a>\\3', $str); } } echo $str; What I'd like to do is restrict the linking to only within the span tag. My brain is all regex-ed out, so any help would be appreciated! Thanks! Darren.

    Read the article

  • Is there a Perl Syntax Highlighter (outputting to HTML) like PHP's GeSHi?

    - by nebukadnezzar
    Most PHP Developers are likely familar with the Syntax Highlighter called "GeSHi", which takes code, highlights it, with the use of HTML and CSS: include('geshi.php'); $source = 'echo "hello, world!"; $language = 'php'; $path = 'geshi/'; $geshi = new GeSHi($source, $language, $path); echo $geshi->parse_code(); GeSHi Supports a wide range of languages. I wonder, is there a similar Module for Perl?

    Read the article

  • How to change the outlining hover color in VS 2010?

    - by RCIX
    If i hover over the thin vertical bar on the left, it highlights the entire scope of the block that's to the right. When this scope is large, my entire screen flashes white (a consequence of my custom color scheme). Is there a way to change that color? i don't recall there being one when i made the theme.

    Read the article

  • Visual Studio 2008 not detecting Errors while coding

    - by mouthpiec
    Hi, I just installed VS on another PC, but this time, while I am coding, it is not marking syntax errors while I am coding..... I need to press F6 to get the errors. Normally when for example typing the line below, I get 's' underlined saying that there is a mismatch. Any ideas how I can enable this option? string s = 4;

    Read the article

  • Android: disabling highlight on listView click

    - by John Moffitt
    I want to disable the orange highlight that occurs when touching a listView row. So far in my xml I have tried the following: android:focusable="false" android:focusableInTouchMode="false" android:clickable="false" More information: I want there to be zero difference when a user touches the screen on this listView object.

    Read the article

  • Code Colorer Being Used

    - by Sarfraz
    Hello, I visited this site and i really liked the code colorer used by it (apart from that CSS3 article on speech bubbles). I went through the source code of that page but could not find which syntax highlighter is being used there. Does any one have an idea?

    Read the article

  • ASP.net MVC How to change the Textbox Class upon validation failure?

    - by Harry
    I notice in the default MVC template project that the Account registration fields are highlighted via a class change. I can't seem to get the same behavour out of my own code (in the same project - same CSS etc) What might be stopping this from occuring? Update I believe this relates to one of my other questions Because I was having trouble with NullReferenceExceptions I have changed the Html.ValidationMessage fields to have different names than the target fields. So really, I need to resolve this question

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >