syntax

What does ESP mean in assembly?

ESP = ? stack pointer What does E stand for here? UPDATE RSP for 64bit? What does R mean here? ...

C++ -- return x,y; What is the point?

Hello, I have been programming in C and C++ for a few years and now I'm just now taking a college course in it and our book had a function like this for an example int foo(){ int x=0; int y=20; return x,y; //y is always returned } I have never seen such syntax. In fact, I have never seen the , operator used outside of parameter ...

java equivalent of ruby's ||= syntax

I'm brand new to java, coming from a ruby world. One thing I love about ruby is the very terse syntax such as ||=. I realize of course that a compiled language is different, but I'm wondering if Java has anything similar. In particular, what I do all the time in ruby is something like: someVar ||= SomeClass.new I think this is in...

Are the square brackets in Clojure's defn, defmacro and binding really a vector?

Are the square brackets around arguments in Clojure's defn, defmacro and binding (am I forgetting some?) really creating a vector or is it just a matter of syntax, making the arguments stand out from the rest? I'm reading Clojure in Action which states: Clojure uses vectors to denote function arguments or binding forms. which m...

is this valid json array using php

Hello, I need to convert some code done by someone else, to work in my mvc model It is using some functions like EOD that I don't understand. Does that still work in a class? Primarely, my question focusus on the json output. The old code does not use the php json_encode function, but outputs it directly like this ?> { "use...

Is there a goto statement in java?

I'm confused about this. Most of us have been told that there is no goto statement in Java. But I found that it is one of the keyword in Java. Where can it be used? If it can not be used, then why was it included in Java as a keyword? ...

Combining multiple attributes in C#

Is there a functional difference between the following syntax... [Foo, Bar] public class Baz {} ...and this syntax? [Foo] [Bar] public class Baz {} Assuming each produces identical results when compiled, which is the preferred form? ...

What does \x mean in c/c++?

char arr[]= "\xeb\x2a"; BTW,are these the same: "\xeb\x2a" vs '\xeb\x2a' ...

Best IDE macro tools to combat the verbosity of Java syntax?

Does anyone have any recommendations for tools that you can add to Eclipse, Netbeans or other IDEs to produce some of the repetitive code that's common in Java syntax? ...

mySQL :syntax using in C#

Hi. I am using in C# MYsql .I have query that works if I run on MySql Workbench ,but in C# it does not return any value also does not give ant error too.There is only one different using on Mysql I use before table name databaseName.tableName , but in C# I think it doesn`t necessary. This is part of query which does not return anything....

What's the difference between unsigned long/long/int in c/c++?

It seems all of them take 4 bytes of space, so what's the difference? ...

Simpler array declaration syntax in C++

In the spirit of Go-language, where simpler syntax is considered pretty important, here's a proposal for simpler array declaration in C++: int value; int_1 list; int_2 table; int_3 cube; RECT rect; RECT_1 rects; Using typedefs this can expand to: int value; vector<int> list; vector<vector<int> > table; vector<vector<vector<int> ...

Good Syntax Highlighter For Self-Hosted WordPress Blog

Hello, I am looking for a good automatic syntax highlighter for self-hosted WordPress blog (not wordpress.com blog). It would be great if the syntax highlighter automatically detects code parts and highlights them. Thanks in advance. ...

Problem with asp.net function syntax (not returning values correctly)

I have an active directory search function: Function GetAdInfo(ByVal ADDN As String, ByVal ADCommonName As String, ByVal ADGivenName As String, ByVal ADStaffNum As String, ByVal ADEmail As String, ByVal ADDescription As String, ByVal ADTelephone As String, ByVal ADOffice As String, ByVal ADEmployeeID As String) As String Dim...

what's syntax for uncheck the checkbox for in specific row?

I'm new to JQuery, i want to uncheck certain row in the repeater grid. I got this work, this will uncheck all checkbox for me. $('span.chkIncRows input').attr('checked', false); This works for me, if I want to uncheck row #2 checkbox from the repeater, without passing row number. $('span.chkIncRows input')[2].checked =false; ...

Use a named custom column in SQL 2005 in WHERE clause?

Can I name a custom column in the SELECT statement and reference that in the WHERE clause without duplicating code? For example; SELECT RIGHT(REPLICATE('0', 5) + RTRIM(SOME_ID)), 5) AS DISPLAY_ID FROM dbo.MY_TABLE WHERE DISPLAY_ID LIKE '%005%' Only much more complicated. I want to maintain this code in one place only but SQL Server 2...

Why does one of these statements compile in Scala but not the other?

(Note: I'm using Scala 2.7.7 here, not 2.8). I'm doing something pretty simple -- creating a map based on the values in a simple, 2-column CSV file -- and I've completed it easily enough, but I'm perplexed at why my first attempt didn't compile. Here's the code: // Returns Iterator[String] private def getLines = Source.fromFile(csvFil...

How to use vim's syntax files in emacs to color the text

Are there any snippets to make emacs use the .vim syntax files found in /usr/share/vim/vimfiles/ for coloring text. Many applications like conky have the vim syntax files like "conkyrc.vim" for vim but not for emacs. So is there an easy way to use those files rather than rewriting a new language-mode for each of those available in vimfil...

Check if any object in a 2d array is null

I've got an array var cells = new Cell[w, h], can I loop through all cells without a nested for-loop (I want to check if at least one is null)? Ideally I'd want to write something like Debug.Assert(!cells.Contains(null)). ...

BNF vs EBNF vs ABNF: which to choose?

I want to come up with a language syntax. I have read a bit about these three, and can't really see anything that one can do that another can't. Is there any reason to use one over another? Or is it just a matter of preference? ...