Sunday, January 10, 2010

Get Elapsed Time



Oracle APEX application is blazingly fast. Its' performance can be negatively effected by poorly written queries. To optimize application performance, you can use few substitution strings to see elapsed time for rendering each region in a page. This helps in pin pointing long running regions and tuning queries behind them.
Objective: Display execution time for Search Person region in Person Details demo http://apex.oracle.com/pls/otn/f?p=62577
Implementation:
Substitution strings used are
#TIMING# shows elapsed time in seconds used when rendering a region. This includes time to render region items as well.
#TOTAL_ROWS# displays total number of rows retrieved by SQL query
#ROWS_FETCHED# shows the number of rows fetched by APEX. It shows page size if total total number of rows is greater than pagination rows.
#FIRST_ROW_FETCHED# and #LAST_ROW_FETCHED# display the range of rows displayed. It depends on number of rows defined for pagination.
Using above strings, you can display a custom message like Fetched #ROWS_FETCHED# rows of #TOTAL_ROWS# in #TIMING# seconds in region footer. Please note than these substitution strings only work for region.
Steps to implement the above message in Search Person page.
Edit region Search Person. In Footer, enter the message Fetched #ROWS_FETCHED# rows of #TOTAL_ROWS# in #TIMING# seconds
http://apps2fusion.com/images/blank.png

Apply changes. Run the application
After the changes, you can see the custom message below the region. This message can be used for debugging purposes for the regions in a page.
http://apps2fusion.com/images/blank.png


URL for the application:
Person Details application can be accessed using the url http://apex.oracle.com/pls/otn/f?p=62577:1

Apex Oracle

type ur summary here
As required by the company, we start to program with the Apex (Application Express) in oracle.
already worked with it for long time. and use the ExtJs to do the job.
This week I just turn from VB to this tools completely.
type the rest here

Thursday, October 30, 2008

Enid Yan

Enid ,the first girl broke the door of my heart,and from then on my heart is still stolened by her.
Recently I found that she already found her true love.So that's enough.I know she is happy!
Though I can not besides her everyday, I feel happy with a little sad.That's really strange and conflictive. But it is true ,it is said that if you really love the girl just let she happy instead of besides of her always.
That means let her go ,set her free as well as let yourself go and let yourself feel free of love.
Years ago,I do say I love you,but 2 years later I will say just fly your way.
I don't want to in someone 's way , I will also enjoy it myself, though tough though hard though bite.
Yan , Sorry , so long I can not get the way you lead,and I don't think we can have a long way to go hand in hand.

The day you said that You want to move out of the house , You will give 2 of us much more time to get self cool down.But I think I still enjoy the single life only.

No girls no cigerates no friends at all.I think I need time and room to let me clear about something ,the future ,5 years 10 years...... and so on.

Sorry , I think I won't in touch with you for a while.....Good night , I know you are tired , I also ..but not because you , my own problem....

Music is on, but my heart is still coollllll..........




Tuesday, October 14, 2008

Money is Not The Problem

2 month after I lost my own 16,8000$ in my own business, it seems a big money for me.
But the lost help me to know that money is not important , the most important thing is that how to use your money to earn much more money.--The ecnomic rules tell the people that , If you have one coin you can make it as your principle and invest it into business , then you can have 2 more 3 more .. it is not magic , and the problem you have to suffer and afford the risks that you will lost all of your money or most of your money .

But someone earned money by write the Blog , but seems it is hard for Normal People to earn money by Writing.Only when you have something special to tell the other people ,otherwise, you can rise the interests on the people who are interested the draft .

For example that the people interest in writing on blog, that because it can bring them the money . And If you write something on this Topic , they read your blog time and time to find out
the way that you did to earn.And by copy or by improving your method to make their money their own.It seems that I want to get the Chicken and I steal the egg from the Chicken and Get to do the work instead of the egg's real owner.Some did successful , someone just got an smelly Egg finnally.

When I start my own business on the internet , that I also understead that how much I can get from it and How much it can rober me.Time , Happiness may be .. etc. it can rob it from me .And what I can get is nerious and interest. and busy .. .coz it is your money. and First Time I did a really bad work, all the money lost.Then I borrow the money from my pearents again.And I did 3 months successful.But finnally after GZ trip I lost all money again!
So that's why I Say that it bring me the troubles and nerious and busy hours ...
But I know it is money , and it is only money at all. The people living in the world just make a wonderful life is the best way to show him out.I think I may lead a life like that ,But it is funny that I have a to live a life from work in the company though I just planned to leave one month again

