Dec 22 2009

Pan-Fried Asparagus

Category: .foodAmit Bahree @ 5:49 pm

Yes I am a foodie (quite surprising, a lot of people find that surprising). 8-)

Anyways, this is what I intend to cook tonight among other things. I cannot claim credit for this, I found it online some time back and now its stored on my Wiki at home and I don’t know who to give credit for it anymore.

Ingredients:

  • 1/4 cup butter
  • 2 tablespoons olive oil
  • 1 teaspoon coarse salt
  • 1/4 teaspoon ground black pepper
  • 3 cloves garlic, minced
  • 1 pound fresh asparagus spears, trimmed

Method:

  1. Melt butter in a skillet over medium-high heat.
  2. Stir in the olive oil, salt, and pepper.
  3. Cook garlic in butter for a minute, but do not brown.
  4. Add asparagus, and cook for 10 minutes, turning asparagus to ensure even cooking.

Tags:


Jan 12 2007

Carbon Neutral – Be Greener

Category: .live and learnAmit Bahree @ 3:12 pm

I am quite surprised on how ignorant many people (like I was) are about understanding how the day-to-day activities contribute to Global Warming and the issues we face on this planet. As much as we wishes, unfortunately there is no backup or Undo feature Sad. To understand how our daily lives contribute towards global warming check out the Carbon Calculator and then read up on how you can offset those emissions and be Carbon Neutral.

However, personally I am not a believer of offsetting, while it is a step in the right direction it is not the solution.

Tags:


Mar 01 2005

Examination of Data Structures in .NET 2.0

Category: .architectureAmit Bahree @ 5:01 pm

You might have seen this already, if not, MSDN has a six-part article extensively examining the data structures in .NET 2.0 covering the usual suspects and then some not-so-usual unless you have written some compilers such as BST’s, graphs, red-back trees, etc. Quite an interesting read when you have some time.

Tags:


May 18 2004

Cracking the Da Vinci Code

Category: .booksAmit Bahree @ 4:59 am

First of all, if you don’t know what the hell am I talking about, jeez, where have you been buddy? If you do but have not read the book, then please do yourself a favour and do so. You can buy it from here. Once you do finish reading the book, then come back here and we can talk about it.

The crux of the book relies on the golden ratio also known as the divine proportion which has a value of 1.61803399 (per the book). The book, claims an eerie prevalence of divine proportion  in life and nature, which if you think is just fiction might be surprised to find out it really is not!! Whaaaaaat? Dammit, and all this time I thought I was reading just a novel!! Err.. I guess I should stop trying to be a “writer“ and get on with it.

I think some of the truth is a bit stretched in the novel, but nonetheless based on truth (of course IMHO).The Divine Proportion (represented by the Greek letter f – phi). In reality the value of phi is:

f = (1 + v5) / 2

If you actually try and solve the above, you will figure out that it is an irrational number i.e. the decimal expansion of an neither terminates or repeats.

 

The whole thing goes back to the Greeks, who believed the most pleasing and aesthetic and purest form is the triangle, specifically the golden triangle, which the Greeks incorporated in their architecture. The Italian mathematician Leonardo Pisano’s book called Liber Abaci brings to the west a  method of writing numbers and arithmetic (that we use today) which was completed in India 500 years earlier. These new numbers eventually provided the basis for modern science and engineering. One of the many exercises in Liber Abaci leads to the Fibonacci series (1, 1, 2, 3, 5, 8, 13, 21, …). I won’t go into the examples here but you can find the link in the bottom of this post. The Fibonacci series essentially is every one number after 1 is the sum of the previous two (so, 1+1 = 2, 1+2 = 3, 2+3 = 5, etc.). As you solve more problems (the rabbit problem, bees, etc. – again see the link at the end) with the Fibonacci series you will notice that this series occurs pretty frequently in nature. Some examples (also mentioned in the book) are:

  • If you count the number of petals in most flowers you will find the total to be a Fibonacci series. E.g. an iris has 3 petals, a buttercup has 5, a delphinium 8, daisy 13, 21 or 34, etc.
  • A sunflower has two beautiful spiral patterns – one clockwise and the other anti-clockwise. If you count those spirals, you will find there are 21 or 34 running clockwise and 34 or 55 running anti-clockwise.
  • Similarly, other flowers exhibit the same characteristics including Pine-cones and Cauliflowers
  • Leaves on trees (and stems) are arranged in a spiral pattern that is wound around the stem. If p is the number of turns you make (of the spiral) till you reach the next leaf directly above the first, and q is the number of leaves (excluding the first one), then the ratio p/q gives us the divergence of the plant. If you calculate the divergence for various plant species you will find that both the numerator and denominators represent Fibonacci series – 1/2, 1/3, 2/5, 3/8, 5/13, 8/21, etc.

