21,598 questions
Advice
0
votes
3
replies
63
views
What is the <> token in bash
I am doing a project where I must simulate a small shell, the tokens I need to recognize and interpret as bash are:
<
>
>>
<<
|
I have understood the use and purpose of each of them ...
Advice
0
votes
2
replies
63
views
Understanding the Wikipedia Laplace expansion code
While studying up on Laplace expansion for a graphing class I saw code on the wikipedia page for a function that finds the determinant of a matrix using Laplace expansion written in Python (The code ...
2
votes
2
answers
101
views
Why is it necessary to repeat HTML attribute `a` in this XPath query (`/div[a="Download"]/a/@href`)
xidel 'https://softwarefoundations.cis.upenn.edu/vfa-current/index.html' -e '//div[@id="button_block"]/div[a="Download"]/a/@href'
works, but
xidel 'https://softwarefoundations.cis....
Best practices
1
vote
4
replies
116
views
Ways to loop through list of dictionaries containing a known pair of keys
I'm pretty new to Python and am trying to understand the different ways of achieving things.
I have an list of dictionaries with key value pairs:
a = [ { "Key": "K1", "Value&...
Best practices
1
vote
3
replies
122
views
Excel VBA - [RangeName] vs Range("RangeName")
In excel I use name ranges lots, and in VBA I noticed that you can reference these name ranges or tables by putting them in square brackets; however on all the forums I never see the square bracket ...
1
vote
0
answers
44
views
Powershell and variable substitution - keep getting literal versus value [duplicate]
Warning: Newbie level at Powershell, so be gentle.
I keep getting the name of the variable itself embedded, instead of its string value, and every syntax I've tried so far fails. I am using a here-...
0
votes
1
answer
51
views
What does a dash inside of curly braces mean in Hugo Templating?
I have been using Hugo for my personal site.
In order to override templates, I had to inspect the source code of my chosen theme, Hugo Papermod. As a result I encountered a dash immediately after ...
1
vote
1
answer
85
views
Stored Procedure Syntax Error (SQL Error [1064] [42000]) [duplicate]
DELIMITER //
CREATE PROCEDURE CreateProductTable()
BEGIN
CREATE TABLE IF NOT EXISTS product (
product_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
product_name ...
Advice
0
votes
13
replies
6k
views
string String^ System::String^ what the difference in C++
I am started coded in C++ not so far ago, and I still don't understand some things.
For example, what is system. And if I declared using namespace system; at the top of code then I should write just ...
Best practices
1
vote
4
replies
75
views
Rust: unpack tuple in place (like *args in Python)
I have a tuple-struct and I want to init it with the values from another tuple, and I want to do it in one line, like I would with the `*args`:
pub struct Dimensions(pub u32, pub u32);
...
// let ...
1
vote
1
answer
93
views
Syntax match issue with lookahead (regex \@=)
My understanding is the match resulting from \@= SHOULD NOT INCLUDE the lookahead characters. Here is an example that has me perplexed:
syn match InspectKeyword '\v(\+\s)\@=\w+'
Results in:
The ...
0
votes
0
answers
49
views
Angular dialog popup with query parameters (without using materials package)
need to know the syntax for router.navigate for dialog Popup from a click event
below routing works ( as a non dialog webpage) & wanted convert into a popup !
but how do I open it as a dialog(...
0
votes
0
answers
75
views
Bootloader stopped working after I changed the syntax from gas to nasm
I have this bootloader I made a while ago and I would like it to be in nasm:
.intel_syntax noprefix
.code16
.equ STACK_TOP, 0x7C00
.equ SELF_LOAD, 0x7C00
.equ ELF_HDR_LOAD, 0x7E00
.equ SECT_SIZE, ...
Best practices
1
vote
1
replies
39
views
What are the pros and cons of a terse property/method-syntax?
In designing a language from scratch, should methods use a self variable to access properties and other methods? Or should they imply their target with .prop? Or should they treat properties as local ...
3
votes
2
answers
232
views
Why is the position of `[:space:]` within a character class seemingly important?
I'd like to use constants to build regular expressions. However, in this case I got an unexpected syntax error:
#!/usr/bin/perl
use strict;
use warnings;
use constant CR_SAFE => '[:alnum:]@,._\-...