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
21,593
questions
0
votes
0
answers
18
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 ...
0
votes
5
answers
92
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?: ...
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 ...
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 ...
0
votes
0
answers
20
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 (...
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 ...
0
votes
1
answer
43
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 ...
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), ...
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 ...
0
votes
1
answer
74
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 ...
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 ...
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 ...
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:...
0
votes
1
answer
49
views
Understanding Error CS1579 foreach statement cannot operate on variables of type
Getting this error in my razor page app:
Severity Code Description Project File Line Suppression State
Error (active) CS1579 foreach statement cannot operate on variables of type '...
2
votes
0
answers
21
views
How to implement vector stores and RAG with Open AI functions with proven rule base code generation
How to implement vector stores and RAG with OpenAI playground functions json code rule base for ez function loading that is a lot of time very hard to do , this is a proven system to max you code ...