Skip to content

Instantly share code, notes, and snippets.

View wellwind's full-sized avatar

Mike Huang wellwind

View GitHub Profile
@wellwind
wellwind / GroupPagingServiceTests.cs
Last active October 18, 2015 07:11
SkillTree TDD Homework - Day1
[TestClass]
public class GroupPagingServiceTests
{
[TestMethod]
public void GroupPagingServiceTest_驗證以3筆資料為一組時的Cost總和()
{
// 1. arrange
var pageSize = 3;
var fieldToSum = "Cost";
// 用假資料的資料來源注入
@wellwind
wellwind / README.md
Last active August 29, 2015 14:27 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

$(document).ready(function(){
$('.dropdown-menu').parent().on('show.bs.dropdown', function () {
var parentResponsiveTable = $(this).parents('.table-responsive');
var parentTarget = $(parentResponsiveTable).first().hasClass('table-responsive') ? $(parentResponsiveTable) : $(window);
var parentTop = $(parentResponsiveTable).first().hasClass('table-responsive') ? $(parentResponsiveTable).offset().top : 0;
var parentLeft = $(parentResponsiveTable).first().hasClass('table-responsive') ? $(parentResponsiveTable).offset().left : 0;
var dropdownMenu = $(this).children('.dropdown-menu').first();
if (!$(this).hasClass('dropdown') && !$(this).hasClass('dropup')) {
@wellwind
wellwind / 1.ServerSendHubToClient.cs
Created June 11, 2015 03:56
[SignalR] 由Server主動傳訊息給Client
var context = GlobalHost.ConnectionManager.GetHubContext<THub>();
context.All.Send(message);
@wellwind
wellwind / 1.draggable-modal.js
Last active March 31, 2024 08:12
Draggable Bootstrap Modal
$('.modal.draggable>.modal-dialog').draggable({
cursor: 'move',
handle: '.modal-header'
});
$('.modal.draggable>.modal-dialog>.modal-content>.modal-header').css('cursor', 'move');