Here is where things get more interesting. If you take the Fibonacci series and divide each number into the one that follows it you would get: 1/1 = 1; 2/1 = 2; 3/2 = 1.5; 5/3 = 1.666; 8/5 = 1.6; 13/8 = 1.625; 21/13 = 1.615; 34/21 = 1.619; 55/34 = 1.6176; 89/55 = 1.6181…. Hmmmm, notice anything? The 1, 1.6, 1.61, 1.618, etc. looks like the golden ratio.

 

Mathematic ans have proved that the Fibonacci series gets slowly closer to f and finally equate at infinity.

 

What does this mean? Well I cannot say for all the stuff laid out in the book regarding the golden ratio versus the human body (e.g. measuring the distance from the tip of your head to the floor and then dividing the distance from your belly button to the floor – did you get a f or something around that number?), but the facts for plants is there in front of us and such frequent appearances cannot be accidental.

 

So what do you make of all this? Well we found out quite recently that it is a matter of efficiency. To achieve maximum efficiency, flower heads and plant leaves grow in a spiral fashion governed by the golden ratio and rounded off to the nearest whole number (since f is a irrational number) – because of this it will be a Fibonacci series.

 

Why spirals and the golden ratio? Well as new leaves are added, they need to be the least obstructive to the old leaves and the new ones (that would come later) above it. To do so, the leaves come in a spiral pattern. In the case of seeds, a spiral “packs“ the most possible – and the most efficient way to do is via spirals. We now understand that f is the ratio that gives the optimal solution to growth equations. The mathematical explanation is that of all the irrational numbers, f is in a very precise (and technical sense) farthest from being representable as a fraction.

 

So, as a good novel should, this one brings the plot to an end satisfactorily and also leaves one wondering about life. Also makes one wonder how much of todays religions teachings are fact and why are people so willing to accept things at so much face value? Why are we so eager to believe in everything we are told?

 

To conclude as it is in the book, the “Phi (f) is one H cooler than Pi (p)”.

 

Check out the links here and here which formed the basis of this post.

 

Update: I am not sure but the symbol for Phi shows up as a “f” and the Pi shows up as a “p”. I will see if I can fix that, but till then, whenever you see just a “f” or a “p”, just read it as Phi and Pi respectively.

Tags:


May 01 2004

Hardware Error Codes

Category: .geekAmit Bahree @ 12:53 am

I suddenly started getting an error during boot up on one of my machine and could not figure out what it was, after spending a fair amount of time on google, I found this listing of error codes that I feel was very helpful. You can bookmark this post and use it as your reference.

Code  Description
01x   Undetermined problem errors
02x   Power supply errors

1xx     System Board Errors
   101  System board error – Interrupt failure
   102  System board error – Timer failure
   103  System board error – Timer interrupt failure
   104  System board error – Protected mode failure
   105  System board error – Last 8042 command not accepted
   106  System board error – Converting logic test
   107  System board error – Hot NMI test
   108  System board error – Timer bus test
   109  Direct memory access test error
   110  System board memory
   111  Adapter memory
   112  (any adapter in system unit)
   113  (any adapter in system unit)
   121  Unexpected hardware interrupts occurred
   131  Cassette wrap test failed
   151  System Board Error; Defective battery
   152  System Board Error; Real time clock failure
   161  System Options Error – (Run SETUP) Battery failure
   162  System options not set correctly-(Run SETUP)
   163  Time and date not set – (Run SETUP)
   164  Memory size error – (Run SETUP)
   165  System options not set – (Run SETUP)
   166  (any adapter in system unit)
   199  User-indicated configuration not correct

2xx    Memory (RAM) Errors
xxyyyy yyzz 201 bad ram chip in bank xx row zz

   201  Memory test failed
   202  Memory address error
   203  Memory address error
   215  (system board memory failure)
   216  (system board memory failure)

3xx    Keyboard Errors

   301  Keyboard did not respond to software reset correctly, or a stuck key failure was detected. If a stuck key was detected, the scan code for the key is displayed in hexadecimal. For example, the error code 49 301 indicates that Key 73, the PAGE UP key, has failed (49 hex = 73 decimal)

   302  User-indicated error from the keyboard test, or AT keylock is locked
   303  Keyboard or system unit error
   304  Keyboard or system unit error; CMOS does not match system
   305  Models 50 and 60 fuse or keyboard cable error
   341  Replace keyboard
   342  Replace interface cable
   343  Replace enhancement card or cable

