As a quick note to self, I just created a TextMate Bundle snippet to insert some text at the current cursor position. Using TextMate 2.0.x, I did it with the following steps. I’ll go through these steps quickly as I’m just writing this for myself:
As a note to self, when you’re writing an Android application and you think you want to store some static text in an external file, a better approach can be to create a resource file under res/values.
For example, I’m currently adding some help text to an Android app, and to do that I created a file named strings_help.xml under the res/values directory. That file contains HTML wrapped in an XML CDATA tag, like this:
I’m not an expert on this subject just yet, but if you want the source code for an Android method to center text that you want to use with the
drawText method of the
Canvas class, I know that this code works in two places in my current Android app:
asciiflow.com is my favorite ASCII art drawing tool. It lets you draw and re-size boxes, draw lines and arrows, add text, supports and undo feature, and more. All online, all free.
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is one of the shortest recipes, Recipe 11.21, “How to Test for the Existence of a Key or Value in a Scala Map”
You want to test whether a Scala
Map contains a given key or value.
To test for the existence of a key in a
Map, use the
I’ve written a variety of small Scala apps that take advantage of the “text to speech” capabilities on Mac OS X (Sarah, Wikipedia Page Reader), and a few days ago I started thinking about consolidating these by creating a Mac “text-to-speech service.” I initially created that as an Akka server (here on Github), then thought to make it a little more generic as a REST web service.
Before I completely delete this code from my current Android application, I want to make a copy of it here. It was intended to show a series of quotes (text phrases) in a “Grid” (
GridView), but (a) I never got it working as desired, and (b) I decided I didn’t want it in my application anyway.
Here’s the source code for the Java controller/fragment class:
I recently wrote a little application to convert pages from a PDF to plain text. The GUI portion of the application looks like this:
As you can see, the application just needs the name of a PDF file to convert, along with the page you want to start at and the page you want to end at. There are several ways I could make the application more convenient to use, but since I don't plan to use it that often, I can deal with its limitations.
Textexpander lets you create short snippets of text which it will replace with larger snippets. For instance, “;em” will be replaced with your email address when you type it.