brackets

What is the use of the square brackets [] in sql statements?

Hi, I've noticed that Visual Studio 2008 is placing square brackets around column names in sql. Do the brackets offer any advantage? When I hand code T-SQL I've never bothered with them. Example: Visual Studio: SELECT [column1], [column2] etc... My own way: SELECT column1, column2 etc... ...

HTML to create tournament final four bracket?

Is there a website I can create an HTML final four bracket? Or is there just HTML out there that will create it automatically and I can just fill in the specifics? ...

PHP conditionals, brackets needed?

I was just browsing a forum and someone asked about a php file they had found on the web. It has several spots like this in the code: if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR); I have always thought brackets are needed to enclose what you want to do if the condition is true. Is there some other alt...

Can someone explain this C++ notation?

if (vector1.x > ((float*)&vector1)[j]) Is j simply just an index into the vector? e.g. is C++ able to retrieve these values using array notation even though vector isn't an array? If so I'm guessing it achieves this by referencing vector by its address? ...

How to set curly braces'/parentheses'/square brackets'/arithmetic operators' syntax highlight color in VIM?

How do I highlight operators/parentheses/brackets/etc. in VIM? I'm not interested in coloring matching or unmatching parentheses/brackets. I've tried ":hi cBracket/whatnot guifg=something" and ":hi Operator/cOperator guifg=something" but these don't seem to affect anything. ...

VB Brackets in Enum?

I'm finding this in some legacy code and just curious what the brackets are for? Public Enum myEnum none = 0 abc = 2 def = 4 ghi= 6 [jkl] = 8 mno = 9 End Enum ...

Removing Brackets and Text in Crystal

I am using this following text to delete brackets and text inside the brackets; I need to go threw the entire memo field and it stops after it finds and deletes the first set of brackets and text. if right({table.col},1) = "]" then left({table.col},instr({table.col},"[")-1) else {table.col} Any suggestions... ...

What's the regular expression that match a square bracket?

Hi! I have been playing with JFlex and at this moment I want to get a regex that match a square bracket "[", but I don't find it. I think I tried all posivilities but the right. Some help? ...

how to override [] brackets in ruby ?

I am writing an Ajax request form with Ruby on Rails using a collection_select tag that looks like this: <%= collection_select("Jobs", "clearance", @allClearances, "clearance", "clearance", {:prompt => "Select a Clearance"} )%> Ruby then builds an HTML select tag with id = "Jobs_clearance" and name = "Jobs[clearance]" I want to send t...

What are the names of the different Bracing/Indenting styles in C/PHP/Java etc?

In languages that use 'curly braces' for code blocks, and where whitespace isn't a concern (C, Java, PHP) - What are the names for the different bracing/indenting styles? I remember reading about 'KNF' and 'Flag', but it'd be great to have the most recognized names, along with some simple examples of each. ...

php glob() and brackets: []

Hey there lovely stackoverflow people! I have got directories which contain brackets in the names. i.e. "dir_123[[email protected]]" Within that dirs there are .tif files. What I do is counting the Tif files. On my Mac I did that with MAMP and it worked great: $anz = count(glob(str_replace("[", "\[", "dir_123[[email protected]]/*.tif"))); On...

Tournament Brackets algorithm

Hello to everyone. I need to create an asp.net page that auto generate a brackets tournament tennis style. Regarding the managing of match in database, it's not a problem. The problem is the dynamic graphics creation of brackets. The user will be able to create tournament by 2-4...32 players. And i don't know ho to create the grap...

Summing up two columns the Unix way

# To fix the symptom How can you sum up the following columns effectively? Column 1 1 3 3 ... Column 2 2323 343 232 ... This should give me Expected result 2324 346 235 ... I have the columns in two files. # Initial situation I use sometimes too many curly brackets such that I have used one more this { than this } in my f...

Changing the template code produced by Zend_Tool

This is a silly little thing, but I was just wondering whether there was a way to change the style of the code produced by the Zend_Tool? Specifically, the bracket style? // from this: class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { // to this class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { Obviously it'...

What is the difference between int x=1 and int x(1) in C++?

Possible Duplicate: Is there a difference in C++ between copy initialization and assignment initialization? I am new to C++, I seldom see people using this syntax to declare and initialize a variable: int x(1); I tried, the compiler did not complain and the output is the same as int x=1, are they actually the same thing? Ma...

Regex pattern to return text from within brackets..

Hi, i am looking for a regex pattern that will return me the contents of the first set of brackets in a string. Eg - text text text text (hello) text (hello2) (hello3) text ..will return "hello" does anyone know what the pattern looks like for c#? ...

Python parsing bracketed blocks

What would be the best way in python to parse out chunks of text contained in matching brackets? "{ { a } { b } { { { c } } } }" should initially return: [ "{ a } { b } { { { c } } }" ] putting that as an input should return: [ "a", "b", "{ { c } }" ] which should return: [ "{ c }" ] [ "c" ] [] ...

[C++] Enum declaration inside a scope that is a parameter of a macro.

Hi, I am trying to create a macro that takes a scope as a parameter. I know, it is probably not a good thing etc etc. I was trying this and got the problem that preprocessor looks for commas and parentheses... the problem is with enum. How would I declare a enum inside a scope that is a parameter of a macro? when the compiler see ...

XCode shortcut for wrapping selected text in curly braces "{ }"

Any XCode shortcut for wrapping a text selection in opening & closing brackets - { }, ( ) or [ ]? Growing tired of removing the "}" that XCode automatically enters after I type "{" in cases where I've already got code in the editor that wants to be inside the new brackets. ...

How to remove blocks surrounded by curly brackets via python

Sample text: String -> content within the rev tag (via lxml). I'm trying to remove the {{BLOCKS}} within the text. I've used the following regex to remove simple, one line blocks: p = re.compile('\{\{*.*\}\}') nonBracketedString = p.sub('', bracketedString) However this does not remove the first multi line bracketed section at the b...