A really interesting site, using data from the census, on a per zip code basis (I think)
http://www.richblockspoorblocks.com/
Thursday, January 24, 2013
Wednesday, January 23, 2013
Compiling Altera Libraries for Modelsim DE
One thing I do rarely is compile Altera libraries for simulation, and when I have to it involves web searching. Anyway, now it is appearing here so I don't have to think about it anymore
This example compiles the altera_mf.v file into a library. Update the path accordingly, as of this moment I am using quartus 11.1. The main thing is paying attention to where altera_mf.v can be found
vlib altera_mf_ver
vmap altera_mf_ver altera_mf_ver
vlog -work altera_mf_ver C:/altera/11.1/quartus/eda/sim_lib/altera_mf.v
This example compiles the altera_mf.v file into a library. Update the path accordingly, as of this moment I am using quartus 11.1. The main thing is paying attention to where altera_mf.v can be found
vlib altera_mf_ver
vmap altera_mf_ver altera_mf_ver
vlog -work altera_mf_ver C:/altera/11.1/quartus/eda/sim_lib/altera_mf.v
Sunday, January 13, 2013
Juniper VPN, Network Connect, and Linux
I need to use Juniper VPN and Network Connect to remote to my work's network. Network Connect chooses to use 32-bit java, which upsets most 64-bit systems. Don't worry, it won't actually tell you this, it will just crash randomly
The following forum solved most of my issues. Basically you are installing a 32-bit browser with a 32-bit java plugin, after which Network Connect will well, connect
http://ubuntuforums.org/showthread.php?t=2067521
The following forum solved most of my issues. Basically you are installing a 32-bit browser with a 32-bit java plugin, after which Network Connect will well, connect
http://ubuntuforums.org/showthread.php?t=2067521
Thursday, August 30, 2012
Xilinx + Modelsim
I keep forgetting how to compile Xilinx libraries and import them into modelsim...so here goes a list
use compxlib from appropriate Xilinx version, select version of modelsim (in my case 10.0d)
--Will output to Xilinx\Ver##\ISE\verilog\modelsim_10dbli
In Modelsim, right click work, add library
DONE
Simulate and include the appropriate libraries as so...
vsim -L SimPrim_Vers10 -L UniMacro_Ver10 -L UniSim_Ver10 -L XilinxCoreLib_Ver10 work.afe_tb work.glbl
Remembering to include the global file glbl
Tada!
use compxlib from appropriate Xilinx version, select version of modelsim (in my case 10.0d)
--Will output to Xilinx\Ver##\ISE\verilog\modelsim_10dbli
In Modelsim, right click work, add library
DONE
Simulate and include the appropriate libraries as so...
vsim -L SimPrim_Vers10 -L UniMacro_Ver10 -L UniSim_Ver10 -L XilinxCoreLib_Ver10 work.afe_tb work.glbl
Remembering to include the global file glbl
Tada!
Thursday, June 21, 2012
Colleges and Alumni donations
My grad and undergrad alumni associates have decided to call me as often as possible, in attempts to get donations.
I'm always confused by this. The time period in which I give them money in exchange for goods or services has past. This isn't like PBS, which I actively use
Target does not call me up to see if I'm enjoying the Gatorade I purchased from them, and ask me if I would like to pay them more retroactively for it
Particularly undergrad -- you guys didn't bother to give me scholarships, opting for more need based over academic based. Sorry friends, knock on those people's doors
Sunday, June 10, 2012
Birth Control Statistics in GNU Octave
Hello! A fun thought occurred to me while looking over an old statistics textbook -- how effective is our birth control?
For the sake of argument, lets say that condoms, used properly, have a 97% effective rate. A birth control pill, properly used, have a 99% effective rate. Those may sound high, but they aren't really. Lets take a look and assume you are having sex once a week for two years. What is the likelihood that you will have at least one condom break, the pill be ineffective, or both failing simultaneously? Rut Roe!
Since each condom use can be considered an independent test, the probability of failure is 1 - 0.97, or 3% chance of failure. Similarly, the pill would have a 1% chance of failure. The data is as follows:
What does this graph tell us? It is 1- (the chance of getting X amount of condoms in a row that are successful), or the ever increasing chance that your next condom / birth control pill, combination will be faulty. As the blue line shows, over two years, or 104 condom uses, you have a ~95% chance of one of those condoms being defective and failing. With straight birth control and 104 tests, you have a 63% chance that at least one time it did not work. The best though, is the redundant method: The chance that during a two year period that both the condom and the birth control would fail at exactly the same time. This would be the same as modeled as a system in parallel:
(1 - 0.03*0.01) = 99.7% individual chance of success with some kind of protection in parallel system per sexy times. Hooray. The green line shows that over 104 weeks, the chance of double failure is nearly negligible. This is the way to be!
So wait wait wait, a failed condom or birth control pill does not necessarily mean pregnancy occurs. Every menstrual cycle, there are about ~5 days of which sperm in the system could meet an egg. 5 days out of every 28, or ~18% of all days in a year. This reduces the 1 / week for 104 week chance of issue significantly, as the following graph shows:
This graph basically states that, having random sex once / week, over two years, presents a 17% chance of a condom breaking while in ovulation, a 11% chance of the pill not working during ovulation, and basically a 0% chance of the pill and the condom breaking at exactly the same time.
Lesson in all of this? Redundancy in parallel systems is the way to go.
For the sake of argument, lets say that condoms, used properly, have a 97% effective rate. A birth control pill, properly used, have a 99% effective rate. Those may sound high, but they aren't really. Lets take a look and assume you are having sex once a week for two years. What is the likelihood that you will have at least one condom break, the pill be ineffective, or both failing simultaneously? Rut Roe!
Since each condom use can be considered an independent test, the probability of failure is 1 - 0.97, or 3% chance of failure. Similarly, the pill would have a 1% chance of failure. The data is as follows:
![]() |
| Probability of faulty birth control method over time |
(1 - 0.03*0.01) = 99.7% individual chance of success with some kind of protection in parallel system per sexy times. Hooray. The green line shows that over 104 weeks, the chance of double failure is nearly negligible. This is the way to be!
So wait wait wait, a failed condom or birth control pill does not necessarily mean pregnancy occurs. Every menstrual cycle, there are about ~5 days of which sperm in the system could meet an egg. 5 days out of every 28, or ~18% of all days in a year. This reduces the 1 / week for 104 week chance of issue significantly, as the following graph shows:
This graph basically states that, having random sex once / week, over two years, presents a 17% chance of a condom breaking while in ovulation, a 11% chance of the pill not working during ovulation, and basically a 0% chance of the pill and the condom breaking at exactly the same time.
Lesson in all of this? Redundancy in parallel systems is the way to go.
Saturday, April 21, 2012
Dragon Laser Viper 55mW review
![]() |
| The Viper 55mW green laser |
I like lasers. It all started when I was getting married. We needed presents for all the guys in our wedding party, but didn't want to go with something normal like a tie, or a flask. Queue lightbulb -- something severely dangerous and with no practical use
An awesome laser.
That batch of lasers came from wickedlasers.com. They were of okay quality. 3/4 lasers worked perfectly. The last one worked intermittently, and appeared to have a short in it based on my testing. They were also more expensive than comparative lasers purchased elsewhere, but I went with a "name brand" company I had heard of for my first purchase.
Still, I was hooked. After some research, many people recommended dragonlasers.com. A friend of mine was getting married, and I thought, "yes, lasers are the new wedding china", and used this as an excuse to give dragonlasers a try.
I was not disappointed. Shipping is from Beijing, which accounts for most of the delay in between pushing the buy button and having the laser in my hands. This box will need to go through customs if you are shipping to the US, which was a giant pain. The shipping method was trackable via USPS, but after customs tracking stopped. It claims to be in customs now, despite having been in my hands for several weeks.
I would say it took them about a workweek to get the laser shipped, followed by a two week wait on getting it to my door. Not too bad for the price they charged for shipping, considering the oceans it had to cross.
The build quality is excellent. It is heavy in my hand, and feels solid. This is in noticeable contrast to my WickedLaser's purchases. It isn't that WickedLasers is cheap feeling, it is just that DragonLasers is a much higher quality.
Unlike WickedLasers, however, DragonLasers hand held laser pen does not appear to have a safety feature. The laser from Wicked had the ability to take a "pin" out, effectively cutting power even with the two AA batteries in. No such feature exists on DragonLasers, so care must be taken as you are wielding a dangerous toy.
Here is a picture of me shining the green Viper at a wall in my home
| Large green dot |
I took it outside, and kept the shutter on my camera open for 8 seconds, while I moved it around...most likely scaring the neighbors
| Looks almost like a photoshop filter |
The beam is highly visible at night, and I am working on capturing that in picture form.
Overall, I highly recommend dragonlasers.com for their excellent quality hand held lasers. Just be prepared to wait, as not everything can be 2-day shipped from Amazon.com
I would like to do some power measurement tests in the future, as well as a total usage / set of batteries measurement. The laser itself runs on two AAA batteries, meaning to achieve 55mW we're looking at a current draw of ~0.017A or 17mA. Given the low side of alkaline AAA batteries are rated for 250mAh, that is going to theoretically give a use time of around 14 hours between changes.
| The laser resting itself after a long day of blinding me |
Subscribe to:
Posts (Atom)


