Questions

How to view the contents of a .pem certificate?

I am using Java `keytool`. I have exported a self-signed `.pem` certificate from my keystore. Is there a command to view the certificate details directly from the `.pem` file (not of the certificate i...

25 Apr at 06:30

Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style

When using eslint in the gulp project i have encountered a problem with error like this `Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style` and I am using Windows environment for the run...

15 Jun at 16:32

What is the recommended way to escape HTML symbols in plain Java?

Is there a recommended way to escape `<`, `>`, `"` and `&` characters when outputting HTML in plain Java code? (Other than manually doing the following, that is). ``` String source = "The less than ...

3 Mar at 16:48

Ajax Success and Error function failure

I am having trouble getting my jQuery ajax to work properly. It directs to the PHP page to update the database, but never returns back to the script for the success or error options. My code is below...

26 Jun at 15:52

A better way to check if a path exists or not in PowerShell

Is there a more concise and less error-prone way in PowerShell to check if a path DOES NOT exist? This is objectively too verbose for such a common use case: ``` if (-not (Test-Path $path)) { ... } if...

25 Dec at 15:34

Reflection - get attribute name and value on property

I have a class, lets call it Book with a property called Name. With that property, I have an attribute associated with it. ``` public class Book { [Author("AuthorName")] public string Name ...

9 Jul at 21:45

Fix footer to bottom of page

Although most pages on my site have enough content to push the footer to the bottom of the page for most people. I would like to know it's always fixed to the bottom regardless of screen size from now...

23 Mar at 15:56

URL encode sees “&” (ampersand) as “&amp;” HTML entity

I am encoding a string that will be passed in a URL (via GET). But if I use `escape`, `encodeURI` or `encodeURIComponent`, `&` will be replaced with `%26amp%3B`, but I want it to be replaced with `%26...

30 Jan at 18:40

Find all files with name containing string

I have been searching for a command that will return files from the current directory which contain a string in the filename. I have seen `locate` and `find` commands that can find files beginning wit...

3 Dec at 12:22

Parse string to DateTime in C#

I have in a string formatted like that one: ``` "2011-03-21 13:26" //year-month-day hour:minute ``` How can I parse it to `System.DateTime`? I want to use functions like `DateTime.Parse()` or `Da...

20 Jun at 07:18

Import / Export database with SQL Server Server Management Studio

I want to import/export the database itself, the tables, the constraints (foreign keys and so on). I'd rather not get the data with it, but I can get rid of it after if there's no other way. So... ...

17 Jul at 12:11

How do I truncate a .NET string?

I would like to truncate a string such that its length is not longer than a given value. I am writing to a database table and want to ensure that the values I write meet the constraint of the column'...

17 Dec at 00:40

How do I detect unsigned integer overflow?

I was writing a program in C++ to find all solutions of = , where , and together use all the digits 0-9 exactly once. The program looped over values of and , and it ran a digit-counting routine ea...

17 Apr at 05:29

Using a string variable as a variable name

I have a variable with a string assigned to it and I want to define a new variable based on that string. ``` foo = "bar" foo = "something else" # What I actually want is: bar = "something else"...

14 Jan at 08:56

How to get body of a POST in php?

I submit as POST to a php page the following: ``` {a:1} ``` This is the body of the request (a POST request). In php, what do I have to do to extract that value? ``` var_dump($_POST); ``` is ...

24 Oct at 21:9

IO Error: The Network Adapter could not establish the connection

I am new to Oracle, and am trying to run a simple example code with Java, but am getting this error when executing the code.. I am able to start up the listener via CMD and am also able to run SQL Plu...

25 Sep at 02:52

CSS3 gradient background set on body doesn't stretch but instead repeats?

ok say the content inside the `<body>` totals 300px high. If I set the background of my `<body>` using `-webkit-gradient` or `-moz-linear-gradient` Then I maximize my window (or just make it taller ...

29 Sep at 23:20

How to stop app that node.js express 'npm start'

You build node.js app with express v4.x then start your app by . My question is how to stop the app? Is there ? to include the error when implement ``` /home/nodetest2# npm stop > nodetest2@0.0.1...

25 Apr at 15:35

How do I use itertools.groupby()?

I haven't been able to find an understandable explanation of how to actually use Python's `itertools.groupby()` function. What I'm trying to do is this: - `lxml`- - I've reviewed [the documentation]...

29 Jul at 19:19

How do you check if a certain index exists in a table?

Something like this: ``` SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_TreeNodesBinaryAssets_BinaryAssets' and TABLE_NAME = 'TreeNodesBinaryAssets' ``` but for ind...

22 Apr at 09:55

Angularjs - display current date

I got a view in angularjs and I'm just trying to display the current date(formatted). I thought something like `<span>{{Date.now() | date:'yyyy-MM-dd'}}</span>` should display the current date.

9 Apr at 13:46

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo

I was trying to run a sample code While launching the application in the android 1.5 emulator , I got these errors.... Any one have some hint..? ERROR from LogCat: ``` 01-13 02:28:08.392: ERROR/And...

19 Jul at 18:13

MongoError: connect ECONNREFUSED 127.0.0.1:27017

I'm using NodeJS wih MongoDB using mongodb package. When I run mongod command it works fine and gives "waiting for connection on port 27017". So, mongod seems to be working. But MongoClient does not w...

11 Apr at 07:54

How to alter a column and change the default value?

I got the following error while trying to alter a column's data type and setting a new default value: ``` ALTER TABLE foobar_data ALTER COLUMN col VARCHAR(255) NOT NULL SET DEFAULT '{}'; ``` > ERRO...

3 Jul at 13:53

How to exclude property from Json Serialization

I have a DTO class which I Serialize ``` Json.Serialize(MyClass) ``` How can I exclude a property of it? (It has to be public, as I use it in my code somewhere else)

16 Apr at 07:29