Wednesday, December 1, 2010

Hide your text

Thinking of giving your letter which nobody can see (yeh yeh except you!!) or saving your password list so that no one can see. I was amazed to see this trick hope you will also..Just do the following procedure...



  • Open your command prompt Start->Run type cmd

  • Move to any destination for example let us assume C:\> drive

  • Type the below code in your command prompt


  • C:\>notepad mytest.txt:hidden

  • Write some data and save the file.

  • Move to C:\> and open mytest.txt you cannot see no data in the file.

  • To retrieve the hidden data open command prompt and type the same command.


  • C:\>notepad mytest.txt:hidden

  • Notepad will open mytest.txt file with hidden data


You can edit the file normally to put visible data as well..


Amazing isn't it!!

Thursday, November 11, 2010

Deusi re guitar tabs

a hai bhan bha na bhai ho deu si re a hai ram ra ri bhana deu si re


E|--------------------------------------------------------------------------------|


B|----3---2--------2-------------------------------------------------------------|


G|-4-----------4-------2---4---------------4----2-------------------------------|


D|-----------------------------5--5--5--5----------5--4-2h4-2--2---2--2-------|


A|--------------------------------------------------------------------------------|


E|---------------------------------------------------------------------------------|





a hai sor mi lai ka na deu si re e ram ra ri bha na ..................


A|--------------------------------------------------------------------------------|


B|-------------------------------------3---2-----2--------------------------------|


G|----2---------------------------------------4-----2---4-------------------------|


D|-2------5--4---2--2---5--5--5--5------------------------------------------------|


A|--------------------------------------------------------------------------------|


E|--------------------------------------------------------------------------------|


Originally by: mobinepal

Sano cha gau


Song: Sano cha gau Movie: Sano sansar


D G
sano cha gau ,sano yo sahar, sanai cha sansara
D G
bhugol le chekna , badal le dhakna nasakne rahara
Am
goreto galli kunai ghumti modama
Am
sati rahanchan jivan ka prahar

dobatao ani harek chowk ma kohi ta bhetincha
afantai thancah pavitra manle jaha tyo matincha

jaba afnai agi bilai jancha door tyo najar
naya fanko marcha usko ..khojima..

sano cha gau ,sano yo sahar, sanai cha sansara
bhugol le chekna , badal le dhakna nasakne rahara

....

Tapoban lyrics and chords

Singer :Jagdish Hamal


Main chords: FCF AM A# C F



F Gm Dm A# F
tapoban ma ajha tapna deu malai
Dm F Gm
sahanchu kasta dui kada majha
A# C F
jhelan deu malai
F
tapoban..


Am A# F Gm C F Dm Gm C F C Gm F
Dm A#
pida sahanchu baru manako
F Dm
mutu khotali rang charideu
F Gm
trishana sahanchu baru manako
F Gm
pyasi timro rasa mulako
Gm A# C F
thopa bani khasideu

tapoban ma aja tapna deu malai
sahanchu kasta dui kada majha
jhelna deu malai

tapoban..

jhuleka lama kesa dhanaka

deu cholthi korna deu malai

pipalu pata ootha beri

chumera sara anga bhari

dipak manako bhujaideu

tapoban ma aja tapna deu malai
sahanchu kasta dui kada majha
jhelna deu malai

tapoban..

sparsa chaihidaina dui hatako

kotai hawale sughanda charideu

basna bhariyecha fula haru

rasiye cha brikchya ka fala haru

amrit bani jharideu

tapoban ma aja tapna deu malai
sahanchu kasta dui kada majha
jhelna deu malai

tapoban..

Sunday, September 12, 2010

MEASUREMENT OF LAND IN NEPAL

In Nepal we use different units for measurement of land. In hilly regions we use Ropani-Ana-Paisa-Dam system while in Southern parts i.e. at Terai region we use Bhigha-Kattha-Dhur system.






The conversion between these units and also to the SI unit is essential as we come across this situation often.






The conversion factor for these units is as follows






Ropani-Ana-Paisa-Dam system














  • 1 Ropani =16Ana












  • 1 Ana =4 Paisa












  • 1Paisa =4 Dam














Bhigha-Kattha-Dhur system














  • 1 Bhigha= 20 Kattha












  • 1 Kattha= 20 Dhur














For inter conversion between Ropani and Bhigha














  • 1Bhigha=13 Ropani














Similarly in standard units we may use














  • 1 Ropani =74feet X 74 feet












  • 1 m=3.218 feet














An Excel sheet has been developed for the general use which can be downloaded in this page.

The driver may be corrupted or missing. (Code 39)

My usb suddenly died. For a week I was in mess. I couldn't connect my pendrive or any other instrument that were using usb for connections. At first i thought it was a hardware problem. But damn it was a minor problem in registry.


The error code gets displayed in the device manager showing exclamation sign with yellow background and says The driver may be corrupted or missing. (Code 39).


Since we are going to tamper with registry it is good idea to make a copy of registry file.


1. Start> Run>REGEDIT


2. Navigate on following keys


HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/ Control/ Class/{36FC9E60-C465-11CF-8056-444553540000}


HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/ Control/ Class/{25DBCE51-6C8F-4A72-8A6D-B54C2B4FC835}


Look for any of the following names in the right hand column.


UpperFilters


LowerFilters


UpperFilters.bak


LowerFilters.bak


3. If any of those keys shown above are listed, right-click on them and choose Delete


4. Go to device manager uninstall all the drivers with error code 39


5. In device manager click Action>Scan for hardware changes



Now all the usb drives will be reinstalled and all error should go.






It took me 7 days to figure out this. Thanks to Google and my unsupporting IT department. I had found the solution at following site:http://pcremix.com/how-to-fix-windows-cannot-load-the-device-driver-for-this-hardware-the-driver-may-be-corrupted-or-missing-code-39/. The solution was for CD/DVD. I have put the solution with slight modification for usb drives.

Centroid of trapezoidal

The centroid of the trapezoidal with its one face perpendicular is given be


X=-1/3 (-2b^2-2ab+a^2)/(a+b)


Y=1/3 h (b+2a)/(a+b)


Where a, b, h and origin is as shown in the figure below.













Similarly, the centroid of any trapezoidal is given by


x= 1/3(3ab+3bc+b^2+6ac+3a^2+2c^2)/(b+2a+c)


y=1/3 h (b+3a+c)/(b+2a+c)


Where a, b ,c, h and origin is as shown in the figure below.

















The result was obtained using MathLab 7.0

Saturday, September 11, 2010

Algorithm for Nepali date conversion



If you are looking for code to put in your website visit http://nepalidateconve.sourceforge.net/ to download php code.





.....i don't have time to read..download NepaliDateConverterAddIn.xlsm now.









The codes







Nepali date conversion consists of two parts





A. Data of number of days that occur in each month in each year. This is the reason why all the Nepali date conversion programs have its limitations





B. Algorithm to convert the date from AD to BS or vice versa.





This is explained with the code in VBA (in Excel) below with the required steps.





1. Open MS Excel





2. Open Visual Basic editor (short cut Alt + F11)





3. Insert a class module





4. Rename the class module to Nepali_Calender in Properties window (F4)





5. Paste the code 1 given at the end of this article





6. Insert a Module (normal module not class module!) and Paste the code 2 . It consists of two functions :





a. nepaliToEnglish(y,m,d,formateCode)





b. englishToNepali(y,m,d,formateCode)





where y,m,d=year, month and day and formate code will display the desired output format
































































Formate code






Formate






0






20671/25






1






2067-Mangsir-25






2






2067-Mangsir-25-Saturday








7. Now close the editor





8. Save your file as *.xlsm (macro enabled)





