syntax Questions

3

Solved

I'm dusting off my Atari ST 520, and am trying to understand some semantic details of the GFA basic. The TYPE(ptr) function is documented this way : Determines the type of the variable at which ...
Guardhouse asked 26/2, 2014 at 10:24

5

Solved

In Python I can do this: >>> import itertools >>> for i, j, in itertools.product(range(3), repeat=2): print i, j ... 0 0 0 1 0 2 1 0 1 1 1 2 2 0 2 1 2 2 Is it possible to have ...
Cohbath asked 26/9, 2017 at 9:34

2

Please help me to understand how can I comment out a single line from a clang-tidy configuration file.
Bautista asked 4/3, 2021 at 9:13

3

Solved

At work I've been using linux and the GCC compiler for C++11 and C++14. In some of the code at work, I've used a union to store both a reference and a pointer, as so: (Simplified to just the import...
Contrayerva asked 1/8, 2016 at 4:58

4

Sass announced there will be some upcoming breaking changes to the syntax in mixed declarations. As of Sass 1.77.7 I'm getting the following warnings when compiling. - Sass's behavior for declarat...
Gurolinick asked 7/8 at 0:33

4

Solved

This question is not seeking developer code formatting opinions. Personally, I prefer to use scientific notation in my JS code when I can because I believe it is more readable. For me, 6e8 is more ...
Foreignborn asked 22/9, 2017 at 14:10

5

Solved

In Python, what's the difference between arguments having default values: def f(a,b,c=1,d=2): pass and keyword arguments: def f(a=1,b=2,c=3): pass ? I guess there's no difference, but the tut...
Columniation asked 12/1, 2011 at 1:48

11

Solved

What is the proper syntax for a method that checks a string for a pattern, and returns true or false if the regex matches? Basic idea: def has_regex?(string) pattern = /something/i return strin...
Hapless asked 7/2, 2010 at 0:12

1

Solved

Let's say you have an enum: enum Expr { binExp, unExp, Literal, Group, } Should you prefer match or if/else chains to call methods based on Expr? match self { Expr::binExp => todo!(), ...
Madalynmadam asked 9/4, 2022 at 9:37

4

Solved

I can express 3rd page is the title page in YAML title: 3 What about the following? Pages 10 to 15 contains chapter 1 One way is chapter 1: [10, 11, 12, 13, 14, 15] I would prefer a...
Whinny asked 26/7, 2010 at 16:52

5

Solved

I know that there is already a way to find if a number is even or odd using the modulus (What is the fastest way to find if a number is even or odd?). However, I was wondering if there is a C# func...
Jorin asked 15/12, 2014 at 16:39

10

Solved

There is a known "pattern" to get the captured group value or an empty string if no match: match = re.search('regex', 'text') if match: value = match.group(1) else: value = "" or: match = re....
Pitchblack asked 29/4, 2014 at 13:59

8

Solved

How can I check the SQL syntax in a .sql file?
Federalism asked 5/6, 2009 at 15:29

4

Solved

Currently writing a function that converts a numerical grade into American system. Basically the result should be like this: You got a D (60%)! But I get this : You got a 60 60%! Apart from th...
Lancaster asked 29/1, 2020 at 17:21

3

Solved

I stumbled upon this code on github: if (requestHeaders is {}) and I don't understand what it does exactly. Upon experimenting it's seems to only be false when requestHeaders is null. Is this ...
Declarant asked 16/12, 2019 at 17:17

4

Solved

Not to be confused with how to split a string parsing wise, e.g.: Split a string in C++? I am a bit confused as to how to split a string onto multiple lines in c++. This sounds like a simple ques...
Franciscofranciska asked 4/10, 2010 at 21:13

6

Solved

It may not be a good idea to name a variable after a reserved word, but I am curious: Is there any escape syntax in Python to allow you to use a reserved word as the name of a variable? For examp...
Paralogism asked 28/6, 2011 at 8:50

2

Solved

Currently learning about Scala 3 implicits but I'm having a hard time grasping what the ​as and with keywords do in a definition like this: given listOrdering[A](using ord: Ordering[A]) as Ordering...
Prow asked 3/12, 2021 at 10:45

5

Solved

When you initialize an array, you can assign multiple values to it in one spot: int array [] = {1,3,34,5,6}; ... but what if the array is already initialized and I want to completely replace the v...
Woodford asked 20/4, 2011 at 15:25

4

Solved

Having just pulled my hair off because of a difference, I'd like to know what the difference really is in Python 2.5. I had two blocks of code (dbao.getConnection() returns a MySQLdb connection). ...
Meri asked 24/5, 2009 at 11:17

3

Solved

I have a table that was created as such: CREATE TABLE IF NOT EXISTS DIM_Jour ( jour_id uuid NOT NULL, AAAA int, MM int, JJ int, Jour_Semaine int, Num_Semaine int, PRIMARY KEY (jour_id) ); ...
Voluptuous asked 19/11, 2020 at 15:34

18

Is it possible to have multi-line strings in JSON? It's mostly for visual comfort so I suppose I can just turn word wrap on in my editor, but I'm just kinda curious. I'm writing some data files in ...
Sjoberg asked 6/3, 2010 at 14:29

31

Solved

In PHP, strings are concatenated together as follows: $foo = "Hello"; $foo .= " World"; Here, $foo becomes "Hello World". How is this accomplished in Bash?
Encumbrance asked 15/11, 2010 at 5:38

4

Solved

I'm new to Dart and just learning the basics. The Dart-Homepage shows following: It turns out that Dart does indeed have a way to ask if an optional parameter was provided when the method was ...
Bb asked 14/6, 2015 at 14:33

2

Solved

Is the following a standard C function declaration according to ISO/IEC 9899:2017 (c17)? int foo(int (bar), int (baz)); If so, please point me to the section in the standard that defines this. In ...
Acephalous asked 14/3 at 21:16

© 2022 - 2024 — McMap. All rights reserved.