5M Fiber Line By China Telecom

This summary is not available. Please click here to view the post.

Wednesday, February 6, 2008

New Year Eve In HK

New year in HK, planed to visit HK, in last saturday, but it rained hard in shenzhen. So i changed the plan to search around the Sun City Building in DongMen instead of visit SuiSai Wan to meet kuya ryan, it is really cold in shenzhen, so i just guess that the weather is the same in hk.

And disappointed that i missed the chance to buy the bag for my note book, One Polar, I asked Brother Ken where i can buy it, but ken told me that only can be bought in the sun city building in Dongmen and Maoye in shenzhen or Hua Qiang Road in shenzhen. But it is impossible to have a search in Hua Qiang Road..... really disappointed , but luckily that my relatives , Juan Anty she invited me to join the dinner with Steven and her. Xin Meiyuan in Che Gong Miao subway station. Really convinient for me to go to there , coz i m near the MTR in Dongmen Loajie.

Steven is coming from America and his work is to value your building and house and just give the price , when somebody are going to invest the money on that building , they are looking around the shenzhen city to buy a house for investement. And seems unluckily , they still can not find the one suitable.

As the same fate as them , i can not buy the bag in that day, also miss the chance to visit kuya, hahah , don't be angry kuya, it seems that kuya will leave to manila on next Tuesday, so i also had the plan to visit Chino's house, hmmmm really hard for me to arrange the visa for this.

Coz i only have 2 visa for hk visits. But i have to have one chance to back up. I never knows that how long i will still working in this company, i hope i can learn alot , but seems there's no other project to to , no job no updates no progress. .... bad mood when i thinking about this.... Shit......

Chance is really a miracle, that i find the one to invest my money , but the stock market meet his young age adjustment. So i already lost 1000 and more RMB in this market and waves.

I turns to exchange trading business, it will be my major business or living method in my left life period, my girl friend seems know nothing about this, i wil tell her since i got my first box of gold... A golden time is coming.

Allen got cold and ken have to stay in hospital to take care of his wife, good luck to ken, nice man and also allen, hope you will get your miss right in the coming new year.

In the next day, Juan Anty asked me to help one of her friends , to fix her computer, when i heard the problem, i knew wat coz this problem, it seems that the power of the computer is broken. I suggested that i would buy the power for it before i go to fix the computer , but Anty Juan don't think so , she was affraid that i will take a mistake disagnat, but it proved that i was right, so becoz it is new year , so the shop in china wont have business time during this time.



Hahhaah, oki doks, then the girl have to wait until the end of the new year.



On Feb 6th, I came to hk, to visit chino's house, hehe.. nice house and nice treat, we had BBQ on the flat floor upstair of his house, We had a nice afternoon, hehe.. Thank you for your invites. And i bought him a 1993 GTW greate wall wine instead of cigerates. hahhaha it will make him happy , he always a drinking bad guy, hahahhaha. and I know jeffric by that chance , a bad guy as me too , hahhaha , chino said that we looks like brother and seems know eachother for long time.

The guy asked me that where is most romantic place in shenzhen , i just answered that , any place in shenzhen he can find is nice and romantic, coz there's many romantic and bt girls in shenzhen. hahhahah , just lying don't be mad, coz in china nice people are all over the china.

Friday, December 28, 2007

open with error encountered

After install some software in my pc , when i m going to open a file with another format. It shows error messagebox "process refused."
when i checked it in the google. i found the way to fix it. shows as follow:

just create a txt file. and input the context as below into it, then save it as reg file. (*.reg)
then double click it, it will regedit the value into your regedit file.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Unknown]
"AlwaysShowExt"=""
"QueryClassStore"=""

[HKEY_CLASSES_ROOT\Unknown\shell]
@="openas"

[HKEY_CLASSES_ROOT\Unknown\shell\openas]

[HKEY_CLASSES_ROOT\Unknown\shell\openas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,25,00,53,\
00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,\
79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,65,00,6c,00,6c,\
00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,4f,00,70,00,65,00,6e,00,41,00,\
73,00,5f,00,52,00,75,00,6e,00,44,00,4c,00,4c,00,20,00,25,00,31,00,00,00


Then the problem will be solved. Good luck, if you also encountered this problem.Just follow the steps.

Monday, December 10, 2007

Windows cannot find the my net work place

After windows xp sp2 updated the PC can not find mynetwork place. It can Ping the PCs in the same network, but can not access the share folder by IP or PC name.
It said that the PC name was defined in Netboios. And we tried to reinstall the TCP/IP protocol
and Net shared printer & folder protocol . But it not work , then we tried to restart the service component in the machine management tools.
"computer browser"and "workstation" it shows 2250 error: "Workstation服务因2250服务性错误而停止;无法加载RDR设备驱动程序,无法加载Rdbss设备驱动程序;" --- that means that "the workstation service was stopped because the 2250 error , and can not load the RDR device drivers,and can not load the Rdbss device driver programme" that means the problem was cozed by RDBSS.SYS and MRXSMB.SYS
file. the system path is C:\windows\system32\drivers
after copied these two files from the same version of the windows XP into the problem pc , it worked.
and we restart the workstation service.
Finnally we solve the problem that the PC can not find My network place fault.

Thursday, November 29, 2007

Travelling in Zhuhai

After Long time scheduled , Allen and i changed our plan, we went to ShangHai Hotel to Start our Zhuhai Travelling plan instead of stay in Bed to have a good rest.
WE prefer to have spring relaxing instead of going to Secret Island to play machine Game.On the morning of 21 Nov 2007 at 8:30 we gethered there and start the trip.But we finally found that the bus' seat is too narrow for the big guys of the company includes the HK officemate who named Michle---Funy Guy. So the travelling Agents changed another much comfortable bus for us. WE really like that one.
And after 2 hours driving , we arrived one of Zhuhai Country side Resteraunt and had our fist wired lunch there. After another 20 minutes' trip we finally see the secret Island. And piano san got excited to start her secret trip in Secret Island. But Michle and the HK Officemates found that it is too hot to play the machine games they went back to the bus in the sounds of the Chewing from the companiors.
Then after 5 minutes we finally arrived our destination --- Ocean resort Spring . And There's the beautiful waitress there infront of the gate, i think it may be the reason so many people came to the Ocean Resort Spring for relaxing . And each of us got a electric Key for the Locker inside of the bathing room. And it is really nice view inside , if you have a chance to be there , you will be much relax just have view of the building and decoration . After bathing allen and me got out of the bath room , woooo , nice view of the beach and spring pools. We can not hold ourselves to jump into the spring pools to enjoy it .To tell truth it was my first time to have such kind of the relaxing compared to the travelling near the beach. Wooo , so many girls there with bigini.
The temparature of the spring pools are different with each other. It depends on the water tempareture and wat is inside of the pools . And another Michle picked a Golden Ring in the first spring pool. Wooooo , lucky guy. (finally we found out that the ring belongs to one of the officemate of our company) .....
After hving the spring split on the back of our body and hv a break in the SanNa Room . We went out to have a try of other kind of spring pool. such as from one 48 'C pool to 20 'C pool by turns . It shows us two kind of world. you will find out the feelling by yourself if you tried to jump from a summer day into a winter day by suddenly.
And also there 's the drug spring , all kinds of the drug pool you can have try. It said that it make your body got totally relax and be good to your health.
And there's the wine pool & milk pool & coffee pool &.. .. etc.
Then we enjoy the sun bath in the sun by lying down on the chair near the beach.
After that we went to the pool with the skip ladder , it is too low that can not really release our excited sounds. And that then we tried the higher temperature pool beside that pool with the skip ladder . wooo , higher and higher tempareture .... really make our face red and body tempareture higher and higher ....
really relax after insert yourself into the spring....
17:05 we found that it is time to have food and have a break for our next destination : Dinner .
We went to the Second Floor and sleep on the chair to enjoy the sunset and the fruit provided freely by the Ocean Resort Spring company.
Allen have alots of fruits and .

Wednesday, November 7, 2007

Meet friends in shenzhen







It has been a long time , Pip and his gf ,also my good friend ,came to Shenzhen. It is really great. After Long time have not seen them , i really miss pip and ate , snow and lim. Hehe... Really preciate their coming.



To tell the truth, i m not familiar with shenzhen at all ,but i m growing up in China ,heheh..... So i can handle something in Shenzhen. We enjoyed the lunch together , i don't know whether they like it ,hehe ...






Pip is looks like my best friend,--Paul Fu. Rembemer that after the new year in china , i went back to manila , i encountered some problem. I did something seems not good to Paul. And i can not forgive myself. Pip tell me try to tell him the truth. Thx. I did not. But i already can accept the reality. And paul seems not angry with me at all . Great , i hv these 2 friends.




After Lunch , we went to DongMen(East Gate), a shopping street. There are people around here and there. We Looked around the street , pip and lim had some food , they found that it was not the same taste as HK 's. Heeeeee.




Every weekends , there's crawd in DongMen Street, you just can see the head of people , you can not see your own feet.We had lunch in a restaurant in HaoWeiZhan(好味栈).

It was the second time i went there , so i don't know whether there's any bar there. I just called my friends , they tell me that there's a bar named BenSE (actual character).














IN the bar we enjoy the music , Pip doubt that whether the singer will sing Chinese Song. hehe . It turned out that he can not understand it ,heheh......
After that we went back to the Vienna Hotel ShenZhen .It is really a excited day , coz i met these 2 good friends in oneday , hehe ..
The next day , we went to the window of the world, but i hope they were not disappointed with it. hehe , Coz there really only the models to see... I should bring them to the Happy Vollay
Hoped they can stay much longer time , but times really short when i realized that they were going back. Don't want to wave hands to them in Station.
I m planning to arrange the visa , but it is really hard to arrange the time . ...









































Wednesday, October 31, 2007

robocopy tools(Windows2000 server shared folder access control copy )



As the data server is changed to another server machine. The shared source should be relocated to another server , but the access control rights should be maintained. Xcopy can do it in the same machine , but it can not support different machines copy action.
Howerver , there's another way to do it .Symantec Back up software can do it , but it nid you to pay, though there's trail period , but if we do it ourselves , whether there's another way to do it .
The answer is yes. There's another tools for it : RoboCopy.
Fist you have to select a diretory for the distination for the copied files :




Then choose which file you want to copy, after that you can do it yourself,
Then it will run the robocopy command to relocate the shared source to the distination you made.
http://www.sh-soft.com/front_content.php?idcat=36 here's the like for the GUI for the robocopy.













Tuesday, October 30, 2007

KVM keyboard Mouse down

In the office , when we install symantic Back up Software , there's someproblem happened to our KVM interated Keyboard and mouse .Only the vedio function works well but the keyboard and the mouse can not work.Though we tried to switch it between 1 to 16 resource by button.
It still can not work.So we tried to power off and then power on , it stil not work.
finnally we called the support service. And the next day the man came to our office brought a new keyboard and moused integrated in the keyboard . then i Helped him to changed the keyboard. still can not work .So he called the factory and ask for helpping .At last he tried the 'B'+16. and input the default password "00000000" it works now this time.
Well done, there's no manual for the user but you ask them to support the server room . so wat will happen if they don't know how to solute the problem in KVM down.
The KVM is a small issues , but if you encounted that problem , it will also affect the normal working schedule.
so in the server room , there's no small issues. hehe , take all the issues as the big deal , it will help you to avoid lots of problem.

Monday, October 22, 2007

how to restore database from sql server 2005 to SQL server2000

                       how to restore database from sql server 2005 to SQL server2000

想从sql server 2005 的数据库备份恢复数据到2000,会遇到错误 "Too many backup devices specified for backup or restore; only 64 are allowed.

(Microsoft SQL Server, Error: 3205)"

用detach和attach同样不行,"Error 602 Severity Level 21 Message Text

Could not find row in sysindexes for database ID %d, object ID %ld, index ID %d. Run DBCC CHECKTABLE on sysindexes."


 

 

How to Downgrade a Database from SQL Server 2005 to SQL Server 2000

As you may all know, SQL Server 2005 request a minimum of 8GB RAM to work… let say satisfactorily. I first didn’t knew that and after a while from the upgrade I did from SQL Server 2000 to 2005 my SQL Services were starting to crash three or four times per DAY!!! 

At first I thought I was being attacked, but soon I realized it was nothing like that. I then decided to downgrade to an SQL Server 2000 edition. Though I looked around the internet to find some information on how to do that, I got very disappointed when I realized that no actual documentation of any kind could be found for that. So I am posting this thread to inform you on the procedures I had to follow for this action. 

Before beginning I must assume, firstly that the user, who will attempt such thing, has a basic knowledge of SQL Environment, secondly that he has the two versions already installed (both 2000 and 2005), that a basic backup of the databases has been created and finally that all the 2005 SQL Server Users have been created at the SQL Server 2000 environment as well.

Step 1 Generating Scripts for the Database Elements and Structures

1) Right-click over the desired Database at 2005, Choose Tasks and the Generate Scripts (Option).

