Skip to main content

Questions tagged [syntax]

Syntax refers to the actual language elements and symbols themselves. Questions should be tagged as syntax when the question specifically and almost completely relates to syntax alone. This tag should be used with a specific language tag

syntax
-1 votes
2 answers
46 views

Clarity on Java Lambda Syntax

From my understanding, this is a single statement in Java: while((x % p == 0l) && (x > p)) x /= p; If that is the case, why is this a syntax error: final AtomicLong subtotal = new ...
Tripp Kinetics's user avatar
0 votes
2 answers
36 views

null keyword on class declaration

Out of curiosity, I was looking through the files of a simple Android application developed for controlling a machine (I didn't develop it, which isn't relevant to the question, I suppose). I'm trying ...
Valenj10's user avatar
0 votes
0 answers
20 views

How to use `reduce` with `and` in MIT-Scheme? [duplicate]

Recently when I self-learnt MIT 6.5151 course, I first read CS 61AS Unit 0 as the preparation. Then I have read SICP 1 to 2.1 (with related lecture notes) as ps0 requires (also read 2.2.1 as CS 61A ...
An5Drama's user avatar
  • 377
0 votes
4 answers
101 views

In Ruby, how do I find a value in an array of hashes?

I am trying to get a value in an array of hashes in Ruby. Given the following information below: # array_of_hash_objects will look something like this: # [ # { name: 'Ruby', is_my_favorite?: ...
Matt's user avatar
  • 13
0 votes
0 answers
18 views

How can I correct or get rid of this syntax error? [closed]

I am new to coding and messed up somewhere using my Mac terminal window to install Ruby. I am getting this message on start up when the terminal window opens: Last login: Fri Jul 19 19:49:59 on ...
Edward's user avatar
  • 1
0 votes
1 answer
23 views

Are Python class member functions argument type checked at parse time?

I'm not intending to change this in my implementation, it's to improve my understanding of porting this code: In the extract from the track_holder.py module below, why does the TrackObject class have ...
Alexir Hannah's user avatar
0 votes
0 answers
21 views

"Ill-formed syntax: (define (expmod a num num) ((exptmod num) a num))" in Scheme

I am learning SICP up to chapter 2.2.1 now. I have the following code: (define (modular n op) (lambda (a b) (modulo (op a b) n))) (define (exptmod p) (let ((mod* (modular p *))) (define (...
An5Drama's user avatar
  • 377
1 vote
1 answer
32 views

Parse Error CSS validator "@media { footer{... a {...}} }"

I'm trying to validate my css file and I get a Parse Error in this line and I'm not quite sure why, I do have all the tags closed, and if i place the outside of the footer it will change my desired ...
Gabriela Rodrigues's user avatar
0 votes
1 answer
44 views

In SageMath, how to use GF() on a very large finite field which is several thousands bits long?

As far I understand it correctly, GF(Integer) is used to declare a finite field which can for example be used for declaring an elliptic curve (this is what I want to do). But why using a very large ...
user2284570's user avatar
  • 3,012
0 votes
0 answers
25 views

cvxpy diagonal matrix as variable

Given some constraints (useless for this question), I want to minimize -log(det(M)) for some diagonal n x n matrix M. Usually, we do this for symmetric matrices, so that M = cvxpy.Variable((n, n), ...
Nicolas's user avatar
  • 65
0 votes
0 answers
16 views

react syntax highlighter not changing text fetched from github

I am using react-syntax-highlighter and trying to make the pr i pulled from github to look pretty but it does not work. Am I applying it wrong? Should I be applying it elsewhere? Is there an ...
just demis's user avatar
0 votes
1 answer
75 views

I am trying to understand 'restrict' keyword introduced in C99

So for the past week I tried to understand how restrict works, I have a few suspisions on how it works and I just want to make sure that I am at least correct in the assumptions I have. So here's the ...
user avatar
0 votes
0 answers
18 views

How to prevent escaping with \ [duplicate]

I have a filepath that is structured as \\abc\xyz\file.xlsx I need the first section excluding the file name \\abc\xyz\ with the two \\ in the beginning and the additional one at the end as a string ...
gng235's user avatar
  • 1
0 votes
0 answers
34 views

Can I have an or statement within a string when using Dir to look for files/folders?

I'm currently trying to create a program that will take an input from user that is a number eg. 58, 313, 490 and find the file with that number in it. To overcome it having multiple outputs, such as ...
lemster's user avatar
0 votes
1 answer
51 views

dart named parameters as object

I'm new to dart. I'm trying to factorize some code, and it involves pre-building a few values which are then passed into named parameters (external library). I'd like to know if i can do the following:...
y_nk's user avatar
  • 2,234

15 30 50 per page
1
2 3 4 5
1440