Thứ Ba, 9 tháng 12, 2008

Every day leaning english

These are some sentences which are used every day. You had better (should) read and remember to use every day.

at home
from getting up to going out
Good morning,shuzheng
Good morning,mom

Did the alarm clock go off?
Did the alarm clock buzz?
Did the alarm clock ring? 

It time to get up.
It time to wake up.
It time to get out of bed
It time to get ready.
I don't wanna get up

Get up soon!
I don't want to

Are you awake?
I am now .
 
Are you feeling sick?
No,i 'm just tired
 
Did you sleep well ?
Yes ,i slept very well.
No ,i could't fall asleep
would you turn off the alarm clock?
you finally got up!
i am still sleepy.
it's a nice day !
it sure is
it is a beautiful day !
it is a wonderful day !
it is a nice day !
it is a great day !
did you stay up late last night
did y ou go to bed late last night
let us fold up the futon
let us put the futon away
you were snoring last night did i keep you up ?
you were sawing logs last night
i had a nightmare but it is right now
you left the night on
you forgot to turn off the light
i have to go wash my face
it time to eat breakfast
it time to have breakfast
i am still sleepy
iam still drawsy
i am still yawning
i have a hangover
i am a nigh t person iam a morning person
coffee wakes me up coffee gets me going
did you brushed youir teeth ?
have you brushed your teeth /
i have to comb my hair
what should i wear ?
what should i put on ?
which dress should i wear /
whichone should i wear ?
the redone .
hurry up and get dressed.
why ?
put those pajamas away
oh .i am washing those .
i'm leaving now ,bye mom!
study hard
i will see you when i get back
see you
i am taking off now
see you later
let's play hooky today
yeah let's
you were wearing your sweater inside out
you have your sweater on inside out
it's upside down
don't forget to take out the garbage(trash,rubbish
i won't
it's your turn to take out the garbage or trash or rubbish .
what are you doing today /
we are having a track and field meet .
if you don't hurry ,we will be late .
hurry up or we will be late .
okay, okay
hurry or you will be late for school .
what time is it ?
did you lock the door ?
have you locked the door ?
aren't you forgetting something?
i don't think so .
it's already 8:00
it's 8:00 already .
i am late hurry up !
i have to hurry (up)
i have to get going.
i have to rush
i have to get moving
are you gonna be late today ?
no ,i will be home at the usual time .
what time are you coming home /
around seven o'clock
have you got your lunch box? yes ,right here.
it might rain today .
take your umbrella with you.
don't forget to lock the door when you leave.




It would be very difficult for us to push any sales if we buy it at this price.
your price is 25% higher than that of last year.
you may notice that the price for this commodity has gone up since last year .
you know ,the price for the commodity has gone up a lot in the last few years.
the price for the commodity is US$25 per pound in the international market.
shall we fix a time for a talk?
---all right.
i am a foreign trade worker of the china National textiles import and export corporation.
i was assigned to negotiate business with you.
let me introduce you,this is Mr.white.
Not too bad ,thank you.
you must take a rest today and we can talk about our business tomorrow.
--fine.
Aren't you Mr.smith from the US?
--yes ,i am.i work in the china National Machinery Import and Export corporation.
what is your name ,please/
my name is qiu.
did you have a good journey?
our price is reasonable as compared with that in the international market.
i am afraid i do't agree with you there.
you price is higher than those we got from elsewhere.
the Japanese quotation is lower.
you should take quality into consideration.
Thanks ,by the way ,do you have any plans for tonight?
None whatsoever ,i am at your disposal.
why don't we have dinner together to celebrate the success of our first deal,there is a very nice restaurant round the corner.
i would love to !
Excuse me ,are you Mr.pierre from paris?
if your price is favorable,we can book an order right away.
we may reconsider our price if your order is big enough.
all these articles are our best selling lines.
these patterns are relatively popular in the Interational market.
it is very difficult for us to sell the goods,as your price is so high.
the price for this commodity has changed somewhat compared with that of last year.
is this your CIF quotation?
this is our FOB quotation sheet.
are the prices on the list firm offer?
all the quotations on the list are subject to our final confirmation?
i wonder whether there are any changs in your price.
i think it is better for you to quote us your price first.
i 'd like to have your lowest quotation C.I.F San francisco.
would you please tell us the quantity you require so as to enable us to work out the offer.
can you give us an indication of your price?
the price for this commodity is US$ 400 per piece C.I.F San Francisco
this is our lastest price list.
our price is highly competitive.
can you tell me the prices of these goods.
would you please give us an approximate idear of the quantity you require.
the size of our order depends greatly on your price.

