tilde | is where the is — my dotfiles | Command Line Interface library
kandi X-RAY | tilde Summary
kandi X-RAY | tilde Summary
Tilde: ~ is where the is. Various configuration files ("dotfiles") and scripts from my home directory. I use this on new computers so I feel more at home. To install, execute: git clone && tilde/install.sh. To update an existing install, go to Tilde's directory and execute: git pull && ./install.sh. See COPYING for licence details.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tilde
tilde Key Features
tilde Examples and Code Snippets
Community Discussions
Trending Discussions on tilde
QUESTION
I have run into an issue where a perl script we use to parse a text file is omitting lines containing the tilde (~) character, and I can't figure out why.
The sample below illustrates what I mean:
...ANSWER
Answered 2022-Feb-18 at 17:42~
is special in forms (see perlform) and there's no way to escape it. But you can create a field for it and populate it with a tilde:
QUESTION
After upgrading an Angular 12 project to Angular 13 I encountered an issue where SCSS was no longer to locate a shared style sheet in a library. It appears that that Tilde (~) no longer resolves to node_modules.
Broken:
@use '~my-angular-lib' as lib;
Works:
@use '../node_modules/my-angular-lib' as lib;
I noticed that angular material just directly refences '@angular/material' as of Angular 13 but I can't figure out how to get that to work with my library. It seems kind of hacky to use a relative path to mode_modules every time.
What is the current best method of refencing a style sheet in node_modules, or what am I missing to where ~ no longer points to node_modules?
...ANSWER
Answered 2021-Nov-27 at 16:15Angular has been deprecating the use of ~
for Sass @use
and @import
statements for a while.
Officially, as of Angular version 13 the usage of tilde imports won't be supported anymore.
QUESTION
Using the default
directory in Ansible, I set the variable:
ANSWER
Answered 2022-Jan-18 at 10:27You can use {{ lookup('env', 'HOME') }}
to retrieve the value of $HOME
which is equal to the tilde.
QUESTION
LRESULT CALLBACK ProcessMsgs(HWND hwnd, UINT msg, WPARAM param, LPARAM lparam) {
switch (msg) {
case WM_HOTKEY: {
WORD AUXKEY = LOWORD(lparam);
WORD MKEY = HIWORD(lparam);
INPUT ip;
ip.type = INPUT_KEYBOARD;
ip.ki.time = 0;
ip.ki.dwExtraInfo = 0;
ip.ki.dwFlags = KEYEVENTF_UNICODE;
ip.ki.wVk = 0; // 0 because of unicode
if (AUXKEY == MOD_ALT) {
switch (MKEY) { // Lowercase
case 0x41: // A
ip.ki.wScan = 0xE1; // lowercase a with accent
break;
case 0x4E: // N
ip.ki.wScan = 0xF1; // lowercase n with tilde accent
break;
case 0x4F: // O
ip.ki.wScan = 0xF3; // lowercase o with accent
break;
case 0x55: // U
ip.ki.wScan = 0xFA; // lowercase u with accent
break;
case 0x49: // I
ip.ki.wScan = 0xED; // lowercase i with accent
break;
case 0xBD: // DASH
ip.ki.wScan = 0x2014; // em dash
break;
}
SendInput(1, &ip, sizeof(INPUT)); // breakpoint here
}
if (AUXKEY == MOD_ALT + MOD_SHIFT) {
switch (MKEY) { // Uppercase
case 0x41: // A
ip.ki.wScan = 0xC1; // uppercase a with accent
break;
case 0x4E: // N
ip.ki.wScan = 0xF1; // uppercase n with tilde accent
break;
case 0x4F: // O
ip.ki.wScan = 0xD2; // uppercase o with accent
break;
case 0x55: // U
ip.ki.wScan = 0xDA; // uppercase u with accent
break;
case 0x49: // I
ip.ki.wScan = 0xCD; // uppercase i with accent
break;
}
SendInput(1, &ip, sizeof(INPUT));
}
ip.ki.dwFlags = KEYEVENTF_KEYUP + KEYEVENTF_UNICODE; // KEYEVENTF_KEYUP for key release
SendInput(1, &ip, sizeof(INPUT));
return 0;
}
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return DefWindowProc(hwnd, msg, param, lparam);
}
}
...ANSWER
Answered 2022-Jan-13 at 04:28I unfortunately don't have a Windows System on hand to test, but i think i can guess what your problem is - but nice heisenbug, took me quite some time to figure out :D
Keep in mind that even if you have a registered hotkey the target window will still get the keypresses as well.
In addition to that SendInput
will not reset the keyboard state:
This function does not reset the keyboard's current state. Any keys that are already pressed when the function is called might interfere with the events that this function generates. To avoid this problem, check the keyboard's state with the GetAsyncKeyState function and correct as necessary.
So from the view of the target window you would see the following key events:
ALT
downA
down- (hotkey activates)
á
downá
up- (user needs some time to release the keys)
A
upALT
up
Whereas if you're debugging, you'll probably release the keys once you hit the breakpoint, so the sequence would look like this:
ALT
downA
down- (hotkey activates)
- (breakpoint hits)
- (user releases keys)
A
upALT
up- (resume process)
á
downá
up
So that's the most likely reason why it works when you're debugging - you're releasing the keys once the breakpoint is hit.
The ALT-Key is a bit evil in itself - mainly because as long as you're holding down the ALT-Key the window will not get WM_KEYDOWN
messages but only WM_SYSKEYDOWN
messages: Key-Down and Key-Up Messages
The WM_SYSKEYDOWN message indicates a system key, which is a key stroke that invokes a system command. There are two types of system key:
- ALT + any key
- F10
All other key strokes are considered nonsystem keys and produce the WM_KEYDOWN message. This includes the function keys other than F10.
So basically the target app will ignore your input entirely because it only receives it as a SYSKEY message.
SolutionYou can fix this by checking if the ALT key (or any other of the modifier keys) is still down when your hotkey is called, e.g. via GetAsyncKeyState()
and then call SendInput()
with a release event for that modifier key, then send your special character, and then revert the state of the modifier key back.
Also i would recommend batching up all the sent key events into a single SendInput()
to make sure no user-input (or other programmatic input) is interleaved between your input events.
e.g.:
QUESTION
I am making histograms of several different sets of data, but in this data set which is a list of complexities, my yticks are getting auto-formatted. How do I get my yticks to be uniform?
...ANSWER
Answered 2022-Jan-08 at 21:24As mentioned in my comment, there are two possible problems. One is that you are puzzled why only some of the labels are changed in size. Matplotlib differentiates between major and minor ticks, and your approach only modifies the major y-ticks. This is easily resolved by accessing the axis object with ax.tick_params():
QUESTION
I'm trying to write a distill::distill_article
blogpost which requires the use of LaTeX math environments e.g. theorem, lemma, proof etc.
I have tried to follow these instructions and also these instructions but am unable to render the theorem
environments whether using LaTeX
blocks or rmarkdown blocks.
I also note that a similar question was asked about specifically using distill::distill_article
in bookdown
. This fix did not work either. Note that my use-case is to use the bookdown theorem environments inside distill::distill_article
, not the other way around.
Here is a reprex for the issue:
...ANSWER
Answered 2022-Jan-03 at 05:49Add this after the YAML and then the method between :::
will work:
QUESTION
I regularly use Vuejs and Webpack with the "@" character for file resolution, like so
...ANSWER
Answered 2022-Jan-04 at 20:59In the linked question, ~
is escaped because ~
has a special meaning for Vim's regexp engine: "matches the last given substitute string".
But @
is not special in any way so there is no need to escape it:
QUESTION
What is the idiomatic way to split a dataframe into two by a condition? Or put another way, to filter a dataframe by a condition but keep the filtered out rows in a new dataframe?
I was thinking I could filter the original dataframe for the inverse of the 'filtered out by condition' rows using the tilde , like this:
...ANSWER
Answered 2021-Dec-30 at 17:51You can use df.loc
+ df.index.difference
with nonvowels.index
to achieve what you're looking for (and yes, this is idiomatic):
QUESTION
I am trying to convert string to seo friendly url. For this I have written below code and set the table column collation type to utf8_general_ci It is working for English but not working for Bengali Language. Just outputting single hypen(-) for bengali string
...ANSWER
Answered 2021-Dec-10 at 10:44To accept glyph in Bengali (or any other language) you have to change the regex on this line :
QUESTION
I am interested in detecting strings that contain "un-combined" or "dangling" combining characters. These are formally known as isolated combining characters.
An example of such a string would be "\u0303 hello"
, which starts with a COMBINING TILDE
that is not actually combined with anything else.
Is there an algorithm for detecting such a thing?
It seems like I can search over the string looking for "combine-able" base characters, and reject any combining character that is not preceded by such a base character. But how do I know what characters are base characters? I imagine that there are also edge cases to worry about.
My objective is to reject such strings as invalid identifiers, in a programming language that supports Unicode identifiers. But this might also be useful for other text processing tasks as well.
...ANSWER
Answered 2021-Nov-23 at 21:52Unicode 14.0 definitions D50, D51, D52 seem relevant.
You could find the first isolated combined character in an uninterrupted sequence of possibly multiple isolated combined characters by searching for combining characters that
- immediately follow something that is not a Letter (
L
), Number (N
), Punctuation (P
), Symbol (S
) or Space Separator (Zs
) or another combining character (M
).
In Java-Syntax that would be:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tilde
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page