Pepin
  • About
  • Home

Retirement Ceremony Details

Details
Joni
Blog
Empty
  •  Print 
  • Email

More detailed information for the event, including information on parking and Yard access can be found here. I'll be sure to update the page if anything changes, or as needed. Looking forward to seeing everyone on Friday!

Retirement Information Page

Add a comment

Mobile OS Website

Details
Joni
Android
Empty
  •  Print 
  • Email

Hello Android Fans!  Whether you're a student, or just looking for some good tutorials, here's the URL for the Naval Academy's Android programming course (aka 'Mobile OS Development'): http://www.usna.edu/Users/cs/pepin/courses/mobileos/

Be sure to bookmark it!

Add a comment

How to Super-Speed Web Page Loading

Details
Joni
Web Development
Empty
  •  Print 
  • Email

I was upset when iGoogle went away recently, so I decided to make my own start page. I wanted it to be able to display rss feeds from several sites. I decided on the great SimplePie php library to aggregate the feeds. Then I hit a speed bump...literally. The page looked great, but it took FOREVER to load. We're talking several seconds...every time.  After some research, I made sure I had the proper header tags to enable caching, which helped some. But what I really needed was gzip.

Here's the rub...I know how to enable on-the-fly gzip compression in the .htaccess file:

# ENABLE GZIP COMPRESSION
 <ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
 </ifmodule>

 

But my web host isn't configured correctly, so it has no effect.  Then I came across this little gem:

<? ob_start("ob_gzhandler"); ?>

Just place that at the top of each page, and you're all set! My page load time went from an average of over 4 seconds to milliseconds.

Add a comment

Calendar methods

Details
Joni
Android
Empty
  •  Print 
  • Email

Check to see how many days difference between the current date and the date passed in as a parameter.

Days from today

public static int daysFromToday(Calendar c) {
    Calendar today = Calendar.getInstance();
    int dayDifference = c.get(Calendar.DAY_OF_YEAR) - today.get(Calendar.DAY_OF_YEAR);
    int yearDifference = c.get(Calendar.YEAR) - today.get(Calendar.YEAR);
    return dayDifference + (365 * yearDifference);
}

Add a comment

More Articles ...

  1. Network Connectivity
  2. Custom Logger
Page 1 of 3
  • Start
  • Prev
  • 1
  • 2
  • 3
  • Next
  • End
feed-image RSS
 
 
 
 
 
Bootstrap is a front-end framework of Twitter, Inc. Code licensed under MIT License. Font Awesome font licensed under SIL OFL 1.1.