Chủ Nhật, 7 tháng 12, 2008

MatLab

Matlab là một trong những công cụ toán rất hiệu quả cho những người làm kỹ thuật, yêu cầu một khối lượng tính toán đồ sộ mà không thể giải bằng tay được bắt buộc phải dùng tới máy tính.
Matlab bao gồm hai phần cơ bản: file.m va simulink ngoài ra còn có rất nhiều công cụ được tạo sãn trong toolbox.

Các hàm về ma trận:
int(A) tìm ma trận nghịch đảo của một ma trận A nào đó


Thứ Tư, 26 tháng 11, 2008

Tao menu trong VBA & autocad

Sub AddMenuItemText()
Dim currMenuGroup As AcadMenuGroup
Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0)

' Create the new menu
Dim newMenu As AcadPopupMenu
Set newMenu = currMenuGroup.Menus.Add("Text")

' Add a menu item to the new menu
Dim newMenuItem As AcadPopupMenuItem
Dim openMacro As String

openMacro = Chr(3) & Chr(3) & Chr(95) & "-VBARUN AddTextNew" & Chr(32)
Set newMenuItem = newMenu.AddMenuItem(newMenu.Count + 1, "Add Text", openMacro)

openMacro = Chr(3) & Chr(3) & Chr(95) & "-VBARUN AddMTextNew" & Chr(32)
Set newMenuItem = newMenu.AddMenuItem(newMenu.Count + 1, "Add MText", openMacro)

openMacro = Chr(3) & Chr(3) & Chr(95) & "-VBARUN MTE" & Chr(32)
Set newMenuItem = newMenu.AddMenuItem(newMenu.Count + 1, "Edit Text", openMacro)

' Display the menu on the menu bar
newMenu.InsertInMenuBar (ThisDrawing.Application.MenuBar.Count + 1)
End Sub


Code:
Public Sub removeMenu()
'this macro removes the submenu created by the addMenuItem macro
Dim oAcad As AcadApplication
Set oAcad = ThisDrawing.Application
Dim oPopup As AcadPopupMenu
Dim oPopupItem As AcadPopupMenuItem
For Each oPopup In oAcad.MenuBar
If oPopup.TagString = "ID_mnuText" Then
oPopup.RemoveFromMenuBar
oPopup.Delete
End If
Next oPopup
End Sub


Các thủ tục (macro):
Code:

Sub AddTextNew()
Dim textObj As AcadText
Dim textString As String
Dim textHeight As Double
Dim textPoint As Variant
textPoint = ThisDrawing.Utility.GetPoint(, "Enter a point: ")
textHeight = ThisDrawing.Utility.GetReal("Text height: ")
textString = InputBox("Text: ", "Nguyen Van Son")
Set textObj = ThisDrawing.ModelSpace.AddText(textString, textPoint, textHeight)
End Sub

Sub AddMtextNew()
Dim mtextObj As AcadMText
Dim width As Double
Dim MtextPoint As Variant
Dim MtextString As String

MtextPoint = ThisDrawing.Utility.GetPoint(, "Enter a point: ")
MtextString = InputBox("MText: ", "Nguyen Van Son")
width = 100
Set mtextObj = ThisDrawing.ModelSpace.AddMText(MtextPoint, width, MtextString)
'mtextObj.textString = "OK"

End Sub

Public Sub MTE()
On Error Resume Next
' Create the selection set
Dim ssetObj As AcadSelectionSet
Dim text_New As String
Dim str_Name As String

If Not IsNull(ThisDrawing.SelectionSets.Item("Text")) Then
Set ssetObj = ThisDrawing.SelectionSets.Item("Text")
ssetObj.Delete
End If
Set ssetObj = ThisDrawing.SelectionSets.Add("Text")

'str_Name = Hour(Time) & Minute(Time) & Second(Time)
'Set ssetObj = ThisDrawing.SelectionSets.Add(str_Name)

' Add objects to a selection set by prompting user to select on the screen
ssetObj.SelectOnScreen
For i = 0 To ssetObj.Count - 1
If ssetObj.Item(i).ObjectName = "AcDbMText" Or ssetObj.Item(i).ObjectName = "AcDbText" Then
text_New = InputBox("Nhap doan text moi: ", "Nguyen Van Son", ssetObj.Item(i).textString)
ssetObj.Item(i).textString = text_New
ssetObj.Update
End If
Next
End
End Sub

