Questions tagged [syntax]
Questions about the particularities in the symbols that commands and programming languages require for a proper structure.
136
questions
0
votes
0
answers
18
views
How do you mix string literals with format operators on tmux?
I know I can use some Format operators such as
#{=-2:my_format}
It will be a negative trimming of 2 , on my_format , such as say my_format = prefix
:display -p "#{=-2:prefix}"
It will ...
0
votes
1
answer
66
views
tmux %if %else %endif syntax misbehaving when using a String Comparison statement on a format variable invoked on .tmux.conf
I am trying to achieve the functionality of be able to understand when a certain Window in 'tmux' is above or below 10.
So I have used the following on my ~/.tmux.conf, which I am sourcing from ...
0
votes
1
answer
71
views
Regedit key is not found
Powershell:
$paths = @( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpLockdownFiles\%SystemRoot%/System32/drivers/3ware.sys"
)
foreach($path in $paths)
{
...
1
vote
2
answers
66
views
FFMPEG Not Accepting Set Variable %~n1
The script is to process images named Image1.png thru Image10.png. The images are resized then the resized image is converted to video with same file name with extension mp4.
Please consider the ...
0
votes
0
answers
110
views
Can I get the IP address of device using MAC address? or logs of IP used by MAC address?
I been using debian linux version Stretch it seems arp command is helpful but it only collect those online devices
0
votes
1
answer
146
views
Compile Error: Syntax error
Can someone please let me know where the error is in the below code?
Is it that the list is too long? I don't know why I'm getting the syntax error.
Grateful for any help you can provide.
Private Sub ...
1
vote
1
answer
431
views
Is there a regex symbol to break the syntax into multiple lines?
TLDR;
Is there a symbol for breaking up a regex syntax into several lines?
In Bash, for example:
'{beginning och insanely long command \
continuing on a second line}'
You use \ to split long lines ...
1
vote
1
answer
156
views
Would any platforms have problems with missing PHP closing tags?
I've come across some open source PHP files that start with the expected <?php but do not contain a ?> to end it.
As far as I can tell, they work fine on Apache with PHP 8.0
Which platforms (if ...
0
votes
1
answer
302
views
VBA Syntax error calling Shell object
In my VBA script, I have written code to create another .vbs script and write a line of code to that script.
Here is the code:
Set a = fs.CreateTextFile("C:\Users\user\documents\invis.vbs", ...
0
votes
0
answers
741
views
Linux POP v20 How do I remove all password requirements?
Goal: I want to skip all passwords requirements in my new distro Pop OS v21
I don't want to learn Linux I just want to use the end product.
How do I ask mister sudo, please skip all password dialog ...
1
vote
1
answer
159
views
How do I nest a Windows FOR command in the 'set' of another FOR command?
I have a directory of configuration files. If a file contains a 'STATE = 3' entry, I want to extract the value of the TCPHOST entry and the name of the file. There are a lot of nested quotes in that ...
1
vote
0
answers
162
views
Change default directory in putty after login (Windows 10) [duplicate]
Currently have a bat file set up to auto log into putty (cd "C:\Program Files\PuTTY"
start PUTTY.exe -ssh "Sever IP" -l "User Name" -pw "Password") WORKS FINE!!
...
0
votes
1
answer
225
views
Unexpected behaviour with openssl dgst
I'm working with HMAC codes.
I use two different methods and I obtain two different results :(
Use command line:
echo "text" > auxFile
openssl dgst -hmac key auxFile
Output:
HMAC-SHA256(...
0
votes
1
answer
174
views
Visio VBA "Expected: end of statement" error
This has me stumped. It worked fine when I first wrote this code a few days ago. Now, though, it is as if Visio thinks the syntax is incomplete or incorrect. I am getting this error:
I wondered if it ...
0
votes
0
answers
135
views
How do I use a batch file to convert directory name to one with backslashes before spaces for use in linux shell
I am writing a batch script in windows 10 to move files from a specific folder on my android phone to my computer and then delete the files on my phone. I would like to only have to define only one ...
2
votes
1
answer
351
views
How to add two name servers in DNS forward file?
This is my DNS forward file and it gives me error when I want to run it as a service. I think it's a syntax error but don't know how to correct it?
$TTL 86400
@ IN SOA ns1.sudia.com. root.sudia....
0
votes
1
answer
82
views
Find and associate a value in multiple excel spreadsheets
I looked over the internet for a similar problem but I can't find it, so it would be great if you can help. Or maybe I am not asking the correct questions to find the answer.
What I want to do is ...
0
votes
3
answers
14k
views
What is the purpose of these `NUL` characters?
This is purely out of academic curiosity, but I`ve often found files on both Windows (Win10Pro64) as well as Android that are not obfuscated, but contain a bunch of NUL characters between each actual ...
0
votes
1
answer
1k
views
Copy a file with a path with spaces in it, in wsl using powershell?
Scenario
I experienced mild difficulties using powershell to command the wsl to copy a file from a path that contains a space. Neither did I find an example for this specific case. Therefore I ...
0
votes
2
answers
566
views
Syntax error near unexpected token '(' while trying to move files
So I'm trying to follow the solution from this thread: CMD Command to create folder for each file and move file into folder as I want to do the same thing OP of that thread wanted to.
I've manually ...
0
votes
1
answer
672
views
Script doesn't run anymore after upgrading to python 3.7.3
Just a beginner question, I upgraded python from 2.7.10 to python 3.7.3.
Ran some scripts but nothing works anymore. So in the basis entered this code to check:
a=("hello world")
print(a)
and still ...
3
votes
1
answer
575
views
Why is Sublime Text 3.2 highlighting commas after values that start with "for" in Python dictionaries?
In the most recent version of Sublime Text (3.2 Build 3200), I have encountered what I think is a syntax highlighting error when writing in Python. Whenever I create a dictionary that has a key/value ...
2
votes
1
answer
466
views
Bash script with another command inside of quote
Trying to execute a command like
$ sdiff -i -W -B -l -w 140 <(curl -s "https://domain.tld/query.php?d=$(date +%Y%m%d)") <(curl -s "https://domain.tld/query.php?d=$(date --date="yesterday" +%Y%...
-1
votes
2
answers
1k
views
Curl command what do I make wrong? [closed]
I get:
root@dm820:~# ExecStart=/usr/bin/curl'https://dynupdate.no-ip.com/nic/update' --header "Authorization: Basic <$xxxx:$xxx>" -d 'hostname=<hostname>.xxxx.ddns.net'
-sh: --header: ...
4
votes
1
answer
2k
views
What does `@` represent when dealing with Windows registry keys?
What does @ represent when dealing with Windows registry keys?
Examples:
0
votes
1
answer
3k
views
How to use find -iregex OR (|) operator?
Uninstalled an application, but it continues to pop up whenever I try to interact with file types that it used to be associated with.
As usual, find has been invaluable in finding and eliminating ...
3
votes
1
answer
23k
views
How to pass multiple arguments?
How to pass multiple paramaters for Start a program action in Windows Task Scheduler for a batch file? There's no built-in syntax hint...
1
vote
1
answer
1k
views
Compile error: Syntax Error in Excel
I cannot find a solution for this error, I am a beginner in Excel Macro and am trying to use this code to create a dropdown menu that autofills like a google search from Data Validation.
10
votes
2
answers
15k
views
Windows Command line: Is there any way to check syntax of bat file without actually running it?
Windows Command line: Is there any way to check syntax of bat file without actually running it?
2
votes
1
answer
157
views
If "a:domain.com" is used, would it include emails sent from *@subdomain.domain.com address?
Supposedly I have example.com domain and would like it to allow mails sent from subdomain.domain.com.
If the spf record should verify emails sent from *@subdomain.domain.com address (or mailed-by: ...
1
vote
2
answers
269
views
Excel syntax bubble obscures column headers
The screenshot should say it all really.
I keep getting frustrated with the Excel syntax bubble obscuring the column headers. My columns are often narrow and my formulas often refer to whole columns, ...
1
vote
0
answers
266
views
syntax highlighting for python not working in vim for Windows
I want to use Pretty-Python-Vim in windows and have installed the necessary packages an placed .vim directory as described in the website. However even after doing the necessary changes in my vimrc ...
0
votes
1
answer
217
views
File item renaming with brackets
I'm using macOS X, inputing this into the terminal to rename some stuff:
find /Users/Ad//Desktop/Project/src/ -type f -name '*.java' -exec perl -pi -w -e 's/getGreenObject()/newObject("green")/g;' {} ...
0
votes
1
answer
59
views
How do I rename all items in files in folder in folder in folder?
I'm using a MacOS X. I know that this code in the terminal will replace all txt files that include "hello" with "hiThere" in the folder named "world":
perl -pi -w -e 's/hello/hiThere/g;' ~/Desktop/...
0
votes
1
answer
175
views
VBA syntax on SetCell
I currently need a help to fix the code below.
SetCell:="$M$30", MaxMinVal:=2, Valueof:="0", ByChange:="$D$4:$D$28"
The error was compile error: syntax error.
1
vote
1
answer
5k
views
The service cannot find the resource identified by the resource URI and selectors
When run winrm set -? command, I can see the following example how to disable a listener:
C:\Users\Administrator>winrm set -?
Windows Remote Management Command Line Tool
winrm set RESOURCE_URI [-...
3
votes
1
answer
776
views
Vim match containedin not working as expected
I have tried to extend the C syntax in Vim with the example in the manual.
First I launch vim without any config:
vim -u NONE test.c
Then I load the c-syntax and create my extension
syntax on
...
1
vote
1
answer
2k
views
Command Prompt > REG EXPORT > why is this an Invalid syntax?
I'm trying to export the existing settings for .rtf extension with this:
REG EXPORT HKCR\.rtf %USERPROFILE%\Desktop\rtf_fta.reg
It says "Invalid syntax".
What is invalid about it?
UPDATE:
It ...
2
votes
3
answers
647
views
WildCards corrupts Copy`s output file when an output name is specified
copy create's an almost empty (1K) file when a wildcard (*?) is used in the source & an output name is specified.
copy /D /V *?ample.png %homepath%/example.png
it works for some file types (....
0
votes
1
answer
38
views
Evaluating symbolic fractions without assigning values to the symbolic variables in MATLAB?
I'm working with a few matrices and trying to simplify the results involving symbolic terms. The subs() command won't work because there are no values assigned to the variables. But it's nasty trying ...
0
votes
0
answers
165
views
Is it possible to create global .lnk Windows' files? [duplicate]
I tried to research for this, but nothing was clear to me. I'm a true newbie when talking about coding, as it has been a while I don't work with it. All I've found was VB, and some weird hex registry ...
4
votes
0
answers
5k
views
How can I block iframes with uBlock-origin?
I want to define a uBlock-origin filter for iframes on a certain website, whose sources is some other website. Is this possible? If so, what's the appropriate syntax?
1
vote
3
answers
292
views
Lists in markdown
Suppose I have a list something like -
1. some content
2. some content
2b . some content
2c. some content
3. some content
Now if I were to parse in markdown way it comes out as -
some ...
0
votes
1
answer
253
views
Removing a file with special characters through terminal, which has been selected by another command
this is my first post, so go gently :)
I'm creating an AppleScript which runs bash commands to select and delete the most recently modified file within a specified group of folders. The file name ...
0
votes
1
answer
26k
views
Compile error : Syntax error in Excel Macro
I have this VBA code, when I try to run it, it gives me "Compile error: Syntax error" as can be seen in the image. I don't know VBA, what should i do to make this code work ? thanks.
Sub ...
0
votes
2
answers
2k
views
Invalid Input Syntax in PostgreSQL
I am trying to import a csv file in PostgreSQL to a table. The table is set up as here:
Table Setup:
My csv file is delimited by commas and I have enclosed text that has commas within speech marks. ...
0
votes
1
answer
479
views
Should Single Quotes Be Used for Multiple Row MySQL UPDATEs?
When you are performing a SQL UPDATE on multiple rows in MySQL, it seems that you can either put single quotes around every value or not and it will produce the same results.
Is there a reason for ...
0
votes
1
answer
618
views
How to read PowerShell Documentation Syntax
I could use a good explanation of PowerShell Documentation Syntax:
> man Update-Help
SYNTAX
Update-Help [[-Module] <string[]>] [[-SourcePath] <string[]>] [[-UICulture] <...
0
votes
1
answer
193
views
Ncrack:brute forcing with sock4 or 5 helps?
Ncrack:brute forcing with sock4 or 5 helps?i have a slow pc and i found this:
--proxy <type://proxy:port>: Make connections via socks4, 4a, http.
would be --proxy socks5://120.200.200.125:9150 ...
0
votes
1
answer
3k
views
Wireshark display filter for VLAN ID in Q-in-Q outer tag
What is the syntax of a display filter that exclusively shows double-tagged frames whose outer tag has VID 129. I want to filter the S-tag. I do not want to filter the C-tag.