Using padding in encryption: "The most common query we get about cryptography concerns padding with a block cipher.
If you have to encrypt some data to send to another user and everything else works OK except the last few bytes, your problem is probably one of padding. Read on.
This article describes the mechanics of padding with examples using common block encryption algorithms like DES, Triple DES, Blowfish and AES. It considers where you should use padding and where you don't need to."
Tuesday, August 09, 2011
Monday, May 30, 2011
Issue 13024 - android - SDK 8 : Manual Ant Compile failed with : lib_rules.xml:121: Reference android.libraries.src not found - Android - An Open Handset Alliance Project - Google Project Hosting
Issue 13024 - android - SDK 8 : Manual Ant Compile failed with : lib_rules.xml:121: Reference android.libraries.src not found - Android - An Open Handset Alliance Project - Google Project Hosting: "Comment 8 by Andrew.P...@gmail.com, Dec 23, 2010
I've added two lines after :
It works for me."
I've added two lines after :
It works for me."
Saturday, April 23, 2011
How to build an evil automated zombie blog for advertising revenue
How to build an evil automated zombie blog for advertising revenue: "What’s an Evil Automated Zombie Blog? Glad you asked! It’s when you leverage RSS feeds to automatically create blog posts from other blogs and news sources. These sites are good for generating traffic from Google, and can run without you every having to create a single real blog post. After a short period of time, your blog will amass a large number of posts around a given topic; the very thing Google bots like to gobble up.
WARNING: These types of mindless zombie websites are considered evil in the blogging community – lets do it anyway!
The technique we’re about to cover caused one hell of an uproar while writing my WordPress Top Plugins book; the editors and proofreaders expressed their hatred for the very plugin we’re going to be using to setup an auto blog – WP-O-Matic. They said things like “Auto blogs are evil, and this plugin should not be included in the book” or “This plugin will make it to easy for people to steal other peoples content”. Never the less, I fought and won. WP-O-Matic is a great plugin with a lot of practical applications; what we’re about to cover is NOT one of them.
Please understand that what we’re about to build will be looked down upon by purist, but hell that’s what makes it fun!"
WARNING: These types of mindless zombie websites are considered evil in the blogging community – lets do it anyway!
The technique we’re about to cover caused one hell of an uproar while writing my WordPress Top Plugins book; the editors and proofreaders expressed their hatred for the very plugin we’re going to be using to setup an auto blog – WP-O-Matic. They said things like “Auto blogs are evil, and this plugin should not be included in the book” or “This plugin will make it to easy for people to steal other peoples content”. Never the less, I fought and won. WP-O-Matic is a great plugin with a lot of practical applications; what we’re about to cover is NOT one of them.
Please understand that what we’re about to build will be looked down upon by purist, but hell that’s what makes it fun!"
android-rss - Android RSS Feed Reader - Google Project Hosting
android-rss - Android RSS Feed Reader - Google Project Hosting: "Fully functional Android RSS reader created as a way to learn the new Android platform SDK. This project is an ongoing effort to better understand and embrace the Android design philosophy, welcoming comments and additional contributors.
Project Status
This project is just before release 0.1. It is a functional news reader, but does not contain all the features you might expect from a full-featured distributable application.
The target audience is primarily developers interested in further exploration of the Android SDK. Source code is available, and can be accessed through the Subversion repository hosted here."
Project Status
This project is just before release 0.1. It is a functional news reader, but does not contain all the features you might expect from a full-featured distributable application.
The target audience is primarily developers interested in further exploration of the Android SDK. Source code is available, and can be accessed through the Subversion repository hosted here."
Thursday, January 13, 2011
Tuesday, January 11, 2011
Performance Tuning Garbage Collection in Java
Performance Tuning Garbage Collection in Java: "2.1 Performance Considerations
Ways to measure GC Performance
Throughput - % of time not spent in GC over a long period of time.
Pauses - app unresponsive because of GC
Footprint - overall memory a process takes to execute
Promptness - time between object death, and time when memory becomes available
There is no one right way to size generations, make the call based on your applications usage."
Ways to measure GC Performance
Throughput - % of time not spent in GC over a long period of time.
Pauses - app unresponsive because of GC
Footprint - overall memory a process takes to execute
Promptness - time between object death, and time when memory becomes available
There is no one right way to size generations, make the call based on your applications usage."
Wednesday, January 05, 2011
Super Rich - Yahoo! News
Super Rich - Yahoo! News: "Read Russell Simmons's other articles on HuffingtonPost.com
To mark the release of my new book Super Rich: A Guide To Having It All, I went on Twitter and asked a simple question: What would you do if you were Super Rich?
The response was immediate, humbling and extremely encouraging.
@buyhousescheap wrote, 'If I were #SuperRich I would rebuild Haiti.'
@313Don214 said, 'If was super rich I would buy an apartment building to give the homeless a second chance.'"
To mark the release of my new book Super Rich: A Guide To Having It All, I went on Twitter and asked a simple question: What would you do if you were Super Rich?
The response was immediate, humbling and extremely encouraging.
@buyhousescheap wrote, 'If I were #SuperRich I would rebuild Haiti.'
@313Don214 said, 'If was super rich I would buy an apartment building to give the homeless a second chance.'"
Tuesday, January 04, 2011
Xbox 360 Red Ring Of Death Fix - How To Guide
Xbox 360 Red Ring Of Death Fix - How To Guide: "Xbox 360 Red Ring Of Death is a serious problem and more than 500000 people are facing the same. The Worst thing about red ring of death is or other Xbox 360 errors, they will not go anywhere until you fix it. In this informative article I will show you how you can fix red ring of death error on your own. The method described in this article is extremely easy to follow. But I will warn you if you are not tech savvy then take help of videos mentioned here. These videos are made by professional xbox 360 repair experts. This article will show exact step by step action plan to get rid of red ring of death permanently. This will not only save your money but it will also save your time. So be with me... :)"
Ad Hoc Data Analysis From The Unix Command Line - Wikibooks, open books for an open world
Ad Hoc Data Analysis From The Unix Command Line - Wikibooks, open books for an open world: "Once upon a time, I was working with a colleague who needed to do some quick data analysis to get a handle on the scope of a problem. He was considering importing the data into a database or writing a program to parse and summarize that data. Either of these options would have taken hours at least, and possibly days. I wrote this on his whiteboard:
Your friends: cat, find, grep, wc, cut, sort, uniq
These simple commands can be combined to quickly answer the kinds of questions for which most people would turn to a database, if only the data were already in a database. You can quickly (often in seconds) form and test hypotheses about virtually any record oriented data source."
Your friends: cat, find, grep, wc, cut, sort, uniq
These simple commands can be combined to quickly answer the kinds of questions for which most people would turn to a database, if only the data were already in a database. You can quickly (often in seconds) form and test hypotheses about virtually any record oriented data source."
Tuesday, December 28, 2010
Jeff Bezos Princeton Commencement
Jeff Bezos Princeton Commencement: "omorrow, in a very real sense, your life -- the life you author from scratch on your own -- begins.
How will you use your gifts? What choices will you make?
Will inertia be your guide, or will you follow your passions?
Will you follow dogma, or will you be original?
Will you choose a life of ease, or a life of service and adventure?
Will you wilt under criticism, or will you follow your convictions?
Will you bluff it out when you're wrong, or will you apologize?
Will you guard your heart against rejection, or will you act when you fall in love?
Will you play it safe, or will you be a little bit swashbuckling?
When it's tough, will you give up, or will you be relentless?
Will you be a cynic, or will you be a builder?
Will you be clever at the expense of others, or will you be kind?"
How will you use your gifts? What choices will you make?
Will inertia be your guide, or will you follow your passions?
Will you follow dogma, or will you be original?
Will you choose a life of ease, or a life of service and adventure?
Will you wilt under criticism, or will you follow your convictions?
Will you bluff it out when you're wrong, or will you apologize?
Will you guard your heart against rejection, or will you act when you fall in love?
Will you play it safe, or will you be a little bit swashbuckling?
When it's tough, will you give up, or will you be relentless?
Will you be a cynic, or will you be a builder?
Will you be clever at the expense of others, or will you be kind?"
Monday, December 27, 2010
How to Get Free Kindle Ebooks: Online Electronic Books Free for the Download
How to Get Free Kindle Ebooks: Online Electronic Books Free for the Download: "Times are tough, and in the recession era of today, the cheaper the better. Many people adore books, which is why libraries are seeing record numbers during the recession (they are free entertainment choices). Today many people already have an ebook readers such as a Sony Reader or Kindle, or they just like to download onto their laptop computers. I’ve seen many classic books being used in a Homeschool environment. Whichever the case, there are free ebooks up for download with any of the five sites below."
Monday, September 20, 2010
Monday, May 03, 2010
Yucks --- see the nasty way of initializing the jdbc driver. all the examples on the web are wrong...
I had to get this from a forum post!
#!/Users/spicysquid/java/jruby/jruby-1.5.0.RC2/bin/jruby
require 'java'
require 'rubygems'
require 'jdbc/mysql'
#this isnt needed since we have jdbc/mysql already loaded
#require './mysql-connector-java-5.0.5.jar'
#import 'com.mysql.jdbc.Driver'
begin
#Nasty way of loading the jdbc driver
java.lang.Thread.currentThread.getContextClassLoader().loadClass("com.mysql.jdbc.Driver",true).newInstance
conn = java.sql.DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/database", "root", "");
stmt = conn.createStatement
rs = stmt.executeQuery("select * from member")
while (rs.next) do
puts rs.getString("username")
end
rs.close
stmt.close
conn.close()
end
I had to get this from a forum post!
#!/Users/spicysquid/java/jruby/jruby-1.5.0.RC2/bin/jruby
require 'java'
require 'rubygems'
require 'jdbc/mysql'
#this isnt needed since we have jdbc/mysql already loaded
#require './mysql-connector-java-5.0.5.jar'
#import 'com.mysql.jdbc.Driver'
begin
#Nasty way of loading the jdbc driver
java.lang.Thread.currentThread.getContextClassLoader().loadClass("com.mysql.jdbc.Driver",true).newInstance
conn = java.sql.DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/database", "root", "");
stmt = conn.createStatement
rs = stmt.executeQuery("select * from member")
while (rs.next) do
puts rs.getString("username")
end
rs.close
stmt.close
conn.close()
end
Sunday, February 28, 2010
How to install tokyocabinet and tokyotyrant on a mac.
Berry easy!
LOLCAT@/opt/local/bin$sudo ./port install tokyocabinet tokyotyrant
---> Computing dependencies for tokyocabinet
---> Fetching zlib
---> Attempting to fetch zlib-1.2.3.tar.bz2 from http://distfiles.macports.org/zlib
---> Verifying checksum(s) for zlib
---> Extracting zlib
---> Applying patches to zlib
---> Configuring zlib
---> Building zlib
---> Staging zlib into destroot
---> Installing zlib @1.2.3_4
---> Activating zlib @1.2.3_4
---> Cleaning zlib
---> Fetching tokyocabinet
---> Attempting to fetch tokyocabinet-1.4.42.tar.gz from http://distfiles.macports.org/tokyocabinet
---> Verifying checksum(s) for tokyocabinet
---> Extracting tokyocabinet
---> Configuring tokyocabinet
---> Building tokyocabinet
---> Staging tokyocabinet into destroot
---> Installing tokyocabinet @1.4.42_0
---> Activating tokyocabinet @1.4.42_0
---> Cleaning tokyocabinet
---> Computing dependencies for tokyotyrant
---> Fetching tokyotyrant
---> Attempting to fetch tokyotyrant-1.1.40.tar.gz from http://distfiles.macports.org/tokyotyrant
---> Verifying checksum(s) for tokyotyrant
---> Extracting tokyotyrant
---> Configuring tokyotyrant
---> Building tokyotyrant
---> Staging tokyotyrant into destroot
---> Installing tokyotyrant @1.1.40_0
---> Activating tokyotyrant @1.1.40_0
---> Cleaning tokyotyrant
Berry easy!
LOLCAT@/opt/local/bin$sudo ./port install tokyocabinet tokyotyrant
---> Computing dependencies for tokyocabinet
---> Fetching zlib
---> Attempting to fetch zlib-1.2.3.tar.bz2 from http://distfiles.macports.org/zlib
---> Verifying checksum(s) for zlib
---> Extracting zlib
---> Applying patches to zlib
---> Configuring zlib
---> Building zlib
---> Staging zlib into destroot
---> Installing zlib @1.2.3_4
---> Activating zlib @1.2.3_4
---> Cleaning zlib
---> Fetching tokyocabinet
---> Attempting to fetch tokyocabinet-1.4.42.tar.gz from http://distfiles.macports.org/tokyocabinet
---> Verifying checksum(s) for tokyocabinet
---> Extracting tokyocabinet
---> Configuring tokyocabinet
---> Building tokyocabinet
---> Staging tokyocabinet into destroot
---> Installing tokyocabinet @1.4.42_0
---> Activating tokyocabinet @1.4.42_0
---> Cleaning tokyocabinet
---> Computing dependencies for tokyotyrant
---> Fetching tokyotyrant
---> Attempting to fetch tokyotyrant-1.1.40.tar.gz from http://distfiles.macports.org/tokyotyrant
---> Verifying checksum(s) for tokyotyrant
---> Extracting tokyotyrant
---> Configuring tokyotyrant
---> Building tokyotyrant
---> Staging tokyotyrant into destroot
---> Installing tokyotyrant @1.1.40_0
---> Activating tokyotyrant @1.1.40_0
---> Cleaning tokyotyrant
Friday, November 27, 2009
My droid eye verizon is blogged about :P
Android Application Top 10 Countdown – Week Ending 11/14/2009 | AndroidGuys