Ghi lại thành file mnuTextR16.dvb trong thư mục C:\Program Files\AutoCAD 2006\Support. Nếu ghi ở thư mục khác thì trong ACad đánh lệnh options, chọn tab Files, sau đó Add đường dẫn tới file mnuTextR16.dvb.Chạy Macro AddMenuItemTextNếu muốn các lần sau menu trên tự chạy thì chỉnh sửa file acad2006.lsp trong thư mục C:\Program Files\AutoCAD 2006\Support:Thêm đoạn code sau vào cuối file:
Code:
(defun S::STARTUP()
(command "_VBALOAD" "mnuTextR16.dvb")
(command "_-vbarun" "AddMenuItemText")
)

Thứ Tư, 19 tháng 11, 2008

Long me

Lòng ta sao quên bóng người mẹ thân yêu, tình thương sáng ngời
Từng bao năm mẹ thao thức
Nhưng mong con chóng nên người

Mẹ hay dắt con đi qua làng và âu yếm
Choàng cho chiếc khăn màu nắng vàng
Màu khăn ấy làm con nhớ những năm xưa còn niên thiếu

Mẹ đưa dắt con vào cuộc đời,
Mẹ bên con từ khi sớm mai trong tiếng cười
Mẹ đưa con về nơi thắm tươi muôn hoa đường đi tới chân trời

Lòng Mẹ lyrics on
http://music.yeucahat.com/song/Vietnamese/23933-Long-Me~Trong-Tan.html

Người mà tôi yêu suốt đời, mẹ của tôi giờ xa mãi rồi
Từ bao đêm tôi mong nhớ,
Nhớ thương hình bóng của người

Mẹ đứng khuất xa sau chân đồi
Và đôi mắt nhìn theo bóng con tận cuối trời
Đôi mắt ấy là khúc hát ru tôi qua ngày bão tố

Mẹ đứng khuất xa trong sương mờ, bàn tay vẫy
Thật êm ái như lời nhắc nhủ
Mẹ của tôi vầng trang sáng soi trong đêm trười đi tới chân trời

Thứ Tư, 15 tháng 10, 2008

Learning English

Study English - IELTS Preparation - Australia Network

Thứ Hai, 13 tháng 10, 2008

Autocad & VBA

'Trong AutoCad
Public ExcelApp As Excel.Application
Public Const Tenfile = "D:\Khoahoc2008\Hinhtru.xls"

Sub VeHinhTru_AutoCad()
Dim i As Integer
Dim AcadMo As AcadModelSpace
Dim AcadUt As AcadUtility
Dim DiemDauP As Variant '
Diem dau tien de ve
Dim DiemBaoP
(0 To 11) As Double 'Diem bao phan to mat cat
'
Khai bao ghi ky hieu Ten lop
Dim GhiTenlopP
(0 To 2) As Double
Dim Tenlop
As String
Dim TenlopT
As AcadText
'Khai bao ghi do sau lop
Dim GhiDosauP(0 To 2) As Double
Dim DosauT As AcadText
'
Khai bao To mat cat
Dim MatcatH
As AcadHatch
Dim VongbaoPL
(0) As AcadPolyline
'Khai bao noi dung Hinh tru
Dim HinhTruP(0 To 2) As Double
Dim HinhTruT As AcadText
'
Khai bao ty le dung Hinh tru
Dim TLdung
As Single
Dim TLdungP
(0 To 2) As Double
Dim TLdungT
As AcadText
'Khai bao chieu rong cua phan To ky hieu dia tang va Pi
Const Chieurong = 10: Const Pi = 3.14159
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
Khoi dong Excel
Call KhoidongExcel
TLdung
= Val(ExcelApp.Sheets("Khai bao").Range("J3"))
'Thiet lap font ".VnArial" cho kieu "Standard"
Set TxtStyleObj = ActiveDocument.TextStyles.Item("Standard")
TxtStyleObj.SetFont ".VnArial", False, False, 0, 34
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set AcadMo = ActiveDocument.ModelSpace
Set AcadUt = ActiveDocument.Utility
DiemDauP = AcadUt.GetPoint(, "Vao vi tri dau tien:")
'
Ghi noi dung ten Hinh tru va Ty le dung
HinhTruP
(0) = DiemDauP(0) + 8
HinhTruP
(1) = DiemDauP(1) + 4
Set HinhTruT
= AcadMo.AddText("HINH TRU HO KHOAN", HinhTruP, 1.5)
TLdungP(0) = HinhTruP(0) + 5
TLdungP
(1) = HinhTruP(1) - 2.5
Set TLdungT
= AcadMo.AddText("Tû lÖ ®øng: 1/" & TLdung, TLdungP, 1)
TLdungT.ObliqueAngle = 0.15
DiemBaoP
(0) = DiemDauP(0)
DiemBaoP(1) = DiemDauP(1)

