Questions

How to create a sub array from another array in Java?

How to create a sub-array from another array? Is there a method that takes the indexes from the first array such as: ``` methodName(object array, int start, int end) ``` I don't want to go over mak...

10 Dec at 12:44

Login failed for user 'IIS APPPOOL\ASP.NET v4.0'

I have a web project (C# Asp.Net, EF 4, MS SQL 2008 and IIS 7) and I need to migrate it to IIS 7 locally (at the moment works fine with CASSINI). Locally in IIS I have my `Default Web Site` with my d...

23 May at 12:2

Convert seconds to Hour:Minute:Second

I need to convert seconds to "Hour:Minute:Second". For example: "685" converted to "00:11:25" How can I achieve this?

31 Oct at 14:54

Reset Windows Activation/Remove license key

I'm having a hard time finding and answer to this. If I had to hypotheitcally remove the Windows license key from a VM that's been specifically setup for a partner, and it needs to be removed before t...

22 May at 22:46

Loop through each row of a range in Excel

This is one of those things that I'm sure there's a built-in function for (and I may well have been told it in the past), but I'm scratching my head to remember it. How do I loop through each row of...

8 Jul at 20:13

How to change row color in datagridview

I would like to change the color of a particular row in my datagridview. The row should be changed to red when the value of columncell 7 is less than the value in columncell 10. Any suggestions on how...

Get the path with query string on the current http request in PHP

I need to get the path with query string from the URL of the current request. For example, if the current URL is: ``` "http://www.example.com/example/test/hi.php?randomvariable=1" ``` I would want th...

20 Dec at 14:27

Assign static IP to Docker container

I'm now trying to assign a static IP 172.17.0.1 when a Docker container be started up. I use port 2122 as the ssh port of this container so that I let this container listen port 2122. ``` sudo dock...

1 Jul at 16:49

How to send email in ASP.NET C#

I'm very new to the [ASP.NET](http://en.wikipedia.org/wiki/ASP.NET) C# area. I'm planning to send a mail through ASP.NET C# and this is the [SMTP](http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Pro...

28 Aug at 18:36

Docker Compose wait for container X before starting Y

I am using rabbitmq and a simple python sample from [here](https://www.rabbitmq.com/tutorials/tutorial-one-python.html) together with docker-compose. My problem is that I need to wait for rabbitmq to ...

1 Mar at 10:42

How do I catch an Ajax query post error?

I would like to catch the error and show the appropriate message if the Ajax request fails. My code is like the following, but I could not manage to catch the failing Ajax request. ``` function getA...

22 Jul at 11:36

Remove Primary Key in MySQL

I have the following table schema which maps user_customers to permissions on a live MySQL database: ``` mysql> describe user_customer_permission; +------------------+---------+------+-----+---------...

Get Specific Columns Using “With()” Function in Laravel Eloquent

I have two tables, `User` and `Post`. One `User` can have many `posts` and one `post` belongs to only one `user`. In my `User` model I have a `hasMany` relation... ``` public function post(){ r...

How to display an alert box from C# in ASP.NET?

I am using a `detail-view` and would like to display an alert-box at the end of my code block that says: > Thank you! Your data has been inserted successfully. Is there a simple way to do this from ...

4 Oct at 20:40

how to check if object already exists in a list

I have a list ``` List<MyObject> myList ``` and I am adding items to a list and I want to check if that object is already in the list. so before I do this: ``` myList.Add(nextObject); ``` I w...

13 Jun at 13:57

How to pass all arguments passed to my Bash script to a function of mine?

Let's say I have a function `abc()` that will handle the logic related to analyzing the arguments passed to my script. How can I pass all arguments my Bash script has received to `abc()`? The number o...

17 Sep at 12:5

How do I prompt a user for confirmation in bash script?

I want to put a quick "are you sure?" prompt for confirmation at the top of a potentially dangerous bash script, what's the easiest/best way to do this?

11 Dec at 02:52

How do you get the magnitude of a vector in Numpy?

In keeping with the "There's only one obvious way to do it", how do you get the magnitude of a vector (1D array) in Numpy? ``` def mag(x): return math.sqrt(sum(i**2 for i in x)) ``` The above ...

10 Oct at 20:26

TypeError: Router.use() requires middleware function but got a Object

There have been some middleware changes on the new version of express and I have made some changes in my code around some of the other posts on this issue but I can't get anything to stick. We had it...

10 May at 12:10

How do you know a variable type in java?

Let's say I declare a variable: ``` String a = "test"; ``` And I want to know what type it is, i.e., the output should be `java.lang.String` How do I do this?

17 Jul at 16:30

How do I fix a NoSuchMethodError?

I'm getting a `NoSuchMethodError` error when running my Java program. What's wrong and how do I fix it?

26 Apr at 00:34

Is there any boolean type in Oracle databases?

Is there any Boolean type in Oracle databases, similar to the `BIT` datatype in Ms SQL Server?

What methods of ‘clearfix’ can I use?

I have the age-old problem of a `div` wrapping a two-column layout. My sidebar is floated, so my container `div` fails to wrap the content and sidebar. ``` <div id="container"> <div id="content"></...

22 Mar at 12:3

Full-screen responsive background image

I am very new to Front-end development and Foundation. I am trying to get `<div class="main-header">` to be a full screen image that scales down responsively. Can anyone tell me what I am doing wro...

How to round float numbers in javascript?

I need to round for example `6.688689` to `6.7`, but it always shows me `7`. My method: ``` Math.round(6.688689); //or Math.round(6.688689, 1); //or Math.round(6.688689, 2); ``` But result always...

5 Jun at 01:13