4 – Droid Eye Verizon
Price: Free
Description: This is a silly application to display the Motorola red Droid. It does not do anything else.
Thoughts: For those of us stuck with ‘Mo we can download this. It’s a picture of the red Droid, nothing more, nothing less. At least its free.
Wednesday, November 18, 2009
How to add ringtones to your DROID
Motorola Owners' Forum: DROID : How do I transfer ringtones,...

My old LG-8300 was fine. I had some neat ringtones in there that I garnered from far and wide and wanted to put them in my Droid. Since no manual came with my droid other the thiny fold-out sheet and the built in help in the droid just shows you how to use the keyboard, I was wondeing how to xfer the rintones to my droid. In my LG I had them all on the micro-SD card. Droid has one too- but where is it? The fold-out sheet doesb't tell you! Well, I believe you have to take the battery out to get to it. OK, I can "mount" the droid to my confuser so I copied the contents of my LG microSD card to the confuser. Did some tedious search on-line and found this:
"If you already have music files you'd like to use for ringtones, alarms, notifications, etc. Connect your device to your PC, on the device, got to USB, then mount the SD card. Now on the root of SD card create the following folders by type, they are as follows:
Notifications: media/audio/notifications
Ringtones: media/audio/ringtones
Alarms: media/audio/alarms"
In better terms, on the Droid SD card create a directory called "media". Then in the media dir create a subdir called "audio". Then in the audio dir create subdirectories called "notifications", "ringtones", and "alarms".
The directories in my old LG sd card that had data in them were:
my_flix (videos)
my_pix (pictures)
ringers (ringtones)
Sooooo, I copied the ringtones to the new ringtones dir on the Droid SD card. I also created a new dir called Pix and one called Flix and copied my pix and flix to them. I'll sort that out later when I have time. Unmounted the Droid. Checked it out and all my ringtones are available without me doing anything further. I set up some contacts with the new ringtones and they are working fine.
Just thought I would pass this on. Hope it is useful to someone. (Thanks to Jared elsewhere on this thread for the initial info!)
Tuesday, November 10, 2009
1024x480 display! nuts!
Engadget

