21,621 questions
Advice
0
votes
13
replies
100
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
64
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
80
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
38
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
63
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
34
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 ...
2
votes
2
answers
189
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:]@,._\-...
-1
votes
1
answer
97
views
Is there a way to capture a value from the left expression and use it on the right expression?
I want to modify or compute a value before assigning it to a const. Is there a way to do this in a single line expression?
I can use labeled block syntax, but I’m wondering if there’s another syntax ...
Advice
0
votes
1
replies
227
views
Why are double brackets required?
The following minimal example does not compile in Delphi 12.1:
program Project1;
{$APPTYPE CONSOLE}
uses
System.RTTI;
var
Value: TValue;
begin
TValue.Make (0, TypeInfo (TObject), Value);
...
-4
votes
1
answer
93
views
C++ preprocessor VARARGS - invalid syntax in a NodejS header file
I'm experimenting a bit with trying to build NodeJS 24.11.1 with GCC 13.4.0 on an older OS X system, mostly as a can-it-be-done project.
Regardless of the reasons, among the hurdles that could be ...
0
votes
2
answers
129
views
Windows 11 powershell run executable with parameter switches when IF statement false
Windows 11 Power shell
I'm trying to run the following IF statement in power shell - basically to check if a file exists on encrypted drive P, if it doesn't then create the encrypted drive. I get an ...
23
votes
1
answer
3k
views
How does the compiler interpret '____'?
I have found a piece of code that defines register access permissions for a chip. Using arm-none-eabi-gcc it compiles correctly.
Here is the code:
static const uint8_t defaultRegisterAccess[...
3
votes
1
answer
134
views
PowerShell Script: When the Ethernet Port status changes why doesn't the status report show the actual port status?
I am an occasional casual programmer (for about 60 years now!). I wrote 2 functional SNMP PowerShell desktop shortcut scripts 4 years ago. Now I am writing two scripts for my old Windows 10 system: ...
0
votes
0
answers
99
views
New dbt Prehook Depreciation Syntax?
I have a prehook in the config section of my model. I don't want it to be part of the project yml, just in my model query itself. It's been working fine up until this week where I started getting ...
2
votes
3
answers
165
views
Calling exe with Start-Process is not getting arguments correctly
I have a tool for editing the VersionInfo portion of our executables so that we can tie all of the different components to one installer part number. The tool I am using is resourcehacker (https://www....