I'm in the process of upgrading an application to Rails 3. I've decided to go with the mysql2 gem. There's some legacy code in the app that makes calls like: results = ActiveRecord::Base.connection.execute(sql) In the 2.3.x version, it used results.each_hash do |row| ... But with gem mysql2, results is type Mysql2::Result, which has only an each method. Checked the docs and they specify results sh
I have a record set that includes a date field, and want to determine how many unique dates are represented in the record set. Something like: Record.find(:all).date.unique.count but of course, that doesn't seem to work.
I am trying to get the WebView to have similar behavior as the android browser. The browser opens all pages in a way that tries to fit their width to the screen. However, the default behavior of the WebView is to start at a 100% pixel scale so it starts zoomed in on the top left corner. I have spent the last couple hours trying to find a way to get the WebView to scale the page to the screen like
I am trying to open a remote Stream of a JPEG image and convert it into a Bitmap object: BitmapFactory.decodeStream( new URL("http://some.url.to/source/image.jpg") .openStream()); The decoder returns null and in the logs I get the following message: DEBUG/skia(xxxx): --- decoder->decode returned false Note: 1. the content length is non-zero and content type is image/jpeg 2. When I open the URL in
I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI is not blocked and images are displayed as they are downloaded? The total number of images is not fixed.
For a more controlled method draw a rounded rectangle and mask it onto your image using the porter-duff Xfer mode of the paint. First setup the Xfer paint and the rounded bitmap: Bitmap myCoolBitmap = ... ; // <-- Your bitmap you want rounded int w = myCoolBitmap.getWidth(), h = myCoolBitmap.getHeight(); // We have to make sure our rounded corners have an alpha channel in most cases Bitmap rounder
I'm trying to make HTTPS connections, using HttpClient lib, but the problem is that, since the certificate isn't signed by a recognized Certificate Authority (CA) like Verisign,GlobalSIgn, etc., listed on the set of Android Trusted Certificates, I keep getting javax.net.ssl.SSLException: Not trusted server certificate. I've seen solutions where you simply accept all certificates, but what if I wan
I need to do form input validation on a series of EditTexts. I'm using OnFocusChangeListeners to trigger the validation after the user types into each one, but this doesn't behave as desired for the last EditText. If I click on the "Done" button while typing into the final EditText then the InputMethod is disconnected, but technically focus is never lost on the EditText (and so validation never oc
I have a ListView with a couple of image buttons on each row. When the user clicks the list row, it launches a new activity. I have had to build my own tabs because of an issue with the camera layout. The activity that gets launched for the result is a map. If I click on my button to launch the image preview (load an image off the SD card) the application returns from the activity back to the List
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く