Questions

Windows could not start the Apache2 on Local Computer - problem

During the installation of Apache2 I got the following message into cmd window: > Installing the Apache2.2 service The Apache2.2 service is successfully installed. Testing httpd.conf....Errors re...

12 Oct at 16:13

Linq: GroupBy, Sum and Count

I have a collection of products ``` public class Product { public Product() { } public string ProductCode {get; set;} public decimal Price {get; set; } public string Name {get; set;} } ...

13 May at 13:0

make *** no targets specified and no makefile found. stop

I have a problem installing package `dionaea`. After I type this: ``` ./configure --with-lcfg-include=/opt/dionaea/include/ \ --with-lcfg-lib=/opt/dionaea/lib/ \ --with-python=/opt/dionaea/bin/pytho...

26 Oct at 04:57

ASP.NET 5 MVC: unable to connect to web server 'IIS Express'

What I'm doing: - - - - - [unable to connect to web server 'IIS Express'.](https://i.imgur.com/KR9850P.png) Deleting `applicationhost.config`, located in `Documents\IISExpress\config`, doesn't chang...

Multiline TextView in Android?

I did like below in `xml` ``` <TableRow> <TextView android:id="@+id/address1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="lef...

How create Date Object with values in java

I need a date object for date 2014-02-11. I can't directly create it like this, ``` Date myDate = new Date(2014, 02, 11); ``` So I'm doing like follows, ``` Calendar myCalendar = new GregorianCal...

11 Mar at 12:53

How do I find the absolute position of an element using jQuery?

Is there a way of finding the absolute position of an element, i.e. relative to the start of the window, using jQuery?

26 Mar at 01:30

Cannot run with sound null safety because dependencies don't support null safety

I have followed ["Enabling null safety" on dart.dev](https://dart.dev/null-safety#enable-null-safety) and also [migrated](https://dart.dev/null-safety/migration-guide) my whole Flutter application to ...

6 Jan at 00:41

Bootstrap 3 Horizontal and Vertical Divider

I am having trouble to put in horizontal and vertical lines on my website. Not sure what's wrong with this. I tried using borders but I am not sure if I am doing it right. I would like to achieve a ...

28 Jul at 10:0

Ternary operator (?:) in Bash

Is there a way to do something like this ``` int a = (b == 5) ? c : d; ``` using Bash?

1 Sep at 19:10

How to switch position of two items in a Python list?

I haven’t been able to find a good solution for this problem on the net (probably because switch, position, list and Python are all such overloaded words). It’s rather simple – I have this list: ```...

31 May at 19:20

How can I add a filter class in Spring Boot?

Is there any annotation for a `Filter` class (for web applications) in Spring Boot? Perhaps `@Filter`? I want to add a custom filter in my project. [The Spring Boot Reference Guide](http://docs.spring...

MySQL connection not working: 2002 No such file or directory

I'm trying to set up WordPress. I have Apache and MySQL running, and the accounts and database are all set up. I tried to make a simple connection: ``` <?php $conn = mysql_connect('localhost', 'U...

21 Dec at 21:24

Jquery Ajax beforeSend and success,error & complete

I have a problem with multiple ajax functions where the `beforeSend` of the ajax post is executed before the `complete` function of the ajax. The loading class I am adding to the placeholder before...

6 Aug at 12:40

Python idiom to return first item or None

I'm calling a bunch of methods that return a list. The list may be empty. If the list is non-empty, I want to return the first item; otherwise, I want to return `None`. This code works: ``` def mai...

11 Mar at 01:32

Secondary axis with twinx(): how to add to legend?

I have a plot with two y-axes, using `twinx()`. I also give labels to the lines, and want to show them with `legend()`, but I only succeed to get the labels of one axis in the legend: ``` import nump...

30 Mar at 10:26

Internal Error 500 Apache, but nothing in the logs?

I'm getting 500 Internal Server errors when I try to make an HTTP POST to a specific address in my app. I've looked into the server logs in the custom log directory specified in the virtual hosts fil...

11 Dec at 06:5

How to find duplicate records in PostgreSQL

I have a PostgreSQL database table called "user_links" which currently allows the following duplicate fields: ``` year, user_id, sid, cid ``` The unique constraint is currently the first field call...

14 Apr at 17:18

How do you rotate a two dimensional array?

Inspired by [Raymond Chen's post](https://devblogs.microsoft.com/oldnewthing/20080902-00/?p=21003), say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links...

Set EditText cursor color

I am having this issue where I am using the Android's Holo theme on a tablet project. However, I have a fragment on screen which has a white background. I am adding an `EditText` component on this fra...

What is the best way to compare floats for almost-equality in Python?

It's well known that comparing floats for equality is a little fiddly due to rounding and precision issues. For example: [Comparing Floating Point Numbers, 2012 Edition](https://randomascii.wordpress....

26 Nov at 01:19

Replacing a character from a certain index

How can I replace a character in a string from a certain index? For example, I want to get the middle character from a string, like abc, and if the character is not equal to the character the user spe...

31 May at 21:46

How to create an integer array in Python?

It should not be so hard. I mean in C, ``` int a[10]; ``` is all you need. How to create an array of all zeros for a random size. I know the zeros() function in NumPy but there must be an easy way...

7 Dec at 13:8

PowerShell script to return versions of .NET Framework on a machine?

What would a PowerShell script be to return versions of the .NET Framework on a machine? My first guess is something involving WMI. Is there something better? It should be a one-liner to return only...

20 Nov at 09:45

All com.android.support libraries must use the exact same version specification

After updating to android studio 2.3 I got this error message. I know it's just a hint as the app run normally but it's really strange. > All com.android.support libraries must use the exact same ver...