This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSData *)create2InchReceipt | |
{ | |
User *user = [User getInstance]; | |
NSMutableData *commands = [[NSMutableData alloc] init]; | |
[commands appendBytes:"\x1d\x57\x80\x31" | |
length:sizeof("\x1d\x57\x80\x31") - 1]; // Page Area Setting <GS> <W> nL nH (nL = 128, nH = 1) | |
[commands appendBytes:"\x1b\x61\x01" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Primus = require('primus.io'), | |
authParser = require('parse-bearer-token'), | |
config = require('../../../config'), | |
debug = require('debug')('myprimus'), | |
jwt = require('jsonwebtoken'); | |
function authCheck(token, req, done){ | |
jwt.verify(token, config.jwt_secret, function(err, decoded) { | |
if (err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Oclint < Formula | |
homepage 'http://oclint.org' | |
url 'http://archives.oclint.org/releases/0.8/oclint-0.8.1-x86_64-darwin-14.0.0.tar.gz' | |
version '0.8.1' | |
sha1 'c96d712c5b73e04eebb57c3a97dec2b4ecbb9ed4' | |
devel do | |
url 'http://archives.oclint.org/nightly/oclint-0.9.dev.603daa8-x86_64-darwin-14.4.0.tar.gz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Test run with parallel | |
import os | |
import platform | |
import json | |
import argparse | |
import re | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SchedulePanel < Netzke::Basepack::BorderLayoutPanel | |
js_property :header, false | |
def configuration | |
school_id = super[:school_id] || component_session[:selected_school_id].to_i | |
component_session[:selected_school_id] = school_id | |
subjects_store = Subject.order(:title).all.collect {|c|[c.id,c.title]} | |
school = School.find(school_id) | |
classroom_store = school.classrooms.order(:number,:letter).collect {|c|[c.id,c.title]} | |
period_store = school.type_period.periods.order(:title).collect {|c|[c.id,c.title]} | |
teacher_store = school.teachers.order(:full_name).map(&:full_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JournalPanel < Netzke::Basepack::BorderLayoutPanel | |
js_property :header, false | |
def configuration | |
school_id = super[:school_id] || component_session[:selected_school_id].to_i | |
component_session[:selected_school_id] = school_id | |
school = School.find(school_id) | |
classroom_store = school.classrooms.order(:number,:letter).collect {|c|[c.id,c.title]} | |
super.merge( | |
:tbar => [{xtype: 'tbtext', :text => "#{I18n.t(:journal)} - #{school.title}, #{I18n.t('activerecord.attributes.classroom.title')}: "}, ' ', | |
{:name => :classroom, :id => :classroom, :xtype => :combo, :editable => false, :trigger_action => :all, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Blackbumer | |
class JournalSubjectTabPanel < Netzke::Base | |
js_base_class "Ext.TabPanel" | |
def final_config | |
tabs = stored_tabs.map { |tab| {:layout => :fit, :name => tab[:name], :title => tab[:title], :items => [ tab[:name].to_sym.component]} } || [] | |
orig = super | |
orig.merge( | |
:items => tabs | |
) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ScheduleGrid < Netzke::Basepack::GridPanel | |
#.... | |
# i think it's too annoing click "add row" button if you add many rows in grid | |
# this addition to gridpanel allow you add a row automaticaly | |
# when you finished edit last row and hit tab or enter | |
js_method :walk_cells, <<-JS | |
function(row, col, step, fn, scope) { | |
var cell = #{js_full_class_name}.superclass.walkCells.apply(this, arguments); | |
if (!cell&&step>0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VoipRateApp < Netzke::Basepack::SimpleApp | |
def configuration | |
orig = super | |
orig.merge(:items => [{ | |
:region => :center, | |
:class_name => "Basepack::GridPanel", | |
:model => "Rate", | |
:enable_edit_in_form => false, | |
:rows_per_page => 50, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dashboard < Netzke::Base | |
ex = Netzke::Core.ext_path.join("examples/desktop/js") | |
js_include ex.join("Desktop.js"), ex.join("App.js") , ex.join("FitAllLayout.js"), ex.join("Module.js") | |
js_include ex.join("ShortcutModel.js"), ex.join("StartMenu.js"), ex.join("TaskBar.js"), ex.join("Wallpaper.js") | |
js_base_class "Ext.ux.desktop.App" | |
js_mixin :main | |
end |
OlderNewer