Extract Audio from YouTube Videos
>> Tuesday, September 20, 2011
I wanted to get an mp3 of a video on YouTube. There are sites that will do it for you, but I wanted a little more control.
I wanted to get an mp3 of a video on YouTube. There are sites that will do it for you, but I wanted a little more control.
I recently bought a Kindle. Even though I didn't think I would like it, I really do. Maybe it is the computer scientist in me, but I want to control how books are organized and displayed from my computer instead of from the Kindle. Enter Calibre (http://calibre-ebook.com/). If you don't know, Calibre is to ebooks as iTunes is to mp3s. It is great at organizing and converting books. However, out-of-the-box it doesn't support collections on the Kindle.
I recently bought a Kindle and have started loading it with techy books/papers/etc. that I can find for free. I am using the free calibre (http://calibre-ebook.com) software to do the conversion since pretty much everything I find is in PDF format.
I was doing some work using a MessageBox in Ext and ran into a couple of issues. Mainly the problem was because I am working in an infrastructure that is on Ext 3.3 and not Ext 4 (yet). Because of that I had to do some new things to add an ID to the MessageBox and also to bring the MessageBox above other elements on the page, specifically the loading mask.
Here is the code:
Ext.MessageBox.showWithId = function(dialogId, config){
var dialog = this.getDialog();
dialog.el.dom.id=dialogId;
Ext.MessageBox.show(config);
}
Ext.MessageBox.showWithId('myID', {
title : 'Progress',
msg : 'Processing...'
progressText : 'Initializing',
width : 270,
progress : true,
closable : false,
});
//bring it above the loading mask
Ext.MessageBox.getDialog().getEl().setStyle('z-index', '50000');
//remove the showWithId function to clean up after myself
Ext.MessageBox.showWithId = undefined;
Last week I found a SQL statement to find the size of rows in a database. That was helpful but I wanted to be able to run this from the command line. Sounds like a good job for the Groovy database features.
import groovy.sql.Sql
//connect to the database
def sql = Sql.newInstance('jdbc:oracle:thin:user/pass@host:1521:database')
//define the statement to run
def sizeStatement = """select table_name, num_rows, avg_row_len,
ROUND((num_rows * avg_row_len / 1048576),2) "mb_used"
from user_tables
where num_rows > 0"""
//create a date to output (not needed for SQL, just for reporting purposes
def formattedDate = String.format('%tD %
//output the results
sql.eachRow(sizeStatement) { row ->
println "${formattedDate},${row.table_name},${row.mb_used}"
}
groovy -classpath OracleThinDrivers.jar CheckSize.groovyRead more...
I recently needed to get an estimated size of an Oracle database. It turns out to be not too hard.
--by tableRead more...
select table_name, num_rows, avg_row_len,
ROUND((num_rows * avg_row_len / 1048576),2) "MB Used"
from user_tables
where num_rows > 0
--total
select SUM(ROUND((num_rows * avg_row_len / 1048576),2)) "Total MB Used"
from user_tables
I am a software developer working on the server-side (groovy/grails) of a cool platform that will change the world! Email me: geekmattblog@gmail.com |
© Blogger template Webnolia by Ourblogtemplates.com 2009
Back to TOP