Questions

What's the difference between align-content and align-items?

What is the difference between `align-items` and `align-content`?

11 Aug at 09:7

UnicodeDecodeError when reading CSV file in Pandas with Python

I'm running a program which is processing 30,000 similar files. A random number of them are stopping and producing this error... ``` File "C:\Importer\src\dfman\importer.py", line 26, in import_chr ...

13 Jan at 19:56

What's the name for hyphen-separated case?

This is PascalCase: `SomeSymbol` This is camelCase: `someSymbol` This is snake_case: `some_symbol` So my questions is whether there is a widely accepted name for this: `some-symbol`? It's commonly ...

How can I use pickle to save a dict (or any other Python object)?

I have looked through the information that the [Python docs](https://docs.python.org/3/library/pickle.html) give, but I'm still a little confused. Could somebody post sample code that would write a ne...

6 Mar at 04:3

Escape @ character in razor view engine

I am creating a sample ASP.NET MVC 3 site using Razor as view engine. The razor syntax starts with `@` character e.g. `@RenderBody()`. If I write @test on my cshtml page it gives me parse error > CS0...

7 Nov at 06:47

MySQL Error #1071 - Specified key was too long; max key length is 767 bytes

When I executed the following command: ``` ALTER TABLE `mytable` ADD UNIQUE ( `column1` , `column2` ); ``` I got this error message: ``` #1071 - Specified key was too long; max key length is 767 b...

19 Jul at 23:36

What are REST API error handling best practices?

I'm looking for guidance on good practices when it comes to return errors from a REST API. I'm working on a new API so I can take it any direction right now. My content type is XML at the moment, but ...

4 Nov at 18:33

Define a global variable in a JavaScript function

Is it possible to define a global variable in a JavaScript function? I want use the `trailimage` variable (declared in the `makeObj` function) in other functions. ``` <html xmlns="http://www.w3.org/19...

What is Node.js' Connect, Express and "middleware"?

Despite knowing JavaScript quite well, I'm confused what these three projects in Node.js ecosystem do. Is it something like Rails' Rack? Can someone please explain?

25 Jul at 05:19

Escape string for use in Javascript regex

> [Is there a RegExp.escape function in Javascript?](https://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript) I am trying to build a javascript regex based ...

23 May at 11:55

Inserting a PDF file in LaTeX

I am trying to insert a PDF or doc file as an appendix in my LaTeX file. Do you know how I can do this?

28 Aug at 11:36

In WPF, what are the differences between the x:Name and Name attributes?

Sometimes it seems that the `Name` and `x:Name` attributes are interchangeable. So, what are the definitive differences between them, and when is it preferable to use one over the other? Are there any...

19 Feb at 18:24

How can I increment a date by one day in Java?

I'm working with a date in this format: `yyyy-mm-dd`. How can I increment this date by one day?

24 Jan at 16:57

Fetch the rows which have the Max value for a column for each distinct value of another column

Table: ``` UserId, Value, Date. ``` I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply...

29 Jun at 09:51

How to unload a package without restarting R

I'd like to unload a package without having to restart R (mostly because restarting R as I try out different, conflicting packages is getting frustrating, but conceivably this could be used in a progr...

3 Apr at 16:38

Can I make a <button> not submit a form?

I've got a form, with 2 buttons ``` <a href="index.html"><button>Cancel changes</button></a> <button type="submit">Submit</button> ``` I use jQuery UI's button on them too, simply like this ``` $...

Ruby function to remove all white spaces?

What is the Ruby function to remove white spaces? I'm looking for something kind of like PHP's `trim()`?

28 May at 06:27

How do I change the data type for a column in MySQL?

I want to change the data type of multiple columns from float to int. What is the simplest way to do this? There is no data to worry about, yet.

31 Aug at 10:44

How to use HTML Agility pack

How do I use the [HTML Agility Pack](http://html-agility-pack.net/?z=codeplex)? My XHTML document is not completely valid. That's why I wanted to use it. How do I use it in my project? My project is ...

23 Nov at 01:59

Open two instances of a file in a single Visual Studio session

I have a file, . I want to open two instances of this file in Visual studio (BTW, I am using Visual Studio 2005). Why would I want to do so? I want to compare two sections of the same file side by sid...

12 Dec at 22:49

Get an OutputStream into a String

What's the best way to pipe the output from an java.io.OutputStream to a String in Java? Say I have the method: ``` writeToStream(Object o, OutputStream out) ``` Which writes certain data from the...

7 Jun at 15:16

Why am I getting a NoClassDefFoundError in Java?

I am getting a `NoClassDefFoundError` when I run my Java application. What is typically the cause of this?

11 Apr at 10:38

What is the type of the 'children' prop?

I have a very simple functional component as follows: ``` import * as React from 'react'; export interface AuxProps { children: React.ReactNode } const aux = (props: AuxProps) => props.chil...

13 Oct at 08:51

Code-first vs Model/Database-first

I'm trying to fully understand all the approaches to building data access layer using EF 4.1. I'm using Repository pattern and `IoC`. I know I can use code-first approach: define my entities and co...