Fix Access denied for user 'root'@'localhost' for phpMyAdmin
I'm using WAMP Server 2.2 on a PC. In phpMyAdmin (version 5.5.24) I edited the 'root' user (with 'localhost' host) and gave it a password of 'root'. This turned out to be a big mistake that I'm trying...
- Modified
- 20 Oct at 20:18
Root password inside a Docker container
I'm using a Docker image which was built using the USER command to use a non-root user called `dev`. Inside a container, I'm "dev", but I want to edit the `/etc/hosts` file. So I need to be root. I'm...
- Modified
- 15 Sep at 21:27
How to get the second column from command output?
My command's output is something like: ``` 1540 "A B" 6 "C" 119 "D" ``` The first column is always a number, followed by a space, then a double-quoted string. My purpose is to get the second c...
Why does Python give the "wrong" answer for square root? What is integer division in Python 2?
``` x = 16 sqrt = x**(.5) #returns 4 sqrt = x**(1/2) #returns 1 ``` I know I can `import math` and use `sqrt`, but I'm looking for an answer to the above. What is integer division in Python 2? This...
- Modified
- 30 Jan at 01:20
What does Python's eval() do?
In the book that I am reading on Python, it keeps using the code `eval(input('blah'))` I read the documentation, and I understand it, but I still do not see how it changes the `input()` function. ...
HTML img scaling
I'm trying to display some large images with HTML img tags. At the moment they go off the edge of the screen; how can I scale them to stay within the browser window? Or in the likely event that this ...
- Modified
- 8 May at 10:34
Delete a database in phpMyAdmin
By mistake, I have created a duplicate database in the phpMyAdmin page of cPanel. I want to delete this database, but I am not able to find any delete button in the UI. How to delete a database in ph...
- Modified
- 13 Feb at 10:42
How can an html element fill out 100% of the remaining screen height, using css only?
I have a header element and a content element: ``` #header #content ``` I want the header to be of fixed height and the content to fill up all the remaining height available on the screen, with `ov...
How to automatically close cmd window after batch file execution?
I'm running a batch file that has these two lines: ``` start C:\Users\Yiwei\Downloads\putty.exe -load "MathCS-labMachine1" "C:\Program Files (x86)\Xming\Xming.exe" :0 -clipboard -multiwindow ``` T...
- Modified
- 15 Feb at 07:27
Text progress bar in terminal with block characters
I wrote a simple console app to upload and download files from an FTP server using the ftplib. I would like the app to show some visualization of its download/upload progress for the user; each time...
How do I use WPF bindings with RelativeSource?
How do I use `RelativeSource` with WPF bindings and what are the different use-cases?
- Modified
- 2 Oct at 07:46
Change cursor to hand when mouse goes over a row in table
How do I change the cursor pointer to hand when my mouse goes over a `<tr>` in a `<table>` ``` <table class="sortable" border-style:> <tr> <th class="tname">Name</th><th class="tage">Age</th> ...
- Modified
- 22 Dec at 19:23
Remove legend ggplot 2.2
I'm trying to keep the legend of one layer (smooth) and remove the legend of the other (point). I have tried shutting off the legends with `guides(colour = FALSE)` and `geom_point(aes(color = vs), sho...
How to add a color overlay to a background image?
I have seen this question a lot both on SO and the Web. But none of them has been what I am looking for. How do I add a color-overlay to a background image using CSS only? Example HTML: ``` <div cl...
- Modified
- 21 Mar at 17:23
Replacing instances of a character in a string
This simple code that simply tries to replace semicolons (at i-specified postions) by colons does not work: ``` for i in range(0,len(line)): if (line[i]==";" and i in rightindexarray): ...
What is the difference between "long", "long long", "long int", and "long long int" in C++?
I am transitioning from Java to C++ and have some questions about the `long` data type. In Java, to hold an integer greater than 2, you would simply write `long x;`. However, in C++, it seems that `lo...
- Modified
- 22 Nov at 18:9
How to append a newline to StringBuilder
I have a [StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html) object, ``` StringBuilder result = new StringBuilder(); result.append(someChar); ``` Now I want to ap...
- Modified
- 11 Aug at 16:41
Check if two unordered lists are equal
I'm looking for an easy (and quick) way to determine if two lists contain the same elements: For example: ``` ['one', 'two', 'three'] == ['one', 'two', 'three'] : true ['one', 'two', 'three'] == [...
- Modified
- 25 Jan at 13:7
TypeScript, Looping through a dictionary
In my code, I have a couple of dictionaries (as suggested [here](https://web.archive.org/web/20140901130959/https://typescript.codeplex.com/discussions/398359)) which is String indexed. Due to this be...
- Modified
- 28 Apr at 09:14
What is the purpose of "pip install --user ..."?
From `pip install --help`: ``` --user Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentat...
- Modified
- 25 Feb at 18:58
Spring Data JPA - "No Property Found for Type" Exception
Well, I searched Google and found many results, but none of them was able to answer my problem. So, here it goes. I am trying to study Spring MVC and Spring Data JPA by doing a minimal implementation...
- Modified
- 25 Oct at 07:40
How to verify a method is called two times with mockito verify()
I want to verify if a method is called at least once through mockito verify. I used verify and it complains like this: ``` org.mockito.exceptions.verification.TooManyActualInvocations: Wanted 1 time...
What is an idiomatic way of representing enums in Go?
I'm trying to represent a simplified chromosome, which consists of N bases, each of which can only be one of `{A, C, T, G}`. I'd like to formalize the constraints with an enum, but I'm wondering what...
Import .bak file to a database in SQL server
I have a file with `.bak` extension. How can I import this date to a database in SQL Server?
- Modified
- 22 Nov at 06:44
How do you get the file size in C#?
I need a way to get the size of a file using C#, and not the size on disk. How is this possible? Currently I have this loop ``` foreach (FileInfo file in downloadedMessageInfo.GetFiles()) { //fi...