Summary: This article lists possible solutions to an "iPhone 4 volume control not working" problem, where your iPhone 4 volume may be too loud (or too quiet) when using earbuds or headphones.
Scala, Java, Unix, MacOS tutorials (page 337)
I tend to forget that I've written a lot of articles and tutorials that are out of the content management system that I now use to run devdaily.com, and last night I stumbled across an article I wrote on software cost estimating that I happen to think is pretty good. So, to make that article easier to find, here's a link to my software cost estimating tutorial.
(As you'll see from the look and feel of those web pages, those pages are formatted very differently, but you'll still be on the devdaily.com website.)
Scala list/sequence FAQ: How do I iterate over a Scala List (or more generally, a Scala sequence) using the foreach method or for loop?
There are a number of ways to iterate over a Scala List using the foreach method — which is available to Scala sequences like List, Array, ArrayBuffer, Vector, Seq, etc. — and the for comprehension, and I'll show several of these solutions here.
Scala List FAQ: How do I merge a List in Scala?
NOTE: I wrote the solutions shown below a long time ago, and they are not optimal. I'll update this article when I have more time. The best approach is to prepend one List to the beginning of another List with the :: method.
There are at least three ways to merge/concatenate Scala List instances, as shown in the examples below.
iPad battery life FAQ: Do you have any tips on how to improve my iPad battery life?
Yes, it turns out you can do a number of things to improve your iPad battery life. Here's a quick list of the best "iPad battery life" tips I know.
1) iPad battery life tip - Drain the battery monthly
I learned this first battery life tip by digging through the Apple website. They specifically mention that you can improve your battery life by draining your iPad battery completely every month. Here's their quote:
iPad screen cleaning FAQ: How do I clean my iPad screen (the glass screen)? Also, what sort of iPad cleaning cloth should I use?
Curious about how well Scala would play with the Spring Framework, I created a small Scala/Spring dependency injection example project, which I'm sharing here.
The short answer is that Scala worked just fine with Spring, but it also showed me that I still have plenty to learn about inheritance in Scala.
My Spring applicationContext.xml file
I copied a Spring applicationContext.xml file from another project, then whittled it down to these bare essentials:
Ruby FAQ: How do I read command line arguments in a Ruby script (Ruby command line args)?
To read command line args in a Ruby script, use the special Ruby array ARGV to get the information you need. Here are a few examples.
1) Getting the number of command line args
To get the number of command line arguments passed in to your Ruby script, check ARGV.length, like this:
iPad/iPhone DVD movie FAQ: How do I get a DVD movie I own onto my iPod, iPad, or iPhone in a digital movie file? (Also written as, "How do I rip a DVD movie to a digital video file?")
If you're like me,
iPhone JavaScript dialogs FAQ: Can I use JavaScript windows and dialogs in my iPhone HTML app (the JavaScript alert dialog, confirm dialog, and prompt dialog)?
Yes you can. According to Apple's iOS Safari web documentation, you can use "iPhone JavaScript windows and dialogs" that are supported by iOS. Here's how.
MySQL “create database” FAQ: Can you share an example of how to create a MySQL database, including (a) creating the MySQL database and (b) a new MySQL database user, with all appropriate MySQL grant permissions for that user?
Sure. I've written about the process of How to add/create a MySQL user before, but I just ran across the Drupal installation documentation, which also has a nice description for how to create a MySQL database (for use with Drupal), so I thought I'd include some of their documentation here, along with some notes from my own recent Drupal and MySQL installation.
1) Create a new MySQL database
The first part of the Drupal installation document refers to creating a MySQL database:
Free Unix and Linux tutorials: Wow, this blog post makes me feel a little old. As I've been working on reorganizing the website lately, I found that I've written more than seventy-five Unix and Linux tutorials. To try to make them easier to find, I created this page to link most of them up.
So, to that end, here is a list of at least 75 free Unix and Linux tutorials I've written. I hope you enjoy them, and I hope they're helpful.
Unix/Linux find command FAQ: How can I write one Unix find command to find multiple filenames (or filename patterns)? For example, I want to find all the files beneath the current directory that end with the file extensions ".class" and ".sh".
You can use the Linux find command to find multiple filename patterns at one time, but for most of us the syntax isn't very common. In short, the solution is to use the find command's "or" option, with a little shell escape magic. Let's take a look at several examples.
In my earlier tutorial on creating a Scala REST client using the Apache HttpClient library, I demonstrated how to download the contents of a Yahoo Weather API URL, and then parse those contents using the Scala XML library. I didn't discuss the XML searching/parsing process used in that source code, so in this article I'll take a few moments to look at that code.
After writing a Java REST (RESTful) client using Apache HttpClient, I turned around and modified that code to be a Scala REST client, also using the Apache HttpClient library.
I started writing some Java REST (RESTful) clients lately, and in doing so, I've been looking at several different ways to do this, including using the Apache HttpClient project, the Jersey project, Apache CXF, and more.
I just moved to the Denver and Boulder, Colorado area last month, specifically ending up in Broomfield, Colorado. I've been poking around the local computer programming job market, and one of the real surprises for me has been how much the Google Web Toolkit (GWT) is used in Corporate America here in Colorado.
I normally don't share source code that doesn't work, but I just want to make a note here for myself on how to use JavaMail to search for multiple search terms. While the code doesn't currently work, I believe it does show the correct syntax for searching for multiple search terms, and there's just something about the overall JavaMail API (or Yahoo Mail) that I don't understand at this moment.
While working on a Java application, I found the need for a simple Java mailbox reader. I wanted to be able to scan through one of my POP/POP3 mailboxes for messages, and then do something with those messages.
To that end I created the following example JavaMail POP mailbox reader. It connects to a standard POP/POP3 mailbox, then scans through all the messages in the "Inbox" folder.