9. Now you can use two functions made in step 6





10. To make these functions available to all the worksheets





a. save this sheet as add-ins *.xlam format





b. then enable it at Excel Options>Add in>Manage





c. the function will be available as user defined function under Insert functions





11. . In this code the limits are





a. AD 1944-2033





b. BS 2000-2089





c. if date is out of range then output is string "Out of range"





The readymade file is also available. Download NepaliDateConverterAddIn.xlsm now.





If you are looking for code to put in your website visit http://nepalidateconve.sourceforge.net/ to download php code.









Code1







Option Explicit





'the original sorce code of this program is found in sourceforge.net





'the code in php was translated to VBA





'this add-in is copyfree and can be distributed freely in multiple copies





'the user should be responsible for the use of this add in





'the author is not liable for any damage that may occur by using this add-in





'modification to the code is welcome. Any additional data in the code if notified over the internet will be usefull to all





'***********************************************************************************************************





'*******currently can only calculate the date between BS 2000-2089 and AD 1944-2033*************************





'***********************************************************************************************************





'Coder: Nirmal Raj Joshi





'@copyfree nirmaljoshi.com.np,2010





'joshi.amn@gmail.com





Private bs As Variant





Public nep_date As Dictionary





Public eng_date As Dictionary





Public debug_info





Sub initilizeClass()





ReDim bs(90)





