Questions

Download a working local copy of a webpage

I would like to download a local copy of a web page and get all of the css, images, javascript, etc. In previous discussions (e.g. [here](https://stackoverflow.com/questions/706934/download-an-offl...

3 Sep at 16:7

Is it necessary to write HEAD, BODY and HTML tags?

Is it necessary to write `<html>`, `<head>` and `<body>` tags? For example, I can make such a page: ``` <!DOCTYPE html> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <tit...

16 Mar at 16:18

fatal: git-write-tree: error building trees

I did a `git pull` from a shared git repository, but something went really wrong, after I tried a `git revert`. Here is the situation now: ``` $ git stash Source/MediaStorageAndFileFormat/gdcmImageCo...

10 Nov at 14:41

Get second child using jQuery

``` $(t).html() ``` returns ``` <td>test1</td><td>test2</td> ``` I want to retrieve the second `td` from the `$(t)` object. I searched for a solution but nothing worked for me. Any idea how to g...

22 Jan at 09:32

How does JPA orphanRemoval=true differ from the ON DELETE CASCADE DML clause

I am a little confused about the JPA 2.0 `orphanRemoval` attribute. I think I can see it is needed when I use my JPA provider's DB generation tools to create the underlying database DDL to have an `ON...

How to change default text file encoding in Eclipse?

Whenever I add a new html file (or other text file) to the project its encoding is set to Cp1250. I am not sure why, I guess this is probably because my default language in Windows is Polish and I don...

1 Mar at 08:31

No increment operator (++) in Ruby?

> [Why doesn't Ruby support i++ or i— for fixnum?](https://stackoverflow.com/questions/3660563/why-doesnt-ruby-support-i-or-i-for-fixnum) Why is there no increment operator in Ruby? e.g. ```...

23 May at 11:54

Remove blank lines with grep

I tried `grep -v '^$'` in Linux and that didn't work. This file came from a Windows file system.

4 Oct at 09:7

What's the difference between IEquatable and just overriding Object.Equals()?

I want my `Food` class to be able to test whenever it is equal to another instance of `Food`. I will later use it against a List, and I want to use its `List.Contains()` method. Should I implement `IE...

1 Aug at 04:32

How to render a PDF file in Android

Android does not have PDF support in its libraries. Is there any way to render PDF files in the Android applications?

7 Nov at 15:4

The calling thread must be STA, because many UI components require this

I am using [http://www.codeproject.com/KB/IP/Facebook_API.aspx](http://www.codeproject.com/KB/IP/Facebook_API.aspx) I am trying to call the [XAML](http://en.wikipedia.org/wiki/Extensible_Application_...

31 Jul at 19:51

How to remove unwanted space between rows and columns in table?

How do I remove the extra space between the rows and columns in the table. I've tried changing the margin, padding, and various border properties on the table and tr and td. I want the pictures to a...

22 May at 13:59

@property retain, assign, copy, nonatomic in Objective-C

As someone that's new to Objective-C can someone give me an overview of the retain, assign, copy and any others I'm missing, that follow the @property directive? What are they doing and why would I wa...

Java integer to byte array

I got an integer: `1695609641` when I use method: ``` String hex = Integer.toHexString(1695609641); system.out.println(hex); ``` gives: ``` 6510f329 ``` but I want a byte array: ``` byte[] by...

15 Dec at 23:36

How to set the environment variables for Java in Windows

How to set the environment variables for Java in Windows (the classpath)?

14 May at 04:21

Adding one day to a date

My code to add one day to a date returns a date before day adding: `2009-09-30 20:24:00` date after adding one day SHOULD be rolled over to the next month: `1970-01-01 17:33:29` ``` <?php //add...

9 Nov at 10:39

What is an ORM, how does it work, and how should I use one?

Someone suggested I use an ORM for a project that I'm designing, but I'm having trouble finding information on what it is or how it works. Can anyone give me a brief explanation of what an ORM is an...

11 Jun at 16:31

Removing all non-numeric characters from string in Python

How do we remove all non-numeric characters from a string in Python?

30 May at 02:18

How to get a specific output iterating a hash in Ruby?

I want to get a specific output iterating a Ruby Hash. This is the Hash I want to iterate over: ``` hash = { 1 => ['a', 'b'], 2 => ['c'], 3 => ['d', 'e', 'f', 'g'], 4 => ['h'] } ``` Thi...

23 Mar at 17:53

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 convert an interval into a number of hours with postgres?

Say I have an interval like ``` 4 days 10:00:00 ``` in postgres. How do I convert that to a number of hours (106 in this case?) Is there a function or should I bite the bullet and do something like...

4 Jun at 19:8

Convert a string to int using sql query

How to convert a string to integer using SQL query on SQL Server 2005?

10 Jan at 11:25

How to make a variadic macro (variable number of arguments)

I want to write a macro in C that accepts any number of parameters, not a specific number example: ``` #define macro( X ) something_complicated( whatever( X ) ) ``` where `X` is any number of par...

31 Mar at 02:10

Why Func<T,bool> instead of Predicate<T>?

This is just a curiosity question I was wondering if anyone had a good answer to: In the .NET Framework Class Library we have for example these two methods: ``` public static IQueryable<TSource> Whe...

18 Apr at 13:49

How can I force a long string without any blank to be wrapped?

I have a long string (a DNA sequence). It does not contain any whitespace character. For example: ``` ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTCGATGTAGCTAGTAGCATGTAG...

24 Apr at 12:29