Escaping the $ character in snippets
To have a literal $ try doubling it: $$
To have a literal $ try doubling it: $$
You just need to override onCreateDialog in an Activity. //In an Activity private String[] mFileList; private File mPath = new File(Environment.getExternalStorageDirectory() + “//yourdir//”); private String mChosenFile; private static final String FTYPE = “.txt”; private static final int DIALOG_LOAD_FILE = 1000; private void loadFileList() { try { mPath.mkdirs(); } catch(SecurityException e) { Log.e(TAG, “unable to write … Read more
Check out GistBox. It supports searching, editing and labels. Here’s a screenshot: There’s also a demo video at: http://www.youtube.com/watch?v=VLgyY6lqpsQ GistBox Clipper (a Chrome extension) also provides the ability to save <pre> tags and arbitrary text on any web page. Edit: Unfortunately, GistBox is becoming Cacher cacher.io – the free plan will only include: 15 private … Read more
Hit > shift + command + p and type snippets Select Preferences: Configure User Snippets Choose the language type for which you want to add the custom snippet in the vscode inputbox vscode has comments to explain on how to add a snippet, as described on :> vsdoc or you can follow the next link … Read more
Type “ctor” + TAB + TAB (hit the Tab key twice). This will create the default constructor for the class you are in: public MyClass() { } It seems that in some cases you will have to press TAB twice.
You could type “prop” and then press tab twice. That will generate the following. public TYPE Type { get; set; } Then you change “TYPE” and “Type”: public string myString {get; set;} You can also get the full property typing “propfull” and then tab twice. That would generate the field and the full property. private … Read more
Addressing the above “too small a task to require a library” issue by a straightforward implementation (using f-strings, so Python 3.6+): def sizeof_fmt(num, suffix=”B”): for unit in [“”, “Ki”, “Mi”, “Gi”, “Ti”, “Pi”, “Ei”, “Zi”]: if abs(num) < 1024.0: return f”{num:3.1f}{unit}{suffix}” num /= 1024.0 return f”{num:.1f}Yi{suffix}” Supports: all currently known binary prefixes negative and positive … Read more
I’d like to add my .02 here. It’s not 100% bulletproof, but I think it’s good enough. The problem, for me, with the preferred example of putting up some sort of “this site doesn’t work so well without Javascript” message is that you then need to make sure that your site works okay without Javascript. … Read more