The ~ (tilde) can have different meanings: it can be an operator, performing a bitwise negation on a binary number - all 1 bits are set to 0 and all 0 bits are set to 1. It can also simply be the tilde character itself, as used in Windows for shortening long path names.
Questions tagged [tilde]
171 questions
0
votes
2 answers
Cannot create directory with tilde
Given this script
# cat foo.sh
echo $HOME
set -x
mkdir ~
I am getting this result
# ./foo.sh
/home/Steven Penny
++ mkdir ''
mkdir: cannot create directory `': No such file or directory
If I run mkdir "$HOME" I have no problem. I think the issue is…

Zombo
- 1
- 62
- 391
- 407
0
votes
1 answer
How to get real file name without tilde substitution
I use dirent.h library for fetching name of file. While most of them are correct, this one:
1Zdjęcie główne.JPG_38ba97e477158efb3563274f5bd39af7.jpg_cda6829b61253f64b44a5c7f15e00b45 - Copy.jpg
is read as
1ZDJCI~2.JPG
What can I do to…

Arko Jarko
- 39
- 2
0
votes
1 answer
Bit manipulation tilde
I understand that tilde flips every bits, but if I do int num = ~0
Why the result is num = -1 , neither max value of int or unsigned int?

DoReMi
- 221
- 1
- 6
0
votes
2 answers
What is the tight bound for big O?
When referring to big o, what is considered the tight bound?
For example, in the function, f(n) = 10c7n^3 + 10c4nlog(n)) // This function represents the number of operations in terms of n //
according to this example, the tight bound for big O…

Night Owl
- 55
- 2
- 5
0
votes
1 answer
Remap hotkey without losing native hotkey functionality
I want the keyboard shortcut ctrl+tab to perform two functions:
ctrl+tab (its normal function, e.g., to switch tabs in a web browser)
ctrl+F6 (which can be used to switch between Microsoft Word documents, for example)
It doesn't need to be…

Anthony Vella
- 3
- 1
0
votes
2 answers
Any advantage to using variable with tilde in javascript vs. -1?
Other than a slight performance gain, is there an advantage to using !~x as true vs. checking to see if ~-1 ?

user2441849
- 25
- 1
0
votes
2 answers
Multiple checkboxes on a single page
Can anyone help me out with my ratingsystem? I'm trying to duplicate my section with the class of container(Entire progressbar), but whenever I do so the ratingbar only works for either one of the progressbars. I've kept in mind to change the id's…

Stephan-v
- 19,255
- 31
- 115
- 201
0
votes
1 answer
Microsoft MVC4 ~ Expansion is inconsistent
In MVC, the ~ at the top of a server side directory reference should be converted to the root of the website.
I have the following lines at the top of my cshtml file: