Convert string to Python class object?
Given a string as user input to a Python function, I'd like to get a class object out of it if there's a class with that name in the currently defined namespace. Essentially, I want the implementation...
- Modified
- 15 Oct at 09:18
How do I resolve "HTTP Error 500.19 - Internal Server Error" on IIS7.0
What causes this error, how can I fix it? > Detailed Error Information Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x8007052e Config Error Can not lo...
- Modified
- 15 Apr at 15:59
How is the default submit button on an HTML form determined?
If a form is submitted but not by any specific button, such as - - `HTMLFormElement.submit()` how is a browser supposed to determine which of multiple submit buttons, if any, to use as the one press...
- Modified
- 21 May at 09:57
What is the difference between _tmain() and main() in C++?
If I run my C++ application with the following main() method everything is OK: ``` int main(int argc, char *argv[]) { cout << "There are " << argc << " arguments:" << endl; // Loop through ea...
Change the current directory from a Bash script
Is it possible to change current directory from a script? I want to create a utility for directory navigation in Bash. I have created a test script that looks like the following: ``` #!/bin/bash cd ...
- Modified
- 11 Jan at 19:19
How to add directory to classpath in an application run profile in IntelliJ IDEA?
I'm trying to add a directory to the classpath of an application run profile If I override by using -cp x:target/classes in the VM settings, I get the following error: ``` java.lang.NoClassDefFoundE...
- Modified
- 21 Jun at 21:24
How can I find the number of arguments of a Python function?
How can I find the number of arguments of a Python function? I need to know how many normal arguments it has and how many named arguments. Example: ``` def someMethod(self, arg1, kwarg1=None): p...
Is there a decorator to simply cache function return values?
Consider the following: ``` @property def name(self): if not hasattr(self, '_name'): # expensive calculation self._name = 1 + 1 return self._name ``` I'm new, but I think...
- Modified
- 30 Apr at 14:20
How to create a windows service from java app
I've just inherited a java application that needs to be installed as a service on XP and vista. It's been about 8 years since I've used windows in any form and I've never had to create a service, let ...
- Modified
- 28 Mar at 20:42
Does C# 8 support the .NET Framework?
In Visual Studio 2019 Advanced Build settings, C# 8 does not appear to be available for a .NET Framework project, only (as in the picture below) for a .NET Core 3.0 project: [](https://i.stack.imgur....
- Modified
- 12 Mar at 02:8
Elasticsearch: Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
I have an issue with a systemd config for ElasticSearch. ``` [Unit] Description=platform-elasticsearch After=syslog.target network.target remote-fs.target nss-lookup.target [Service] User={{ app_use...
- Modified
- 27 Mar at 16:58
Find difference between two data frames
I have two data frames df1 and df2, where df2 is a subset of df1. How do I get a new data frame (df3) which is the difference between the two data frames? In other word, a data frame that has all the...
Adding a HTTP header to the Angular HttpClient doesn't send the header, why?
Here is my code: ``` import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; ``` --- ``` logIn(username: string, password: string) { const url = 'http://server.c...
- Modified
- 6 Jun at 12:20
How to hide the Google Invisible reCAPTCHA badge
When implementing the new Google Invisible reCATPTCHA, by default you get a little "protected by reCAPTCHA" badge in the bottom right of the screen that pops out when you roll over it. [](https://i.s...
- Modified
- 14 Jun at 11:19
What's the Kotlin equivalent of Java's String[]?
I see that Kotlin has `ByteArray, ShortArray, IntArray, CharArray, DoubleArray, FloatArray`, which are equivalent to `byte[], short[], int[],char[], double[], float[]` in Java. Now I'm wondering, is ...
System.out.println() shortcut on Intellij IDEA
I know I can print `System.out.println()` with `"sout" + tab`. Is there a way I can do it with `"Syso" + ctrl + space` like in eclipse?
- Modified
- 17 Aug at 09:24
Angular and Typescript: Can't find names - Error: cannot find name
I am using Angular (version 2) with TypeScript (version 1.6) and when I compile the code I get these errors: ``` Error TS2304: Cannot find name 'Map'. node_modules/angular2/src/core/change_detect...
- Modified
- 1 Jul at 16:13
Python - Extracting and Saving Video Frames
So I've followed [this tutorial](https://web.archive.org/web/20161010175545/https://tobilehman.com/blog/2013/01/20/extract-array-of-frames-from-mp4-using-python-opencv-bindings/) but it doesn't seem t...
- Modified
- 25 Jan at 17:14
How do I deal with localStorage in jest tests?
I keep getting "localStorage is not defined" in Jest tests which makes sense but what are my options? Hitting brick walls.
- Modified
- 2 Oct at 16:25
Label axes on Seaborn Barplot
I'm trying to use my own labels for a Seaborn barplot with the following code: ``` import pandas as pd import seaborn as sns fake = pd.DataFrame({'cat': ['red', 'green', 'blue'], 'val': [1, 2, 3]...
- Modified
- 3 Mar at 20:5
What is <scope> under <dependency> in pom.xml for?
Looking at documentation [http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html](http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html), we can see `<scope>...
How to embed HTML into IPython output?
Is it possible to embed rendered HTML output into IPython output? One way is to use ``` from IPython.core.display import HTML HTML('<a href="http://example.com">link</a>') ``` or (IPython multilin...
- Modified
- 18 Oct at 08:12
How to verify an XPath expression in Chrome Developers tool or Firefox's Firebug?
How can I verify my XPath? I am using Chrome Developers tool to inspect the elements and form my XPath. I verify it using the Chrome plugin XPath Checker, however it does not always give me the resul...
- Modified
- 22 Mar at 06:48
Razor View throwing "The name 'model' does not exist in the current context"
After significant refactoring in my MVC 4 application, and Razor shows this error while debugging Views: > The name 'model' does not exist in the current context. This is the offending line of code:...
- Modified
- 20 Aug at 16:19