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
-2
votes
2 answers

Confusing Array syntax php/html

Please help. I've come across an input field like this and it is confusing me: I know it has to do with an array, but does this even make sense leaving the first and third bracket sets empty? The…
Malbert
  • 3
  • 2
-2
votes
1 answer

IIF expression missing the bracket

Im using the iff expression in the query. trying to run it but it says this missing a closing parenthesis, bracket. but i checked in the expression. not sure about which one is missing. thanks! =IIf([Project status]="Project request", "1",…
-2
votes
3 answers

Readability and IF-block brackets: best practice

I am preparing a short tutorial for level 1 uni students learning JavaScript basics. The task is to validate a phone number. The number must not contain non-digits and must be 14 digits long or less. The following code excerpt is what I came up with…
Peter Perháč
  • 20,434
  • 21
  • 120
  • 152
-2
votes
1 answer

parser for formula using python

I want to construct a parse tree of bracketed formula using python. For example, parse tree of ((x='a' OR x= 'b') AND(y ='c' OR y = 'd' )) using python The formula not necessarily is in normal form. It could be a k-depth circuit as well. The parser…
mxant
  • 17
  • 3
-2
votes
3 answers

Ruby - Parsing '(3)' to integer returns 0

I'm trying to get integer from string '(3)'. However method to_i returns 0. It seems that brackets with quotes cause the problem, but I don't understand the reason. '3'.to_i => 3 (3).to_i => 3 '(3)'.to_i => 0 Why does it happen and how to solve…
optimista
  • 804
  • 1
  • 13
  • 27
-2
votes
1 answer

angle bracket mysql php

I have troubles fetching data from a MySQL database when the text inside a VARCHAR field is surrounded by angle brackets ('<' and '>' characters). Let me be more specific. This is the table from which I'm fetching data: mysql> describe msgs; …
shodanshok
  • 167
  • 11
-3
votes
2 answers

What is the difference in [ ] and ( ) in SQL?

I've seen both used but I can't seem to understand when to use each? To me is seems like you enter the name of the table you are referring from in the ( ) and the field name in the [ ]? Could anyone explain?
sr90
  • 67
  • 1
  • 7
-3
votes
1 answer

Javascript Regex: get specific parts inside brackets without taking extra brackets

I am building a program that would simplify coding discord bots. I wanted to add inline functions, but seems like my regex selector is not the perfect match. My program loops through every inline function and tests if it exists in the string. And…
Yk Music
  • 29
  • 7
-3
votes
2 answers

PYTHON Sort and Print Dicitonary without Brackets

Here's my code: `tv_dict = {} user_input = input() file_open = open(user_input) file_content = file_open.readlines() new_content = [] for x in file_content: new_content.append(x.strip()) list_len = len(new_content) // 2 loop_cy = 1 k = -1 v =…
-3
votes
2 answers

Python, remove brackets from using values from a dict

mappe = {10 : [10, 1]} pair = list(mappe.values()) liste = [] liste.append((pair) + [5, 6]) --> [[10,1], 5, 6]] how can i remove the inner brackets?
mark882
  • 25
  • 5
-3
votes
1 answer

PHP check if string contains brackets

I just want to build a php function that checking if string is contain brackets and return boolean, anyone can help? example: $string = "{hallo}"; // true $string2 = "h{allo}"; //true $string3 = "hal}{o"; //false $string4 = "hallo{}";//false
-3
votes
1 answer

Why Does This Keep Happening To Me When I Do The Live Preview

Good Morning Everyone, So basically I have Brackets And File Zila, And I'm currently working on my final project however whenever I do the live preview in Brackets to check to make sure everything shows up and works correctly the url shows up as…
Veda
  • 5
  • 4
-3
votes
1 answer

Remove square brackets from json file

I have a json file with the following structure: [{"date_value": "2021-04-01", "boolean_value": false, "string_value": "Any string value", "integer_value": 0}] I need to edit every element with new data but I having a wrong and different result on…
pmatos
  • 276
  • 4
  • 18
-3
votes
2 answers

android brackets problem

hi to all can any one help me with this problem i have brackets problem there is 1 that is either extra or missing cant find it thank you Handler speedHandler = new Handler(); Runnable unitspeedtimer = new Runnable() { public void…
moe
  • 167
  • 1
  • 1
  • 6
-3
votes
1 answer

regex_search don't recognize parenthese

why regex_search(line, smatch, tofind) don't find the expression "toto (titi)" because of the bracket? Without bracket it works. How to remplace ( by a pattern that match this?
aez
  • 27
  • 1
  • 6