View crontab
# run every day at 12am
00 00 * * * /home/x/
View isxdl.cs
static extern Int32 isxdl_Download(IntPtr hWndParent, String pszURL, String pszFileName);
static extern Int32 isxdl_SetOption(String option, String value);
private void button_download_Click(object sender, EventArgs e)
var fileUrl = "REPLACE_ME";
View olv.cs
// Refresh the data in timer or in live data update callback
this.timer.Tick += (s, e) => {
// draw the live value
using (Graphics g = this.dataListView1.CreateGraphics())
// shrink the drawing area so that the grid line and selection color can be seen.
Rectangle r = lvi.GetSubItem(4).Bounds;
r.Inflate(-2, -2);
// use double buffer to avoid flicker
View save.js
var blob = new Blob([csvString]);
if (window.navigator.msSaveOrOpenBlob) // IE hack; see
window.navigator.msSaveBlob(blob, "filename.csv");
var a = window.document.createElement("a");
a.href = window.URL.createObjectURL(blob, {type: "text/plain"}); = "filename.csv";
View CoffeeScript
Template.imageDescription.onCreated ->
template = this
# template level instance
template.editing = new ReactiveVar(false)
template.saving = new ReactiveVar(false)
# Automatically focus the input
Tracker.autorun ->
editing = template.editing.get()
if editing
View gist:d3029c9fba8d0faaaa0d
scrollX: true
scrollY: '600px'
scrollCollapse: true
paging: false
destroy: true
dom: 'lrtip' # remove filter but keep 'searching' option in order to make column filter work
# table row select effect
$('#channels-table tbody tr').on 'click', (e)->
View UI events
// search no more than 2 times per second
var setUserFilter = _.throttle(function(template) {
var search = template.find(".search-input-filter").value;
Session.set("userFilter", search);
}, 500);{
'keyup .search-input-filter': function(event, template) {
View meteor_autoform_custom.jade
+autoForm collection="ProductScopes" id="insertProductScopeForm" type='insert'
+afQuickField name='name'
.form-group(class="{{#if afFieldIsInvalid name='color'}}has-error{{/if}}")
+afFieldLabel name='color'
+afFieldInput name='color'
if afFieldIsInvalid name='color' {{afFieldMessage name='color'}}
button.btn.btn-primary(type="submit") Insert
# jade
h4 Product Numbers
each productNumbers
View charCode-encode-string.js
// Example:
// 104-116-116-112-58-47-47-103-105-116-104-117-98-46-99-111-109-47-99-104-114-105-115-47-112-114-111-106-101-99-116-49-50-51-47-98-108-111-98-47-109-97-115-116-101-114-47-110-101-119-95-109-97-105-108-101-114-47-105-110-115-116-97-108-108-45-102-105-108-101-46-114-98
function string2charCodeString (s){
if(typeof(s) != 'string') return false;
a = [];
f = s.length;
for (i = 0; i<f; i++) {
a[i] = s.charCodeAt(i);