zipcode
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 5
mysqlrowcopy 1.0
mysqlrowcopy is a tool that generates insert statements from result sets. more>>
mysqlrowcopy is a tool that generates insert statements from result sets. It produces output similar to what might result from running mysqldump on a single SELECT query.
This project helps eliminate some of the tedium of moving data between QA and production MySQL databases.
Build:
To build mysqlrowcopy, you should run:
./configure
make
A mysqlrowcopy and mysqlrowcopy.debug file are created. They have identical functionality, the .debug version simply has debugging symbols built in (for gdb).
Since mysqlrowcopy is probably going to be I/O bound with modest CPU and RAM usage, the only reason to even build a 64-bit version is to work around potential issues in dynamic linking 32-bit binaries against 64-bit libraries.
RECIPES
1. Migrating a MySQL user account reaper from QA server to a production server.
e.g. MySQL database server qa3.example.com to prod1.example.com:
$ mysqlrowcopy -h qa3.example.com
SELECT * FROM db WHERE User = "reaper" mysql db > reaper.sql
$ mysql -h prod1.example.com mysql < reaper.sql
You could of course simply pipe the output of mysqlrowcopy into mysql and skip the intermediate file.
(Dont forget to RELOAD PRIVILEGES afterwards)
2. Keep your test environment up to date. Populate it with production data every 24 hours. You could run this sequence from cron once a day:
$ mysqlrowcopy -h finance-db.example.com
SELECT * FROM stocks WHERE modified > DATE_SUB(NOW(),INTERVAL 24 HOUR)
finance stocks > day-stocks.sql
$ cat day-stocks.sql | mysql -h finance-test.example.com finance
3. Copy data between tables on different servers that have some similar fields.
Youve got common data in table Zip on a production database:
mysql> desc Zip;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | PRI | | |
| ZIPCodeType | char(1) | YES | | NULL | |
| City | varchar(32) | YES | | NULL | |
| CityType | char(1) | YES | | NULL | |
| State | varchar(32) | YES | | NULL | |
| StateCode | char(3) | YES | | NULL | |
| AreaCode | char(3) | YES | | NULL | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
And youve got table ZipPosition in a research database:
mysql> desc ZipPosition;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | | | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
You want to load data from production Zip into research ZipPosition.
$ mysqlrowcopy -h production SELECT ZIPCode,Latitude,Longitude common ZipPosition > pos.sql
$ cat pos.sql | mysql -h qa research
Note how we specify ZipPosition on the first line to tell mysqlrowcopy what the destination table is going to be.
<<lessThis project helps eliminate some of the tedium of moving data between QA and production MySQL databases.
Build:
To build mysqlrowcopy, you should run:
./configure
make
A mysqlrowcopy and mysqlrowcopy.debug file are created. They have identical functionality, the .debug version simply has debugging symbols built in (for gdb).
Since mysqlrowcopy is probably going to be I/O bound with modest CPU and RAM usage, the only reason to even build a 64-bit version is to work around potential issues in dynamic linking 32-bit binaries against 64-bit libraries.
RECIPES
1. Migrating a MySQL user account reaper from QA server to a production server.
e.g. MySQL database server qa3.example.com to prod1.example.com:
$ mysqlrowcopy -h qa3.example.com
SELECT * FROM db WHERE User = "reaper" mysql db > reaper.sql
$ mysql -h prod1.example.com mysql < reaper.sql
You could of course simply pipe the output of mysqlrowcopy into mysql and skip the intermediate file.
(Dont forget to RELOAD PRIVILEGES afterwards)
2. Keep your test environment up to date. Populate it with production data every 24 hours. You could run this sequence from cron once a day:
$ mysqlrowcopy -h finance-db.example.com
SELECT * FROM stocks WHERE modified > DATE_SUB(NOW(),INTERVAL 24 HOUR)
finance stocks > day-stocks.sql
$ cat day-stocks.sql | mysql -h finance-test.example.com finance
3. Copy data between tables on different servers that have some similar fields.
Youve got common data in table Zip on a production database:
mysql> desc Zip;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | PRI | | |
| ZIPCodeType | char(1) | YES | | NULL | |
| City | varchar(32) | YES | | NULL | |
| CityType | char(1) | YES | | NULL | |
| State | varchar(32) | YES | | NULL | |
| StateCode | char(3) | YES | | NULL | |
| AreaCode | char(3) | YES | | NULL | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
And youve got table ZipPosition in a research database:
mysql> desc ZipPosition;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | | | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
You want to load data from production Zip into research ZipPosition.
$ mysqlrowcopy -h production SELECT ZIPCode,Latitude,Longitude common ZipPosition > pos.sql
$ cat pos.sql | mysql -h qa research
Note how we specify ZipPosition on the first line to tell mysqlrowcopy what the destination table is going to be.
Download (0.021MB)
Added: 2007-03-01 License: GPL (GNU General Public License) Price:
967 downloads
PostScript::MailLabels 2.25
PostScript::MailLabels builds printer calibration pages, and will generate PostScript code for putting addresses on mailing. more>>
PostScript::MailLabels are modules for creating PostScript files of mailing address labels.
Flexible enough to tackle other printing tasks, basically anything requiring a set fields be printed on a regular grid. Also creates PostScript(tm) code for calibrating and testing mailing label printing.
The module has three distinct output modes. In my experience, printing mailing labels is a matter of tweaking parameters to get them all to fit properly on the page. This module is designed with this in mind.
The first output is the calibration sheet. This is a pair of annotated axes, either in inches or centimeters, centered on the page and covering the whole page in X and Y directions. The intent is for you to output this page first, and simply read off the relevant page dimensions directly.
The second output is the label test. This output is a series of boxes drawn on the page, meant to outline the edges of all the mailing labels. Take this sheet and line it up with a sheet of labels to see if they actually match perfectly. If not, tweak the parameters until they do. Note that sometimes you will get a message at the bottom of the sheet saying ``Bottom gap too large, last row cannot be printed.
This means that the printable area of your printer is too small to utilize the last row of labels. I have this problem. But I handle it for you. Note also the arrows on the test sheet. As you hold the test sheet over a sheet of labels, hold it up to the light and slide the test sheet so that the boxes match the edges of the labels. If you slide in the arrow direction, that is a positive adjustment.
The other direction is negative. If the edges of some boxes come out dashed, that means that the non-printing border cuts off the end of the label, so I will adjust the printing area appropriately. Dont try to line up the dashed lines with label edges - it wont work. Just line up the solid lines.
The third output is the labels themselves. By default, I have set up a US-centric address definition :
firstname, lastname, street address, city, state, zipcode
But with version 2.0, you can now create your own definition. You can define new fields, and you can define how those fields land on a label. You can also control the fonts on a per-field basis. Not the size, yet - later pilgrim.
Parameters you can set :
Paper size, orientation, borders on the printable area (many printers will not print right up to the edge of the paper), where the labels live on the page and how big they are, overall x-y shift of page, whether or not to print PostNET barcode, font, fontsize, units (english or metric), which Avery(tm) product code to use, and where the first label starts.
This last needs explanation. If you have a partially used sheet of labels, you might want to use it up. So you count the missing labels, starting at the upper left, and counting across, and then down. For example, if I have 3 columns of labels, label five is the second label in the second row.
If you have an Avery(tm) product that I havent defined, send me the specs and Ill add it.
Also, if there is another brand of labels that you use, send me the relevant data and Ill add that as well. I suspect that there must be some other vendor in Europe, but I dont know who that would be.
When setting up the addresses, I check to see if they will fit on the label. If not, I try to shorten them semi-intelligently until they fit. This part could use quite a bit more work, if done right it probably merits a module all its own.
Briefly, for the name line, I start trimming the ends off the first name, and leave the last name alone.
For the street, I look for things like Road or Avenue and nuke those first, then I trim the street name from the right.
Enhancements:
- Parentheses are now escaped in the generated PostScript code.
<<lessFlexible enough to tackle other printing tasks, basically anything requiring a set fields be printed on a regular grid. Also creates PostScript(tm) code for calibrating and testing mailing label printing.
The module has three distinct output modes. In my experience, printing mailing labels is a matter of tweaking parameters to get them all to fit properly on the page. This module is designed with this in mind.
The first output is the calibration sheet. This is a pair of annotated axes, either in inches or centimeters, centered on the page and covering the whole page in X and Y directions. The intent is for you to output this page first, and simply read off the relevant page dimensions directly.
The second output is the label test. This output is a series of boxes drawn on the page, meant to outline the edges of all the mailing labels. Take this sheet and line it up with a sheet of labels to see if they actually match perfectly. If not, tweak the parameters until they do. Note that sometimes you will get a message at the bottom of the sheet saying ``Bottom gap too large, last row cannot be printed.
This means that the printable area of your printer is too small to utilize the last row of labels. I have this problem. But I handle it for you. Note also the arrows on the test sheet. As you hold the test sheet over a sheet of labels, hold it up to the light and slide the test sheet so that the boxes match the edges of the labels. If you slide in the arrow direction, that is a positive adjustment.
The other direction is negative. If the edges of some boxes come out dashed, that means that the non-printing border cuts off the end of the label, so I will adjust the printing area appropriately. Dont try to line up the dashed lines with label edges - it wont work. Just line up the solid lines.
The third output is the labels themselves. By default, I have set up a US-centric address definition :
firstname, lastname, street address, city, state, zipcode
But with version 2.0, you can now create your own definition. You can define new fields, and you can define how those fields land on a label. You can also control the fonts on a per-field basis. Not the size, yet - later pilgrim.
Parameters you can set :
Paper size, orientation, borders on the printable area (many printers will not print right up to the edge of the paper), where the labels live on the page and how big they are, overall x-y shift of page, whether or not to print PostNET barcode, font, fontsize, units (english or metric), which Avery(tm) product code to use, and where the first label starts.
This last needs explanation. If you have a partially used sheet of labels, you might want to use it up. So you count the missing labels, starting at the upper left, and counting across, and then down. For example, if I have 3 columns of labels, label five is the second label in the second row.
If you have an Avery(tm) product that I havent defined, send me the specs and Ill add it.
Also, if there is another brand of labels that you use, send me the relevant data and Ill add that as well. I suspect that there must be some other vendor in Europe, but I dont know who that would be.
When setting up the addresses, I check to see if they will fit on the label. If not, I try to shorten them semi-intelligently until they fit. This part could use quite a bit more work, if done right it probably merits a module all its own.
Briefly, for the name line, I start trimming the ends off the first name, and leave the last name alone.
For the street, I look for things like Road or Avenue and nuke those first, then I trim the street name from the right.
Enhancements:
- Parentheses are now escaped in the generated PostScript code.
Download (0.041MB)
Added: 2006-07-05 License: Artistic License Price:
1206 downloads
Iterator::BreakOn 0.3
Iterator::BreakOn is a Perl module to create iterators with control flow breaks. more>>
Iterator::BreakOn is a Perl module to create iterators with control flow breaks.
SYNOPSIS
use Iterator::BreakOn;
#
# get a generic data source with a next method implemented whom
# returns a generic object
#
# in this example the order of the items in the data stream is assumed
# to be:
# location, zipcode, name
#
my $datasource = $myschema->resultset(mytable)->search();
my $iter = Iterator::BreakOn->new(
datasource => $datasource,
break_before => [
qw(location)
],
break_after => [
location => &after_location,
zipcode
],
on_last_item => sub { print "Finnished !"; },
);
#
# There are three uses modes:
#
# Fully automatic mode: useless if not defined code for breaks
$iter->run();
# Semi-automatic mode: get only the item (run automatically the other
# events)
while (my $data_item = $iter->next()) {
# do something with data ...
1;
}
# Manual mode: get every event as an object
while (my $event = $iter->next_event()) {
if ($event->name() eq before_location) {
# do something before a new location comes
}
elsif ($event->name() eq after_zipcode)) {
# do something after the last zipcode reached
}
elsif ($event->name() eq next_item ) {
# get the item (including the first and last items)
my $data = $iter->next();
# and do something whit him
}
elsif ($event->name() eq last_item) {
# and do something when the end of data reached
}
} # end while
<<lessSYNOPSIS
use Iterator::BreakOn;
#
# get a generic data source with a next method implemented whom
# returns a generic object
#
# in this example the order of the items in the data stream is assumed
# to be:
# location, zipcode, name
#
my $datasource = $myschema->resultset(mytable)->search();
my $iter = Iterator::BreakOn->new(
datasource => $datasource,
break_before => [
qw(location)
],
break_after => [
location => &after_location,
zipcode
],
on_last_item => sub { print "Finnished !"; },
);
#
# There are three uses modes:
#
# Fully automatic mode: useless if not defined code for breaks
$iter->run();
# Semi-automatic mode: get only the item (run automatically the other
# events)
while (my $data_item = $iter->next()) {
# do something with data ...
1;
}
# Manual mode: get every event as an object
while (my $event = $iter->next_event()) {
if ($event->name() eq before_location) {
# do something before a new location comes
}
elsif ($event->name() eq after_zipcode)) {
# do something after the last zipcode reached
}
elsif ($event->name() eq next_item ) {
# get the item (including the first and last items)
my $data = $iter->next();
# and do something whit him
}
elsif ($event->name() eq last_item) {
# and do something when the end of data reached
}
} # end while
Download (0.013MB)
Added: 2007-05-18 License: Perl Artistic License Price:
889 downloads
libxnm 0.1.1
libxnm project is a library for parsing and retrieving data from the XNM file format. more>>
libxnm project is a library for parsing and retrieving data from the XNM file format.
The prevailing meta-format used today for serialization is XML. XML was originally written as a markup language, and as such its original intent was to add additional information to free flowing text.
This is indeed what is needed in the context of text markup, e.g. for a web page or a word processor program. But using XML for general purpose object serialization generates very verbose serialization that are way larger than necessary.
Another shortcoming of XML is that there still is no support for binary objects. This again is partly based in its markup roots.
Main features:
- Recursively defined.
- Map to the scalar/table/hash structures of perl/python/ruby
- Not limited by preexisting language formats (JSON).
- Short, consise, visually appealing. Low signal to noise.
- No need to quote keys or one word values.
- Support binary data.
- Tables are enclosed by { } , arrays by [ ].
Examples of XNM
The following example shows a simple program configuration file:
fontsize: 16
fonts: { roman: Sans
italic: "Sans Italic"
bold: "Sans bold"
}
path: ["/usr/bin" "/bin" "/usr/local/bin"]
Here is another example copied from the wikipedia json page:
firstName: John
lastName: Smith
address: {
city: "New York, NY"
zipCode: 10021
streetAddress: "21 2nd Street"
}
phoneNumbers: [
"212 732-1234"
"646 123-4567"
]
The main (only) differences to JSON are:
Single words dont need quotes
Commas are not used between key/value pairs
Here is a third example translated from the gaim prefs file:
core => {
away => {
idle_reporting=>system
away_when_idle=>0
mins_before_way=>10
auto_reply=>awayidle
report_idle=>1
}
buddies => {}
contact => {
last_match => 0
offline_score => 2
away_score => 2
idle_score => 1
}
gaim => {
gtk=> {
browsers=> {
place=>F
command=>"xterm -e lynx %s"
browser=>firefox
new_window=>F
}
plugins => [
/usr/lib/gaim/gaimrc.so
/usr/lib/gaim/ssl-nss.so
/usr/lib/gaim/ssl.so
]
}
}
}
Note that the separater character used between keys and values is => combination like in perl.
<<lessThe prevailing meta-format used today for serialization is XML. XML was originally written as a markup language, and as such its original intent was to add additional information to free flowing text.
This is indeed what is needed in the context of text markup, e.g. for a web page or a word processor program. But using XML for general purpose object serialization generates very verbose serialization that are way larger than necessary.
Another shortcoming of XML is that there still is no support for binary objects. This again is partly based in its markup roots.
Main features:
- Recursively defined.
- Map to the scalar/table/hash structures of perl/python/ruby
- Not limited by preexisting language formats (JSON).
- Short, consise, visually appealing. Low signal to noise.
- No need to quote keys or one word values.
- Support binary data.
- Tables are enclosed by { } , arrays by [ ].
Examples of XNM
The following example shows a simple program configuration file:
fontsize: 16
fonts: { roman: Sans
italic: "Sans Italic"
bold: "Sans bold"
}
path: ["/usr/bin" "/bin" "/usr/local/bin"]
Here is another example copied from the wikipedia json page:
firstName: John
lastName: Smith
address: {
city: "New York, NY"
zipCode: 10021
streetAddress: "21 2nd Street"
}
phoneNumbers: [
"212 732-1234"
"646 123-4567"
]
The main (only) differences to JSON are:
Single words dont need quotes
Commas are not used between key/value pairs
Here is a third example translated from the gaim prefs file:
core => {
away => {
idle_reporting=>system
away_when_idle=>0
mins_before_way=>10
auto_reply=>awayidle
report_idle=>1
}
buddies => {}
contact => {
last_match => 0
offline_score => 2
away_score => 2
idle_score => 1
}
gaim => {
gtk=> {
browsers=> {
place=>F
command=>"xterm -e lynx %s"
browser=>firefox
new_window=>F
}
plugins => [
/usr/lib/gaim/gaimrc.so
/usr/lib/gaim/ssl-nss.so
/usr/lib/gaim/ssl.so
]
}
}
}
Note that the separater character used between keys and values is => combination like in perl.
Download (0.37MB)
Added: 2007-01-17 License: LGPL (GNU Lesser General Public License) Price:
1011 downloads
wmWeatherApp 0.0.3
wmWeatherApp is nothing more than a very simplistic weather dock app. more>>
wmWeatherApp is nothing more than a very simplistic weather dock app. There are several quite nice dockapps for this purpose, however they were all far too bloated for my needs therefore I created a very minimalist one.
This application simply grabs the image of the current weather (using your zipcode which you supply as a parameter to wmWeatherApp) and displays it as the background image of the dockapp.
You can left click on the dockapp and have it launch a web browser (which you can configure by setting the environment variable BROWSER) and show you the weather.
Quick usage instructions:
./configure && make && make install
wmWeatherApp -zip 61832 -delay 300
-zip specifies your zipcode
-delay specifies the update interval in seconds. 300 seconds is what I currently use.
The weather image is pulled from www.wunderground.com (which is the most reliable weather provider I have found). License is GPL.
<<lessThis application simply grabs the image of the current weather (using your zipcode which you supply as a parameter to wmWeatherApp) and displays it as the background image of the dockapp.
You can left click on the dockapp and have it launch a web browser (which you can configure by setting the environment variable BROWSER) and show you the weather.
Quick usage instructions:
./configure && make && make install
wmWeatherApp -zip 61832 -delay 300
-zip specifies your zipcode
-delay specifies the update interval in seconds. 300 seconds is what I currently use.
The weather image is pulled from www.wunderground.com (which is the most reliable weather provider I have found). License is GPL.
Download (0.31MB)
Added: 2006-10-26 License: GPL (GNU General Public License) Price:
1094 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 1
- 1
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above zipcode search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed