馬拉松配速  

 

簡單說明

擷取  

 

擷取  

輸入資訊後按下按鈕就可以針對全馬或是特定的距離來產生配速表

網址如下 http://www.marathonguide.com/fitnesscalcs/PaceBandCreator.cfm

文章標籤

湯瑪的吳 發表在 痞客邦 留言(1) 人氣()

最近遇到利用mvc開發的jquery mobile程式在sumbit或點選連結之後

無法執行form ready 或 init 的js程式碼

原因出在jquery mobile的ajax效果

目前找到的解決方法是將form sumbit或link加上data-ajax=flase的屬性

link 的語法參考如下:

<li>@Html.ActionLink("連結名稱", "VeiwName", "ControlName", null , new Dictionary<string, Object> { { "data-ajax", "false" } })</li>

form submit 的語法參考如下:

 @using (Html.BeginForm("VeiwName", "ControlName",

文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

return RedirectToAction("action", "controller", new { area = "area" });


文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

/* Loading JSON objects using JSONP */

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script>

<select id="deps" name="deps"></select>

<script>
 $.ajax({
     type: 'GET',
     url: 'http://a.b.c/api/func_name',

文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

bool a = Array.Exists(array, element => element == "perls");


文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

var fp = lnq.attaches.Where(a => a.sysid == sysid)
                 .Select(a => a.name)
                 .First();


文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

        $('input[type="checkbox"]').click(function() {
            if($(this).is(':checked') == true) {
                $('input[type="submit"]').removeAttr('disabled');
            } else {
                $('input[type="submit"]').attr('disabled','disabled');
            }
        });


文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()


WHERE datediff( d,getdate(),my_date) > 0 -- 取得my_date是今天以後的資料

WHERE datediff( d,my_date,getdate()) =
 1 -- 取得my_date是昨天的資料


文章標籤

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

需要在sql的where條件子句中過濾特定的條件判斷

例如:輸入空白時,該欄位將不進行條件的判斷

以下的例子,想找出在台灣的某都市中,該區的一些資訊
如果區的條件輸入空白時則略過該條件判斷

WHERE country = 'Taiwan'  AND city_no = @city_no AND

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

當資料從Controller傳送到View時,將跳行符號轉成Html的< br />

 資料來源 : 物件的屬性 或 要顯示的資料

  
@Html.Raw(Html.Encode(資料來源).Replace("\n", "< br />"))
 

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

1:Jquery的datetimepicker如果要將顯示出來的日期格式及輸入驗證改成 yyyy-mm-dd時
     例如  2012-10-11 ,請加入 dateFormat: 'yy-mm-dd'
 
2:在關閉datetiepicker UI時再次驗證是否輸入正確
    請利用 onClose: function() {$(this).valid();}
 

  $(function () {

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

專案:mvc4
動機:登錄畫面上新增學歷的DropDownList


1.建立學歷的models

public class EduDegree
{

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

條件需求:檢查資料庫某欄位是否有小寫(lower case)格式資料
欄位規定:該欄位只允許大寫格式(upper case)資料
發生原因:程式寫入資料庫欄位未做格式檢查或轉換


參考如下:

SELECT  user_id

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

後端程式:webservice取得由網頁送過來的String Array(JSON format)
網頁程式:jQuery+Ajax+JSON 送出checkbox所覆選的學號(JSON format)至webservice程式

資料轉換:利用 JSON.stringify來轉換成JSON format
var jsonText = JSON.stringify({ students: studs});

JSON format: { "students": ["No0001","No0002","No0003"]}

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()

網頁:jQuery+ajax取得Controller所送過來的後端資訊(JSON)
後台:MVC架構,利用Controller取得物件資訊並轉換成JSON format回傳至網頁
   
網頁前端程式1:
透過ajax送出{欄位:參數}資訊至Controller端
取得result值(JSON Format)後,透過timetable轉成Html格式課表

  $.ajax({

湯瑪的吳 發表在 痞客邦 留言(0) 人氣()