-
iPhone维修记之喇叭
Posted on November 29th, 2012 Add comments晚上回家,突然发现iPhone的喇叭没有声音,更奇怪的是,来电话的时候铃声还是会响,单单是游戏和iPod功能没有一点声音,并且调节音量的时候,屏幕上只出现一个喇叭的标志,原先喇叭下面表示音量的一个个小方块也不见了。
网上搜了半天,有人说是因为硬件冲突,删除掉在/SYSTEM/Library/LaunchDaemons/下一个“com.apple.iapd.plist”的文件,就会解决这个问题,但某些iDevice的专用插座音响就不能使用了。貌似是个割肉的完美解决方案,但仔细想想,最近也没有在iPhone上有大动作,所谓的硬件冲突,从上次解剖iPhone 3GS的经验上看,由于iPhone的喇叭距离充电接口很近,也许是充电口短路从而造成硬件冲突。
一张卫生纸,一根牙签,用牙签裹着卫生纸清洁充电口。用这种原始方法掏出不少灰尘和橡胶套上的小颗粒,重启手机,声音竟然回来了。
14 views
-
Client Side Validation For DataType Attribute in ASP.NET MVC3
Posted on November 20th, 2012 Add commentsAfter Microsoft announced ADO.NET Entity Framework 4.1, database design becomes to very easy via Code First approach. And the DataType Attribute from “System.ComponentModel.DataAnnotations” namespace has been used very popular during Code First. Here are some examples:
12345678public class User{[DataType(DataType.EmailAddress)]public string UserEmail { get; set; }[DataType(DataType.Date)]public DateTime CreateDate { get; set; }}But be noticed, this validation of attribute only fires when you check “ModelState.IsValid” property in Controller or calling “SaveChanges()” in Entity Context, not in the client side. fortunately, JQuery has all the client side validation for those data types. So, the lazy way is just connect them together.
Read the rest of this entry »
642 views
Recent Comments