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
-3
votes
1 answer

Jquery dont work in brackets

$(function() { function after_form_submitted(data) { if(data.result == 'success') { $('form#reused_form').hide(); $('#success_message').show(); $('#error_message').hide(); } …
-3
votes
1 answer

R : understanding simplified script with brackets or hooks?

I would like to understand how really works this script : y <- y[keep, , keep.lib.sizes=FALSE] in : keep <- rowSums(cpm(y)>1) >= 3 y <- y[keep, , keep.lib.sizes=FALSE] I do know d.f[a,b] but I can not find R-doc for d.f[a, ,b]. I tried "brackets",…
Zampaï
  • 11
  • 6
-3
votes
3 answers

What is the syntax of this block of code?

I was searching for a way to return the mode of an array when I found this answer: var store = ['1','2','2','3','4']; var frequency = {}; // array of frequency. var max = 0; // holds the max frequency. var result; // holds the max frequency…
Space Ostrich
  • 413
  • 3
  • 5
  • 13
-3
votes
2 answers

Bracket not expected in else statement?

I have an error, unexpected brackets on an else statement, which makes no sense. What am I doing wrong? if ($sortBy == "random") { $sortByOption1 = "selected"; } else if ($sortBy == "mostvotes") { $sortByOption2 = "selected"; } else ($sortBy ==…
frosty
  • 2,559
  • 8
  • 37
  • 73
-3
votes
2 answers

How to replace anything before and after curly brackets but keep content between them using PHP

I need your help how can I remove anything after and before curly brackets {} in PHP. But I don't want to remove curly brackets and content inside it so if there is anything after of before curly brackets. I tried this: …
Tim
  • 21
  • 3
-3
votes
1 answer

Multiple square brackets in python

def startpop(pop,job): i = 0 L = [[[(random.uniform(1,0))]]] while i < pop: k = 0 if len(L) <= i: L.append([[random.uniform(1,0)]]) I'm trying to understand this code. What is the meaning of…
Daniel
  • 13
  • 1
  • 3
-3
votes
2 answers

How to return value of List without []?

Is it possible to return value from list or a array without brackets? For example i have List of integers: List myIntegers = new List(); myIntegers.Add(1); myIntegers.Add(2); myIntegers.Add(3); int newValue = myIntegers; //normally i…
-3
votes
2 answers

what regular expression can match the [ and ] characters?

I'm trying to use the java method replaceAll(), that removes from a string all characters that match a given regex, to remove the opening and closing brackets characters from a string. So, I need to use as a parameter a regex that matches [ and…
kace91
  • 821
  • 1
  • 10
  • 23
-3
votes
3 answers

Bash script to find whether brackets in a file were closed correctly

I'm a total beginner, thus I have this stupid question. Let's say I have a brackets.txt file which has a string like this "(()))))(()()()()()()()()()()()" and I want to write a script that checks whether all of the brackets were closed correctly and…
Acallar
  • 453
  • 1
  • 5
  • 5
-3
votes
3 answers

Java - Checking opening/closing parens in String

I'm trying to figure out how to check if a String is formatted correctly with parens: ( and ). There should be the same number of ( as ). Also, the parens should be formatted correctly so that a ( and ) form a pair. Other characters may appear in…
-3
votes
1 answer

Why am I geting these bracket errors in my code?

I'm really not sure why it's doing this but it seems to be an issue with brackets. I'm getting the following errors while running this segment of code for Android in Eclipse: private static final String TWITTER_ACCESS_TOKEN_URL =…
stuart
  • 11
  • 4
-4
votes
1 answer

What does this line of code in CS50s practice problem do ? (Language is C)

I am currently working on the "half" practice problem in week1 of the CS50x course. I am having trouble reading a couple of lines in the code they provide and was hoping someone could clear up what they did for me. The Line of code is: float…
-4
votes
3 answers

remove square and curly brackets from list

CURRENT: [ {key1: [values]}, {key2: [values]}, ] WHAT I WANT: (no i dont want to print a string) { key1: [values], key2: [values], } am creating a dictionary from a…
mag
  • 1
  • 1
-4
votes
1 answer

Create or change an xml button using xml text field and javascript

I'm developing an android application, I want a button to appear with the button text being whatever the user inputs into a text field. Confused on how to achieve this.
Taylor
  • 1
-4
votes
1 answer

Is there a difference in declaring an array with or without square braces in C++?

I'm still new to C++ and I've got a question concerning arrays as parameters in functions/ constructors. I've realized that it is possible to declare an array in two ways (maybe there are more, which I haven't seen before): 1. void foo(int…
Areopag
  • 43
  • 7
1 2 3
68
69