What does $_ mean in PowerShell?
I've seen the following a lot in PowerShell, but what does it do exactly? ``` $_ ```
- Modified
- 1 Feb at 19:54
Remove file extension from a file name string
If I have a string saying `"abc.txt"`, is there a quick way to get a substring that is just `"abc"`? I can't do an `fileName.IndexOf('.')` because the file name could be `"abc.123.txt"` or something ...
Display alert message and redirect after click on accept
I have a page with links to reports. Whenever somebody clicks on one report, they can download the excel file. However, sometimes there are no fields to make a report; in that case, I want to display ...
- Modified
- 18 Jun at 10:53
How do I exit from the text window in Git?
I am using Windows and before committing, Git wants me to enter a text message and a new text window appears. ![screenshot](https://i.stack.imgur.com/DSfuw.png) How can I exit from this? I am try...
CSS Animation onClick
How can I get a CSS Animation to play with a JavaScript onClick? I currently have: ``` .classname { -webkit-animation-name: cssAnimation; -webkit-animation-duration:3s; -webkit-animation-iterat...
- Modified
- 14 Aug at 09:42
Signing a Windows EXE file
I have an [EXE](http://en.wikipedia.org/wiki/EXE) file that I should like to sign so that Windows will not warn the end user about an application from an "unknown publisher". I am not a Windows develo...
- Modified
- 26 Jan at 14:42
How to get a certain element in a list, given the position?
So I've got a list: ``` list<Object> myList; myList.push_back(Object myObject); ``` I'm not sure but I'm confident that this would be the "0th" element in the array. Is there any function I can use...
Shuffle an array with python, randomize array item order with python
What's the easiest way to shuffle an array with python?
How can I decompress an archive file having .zst or tar.zst?
I do not know how I can decompress a file having .zst or tar.zst extension . The full filename :- file.pkg.tar.zst or file.xz.tar.zst
- Modified
- 13 Sep at 00:18
How to find out if a file exists in C# / .NET?
I would like to test a string containing a path to a file for existence of that file (something like the `-e` test in Perl or the `os.path.exists()` in Python) in C#.
Make function wait until element exists
I'm trying to add a canvas over another canvas – how can I make this function wait to start until the first canvas is created? ``` function PaintObject(brush) { this.started = false; // get...
- Modified
- 16 Feb at 03:49
Android button with icon and text
I have some buttons like this in my app: ``` <Button android:id="@+id/bSearch" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding=...
- Modified
- 9 Apr at 14:45
How to fix a Div to top of page with CSS only
I am writing a glossary page. I have the alphabet links on the top of the page. I want to keep the top of the page (including the alphabet links) fixed, whilst the section of the page with the definit...
How to use workbook.saveas with automatic Overwrite
In this section of code, Excel ALWAYS prompts: "File already exists, do you want to overwrite?" ``` Application.DisplayAlerts = False Set xls = CreateObject("Excel.Application") Set wb = xls.Workbook...
- Modified
- 2 Jun at 08:51
Passing Objects By Reference or Value in C#
In C#, I have always thought that non-primitive variables were passed by reference and primitive values passed by value. So when passing to a method any non-primitive object, anything done to the obj...
- Modified
- 13 Oct at 05:55
Is there a way to force npm to generate package-lock.json?
I deleted it by accident and have made many changes to `package.json` since. An `npm install` or `npm update` do not generate `package-lock.json` anymore. I tried clearing my npm cache and my nvm cach...
- Modified
- 10 Jun at 18:41
How to revert a "git rm -r ."?
I accidentely said `git rm -r .`. How do I recover from this? I did not commit. I think all files were marked for deletion and were also physically removed from my local checkout. I could (if I kn...
Manually install Gradle and use it in Android Studio
I'm using Android Studio. How can I manually install and use `Gradle` within `Android Studio`. I've downloaded `Gradle` from [http://www.gradle.org/downloads](http://www.gradle.org/downloads) versio...
- Modified
- 31 Mar at 19:42
What is the correct syntax of ng-include?
I’m trying to include an HTML snippet inside of an `ng-repeat`, but I can’t get the include to work. It seems the current syntax of `ng-include` is different than what it was previously: I see many ex...
- Modified
- 30 Nov at 21:40
Detect if an input has text in it using CSS -- on a page I am visiting and do not control?
Is there a way to detect whether or not an input has text in it via CSS? I've tried using the `:empty` pseudo-class, and I've tried using `[value=""]`, neither of which worked. I can't seem to find a ...
How to resolve "Error: bad index – Fatal: index file corrupt" when using Git
After `git init`, I added and committed a few files, made some changes, added and committed. Set up the git daemon (running under Cygwin on WinXP) and cloned the repository once. Now, I get this erro...
- Modified
- 23 Sep at 02:35
Combine two tables for one output
Say I have two tables: KnownHours: UnknownHours: I need to group these hours, ignoring Month, into a single data table so that my expected result is the following: I cannot seem to figure th...
How to get a file or blob from an object URL?
I am allowing the user to load images into a page via drag&drop and other methods. When an image is dropped, I'm using `URL.createObjectURL` to convert to an object URL to display the image. I am no...
- Modified
- 6 Feb at 14:48
Update .NET web service to use TLS 1.2
I need to use TLS 1.2 to connect from my .NET web service to another that is going to force TLS 1.2. I found a resource that said .NET 4.6 uses TLS 1.2 by default so that sounded like the easiest sol...
How do I automatically scroll to the bottom of a multiline text box?
I have a textbox with the .Multiline property set to true. At regular intervals, I am adding new lines of text to it. I would like the textbox to automatically scroll to the bottom-most entry (the n...