4xx    Monochrome Monitor Errors
   401  Monochrome memory test, horizontal synchronous frequency test, or video test failed
   408  User-indicated display attributes failure
   416  User-indicated character set failure
   424  User-indicated 80 X 25 mode failure
   432  Parallel port test failed (monochrome adapter)

5xx    Color Monitor Errors
   501  Color memory test failed, horizontal synchronous frequency test, or video test failed
   508  User-indicated display attribute failure
   516  User-indicated character set failure
   524  User-indicated 80 X 25 mode failure
   532  User-indicated 40 X 25 mode failure
   540  User-indicated 320 X 200 graphics mode failure
   548  User-indicated 640 X 200 graphics mode failure

6xx    Floppy Disk Drive Errors
   601  Disk power-on diagnostics test failed
   602  Disk test failed; boot record is not valid
   603  Disk size error
   606  Disk verify function failed
   607  Write-protected disk
   608  Bad command disk status returned
   610  Disk initialization failed
   611  Timeout – disk status returned
   612  Bad NEC (controller) – disk status returned
   613  Bad DMA – disk status returned
   614  DMA Boundary error
   621  Bad seek – disk status returned
   622  Bad CRC – disk status returned
   623  Record not found – disk status returned
   624  Bad address mark – disk status returned
   625  Bad NEC (controller) seek – disk status returned
   626  Disk data compare error
   627  Disk change line error
   628  Disk removed

7xx    8087 or 80287 Math Coprocessor Errors
   701  Math coprocessor test failed

9xx    Parallel Printer Adapter Errors
   901  Parallel printer adapter test failed

10xx    Reserved for Parallel Printer Adapter
  1001  Alt printer Adapter test failed

11xx   Asynchronous Communications Adapter Errors
  1101 Asynchronous communications adapter test failed
  1102 Any serial device (system board)
  1106 Any serial device (system board)
  1107 Communications cable (system board)
  1108 Any serial device (system board)
  1109 Any serial device (system board)
  1110 Modem status register not clear
  1111 Ring indicate failure
  1112 Trailing edge ring indicate failure
  1113 Receive and delta receive line signal detect failure
  1114 Receive line signal detect failure
  1115 Delta receive line signal detect failure
  1116 Line control register; all bits cannot be set
  1117 Line control register; all bits cannot be reset
  1118 Xmit holding and/or shift register is stuck on
  1119 Data ready stuck on
  1120 Interrupt enable register, all bits cannot be set
  1121 Interrupt enable register, all bits cannot be reset
  1122 Interrupt pending stuck on
  1123 Interrupt ID register stuck on
  1124 Modem control register, all bits cannot be set
  1125 Modem control register, all bits cannot be reset
  1126 Modem status register, all bits cannot be set
  1127 Modem status register, all bits cannot be reset
  1128 Interrupt ID failure
  1129 Cannot force overrun error
  1130 No modem status interrupt
  1131 Invalid interrupt pending
  1132 No data ready
  1133 No data available interrupt
  1134 No transmit holding interrupt
  1135 No interrupts
  1136 No received line status interrupt
  1137 No receive data available
  1138 Transmit holding register not empty
  1139 No modem status interrupt
  1140 Transmit holding register not empty
  1141 No interrupts
  1142 No IRQ4 interrupt
  1143 No IRQ3 interrupt
  1144 No data transferred
  1145 Maximum BAUD rate failed
  1146 Minimum BAUD rate failed
  1148 Timeout error
  1149 Invalid data returned
  1150 Modem status register error
  1151 No DSR and Delta DSR
  1152 No data set ready
  1153 No delta
  1154 Modem status register not clear
  1155 No CTS and Delta CTS
  1156 No clear to send
  1157 No delta CTS

12xx   Alternate Asynchronous Communications Adapter Errors
  1201 Alternate asynchronous communications adapter test failed
  1202 Dual Asynchronous Adapter/A (Any serial device)
  1206 Dual Asynchronous Adapter/A (Any serial device)
  1207 Dual Asynchronous Adapter/A board error
  1208 Dual Asynchronous Adapter/A (Any serial device)
  1209 Dual Asynchronous Adapter/A (Any serial device)

13xx   Game Control Adapter Errors
  1301 Game control adapter test failed
  1302 Joystick test failed

14xx   Printer Errors
  1401 Printer test failed
  1404 Matrix printer failed