bs(0) = Array(2000, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(1) = Array(2001, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(2) = Array(2002, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(3) = Array(2003, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(4) = Array(2004, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(5) = Array(2005, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(6) = Array(2006, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(7) = Array(2007, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(8) = Array(2008, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31)





bs(9) = Array(2009, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(10) = Array(2010, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(11) = Array(2011, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(12) = Array(2012, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30)





bs(13) = Array(2013, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(14) = Array(2014, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(15) = Array(2015, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(16) = Array(2016, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30)





bs(17) = Array(2017, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(18) = Array(2018, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(19) = Array(2019, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(20) = Array(2020, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)





bs(21) = Array(2021, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(22) = Array(2022, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30)





bs(23) = Array(2023, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(24) = Array(2024, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)





bs(25) = Array(2025, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(26) = Array(2026, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(27) = Array(2027, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(28) = Array(2028, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(29) = Array(2029, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30)





bs(30) = Array(2030, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(31) = Array(2031, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(32) = Array(2032, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(33) = Array(2033, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(34) = Array(2034, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(35) = Array(2035, 30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31)





bs(36) = Array(2036, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(37) = Array(2037, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(38) = Array(2038, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(39) = Array(2039, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30)





bs(40) = Array(2040, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(41) = Array(2041, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(42) = Array(2042, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(43) = Array(2043, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30)





bs(44) = Array(2044, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(45) = Array(2045, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(46) = Array(2046, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(47) = Array(2047, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)





bs(48) = Array(2048, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(49) = Array(2049, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30)





bs(50) = Array(2050, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(51) = Array(2051, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)





bs(52) = Array(2052, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(53) = Array(2053, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30)





bs(54) = Array(2054, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(55) = Array(2055, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(56) = Array(2056, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30)





bs(57) = Array(2057, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(58) = Array(2058, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(59) = Array(2059, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(60) = Array(2060, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(61) = Array(2061, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(62) = Array(2062, 30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31)





bs(63) = Array(2063, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(64) = Array(2064, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(65) = Array(2065, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(66) = Array(2066, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31)





bs(67) = Array(2067, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(68) = Array(2068, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(69) = Array(2069, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(70) = Array(2070, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30)





bs(71) = Array(2071, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(72) = Array(2072, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30)





bs(73) = Array(2073, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31)





bs(74) = Array(2074, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)





bs(75) = Array(2075, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(76) = Array(2076, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30)





bs(77) = Array(2077, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31)





bs(78) = Array(2078, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30)





bs(79) = Array(2079, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30)





bs(80) = Array(2080, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30)





bs(81) = Array(2081, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30)





bs(82) = Array(2082, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30)





bs(83) = Array(2083, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30)





bs(84) = Array(2084, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30)





bs(85) = Array(2085, 31, 32, 31, 32, 30, 31, 30, 30, 29, 30, 30, 30)





bs(86) = Array(2086, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30)





bs(87) = Array(2087, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30)





bs(88) = Array(2088, 30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30)





bs(89) = Array(2089, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30)





bs(90) = Array(2090, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30)





Set nep_date = New Dictionary





nep_date.Add "year", 0





nep_date.Add "month", 0





nep_date.Add "date", 0





nep_date.Add "day", 0





nep_date.Add "nmonth", 0





nep_date.Add "num_day", 0





Set eng_date = New Dictionary





eng_date.Add "year", 0





eng_date.Add "month", 0





eng_date.Add "date", 0





eng_date.Add "day", 0





eng_date.Add "emonth", 0





eng_date.Add "num_day", 0





End Sub





' /**





' * Calculates wheather english year is leap year or not





' *





' * @param integer $year





' * @return boolean





' */'





Public Function is_leap_year(year) As Boolean





Dim a, returnVal





a = year





If a Mod 100 = 0 Then





If a Mod 400 = 0 Then





returnVal = True





Else





returnVal = False





End If





Else





If a Mod 4 = 0 Then





returnVal = True





Else





returnVal = False





End If





End If





is_leap_year = returnVal





End Function





Public Function get_nepali_month(m)





Dim n_month





n_month = False





Select Case m





Case 1:





n_month = "Baishak"





Case 2:





n_month = "Jestha"





Case 3:





n_month = "Ashad"





Case 4:





n_month = "Shrawn"





Case 5:





n_month = "Bhadra"





Case 6:





n_month = "Ashwin"





Case 7:





n_month = "Kartik"





Case 8:





n_month = "Mangshir"





Case 9:





n_month = "Poush"





Case 10:





n_month = "Magh"





Case 11:





n_month = "Falgun"





Case 12:





n_month = "Chaitra"





End Select





get_nepali_month = n_month





End Function





Public Function get_english_month(m)





Dim eMonth





eMonth = False





Select Case m





Case 1





eMonth = "January"





Case 2:





eMonth = "February"





Case 3:





eMonth = "March"





Case 4:





eMonth = "April"





Case 5:





eMonth = "May"





Case 6:





eMonth = "June"





Case 7:





eMonth = "July"





Case 8:





eMonth = "August"





Case 9:





eMonth = "September"





Case 10:





eMonth = "October"





Case 11:





eMonth = "November"





Case 12:





eMonth = "December"





End Select





get_english_month = eMonth





End Function





Public Function get_day_of_week(d)





Dim day





day = False





Select Case d





Case 1:





day = "Sunday"





Case 2:





day = "Monday"





Case 3:





day = "Tuesday"





Case 4:





day = "Wednesday"





Case 5:





day = "Thursday"





Case 6:





day = "Friday"





Case 7:





day = "Saturday"





End Select





get_day_of_week = day





End Function





Public Function is_range_eng(yy, mm, dd)





Dim returnVal





returnVal = True





If (yy < 1944 Or yy > 2033) Then





debug_info = "Supported only between 1944-2022"





returnVal = False





End If





If (mm < 1 Or mm > 12) Then





debug_info = "Error! value 1-12 only"





returnVal = False





End If





If (dd < 1 Or dd > 31) Then





debug_info = "Error! value 1-31 only"





returnVal = False





End If





is_range_eng = returnVal





End Function





Public Function is_range_nep(yy, mm, dd)





Dim returnVal





returnVal = True





If (yy < 2000 Or yy > 2089) Then





debug_info = "Supported only between 2000-2089"





returnVal = False





End If





If (mm < 1 Or mm > 12) Then





debug_info = "Error! value 1-12 only"





returnVal = False





End If





If (dd < 1 Or dd > 32) Then





debug_info = "Error! value 1-31 only"





returnVal = False





End If





is_range_nep = returnVal





End Function





' /**





' * currently can only calculate the date between AD 1944-2033...





' *





' * @param unknown_type $yy





' * @param unknown_type $mm





' * @param unknown_type $dd





' * @return unknown





' */





Public Sub eng_to_nep(yy, mm, dd)





If (is_range_eng(yy, mm, dd) = False) Then





debug_info = "Out of range"





Else





' // english month data.





Dim month, lmonth





month = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)





lmonth = Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)





Dim def_eyy, def_nyy, def_nmm, def_ndd





Dim total_eDays, total_nDays, a, day





Dim m, y, i, j





Dim numDay





def_eyy = 1944 ' //spear head english date...





def_nyy = 2000: def_nmm = 9: def_ndd = 17 - 1 ' //spear head nepali date...





total_eDays = 0: total_nDays = 0: a = 0: day = 7 - 1 ' //all the initializations...





m = 0: y = 0: i = 0: j = 0





numDay = 0





'// count total no. of days in-terms of year





For i = 0 To yy - def_eyy - 1 ' //total days for month calculation...(english)





If (is_leap_year(def_eyy + i) = True) Then





For j = 0 To 12 - 1





total_eDays = total_eDays + lmonth(j)





Next j





Else





For j = 0 To 12 - 1





total_eDays = total_eDays + month(j)





Next j





End If





Next i





'// count total no. of days in-terms of month





For i = 0 To (mm - 1) - 1





If (is_leap_year(yy) = True) Then





total_eDays = total_eDays + lmonth(i)





Else





total_eDays = total_eDays + month(i)





End If





Next i





' // count total no. of days in-terms of date





total_eDays = total_eDays + dd





i = 0: j = def_nmm





total_nDays = def_ndd





m = def_nmm





y = def_nyy





'// count nepali date from array





Do While (total_eDays <> 0)





a = bs(i)(j)





total_nDays = total_nDays + 1 ' //count the days





day = day + 1 ' //count the days interms of 7 days





If (total_nDays > a) Then





m = m + 1





total_nDays = 1





j = j + 1





End If





If (day > 7) Then





day = 1





End If





If (m > 12) Then





y = y + 1





m = 1





End If





If (j > 12) Then





j = 1: i = i + 1





End If





total_eDays = total_eDays - 1





Loop





numDay = day





nep_date("year") = y





nep_date("month") = m





nep_date("date") = total_nDays





nep_date("day") = get_day_of_week(day)





nep_date("nmonth") = get_nepali_month(m)





nep_date("num_day") = numDay





End If





End Sub





'





' /**





' * currently can only calculate the date between BS 2000-2089





' *





' * @param unknown_type $yy





' * @param unknown_type $mm





' * @param unknown_type $dd





' * @return unknown





' */





Public Sub nep_to_eng(yy, mm, dd)





Dim def_eyy, def_emm, def_edd





Dim def_nyy, def_nmm, def_ndd





Dim total_eDays, total_nDays, a, day





Dim m, y, i, j





Dim k, numDay





Dim month, lmonth





def_eyy = 1943: def_emm = 4: def_edd = 14 - 1 '// init english date.





def_nyy = 2000: def_nmm = 1: def_ndd = 1 ' // equivalent nepali date.





total_eDays = 0: total_nDays = 0: a = 0: day = 4 - 1 ' // initializations...





m = 0: y = 0: i = 0





k = 0: numDay = 0





month = Array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)





lmonth = Array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)





If (is_range_nep(yy, mm, dd) = False) Then





debug_info = "Out of range"





Else





'// count total days in-terms of year





For i = 0 To yy - def_nyy - 1





For j = 1 To 12





total_nDays = total_nDays + bs(k)(j)





Next j





k = k + 1





Next i





'// count total days in-terms of month





For j = 1 To mm - 1





total_nDays = total_nDays + bs(k)(j)





Next j





'// count total days in-terms of dat





total_nDays = total_nDays + dd





'//calculation of equivalent english date...





total_eDays = def_edd





m = def_emm





y = def_eyy





Do While (total_nDays <> 0)





If (is_leap_year(y)) Then





a = lmonth(m)





Else





a = month(m)





End If





total_eDays = total_eDays + 1





day = day + 1





If (total_eDays > a) Then





m = m + 1





total_eDays = 1





If (m > 12) Then





y = y + 1





m = 1





End If





End If





If (day > 7) Then day = 1





total_nDays = total_nDays - 1





Loop





numDay = day





eng_date("year") = y





eng_date("month") = m





eng_date("date") = total_eDays





eng_date("day") = get_day_of_week(day)





eng_date("emonth") = get_english_month(m)





eng_date("num_day") = numDay





End If





End Sub









Code 2







Public Function nepaliToEnglish(yy, mm, dd, formate)





' this function depends on Nepali_calander class





'@copyfree nirmaljoshi.com.np,2010





'formateType default=2010/1/25





'formateType 1=2010-jan-25





'formateType 2=2010-jan-25-saturday





If IsMissing(formate) Then formateType = 0





'MsgBox formateType





Dim a As Nepali_Calender





Set a = New Nepali_Calender





Call a.initilizeClass





Call a.nep_to_eng(yy, mm, dd)





If a.debug_info = "" Then





Select Case formate





Case 1:





output = a.eng_date("year") & "-" & a.eng_date("emonth") & "-" & a.eng_date("date")





Case 2:





output = a.eng_date("year") & "-" & a.eng_date("emonth") & "-" & a.eng_date("date") & "-" & a.eng_date("day")





Case Else:





output = a.eng_date("year") & "/" & a.eng_date("month") & "/" & a.eng_date("date")





End Select





Else





output = a.debug_info





End If





nepaliToEnglish = output





End Function





Public Function englishToNepali(yy, mm, dd, formate)





' this function depends on Nepali_calander class





'@copyfree nirmaljoshi.com.np,2010





'formateType default=20671/25





'formateType 1=2067-mangsir-25





'formateType 2=2067-mangsir-25-saturday





If IsMissing(formate) Then formateType = 0





'MsgBox formateType





Dim a As Nepali_Calender





Set a = New Nepali_Calender





Call a.initilizeClass





Call a.eng_to_nep(yy, mm, dd)





If a.debug_info = "" Then





Select Case formate





Case 1:





output = a.nep_date("year") & "-" & a.nep_date("nmonth") & "-" & a.nep_date("date")





Case 2:





output = a.nep_date("year") & "-" & a.nep_date("nmonth") & "-" & a.nep_date("date") & "-" & a.nep_date("day")





Case Else:





output = a.nep_date("year") & "/" & a.nep_date("month") & "/" & a.nep_date("date")





End Select





Else





output = a.debug_info





End If





englishToNepali = output





End Function




Thursday, September 9, 2010

The Absurd Autocad

I am listing a set of Autocad commands and system variable which just offends the regular users. Use F1 to for details.

























5


Problem: Want to reamove wipeout frame of text mask, but the boundy is not visible.


Solution: Use TFRAMES command to toggle the boundery visibility.


4


Problem: Error in drawing. Cannot plot properly. Some parts get plotted and other doesn't and can't figure out what is wrong in the drawing. Its not layer error nor block error.


Solution: Use AUDIT command


3


Problem: My plot file are missing in plot files


Solution: This happens due to change in plot style table. use CONVERTPSTYLE command


2


Problem: Cannot explode the block


Solution: Open it in block editor>set property Allow exploding=YES


1


Problem: My delete key is not working in Autocad


Solution: Set PICKFIRST system variable to 1