How to comment and uncomment blocks of code in the Office VBA Editor
In the VBA editor of Office ( + ), how do you comment or uncomment a block of code?
Replace specific characters within strings
I would like to remove specific characters from strings within a vector, similar to the feature in Excel. Here are the data I start with: ``` group <- data.frame(c("12357e", "12575e", "197e18", "e...
- Modified
- 21 Feb at 00:14
Insert string at specified position
Is there a PHP function that can do that? I'm using `strpos` to get the position of a substring and I want to insert a `string` after that position.
Making a private method public to unit test it...good idea?
--- I occasionally find myself needing to make a private method in a class public just to write some unit tests for it. Usually this would be because the method contains logic shared between ot...
- Modified
- 19 Nov at 15:54
How to call an async method from a getter or setter?
What'd be the most elegant way to call an async method from a getter or setter in C#? Here's some pseudo-code to help explain myself. ``` async Task<IEnumerable> MyAsyncMethod() { return await D...
SQL keys, MUL vs PRI vs UNI
What is the difference between `MUL`, `PRI` and `UNI` in MySQL? I'm working on a MySQL query, using the command: ``` desc mytable; ``` One of the fields is shown as being a `MUL` key, others show ...
How to connect to MySQL from the command line
How can you connect to MySQL from the command line in a Mac? (i.e. show me the code) I'm doing a PHP/SQL tutorial, but it starts by assuming you're already in MySQL.
- Modified
- 14 Sep at 14:2
Change a branch name in a Git repo
How do I rename an existing branch in a Git repo? I want the current branch to have a new name.
- Modified
- 20 Apr at 03:36
How do I get the YouTube video ID from a URL?
I want to get the `v=id` from YouTube’s URL with JavaScript (no jQuery, pure JavaScript). ## Example YouTube URL formats `http://www.youtube.com/watch?v=u8nQa1cJyX8&a=GxdCwVVULXctT2lYDEPllDR0LRTu...
- Modified
- 11 Aug at 01:52
C++ Erase vector element by value rather than by position?
``` vector<int> myVector; ``` and lets say the values in the vector are this (in this order): ``` 5 9 2 8 0 7 ``` If I wanted to erase the element that contains the value of "8", I think I would ...
- Modified
- 25 Apr at 15:40
How do I prevent site scraping?
I have a fairly large music website with a large artist database. I've been noticing other music sites scraping our site's data (I enter dummy Artist names here and there and then do google searches ...
- Modified
- 19 Nov at 06:35
In Python, how do I split a string and keep the separators?
Here's the simplest way to explain this. Here's what I'm using: ``` re.split('\W', 'foo/bar spam\neggs') >>> ['foo', 'bar', 'spam', 'eggs'] ``` Here's what I want: ``` someMethod('\W', 'foo/bar spam\...
Sound effects in JavaScript / HTML5
I'm using HTML5 to program games; the obstacle I've run into now is how to play sound effects. The specific requirements are few in number: - - - - My first approach was to use the HTML5 `<audio>`...
- Modified
- 2 Jan at 18:58
How do I find the .NET version?
How do I find out which version of .NET is installed? I'm looking for something as simple as `java -version` that I can type at the command prompt and that tells me the current version(s) installed. I...
Auto-size dynamic text to fill fixed size container
I need to display user entered text into a fixed size div. What i want is for the font size to be automatically adjusted so that the text fills the box as much as possible. So - If the div is 400px ...
How to convert DateTime to VarChar
I need to convert a value which is in a `DateTime` variable into a `varchar` variable formatted as `yyyy-mm-dd` format (without time part). How do I do that?
- Modified
- 11 Jan at 21:28
An error, "failed to solve with frontend dockerfile.v0"
I was trying to build my Docker image for my [Gatsby](https://www.gatsbyjs.com/) application. Whenever I run the command `docker build . -t gatsbyapp`, it gives me an error: ``` failed to solve with f...
- Modified
- 18 Aug at 03:9
upstream sent too big header while reading response header from upstream
I am getting these kind of errors: > 2014/05/24 11:49:06 [error] 8376#0: *54031 upstream sent too big header while reading response header from upstream, client: 107.21.193.210, server: aamjanata.com...
- Modified
- 18 Nov at 08:42
Cannot ping AWS EC2 instance
I have an EC2 instance running in AWS. When I try to ping from my local box it is not available. How can I make the instance pingable?
- Modified
- 14 Feb at 19:56
angular.min.js.map not found, what is it exactly?
When I load the page and check chrome console i find these errors: ![enter image description here](https://i.stack.imgur.com/U3lBw.png) what exactly are map files in angular? I did reference the an...
- Modified
- 25 Aug at 05:6
How to add many functions in ONE ng-click?
I've be looking for how to execute this but I can't find anything related so far, :( I could nest both functions yes but I'm just wondering if this is possible? I'd like to do this literally: ``` <t...
- Modified
- 4 Aug at 06:13
Difference between "module.exports" and "exports" in the CommonJs Module System
On this page ([http://docs.nodejitsu.com/articles/getting-started/what-is-require](https://web.archive.org/web/20130930091238/http://docs.nodejitsu.com/articles/getting-started/what-is-require)), it s...
- Modified
- 3 Sep at 04:26
Get current folder path
I want to create a program that converts files. I would like the user to be able to place the executable file in any directory, and when executing that program (double-clicking on the .exe) I want the...
How to post JSON to a server using C#?
Here's the code I'm using: ``` // create a request HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url); request.KeepAlive = false; request.ProtocolVersion = HttpVersion.Version10; reques...
- Modified
- 9 Sep at 05:21
Format a datetime into a string with milliseconds
How can I format a [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) object as a string with milliseconds?
- Modified
- 2 Apr at 06:9