remove

Scala Maps (Map class examples)

Here's a quick look at how to use the Scala Map class, with a colllection of Map class examples.

The immutable Map class is in scope by default, so you can create an immutable map without an import, like this:

val states = Map("AL" -> "Alabama", "AK" -> "Alaska")

To create a mutable Map, import it first:

Drupal front page - Removing the H1 title tag

Drupal FAQ: How do I remove the H1 title tag from the front page of a Drupal website?

I just ran into this problem on my new website, How I Sold My Business: A Personal Diary. Whenever you create a Drupal page you have to give it a title, but for the front page of a website that doesn't really make sense.

There are at least two ways to do this:

Tell Git not to track a file any more (remove from repo)

Git rm FAQ: How do I tell Git not to track a file (or files) any more? That is, I want to remove the file from the Git repo?

While working on an application named "sarah" yesterday (named for the house known as "SARAH" in the tv series Eureka), I accidentally checked some files into Git that I didn't mean to. These were were primarily binary files in my project's "bin" and "target" directories.

jQuery - Create a textarea, insert text into a textarea

jQuery FAQ: How do you create a textarea using jQuery? Also, how do I insert content (text or HTML) into a textarea with jQuery?

I don't know if this will make any sense without showing my HTML, but I just used the following jQuery code to (a) get contents from a specific div tag, (b) add a textarea just before that div, (c) put the HTML contents into the new textarea, then (d) remove the original div. So, in essence, I created a new textarea with jQuery and inserted HTML into that textarea, but I got the HTML from my original div.

iPhone HTML app full screen mode - How to remove the URL and button bars

iPhone HTML web app FAQ: In an HTML web app optimized for the iPhone, how do I remove the URL bar on top of the iPhone Mobile Safari web browser so I can show my HTML app in full screen mode?

When you're creating an HTML/web app to look like a native iPhone app, one of the things you'll want to do is remove the URL bar in the Mobile Safari web browser. This is the URL bar on the top of the iPhone browser, and by getting rid of it, you can display your web app on the iPhone in full-screen mode.

The Linux rm command (remove files and directories)

Linux FAQ: How do I delete files (remove files) on a Unix or Linux system?

The Linux "rm" command is used to remove files and directories. (As its name implies, this is a dangerous command, so be careful.)

Let's take a look at some rm command examples, starting from easy examples to more complicated examples.

Unix/Linux rm command examples - Deleting files

In its most basic use, the Linux rm command can be used to remove one file, like this:

Mac Dock folder tip - How to move a folder to the Mac Dock

Mac Dock FAQ: How do I move a commonly used Mac folder to the Dock so I can access it easier?

When you first buy a Mac, the right side of the Dock (the right side of the highway stripe on the Mac Dock) will have just the basic items on it, such as the Applications and Downloads folders. What a lot of people don't know is that you can put links (shortcuts) to your own folders there as well. In fact, this is a great place to put shortcuts to your most commonly used Mac folders.

Mac Dock applications - How to move (or remove) a Mac application icon

Mac Dock icon FAQs: How do I move a Mac application icon to the Dock so I can access it easier? Also, how do I remove an application icon from the Mac Dock?

Linux rm command man page

This page shows the contents of the Linux rm command man page. The rm command ("remove") is used for deleting files and directories on a Unix or Linux system.

This rm command output was created on a CentOS Linux system. You can see this same rm command man page output by entering this command on your own Linux system:

A Ruby script to remove binary (garbage) characters from a text file

Problem: You have a file that should be a plain text file, but for some reason it has a bunch of non-printable binary characters (also known as garbage characters) in it, and you'd like a Ruby script that can create a clean version of the file.

Solution: I've demonstrated how to do this in another blog post by using the Unix tr command, but in case you'd like a Ruby script to clean up a file like this, I thought I'd write up a quick program and share it here.

Syndicate content