Kiss The Rain

评分 0.00, 满分 5星 0 票 No comments

SQL Server日期格式的转换

评分 0.00, 满分 5星 0 票 No comments

SQL Server中文版的默认的日期字段datetime格式是yyyy-mm-dd Thh:mm:ss.mmm

例如:

select getdate()

2004-09-12 11:06:08.177

这对于在要不同数据库间转移数据或者习惯oracle日期格式YYYY-MM-DD HH24:MI:SS的人多少有些不方便.

SQL Server里面可能经常会用到的日期格式转换方法:

举例如下:

select CONVERT(varchar, getdate(), 120 )
2004-09-12 11:06:08

select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),’-‘,”),’ ‘,”),’:’,”)
20040912110608

select CONVERT(varchar(12) , getdate(), 111 )
2004/09/12

select CONVERT(varchar(12) , getdate(), 112 )
20040912

select CONVERT(varchar(12) , getdate(), 102 )
2004.09.12

不常用的日期格式转换方法:

select CONVERT(varchar(12) , getdate(), 101 )
09/12/2004

select CONVERT(varchar(12) , getdate(), 103 )
12/09/2004

select CONVERT(varchar(12) , getdate(), 104 )
12.09.2004

select CONVERT(varchar(12) , getdate(), 105 )
12-09-2004

select CONVERT(varchar(12) , getdate(), 106 )
12 09 2004

select CONVERT(varchar(12) , getdate(), 107 )
09 12, 2004

select CONVERT(varchar(12) , getdate(), 108 )
11:06:08

select CONVERT(varchar(12) , getdate(), 109 )
09 12 2004 1

select CONVERT(varchar(12) , getdate(), 110 )
09-12-2004

select CONVERT(varchar(12) , getdate(), 113 )
12 09 2004 1

select CONVERT(varchar(12) , getdate(), 114 )
11:06:08.177

Beauty

评分 0.00, 满分 5星 0 票 No comments

???

美军方研究”读心术” 有人担心技术用于审讯

评分 0.00, 满分 5星 0 票 No comments

新华网8月18日报道 “读心术”可能不再是魔幻小说中的幻想情节。美国一家高校宣布,美国军方出资数百万美元资助一项“读心术”研究课题。
军方和研究人员希望借助解读受伤战地士兵或中风病人的“心思”,帮助医生实施治疗。但一些人担心,这种技术被用于审问或支配他人想法。
“读心”
加利福尼亚大学欧文分校在官方网站发布消息,由这一高校专家领衔的研究小组获美国陆军400万美元经费,用于探索“读心术”。
美联社16日报道,相关专家打算借助脑电图(EEG)技术,用置于头皮上的电极监测人体脑电活动,确定人脑与计算机连通界面,从而解读患者的“心里话”以及他想对话的对象,有朝一日人们或许不借助于语言便可直接交流思想。
例如,一名受伤士兵内心所想可通过放在他头皮上的电极转换成电波,传送给电脑,由电脑识别系统加以破译,即“读出心思”。
专家希望今后进一步研发“心思认知”软件,使电脑可以直接解读或打印一个人的想法。
课题组组长、加州大学欧文分校认知科学系系主任迈克尔·德茨穆拉说,这种交流系统有望帮助战场上脑部受伤的士兵或瘫痪的中风患者实现与他人交流。
起步
专家强调,“读心术”研究尚且处于初级阶段。
德茨穆拉说:“让人随便想些什么,然后由我们解读他的心思,达到这个程度需要数年时间。”
课题组打算分阶段研发“读心术”系统。
专家最初将要求志愿者戴上电极帽,暗自选择研究人员出示的某个单词,心中默想。研究人员尝试分析大脑活动,“读出”志愿者所想的单词。专家打算随着研究进一步深入,让志愿者扩展思考范围,涉及更复杂内容。
弗吉尼亚州防务技术研究机构“全球安保”主管约翰·派克说,“读心术”研究刚刚起步,现阶段无法实际运用于军事领域。
他说:“它们仍处于理论验证阶段。”
担忧
课题经费来自美国国防部一项针对高校的研究资助项目,实施则由加州大学欧文分校、卡内基—梅隆大学和马里兰大学合作落实。
德茨穆拉说,他们期望研究成果今后可用于军事、医学和商业等多个领域。
但不少人担心,“读心术”研究如果获成功,可能遭不合理应用。
美联社报道,一些人担心这种技术用于审讯。另一些人担心,“读心术”会进一步用于支配人的想法。
研究者否认后一种说法,原因是应用这种技术的前提条件是人脑先产生想法。
德茨穆拉说:“如果没有人真实、主动地合作,就不会使用这种系统。”(王鑫方)

One in a Million

评分 0.00, 满分 5星 0 票 No comments

You’re one in a million, Oh now
You’re one in a million, Oh

Sometimes I can’t hate you every day
Sometimes you can fall for everyone you see
Only one can really make me stay
A sign from the sky
Said to me

You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us

I’ve been looking for that special one
And I’ve been searching for someone to give my love
And when I thought that all the hope was gone
You smile, there you were and I was gone

I always will remember how I felt that day
A feeling indescribable to me, Yeah
I always knew there was an answer for my prayer
And you, you’re the one for me

You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
I was cool and everything was possible
You tried to catch me but it wasn’t possible
Nobody could hurt me it was my game
Until I met you baby and went insane
And when you didn’t want me, I wanted you
Because the finer thing bout it was I like to go
I like it when its difficult I like it when it’s hard
You know it’s worth it if ya find your heart

You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million
You’re once in a lifetime
You made me discover one of the stars above us
You’re one in a million, Oh
You’re one in a million

Collection Art

评分 0.00, 满分 5星 0 票 No comments

Cat Basic Training

评分 0.00, 满分 5星 0 票 4 comments

Banish all thoughts of training your cat as you would a dog. Although it’s feasible at the hands of a professional trainer, it isn’t very practical or affordable. You will want your cat to behave well, though, and you should be able to stop him from such undesirable practices as jumping up on the table to join you at mealtimes. Your coexistence will be a lot more pleasant and fun if the cat can be persuaded to come when he is called and to sharpen his claws on a scratching post instead of shredding the furniture.

Training Strategies
Since cats, unlike dogs, rarely do things merely to please their owners, you will need a feline-based system of positive reinforcement and possibly some form of aversion stimulus in order to achieve a change in your cat’s behavior. The best way to encourage a cat to continue a behavior is with an immediate food reward, whether a full meal or a tasty treat. If at the same time you say, “Good!” the cat will come to associate the word with a positive event, even when food isn’t forthcoming. Anything your cat loves will also work — a good scratch behind the ears or a play session with a favorite toy may work as well as a food treat.

Many cat owners try to discourage their cats from undesirable behavior with sprays of water from a plant mister, loud shakers or any startling sound such as a hand clap or a whistle. If your cat is jumping onto the counter and you stop him by spritzing him with water, in actuality you are reinforcing jumping off the counter when the real problem is jumping onto it. While spritzing and other such methods can often discourage unwanted problems temporarily, they may also cause additional problems. Some cats actually like getting sprayed and chased. They think it’s a game. For them, spritzing provides positive reinforcement for the undesirable behavior, which is then likely to increase. Other cats, particularly those that tend to be excitable, are threatened by such methods and become defensive, which can lead to serious aggression problems. Aversion methods that don’t frighten or excite the cat are much safer. Putting sticky two-sided tape on the counter, for example, should provide enough discomfort for most cats to decide that the surface isn’t a fun place to explore. And this method works whether you are there to witness the behavior or not. When you are present and see the unwanted behavior beginning, say, “No!” in a stern tone; your cat may, after a while, obey the vocal command alone. Never hit your cat. Injury can result and physical punishment won’t change his behavior. The cat will simply become afraid of you and the stress may provoke further misbehavior. Reward your cat when he performs a desired behavior in place of the undesired one. Such a payoff will usually clinch the deal.

Some household items may simply be just too tempting for your cat to stay away from. Put up physical barriers to areas and surfaces you want your cat to avoid. For instance, if your cat is always getting into the garbage, you may have to get a container with a heavier or tighter-fitting lid. If he opens and enters cupboards, install childproof latches. After a while, the cat will probably lose interest in these forbidden locations and avoid them of his own accord.

“Come” Command
One of the most basic things you can teach your cat is to respond to his own name. Say his name out loud whenever you greet or pet him, repeating it often as you do things together. To train your cat to come to you when called, start by saying his name as you put down the food bowl. Then, begin calling his name at mealtime before you do anything that makes a noise the cat might associate with food, such as opening the refrigerator, using a can opener, or scooping dry food into his bowl. When the cat appears, reward him immediately.

Wearing a Leash or Harness
With perseverance and patience, you may be able to get your cat to accept wearing a harness, either to go for walks or to run around safely in the yard. Admittedly this undertaking is a lot easier to do if you start while the cat is still a kitten. Approach the wearing of the harness gradually, with food rewards each step along the way. Start by leaving the harness out on the floor so your cat can smell and become acquainted with it. Once the harness is no longer perceived as dangerous or threatening, place it on the cat’s back without fastening it. It may help to distract the cat with a treat until he gets used to the feel of the harness. As the cat begins to accept the apparatus, fasten it for a short period of time, taking it off immediately when the cat seems perturbed. Gradually increase the length of time you leave the harness on and only once the cat seems to have forgotten that it is there, add the leash. Let the cat walk around dragging the leash, making sure it doesn’t get caught on anything. Then, hold the end of the leash so the cat becomes used to feeling pressure on it. The final step is to familiarize your cat with the exciting, and possibly frightening, sights and sounds of the outdoors. Start off in your backyard or in a quiet area close to home, holding the leash tightly in case the cat tries to bolt. Gradually increase the length of these exercises until your cat is comfortable.

Cat Door
Installing a cat door will give your feline access to the outdoors whenever he wishes. But getting your cat to use it may require some encouragement. A cat door may make no sense to your cat at first; having to push open the flap with his head can be off-putting. Hold the door open and tempt the cat through the door by offering a treat on the other side. Once the cat jumps in and out of the opening at will, gradually close the flap, continuing to reward each exit and entrance.

A Wife’s Duty

评分 0.00, 满分 5星 0 票 No comments

A woman accompanied her husband to the doctor’s office. After his checkup , the doctor called the wife into his office alone. He told her, “Your husband is suffering from a very severe disease, combined with horrible stress . If you don’t do the following , your husband will surely die…Each morning, fix him a healthy breakfast. Be pleasant , and make sure he is in a good mood . For lunch make him a nutritious meal. For dinner prepare an especially nice meal for him. Don’t burden him with chores , as he probably had a hard day. Don’t discuss your problems with him, it will only make his stress worse . And most importantly, make love with your husband several times a week and satisfy his every whim . If you can do this for the next 10 months to a year, I think your husband will regain his health completely.”  On the way home, the husband asked his wife. “What did the doctor say?”  She replied, “You’re going to die”!