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

Need help finding open brackets in jQuery code

I was wondering if some one could help me close the code correctly. I have tried to close it in jsFiddle and on the page but somewhere I am mission one of } or ) or ; Here is the code below and help is appreciated: // validate form and submit var $j…
ZeePee
  • 7
  • 5
-2
votes
2 answers

Sed - Cannot capture and replace with curly brackets in a file

I would like to capture and replace with sed the following pattern : {{/tagName}}} to {{/tagName}} } But I cannot figure it out I have tried sed 's/({{\/.*}})/\1 }/g' But it does not work. It does not capture and the blank space does not work in…
toch
  • 67
  • 6
-2
votes
1 answer

How do I create lists in a list in Python? Is it possible?

How to make list each character of list? like this: li = ['A','B','C'] into : li = [['A'],['B'],['C']]
-2
votes
4 answers

Why don't some if/else statements use the curly {} brackets?

I have a serious question that's been bugging me for the longest time now. I've recently been assigned to do the Logic-1 > alarmClock on CodingBat and I came up with this code as my solution: public String alarmClock(int day, boolean vacation) { …
intEOF
  • 15
  • 3
-2
votes
3 answers

What's the difference between veriable and veriable with brackets in PHP?

$db["db_name"] = "users"; $db_name = "users"; How will example 1 be different from example 2?
-2
votes
1 answer

Can multiple values be assigned to one variable without brackets "[]" or parentheses "()" (Python)

From this django answer in SO, I found 3 variables "JAN", "FEB" and "MAR" in the class "Month" extending "models.TextChoices" as shown below: # "models.py" from django.db import models class MyModel(models.Model): class…
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
-2
votes
1 answer

text on HTML webpage is going from edge to edge. How do I center the paragraph so that it stays more in the middle of the screen?

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and…

-2
votes
2 answers

Print List elements in loop without Brackets and Quote marks

I am trying to print the elements of a list inside a loop but the elements are displaying surrounded by ['']. Is there any way to format output to remove these. Further code and examples shown below This is the code i am running: for i in…
-2
votes
1 answer

Why is it possible to call python's datetime.datetime without using ( )?

I am wondering why this works import datetime as dt test1 = dt.datetime print(test) ''' prints: ''' So as far as I understand python, to create an instance of a class you need to call it with brackets like this: test2 =…
CodeCannibal
  • 324
  • 6
  • 21
-2
votes
1 answer

Parenthesis/Bracket checking using stack

I am checking balanced brackets in string using string. I have made implement stack using class. Firstly when i had run this program using util package it was giving correct answer but when i made custom stack this is giving wrong outputs.What i am…
-2
votes
1 answer

how to extract text without brackets using xpath python method?

I am building a database that collects the news published on a newspaper website following instructions from this code https://github.com/jhnwr/webscrapenewsarticles/blob/master/newscraper.py.. John Watson Rooney github site But when I extract the…
lcricaurte
  • 53
  • 1
  • 6
-2
votes
1 answer

Python Key error json.loads with brackets

So I'm trying to use this news API to get the latest news for a discord bot. I'm able to load all the json text, but when I try to access certain keys, I get an error. {'status': 'ok', 'totalResults': 38, 'articles': [{'source': {'id': 'cbc-news',…
L0k3 d20uz4
  • 67
  • 1
  • 9
-2
votes
3 answers

How to print list of string inside bracket?

I am new to Java. I am facing a problem to print a list of string separated by commas inside brackets. public class House extends Property { protected static List paints; public String paint; public House() { super("House", 45); …
-2
votes
3 answers

what do brackets when it is next to an iterative function?

What does [] mean when it is next to an iterative function. Not entailing keys and values e.g. { |char| count[char] += 1 }
-2
votes
1 answer

media queries in css not working properly, brackets

been trying to do a Nav bar, though through live stream it the @.media command does not effect my coding, no idea why. it should just keep a home sign in mobile state, though it does not effect it all. using chrome browsers, Brackets. help me…