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 Diagnostic | |
class KeyInject | |
FILE = './shared/injected_keys.json' | |
def self.table_exist? | |
File.exists?(FILE) | |
end | |
def self.table | |
self.setup unless @table |
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 Diagnostic | |
class KeyInject | |
FILE = './shared/injected_keys.json' | |
def self.table_exist? | |
File.exists?(FILE) | |
end | |
def self.table | |
self.setup unless @table |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type middlewareResponse struct { | |
Received json.RawMessage `json:"received"` | |
AuthSent json.RawMessage `json:"auth_sent"` |
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
int main(void) | |
{ | |
mrbc_context *c; | |
mrb_state *mrb; | |
mrb_allocf allocf; | |
void *ud; | |
context_memprof_init(&allocf, &ud); | |
mrb = mrb_open_allocf(allocf, ud); |
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
<function name="fn_main"> | |
<cleandisplay /> | |
<integervariable value="0" variable="iReturn" /> | |
<integervariable value="0" variable="iIterator" /> | |
<stringvariable value="" variable="sReturn" /> | |
<inttostring variableinteger="$(iReturn)" variablestring="$(sReturn)" /> | |
<editfile filename="config.dat" key="touchscreen" value="1"/> |
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 ruby | |
module Hashname | |
def self.calc_hashname(name) | |
name.chars.inject(5381) do |hash, ch| | |
max_int = (hash << 5) + hash + ch.ord | |
self.force_overflow_unsigned(max_int) | |
end | |
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
def fn_translate_string_align(str) | |
columns = STDOUT.max_x | |
if str.size > columns | |
0 | |
else | |
((columns - str.size) / 2).to_i | |
end | |
end | |
def fn_show_message | |
unless @sMessage.to_s.strip.empty? |
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
<!-- fn_align_center --> | |
<function name="fn_align_center"> | |
<integervariable value="21" variable="iDisplayColumns"/> | |
<integervariable value="0" variable="iLenMessage"/> | |
<integervariable value="1" variable="iCharCount"/> | |
<integervariable value="0" variable="iSpaceCount"/> | |
<if variable="$(iIsPrint)" operator="equalto" value="1"> | |
<integervariable value="42" variable="iDisplayColumns" /> | |
<else /> |
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
def fn_align_center | |
@iDisplayColumns = Variable.create(21, self) | |
@iLenMessage = Variable.create(0, self) | |
@iCharCount = Variable.create(1, self) | |
@iSpaceCount = Variable.create(0, self) | |
if @iIsPrint.compare(Variable.create("equalto", self), Variable.create("1", self)) | |
@iDisplayColumns = Variable.create(42, self) | |
else | |
file_read_db(Variable.create("config.dat", self), Variable.create("model", self), @sDeviceModel) | |
string_find(@sSpecialScreenModels, @sDeviceModel, Variable.create("0", self), @iRet) |
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/python | |
# File Name: setup.py | |
# Created: 23-02-2011 | |
import sys | |
def main(argv): | |
"""main func""" | |
try: | |
from setuptools import setup |