code
stringlengths 3
1.01M
| repo_name
stringlengths 5
116
| path
stringlengths 3
311
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 3
1.01M
|
|---|---|---|---|---|---|
package com.normalexception.app.rx8club.fragment.utils;
/************************************************************************
* NormalException.net Software, and other contributors
* http://www.normalexception.net
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
************************************************************************/
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.ContextThemeWrapper;
import com.normalexception.app.rx8club.R;
public class UtilitiesDialog {
private AlertDialog.Builder builder = null;
private DialogInterface.OnClickListener listener = null;
private CharSequence[] utilitiesList = null;
private final int TITLE = R.string.menuUtilities;
/**
* Display a dialog that will contain some RX8
* specific utilities that users can use to diagnose
* issues
* @param ctx The source context
*/
public UtilitiesDialog(final Context ctx) {
builder = new AlertDialog.Builder(
new ContextThemeWrapper(ctx, R.style.AlertDialogCustom));
utilitiesList = ctx.getResources().getStringArray(R.array.utilities);
listener = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
switch(which) {
case 0:
Intent intent = new Intent(ctx, CompressionFragment.class);
ctx.startActivity(intent);
break;
case 1:
builder = new VinDecoderDialog(ctx);
builder.show();
break;
default: break;
}
}
};
}
/**
* Set up our items, and show the dialog
*/
public void show() {
// 2. Chain together various setter methods to set the dialog characteristics
builder.setItems(utilitiesList, listener)
.setTitle(TITLE);
// 3. Get the AlertDialog from create()
builder.create().show();
}
}
|
paimonsoror/RX8Club.com-Forum-Application
|
src/com/normalexception/app/rx8club/fragment/utils/UtilitiesDialog.java
|
Java
|
mit
| 2,935
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Keywords" content="北极熊投资管理有限公司" />
<meta name="Description" content="北极熊投资管理有限公司是一家崇尚深度价值投资的专业性投资管理公司。" />
<title>北极熊投资管理有限公司-投资理念</title>
<link href="/style/style-c.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php $this->load->view('fortune/common/sidebar', $this->load->_ci_cached_vars); ?>
<div id="main"><img src="/image/concept.jpg" width="980" height="200" /></div >
<div id="main1">
<div id="left"><div id="top"><span class="shu">投 资 理 念</span></div ><div id="middle"><a href="/fortune/concept" class="current1">投 资 理 念</a>
</div >
</div >
<div id="right"><div id="top"></div >
<div id="middle">
<p> 1)、优选企业:选择经营历史稳定或未来具有成长潜质的优秀龙头企业。</p>
<p><br />
2)、深度价值:寻找市场价格被错杀的深度低估企业进行适度分散化布局。</p>
<p><br />
3)、过激交易:主要交易实施在深度价值或过度高估的两个市场过激区域。</p>
<br />
</div >
</div >
</div >
<?php $this->load->view('fortune/common/footer', $this->load->_ci_cached_vars); ?>
</body>
</html>
|
xiaopihang/fortune
|
application/views/fortune/concept.php
|
PHP
|
mit
| 1,517
|
/*
* protos.h
* by WN @ May. 27, 2010
*/
#ifndef PROTOS_H
#define PROTOS_H
#ifndef ATTR_HIDDEN
# define ATTR_HIDDEN __attribute__((visibility ("hidden")))
#endif
#include <xasm/unistd_32.h>
#include "syscall_table.h"
/* provide prototypes of system call handlers */
extern int
trivial_pre_handler(struct pusha_regs * regs);
extern int
trivial_post_handler(struct pusha_regs * regs);
extern int
trivial_replay_handler(struct pusha_regs * regs);
#define __def_handler(name, pre, post, replay) \
extern int pre(struct pusha_regs * regs) ATTR_HIDDEN; \
extern int post(struct pusha_regs * regs) ATTR_HIDDEN; \
extern int replay(struct pusha_regs * regs) ATTR_HIDDEN;
#define def_trivial_handler(name)
#define def_handler(name) \
extern int post_##name(struct pusha_regs * regs) ATTR_HIDDEN; \
extern int replay_##name(struct pusha_regs * regs) ATTR_HIDDEN;
#define def_complex_handler(name) \
__def_handler(name, pre_##name, post_##name, replay_##name)
#include "handlers.h"
#undef def_complex_handler
#undef def_handler
#undef def_trivial_handler
#undef __def_handler
#endif
|
pi3orama/Snitchaser
|
src/arch/x86/interp/syscalls/protos.h
|
C
|
mit
| 1,097
|
function loadProjects(loadTarget) {
console.log(loadTarget);
$('.filter li').removeClass();
$('#filter-' + loadTarget).addClass('active');
var isLoaded = true;
switch (loadTarget) {
case 'all':
renderProjects(featured);
$('.load-more').removeClass('display-none');
$('.more-work').removeClass('isLoaded');
isLoaded = false;
break;
case 'all-more':
addProjects();
$('#filter-all').addClass('active');
break;
case 'design':
renderProjects(design);
break;
case 'dev':
renderProjects(dev);
break;
case 'hackathon':
renderProjects(hackathon);
break;
}
if (isLoaded) {
$('.load-more').addClass('display-none');
$('.more-work').addClass('isLoaded');
}
}
function renderProjects(projects) {
$('.js-project--container').html('');
$('.js-project--container').html(projects);
}
function addProjects() {
$('.js-project--container').append(all);
}
|
jayhxmo/jayhxmo.github.io
|
js/main.js
|
JavaScript
|
mit
| 910
|
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for details. -->
<cordova-panel id="camera" caption="Camera">
<cordova-group id="camera-options">
<cordova-radio id="camera-host">Use host system camera</cordova-radio>
<cordova-radio id="camera-prompt" checked="true">Prompt me for a file</cordova-radio>
<cordova-radio id="camera-sample">Use built-in sample file</cordova-radio>
<cordova-panel-row>
<cordova-radio id="camera-file" inline="true">Use this file:</cordova-radio>
<cordova-button id="camera-choose-filename">Choose File
</cordova-button>
</cordova-panel-row>
<cordova-file hidden="true" id="camera-filename"></cordova-file>
<img id="camera-img" style="width: 100%; margin-top: 10px; display: none;" src="">
</cordova-group>
</cordova-panel>
|
guillaumejenkins/taco-simulate-server
|
src/plugins/cordova-plugin-camera/sim-host-panels.html
|
HTML
|
mit
| 946
|
require('dotenv').config();
const api_key = process.env.MAILGUN_API_KEY;
const domain = process.env.MAILGUN_DOMAIN;
const mailgun = require('mailgun-js')({apiKey: api_key, domain: domain});
const list = mailgun.lists('subscriberlist@example.com');
const data = {
from: 'Dylan <me@me.com>',
to: 'dylantoyne@gmail.com',
subject: 'Testing',
text: 'Testing, Testing, Testing'
};
list.info((err, data) => {
// 'data' is mailing list info
console.log(data);
});
let user = {
subscribed: true,
address: 'dylantoyne@gmail.com',
name: 'Dylan',
moreInfo: {age: 24}
};
list.members().create(bob, ((err, data) => {
// 'data is the members details'
console.log(data);
});
list.members().list((err, members) => {
console.log(members);
});
list.members('dylan@gmail.com').update({name: 'John' }, (err, body) => {
console.log(body);
});
mailgun.lists('dylan@gmail.com').members().add({ members: members, subscribed: true }, (err, body) => {
console.log(body);
});
const sendMail = (id, email) => {
mailgun.messages().send(data(id, email), (error, body) => {
if(error) {
console.log(error)
}
console.log(`Sending the email to ${email}. Email content: ${body}`);
})
};
module.exports = sendMail;
|
Dtoyne/open-minds
|
server/email.js
|
JavaScript
|
mit
| 1,276
|
require File.join(File.dirname(__FILE__), '..', 'test_helper')
# class MyClassTest < GUnit::TestCase
# groundwork "Some fixtures should be created here"
#
# context "An instance of MyClass"
# groundwork "renamed" do
# @foo.rename("the foo")
# end
# end
# end
class GUnit::GroundworkTest < Test::Unit::TestCase
def setup
@groundwork1 = GUnit::Groundwork.new
end
def test_it_is_a_groundwork
assert @groundwork1.is_a?(GUnit::Groundwork)
end
def test_has_default_message
assert_not_nil @groundwork1.message
assert_equal 'Groundwork', @groundwork1.message
end
def test_message_setter
message = "Groundwork some code"
@groundwork1.message = message
assert_equal message, @groundwork1.message
end
# Groundwork.new('some feature')
def test_initialize_with_one_arg
message = 'some feature'
@groundwork2 = GUnit::Groundwork.new(message)
assert @groundwork2.message === message
end
# Groundwork.new('some feature'){ @foo = "bar" }
def test_initialize_with_one_arg_and_block
message = 'some feature'
task = (@foo = "bar")
@groundwork2 = GUnit::Groundwork.new(message) { (@foo = "bar") }
assert message === @groundwork2.message
assert task === @groundwork2.task.call
end
def test_run_with_task_called_returns_true
@groundwork1.task = Proc.new { true }
response = @groundwork1.run
assert response === true
end
def test_run_with_task_called_returns_false
@groundwork1.task = Proc.new { false }
response = @groundwork1.run
assert response === true
end
def test_run_with_task_is_false
@groundwork1.task = false
response = @groundwork1.run
assert response === true
end
def test_run_with_task_is_nil
@groundwork1.task = nil
response = @groundwork1.run
assert response === true
end
def test_run_with_assertion_failure_exception
@groundwork1.task = lambda { raise GUnit::AssertionFailure }
response = @groundwork1.run
assert response.is_a?(GUnit::TestResponse)
assert response.is_a?(GUnit::FailResponse)
end
def test_run_with_random_exception
@groundwork1.task = lambda { raise 'Boom' }
response = @groundwork1.run
assert response.is_a?(GUnit::TestResponse)
assert response.is_a?(GUnit::ExceptionResponse)
end
def test_run_with_binding
obj = Object.new
obj.instance_variable_set("@foo", "bar")
@groundwork1.task = Proc.new { instance_variable_set("@foo", "zip") }
@groundwork1.run
assert_equal "bar", obj.instance_variable_get("@foo")
@groundwork1.run(obj)
assert_equal "zip", obj.instance_variable_get("@foo")
end
end
|
gsterndale/GUnit
|
test/unit/groundwork_test.rb
|
Ruby
|
mit
| 2,692
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- vim:set ts=4 sw=4 sts=4 noet: */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "flint/utf8string.h"
#include <libxml/xmlmemory.h>
#define BOOST_TEST_MODULE test_trim
#include "test.h"
struct F {
F()
: s(nullptr)
, t(nullptr)
, e(nullptr)
{}
~F() {
xmlFree(s);
xmlFree(e);
}
void CheckTrim(const char *input, const char *expected) {
s = xmlCharStrdup(input);
BOOST_CHECK_EQUAL(Trim(s, &t), 1);
BOOST_CHECK(t != nullptr);
e = xmlCharStrdup(expected);
BOOST_CHECK(xmlStrEqual(t, e));
}
xmlChar *s;
xmlChar *t;
xmlChar *e;
};
BOOST_FIXTURE_TEST_SUITE(test_trim, F)
BOOST_AUTO_TEST_CASE(as_is)
{
CheckTrim("as is", "as is");
}
BOOST_AUTO_TEST_CASE(empty)
{
CheckTrim("", "");
}
BOOST_AUTO_TEST_CASE(space_only)
{
CheckTrim(" \r\n\t", "");
}
BOOST_AUTO_TEST_CASE(left)
{
CheckTrim(" foo bar", "foo bar");
}
BOOST_AUTO_TEST_CASE(right)
{
CheckTrim("Okinawa, Japan\n", "Okinawa, Japan");
}
BOOST_AUTO_TEST_CASE(both)
{
CheckTrim(" test ", "test");
}
BOOST_AUTO_TEST_SUITE_END()
|
flintproject/Flint
|
test/flint/test-trim.cc
|
C++
|
mit
| 1,108
|
package net.bartushk.picletest.Filter;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
import net.bartushk.picle.Program;
public class BaseFilterTest
{
public Mat catImage;
public BaseFilterTest(){
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
String path = Program.class.getResource("/images/cat1.jpeg").getPath();
catImage = Imgcodecs.imread(path);
}
}
|
bartushk/picle
|
src/test/java/net/bartushk/picletest/Filter/BaseFilterTest.java
|
Java
|
mit
| 444
|
rspec_dir = File.dirname(__FILE__)
$LOAD_PATH.unshift(File.join(rspec_dir, '..', 'lib'))
$LOAD_PATH.unshift(rspec_dir)
require 'rspec'
require 'whoops_logger'
require 'fakeweb'
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{rspec_dir}/support/**/*.rb"].each {|f| require f}
WhoopsLogger.config.set(File.join(rspec_dir, "fixtures", "whoops_logger.yml"))
|
flyingmachine/whoops_logger
|
spec/spec_helper.rb
|
Ruby
|
mit
| 421
|
/**
* @author Toru Nagashima
* @copyright 2016 Toru Nagashima. All rights reserved.
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
generate: require("./lib/generate"),
createFixer: require("./lib/fixer"),
}
|
mysticatea/appcache-manifest
|
index.js
|
JavaScript
|
mit
| 263
|
define([
'../core',
'../var/rnotwhite',
'./accepts'
], function (jQuery, rnotwhite) {
function Data () {
// Support: Android<4,
// Old WebKit does not have Object.preventExtensions/freeze method,
// return new empty object instead with no [[set]] accessor
Object.defineProperty(this.cache = {}, 0, {
get: function () {
return {}
}
})
this.expando = jQuery.expando + Data.uid++
}
Data.uid = 1
Data.accepts = jQuery.acceptData
Data.prototype = {
key: function (owner) {
// We can accept data for non-element nodes in modern browsers,
// but we should not, see #8335.
// Always return the key for a frozen object.
if (!Data.accepts(owner)) {
return 0
}
var descriptor = {}
// Check if the owner object already has a cache key
var unlock = owner[this.expando]
// If not, create one
if (!unlock) {
unlock = Data.uid++
// Secure it in a non-enumerable, non-writable property
try {
descriptor[this.expando] = { value: unlock }
Object.defineProperties(owner, descriptor)
// Support: Android<4
// Fallback to a less secure definition
} catch (e) {
descriptor[this.expando] = unlock
jQuery.extend(owner, descriptor)
}
}
// Ensure the cache object
if (!this.cache[unlock]) {
this.cache[unlock] = {}
}
return unlock
},
set: function (owner, data, value) {
var prop
// There may be an unlock assigned to this node,
// if there is no entry for this "owner", create one inline
// and set the unlock as though an owner entry had always existed
var unlock = this.key(owner)
var cache = this.cache[unlock]
// Handle: [ owner, key, value ] args
if (typeof data === 'string') {
cache[data] = value
// Handle: [ owner, { properties } ] args
} else {
// Fresh assignments by object are shallow copied
if (jQuery.isEmptyObject(cache)) {
jQuery.extend(this.cache[unlock], data)
// Otherwise, copy the properties one-by-one to the cache object
} else {
for (prop in data) {
cache[prop] = data[prop]
}
}
}
return cache
},
get: function (owner, key) {
// Either a valid cache is found, or will be created.
// New caches will be created and the unlock returned,
// allowing direct access to the newly created
// empty data object. A valid owner object must be provided.
var cache = this.cache[this.key(owner)]
return key === undefined
? cache : cache[key]
},
access: function (owner, key, value) {
var stored
// In cases where either:
//
// 1. No key was specified
// 2. A string key was specified, but no value provided
//
// Take the "read" path and allow the get method to determine
// which value to return, respectively either:
//
// 1. The entire cache object
// 2. The data stored at the key
//
if (key === undefined ||
((key && typeof key === 'string') && value === undefined)) {
stored = this.get(owner, key)
return stored !== undefined
? stored : this.get(owner, jQuery.camelCase(key))
}
// [*]When the key is not a string, or both a key and value
// are specified, set or extend (existing objects) with either:
//
// 1. An object of properties
// 2. A key and value
//
this.set(owner, key, value)
// Since the "set" path can have two possible entry points
// return the expected data based on which path was taken[*]
return value !== undefined ? value : key
},
remove: function (owner, key) {
var i; var name; var camel
var unlock = this.key(owner)
var cache = this.cache[unlock]
if (key === undefined) {
this.cache[unlock] = {}
} else {
// Support array or space separated string of keys
if (jQuery.isArray(key)) {
// If "name" is an array of keys...
// When data is initially created, via ("key", "val") signature,
// keys will be converted to camelCase.
// Since there is no way to tell _how_ a key was added, remove
// both plain key and camelCase key. #12786
// This will only penalize the array argument path.
name = key.concat(key.map(jQuery.camelCase))
} else {
camel = jQuery.camelCase(key)
// Try the string as a key before any manipulation
if (key in cache) {
name = [key, camel]
} else {
// If a key with the spaces exists, use it.
// Otherwise, create an array by matching non-whitespace
name = camel
name = name in cache
? [name] : (name.match(rnotwhite) || [])
}
}
i = name.length
while (i--) {
delete cache[name[i]]
}
}
},
hasData: function (owner) {
return !jQuery.isEmptyObject(
this.cache[owner[this.expando]] || {}
)
},
discard: function (owner) {
if (owner[this.expando]) {
delete this.cache[owner[this.expando]]
}
}
}
return Data
})
|
luoyjx/gaoqi-blog
|
public/lib/jquery/src/data/Data.js
|
JavaScript
|
mit
| 5,422
|
package argparse
// Copyright (c) 2017 by Gilbert Ramirez <gram@alumni.rice.edu>
import (
"fmt"
"io"
"os"
)
type ArgumentParser struct {
// If this is set, instead of printing the help statement,
// when --help is requested, to os.Stdout, the output goes here.
Stdout io.Writer
// If this is set, instead of printing the usage statement,
// when a ParseErr is encountered, to os.Stderr, the output goes here.
Stderr io.Writer
// Allow the user to modify strings produced by argparse.
// This is essential for i18n
Messages Messages
// The switch strings that can invoke help
HelpSwitches []string
// The root Command object.
Root *Command
// The first time a parse is run, a finalization step need to be
// performed to fill out inherited Arguments. This flag ensures
// we do that only once.
finalized bool
}
// Create a new ArgumentParser, with the Command as its root Command
func New(cmd *Command) *ArgumentParser {
ap := &ArgumentParser{
Stdout: os.Stdout,
Stderr: os.Stderr,
Messages: DefaultMessages_en,
HelpSwitches: []string{"-h", "--help"},
Root: cmd,
}
cmd.init(nil, ap)
if cmd.Name == "" {
cmd.Name = os.Args[0]
}
return ap
}
// Add an argument to the root command
func (self *ArgumentParser) Add(arg *Argument) {
self.Root.Add(arg)
}
// Add a command to the root command
func (self *ArgumentParser) New(c *Command) *Command {
return self.Root.New(c)
}
// Parse the os.Argv arguments and return, having filled out Values.
// On a request for help (-h), print the help and exit with os.Exit(0).
// On a user input error, print the error message and exit with os.Exit(1).
func (self *ArgumentParser) Parse() {
results := self.parseArgv(os.Args[1:])
cmd := results.triggeredCommand
if results.helpRequested {
helpString := self.helpString(cmd, results.ancestorCommands)
fmt.Fprintln(self.Stdout, helpString)
os.Exit(0)
} else if results.parseError != nil {
fmt.Fprintln(self.Stderr, results.parseError.Error())
os.Exit(1)
}
if cmd.Function != nil {
err := cmd.Function(cmd, cmd.Values)
if err != nil {
fmt.Fprintln(self.Stderr, err.Error())
os.Exit(1)
}
}
}
// Parse the os.Argv arguments, call the Function for the triggered
// Command, and then exit. An error returned from the Function causes us
// to exit with 1, otherwise, exit with 0.
// On a request for help (-h), print the help and exit with os.Exit(0).
// On a user input error, print the error message and exit with os.Exit(1).
func (self *ArgumentParser) ParseAndExit() {
self.Parse()
os.Exit(0)
}
func (self *ArgumentParser) parseArgv(argv []string) *parseResults {
parser := parserState{}
results := parser.runParser(self, argv)
return results
}
|
gilramir/argparse
|
v2/argparse.go
|
GO
|
mit
| 2,735
|
package models
import (
"time"
"encoding/json"
"fmt"
"github.com/go-xorm/xorm"
api "github.com/gogits/go-gogs-client"
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/pkg/setting"
"github.com/gogits/gogs/pkg/sync"
gouuid "github.com/satori/go.uuid"
log "gopkg.in/clog.v1"
)
var ServiceQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength)
type ServiceType int
const (
JENKINS ServiceType = iota + 1
)
type ServiceStatus int
const (
SERVICE_STATUS_NONE = iota
SERVICE_STATUS_SUCCEED
SERVICE_STATUS_FAILED
)
var serviceTypes = map[string]ServiceType{
"jenkins": JENKINS,
}
// ToHookTaskType returns HookTaskType by given name.
func ToServiceType(name string) ServiceType {
return serviceTypes[name]
}
func (t ServiceType) Name() string {
switch t {
case JENKINS:
return "jenkins"
}
return ""
}
type ServiceConfig struct {
ID int64
Type ServiceType
RepoID int64
OrgID int64
Name string `xorm:"-"`
ConfigContent string `xorm:"TEXT"`
IsActive bool
Created time.Time `xorm:"-"`
CreatedUnix int64
Updated time.Time `xorm:"-"`
UpdatedUnix int64
LastStatus ServiceStatus
*HookEvent `xorm:"-"`
}
func (sc *ServiceConfig) BeforeInsert() {
sc.CreatedUnix = time.Now().Unix()
sc.UpdatedUnix = sc.CreatedUnix
}
func (sc *ServiceConfig) BeforeUpdate() {
sc.UpdatedUnix = time.Now().Unix()
}
func (sc *ServiceConfig) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {
case "created_unix":
sc.Created = time.Unix(sc.CreatedUnix, 0).Local()
case "updated_unix":
sc.Updated = time.Unix(sc.UpdatedUnix, 0)
case "type":
sc.Name = sc.Type.Name()
case "config_content":
sc.HookEvent = &HookEvent{}
if err = json.Unmarshal([]byte(sc.ConfigContent), sc.HookEvent); err != nil {
log.Error(3, "Unmarshal [%d]: %v", sc.ID, err)
}
}
}
// HasCreateEvent returns true if hook enabled create event.
func (w *ServiceConfig) HasCreateEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.Create)
}
// HasDeleteEvent returns true if hook enabled delete event.
func (w *ServiceConfig) HasDeleteEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.Delete)
}
// HasForkEvent returns true if hook enabled fork event.
func (w *ServiceConfig) HasForkEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.Fork)
}
// HasPushEvent returns true if hook enabled push event.
func (w *ServiceConfig) HasPushEvent() bool {
return w.PushOnly || w.SendEverything ||
(w.ChooseEvents && w.HookEvents.Push)
}
// HasIssuesEvent returns true if hook enabled issues event.
func (w *ServiceConfig) HasIssuesEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.Issues)
}
// HasIssueCommentEvent returns true if hook enabled issue comment event.
func (w *ServiceConfig) HasIssueCommentEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.IssueComment)
}
// HasPullRequestEvent returns true if hook enabled pull request event.
func (w *ServiceConfig) HasPullRequestEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.PullRequest)
}
// HasReleaseEvent returns true if hook enabled release event.
func (w *ServiceConfig) HasReleaseEvent() bool {
return w.SendEverything ||
(w.ChooseEvents && w.HookEvents.Release)
}
func GetConfiguration(serviceType ServiceType, repositoryID int64) (*ServiceConfig, error) {
return getConfiguration(&ServiceConfig{
Type: serviceType,
RepoID: repositoryID,
})
}
func CreateConfiguration(config *ServiceConfig, content interface{}) (*ServiceConfig, error) {
data, err := json.Marshal(content)
if err != nil {
return config, err
}
config.ConfigContent = string(data)
_, err = x.Insert(config)
return config, err
}
func UpdateConfiguration(config *ServiceConfig, content interface{}) (*ServiceConfig, error) {
data, err := json.Marshal(content)
if err != nil {
return config, err
}
config.ConfigContent = string(data)
_, err = x.AllCols().Update(config)
return config, err
}
func getConfiguration(bean *ServiceConfig) (*ServiceConfig, error) {
has, err := x.Get(bean)
if err != nil {
return nil, err
} else if !has {
return nil, errors.ConfigurationNotExist{Type: bean.Type.Name(), RepositoryID: bean.RepoID}
}
return bean, nil
}
func GetServicesByRepoID(repoID int64) ([]*ServiceConfig, error) {
services := make([]*ServiceConfig, 0, 5)
return services, x.Find(&services, &ServiceConfig{RepoID: repoID})
}
func GetAllServicesByRepoID(repoID int64) ([]*ServiceConfig, error) {
services := make([]*ServiceConfig, 0, 5)
err := x.Find(&services, &ServiceConfig{RepoID: repoID})
if err != nil {
return nil, err
}
allServices := make([]*ServiceConfig, len(serviceTypes))
index := 0
for _, i := range serviceTypes {
found := false
for _, s := range services {
if i == s.Type {
allServices[index] = s
found = true
}
}
if !found {
srvCfg := ServiceConfig{Name: i.Name()}
allServices[index] = &srvCfg
}
index++
}
return allServices, nil
}
// HookTask represents a hook task.
type ServiceTask struct {
ID int64
RepoID int64 `xorm:"INDEX"`
ConfigID int64
Config *ServiceConfig `xorm:"-"`
UUID string
URL string `xorm:"TEXT"`
Signature string `xorm:"TEXT"`
api.Payloader `xorm:"-"`
PayloadContent string `xorm:"TEXT"`
JenkinsJobName string
EventType HookEventType
ServiceType ServiceType
IsSSL bool
IsDelivered bool
Delivered int64
DeliveredString string `xorm:"-"`
// History info.
IsSucceed bool
RequestContent string `xorm:"TEXT"`
RequestInfo *HookRequest `xorm:"-"`
ResponseContent string `xorm:"TEXT"`
ResponseInfo *HookResponse `xorm:"-"`
}
func (t *ServiceTask) BeforeUpdate() {
if t.RequestInfo != nil {
t.RequestContent = t.MarshalJSON(t.RequestInfo)
}
if t.ResponseInfo != nil {
t.ResponseContent = t.MarshalJSON(t.ResponseInfo)
}
}
func (t *ServiceTask) AfterSet(colName string, _ xorm.Cell) {
var err error
switch colName {
case "delivered":
t.DeliveredString = time.Unix(0, t.Delivered).Format("2006-01-02 15:04:05 MST")
case "request_content":
if len(t.RequestContent) == 0 {
return
}
t.RequestInfo = &HookRequest{}
if err = json.Unmarshal([]byte(t.RequestContent), t.RequestInfo); err != nil {
log.Error(3, "Unmarshal[%d]: %v", t.ID, err)
}
case "response_content":
if len(t.ResponseContent) == 0 {
return
}
t.ResponseInfo = &HookResponse{}
if err = json.Unmarshal([]byte(t.ResponseContent), t.ResponseInfo); err != nil {
log.Error(3, "Unmarshal [%d]: %v", t.ID, err)
}
}
}
func (t *ServiceTask) MarshalJSON(v interface{}) string {
p, err := json.Marshal(v)
if err != nil {
log.Error(3, "Marshal [%d]: %v", t.ID, err)
}
return string(p)
}
// History returns history of webhook by given conditions.
func (w *ServiceConfig) History(page int) ([]*ServiceTask, error) {
return ServiceTasks(w.ID, page)
}
// HookTasks returns a list of hook tasks by given conditions.
func ServiceTasks(configID int64, page int) ([]*ServiceTask, error) {
tasks := make([]*ServiceTask, 0, setting.Webhook.PagingNum)
return tasks, x.Limit(setting.Webhook.PagingNum, (page-1)*setting.Webhook.PagingNum).Where("config_id=?", configID).Desc("id").Find(&tasks)
}
// getActiveWebhooksByRepoID returns all active webhooks of repository.
func getActiveServicesByRepoID(e Engine, repoID int64) ([]*ServiceConfig, error) {
webhooks := make([]*ServiceConfig, 0, 5)
return webhooks, e.Where("repo_id = ?", repoID).And("is_active = ?", true).Find(&webhooks)
}
// getActiveWebhooksByOrgID returns all active webhooks for an organization.
func getActiveServicesByOrgID(e Engine, orgID int64) ([]*ServiceConfig, error) {
ws := make([]*ServiceConfig, 0, 3)
return ws, e.Where("org_id=?", orgID).And("is_active=?", true).Find(&ws)
}
func prepareServices(e Engine, repo *Repository, event HookEventType, p api.Payloader) error {
webhooks, err := getActiveServicesByRepoID(e, repo.ID)
if err != nil {
return fmt.Errorf("getActiveServicesByRepoID [%d]: %v", repo.ID, err)
}
// check if repo belongs to org and append additional webhooks
if repo.mustOwner(e).IsOrganization() {
// get hooks for org
orgws, err := getActiveServicesByOrgID(e, repo.OwnerID)
if err != nil {
return fmt.Errorf("getActiveServicesByOrgID [%d]: %v", repo.OwnerID, err)
}
webhooks = append(webhooks, orgws...)
}
return prepareServiceTasks(e, repo, event, p, webhooks)
}
// prepareHookTasks adds list of webhooks to task queue.
func prepareServiceTasks(e Engine, repo *Repository, event HookEventType, p api.Payloader, webhooks []*ServiceConfig) (err error) {
if len(webhooks) == 0 {
return nil
}
var payloader api.Payloader
for _, w := range webhooks {
switch event {
case HOOK_EVENT_CREATE:
if !w.HasCreateEvent() {
continue
}
case HOOK_EVENT_DELETE:
if !w.HasDeleteEvent() {
continue
}
case HOOK_EVENT_FORK:
if !w.HasForkEvent() {
continue
}
case HOOK_EVENT_PUSH:
if !w.HasPushEvent() {
continue
}
case HOOK_EVENT_ISSUES:
if !w.HasIssuesEvent() {
continue
}
case HOOK_EVENT_ISSUE_COMMENT:
if !w.HasIssueCommentEvent() {
continue
}
case HOOK_EVENT_PULL_REQUEST:
if !w.HasPullRequestEvent() {
continue
}
case HOOK_EVENT_RELEASE:
if !w.HasReleaseEvent() {
continue
}
}
payloader = p
hookTask := &ServiceTask{
RepoID: repo.ID,
ConfigID: w.ID,
Payloader: payloader,
EventType: event,
ServiceType: w.Type,
}
if err = createServiceTask(e, hookTask); err != nil {
return fmt.Errorf("createHookTask: %v", err)
}
}
// It's safe to fail when the whole function is called during hook execution
// because resource released after exit. Also, there is no process started to
// consume this input during hook execution.
go ServiceQueue.Add(repo.ID)
return nil
}
//runServiceTask by manually
func runServiceTask(repo *Repository, payloader api.Payloader, w *ServiceConfig, jobName string) (task *ServiceTask, err error) {
task = &ServiceTask{
RepoID: repo.ID,
ConfigID: w.ID,
Payloader: payloader,
EventType: HOOK_EVENT_PUSH,
ServiceType: w.Type,
JenkinsJobName: jobName,
}
if err = createServiceTask(x, task); err != nil {
return nil, fmt.Errorf("createHookTask: %v", err)
}
go ServiceQueue.Add(repo.ID)
// It's safe to fail when the whole function is called during hook execution
// because resource released after exit. Also, there is no process started to
// consume this input during hook execution.
return task, nil
}
func createServiceTask(e Engine, t *ServiceTask) error {
data, err := t.Payloader.JSONPayload()
if err != nil {
return err
}
t.UUID = gouuid.NewV4().String()
t.PayloadContent = string(data)
_, err = e.Insert(t)
return err
}
// UpdateHookTask updates information of hook task.
func UpdateServiceTask(t *ServiceTask) error {
_, err := x.Id(t.ID).AllCols().Update(t)
return err
}
// UpdateHookTask updates information of hook task.
func UpdateServiceConfig(t *ServiceConfig) error {
_, err := x.Id(t.ID).AllCols().Update(t)
return err
}
// getWebhook uses argument bean as query condition,
// ID must be specified and do not assign unnecessary fields.
func getService(bean *ServiceConfig) (*ServiceConfig, error) {
has, err := x.Get(bean)
if err != nil {
return nil, err
} else if !has {
return nil, errors.New("Service don't exist ")
}
return bean, nil
}
// GetServiceByID returns webhook by given ID.
// Use this function with caution of accessing unauthorized webhook,
// which means should only be used in non-user interactive functions.
func GetServiceByID(id int64) (*ServiceConfig, error) {
return getService(&ServiceConfig{
ID: id,
})
}
func (t *ServiceTask) deliver() {
var delivery ServiceDelivery
switch t.ServiceType {
case JENKINS:
delivery = ToJenkinsServiceConfigLoad(t.Config)
}
if delivery != nil {
delivery.Deliver(t)
}
}
func DeliverServices() {
tasks := make([]*ServiceTask, 0, 10)
x.Where("is_delivered = ?", false).Iterate(new(ServiceTask),
func(idx int, bean interface{}) error {
t := bean.(*ServiceTask)
config, _ := GetServiceByID(t.ConfigID)
t.Config = config
t.deliver()
tasks = append(tasks, t)
return nil
})
// Update hook task status.
for _, t := range tasks {
if err := UpdateServiceTask(t); err != nil {
log.Error(4, "UpdateServiceTask [%d]: %v", t.ID, err)
}
}
// Start listening on new hook requests.
for repoID := range ServiceQueue.Queue() {
log.Trace("ServiceTask [repo_id: %v]", repoID)
ServiceQueue.Remove(repoID)
tasks = make([]*ServiceTask, 0, 5)
if err := x.Where("repo_id = ?", repoID).And("is_delivered = ?", false).Find(&tasks); err != nil {
log.Error(4, "Get repository [%s] service tasks: %v", repoID, err)
continue
}
for _, t := range tasks {
config, _ := GetServiceByID(t.ConfigID)
t.Config = config
t.deliver()
if err := UpdateServiceTask(t); err != nil {
log.Error(4, "UpdateServiceTask [%d]: %v", t.ID, err)
continue
}
}
}
}
func InitServices() {
go DeliverServices()
}
type ServiceDelivery interface {
Deliver(task *ServiceTask) error
}
|
dancewing/gogs
|
models/service_config.go
|
GO
|
mit
| 13,354
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Payment extends CI_Controller {
public function __construct()
{
parent::__construct();
$id = (int) $this->session->userdata('adminid');
if ($id === 0)
redirect(base_url());
}
public function index($establid = '')
{
$this->load->model('paymentmodel');
$this->form_validation->set_rules('start_date', 'Start Date', 'required');
$this->form_validation->set_rules('end_date', 'End Date', 'required');
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
$data['estab'] = $this->paymentmodel->establishmentList();
if ($this->form_validation->run() == FALSE)
{
$data['payment'] = $this->paymentmodel->all($establid);
$this->load->view('payment/viewsettlement',$data);
}
else
{
$data['payment'] = $this->paymentmodel->paymentsettlmnt($establid);
$this->load->view('payment/viewsettlement',$data);
}
}
}
|
Ekta3012/codeigniter_afewtaps
|
admin/app/controllers/Payment.php
|
PHP
|
mit
| 1,096
|
# fizz.rb
1.upto(ARGV[0].to_i) do |n|
if n % 15 == 0
print "FizzBuzz "
elsif n % 5 == 0
print "Buzz "
elsif n % 3 == 0
print "Fizz "
else print "#{n} "
end
end
puts
|
J-Y/RubyQuiz
|
ruby_quiz/quiz126_sols/solutions/darren kirby/fizz.rb
|
Ruby
|
mit
| 187
|
\hypertarget{vs__imgui__image_8bin_8h}{\section{/mnt/windows/data/programming/crapengine2/source/video/include/bgfx/imgui/vs\+\_\+imgui\+\_\+image.bin.\+h File Reference}
\label{vs__imgui__image_8bin_8h}\index{/mnt/windows/data/programming/crapengine2/source/video/include/bgfx/imgui/vs\+\_\+imgui\+\_\+image.\+bin.\+h@{/mnt/windows/data/programming/crapengine2/source/video/include/bgfx/imgui/vs\+\_\+imgui\+\_\+image.\+bin.\+h}}
}
|
stevenblaster/crapengine
|
doc/latex/vs__imgui__image_8bin_8h.tex
|
TeX
|
mit
| 433
|
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import <GPUImage.h>
#import <GPUImage/GPUImageFASTCornerDetectionFilter.h>
|
jsharp83/jsharp83.github.io
|
source/ios/GPUImageBlurTest/GPUImageBlurTest/GPUImageBlurTest-Bridging-Header.h
|
C
|
mit
| 180
|
//
// DDPVolumeView.h
// DanDanPlayForiOS
//
// Created by JimHuang on 2017/10/2.
// Copyright © 2017年 JimHuang. All rights reserved.
//
#import <MediaPlayer/MediaPlayer.h>
@interface DDPVolumeView : MPVolumeView
@property (assign, nonatomic) CGFloat ddp_volume;
@end
|
sunsx9316/DanDanPlayForiOS
|
DanDanPlayForiOS/ViewController/播放器/View/控制/DDPVolumeView.h
|
C
|
mit
| 277
|
package knorxx.framework.generator.reloading;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
/**
*
* @author sj
*/
public abstract class ClassChangeVisitor extends ClassVisitor {
private final ClassWriter classWriter;
public ClassChangeVisitor(ClassWriter classWriter) {
super(Opcodes.ASM5, classWriter);
this.classWriter = classWriter;
}
public byte[] toByteArray() {
return classWriter.toByteArray();
}
public byte[] apply(byte[] classData) {
ClassReader classReader = new ClassReader(classData);
classReader.accept(this, 0);
return toByteArray();
}
}
|
janScheible/knorxx
|
generator/src/main/java/knorxx/framework/generator/reloading/ClassChangeVisitor.java
|
Java
|
mit
| 747
|
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160424160238) do
end
|
tyrauber/email_engine
|
spec/dummy/db/schema.rb
|
Ruby
|
mit
| 802
|
const { describe, it, beforeEach } = require('kocha')
const { createStore, documentObject } = require('./helper')
const genel = require('genel')
const { expect } = require('chai')
const { Action } = require('~')
const { make } = capsid
let store
describe('Store', () => {
beforeEach(async () => {
store = await createStore()
})
describe('save', () => {
it('saves the user object', done => {
store.userRepository = {
save (user) {
expect(user).to.equal(store.user)
done()
}
}
store.save()
})
it('saves the currentJournal if exists', async () => {
await store.dispatch({
type: Action.CREATE_JOURNAL_DOCUMENT,
detail: documentObject
})
await store.dispatch({ type: Action.LOAD_CHART })
const journalSaved = new Promise(resolve => {
store.journalRepository = {
save (journal) {
expect(journal).to.equal(store.currentJournal)
resolve()
}
}
})
await store.save()
return journalSaved
})
})
describe('notifyUpdate', () => {
it('notifies the model update', async () => {
const store = make(
'js-store',
genel.div`<p class="is-model-observer">hello</p>`
)
store.languageReady = Promise.resolve()
const p = new Promise(resolve => {
store.el.firstChild.addEventListener(Action.MODEL_UPDATE, () =>
resolve()
)
})
expect(await store.notifyUpdate()).to.equal(store)
return p
})
})
})
|
kt3k/moneybit-app
|
src/store/__tests__/index.js
|
JavaScript
|
mit
| 1,578
|
#pragma once
/*////////////////////////////////////////////////////////////////////////////
GmshWriter.h
Writes a gmsh .msh file.
Copyright 2017 HJA Bird
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/////////////////////////////////////////////////////////////////////////////
#include <string>
#include <vector>
#include <map>
#include <memory>
namespace HBTK {
namespace Gmsh {
class GmshWriter
{
public:
// Add a physical group.
// Returns -1 for physical group id already exists
int add_physical_group(int id, int dimensions, std::string name);
// Add a node of with id number id at x, y, z
// Returns -1 for node id already exists.
int add_node(int id, double x, double y, double z);
// Add an element of ele_type (see gmsh element ids) with nodes node_ids.
// Returns +ve: the assigned element number
// Returns -1: failed!
// First overload: do not make part of any physical group
int add_element(int ele_type, const std::vector<int> & node_ids);
// Second overload: make part of physical groups given in vector phys_grps.
int add_element(int ele_type, const std::vector<int> & node_ids, const std::vector<int> & phys_groups);
// Write out file to path:
bool write(std::string path);
bool write(std::ofstream & output_stream);
private:
struct element {
int element_type;
std::vector<int> nodes;
std::vector<int> phys_groups;
};
struct physical_group {
int dimensions;
std::string name;
};
struct node_coordinate {
double x, y, z;
};
std::map<int, element> m_elements;
std::map<int, physical_group> m_physical_groups;
std::map<int, node_coordinate> m_nodes;
};
}
} // END namespace HBTK
|
hjabird/HBTK
|
include/HBTK/GmshWriter.h
|
C
|
mit
| 2,696
|
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of LoadProducts
*
* @author student
*/
namespace Pizza\CustomerBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Pizza\CustomerBundle\Entity\Product;
class LoadProducts extends AbstractFixture implements OrderedFixtureInterface
{
/**
* {@inheritDoc}
*/
public function load(ObjectManager $manager)
{
$chicagopizza = new Product();
$chicagopizza->setName('Chicago style pizza');
$chicagopizza->setPrice(10.88);
$chicagopizza->setDescription('This is a pizza from chicago. It\'s awesome');
$chicagopizza->setCategory($this->getReference('cat-pizza-type'));
$manager->persist($chicagopizza);
$newyorkpizza = new Product();
$newyorkpizza->setName('New York style pizza');
$newyorkpizza->setPrice(13.88);
$newyorkpizza->setDescription('This is a pizza from New York City. It\'s awesome');
$newyorkpizza->setCategory($this->getReference('cat-pizza-type'));
$manager->persist($newyorkpizza);
$calipizza = new Product();
$calipizza->setName('California style pizza');
$calipizza->setPrice(13.88);
$calipizza->setDescription('This is a pizza from California. It\'s awesome');
$calipizza->setCategory($this->getReference('cat-pizza-type'));
$manager->persist($calipizza);
$pepperoni = new Product();
$pepperoni->setName('pepperoni');
$pepperoni->setPrice(.68);
$pepperoni->setDescription('Fresh pepperoni');
$pepperoni->setCategory($this->getReference('cat-topping-type'));
$manager->persist($pepperoni);
$cheese = new Product();
$cheese->setName('extra cheese');
$cheese->setPrice(.68);
$cheese->setDescription('cheesy');
$cheese->setCategory($this->getReference('cat-topping-type'));
$manager->persist($cheese);
$bacon = new Product();
$bacon->setName('bacon');
$bacon->setPrice(.98);
$bacon->setDescription('I love bacon :)');
$bacon->setCategory($this->getReference('cat-topping-type'));
$manager->persist($bacon);
$sausage = new Product();
$sausage->setName('sausage');
$sausage->setPrice(.98);
$sausage->setDescription('(: sausage :)');
$sausage->setCategory($this->getReference('cat-topping-type'));
$manager->persist($sausage);
$pineapple = new Product();
$pineapple->setName('pineapple');
$pineapple->setPrice(.38);
$pineapple->setDescription('(: pineapple :)');
$pineapple->setCategory($this->getReference('cat-topping-type'));
$manager->persist($pineapple);
$onions = new Product();
$onions->setName('onions');
$onions->setPrice(.38);
$onions->setDescription('(: onions :)');
$onions->setCategory($this->getReference('cat-topping-type'));
$manager->persist($onions);
$chicken = new Product();
$chicken->setName('chicken');
$chicken->setPrice(1.38);
$chicken->setDescription('(: chicken :)');
$chicken->setCategory($this->getReference('cat-topping-type'));
$manager->persist($chicken);
$ham = new Product();
$ham->setName('ham');
$ham->setPrice(1.38);
$ham->setDescription('(: ham :)');
$ham->setCategory($this->getReference('cat-topping-type'));
$manager->persist($ham);
$mushroom = new Product();
$mushroom->setName('mushrooms');
$mushroom->setPrice(1.38);
$mushroom->setDescription('(: mushrooms :)');
$mushroom->setCategory($this->getReference('cat-topping-type'));
$manager->persist($mushroom);
$greenpepper = new Product();
$greenpepper->setName('mushrooms');
$greenpepper->setPrice(1.38);
$greenpepper->setDescription('(: mushrooms :)');
$greenpepper->setCategory($this->getReference('cat-topping-type'));
$manager->persist($greenpepper);
$manager->flush();
}
/**
* {@inheritDoc}
*/
public function getOrder()
{
return 2;
}
}
|
phptuts/symfonypizzaexampleapp
|
src/Pizza/CustomerBundle/DataFixtures/ORM/LoadProducts.php
|
PHP
|
mit
| 4,481
|
import React, { Component } from 'react'
import { Icon, Menu } from 'shengnian-ui-react'
export default class MenuExampleIcons extends Component {
state = { activeItem: 'gamepad' }
handleItemClick = (e, { name }) => this.setState({ activeItem: name })
render() {
const { activeItem } = this.state
return (
<Menu icon>
<Menu.Item name='gamepad' active={activeItem === 'gamepad'} onClick={this.handleItemClick}>
<Icon name='gamepad' />
</Menu.Item>
<Menu.Item name='video camera' active={activeItem === 'video camera'} onClick={this.handleItemClick}>
<Icon name='video camera' />
</Menu.Item>
<Menu.Item name='video play' active={activeItem === 'video play'} onClick={this.handleItemClick}>
<Icon name='video play' />
</Menu.Item>
</Menu>
)
}
}
|
shengnian/shengnian-ui-react
|
docs/app/Examples/collections/Menu/Variations/MenuExampleIcons.js
|
JavaScript
|
mit
| 859
|
'use strict';
var React = require('react');
var LoginForm = require('./LoginForm');
var SignUpForm = require('./SignUpForm');
var Tab = require('./tabs/Tab');
var TabContents = require('./tabs/TabContents');
var TabbedPanel = require('./tabs/TabbedPanel');
var Tabs = require('./tabs/Tabs');
var ObtainUser = React.createClass({
render: function() {
return (
<TabbedPanel selected={0}>
<Tabs>
<Tab>I have an account</Tab>
<Tab>I don't have an account</Tab>
</Tabs>
<TabContents>
<LoginForm/>
<SignUpForm/>
</TabContents>
</TabbedPanel>
);
}
});
module.exports = ObtainUser;
|
cleggatt/gift-tracker
|
src/main/component/ObtainUser.js
|
JavaScript
|
mit
| 770
|
<span class="bg-status" ng-class="{'bg-new': (order.status == 0), 'bg-cancel':(order.status == -1), 'bg-confirm':(order.status == 1), 'bg-complete':(order.status == 2)}">
{{order.status | getOrderStatusText}}
</span>
|
brooklynb7/nnb-mean
|
public/modules/orders/views/_order-status.client.view.html
|
HTML
|
mit
| 222
|
//
// EsaKit.h
// EsaKit
//
// Created by pixyzehn on 2016/11/17.
// Copyright © 2016 pixyzehn. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for EsaKit.
FOUNDATION_EXPORT double EsaKitVersionNumber;
//! Project version string for EsaKit.
FOUNDATION_EXPORT const unsigned char EsaKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <EsaKit/PublicHeader.h>
|
pixyzehn/EsaKit
|
Sources/EsaKit/EsaKit.h
|
C
|
mit
| 482
|
## 这是 pylSER 的个人技术博客
### 特别感谢 mzlogin [hover: https://github.com/mzlogin/mzlogin.github.io]
|
pylSER/pylSER.github.io
|
README.md
|
Markdown
|
mit
| 118
|
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from inspect import isgenerator
class Element(object):
tag = ''
self_closing = False
def __init__(self, *children, **attrs):
if children and isinstance(children[0], dict):
self.attrs = children[0]
children = children[1:]
else:
self.attrs = attrs
# Some helpers for the `class` attribute
if 'classes' in attrs:
attrs['class'] = ' '.join(c for c in attrs.pop('classes') if c)
elif 'class_' in attrs:
attrs['class'] = attrs.pop('class_')
self.children = []
self.add_children(children)
def __call__(self, *children):
self.add_children(children)
return self
def __repr__(self):
attr_string = ''.join(' {}="{}"'.format(key, val) for key, val in self.attrs.items() if val)
return '<{}{}>'.format(self.tag, attr_string)
def add_children(self, children):
if self.self_closing and children:
raise ValueError("Self-closing tags can't have children.")
if children and isgenerator(children[0]):
children = children[0]
for child in children:
if child is not None:
if isinstance(child, list):
self.add_children(child)
else:
self.children.append(child)
|
russiancow/stag
|
stag/base.py
|
Python
|
mit
| 1,436
|
#!/bin/sh
set -u
# Internal variables
CONFIG_FILE="/etc/driveclient/bootstrap.json"
LOG_FILE="/var/log/driveclient.log"
WAIT_TIME=30
PID=0
#########################################################
# Fill the config with provided values via ENV variables
# Globals:
# API_HOST
# API_KEY
# ACCOUNT_ID
# USERNAME
#########################################################
function update_config() {
sed -i "s/API_HOST/$API_HOST/g" $CONFIG_FILE
sed -i "s/API_KEY/$API_KEY/g" $CONFIG_FILE
sed -i "s/ACCOUNT_ID/$ACCOUNT_ID/g" $CONFIG_FILE
sed -i "s/USERNAME/$USERNAME/g" $CONFIG_FILE
echo "driveclient config updated:"
cat $CONFIG_FILE && echo
}
#########################################################
# Start the driveclient daemon, wait a bit,
# and check the status.
# Globals:
# PID
# WAIT_TIME
#########################################################
function start_driveclient() {
if [[ $PID != 0 ]]; then
echo "Shutting down driveclient..." && kill $PID && sleep 3
fi
: > $LOG_FILE && echo # truncate the log file, so we can grep always the current version
driveclient &
PID=$!
echo "Backup agent (driveclient) started, pid=$PID"
sleep $WAIT_TIME && echo
# In case of these strings were not found, the script will exit (set -e)
if [[ $(grep -i "HTTP connection error 400" $LOG_FILE) != "" ]]; then echo "Error: connection error. Check the routing/connection. Are you sure you run this container with --net=host option?" && exit 1; fi
if [[ $(grep -i "Could not register the agent" $LOG_FILE) != "" ]]; then echo "Error: Could not register the agent. Check your account id, username and/or api key (password)." && exit 1; fi
if [[ $(grep -i "Successfully authenticated the agent" $LOG_FILE) == "" ]]; then echo "Error: Could not authenticate the agent." && exit 1; fi
if [[ $(grep -i "Configuration parsed and loaded" $LOG_FILE) == "" ]]; then echo "Error: Could not parse the config file." && exit 1; fi
}
# tail the log to stdout (in the background), so it can be easily inspected via `docker logs`
touch $LOG_FILE && tail -F $LOG_FILE &
# Generate the config and start the deamon
update_config
start_driveclient
# In case we spot any problems, do restart until they disappear...
while [[ $(grep -i "HTTP(s) error code = 403" $LOG_FILE) != "" ]] || [[ $(grep -i "Could not post an event" $LOG_FILE) != "" ]]; do
echo "Problems with agent detected. Restaring..."
start_driveclient
done
echo "Backup agent (driveclient) positive status verified, pid=$PID"
wait $PID
|
million12/docker-rackspace-cloud-backup
|
container-files/run.sh
|
Shell
|
mit
| 2,542
|
MIT License
Copyright (c) 2015-2019 Daniel Doubrovkine, Artsy and Contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
dblock/slack-ruby-client
|
LICENSE.md
|
Markdown
|
mit
| 1,104
|
'use strict';
/*
* Creates a fake project object for unit tests.
*
* @method getProject
* @private
*/
function getProject(options) {
options = options || {};
let root = options.root || 'default-root';
let pkg = options.pkg || {
version: '1.0.0'
};
return {
root,
pkg,
};
}
/*
* Creates a context (`this`) for `ember-cli` command to be able to successfully
* execute and test `run` method.
*
* In unit tests, we could simply
*
* @method contextFor
* @protected
* @param {String} type A name of the command, e.g. 'publish'
* @param {Object} options Any additional options that needs to be overwritten
* on the command (`project`, etc.)
*/
function contextFor(name, options) {
options = options || {};
let command = require(`../../lib/commands/${name}`);
command.project = getProject(options);
return command;
}
module.exports = {
contextFor
}
|
salsify/ember-cli-pact
|
node-tests/helpers/command.js
|
JavaScript
|
mit
| 921
|
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "walletview.h"
#include "addressbookpage.h"
#include "genandprintdialog.h"
#include "askpassphrasedialog.h"
#include "bitcoingui.h"
#include "clientmodel.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include "overviewpage.h"
#include "receivecoinsdialog.h"
#include "sendcoinsdialog.h"
#include "goodsdialog.h"
#include "signverifymessagedialog.h"
#include "transactiontablemodel.h"
#include "transactionview.h"
#include "walletmodel.h"
#include "surmodel.h"
#include "ui_interface.h"
#include <QAction>
#include <QActionGroup>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QLabel>
#include <QProgressDialog>
#include <QPushButton>
#include <QVBoxLayout>
WalletView::WalletView(QWidget *parent):
QStackedWidget(parent),
clientModel(0),
walletModel(0)
{
// Create tabs
overviewPage = new OverviewPage();
transactionsPage = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout();
QHBoxLayout *hbox_buttons = new QHBoxLayout();
transactionView = new TransactionView(this);
vbox->addWidget(transactionView);
QPushButton *exportButton = new QPushButton(tr("&Export"), this);
exportButton->setToolTip(tr("Export the data in the current tab to a file"));
#ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
exportButton->setIcon(QIcon(":/icons/export"));
#endif
hbox_buttons->addStretch();
// Sum of selected transactions
QLabel *transactionSumLabel = new QLabel(); // Label
transactionSumLabel->setObjectName("transactionSumLabel"); // Label ID as CSS-reference
transactionSumLabel->setText(tr("Selected amount:"));
hbox_buttons->addWidget(transactionSumLabel);
transactionSum = new QLabel(); // Amount
transactionSum->setObjectName("transactionSum"); // Label ID as CSS-reference
transactionSum->setMinimumSize(200, 8);
transactionSum->setTextInteractionFlags(Qt::TextSelectableByMouse);
hbox_buttons->addWidget(transactionSum);
hbox_buttons->addWidget(exportButton);
vbox->addLayout(hbox_buttons);
transactionsPage->setLayout(vbox);
receiveCoinsPage = new ReceiveCoinsDialog();
sendCoinsPage = new SendCoinsDialog();
goodsPage = new GoodsDialog();
addWidget(overviewPage);
addWidget(transactionsPage);
addWidget(receiveCoinsPage);
addWidget(sendCoinsPage);
addWidget(goodsPage);
// Clicking on a transaction on the overview pre-selects the transaction on the transaction history page
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex)));
// Double-clicking on a transaction on the transaction history page shows details
connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));
// Update wallet with sum of selected transactions
connect(transactionView, SIGNAL(trxAmount(QString)), this, SLOT(trxAmount(QString)));
// Clicking on "Export" allows to export the transaction list
connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked()));
// Pass through messages from sendCoinsPage
connect(sendCoinsPage, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int)));
// Pass through messages from transactionView
connect(transactionView, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int)));
}
WalletView::~WalletView()
{
}
void WalletView::setBitcoinGUI(BitcoinGUI *gui)
{
if (gui)
{
// Clicking on a transaction on the overview page simply sends you to transaction history page
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), gui, SLOT(gotoHistoryPage()));
// Receive and report messages
connect(this, SIGNAL(message(QString,QString,unsigned int)), gui, SLOT(message(QString,QString,unsigned int)));
// Pass through encryption status changed signals
connect(this, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int)));
// Pass through transaction notifications
connect(this, SIGNAL(incomingTransaction(QString,int,CAmount,QString,QString)), gui, SLOT(incomingTransaction(QString,int,CAmount,QString,QString)));
// Follow new URI
connect(this, SIGNAL(receivedURI(QString)), gui, SIGNAL(receivedURI(QString)));
}
}
void WalletView::setClientModel(ClientModel *clientModel)
{
this->clientModel = clientModel;
overviewPage->setClientModel(clientModel);
sendCoinsPage->setClientModel(clientModel);
}
void WalletView::setSurModel(SurModel *surModel)
{
this->surModel = surModel;
goodsPage->setSurModel(surModel);
}
void WalletView::setWalletModel(WalletModel *walletModel)
{
this->walletModel = walletModel;
// Put transaction list in tabs
transactionView->setModel(walletModel);
overviewPage->setWalletModel(walletModel);
receiveCoinsPage->setModel(walletModel);
sendCoinsPage->setModel(walletModel);
goodsPage->setModel(walletModel);
if (walletModel)
{
// Receive and pass through messages from wallet model
connect(walletModel, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int)));
// Handle changes in encryption status
connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SIGNAL(encryptionStatusChanged(int)));
updateEncryptionStatus();
// Balloon pop-up for new transaction
connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(processNewTransaction(QModelIndex,int,int)));
// Ask for passphrase if needed
connect(walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet()));
// Show progress dialog
connect(walletModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
}
}
void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/)
{
// Prevent balloon-spam when initial block download is in progress
if (!walletModel || !clientModel || clientModel->inInitialBlockDownload())
return;
TransactionTableModel *ttm = walletModel->getTransactionTableModel();
if (!ttm || ttm->processingQueuedTransactions())
return;
QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString();
qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toULongLong();
QString type = ttm->index(start, TransactionTableModel::Type, parent).data().toString();
QString address = ttm->index(start, TransactionTableModel::ToAddress, parent).data().toString();
emit incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address);
}
void WalletView::gotoOverviewPage()
{
setCurrentWidget(overviewPage);
}
void WalletView::gotoHistoryPage()
{
setCurrentWidget(transactionsPage);
}
void WalletView::gotoReceiveCoinsPage()
{
setCurrentWidget(receiveCoinsPage);
}
void WalletView::gotoSendCoinsPage(QString addr)
{
setCurrentWidget(sendCoinsPage);
if (!addr.isEmpty())
sendCoinsPage->setAddress(addr);
}
void WalletView::gotoGoodsPage()
{
setCurrentWidget(goodsPage);
}
void WalletView::gotoSignMessageTab(QString addr)
{
// calls show() in showTab_SM()
SignVerifyMessageDialog *signVerifyMessageDialog = new SignVerifyMessageDialog(this);
signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose);
signVerifyMessageDialog->setModel(walletModel);
signVerifyMessageDialog->showTab_SM(true);
if (!addr.isEmpty())
signVerifyMessageDialog->setAddress_SM(addr);
}
void WalletView::gotoVerifyMessageTab(QString addr)
{
// calls show() in showTab_VM()
SignVerifyMessageDialog *signVerifyMessageDialog = new SignVerifyMessageDialog(this);
signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose);
signVerifyMessageDialog->setModel(walletModel);
signVerifyMessageDialog->showTab_VM(true);
if (!addr.isEmpty())
signVerifyMessageDialog->setAddress_VM(addr);
}
bool WalletView::handlePaymentRequest(const SendCoinsRecipient& recipient)
{
return sendCoinsPage->handlePaymentRequest(recipient);
}
void WalletView::showOutOfSyncWarning(bool fShow)
{
overviewPage->showOutOfSyncWarning(fShow);
}
void WalletView::updateEncryptionStatus()
{
emit encryptionStatusChanged(walletModel->getEncryptionStatus());
}
void WalletView::encryptWallet(bool status)
{
if(!walletModel)
return;
AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this);
dlg.setModel(walletModel);
dlg.exec();
updateEncryptionStatus();
}
void WalletView::backupWallet()
{
QString filename = GUIUtil::getSaveFileName(this,
tr("Backup Wallet"), QString(),
tr("Wallet Data (*.dat)"), NULL);
if (filename.isEmpty())
return;
if (!walletModel->backupWallet(filename)) {
emit message(tr("Backup Failed"), tr("There was an error trying to save the wallet data to %1.").arg(filename),
CClientUIInterface::MSG_ERROR);
}
else {
emit message(tr("Backup Successful"), tr("The wallet data was successfully saved to %1.").arg(filename),
CClientUIInterface::MSG_INFORMATION);
}
}
void WalletView::changePassphrase()
{
AskPassphraseDialog dlg(AskPassphraseDialog::ChangePass, this);
dlg.setModel(walletModel);
dlg.exec();
}
void WalletView::unlockWallet()
{
if(!walletModel)
return;
// Unlock wallet when requested by wallet model
if (walletModel->getEncryptionStatus() == WalletModel::Locked || walletModel->getEncryptionStatus() == WalletModel::UnlockedForAnonymizationOnly)
{
AskPassphraseDialog dlg(AskPassphraseDialog::UnlockAnonymize, this);
dlg.setModel(walletModel);
dlg.exec();
}
}
void WalletView::lockWallet()
{
if(!walletModel)
return;
walletModel->setWalletLocked(true);
}
void WalletView::usedSendingAddresses()
{
if(!walletModel)
return;
AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab, this);
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setModel(walletModel->getAddressTableModel());
dlg->show();
}
void WalletView::usedReceivingAddresses()
{
if(!walletModel)
return;
AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab, this);
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setModel(walletModel->getAddressTableModel());
dlg->show();
}
void WalletView::genAndPrintAddresses()
{
if(!walletModel)
return;
GenAndPrintDialog dlg(GenAndPrintDialog::Export, this);
dlg.setModel(walletModel);
if (dlg.exec())
{
QMessageBox::warning(this, tr(""),
tr("Before sending surcoins to address please be sure\n"
"that paper wallet has been printed successfully!"));
QString uri = dlg.getURI();
emit receivedURI(uri);
}
}
void WalletView::loadFromPaper()
{
if(!walletModel)
return;
GenAndPrintDialog dlg(GenAndPrintDialog::Import, this);
dlg.setModel(walletModel);
dlg.exec();
}
void WalletView::showProgress(const QString &title, int nProgress)
{
if (nProgress == 0)
{
progressDialog = new QProgressDialog(title, "", 0, 100);
progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(0);
progressDialog->setCancelButton(0);
progressDialog->setAutoClose(false);
progressDialog->setValue(0);
}
else if (nProgress == 100)
{
if (progressDialog)
{
progressDialog->close();
progressDialog->deleteLater();
}
}
else if (progressDialog)
progressDialog->setValue(nProgress);
}
/** Update wallet with the sum of the selected transactions */
void WalletView::trxAmount(QString amount)
{
transactionSum->setText(amount);
}
|
mytestcoin/mytestcoin
|
src/qt/walletview.cpp
|
C++
|
mit
| 12,411
|
package chunkstore
import (
"errors"
. "github.com/huin/chunkymonkey/types"
)
// MultiStore provides the ability to load a chunk from one or more potential
// sources of chunk data. The primary purpose of this is to read from a
// persistant store first, then fall back to generating a chunk if the
// persistant store does not have it. MultiStore implements IChunkStore.
type MultiStore struct {
readStores []IChunkStore
writeStore IChunkStore
}
func NewMultiStore(readStores []IChunkStore, writeStore IChunkStore) *MultiStore {
s := &MultiStore{
readStores: readStores,
writeStore: writeStore,
}
return s
}
func (s *MultiStore) ReadChunk(chunkLoc ChunkXz) (reader IChunkReader, err error) {
for _, store := range s.readStores {
result := <-store.ReadChunk(chunkLoc)
if result.Err == nil {
return result.Reader, result.Err
} else {
if _, ok := result.Err.(NoSuchChunkError); ok {
// Fall through to next chunk store.
continue
}
return nil, result.Err
}
}
return nil, NoSuchChunkError(false)
}
func (s *MultiStore) SupportsWrite() bool {
return s.writeStore != nil && s.writeStore.SupportsWrite()
}
func (s *MultiStore) Writer() IChunkWriter {
if s.writeStore != nil {
return s.writeStore.Writer()
}
return nil
}
func (s *MultiStore) WriteChunk(writer IChunkWriter) error {
if s.writeStore == nil {
return errors.New("writes not supported")
}
s.writeStore.WriteChunk(writer)
return nil
}
|
huin/chunkymonkey
|
chunkstore/multistore.go
|
GO
|
mit
| 1,453
|
# [Stylus](http://learnboost.github.io/stylus/) Plugin for [DocPad](http://docpad.org)
<!-- BADGES/ -->
[](http://travis-ci.org/docpad/docpad-plugin-stylus "Check this project's build status on TravisCI")
[](https://npmjs.org/package/docpad-plugin-stylus "View this project on NPM")
[](https://npmjs.org/package/docpad-plugin-stylus "View this project on NPM")
[](https://david-dm.org/docpad/docpad-plugin-stylus)
[](https://david-dm.org/docpad/docpad-plugin-stylus#info=devDependencies)<br/>
[](https://www.gratipay.com/docpad/ "Donate weekly to this project using Gratipay")
[](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")
<!-- /BADGES -->
Adds support for the [Stylus](http://learnboost.github.io/stylus/) CSS pre-processor to [DocPad](http://docpad.org)
Convention: `.css.styl|stylus`
## Install
```
docpad install stylus
```
## Configure
### Defaults
The default configuration for this plugin is the equivalant of adding the following to your [DocPad configuration file](http://docpad.org/docs/config).
``` coffee
plugins:
stylus:
stylusLibraries:
nib: true
stylusOptions:
compress: true
'include css': true
# Disable compression on the development environment
environments:
development:
stylusOptions:
compress: false
```
### Stylus Options
You can customise the options sent to stylus using the `stylusOptions` object. [See the available options here.](http://learnboost.github.io/stylus/docs/js.html)
### Stylus Libraries
By default we include the [Nib Stylus Library](http://visionmedia.github.io/nib/).
#### Using Nib
Nib is a small and powerful library for the Stylus CSS language, providing robust cross-browser CSS3 mixins to make your life as a designer easier. By default nib support is enabled, but it can be disabled by setting the `useNib` option to `false`.
To use Nib, add the following to your main stylus file:
```css
@import 'nib'
```
Alternatively, if you would prefer to use individual parts like gradient support, you can do this by using:
```css
@import 'nib/gradients'
```
#### Turning off Nib
You can also turn off the inclusion of the Nib by setting the following:
``` coffee
plugins:
stylus:
stylusLibraries:
nib: false
```
#### Using a custom Library (like Axis)
You can include your own custom libraries, providing you npm install them yourself.
To use the [Axis Stylus Library](http://roots.cx/axis/) instead of Nib, you first first install axis by doing:
``` bash
npm install --save axis
```
Then update our DocPad configuration file with:
``` coffee
plugins:
stylus:
stylusLibraries:
nib: false
'axis': true
```
You can also customise the configuration sent to the library by doing the following, in this case, we set the [axis `implicit` property to `false`](https://github.com/jenius/axis#usage):
``` coffee
plugins:
stylus:
stylusLibraries:
nib: false
'axis':
implicit: false
```
<!-- HISTORY/ -->
## History
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/docpad/docpad-plugin-stylus/blob/master/HISTORY.md#files)
<!-- /HISTORY -->
<!-- CONTRIBUTE/ -->
## Contribute
[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/docpad/docpad-plugin-stylus/blob/master/CONTRIBUTING.md#files)
<!-- /CONTRIBUTE -->
<!-- BACKERS/ -->
## Backers
### Maintainers
These amazing people are maintaining this project:
- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)
- Rob Loach <robloach@gmail.com> (https://github.com/RobLoach)
- Anton Wilhelm <timaschew@gmail.com> (https://github.com/timaschew)
### Sponsors
No sponsors yet! Will you be the first?
[](https://www.gratipay.com/docpad/ "Donate weekly to this project using Gratipay")
[](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")
### Contributors
These amazing people have contributed code to this project:
- [Anton Wilhelm](https://github.com/timaschew) <timaschew@gmail.com> — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=timaschew)
- [Benjamin Lupton](https://github.com/balupton) <b@lupton.cc> — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=balupton)
- [chase](https://github.com/chase) — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=chase)
- [intval](https://github.com/intval) — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=intval)
- [kizu](https://github.com/kizu) — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=kizu)
- [lbilharz](https://github.com/lbilharz) — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=lbilharz)
- [mjrev](https://github.com/mjrev) — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=mjrev)
- [Rob Loach](https://github.com/RobLoach) <robloach@gmail.com> — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=RobLoach)
- [shinnn](https://github.com/shinnn) — [view contributions](https://github.com/docpad/docpad-plugin-stylus/commits?author=shinnn)
[Become a contributor!](https://github.com/docpad/docpad-plugin-stylus/blob/master/CONTRIBUTING.md#files)
<!-- /BACKERS -->
<!-- LICENSE/ -->
## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)
Copyright © 2012+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
<!-- /LICENSE -->
|
ainop/docpad-plugin-stylus
|
README.md
|
Markdown
|
mit
| 7,514
|
using Util.Dependency;
namespace Util.Domains.Services {
/// <summary>
/// 领域服务
/// </summary>
public interface IDomainService : IScopeDependency {
}
}
|
yuleyule66/Util
|
src/Util/Domains/Services/IDomainService.cs
|
C#
|
mit
| 184
|
var curVersion = 'v34';
var request = require('request');
module.exports = function(grunt) {
var firebaseUrl = 'webhook';
var firebaseUri = null;
if(firebaseUrl) {
firebaseUri = 'https://' + firebaseUrl + '.firebaseio.com/generator_version.json';
}
var checkVersion = function(callback) {
if(firebaseUri === null) {
callback();
} else {
request({ url: firebaseUri, json: true }, function(e, r, body) {
if(body) {
if(body !== curVersion) {
console.log('========================================================'.red);
console.log('# This site is using old Webhook code. #'.red);
console.log('========================================================'.red);
console.log('#'.red + ' To update, run "wh update" in this folder.')
console.log('# ---------------------------------------------------- #'.red)
}
callback();
} else {
callback();
}
});
}
};
var generator = require('../libs/generator').generator(grunt.config, grunt.log, grunt.file, root);
grunt.registerTask('buildTemplates', 'Generate static files from templates directory', function() {
var done = this.async();
generator.renderTemplates(done, generator.reloadFiles);
});
grunt.registerTask('buildPages', 'Generate static files from pages directory', function() {
var done = this.async();
generator.renderPages(done, generator.reloadFiles);
});
grunt.registerTask('scaffolding', 'Generate scaffolding for a new object', function(name) {
var done = this.async();
var force = grunt.option('force');
var result = generator.makeScaffolding(name, done, force);
});
grunt.registerTask('watch', 'Watch for changes in templates and regenerate site', function() {
generator.startLiveReload();
grunt.task.run('simple-watch');
});
grunt.registerTask('webListener', 'Listens for commands from CMS through websocket', function() {
var done = this.async();
generator.webListener(done);
});
grunt.registerTask('webListener-open', 'Listens for commands from CMS through websocket', function() {
var done = this.async();
generator.webListener(done);
grunt.util.spawn({
grunt: true,
args: ['open:wh-open'].concat(grunt.option.flags()),
opts: { stdio: 'inherit' }
}, function (err, result, code) {
if (err || code > 0) {
grunt.log.warn('A problem occured while trying to open a browser window to connect to the site.')
grunt.log.warn(result.stderr || result.stdout);
grunt.log.warn('In order to access the site, please navigate to \'localhost:2002\' in your web browser.')
}
grunt.log.writeln('\n' + result.stdout);
});
});
grunt.registerTask('clean', 'Clean build files', function() {
var done = this.async();
generator.cleanFiles(done);
});
// Build Task.
grunt.registerTask('build', 'Clean files and then generate static site into build', function() {
var done = this.async();
var strict = grunt.option('strict');
if(strict === true) {
generator.enableStrictMode();
}
checkVersion(function() {
generator.buildBoth(done, generator.reloadFiles);
})
});
// Change this to optionally prompt instead of requiring a sitename
grunt.registerTask('assets', 'Initialize the firebase configuration file (installer should do this as well)', function() {
generator.assets(grunt);
});
grunt.registerTask('assetsMiddle', 'Initialize the firebase configuration file (installer should do this as well)', function() {
generator.assetsMiddle(grunt);
});
grunt.registerTask('assetsAfter', 'Initialize the firebase configuration file (installer should do this as well)', function() {
generator.assetsAfter(grunt);
});
// Change this to optionally prompt instead of requiring a sitename
grunt.registerTask('init', 'Initialize the firebase configuration file (installer should do this as well)', function() {
var done = this.async();
var sitename = grunt.option('sitename');
var secretkey = grunt.option('secretkey');
var copyCms = grunt.option('copycms');
generator.init(sitename, secretkey, copyCms, done);
});
// Check if initialized properly before running all these tasks
grunt.registerTask('default', 'Clean, Build, Start Local Server, and Watch', function() {
grunt.task.run('configureProxies:wh-server')
grunt.task.run('connect:wh-server');
grunt.task.run('build');
grunt.task.run('concurrent:wh-concurrent');
});
};
|
robheath/webhook-movietrailerhub
|
tasks/generatorTasks.js
|
JavaScript
|
mit
| 4,627
|
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Network::Mgmt::V2019_11_01
module Models
#
# Effective Route.
#
class EffectiveRoute
include MsRestAzure
# @return [String] The name of the user defined route. This is optional.
attr_accessor :name
# @return [Boolean] If true, on-premises routes are not propagated to the
# network interfaces in the subnet.
attr_accessor :disable_bgp_route_propagation
# @return [EffectiveRouteSource] Who created the route. Possible values
# include: 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'
attr_accessor :source
# @return [EffectiveRouteState] The value of effective route. Possible
# values include: 'Active', 'Invalid'
attr_accessor :state
# @return [Array<String>] The address prefixes of the effective routes in
# CIDR notation.
attr_accessor :address_prefix
# @return [Array<String>] The IP address of the next hop of the effective
# route.
attr_accessor :next_hop_ip_address
# @return [RouteNextHopType] The type of Azure hop the packet should be
# sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal',
# 'Internet', 'VirtualAppliance', 'None'
attr_accessor :next_hop_type
#
# Mapper for EffectiveRoute class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
client_side_validation: true,
required: false,
serialized_name: 'EffectiveRoute',
type: {
name: 'Composite',
class_name: 'EffectiveRoute',
model_properties: {
name: {
client_side_validation: true,
required: false,
serialized_name: 'name',
type: {
name: 'String'
}
},
disable_bgp_route_propagation: {
client_side_validation: true,
required: false,
serialized_name: 'disableBgpRoutePropagation',
type: {
name: 'Boolean'
}
},
source: {
client_side_validation: true,
required: false,
serialized_name: 'source',
type: {
name: 'String'
}
},
state: {
client_side_validation: true,
required: false,
serialized_name: 'state',
type: {
name: 'String'
}
},
address_prefix: {
client_side_validation: true,
required: false,
serialized_name: 'addressPrefix',
type: {
name: 'Sequence',
element: {
client_side_validation: true,
required: false,
serialized_name: 'StringElementType',
type: {
name: 'String'
}
}
}
},
next_hop_ip_address: {
client_side_validation: true,
required: false,
serialized_name: 'nextHopIpAddress',
type: {
name: 'Sequence',
element: {
client_side_validation: true,
required: false,
serialized_name: 'StringElementType',
type: {
name: 'String'
}
}
}
},
next_hop_type: {
client_side_validation: true,
required: false,
serialized_name: 'nextHopType',
type: {
name: 'String'
}
}
}
}
}
end
end
end
end
|
Azure/azure-sdk-for-ruby
|
management/azure_mgmt_network/lib/2019-11-01/generated/azure_mgmt_network/models/effective_route.rb
|
Ruby
|
mit
| 4,244
|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PuppetMaster.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
|
tomaspinho/PADIMapNoReduce
|
PADIMapNoReduce/PuppetMaster/Properties/Settings.Designer.cs
|
C#
|
mit
| 1,069
|
<?php
namespace Suppliercheck\AdminBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* ProductRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ProductRepository extends EntityRepository
{
}
|
Hley/SupplierCheck
|
src/Suppliercheck/AdminBundle/Entity/ProductRepository.php
|
PHP
|
mit
| 271
|
local nvim = require 'neovim'
local sys = require 'sys'
local is_file = require('utils.files').is_file
local pyignores = RELOAD('filetypes.python').pyignores
local cmd = { 'flake8' }
local global_settings = vim.fn.expand(sys.name == 'windows' and '~/.flake8' or '~/.config/flake8')
-- NOTE: flake8 does not support pyproject, hopefully in a near future
if
not is_file(global_settings)
and not is_file './tox.ini'
and not is_file './.flake8'
and not is_file './setup.cfg'
-- and not is_file './setup.py'
-- and not is_file './pyproject.toml'
then
vim.list_extend(cmd, { '--max-line-length=120', '--ignore=' .. table.concat(pyignores, ',') })
end
table.insert(cmd, '%')
nvim.ex.CompilerSet('makeprg=' .. table.concat(cmd, '\\ '))
vim.b.current_compiler = 'flake8'
|
Mike325/.vim
|
after/compiler/flake8.lua
|
Lua
|
mit
| 796
|
/* The following code example is taken from the book
* "The C++ Standard Library - A Tutorial and Reference, 2nd Edition"
* by Nicolai M. Josuttis, Addison-Wesley, 2012
*
* (C) Copyright Nicolai M. Josuttis 2012.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyright notice appears in all copies.
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
#include <locale>
#include <chrono>
#include <ctime>
#include <iostream>
#include <exception>
#include <cstdlib>
using namespace std;
int main ()
{
try {
// query local time:
auto now = chrono::system_clock::now();
std::time_t t = chrono::system_clock::to_time_t(now);
tm* nowTM = std::localtime(&t);
// print local time with the global classic locale:
locale locC;
const time_put<char>& tpC = use_facet<time_put<char>>(locC);
// use single conversion specifier
tpC.put (cout, cout, ' ', nowTM, 'x');
cout << endl;
// use format string:
string format = "%A %x %I%p\n"; // format: weekday date hour
tpC.put (cout, cout, ' ', nowTM,
format.c_str(), format.c_str()+format.size() );
// print local time with German locale:
#ifdef _MSC_VER
locale locG("deu_deu.1252");
#else
locale locG("de_DE");
#endif
const time_put<char>& tpG = use_facet<time_put<char>>(locG);
tpG.put (cout, cout, ' ', nowTM, 'x');
cout << endl;
tpG.put (cout, cout, ' ', nowTM,
format.c_str(), format.c_str()+format.size() );
}
catch (const std::exception& e) {
cerr << "Exception: " << e.what() << endl;
return EXIT_FAILURE;
}
}
|
iZhangHui/cppstdlib
|
i18n/timeput.cpp
|
C++
|
mit
| 1,823
|
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('/Plugin/bootstrap-treeview', ['exports', 'jquery', 'Plugin', 'Config'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('jquery'), require('Plugin'), require('Config'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.jQuery, global.Plugin, global.Config);
global.PluginBootstrapTreeview = mod.exports;
}
})(this, function (exports, _jquery, _Plugin2, _Config) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _jquery2 = babelHelpers.interopRequireDefault(_jquery);
var _Plugin3 = babelHelpers.interopRequireDefault(_Plugin2);
var Config = babelHelpers.interopRequireWildcard(_Config);
var NAME = 'treeview';
var Treeview = function (_Plugin) {
babelHelpers.inherits(Treeview, _Plugin);
function Treeview() {
babelHelpers.classCallCheck(this, Treeview);
return babelHelpers.possibleConstructorReturn(this, (Treeview.__proto__ || Object.getPrototypeOf(Treeview)).apply(this, arguments));
}
babelHelpers.createClass(Treeview, [{
key: 'getName',
value: function getName() {
return NAME;
}
}, {
key: 'render',
value: function render() {
if (!_jquery2.default.fn.treeview) {
return;
}
var $el = this.$el,
options = this.options;
if (typeof options.source === 'string' && _jquery2.default.isFunction(window[options.source])) {
options.data = window[options.source]();
delete options.source;
} else if (_jquery2.default.isFunction(options.souce)) {
options.data = options.source();
delete options.source;
}
$el.treeview(options);
}
}], [{
key: 'getDefaults',
value: function getDefaults() {
return {
injectStyle: false,
expandIcon: 'icon wb-plus',
collapseIcon: 'icon wb-minus',
emptyIcon: 'icon',
nodeIcon: 'icon wb-folder',
showBorder: false,
// color: undefined, // "#000000",
// backColor: undefined, // "#FFFFFF",
borderColor: Config.colors('blue-grey', 200),
onhoverColor: Config.colors('blue-grey', 100),
selectedColor: '#ffffff',
selectedBackColor: Config.colors('primary', 600),
searchResultColor: Config.colors('primary', 600),
searchResultBackColor: '#ffffff'
};
}
}]);
return Treeview;
}(_Plugin3.default);
_Plugin3.default.register(NAME, Treeview);
exports.default = Treeview;
});
|
harinathebc/sample_codeigniter
|
assets/js/Plugin/bootstrap-treeview.js
|
JavaScript
|
mit
| 2,716
|
# frozen_string_literal: true
require 'spec_helper'
describe Cronut::Parser::Any do
describe '#possibilities' do
subject { described_class.new(segment: '*', minimum: 1, maximum: 5) }
it 'returns all integer values between supplied minimum to maximum' do
expect(subject.possibilities).to eq([1, 2, 3, 4, 5])
end
end
end
|
mcmillan/cronut
|
spec/parser/any_spec.rb
|
Ruby
|
mit
| 344
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Coq bench</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../../..">Unstable</a></li>
<li><a href=".">8.4.5 / contrib:lambda dev</a></li>
<li class="active"><a href="">2014-11-17 16:11:16</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../../../../../about.html">About</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href=".">« Up</a>
<h1>
contrib:lambda
<small>
dev
<span class="label label-danger">Lint error</span>
</small>
</h1>
<p><em><script>document.write(moment("2014-11-17 16:11:16 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2014-11-17 16:11:16 UTC)</em><p>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>ruby lint.rb unstable ../unstable/packages/coq:contrib:lambda/coq:contrib:lambda.dev</code></dd>
<dt>Return code</dt>
<dd>256</dd>
<dt>Duration</dt>
<dd>0 s</dd>
<dt>Output</dt>
<dd><pre>You should add an homepage for your package. For example:
homepage: "https://github.com/user/project"
</pre></dd>
</dl>
<h2>Dry install</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<p>Dry install without Coq, to test if the problem was incompatibility with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>Data not available in this bench.</p>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io-old
|
clean/Linux-x86_64-4.02.1-1.2.0/unstable/8.4.5/contrib:lambda/dev/2014-11-17_16-11-16.html
|
HTML
|
mit
| 5,332
|
<?php
/**
* mcrypt polyfill
*
* PHP 7.1 removed the mcrypt extension. This provides a compatibility layer for legacy applications.
*
* PHP versions 5 and 7
*
* LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author Jim Wigginton <terrafrost@php.net>
* @copyright 2016 Jim Wigginton
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @link http://phpseclib.sourceforge.net
*/
use phpseclib3\Crypt\Rijndael;
use phpseclib3\Crypt\Twofish;
use phpseclib3\Crypt\Blowfish;
use phpseclib3\Crypt\TripleDES;
use phpseclib3\Crypt\DES;
use phpseclib3\Crypt\RC2;
use phpseclib3\Crypt\RC4;
use phpseclib3\Crypt\Random;
use phpseclib3\Crypt\Common\SymmetricKey as Base;
if (!defined('MCRYPT_MODE_ECB')) {
/**#@+
* mcrypt constants
*
* @access public
*/
// http://php.net/manual/en/mcrypt.constants.php
define('MCRYPT_MODE_ECB', 'ecb');
define('MCRYPT_MODE_CBC', 'cbc');
define('MCRYPT_MODE_CFB', 'cfb');
define('MCRYPT_MODE_OFB', 'ofb');
define('MCRYPT_MODE_NOFB', 'nofb');
define('MCRYPT_MODE_STREAM', 'stream');
define('MCRYPT_ENCRYPT', 0);
define('MCRYPT_DECRYPT', 1);
define('MCRYPT_DEV_RANDOM', 0);
define('MCRYPT_DEV_URANDOM', 1);
define('MCRYPT_RAND', 2);
// http://php.net/manual/en/mcrypt.ciphers.php
define('MCRYPT_3DES', 'tripledes');
define('MCRYPT_ARCFOUR_IV', 'arcfour-iv');
define('MCRYPT_ARCFOUR', 'arcfour');
define('MCRYPT_BLOWFISH', 'blowfish');
define('MCRYPT_CAST_128', 'cast-128');
define('MCRYPT_CAST_256', 'cast-256');
define('MCRYPT_CRYPT', 'crypt');
define('MCRYPT_DES', 'des');
// MCRYPT_DES_COMPAT?
// MCRYPT_ENIGMA?
define('MCRYPT_GOST', 'gost');
define('MCRYPT_IDEA', 'idea');
define('MCRYPT_LOKI97', 'loki97');
define('MCRYPT_MARS', 'mars');
define('MCRYPT_PANAMA', 'panama');
define('MCRYPT_RIJNDAEL_128', 'rijndael-128');
define('MCRYPT_RIJNDAEL_192', 'rijndael-192');
define('MCRYPT_RIJNDAEL_256', 'rijndael-256');
define('MCRYPT_RC2', 'rc2');
// MCRYPT_RC4?
define('MCRYPT_RC6', 'rc6');
// MCRYPT_RC6_128
// MCRYPT_RC6_192
// MCRYPT_RC6_256
define('MCRYPT_SAFER64', 'safer-sk64');
define('MCRYPT_SAFER128', 'safer-sk128');
define('MCRYPT_SAFERPLUS', 'saferplus');
define('MCRYPT_SERPENT', 'serpent');
// MCRYPT_SERPENT_128?
// MCRYPT_SERPENT_192?
// MCRYPT_SERPENT_256?
define('MCRYPT_SKIPJACK', 'skipjack');
// MCRYPT_TEAN?
define('MCRYPT_THREEWAY', 'threeway');
define('MCRYPT_TRIPLEDES', 'tripledes');
define('MCRYPT_TWOFISH', 'twofish');
// MCRYPT_TWOFISH128?
// MCRYPT_TWOFISH192?
// MCRYPT_TWOFISH256?
define('MCRYPT_WAKE', 'wake');
define('MCRYPT_XTEA', 'xtea');
/**#@-*/
}
if (!function_exists('phpseclib_mcrypt_list_algorithms')) {
/**
* Sets the key
*
* @param Base $td
* @param string $key
* @access private
*/
function phpseclib_set_key(Base $td, $key)
{
$length = $origLength = strlen($key);
$reflection = new \ReflectionClass($td);
switch ($reflection->getShortName()) {
case 'TripleDES':
$length = 24;
break;
case 'DES':
$length = 8;
break;
case 'Twofish':
case 'Rijndael':
switch (true) {
case $length <= 16:
$length = 16;
break;
case $length <= 24:
$length = 24;
break;
default:
$length = 32;
}
break;
case 'Blowfish':
switch (true) {
case $length <= 3:
while (strlen($key) <= 5) {
$key.= $key;
}
$key = substr($key, 0, 6);
$td->setKey($key);
return;
case $length > 56:
$length = 56;
}
break;
case 'RC2':
if ($length > 128) {
$length = 128;
}
break;
case 'RC4':
if ($length > 256) {
$length = 256;
}
}
if ($length != $origLength) {
$key = str_pad(substr($key, 0, $length), $length, "\0");
}
$td->setKey($key);
}
/**
* Sets the IV
*
* @param Base $td
* @param string $iv
* @access private
*/
function phpseclib_set_iv(Base $td, $iv)
{
if ($td->getMode() != 'ecb' && $td->getMode() != 'stream') {
$length = $td->getBlockLength() >> 3;
$iv = str_pad(substr($iv, 0, $length), $length, "\0");
$td->setIV($iv);
}
}
/**
* Gets an array of all supported ciphers.
*
* @param string $lib_dir optional
* @return array
* @access public
*/
function phpseclib_mcrypt_list_algorithms($lib_dir = '')
{
return array(
'rijndael-128',
'twofish',
'rijndael-192',
'blowfish-compat',
'des',
'rijndael-256',
'blowfish',
'rc2',
'tripledes',
'arcfour'
);
}
/**
* Gets an array of all supported modes
*
* @param string $lib_dir optional
* @return array
* @access public
*/
function phpseclib_mcrypt_list_modes($lib_dir = '')
{
return array(
'cbc',
'cfb',
'ctr',
'ecb',
'ncfb',
'nofb',
//'ofb',
'stream'
);
}
/**
* Creates an initialization vector (IV) from a random source
*
* The IV is only meant to give an alternative seed to the encryption routines. This IV does not need
* to be secret at all, though it can be desirable. You even can send it along with your ciphertext
* without losing security.
*
* @param int $size
* @param int $source optional
* @return string
* @access public
*/
function phpseclib_mcrypt_create_iv($size, $source = MCRYPT_DEV_URANDOM)
{
if ($size < 1 || $size > 0x7FFFFFFF) {
trigger_error('mcrypt_create_iv(): Cannot create an IV with a size of less than 1 or greater than 2147483647', E_USER_WARNING);
return '';
}
return Random::string($size);
}
/**
* Opens the module of the algorithm and the mode to be used
*
* This function opens the module of the algorithm and the mode to be used. The name of the algorithm
* is specified in algorithm, e.g. "twofish" or is one of the MCRYPT_ciphername constants. The module
* is closed by calling mcrypt_module_close().
*
* @param string $algorithm
* @param string $algorithm_directory
* @param string $mode
* @param string $mode_directory
* @return object
* @access public
*/
function phpseclib_mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory)
{
$modeMap = array(
'ctr' => 'ctr',
'ecb' => 'ecb',
'cbc' => 'cbc',
'cfb' => 'cfb8',
'ncfb'=> 'cfb',
'nofb'=> 'ofb',
'stream' => 'stream'
);
switch (true) {
case !isset($modeMap[$mode]):
case $mode == 'stream' && $algorithm != 'arcfour':
case $algorithm == 'arcfour' && $mode != 'stream':
trigger_error('mcrypt_module_open(): Could not open encryption module', E_USER_WARNING);
return false;
}
switch ($algorithm) {
case 'rijndael-128':
$cipher = new Rijndael($modeMap[$mode]);
$cipher->setBlockLength(128);
break;
case 'twofish':
$cipher = new Twofish($modeMap[$mode]);
break;
case 'rijndael-192':
$cipher = new Rijndael($modeMap[$mode]);
$cipher->setBlockLength(192);
break;
case 'des':
$cipher = new DES($modeMap[$mode]);
break;
case 'rijndael-256':
$cipher = new Rijndael($modeMap[$mode]);
$cipher->setBlockLength(256);
break;
case 'blowfish':
$cipher = new Blowfish($modeMap[$mode]);
break;
case 'rc2':
$cipher = new RC2($modeMap[$mode]);
break;
case'tripledes':
$cipher = new TripleDES($modeMap[$mode]);
break;
case 'arcfour':
$cipher = new RC4();
break;
default:
trigger_error('mcrypt_module_open(): Could not open encryption module', E_USER_WARNING);
return false;
}
$cipher->disablePadding();
return $cipher;
}
/**
* Returns the maximum supported keysize of the opened mode
*
* Gets the maximum supported key size of the algorithm in bytes.
*
* @param Base $td
* @return int
* @access public
*/
function phpseclib_mcrypt_enc_get_key_size(Base $td)
{
// invalid parameters with mcrypt result in warning's. type hinting, as this function is doing,
// produces a catchable fatal error.
$reflection = new \ReflectionClass($td);
switch ($reflection->getShortName()) {
case 'Rijndael':
case 'Twofish':
return 32;
case 'DES':
return 8;
case 'TripleDES':
return 24;
case 'RC4':
return 256;
case 'Blowfish':
return 56;
case 'RC2':
return 128;
}
}
/**
* Gets the name of the specified cipher
*
* @param string $cipher
* @return mixed
* @access public
*/
function phpseclib_mcrypt_get_cipher_name($cipher)
{
switch ($cipher) {
case 'rijndael-128':
return 'Rijndael-128';
case 'twofish':
return 'Twofish';
case 'rijndael-192':
return 'Rijndael-192';
case 'des':
return 'DES';
case 'rijndael-256':
return 'Rijndael-256';
case 'blowfish':
return 'Blowfish';
case 'rc2':
return 'RC2';
case 'tripledes':
return '3DES';
case 'arcfour':
return 'RC4';
default:
return false;
}
}
/**
* Gets the block size of the specified cipher
*
* @param string $cipher
* @param string $mode optional
* @return int
* @access public
*/
function phpseclib_mcrypt_get_block_size($cipher, $mode = false)
{
if (!$mode) {
$mode = $cipher == 'rc4' ? 'stream' : 'cbc';
}
$td = @phpseclib_mcrypt_module_open($cipher, '', $mode, '');
if ($td === false) {
trigger_error('mcrypt_get_block_size(): Module initialization failed', E_USER_WARNING);
return false;
}
return phpseclib_mcrypt_enc_get_block_size($td);
}
/**
* Gets the key size of the specified cipher
*
* @param string $cipher
* @param string $mode optional
* @return int
* @access public
*/
function phpseclib_mcrypt_get_key_size($cipher, $mode = false)
{
if (!$mode) {
$mode = $cipher == 'rc4' ? 'stream' : 'cbc';
}
$td = @phpseclib_mcrypt_module_open($cipher, '', $mode, '');
if ($td === false) {
trigger_error('mcrypt_get_key_size(): Module initialization failed', E_USER_WARNING);
return false;
}
return phpseclib_mcrypt_enc_get_key_size($td);
}
/**
* Returns the size of the IV belonging to a specific cipher/mode combination
*
* @param string $cipher
* @param string $mode
* @return int
* @access public
*/
function phpseclib_mcrypt_get_iv_size($cipher, $mode)
{
$td = @phpseclib_mcrypt_module_open($cipher, '', $mode, '');
if ($td === false) {
trigger_error('mcrypt_get_iv_size(): Module initialization failed', E_USER_WARNING);
return false;
}
return phpseclib_mcrypt_enc_get_iv_size($td);
}
/**
* Returns the maximum supported keysize of the opened mode
*
* Gets the maximum supported keysize of the opened mode.
*
* @param string $algorithm
* @param string $lib_dir
* @return int
* @access public
*/
function phpseclib_mcrypt_module_get_algo_key_size($algorithm, $lib_dir = '')
{
$mode = $algorithm == 'rc4' ? 'stream' : 'cbc';
$td = @phpseclib_mcrypt_module_open($algorithm, '', $mode, '');
if ($td === false) {
trigger_error('mcrypt_module_get_algo_key_size(): Module initialization failed', E_USER_WARNING);
return false;
}
return phpseclib_mcrypt_enc_get_key_size($td);
}
/**
* Returns the size of the IV of the opened algorithm
*
* This function returns the size of the IV of the algorithm specified by the encryption
* descriptor in bytes. An IV is used in cbc, cfb and ofb modes, and in some algorithms
* in stream mode.
*
* @param Base $td
* @return int
* @access public
*/
function phpseclib_mcrypt_enc_get_iv_size(Base $td)
{
return $td->getBlockLength() >> 3;
}
/**
* Returns the blocksize of the opened algorithm
*
* Gets the blocksize of the opened algorithm.
*
* @param Base $td
* @return int
* @access public
*/
function phpseclib_mcrypt_enc_get_block_size(Base $td)
{
return $td->getBlockLength() >> 3;
}
/**
* Returns the blocksize of the specified algorithm
*
* Gets the blocksize of the specified algorithm.
*
* @param string $algorithm
* @param string $lib_dir
* @return int
* @access public
*/
function phpseclib_mcrypt_module_get_algo_block_size($algorithm, $lib_dir = '')
{
// cbc isn't a valid mode for rc4 but that's ok: -1 will still be returned
$td = @phpseclib_mcrypt_module_open($algorithm, '', 'cbc', '');
if ($td === false) {
return -1;
}
return $td->getBlockLength() >> 3;
}
/**
* Returns the name of the opened algorithm
*
* This function returns the name of the algorithm.
*
* @param Base $td
* @return string|bool
* @access public
*/
function phpseclib_mcrypt_enc_get_algorithms_name(Base $td)
{
$reflection = new \ReflectionObject($td);
switch ($reflection->getShortName()) {
case 'Rijndael':
return 'RIJNDAEL-' . $td->getBlockLength();
case 'Twofish':
return 'TWOFISH';
case 'Blowfish':
return 'BLOWFISH'; // what about BLOWFISH-COMPAT?
case 'DES':
return 'DES';
case 'RC2':
return 'RC2';
case 'TripleDES':
return 'TRIPLEDES';
case 'RC4':
return 'ARCFOUR';
}
return false;
}
/**
* Returns the name of the opened mode
*
* This function returns the name of the mode.
*
* @param Base $td
* @return string|bool
* @access public
*/
function phpseclib_mcrypt_enc_get_modes_name(Base $td)
{
$mode = $td->getMode();
switch ($mode) {
case 'cfb':
case 'ofb';
return 'n' . strtoupper($mode);
case 'cfb8':
return strtoupper(substr($mode, 0, 3));
default:
return strtoupper($mode);
}
}
/**
* Checks whether the encryption of the opened mode works on blocks
*
* Tells whether the algorithm of the opened mode works on blocks (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb)..
*
* @param Base $td
* @return bool
* @access public
*/
function phpseclib_mcrypt_enc_is_block_algorithm_mode(Base $td)
{
return $td->getMode() != 'stream';
}
/**
* Checks whether the algorithm of the opened mode is a block algorithm
*
* Tells whether the algorithm of the opened mode is a block algorithm.
*
* @param Base $td
* @return bool
* @access public
*/
function phpseclib_mcrypt_enc_is_block_algorithm(Base $td)
{
return phpseclib_mcrypt_enc_get_algorithms_name($td) != 'ARCFOUR';
}
/**
* Checks whether the opened mode outputs blocks
*
* Tells whether the opened mode outputs blocks (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream).
*
* @param Base $td
* @return bool
* @access public
*/
function phpseclib_mcrypt_enc_is_block_mode(Base $td)
{
return $td->getMode() == 'ecb' || $td->getMode() == 'cbc';
}
/**
* Runs a self test on the opened module
*
* This function runs the self test on the algorithm specified by the descriptor td.
*
* @param Base $td
* @return bool
* @access public
*/
function phpseclib_mcrypt_enc_self_test(Base $td)
{
return true;
}
/**
* This function initializes all buffers needed for en/decryption.
*
* @param Base $td
* @param string $key
* @param string $iv
* @return int
* @access public
*/
function phpseclib_mcrypt_generic_init(Base $td, $key, $iv)
{
$iv_size = phpseclib_mcrypt_enc_get_iv_size($td);
if (strlen($iv) != $iv_size && $td->getMode() != 'ecb') {
trigger_error('mcrypt_generic_init(): Iv size incorrect; supplied length: ' . strlen($iv) . ', needed: ' . $iv_size, E_USER_WARNING);
}
if (!strlen($key)) {
trigger_error('mcrypt_generic_init(): Key size is 0', E_USER_WARNING);
return -3;
}
$max_key_size = phpseclib_mcrypt_enc_get_key_size($td);
if (strlen($key) > $max_key_size) {
trigger_error('mcrypt_generic_init(): Key size too large; supplied length: ' . strlen($key) . ', max: ' . $max_key_size, E_USER_WARNING);
}
phpseclib_set_key($td, $key);
phpseclib_set_iv($td, $iv);
$td->enableContinuousBuffer();
$td->mcrypt_polyfill_init = true;
return 0;
}
/**
* Encrypt / decrypt data
*
* Performs checks common to both mcrypt_generic and mdecrypt_generic
*
* @param Base $td
* @param string $data
* @param string $op
* @return string|bool
* @access private
*/
function phpseclib_mcrypt_generic_helper(Base $td, &$data, $op)
{
// in the orig mcrypt, if mcrypt_generic_init() was called and an empty key was provided you'd get the following error:
// Warning: mcrypt_generic(): supplied resource is not a valid MCrypt resource
// that error doesn't really make a lot of sense in this context since $td is not a resource nor should it be one.
// in light of that we'll just display the same error that you get when you don't call mcrypt_generic_init() at all
if (!isset($td->mcrypt_polyfill_init)) {
trigger_error('m' . $op . '_generic(): Operation disallowed prior to mcrypt_generic_init().', E_USER_WARNING);
return false;
}
// phpseclib does not currently provide a way to retrieve the mode once it has been set via "public" methods
if (phpseclib_mcrypt_enc_is_block_mode($td)) {
$block_length = phpseclib_mcrypt_enc_get_iv_size($td);
$extra = strlen($data) % $block_length;
if ($extra) {
$data.= str_repeat("\0", $block_length - $extra);
}
}
return $op == 'crypt' ? $td->encrypt($data) : $td->decrypt($data);
}
/**
* This function encrypts data
*
* This function encrypts data. The data is padded with "\0" to make sure the length of the data
* is n * blocksize. This function returns the encrypted data. Note that the length of the
* returned string can in fact be longer than the input, due to the padding of the data.
*
* If you want to store the encrypted data in a database make sure to store the entire string as
* returned by mcrypt_generic, or the string will not entirely decrypt properly. If your original
* string is 10 characters long and the block size is 8 (use mcrypt_enc_get_block_size() to
* determine the blocksize), you would need at least 16 characters in your database field. Note
* the string returned by mdecrypt_generic() will be 16 characters as well...use rtrim($str, "\0")
* to remove the padding.
*
* If you are for example storing the data in a MySQL database remember that varchar fields
* automatically have trailing spaces removed during insertion. As encrypted data can end in a
* space (ASCII 32), the data will be damaged by this removal. Store data in a tinyblob/tinytext
* (or larger) field instead.
*
* @param Base $td
* @param string $data
* @return string|bool
* @access public
*/
function phpseclib_mcrypt_generic(Base $td, $data)
{
return phpseclib_mcrypt_generic_helper($td, $data, 'crypt');
}
/**
* Decrypts data
*
* This function decrypts data. Note that the length of the returned string can in fact be
* longer than the unencrypted string, due to the padding of the data.
*
* @param Base $td
* @param string $data
* @return string|bool
* @access public
*/
function phpseclib_mdecrypt_generic(Base $td, $data)
{
return phpseclib_mcrypt_generic_helper($td, $data, 'decrypt');
}
/**
* This function deinitializes an encryption module
*
* This function terminates encryption specified by the encryption descriptor (td).
* It clears all buffers, but does not close the module. You need to call
* mcrypt_module_close() yourself. (But PHP does this for you at the end of the
* script.)
*
* @param Base $td
* @return bool
* @access public
*/
function phpseclib_mcrypt_generic_deinit(Base $td)
{
if (!isset($td->mcrypt_polyfill_init)) {
trigger_error('mcrypt_generic_deinit(): Could not terminate encryption specifier', E_USER_WARNING);
return false;
}
$td->disableContinuousBuffer();
unset($td->mcrypt_polyfill_init);
return true;
}
/**
* Closes the mcrypt module
*
* Closes the specified encryption handle.
*
* @param Base $td
* @return bool
* @access public
*/
function phpseclib_mcrypt_module_close(Base $td)
{
//unset($td->mcrypt_polyfill_init);
return true;
}
/**
* Returns an array with the supported keysizes of the opened algorithm
*
* Returns an array with the key sizes supported by the specified algorithm.
* If it returns an empty array then all key sizes between 1 and mcrypt_module_get_algo_key_size()
* are supported by the algorithm.
*
* @param string $algorithm
* @param string $lib_dir optional
* @return array
* @access public
*/
function phpseclib_mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = '')
{
switch ($algorithm) {
case 'rijndael-128':
case 'rijndael-192':
case 'rijndael-256':
case 'twofish':
return array(16, 24, 32);
case 'des':
return array(8);
case 'tripledes':
return array(24);
//case 'arcfour':
//case 'blowfish':
//case 'rc2':
default:
return array();
}
}
/**
* Returns an array with the supported keysizes of the opened algorithm
*
* Gets the supported key sizes of the opened algorithm.
*
* @param Base $td
* @return array
* @access public
*/
function phpseclib_mcrypt_enc_get_supported_key_sizes(Base $td)
{
$algorithm = strtolower(phpseclib_mcrypt_enc_get_algorithms_name($td));
return phpseclib_mcrypt_module_get_supported_key_sizes($algorithm);
}
/**
* Returns if the specified module is a block algorithm or not
*
* This function returns TRUE if the mode is for use with block algorithms, otherwise it returns FALSE. (e.g. FALSE for stream, and TRUE for cbc, cfb, ofb).
*
* @param string $mode
* @param string $lib_dir optional
* @return bool
* @access public
*/
function phpseclib_mcrypt_module_is_block_algorithm_mode($mode, $lib_dir = '')
{
switch ($mode) {
case 'cbc':
case 'ctr':
case 'ecb':
case 'cfb':
case 'ncfb':
case 'nofb':
return true;
}
return false;
}
/**
* This function checks whether the specified algorithm is a block algorithm
*
* This function returns TRUE if the specified algorithm is a block algorithm, or FALSE if it is a stream one.
*
* @param string $mode
* @param string $lib_dir optional
* @return bool
* @access public
*/
function phpseclib_mcrypt_module_is_block_algorithm($algorithm, $lib_dir = '')
{
switch ($algorithm) {
case 'rijndael-128':
case 'twofish':
case 'rijndael-192':
case 'des':
case 'rijndael-256':
case 'blowfish':
case 'rc2':
case 'tripledes':
return true;
}
return false;
}
/**
* Returns if the specified mode outputs blocks or not
*
* This function returns TRUE if the mode outputs blocks of bytes or FALSE if it outputs just bytes. (e.g. TRUE for cbc and ecb, and FALSE for cfb and stream).
*
* @param string $mode
* @param string $lib_dir optional
* @return bool
* @access public
*/
function phpseclib_mcrypt_module_is_block_mode($mode, $lib_dir = '')
{
switch ($mode) {
case 'cbc':
case 'ecb':
return true;
}
return false;
}
/**
* Returns if the specified mode can use an IV or not
*
* @param string $mode
* @return bool
* @access private
*/
function phpseclib_mcrypt_module_is_iv_mode($mode)
{
switch ($mode) {
case 'ecb':
case 'stream':
return false;
}
return true;
}
/**
* This function runs a self test on the specified module
*
* This function runs the self test on the algorithm specified.
*
* @param string $mode
* @param string $lib_dir optional
* @return bool
* @access public
*/
function phpseclib_mcrypt_module_self_test($algorithm, $lib_dir = '')
{
return in_array($algorithm, phpseclib_mcrypt_list_algorithms());
}
/**
* Encrypt / decrypt data
*
* Performs checks common to both mcrypt_encrypt and mcrypt_decrypt
*
* @param string $cipher
* @param string $key
* @param string $data
* @param string $mode
* @param string $iv
* @param string $op
* @return string|bool
* @access private
*/
function phpseclib_mcrypt_helper($cipher, $key, $data, $mode, $iv, $op)
{
// PHP 5.6 made mcrypt_encrypt() a lot less tolerant of bad input but it neglected to change
// anything about mcrypt_generic(). and despite the changes insufficiently long plaintext
// is still accepted.
$keyLen = strlen($key);
$sizes = phpseclib_mcrypt_module_get_supported_key_sizes($cipher);
if (count($sizes) && !in_array($keyLen, $sizes)) {
trigger_error(
'mcrypt_' . $op . '(): Key of size ' . $keyLen . ' not supported by this algorithm. Only keys of sizes ' .
preg_replace('#, (\d+)$#', ' or $1', implode(', ', $sizes)) . ' supported',
E_USER_WARNING
);
return false;
}
$td = @phpseclib_mcrypt_module_open($cipher, '', $mode, '');
if ($td === false) {
trigger_error('mcrypt_encrypt(): Module initialization failed', E_USER_WARNING);
return false;
}
$maxKeySize = phpseclib_mcrypt_enc_get_key_size($td);
if (!count($sizes) && $keyLen > $maxKeySize) {
trigger_error(
'mcrypt_' . $op . '(): Key of size ' . $keyLen . ' not supported by this algorithm. Only keys of size 1 to ' . $maxKeySize . ' supported',
E_USER_WARNING
);
return false;
}
if (phpseclib_mcrypt_module_is_iv_mode($mode)) {
$iv_size = phpseclib_mcrypt_enc_get_iv_size($td);
if (!isset($iv) && $iv_size) {
trigger_error(
'mcrypt_' . $op . '(): Encryption mode requires an initialization vector of size ' . $iv_size,
E_USER_WARNING
);
return false;
}
if (strlen($iv) != $iv_size) {
trigger_error(
'mcrypt_' . $op . '(): Received initialization vector of size ' . strlen($iv) . ', but size ' . $iv_size . ' is required for this encryption mode',
E_USER_WARNING
);
return false;
}
} else {
$iv = null;
}
phpseclib_mcrypt_generic_init($td, $key, $iv);
return $op == 'encrypt' ? phpseclib_mcrypt_generic($td, $data) : phpseclib_mdecrypt_generic($td, $data);
}
/**
* Encrypts plaintext with given parameters
*
* Encrypts the data and returns it.
*
* @param string $cipher
* @param string $key
* @param string $data
* @param string $mode
* @param string $iv optional
* @return string|bool
* @access public
*/
function phpseclib_mcrypt_encrypt($cipher, $key, $data, $mode, $iv = null)
{
return phpseclib_mcrypt_helper($cipher, $key, $data, $mode, $iv, 'encrypt');
}
/**
* Decrypts crypttext with given parameters
*
* Decrypts the data and returns the unencrypted data.
*
* @param string $cipher
* @param string $key
* @param string $data
* @param string $mode
* @param string $iv optional
* @return string|bool
* @access public
*/
function phpseclib_mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null)
{
return phpseclib_mcrypt_helper($cipher, $key, $data, $mode, $iv, 'decrypt');
}
/**
* mcrypt_compat stream filter
*
* @author Jim Wigginton <terrafrost@php.net>
* @access public
*/
class phpseclib_mcrypt_filter extends php_user_filter
{
/**
* The Cipher Object
*
* @var object
* @access private
*/
private $cipher;
/**
* To encrypt or decrypt
*
* @var boolean
* @access private
*/
private $op;
/**
* Buffer for ECB / CBC
*
* @var string
* @access private
*/
private $buffer = '';
/**
* Cipher block length
*
* @var int
* @access private
*/
private $block_length;
/**
* Cipher block mode
*
* @var bool
* @access private
*/
private $block_mode;
/**
* Buffer handle
*
* @var resource
* @access private
*/
private $bh;
/**
* Called when applying the filter
*
* This method is called whenever data is read from or written to the attached stream
* (such as with fread() or fwrite()).
*
* @param resource $in
* @param resource $out
* @param int $consumed
* @param bool $closing
* @link http://php.net/manual/en/php-user-filter.filter.php
* @return int
* @access public
*/
#[\ReturnTypeWillChange]
public function filter($in, $out, &$consumed, $closing)
{
$newlen = 0;
while ($bucket = stream_bucket_make_writeable($in)) {
if ($this->block_mode) {
$bucket->data = $this->buffer . $bucket->data;
$extra = strlen($bucket->data) % $this->block_length;
if (!$extra) {
$this->buffer = '';
} else {
$this->buffer = substr($bucket->data, -$extra);
$bucket->data = substr($bucket->data, 0, -$extra);
}
if (!strlen($bucket->data)) {
continue;
}
}
$bucket->data = $this->op ?
$this->cipher->encrypt($bucket->data) :
$this->cipher->decrypt($bucket->data);
$newlen+= strlen($bucket->data);
$consumed+= $bucket->datalen;
stream_bucket_append($out, $bucket);
}
if ($closing && strlen($this->buffer)) {
$temp = $this->buffer . str_repeat("\0", $this->block_length - strlen($this->buffer));
$data = $this->op ?
$this->cipher->encrypt($temp) :
$this->cipher->decrypt($temp);
$newlen+= strlen($data);
$bucket = stream_bucket_new($this->bh, $data);
$this->buffer = '';
$newlen = 0;
stream_bucket_append($out, $bucket);
}
return $this->block_mode && $newlen && $newlen < $this->block_length ? PSFS_FEED_ME : PSFS_PASS_ON;
}
/**
* Called when creating the filter
*
* This method is called during instantiation of the filter class object.
* If your filter allocates or initializes any other resources (such as a buffer),
* this is the place to do it.
*
* @link http://php.net/manual/en/php-user-filter.oncreate.php
* @return bool
* @access public
*/
#[\ReturnTypeWillChange]
public function onCreate()
{
if (!isset($this->params) || !is_array($this->params)) {
trigger_error('stream_filter_append(): Filter parameters for ' . $this->filtername . ' must be an array');
return false;
}
if (!isset($this->params['iv']) || !is_string($this->params['iv'])) {
trigger_error('stream_filter_append(): Filter parameter[iv] not provided or not of type: string');
return false;
}
if (!isset($this->params['key']) || !is_string($this->params['key'])) {
trigger_error('stream_filter_append(): key not specified or is not a string');
return false;
}
$filtername = substr($this->filtername, 0, 10) == 'phpseclib.' ?
substr($this->filtername, 10) :
$this->filtername;
$parts = explode('.', $filtername);
if (count($parts) != 2) {
trigger_error('stream_filter_append(): Could not open encryption module');
return false;
}
switch ($parts[0]) {
case 'mcrypt':
case 'mdecrypt':
break;
default:
trigger_error('stream_filter_append(): Could not open encryption module');
return false;
}
$mode = isset($this->params['mode']) ? $this->params['mode'] : 'cbc';
$cipher = @phpseclib_mcrypt_module_open($parts[1], '', $mode, '');
if ($cipher === false) {
trigger_error('stream_filter_append(): Could not open encryption module');
return false;
}
$cipher->enableContinuousBuffer();
phpseclib_set_key($cipher, $this->params['key']);
phpseclib_set_iv($cipher, $this->params['iv']);
$this->op = $parts[0] == 'mcrypt';
$this->cipher = $cipher;
$this->block_length = phpseclib_mcrypt_enc_get_iv_size($cipher);
$this->block_mode = phpseclib_mcrypt_module_is_block_mode($mode);
if ($this->block_mode) {
$this->bh = fopen('php://memory', 'w+');
}
return true;
}
/**
* Called when closing the filter
*
* This method is called upon filter shutdown (typically, this is also during stream shutdown), and is
* executed after the flush method is called. If any resources were allocated or initialized during
* onCreate() this would be the time to destroy or dispose of them.
*
* @link http://php.net/manual/en/php-user-filter.onclose.php
* @access public
*/
#[\ReturnTypeWillChange]
public function onClose()
{
if ($this->bh) {
fclose($this->bh);
}
}
}
stream_filter_register('phpseclib.mcrypt.*', 'phpseclib_mcrypt_filter');
stream_filter_register('phpseclib.mdecrypt.*', 'phpseclib_mcrypt_filter');
}
// define
if (!function_exists('mcrypt_list_algorithms')) {
function mcrypt_list_algorithms($lib_dir = '')
{
return phpseclib_mcrypt_list_algorithms($lib_dir);
}
function mcrypt_list_modes($lib_dir = '')
{
return phpseclib_mcrypt_list_modes($lib_dir);
}
function mcrypt_create_iv($size, $source = MCRYPT_DEV_URANDOM)
{
return phpseclib_mcrypt_create_iv($size, $source);
}
function mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory)
{
return phpseclib_mcrypt_module_open($algorithm, $algorithm_directory, $mode, $mode_directory);
}
function mcrypt_enc_get_key_size(Base $td)
{
return phpseclib_mcrypt_enc_get_key_size($td);
}
function mcrypt_enc_get_iv_size(Base $td)
{
return phpseclib_mcrypt_enc_get_iv_size($td);
}
function mcrypt_enc_get_block_size(Base $td)
{
return phpseclib_mcrypt_enc_get_block_size($td);
}
function mcrypt_generic_init(Base $td, $key, $iv)
{
return phpseclib_mcrypt_generic_init($td, $key, $iv);
}
function mcrypt_generic(Base $td, $data)
{
return phpseclib_mcrypt_generic($td, $data);
}
function mcrypt_generic_deinit(Base $td)
{
return phpseclib_mcrypt_generic_deinit($td);
}
function mcrypt_module_close(Base $td)
{
return phpseclib_mcrypt_module_close($td);
}
function mdecrypt_generic(Base $td, $data)
{
return phpseclib_mdecrypt_generic($td, $data);
}
function mcrypt_enc_get_algorithms_name(Base $td)
{
return phpseclib_mcrypt_enc_get_algorithms_name($td);
}
function mcrypt_enc_get_modes_name(Base $td)
{
return phpseclib_mcrypt_enc_get_modes_name($td);
}
function mcrypt_enc_is_block_algorithm_mode(Base $td)
{
return phpseclib_mcrypt_enc_is_block_algorithm_mode($td);
}
function mcrypt_enc_is_block_algorithm(Base $td)
{
return phpseclib_mcrypt_enc_is_block_algorithm($td);
}
function mcrypt_enc_self_test(Base $td)
{
return phpseclib_mcrypt_enc_self_test($td);
}
function mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = '')
{
return phpseclib_mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir);
}
function mcrypt_encrypt($cipher, $key, $data, $mode, $iv = null)
{
return phpseclib_mcrypt_encrypt($cipher, $key, $data, $mode, $iv);
}
function mcrypt_module_get_algo_block_size($algorithm, $lib_dir = '')
{
return phpseclib_mcrypt_module_get_algo_block_size($algorithm, $lib_dir);
}
function mcrypt_get_block_size($cipher, $mode = '')
{
return phpseclib_mcrypt_get_block_size($cipher, $mode);
}
function mcrypt_get_cipher_name($cipher)
{
return phpseclib_mcrypt_get_cipher_name($cipher);
}
function mcrypt_get_key_size($cipher, $mode = false)
{
return phpseclib_mcrypt_get_key_size($cipher, $mode);
}
function mcrypt_get_iv_size($cipher, $mode)
{
return phpseclib_mcrypt_get_iv_size($cipher, $mode);
}
function mcrypt_module_get_algo_key_size($algorithm, $lib_dir = '')
{
return phpseclib_mcrypt_module_get_algo_key_size($algorithm, $lib_dir);
}
function mcrypt_enc_get_supported_key_sizes(Base $td)
{
return phpseclib_mcrypt_enc_get_supported_key_sizes($td);
}
function mcrypt_module_is_block_algorithm_mode($mode, $lib_dir = '')
{
return phpseclib_mcrypt_module_is_block_algorithm_mode($mode, $lib_dir);
}
function mcrypt_module_is_block_algorithm($algorithm, $lib_dir= '')
{
return phpseclib_mcrypt_module_is_block_algorithm($algorithm, $lib_dir);
}
function mcrypt_module_is_block_mode($mode, $lib_dir = '')
{
return phpseclib_mcrypt_module_is_block_mode($mode, $lib_dir);
}
function mcrypt_module_self_test($algorithm, $lib_dir = '')
{
return phpseclib_mcrypt_module_self_test($algorithm, $lib_dir);
}
function mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null)
{
return phpseclib_mcrypt_decrypt($cipher, $key, $data, $mode, $iv);
}
//if (!in_array('mcrypt.*', stream_get_filters()) {
stream_filter_register('mcrypt.*', 'phpseclib_mcrypt_filter');
stream_filter_register('mdecrypt.*', 'phpseclib_mcrypt_filter');
//}
}
|
phpseclib/mcrypt_compat
|
lib/mcrypt.php
|
PHP
|
mit
| 44,042
|
<div class="container" style="margin-top: 80px; height: 100%; padding: 0px; margin-bottom: 50px;">
<div class="row" style="">
<div class="col-lg-12">
<h2 class="page-header" style="margin-top: 0px;">Penjualan SPG</h2>
<ol class="breadcrumb" style="background-color: white; margin-top: 00px;">
<li class="active"><i class="fa fa-home"></i> Penjualan SPG</li>
</ol>
</div>
</div>
<?php if ($this->session->flashdata("status_laporan_penjualan_spg")) { ?>
<div class="alert alert-info siku"><?php echo $this->session->flashdata("status_laporan_penjualan_spg") ?></div>
<?php } ?>
<div style="background-color: white; padding: 20px;">
<!--<div class="col-md-12" style="margin-top: 17px;">-->
<form class="form-inline" method="post" action="<?php
echo current_url();
$total = array();
?>"><?php if ($this->session->userdata("Level") == 0) : ?>
<div class="form-group">
<label class="">Cabang : </label>
<select class="form-control siku" style="width: 200px" name="cabang">
<option value="0"> --- Semua Cabang ---</option>
<?php foreach ($cabangs as $cabang): ?>
<option value="<?php echo $cabang->idcabang ?>"><?php echo $cabang->provinsi ?> - <?php echo $cabang->kabupaten ?></option>
<?php endforeach; ?>
</select>
</div>
<br><br>
<?php endif; ?>
<div class="form-group">
<label for="exampleInputName2">Periode : </label>
<input class="form-control siku" type="text" id="datepicker1" placeholder="Dari" name="tanggal_awal" value="">
</div>
<div class="form-group">
<label for="exampleInputEmail2">Sampai : </label>
<input class="form-control siku" type="text" id="datepicker2" placeholder="Sampai" name="tanggal_akhir" value="">
</div>
<br>
<br>
<div class="form-group" style="margin-left: 27px; ">
<label for="filterSPG">SPG : </label>
<select name="filter" id="filterSPG" style="width: 200px" class="form-control siku">
<option value="0">Semua SPG</option>
<?php foreach ($datasales as $sales): ?>
<option value="<?php echo $sales->id_sales ?>" <?php if ($sales->id_sales == $selectSeles) echo 'selected'; ?>><?php echo $sales->nama ?></option>
<?php endforeach; ?>
</select>
</div>
<br>
<br>
<div class="form-group" style="margin-left: 3px; ">
<label for="filterBarang1">Barang : </label>
<select name="filterBarang" id="filterBarang1" style="width: 200px" class="form-control siku">
<option value="0">Semua Barang</option>
<?php foreach ($barangs as $barang): $total[$barang->IDBarang] = 0; ?>
<option value="<?php echo $barang->IDBarang ?>" <?php if ($barang->IDBarang == $selectBarang) echo 'selected'; ?>><?php echo $barang->namaBarang ?></option>
<?php endforeach; ?>
</select>
</div>
<br>
<br>
<div class="form-group" style="margin-left: 3px;">
<label for="filterBarang1" style="margin-left: 14px;">Email : </label>
<input class="form-control siku" type="text" placeholder="Email" name="email" value="">
<label for="exampleInputName2" class="" style="color: red;">(Diisi jika ingin mengirim email)</label>
</div>
<br>
<div class="form-group" style="margin-left: 8.5%;">
<?php if (form_error('email')) {
?>
<span class='warna' style="color: red;" id='lokasi_error'><p style='margin: 0px; margin-left: 100px;'><?php echo form_error("email") ?></span>
<?php } ?>
</div>
<br>
<div class="form-group" style="margin-left: 3px; padding-left: 6.5%;">
<button type="submit" name='btn_pilih' value='btn_pilih' class="btn btn-default siku"> Pilih </button>
<button type="submit" name='btn_export' value='btn_export' class="btn btn-success siku"> <i class="fa fa-book"></i> Export To XLS </button>
<button type="submit" name='btn_print' value='btn_print' class="btn btn-primary siku"> <i class="fa fa-print"></i> Print </button>
<button type="submit" name='btn_email' value='btn_email' class="btn btn-warning siku"> <i class="fa fa-envelope"></i> Kirim Email </button>
</div>
</form>
<!--</div>-->
</div>
<hr>
<div class="col-md-12" style="background-color: white;">
<?php if ($periode != "Laporan Bulan Ini") {
?>
<h2 style="margin-bottom: 30px;"><i class="fa fa-calendar"></i> Periode <?php echo $periode ?></h2>
<?php } else {
?>
<h2 style="margin-bottom: 30px;"><i class="fa fa-calendar"></i> <?php echo $periode ?></h2>
<?php
}
?>
<table class='table table-striped table-hover' id="list_laporan" style="">
<thead>
<tr>
<th>Tanggal</th>
<th>SPG</th>
<th>Nama Barang</th>
<th>Penjualan(pcs)</th>
<th>Konversi Satuan</th>
<th>Lokasi</th>
</tr>
</thead>
<tbody>
<?php
foreach ($datapenjualan as $penjualan):
$total[$penjualan->IDBarang] += intval($penjualan->jumlah);
if (count($konversi_satuan) > 0) {
$satuan = intval($konversi_satuan[$penjualan->IDBarang]->total_konversi);
}
$jumlah = intval($penjualan->jumlah);
$karton = 0;
if ($satuan != 0) {
$karton = floor($jumlah / ($satuan * 12));
$jumlah %= ($satuan * 12);
}
$lusin = floor($jumlah / 12);
$jumlah %= 12;
?>
<tr>
<td><?php echo strftime("%d-%m-%Y", strtotime($penjualan->tanggal)) ?></td>
<td><?php echo $penjualan->nama ?></td>
<td><?php echo $penjualan->namaBarang ?></td>
<td><?php echo $penjualan->jumlah ?></td>
<td><?php echo ( $karton == 0 ? "" : $karton . " karton ") . ($lusin == 0 ? "" : $lusin . " lusin ") . $jumlah . " pcs" ?></td>
<td><?php echo $penjualan->desa ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tr>
<td colspan="6" style="text-align: center; height: 20px;"></td>
</tr>
<tr>
<td colspan="6" style="text-align: center; font-size: medium; background-color: #ccccff"><strong>TOTAL PENJUALAN</strong> </td>
</tr>
<?php
$counter = 0;
foreach ($total as $key => $value) :
$satuan = 0;
if (count($konversi_satuan) > 0) {
$satuan = intval($konversi_satuan[$key]->total_konversi);
}
$jumlah = intval($value);
$karton = 0;
if ($satuan != 0) {
$karton = floor($jumlah / ($satuan * 12));
$jumlah %= ($satuan * 12);
}
$lusin = floor($jumlah / 12);
$jumlah %= 12;
?>
<tr>
<td colspan="3" style="text-align: right;"><?php echo $barangs[$counter++]->namaBarang ?> :</td>
<td><?php echo $value ?></td>
<td><?php echo ( $karton == 0 ? "" : $karton . " karton ") . ($lusin == 0 ? "" : $lusin . " lusin ") . $jumlah . " pcs" ?></td>
<td></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
<script src="<?php echo base_url(); ?>bootstrap/js/jquery.js"></script>
<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap.min.js"></script>
<script src="<?php echo base_url(); ?>jquery-ui/jquery-ui.js"></script>
<script src="<?php echo base_url() ?>bootstrap/js/ajaxLaporan.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>Datatable/js/jquery.dataTables.js"></script>
<script>
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
"date-dmy-pre": function (a) {
if (a == null || a == "") {
return 0;
}
var date = a.split('-');
return (date[2] + date[1] + date[0]) * 1;
},
"date-dmy-asc": function (a, b) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"date-dmy-desc": function (a, b) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
});
$(document).ready(function () {
$("#lokasi").val('');
$("#salesnya_admin").val('');
$("#nama_produk").val('');
$('#list_laporan').DataTable({
<?php if ($this->session->flashdata("sort_status") == "asc") { ?>
"order": [[0, "asc"]],
<?php } else if ($this->session->flashdata("sort_status") == "") { ?>
"order": [[0, "desc"]],
<?php } ?>
"aoColumnDefs": [
{"sType": "date-dmy", "aTargets": [0]}
]
});
});</script>
<style type="text/css">
.ui-datepicker-year, .ui-datepicker-month{
color: black;
}
</style>
<script>
$("#datepicker1").datepicker({
inline: true,
dateFormat: "dd-mm-yy",
changeYear: true,
changeMonth: true
});
$("#datepicker2").datepicker({
inline: true,
dateFormat: "dd-mm-yy",
changeYear: true,
changeMonth: true
});
$(document).ready(function () {
$("#lokasi").val('');
$("#salesnya_admin").val('');
$("#gaji_sales").val('');
$("#nama_produk").val('');
$(".kas_keluar").val('');
$("#bayar_gaji").hide();
});
</script>
</body>
</html>
|
ocreatagit/penggajian
|
application/views/v_penjualan_spg.php
|
PHP
|
mit
| 10,756
|
#define CODE_ANALYSIS
using System.Windows;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.PlayerFramework
{
/// <summary>
/// Represents the method that will handle the System.Windows.Controls.MediaElement.RateChanged.
/// </summary>
/// <param name="sender">The instance of MediaPlayer that raised the event.</param>
/// <param name="e">The EventArgs containing information about the new rate.</param>
[SuppressMessage("Microsoft.Design", "CA1003:UseGenericEventHandlerInstances", Justification = "MediaElement compatibility")]
public delegate void RateChangedRoutedEventHandler(object sender, RateChangedRoutedEventArgs e);
/// <summary>
/// Provides data for the MediaPlayer.RateChanged event.
/// </summary>
public sealed class RateChangedRoutedEventArgs : RoutedEventArgs
{
/// <summary>
/// Initializes a new instances of the MediaPlayer.RateChangedRoutedEventArgs class with the new rate.
/// </summary>
public RateChangedRoutedEventArgs(double newRate)
{
NewRate = newRate;
}
/// <summary>
/// Gets the new rate
/// </summary>
public double NewRate { get; private set; }
}
}
|
bondarenkod/pf-arm-deploy-error
|
playerframework/WP8.SL.Core/Primitives/RateChangedRoutedEventArgs.cs
|
C#
|
mit
| 1,247
|
#
# Cookbook:: secrets_management
# Spec:: default_spec
#
# maintainer:: Exosphere Data, LLC
# maintainer_email:: chef@exospheredata.com
#
# Copyright:: 2017, Exosphere Data, LLC, All Rights Reserved.
require 'spec_helper'
describe 'secrets_management_test::data_bag' do
before do
stub_data_bag_item('simple', 'item').and_return(
'test_key' => 'value1'
)
end
context 'Validate supported installations' do
platforms = {
'redhat' => {
'versions' => %w(7.3)
},
'ubuntu' => {
'versions' => %w(16.04)
}
}
platforms.each do |platform, components|
components['versions'].each do |version|
context "On #{platform} #{version}" do
context 'When all attributes are default' do
before do
Fauxhai.mock(platform: platform, version: version)
end
let(:runner) do
ChefSpec::SoloRunner.new(platform: platform, version: version, file_cache_path: '/tmp/cache')
end
let(:node) { runner.node }
let(:chef_run) { runner.converge(described_recipe) }
it 'converges successfully' do
expect { chef_run }.to_not raise_error
expect(chef_run).to include_recipe('secrets_management_test::data_bag')
expect(chef_run).to write_log('Test a direct check data_bag item')
expect(chef_run).to create_file('/tmp/cache/data_bag.test').with(content: 'value1')
end
end
end
end
end
end
end
|
exospheredata/secrets_management
|
spec/unit/recipes/data_bag_spec.rb
|
Ruby
|
mit
| 1,555
|
<?php
namespace Oro\Bundle\WorkflowBundle\Tests\Unit\Model\Action;
use Oro\Bundle\EntityBundle\Tests\Unit\ORM\Stub\ItemStub;
use Oro\Bundle\WorkflowBundle\Entity\WorkflowItem;
use Oro\Bundle\WorkflowBundle\Model\Action\StartWorkflow;
use Oro\Component\ConfigExpression\ContextAccessor;
use Symfony\Component\PropertyAccess\PropertyPath;
class StartWorkflowTest extends \PHPUnit\Framework\TestCase
{
/**
* @var StartWorkflow
*/
protected $action;
/**
* @var \PHPUnit\Framework\MockObject\MockObject|
*/
protected $workflowManager;
protected function setUp()
{
$this->workflowManager = $this->getMockBuilder('Oro\Bundle\WorkflowBundle\Model\WorkflowManager')
->disableOriginalConstructor()
->setMethods(array())
->getMock();
$this->action = new StartWorkflow(new ContextAccessor(), $this->workflowManager);
$dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcher')
->disableOriginalConstructor()
->getMock();
$this->action->setDispatcher($dispatcher);
}
protected function tearDown()
{
unset($this->workflowManager);
unset($this->action);
}
/**
* @param array $options
* @dataProvider optionsDataProvider
*/
public function testInitialize(array $options)
{
$this->action->initialize($options);
$this->assertAttributeEquals($options, 'options', $this->action);
}
public function optionsDataProvider()
{
$workflowItem = $this->createWorkflowItem();
$actualContext = new ItemStub(
array(
'workflowName' => 'acmeWorkflow',
'entityValue' => new \DateTime('now'),
'startTransition' => 'acmeStartTransition',
'someKey' => 'someValue'
)
);
$expectedContext = clone $actualContext;
$expectedContext->workflowItem = $workflowItem;
return array(
'minimum options' => array(
'options' => array(
'name' => $actualContext->workflowName,
'attribute' => new PropertyPath('workflowItem'),
),
'actualContext' => $actualContext,
'expectedContext' => $expectedContext,
),
'maximum plain option' => array(
'options' => array(
'name' => $actualContext->workflowName,
'attribute' => new PropertyPath('workflowItem'),
'entity' => new PropertyPath('entityValue'),
'transition' => $actualContext->startTransition,
'data' => array(
'plainData' => 'plainDataValue',
)
),
'actualContext' => $actualContext,
'expectedContext' => $expectedContext,
'expectedData' => array(
'plainData' => 'plainDataValue',
)
),
'maximum property path options' => array(
'options' => array(
'name' => new PropertyPath('workflowName'),
'attribute' => new PropertyPath('workflowItem'),
'entity' => new PropertyPath('entityValue'),
'transition' => new PropertyPath('startTransition'),
'data' => array(
'propertyData' => new PropertyPath('someKey'),
),
),
'actualContext' => $actualContext,
'expectedContext' => $expectedContext,
'expectedData' => array(
'propertyData' => $expectedContext->someKey,
),
),
);
}
/**
* @param array $options
* @param string $exceptionName
* @param string $exceptionMessage
* @dataProvider initializeExceptionDataProvider
*/
public function testInitializeException(array $options, $exceptionName, $exceptionMessage)
{
$this->expectException($exceptionName);
$this->expectExceptionMessage($exceptionMessage);
$this->action->initialize($options);
}
/**
* @return array
*/
public function initializeExceptionDataProvider()
{
return array(
'no name' => array(
'options' => array(),
'exceptionName' => '\Oro\Component\Action\Exception\InvalidParameterException',
'exceptionMessage' => 'Workflow name parameter is required',
),
'no attribute' => array(
'options' => array(
'name' => 'acmeWorkflow'
),
'exceptionName' => '\Oro\Component\Action\Exception\InvalidParameterException',
'exceptionMessage' => 'Attribute name parameter is required',
),
'invalid attribute' => array(
'options' => array(
'name' => 'acmeWorkflow',
'attribute' => 'notPropertyPath'
),
'exceptionName' => '\Oro\Component\Action\Exception\InvalidParameterException',
'exceptionMessage' => 'Attribute must be valid property definition',
),
'invalid entity' => array(
'options' => array(
'name' => 'acmeWorkflow',
'attribute' => new PropertyPath('workflowItem'),
'entity' => 'notPropertyPath'
),
'exceptionName' => '\Oro\Component\Action\Exception\InvalidParameterException',
'exceptionMessage' => 'Entity must be valid property definition',
),
);
}
/**
* @param array $options
* @param ItemStub $actualContext
* @param ItemStub $expectedContext
* @param array $expectedData
* @dataProvider optionsDataProvider
*/
public function testExecute(
array $options,
ItemStub $actualContext,
ItemStub $expectedContext,
array $expectedData = array()
) {
$expectedWorkflowName = $expectedContext->workflowName;
$expectedEntity = !empty($options['entity']) ? $expectedContext->entityValue : null;
$expectedTransition = !empty($options['transition']) ? $expectedContext->startTransition : null;
$expectedWorkflowItem = $expectedContext->workflowItem;
$this->workflowManager->expects($this->once())
->method('startWorkflow')
->with($expectedWorkflowName, $expectedEntity, $expectedTransition, $expectedData)
->will($this->returnValue($expectedWorkflowItem));
$this->action->initialize($options);
$this->action->execute($actualContext);
$this->assertEquals($expectedContext->getData(), $actualContext->getData());
}
/**
* @return WorkflowItem
*/
protected function createWorkflowItem()
{
$workflowItem = new WorkflowItem();
$workflowItem->setId(1);
return $workflowItem;
}
/**
* @expectedException \Oro\Component\Action\Exception\InvalidParameterException
* @expectedExceptionMessage Entity value must be an object
*/
public function testExecuteEntityNotAnObject()
{
$options = array(
'name' => 'acmeWorkflow',
'attribute' => new PropertyPath('workflowItem'),
'entity' => new PropertyPath('entityValue'),
);
$context = new ItemStub(
array(
'workflowName' => 'acmeWorkflow',
'entityValue' => 'notAnObject',
)
);
$this->action->initialize($options);
$this->action->execute($context);
}
}
|
orocrm/platform
|
src/Oro/Bundle/WorkflowBundle/Tests/Unit/Model/Action/StartWorkflowTest.php
|
PHP
|
mit
| 7,892
|
<?php
namespace Oro\Bundle\NavigationBundle\Migrations\Schema\v1_9;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
class ChangeUrlsLength implements Migration
{
/**
* {@inheritdoc}
*/
public function up(Schema $schema, QueryBag $queries)
{
$table = $schema->getTable('oro_navigation_item');
$table
->getColumn('url')
->setType(Type::getType(Type::STRING))
->setOptions(['length' => 8190, 'notnull' => true]);
$table = $schema->getTable('oro_navigation_history');
$table
->getColumn('url')
->setType(Type::getType(Type::STRING))
->setOptions(['length' => 8190, 'notnull' => true]);
$table = $schema->getTable('oro_navigation_menu_upd');
$table
->getColumn('uri')
->setType(Type::getType(Type::STRING))
->setOptions(['length' => 8190, 'notnull' => false]);
}
}
|
orocrm/platform
|
src/Oro/Bundle/NavigationBundle/Migrations/Schema/v1_9/ChangeUrlsLength.php
|
PHP
|
mit
| 1,065
|
<?php
namespace Bundle\AdminBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class AlbumType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name')
->add('type')
->add('cover')
;
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Bundle\AdminBundle\Entity\Album'
));
}
/**
* @return string
*/
public function getName()
{
return 'bundle_adminbundle_album';
}
}
|
Lilrom/collectionOM
|
src/Bundle/AdminBundle/Form/AlbumType.php
|
PHP
|
mit
| 915
|
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin;
using System;
namespace Genocs.Pizia.Web.Api.Infrastructure
{
public class ApplicationRoleManager : RoleManager<IdentityRole>
{
public ApplicationRoleManager(IRoleStore<IdentityRole, string> roleStore)
: base(roleStore)
{
}
public static ApplicationRoleManager Create(IdentityFactoryOptions<ApplicationRoleManager> options, IOwinContext context)
{
var appRoleManager = new ApplicationRoleManager(new RoleStore<IdentityRole>(context.Get<ApplicationDbContext>()));
return appRoleManager;
}
}
}
|
giovanninocco/Genocs.Pizia
|
src/Genocs.Pizia.Web.Api/Infrastructure/ApplicationRoleManager.cs
|
C#
|
mit
| 735
|
### 2016-02-26
#### swift
* <img src='https://avatars0.githubusercontent.com/u/1310293?v=3&s=40' height='20' width='20'>[
IBM-Swift
/
Kitura
](https://github.com/IBM-Swift/Kitura):
Web framework and HTTP server for Swift
* <img src='https://avatars2.githubusercontent.com/u/698982?v=3&s=40' height='20' width='20'>[
allenwong
/
30DaysofSwift
](https://github.com/allenwong/30DaysofSwift):
A self taught project to learn Swift.
* <img src='https://avatars0.githubusercontent.com/u/346853?v=3&s=40' height='20' width='20'>[
hollance
/
swift-algorithm-club
](https://github.com/hollance/swift-algorithm-club):
Algorithms and data structures in Swift, with explanations!
* <img src='https://avatars3.githubusercontent.com/u/3029684?v=3&s=40' height='20' width='20'>[
eure
/
RealmIncrementalStore
](https://github.com/eure/RealmIncrementalStore):
Realm-powered Core Data persistent store
* <img src='https://avatars1.githubusercontent.com/u/1423068?v=3&s=40' height='20' width='20'>[
Ben-G
/
Validated
](https://github.com/Ben-G/Validated):
A Swift μ-Library for Somewhat Dependent Types
* <img src='https://avatars2.githubusercontent.com/u/6917?v=3&s=40' height='20' width='20'>[
necolt
/
Swifton
](https://github.com/necolt/Swifton):
A Ruby on Rails inspired Web Framework for Swift that runs on Linux and OS X
* <img src='https://avatars1.githubusercontent.com/u/949286?v=3&s=40' height='20' width='20'>[
Velhotes
/
Vinyl
](https://github.com/Velhotes/Vinyl):
Network testing à la VCR in Swift
* <img src='https://avatars2.githubusercontent.com/u/1342803?v=3&s=40' height='20' width='20'>[
qutheory
/
vapor
](https://github.com/qutheory/vapor):
Elegant web framework for Swift that works on iOS, OS X, and Ubuntu.
* <img src='https://avatars1.githubusercontent.com/u/11733014?v=3&s=40' height='20' width='20'>[
SvenTiigi
/
STLocationRequest
](https://github.com/SvenTiigi/STLocationRequest):
An elegant and simple 3D Flyover Location Request Screen in Swift
* <img src='https://avatars2.githubusercontent.com/u/3541185?v=3&s=40' height='20' width='20'>[
ricardopereira
/
QuickActions
](https://github.com/ricardopereira/QuickActions):
Swift wrapper for iOS Home Screen Quick Actions (App Icon Shortcuts)
* <img src='https://avatars3.githubusercontent.com/u/1755579?v=3&s=40' height='20' width='20'>[
PerfectlySoft
/
Perfect
](https://github.com/PerfectlySoft/Perfect):
Server-side Swift. The Perfect library, application server, connectors and example apps. (For mobile back-end development, website and web app development, and more...)
* <img src='https://avatars2.githubusercontent.com/u/6511079?v=3&s=40' height='20' width='20'>[
vsouza
/
awesome-ios
](https://github.com/vsouza/awesome-ios):
A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects
* <img src='https://avatars3.githubusercontent.com/u/7659?v=3&s=40' height='20' width='20'>[
mattt
/
Surge
](https://github.com/mattt/Surge):
A Swift library that uses the Accelerate framework to provide high-performance functions for matrix math, digital signal processing, and image manipulation.
* <img src='https://avatars0.githubusercontent.com/u/435208?v=3&s=40' height='20' width='20'>[
CatchChat
/
Yep
](https://github.com/CatchChat/Yep):
Meet Genius
* <img src='https://avatars2.githubusercontent.com/u/573856?v=3&s=40' height='20' width='20'>[
JakeLin
/
IBAnimatable
](https://github.com/JakeLin/IBAnimatable):
Design and prototype UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.
* <img src='https://avatars1.githubusercontent.com/u/169110?v=3&s=40' height='20' width='20'>[
Alamofire
/
Alamofire
](https://github.com/Alamofire/Alamofire):
Elegant HTTP Networking in Swift
* <img src='https://avatars1.githubusercontent.com/u/57446?v=3&s=40' height='20' width='20'>[
hyperoslo
/
Hue
](https://github.com/hyperoslo/Hue):
Hue is the all-in-one coloring utility that you'll ever need.
* <img src='https://avatars1.githubusercontent.com/u/5435782?v=3&s=40' height='20' width='20'>[
Ramotion
/
circle-menu
](https://github.com/Ramotion/circle-menu):
CircleMenu is a simple, elegant menu with a circular layout.
* <img src='https://avatars1.githubusercontent.com/u/1205894?v=3&s=40' height='20' width='20'>[
CosmicMind
/
Material
](https://github.com/CosmicMind/Material):
Express your creativity with Material, an animation and graphics framework for Google's Material Design and Apple's Flat UI in Swift.
* <img src='https://avatars1.githubusercontent.com/u/366926?v=3&s=40' height='20' width='20'>[
danielgindi
/
ios-charts
](https://github.com/danielgindi/ios-charts):
An iOS port of the beautiful MPAndroidChart. - Beautiful charts for iOS apps!
* <img src='https://avatars3.githubusercontent.com/u/1641148?v=3&s=40' height='20' width='20'>[
ReactiveX
/
RxSwift
](https://github.com/ReactiveX/RxSwift):
Reactive Programming in Swift
* <img src='https://avatars3.githubusercontent.com/u/931655?v=3&s=40' height='20' width='20'>[
devxoul
/
URLNavigator
](https://github.com/devxoul/URLNavigator):
Elegant URL Routing for Swift
* <img src='https://avatars1.githubusercontent.com/u/432536?v=3&s=40' height='20' width='20'>[
Carthage
/
Carthage
](https://github.com/Carthage/Carthage):
A simple, decentralized dependency manager for Cocoa
* <img src='https://avatars0.githubusercontent.com/u/272929?v=3&s=40' height='20' width='20'>[
SwiftyJSON
/
SwiftyJSON
](https://github.com/SwiftyJSON/SwiftyJSON):
The better way to deal with JSON data in Swift
* <img src='https://avatars1.githubusercontent.com/u/58962?v=3&s=40' height='20' width='20'>[
apple
/
swift-package-manager
](https://github.com/apple/swift-package-manager):
The Package Manager for the Swift Programming Language
#### objective-c
* <img src='https://avatars3.githubusercontent.com/u/2305214?v=3&s=40' height='20' width='20'>[
dustturtle
/
RealReachability
](https://github.com/dustturtle/RealReachability):
We need to observe the REAL reachability of network. That's what RealReachability do.
* <img src='https://avatars3.githubusercontent.com/u/11935315?v=3&s=40' height='20' width='20'>[
Zepo
/
MLeaksFinder
](https://github.com/Zepo/MLeaksFinder):
Find memory leaks in your iOS app at develop time.
* <img src='https://avatars2.githubusercontent.com/u/2911921?v=3&s=40' height='20' width='20'>[
ChenYilong
/
iOSInterviewQuestions
](https://github.com/ChenYilong/iOSInterviewQuestions):
iOS面试题集锦(附答案)--学习交流群465239521
* <img src='https://avatars2.githubusercontent.com/u/2911921?v=3&s=40' height='20' width='20'>[
ChenYilong
/
CYLTabBarController
](https://github.com/ChenYilong/CYLTabBarController):
最低只需传两个数组即可完成主流App框架搭建
* <img src='https://avatars3.githubusercontent.com/u/7659?v=3&s=40' height='20' width='20'>[
AFNetworking
/
AFNetworking
](https://github.com/AFNetworking/AFNetworking):
A delightful networking framework for iOS, OS X, watchOS, and tvOS.
* <img src='https://avatars1.githubusercontent.com/u/14878214?v=3&s=40' height='20' width='20'>[
google
/
EarlGrey
](https://github.com/google/EarlGrey):
iOS UI Automation Test Framework
* <img src='https://avatars3.githubusercontent.com/u/8285047?v=3&s=40' height='20' width='20'>[
zhengwenming
/
WMPlayer
](https://github.com/zhengwenming/WMPlayer):
WMPlayer视频播放器,AVPlayer的封装,继承UIView,想怎么玩就怎么玩。支持播放mp4、m3u8、3gp、mov,网络和本地视频同时支持。全屏和小屏播放同时支持。
* <img src='https://avatars1.githubusercontent.com/u/839283?v=3&s=40' height='20' width='20'>[
ibireme
/
YYKit
](https://github.com/ibireme/YYKit):
A collection of iOS components.
* <img src='https://avatars0.githubusercontent.com/u/3817366?v=3&s=40' height='20' width='20'>[
CoderMJLee
/
MJRefresh
](https://github.com/CoderMJLee/MJRefresh):
An easy way to use pull-to-refresh.
* <img src='https://avatars1.githubusercontent.com/u/10378703?v=3&s=40' height='20' width='20'>[
raozhizhen
/
JMRoundedCorner
](https://github.com/raozhizhen/JMRoundedCorner):
给UIView设置不触发离屏渲染的圆角
* <img src='https://avatars1.githubusercontent.com/u/432536?v=3&s=40' height='20' width='20'>[
ReactiveCocoa
/
ReactiveCocoa
](https://github.com/ReactiveCocoa/ReactiveCocoa):
Streams of values over time
* <img src='https://avatars0.githubusercontent.com/u/41431?v=3&s=40' height='20' width='20'>[
joeldev
/
JLRoutes
](https://github.com/joeldev/JLRoutes):
URL routing library for iOS with a simple block-based API
* <img src='https://avatars2.githubusercontent.com/u/954279?v=3&s=40' height='20' width='20'>[
BradLarson
/
GPUImage
](https://github.com/BradLarson/GPUImage):
An open source iOS framework for GPU-based image and video processing
* <img src='https://avatars2.githubusercontent.com/u/4723115?v=3&s=40' height='20' width='20'>[
dkhamsing
/
open-source-ios-apps
](https://github.com/dkhamsing/open-source-ios-apps):
Collaborative List of Open-Source iOS Apps
* <img src='https://avatars2.githubusercontent.com/u/329480?v=3&s=40' height='20' width='20'>[
bang590
/
JSPatch
](https://github.com/bang590/JSPatch):
JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally use for hotfix iOS App.
* <img src='https://avatars3.githubusercontent.com/u/58493?v=3&s=40' height='20' width='20'>[
steipete
/
Aspects
](https://github.com/steipete/Aspects):
Delightful, simple library for aspect oriented programming.
* <img src='https://avatars1.githubusercontent.com/u/635751?v=3&s=40' height='20' width='20'>[
azzoor
/
WWDCTV
](https://github.com/azzoor/WWDCTV):
Watch the WWDC Videos on your Apple TV.
* <img src='https://avatars0.githubusercontent.com/u/58428?v=3&s=40' height='20' width='20'>[
mstarke
/
MacPass
](https://github.com/mstarke/MacPass):
A native OS X KeePass client
* <img src='https://avatars1.githubusercontent.com/u/5310542?v=3&s=40' height='20' width='20'>[
Aufree
/
trip-to-iOS
](https://github.com/Aufree/trip-to-iOS):
A curated list of delightful iOS resources.
* <img src='https://avatars1.githubusercontent.com/u/474794?v=3&s=40' height='20' width='20'>[
realm
/
realm-cocoa
](https://github.com/realm/realm-cocoa):
Realm is a mobile database: a replacement for Core Data & SQLite
* <img src='https://avatars0.githubusercontent.com/u/60178?v=3&s=40' height='20' width='20'>[
ccgus
/
fmdb
](https://github.com/ccgus/fmdb):
A Cocoa / Objective-C wrapper around SQLite
* <img src='https://avatars2.githubusercontent.com/u/3831495?v=3&s=40' height='20' width='20'>[
hackiftekhar
/
IQKeyboardManager
](https://github.com/hackiftekhar/IQKeyboardManager):
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
* <img src='https://avatars1.githubusercontent.com/u/131967?v=3&s=40' height='20' width='20'>[
marcuswestin
/
WebViewJavascriptBridge
](https://github.com/marcuswestin/WebViewJavascriptBridge):
An iOS/OSX bridge for sending messages between Obj-C and JavaScript in UIWebViews/WebViews
* <img src='https://avatars0.githubusercontent.com/u/3817366?v=3&s=40' height='20' width='20'>[
CoderMJLee
/
MJExtension
](https://github.com/CoderMJLee/MJExtension):
A fast, convenient and nonintrusive conversion between JSON and model. Your model class don't need to extend another base class. You don't need to modify any model file.
* <img src='https://avatars0.githubusercontent.com/u/4694896?v=3&s=40' height='20' width='20'>[
zhxnlai
/
ZLSwipeableView
](https://github.com/zhxnlai/ZLSwipeableView):
A simple view for building card like interface inspired by Tinder and Potluck.
#### go
* <img src='https://avatars2.githubusercontent.com/u/4014393?v=3&s=40' height='20' width='20'>[
redspread
/
spread
](https://github.com/redspread/spread):
Docker to production in one command
* <img src='https://avatars1.githubusercontent.com/u/520208?v=3&s=40' height='20' width='20'>[
fogleman
/
gg
](https://github.com/fogleman/gg):
Go Graphics - 2D rendering in Go with a simple API.
* <img src='https://avatars0.githubusercontent.com/u/63402?v=3&s=40' height='20' width='20'>[
h2non
/
gentleman
](https://github.com/h2non/gentleman):
Full-featured plugin-driven HTTP client toolkit for Go (͡° ͜ʖ ͡°)
* <img src='https://avatars1.githubusercontent.com/u/5000654?v=3&s=40' height='20' width='20'>[
getlantern
/
lantern
](https://github.com/getlantern/lantern):
Open Internet for everyone. Lantern is a free desktop application that delivers fast, reliable and secure access to the open Internet for users in censored regions. It uses a variety of techniques to stay unblocked, including P2P and domain fronting. Lantern relies on users in uncensored regions acting as access points to the open Internet.
* <img src='https://avatars3.githubusercontent.com/u/13653959?v=3&s=40' height='20' width='20'>[
kubernetes
/
kubernetes
](https://github.com/kubernetes/kubernetes):
Container Cluster Manager from Google
* <img src='https://avatars1.githubusercontent.com/u/283442?v=3&s=40' height='20' width='20'>[
valyala
/
fasthttp
](https://github.com/valyala/fasthttp):
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
* <img src='https://avatars2.githubusercontent.com/u/10999?v=3&s=40' height='20' width='20'>[
grafana
/
grafana
](https://github.com/grafana/grafana):
Gorgeous metric viz, dashboards & editors for Graphite, InfluxDB & OpenTSDB
* <img src='https://avatars0.githubusercontent.com/u/536312?v=3&s=40' height='20' width='20'>[
otoolep
/
rqlite
](https://github.com/otoolep/rqlite):
Replicated SQLite using the Raft consensus protocol
* <img src='https://avatars1.githubusercontent.com/u/749551?v=3&s=40' height='20' width='20'>[
docker
/
docker
](https://github.com/docker/docker):
Docker - the open-source application container engine
* <img src='https://avatars3.githubusercontent.com/u/104030?v=3&s=40' height='20' width='20'>[
golang
/
go
](https://github.com/golang/go):
The Go programming language
* <img src='https://avatars0.githubusercontent.com/u/2946214?v=3&s=40' height='20' width='20'>[
gogits
/
gogs
](https://github.com/gogits/gogs):
Gogs (Go Git Service) is a painless self-hosted Git service.
* <img src='https://avatars1.githubusercontent.com/u/62991?v=3&s=40' height='20' width='20'>[
Masterminds
/
glide
](https://github.com/Masterminds/glide):
Package Management for Golang
* <img src='https://avatars2.githubusercontent.com/u/17150539?v=3&s=40' height='20' width='20'>[
google
/
subcommands
](https://github.com/google/subcommands):
Go subcommand library.
* <img src='https://avatars2.githubusercontent.com/u/114509?v=3&s=40' height='20' width='20'>[
go-kit
/
kit
](https://github.com/go-kit/kit):
A standard library for microservices.
* <img src='https://avatars3.githubusercontent.com/u/2626530?v=3&s=40' height='20' width='20'>[
schachmat
/
wego
](https://github.com/schachmat/wego):
weather app for the terminal
* <img src='https://avatars2.githubusercontent.com/u/90097?v=3&s=40' height='20' width='20'>[
nats-io
/
nuid
](https://github.com/nats-io/nuid):
NATS Unique Identifiers
* <img src='https://avatars1.githubusercontent.com/u/26415?v=3&s=40' height='20' width='20'>[
jrozner
/
sonar
](https://github.com/jrozner/sonar):
Self contained cross platform DNS recon tool
* <img src='https://avatars0.githubusercontent.com/u/1128849?v=3&s=40' height='20' width='20'>[
mholt
/
caddy
](https://github.com/mholt/caddy):
Fast, cross-platform HTTP/2 web server with automatic HTTPS
* <img src='https://avatars3.githubusercontent.com/u/135606?v=3&s=40' height='20' width='20'>[
edmund-huber
/
ergonomadic
](https://github.com/edmund-huber/ergonomadic):
A complete, reliable, ircd written in Go.
* <img src='https://avatars3.githubusercontent.com/u/40650?v=3&s=40' height='20' width='20'>[
mroth
/
slacknimate
](https://github.com/mroth/slacknimate):
text animation for Slack messages
* <img src='https://avatars2.githubusercontent.com/u/17150539?v=3&s=40' height='20' width='20'>[
google
/
logger
](https://github.com/google/logger):
Cross platform Go logging library.
* <img src='https://avatars0.githubusercontent.com/u/8161?v=3&s=40' height='20' width='20'>[
gengo
/
grpc-gateway
](https://github.com/gengo/grpc-gateway):
gRPC to JSON proxy generator
* <img src='https://avatars0.githubusercontent.com/u/770753?v=3&s=40' height='20' width='20'>[
agrison
/
go-tablib
](https://github.com/agrison/go-tablib):
Go Module for Tabular Datasets in CSV, JSON, YAML, etc.
* <img src='https://avatars3.githubusercontent.com/u/31996?v=3&s=40' height='20' width='20'>[
avelino
/
awesome-go
](https://github.com/avelino/awesome-go):
A curated list of awesome Go frameworks, libraries and software
* <img src='https://avatars0.githubusercontent.com/u/536312?v=3&s=40' height='20' width='20'>[
influxdata
/
influxdb
](https://github.com/influxdata/influxdb):
Scalable datastore for metrics, events, and real-time analytics
#### javascript
* <img src='https://avatars1.githubusercontent.com/u/985197?v=3&s=40' height='20' width='20'>[
FreeCodeCamp
/
FreeCodeCamp
](https://github.com/FreeCodeCamp/FreeCodeCamp):
The http://FreeCodeCamp.com open source codebase and curriculum. Learn to code and help nonprofits.
* <img src='https://avatars0.githubusercontent.com/u/10319897?v=3&s=40' height='20' width='20'>[
dthree
/
cash
](https://github.com/dthree/cash):
Cross-platform Linux without the suck
* <img src='https://avatars0.githubusercontent.com/u/633557?v=3&s=40' height='20' width='20'>[
antelle
/
keeweb
](https://github.com/antelle/keeweb):
KeePass web app (unofficial)
* <img src='https://avatars0.githubusercontent.com/u/1816456?v=3&s=40' height='20' width='20'>[
copy
/
v86
](https://github.com/copy/v86):
x86 virtualization in JavaScript, running in your browser and NodeJS
* <img src='https://avatars1.githubusercontent.com/u/2823852?v=3&s=40' height='20' width='20'>[
facebook
/
draft-js
](https://github.com/facebook/draft-js):
A React framework for building text editors.
* <img src='https://avatars0.githubusercontent.com/u/8518239?v=3&s=40' height='20' width='20'>[
VPenkov
/
okayNav
](https://github.com/VPenkov/okayNav):
The world's okayest responsive navigation
* <img src='https://avatars2.githubusercontent.com/u/179558?v=3&s=40' height='20' width='20'>[
santinic
/
how2
](https://github.com/santinic/how2):
stackoverflow from the terminal
* <img src='https://avatars0.githubusercontent.com/u/170270?v=3&s=40' height='20' width='20'>[
sindresorhus
/
ava
](https://github.com/sindresorhus/ava):
Futuristic test runner
* <img src='https://avatars0.githubusercontent.com/u/10319897?v=3&s=40' height='20' width='20'>[
dthree
/
vorpal
](https://github.com/dthree/vorpal):
Node's framework for interactive CLIs.
* <img src='https://avatars3.githubusercontent.com/u/100200?v=3&s=40' height='20' width='20'>[
ryanflorence
/
react-project
](https://github.com/ryanflorence/react-project):
State of the art web development with React.js.
* <img src='https://avatars1.githubusercontent.com/u/7262715?v=3&s=40' height='20' width='20'>[
geeeeeeeeek
/
electronic-wechat
](https://github.com/geeeeeeeeek/electronic-wechat):
A better WeChat client on Mac OS X and Linux.
* <img src='https://avatars1.githubusercontent.com/u/89679?v=3&s=40' height='20' width='20'>[
ampproject
/
amphtml
](https://github.com/ampproject/amphtml):
AMP HTML source code, samples, and documentation. See below for more info.
* <img src='https://avatars0.githubusercontent.com/u/6207220?v=3&s=40' height='20' width='20'>[
codrops
/
Animocons
](https://github.com/codrops/Animocons):
Animated icons powered by the motion graphics library mo.js by Oleg Solomka. Inspiration comes from the Dribbble shot ["Like Animation"](https://dribbble.com/shots/2527200-Like-Animation) by Daryl Ginn.
* <img src='https://avatars2.githubusercontent.com/u/1478800?v=3&s=40' height='20' width='20'>[
legomushroom
/
mojs
](https://github.com/legomushroom/mojs):
motion graphics toolbelt for the web
* <img src='https://avatars3.githubusercontent.com/u/934293?v=3&s=40' height='20' width='20'>[
bevacqua
/
campaign
](https://github.com/bevacqua/campaign):
Compose responsive email templates easily, fill them with models, and send them out.
* <img src='https://avatars1.githubusercontent.com/u/38767?v=3&s=40' height='20' width='20'>[
claudiajs
/
claudia
](https://github.com/claudiajs/claudia):
deploy Node.js microservices to AWS easily
* <img src='https://avatars3.githubusercontent.com/u/8445?v=3&s=40' height='20' width='20'>[
facebook
/
react
](https://github.com/facebook/react):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
* <img src='https://avatars3.githubusercontent.com/u/2293641?v=3&s=40' height='20' width='20'>[
callmecavs
/
bricks.js
](https://github.com/callmecavs/bricks.js):
A blazing fast masonry layout generator for fixed width elements.
* <img src='https://avatars1.githubusercontent.com/u/406732?v=3&s=40' height='20' width='20'>[
ParsePlatform
/
parse-server
](https://github.com/ParsePlatform/parse-server):
Parse-compatible API server module for Node/Express
* <img src='https://avatars3.githubusercontent.com/u/810438?v=3&s=40' height='20' width='20'>[
reactjs
/
redux
](https://github.com/reactjs/redux):
Predictable state container for JavaScript apps
* <img src='https://avatars3.githubusercontent.com/u/319465?v=3&s=40' height='20' width='20'>[
markdown-it
/
markdown-it
](https://github.com/markdown-it/markdown-it):
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
* <img src='https://avatars2.githubusercontent.com/u/230541?v=3&s=40' height='20' width='20'>[
mbostock
/
d3
](https://github.com/mbostock/d3):
A JavaScript visualization library for HTML and SVG.
* <img src='https://avatars0.githubusercontent.com/u/6960?v=3&s=40' height='20' width='20'>[
nfl
/
react-wildcat
](https://github.com/nfl/react-wildcat):
An opinionated React environment.
* <img src='https://avatars3.githubusercontent.com/u/6692932?v=3&s=40' height='20' width='20'>[
joshwcomeau
/
react-flip-move
](https://github.com/joshwcomeau/react-flip-move):
Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.
* <img src='https://avatars2.githubusercontent.com/u/697676?v=3&s=40' height='20' width='20'>[
vdemedes
/
gifi
](https://github.com/vdemedes/gifi):
watch GIFs while running npm install
#### ruby
* <img src='https://avatars3.githubusercontent.com/u/83390?v=3&s=40' height='20' width='20'>[
jondot
/
awesome-react-native
](https://github.com/jondot/awesome-react-native):
An "awesome" type curated list of React Native components, news, tools, and learning material
* <img src='https://avatars1.githubusercontent.com/u/1589480?v=3&s=40' height='20' width='20'>[
Homebrew
/
homebrew
](https://github.com/Homebrew/homebrew):
The missing package manager for OS X.
* <img src='https://avatars0.githubusercontent.com/u/49038?v=3&s=40' height='20' width='20'>[
danger
/
danger
](https://github.com/danger/danger):
Formalize your Pull Request etiquette.
* <img src='https://avatars1.githubusercontent.com/u/3124?v=3&s=40' height='20' width='20'>[
rails
/
rails
](https://github.com/rails/rails):
Ruby on Rails
* <img src='https://avatars2.githubusercontent.com/u/237985?v=3&s=40' height='20' width='20'>[
jekyll
/
jekyll
](https://github.com/jekyll/jekyll):
Jekyll is a blog-aware, static site generator in Ruby
* <img src='https://avatars2.githubusercontent.com/u/869950?v=3&s=40' height='20' width='20'>[
fastlane
/
fastlane
](https://github.com/fastlane/fastlane):
Connect all iOS deployment tools into one streamlined workflow
* <img src='https://avatars1.githubusercontent.com/u/52172?v=3&s=40' height='20' width='20'>[
codekitchen
/
dinghy
](https://github.com/codekitchen/dinghy):
faster, friendlier Docker on OS X
* <img src='https://avatars2.githubusercontent.com/u/1299?v=3&s=40' height='20' width='20'>[
mitchellh
/
vagrant
](https://github.com/mitchellh/vagrant):
Vagrant is a tool for building and distributing development environments.
* <img src='https://avatars1.githubusercontent.com/u/7?v=3&s=40' height='20' width='20'>[
puma
/
puma
](https://github.com/puma/puma):
A ruby web server built for concurrency
* <img src='https://avatars1.githubusercontent.com/u/188?v=3&s=40' height='20' width='20'>[
sass
/
sass
](https://github.com/sass/sass):
Sass makes CSS fun again.
* <img src='https://avatars2.githubusercontent.com/u/1356007?v=3&s=40' height='20' width='20'>[
kilimchoi
/
engineering-blogs
](https://github.com/kilimchoi/engineering-blogs):
A curated list of engineering blogs
* <img src='https://avatars0.githubusercontent.com/u/5213?v=3&s=40' height='20' width='20'>[
discourse
/
discourse
](https://github.com/discourse/discourse):
A platform for community discussion. Free, open, simple.
* <img src='https://avatars2.githubusercontent.com/u/16700?v=3&s=40' height='20' width='20'>[
ruby
/
ruby
](https://github.com/ruby/ruby):
The Ruby Programming Language
* <img src='https://avatars1.githubusercontent.com/u/30442?v=3&s=40' height='20' width='20'>[
sinatra
/
sinatra
](https://github.com/sinatra/sinatra):
Classy web-development dressed in a DSL (official / canonical repo)
* <img src='https://avatars0.githubusercontent.com/u/727482?v=3&s=40' height='20' width='20'>[
caskroom
/
homebrew-cask
](https://github.com/caskroom/homebrew-cask):
A CLI workflow for the administration of Mac applications distributed as binaries
* <img src='https://avatars3.githubusercontent.com/u/9582?v=3&s=40' height='20' width='20'>[
plataformatec
/
devise
](https://github.com/plataformatec/devise):
Flexible authentication solution for Rails with Warden.
* <img src='https://avatars1.githubusercontent.com/u/305940?v=3&s=40' height='20' width='20'>[
gitlabhq
/
gitlabhq
](https://github.com/gitlabhq/gitlabhq):
GitLab is version control for your server
* <img src='https://avatars3.githubusercontent.com/u/2911?v=3&s=40' height='20' width='20'>[
mperham
/
sidekiq
](https://github.com/mperham/sidekiq):
Simple, efficient background processing for Ruby
* <img src='https://avatars2.githubusercontent.com/u/1118459?v=3&s=40' height='20' width='20'>[
shakacode
/
react_on_rails
](https://github.com/shakacode/react_on_rails):
Integration of React + Webpack + Rails to build Universal (Isomorphic) Apps
* <img src='https://avatars1.githubusercontent.com/u/83835?v=3&s=40' height='20' width='20'>[
cantino
/
huginn
](https://github.com/cantino/huginn):
Build agents that monitor and act on your behalf. Your agents are standing by!
* <img src='https://avatars3.githubusercontent.com/u/134?v=3&s=40' height='20' width='20'>[
jnicklas
/
capybara
](https://github.com/jnicklas/capybara):
Acceptance test framework for web applications
* <img src='https://avatars3.githubusercontent.com/u/1048705?v=3&s=40' height='20' width='20'>[
CocoaPods
/
CocoaPods
](https://github.com/CocoaPods/CocoaPods):
The Cocoa Dependency Manager.
* <img src='https://avatars0.githubusercontent.com/u/350770?v=3&s=40' height='20' width='20'>[
rest-client
/
rest-client
](https://github.com/rest-client/rest-client):
Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.
* <img src='https://avatars1.githubusercontent.com/u/1175434?v=3&s=40' height='20' width='20'>[
rapid7
/
metasploit-framework
](https://github.com/rapid7/metasploit-framework):
Metasploit Framework
* <img src='https://avatars3.githubusercontent.com/u/18952?v=3&s=40' height='20' width='20'>[
capistrano
/
capistrano
](https://github.com/capistrano/capistrano):
Remote multi-server automation tool
|
josephyzhou/github-trending
|
2016/2016-02-26.md
|
Markdown
|
mit
| 31,534
|
#!/usr/bin/env bash
#
: ${EM:='em'}
# dired: Open directories with Emacs.
dired ()
{
declare -a args=()
declare -a dirs=()
for arg; do
if test -d "$arg"; then
dirs+=( "$(printf '%q' "$arg")" )
else
args+=( "$arg" )
fi
done
if (( ${#dirs[@]} == 0 )); then
dirs=( '.' )
fi
for d in "${dirs[@]}"; do
eval $EM "${args[@]}" --dired "$d"
done
}
|
slewsys/emacs-cli-front-end
|
contrib/dired.sh
|
Shell
|
mit
| 439
|
var Game = {
tileW: 16,
tileH: 16,
width: 400,
height: 300,
System: {},
Map: {}
};
Game.BOOT = function() {};
Game.BOOT.prototype = {
preload: function() {
this.game.stage.backgroundColor = '#eee';
Game.operate = new Game.System.Operate(this.game);
Game.player = new Game.System.Player(this.game);
Game.npc = new Game.System.Npc(this.game);
},
create: function() {
this.game.state.start('LOAD');
}
};
|
Clunt/shqz
|
client/game.js
|
JavaScript
|
mit
| 442
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE-edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags must come first in the head -->
<title>The Family Summit Foundation - A Center for Grieving Children</title>
<base href="../">
<!-- Bootstrap and JQuery -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="css/base.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- Dropdown hover over for better desktop experience, while preserving mobile compatibility -->
<script src="js/bootstrap-hover-dropdown.min.js"></script>
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<header class="container picture-header">
<a href="./">
<img id="logo" alt="logo" src="images/Center-logo2010.png" />
</a>
</header>
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="./">Home</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-delay="200" data-close-others="true" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="about">Principles & Mission</a></li>
<li><a href="what-we-do">What We Do</a></li>
<li><a href="contact">Contact & Directions</a></li>
<li><a href="staff">Key Staff</a></li>
<li><a href="board-of-trustees">Board of Trustees</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-delay="200" data-close-others="true" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Programs <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="activities">Activities</a></li>
<li><a href="groups">Groups</a></li>
<li><a href="services">Services</a></li>
<li><a href="camp-comfort">Camp Comfort</a></li>
<li><a href="faq">FAQ</a></li>
<li><a href="comments">Comments</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-delay="200" data-close-others="true" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Events <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="calendar">Calendar</a></li>
<li><a href="fundraisers">Fundraisers</a></li>
<li><a href="center-workshop">Center Workshop</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-delay="200" data-close-others="true" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Volunteer <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="volunteer">Volunteer Opportunities</a></li>
<li><a href="training-workshop">Training Workshop</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-hover="dropdown" data-delay="200" data-close-others="true" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Donations <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="donations">Donate</a></li>
<li><a href="wishlist">Wishlist</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<main class="container">
<div id="content">
<h1>Groups</h1>
<div class="pull-left">
<div class="xs-show">
<p>We offer support groups for children ages 3 through 19. We have separate groups for children and teens that are grieving the loss of someone they love because of death, divorce or separation. We also help children who are in foster care, and those with anticipatory grief.</p>
<p>A typical group includes up to 10 children and 5 trained volunteer facilitators and staff. Youth are put into groups according to their age, typically 3-7, 8-12, and 13-19. An adult family member or care-giver must accompany each child and may participate in the adult support group which meets at the same time the children and teens meet.</p>
<p>A Center For Grieving Children offers mutual support and acceptance through listening and sharing. We believe grief is a natural reaction to the loss of a loved one for children as well as adults and that acceptance and caring assist in the healing process. Our goals are to support and nurture children and their families in a loving and understanding environment as they experience grief.</p>
</div>
<div class="col-xs-12 col-sm-6 col-lg-5 pull-right">
<img class="img-responsive img-rounded margin-auto" id="groupImg" src="images/group1.jpg" />
<br>
<blockquote class="col-xs-12">
<q>Groups for bereaved children can provide a safe, supportive context in which children can express feelings. Contact with bereaved peers gives the child the reassurance that he or she is not alone in the experience of loss.</q>
<footer>J. William Worder, Ph.D.</footer>
</blockquote>
</div>
<div class="sm-show">
<p>We offer support groups for children ages 3 through 19. We have separate groups for children and teens that are grieving the loss of someone they love because of death, divorce or separation. We also help children who are in foster care, and those with anticipatory grief.</p>
<p>A typical group includes up to 10 children and 5 trained volunteer facilitators and staff. Youth are put into groups according to their age, typically 3-7, 8-12, and 13-19. An adult family member or care-giver must accompany each child and may participate in the adult support group which meets at the same time the children and teens meet.</p>
<p>A Center For Grieving Children offers mutual support and acceptance through listening and sharing. We believe grief is a natural reaction to the loss of a loved one for children as well as adults and that acceptance and caring assist in the healing process. Our goals are to support and nurture children and their families in a loving and understanding environment as they experience grief.</p>
</div>
<h2>Grief Support Groups:</h2>
<p>For children, teens, and their parents or guardians grieving due to the death of a loved one.</p>
<h3>Groups and Times:</h3>
<ul>
<li>Youth Grief A (ages 3-19) meet the 1st and 3rd Wednesday of each month from 6:00 to 7:30 pm.</li>
<li>Youth Grief B (ages 3-19) meet the 2nd and 4th Thursday of each month from 6:00 to 7:30 pm.</li>
<li>Youth Grief C (ages 3-19) meet the 2nd and 4th Wednesday of each month from 6:00 to 7:30 pm.</li>
<li>Adults meet at the same time as the youth groups.</li>
</ul>
<h2>Divorce and Separation Support Groups:</h2>
<p>For children, teens, and their parents or guardians grieving due to divorce and separation.</p>
<h3>Groups and Times:</h3>
<ul>
<li>Divorce/Separation A (ages 3-19) meet the 1st and 3rd Tuesday of each month from 6:00 to 7:30 pm.</li>
<li>Divorce/Separation B (ages 3-19) meet the 1st and 3rd Thursday of each month from 6:00 to 7:30 pm.</li>
<li>Divorce/Separation C (ages 3-19) meet the 2nd and 4th Tuesday of each month from 6:00 to 7:30 pm.</li>
<li>Adults meet at the same time as the youth groups.</li>
</ul>
<h2>Foster Care Support Groups:</h2>
<p>For children and teens who are experiencing loss, and their foster parents.</p>
<h3>Groups and Times:</h3>
<ul>
<li>Those in foster care meet the 1st and 3rd Thursday of each month from 6:00 to 7:30 pm.</li>
<li>Adults meet at the same time as the youth groups.</li>
</ul>
<h2>Anticipatory Support:</h2>
<p>For children, teens, and their parents or guardians with a loved one who is dying.</p>
<h3>Sessions by appointment.</h3>
</div>
</div>
</main>
</body>
</html>
|
markhaslam/familysummit.org
|
groups/index.html
|
HTML
|
mit
| 9,460
|
<!DOCTYPE html>
<!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open&id=3 (optional: ?Open&page=filename.html&id=x) -->
<!-- Created: ; Product Code: 536; Server: stratnotes2.ic.gc.ca -->
<head>
<!-- Title begins / Début du titre -->
<title>
Motherwood Tim Br Mart -
Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
</title>
<!-- Title ends / Fin du titre -->
<!-- Meta-data begins / Début des métadonnées -->
<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />
<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />
<!-- EPI-11240 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- MCG-202 -->
<meta content="width=device-width,initial-scale=1" name="viewport">
<!-- EPI-11567 -->
<meta name = "format-detection" content = "telephone=no">
<!-- EPI-12603 -->
<meta name="robots" content="noarchive">
<!-- EPI-11190 - Webtrends -->
<script>
var startTime = new Date();
startTime = startTime.getTime();
</script>
<!--[if gte IE 9 | !IE ]><!-->
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">
<!--<![endif]-->
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">
<!--[if lt IE 9]>
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/ie8-wet-boew.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew.min.js"></script>
<![endif]-->
<!--[if lte IE 9]>
<![endif]-->
<noscript><link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" /></noscript>
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<script>dataLayer1 = [];</script>
<!-- End Google Tag Manager -->
<!-- EPI-11235 -->
<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />
</head>
<body class="home" vocab="http://schema.org/" typeof="WebPage">
<!-- EPIC HEADER BEGIN -->
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<noscript><iframe title="Google Tag Manager" src="//www.googletagmanager.com/ns.html?id=GTM-TLGQ9K" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer1'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer1','GTM-TLGQ9K');</script>
<!-- End Google Tag Manager -->
<!-- EPI-12801 -->
<span typeof="Organization"><meta property="legalName" content="Department_of_Industry"></span>
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Skip to main content</a>
</li>
<li class="wb-slc visible-sm visible-md visible-lg">
<a class="wb-sl" href="#wb-info">Skip to "About this site"</a>
</li>
</ul>
<header role="banner">
<div id="wb-bnr" class="container">
<section id="wb-lng" class="visible-md visible-lg text-right">
<h2 class="wb-inv">Language selection</h2>
<div class="row">
<div class="col-md-12">
<ul class="list-inline mrgn-bttm-0">
<li><a href="nvgt.do?V_TOKEN=1492304915892&V_SEARCH.docsCount=3&V_DOCUMENT.docRank=31303&V_SEARCH.docsStart=31302&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=/prfl.do&lang=fra&redirectUrl=/app/scr/imbs/ccc/rgstrtn//magmi/web/download_file.php?_flId?_flxKy=e1s1&estblmntNo=234567041301&profileId=61&_evId=bck&lang=eng&V_SEARCH.showStricts=false&prtl=1&_flId?_flId?_flxKy=e1s1" title="Français" lang="fr">Français</a></li>
</ul>
</div>
</div>
</section>
<div class="row">
<div class="brand col-xs-8 col-sm-9 col-md-6">
<a href="http://www.canada.ca/en/index.html"><object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object><span class="wb-inv"> Government of Canada</span></a>
</div>
<section class="wb-mb-links col-xs-4 col-sm-3 visible-sm visible-xs" id="wb-glb-mn">
<h2>Search and menus</h2>
<ul class="list-inline text-right chvrn">
<li><a href="#mb-pnl" title="Search and menus" aria-controls="mb-pnl" class="overlay-lnk" role="button"><span class="glyphicon glyphicon-search"><span class="glyphicon glyphicon-th-list"><span class="wb-inv">Search and menus</span></span></span></a></li>
</ul>
<div id="mb-pnl"></div>
</section>
<!-- Site Search Removed -->
</div>
</div>
<nav role="navigation" id="wb-sm" class="wb-menu visible-md visible-lg" data-trgt="mb-pnl" data-ajax-fetch="//cdn.canada.ca/gcweb-cdn-dev/sitemenu/sitemenu-en.html" typeof="SiteNavigationElement">
<h2 class="wb-inv">Topics menu</h2>
<div class="container nvbar">
<div class="row">
<ul class="list-inline menu">
<li><a href="https://www.canada.ca/en/services/jobs.html">Jobs</a></li>
<li><a href="http://www.cic.gc.ca/english/index.asp">Immigration</a></li>
<li><a href="https://travel.gc.ca/">Travel</a></li>
<li><a href="https://www.canada.ca/en/services/business.html">Business</a></li>
<li><a href="https://www.canada.ca/en/services/benefits.html">Benefits</a></li>
<li><a href="http://healthycanadians.gc.ca/index-eng.php">Health</a></li>
<li><a href="https://www.canada.ca/en/services/taxes.html">Taxes</a></li>
<li><a href="https://www.canada.ca/en/services.html">More services</a></li>
</ul>
</div>
</div>
</nav>
<!-- EPIC BODY BEGIN -->
<nav role="navigation" id="wb-bc" class="" property="breadcrumb">
<h2 class="wb-inv">You are here:</h2>
<div class="container">
<div class="row">
<ol class="breadcrumb">
<li><a href="/eic/site/icgc.nsf/eng/home" title="Home">Home</a></li>
<li><a href="/eic/site/icgc.nsf/eng/h_07063.html" title="Industries and Business">Industries and Business</a></li>
<li><a href="/eic/site/ccc-rec.nsf/tpl-eng/../eng/home" >Canadian Company Capabilities</a></li>
</ol>
</div>
</div>
</nav>
</header>
<main id="wb-cont" role="main" property="mainContentOfPage" class="container">
<!-- End Header -->
<!-- Begin Body -->
<!-- Begin Body Title -->
<!-- End Body Title -->
<!-- Begin Body Head -->
<!-- End Body Head -->
<!-- Begin Body Content -->
<br>
<!-- Complete Profile -->
<!-- Company Information above tabbed area-->
<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>
<h1 id="wb-cont">
Company profile - Canadian Company Capabilities
</h1>
<div class="profileInfo hidden-print">
<ul class="list-inline">
<li><a href="cccSrch.do?lang=eng&profileId=&prtl=1&key.hitsPerPage=25&searchPage=%252Fapp%252Fccc%252Fsrch%252FcccBscSrch.do%253Flang%253Deng%2526amp%253Bprtl%253D1%2526amp%253Btagid%253D&V_SEARCH.scopeCategory=CCC.Root&V_SEARCH.depth=1&V_SEARCH.showStricts=false&V_SEARCH.sortSpec=title+asc&rstBtn.x=" class="btn btn-link">New Search</a> |</li>
<li><form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">
<input type="hidden" name="lang" value="eng" />
<input type="hidden" name="profileId" value="" />
<input type="hidden" name="prtl" value="1" />
<input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D" />
<input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />
<input type="hidden" name="V_SEARCH.depth" value="1" />
<input type="hidden" name="V_SEARCH.showStricts" value="false" />
<input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />
</form></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=31301&V_DOCUMENT.docRank=31302&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492304922521&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=123456203785&profileId=&key.newSearchLabel=">Previous Company</a></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=31303&V_DOCUMENT.docRank=31304&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492304922521&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567152241&profileId=&key.newSearchLabel=">Next Company</a></li>
</ul>
</div>
<details>
<summary>Third-Party Information Liability Disclaimer</summary>
<p>Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.</p>
</details>
<h2>
Hillcorp Investments Inc.
</h2>
<div class="row">
<div class="col-md-5">
<h2 class="h5 mrgn-bttm-0">Legal Name:</h2>
<p>Hillcorp Investments Inc.</p>
<h2 class="h5 mrgn-bttm-0">Operating Name:</h2>
<p>Motherwood Tim Br Mart</p>
<h2 class="h5 mrgn-bttm-0">Alternate Name:</h2>
<p class="mrgn-bttm-0">Cartwright Building Supplies</p>
<p class="mrgn-bttm-0">Motherwood Tim Br Mart</p>
<p><a href="mailto:mhill@hillcorpinvestments.ca" title="mhill@hillcorpinvestments.ca">mhill@hillcorpinvestments.ca</a></p>
</div>
<div class="col-md-4 mrgn-sm-sm">
<h2 class="h5 mrgn-bttm-0">Mailing Address:</h2>
<address class="mrgn-bttm-md">
398 Kelland Dr.<br/>
HAPPY VALLEY-GOOSE BAY,
Newfoundland and Labrador<br/>
A0P 1C0
<br/>
</address>
<h2 class="h5 mrgn-bttm-0">Location Address:</h2>
<address class="mrgn-bttm-md">
398 Kelland Dr.<br/>
HAPPY VALLEY-GOOSE BAY,
Newfoundland and Labrador<br/>
A0P 1C0
<br/>
</address>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(709) 896-2781
</p>
<p class="mrgn-bttm-lg"><abbr title="Facsimile">Fax</abbr>:
(709) 896-9411</p>
</div>
<div class="col-md-3 mrgn-tp-md">
</div>
</div>
<div class="row mrgn-tp-md mrgn-bttm-md">
<div class="col-md-12">
<h2 class="wb-inv">Company Profile</h2>
<br> Building and Hardware supply store<br>
</div>
</div>
<!-- <div class="wb-tabs ignore-session update-hash wb-eqht-off print-active"> -->
<div class="wb-tabs ignore-session">
<div class="tabpanels">
<details id="details-panel1">
<summary>
Full profile
</summary>
<!-- Tab 1 -->
<h2 class="wb-invisible">
Full profile
</h2>
<!-- Contact Information -->
<h3 class="page-header">
Contact information
</h3>
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Morris
Hill
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title-->
Owner
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Management Executive.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(709) 896-2781
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(709) 896-9411
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
mhill@hillcorpinvestments.ca
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Company Description -->
<h3 class="page-header">
Company description
</h3>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Year Established:
</strong>
</div>
<div class="col-md-7">
2015
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
No
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
444190 - Other Building Material Dealers
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Alternate Industries (NAICS):
</strong>
</div>
<div class="col-md-7">
444130 - Hardware Stores<br>
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Retail
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Total Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$5,000,000 to $9,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
18
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Aboriginal Firm:
</strong>
</div>
<div class="col-md-7">
Registered Aboriginal Business under the Procurement Strategy for Aboriginal Business (PSAB)<br/>
</div>
</div>
</section>
<!-- Products / Services / Licensing -->
<h3 class="page-header">
Product / Service / Licensing
</h3>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Building And Hardware supplies<br>
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Technology Profile -->
<!-- Market Profile -->
<!-- Sector Information -->
<details class="mrgn-tp-md mrgn-bttm-md">
<summary>
Third-Party Information Liability Disclaimer
</summary>
<p>
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
</p>
</details>
</details>
<details id="details-panel2">
<summary>
Contacts
</summary>
<h2 class="wb-invisible">
Contact information
</h2>
<!-- Contact Information -->
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Morris
Hill
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title-->
Owner
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Management Executive.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(709) 896-2781
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(709) 896-9411
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
mhill@hillcorpinvestments.ca
</div>
</div>
</section>
</details>
<details id="details-panel3">
<summary>
Description
</summary>
<h2 class="wb-invisible">
Company description
</h2>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Year Established:
</strong>
</div>
<div class="col-md-7">
2015
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
No
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
444190 - Other Building Material Dealers
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Alternate Industries (NAICS):
</strong>
</div>
<div class="col-md-7">
444130 - Hardware Stores<br>
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Retail
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Total Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$5,000,000 to $9,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
18
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Aboriginal Firm:
</strong>
</div>
<div class="col-md-7">
Registered Aboriginal Business under the Procurement Strategy for Aboriginal Business (PSAB)<br/>
</div>
</div>
</section>
</details>
<details id="details-panel4">
<summary>
Products, services and licensing
</summary>
<h2 class="wb-invisible">
Product / Service / Licensing
</h2>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Building And Hardware supplies<br>
</div>
</div>
</section>
</details>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Last Update Date 2015-07-02
</div>
</div>
<!--
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
-->
<!-- End Body Content -->
<!-- Begin Body Foot -->
<!-- End Body Foot -->
<!-- END MAIN TABLE -->
<!-- End body -->
<!-- Begin footer -->
<div class="row pagedetails">
<div class="col-sm-5 col-xs-12 datemod">
<dl id="wb-dtmd">
<dt class=" hidden-print">Date Modified:</dt>
<dd class=" hidden-print">
<span><time>2017-03-02</time></span>
</dd>
</dl>
</div>
<div class="clear visible-xs"></div>
<div class="col-sm-4 col-xs-6">
</div>
<div class="col-sm-3 col-xs-6 text-right">
</div>
<div class="clear visible-xs"></div>
</div>
</main>
<footer role="contentinfo" id="wb-info">
<nav role="navigation" class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<!-- EPIC FOOTER BEGIN -->
<!-- EPI-11638 Contact us -->
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07026.html#pageid=E048-H00000&from=Industries">Contact us</a></li>
<li><a href="https://www.canada.ca/en/government/dept.html">Departments and agencies</a></li>
<li><a href="https://www.canada.ca/en/government/publicservice.html">Public service and military</a></li>
<li><a href="https://www.canada.ca/en/news.html">News</a></li>
<li><a href="https://www.canada.ca/en/government/system/laws.html">Treaties, laws and regulations</a></li>
<li><a href="https://www.canada.ca/en/transparency/reporting.html">Government-wide reporting</a></li>
<li><a href="http://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https://www.canada.ca/en/government/system.html">How government works</a></li>
<li><a href="http://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https://www.canada.ca/en/social.html">Social media</a></li>
<li><a href="https://www.canada.ca/en/mobile.html">Mobile applications</a></li>
<li><a href="http://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html">Terms and conditions</a></li>
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html#p1">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a>
</div>
<div class="col-xs-6 col-md-2 text-right">
<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>
</div>
</div>
</div>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/wet-boew.min.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew2.min.js"></script>
<![endif]-->
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/theme.min.js"></script>
<!-- EPI-10519 -->
<span class="wb-sessto"
data-wb-sessto='{"inactivity": 1800000, "reactionTime": 180000, "sessionalive": 1800000, "logouturl": "/app/ccc/srch/cccSrch.do?lang=eng&prtl=1"}'></span>
<script src="/eic/home.nsf/js/jQuery.externalOpensInNewWindow.js"></script>
<!-- EPI-11190 - Webtrends -->
<script src="/eic/home.nsf/js/webtrends.js"></script>
<script>var endTime = new Date();</script>
<noscript>
<div><img alt="" id="DCSIMG" width="1" height="1" src="//wt-sdc.ic.gc.ca/dcs6v67hwe0ei7wsv8g9fv50d_3k6i/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=9.4.0&dcssip=www.ic.gc.ca"/></div>
</noscript>
<!-- /Webtrends -->
<!-- JS deps -->
<script src="/eic/home.nsf/js/jquery.imagesloaded.js"></script>
<!-- EPI-11262 - Util JS -->
<script src="/eic/home.nsf/js/_WET_4-0_utils_canada.min.js"></script>
<!-- EPI-11383 -->
<script src="/eic/home.nsf/js/jQuery.icValidationErrors.js"></script>
<span style="display:none;" id='app-info' data-project-groupid='' data-project-artifactid='' data-project-version='' data-project-build-timestamp='' data-issue-tracking='' data-scm-sha1='' data-scm-sha1-abbrev='' data-scm-branch='' data-scm-commit-date=''></span>
</body></html>
<!-- End Footer -->
<!--
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
-->
|
GoC-Spending/data-corporations
|
html/234567156463.html
|
HTML
|
mit
| 37,164
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>zorns-lemma: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.14.1 / zorns-lemma - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
zorns-lemma
<small>
8.6.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-15 19:54:23 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-15 19:54:23 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq 8.14.1 Formal proof management system
dune 2.9.1 Fast, portable, and opinionated build system
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/zorns-lemma"
license: "LGPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ZornsLemma"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [
"keyword: set theory"
"keyword: cardinal numbers"
"keyword: ordinal numbers"
"keyword: countable"
"keyword: quotients"
"keyword: well-orders"
"keyword: Zorn's lemma"
"category: Mathematics/Logic/Set theory"
]
authors: [ "Daniel Schepler <dschepler@gmail.com>" ]
bug-reports: "https://github.com/coq-contribs/zorns-lemma/issues"
dev-repo: "git+https://github.com/coq-contribs/zorns-lemma.git"
synopsis: "Zorn's Lemma"
description:
"This library develops some basic set theory. The main purpose I had in writing it was as support for the Topology library."
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/zorns-lemma/archive/v8.6.0.tar.gz"
checksum: "md5=7086040ceb7b8acf325f5676a1e6483d"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-zorns-lemma.8.6.0 coq.8.14.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.14.1).
The following dependencies couldn't be met:
- coq-zorns-lemma -> coq < 8.7~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-zorns-lemma.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.09.1-2.0.6/released/8.14.1/zorns-lemma/8.6.0.html
|
HTML
|
mit
| 7,074
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hedges: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.7.1+1 / hedges - 8.8.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
hedges
<small>
8.8.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-02-11 17:12:35 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-11 17:12:35 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.7.1+1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.08.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.08.1 Official release 4.08.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/hedges"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Hedges"]
depends: [
"ocaml"
"coq" {>= "8.8" & < "8.9~"}
]
tags: [ "keyword: bisimulation" "keyword: spi-calculus" "keyword: hedges" "category: Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems" "date: 20 April 2004" ]
authors: [ "Sébastien Briais" ]
bug-reports: "https://github.com/coq-contribs/hedges/issues"
dev-repo: "git+https://github.com/coq-contribs/hedges.git"
synopsis: "Some properties of hedges used by hedged bisimulation"
description: """
These properties are in section 6.1 of the paper
"On Bisimulations for the Spi-Calculus" by J. Borgström
and U. Nestmann.
However, we consider here an extended message language."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/hedges/archive/v8.8.0.tar.gz"
checksum: "md5=c5d938fa94645f81135b4b15d3c48db6"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-hedges.8.8.0 coq.8.7.1+1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+1).
The following dependencies couldn't be met:
- coq-hedges -> coq >= 8.8
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-hedges.8.8.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.08.1-2.0.5/released/8.7.1+1/hedges/8.8.0.html
|
HTML
|
mit
| 7,035
|
'use strict';
notesApp.controller('showNotesController', function showNotesController($scope, $location, NotesData) {
$scope.notes = NotesData.getNotes();
$scope.searchFor = '';
$scope.$watch('[searchFor]', function () {
if ($scope.searchFor.trim() === '') {
$scope.notes = NotesData.getNotes();
} else {
$scope.notes = NotesData.search($scope.searchFor);
}
}, true);
$scope.goto = function(note) {
$location.path('/edit/' + note.id);
};
});
|
alexadam/notes
|
public_html/angular/js/controllers/showNotesController.js
|
JavaScript
|
mit
| 537
|
# window 对象
BOM 的核心对象是 window ,它表示浏览器的一个实例。在浏览器中, window 对象有双重角色,它既是通过 JavaScript 访问浏览器窗口的一个接口,又是 ECMAScript 规定的 **Global 对象**。这意味着在网页中定义的任何一个对象、变量和函数,都以 window 作为其 Global 对象,因此有权访问parseInt() 等方法。
|
zhaohaodang/pro-js-talk
|
chapter08/01/window-object.md
|
Markdown
|
mit
| 403
|
var GameCookieKey = "pic2wordkey";
var LevelsCookieKey = "pic2wordlevels";
function Controller() {
//questions
this.currentQuestionId;
this.currentQuestionLevel;
this.currentQuestionIndex;
this.nextQuestionLevel;
this.questions = [];
this.questionLevels = [];
this.questionRepo = [];
this.questionRepoSize = 10;
this.currentQuestionBatch = 1;
this.isFinish = false;
this.difficultyBoundary = 30;
//cookie related
this.forceFromCurrent = false;
this.isAllowCookie = true;
this.readLevelsFromCookie = false;
//preload
this.minPreloadTime = 3500;
this.isPreloadFinished = false;
this.isPreloadTimeUp = false;
this.preloadTimer;
//data url
this.dataBaseUrl = "data/";
this.loadCharactors();
}
Controller.currentQuestionId;
Controller.currentQuestionIndex;
Controller.questionRepo;
Controller.currentQuestionBatch;
Controller.forceFromCurrent;
Controller.charactors;
Controller.needPreload;
Controller.prototype.startGame = function () {
if (readCookie(GameCookieKey) != null) {
this.loadFromCookie();
}
if (readCookie(LevelsCookieKey) != null) {
this.loadLevelsFromCookie();
}
this.initBaseOnUrl();
}
Controller.prototype.stopGame = function()
{
}
Controller.prototype.loadCharactors = function () {
var that = this;
$.getJSON("data/charactors.json", function (data) {
that.charactors = data["charactors"];
});
}
Controller.prototype.loadFromCookie = function () {
var controllerData = readCookie(GameCookieKey);
var values = controllerData.split(',');
this.currentQuestionLevel = parseInt(values[0]);
this.currentQuestionIndex = parseInt(values[1]);
this.currentQuestionBatch = parseInt(values[2]);
this.nextQuestionLevel = parseInt(values[3]);
this.forceFromCurrent = true;
}
Controller.prototype.saveInCookie = function () {
if ( this.isAllowCookie ) {
createCookie( GameCookieKey, this.currentQuestionLevel + "," + this.currentQuestionIndex + "," + this.currentQuestionBatch + "," + this.nextQuestionLevel, 1000);
}
}
Controller.prototype.loadLevelsFromCookie = function() {
var controllerData = readCookie(LevelsCookieKey);
this.questionLevels = controllerData.split(',');
this.readLevelsFromCookie = true;
}
Controller.prototype.saveLevelsInCookie = function() {
if ( this.isAllowCookie ) {
createCookie( LevelsCookieKey, this.questionLevels.join(','));
}
}
Controller.prototype.handlePreloadRequest = function() {
if ( this.questions.length < 1 ) {
this.loadAllQuestions();
} else {
this.loadCurrentQuestions();
}
}
Controller.prototype.initBaseOnUrl = function() {
var date = getURLParameter('date');
if ( date != null && date != "" ) {
this.dataBaseUrl = "data/" + date + "/";
this.forceFromCurrent = false;
this.readLevelsFromCookie = false;
this.isAllowCookie = false;
this.currentQuestionBatch = 1;
this.currentQuestionId = 1;
this.currentQuestionIndex = 0;
this.currentQuestionLevel = 1;
}
}
Controller.prototype.loadAllQuestions = function () {
var that = this;
$.getJSON( this.dataBaseUrl + "questions.json", function(data) {
that.questions = data["questions"];
if ( data["questionRepoSize"] ) {
that.questionRepoSize = data["questionRepoSize"];
}
that.generateLevels();
that.loadCurrentQuestions();
});
}
Controller.prototype.generateLevels = function() {
if ( this.readLevelsFromCookie && this.questionLevels.length == this.questions.length) {
return;
}
var array = [], length = this.questions.length, difficultyBoundary = this.difficultyBoundary, i;
this.questionLevels = [];
for ( i = 0 ; i < Math.min( difficultyBoundary, length ); i ++ ) {
array.push(i);
}
$.merge(this.questionLevels, shuffleArray(array) );
if ( length > difficultyBoundary ) {
for ( i = difficultyBoundary, array = []; i < length; i ++ ) {
array.push(i);
}
$.merge(this.questionLevels, shuffleArray(array) );
}
this.saveLevelsInCookie();
}
Controller.prototype.loadCurrentQuestions = function() {
var start, end, repoLevels=[], that = this;
start = (this.currentQuestionBatch - 1) * this.questionRepoSize;
end = Math.min( this.questions.length, start + this.questionRepoSize);
if ( start > end ) {
//no more questions
this.saveInCookie();
controller.isFinish = true;
SM.SetStateByName('finish');
return;
}
this.questionRepo = [];
repoLevels = this.questionLevels.slice(start, end);
repoLevels.forEach( function(value, index ) {
that.questionRepo.push(that.questions[value]);
});
if (this.forceFromCurrent == false) {
this.currentQuestionIndex = 0;
this.currentQuestionLevel = 1;
this.nextQuestionLevel = this.currentQuestionLevel + 1;
}
this.currentQuestionId = this.questionRepo[this.currentQuestionIndex]["ID"];
this.saveInCookie();
preloadImages(this.questionRepo);
}
Controller.prototype.isAnswerCorrect = function () {
var answerText = '';
$(sprintf("#question-%d .answer-key", this.currentQuestionId)).filter(function () {
return $(this).attr("data-key") != "";
}).each(function (index, elem) {
answerText += elem.getAttribute("data-key");
});
return this.isAnswerCorrectByText(answerText);
}
Controller.prototype.isAnswerCorrectByText = function (answerText) {
if (this.questionRepo[this.currentQuestionIndex]["answer"] == answerText) {
return true;
}
return false;
}
Controller.prototype.processToNextQuestion = function () {
if (this.questionRepo.length > this.currentQuestionIndex + 1) {
this.currentQuestionIndex++;
this.currentQuestionLevel++;
this.nextQuestionLevel++;
this.currentQuestionId = this.questionRepo[this.currentQuestionIndex]["ID"];
this.saveInCookie();
controller.needPreload = false;
}
else {
this.forceFromCurrent = true;
this.currentQuestionBatch++;
this.currentQuestionLevel++;
this.nextQuestionLevel++;
this.currentQuestionIndex = 0;
controller.needPreload = true;
}
}
Controller.prototype.removeLetters = function () {
}
Controller.prototype.update = function () {
}
|
gracianani/pic2word
|
js/Controller.js
|
JavaScript
|
mit
| 6,301
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"/>
<meta content="telephone=no" name="format-detection"/>
<meta content="address=no" name="format-detection"/>
<title> 葡萄酒功效 </title>
<link href="./css/drug.css?v=1" rel="stylesheet" type="text/css"/>
<link href="./css/reset.css?v=1" rel="stylesheet" type="text/css"/>
</head>
<body class="bg-fff">
<section>
<dl>
<dd>法国大科学家巴斯德有句评语:“葡萄酒是最健康、最卫生的饮料”。利用现代化的检测手段,人们至少已测出葡萄酒含有250种以上的成分。其中,矿物质、维生素、氨基酸、尼古酸与白藜芦醇等,都是对人体健康有益的物质。国外有研究表明。葡萄酒具有活血、通脉、助消化、助药力、清洁软化血管、降低血脂、防止胆固醇对心脏造成的危害等功能。 <p></p> 据分析,葡萄酒中单宁酸和抗氧化剂等成分,能促进血液的流通和减少血管壁沉积,有效地降低血液中的坏胆固醇,从而减少坏胆固醇聚集所形成的动脉血块,大大地减少心血管疾病的发病率。法国人每10万人中心血管疾病患者仅有61人,这和法国是消费葡萄酒最高的国家有关。丹麦研究人员在相关研究报告中指出,每天饮用葡萄酒的人群与不饮用者对照,心血管疾病死亡率低49%。美国人将此称为“法国邪门”。</dd><p></p><dd> 法国人进行的一项调查还表明,饮用葡萄酒特别是红葡萄酒,可以改善肾和肝的供血状态。美国医学人员调查发现,老年人喝少量低度葡萄酒,可减少视网膜黄斑退化。此外,葡萄酒对于预防老年痴呆症,以及治疗气血两亏、脑贫血、头晕心悸患者所起的促进作用,也屡见于报端。</dd><p></p><dd> 每天喝一杯葡萄酒,可以防止多种疾病的发生。</dd>
</dl>
</section>
</body>
<!--zly-->
</html>
|
hucaihua/cmssp
|
server/html/disease/306.html
|
HTML
|
mit
| 2,046
|
/**
* Nada
*/
|
amk221/ember-cli-twitter-entities
|
tests/dummy/app/styles/app.css
|
CSS
|
mit
| 16
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
# pylint: disable=W0212,W0613
from twisted.internet.defer import Deferred, DeferredList
from twisted.python.failure import Failure
from twisted.trial.unittest import TestCase
import smartanthill.litemq.exchange as ex
from smartanthill.exception import LiteMQResendFailed
class LiteMQCase(TestCase):
g_resent_nums = 0
def test_declare_exchange(self):
for type_, class_ in {"direct": ex.ExchangeDirect,
"fanout": ex.ExchangeFanout}.items():
self.assertIsInstance(
ex.ExchangeFactory().newExchange("exchange_name", type_),
class_
)
self.assertRaises(
AttributeError,
lambda: ex.ExchangeFactory().newExchange("exchange_name",
"unknown-type")
)
def test_queue_ack_success(self):
message, properties = "Test message", {"foo": "bar"}
def _callback(m, p):
self.assertEqual(m, message)
self.assertEqual(p, properties)
return True
def _resback(result):
self.assertIsInstance(result, bool)
self.assertEqual(result, True)
q = ex.Queue("queue_name", "routing_key", _callback, ack=True)
d = q.put(message, properties)
self.assertIsInstance(d, Deferred)
d.addCallbacks(_resback)
return d
def test_queue_ack_fails(self):
self.g_resent_nums, resend_max = 0, 3
def _callback(m, p):
self.g_resent_nums += 1
# test exception
if self.g_resent_nums == 1:
return 1/0
# test "ack-invalid" that is equl to False
else:
return False
def _errback(result):
self.assertIsInstance(result, Failure)
self.assertTrue(result.check(LiteMQResendFailed))
self.assertEqual(resend_max, self.g_resent_nums)
q = ex.Queue("queue_name", "routing_key", _callback, ack=True)
q.RESEND_MAX = resend_max
q.RESEND_DELAY = 0
d = q.put("Test message", {"foo": "bar"})
self.assertIsInstance(d, Deferred)
d.addBoth(_errback)
return d
def test_queue_nonack(self):
self.g_resent_nums, resend_max = 0, 3
def _callback(m, p):
self.g_resent_nums += 1
return 1/0
def _errback(result):
self.assertNotIsInstance(result, Failure)
self.assertIsInstance(result, bool)
self.assertEqual(result, False)
self.assertEqual(self.g_resent_nums, 1)
q = ex.Queue("queue_name", "routing_key", _callback, ack=False)
q.RESEND_MAX = resend_max
q.RESEND_DELAY = 0
d = q.put("Test message", {"foo": "bar"})
self.assertIsInstance(d, Deferred)
d.addBoth(_errback)
return d
def test_exchange_direct(self):
message, properties = "Test message", {"foo": "bar"}
def _callback(m, p):
self.assertEqual(m, message)
self.assertEqual(p, properties)
myex = ex.ExchangeFactory().newExchange("exchange_name", "direct")
myex.bind_queue("queue_name", "routing_key", _callback)
empty_result = myex.publish("invalid_routing_key", message, properties)
self.assertEqual(empty_result, [])
result = myex.publish("routing_key", message, properties)
self.assertIsInstance(result, list)
self.assertEqual(len(result), 1)
d = result[0]
def _resback(result):
self.assertEqual(result, None)
myex.unbind_queue("queue_name")
self.assertEqual(len(myex._queues), 0)
self.assertIsInstance(d, Deferred)
d.addCallbacks(_resback)
return d
def test_exchange_fanout(self):
self.g_resent_nums = 0
message, properties = "Test message", {"foo": "bar"}
def _callback(m, p):
self.g_resent_nums += 1
self.assertEqual(m, message)
self.assertEqual(p, properties)
myex = ex.ExchangeFactory().newExchange("exchange_name", "fanout")
myex.bind_queue("queue_name", "routing_key", _callback)
result = myex.publish("invalid_routing_key", message, properties)
self.assertIsInstance(result, list)
self.assertEqual(len(result), 1)
d1 = result[0]
result = myex.publish("routing_key", message, properties)
self.assertIsInstance(result, list)
self.assertEqual(len(result), 1)
d2 = result[0]
self.assertIsInstance(d1, Deferred)
self.assertIsInstance(d2, Deferred)
dl = DeferredList([d1, d2])
def _resback(result):
self.assertEqual(result, [(True, None), (True, None)])
dl.addCallbacks(_resback)
return dl
|
smartanthill/smartanthill1_0
|
smartanthill/test/test_litemq.py
|
Python
|
mit
| 4,944
|
#Copyright 2008, Meka Robotics
#All rights reserved.
#http://mekabot.com
#Redistribution and use in source and binary forms, with or without
#modification, are permitted.
#THIS SOFTWARE IS PROVIDED BY THE Copyright HOLDERS AND CONTRIBUTORS
#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
#Copyright OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES INCLUDING,
#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
#LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
#ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#POSSIBILITY OF SUCH DAMAGE.
import time
import numpy.numarray as na
#import Numeric as nu
import math
import os
import sys
import yaml
import m3.unit_conversion as m3u
from m3qa.calibrate import *
from m3qa.calibrate_sensors import *
from m3qa.calibrate_actuator_ec_a1r1 import *
import m3.actuator_ec_pb2 as aec
import m3qa.config_arm_a1r1 as a1r1
# ###################################### a1 J0 ##############################################################
config_default_a1_j0={
'calib':a1r1.config_arm_a1r1_actuator_j0['calib'],
'param':a1r1.config_arm_a1r1_actuator_j0['param'],
'param_internal':
{
'joint_limits': {'both_arms':[-47.0,197.0],'note':'Positive is reaching upward'}
}
}
# ######################################## a1 J1 ############################################################
config_default_a1_j1={
'calib':a1r1.config_arm_a1r1_actuator_j1['calib'],
'param':a1r1.config_arm_a1r1_actuator_j1['param'],
'param_internal':
{
'joint_limits': {'right_arm':[-19,121],'left_arm':[-121,19],'note':'positive is elbow to its right'}
}
}
# ########################################## a1 J2 ##########################################################
config_default_a1_j2={
'calib':a1r1.config_arm_a1r1_actuator_j2['calib'],
'param':a1r1.config_arm_a1r1_actuator_j2['param'],
'param_internal':
{
'joint_limits': {'both_arms':[-76.0,76.0],'note':'positive is reaching to its right'}
}
}
# ############################################# a1 J3 #######################################################
config_default_a1_j3={
'calib':a1r1.config_arm_a1r1_actuator_j3['calib'],
'param':a1r1.config_arm_a1r1_actuator_j3['param'],
'param_internal':
{
'joint_limits': {'both_arms':[0,140.0],'note':'positive is wrist towards chest'}
}
}
# ############################################# a1 J4 #######################################################
config_default_a1_j4={
'calib':a1r1.config_arm_a1r1_actuator_j4['calib'],
'param':a1r1.config_arm_a1r1_actuator_j4['param'],
'param_internal':
{
'joint_limits': {'right_arm':[-78,123],'left_arm':[-123,78],'note':'positive is top of forearm rotating to its right'}
}
}
# ############################################# a1 J5 #######################################################
config_default_a1_j5={
'calib':a1r1.config_arm_a1r1_actuator_j5['calib'],
'param':a1r1.config_arm_a1r1_actuator_j5['param'],
'param_internal':
{
'joint_limits': {'both_arms':[-45,45],'note': 'positive is hand rotating up'}
}
}
# ############################################# a1 J6 #######################################################
config_default_a1_j6={
'calib':a1r1.config_arm_a1r1_actuator_j6['calib'],
'param':a1r1.config_arm_a1r1_actuator_j6['param'],
'param_internal':
{
'joint_limits': {'both_arms':[-45,45],'note':'positive is fingers rotating to its right'}
}
}
# ###########################################################################
class M3Calibrate_Arm_A1R1(M3CalibrateActuatorEcA1R1):
def __init__(self):
M3CalibrateActuatorEcA1R1.__init__(self)
self.joint_names=['Shoulder J0',
'Shoulder J1',
'Shoulder J2',
'Elbow J3',
'Wrist J4',
'Wrist J5',
'Wrist J6']
self.config_default=[
config_default_a1_j0,
config_default_a1_j1,
config_default_a1_j2,
config_default_a1_j3,
config_default_a1_j4,
config_default_a1_j5,
config_default_a1_j6]
def start(self,ctype):
if not M3CalibrateActuatorEcA1R1.start(self,ctype):
return False
self.jid=int(self.comp_ec.name[self.comp_ec.name.find('_j')+2:])
self.param_internal=self.config_default[self.jid]['param_internal']
self.calib_default=self.config_default[self.jid]['calib']
self.param_default=self.config_default[self.jid]['param']
print 'Calibrating joint',self.joint_names[self.jid]
return True
|
ahoarau/m3meka
|
python/scripts/m3qa/calibrate_arm_a1r1.py
|
Python
|
mit
| 4,744
|
---
layout: page
title: Hayden - Ingram Wedding
date: 2016-05-24
author: Elizabeth Travis
tags: weekly links, java
status: published
summary: Maecenas sagittis tortor a rutrum iaculis. Quisque maximus gravida lacinia.
banner: images/banner/leisure-03.jpg
booking:
startDate: 04/06/2016
endDate: 04/09/2016
ctyhocn: MTJCOHX
groupCode: HIW
published: true
---
Etiam erat diam, suscipit nec blandit vitae, pharetra at neque. Vivamus pretium, felis varius pretium cursus, lectus augue fringilla lectus, ac lacinia enim erat id justo. Nunc a tristique neque, a pellentesque enim. Ut tempus ut sapien a vestibulum. Sed ut eros a arcu porttitor dapibus. Duis cursus velit nec dolor tincidunt, in lacinia orci molestie. Vestibulum laoreet cursus interdum. Vivamus id nisl id nunc luctus varius. Cras at fringilla lorem, volutpat molestie dui. Aenean rutrum ligula quis elementum accumsan. Duis ac pharetra erat, a lobortis risus. Praesent velit erat, vulputate ut dictum non, egestas ut quam. Proin elementum a mi vitae tempor. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi cursus varius purus non accumsan.
Integer eget libero sit amet metus accumsan convallis nec et augue. Maecenas pellentesque consequat ante, consequat dapibus tortor consectetur non. Nullam ullamcorper sit amet ante eu sagittis. Nulla eget sapien a urna molestie porttitor sed ut est. Suspendisse rutrum posuere pellentesque. Donec dictum massa magna, eget aliquam nisl cursus at. Morbi ligula felis, consectetur sit amet accumsan sed, vestibulum eu risus. Fusce et finibus mi. Nulla fringilla et purus eu scelerisque.
* Maecenas ultricies dui quis libero vehicula fringilla
* Cras nec nisi nec quam rutrum aliquam nec eget nibh
* Nullam condimentum justo vitae massa porttitor vestibulum.
Nullam mauris diam, dictum sed pellentesque ut, varius vel risus. Aenean sed tellus et nisl feugiat tempor non ut lorem. Vestibulum sed quam eros. Proin id pellentesque lorem, eu aliquet velit. Pellentesque eu gravida sem. Fusce aliquet porttitor tincidunt. Duis hendrerit sodales egestas. Sed suscipit, sem nec auctor egestas, ligula odio egestas nunc, non ornare nunc sem non nibh. Vestibulum laoreet, ipsum vel tincidunt tincidunt, nisl urna viverra nibh, vitae cursus lacus ipsum eu dolor. Maecenas elementum nunc sit amet consectetur ultrices. Proin luctus cursus neque posuere viverra. Maecenas convallis vel magna at commodo. Morbi faucibus est eget est tincidunt tempor. Curabitur sodales, nunc id condimentum volutpat, erat lorem sodales nisl, id fringilla neque enim nec sapien. Nulla facilisi.
Vestibulum pellentesque ipsum id ligula finibus, at cursus ligula vehicula. Pellentesque et sapien ut lectus molestie iaculis. Duis tempus ipsum nec massa dignissim, eget vestibulum nunc tristique. Mauris finibus nibh non magna bibendum maximus. Integer tempor elit ac purus tincidunt pellentesque. Sed aliquam felis magna, et lobortis tortor aliquam sit amet. Etiam efficitur ac diam sed porta. Ut eleifend lectus massa, a fermentum sem hendrerit eu. Duis aliquam convallis eros imperdiet imperdiet. Proin vel magna quis magna tincidunt commodo eu nec magna. Ut sed erat ornare turpis elementum iaculis in quis lorem. Integer at orci vitae leo suscipit lacinia sit amet eget quam. Sed in volutpat felis. Sed non facilisis ante. Curabitur interdum porta urna sollicitudin ullamcorper.
|
KlishGroup/prose-pogs
|
pogs/M/MTJCOHX/HIW/index.md
|
Markdown
|
mit
| 3,377
|
/***Generated Resource **/
var resource = require('resource');
var ComedyEvent = resource.define('ComedyEvent');
ComedyEvent.schema.description = "Event type: Comedy event.";
ComedyEvent.persist('fs');
ComedyEvent.property('additionalType', {
"name" : "additionalType",
"displayName" : "Additional Type",
"description" : "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.",
"type": "string"
});
ComedyEvent.property('description', {
"name" : "description",
"displayName" : "Description",
"description" : "A short description of the item.",
"type": "string"
});
ComedyEvent.property('image', {
"name" : "image",
"displayName" : "Image",
"description" : "URL of an image of the item.",
"type": "string"
});
ComedyEvent.property('name', {
"name" : "name",
"displayName" : "Name",
"description" : "The name of the item.",
"type": "string"
});
ComedyEvent.property('sameAs', {
"name" : "sameAs",
"displayName" : "Same as",
"description" : "URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website.",
"type": "string"
});
ComedyEvent.property('url', {
"name" : "url",
"displayName" : "Url",
"description" : "URL of the item.",
"type": "string"
});
exports.ComedyEvent = ComedyEvent;
ComedyEvent.property('attendee', {
"name" : "attendee",
"displayName" : "Attendee",
"description" : "A person or organization attending the event.",
"type":"object","properties" : {"Organization" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}},"Person" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('attendees', {
"name" : "attendees",
"displayName" : "Attendees",
"description" : "A person attending the event (legacy spelling; see singular form, attendee).",
"type":"object","properties" : {"Organization" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}},"Person" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('duration', {
"name" : "duration",
"displayName" : "Duration",
"description" : "The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format.",
"type": "string"
});
ComedyEvent.property('endDate', {
"name" : "endDate",
"displayName" : "End Date",
"description" : "The end date and time of the event (in ISO 8601 date format).",
"type": "date"
});
ComedyEvent.property('location', {
"name" : "location",
"displayName" : "Location",
"description" : "The location of the event, organization or action.",
"type":"object","properties" : {"Place" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}},"PostalAddress" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('offers', {
"name" : "offers",
"displayName" : "Offers",
"description" : "An offer to sell this item—for example, an offer to sell a product, the DVD of a movie, or tickets to an event.",
"type":"object","properties" : {"Offer" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('performer', {
"name" : "performer",
"displayName" : "Performer",
"description" : "A performer at the event—for example, a presenter, musician, musical group or actor.",
"type":"object","properties" : {"Organization" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}},"Person" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('performers', {
"name" : "performers",
"displayName" : "Performers",
"description" : "The main performer or performers of the event—for example, a presenter, musician, or actor (legacy spelling; see singular form, performer).",
"type":"object","properties" : {"Organization" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}},"Person" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('startDate', {
"name" : "startDate",
"displayName" : "Start Date",
"description" : "The start date and time of the event (in ISO 8601 date format).",
"type": "date"
});
ComedyEvent.property('subEvent', {
"name" : "subEvent",
"displayName" : "Sub Event",
"description" : "An Event that is part of this event. For example, a conference event includes many presentations, each are a subEvent of the conference.",
"type":"object","properties" : {"Event" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('subEvents', {
"name" : "subEvents",
"displayName" : "Sub Events",
"description" : "Events that are a part of this event. For example, a conference event includes many presentations, each are subEvents of the conference (legacy spelling; see singular form, subEvent).",
"type":"object","properties" : {"Event" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
ComedyEvent.property('superEvent', {
"name" : "superEvent",
"displayName" : "Super Event",
"description" : "An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent.",
"type":"object","properties" : {"Event" : {"type" :"object", "properties" : { "id" : { "type" : "array" }}}}
});
exports.ComedyEvent = ComedyEvent;
|
SkiftCreative/node-schema-org
|
resources/ComedyEvent/index.js
|
JavaScript
|
mit
| 6,241
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noarchive">
<meta name="description" content="All of the registration prices, payment methods and instructions are provided for you here.">
<meta name="keywords" content="nanotechnology conference, nanotechnology and drug delivery, nanotechnology and
tissue engineering, self-assembly, nanotechnology and agriculture, nanobiotechnology,
nanobiomedicine, nanomedical engineering, gene delivery, bionanocatalysis, nanobio sensors">
<title>ICNB'18 - Registration</title>
<meta name="handheldfriendly" content="true">
<meta name="mobileoptimized" content="240">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../css/style.css" rel="stylesheet">
<!-- Google Fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,400i,700" rel="stylesheet">
<link rel="shortcut icon" href="../img/favicon.ico" type="image/x-icon">
<!--[if IE-9]><html lang="en" class="ie9"><![endif]-->
<script src='https://www.google.com/recaptcha/api.js'></script>
<script src="../js/modernizr.custom.63321.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-66036121-1', 'auto');
ga('send', 'pageview');
</script>
<script>
(function() {
var cx = '002879881986571969324:_kppretayes';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
</head>
<body>
<nav id="slide-menu">
<h1>ICNB'18</h1>
<ul>
<li><a href="/nbconference/">Home</a></li>
<li><a href="../papers">Submissions</a></li>
<li><a href="../program">Program</a></li>
<li><a href="../dates">Important Dates</a></li>
<li><a href="../registration">Registration</a></li>
<li><a href="../committee">Committee</a></li>
<li><a href="../keynote">Keynotes</a></li>
<li><a href="../venue">Venue</a></li>
<li><a href="../accommodation">Accommodation</a></li>
<li><a href="../past-events">Past Events</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<div id="content">
<div class="desktop">
<div class="cbp-af-header">
<div class="cbp-af-inner">
<a href="/"><img src="../img/logo.png" class="flex-logo"></a>
<nav>
<a href="/">Home</a><p class="dot">·</p><a href="../papers">Submissions</a><p class="dot">·</p><a href="../program">Program</a><p class="dot">·</p><a href="../dates">Important Dates</a><p class="dot">·</p><a href="../registration">Registration</a><p class="dot">·</p><a href="../committee">Committee</a><p class="dot">·</p><a href="../keynote">Keynotes</a><p class="dot">·</p><a href="../venue">Venue</a><p class="dot">·</p><a href="../accommodation">Accommodation</a><p class="dot">·</p><a href="../past-events">Past Events</a><p class="dot">·</p><a href="#contact">Contact</a>
</nav>
</div>
</div>
</div>
<header>
<div class="mobile">
<div class="cbp-af-header">
<div class="cbp-af-inner">
<div class="unit unit-s-3-4 unit-m-1-3 unit-l-1-3">
<a href="/"><img src="../img/logo.png" class="flex-logo"></a>
</div>
<div class="unit unit-s-1-3 unit-m-2-3 unit-m-2-3-1 unit-l-2-3">
<div class="menu-trigger"></div>
</div>
</div>
</div>
<div class="bg">
<h1>3<sup>rd</sup> International Conference on<br> Nanobiotechnology (ICNB'18)</h1>
<p class="subhead">April 10 - 12, 2018 | Budapest, Hungary</p>
<a href="../papers" class="bg-link">Submissions</a> <p class="dot">·</p> <a href="../dates" class="bg-link">Important Dates</a> <p class="dot">·</p> <a href="../registration" class="bg-link">Registration</a>
<div class="searchbox grid">
<div class="unit unit-s-1 unit-m-3-4 unit-l-3-4">
<div class="unit unit-s-1 unit-m-1-4-2 unit-l-1-4-2">
<p class="body">Search:</p>
</div>
<div class="unit unit-s-3-4 unit-m-3-4 unit-l-3-4">
<gcse:searchbox-only resultsUrl="../results"></gcse:searchbox-only>
</div>
</div>
</div>
</div>
</div>
<div class="desktop">
<div class="grid">
<div class="unit unit-s-1 unit-m-1 unit-l-1">
<div class="bg-img">
<img src="../img/header.jpg" class="flex-img" alt="Header">
</div>
<div class="bg">
<h1>3<sup>rd</sup> International Conference on<br> Nanobiotechnology (ICNB'18)</h1>
<p class="subhead">April 10 - 12, 2018 | Budapest, Hungary</p>
<a href="../papers" class="bg-link">Submissions</a> <p class="dot">·</p> <a href="../dates" class="bg-link">Important Dates</a> <p class="dot">·</p> <a href="../registration" class="bg-link">Registration</a>
<div class="searchbox grid">
<div class="unit unit-s-1 unit-m-3-4 unit-l-3-4">
<div class="unit unit-s-1 unit-m-1-4-2 unit-l-1-4-2">
<p class="body">Search:</p>
</div>
<div class="unit unit-s-3-4 unit-m-3-4 unit-l-3-4">
<gcse:searchbox-only resultsUrl="../results"></gcse:searchbox-only>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<div class="grid main-content">
<div class="unit unit-s-1 unit-m-1-3-1 unit-l-1-3-1">
<div class="unit-spacer">
<section class="main">
<ul class="side-bar-menu" style="padding:0px;">
<li><a href="../sponsor">Sponsors & Exhibitors</a></li>
<li><a href="../symposium">Symposium & Workshop</a></li>
<li><a href="../openconf">Submit your Paper</a></li>
</ul>
</section>
<br><br>
</div>
</div>
<div class="unit unit-s-1 unit-m-1-4-1 unit-l-1-4-1">
<div class="unit-spacer content">
<p class="body">The registration fees for the 3<sup>rd</sup> International Conference on Nanobiotechnology (ICNB'18) are listed below. All prices are in Euros and VAT (Value Added Tax) included:</p>
<div class="mobile">
<table>
<tr>
<td class="date-title"><s>Early Bird Registration</s><br><strong>Extended Early Bird Registration</strong><br><s>Prior to November 16, 2017</s><br><b>Prior to February 20, 2018</b></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Students*:</p> <p class="right">€450</p></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Non-Students:</p> <p class="right">€650</p></td>
</tr>
<tr>
<td class="date-title"><s>Regular Registration</s><br><strong>Extended Regular Registration</strong><br><s>Prior to December 21, 2017</s><br><b>Prior to March 13, 2018</b></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Students:</p> <p class="right">€550</p></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Non-Students:</p> <p class="right">€700</p></td>
</tr>
<tr>
<td class="date-title" rowspan="2">Late Registration<br>After March 13, 2018</td>
</tr>
<tr>
<td class="imp-date"><p class="left">Students:</p> <p class="right">€600</p></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Non-Students:</p> <p class="right">€750</p></td>
</tr>
<tr>
<td class="date-title" rowspan="1">Accompanying person(s)**</td>
</tr>
<tr>
<td class="imp-date">€150 (<b>ONLY</b> includes lunches and coffee breaks)<br>Banquet Dinner or Cruise tour <b>ONLY</b>: €50</td>
</tr>
<tr>
<td class="date-title" rowspan="1">Workshop Registration***<br>Prior to March 13, 2018</td>
</tr>
<tr>
<td class="imp-date">€150</td>
</tr>
</table>
</div>
<div class="desktop">
<table>
<tr>
<th class="date-title" rowspan="2"><s>Early Bird Registration</s><br><div class="past-text"><b>Extended Early Bird Registration</b></div><s>Prior to November 16, 2017</s><br><div class="past-text"><b>Prior to February 20, 2018</b></div></th>
<td class="imp-date"><p class="left">Students*:</p> <p class="right">€450</p></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Non-Students:</p> <p class="right">€650</p></td>
</tr>
<tr>
<th class="date-title" rowspan="2"><s>Regular Registration</s><br><div class="past-text"><b>Extended Regular Registration</b></div><s>Prior to December 21, 2017</s><br><div class="past-text"><b>Prior to March 13, 2018</b></div></th>
<td class="imp-date"><p class="left">Students:</p> <p class="right">€550</p></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Non-Students:</p> <p class="right">€700</p></td>
</tr>
<tr>
<th class="date-title" rowspan="2">Late Registration<br> After March 13, 2018</th>
<td class="imp-date"><p class="left">Students:</p> <p class="right">€600</p></td>
</tr>
<tr>
<td class="imp-date"><p class="left">Non-Students:</p> <p class="right">€750</p></td>
</tr>
<tr>
<th class="date-title" rowspan="1">Accompanying person(s)**</th>
<td class="imp-date">€150 (<b>ONLY</b> includes lunches and coffee breaks)<br>Banquet Dinner or Cruise tour <b>ONLY</b>: €50</td>
</tr>
<tr>
<th class="date-title" rowspan="1">Workshop Registration***<br>Prior to March 13, 2018</th>
<td class="imp-date">€150</td>
</tr>
</table>
</div>
<p class="body">*Student Identification will be Required on Registration Desk.<br>
<i>Please note that registration fees are not refundable under any circumstances.</i></p>
<p class="body bold">Registration fee includes the following:</p>
<ul>
<li>Publication of 1 accepted paper in the proceedings. Publication of <i>each additional paper</i> requires a €150 publication fee for a maximum of 2 additional papers</li>
<li>Conference package including a USB of the proceedings with all registered accepted papers</li>
<li>Buffet lunch for each day of the conference</li>
<li>2 coffee breaks for each day of the conference</li>
<li>Closing ceremony on cruise tour</li>
</ul>
<p class="body"><b>**Important information for accompanying person(s):</b> Please be informed that the accompanying person can NOT be a co-author. Co-authors, regardless if 1 author is attending, must pay the full registration fee. The accompany person fee is only for spouses and/or children. Please contact us if you are unsure.</p>
<p class="body"><b>***Important information for workshop registrants:</b> All workshop attendees will receive a certificate of participation. The registration deadline for the workshop is on March 13, 2018. Registration fees will be refunded only if the workshop is cancelled due to insufficient amount of registrants (less than 5).</p>
<p class="body"><b>Important information for registrants who need to apply for VISA:</b><br>
Please visit <a target="_blank" href="http://konzuliszolgalat.kormany.hu/how-to-apply-for-visa" class="body-link"> The Hungarian Government Consular Service</a> for more details.</p>
<p class="body">You may register for ICNB'18 by one of the methods below. Please click on one of the icons to access the details of each payment method.</p>
<center>
<div class="unit unit-s-1 unit-m-1-4 unit-l-1-4">
<a href="../banktobank" class="body-link"><img src="../img/banktransfer.png" width="120px"><br>Bank to Bank Transfer</a>
</div>
<div class="unit unit-s-1 unit-m-1-4 unit-l-1-4">
<a href="../moneyorder" class="body-link"><img src="../img/moneyorder.png" width="120px"><br>Money Order</a>
</div>
<div class="unit unit-s-1 unit-m-1-4 unit-l-1-4">
<a href="../paypal" class="body-link"><img src="../img/creditcard.png" width="120px"><br>Credit Card / PayPal</a>
</div></center><br>
<p class="body">After the registration fee is paid, you must fill out and submit the form below. Failing to fill out this form will result in the elimination of your registration. Please ensure that you follow the instructions carefully to warrant a successful registration.</p>
<p class="body"><i>Please note:</i> If the registration has been done on behalf of another person, the person attending the conference should fill out this form.</p>
<h2>Registration Form</h2>
<form action="../registrationform.php" name="registration" method="post" enctype="multipart/form-data" class="registration">
<label for="Type_of_Registration">Type of Registration:<span class="asterik">*</span></label>
<select name="Type_of_Registration" id="Type_of_Registration">
<option selected="" disabled="">--</option>
<option>Author</option>
<option>Participant</option>
<option>Accompanying Person</option>
<option>Additional Paper</option>
<option>Workshop</option>
<option>Closing Ceremony</option>
</select>
<br>
<label for="title">Title:<span class="asterik">*</span></label>
<select name="title" id="title">
<option selected="" disabled="">--</option>
<option>Dr.</option>
<option>Mr.</option>
<option>Ms.</option>
</select>
<label for="First_Name">First Name:<span class="asterik">*</span></label>
<input type="text" name="First_Name" id="First_Name" placeholder="John"/>
<label for="Last_Name">Last Name:<span class="asterik">*</span></label>
<input type="text" name="Last_Name" id="Last_Name" placeholder="Doe"/>
<label for="affiliation">Affiliation:<span class="asterik">*</span></label>
<input type="text" name="affiliation" id="affiliation" placeholder="University of Ottawa"/>
<label for="department">Department:</label>
<input type="text" name="department" id="department" placeholder="Department of Chemical Engineering"/>
<label for="address">Address:<span class="asterik">*</span></label>
<input type="text" name="address" id="address" placeholder="75 Laurier Ave E"/>
<label for="city">City:</label>
<input type="text" name="city" id="city" placeholder="Ottawa, ON"/>
<label for="country">Country:<span class="asterik">*</span></label>
<select name="country" id="country">
<option value="" selected="selected" disabled="">
Please Select a Country</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Anguilla">Anguilla</option>
<option value="Antarctica">Antarctica</option>
<option value="Antigua and Barbuda">Antigua and Barbuda</option>
<option value="Argentina">Argentina</option>
<option value="Armenia">Armenia</option>
<option value="Aruba">Aruba</option>
<option value="Australia">Australia</option>
<option value="Austria">Austria</option>
<option value="Azerbaijan">Azerbaijan</option>
<option value="Bahamas">Bahamas</option>
<option value="Bahrain">Bahrain</option>
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
<option value="Belize">Belize</option>
<option value="Benin">Benin</option>
<option value="Bermuda">Bermuda</option>
<option value="Bhutan">Bhutan</option>
<option value="Bolivia">Bolivia</option>
<option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option>
<option value="Botswana">Botswana</option>
<option value="Bouvet Island">Bouvet Island</option>
<option value="Brazil">Brazil</option>
<option value="British Indian Ocean Territory">British Indian Ocean Territory</option>
<option value="Brunei Darussalam">Brunei Darussalam</option>
<option value="Bulgaria">Bulgaria</option>
<option value="Burkina Faso">Burkina Faso</option>
<option value="Burundi">Burundi</option>
<option value="Cambodia">Cambodia</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verde">Cape Verde</option>
<option value="Cayman Islands">Cayman Islands</option>
<option value="Central African Republic">Central African Republic</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
<option value="China">China</option>
<option value="Christmas Island">Christmas Island</option>
<option value="Cocos (Keeling) Islands">Cocos (Keeling) Islands</option>
<option value="Colombia">Colombia</option>
<option value="Comoros">Comoros</option>
<option value="Congo">Congo</option>
<option value="Congo, The Democratic Republic of The">Congo, The Democratic Republic of The</option>
<option value="Cook Islands">Cook Islands</option>
<option value="Costa Rica">Costa Rica</option>
<option value="Cote D'ivoire">Cote D'ivoire</option>
<option value="Croatia">Croatia</option>
<option value="Cuba">Cuba</option>
<option value="Cyprus">Cyprus</option>
<option value="Czech Republic">Czech Republic</option>
<option value="Denmark">Denmark</option>
<option value="Djibouti">Djibouti</option>
<option value="Dominica">Dominica</option>
<option value="Dominican Republic">Dominican Republic</option>
<option value="Ecuador">Ecuador</option>
<option value="Egypt">Egypt</option>
<option value="El Salvador">El Salvador</option>
<option value="Equatorial Guinea">Equatorial Guinea</option>
<option value="Eritrea">Eritrea</option>
<option value="Estonia">Estonia</option>
<option value="Ethiopia">Ethiopia</option>
<option value="Falkland Islands (Malvinas)">Falkland Islands (Malvinas)</option>
<option value="Faroe Islands">Faroe Islands</option>
<option value="Fiji">Fiji</option>
<option value="Finland">Finland</option>
<option value="France">France</option>
<option value="French Guiana">French Guiana</option>
<option value="French Polynesia">French Polynesia</option>
<option value="French Southern Territories">French Southern Territories</option>
<option value="Gabon">Gabon</option>
<option value="Gambia">Gambia</option>
<option value="Georgia">Georgia</option>
<option value="Germany">Germany</option>
<option value="Ghana">Ghana</option>
<option value="Gibraltar">Gibraltar</option>
<option value="Greece">Greece</option>
<option value="Greenland">Greenland</option>
<option value="Grenada">Grenada</option>
<option value="Guadeloupe">Guadeloupe</option>
<option value="Guam">Guam</option>
<option value="Guatemala">Guatemala</option>
<option value="Guinea">Guinea</option>
<option value="Guinea-bissau">Guinea-bissau</option>
<option value="Guyana">Guyana</option>
<option value="Haiti">Haiti</option>
<option value="Heard Island and Mcdonald Islands">Heard Island and Mcdonald Islands</option>
<option value="Holy See (Vatican City State)">Holy See (Vatican City State)</option>
<option value="Honduras">Honduras</option>
<option value="Hong Kong">Hong Kong</option>
<option value="Hungary">Hungary</option>
<option value="Iceland">Iceland</option>
<option value="India">India</option>
<option value="Indonesia">Indonesia</option>
<option value="Iran, Islamic Republic of">Iran, Islamic Republic of</option>
<option value="Iraq">Iraq</option>
<option value="Ireland">Ireland</option>
<option value="Israel">Israel</option>
<option value="Italy">Italy</option>
<option value="Jamaica">Jamaica</option>
<option value="Japan">Japan</option>
<option value="Jordan">Jordan</option>
<option value="Kazakhstan">Kazakhstan</option>
<option value="Kenya">Kenya</option>
<option value="Kiribati">Kiribati</option>
<option value="Korea, Democratic People's Republic of">Korea, Democratic People's Republic of</option>
<option value="Korea, Republic of">Korea, Republic of</option>
<option value="Kuwait">Kuwait</option>
<option value="Kyrgyzstan">Kyrgyzstan</option>
<option value="Lao People's Democratic Republic">Lao People's Democratic Republic</option>
<option value="Latvia">Latvia</option>
<option value="Lebanon">Lebanon</option>
<option value="Lesotho">Lesotho</option>
<option value="Liberia">Liberia</option>
<option value="Libyan Arab Jamahiriya">Libyan Arab Jamahiriya</option>
<option value="Liechtenstein">Liechtenstein</option>
<option value="Lithuania">Lithuania</option>
<option value="Luxembourg">Luxembourg</option>
<option value="Macao">Macao</option>
<option value="Macedonia, The Former Yugoslav Republic of">Macedonia, The Former Yugoslav Republic of</option>
<option value="Madagascar">Madagascar</option>
<option value="Malawi">Malawi</option>
<option value="Malaysia">Malaysia</option>
<option value="Maldives">Maldives</option>
<option value="Mali">Mali</option>
<option value="Malta">Malta</option>
<option value="Marshall Islands">Marshall Islands</option>
<option value="Martinique">Martinique</option>
<option value="Mauritania">Mauritania</option>
<option value="Mauritius">Mauritius</option>
<option value="Mayotte">Mayotte</option>
<option value="Mexico">Mexico</option>
<option value="Micronesia, Federated States of">Micronesia, Federated States of</option>
<option value="Moldova, Republic of">Moldova, Republic of</option>
<option value="Monaco">Monaco</option>
<option value="Mongolia">Mongolia</option>
<option value="Montserrat">Montserrat</option>
<option value="Morocco">Morocco</option>
<option value="Mozambique">Mozambique</option>
<option value="Myanmar">Myanmar</option>
<option value="Namibia">Namibia</option>
<option value="Nauru">Nauru</option>
<option value="Nepal">Nepal</option>
<option value="Netherlands">Netherlands</option>
<option value="Netherlands Antilles">Netherlands Antilles</option>
<option value="New Caledonia">New Caledonia</option>
<option value="New Zealand">New Zealand</option>
<option value="Nicaragua">Nicaragua</option>
<option value="Niger">Niger</option>
<option value="Nigeria">Nigeria</option>
<option value="Niue">Niue</option>
<option value="Norfolk Island">Norfolk Island</option>
<option value="Northern Mariana Islands">Northern Mariana Islands</option>
<option value="Norway">Norway</option>
<option value="Oman">Oman</option>
<option value="Pakistan">Pakistan</option>
<option value="Palau">Palau</option>
<option value="Palestinian Territory, Occupied">Palestinian Territory, Occupied</option>
<option value="Panama">Panama</option>
<option value="Papua New Guinea">Papua New Guinea</option>
<option value="Paraguay">Paraguay</option>
<option value="Peru">Peru</option>
<option value="Philippines">Philippines</option>
<option value="Pitcairn">Pitcairn</option>
<option value="Poland">Poland</option>
<option value="Portugal">Portugal</option>
<option value="Puerto Rico">Puerto Rico</option>
<option value="Qatar">Qatar</option>
<option value="Reunion">Reunion</option>
<option value="Romania">Romania</option>
<option value="Russian Federation">Russian Federation</option>
<option value="Rwanda">Rwanda</option>
<option value="Saint Helena">Saint Helena</option>
<option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option>
<option value="Saint Lucia">Saint Lucia</option>
<option value="Saint Pierre and Miquelon">Saint Pierre and Miquelon</option>
<option value="Saint Vincent and The Grenadines">Saint Vincent and The Grenadines</option>
<option value="Samoa">Samoa</option>
<option value="San Marino">San Marino</option>
<option value="Sao Tome and Principe">Sao Tome and Principe</option>
<option value="Saudi Arabia">Saudi Arabia</option>
<option value="Senegal">Senegal</option>
<option value="Serbia and Montenegro">Serbia and Montenegro</option>
<option value="Seychelles">Seychelles</option>
<option value="Sierra Leone">Sierra Leone</option>
<option value="Singapore">Singapore</option>
<option value="Slovakia">Slovakia</option>
<option value="Slovenia">Slovenia</option>
<option value="Solomon Islands">Solomon Islands</option>
<option value="Somalia">Somalia</option>
<option value="South Africa">South Africa</option>
<option value="South Georgia and The South Sandwich Islands">South Georgia & The South Sandwich Islands</option>
<option value="Spain">Spain</option>
<option value="Sri Lanka">Sri Lanka</option>
<option value="Sudan">Sudan</option>
<option value="Suriname">Suriname</option>
<option value="Svalbard and Jan Mayen">Svalbard and Jan Mayen</option>
<option value="Swaziland">Swaziland</option>
<option value="Sweden">Sweden</option>
<option value="Switzerland">Switzerland</option>
<option value="Syrian Arab Republic">Syrian Arab Republic</option>
<option value="Taiwan">Taiwan</option>
<option value="Tajikistan">Tajikistan</option>
<option value="Tanzania, United Republic of">Tanzania, United Republic of</option>
<option value="Thailand">Thailand</option>
<option value="Timor-leste">Timor-leste</option>
<option value="Togo">Togo</option>
<option value="Tokelau">Tokelau</option>
<option value="Tonga">Tonga</option>
<option value="Trinidad and Tobago">Trinidad and Tobago</option>
<option value="Tunisia">Tunisia</option>
<option value="Turkey">Turkey</option>
<option value="Turkmenistan">Turkmenistan</option>
<option value="Turks and Caicos Islands">Turks and Caicos Islands</option>
<option value="Tuvalu">Tuvalu</option>
<option value="Uganda">Uganda</option>
<option value="Ukraine">Ukraine</option>
<option value="United Arab Emirates">United Arab Emirates</option>
<option value="United Kingdom">United Kingdom</option>
<option value="United States">United States</option>
<option value="United States Minor Outlying Islands">United States Minor Outlying Islands</option>
<option value="Uruguay">Uruguay</option>
<option value="Uzbekistan">Uzbekistan</option>
<option value="Vanuatu">Vanuatu</option>
<option value="Venezuela">Venezuela</option>
<option value="Viet Nam">Viet Nam</option>
<option value="Virgin Islands, British">Virgin Islands, British</option>
<option value="Virgin Islands, U.S.">Virgin Islands, U.S.</option>
<option value="Wallis and Futuna">Wallis and Futuna</option>
<option value="Western Sahara">Western Sahara</option>
<option value="Yemen">Yemen</option>
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option>
</select>
<label for="Postal_Code">Postal Code:</label>
<input type="text" name="Postal_Code" id="Postal_Code" placeholder="K1N 6N5"/>
<label for="telephone">Telephone:</label>
<input type="text" name="telephone" id="telephone" placeholder="+1 (613) 555 - 555"/>
<label for="email">Email:<span class="asterik">*</span></label>
<input type="email" name="email" id="email" placeholder="john@doe.com"/>
<label for="Session_Chair">Would you be interested in being a session chair?<span class="asterik">*</span></label>
<select name="Session_Chair" id="Session_Chair">
<option selected="" disabled="">--</option>
<option>Yes</option>
<option>No</option>
</select>
<label for="student">Are you a student?<span class="asterik">*</span></label>
<select name="student" id="student">
<option selected="" disabled="">--</option>
<option>Yes</option>
<option>No</option>
</select>
<label for="Date_of_Payment_Transaction">Date of Payment Transaction:<span class="asterik">*</span></label>
<input type="date" name="Date_of_Payment_Transaction" id="Date_of_Payment_Transaction" placeholder="MM/DD/YEAR"/>
<label for="file">Please upload a copy of your receipt:<span class="asterik">*</span><br><i>Only image files are permitted</i></label>
<input name="file" type="file" id="file" size="33">
<label for="Paper_ID">Paper ID(s):</label>
<input type="text" name="Paper_ID" id="Paper_ID" placeholder="142"/>
<label for="Preferred_Mode_of_Presentation(s)">Preferred Mode of Presentation(s):</label>
<input type="text" name="Preferred_Mode_of_Presentation(s)" id="Preferred_Mode_of_Presentation(s)" placeholder="(Ex. Paper ID 142: ORAL, Paper ID 143: POSTER) The paper numbers are assigned to your submissions by the OpenConf system. If You are not an Author, Please Leave this Field Blank."/>
<div class="registrationDocuments"><p class="bold">Request for Official Registration Documents</p>
<label for="Do_you_need_an_official_Paper_Acceptance_Letter">Do you need an official Letter of Paper Acceptance?<span class="asterik">*</span></label>
<select name="Do_you_need_an_official_Paper_Acceptance_Letter" id="Do_you_need_an_official_Paper_Acceptance_Letter">
<option selected="" disabled="">--</option>
<option>Yes</option>
<option>No</option>
</select>
<label for="Do_you_need_an_official_Invitation_Letter">Do you need an official Invitation Letter?<span class="asterik">*</span></label>
<select name="Do_you_need_an_official_Invitation_Letter" id="Do_you_need_an_official_Invitation_Letter">
<option selected="" disabled="">--</option>
<option>Yes</option>
<option>No</option>
</select>
<label for="Do_you_need_an_official_Paid_Invoice">Do you need an official Paid Invoice?<span class="asterik">*</span></label>
<select name="Do_you_need_an_official_Paid_Invoice" id="Do_you_need_an_official_Paid_Invoice">
<option selected="" disabled="">--</option>
<option>Yes</option>
<option>No</option>
</select>
<label for="Do_you_need_an_official_Certificate_of_Attendance">Do you need an official Certificate of Attendance?<span class="asterik">*</span><br><i>Please be aware that the certificate will not be provided until the end of the conference.</i></label>
<select name="Do_you_need_an_official_Certificate_of_Attendance" id="Do_you_need_an_official_Certificate_of_Attendance">
<option selected="" disabled="">--</option>
<option>Yes</option>
<option>No</option>
</select>
</div>
<label for="comments">Additional Information or Comments:</label>
<textarea name="comments" id="comments" cols="35" rows="5" placeholder="Here you can specify your dietary preference, i.e. vegetarian, no pork, etc. You can also specify any details you want for us to include in the paid invoice. For example, if you want us to specify a different affiliation as opposed to the one provided in the form."></textarea>
<label for="Terms_and_Regulations">Terms and Regulations:</label>
<textarea name="Terms_and_Regulations" cols="35" rows="9" readonly id="Terms_and_Regulations">Please note the following: 1. Prices are in EUROS. 2. The registration fee is VAT included. 3. For students registering at the conference, student identification will be required at the registration desk. 4. Registration fees are not refundable under any circumstances.</textarea>
<label for="Registrant_Agreement">Registrant Agreement:<span class="asterik">*</span></label>
<input name="Registrant_Agreement" type="checkbox" id="Registrant_Agreement" value="checked"><p class="body">I have Read and Agreed to the Terms and Regulations</p>
<center>
<input type="submit" accept="image/jpeg" value="Register"></input>
<input type="reset" name="Reset" value="Reset">
</center>
</form>
</div>
</div>
<div class="unit unit-s-1 unit-m-1-3-1 unit-l-1-3-1">
<div class="unit-spacer">
<p class="announcement-text"><strong>ICNB'18</strong> is part of the <strong>3<sup>rd</sup> World Congress on Recent
Advances in Nanotechnology (RAN'18)</strong>.
<a class="body-link" target="_blank" href="https://www.rancongress.com">Congress Website</a> |
<a class="body-link" target="_blank" href="RAN18_CFP_Flyer.pdf">Congress Flyer</a></p>
<p class="announcement-text">
<strong>Poster Board Dimensions:</strong><br>
Authors presenting via poster boards are to be informed that poster boards are 110 cm height and 70 cm width.
</p>
<h2>Upcoming Dates</h2>
<div class="grid events">
<div class="unit unit-s-1 unit-m-1-4 unit-l-1-4">
<div class="date">
Mar. 13, 2018
</div>
</div>
<div class="unit unit-s-1 unit-m-3-4 unit-l-3-4">
<div class="unit-spacer">
Final Version of Accepted Submissions Deadline
</div>
</div>
</div>
<div class="grid events">
<div class="unit unit-s-1 unit-m-1-4 unit-l-1-4">
<div class="date">
Mar. 13, 2018
</div>
</div>
<div class="unit unit-s-1 unit-m-3-4 unit-l-3-4">
<div class="unit-spacer">
Extended <br>Regular Registration
</div>
</div>
</div>
<div class="grid events">
<div class="unit unit-s-1 unit-m-1-4 unit-l-1-4">
<div class="date">
Apr. 10 - 12, 2018
</div>
</div>
<div class="unit unit-s-1 unit-m-3-4 unit-l-3-4">
<div class="unit-spacer">
Conference Dates
</div>
</div>
</div>
<br>
<div>
<div class="unit unit-s-1-1 unit-m-1-2 unit-l-1-2 ">
<a href="https://www.crossref.org/" target="_blank"><img src="/img/Crossref_logo.png" alt="Crossref" class="flex-img" style="max-width:130px;"/></a>
</div>
<div class="unit unit-s-1-1 unit-m-1-2 unit-l-1-2 ">
<a href="https://www.scopus.com/" target="_blank"><img src="/img/Scopus_logo.png" alt="Scopus" class="flex-img" style="max-width:130px;"/></a>
</div>
<br>
<div class="unit unit-s-1-1 unit-m-1-2 unit-l-1-2 ">
<a href="https://scholar.google.com/" target="_blank"><img src="/img/GoogleSchoolar_logo.png" alt="Google Scholar" class="flex-img" style="max-width:130px;"/></a>
</div>
<div class="unit unit-s-1-1 unit-m-1-2 unit-l-1-2 ">
<a href="https://www.portico.org/" target="_blank"><img src="/img/portico_logo.png" alt="Portico" class="flex-img" style="max-width:110px;"/></a>
</div>
<br>
</div>
</div>
</div>
</div>
<footer id="contact">
<div class="grid">
<div class="unit unit-s-1 unit-m-1-3 unit-l-1-3">
<div class="unit-spacer">
<h2>Contact Us</h2>
<p class="body">International ASET Inc.<br>
Unit No. 104, 2442 St. Joseph Blvd.<br>
Orléans, Ontario, Canada<br>
Postal Code: K1C 1G1<br>
+1-613-834-9999<br>
<a href="mailto:info@nbconference.com">info@nbconference.com</a></p>
</div>
</div>
<div class="unit unit-s-1 unit-m-2-3 unit-l-2-3 contact">
<div class="unit-spacer">
<p class="body">For questions or comments regarding ICNB'18, please fill out the form below:</p>
<form action="../contactus.php" method="post" enctype="multipart/form-data" name="ContactForm" class="cf">
<div class="half left cf">
<input style="margin-bottom:0.85em" type="text" name="Name" id="Name" placeholder="Name" required>
<input style="margin-bottom:0.85em" type="email" name="Email" id="Email" placeholder="Email address" required>
<input type="text" name="Subject" id="Subject" placeholder="Subject" required>
</div>
<div class="half right cf">
<textarea name="Message" type="text" rows="5" name="Message" id="Message" placeholder="Message" required></textarea>
</div><br><br>
<center class="full right cf"><div class="g-recaptcha" data-sitekey="6LcU9g0TAAAAAK33kP2sFAv-1YQ7ciZlwHXs8Gt1"></div></center>
<div class="cf">
<center><div class="full right cf"><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset"></center></div>
</div></div></form>
</div>
</div>
</div>
</footer>
<div class="copyright">
<a href="http://international-aset.com">International ASET Inc.</a> | <a href="http://international-aset.com/phplistpublic/?p=subscribe&id=1">Subscribe</a> | <a href="../terms">Terms of Use</a> | <a href="../sitemap">Sitemap</a>
<p class="body">© Copyright <script>document.write(new Date().getFullYear())</script>, International ASET Inc. – All Rights Reserved.</p>
<p class="copyright1">Have any feedback? Please provide them here: <script>var refURL = window.location.protocol + "//" + window.location.host + window.location.pathname; document.write('<a href="http://international-aset.com/feedback/?refURL=' + refURL+'" class="body-link">Feedback</a>');</script></p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.1/jquery.validate.min.js"></script>
<script src="../js/form-validation.js"></script>
<script src="../js/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="../js/jquery.calendario.js"></script>
<script type="text/javascript" src="../js/data.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.4/jquery.touchSwipe.min.js"></script>
<script src="../js/jquery.liquid-slider.min.js"></script>
<script src="../js/classie.js"></script>
<script src="../js/cbpAnimatedHeader.min.js"></script>
<script src="../js/SpryValidationSelect.js" type="text/javascript"></script>
<script src="../js/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../js/SpryValidationConfirm.js" type="text/javascript"></script>
<script src="../js/SpryValidationCheckbox.js" type="text/javascript"></script>
<script src="../js/SpryValidationTextarea.js" type="text/javascript"></script>
<script type="text/javascript">
/*
Slidemenu
*/
(function() {
var $body = document.body
, $menu_trigger = $body.getElementsByClassName('menu-trigger')[0];
if ( typeof $menu_trigger !== 'undefined' ) {
$menu_trigger.addEventListener('click', function() {
$body.className = ( $body.className == 'menu-active' )? '' : 'menu-active';
});
}
}).call(this);
</script>
<script type="text/javascript">
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired:false});
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
var spryconfirm4 = new Spry.Widget.ValidationTextField("spryconfirm4");
var spryconfirm1 = new Spry.Widget.ValidationTextField("spryconfirm1");
var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue:"-1"});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "email");
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1");
var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {invalidValue:"-1", isRequired:false});
var spryselect3 = new Spry.Widget.ValidationSelect("spryselect11", {invalidValue:"-1", isRequired:false});
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "date", {format:"mm/dd/yyyy"});
var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9");
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8");
var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10");
var sprycheckbox1 = new Spry.Widget.ValidationCheckbox("sprycheckbox1");
</script>
<script type="text/javascript">
$(function() {
var transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd',
'MozTransition' : 'transitionend',
'OTransition' : 'oTransitionEnd',
'msTransition' : 'MSTransitionEnd',
'transition' : 'transitionend'
},
transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
$wrapper = $( '#custom-inner' ),
$calendar = $( '#calendar' ),
cal = $calendar.calendario( {
onDayClick : function( $el, $contentEl, dateProperties ) {
if( $contentEl.length > 0 ) {
showEvents( $contentEl, dateProperties );
}
},
caldata : codropsEvents,
displayWeekAbbr : true
} ),
$month = $( '#custom-month' ).html( cal.getMonthName() ),
$year = $( '#custom-year' ).html( cal.getYear() );
$( '#custom-next' ).on( 'click', function() {
cal.gotoNextMonth( updateMonthYear );
} );
$( '#custom-prev' ).on( 'click', function() {
cal.gotoPreviousMonth( updateMonthYear );
} );
function updateMonthYear() {
$month.html( cal.getMonthName() );
$year.html( cal.getYear() );
}
// just an example..
function showEvents( $contentEl, dateProperties ) {
hideEvents();
var $events = $( '<div id="custom-content-reveal" class="custom-content-reveal"><h4>Events for ' + dateProperties.monthname + ' ' + dateProperties.day + ', ' + dateProperties.year + '</h4></div>' ),
$close = $( '<span class="custom-content-close"></span>' ).on( 'click', hideEvents );
$events.append( $contentEl.html() , $close ).insertAfter( $wrapper );
setTimeout( function() {
$events.css( 'top', '0%' );
}, 25 );
}
function hideEvents() {
var $events = $( '#custom-content-reveal' );
if( $events.length > 0 ) {
$events.css( 'top', '100%' );
Modernizr.csstransitions ? $events.on( transEndEventName, function() { $( this ).remove(); } ) : $events.remove();
}
}
});
</script>
<script>
$('#main-slider').liquidSlider();
</script>
<script>
(function($){
$(window).load(function(){
$("html").niceScroll();
});
})(jQuery);
</script>
</body>
</html>
|
intaset/nbconference
|
_site/registration.html
|
HTML
|
mit
| 45,894
|
'use strict';
const dobby_bot = require('./jslib/dobby_bot');
const dobby_pull = require('./jslib/dobby_pull');
const dobby_spark = require('./jslib/dobby_spark');
const dobby_cass = require('./jslib/dobby_cass');
const async = require('async');
if (process.argv.length != 4) {
console.log('usage: node dobby.js <channel-name> <bot-email>');
process.exit(1);
}
const channelName = process.argv[2];
const botEmail = process.argv[3];
console.log("Chatbot: " + botEmail + " listening on channel: " + channelName);
const sessions = {};
const findOrCreateSession = (roomId) => {
let sessionId;
// Let's see if we already have a session for the roomId
Object.keys(sessions).forEach(k => {
if (sessions[k].roomId === roomId) {
// Yep, got it!
sessionId = k;
}
});
if (!sessionId) {
// No session found for roomId, let's create a new one
sessionId = new Date().toISOString();
sessions[sessionId] = { roomId: roomId, context: {} };
console.log("created new session:", sessions[sessionId]);
}
return sessionId;
};
const mergeContext = (sessionId, context) => {
// console.log("merging context:", sessions[sessionId].context);
context.intent = sessions[sessionId].context.intent;
context.topic = sessions[sessionId].context.topic;
context.input = sessions[sessionId].context.input;
context.state = sessions[sessionId].context.state;
};
// const nextEntry = (intent, topic, state, input) => {
const nextEntry = (context, nextEntryCB) => {
var next = null;
if (!context.intent) {
context.intent = '1';
}
if (!context.topic) {
context.topic = '1';
}
if (!context.state) {
context.state = '1';
}
if (!context.input) {
context.input = '1';
}
function convertResult(row) {
var res = {};
res.next = row.nextstate ? row.nextstate : null;
res.intent = row.nextintent ? row.nextintent : null;
res.msg = row.msg ? row.msg : null;
return res;
}
// next = msgs[context.intent][context.topic][context.state][context.input];
async.series([
function (callback) {
if (!next) {
dobby_cass.getState(context.intent, context.topic, context.state, context.input, function (err, result) {
if (err) {
next = null;
} else if (result.rows.length > 0) {
next = convertResult(result.rows[0]);
}
callback(err, null);
});
} else {
callback(null, null);
}
},
function (callback) {
if (!next) {
dobby_cass.getState(context.intent, context.topic, context.state, '1', function (err, result) {
if (err) {
next = null;
} else if (result.rows.length > 0) {
next = convertResult(result.rows[0]);
}
callback(err, null);
});
} else {
callback(null, null);
}
},
function (callback) {
if (!next) {
dobby_cass.getState(context.intent, context.topic, '1', '1', function (err, result) {
if (err) {
next = null;
} else if (result.rows.length > 0) {
next = convertResult(result.rows[0]);
}
callback(err, null);
});
} else {
callback(null, null);
}
},
function (callback) {
if (!next) {
dobby_cass.getState(context.intent, '1', '1', '1', function (err, result) {
if (err) {
next = null;
} else if (result.rows.length > 0) {
next = convertResult(result.rows[0]);
}
callback(err, null);
});
} else {
callback(null, null);
}
},
function (callback) {
if (!next) {
dobby_cass.getState('1', '1', '1', '1', function (err, result) {
if (err) {
next = null;
} else if (result.rows.length > 0) {
next = convertResult(result.rows[0]);
}
callback(err, null);
});
} else {
callback(null, null);
}
}
], function (err, results) {
nextEntryCB(next);
});
};
const actions = {
say(sessionId, context, message, cb) {
// console.log(message);
// send message to spark room
const roomId = sessions[sessionId].roomId;
if (roomId) {
// we have a room for this sesssion, send message there
dobby_spark.sendMessage(roomId, message, (err, data) => {
if (err) {
console.log(
'Oops! An error occurred while forwarding the response to',
roomId,
':',
err
);
}
});
} else {
console.log("did not find any room Id");
}
cb();
},
merge(sessionId, context, entities, message, cb) {
// console.log("entities:", entities);
// console.log("context", context);
// console.log("session context:", sessions[sessionId].context);
// const intent = bestEntityValue(entities, 'intent');
const intent = entities['intent'];
if (intent && (intent == 'command' || !sessions[sessionId].context.intent)) {
sessions[sessionId].context.intent = intent;
context.intent = intent;
}
// const topic = bestEntityValue(entities, 'topic');
const topic = entities['topic'];
if (!sessions[sessionId].context.topic && topic) {
sessions[sessionId].context.topic = topic;
context.topic = topic;
}
// const input = bestEntityValue(entities, 'input');
const input = entities['input'];
if (input) {
sessions[sessionId].context.input = input;
context.input = input;
}
cb(context);
},
error(sessionId, context, err) {
console.log(err.message);
actions.clean(sessionId, context);
},
clean(sessionId, context, cb) {
console.log("cleaning up state/context");
context = {};
delete sessions[sessionId];
cb(context);
},
nextState(sessionId, context, cb) {
mergeContext(sessionId, context);
sessions[sessionId].context.input = null;
// console.log("context", context);
nextEntry(context, function (result) {
var next = result;
// console.log("got next entry:", next);
if (next.intent) {
sessions[sessionId].context.intent = next.intent;
sessions[sessionId].context.state = next.next;
actions.nextState(sessionId, context, cb);
return;
}
// say whatever dobby says
actions.say(sessionId, context, next.msg, cb);
// run state transition
if (next.next == null) {
actions.clean(sessionId, context, cb);
} else {
sessions[sessionId].context.state = next.next;
}
});
},
};
function processSparkMessage(err, d) {
if (d) {
// console.log("got message:", d);
var data = JSON.parse(d);
const sessionId = findOrCreateSession(data.roomId);
try {
dobby_bot.runActions(
actions,
sessionId, // the user's current session
data['text'], // the user's message
sessions[sessionId].context, // the user's current session state
(error, context) => {
if (error) {
console.log('Oops! Got an error from Wit:', error);
} else {
// Our bot did everything it has to do.
// Now it's waiting for further messages to proceed.
// console.log('Waiting for further messages.');
}
}
);
} catch (e) {
console.log("parser error:", e);
dobby_spark.sendMessage(data.roomId, "could not parse response, please wake up Philip!", (err, data) => {
if (err) {
console.log(
'Oops! An error occurred while forwarding the response to',
data.roomId,
':',
err
);
}
});
}
}
}
dobby_pull.getMessages(channelName, botEmail, processSparkMessage);
|
dobby-spark/dobby-app
|
dobby.js
|
JavaScript
|
mit
| 7,851
|
package me.ryanhamshire.GriefPrevention.command;
import me.ryanhamshire.GriefPrevention.WelcomeTask;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
import org.spongepowered.api.command.spec.CommandExecutor;
import org.spongepowered.api.entity.living.player.Player;
public class CommandClaimBook implements CommandExecutor {
@Override
public CommandResult execute(CommandSource src, CommandContext ctx) {
for (Player otherPlayer : ctx.<Player>getAll("player")) {
WelcomeTask task = new WelcomeTask(otherPlayer);
task.run();
}
return CommandResult.success();
}
}
|
hsyyid/GriefPrevention
|
src/me/ryanhamshire/GriefPrevention/command/CommandClaimBook.java
|
Java
|
mit
| 740
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Nucleus.Game
{
/// <summary>
/// An enum to store the type of a cell during map generation
/// </summary>
public enum CellGenerationType
{
Untouched,
Void,
Wall,
WallCorner,
Door
}
public static class CellGenerationTypeExtensions
{
/// <summary>
/// Is this a wall type?
/// </summary>
/// <param name="genType"></param>
/// <returns></returns>
public static bool IsWall(this CellGenerationType genType)
{
return (genType == CellGenerationType.Wall ||
genType == CellGenerationType.WallCorner);
}
}
}
|
pnjeffries/freebuild
|
Nucleus/Nucleus.Game/Artitecture/CellGenerationType.cs
|
C#
|
mit
| 800
|
// LICENSE : MIT
"use strict";
import {RuleHelper} from "textlint-rule-helper";
import alex from "alex";
const defaultOptions = {
allow: undefined,
deny: undefined,
noBinary: false,
profanitySureness: 0
};
module.exports = function textlintRuleAlex(context, options = {}) {
const {Syntax, RuleError, report, getSource} = context;
const helper = new RuleHelper(context);
const opts = {...defaultOptions, ...options};
/*
{ [1:5-1:14: `boogeyman` may be insensitive, use `boogey` instead]
message: '`boogeyman` may be insensitive, use `boogey` instead',
name: '1:5-1:14',
file: '',
reason: '`boogeyman` may be insensitive, use `boogey` instead',
line: 1,
column: 5,
location: Position { start: [Object], end: [Object] },
fatal: false,
ruleId: 'boogeyman-boogeywoman',
source: 'retext-equality' }
*/
const reportError = (node, result) => {
const ruleError = new RuleError(`[${result.ruleId}] ${result.message}`, {
line: result.line - 1,
column: result.column - 1
});
report(node, ruleError);
};
return {
[Syntax.Str](node){
if (helper.isChildNode(node, [Syntax.Link, Syntax.Image, Syntax.BlockQuote, Syntax.Emphasis])) {
return;
}
const text = getSource(node);
const messages = alex(text, opts).messages;
messages.forEach((result) => {
reportError(node, result);
});
}
}
}
|
azu/textlint-rule-alex
|
src/textlint-rule-alex.js
|
JavaScript
|
mit
| 1,533
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
var _inherits2 = require('babel-runtime/helpers/inherits');
var _inherits3 = _interopRequireDefault(_inherits2);
var _Node2 = require('../Node');
var _Node3 = _interopRequireDefault(_Node2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var CatchClause = function (_Node) {
(0, _inherits3.default)(CatchClause, _Node);
function CatchClause(childNodes) {
(0, _classCallCheck3.default)(this, CatchClause);
return (0, _possibleConstructorReturn3.default)(this, (CatchClause.__proto__ || (0, _getPrototypeOf2.default)(CatchClause)).call(this, 'CatchClause', childNodes));
}
(0, _createClass3.default)(CatchClause, [{
key: '_acceptChildren',
value: function _acceptChildren(children) {
children.passToken('Keyword', 'catch');
children.skipNonCode();
children.passToken('Punctuator', '(');
children.skipNonCode();
var param = children.passPattern();
children.skipNonCode();
children.passToken('Punctuator', ')');
children.skipNonCode();
var body = children.passStatement('BlockStatement');
children.assertEnd();
this.param = param;
this.body = body;
}
}]);
return CatchClause;
}(_Node3.default);
exports.default = CatchClause;
//# sourceMappingURL=CatchClause.js.map
|
Moccine/global-service-plus.com
|
web/libariries/bootstrap/node_modules/cst/lib/elements/types/CatchClause.js
|
JavaScript
|
mit
| 2,175
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
$autoload['libraries'] = array('form_validation','database','session');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url','tooling_helper');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array('arrays');
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array('crud_model');
|
vivekdizzal/beamon-boss
|
application/user/config/autoload.php
|
PHP
|
mit
| 4,105
|
var uuid = require('uuid'),
logging = require('@tryghost/logging');
/**
* @TODO:
* - move middleware to ignition?
*/
module.exports = function logRequest(req, res, next) {
var startTime = Date.now(),
requestId = uuid.v1();
function logResponse() {
res.responseTime = (Date.now() - startTime) + 'ms';
req.requestId = requestId;
req.userId = req.user ? (req.user.id ? req.user.id : req.user) : null;
if (req.err) {
logging.error({req: req, res: res, err: req.err});
} else {
logging.info({req: req, res: res});
}
res.removeListener('finish', logResponse);
res.removeListener('close', logResponse);
}
res.on('finish', logResponse);
res.on('close', logResponse);
next();
};
|
TryGhost/gscan
|
app/middlewares/log-request.js
|
JavaScript
|
mit
| 802
|
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" ng-app="myApp" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" ng-app="myApp" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Cedi to Dollar Currency Conversion</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bower_components/html5-boilerplate/css/normalize.css">
<link rel="stylesheet" href="bower_components/html5-boilerplate/css/main.css">
<link rel="stylesheet" href="app.css"/>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="bower_components/html5-boilerplate/js/vendor/modernizr-2.6.2.min.js"></script>
</head>
<body>
<!--
No menu needed yet; just a single view
<ul class="menu">
<li><a href="#/view1">view1</a></li>
<li><a href="#/view2">view2</a></li>
</ul>
-->
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div ng-view></div>
<div class="col-xs-12">
<div><label class="lbl-info">Currency Conversion Application based on angular seed: v<span app-version></span><label></div>
</div>
<!-- In production use:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script>
-->
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="app.js"></script>
<script src="mainview/mainview.js"></script>
<script src="components/version/version.js"></script>
<script src="components/version/version-directive.js"></script>
<script src="components/version/interpolate-filter.js"></script>
<script src="components/forex/forex.js"></script>
<!--google analytics code
-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55719705-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
|
ashesi-SE/Sample-1
|
app/index.html
|
HTML
|
mit
| 3,003
|
/* globals Promise:true */
var _ = require('lodash')
var EventEmitter = require('events').EventEmitter
var inherits = require('util').inherits
var timers = require('timers')
var Promise = require('bluebird')
var bitcore = require('bitcore')
var p2p = require('bitcore-p2p')
var RpcClient = require('bitcoind-rpc')
var config = require('../../lib/config')
var errors = require('../../lib/errors')
var logger = require('../../lib/logger').logger
var util = require('../../lib/util')
/**
* @event Network#block
* @param {string} hash
*/
/**
* @event Network#tx
* @param {string} txid
*/
/**
* @class Network
*/
function Network () {
EventEmitter.call(this)
}
inherits(Network, EventEmitter)
/**
* @return {Promise}
*/
Network.prototype.init = function () {
return Promise.all([this._initBitcoind(), this._initTrustedPeer()])
}
/**
* @return {Promise}
*/
Network.prototype._initBitcoind = function () {
var self = this
// create rpc client
self.bitcoind = Promise.promisifyAll(new RpcClient({
host: config.get('bitcoind.rpc.host'),
port: config.get('bitcoind.rpc.port'),
user: config.get('bitcoind.rpc.user'),
pass: config.get('bitcoind.rpc.pass'),
protocol: config.get('bitcoind.rpc.protocol')
}))
// request info
return self.bitcoind.getInfoAsync()
.then(function (ret) {
// check network
var bitcoindNetwork = ret.result.testnet ? 'testnet' : 'livenet'
if (bitcoindNetwork !== config.get('chromanode.network')) {
throw new errors.InvalidBitcoindNetwork()
}
// show info
logger.info(
'Bitcoind checked. (version %d, bestHeight: %s, connections: %s)',
ret.result.version, ret.result.blocks, ret.result.connections)
})
}
/**
* @return {Promise}
*/
Network.prototype._initTrustedPeer = function () {
var self = this
// create trusted peer
self.peer = new p2p.Peer({
host: config.get('chromanode.host'),
port: config.get('chromanode.port'),
network: config.get('chromanode.network')
})
timers.setImmediate(function () { self.peer.connect() })
// inv event
self.peer.on('inv', function (message) {
var names = []
message.inventory.forEach(function (inv) {
// store inv type name
names.push(p2p.Inventory.TYPE_NAME[inv.type])
// store inv if tx type
if (inv.type === p2p.Inventory.TYPE.TX) {
self.emit('tx', util.encode(inv.hash))
}
// emit block if block type
if (inv.type === p2p.Inventory.TYPE.BLOCK) {
self.emit('block', util.encode(inv.hash))
}
})
logger.verbose('Receive inv (%s) message from peer %s:%s',
names.join(', '), self.peer.host, self.peer.port)
})
// connect event
self.peer.on('connect', function () {
logger.info('Connected to network peer %s:%s',
self.peer.host, self.peer.port)
})
// disconnect event
self.peer.on('disconnect', function () {
logger.info('Disconnected from network peer %s:%s',
self.peer.host, self.peer.port)
})
// ready event
self.peer.on('ready', function () {
logger.info(
'Peer %s:%s is ready (version: %s, subversion: %s, bestHeight: %s)',
self.peer.host, self.peer.port,
self.peer.version, self.peer.subversion, self.peer.bestHeight)
})
// waiting peer ready
return new Promise(function (resolve) {
self.peer.on('ready', resolve)
})
}
/**
* @return {Promise<Object>}
*/
Network.prototype.getBitcoindInfo = function () {
return this.bitcoind.getInfoAsync()
.then(function (ret) { return ret.result })
}
/**
* @return {Promise<number>}
*/
Network.prototype.getBlockCount = function () {
return this.bitcoind.getBlockCountAsync()
.then(function (ret) { return ret.result })
}
/**
* @param {number} height
* @return {Promise<string>}
*/
Network.prototype.getBlockHash = function (height) {
return this.bitcoind.getBlockHashAsync(height)
.then(function (ret) { return ret.result })
}
/**
* @param {(number|string)} id
* @return {Promise<bitcore.Block>}
*/
Network.prototype.getBlock = function (id) {
var self = this
return Promise.try(function () {
if (_.isNumber(id)) {
return self.getBlockHash(id)
}
return id
})
.then(function (hash) {
return self.bitcoind.getBlockAsync(hash, false)
})
.then(function (ret) {
var rawBlock = new Buffer(ret.result, 'hex')
return new bitcore.Block(rawBlock)
})
}
/**
* @return {Promise<{hash: string, height: number}>}
*/
Network.prototype.getLatest = function () {
var self = this
return self.getBlockCount()
.then(function (height) {
return Promise.all([height, self.getBlockHash(height)])
})
.spread(function (height, hash) {
return {hash: hash, height: height}
})
}
/**
* @todo Add concurrency
* @param {string} txid
* @return {Promise<bitcore.Transaction>}
*/
Network.prototype.getTx = function (txid) {
return this.bitcoind.getRawTransactionAsync(txid)
.then(function (ret) {
var rawtx = new Buffer(ret.result, 'hex')
return new bitcore.Transaction(rawtx)
})
}
/**
* @param {string} rawtx
* @return {Promise}
*/
Network.prototype.sendTx = function (rawtx) {
return this.bitcoind.sendRawTransactionAsync(rawtx)
}
/**
* @return {Promise<string[]>}
*/
Network.prototype.getMempoolTxs = function () {
return this.bitcoind.getRawMemPoolAsync()
.then(function (ret) { return ret.result })
}
module.exports = Network
|
jeorgen/chromanode-old
|
app/master/network.js
|
JavaScript
|
mit
| 5,495
|
/*
LICENSE
-------
Copyright (C) 2007-2010 Ray Molenkamp
This source code is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this source code or the software it produces.
Permission is granted to anyone to use this source code for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this source code must not be misrepresented; you must not
claim that you wrote the original source code. If you use this source code
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original source code.
3. This notice may not be removed or altered from any source distribution.
*/
using System.Runtime.InteropServices;
namespace CoreAudio.Interfaces
{
[Guid("7FB7B48F-531D-44A2-BCB3-5AD5A134B3DC"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface IAudioVolumeLevel : IPerChannelDbLevel {
}
}
|
morphx666/CoreAudio
|
CoreAudio/Interfaces/DeviceTopology/IAudioVolumeLevel.cs
|
C#
|
mit
| 1,226
|
import React from 'react';
import {
header,
tabs,
tab,
description,
importExample,
title,
columns,
divider,
example,
playground,
api,
testkit,
} from 'wix-storybook-utils/Sections';
import { storySettings } from '../test/storySettings';
import BasicExample from '!raw-loader!./examples/BasicExample';
import FootnoteExample from '!raw-loader!./examples/FootnoteExample';
import ModalExample from '!raw-loader!./examples/ModalExample';
import PageExample from '!raw-loader!./examples/PageExample';
import PersistentDividersExample from '!raw-loader!./examples/PersistentDividersExample';
import TableExample from '!raw-loader!./examples/TableExample';
import MarketingExample from '!raw-loader!./examples/MarketingExample';
import HelpButtonExample from '!raw-loader!./examples/HelpButtonExample';
import DropdownExample from '!raw-loader!./examples/DropdownExample';
import InputExample from '!raw-loader!./examples/InputExample';
import CustomModalLayout from '..';
import Checkbox from '../../Checkbox';
import Text from '../../Text';
import Box from '../../Box';
export default {
category: storySettings.category,
storyName: storySettings.storyName,
component: CustomModalLayout,
componentPath: '..',
componentProps: {
title: 'Modal title',
children: (
<Box border={'1px dashed grey'} padding={2}>
<Text>Your content goes here...</Text>
</Box>
),
primaryButtonText: 'Confirm',
secondaryButtonText: 'Cancel',
sideActions: <Checkbox>Check</Checkbox>,
footnote: (
<Text size="small">
By sending an invite, you agree to the <a>Wix Terms of Use</a>
</Text>
),
onCloseButtonClick: () => {},
},
sections: [
header({
issueUrl: 'https://github.com/wix/wix-style-react/issues/new/choose',
sourceUrl:
'https://github.com/wix/wix-style-react/tree/master/src/CustomModalLayout/',
}),
tabs([
tab({
title: 'Description',
sections: [
columns([
description({
title: 'Description',
text:
'Use this component inside a Modal component to display content in this layout. You may place a title and/or a footer with actions relevant to the displayed content.',
}),
]),
columns([
importExample(
"import { CustomModalLayout } from 'wix-style-react';",
),
]),
divider(),
title('Examples'),
example({
title: 'Basic Usage',
text: 'A Basic example with compact preview',
source: BasicExample,
}),
example({
title: 'Footnote Example',
text: 'Same as the basic example, with the addition of a footnote',
source: FootnoteExample,
}),
example({
title: 'Opening in a modal',
text:
'Opening the CustomModalLayout is done with the Modal component, usually in the regular size of full-screen',
source: ModalExample,
}),
example({
title: 'Persistent Dividers Example',
text:
'If you need the header or footer dividers to always show, you can use the `showHeaderDivider` and `showFooterDivider` props',
source: PersistentDividersExample,
}),
example({
title: 'Table example - No content padding',
text:
'A simple example with a table as the content and without content padding.',
source: TableExample,
}),
example({
title: 'Help Button Example',
text: 'A basic example with a help button shown.',
source: HelpButtonExample,
}),
example({
title: 'Marketing Layout Example',
text: 'A custom modal example with a marketing layout.',
source: MarketingExample,
}),
example({
title: 'Custom Page & Title Example',
text: 'Open a custom page in a modal with a custom title.',
source: PageExample,
}),
example({
title: 'Input Example',
text:
'When Input element is inside modal, outline at the top and bottom is cut. In order to see full outline, Box component with 3px of height has to be used before and after Input element.',
source: InputExample,
}),
example({
title: 'Opening popovers from a modal',
text:
"CustomModalLayout doesn't let to overflow the content. To make popover elements work properly they need to be used with popover prop appendTo set to window.",
source: DropdownExample,
}),
],
}),
...[
{ title: 'API', sections: [api()] },
{ title: 'Testkit', sections: [testkit()] },
{ title: 'Playground', sections: [playground()] },
].map(tab),
]),
],
};
|
wix/wix-style-react
|
packages/wix-style-react/src/CustomModalLayout/docs/index.story.js
|
JavaScript
|
mit
| 5,054
|
@import "form.css";
@import "problem.css";
div.errors {
border: 1px solid red;
}
div.errors ul {
list-style: none;
padding-left: 1em;
}
input.demoButton {
display: block;
margin-top: 30px;
margin-left: auto;
margin-right: auto;
width: 60px;
}
.overlay {
background: transparent;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
}
.overlay div.demo {
position: relative;
border: 2px solid gray;
background-color: #EEE;
color: black;
width: 360px;
}
.overlay div.demo input.closeButton {
position: absolute;
top: 0;
right: 0;
}
.overlay div.demo input.nextButton {
position: absolute;
top: 0;
left: 0;
}
.overlay div.demo div.demo-text {
margin-top: 26px;
margin-bottom: 10px;
border-top: 3px double gray;
padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
}
.demo-highlight-cell {
background-color: #ffa7a7;
}
.demo-highlight-input {
background-color: #ffa7a7;
}
.demo-highlight-input-value {
background-color: #DDD;
color: red;
font-weight: bold;
}
|
gslewis/dmex-app
|
web/form/style/exsession.css
|
CSS
|
mit
| 1,145
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DreamNet.TCPServer
{
public class TCPServer
{
#region Variables
private TcpListener server = null;
private TcpClient client = null;
private int bufferSize = 64;
#endregion
public TCPServer(string _address, int _port)
{
IPAddress address = IPAddress.Parse(_address);
Int32 port = _port;
this.server = new TcpListener(address, port);
}
public void Open()
{
server.Start();
}
public void ListenForClients()
{
Console.Write("Server: Waiting for a connection... ");
client = server.AcceptTcpClient();
Console.WriteLine("Connected!");
}
public void HandleClientComm()
{
using (NetworkStream stream = client.GetStream())
{
while (client.Connected)
{
Send(stream);
Receive(stream);
}
}
}
protected void Send(NetworkStream stream)
{
Byte[] bytesRead = new Byte[bufferSize];
// Leitura dos dados na rede
stream.Read(bytesRead, 0, bufferSize);
// Pega os dados do robo
robotStatus = BitConverter.ToInt32(bytesRead, 0);
robotPosition = BitConverter.ToDouble(bytesRead, 4);
Console.Clear();
Console.WriteLine("ROBOT #######################\n");
Console.WriteLine("Status: {0}", robotStatus);
Console.WriteLine("Position: {0}\n", robotPosition);
Console.WriteLine("Bytes (Receive): " + BitConverter.ToString(bytesRead) + "\n");
}
protected void Receive(NetworkStream stream)
{
Byte[] bytesWrite = new Byte[bufferSize];
// Dados do robo
gamePosition += 1.5;
gameStiffness += 2.0;
gameVelocity += 3.0;
gameAcceleration += 5.0;
gameControl++;
// Escrevendo os dados na rede
Array.Copy(BitConverter.GetBytes(gameControl), 0, bytesWrite, 0, sizeof(int));
Array.Copy(BitConverter.GetBytes(gamePosition), 0, bytesWrite, 4, sizeof(double));
Array.Copy(BitConverter.GetBytes(gameStiffness), 0, bytesWrite, 12, sizeof(double));
Array.Copy(BitConverter.GetBytes(gameVelocity), 0, bytesWrite, 20, sizeof(double));
Array.Copy(BitConverter.GetBytes(gameAcceleration), 0, bytesWrite, 28, sizeof(double));
stream.Write(bytesWrite, 0, bufferSize);
Console.WriteLine("\nGAME ########################\n");
Console.WriteLine("Position: {0}", gamePosition);
Console.WriteLine("Stiffness: {0}", gameStiffness);
Console.WriteLine("Velocity: {0}", gameVelocity);
Console.WriteLine("Acceleration: {0}", gameAcceleration);
Console.WriteLine("Control: {0}", gameControl);
Console.WriteLine("Bytes (Send): " + BitConverter.ToString(bytesWrite) + "\n");
}
// Variáveis
double gamePosition;
double gameStiffness;
double gameVelocity;
double gameAcceleration;
int gameControl;
int robotStatus;
double robotPosition;
}
}
/*
#region Events
public event EventHandler<ServerEventArgs> OnConnect;
public event EventHandler<ServerEventArgs> OnReceive;
public event EventHandler<ServerEventArgs> OnDisconnect;
public event EventHandler<ServerEventArgs> OnStarted;
public event EventHandler<ServerEventArgs> OnStopped;
#endregion
*/
|
kleberandrade/dream-net
|
DreamNet.TCPServer/TCPServer.cs
|
C#
|
mit
| 3,932
|
/*
** Backbone-books by Sebastien Chopin
** @Atinux
** http://www.atinux.fr
*/
(function () {
// Please use your Google API key, be cool :) (http://code.google.com/apis/books/docs/v1/getting_started.html)
var Book, Books, BookView, LibraryView, apiKey = 'AIzaSyAUpierWu7ydjKsa2141jS55CCnqu7JXZo';
// Model
Book = Backbone.Model.extend(),
// Book View
BookView = Backbone.View.extend({
tagName: 'div',
initialize: function () {
var that = this;
this.model.attributes.volumeInfo = this.model.attributes.volumeInfo || {};
this.model.attributes.volumeInfo.imageLinks = this.model.attributes.volumeInfo.imageLinks || {};
setTimeout(function () {
that.render();
}, this.options.time);
},
events: {
'click': 'showBookDetail'
},
render: function () {
if (this.options.parent.lastSearch === this.options.lastSearch) {
var template = $('#bookTemplate').html();
this.$el.html(_.template(template, { model: this.model }));
this.$el.hide().appendTo('.books').fadeIn(200);
}
},
showBookDetail: function () {
var parent = this.options.parent,
scrollTop = parent.$('.library').scrollTop(),
bookDetail = parent.$('.bookDetail'),
that = this;
parent.showBookDetail = true;
parent.bookDetailTop = scrollTop;
bookDetail.css({
'top': scrollTop,
'bottom': -scrollTop
})
.html(_.template($('#bookDetailTemplate').html(), { hash: this.model.toJSON() }))
.fadeIn();
// Call the self link to check if a better resolution of the image is available
if (!this.model.attributes.volumeInfo.imageLinks.small) {
$.ajax({
url: 'https://www.googleapis.com/books/v1/volumes/'+this.model.id,
dataType: 'jsonp',
data: 'fields=volumeInfo/imageLinks&key='+apiKey,
success: function (res) {
if (res.volumeInfo && res.volumeInfo.imageLinks && res.volumeInfo.imageLinks.small) {
that.model.attributes.volumeInfo.imageLinks.small = res.volumeInfo.imageLinks.small;
}
else {
that.model.attributes.volumeInfo.imageLinks.small = 'bad';
}
that.addBiggerImage();
}
});
}
else {
this.addBiggerImage();
}
},
addBiggerImage: function () {
var smallImg = this.model.attributes.volumeInfo.imageLinks.small;
if (smallImg !== 'bad') {
this.options.parent.$('.imgBook').append('<img src="'+ smallImg.replace('&edge=curl', '') +'" />');
}
}
});
// Library View
LibraryView = Backbone.View.extend({
initialize: function () {
// this.books = new Books();
this.search();
// Bind scroll event
_.bindAll(this, 'hideBookDetailScroll');
this.$('.library').scroll(this.hideBookDetailScroll);
_.bindAll(this, 'moreBooks');
this.$('.library').scroll(this.moreBooks);
},
events: {
'change .searchValue': 'search',
'click .close': 'hideBookDetail'
},
search: function (e) {
this.s = this.$('.searchValue').val(),
lastSearch = new Date().getTime(),
that = this;
that.$('.books').html('');
this.lastSearch = lastSearch;
this.$('.spinner').fadeIn();
this.page = 0;
if (this.s.trim().length) {
$.ajax({
url: 'https://www.googleapis.com/books/v1/volumes',
dataType: 'jsonp',
data: 'q='+encodeURIComponent(this.s)+'&maxResults=40&key='+apiKey+'&fields=totalItems,items(id,volumeInfo/title,volumeInfo/subtitle,volumeInfo/authors,volumeInfo/publishedDate,volumeInfo/description,volumeInfo/imageLinks)',
success: function (res) {
that.$('.spinner').fadeOut();
that.nbMaxPage = Math.ceil(res.totalItems / 40);
if (that.lastSearch === lastSearch) {
if (res.items && res.items.length) {
for (var i in res.items) {
new BookView({
model: new Book(res.items[i]),
time: 80 * i,
lastSearch: lastSearch,
parent: that
});
}
}
else if (res.error) {
that.$('.books').html('<h1 class="notFound">Error, please retry later :s</h1>');
}
else {
that.$('.books').html('<h1 class="notFound">No books found</h1>');
}
}
}
});
}
else {
that.$('.books').html('<h1 class="notFound">Hummmm, can do better :)</h1>');
that.$('.spinner').fadeOut();
}
},
hideBookDetailScroll: function () {
if (this.showBookDetail) {
var actualTop = this.$('.library').scrollTop(),
marge = 150;
if (actualTop > this.bookDetailTop + marge || actualTop < this.bookDetailTop - marge) {
this.showBookDetail = false;
this.hideBookDetail();
}
}
},
hideBookDetail: function () {
this.$('.bookDetail').fadeOut();
},
moreBooks: function () {
var totalHeight = this.$('.library > div').height(),
scrollTop = this.$('.library').scrollTop() + this.$('.library').height(),
lastSearch = this.lastSearch,
that = this,
marge = 200;
if (scrollTop + marge >= totalHeight && !this.loadingMore && this.page < this.nbMaxPage) {
this.loadingMore = true;
this.page++;
this.$('.spinner').fadeIn();
$.ajax({
url: 'https://www.googleapis.com/books/v1/volumes',
dataType: 'jsonp',
data: 'q='+encodeURIComponent(this.s)+'&startIndex='+(this.page * 40)+'&maxResults=40&key='+apiKey+'&fields=totalItems,items(id,volumeInfo/title,volumeInfo/subtitle,volumeInfo/authors,volumeInfo/publishedDate,volumeInfo/description,volumeInfo/imageLinks)',
success: function (res) {
that.$('.spinner').fadeOut();
that.loadingMore = false;
if (that.lastSearch === lastSearch && res.items && res.items.length) {
for (var i in res.items) {
new BookView({
model: new Book(res.items[i]),
time: 80 * i,
lastSearch: lastSearch,
parent: that
});
}
}
}
});
}
}
});
// Run application
$(function () {
new LibraryView({
el: $('#content')
});
});
})();
|
Atinux/backbone-books
|
src/app.js
|
JavaScript
|
mit
| 5,713
|
<?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* OperasiRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class OperasiRepository extends EntityRepository
{
}
|
dzakiafif/rumah-sakit
|
src/AppBundle/Repository/OperasiRepository.php
|
PHP
|
mit
| 259
|
using System.Collections.Generic;
using System.Threading.Tasks;
using Depot.Services.Entries.Models;
using MongoDB.Driver;
using MongoDB.Driver.Linq;
namespace Depot.Services.Entries.Repositories
{
public class MongoEntryRepository : IEntryRepository
{
private readonly IMongoDatabase _database;
public MongoEntryRepository(IMongoDatabase database)
{
_database = database;
}
public async Task<Entry> GetAsync(string key)
=> await Entries.AsQueryable()
.FirstOrDefaultAsync(x => x.Key == key);
public async Task<IEnumerable<Entry>> BrowseAsync()
=> await Entries.AsQueryable().ToListAsync();
public async Task AddAsync(Entry entry)
=> await Entries.InsertOneAsync(entry);
private IMongoCollection<Entry> Entries
=> _database.GetCollection<Entry>("Entries");
}
}
|
spetz/Depot
|
src/Depot.Services.Entries/Repositories/MongoEntryRepository.cs
|
C#
|
mit
| 919
|
# tattle
Governate deployments
|
octoblu/tattle
|
README.md
|
Markdown
|
mit
| 31
|
using Subsonic.Common.Classes;
using Subsonic.Common.Interfaces;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Subsonic.Client.Activities
{
public class Search2ActivityDelegate<TImageType> : SubsonicActivityDelegate<SearchResult2, TImageType> where TImageType : class, IDisposable
{
public Search2ActivityDelegate(string query, int? artistCount = null, int? artistOffset = null, int? albumCount = null, int? albumOffset = null, int? songCount = null, int? songOffset = null, string musicFolderId = null)
{
Query = query;
ArtistCount = artistCount;
ArtistOffset = artistOffset;
AlbumCount = albumCount;
AlbumOffset = albumOffset;
SongCount = songCount;
SongOffset = songOffset;
MusicFolderId = musicFolderId;
}
private int? AlbumCount { get; }
private int? AlbumOffset { get; }
private int? ArtistCount { get; }
private int? ArtistOffset { get; }
private string MusicFolderId { get; }
private string Query { get; }
private int? SongCount { get; }
private int? SongOffset { get; }
public Func<CancellationToken?, Task<SearchResult2>> CreateMethod(ISubsonicClient<TImageType> subsonicClient)
{
return cancelToken => subsonicClient.Search2Async(Query, ArtistCount, ArtistOffset, AlbumCount, AlbumOffset, SongCount, SongOffset, MusicFolderId, cancelToken);
}
// Overrides for equality
#region HashCode and Equality Overrides
private const int HashFactor = 17;
private const int HashSeed = 73; // Should be prime number
// Should be prime number
public static bool operator !=(Search2ActivityDelegate<TImageType> left, Search2ActivityDelegate<TImageType> right)
{
return !(left == right);
}
public static bool operator ==(Search2ActivityDelegate<TImageType> left, Search2ActivityDelegate<TImageType> right)
{
if (left is null)
return right is null;
if (right is null)
return false;
if (left.Query != null)
if (!left.Query.Equals(right.Query))
return false;
if (left.MusicFolderId != null)
if (!left.MusicFolderId.Equals(right.MusicFolderId))
return false;
if (left.ArtistCount.HasValue)
if (!right.ArtistCount.HasValue)
return false;
else if (!left.ArtistCount.Value.Equals(right.ArtistCount.Value))
return false;
if (left.ArtistOffset.HasValue)
if (!right.ArtistOffset.HasValue)
return false;
else if (!left.ArtistOffset.Value.Equals(right.ArtistOffset.Value))
return false;
if (left.AlbumCount.HasValue)
if (!right.AlbumCount.HasValue)
return false;
else if (!left.AlbumCount.Value.Equals(right.AlbumCount.Value))
return false;
if (left.AlbumOffset.HasValue)
if (!right.AlbumOffset.HasValue)
return false;
else if (!left.AlbumOffset.Value.Equals(right.AlbumOffset.Value))
return false;
if (left.SongCount.HasValue)
if (!right.SongCount.HasValue)
return false;
else if (!left.SongCount.Value.Equals(right.SongCount.Value))
return false;
if (left.SongOffset.HasValue)
if (!right.SongOffset.HasValue)
return false;
else if (!left.SongOffset.Value.Equals(right.SongOffset.Value))
return false;
return true;
}
public override bool Equals(object obj)
{
return obj != null && Equals(obj as Search2ActivityDelegate<TImageType>);
}
public override int GetHashCode()
{
var hash = HashSeed;
hash = hash * HashFactor + typeof(Search2ActivityDelegate<TImageType>).GetHashCode();
if (Query != null)
hash = hash * HashFactor + Query.GetHashCode();
if (MusicFolderId != null)
hash = hash * HashFactor + MusicFolderId.GetHashCode();
if (ArtistCount.HasValue)
hash = hash * HashFactor + ArtistCount.Value.GetHashCode();
if (ArtistOffset.HasValue)
hash = hash * HashFactor + ArtistOffset.Value.GetHashCode();
if (AlbumCount.HasValue)
hash = hash * HashFactor + AlbumCount.Value.GetHashCode();
if (AlbumOffset.HasValue)
hash = hash * HashFactor + AlbumOffset.Value.GetHashCode();
if (SongCount.HasValue)
hash = hash * HashFactor + SongCount.Value.GetHashCode();
if (SongOffset.HasValue)
hash = hash * HashFactor + SongOffset.Value.GetHashCode();
return hash;
}
private bool Equals(Search2ActivityDelegate<TImageType> item)
{
return item != null && this == item;
}
#endregion HashCode and Equality Overrides
}
}
|
archrival/SubsonicSharp
|
Subsonic.Client/Activities/Search2ActivityDelegate.cs
|
C#
|
mit
| 5,597
|
<?php
namespace SystemUsersBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* RoleResourceRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class RoleResourceRepository extends EntityRepository
{
}
|
gitmehedi/symauth
|
src/SystemUsersBundle/Entity/RoleResourceRepository.php
|
PHP
|
mit
| 273
|
<!DOCTYPE html>
<html lang="en-us">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>
Æsop · Austin E Soplata
</title>
<!-- CSS -->
<link rel="stylesheet" href="/public/css/poole.css">
<link rel="stylesheet" href="/public/css/syntax.css">
<link rel="stylesheet" href="/public/css/lanyon.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700%7CPT+Sans:400">
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/public/favicon.ico">
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
<link type="application/atom+xml" rel="alternate" href="http://localhost:4000/feed.xml" title="Æsop" /> <!-- from github atom help -->
<!-- Google Plus -->
<!-- Place this tag in your head or just before your close body tag. -->
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
styles, `#sidebar-checkbox` for behavior. -->
<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
<!-- Toggleable sidebar -->
<div class="sidebar" id="sidebar">
<div class="sidebar-item">
<p>Personal website of <a href="https://github.com/asoplata" target="_blank">Austin Soplata</a>.</p>
</div>
<nav class="sidebar-nav">
<a class="sidebar-nav-item" href="/">Home</a>
<a class="sidebar-nav-item" href="/about/">About</a>
<a class="sidebar-nav-item" href="/publications/">Publications</a>
<a class="sidebar-nav-item" href="/tags/">Tags</a>
<a class="sidebar-nav-item" href="https://twitter.com/asoplata/">Twitter: @asoplata</a>
<a class="sidebar-nav-item" href="https://github.com/asoplata/">GitHub: asoplata</a>
<!--
<a class="sidebar-nav-item" href="/archive/v2.1.0.zip">Download</a>
<a class="sidebar-nav-item" href="">GitHub project</a>
<span class="sidebar-nav-item">Currently v2.1.0</span>
-->
</nav>
<div class="sidebar-item">
<p>
© Austin Soplata, 2021. All rights reserved,
whatever that means?
</p>
</div>
</div>
<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
content to avoid any CSS collisions with our real content. -->
<div class="wrap">
<div class="masthead">
<div class="container">
<h3 class="masthead-title">
<a href="/" title="Home">Æsop</a>
<small>Austin E Soplata</small>
</h3>
</div>
</div>
<div class="container content">
<div class="posts">
<div class="post">
<h1 class="post-title">
<a href="/2017/07/05/publications/">
Publications available
</a>
</h1>
<span class="post-date">05 Jul 2017</span>
<p> Tags:
<a href="/tags#publications">publications</a>
<a href="/tags#posters">posters</a>
<a href="/tags#talks">talks</a>
<a href="/tags#papers">papers</a>
</p>
<p>All publications including posters, talks, and papers are now available on a
single <a href="/publications">Publications page</a>.</p>
</div>
<div class="post">
<h1 class="post-title">
<a href="/2016/11/11/posters/">
Posters online now!
</a>
</h1>
<span class="post-date">11 Nov 2016</span>
<p> Tags:
<a href="/tags#posters">posters</a>
<a href="/tags#publications">publications</a>
</p>
<p>I’ve started putting posters on the website! <a href="/publications">Go here to access the Publications page.</a></p>
</div>
<div class="post">
<h1 class="post-title">
<a href="/2016/10/12/talks/">
Talks online now!
</a>
</h1>
<span class="post-date">12 Oct 2016</span>
<p> Tags:
<a href="/tags#talks">talks</a>
<a href="/tags#publications">publications</a>
</p>
<p>I’ve started putting talks/presentations on the website! <a href="/publications">Go here to access the
Publications page.</a></p>
</div>
</div>
<div class="pagination">
<span class="pagination-item older">Older</span>
<a class="pagination-item newer" href="/">Newer</a>
</div>
</div>
</div>
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
<script>
(function(document) {
var toggle = document.querySelector('.sidebar-toggle');
var sidebar = document.querySelector('#sidebar');
var checkbox = document.querySelector('#sidebar-checkbox');
document.addEventListener('click', function(e) {
var target = e.target;
if(!checkbox.checked ||
sidebar.contains(target) ||
(target === checkbox || target === toggle)) return;
checkbox.checked = false;
}, false);
})(document);
</script>
</body>
</html>
|
asoplata/asoplata.github.io
|
_site/page2/index.html
|
HTML
|
mit
| 5,853
|
extern crate hyper;
mod credentials;
mod error;
mod http;
use std::process;
use std::thread;
use std::time::Duration;
use credentials::Credentials;
use http::Client;
use error::Error;
fn main() {
let credentials = credentials();
let client = Client::new(credentials);
let interval = Duration::from_secs(5);
loop {
let result = run(&client);
if result.is_err() {
println!("{}", result.unwrap_err());
}
thread::sleep(interval);
}
}
fn credentials() -> Credentials {
match credentials::from_env() {
Ok(val) => val,
Err(e) => {
println!("{}", e);
process::exit(1);
}
}
}
fn run(client: &Client) -> Result<(), Error> {
let response = try!(client.put("https://api.github.com/notifications", "{}"));
if response.status.is_success() {
Ok(())
} else {
Err(Error::Request { status: response.status })
}
}
|
matt-thomson/github-sweep
|
src/main.rs
|
Rust
|
mit
| 957
|
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Cosmosdb::Mgmt::V2019_08_01
module Models
#
# Model object.
#
#
class SpatialSpec
include MsRestAzure
# @return [String] The path for which the indexing behavior applies to.
# Index paths typically start with root and end with wildcard (/path/*)
attr_accessor :path
# @return [Array<SpatialType>] List of path's spatial type
attr_accessor :types
#
# Mapper for SpatialSpec class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
client_side_validation: true,
required: false,
serialized_name: 'SpatialSpec',
type: {
name: 'Composite',
class_name: 'SpatialSpec',
model_properties: {
path: {
client_side_validation: true,
required: false,
serialized_name: 'path',
type: {
name: 'String'
}
},
types: {
client_side_validation: true,
required: false,
serialized_name: 'types',
type: {
name: 'Sequence',
element: {
client_side_validation: true,
required: false,
serialized_name: 'SpatialTypeElementType',
type: {
name: 'String'
}
}
}
}
}
}
}
end
end
end
end
|
Azure/azure-sdk-for-ruby
|
management/azure_mgmt_cosmosdb/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/spatial_spec.rb
|
Ruby
|
mit
| 1,812
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="GENERATOR" content="VSdocman - documentation generator; https://www.helixoft.com" />
<link rel="icon" href="favicon.ico">
<title>CustomAccountService.TryLogin Method</title>
<link rel="stylesheet" type="text/css" href="msdn2019/toc.css" />
<script src="msdn2019/toc.js"></script>
<link rel="stylesheet" type="text/css" href="msdn2019/msdn2019.css"></link>
<script src="msdn2019/msdn2019.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shCore_helixoft.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushVb.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushCSharp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushFSharp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushCpp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushJScript.js" type="text/javascript"></script>
<link href="SyntaxHighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="SyntaxHighlighter/styles/shThemeMsdnLW.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
<link rel="stylesheet" type="text/css" href="vsdocman_overrides.css"></link>
</head>
<body style="direction: ltr;">
<div id="topic">
<!--HEADER START-->
<div id="header">
<div id="header-top-container">
<div id="header-top-parent-container1">
<div id="header-top-container1">
<div id="runningHeaderText1"><a id="headerLogo" href="#" onclick="window.location.href = getCssCustomProperty('--headerLogoLink'); return false;">logo</a></div>
<div id="runningHeaderText1b"><script>
document.write(getCssCustomProperty('--headerTopCustomLineHtml'));
</script></div>
</div>
</div>
<div id="header-top-container2">
<div id="runningHeaderText">SOLUTION-WIDE PROPERTIES Reference</div>
<div id="search-bar-container">
<form id="search-bar" action="search--.html">
<input id="HeaderSearchInput" type="search" name="search" placeholder="Search" >
<button id="btn-search" class="c-glyph" title="Search">
<span>Search</span>
</button>
</form>
<button id="cancel-search" class="cancel-search" title="Cancel">
<span>Cancel</span>
</button>
</div>
</div>
</div>
<hr />
<div id="header-breadcrumbs"></div>
<div id="headerLinks">
</div>
<hr />
</div>
<!--HEADER END-->
<div id="mainSection">
<div id="toc-area">
<div id="toc-container" class="stickthis full-height">
<div id="-1"></div>
<div id="c-1">
<div id="ci-1" class="inner-for-height"></div>
</div>
</div>
</div>
<div id="mainBody">
<h1 class="title">CustomAccountService.TryLogin Method</h1>
<div class="metadata">
Namespace:
<a href="topic_00000000000000EF.html">Tlece.Recruitment.Components</a>
<br />Assembly: Tlece.Recruitment (in Tlece.Recruitment.dll)
</div>
<div class="section_container">
<div id="syntaxSection" class="section">
<div id="syntaxCodeBlocks">
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCornerActive">
</div>
<div class="codeSnippetTab csFirstTab csActiveTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeVB">
<pre xml:space="preserve" class="brush: vb">Public Overrides Function TryLogin( _ <br /> ByVal <i>model</i> As <a target="_top" href=".html" onclick="this.target='';return true;">LoginViewModel</a> _ <br />) As <a target="_top" href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1">Task</a>(Of <a target="_top" href=".html" onclick="this.target='';return true;">UserLoginResult</a>)</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csActiveTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeCsharp">
<pre xml:space="preserve" class="brush: csharp">public override <a target="_top" href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1">Task</a><<a target="_top" href=".html" onclick="this.target='';return true;">UserLoginResult</a>> TryLogin( <br /> <a target="_top" href=".html" onclick="this.target='';return true;">LoginViewModel</a> <i>model</i> <br />)</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csActiveTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeCpp">
<pre xml:space="preserve" class="brush: cpp">public: <br /><a target="_top" href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1">Task</a><<a target="_top" href=".html" onclick="this.target='';return true;">UserLoginResult</a>^>^ TryLogin( <br /> <a target="_top" href=".html" onclick="this.target='';return true;">LoginViewModel</a>^ <i>model</i> <br />) </pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csActiveTab csLastTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCornerActive">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeJScript">
<pre xml:space="preserve" class="brush: js">JScript does not support generic types and methods.</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
</div>
<h4 class="subHeading">
Parameters</h4><dl paramName="model" class="parameterList">
<dt>
<span class="parameter">
model
</span>
</dt>
<dd>
<a target="_top" href=".html" onclick="this.target='';return true;">LoginViewModel</a>
</dd>
</dl>
<p>
</p>
<p />
<h4 class="subHeading">
Return Value</h4>
<a target="_top" href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1">Task</a><<a target="_top" href=".html" onclick="this.target='';return true;">UserLoginResult</a>>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Applies to</a></span>
<div> </div>
</div>
<div id="frameworksSection" class="section">
<h4 class="subHeading">.NET Framework</h4>Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1<br />
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">See Also</a></span>
<div> </div>
</div>
<div id="seeAlsoSection" class="section">
<div>
<a href="topic_00000000000000F0.html">CustomAccountService Class</a><br />
<a href="topic_00000000000000EF.html">Tlece.Recruitment.Components Namespace</a><br />
</div>
</div>
</div>
</div>
<div id="internal-toc-area">
<div id="internal-toc-container" class="stickthis">
<h3 id="internal-toc-heading">In this article</h3>
<span id="internal-toc-definition-localized-text">Definition</span>
</div>
</div>
</div>
<div id="footer">
<div id="footer-container">
<p><span style="color: #FF0000;">Generated with unregistered version of <a target="_top" href="http://www.helixoft.com/vsdocman/overview.html">VSdocman</a></span> <br />Your own footer text will only be shown in registered version.</p>
</div>
</div>
</div>
</body>
</html>
|
asiboro/asiboro.github.io
|
vsdoc/topic_00000000000000F2.html
|
HTML
|
mit
| 12,411
|
package service;
import database.Jdbc;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.LoggerFactory;
@Path("/Crime")
public class Crime {
private static final org.slf4j.Logger log = LoggerFactory.getLogger(Crime.class);
@Path("/query")
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
@POST
public String query() {
try {
JSONArray records = new JSONArray();
Map<String, String> map;
Connection connect = Jdbc.getConnect();
Statement stmt = connect.createStatement();
String sql = "SELECT * FROM crime";
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
map = new LinkedHashMap<String, String>();
map.put("pk", rs.getLong("pk") + "");
map.put("crime_id", rs.getString("crime_id"));
map.put("crime_date", rs.getString("crime_date"));
map.put("crime_lat", rs.getString("crime_lat"));
map.put("crime_lng", rs.getString("crime_lng"));
map.put("crime_detail", rs.getString("crime_detail"));
map.put("crime_level", rs.getString("crime_level"));
map.put("area_pk", rs.getString("area_pk"));
map.put("type_pk", rs.getString("type_pk"));
map.put("place_pk", rs.getString("place_pk"));
map.put("user_pk", rs.getString("user_pk"));
map.put("time_pk", rs.getString("time_pk"));
records.put(map);
}
rs.close();
connect.close();
JSONObject js = new JSONObject();
js.put("Result", "OK");
js.put("Records", records);
return js.toString();
} catch (SQLException ex) {
Logger.getLogger(Type.class.getName()).log(Level.SEVERE, null, ex);
return ex.toString();
} catch (JSONException ex) {
Logger.getLogger(Type.class.getName()).log(Level.SEVERE, null, ex);
return ex.toString();
}
}
@Path("/insert")
@Produces(MediaType.APPLICATION_JSON)
@GET
public String insert() {
return "";
}
@Path("/update")
@Produces(MediaType.APPLICATION_JSON)
@GET
public String update() {
return "";
}
@Path("/delete")
@Produces(MediaType.APPLICATION_JSON)
@GET
public String delete(Long pk) {
return "";
}
}
|
SGCProject/Web-ser
|
Web-ser/src/service/Crime.java
|
Java
|
mit
| 3,026
|
---
layout: page
title: Banner Vision Technologies Award Ceremony
date: 2016-05-24
author: Willie Larson
tags: weekly links, java
status: published
summary: Phasellus lobortis neque sem, ut lacinia leo.
banner: images/banner/people.jpg
booking:
startDate: 04/25/2016
endDate: 04/26/2016
ctyhocn: ATLFRHX
groupCode: BVTAC
published: true
---
Vestibulum venenatis felis et maximus maximus. Mauris consectetur lacinia dignissim. Donec ac enim in enim vulputate auctor eget quis massa. Aliquam porta felis vel maximus lacinia. Aliquam a tortor quis dui blandit auctor. Morbi aliquet dolor ut laoreet cursus. Sed vel pulvinar neque. Proin at justo non lacus dapibus laoreet. Donec erat massa, faucibus in aliquam blandit, facilisis sit amet magna.
Duis dictum erat eu metus viverra, a feugiat massa interdum. Nullam eu mattis mi. Suspendisse eu sem finibus, blandit mi vel, molestie metus. Fusce eget leo eu ante efficitur tristique. Morbi sollicitudin, nisi et molestie elementum, odio odio consequat est, sed ornare augue sapien id enim. Phasellus fringilla ex ut velit convallis tincidunt. Curabitur a eleifend nulla, nec facilisis tortor. Donec tortor ligula, viverra in augue at, ornare vulputate nibh. Aliquam congue nibh vel ante malesuada, ultrices pellentesque metus tristique.
* Aenean at lectus a arcu pellentesque volutpat.
Duis sit amet molestie arcu. Quisque sapien tellus, pellentesque et tristique a, ultrices vitae magna. Phasellus accumsan sapien fermentum dapibus semper. Nunc elementum tellus sed interdum pulvinar. Proin pulvinar orci felis, id feugiat magna congue eget. Etiam congue quam nisl, eget pharetra risus interdum non. Pellentesque dapibus tempus semper. Cras sit amet lobortis nulla.
Donec consequat magna a lectus lobortis, et suscipit eros gravida. Nam iaculis magna nisl, non tempor ligula cursus eu. Phasellus finibus eu turpis quis mattis. Nam consectetur, diam quis sollicitudin dictum, orci massa mattis est, at iaculis sapien massa eget justo. Aliquam erat volutpat. Aenean interdum tristique enim, vitae tincidunt nisi. Nulla facilisi. In commodo leo ac lacinia pellentesque. Donec nec sem lobortis ligula sodales lobortis. Proin suscipit tempor sagittis. Nunc hendrerit, quam quis interdum tempus, mauris sem faucibus nunc, eget feugiat nisl nunc vel mauris. Donec sit amet mattis ex. Nunc sit amet est vitae nunc scelerisque sagittis. Maecenas a finibus justo. Nunc varius, nunc ac scelerisque sollicitudin, lacus tortor aliquam libero, et aliquet massa tellus eget mauris.
|
KlishGroup/prose-pogs
|
pogs/A/ATLFRHX/BVTAC/index.md
|
Markdown
|
mit
| 2,523
|
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"runtime"
"strings"
"testing"
"github.com/jstemmer/go-junit-report/parser"
)
type TestCase struct {
name string
reportName string
report *parser.Report
noXMLHeader bool
packageName string
}
var testCases = []TestCase{
{
name: "01-pass.txt",
reportName: "01-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 160,
Tests: []*parser.Test{
{
Name: "TestZ",
Time: 60,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestA",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
},
{
name: "02-fail.txt",
reportName: "02-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 151,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 20,
Result: parser.FAIL,
Output: []string{
"file_test.go:11: Error message",
"file_test.go:11: Longer",
"\terror",
"\tmessage.",
},
},
{
Name: "TestTwo",
Time: 130,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
},
{
name: "03-skip.txt",
reportName: "03-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 150,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 20,
Result: parser.SKIP,
Output: []string{
"file_test.go:11: Skip message",
},
},
{
Name: "TestTwo",
Time: 130,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
},
{
name: "04-go_1_4.txt",
reportName: "04-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 160,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 60,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
},
{
name: "05-no_xml_header.txt",
reportName: "05-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 160,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 60,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
noXMLHeader: true,
},
{
name: "06-mixed.txt",
reportName: "06-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name1",
Time: 160,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 60,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
},
},
{
Name: "package/name2",
Time: 151,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 20,
Result: parser.FAIL,
Output: []string{
"file_test.go:11: Error message",
"file_test.go:11: Longer",
"\terror",
"\tmessage.",
},
},
{
Name: "TestTwo",
Time: 130,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
noXMLHeader: true,
},
{
name: "07-compiled_test.txt",
reportName: "07-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "test/package",
Time: 160,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 60,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
packageName: "test/package",
},
{
name: "08-parallel.txt",
reportName: "08-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "github.com/dmitris/test-go-junit-report",
Time: 440,
Tests: []*parser.Test{
{
Name: "TestDoFoo",
Time: 270,
Result: parser.PASS,
Output: []string{"cov_test.go:10: DoFoo log 1", "cov_test.go:10: DoFoo log 2"},
},
{
Name: "TestDoFoo2",
Time: 160,
Result: parser.PASS,
Output: []string{"cov_test.go:21: DoFoo2 log 1", "cov_test.go:21: DoFoo2 log 2"},
},
},
},
},
},
},
{
name: "09-coverage.txt",
reportName: "09-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 160,
Tests: []*parser.Test{
{
Name: "TestZ",
Time: 60,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestA",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
},
CoveragePct: "13.37",
},
},
},
},
{
name: "10-multipkg-coverage.txt",
reportName: "10-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package1/foo",
Time: 400,
Tests: []*parser.Test{
{
Name: "TestA",
Time: 100,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestB",
Time: 300,
Result: parser.PASS,
Output: []string{},
},
},
CoveragePct: "10.0",
},
{
Name: "package2/bar",
Time: 4200,
Tests: []*parser.Test{
{
Name: "TestC",
Time: 4200,
Result: parser.PASS,
Output: []string{},
},
},
CoveragePct: "99.8",
},
},
},
},
{
name: "11-go_1_5.txt",
reportName: "11-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 50,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 20,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 30,
Result: parser.PASS,
Output: []string{},
},
},
},
},
},
},
{
name: "12-gocheck.v.txt",
reportName: "12-report.xml",
report: &parser.Report{
Packages: []parser.Package{
{
Name: "package/name",
Time: 50,
Tests: []*parser.Test{
{
Name: "TestOne",
Time: 20,
Result: parser.PASS,
Output: []string{},
},
{
Name: "TestTwo",
Time: 30,
Result: parser.PASS,
Output: []string{},
},
},
CoveragePct: "13.37",
},
},
},
},
}
func TestParser(t *testing.T) {
for _, testCase := range testCases {
t.Logf("Running: %s", testCase.name)
file, err := os.Open("tests/" + testCase.name)
if err != nil {
t.Fatal(err)
}
report, err := parser.Parse(file, testCase.packageName)
if err != nil {
t.Fatalf("error parsing: %s", err)
}
if report == nil {
t.Fatalf("Report == nil")
}
expected := testCase.report
if len(report.Packages) != len(expected.Packages) {
t.Fatalf("Report packages == %d, want %d", len(report.Packages), len(expected.Packages))
}
for i, pkg := range report.Packages {
expPkg := expected.Packages[i]
if pkg.Name != expPkg.Name {
t.Errorf("Package.Name == %s, want %s", pkg.Name, expPkg.Name)
}
if pkg.Time != expPkg.Time {
t.Errorf("Package.Time == %d, want %d", pkg.Time, expPkg.Time)
}
if len(pkg.Tests) != len(expPkg.Tests) {
t.Fatalf("Package Tests == %d, want %d", len(pkg.Tests), len(expPkg.Tests))
}
for j, test := range pkg.Tests {
expTest := expPkg.Tests[j]
if test.Name != expTest.Name {
t.Errorf("Test.Name == %s, want %s", test.Name, expTest.Name)
}
if test.Time != expTest.Time {
t.Errorf("Test.Time == %d, want %d", test.Time, expTest.Time)
}
if test.Result != expTest.Result {
t.Errorf("Test.Result == %d, want %d", test.Result, expTest.Result)
}
testOutput := strings.Join(test.Output, "\n")
expTestOutput := strings.Join(expTest.Output, "\n")
if testOutput != expTestOutput {
t.Errorf("Test.Output ==\n%s\n, want\n%s", testOutput, expTestOutput)
}
}
if pkg.CoveragePct != expPkg.CoveragePct {
t.Errorf("Package.CoveragePct == %s, want %s", pkg.CoveragePct, expPkg.CoveragePct)
}
}
}
}
func TestJUnitFormatter(t *testing.T) {
for _, testCase := range testCases {
report, err := loadTestReport(testCase.reportName)
if err != nil {
t.Fatal(err)
}
var junitReport bytes.Buffer
if err = JUnitReportXML(testCase.report, testCase.noXMLHeader, &junitReport); err != nil {
t.Fatal(err)
}
if string(junitReport.Bytes()) != report {
t.Fatalf("Fail: %s Report xml ==\n%s, want\n%s", testCase.name, string(junitReport.Bytes()), report)
}
}
}
func loadTestReport(name string) (string, error) {
contents, err := ioutil.ReadFile("tests/" + name)
if err != nil {
return "", err
}
// replace value="1.0" With actual version
report := strings.Replace(string(contents), `value="1.0"`, fmt.Sprintf(`value="%s"`, runtime.Version()), -1)
return report, nil
}
|
tadukurow/go-junit-report
|
go-junit-report_test.go
|
GO
|
mit
| 9,599
|
package com.sqlboaconnector.server;
import com.caucho.hessian.io.Hessian2Input;
import com.caucho.hessian.io.Hessian2Output;
import com.sqlboaconnector.server.CommandContext;
import org.json.JSONObject;
import java.io.IOException;
import java.io.OutputStream;
import java.sql.SQLException;
public interface ServerCommand {
public abstract ServerResponse execute(CommandContext context, JSONObject request) throws IOException, SQLException;
}
|
tremechus/boaconnector_android
|
app/src/main/java/com/sqlboaconnector/server/ServerCommand.java
|
Java
|
mit
| 452
|
<?php
/**
* phpGedView Research Assistant Tool - ra_Configure
*
* phpGedView: Genealogy Viewer
* Copyright (C) 2002 to 2009 John Finlay and Others
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @package PhpGedView
* @subpackage Research_Assistant
*
* @author Hector Pena
*/
if (!defined('PGV_PHPGEDVIEW')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
require_once PGV_ROOT.'modules/research_assistant/forms/ra_form.php';
global $pgv_lang;
loadLangFile("pgv_confighelp");
/**
* @uses ra_form
*/
global $SHOW_MY_TASKS, $SHOW_ADD_TASK, $SHOW_AUTO_GEN_TASK, $SHOW_VIEW_FOLDERS, $SHOW_ADD_FOLDER, $SHOW_ADD_UNLINKED_SOURCE, $SHOW_VIEW_PROBABILITIES;
global $INDEX_DIRECTORY, $GEDCOM, $person_privacy;
require_once PGV_ROOT.'modules/research_assistant/forms/ra_privacy.php';
if (file_exists($INDEX_DIRECTORY.$GEDCOM.'_ra_priv.php')) {
require_once $INDEX_DIRECTORY.$GEDCOM.'_ra_priv.php';
}
if (isset($_REQUEST['subaction']) && $_REQUEST['subaction']=="submitconfig") {
$fRAprivacy = "modules/research_assistant/forms/ra_privacy.php";
$configtext = implode('', file($fRAprivacy));
$configtext = preg_replace('/\$SHOW_MY_TASKS\s*=\s*.*;/', "\$SHOW_MY_TASKS = ".$_POST["v_SHOW_MY_TASKS"].";", $configtext);
$configtext = preg_replace('/\$SHOW_ADD_TASK\s*=\s*.*;/', "\$SHOW_ADD_TASK = ".$_POST["v_SHOW_ADD_TASK"].";", $configtext);
$configtext = preg_replace('/\$SHOW_AUTO_GEN_TASK\s*=\s*.*;/', "\$SHOW_AUTO_GEN_TASK = ".$_POST["v_SHOW_AUTO_GEN_TASK"].";", $configtext);
$configtext = preg_replace('/\$SHOW_VIEW_FOLDERS\s*=\s*.*;/', "\$SHOW_VIEW_FOLDERS = ".$_POST["v_SHOW_VIEW_FOLDERS"].";", $configtext);
$configtext = preg_replace('/\$SHOW_ADD_FOLDER\s*=\s*.*;/', "\$SHOW_ADD_FOLDER = ".$_POST["v_SHOW_ADD_FOLDER"].";", $configtext);
$configtext = preg_replace('/\$SHOW_ADD_UNLINKED_SOURCE\s*=\s*.*;/', "\$SHOW_ADD_UNLINKED_SOURCE = ".$_POST["v_SHOW_ADD_UNLINKED_SOURCE"].";", $configtext);
$configtext = preg_replace('/\$SHOW_VIEW_PROBABILITIES\s*=\s*.*;/', "\$SHOW_VIEW_PROBABILITIES = ".$_POST["v_SHOW_VIEW_PROBABILITIES"].";", $configtext);
$PRIVACY_MODULE = $INDEX_DIRECTORY.$GEDCOM."_ra_priv.php";
$fp = fopen($PRIVACY_MODULE, "wb");
if (!$fp) {
print "<span class=\"error\">";
print $pgv_lang["gedcom_config_write_error"];
print "<br /></span>\n";
}
else {
fwrite($fp, $configtext);
fclose($fp);
}
require $INDEX_DIRECTORY.$GEDCOM.'_ra_priv.php';
$logline = AddToLog("Privacy file $PRIVACY_MODULE updated");
$gedcomprivname = $GEDCOM."_ra_priv.php";
if (!empty($COMMIT_COMMAND)) check_in($logline, $gedcomprivname, $INDEX_DIRECTORY);
}
?>
<!--JAVASCRIPT-->
<!--BEGIN CONFIGURE FORM-->
<form action="module.php" method="post">
<input type="hidden" name="mod" value="research_assistant" />
<input type="hidden" name="action" value="configurePrivacy" />
<input type="hidden" name="subaction" value="submitconfig" />
<table class="list_table" align="center">
<tbody>
<tr>
<!--HEADING-->
<td colspan="4" align="right" class="topbottombar">
<h2><?php print $pgv_lang["configure_privacy"]; print_help_link("ra_configure_privacy_help", "qm", '', false, false);?></h2>
</td>
</tr>
<!--MY TASKS-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_my_tasks"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_MY_TASKS">
<?php write_access_option($SHOW_MY_TASKS); ?>
</select>
</td>
</tr>
<!--ADD TASK-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_add_task"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_ADD_TASK">
<?php write_access_option($SHOW_ADD_TASK); ?>
</select>
</td>
</tr>
<!--AUTO GENERATE TASK-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_auto_gen_task"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_AUTO_GEN_TASK">
<?php write_access_option($SHOW_AUTO_GEN_TASK); ?>
</select>
</td>
</tr>
<!--VIEW FOLDERS-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_view_folders"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_VIEW_FOLDERS">
<?php write_access_option($SHOW_VIEW_FOLDERS); ?>
</select>
</td>
</tr>
<!--ADD FOLDER-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_add_folder"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_ADD_FOLDER">
<?php write_access_option($SHOW_ADD_FOLDER); ?>
</select>
</td>
</tr>
<!--ADD UNLINKED SOURCE-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_add_unlinked_source"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_ADD_UNLINKED_SOURCE">
<?php write_access_option($SHOW_ADD_UNLINKED_SOURCE); ?>
</select>
</td>
</tr>
<!--VIEW PROBABILITIES-->
<tr>
<td class="descriptionbox">
<?php print $pgv_lang["show_view_probabilities"]; ?>
</td>
<td class="optionbox">
<select size="1" name="v_SHOW_VIEW_PROBABILITIES">
<?php write_access_option($SHOW_VIEW_PROBABILITIES); ?>
</select>
</td>
</tr>
<!--SUBMIT BUTTON-->
<tr>
<td colspan="4" align="right" class="topbottombar">
<input type="submit" value="<?php print $pgv_lang["submit"]; ?>" onclick="" />
<input type="reset" value="<?php print $pgv_lang["reset"]?>" /><br />
</td>
</tr>
</tbody>
</table>
</form>
<!--END CONFIGURE -->
|
fweber1/Annies-Ancestors
|
PhpGedView/modules/research_assistant/forms/ra_Configure.php
|
PHP
|
mit
| 7,626
|
/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
// Distributable under the terms of either the Apache License (Version 2.0)
// or the GNU Lesser General Public License.
/////////////////////////////////////////////////////////////////////////////
#ifndef LOWERCASEFILTER_H
#define LOWERCASEFILTER_H
#include "TokenFilter.h"
namespace Lucene {
/// Normalizes token text to lower case.
class LPPAPI LowerCaseFilter : public TokenFilter {
public:
LowerCaseFilter(const TokenStreamPtr& input);
virtual ~LowerCaseFilter();
LUCENE_CLASS(LowerCaseFilter);
protected:
TermAttributePtr termAtt;
public:
virtual bool incrementToken();
};
}
#endif
|
afklm/lucenekit
|
Pod/Libraries/Header/LowerCaseFilter.h
|
C
|
mit
| 757
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.