gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=PDFnopass.pdf -c .setpdfwrite -f PDFwithPASSWORD.pdf
Tuesday, December 24, 2013
removing the password from PDF files.
PDF files with passwords really do not make much sense. You can remove the PDF password easily, and for free. You just need ghostscript installed.
Sunday, October 27, 2013
Cross platform Makefile
I needed to change my Makefile to output different target information based on the Operating System. This turned out more difficult than I thought since Windows doesn't have uname. I asked some friends, and the gave me some code snippets. To start with find the OSCLASS and OSNAME.
In Windows, you get: type info\chunk2.txt >> installer\test.inf
ifeq ($(OS),Windows_NT) OSCLASS = windows OSNAME=windows else OSCLASS = unix UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) OSNAME = linux endif ifeq ($(UNAME_S),Darwin) OSNAME = osx endif endifYou can then do switches based upon the compiling OS. The biggest one was that I needed to output to a file. The problem with files that would write to both windows and unix is that the shell commands are different, so I need to address the differences in commands.
ifeq ($(OSCLASS),unix) FIXDIR = $1 COMMANDCAT = cat else FIXDIR = $(subst /,\,$1) COMMANDCAT = type endifWindows uses "type", whereas unix uses "cat". I then also fix the \ issue to go from the the unix / to the windows \ with the FIXDIR command. When I type "make test", the following will output the contents of info/chunk2.txt and append it to installer/test.inf.
test: $(COMMANDCAT) $(call FIXDIR,info/chunk2.txt >> installer/test.inf)In unix, you will get: cat info/chunk2.txt >> installer/test.inf
In Windows, you get: type info\chunk2.txt >> installer\test.inf
Thursday, October 17, 2013
Tuesday, October 15, 2013
Referencing datasheets in BIBTEX.
The CD4007 inverter pair is referenced as far back as papers from the early 1970's. It's a great IC for teaching, but I really had to think of how to reference it using bibtex. I decided to go with the MISC tag.
UPDATE:
Of course, once I decide on a method, I come up with a better method. Include:
@misc{CD4007, author={Texas Instruments}, title={CD4007UB}, url={http://www.ti.com/lit/ds/symlink/cd4007ub.pdf}, note={original document from Harris Semiconductor}, publisher={Texas Instruments}, year={2012} }
UPDATE:
Of course, once I decide on a method, I come up with a better method. Include:
\usepackage{url}in your TEX document, and then you can have a prettier entry.
@misc{CD4007, author={Texas Instruments}, title={CD4007UB}, howpublished = "\url{http://www.ti.com/lit/ds/symlink/cd4007ub.pdf}", note={original document from Harris Semiconductor}, publisher={Texas Instruments}, year={2012} }
Saturday, September 21, 2013
I lost my router...
I lost my router in the digital ether, so I pinged until I found my router. I used nmap to ping all addresses on my subnet.
nmap -v -sP 192.168.1.*
Sunday, July 21, 2013
Tuesday, July 16, 2013
Justice vs. idiots.
Idiot is a harsh word, but it's not difficult to not relate to someone and to feel superior to them. Here's an excerpt from http://observer.com/2013/07/fuming-protesters-shut-down-times-square-after-trayvon-martin-verdict/
I do not really care of the outcome of the trial of Zimmerman, but I am not one to second guess the jury. The quality of the observer article is really terrible, and it makes Ms. McClean look to be an idiot. If I were to get my information from the observer, I would probably not understand the facts, and I am sure that I would not agree with any position backed by Ms. McClean. Ms. McClean, the press made you look like an idiot, and I would keep that in mind when making decisions about others. Also, could someone please send Orla Ryan back to English class.
Kerry McLean, 32, one of thousands who attended, said the protest was “empowering and cathartic.” Ms. McLean maintained that prosecutors had handled the trial badly. “I’m an attorney and it seemed like a circus to me,” she said. “It’s a travesty of justice. I’m really terrified of the message it has sent to the country and the world … The message that black people’s lives have no value in America.”Here is my line-by-line breakdown of what is wrong with this complete quote.
Kerry McLean, 32, one of thousands who attended, said the protest was “empowering and cathartic.”
I will start with “empowering and cathartic”. A cathartic is a substance that accelerates defecation. catharsis would be to blow off steam, but considering the origin, I still think it would be misused in this case.Ms. McLean maintained that prosecutors had handled the trial badly.
The handled the trial poorly, not badly. Also, one guesses in what way. Specifics would have helped the statement.“I’m an attorney and it seemed like a circus to me,” she said.
I have found that most attorney's respect the system even if they disagree with it. I was also unable to find her bar number in the state of New York. I was curious which type of attorney she claimed to be.
“It’s a travesty of justice. I’m really terrified of the message it has sent to the country and the world … The message that black people’s lives have no value in America.”
I am not clear how a trial is a travesty of justice. The message that it sent to world was that a trial happened, which is unlike many other places. I tried to find a racial breakdown of acquittals based upon race of the jury, but I could not. I am not convinced that in modern America, race has much to do with acquittals. Considering that 1/2 of the jury was picked by the prosecution, I am sure the prosecution thought they had the best chance of conviction with their jury choices. If one thinks that the jury was imbalanced, where were the hispanic men?I do not really care of the outcome of the trial of Zimmerman, but I am not one to second guess the jury. The quality of the observer article is really terrible, and it makes Ms. McClean look to be an idiot. If I were to get my information from the observer, I would probably not understand the facts, and I am sure that I would not agree with any position backed by Ms. McClean. Ms. McClean, the press made you look like an idiot, and I would keep that in mind when making decisions about others. Also, could someone please send Orla Ryan back to English class.
Saturday, July 13, 2013
Ubuntuのpopularity-contestはなんじゃそれ!
私はunixが好きけど、linuxがあまり。rootのメールにpopularity-contestからじゃまのことがいっぱいあった。
これすると:
sudo dpkg-reconfigure popularity-contest
メールが止まる。
Tuesday, July 9, 2013
wget with a certificate error (https://dl.dropboxusercontent.com)
I like to use wget when I get links in chat. I was getting a certificate error from dl.dropboxusercontent.com, which might just be from an old version of wget. The issue is solved with the --no-check-certificate flag.
wget --no-check-certificate https://dl.dropboxusercontent.com/u/XXXXXX
Wednesday, June 19, 2013
dumping postgres database via backup script
I came across an issue when trying to backup a database via pg_dump. The issue was that I needed to type the password. mysql will let me dump the database with the password on the command line, but postgresql does not and requires a prompt or a variable. You can use PGPASSWORD or .pgpass and I used the environmental variable.
In my BASH script, backup.sh, I have:
In my BASH script, backup.sh, I have:
TIMEATSTART=$(date +%Y-%m-%d-%s) DIRECTORY_ARC=$USER_HOME/archive FILENAME_DBBACKUP=db-$TIMEATSTART.gz export PGPASSWORD=dbpassword pg_dump -U dbuser database_name | gzip -c > $DIRECTORY_ARC/$FILENAME_DBBACKUPThe script makes a convenient backup of my database_name database to an archive/db-00000000000.gz file in my home directory.
Friday, June 14, 2013
Isn't public debt the debt of the public?
The art in Detroit cannot be sold because it is owned by the public. Considering that the debt is that of the public, it seems that something is logically wrong. Detroit is a city of "people", and those "people" voted for, or leveraged the use of money that caused the debt. Regardless of what the lawyers *think* the answer is, the correct answer is that the people owe on the debt.
Tuesday, June 4, 2013
When someone steals your keys, they might steal your car.
Summary: Someone breaks into your house and steals everything, including your keys, and then later steals the car. http://www.cbsatlanta.com/story/22434247/several-cars-damaged-before-chase-ends
sui: hello.
r: yo
sui: I'm meeting B. Wednesday for Frisbee!
r: oh nice
sui: totally miss playing frisbee with you
r: we should have done that more
sui: how are things?
r: things are alright did a pretty crazy camping trip over last weekend
got my truck stolen monday night
good stuff
sui:stolen?
r: heh yah
sui: you need to get out of ATL. it's a sign.
r: well when we got robbed they stole spare keys to my truck and D's bmw
sui: from your apartment?
r: we'd been being careful
parking our cars elsewhere
until we got them rekeyed
but my truck ended up at the apartment for like 4 hours one night
and it got jacked
sui: :/
r: they caught the guy though
sui: oh? that's good.
r: tried to pull him over bc he didn't have his lights on at 230am, he fled ended up hitting a residential speedbump, tubling over and totalling 5 parked cars on the side of the street, landed on the roof of a house got out and started running
i've got insurance to cover it
sui: ha, well, I think at least the insurance company will believe you
r: talked to insurance lady, and she was like, oh yah, i saw you on the news
http://www.cbsatlanta.com/story/22434247/several-cars-damaged-before-chase-ends
that video isn't worth watchign really
but the text is accurate
oh, so get this, atlanta police are not allowed to pursue
so if they try to pull you over
and you floor it
they're supposed to disengage
so running from the police is a totally viable option in atlanta
sui: wow
r: so this officer tried to pull guy over, he fled, officer stopped pursuit (i actually talked to the guy) and the fleeing guy got into an accident like a mile down the road
sui: wow, that guy seems to be a professional loser
r: yah...
we looked up his jail record
was never in jail for more than a month
wonder if we have like a 15 strikes and you're out policy in atl
sui: still a month is enough to make sure you don't have a real job
r: well
true
but not enough penalty on this shit
probably robs 10 places before getting caught
make a few thousands dollars, spend a month in jail
worth it
sui: Is the car being removed in the video yours?
r: dunno, that video keeps changing
i was in it for a while
but i was boring, tired, and annoyed they were interviewing me
so they took me off
all vehicles were towed at night
mine is kinda triangle shaped
sui: You need to work on your inherent sense of showman ship I guess. Still, what a few weeks for you
sui: hello.
r: yo
sui: I'm meeting B. Wednesday for Frisbee!
r: oh nice
sui: totally miss playing frisbee with you
r: we should have done that more
sui: how are things?
r: things are alright did a pretty crazy camping trip over last weekend
got my truck stolen monday night
good stuff
sui:stolen?
r: heh yah
sui: you need to get out of ATL. it's a sign.
r: well when we got robbed they stole spare keys to my truck and D's bmw
sui: from your apartment?
r: we'd been being careful
parking our cars elsewhere
until we got them rekeyed
but my truck ended up at the apartment for like 4 hours one night
and it got jacked
sui: :/
r: they caught the guy though
sui: oh? that's good.
r: tried to pull him over bc he didn't have his lights on at 230am, he fled ended up hitting a residential speedbump, tubling over and totalling 5 parked cars on the side of the street, landed on the roof of a house got out and started running
i've got insurance to cover it
sui: ha, well, I think at least the insurance company will believe you
r: talked to insurance lady, and she was like, oh yah, i saw you on the news
http://www.cbsatlanta.com/story/22434247/several-cars-damaged-before-chase-ends
that video isn't worth watchign really
but the text is accurate
oh, so get this, atlanta police are not allowed to pursue
so if they try to pull you over
and you floor it
they're supposed to disengage
so running from the police is a totally viable option in atlanta
sui: wow
r: so this officer tried to pull guy over, he fled, officer stopped pursuit (i actually talked to the guy) and the fleeing guy got into an accident like a mile down the road
sui: wow, that guy seems to be a professional loser
r: yah...
we looked up his jail record
was never in jail for more than a month
wonder if we have like a 15 strikes and you're out policy in atl
sui: still a month is enough to make sure you don't have a real job
r: well
true
but not enough penalty on this shit
probably robs 10 places before getting caught
make a few thousands dollars, spend a month in jail
worth it
sui: Is the car being removed in the video yours?
r: dunno, that video keeps changing
i was in it for a while
but i was boring, tired, and annoyed they were interviewing me
so they took me off
all vehicles were towed at night
mine is kinda triangle shaped
sui: You need to work on your inherent sense of showman ship I guess. Still, what a few weeks for you
Saturday, June 1, 2013
Install SLIM for PHP in a single stroke...
I use SLIM for my web service for a personal project that I have been working on. It works great, but I forget the steps to install it because I revisit this project every 3 months or so. The BASH script below downloads the slim framework, writes the initial index.php file and sets up the .htaccess file. I run this from the root of my website directory.
#!/bin/sh
#
#This installs the SLIM framework in a single command.
WEBSERVICE_ROOT=api
WEBSERVICE_FILE=index.php
echo "installing SLIM framework and dependencies in ./$WEBSERVICE_ROOT"
if [ -d $WEBSERVICE_ROOT ]
then
echo "api exists... slipping creation"
else
mkdir $WEBSERVICE_ROOT
fi
echo "{\"require\": {\"slim/slim\": \"2.*\"}}" > $WEBSERVICE_ROOT/composer.json
cd $WEBSERVICE_ROOT > /dev/null ;
curl -s https://getcomposer.org/installer | php -d detect_unicode=Off
php composer.phar install
echo "RewriteEngine On\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule ^ $WEBSERVICE_FILE [QSA,L]" > .htaccess
if [ -f $WEBSERVICE_FILE ]
then
echo "$WEBSERVICE_FILE exists\n"
else
echo "<?php\nrequire 'vendor/autoload.php';\n" >> $WEBSERVICE_FILE
echo "\$app = new \Slim\Slim();\n" >> $WEBSERVICE_FILE
echo "\$app->get('/hello/:name', function (\$name) {\n" >> $WEBSERVICE_FILE
echo "echo \"Hello, \$name\";\n" >> $WEBSERVICE_FILE
echo "});\n" >> $WEBSERVICE_FILE
echo "\$app->run();?>\n" >> $WEBSERVICE_FILE
fi
echo "it should have worked, try http://127.0.0.1/api/hello/test and you should see \"Hello, test\""
Friday, May 31, 2013
Semper Fidelis
I have been picking up Richard for years, as he hitch-hikes along HI 56. I am on his mailing list, and he sent this:
This past Monday, Memorial Day, I walked to the bus shelter in front of the Kapaa Neighborhood Center to hitch up north to Kilauea. It was after 6 PM, the sun setting fast in the west. An old man was seated at the bus shelter, apparently waiting for the bus. I recognized him as a man I rode with on the bus many months earlier. His name was Gordon, and he served in the US Marine Corps in World War Two.
As I approached the shelter, I asked Gordon if he was waiting for the bus north. He said he was. I broke the news to him the last bus had already left. Being a holiday, Memorial Day, the last northbound bus left Kapaa at 5:07 PM.
I said to him the only thing we can do is to hitch. I was going to Kilauea, and Gordon was going as far as Princeville. I started hitching, and he stood by my side. Us two guys, me 52 and he 80-something, waited one and a half hours for a ride. At least a couple of hundred cars must have passed us. Night fell, and the street lights came on. We were getting tired.
Finally, a pick up truck stopped and the younger man driving asked me where I was headed. By this time Gordon had sat down, and was just out of the light from the street light so the driver could see only me.
I told him I was headed to Kilauea, but that my friend over there was going all the way to Princeville, and there was no way I was going to leave him by himself waiting in the night here in Kapaa. I added that he is a veteran, and this is HIS day, Memorial Day.
The young man said he was not planning on going as far as Princeville, but for a veteran on Memorial Day, he would drive him anywhere he needed to go!
We strapped Gordon in the passenger seat, and I got situated in the back. The driver said he needed to make a brief stop to pick up some tools for his job tomorrow, and we would then continue on our way.
When we stopped in Anahola for the tools, we briefly talked story. I said that Gordon served our country during World War Two in the First Division of the US Marines in the Pacific. I added that my father also served in the US Marines in the Pacific during that war, but in the Third Division.
And the driver? Surprise, surprise, his father was a US Marine, and like my father, served in the Third Division, but in Vietnam many years later.
You see, US Marines have this tradition and duty of never leaving people behind the enemy lines, and apparently, lots of other places too.
We have a lot to be thankful for to all of our service men and women, including the US Marines. Service and duty and honor are not just things for war, but for life.
Those of us who hitch hike from time to time on Kauai have a saying that when you wait a long time for a ride, the one that comes eventually is a REALLY good one. This past Monday did not disappoint.
Richard
Monday, May 20, 2013
myTouch 4g, I hate you, and T-Mobile applications. I will send you all to binary heaven.
Somewhere along the way, the T-Mobile people forgot that a they are a phone company, that or Android forgot they are making it easy to make phones. I HATE the LG myTouch 4G. I have nothing installed but the base software, and it still is laggy. The solution (of course) is always to get the latest phone software. I decided to just remove all of the running software that wasn't important to phone functionality.
I created a step-by-step guide, but then I found an easier way. I had to find a windows machine though:
http://forum.xda-developers.com/showthread.php?t=803682 has a link to something called Super One Click. It rooted my LG phone in a single click. I then downloaded an application uninstaller. (Of couse, check what you are removing before you do it.)
I then removed things that I didn't want such as:
Tetris (default install, cannot remove... super)
Twitter
Facebook
T-mobile store
The TOS can go to binary hell with my crapware.
I created a step-by-step guide, but then I found an easier way. I had to find a windows machine though:
http://forum.xda-developers.com/showthread.php?t=803682 has a link to something called Super One Click. It rooted my LG phone in a single click. I then downloaded an application uninstaller. (Of couse, check what you are removing before you do it.)
I then removed things that I didn't want such as:
Tetris (default install, cannot remove... super)
T-mobile store
The TOS can go to binary hell with my crapware.
Monday, May 13, 2013
At least the NSF likes metric
The Metric Conversion Act of 1975, as amended, and Executive Order 12770 of 1991 encourage Federal agencies to use the Metric System (SI) in procurement, grants and other business related activities. Proposers are encouraged to use the Metric System of weights and measures in proposals submitted to the Foundation. Grantees also are encouraged to use metric units in reports, publications and correspondence relating to proposals and awards.I am still waiting for road signs...
Saturday, May 11, 2013
This happened today:
http://www.freep.com/article/20130510/BUSINESS/305100093/McDonald-s-labor-protest-Detroit-wages
I respect the right of people to organize to improve their condition. Quotes like:
McDonald's makes about $2 billion a quarter.
I question the value of minimum wage, rent control, or anything that gives an artificial value. I'm pretty sure that if NYC dumped rent control and minimum wage, everyone would make more money. I'll pay an extra $2 bucks for a papaya dog.
http://www.freep.com/article/20130510/BUSINESS/305100093/McDonald-s-labor-protest-Detroit-wages
I respect the right of people to organize to improve their condition. Quotes like:
“They [McDonald’s] make $200 billion a year and they’re crying about giving minimum-wage workers $15 an hour?,” Rideout said in an interview.make me wonder why reporters pick the quotes of ignorance.
McDonald's makes about $2 billion a quarter.
I question the value of minimum wage, rent control, or anything that gives an artificial value. I'm pretty sure that if NYC dumped rent control and minimum wage, everyone would make more money. I'll pay an extra $2 bucks for a papaya dog.
Wednesday, May 8, 2013
With our general as our God...
I just recently finished two documentaries on negative utopias, Detroit (Detropia) and North Korea (Kimjongilia).
Negative utopia's both seem to have "Dear Leader" prominently displayed.
Wednesday, April 17, 2013
Wednesday, April 10, 2013
Journalism and typos
boston.com couldn't make it 3 words without a grammatical error.
Does size matter?
I'm loathe and so can you!
Cranial size?
Does size matter?
I'm loathe and so can you!
Cranial size?
Wednesday, March 20, 2013
Evolution vs. Selection
Swallows have evolved? http://www.newscientist.com/article/dn23288-birds-evolve-shorter-wings-to-survive-on-roads.html More likely, there has been selection via automobile. There is a distinction between evolution and selection, which seems to be lost of media. Selection drives evolution, but evolution is on a long time scale.
Shorter wings work better in dodging cars; therefore, birds with shorter wings reproduce more, and propagate the genes for shorter wings. QED
The unanswered question to me is the energy cost of shorter wings per weight. Perhaps there are more bugs?
Shorter wings work better in dodging cars; therefore, birds with shorter wings reproduce more, and propagate the genes for shorter wings. QED
The unanswered question to me is the energy cost of shorter wings per weight. Perhaps there are more bugs?
Monday, March 18, 2013
シンダさんは「人が死ぬ」と言う。
ha:
http://www.hindustantimes.com/India-news/Hyderabad/Hyderabad-blasts-12-dead-78-injured-Shinde-says-toll-may-rise-PM-vows-punishment/Article1-1015253.aspx
Shinde thinks more might "shinde".
Things like this are only amusing momentarily for the multilingual.
http://www.hindustantimes.com/India-news/Hyderabad/Hyderabad-blasts-12-dead-78-injured-Shinde-says-toll-may-rise-PM-vows-punishment/Article1-1015253.aspx
Shinde thinks more might "shinde".
Things like this are only amusing momentarily for the multilingual.
Thursday, March 14, 2013
かえるのうた, frog song
おもったよりちがう。
So, my Japanese film for the day ended up being soft porn.
Frog Song has a few interesting things going for it, but not really enough to be redeeming. 20 seconds of two girls fighting it out with baguettes is about it.
So, my Japanese film for the day ended up being soft porn.
Frog Song has a few interesting things going for it, but not really enough to be redeeming. 20 seconds of two girls fighting it out with baguettes is about it.
Sunday, March 10, 2013
Tuesday, February 26, 2013
GE Oil and Gas has the best PR department.
What if I said that in Jan 2013 that there was a fluid leak from an oil well into the Gulf of Mexico? It is mentioned here, but it was much worse than advertised. There are some flawed bolts... and they are on everything.
All this, of course, knowing that the BP trial is upcoming. GE's PR department needs a raise.
All this, of course, knowing that the BP trial is upcoming. GE's PR department needs a raise.
Human's a batteries.
I find it interesting that you get things advertised as "revolutionary" when you need a good press release. In this case, FUJIFILM's Peltier film. Documented since 1834, and done with ceramic grids. I have seen a few human-powered MCUs that used this effect. I see the FUJIFILM technology as a progression.
Saturday, February 16, 2013
3 to 8 decoders, why are there 3 enable pins?
I still use that 7400 series. The 74138 , 54SN138, and every IC that has *138 in it is a 3-8 decoder that has 3 selection, 8 output, 2 power and 3 control pins. I do not understand is why there are 3 control pins. One is active low, and the others are active high. Why can I not get a 3-8 decoder that has one control line and is in a 14-pin package? Someone made a decision back in 1970, and I just want to know what it was that required 3 control pins. :/
Friday, February 15, 2013
usleep(1000) does not sleep.
I just discovered that usleep(1000) is not equal to msleep(1) on Mac OS. If you do a usleep(1000), it returns immediately without sleeping!
Saturday, February 9, 2013
Geolocation and finding a radius on a sphere.
A discussion came up today of why some location calculations where always off by 40% for geolocation.
Basically, we were converting it incorrectly; however, more interestingly is a page about geolocation and SQL. Things that developers often take for granted is the problem of database-side sorting.
Outside of Geolocation, "infinite scrolling" on web pages just makes me wonder how the SQL is handled. What if a record gets inserted between the scroll calls? How does one keep track. If you search online, there are many resources of how to scroll infinitely using jQuery and browser-side calls, but I'm sure there's one genius that has designed how the database handles the actual creation of the data.
Basically, we were converting it incorrectly; however, more interestingly is a page about geolocation and SQL. Things that developers often take for granted is the problem of database-side sorting.
Outside of Geolocation, "infinite scrolling" on web pages just makes me wonder how the SQL is handled. What if a record gets inserted between the scroll calls? How does one keep track. If you search online, there are many resources of how to scroll infinitely using jQuery and browser-side calls, but I'm sure there's one genius that has designed how the database handles the actual creation of the data.
Friday, February 8, 2013
The missing Javascript prototypes.
Javascript is missing some prototypes, and so is jQuery.
The following relate to strings, and are heavily inspired by Java methods. This is what I use to trim strings and clean strings of HTML entities.
The following relate to strings, and are heavily inspired by Java methods. This is what I use to trim strings and clean strings of HTML entities.
String.prototype.othertrim = function() { return this.replace(/^\s+|\s+$/g, ""); }; String.prototype.endsWith = function(suffix) { return this.indexOf(suffix, this.length - suffix.length) !== -1; }; String.prototype.fulltrim=function(){ return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,'').replace(/\s+/g,' '); }; String.prototype.replaceHtmlEntites = function() { var s = this; var translate_re = /&(nbsp|amp|quot|lt|gt);/g; var translate={"nbsp":" ","amp":"&","quot":"\"","lt":"<","gt":">"}; return(s.replace(translate_re, function(match, entity) { return(translate[entity]); }) ); };These are for jQuery. The first is a POST method that is similar to $.getJSON. The other tells you if a tag exists. You can then do a $('#tagcheck').exists(); and it will return 0 if the tag is not present.
$.postJSON = function (url, data, callback) { $.post(url, data, callback, "json"); }; jQuery.fn.exists = function(){return this.length>0;}
Thursday, February 7, 2013
MacOS 10.8 is terrible
Well, so much for improvements in software. This chat log pretty much sums up the state of MacOS these days.
Robert: and i'm having a problem me: okay what's not in the path? git? do a "where git" Robert: when i try to download get git - it says it cant open it bcause it is from an unidentified developer note this is on my mac me: ah? I disabled that at some point. Robert: how do i disable that me: Security & Privacy in preference Robert: that did it i just did the right click open thing so much for not needing right click in mac the only thing OS X 10.8 has going for it is that Windows ME and Vista were produced. without those attrocities i would list it as worst OS upgrade ever.
Monday, February 4, 2013
Language unite disparate groups.
Language unites people.
This is why the Japanese forced the Tokyo dialect on everyone.
This is why the communist Chinese forced Mandarin on everyone. (even if Mandarin is not Han)
The American's force nothing upon anyone linguistically. I speak English, and I am fine in the USA as long as the person who wants to interact with me speaks English. I have found that I do not like black English, because it is expected that I understand it. I do not understand it, so I did some research into it. Formally, called African American Vernacular English, I strongly question the value of the study or use of this type of speech as a language unless it is also spoken concurrently with proper English. "Proper", of couse, is relative; however, my interactions with AAVE have been based around harassing the listener, and I do not feel that I need to accommodate those who chose to force something upon me. I would much rather try to hash it out with someone in Spanish.
This is why the Japanese forced the Tokyo dialect on everyone.
This is why the communist Chinese forced Mandarin on everyone. (even if Mandarin is not Han)
The American's force nothing upon anyone linguistically. I speak English, and I am fine in the USA as long as the person who wants to interact with me speaks English. I have found that I do not like black English, because it is expected that I understand it. I do not understand it, so I did some research into it. Formally, called African American Vernacular English, I strongly question the value of the study or use of this type of speech as a language unless it is also spoken concurrently with proper English. "Proper", of couse, is relative; however, my interactions with AAVE have been based around harassing the listener, and I do not feel that I need to accommodate those who chose to force something upon me. I would much rather try to hash it out with someone in Spanish.
Saturday, February 2, 2013
Space Shuttles
I very much like space, and the idea of space travel. All-in-all, the Americans have done very well. I have tried to watch all of the space launches and re-entries.
On the 10th anniversary of the Columbia breaking up, I remember watching it. I will never forget that night in 片町 because I convinced the bar master to turn the TV to the NASA feed instead of football, and then the whole bar watched it burn up. This was terrible, but substantially better than the only time that I got to see a launch live, ST-51-L.
The list of heros who risk it all and lose gets longer, but I want to thank:
"Gus" Grissom
Edward H. White
Roger B. Chaffee
Greg Jarvis
Christa McAuliffe
Ronald McNair
Ellison Onizuka
Judith Resnik
Michael J. Smith
Dick Scobee
Rick D. Husband
William C. McCool
Michael P. Anderson
Kalpana Chawla
David M. Brown
Laurel Clark
Ilan Ramon
...and all those who wish to touch the stars.
On the 10th anniversary of the Columbia breaking up, I remember watching it. I will never forget that night in 片町 because I convinced the bar master to turn the TV to the NASA feed instead of football, and then the whole bar watched it burn up. This was terrible, but substantially better than the only time that I got to see a launch live, ST-51-L.
The list of heros who risk it all and lose gets longer, but I want to thank:
"Gus" Grissom
Edward H. White
Roger B. Chaffee
Greg Jarvis
Christa McAuliffe
Ronald McNair
Ellison Onizuka
Judith Resnik
Michael J. Smith
Dick Scobee
Rick D. Husband
William C. McCool
Michael P. Anderson
Kalpana Chawla
David M. Brown
Laurel Clark
Ilan Ramon
...and all those who wish to touch the stars.
Thursday, January 24, 2013
I can make a nuclear bomb.
I can make a nuclear bomb. However, "can" is loosely defined here, because I am knowledgable but not able. I do not have the desire or materials, but they are really simple devices. When countries, such as Iran and North Korea, cannot make them with pooled resources, I wonder what is wrong with them.
Some background:
Special Relativity was published in 1905.
General Relativity was published in 1916.
Now, let's put ourselves in 1945 with a slide rule. We have two types of bombs that we can make: uranium (such as Little Boy), or Plutonium (such as Fat Man). If I had to pick one, I would pick a the "gun based" Little Boy. This takes a lot of Uranium, and is inefficient, but it's pretty much fool proof. If you look at the mathematics for this weapon, it's obvious why you'd make it this way. You can pretty much guarantee that it will work, you wouldn't even need to test it. Now it comes down to what you need to do it, which is either whole bunch of centrifuges or a lot of time.
Using ore that is readily available (the earth is a fissile system, there's tons of Uranium about), and a single centrifuge (I designed one on the back of the piece of paper, it might work) at the cost of about ¥20,000,000, I would take me about 300 years to get enough U-235, so the limiting factor is the number of centrifuges and the cost of power.
So in summary, anyone can make a bomb easily. I definitely believe that nuclear power is a more noble cause because it is free. You take a hot rock, remove energy and put it back in the ground where you got it. If you think that nuclear power is a terrible idea, well, frankly, you are an idiot. Here's radioactive coal ash for the layman. --Dr. Suigin, Ph.D. (no, I'm not kidding)
Some background:
Special Relativity was published in 1905.
General Relativity was published in 1916.
Now, let's put ourselves in 1945 with a slide rule. We have two types of bombs that we can make: uranium (such as Little Boy), or Plutonium (such as Fat Man). If I had to pick one, I would pick a the "gun based" Little Boy. This takes a lot of Uranium, and is inefficient, but it's pretty much fool proof. If you look at the mathematics for this weapon, it's obvious why you'd make it this way. You can pretty much guarantee that it will work, you wouldn't even need to test it. Now it comes down to what you need to do it, which is either whole bunch of centrifuges or a lot of time.
Using ore that is readily available (the earth is a fissile system, there's tons of Uranium about), and a single centrifuge (I designed one on the back of the piece of paper, it might work) at the cost of about ¥20,000,000, I would take me about 300 years to get enough U-235, so the limiting factor is the number of centrifuges and the cost of power.
So in summary, anyone can make a bomb easily. I definitely believe that nuclear power is a more noble cause because it is free. You take a hot rock, remove energy and put it back in the ground where you got it. If you think that nuclear power is a terrible idea, well, frankly, you are an idiot. Here's radioactive coal ash for the layman. --Dr. Suigin, Ph.D. (no, I'm not kidding)
Wednesday, January 23, 2013
The Ramen Girl
Last night, I saw The Ramen Girl, which is must say was very good. I tend to like movies with Japanese language in them because I get both sides of the story, which lends to a bit of a paradox. In English, it really is a terrible movie. I would give it 2 of 5 stars in English; however, I would give it 5 of 5 if you understand both Japanese and English. There is basically no way for someone without Japanese language to understand the nuances of the movie. The Japanese script is wonderful, and the interactions of the Japanese are lost in the English translation. I thoroughly enjoyed the movie, but most would not.
Sunday, January 13, 2013
Jerry Springer is class!
Well, Jerry Springer is not *exactly* class; however, this is pretty humbling:
"I am the father of the destruction of Western civilization" -- Jerry Springer
That quote is from a video that is here.
Jerry was the Mayor of Cincinnati but then had to leave politics when it was found that he paid for a prostitute with a cheque. The best part is that he admitted it. I have never heard of a politician admitting anything. I think that is pretty interesting.
"I am the father of the destruction of Western civilization" -- Jerry Springer
That quote is from a video that is here.
Jerry was the Mayor of Cincinnati but then had to leave politics when it was found that he paid for a prostitute with a cheque. The best part is that he admitted it. I have never heard of a politician admitting anything. I think that is pretty interesting.
Subscribe to:
Posts (Atom)