Questions

How to find the length of an array list?

I don't know how to find the length of an array list. I think you might need to use `blank.length();` but I'm not sure. I made an array list ``` ArrayList<String> myList = new ArrayList<String>(); `...

31 Jul at 06:29

How to set date format in HTML date input tag?

I am wondering whether it is possible to set the date format in the html `<input type="date"></input>` tag... Currently it is yyyy-mm-dd, while I need it in the dd-mm-yyyy format.

29 Oct at 11:8

How to evaluate a math expression given in string form?

I'm trying to write a Java routine to evaluate math expressions from `String` values like: 1. "5+3" 2. "10-4*5" 3. "(1+10)*3" I want to avoid a lot of if-then-else statements. How can I do this?

15 Dec at 23:39

Correct way to push into state array

I seem to be having issues pushing data into a state array. I am trying to achieve it this way: ``` this.setState({ myArray: this.state.myArray.push('new value') }) ``` But I believe this is incorr...

25 May at 11:8

Download a file from NodeJS Server using Express

How can I download a file that is in my server to my machine accessing a page in a nodeJS server? I'm using the ExpressJS and I've been trying this: ``` app.get('/download', function(req, res){ v...

Delete last char of string

I am retrieving a lot of information in a list, linked to a database and I want to create a string of groups, for someone who is connected to the website. I use this to test but this is not dynamic, ...

25 Apr at 15:27

How can I find the last element in a List<>?

The following is an extract from my code: ``` public class AllIntegerIDs { public AllIntegerIDs() { m_MessageID = 0; m_MessageType = 0; m_ClassID = 0; ...

20 Aug at 11:50

Index was out of range. Must be non-negative and less than the size of the collection parameter name:index

I'm trying to add data as one by one row to a datagridview here is my code and it says: > "Index was out of range. Must be non-negative and less than the size of the collection parameter name:index...

24 Dec at 13:13

What is the difference between statically typed and dynamically typed languages?

What does it mean when we say a language is dynamically typed versus statically typed?

Call PowerShell script PS1 from another PS1 script inside Powershell ISE

I want call execution for a myScript1.ps1 script inside a second myScript2.ps1 script inside Powershell ISE. The following code inside MyScript2.ps1, works fine from Powershell Administration, but do...

28 Mar at 19:39

Spring Boot - How to log all requests and responses with exceptions in single place?

I'm working on REST API with spring boot. I need to log all requests with input params (with methods, eg. GET, POST, etc.), request path, query string, corresponding class method of this request, also...

2 Aug at 11:5

How to mount a single file in a volume

I am trying to dockerize a PHP application. In the dockerfile, I download the archive, extract it, etc. Everything works fine. However, if a new version gets released and I update the dockerfile, I ha...

6 Oct at 00:19

How do you reinstall an app's dependencies using npm?

Is there a simple way to reinstall packages that my app depends on (i.e. they are in my apps node_modules folder)?

12 Oct at 20:18

Javascript Get Element by Id and set the value

I have a javascript function to which I pass a parameter. The parameter represents the id of an element (a hidden field) in my web page. I want to change the value of this element. ``` function myFun...

5 Mar at 19:17

How to get the connection String from a database

I have created a database with SQL Server Management Studio, I would like to now use it in my C# application. I need the connection string? Where can I find the connection string, and where is my dat...

1 Jul at 13:45

Access the css ":after" selector with jQuery

I have the following css: ``` .pageMenu .active::after { content: ''; margin-top: -6px; display: inline-block; width: 0px; height: 0px; border-top: 14px solid white; borde...

22 Jul at 13:41

Best way to convert text files between character sets?

What is the fastest, easiest tool or method to convert text files between character sets? Specifically, I need to convert from UTF-8 to ISO-8859-15 and vice versa. Everything goes: one-liners in your ...

10 May at 00:28

How to fix "ImportError: No module named ..." error in Python?

What is the correct way to fix this ImportError error? I have the following directory structure: ``` /home/bodacydo /home/bodacydo/work /home/bodacydo/work/project /home/bodacydo/work/project/progra...

9 Jul at 20:36

How to create correct JSONArray in Java using JSONObject

how can I create a JSON Object like the following, in Java using JSONObject ? ``` { "employees": [ {"firstName": "John", "lastName": "Doe"}, {"firstName": "Anna", "lastName": "Sm...

12 Aug at 19:27

Load image from resources area of project in C#

I have an image in my project stored at Resources/myimage.jpg. How can I dynamically load this image into Bitmap object?

22 Oct at 10:14

Simple DateTime sql query

How do I query DateTime database field within a certain range? I am using SQL SERVER 2005 Error code below ``` SELECT * FROM TABLENAME WHERE DateTime >= 12/04/2011 12:00:00 AM AND DateTime...

Array.push() if does not exist?

How can I push into an array if neither values exist? Here is my array: ``` [ { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "...

13 Jul at 16:59

Combine two or more columns in a dataframe into a new column with a new name

For example if I have this: ``` n = c(2, 3, 5) s = c("aa", "bb", "cc") b = c(TRUE, FALSE, TRUE) df = data.frame(n, s, b) n s b 1 2 aa TRUE 2 3 bb FALSE 3 5 cc TRUE ``` Then how do I co...

2 May at 06:55

Query-string encoding of a JavaScript object

Is there a fast and simple way to encode a JavaScript object into a `string` that I can pass via a [GET](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods) request? No [jQuery]...

27 Nov at 22:34

wait() or sleep() function in jquery?

I want to add a class, wait 2 seconds and add another class. ``` .addClass("load").wait(2sec).addClass("done"); ``` Is there any way?

22 May at 11:26