15xx   Synchronous Data Link Control (SDLC) Communications Adapter Errors
  1510 8255 Port B failure
  1511 8255 Port A failure
  1512 8255 Port C failure
  1513 8253 Timer 1 did not reach terminal count
  1514 8253 Timer 1 stuck on
  1515 8253 Timer 0 did not reach terminal count
  1516 8253 Timer 0 stuck on
  1517 8253 Timer 2 did not reach terminal count
  1518 8253 Timer 2 stuck on
  1519 8273 Port B error
  1520 8273 Port A error
  1521 8273 command/read timeout
  1522 Interrupt level 4 failure
  1523 Ring Indicate stuck on
  1524 Receive clock stuck on
  1525 Transmit clock stuck on
  1526 Test indicate stuck on
  1527 Ring indicate not on
  1528 Receive clock not on
  1529 Transmit clock not on
  1530 Test indicate not on
  1531 Data set ready not on
  1532 Carrier detect not on
  1533 Clear to send not on
  1534 Data set ready stuck on
  1536 Clear to send stuck on
  1537 Level 3 interrupt failure
  1538 Receive interrupt results error
  1539 Wrap data miscompare
  1540 DMA channel 1 error
  1541 DMA channel 1 error
  1542 Error in 8273 error checking or status reporting
  1547 Stray interrupt level 4
  1548 Stray interrupt level 3
>  1549 Interrupt presentation sequence timeout

16xx   Display Emulation Errors (327x, 5520, 525x)

17xx   Fixed Disk Errors
The following is a listing of Personal Computer AT Error Codes for the fixed disk drive and fixed disk drive adapter:

  1700 Fixed Disk/Adapter
  1701 HDD Controller Failure
  1702 Time out error
  1703 Seek error
  1704 Disk adapter error
  1705 No record found
  1706 Write fault error
  1707 Track 0 error
  1708 Head select error
  1709 Defective ECC
  1710 Read buffer overrun
  1711 Bad address mark
  1712 Error-cause not determined
  1713 Data compare error
  1714 Drive not ready
  1780 Disk 0 failure
  1781 Disk 1 failure
  1782 Disk adapter error
  1790 Disk 0 error
  1791 Disk 1 error

18xx   I/O Expansion Unit Errors
  1801 I/O expansion unit POST error
  1810 Enable/Disable failure
  1811 Extender card warp test failed (disabled)
  1812 High order address lines failure (disabled)
  1813 Wait state failure (disabled)
  1814 Enable/Disable could not be set on
  1815 Wait state failure (disabled)
  1816 Extender card warp test failed (enabled)
  1817 High order address lines failure (enabled)
  1818 Disable not functioning
  1819 Wait request switch not set correctly
  1820 Receiver card wrap test failure
  1821 Receiver high order address lines failure

19xx   3270 PC Attachment Card Errors

20xx   Binary Synchronous Communications (BSC) Adapter Errors
  2010 8255 Port A failure
  2011 8255 Port B failure
  2012 8255 Port C failure
  2013 8253 Timer 1 did not reach terminal count
  2014 8253 Timer 1 stuck on
  2016 8253 Timer 2 did not reach terminal count, or timer 2 stuck on
  2017 8251 Data set ready failed to come on
  2018 8251 Clear to send not sensed
  2019 8251 Data set ready stuck on
  2020 8251 Clear to send stuck on
  2021 8251 Hardware reset failed
  2022 8251 Software reset failed
  2023 8251 Software “error reset” failed
  2024 8251 Transmit ready did not come on
  2025 8251 Receive ready did not come on
  2026 8251 Could not force “overrun” error status
  2027 Interrupt failure – no timer interrupt
  2028 Interrupt failure – transmit, replace card or planar
  2029 Interrupt failure – transmit, replace card
  2030 Interrupt failure – receive, replace card or planar
  2031 Interrupt failure – receive, replace card
  2033 Ring indicate stuck on
  2034 Receive clock stuck on
  2035 Transmit clock stuck on
  2036 Test indicate stuck on
  2037 Ring indicate stuck on
  2038 Receive clock not on
  2039 Transmit clock not on
  2040 Test indicate not on
  2041 Data set ready not on
  2042 Carrier detect not on
  2043 Clear to send not on
  2044 Data set ready stuck on
  2045 Carrier detect stuck on
  2046 Clear to send stuck on
  2047 Unexpected transmit interrupt
  2048 Unexpected receive interrupt
  2049 Transmit data did not equal receive data
  2050 8251 detected overrun error
  2051 Lost data set ready during data wrap
  2052 Receive timeout during data wrap

