Questions

Display a tooltip over a button using Windows Forms

How can I display a tooltip over a button using [Windows Forms](http://en.wikipedia.org/wiki/Windows_Forms)?

6 May at 15:59

SQL: IF clause within WHERE clause

Is it possible to use an clause within a clause in MS SQL? Example: ``` WHERE IF IsNumeric(@OrderNumber) = 1 OrderNumber = @OrderNumber ELSE OrderNumber LIKE '%' + @OrderNu...

18 Sep at 02:30

What are some good Python ORM solutions?

I'm evaluating and looking at using CherryPy for a project that's basically a JavaScript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need ...

8 Dec at 23:24

Android Emulator issues in new versions - The emulator process has terminated

After updating to Android Studio 2020.3.1 canary 15, when I try to run an emulator, it gets killed with this error: > The emulator process for AVD Pixel_4_API_30 has terminated. It was working correct...

Cannot update a component while rendering a different component warning

I am getting this warning in react: ``` index.js:1 Warning: Cannot update a component (`ConnectFunction`) while rendering a different component (`Register`). To locate the bad setState() call insid...

14 Jun at 23:34

.NET Core DI, ways of passing parameters to constructor

Having the following service constructor ``` public class Service : IService { public Service(IOtherService service1, IAnotherOne service2, string arg) { } } ``` What are the choic...

How to run docker-compose up -d at system start up?

To let the containers autostart at startup point, I tried to add the command: `cd directory_has_docker-compose.yml && docker-compose up -d` in /etc/rc.local. but then after I reboot the machi...

15 May at 07:55

Laravel - create model, controller and migration in single artisan command

I can create a model and resource controller (binded to model) with the following command ``` php artisan make:controller TodoController --resource --model=Todo ``` I want to also create a migratio...

16 Dec at 16:37

Angular2 material dialog has issues - Did you add it to @NgModule.entryComponents?

I am trying to follow the docs on [https://material.angular.io/components/component/dialog](https://material.angular.io/components/component/dialog) but I cannot understand why it has the below issue?...

16 Apr at 12:57

Angular 2 Hover event

In the new framework, does anyone know the proper way to do a hover like an event? In there was `ng-Mouseover`, but that doesn't seem to have been carried over. I've looked through the docs and ...

10 Sep at 07:11

JS generate random boolean

Simple question, but I'm interested in the nuances here. I'm generating random booleans using the following method I came up with myself: ``` const rand = Boolean(Math.round(Math.random())); ``` W...

20 Apr at 22:57

Visual Studio Code: format is not using indent settings

When using the `Format Code` command in Visual Studio Code, it is not honoring my indent settings (`"editor.tabSize": 2`). It is using a tab size of 4 instead. Any ideas why this is happening? Thanks...

27 Mar at 19:44

MySQL Incorrect datetime value: '0000-00-00 00:00:00'

I've recently taken over an old project that was created 10 years ago. It uses MySQL 5.1. Among other things, I need to change the default character set from latin1 to utf8. As an example, I have ta...

22 Feb at 22:23

Position last flex item at the end of container

This question concerns a browser with full css3 support including flexbox. I have a flex container with some items in it. They are all justified to flex-start but I want the `.end` item to be justi...

25 Nov at 19:27

Angular 2: How to style host element of the component?

I have component in Angular 2 called my-comp: ``` <my-comp></my-comp> ``` How does one style the host element of this component in Angular 2? In Polymer, You would use ":host" selector. I tried it...

Edit and replay XHR chrome/firefox etc?

I have been looking for a way to alter a `XHR request` made in my browser and then replay it again. Say I have a complete `POST` request done in my browser, and the only thing I want to change is a sm...

Embed YouTube video - Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

I am trying to feed my Django page with some resource I am getting from somewhere else. Inside the feed, I have YouTube videos with URL like: `https://www.youtube.com/watch?v=A6XUVjK9W4o` Once I ad...

16 Mar at 02:6

How to set gradle home while importing existing project in Android studio

How to set gradle home while importing existing project in Android studio. While trying to import I need to set up this path. ![enter image description here](https://i.stack.imgur.com/e2k3g.png)

How to do a recursive sub-folder search and return files in a list?

I am working on a script to recursively go through subfolders in a mainfolder and build a list off a certain file type. I am having an issue with the script. It's currently set as follows: ``` for roo...

16 Nov at 15:9

How to generate javadoc comments in Android Studio

If not, what is the easiest way to generate javadoc comments?

10 Jun at 15:50

How can I print variable and string on same line in Python?

I am using python to work out how many children would be born in 5 years if a child was born every 7 seconds. The problem is on my last line. How do I get a variable to work when I'm printing text eit...

17 Jun at 17:58

How do you view ALL text from an ntext or nvarchar(max) in SSMS?

How do you view ALL text from an NTEXT or NVARCHAR(max) in SQL Server Management Studio? By default, it only seems to return the first few hundred characters (255?) but sometimes I just want a quick ...

18 Jan at 09:4

plot a circle with pyplot

surprisingly I didn't find a straight-forward description on how to draw a circle with matplotlib.pyplot (please no pylab) taking as input center (x,y) and radius r. I tried some variants of this: ``...

9 Feb at 17:23

"R cannot be resolved to a variable"?

In Eclipse, I've created a project from a source and now it shows errors - "R cannot be resolved to a variable". From what I found here, I had cleared and rebuilt the project, but still the R file doe...

18 Sep at 22:29

Regular expression for matching HH:MM time format

I want a regexp for matching time in HH:MM format. Here's what I have, and it works: ``` ^[0-2][0-3]:[0-5][0-9]$ ``` This matches everything from 00:00 to 23:59. However, I want to change it so 0:...

24 Sep at 03:14