Questions

How do I import CSV file into a MySQL table?

I have an unnormalized events-diary CSV from a client that I'm trying to load into a MySQL table so that I can refactor into a sane format. I created a table called 'CSVImport' that has one field for ...

21 Mar at 23:6

Sending HTTP POST Request In Java

lets assume this URL... ``` http://www.example.com/page.php?id=10 ``` (Here id needs to be sent in a POST request) I want to send the `id = 10` to the server's `page.php`, which accepts it in a PO...

4 Sep at 13:40

How to get a list of installed android applications and pick one to run

I asked a similar question to this earlier this week but I'm still not understanding how to get a list of all installed applications and then pick one to run. I've tried: ``` Intent intent = new I...

5 Apr at 06:59

SQL Data Reader - handling Null column values

I'm using a SQLdatareader to build POCOs from a database. The code works except when it encounters a null value in the database. For example, if the FirstName column in the database contains a null va...

20 Nov at 17:24

Adding a new value to an existing ENUM Type

I have a table column that uses an `enum` type. I wish to update that `enum` type to have an additional possible value. I don't want to delete any existing values, just add the new value. What is the ...

22 Feb at 18:21

Can I use git diff on untracked files?

Is it possible to ask `git diff` to include untracked files in its diff output, or is my best bet to use `git add` on the newly created files and the existing files I have edited, then use: ``` git di...

30 Jul at 01:34

Equals(=) vs. LIKE

When using SQL, are there any benefits of using `=` in a `WHERE` clause instead of `LIKE`? Without any special operators, `LIKE` and `=` are the same, right?

1 Mar at 14:34

Overflow:hidden dots at the end

Let's say I have a string "" and I cut it with `overflow:hidden`, so it displays something like this: > I like big butts and I cann cutting off the text. Is it possible to display this like this: >...

6 Sep at 03:20

Anaconda vs. miniconda

In the [Anaconda repository](https://repo.continuum.io/), there are two types of installers: "" and "". What are their differences? Besides, for an installer file, `Anaconda2-4.4.0.1-Linux-ppc64l...

17 Feb at 02:30

Any difference between await Promise.all() and multiple await?

Is there any difference between: ``` const [result1, result2] = await Promise.all([task1(), task2()]); ``` and ``` const t1 = task1(); const t2 = task2(); const result1 = await t1; const result2 ...

24 Jul at 16:10

Warning about SSL connection when connecting to MySQL database

With the two classes below, I've tried connect to a MySQL database. However, I always get this error: > This is the test class with the `main` method: ``` public class TestDatabase { public s...

14 Sep at 07:36

How to define the basic HTTP authentication using cURL correctly?

I'm learning Apigility ([Apigility docu -> REST Service Tutorial](https://www.apigility.org/documentation/intro/first-rest-service)) and trying to send a POST request with basic authentication via cUR...

Clone private git repo with dockerfile

I have copied this code from what seems to be various working dockerfiles around, here is mine: ``` FROM ubuntu MAINTAINER Luke Crooks "luke@pumalo.org" # Update aptitude with new repo RUN apt-get ...

1 Apr at 13:44

Permission denied (publickey) when SSH Access to Amazon EC2 instance

I want to use my Amazon ec2 instance but faced the following error: ``` Permission denied (publickey). ``` I have created my key pair and downloaded file. Given: ``` chmod 600 p...

12 Nov at 17:3

How to reset a form using jQuery with .reset() method

I had working code that could reset my form when I click on a reset button. However after my code is getting longer, I realize that it doesn't work anymore. ``` <div id="labels"> <table class="confi...

27 Dec at 04:54

What does "opt" mean (as in the "opt" directory)? Is it an abbreviation?

What does "opt" mean (as in the "opt" directory)? I commonly see this directory in Unix systems with development tools inside. Is it an abbreviation?

26 Nov at 10:19

Converting string to Date and DateTime

If I have a PHP string in the format of `mm-dd-YYYY` (for example, 10-16-2003), how do I properly convert that to a `Date` and then a `DateTime` in the format of `YYYY-mm-dd`? The only reason I ask fo...

17 Apr at 14:44

Make the first character Uppercase in CSS

Is there a way to make the first character in a label in CSS. Here is my HTML: ``` <a class="m_title" href="">gorr</a> <a class="m_title" href="">trro</a> <a class="m_title" href="">krro</a> <a cla...

22 Feb at 03:4

Android ListView with different layouts for each row

I am trying to determine the best way to have a single ListView that contains different layouts for each row. I know how to create a custom row + custom array adapter to support a custom row for the e...

12 Jul at 20:21

Saving an Object (Data persistence)

I've created an object like this: ``` company1.name = 'banana' company1.value = 40 ``` I would like to save this object. How can I do that?

How should I use servlets and Ajax?

Whenever I print something inside the servlet and call it by the webbrowser, it returns a new page containing that text. Is there a way to print the text in the current page using Ajax?

20 Oct at 13:58

Get type name without full namespace

I have the following code: ``` return "[Inserted new " + typeof(T).ToString() + "]"; ``` But ``` typeof(T).ToString() ``` returns the full name including namespace Is there anyway to just get t...

21 May at 17:13

Can I pass an array as arguments to a method with variable arguments in Java?

I'd like to be able to create a function like: ``` class A { private String extraVar; public String myFormat(String format, Object ... args){ return String.format(format, extraVar, args); }...

Serialize an object to string

I have the following method to save an Object to a file: ``` // Save an object out to the disk public static void SerializeObject<T>(this T toSerialize, String filename) { XmlSerializer xmlSerial...

When should I use "this" in a class?

I know that `this` refers to a current object. But I do not know when I really need to use it. For example, will be there any difference if I use `x` instead of `this.x` in some of the methods? May be...

27 Apr at 08:37