And from Softbank:
* Sharp AQUOS Mobile FULLTOUCH 941SH: All we need to say about this one is "4-inch 1024 x 480 display," which, as you might be able to imagine, is a world's first.
* Sharp AQUOS Mobile 943SH: Dual one-seg tuners let you watch one program and record another, and a mention of transferring Blu-ray content has us thinking that Managed Copy is along for the ride.
* Toshiba dynapocket X02T: Remember how NTT DoCoMo had previously gotten the TG01 as the T01A? Yeah, well, now it's Softbank's turn -- and this time, it's called the X02A. Not much more to it than that.
* Samsung X01SC: This looks to be a localized version of AT&T's Samsung Jack, of all phones, meaning that it's a Windows Mobile 6.5 Standard phone (no touchscreen) with a QVGA display and portrait QWERTY keyboard.
* Sharp 942SH KT: No lineup would be complete without the obligatory Hello Kitty marketing tie-in, and the 942SH KT does the honors this time around with a black shell featuring stylized pink text and graphics.
* Samsung OMNIA VISION 940SC: Samsung's now-famous OMNIA brand comes to Softbank on the wings of a 3.5-inch AMOLED display, one-seg tuner, and kickstand for desktop viewing.
* Sharp Jelly Beans 840SH: We don't think you'd want to try eating it, but the 840SH comes in seven colors -- hence the name, we think.
* Android: The simply-named Android runs -- you guessed it -- Android with a 3.7 inch AMOLED display and 1GHz Snapdragon processor; unfortunately, it won't be available until next Spring and the manufacturer isn't being revealed right now.
Saturday, November 07, 2009
How to synch yahoo mail on the droid
Motorola DROID / DROID Eris now available in stores, online « Boy Genius Report

1.select the email icon
2.select the physical menu button
3.select accounts
4.select the physical menu button
5.select add account
6.enter in email address and password
7.select manual setup in the lower left hand corner
8.select imap account
9.enter the following into the imap server field -
imap.mail.yahoo.com
10.select next
11.enter the following into the smpt server field -
smpt.mail.yahoo.com
12.select next
13.choose your email frequency and if you would like the email to be your default account
14.select next
15.name the account
16.select done
Wednesday, November 04, 2009
Great post on how to modify the sms inbox
Android Tips

Monday, September 7, 2009
SMS Blocking in Android
Recently, I tried to develop an app that would block sms from certain numbers that you can choose. It seems that you cannot completely block the incoming sms.
These were the problems that I faced while working with this app.
1. There are no APIs supplied, that handles the SMS inbox (I mean, no content providersm which can be directly queried to fetch records from the sms table). However, you have a workaround of finding the tables where the sms is stored, and then querying and updating that table. Well, there is actually a content provider, that exposes this table to other applications, but it is not documented anywhere. So, I have to hardcode the column values. This is potentially dangerous, if in the next Donut release, Google changes the column names, my application would fall apart.
2. On receiving of an SMS, I have 2 things to do. Remove the SMS from the sms table, and disable the notification. Deleting the sms from the table was pretty easy, but I couldn't find a way to remove the Notification. Perhaps, there is no way that we can disable this notification. One workaround might be, to temporarily change the Notification settings, the moment you sense an incoming message from a blocked number. And, after you delete the message from the sms table, you just turn on the notification. I haven't worked on this, but this might just work.
3. If the Messaging application is already open, and an sms arrives, weird things start to happen. I can see the blocked sms being deleted, and the list of sms gets updated. But the next message in the list is marked as "Unread". Probably, this is done my the Notification, I don't know.
4. SMS broadcast, is definitely, an un-ordered one. So, the easiest way, that could have worked, would have been just to abort the broadcast. But in this case, you don't have this option. so, once you recieve this broadcast, you have to manually go and delete the message, by matching the incoming number, timestamp etc. Timestamp method isn't foolproof. Because, the timestamp you receive, is the timestamp of the broadcast, and not the time when the sms is written into the DB. So they wont match. You should pick up the incoming number, and check for the timestamp within a range of about 1 seconds. This should give you the sms that you need to delete.
5. There's another problem. When you recieve the broadcast, the system wont write the sms into the table, before it is sure that all the broadcast receivers have done their work. So, it waits for some time, and then writes the sms into the table. Before this, if you try to delete the sms, obviously, you would not find it in the table. So, make your code sleep for about a second, and then go and delete the SMS. That should do it.
But, the most important problem still persists. THE NOTIFICATION. I guess, it can't be removed.
Monday, November 02, 2009
Mio Miuddy GPS unit for Windows CE moves to Android
Mio MiBuddy GPS units to trade Windows CE for Android

Mio MiBuddy GPS units to trade Windows CE for Android
by Joshua Topolsky posted Nov 2nd 2009 at 9:22AM
If you're keeping tabs on Mio Technology's GPS happenings, you'll be interested to dip into some facts that PC World has uncovered about the company's upcoming offerings. According to the mag, the next version of the electronics-maker's MiBuddy satnav unit will dash the underlying Windows CE architecture for Google's newer and far more suave Android platform. The new device will be pushing into MID territory, boasting a 4.7-inch touchscreen along with a hardware slider keyboard, the ability to browse the internet, and WiFi and Bluetooth onboard. Call us crazy, but it seems possible that devices like dedicated PNDs running Android could easily adapt Google's new turn-by-turn system as their primary mode of operation. Alternately, you could switch between Mio's proprietary version and Google's variation... or they could axe the big G's altogether, though that awkward situation makes far less sense to us. No word on timing or price just yet, but we'll keep you posted.
Subscribe to:
Posts (Atom)