Questions

C++ Convert string (or char*) to wstring (or wchar_t*)

``` string s = "おはよう"; wstring ws = FUNCTION(s, ws); ``` How would i assign the contents of s to ws? Searched google and used some techniques but they can't assign the exact content. The content is...

4 Apr at 07:35

Task vs Thread differences

There are two classes available in .NET: `Task` and `Thread`. - - `Thread``Task`

29 Dec at 00:38

How do you round a floating point number in Perl?

How can I round a decimal number (floating point) to the nearest integer? e.g. ``` 1.2 = 1 1.7 = 2 ```

8 Oct at 06:27

Remove first 4 characters of a string with PHP

How can I remove the first 4 characters of a string using PHP?

8 Feb at 03:28

Add inline style using Javascript

I'm attempting to add this code to a dynamically created div element ``` style = "width:330px;float:left;" ``` The code in which creates the dynamic `div` is ``` var nFilter = document.createElem...

5 Jan at 21:17

malloc for struct and pointer in C

Suppose I want to define a structure representing length of the vector and its values as: ``` struct Vector{ double* x; int n; }; ``` Now, suppose I want to define a vector y and allocate mem...

18 Dec at 20:55

How to get only the date value from a Windows Forms DateTimePicker control?

I'm building an application with C# code. How do I get only the date value from a `DateTimePicker` control?

8 Nov at 12:54

Android Studio : How to uninstall APK (or execute adb command) automatically before Run or Debug?

Now I need to uninstall the App every time before `Run\Debug` it in Android Studio. Because I need to re-create the database before I run \debug the app. I know I can run the command ``` adb uninsta...

15 Jul at 19:58

Installing SciPy with pip

It is possible to install [NumPy](http://en.wikipedia.org/wiki/NumPy) with [pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29) using `pip install numpy`. Is there a similar possibility wi...

8 Apr at 13:31

Capture iframe load complete event

Is there a way to capture when the contents of an iframe have fully loaded from the parent page?

1 Jul at 12:46

How to cast int to enum in C++?

How do I cast an int to an enum in C++? For example: ``` enum Test { A, B }; int a = 1; ``` How do I convert `a` to type `Test::A`?

28 May at 12:40

How to connect Android app to MySQL database?

I have a website already setup which uses mysql database. I want to know how can i connect my app to that database. What i wanna achieve is that my app should make a request to find a table of a defi...

7 Jan at 19:35

How to extract year and month from date in PostgreSQL without using to_char() function?

I want to select sql: `SELECT "year-month" from table group by "year-month" AND order by date`, where year-month - format for date "1978-01","1923-12". , but not "right" order: ``` to_char(timestamp...

9 Mar at 19:47

I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?

I have a Windows 10 PC and I want to install pyaudio to use it with my chatbot, powered by chatterbot. I tried 2 different ways to install pyaudio. The first way is doing this on the command prompt:...

28 Mar at 08:17

Page redirect after certain time PHP

There is a certain PHP function for redirecting after some time. I saw it somewhere but can't remember. It's like the gmail redirection after logging in. Please, could anyone remind me?

25 May at 04:12

How to get first object out from List<Object> using Linq

I have below code in c# 4.0. ``` //Dictionary object with Key as string and Value as List of Component type object Dictionary<String, List<Component>> dic = new Dictionary<String, List<Component>>();...

13 May at 08:38

Get number days in a specified month using JavaScript?

> [What is the best way to determine the number of days in a month with javascript?](https://stackoverflow.com/questions/315760/what-is-the-best-way-to-determine-the-number-of-days-in-a-month-with-...

23 Jul at 16:20

How to Get a Specific Column Value from a DataTable?

I have a datatable. I need to fetch a certain column value based on the user input. For example, lets say the datatable has two columns CountryID and CountryName. I need to find CountryID in the data...

26 May at 21:10

Export to CSV via PHP

Let's say I have a database.... is there a way I can export what I have from the database to a CSV file (and text file [if possible]) via PHP?

22 Nov at 19:32

Insert picture/table in R Markdown

So I want to insert a table AND a picture into R Markdown. In regular word document I can just easily insert a table (5 rows by 2 columns), and for the picture just copy and paste. 1. How do I inser...

16 Apr at 11:50

Specify an SSH key for git push for a given domain

I have the following use case: I would like to be able to push to `git@git.company.com:gitolite-admin` using the private key of user `gitolite-admin`, while I want to push to `git@git.company.com:some...

16 Nov at 13:13

How can I read a text file in Android?

I want to read the text from a text file. In the code below, an exception occurs (that means it goes to the `catch` block). I put the text file in the application folder. Where should I put this te...

7 Dec at 18:38

How to use paths in tsconfig.json?

I was reading about [path-mapping](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) in `tsconfig.json` and I wanted to use it to avoid using the following ugly paths: ...

31 Oct at 06:1

Can I add a custom attribute to an HTML tag?

Can I add a custom attribute to an HTML tag like the following? ``` <tag myAttri="myVal" /> ```

7 Jul at 14:15

Maven: add a dependency to a jar by relative path

I have a proprietary jar that I want to add to my pom as a dependency. But I don't want to add it to a repository. The reason is that I want my usual maven commands such as `mvn compile`, etc, to wor...