2) At the pop-up Dialog Box click at the Script All Objects in the selected Databases check box, to activate it and then Click the Next Button.

3) Set the following Elements to the following Values

a. Script Collation , set to TRUE

b. Script Database Create, set to TRUE

c. Script of SQL Version, set to SQL SERVER 2000

d. Script foreign keys, set to FALSE

e. Script Triggers, set to FALSE

Then Hit the Next button

4) Select the way the generated scripts should be saved (There are different selections. The most common one is Clipboard). Finally click the Next button till you reach the end.

5) Click Finish

After completing this procedure, we have to move to the SQL SERVER 2000 environment. Here, by using the Query Analyzer, we will have to run the scripts that were generated using the master database. Copy and Paste the script at the Query Analyzer and run it. After that the Structure of the Database will be created.

Be careful, the SQL Server 2005 Edition inserts the Views in a random place through the script. Therefore, all the scripts that are referred to the Views MUST be moved to the end of the script. If the Query Analyzer shows some errors do not be bothered. Delete all the elements created from the script and after you fix the code run it again.


Step2 Moving the data from 2005 to 2000

1) After completing the previous step successfully, moving the data follows. Right-click at the 2005 database you used to run the previous step and select Tasks and then choose the Export Data (option).

2) From the pop-up Dialog Box, select the Source Db and Click at the Next Button.

3) At the next step you will have to choose the destination server and the destination Database for the Data to be exported. Then Click Next.

4) A List of all the Source Database’s Elements will appear in the screen. Select one by one all the Elements you wish to move and for each one click at the button Edit Mappings (Located at the bottom right corner of the Dialog Box just under the Elements list). A new Dialog box will pop-up. Select the Delete rows in Destination Tables option and activate the Enable Identity Insert Option. (Remember to repeat this action for each of the selected Element from the list that will be moved.

CAUTION!!! A malfunction of the SQL Server 2005 has been found. Not sure why, after multiple tries I have observed that when I tried to move more than twelve Elements at once, the Export Data Wizard of SQL Server 2005 seemed to disable the Enable Identity Insert Option that was activated over the Edit Mappings Dialog Box. But if the number of the selected Elements is smaller than 12 no problem seemed to appear.

Step 3 Generating Scripts for the Database Foreign Keys and Triggers

Finally, to successfully finish the downgrade of the Database, the Triggers and the Foreign Keys of the DB must be produced. The procedure that should be followed is the one stated next:

1) Right-Click at the SQL 2005 Database and Select from Tasks Menu the Generate Scripts Option.

2) Using the pop-up Dialog Box make sure that the check box Script All Objects in the selected Databases is not enabled and hit the Next Button.

3) Set all the Elements on the List to a False Value except the ones that follow:

a. Include IF NOT EXISTS , set to TRUE

b. Script Owner, set to TRUE

c. Script of SQL Version, set to SQL SERVER 2000

d. Script foreign keys, set to TRUE

e. Script Triggers, set to TRUE

Then Hit the Next button 

4) After finishing reading the Elements of the Database, a new list will appear at the Dialog Box. Make sure that you select ONLY THE TABLES of the Database and hit the Next Button.

5) At the screen that follows hit the Select All button and the Next.

6) Select the way the generated scripts should be saved (There are different selections. The most common one is Clipboard). Finally click the Next button till you reach the end.

7) Click Finish Button.

After completing this procedure, we have to move to the SQL SERVER 2000 environment. Here, by using the Query Analyzer, we will have to run the scripts that were generated using the master database. Copy and Paste the script at the Query Analyzer and run it. After that the Foreign Keys and the Triggers of the Database will be created.

After these steps the database should be fully functional under the SQL Server 2000 edition.

www.hellasinternet.com

During Export data from 2005 to 2000 ,there's may be some problem , wat i encountered is that though 2005 management info shows successfully exported, but it just export 1 record into the disternation table.

So inorder to solve the problem , you 'd better use the disternation database to import data from 2005 ,that will be much useful. And the problem solved.

Good luck!



Sunday, September 16, 2007

Iphone's Price Down $100

The IPhone has descreased $100 , as the previous Price is $599 for 8G IPhone.It Caused the customers who already Paid $599 for the IPhone rather disppointed with the Company of the IPhone. They Write emails to the SEO of Apple. Also the stoke is decrease as 1.3% .

As the Ipod just made sales of 1000,000.But as the descrease of the Price of the Iphone (8G),

the sales ratio will be definitely increase to 1000,000 in short term.

But as the Iphone got 3G Service and the Processing ability of the Processor .


In china , I think coz the Iphone was limited that :
Just can be used in America And Eroupe .Then
The fans of IPhone. they tried many ways to dencrypt the machine.
And as a result , one of the user tried to dencrypt it in "hard" way, but it caused a exporsion.

Sunday, July 1, 2007

casino filipino

Today is the last holiday i m in manila , then i go to Finlipino Casio to have the taste of Gambling ,then the first i won 1500 Pesos ,hahah , i set 13 then it made me win 800pesos ,hehe .the feeling is so cool ,the i put 500 pesos , it gone ,last time i lost it , again 500 , lost again. Finally , i lost wat i won. It is goog experience and bad experience .Good thing , it tell me that gambling is not the good game for the guy , always earn money by gambling , and bad thing is that , i lost money. But it make me clear that , when i feel bad, i won't put my money all to wat it was high risk.
when i feel is may lost , it will happens that it must be lost. So the feeling will always tell me wat to next. When feel bad, just leave the seat , let yourself cool down. Life is that , how to make decision and when it is the highest benefits, just leave, at all you win. But you still go on , you will lose all you got and you have. so wat i try to say is that , every one should care about the feeling .Don't always in the high risk state, hehehe , hope i will be clear about this point. No one force you to make decision ,and if it must be , take it in the most high bebefit, and then just leave it to the fate. that's all.
The first thing is how make correct decision , though i still young , then i knows how to make me clear about the point , then i will be the valuable thing i learn in Casino. hahhaha , you got experience you learned . Then it will be the most good thing you must learned .If it wins ,you will always just stay there, and life is not joke, hope you knows this point.

Thursday, June 28, 2007

Wealthtoolbox (earn your first $100 soon just one click)

http://www.wealthtoolbox.com
Just click the link above and sign up with your paypal email address, you will get $100 at once.Then most oftenly go to your account ,you will find that they do give you $5 each time you login. Please don't be histate,you may lose the chance to get your first $ 100from the web.Though you hope can earn money on web by writing blog,and it is another chance you can do it just by once sign up and visit the web with your account.If you don't believe you can check it with a email that don't have any relationship with your private information. though they did not get any information from you .It is a trick again, It suppose to that they will just get your email adress and it is paypal true account. Now it is really the account you sign for paypal, do you think it it goes to your pocket without even pray for? i don't think so, so if you are not mind , can just try the like above and just sign use your useless email address. it will be much safe than use paypal account.
and you can also read this article about it .http://turnonepoundintoonemillion.blogspot.com
but it will be the bonus given to you 2years later? just click the link above , to see this kind of "trick"go get the money .

Wednesday, June 27, 2007

google trends (www.google.com/trends)

google.com/trends is a link that you can check the keywords you input for searching ,is most used by which countries and which cities , then you may know wat the countries and the citizens , the most actually ideas and thoughts in their mind. Such as "Fuck" and "Shit",you may check which counties ,their people always searching for it. The ranks and the trends they showed out.Go ,then you may know it ,hehe .. i think it is easy for you just guess ,that which kind of character they may have.

Tuesday, June 26, 2007

samsung SSD harddisks


now SSD (solid state disk),nearly it compatable with the PCMCIA of notebook ,65G for $500. And samsung is the first manufature publish this kind of disk.Now it has 18G and 65G 18" ssd,suit for umpc and notebook,laptop. and for 3.5' sata ssd ,it is now up to 256,and more.But for 2.5' ,it is just published recently,here is QPI 's products:

now the price is too high, lets wait for 2 or 3 years, it will the same as notebook, it is another battle for the digits manuafatures,and now after 360G sata hard disk , the express card ssd will be the new for every digit funs.the stable and the speed and the storage are the factors that all the users care about , so when a product comes out it should be shows the function and quanlity.

now

Monday, June 25, 2007

excel report genarting (the function inside of excel)

  将数据导出到Excel的方法有多种,速度有快慢之分,我用过三种方法,速度都比较快,下面的一种利用Excel内置的功能,是三种之中最快的。其中最主要的是下面两句:
xlQuery := xlSheet.QueryTables.Add(ADOQExport.Recordset ,xlSheet.Range['A3']);
xlQuery.Refresh;
  不过我这里稍为复杂一点,要通过某种条件完成分类汇总。

function ExportToExcel: Boolean;
var
xlApp, xlBook, xlSheet, xlQuery: Variant;
SQLCmd: String;
i, iNextRow: Integer;

//设定单元格默认格式
procedure ExcelSetDefaultFormat;
begin
xlSheet.Cells.Font.Name := '宋体';
xlSheet.Cells.Font.Size := 12;
xlSheet.Cells.VerticalAlignment := 2;
//xlSheet.Cells.RowHeight := 17.25;
xlSheet.Range['C:D'].HorizontalAlignment := xlCenter;
end;

//输出标题
procedure ExcelSetHeader;
begin
xlSheet.Range['A1'].Value := '显示在报表第一行的标题';
xlSheet.Range['A1:F1'].HorizontalAlignment := 7;
xlSheet.Range['1:1'].Font.Size := 18;
xlSheet.Range['1:1'].Font.Bold := true;
xlSheet.Range['A2'].Value := '文件编号:WL/B 19';
xlSheet.Range['A2'].Font.Size := 11;
xlSheet.Range['F2'].Value := '记录编号:GZ-023';
xlSheet.Range['F2'].HorizontalAlignment := xlRight;
xlSheet.Range['F2'].Font.Size := 11;
xlSheet.Range['A3'].Value := 'XXXXX有限公司';
xlSheet.Range['F3'].Value := '日期:2005-X-X' ;
xlSheet.Range['F3'].HorizontalAlignment := xlRight;
//输出字段名
ADOQExport.SQL.Strings[4] := 'where 1=0';
if ADOQExport.Active then ADOQExport.Requery else ADOQExport.Open;
xlQuery := xlSheet.QueryTables.Add(ADOQExport.Recordset ,xlSheet.Range['A4']);
xlQuery.FieldNames := true;
xlQuery.RowNumbers := False;
xlQuery.FillAdjacentFormulas := False;
xlQuery.PreserveFormatting := True;
xlQuery.RefreshOnFileOpen := False;
xlQuery.BackgroundQuery := True;
xlQuery.RefreshStyle := xlOverwriteCells; //xlInsertDeleteCells;
xlQuery.SavePassword := True;
xlQuery.SaveData := True;
xlQuery.AdjustColumnWidth := True;
xlQuery.RefreshPeriod := 0;
xlQuery.PreserveColumnInfo := True;
xlQuery.Refresh;
iNextRow := 5;
end;

//设置页脚
procedure ExcelSetFooter;
begin
xlSheet.PageSetup.LeftFooter := '制表:' + DM.UserInfo.UserName;
xlSheet.PageSetup.CenterFooter := '审核:';
xlSheet.PageSetup.RightFooter := '第 &P 页,共 &N 页';
end;

//输出汇总数据
procedure ExcelSetSum;
begin
xlSheet.Range[Format('A%d', [iNextRow])].Value := '条数合计(条)';
xlSheet.Range[Format('A%d:B%0:d', [iNextRow])].HorizontalAlignment := 7;
xlSheet.Range[Format('C%d', [iNextRow])].Value := FloatToStr(DBGridEh1.Columns[6].Footer.SumValue);
xlSheet.Range[Format('C%d:F%0:d', [iNextRow])].HorizontalAlignment := 7;
xlSheet.Range[Format('A%d:F%0:d', [iNextRow])].Font.Bold := true;
Inc(iNextRow);
xlSheet.Range[Format('A%d', [iNextRow])].Value := '重量合计(kg)';
xlSheet.Range[Format('A%d:B%0:d', [iNextRow])].HorizontalAlignment := 7;
xlSheet.Range[Format('C%d', [iNextRow])].Value := FloatToStr(DBGridEh1.Columns[7].Footer.SumValue);
xlSheet.Range[Format('C%d:F%0:d', [iNextRow])].HorizontalAlignment := 7;
xlSheet.Range[Format('A%d:F%0:d', [iNextRow])].Font.Bold := true;
end;

//根据类别输出数据到Excel
procedure ExportData(DataType: Byte);
begin
SQLCmd := Format('where DataType=%d ', [DataType]);
ADOQExport.SQL.Strings[4] := SQLCmd;
if ADOQExport.Active then ADOQExport.Requery else ADOQExport.Open;
ProgressBar1.StepIt;

if not ADOQExport.IsEmpty then begin
//标题
xlSheet.Range[Format('A%d', [iNextRow])].Value := DM.GetDataTypeStr(DataType);//将DataType转换为相应的文字显示
xlSheet.Range[Format('A%d:F%0:d', [iNextRow])].HorizontalAlignment := 7;
xlSheet.Range[Format('A%d:F%0:d', [iNextRow])].Font.Bold := true;
Inc(iNextRow);

xlQuery := xlSheet.QueryTables.Add(ADOQExport.Recordset ,xlSheet.Range[Format('A%d', [iNextRow])]);
xlQuery.FieldNames := false;
xlQuery.Refresh;
Inc(iNextRow, ADOQExport.RecordCount);
xlSheet.Range[Format('A%d', [iNextRow])].Value := DM.GetDataTypeStr(DataType) + '合计(条)';
xlSheet.Range[Format('A%d:B%0:d', [iNextRow])].HorizontalAlignment := 7;
xlSheet.Range[Format('C%d', [iNextRow])].Value := Format('=SUM(C%d:C%d)', [iNextRow-ADOQExport.RecordCount, iNextRow-1]);
xlSheet.Range[Format('D%d', [iNextRow])].Value := Format('=SUM(D%d:D%d)', [iNextRow-ADOQExport.RecordCount, iNextRow-1]);
xlSheet.Range[Format('A%d:F%0:d', [iNextRow])].Font.Bold := true;
Inc(iNextRow);
end;
ProgressBar1.StepIt;
end;

begin
Result := true;
ShowProgress(0, cbbDataType.KeyItems.Count*2+2, 0); //调用前面例子中的函数显示进度面板
Screen.Cursor := crHourGlass;
try try
//建立OLE对象
xlApp := CreateOleObject('Excel.Application');
xlBook := xlApp.Workbooks.Add;
xlSheet := xlBook.Worksheets['sheet1'];
xlApp.Visible := false;
ProgressBar1.StepIt;
//设置格式
ExcelSetDefaultFormat;
//输出标题内容
ExcelSetHeader;
ProgressBar1.StepIt;

//查询结果,导到EXCEL
for i:=0 to cbbDataType.KeyItems.Count-1 do //cbbDataType: TDBComboBoxEh
ExportData(StrToInt(cbbDataType.KeyItems.Strings[i]));
//输出汇总内容
ExcelSetSum;
//设置边框
xlSheet.Range[Format('A4:F%d', [iNextRow])].Borders.LineStyle := xlContinuous;
xlSheet.Cells.EntireColumn.AutoFit;
//输出页脚
ExcelSetFooter;
except
if not VarIsNull(xlApp) then
begin
xlApp.Quit;
xlApp.Disconnect;
xlApp := Unassigned;
xlApp := NULL;
end;
result := false;
Exit;
end;
finally
pnlShadow.Visible := false;
pnlProgress.Visible := false;
Screen.Cursor := crDefault;
xlSheet := Unassigned;
xlBook := Unassigned;
if not VarIsNull(xlApp) then begin
xlApp.Visible := true;
xlApp := Unassigned;
end;
if ADOQExport.Active then ADOQExport.Close;
end;
end;

Saturday, June 23, 2007

Contract translation(English to chinese)

Yesterday,one of my friends ,asked me to translate a contract for him, just becoz he is familiar with Education only, and i m having a job much closer to business.You know it is worth 500,000 US dollars,so i don't know have to help him and i still have to work on my task of project, so i just promised him that if he can not find other guy to help him i can only help him to do the rest of the translation during weekend.And now i am doing it , mostly ,the i had some business english during my collage,but it just for 2months , and did not use it too often, recently.So i have to remind all i learned during the collage.So it bring me back to the collage time,hehehe , so many words familiar."business Invioce" "all risks" "shipping point" "destination point" "contract period" "business days" "calendar days" ................so many things like this, i think it will make me get much of the business aera, though i wrote to my boss, that i will learn business deeply, since it becoz to truth aready and so quickly becoming.hehehe , you have to say , you wish it comes. it is the last weekend here i m in manila,hehe the time and days are under counted before i leave Philippines.Hope everyfriends here got happy.