With ExcelApp.Worksheets("Khai bao").Range("B2")

'Tao vong lap qua tung diem
i = 1
Do
'
Xac dinh do chenh sau giua cac lop dat
Chenhsau
= (.Offset(i - 1, 1) - .Offset(i, 1)) * 1000 / TLdung
'Xac dinh cac diem bao va ve duong Polyline
DiemBaoP(3) = DiemBaoP(0) + Chieurong: DiemBaoP(4) = DiemBaoP(1)
DiemBaoP(6) = DiemBaoP(3): DiemBaoP(7) = DiemBaoP(4) + Chenhsau
DiemBaoP(9) = DiemBaoP(6) - Chieurong: DiemBaoP(10) = DiemBaoP(7)
Set VongbaoPL(0) = AcadMo.AddPolyline(DiemBaoP)
VongbaoPL(0).Closed = True '
Kep kin duong Polyline
VongbaoPL
(0).color = acRed
'Ghi ten cac lop dat
GhiTenlopP(0) = DiemBaoP(3) + 2
GhiTenlopP(1) = DiemBaoP(4) + Chenhsau / 2
Tenlop = "Líp " & .Offset(i, 0) & ": " & .Offset(i, 2)
Set TenlopT = AcadMo.AddText(Tenlop, GhiTenlopP, 0.8)
'
Ghi do sau lop
GhiDosauP
(0) = DiemBaoP(6) + 0.5
GhiDosauP
(1) = DiemBaoP(7)
Set DosauT = AcadMo.AddText(FormatNumber(.Offset(i, 1), 1), GhiDosauP, 1)
DosauT.color = acRed
'To ky hieu mat cat dia tang
Set MatcatH = AcadMo.AddHatch(1, .Offset(i, 4), True)
MatcatH.PatternScale = .Offset(i, 5)
MatcatH.PatternAngle = .Offset(i, 6) * Pi / 180
MatcatH.AppendOuterLoop (VongbaoPL)
MatcatH.Evaluate: MatcatH.Update
'
Gan diem de sang lop moi
DiemBaoP
(0) = DiemBaoP(9)
DiemBaoP(1) = DiemBaoP(10)

i = i + 1
Loop Until IsEmpty
(.Offset(i, 0))
End With
ZoomAll
Xoa bo bien doi tuong
Set ExcelApp
= Nothing
Set AcadMo
= Nothing
Set AcadUt
= Nothing

End Sub
'Lay so lieu tu xecel

Sub openexcel(ByVal tenfile As String)
On Error Resume Next
Set excelapp = GetObject(, "Excel.application")
If Err Then
Err.Clear
Set acadapp = CreateObject("Excel.application")
End If
excelapp.Visible = True
excelapp.Workbooks.Open (tenfile)
AppActivate AutoCAD.Caption
End Sub
Sub venuoi()
' This example creates a 4 X 4 polygonmesh in model space.
Dim meshObj As AcadPolygonMesh
Dim mSize, nSize, count As Integer
Dim points(0 To 47) As Double

mSize = 4: nSize = 4
' Create the matrix of points
points(0) = 0: points(1) = 0: points(2) = 0
points(3) = 2: points(4) = 0: points(5) = 1
points(6) = 4: points(7) = 0: points(8) = 0
points(9) = 6: points(10) = 0: points(11) = 1
points(12) = 0: points(13) = 2: points(14) = 0
points(15) = 2: points(16) = 2: points(17) = 1
points(18) = 4: points(19) = 2: points(20) = 0
points(21) = 6: points(22) = 2: points(23) = 1
points(24) = 0: points(25) = 4: points(26) = 0
points(27) = 2: points(28) = 4: points(29) = 1
points(30) = 4: points(31) = 4: points(32) = 0
points(33) = 6: points(34) = 4: points(35) = 0
points(36) = 0: points(37) = 6: points(38) = 0
points(39) = 2: points(40) = 6: points(41) = 1
points(42) = 4: points(43) = 6: points(44) = 0
points(45) = 6: points(46) = 6: points(47) = 0



' creates a 3Dmesh in model space
Set meshObj = ThisDrawing.ModelSpace.Add3DMesh(mSize, nSize, points)
' Change the viewing direction of the viewport to better see the cylinder
ZoomAll

End Sub

Thứ Sáu, 3 tháng 10, 2008

Quy Chế 43

Khoa đóng tàu bắt đầu đào tạo theo tiến chỉ bắt đầu từ khoá 49. Bạn nào quan tâm đến quy chế này thì liên Hệ với mình theo đia chỉ phamdinhba007@gmail.com để có được nội dung cụ thể của quy chế này.