Questions

What methods of ‘clearfix’ can I use?

I have the age-old problem of a `div` wrapping a two-column layout. My sidebar is floated, so my container `div` fails to wrap the content and sidebar. ``` <div id="container"> <div id="content"></...

22 Mar at 12:3

Python: Find in list

I use the following to check if `item` is in `my_list`: ``` if item in my_list: print("Desired item is in list") ``` Is "`if item in my_list:`" the most "pythonic" way of finding an item in a lis...

23 Jan at 08:46

Cleaning up old remote git branches

I work from two different computers (A and B) and store a common git remote in the dropbox directory. Let's say I have two branches, master and devel. Both are tracking their remote counterparts orig...

14 Apr at 11:32

How to un-commit last un-pushed git commit without losing the changes

Is there a way to revert a commit so that my local copy the changes made in that commit, but they become non-committed changes in my working copy? Rolling back a commit takes you to the previous comm...

31 May at 20:4

What does the "at" (@) symbol do in Python?

What does the `@` symbol do in Python?

19 Apr at 01:39

Limit text length to n lines using CSS

Is it possible to limit a text length to "n" lines using CSS (or cut it when overflows vertically). `text-overflow: ellipsis;` only works for 1 line text. original text: > Ultrices natoque mus ma...

28 Apr at 18:53

How do I access my SSH public key?

I've just generated my RSA key pair, and I wanted to add that key to GitHub. I tried `cd id_rsa.pub` and `id_rsa.pub`, but no luck. How can I access my SSH public key?

8 Aug at 18:20

How do I comment out a block of tags in XML?

How do I comment out a block of tags in XML? I.e. How can I comment out `<staticText>` and everything inside it, in the code below? ``` <detail> <band height="20"> <staticText> <re...

3 May at 10:41

Generate a Hash from string in Javascript

I need to convert strings to some form of hash. Is this possible in JavaScript? I'm not utilizing a server-side language so I can't do it that way.

24 Jul at 09:6

How can I do a recursive find/replace of a string with awk or sed?

How do I find and replace every occurrence of: ``` subdomainA.example.com ``` with ``` subdomainB.example.com ``` in every text file under the `/home/www/` directory tree recursively?

1 Nov at 20:5

What is Vim recording and how can it be disabled?

I keep seeing the `recording` message at the bottom of my gVim 7.2 window. What is it and how do I turn it off?

18 May at 01:37

Clearing localStorage in javascript?

Is there any way to reset/clear browser's localStorage in javascript?

27 Dec at 13:36

How to concatenate two MP4 files using FFmpeg?

I'm trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I'm converting the two files into `.ts` files and then concatenating them and t...

2 Jan at 19:8

Is List<Dog> a subclass of List<Animal>? Why are Java generics not implicitly polymorphic?

I'm a bit confused about how Java generics handle inheritance / polymorphism. Assume the following hierarchy - (Parent) - (Children) So suppose I have a method `doSomething(List<Animal> animals...

How to pass an object from one activity to another on Android

I am trying to work on sending an object of my class from one `Activity` and displaying it in another `Activity`. The code for the customer class: ``` public class Customer { private String firs...

What is PECS (Producer Extends Consumer Super)?

I came across PECS (short for `extends``super`) while reading up on generics. Can someone explain to me how to use PECS to resolve confusion between `extends` and `super`?

What is the difference between application server and web server?

What is the difference between application server and web server?

What is object slicing?

In c++ what is object slicing and when does it occur?

Redirect all output to file in Bash

I know that in Linux, to redirect output from the screen to a file, I can either use the `>` or `tee`. However, I'm not sure why part of the output is still output to the screen and not written to the...

14 Jan at 12:33

Rename master branch for both local and remote Git repositories

I have the branch `master` which tracks the remote branch `origin/master`. I want to rename them to `master-old` both locally and on the remote. Is this possible? For other users who tracked `origi...

17 Apr at 18:24

The located assembly's manifest definition does not match the assembly reference

I am trying to run some unit tests in a C# Windows Forms application (Visual Studio 2005), and I get the following error: > System.IO.FileLoadException: Could not load file or assembly 'Utility, Versi...

Make Vim show ALL white spaces as a character

I can't find a way to make Vim show all white spaces as a character. All I found was about tabs, trailing spaces etc.

23 Apr at 19:9

Are double square brackets [[ ]] preferable over single square brackets [ ] in Bash?

A coworker claimed recently in a code review that the `[[ ]]` construct is to be preferred over `[ ]` in constructs like ``` if [ "`id -nu`" = "$someuser" ] ; then echo "I love you madly, $someus...

21 Jan at 15:19

Node.js: printing to console without a trailing newline?

Is there a method for printing to the console without a trailing newline? The `console` object [documentation](https://nodejs.org/docs/v0.4.8/api/stdio.html#console.log) doesn't say anything regarding...

20 Jun at 09:12

How to display HTML in TextView?

I have simple : ``` <h2>Title</h2><br> <p>description here</p> ``` I want to display HTML styled text it in `TextView`. How to do this?

29 Aug at 22:7