肖恩D++
Not Equal C && !=C && 不等于西-
久违的油价
Posted on November 26th, 2014 Add comments
7 views
-
iPhone Airdrop Wirelessly Share with “Contacts Only” Option
Posted on October 25th, 2014 Add commentsIf you have an AirDrop-capable iPhone, but can not detect any other devices when turn on the AirDrop with “Contacts Only” option, please following the steps below:
- Make sure your iPhone and the iDevice you want to connect are all AirDrop-capable. (No kidding, only iPhone 5 or later, iPad (4th generation or later), iPad mini, iPod touch (5th generation) are AirDrop-capable, other iDevice won’t work even you have iOS 7 upgraded)
- Add a new contact with name “me” (if you don’t have one), and add your iCloud email to this contact, make sure change the type of email field to be “iCloud” (very important).
- Repeat step 2 for the destination device with the owner’s iCloud email
- Swipe up from the bottom of your screen to show Control Center, tap AirDrop, choose “Contacts Only” option
- Find the content you are going to share from apps such as Photos, Safari, Contacts
- Tap the content you want to share, then tap “share” or the icon , you should be able to find the iDevice from your contacts
11 views
-
内存卡十年
Posted on July 8th, 2014 Add comments
4 views
-
jQuery $.ajax()/$.get() function always get same value for IE
Posted on June 19th, 2014 Add commentsWhen I was trying to use jQuery $.ajax() or $.get() function retrieve some random value from the server side, it’s working fine on firefox or chrome, but not IE. The server side code like below (written in ASP.NET MVC):
1234567public class HomeController : Controller{public ActionResult GetRandomCount(){return Json(new Random().Next(1, 100), JsonRequestBehavior.AllowGet);}}The client side code:
12345678<a href="javascript:void(0)" onclick="CheckCount()">Check Count</a><script>function CheckCount(){$.get('/Home/GetRandomCount', function (data) {alert(data);});}</script>I’m supposed to get a random number every time I click the link, but in IE, always same one returned. Regarding Craic Computing’s Blog, that’s because IE will cache the value first returned, and trade rest requests as identical by default, so it won’t update the value since the request URL never change.
To fix this issue, just disable cache in the jQuery function as following:12345678function CheckCount(){$.ajaxSetup ({cache: false});$.get('/Home/GetRandomCount', function (data) {alert(data);});}
16 views
-
五月八日散记
Posted on May 8th, 2014 Add comments
高高兴兴上班来,
一夜回到解放前。
遥望蜀道千重路,
身遮泪巾佯笑颜。
7 views
Recent Comments