21xx   Alternate Binary Synchronous Communications Adapter Errors
  2110 8255 Port A failure
  2111 8255 Port B failure
  2112 8255 Port C failure
  2113 8253 Timer 1 did not reach terminal count
  2114 8253 Timer 1 stuck on
  2115 8253 Timer 2 did not reach terminal count, or timer 2 stuck on
  2116 8251 Data set ready failed to come on
  2117 8251 Clear to send not sensed
  2118 8251 Data set ready stuck on
  2119 8251 Clear to send stuck on
  2120 8251 Hardware reset failed
  2121 8251 Software reset failed
  2122 8251 Software “error reset” failed
  2123 8251 Transmit ready did not come on
  2124 8251 Receive ready did not come on
  2125 8251 Could not force “overrun” error status
  2126 Interrupt failure – no timer interrupt
  2128 Interrupt failure – transmit, replace card or planar
  2129 Interrupt failure – transmit, replace card
  2130 Interrupt failure – receive, replace card or planar
  2131 Interrupt failure – receive, replace card
  2133 Ring indicate stuck on
  2134 Receive clock stuck on
  2135 Transmit clock stuck on
  2136 Test indicate stuck on
  2137 Ring indicate stuck on
  2138 Receive clock not on
  2139 Transmit clock not on
  2140 Test indicate not on
  2141 Data set ready not on
  2142 Carrier detect not on
  2143 Clear to send not on
  2144 Data set ready stuck on
  2145 Carrier detect stuck on
  2146 Clear to send stuck on
  2147 Unexpected transmit interrupt
  2148 Unexpected receive interrupt
  2149 Transmit data did not equal receive data
  2150 8251 detected overrun error
  2151 Lost data set ready during data wrap
  2152 Receive timeout during data wrap

22xx   Cluster Adapter Errors

24xx   Enhanced Graphics Adapter Errors

26xx   XT/370 Error Codes

27xx   XT/370 Error Codes

29xx   Color Matrix Printer Errors
  2901
  2902
  2904

30xx   Primary PC Network Adapter Errors
  3001 CPU Failure
  3002 ROM Failure
  3003 ID Failure
  3004 RAM Failure
  3005 HIC Failure
  3006 +/- 12v Failed
  3007 Digital Loopback Failure
  3008 Host Detected HIC Failure
  3009 Synchronous Fail & No Go Bit
  3010 HIC Test OK & No Go Bit
  3011 Go Bit & No CMD 41
  3012 Card not present
  3013 Digital Failure ( Fall Through )
  3015 Analog Failure
  3041 Hot Carrier (not this card)
  3042 Hot Carrier (This Card)

31xx   Secondary PC Network Adapter Errors
  3101 CPU Failure
  3102 ROM Failure
  3103 ID Failure
  3104 RAM Failure
  3105 HIC Failure
  3106 +/- 12v Failed
  3107 Digital Loopback Failure
  3108 Host Detected HIC Failure
  3109 Synchronous Fail & No Go Bit
  3110 HIC Test OK & No Go Bit
  3111 Go Bit & No CMD 41
  3112 Card not present
  3113 Digital Failure ( Fall Through )
  3115 Analog Failure
  3141 Hot Carrier (not this card)
  3142 Hot Carrier (THIS CARD !!)

33xx   Compact Printer Errors

74xx   Display Adapter 8514/A

850x   80286 Expanded Memory Adapter/A

851x   80286 Expanded Memory Adapter/A

852x   Memory Module Package on the 8028
6 Expanded Memory Adapter/A

860x   PS/2 Pointing Device Errors
   8601   Pointing device (IBM mouse)
   8602   Pointing device
   8603   System board error
   8604   System board : Pointing device

100xx  Multiprotocol Adapter/A
   10002  Multiprotocol Adapter/A any serial device
   10006  Multiprotocol Adapter/A any serial device
   10007  Communications cable Multiprotocol Adapter/A
   10008  Multiprotocol Adapter/A any serial device
   10009  Multiprotocol Adapter/A any serial device

101xx Modem Adapter/A
   10102  Modem Adapter/A any serial device
   10106  Modem Adapter/A any serial device
   10108  Modem Adapter/A any serial device
   10109  Modem Adapter/A any serial device

104xx Fixed Disk Adapter (ESDI) Drives 0 or 1 (C or D)
   10480  Fixed disk C, adapter (ESDI) or system board error
   10481  Fixed disk D, adapter (ESDI) or system board error
   10482  Fixed disk C or system board error
   10483  Fixed disk adapter (ESDI) or system board error
   10490  Fixed disk C or adapter (ESDI) error
   10491  Fixed disk C or adapter (ESDI) error

16500  6157 Tape Attachment Adapter

16520  6157 Streaming Tape Drive

16540  6157 Streaming Tape Drive or tape attachment adapter

Tags:


Get Adobe Flash playerPlugin by wpburn.com wordpress themes