Search Results

Search found 6696 results on 268 pages for 'syntax highlighting'.

Page 21/268 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Radio Buttons not highlighting as though they are selected

    - by Ryan
    I'm working on an android activity with a RadioGroup containing 10 RadioButtons. For some reason or another sometimes, only sometimes, when you select a RadioButton in the RadioGroup it doesn't highlight as if it's selected but through some tests I've determined that it really IS selected even though it isn't highlighted. Another odd thing that occurs is that when you select any other RadioButton in the RadioGroup and then try selecting your original Radio Button (the one that wouldn't highlight as though it were selected) it does highlight and functions as normal. Any idea why this is happening or how to fix it? Thanks!

    Read the article

  • Change highlighting of certain subviews in a UITableViewCell

    - by SpacyRicochet
    Is it possible to exclude certain subviews in a UITableViewCell from being highlighted or to change their highlight implementation? I added an orange warning label to the UITableViewCell for certain occassions and it highlights properly with the rest of the cell, which is good. However, when the cells stops being highlighted in an animated way, you first see the background of the warning label become white and then flash to orange. I would either like it to be excluded from being highlighted at all, or to change it's highlight implementation so it animates back to orange properly.

    Read the article

  • Nested/multiple brace-matching in Notepad++

    - by Melodic
    In Notepad++, is it possible to force all (or at least the 3 or 4 deepest) pairs of braces/brackets/parens/etc. that enclose the cursor to become highlighted? Preferably in different colors for each matched pair? For instance, in this example: int main(char** args) { if(blah) { ... } } If we place the cursor anywhere in the if-block, the main function's opening and closing braces should become one color, while the if-block's braces become another. The coloring for each block should stay the same as long the cursor is still in that block.

    Read the article

  • Highlighting a custom UIButton

    - by Dan Ray
    The app I'm building has LOTS of custom UIButtons laying over top of fairly precisely laid out images. Buttonish, controllish images and labels and what have you, but with a clear custom-style UIButton sitting over top of it to handle the tap. My client yesterday says, "I want that to highlight when you tap it". Never mind that it immediately pushes on a new uinavigationcontroller view... it didn't blink, and so he's confused. Oy. Here's what I've done to address it. I don't like it, but it's what I've done: I subclassed UIButton (naming it FlashingUIButton). For some reason I couldn't just configure it with a background image on control mode highlighted. It never seemed to hit the state "highlighted". Don't know why that is. So instead I wrote: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self setBackgroundImage:[UIImage imageNamed:@"grey_screen"] forState:UIControlStateNormal]; [self performSelector:@selector(resetImage) withObject:nil afterDelay:0.2]; [super touchesBegan:touches withEvent:event]; } -(void)resetImage { [self setBackgroundImage:nil forState:UIControlStateNormal]; } This happily lays my grey_screen.png (a 30% opaque black box) over the button when it's tapped and replaces it with happy emptyness .2 of a second later. This is fine, but it means I have to go through all my many nibs and change all my buttons from UIButtons to FlashingUIButtons. Which isn't the end of the world, but I'd really hoped to address this as a UIButton category, and hit all birds with one stone. Any suggestions for a better approach than this one?

    Read the article

  • JQuery: Selecting Text in an Element (akin to highlighting with your mouse)

    - by Jason
    I would like to have users click a link that then selects the html text in another element (NOT an input). By "select" I mean the same way you would select text by dragging your mouse over it. This has been a bear to research because everyone talks about "select" or "highlight" in other terms. Is this possible? My code so far is thus: html: <a href="javascript:" onclick="SelectText('xhtml-code')">Select Code</a> <code id="xhtml-code">Some Code here </code> js (jquery): function SelectText(element) { $("#" + element).select(); } but it doesn't work. Am I missing something blatantly obvious? Thanks

    Read the article

  • Highlighting Changes in Java

    - by Buzz Lightyear
    Basically, i have done my program so that it will display differences in strings and display the whole line. I want to highlight (in a colour) the differences in the line. Example: Original at line 5 <rect x="60.01" width="855.38" id="rect_1" y="-244.35" height="641.13" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: none; "/> Edited at line 5 <rect x="298.43" width="340.00" y="131.12" height="380.00" id="rect_1" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(255, 102, 0); "/> In this example, the width is different from the 'original' from the 'edited' version. I would like to be able to highlight that difference and any other difference. My code so far: Patch patch = DiffUtils.diff(centralFile, remoteFile); StringBuffer resultsBuff = new StringBuffer(remoteFileData.length); for (Delta delta : patch.getDeltas()) { resultsBuff.append("Original at line " + delta.getOriginal().getPosition() + "\n"); for (Object line : delta.getOriginal().getLines()) { resultsBuff.append(" " + line + "\n"); } resultsBuff.append("Edited at line " + delta.getRevised().getPosition() + "\n"); for (Object line : delta.getRevised().getLines()) { resultsBuff.append(" " + line + "\n"); } resultsBuff.append("\n"); } return resultsBuff.toString(); } That will display two whole lines like the example before (the original and the edited version) I want to be able to highlight the changes that have actually been made, is there any way to do this in Java?

    Read the article

  • Setting up multiple highlight rules in vim

    - by ICR
    I am trying to set up rules to highlight both trailing whitespace and lines which are over a certain length by adding this to my .vimrc: highlight ExtraWhitespace ctermbg=lightgray guibg=lightgray match ExtraWhitespace /\s\+$/ highlight OverLength ctermbg=lightgray guibg=lightgray match OverLength /\%>80v.\+/ However, it only seems to pick up whichever is last. I can't find a way to get them to both work simultaneously.

    Read the article

  • UITableViewCell highlighting issue - iPhone

    - by harekam_taj
    Hey guys, I have a UITableView and I am having an issue with whenever I try to click on the Cell. When the cell is highlighted it puts some test on top of the text that is already on the cell make the text on the cell hard to read. This only happens while I have the cell highlighted. Please help me with this issue. Thanks

    Read the article

  • case insensitive highlighting in php

    - by fusion
    i'm using this function to highlight the results from mysql query: function highlightWords($string, $word) { $string = str_replace($word, "<span class='highlight'>".$word."</span>", $string); /*** return the highlighted string ***/ return $string; } .... $cQuote = highlightWords(htmlspecialchars($row['cQuotes']), $search_result); the problem is, if i type in 'good', it will only show my search results with a lower-case 'g'ood and not 'Good'. how do i rectify this?

    Read the article

  • Highlighting text in a textbox using Javascript

    - by zohair
    Hi, I have an ASP.NET 2.0 webapp (with C#). I wanted to add a button which, when clicked would highlight selected text. By 'highlight', I mean change the CSS properties of the text so that it can stand out. I think this can be done with some clientside JavaScript. I know that you can assign a Javascript function to the onclick event of an HTML input button, but since I'm not very proficient at JS the function itself I have no idea how to write... Can someone please help? Thanks a bunch!

    Read the article

  • Highlighting current and previous stars on mouseover

    - by mpet
    I'm trying to make simple five star rating system using Twitter Bootstrap 3 i jQuery. For now, I'm trying to set .hover() and .mouseout() events using counter by writing this code that doesn't work: var i; for (i = 1; i <= 5; i++) { $('#overall_rating_' + i).hover(function(){ $('#overall_rating_' + i).removeClass("glyphicon-star-empty").addClass("glyphicon-star"); }); $('#overall_rating_' + i).mouseout(function(){ $('#overall_rating_' + i).removeClass("glyphicon-star").addClass("glyphicon-star-empty"); }); } Trying to highlight current and previous stars on mouseover. The code is not complete, it would be accompanied by additional sub-counters, but this part doesn't work for now. Any better methods are welcome. What's broken here?

    Read the article

  • highlighting data values in a sql result set

    - by potatoe
    I can think of a number of ways to do this in PHP or even JavaScript, but I'm wondering if there's a SQL-based technique I'm overlooking. I have a database table, let's say 20 fields X 10 rows. I want to display the entire table on an web page, so I'd do something like SELCT * FROM data_table;, and then format the result set using HTML table tags. However, I'd also like to highlight values in the table based on whether they are the maximum or minimum value in their column. For example, I'd add bold tags around the max in each column. A resulting table might look something like this, with bold tags shown: id | field1 | field2 | field3 | ... 0 | 5 | 2 | <b>7</b> | ... 1 | 3 | <b>8</b> | 6 | ... 2 | <b>9</b> | 5 | 1 | ... ... I could do a separate SELECT with an ORDER BY for each field and then interpret the results, but that seems like a lot of extra DB access. My alternative right now is to just fetch the whole table, and then sort/search for the highlight values using PHP. Is there a better way?

    Read the article

  • Highlighting the current page in rails, only works for some pages

    - by raphael_turtle
    I've used this tutorial to highlight the current page in the menu. I have a pages controller with a few static pages, for the home page I simply have def home @title = 'Home and similar for contact pages etc. Then in my main layout file I have <body class="<%= @title %>"> and this works fine to set the correct css, but how do I set @title for my other controllers where there's more than one action?

    Read the article

  • MySQL 5 multiple JOIN syntax not working in MySQL 4

    - by draco
    Hello all, the current SQL query works fine locally on MAMP 1.8.4 running MySQL 5.1.37. SELECT EL.log_actions, EL.log_date, EL.log_value, EL.log_type, EA.admins_name, EU.users_name, EU.users_matric FROM events_log EL JOIN events_users EU USING (users_id) JOIN events_admins EA USING (admins_id) ORDER BY EL.log_id DESC LIMIT 0, 10 However, when I bring this query live to production server which is running MySQL 4.1.22-standard, the following error occurred (whether or not there are data in the entry). A Database Error Occurred Error Number: 1054 Unknown column 'sceclub_exclaim2007.EU.admins_id' in 'on clause' SELECT EL.log_actions, EL.log_date, EL.log_value, EL.log_type, EA.admins_name, EU.users_name, EU.users_matric FROM events_log EL JOIN events_users EU USING (users_id) JOIN events_admins EA USING (admins_id) ORDER BY EL.log_id DESC LIMIT 0, 20 This is based on CodeIgniter 1.7.2 and both production and development are running the same set of database. Database tables events_users: users_id users_name users_credits users_matric users_redeem events_admins: admins_id admins_email admins_name admins_pass admins_date admins_modified admins_last_login events_attendance: attendance_id users_id events_id events_events: events_id events_name events_venue events_time events_desc events_pass events_log:log_id admins_id log_actions log_date log_value users_id log_type I'm new to MySQL so I'm not aware of any difference in versions or what could be a possible cause, thank you in advance! Tried googling for MySQL4 difference to no avail too. Also tried using SELECT EL.log_actions, EL.log_date, EL.log_value, EL.log_type, EA.admins_name, EU.users_name, EU.users_matric FROM events_log EL JOIN events_users EU where EL.users_id = EU.users_id JOIN events_admins EA USING EL.admins_id = EA.admins_id ORDER BY EL.log_id DESC LIMIT 0, 10 But then I got the error in both production and development. A Database Error Occurred Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN events_admins EA USING EL.admins_id = EA.admins_id ORDER BY' at line 8 SELECT EL.log_actions, EL.log_date, EL.log_value, EL.log_type, EA.admins_name, EU.users_name, EU.users_matric FROM events_log EL JOIN events_users EU where EL.users_id = EU.users_id JOIN events_admins EA USING EL.admins_id = EA.admins_id ORDER BY EL.log_id DESC LIMIT 0, 20 If you can point me to some resources where I can read up more on MySQL 4 syntax to achieve the same thing effect like I did with MySQL 5 syntax, please let me know. Thanks again!

    Read the article

  • Komodo Edit 5.2 Django Template Syntax Error - Info: <head> previously mentioned

    - by Lance McNearney
    I am using Komodo Edit 5.2 for editing html and Django template files. It always shows a single syntax error inside the first {% block %} area on the first tag of my template. For example: {% extends "base.html" %} {% load i18n %} {% block title %}Hello{% endblock %} {% block content %} <p>Hello</p> <-- Syntax error on this single line <p>Other lines have no errors</p> {% endblock %} {% block footer %} <p>No errors here</p> {% endblock %} The syntax error given is: Info: <head> previously mentioned I know for a fact that the error has nothing to do with my <head> tag since it occurs in the base template and in child templates (and the IDE isn't smart enough to process the base templates when in a child, etc.) All of my html tags are closed properly and everything validates for XHTML strict. This forum post mentions a similar problem but offers no solution (and may be specific to Smarty syntax highlighting). Any ideas on how to resolve this error (or disable it from being shown)?

    Read the article

  • In Ruby, why is a method invocation not be able to be treated as a unit when "do" and "end" is used?

    - by Jian Lin
    The following question is related to the question "Ruby Print Inject Do Syntax". My question is, can we insist on using do and end and make it work with puts or p? This works: a = [1,2,3,4] b = a.inject do |sum, x| sum + x end puts b # prints out 10 so, is it correct to say, inject is a class method of the Array class, which takes a block of code, and then returns a number. If so, then it should be no different from calling a function and getting back a return value: b = foo(3) puts b or b = circle.getRadius() puts b In the above two cases, we can directly say puts foo(3) puts circle.getRadius() so, there is no way to make it work directly by using the following 2 ways: a = [1,2,3,4] puts a.inject do |sum, x| sum + x end but it gives ch01q2.rb:7:in `inject': no block given (LocalJumpError) from ch01q2.rb:4:in `each' from ch01q2.rb:4:in `inject' from ch01q2.rb:4 grouping the method call using ( ) doesn't work either: a = [1,2,3,4] puts (a.inject do |sum, x| sum + x end) and this gives: ch01q3.rb:4: syntax error, unexpected kDO_BLOCK, expecting ')' puts (a.inject do |sum, x| ^ ch01q3.rb:4: syntax error, unexpected '|', expecting '=' puts (a.inject do |sum, x| ^ ch01q3.rb:6: syntax error, unexpected kEND, expecting $end end) ^ finally, the following version works: a = [1,2,3,4] puts a.inject { |sum, x| sum + x } but why doesn't the grouping of the method invocation using ( ) work in the earlier example? What if a programmer insist that he uses do and end, can it be made to work?

    Read the article

  • In Ruby, why does a method invocation not be able to be treated as a unit when "do" and "end" is use

    - by Jian Lin
    The following question is related to http://stackoverflow.com/questions/2127836/ruby-print-inject-do-syntax The question is, can we insist on using DO and END and make it work with puts or p? This works: a = [1,2,3,4] b = a.inject do |sum, x| sum + x end puts b # prints out 10 so, is it correct to say, inject is a class method of the Array class, which takes a block of code, and then returns a number. If so, then it should be no different from calling a function and getting back a return value: b = foo(3) puts b or b = circle.getRadius() puts b In the above two cases, we can directly say puts foo(3) puts circle.getRadius() so, there is no way to make it work directly by using the following 2 ways: a = [1,2,3,4] puts a.inject do |sum, x| sum + x end but it gives ch01q2.rb:7:in `inject': no block given (LocalJumpError) from ch01q2.rb:4:in `each' from ch01q2.rb:4:in `inject' from ch01q2.rb:4 grouping the method call using ( ) doesn't work either: a = [1,2,3,4] puts (a.inject do |sum, x| sum + x end) and this gives: ch01q3.rb:4: syntax error, unexpected kDO_BLOCK, expecting ')' puts (a.inject do |sum, x| ^ ch01q3.rb:4: syntax error, unexpected '|', expecting '=' puts (a.inject do |sum, x| ^ ch01q3.rb:6: syntax error, unexpected kEND, expecting $end end) ^ finally, the following version works: a = [1,2,3,4] puts a.inject { |sum, x| sum + x } but why doesn't the grouping of the method invocation using ( ) work? What if a programmer insists that he uses do and end, can it be made to work directly with p or puts, without an extra temporary variable?

    Read the article

  • xcode project-/target-settings-syntax for linker flag force_load on iPhone

    - by Kaiserludi
    Hi all. I am confronted with the double bind, that on the one hand for one of the 3rd party static libraries, my iPhone application uses, the linker flag -all_load has to be set in the application project- or target settings, otherwise the app crashes at runtime not finding some symbols, called internally from the lib, on the other hand for another 3rd party static lib -all_load must not be set on application level, or the app won't build thanks to a "duplicate symbols"-linker error. To solve this issue I now want to use force_load instant of load_all, as it due to documentation it does the same like all_load, but only for the passed path or lib-file, instead of all libs. The problem with force_load is, I do not have a clue, how to pass a path or file as parameter with it, when passing it via xcode project- or target-settings. All syntax-possibilities coming to my mind either lead into xcode thinking its another linker flag instead of a parameter to the previous one, or the linker is throwing syntax related errors or the flag simply does nothing at all in comparison to not being set. I also opened the .pbxproj-file in a text-editor to edit it to the correct command line syntax manually, but when reloading the project with xcode, it auto changes the syntax into interpreting the parameter to force_load as a separate flag. Anyone having an idea on this issue? Thx, Kaiserludi.

    Read the article

  • In Ruby, why is a method invocation not able to be treated as a unit when "do" and "end" is used?

    - by Jian Lin
    The following question is related to the question "Ruby Print Inject Do Syntax". My question is, can we insist on using do and end and make it work with puts or p? This works: a = [1,2,3,4] b = a.inject do |sum, x| sum + x end puts b # prints out 10 so, is it correct to say, inject is an instance method of the Array object, and this instance method takes a block of code, and then returns a number. If so, then it should be no different from calling a function or method and getting back a return value: b = foo(3) puts b or b = circle.getRadius() puts b In the above two cases, we can directly say puts foo(3) puts circle.getRadius() so, there is no way to make it work directly by using the following 2 ways: a = [1,2,3,4] puts a.inject do |sum, x| sum + x end but it gives ch01q2.rb:7:in `inject': no block given (LocalJumpError) from ch01q2.rb:4:in `each' from ch01q2.rb:4:in `inject' from ch01q2.rb:4 grouping the method call using ( ) doesn't work either: a = [1,2,3,4] puts (a.inject do |sum, x| sum + x end) and this gives: ch01q3.rb:4: syntax error, unexpected kDO_BLOCK, expecting ')' puts (a.inject do |sum, x| ^ ch01q3.rb:4: syntax error, unexpected '|', expecting '=' puts (a.inject do |sum, x| ^ ch01q3.rb:6: syntax error, unexpected kEND, expecting $end end) ^ finally, the following version works: a = [1,2,3,4] puts a.inject { |sum, x| sum + x } but why doesn't the grouping of the method invocation using ( ) work in the earlier example? What if a programmer insist that he uses do and end, can it be made to work?

    Read the article

  • WPF TextBlock highlight certan parts based on search condition

    - by Daniil Harik
    Hello, I have TextBlock that has Inlines dynamicly added to it (basically bunch of Run objects that are either italic or bold). In my application I have search function. I want to be able to highlight TextBlock's text that is in being searched for. By highlighting I mean changing certain parts of TextBlock text's color (keeping in mind that it may highlight several different Run objects at a time). I have tried this example http://blogs.microsoft.co.il/blogs/tamir/archive/2008/05/12/search-and-highlight-any-text-on-wpf-rendered-page.aspx But it seams very unstable :( Is there easy way to solve this problem?

    Read the article

  • problem in leigeber's sorting

    - by developer
    iam using leigeber's sorting javascript to sort my data on my page......i took the js from here :- leigeber's sorting javascript Now this is shwoing highlighted sorted column and all and its all perfect.Now iam having some negative and some positive values in my data and i want to show those negative data in red color and positive in green.This whole sorting thing is using js and css to do the highlighting and sorting.Iam a bit confused now and cant make it out that how i can assign red color to the negative ones and green to the positive ones as js is returning the data as an object i.e. a complete row and i cant make 1 column's data red or green.Will it be done by js itself or with the help of stylesheet to find -ves and +ves.Im totally lost and dont know how to do it.Please help!!!! this is an example of hte data iam using this whole sorting thing on:- -Name- -Price- -loss- -Pts- abc 361.15 -5.68 -21.75 abc2 1072.35 -5.24 -59.25 abc3 512.35 5.24 28.35 abc4 335.2 -5.02 -17.7 abc5 318.6 5.01 -16.8 abc6 76.15 -4.15 3.3

    Read the article

  • emacs does not open a file from argument and syntax highlight does not work

    - by Jus
    In my latest ubuntu box, When I type for example emacs ~/.bashrc, Emacs will start but not open .bashrc. This is true for any file I pass in. I've used Emacs for several years, and have never experienced this problem before. I added (global-font-lock-mode 1);; to my .emacs file, and Emacs does recognize it, for example. "(C++/; Abbrev)", but it won't do syntax highlighting. If you can solve any of these problems, it will be very appreciated. The following is my machine's configuration: uname -a Linux 2.6.35-28-generic-pae #49-Ubuntu SMP Tue Mar 1 14:58:06 UTC 2011 i686 GNU/Linux ~/.emacs (global-font-lock-mode 1);;

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >