Questions tagged [brackets]

Brackets are tall punctuation marks used in matched pairs within text, to set apart or interject other text. They have a variety of meanings in different programming languages. DO NOT USE THIS for the IDE, use [adobe-brackets] instead.

Brackets are tall punctuation marks used in matched pairs within text, to set apart or interject other text. They have a variety of meanings in different programming languages.

1033 questions
8
votes
5 answers

How does the ~[] construction work in JavaScript?

I've come across a working JavaScript code that I can't explain. For example: +[]===0 -[]===0 ~[]===-1 ~-~[]===-2 ~-~-~-~-~[]===-5 ~-~-~-~-~[]+~[]===-6 ~+~[]===0 ~+~+~[]===-1 ~+~+~+~[]===0 Can you explain the logic of these expressions?
Denis
  • 101
  • 3
8
votes
3 answers

Visual Studio Bracket Colorization

Is there a free bracket colorization extension compatible with VS 2022 and Windows Pro 10 OS? I used Viasfora with VS 2019 but it is not yet available with VS 2022. I checked free Extension options in Manage Extensions, and as far as I can see there…
Anne Bailly
  • 391
  • 3
  • 9
8
votes
4 answers

valid bracket list in prolog

I'm trying to test if a list of brackets is valid. My code: checkbrackets([]). checkbrackets(['('|T]):- T = [')'|List], checkbrackets(List). checkbrackets(['('|T]):- T = ['('|List], append(Rest,[')'],T), …
Tofu
  • 199
  • 2
  • 12
8
votes
1 answer

Visual studio 2010 + resharper bracket indentation problem

I'm using VS 2010 + resharper, and i'm tired reformatting bracket indentation in code as i want it. As example if i have code like: operators.Keys .ToList() .ForEach(k => filters …
Andrej Slivko
  • 1,236
  • 2
  • 12
  • 27
8
votes
3 answers

Special uses of this syntax in PHP? (Triple 'Angle Brackets')

Given the following code: $myString = <<