Questions

Check if a value exists in pandas dataframe index

I am sure there is an obvious way to do this but cant think of anything slick right now. Basically instead of raising exception I would like to get `True` or `False` to see if a value exists in panda...

31 Mar at 08:36

String's Maximum length in Java - calling length() method

In , what is the maximum size a `String` object may have, referring to the `length()` method call? I know that `length()` return the size of a `String` as a `char []`;

7 Feb at 18:40

Under which circumstances textAlign property works in Flutter?

In the code below, `textAlign` property doesn't work. If you remove `DefaultTextStyle` wrapper which is several levels above, `textAlign` starts to work. Why and how to ensure it is always working? ...

2 Aug at 16:9

How can I match up permutations of a long list with a shorter list (according to the length of the shorter list)?

I’m having trouble wrapping my head around a algorithm I’m try to implement. I have two lists and want to take particular combinations from the two lists. Here’s an example. ``` names = ['a', 'b'] num...

PHP AES encrypt / decrypt

I found an example for en/decoding strings in PHP. At first it looks very good but it wont work :-( Does anyone know what the problem is? ``` $Pass = "Passwort"; $Clear = "Klartext"; $crypted = fnE...

Using if elif fi in shell scripts

I'm not sure how to do an `if` with multiple tests in shell. I'm having trouble writing this script: ``` echo "You have provided the following arguments $arg1 $arg2 $arg3" if [ "$arg1" = "$arg2" && "...

27 Apr at 11:57

Class 'DOMDocument' not found

I've found an error on a page in my Magento application; it always show this message error when I visit it: > Fatal error: Class 'DOMDocument' not found in /home/.../lib/Zend/Feed/Abstract.php on lin...

11 Jul at 06:49

How to find out what character key is pressed?

I would like to find out what character key is pressed in a cross-browser compatible way in pure Javascript.

28 May at 21:42

Fastest way to check if string contains only digits in C#

I know a few ways of how to check if a string contains only digits: RegEx, `int.parse`, `tryparse`, looping, etc. Can anyone tell me what the way to check is? I need only to the value, no need to ac...

21 Dec at 15:9

Postgres: check if array field contains value?

I'm sure this is a duplicate question in the sense that the answer is out there somewhere, but I haven't been able to find the answer after Googling for 10 minutes, so I'd appeal to the editors not to...

22 Sep at 15:45

How to convert an object to JSON correctly in Angular 2 with TypeScript

I'm creating an Angular 2 simple CRUD application that allows me to CRUD products. I'm trying to implement the post method so I can create a product. My backend is an ASP.NET Web API. I'm having some ...

14 Jul at 10:45

The client and server cannot communicate, because they do not possess a common algorithm - ASP.NET C# IIS TLS 1.0 / 1.1 / 1.2 - Win32Exception

I have an issue with a C# PayTrace Gateway. The below code was working fine until yesterday when I believe they turned off SSL3 due to the Poodle Exploit. When running the code below we got the follow...

23 Sep at 20:27

How can I change the current URL?

I have the following code that changes the pages from within JavaScript: ``` var newUrl = [some code to build up URL string]; window.location.replace(newUrl); ``` But it doesn't change the top URL,...

21 Jan at 08:50

How do I find which rpm package supplies a file I'm looking for?

As an example, I am looking for a `mod_files.sh` file which presumably would come with the `php-devel` package. I guessed that `yum` would install the `mod_files.sh` file with the `php-devel x86_64 5....

12 Jan at 19:23

how to fix 'Access to XMLHttpRequest has been blocked by CORS policy' Redirect is not allowed for a preflight request only one route

[](https://i.stack.imgur.com/8BpwB.png)[](https://i.stack.imgur.com/FAz9Q.png)i'm setting a laravel and vuejs. CORS plugin for laravel and frontend side i use Axios to call REST api i got this ERROR...

17 Jan at 05:30

How do you do Impersonation in .NET?

Is there a simple out of the box way to impersonate a user in .NET? So far I've been using [this class from code project](http://www.codeproject.com/KB/cs/zetaimpersonator.aspx) for all my impersonat...

11 Oct at 14:47

Fragment onResume() & onPause() is not called on backstack

I have multiple fragment inside an activity. On a button click I am starting a new fragment, adding it to backstack. I naturally expected the `onPause()` method of current Fragment and `onResume()` of...

Assert equals between 2 Lists in Junit

How can I make an equality assertion between lists in a test case? Equality should be between the content of the list. For example: ``` List<String> numbers = Arrays.asList("one", "two", "three"); ...

2 Dec at 16:19

error: expected primary-expression before ')' token (C)

I am trying to call a function named `characterSelection(SDL_Surface *screen, struct SelectionneNonSelectionne sel)` which returns a `void` This is the `.h` of the function I try to call: ``` struct S...

27 Jul at 15:55

Is there an exponent operator in C#?

For example, does an operator exist to handle this? ``` float Result, Number1, Number2; Number1 = 2; Number2 = 2; Result = Number1 (operator) Number2; ``` In the past the `^` operator has served ...

HTTPS connections over proxy servers

Is it possible to have HTTPS connections over proxy servers? If yes, what kind of proxy server allows this? Duplicated with [How to use Socks 5 proxy with Apache HTTP Client 4?](https://stackoverflo...

23 May at 12:34

How do I disable "missing docstring" warnings at a file-level in Pylint?

Pylint throws errors that some of the files are missing docstrings. I try and add docstrings to each class, method and function, but it seems that Pylint also checks that files should have a docstring...

21 Jan at 19:47

Single controller with multiple GET methods in ASP.NET Web API

In Web API I had a class of similar structure: ``` public class SomeController : ApiController { [WebGet(UriTemplate = "{itemSource}/Items")] public SomeValue GetItems(CustomParam parameter) ...

18 May at 07:5

Creating a generic method in C#

I am trying to combine a bunch of similar methods into a generic method. I have several methods that return the value of a querystring, or null if that querystring does not exist or is not in the cor...

27 Jan at 04:32

npx command not found

I am working with webpack and I need to execute `./node_modules/webpack/bin/webpack.js` using `npx`. `npx webpack` would run the webpack binary (`./node_modules/webpack/bin/webpack`), but each time I ...

27 Aug at 19:23