How do I customize Visual Studio's private field generation shortcut for constructors?
VS 2017 (and maybe olders versions) gives me this handy little constructor shortcut to generate a `private readonly` field and assign it. Screenshot: [](https://i.stack.imgur.com/L3Ec9.png) This en...
- Modified
- 17 Aug at 13:36
How to truncate text in Angular2?
Is there a way that I could limit the length of the string to a number characters? for e.g: I have to limit a title length to 20 `{{ data.title }}`. Is there any pipe or filter to limit the length?
- Modified
- 11 Nov at 20:41
DELETE_FAILED_INTERNAL_ERROR Error while Installing APK
[](https://i.stack.imgur.com/F2Isr.png)I am using Preview. I am facing the issue > Failure: Install failed invalid apkError: While installing apk, I have made changes in build.gradle but could not re...
- Modified
- 20 Jun at 09:12
Change drive in git bash for windows
I was trying to navigate to my drive location `E:/Study/Codes` in `git bash` in windows. In command prompt in order to change drive I use `E:` It returns an error in `git bash`. > bash: E:: command ...
How to check if a file exists in Ansible?
I have to check whether a file exists in `/etc/`. If the file exists then I have to skip the task. Here is the code I am using: ``` - name: checking the file exists command: touch file.txt when: $...
- Modified
- 17 Jul at 02:14
Get Docker container id from container name
What is the command to get the Docker container from the container ?
- Modified
- 13 Jan at 23:53
How to disable codelens in VS code?
I've searched but didn't find any info on how to disable references (or the codelens completely) in the Visual Studio Code, they're quite useless and annoying for me.
- Modified
- 9 Apr at 23:35
How to call VS Code Editor from terminal / command line
The question says it all. How can I open VS Code editor from - - e.g. for notepad++ I write `> start notepad++ test.txt` By the way, the editor is awesome (cross-platform)! Thank you Nadella! Y...
- Modified
- 17 Feb at 19:51
[Vue warn]: Cannot find element
I'm using [Vuejs](http://vuejs.org). This is my markup: ``` <body> <div id="main"> <div id="mainActivity" v-component="{{currentActivity}}" class="activity"></div> </div> </body> ``` This i...
- Modified
- 6 Apr at 00:23
Android studio takes too much memory
I had installed Android Studio 1.0 RC 2. I have 4GB of RAM installed, but after starting Android Studio and launching Android Emulator, more than 90% of physical memory has been used by only these two...
- Modified
- 27 May at 13:0
Play multiple CSS animations at the same time
How can I have two CSS animations playing ? - - - Example Code: ``` .image { position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; margin:-60px 0 0 -60px; ...
- Modified
- 18 Nov at 04:0
Access restriction: The type 'Application' is not API (restriction on required library rt.jar)
Here is the code: ``` package mscontroller; import javax.swing.*; import com.apple.eawt.Application; public class Main { public static void main(String[] args) { Application app = n...
Simulate CREATE DATABASE IF NOT EXISTS for PostgreSQL?
I want to create a database which does not exist through JDBC. Unlike MySQL, PostgreSQL does not support `create if not exists` syntax. What is the best way to accomplish this? The application does n...
- Modified
- 16 Sep at 18:24
Fastest way to determine if record exists
As the title suggests... I'm trying to figure out the fastest way with the least overhead to determine if a record exists in a table or not. Sample query: ``` SELECT COUNT(*) FROM products WHERE pr...
- Modified
- 4 Jan at 15:41
onCreateOptionsMenu inside Fragments
I have placed `setHasOptionsMenu(true)` inside `onCreateView`, but I still can't call `onCreateOptionsMenu` inside fragments. ``` @Override public View onCreateView(LayoutInflater inflater, ViewGroup...
- Modified
- 4 Oct at 13:8
How can I check if character in a string is a letter? (Python)
I know about `islower` and `isupper`, but can you check whether or not that character is a letter? For Example: ``` >>> s = 'abcdefg' >>> s2 = '123abcd' >>> s3 = 'abcDEFG' >>> s[0].islower() True >>...
Conversion failed when converting date and/or time from character string while inserting datetime
I was trying to create a table as follows, ``` create table table1(date1 datetime,date2 datetime); ``` First I tried inserting values as below, ``` insert into table1 values('21-02-2012 6:10:00 PM...
- Modified
- 2 Jan at 08:52
Case-INsensitive Dictionary with string key-type in C#
If I have a `Dictionary<String,...>` is it possible to make methods like `ContainsKey` case-insensitive? This seemed related, but I didn't understand it properly: [c# Dictionary: making the Key case-...
- Modified
- 23 May at 11:47
Get full path of the files in PowerShell
I need to get all the files including the files present in the subfolders that belong to a particular type. I am doing something like this, using [Get-ChildItem](http://technet.microsoft.com/en-us/li...
- Modified
- 26 Sep at 19:15
Is it possible to await an event instead of another async method?
In my C#/XAML metro app, there's a button which kicks off a long-running process. So, as recommended, I'm using async/await to make sure the UI thread doesn't get blocked: ``` private async void But...
- Modified
- 12 Oct at 11:55
Where to put Gradle configuration (i.e. credentials) that should not be committed?
I'm trying to deploy a Gradle-built artifact to a Maven repo, and I need to specify credentials for that. This works fine for now: ``` uploadArchives { repositories { mavenDeployer { ...
- Modified
- 17 Feb at 10:3
How can you undo the last git add?
Is it possible to unstage the last staged (not committed) change in ? Suppose there were a lot of files in the current branch, some staged, some not. At some point, some foolish programmer accidentall...
- Modified
- 26 Aug at 17:21
convert streamed buffers to utf8-string
I want to make a HTTP-request using node.js to load some text from a webserver. Since the response can contain much text (some Megabytes) I want to process each text chunk separately. I can achieve th...
- Modified
- 16 Feb at 09:33
Parse error: Syntax error, unexpected end of file in my PHP code
I got an error: ``` Parse error: syntax error, unexpected end of file in the line ``` With this code: ``` <html> <?php function login() { // Login function code ...
- Modified
- 12 Nov at 08:10
How do I connect to this localhost from another computer on the same network?
I'm currently working on a project and I would like to test it out on two laptops at home where one laptop connects to the localhost on the other. I am using XAMPP. How do I do this?
- Modified
- 13 Mar at 10:27