code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
---|---|---|---|---|---|
# -*- coding: utf-8 -*-
"""
module.name
~~~~~~~~~~~~~~~
Preamble...
"""
from __future__ import absolute_import, print_function, unicode_literals
import django_async_test
from django_async_test.tests.testapp.models import ModelWithBasicField
async def ping(pong):
return pong
async def create(name):
return ModelWithBasicField.objects.create(name=name)
class DummyTestCase(django_async_test.TestCase):
"""
A dummy test case that is used to test the behaviour of TestCase.
"""
@django_async_test.ignore_loop
def test_transaction_support(self):
ModelWithBasicField.objects.create(name='asdf')
self.assertEqual(ModelWithBasicField.objects.count(), 1)
async def test_coroutine(self):
expected = 'Hello'
actual = await ping(expected)
self.assertEqual(actual, expected)
async def test_transactional_coroutine(self):
expected = 'Hello'
actual = await create(expected)
self.assertEqual(actual.name, expected)
| alexhayes/django-async-test | django_async_test/tests/testapp/util.py | Python | mit | 1,022 |
var blessed = require('../')
, screen;
screen = blessed.screen({
dump: __dirname + '/logs/image.log',
smartCSR: true
});
// To ensure our w3mimgdisplay search works:
if (process.argv[2] === 'find') {
blessed.image.w3mdisplay = '/does/not/exist';
process.argv.length = 2;
}
var file = process.argv[2] || __dirname + '/test-image.png';
var image = blessed.image({
parent: screen,
left: 'center',
top: 'center',
width: 'shrink',
height: 'shrink',
style: {
bg: 'green'
}
});
setTimeout(function() {
image.setImage(file, function() {
// XXX For some reason the image sometimes envelopes
// the entire screen at the end if this is uncommented:
// NOTE: Might have to do with an uncached ratio and
// a bad termSize being reported.
screen.render();
setTimeout(function() {
image.rtop = 4;
image.rleft = 10;
screen.render();
setTimeout(function() {
image.rtop = 2;
image.rleft = 7;
screen.render();
setTimeout(function() {
image.detach();
screen.render();
setTimeout(function() {
screen.append(image);
screen.render();
}, 1000);
}, 1000);
}, 1000);
}, 5000);
});
}, 1000);
image.focus();
screen.key('i', function() {
screen.displayImage(file);
});
screen.key('q', function() {
return process.exit(0);
});
screen.render();
| yaronn/blessed | test/widget-image.js | JavaScript | mit | 1,421 |
class User < ActiveRecord::Base
has_many :trivia_answers
has_many :trivias, :through => :trivia_answers
def add_trivia(trivia)
trivia_answers.create(:trivia => trivia)
end
def played_trivia?(trivia)
trivias.include?(trivia)
end
def trivia_points
trivia_answers.sum(:points)
end
end | balinterdi/acts_as_trivia | lib/acts_as_trivia/user.rb | Ruby | mit | 320 |
---
layout: page
title: Categories
---
* <a href="amber" target="_self">Amber</a>
* <a href="barrel-aged" target="_self">Barrel-Aged</a>
* <a href="bock" target="_self">Bock</a>
* <a href="brown-ale" target="_self">Brown Ale</a>
* <a href="cider" target="_self">Cider</a>
* <a href="fruit-beer" target="_self">Fruit Beer</a>
* <a href="ipa" target="_self">IPA (Pale Ale, APA)</a>
* <a href="oktoberfest" target="_self">Oktoberfest (Marzen)</a>
* <a href="pumpkin-beer" target="_self">Pumpkin Beer</a>
* <a href="saison" target="_self">Saison (Farmhouse Ale)</a>
* <a href="scotch-ale" target="_self">Scotch Ale</a>
* <a href="sour" target="_self">Sour</a>
* <a href="stout" target="_self">Stout (Porter)</a>
* <a href="wheat-beer" target="_self">Wheat Beer (Weissbier)</a>
| bradorego/beerbatterbreakfast | categories.md | Markdown | mit | 774 |
__version__ = '0.7.0'
try:
from mando.core import Program
except ImportError as e: # pragma: no cover
# unfortunately the only workaround for Python2.6, argparse and setup.py
e.version = __version__
raise e
main = Program()
command = main.command
arg = main.arg
parse = main.parse
execute = main.execute
| MarioSchwalbe/mando | mando/__init__.py | Python | mit | 323 |
//Problem 17.* Subset K with sum S
// Write a program that reads three integer numbers N, K and S
// and an array of N elements from the console.
// Find in the array a subset of K elements that have sum S or
// indicate about its absence.
using System;
using System.Linq;
using System.Text;
class SubsetKWithSumS
{
static void Main()
{
Console.Write("Enter S: ");
int s = int.Parse(Console.ReadLine());
Console.Write("Enter K: ");
int k = int.Parse(Console.ReadLine());
Console.Write("Enter array: ");
string inputNumbers = Console.ReadLine();
int[] arr = (from x in inputNumbers.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)
select int.Parse(x)).ToArray();
int MaxSubset = (int)Math.Pow(2, arr.Length);
bool isExist = false;
for (int i = 1; i < MaxSubset; i++)
{
int checkingSum = 0;
int couner = 0;
StringBuilder subSet = new StringBuilder();
for (int j = 0; j <= arr.Length; j++)
{
int mask = 1 << j;
int nAndMask = i & mask;
int bit = nAndMask >> j;
if (bit == 1)
{
checkingSum = checkingSum + arr[j];
couner++;
subSet.AppendFormat("{0}, ", arr[j]);
}
}
if (checkingSum == s && couner == k)
{
Console.WriteLine("Yes");
Console.WriteLine(subSet.ToString());
isExist = true;
return;
}
subSet.Clear();
}
if (!isExist)
{
Console.WriteLine("No");
}
}
}
| TomaNikolov/TelerikAcademy | C#2/01.Arrays/SubsetKWithSumS/SubsetKWithSumS.cs | C# | mit | 1,807 |
/*
ADS1232.cpp - Library for reading from a ADS1232 24-bit ADC.
Created by Jeffrey M. Kubascik, June 28, 2016.
Released into the public domain.
*/
#include "ADS1232.h"
ADS1232::ADS1232(int pin_cs, int pin_dout, int pin_pdwn, int pin_gain0, int pin_gain1, int pin_speed, int pin_a0, int pin_temp) :
_pin_cs(pin_cs),
_pin_dout(pin_dout),
_pin_pdwn(pin_pdwn),
_pin_gain0(pin_gain0),
_pin_gain1(pin_gain1),
_pin_speed(pin_speed),
_pin_a0(pin_a0),
_pin_temp(pin_temp),
spi_settings(2000000, MSBFIRST, SPI_MODE1)
{
return;
}
void ADS1232::init(Gain gain, Speed speed, Channel channel)
{
pinMode(_pin_cs, OUTPUT);
pinMode(_pin_pdwn, OUTPUT);
pinMode(_pin_gain0, OUTPUT);
pinMode(_pin_gain1, OUTPUT);
pinMode(_pin_speed, OUTPUT);
pinMode(_pin_a0, OUTPUT);
pinMode(_pin_temp, OUTPUT);
disable();
setGain(gain);
setSpeed(speed);
setChannel(channel);
delay(1);
enable();
return;
}
void ADS1232::enable(void)
{
digitalWrite(_pin_pdwn, HIGH);
return;
}
void ADS1232::disable(void)
{
digitalWrite(_pin_pdwn, LOW);
return;
}
void ADS1232::setGain(Gain gain)
{
switch(gain)
{
case GAIN1:
{
digitalWrite(_pin_gain1, LOW);
digitalWrite(_pin_gain0, LOW);
break;
}
case GAIN2:
{
digitalWrite(_pin_gain1, LOW);
digitalWrite(_pin_gain0, HIGH);
break;
}
case GAIN64:
{
digitalWrite(_pin_gain1, HIGH);
digitalWrite(_pin_gain0, LOW);
break;
}
case GAIN128:
{
digitalWrite(_pin_gain1, HIGH);
digitalWrite(_pin_gain0, HIGH);
break;
}
}
return;
}
void ADS1232::setSpeed(Speed speed)
{
switch(speed)
{
case SLOW:
{
digitalWrite(_pin_speed, LOW);
break;
}
case FAST:
{
digitalWrite(_pin_speed, HIGH);
break;
}
}
return;
}
void ADS1232::setChannel(Channel channel)
{
switch(channel)
{
case AIN1:
{
digitalWrite(_pin_temp, LOW);
digitalWrite(_pin_a0, LOW);
break;
}
case AIN2:
{
digitalWrite(_pin_temp, LOW);
digitalWrite(_pin_a0, HIGH);
break;
}
case TEMP:
{
digitalWrite(_pin_temp, HIGH);
digitalWrite(_pin_a0, LOW);
break;
}
}
return;
}
bool ADS1232::dataReady(void)
{
return digitalRead(_pin_dout) == LOW;
}
int32_t ADS1232::read(void)
{
int32_t data = 0;
while(dataReady() == false);
SPI.beginTransaction(spi_settings);
digitalWrite(_pin_cs, LOW);
data |= (uint32_t)SPI.transfer16(0) << 16;
data |= (uint32_t)SPI.transfer16(0) << 0;
digitalWrite(_pin_cs, HIGH);
SPI.endTransaction();
return data;
}
| jeffkub/beer-gauge | firmware/beer-gauge/ADS1232.cpp | C++ | mit | 2,676 |
class AddVatEnabledToAccounts < ActiveRecord::Migration
def change
add_column :accounts, :vat_enabled, :boolean
end
end
| bannio/bulldog | db/migrate/20140416131739_add_vat_enabled_to_accounts.rb | Ruby | mit | 128 |
'use strict';
var User = require('../models/user_model');
var jobQueue = require('../models/jobQueue_model');
module.exports = function(app, jwtauth) {
app.post('/concierge', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}, function(err, user) {
if (err) {
return res.status(500).json({message: 'error finding user to add concierge'});
}
if (user === null) {
return res.status(404).json({message: 'no user found matching that id'});
}
user.concierge = true;
user.conciergeAvailable = false;
user.save(function(err) {
if (err) return res.status(500).json({message: 'no user found matching that id'});
res.status(202).json({concierge: true});
});
});
});
app.post('/conciergeAvailable', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}, function(err, user) {
if (err) {
return res.status(404).json({message: 'error finding concierge to make available'});
}
if (user === null) {
return res.status(404).json({message: 'no user found matching that id'});
}
user.conciergeAvailable = true;
user.conciergeJobs = [];
user.save(function(err, doc) {
if (err) return res.status(500).json({message: 'no user found matching that id'});
res.status(202).json({conciergeAvailable: doc.conciergeAvailable});
});
});
});
app.post('/conciergeUnavailable', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}, function(err, user) {
if (err) {
return res.status(404).json({message: 'error finding concierge to make unavailable'});
}
if (user === null) {
return res.status(404).json({message: 'no user found matching that id'});
}
user.conciergeAvailable = false;
user.save(function(err, doc) {
if (err) return res.status(500).json({message: 'no user found matching that id'});
res.status(202).json({conciergeAvailable: doc.conciergeAvailable});
});
});
});
app.get('/conciergeList', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}).lean().exec(function(err, user) {
if (err) {
return res.status(404).json({message: 'error finding concierge'});
}
if (user === null) {
return res.status(404).json({message: 'no concierge found matching that id'});
}
jobQueue.find({_id: { $in: user.conciergeJobs}}, function(err, docs) {
if (err) return res.status(500).json({message: 'error finding concierge jobs'});
if (docs.length === 0) return res.status(500).json({message: 'no jobs found for concierge'});
res.status(200).send(docs);
});
});
});
app.post('/conciergeToUser', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}, function(err, user) {
if (err) {
return res.status(500).json({message: 'error finding user'});
}
if (user === null) {
return res.status(500).json({message: 'no user found matching that id'});
}
user.concierge = false;
user.conciergeAvailable = false;
user.save(function(err) {
if (err) return res.status(500).json({message: 'no user found matching that id'});
res.status(202).json({concierge: false});
});
});
});
app.get('/concierge', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}, function(err, user) {
res.status(200).json({concierge: user.concierge});
});
});
app.get('/conciergeAvailable', jwtauth, function(req, res) {
User.findOne({_id: req.user._id}, function(err, user) {
res.status(200).json({conciergeAvailable: user.conciergeAvailable});
});
});
};
| ecjs/Concierge | routes/register_concierge.js | JavaScript | mit | 3,727 |
/// This code was generated by
/// \ / _ _ _| _ _
/// | (_)\/(_)(_|\/| |(/_ v1.0.0
/// / /
using NUnit.Framework;
using System;
using Twilio.Converters;
using Twilio.TwiML.Voice;
namespace Twilio.Tests.TwiML
{
[TestFixture]
public class ParameterTest : TwilioTest
{
[Test]
public void TestEmptyElement()
{
var elem = new Parameter();
Assert.AreEqual(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<Parameter></Parameter>",
elem.ToString()
);
}
[Test]
public void TestElementWithParams()
{
var elem = new Parameter("name", "value");
Assert.AreEqual(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<Parameter name=\"name\" value=\"value\"></Parameter>",
elem.ToString()
);
}
[Test]
public void TestElementWithExtraAttributes()
{
var elem = new Parameter();
elem.SetOption("newParam1", "value");
elem.SetOption("newParam2", 1);
Assert.AreEqual(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<Parameter newParam1=\"value\" newParam2=\"1\"></Parameter>",
elem.ToString()
);
}
[Test]
public void TestElementWithTextNode()
{
var elem = new Parameter();
elem.AddText("Here is the content");
Assert.AreEqual(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<Parameter>Here is the content</Parameter>",
elem.ToString()
);
}
[Test]
public void TestAllowGenericChildNodes()
{
var elem = new Parameter();
elem.AddChild("generic-tag").AddText("Content").SetOption("tag", true);
Assert.AreEqual(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<Parameter>" + Environment.NewLine +
" <generic-tag tag=\"True\">Content</generic-tag>" + Environment.NewLine +
"</Parameter>",
elem.ToString()
);
}
[Test]
public void TestMixedContent()
{
var elem = new Parameter();
elem.AddText("before")
.AddChild("Child").AddText("content");
elem.AddText("after");
Assert.AreEqual(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
"<Parameter>before<Child>content</Child>after</Parameter>",
elem.ToString()
);
}
}
} | twilio/twilio-csharp | test/Twilio.Test/TwiML/ParameterTest.cs | C# | mit | 2,885 |
{% extends "templates/index.html" %}
{% load url from future %}
{% block title %}
Edit contestants
{% endblock %}
{% block content %}
<form action="" method="POST">
<table>
{{ form.as_table }}
</table>
<input type="submit" class="button" name="change" value="Change"/>
<table class="simple">
<tr><th>Login</th><th>Name</th><th>Affiliation</th><th></th></tr>
{% for u in users %}
<tr>
<td>{{u.login}}</td><td>{{u.name}}</td><td>{{u.affiliation}}</td><td><input type="submit" class="button button_small" name="remove_{{u.id}}" value="Remove"</td>
</tr>
{% endfor %}
</table>
</form>
<form action="" method="POST">
<table>
{{ add_form.as_table}}
</table>
<input type="submit" class="button" name="add" value="Add new user"/>
</form>
{% endblock %}
| zielmicha/satori | satori.web/satori/web/templates/teampage.html | HTML | mit | 757 |
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "WFStaticTableViewController.h"
@class UIBarButtonItem, UILabel, WFAnnouncement, WFAnnouncementIntervalDistanceCell, WFAnnouncementIntervalDurationCell, WFAnnouncementIntervalHRZoneCell, WFBasicTableViewCell;
@interface WFNewAnnouncementIntervalTVC : WFStaticTableViewController
{
WFAnnouncement *_announcement;
UILabel *_headerLabel;
WFAnnouncementIntervalDistanceCell *_distanceCell;
WFAnnouncementIntervalHRZoneCell *_hrCell;
WFAnnouncementIntervalDurationCell *_durationCell;
WFBasicTableViewCell *_nextCell;
int _intervalType;
}
@property(nonatomic) int intervalType; // @synthesize intervalType=_intervalType;
@property(nonatomic) __weak WFBasicTableViewCell *nextCell; // @synthesize nextCell=_nextCell;
@property(nonatomic) __weak WFAnnouncementIntervalDurationCell *durationCell; // @synthesize durationCell=_durationCell;
@property(nonatomic) __weak WFAnnouncementIntervalHRZoneCell *hrCell; // @synthesize hrCell=_hrCell;
@property(nonatomic) __weak WFAnnouncementIntervalDistanceCell *distanceCell; // @synthesize distanceCell=_distanceCell;
@property(nonatomic) __weak UILabel *headerLabel; // @synthesize headerLabel=_headerLabel;
@property(retain, nonatomic) WFAnnouncement *announcement; // @synthesize announcement=_announcement;
- (void).cxx_destruct;
- (void)doneButtonTouched:(id)arg1;
- (void)prepareForSegue:(id)arg1 sender:(id)arg2;
- (void)configureCellVisibility;
- (void)viewDidLoad;
// Remaining properties
@property(nonatomic) __weak UIBarButtonItem *doneButton;
@end
| JChanceHud/GearIndicator | Fitness/WFNewAnnouncementIntervalTVC.h | C | mit | 1,677 |
body {
width: 100%;
background-color: #FFFFFF;
font-family: verdana, sans-serif;
color: #555555;
/*border:2px solid #FFFFFF;*/
font-size: 14px;
margin: 0;
}
header {
display: block;
width: 100%;
/*
position:absolute;
top:0px;
left:0px;
*/
padding: 1px;
margin: 0;
height: 32px;
background-color: #007FFF;
color: #fff;
}
.header_wrapper {
width: 962px;
padding: 0px;
border: 0px solid #000;
margin: 8px auto 0px auto;
}
.body_wrapper {
width: 962px;
height: 100%;
padding: 1px;
margin: 5px auto 0px auto;
text-align: center;
}
.header_wrapper li {
display: inline;
margin-right: 5px;
}
ul {
margin: 0;
overflow: auto;
padding: 0;
}
.border {
border: 1px solid #CCCCCC;
}
.contactInfo {
float: left;
margin: 0;
}
.info {
float: right;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
#name .lastname {
position: relative;
right: 200px;
font-size: 50px;
}
@font-face {
font-family: 'ex2';
src: url('Exo2-Medium.ttf')
}
#name .introduction {
position: relative;
right: 0px;
font-family: 'Exo 2', 'ex2', verdana;
color: #888888;
}
.vertical_middle {
position: relative;
top: -2px;
vertical-align: middle;
}
#name .firstname {
position: relative;
right: 250px;
font-size: 40px;
}
#name {
float: left;
padding: 0;
width: 720px;
margin: 10px;
color: #007FFF;
line-height: 20px;
}
#photo {
border-radius: 50%;
background-image: url("Cvphoto1.gif");
float: left;
padding: 0;
height: 200px;
width: 200px;
margin: 10px
}
.split {
width: 962px;
float: left;
}
.skill {
border-radius: 10%;
margin-top: -11px;
margin-bottom: 20px;
padding: 5px;
width: 225px;
height: 120px;
float: left;
border: 1px solid #fff;
line-height: 1.4em;
font-size: 15px;
font-family: 'Exo 2', 'ex2', verdana;;
}
.skill .title {
color: #007FFF;
text-transform: uppercase;
}
.bluebackground {
background-color: #4B7EA2;
}
.redbackground {
background-color: #FF4C4C;
}
.yellowbackground {
background-color: #B35900;
}
.greenbackground {
background-color: #00B386;
}
.chinabackground {
background-image: url("China.jpg");
}
.whoami {
border-radius: 50%;
width: 150px;
height: 150px;
float: left;
margin: 10px;
padding: 0 0px 0 0;
background-color: #007FFF;
color: #fff;
text-transform: uppercase;
line-height: 150px;
font-size: 150%;
}
.clear {
clear: left;
}
.overview {
float: left;
width: 780px;
height: 150px;
box-sizing: border-box;
padding: 40px;
text-align: left;
}
th, td {
vertical-align: middle;
height: 80px;
padding: 0;
}
th.slash {
width: 10px;
background-color: white;
color: blue;
font-size: 20px;
}
th.date {
background-color: #007FFF;
color: white;
width: 70px;
}
table {
border-spacing: 5px 15px;
margin: 5px;
padding: 0;
}
table.education_date {
text-transform: uppercase;
font-size: 14px;
float: left;
width: 190px;
}
table.education_content {
width: 742px;
float: left;
text-align: left;
}
/*
table.education_content td{
border-bottom:1px solid #BBBBBB;
}*/
.language_section {
float: left;
width: 100%;
padding: 1px;
padding-bottom: 10px;
margin: 0px;
background-color: #007FFF;
color: white;
line-height: 1.4em;
}
.float {
float: left;
}
.language_name {
margin-left: 10px;
margin-top: 0;
font-weight: bold;
padding: 5px;
width: 90px;
text-transform: uppercase;
}
.top10 {
position: relative;
top: -10px;
}
.top20 {
position: relative;
top: -20px;
}
.language_discription {
margin-top: 0;
text-align: left;
padding: 5px;
width: 200px;
height: 60px;
}
img.resize {
width: 50px;
height: 50px;
}
footer {
position: relative;
top: 15px;
text-align: center;
} | hanwencheng/hanwenblog | pages/resume_en.css | CSS | mit | 3,912 |
(function () {
'use strict';
angular
.module('pages')
.run(HomeRunBlock)
.controller('HomeController', HomeController);
/* @ngInject */
function HomeRunBlock($location, Authentication) {
// When landing to frontpage as authenticated user, redirect to search
if (Authentication.user && $location.path() === '/') {
$location.path('/search');
}
}
/* @ngInject */
function HomeController($stateParams, Authentication, TribesService, TribeService) {
var headerHeight = angular.element('#tr-header').height() || 0;
// View model
var vm = this;
vm.tribesLoaded = false;
// Exposed to the view
vm.windowHeight = angular.element('html').height() - headerHeight;
// Load front page's landing photos
// @todo, move part of this logic data to the DB
if ($stateParams.tribe && ['hitchhikers', 'dumpster-divers', 'punks'].indexOf($stateParams.tribe) > -1) {
vm.boards = ['rainbowpeople', 'hitchroad', 'desertgirl', 'hitchgirl1', 'hitchgirl2'];
} else {
vm.boards = Authentication.user ? ['woman-bridge', 'wavewatching'] : ['woman-bridge', 'rainbowpeople', 'hitchroad', 'hitchgirl1', 'wavewatching'];
}
// Load suggested tribes
vm.tribes = TribesService.query({
limit: 3
}, function() {
// Got those three tribes, now fetch one more if requested
if ($stateParams.tribe && $stateParams.tribe !== '') {
// Loop trough tribes to see if requested tribe is already there, and simply move it to be first
var foundTribeFromArray = false;
angular.forEach(vm.tribes, function(tribe) {
if (tribe.slug === $stateParams.tribe) {
foundTribeFromArray = true;
}
});
if (!foundTribeFromArray) {
vm.tribe = TribeService.get({
tribeSlug: $stateParams.tribe
});
vm.tribe.then(function(tribe) {
// If tribe was found, put it to the beginning of `vm.tribes` array
if (tribe && tribe._id) {
vm.tribes.unshift(tribe);
}
vm.tribesLoaded = true;
});
} else {
vm.tribesLoaded = true;
}
} else {
vm.tribesLoaded = true;
}
});
}
}());
| mleanos/trustroots | modules/pages/client/controllers/home.client.controller.js | JavaScript | mit | 2,272 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
import os
import numpy as np
from rmgpy import getPath
from rmgpy.qm.main import QMCalculator
from rmgpy.molecule import Molecule
from rmgpy.qm.gaussian import GaussianMolPM3, GaussianMolPM6
gaussEnv = os.getenv('GAUSS_EXEDIR') or os.getenv('g09root') or os.getenv('g03root') or ""
if os.path.exists(os.path.join(gaussEnv , 'g09')):
executablePath = os.path.join(gaussEnv , 'g09')
elif os.path.exists(os.path.join(gaussEnv , 'g03')):
executablePath = os.path.join(gaussEnv , 'g03')
else:
executablePath = os.path.join(gaussEnv , '(g03 or g09)')
qm = QMCalculator()
qm.settings.software = 'gaussian'
RMGpy_path = os.path.normpath(os.path.join(getPath(),'..'))
qm.settings.fileStore = os.path.join(RMGpy_path, 'testing', 'qm', 'QMfiles')
qm.settings.scratchDirectory = None
qm.settings.onlyCyclics = False
qm.settings.maxRadicalNumber = 0
mol1 = Molecule().fromSMILES('C1=CC=C2C=CC=CC2=C1')
class TestGaussianMolPM3(unittest.TestCase):
"""
Contains unit tests for the Geometry class.
"""
@unittest.skipIf(os.path.exists(executablePath)==False, "Gaussian not found. Try resetting your environment variables if you want to use it.")
def setUp(self):
"""
A function run before each unit test in this class.
"""
if not os.path.exists(qm.settings.fileStore):
os.makedirs(qm.settings.fileStore)
self.qmmol1 = GaussianMolPM3(mol1, qm.settings)
def testGenerateThermoData(self):
"""
Test that generateThermoData() works correctly.
"""
try:
fileList = os.listdir(self.qmmol1.settings.fileStore)
for fileName in fileList:
os.remove(os.path.join(self.qmmol1.settings.fileStore, fileName))
except OSError:
pass
self.qmmol1.generateThermoData()
result = self.qmmol1.qmData
self.assertTrue(self.qmmol1.thermo.comment.startswith('QM GaussianMolPM3 calculation'))
self.assertEqual(result.numberOfAtoms, 18)
self.assertIsInstance(result.atomicNumbers, np.ndarray)
if result.molecularMass.units=='amu':
self.assertEqual(result.molecularMass.value, 128.173)
self.assertAlmostEqual(self.qmmol1.thermo.H298.value_si, 169708.0608, 1) # to 1 decimal place
self.assertAlmostEqual(self.qmmol1.thermo.S298.value_si, 334.5007584, 1) # to 1 decimal place
def testLoadThermoData(self):
"""
Test that generateThermoData() can load thermo from a previous run.
Check that it loaded, and the values are the same as above.
"""
self.qmmol1.generateThermoData()
result = self.qmmol1.qmData
self.assertTrue(self.qmmol1.thermo.comment.startswith('QM GaussianMolPM3 calculation'))
self.assertEqual(result.numberOfAtoms, 18)
self.assertIsInstance(result.atomicNumbers, np.ndarray)
self.assertAlmostEqual(result.energy.value_si, 169708.01906637018, 1)
if result.molecularMass.units=='amu':
self.assertEqual(result.molecularMass.value, 128.173)
self.assertAlmostEqual(self.qmmol1.thermo.H298.value_si, 169708.0608, 1) # to 1 decimal place
self.assertAlmostEqual(self.qmmol1.thermo.S298.value_si, 334.5007584, 1) # to 1 decimal place
class TestGaussianMolPM6(unittest.TestCase):
"""
Contains unit tests for the Geometry class.
"""
@unittest.skipIf(os.path.exists(executablePath)==False, "Gaussian not found. Try resetting your environment variables if you want to use it.")
def setUp(self):
"""
A function run before each unit test in this class.
"""
if not os.path.exists(qm.settings.fileStore):
os.makedirs(qm.settings.fileStore)
self.qmmol1 = GaussianMolPM6(mol1, qm.settings)
def testGenerateThermoData(self):
"""
Test that generateThermoData() works correctly.
"""
try:
fileList = os.listdir(self.qmmol1.settings.fileStore)
for fileName in fileList:
os.remove(os.path.join(self.qmmol1.settings.fileStore, fileName))
except OSError:
pass
self.qmmol1.generateThermoData()
result = self.qmmol1.qmData
self.assertTrue(self.qmmol1.thermo.comment.startswith('QM GaussianMolPM6 calculation'))
self.assertEqual(result.numberOfAtoms, 18)
self.assertIsInstance(result.atomicNumbers, np.ndarray)
if result.molecularMass.units=='amu':
self.assertEqual(result.molecularMass.value, 128.173)
self.assertAlmostEqual(self.qmmol1.thermo.H298.value_si, 169708.0608, 1) # to 1 decimal place
self.assertAlmostEqual(self.qmmol1.thermo.S298.value_si, 334.5007584, 1) # to 1 decimal place
def testLoadThermoData(self):
"""
Test that generateThermoData() can load thermo from a previous run.
Check that it loaded, and the values are the same as above.
"""
self.qmmol1.generateThermoData()
result = self.qmmol1.qmData
self.assertTrue(self.qmmol1.thermo.comment.startswith('QM GaussianMolPM6 calculation'))
self.assertEqual(result.numberOfAtoms, 18)
self.assertIsInstance(result.atomicNumbers, np.ndarray)
self.assertAlmostEqual(result.energy.value_si, 169708.01906637018, 1)
if result.molecularMass.units=='amu':
self.assertEqual(result.molecularMass.value, 128.173)
self.assertAlmostEqual(self.qmmol1.thermo.H298.value_si, 169708.0608, 1) # to 1 decimal place
self.assertAlmostEqual(self.qmmol1.thermo.S298.value_si, 334.5007584, 1) # to 1 decimal place
################################################################################
if __name__ == '__main__':
unittest.main( testRunner = unittest.TextTestRunner(verbosity=2) ) | KEHANG/RMG-Py | rmgpy/qm/gaussianTest.py | Python | mit | 5,347 |
from django.conf.urls import url
from . import views
urlpatterns = [
]
| Cofn/cofn | cofn/apps/blog/urls.py | Python | mit | 75 |
using System.Security.Claims;
namespace Moon.Security
{
public static class ClaimsPrincipalExtensions
{
/// <summary>
/// Returns whether the user is authenticated.
/// </summary>
/// <param name="principal">The application user.</param>
public static bool IsAuthenticated(this ClaimsPrincipal principal)
=> principal.Identity.IsAuthenticated;
/// <summary>
/// Returns the value for the first claim of the specified type.
/// </summary>
/// <param name="principal">The application user.</param>
/// <param name="claimType">The claim type whose first value should be returned.</param>
public static string FindFirstValue(this ClaimsPrincipal principal, string claimType)
=> principal.FindFirst(claimType)?.Value;
}
} | djanosik/Moon.Libraries | src/Moon.Security/ClaimsPrincipalExtensions.cs | C# | mit | 845 |
/**
* Enigma Machine GUI
* Coded by Amir El Bawab
* Date: 25 January 2015
* License: MIT License ~ Please read License.txt for more information about the usage of this software
* */
package gui.panels;
import gui.listener.KeyboardListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
public class KeyboardPanel extends JPanel{
private JButton alphaButtons[] = new JButton[26];
private GridBagConstraints gc;
private JPanel boardPanel, textPanel;
private JTextField inputField;
private KeyboardListener keyboardListener;
public KeyboardPanel() {
// Create panels
boardPanel = new JPanel();
textPanel = new JPanel();
// Set Layout
setLayout(new BorderLayout());
boardPanel.setLayout(new GridBagLayout());
// Create output field
inputField = new JTextField(95);
inputField.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
inputField.setEditable(false);
// Create buttons
for(int i=0; i<26; i++){
alphaButtons[i] = new JButton(""+(char)('A'+i), new ImageIcon(getClass().getResource("/gui/images/button.png")));
alphaButtons[i].setBorderPainted(false);
alphaButtons[i].setContentAreaFilled(false);
alphaButtons[i].setFocusPainted(false);
alphaButtons[i].setOpaque(false);
alphaButtons[i].setHorizontalTextPosition(SwingConstants.CENTER);
alphaButtons[i].setForeground(Color.white);
alphaButtons[i].setPreferredSize(new Dimension(50, 50));
alphaButtons[i].setPressedIcon(new ImageIcon(getClass().getResource("/gui/images/button_clicked.png")));
final int currentID = i;
alphaButtons[i].addMouseListener(new MouseListener() {
int lastLetter;
public void mouseReleased(MouseEvent e) {
keyboardListener.releaseAction(this.lastLetter);
}
public void mousePressed(MouseEvent e) {
// Add letter to input text and pass the character only
inputField.setText(inputField.getText() + (char)('A'+currentID));
this.lastLetter = keyboardListener.pressAction((char)('A'+currentID));
}
public void mouseExited(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {}
public void mouseClicked(MouseEvent e) {}
});
}
// Adding border
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
// Add empty border
textPanel.setBorder(BorderFactory.createEmptyBorder(0,0,15,0));
// Default grid configuration
gc = new GridBagConstraints();
gc.fill = GridBagConstraints.NONE;
gc.weightx = 1;
gc.weighty = 0.15;
// Add Keyboard Row 1
String row1 = "QWERTZUIO";
for(int i=0; i<9; i++){
gc.gridx = i*2;
gc.gridy = 0;
boardPanel.add(alphaButtons[row1.charAt(i)-'A'], gc);
}
// Add Keyboard Row 2
String row2 = "ASDFGHJK";
for(int i=0; i<8; i++){
gc.gridx = i*2+1;
gc.gridy = 1;
boardPanel.add(alphaButtons[row2.charAt(i)-'A'], gc);
}
// Add Keyboard Row 3
String row3 = "PYXCVBNML";
for(int i=0; i<9; i++){
gc.gridx = i*2;
gc.gridy = 2;
boardPanel.add(alphaButtons[row3.charAt(i)-'A'], gc);
}
// Add output field
textPanel.add(inputField);
// Change background to dark
setBackground(Color.DARK_GRAY);
boardPanel.setOpaque(false);
textPanel.setOpaque(false);
inputField.setBackground(null);
inputField.setOpaque(false);
inputField.setForeground(Color.WHITE);
// Add panels
add(boardPanel, BorderLayout.CENTER);
add(textPanel, BorderLayout.NORTH);
}
/**
* Set KeyboardListener
* @param keyboardListener
*/
public void setKeyboardListener(KeyboardListener keyboardListener){
this.keyboardListener = keyboardListener;
}
/**
* Get input field
* @return input field
*/
public JTextField getInputField(){
return inputField;
}
}
| amirbawab/Enigma-machine-simulator | gui/panels/KeyboardPanel.java | Java | mit | 4,085 |
---
permalink: /404.html
---
<h1>404</h2>
| mglodack/mglodack.github.io | 404.html | HTML | mit | 42 |
namespace Task03_WordsSet.PatriciaTree
{
using System.Collections.Generic;
using System.Linq;
public class PatriciaSuffixTrie<TValue> : ITrie<TValue>
{
private readonly int m_MinQueryLength;
private readonly PatriciaTrie<TValue> m_InnerTrie;
public PatriciaSuffixTrie(int minQueryLength)
: this(minQueryLength, new PatriciaTrie<TValue>())
{
}
internal PatriciaSuffixTrie(int minQueryLength, PatriciaTrie<TValue> innerTrie)
{
this.m_MinQueryLength = minQueryLength;
this.m_InnerTrie = innerTrie;
}
protected int MinQueryLength
{
get { return this.m_MinQueryLength; }
}
public IEnumerable<TValue> Retrieve(string query)
{
return
this.m_InnerTrie
.Retrieve(query)
.Distinct();
}
public void Add(string key, TValue value)
{
IEnumerable<StringPartition> allSuffixes = GetAllSuffixes(this.MinQueryLength, key);
foreach (StringPartition currentSuffix in allSuffixes)
{
this.m_InnerTrie.Add(currentSuffix, value);
}
}
private static IEnumerable<StringPartition> GetAllSuffixes(int minSuffixLength, string word)
{
for (int i = word.Length - minSuffixLength; i >= 0; i--)
{
yield return new StringPartition(word, i);
}
}
}
} | atanas-georgiev/TelerikAcademy | 12.Data-Structures-and-Algorithms/Homeworks/05. Advanced-Data-Structures/Task03_WordsSet/PatriciaTree/PatriciaSuffixTrie.cs | C# | mit | 1,549 |
<h3 class="ui header">{!controller_name!}</h3>
<div ng-controller="RoomsController">
<table class="ui table">
<thead>
<tr>
<th>{!department_label!}</th>
<th>{!spots_label!}</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in items" bn-log-dom-creation>
<td width="45%"><div contenteditable="true" ng-model="item.department" data-name="department" class="editable">{!item.department!}</div></td>
<td width="45%"><div contenteditable="true" ng-model="item.spots" data-name="spots" class="editable">{!item.spots!}</div></td>
<td width="10%"><a ng-model="item.id" ng-click="remove(item)" class="icon" href="" title="Удалить">✖</a></td>
</tr>
</tbody>
</table>
<div class="ui fluid form segment">
<form ng-submit="submit()" class="rooms">
<div class="two fields">
<div class="field">
<label>{!department_label!}</label>
<input placeholder="Отдел" type="text" name="department" ng-model="room.department" required>
</div>
<div class="field">
<label>{!spots_label!}</label>
<input placeholder="Вместимость" type="number" name="spots" ng-model="room.spots" required>
</div>
</div>
<input class="ui submit button" type="submit" value="Submit" />
</form>
</div>
</div>
| Ins1ne/smyt | office/templates/rooms.html | HTML | mit | 1,583 |
/*
* Copyright (c) Alexander Kammerer 2015.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the MIT License
* which accompanies this distribution.
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.08.18 at 07:48:00 PM CEST
//
package org.eclipse.smarthome.documentation.schemas.thing_description.v1_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.List;
/**
* <p>Java class for supportedBridgeTypeRefs complex type.
* <p/>
* <p>The following schema fragment specifies the expected content contained within this class.
* <p/>
* <pre>
* <complexType name="supportedBridgeTypeRefs">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="bridge-type-ref" type="{http://eclipse.org/smarthome/schemas/thing-description/v1.0.0}bridgeTypeRef" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "supportedBridgeTypeRefs", propOrder = {
"bridgeTypeRef"
})
public class SupportedBridgeTypeRefs {
@XmlElement(name = "bridge-type-ref", required = true)
protected List<BridgeTypeRef> bridgeTypeRef;
/**
* Gets the value of the bridgeTypeRef property.
* <p/>
* <p/>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the bridgeTypeRef property.
* <p/>
* <p/>
* For example, to add a new item, do as follows:
* <pre>
* getBridgeTypeRef().add(newItem);
* </pre>
* <p/>
* <p/>
* <p/>
* Objects of the following type(s) are allowed in the list
* {@link BridgeTypeRef }
*/
public List<BridgeTypeRef> getBridgeTypeRef() {
if (bridgeTypeRef == null) {
bridgeTypeRef = new ArrayList<BridgeTypeRef>();
}
return this.bridgeTypeRef;
}
}
| kummerer94/binding-docu-generator | src/main/java/org/eclipse/smarthome/documentation/schemas/thing_description/v1_0/SupportedBridgeTypeRefs.java | Java | mit | 2,619 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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" />
<title>GEN11</title>
<link rel="stylesheet" type="text/css" href="csound.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="home" href="index.html" title="Manuel de référence canonique de Csound" />
<link rel="up" href="ScoregensTop.html" title="Instructions de partition et routines GEN" />
<link rel="prev" href="GEN10.html" title="GEN10" />
<link rel="next" href="GEN12.html" title="GEN12" />
</head>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">GEN11</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="GEN10.html">Précédent</a> </td>
<th width="60%" align="center">Instructions de partition et routines GEN</th>
<td width="20%" align="right"> <a accesskey="n" href="GEN12.html">Suivant</a></td>
</tr>
</table>
<hr />
</div>
<div class="refentry">
<a id="GEN11"></a>
<div class="titlepage"></div>
<a id="IndexGEN11" class="indexterm"></a>
<div class="refnamediv">
<h2>
<span class="refentrytitle">GEN11</span>
</h2>
<p>GEN11 —
Génère un ensemble additif de partiels cosinus.
</p>
</div>
<div class="refsect1">
<a id="idm47887563368976"></a>
<h2>Description</h2>
<p>
Ce sous-programme génère un ensemble additif de partiels cosinus, à la manière des générateurs de
Csound <a class="link" href="buzz.html" title="buzz"><em class="citetitle">buzz</em></a> et
<a class="link" href="gbuzz.html" title="gbuzz"><em class="citetitle">gbuzz</em></a>.
</p>
</div>
<div class="refsect1">
<a id="idm47887563365664"></a>
<h2>Syntaxe</h2>
<pre class="synopsis"><span class="command"><strong>f</strong></span> # date taille 11 nh [lh] [r]</pre>
</div>
<div class="refsect1">
<a id="idm47887563363632"></a>
<h2>Initialisation</h2>
<p>
<span class="emphasis"><em>taille</em></span> -- nombre de points dans la table. Doit être une puissance de 2 ou une
puissance-de-2 plus 1 (voir l'<a class="link" href="f.html" title="Instruction f (ou instruction de table de fonction)"><em class="citetitle">instruction f</em></a>).
</p>
<p>
<span class="emphasis"><em>nh</em></span> -- nombre d'harmoniques demandés. Doit être positif.
</p>
<p>
<span class="emphasis"><em>lh</em></span>(optional) -- harmonique présent le plus bas. Peut être positif, nul ou négatif.
L'ensemble d'harmoniques peut démarrer à n'importe quel numéro d'harmonique et progresse vers le haut ;
si <span class="emphasis"><em>lh</em></span> est négatif, tous les harmoniques en dessous de zéro se réfléchiront autour
de zéro pour produire des harmoniques positifs sans changement de phase (car le cosinus est une fonction
paire), et s'ajouteront de façon constructive aux harmoniques positifs de l'ensemble. La valeur par
défaut est 1.
</p>
<p>
<span class="emphasis"><em>r</em></span>(facultatif) -- multiplicateur dans une série de coefficients d'amplitude. C'est
une séries de puissances : si le <span class="emphasis"><em>lh</em></span> ème harmonique a un coefficient d'amplitude
de A le (<span class="emphasis"><em>lh</em></span> + <span class="emphasis"><em>n</em></span>)ème harmonique aura un coefficient de A * r<sup>n</sup>,
c'est-à-dire que les valeurs d'amplitudes suivent une courbe exponentielle. <span class="emphasis"><em>r</em></span> peut
être positif, nul ou négatif, et n'est pas restreint à des entiers. La valeur par défaut est 1.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note: Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25">
<img alt="[Note]" src="images/note.png" />
</td>
<th align="left">Note</th>
</tr>
<tr>
<td align="left" valign="top">
<p>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Ce sous-programme est une version invariante dans le temps des générateurs de Csound
<a class="link" href="buzz.html" title="buzz"><em class="citetitle">buzz</em></a> et
<a class="link" href="gbuzz.html" title="gbuzz"><em class="citetitle">gbuzz</em></a>, et il est similairement utile
comme source sonore complexe pour la synthèse soustractive. Si <span class="emphasis"><em>lh</em></span> et
<span class="emphasis"><em>r</em></span> sont utilisés, il agit comme <span class="emphasis"><em>gbuzz</em></span> ; si les
deux sont absents ou égaux à 1, il se réduit au générateur plus simple
<span class="emphasis"><em>buzz</em></span> (c'est-à-dire <span class="emphasis"><em>nh</em></span> harmoniques d'amplitude
égale commençant avec le fondamental).
</p>
</li>
<li class="listitem">
<p>
Lire la forme d'onde stockée avec un oscillateur est plus efficace que d'utiliser les unités
dynamiques buzz. Cependant, le contenu spectral est invariant et il faut faire attention à
ce que les harmoniques les plus hauts ne dépassent pas la fréquence de Nyquist pour éviter
les repliements.
</p>
</li>
</ul>
</div>
<p>
</p>
</td>
</tr>
</table>
</div>
</div>
<div class="refsect1">
<a id="idm47887563345248"></a>
<h2>Exemples</h2>
<p>
Voici un exemple de la routine GEN11. Il utilise le fichier
<a class="ulink" href="examples/gen11.csd" target="_top"><em class="citetitle">gen11.csd</em></a>.
</p>
<div class="example">
<a id="idm47887563343376"></a>
<p class="title">
<strong>Exemple 1139. Un exemple de la routine GEN11.</strong>
</p>
<div class="example-contents">
<div class="refsect1">
<a id="idm47887492711264"></a>
<pre class="programlisting">
<span class="csdtag"><CsoundSynthesizer></span>
<span class="csdtag"><CsOptions></span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o gen11.wav -W ;;; for file output any platform</span>
<span class="csdtag"></CsOptions></span>
<span class="csdtag"><CsInstruments></span>
<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span> <span class="op">=</span> 1
<span class="oblock">instr</span> 1
ifn <span class="op">=</span> p4
asig <span class="opc">oscil</span> .8, 220, ifn
<span class="opc">outs</span> asig,asig
<span class="oblock">endin</span>
<span class="csdtag"></CsInstruments></span>
<span class="csdtag"><CsScore></span>
<span class="stamnt">f</span> 1 0 16384 11 1 1 <span class="comment">;number of harmonics = 1</span>
<span class="stamnt">f</span> 2 0 16384 11 10 1 .7 <span class="comment">;number of harmonics = 10</span>
<span class="stamnt">f</span> 3 0 16384 11 10 5 2 <span class="comment">;number of harmonics = 10, 5th harmonic is amplified 2 times</span>
<span class="stamnt">i</span> 1 0 2 1
<span class="stamnt">i</span> 1 + 2 2
<span class="stamnt">i</span> 1 + 2 3
<span class="stamnt">e</span>
<span class="csdtag"></CsScore></span>
<span class="csdtag"></CsoundSynthesizer></span>
</pre>
</div>
</div>
</div>
<p><br class="example-break" />
<span class="phrase">Voici les diagrammes des formes d'onde des routines GEN11 utilisées
dans l'exemple :</span>
</p>
<div class="mediaobject">
<img src="images/gen11_1.png" alt="f 1 0 16384 11 1 1" />
<div class="caption">
<p>f 1 0 16384 11 1 1</p>
</div>
</div>
<p>
</p>
<div class="mediaobject">
<img src="images/gen11_2.png" alt="f 2 0 16384 11 10 1 .7" />
<div class="caption">
<p>f 2 0 16384 11 10 1 .7</p>
</div>
</div>
<p>
</p>
<div class="mediaobject">
<img src="images/gen11_3.png" alt="f 3 0 16384 11 10 5 2" />
<div class="caption">
<p>f 3 0 16384 11 10 5 2</p>
</div>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a id="idm47887563331200"></a>
<h2>Voir aussi</h2>
<p>
<a class="link" href="GEN10.html" title="GEN10"><em class="citetitle">GEN10</em></a>
</p>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="GEN10.html">Précédent</a> </td>
<td width="20%" align="center">
<a accesskey="u" href="ScoregensTop.html">Niveau supérieur</a>
</td>
<td width="40%" align="right"> <a accesskey="n" href="GEN12.html">Suivant</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">GEN10 </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Sommaire</a>
</td>
<td width="40%" align="right" valign="top"> GEN12</td>
</tr>
</table>
</div>
</body>
</html>
| ketchupok/csound.github.io | docs/manual-fr/GEN11.html | HTML | mit | 10,633 |
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
*
*/
package com.sleepycat.je.log.entry;
import java.nio.ByteBuffer;
import com.sleepycat.je.log.BasicVersionedWriteLoggable;
import com.sleepycat.je.log.Loggable;
import com.sleepycat.je.log.VersionedWriteLoggable;
/**
* DbOperationType is a persistent enum used in NameLNLogEntries. It supports
* replication of database operations by documenting the type of api operation
* which instigated the logging of a NameLN.
*/
public enum DbOperationType implements VersionedWriteLoggable {
NONE((byte) 0),
CREATE((byte) 1),
REMOVE((byte) 2),
TRUNCATE((byte) 3),
RENAME((byte) 4),
UPDATE_CONFIG((byte) 5);
/**
* The log version of the most recent format change for this loggable.
*
* @see #getLastFormatChange
*/
public static final int LAST_FORMAT_CHANGE = 8;
private byte value;
private DbOperationType(byte value) {
this.value = value;
}
public static DbOperationType readTypeFromLog(final ByteBuffer entryBuffer,
@SuppressWarnings("unused")
int entryVersion) {
byte opVal = entryBuffer.get();
switch (opVal) {
case 1:
return CREATE;
case 2:
return REMOVE;
case 3:
return TRUNCATE;
case 4:
return RENAME;
case 5:
return UPDATE_CONFIG;
case 0:
default:
return NONE;
}
}
/** @see Loggable#getLogSize */
@Override
public int getLogSize() {
return 1;
}
/** @see VersionedWriteLoggable#getLastFormatChange */
@Override
public int getLastFormatChange() {
return LAST_FORMAT_CHANGE;
}
/** @see VersionedWriteLoggable#getLogSize(int) */
@Override
public int getLogSize(final int logVersion) {
return BasicVersionedWriteLoggable.getLogSize(this, logVersion);
}
/** @see VersionedWriteLoggable#writeToLog(ByteBuffer, int) */
@Override
public void writeToLog(final ByteBuffer logBuffer, final int logVersion) {
BasicVersionedWriteLoggable.writeToLog(this, logBuffer, logVersion);
}
/** @see Loggable#writeToLog */
@Override
public void writeToLog(ByteBuffer logBuffer) {
logBuffer.put(value);
}
/** @see Loggable#readFromLog */
@Override
public void readFromLog(ByteBuffer itemBuffer, int entryVersion) {
value = itemBuffer.get();
}
/** @see Loggable#dumpLog */
@Override
public void dumpLog(StringBuilder sb, boolean verbose) {
sb.append("<DbOp val=\"").append(this).append("\"/>");
}
/** @see Loggable#getTransactionId */
@Override
public long getTransactionId() {
return 0;
}
/** @see Loggable#logicalEquals */
@Override
public boolean logicalEquals(Loggable other) {
if (!(other instanceof DbOperationType))
return false;
return value == ((DbOperationType) other).value;
}
/**
* Return true if this database operation type needs to write
* DatabaseConfig.
*/
public static boolean isWriteConfigType(DbOperationType opType) {
return (opType == CREATE || opType == UPDATE_CONFIG);
}
}
| prat0318/dbms | mini_dbms/je-5.0.103/src/com/sleepycat/je/log/entry/DbOperationType.java | Java | mit | 3,452 |
# test-seeds
Different seed apps for scaffolding out different testing workflows
| mehranhatami/test-seeds | README.md | Markdown | mit | 81 |
//
// ImportantClass.h
// DIDemo
//
// Created by Robert Walker on 3/12/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface ImportantClass : NSObject {
id foo;
}
- (id)initWithFoo:(id)aFoo;
- (void)doReallyImportantStuff;
@end
| robertwalker/DIDemo | ImportantClass.h | C | mit | 287 |
//
// XTTabBar.h
// XTPageControl
//
// Created by imchenglibin on 16/1/26.
// Copyright © 2016年 xt. All rights reserved.
// https://github.com/imchenglibin/XTPageControl
//
#import <UIKit/UIKit.h>
#import "XTTabBarStyle.h"
#import "XTTabBarScrollView.h"
@interface XTTabBar : UIView
- (instancetype)initWithTitles:(NSArray<NSString*>*)titles andTabBarItemWidths:(NSArray<NSNumber*>*) tabBarItemWidths andStyle:(XTTabBarStyle)style;
- (void)moveToIndex:(NSInteger)index animation:(BOOL)animation;
@property (strong, nonatomic) UIView *leftItemView;
@property (strong, nonatomic) UIView *rightItemView;
@property (strong, nonatomic) UIColor *titleColorNormal;
@property (strong, nonatomic) UIColor *titleColorSelected;
@property (strong, nonatomic) UIColor *cursorColor;
@property (assign, nonatomic) BOOL forceLeftAligment;
@property (weak, nonatomic) id<XTTabBarScrollViewDelegate> tabBarDelegate;
@end
| imchenglibin/XTPageControl | XTPageControl/XTTabBar.h | C | mit | 918 |
MIME-Version: 1.0
Server: CERN/3.0
Date: Tuesday, 07-Jan-97 15:19:36 GMT
Content-Type: text/html
Content-Length: 1223
Last-Modified: Saturday, 28-Sep-96 22:12:11 GMT
<HTML>
<HEAD>
<TITLE>Tenure's possible demise at two U. S. universities</TITLE>
</HEAD><BODY bgcolor="ffffff">
<BODY>
<BR>
<!WA0><IMG ALIGN=LEFT SRC="http://www.utexas.edu/cofa/hag/images/2032s.80.gif">
<h3>Tenure's possible demise at some U. S. universities</h3><P>
<LI><!WA1><a href="http://www.cs.utexas.edu/users/boyer/tenure/tenure-at-arizona.html">
Arizona</a>
<LI><!WA2><a href="http://www.cs.utexas.edu/users/boyer/tenure/tenure-at-florida.html">
Florida</a>
<LI><!WA3><a href="http://www.cs.utexas.edu/users/boyer/tenure/tenure-at-um.html">
Minnesota</a>
<LI><!WA4><a href="http://www.cs.utexas.edu/users/boyer/tenure/tenure-at-north-carolina.html">
North Carolina</a>
<LI><!WA5><a href="http://www.cs.utexas.edu/users/boyer/tenure/tenure-at-ut.html">
Texas</a>
<LI><!WA6><a href="http://www.cs.utexas.edu/users/boyer/tenure/tenure-at-virginia.html">
Virginia</a>
<h3>Other information</h3>
<LI><!WA7><a href="http://www.ahc.umn.edu/td/">An excellent
web page on the subject</a>
<LI><!WA8><a href="http://www.igc.apc.org/aaup/">AAUP Home Page</a>
<LI><!WA9><a href="http://fbox.vt.edu:10021/faculty/aaup/aaupstat.html">
AAUP Statement on Postprobationary Faculty Review</a>
<LI> Suggestion for finding other info: at <!WA10><a href="http://altavista.digital.com/">Altavista</a> try a search
for: post tenure review
<LI><!WA11><a href="http://www.math.purdue.edu/~cruz/tenure.html">Why God
never received tenure</a>
<br>
<br>
<p>This web page is mainly the work of <!WA12><a href="http://www.cs.utexas.edu/users/boyer">Robert
S. Boyer</a>. | ML-SWAT/Web2KnowledgeBase | webkb/other/texas/http:^^www.cs.utexas.edu^users^boyer^tenure^index.html | HTML | mit | 1,742 |
(function () {
'use strict';
angular.module('civic.add')
.config(CommunityMainConfig)
.controller('CommunityMainController', CommunityMainController);
// @ngInject
function CommunityMainConfig($stateProvider,
$resourceProvider) {
// TODO: toggle trailing-slash trim after civic-server configured to accept either
$resourceProvider.defaults.stripTrailingSlashes = false;
$stateProvider
.state('community.main', {
url: '/main',
templateUrl: 'app/views/community/main/communityMain.tpl.html',
resolve: {
Users: 'Users',
Community: 'Community'
},
controller: 'CommunityMainController',
controllerAs: 'vm',
data: {
navMode: 'sub',
title: 'Community'
}
});
}
// @ngInject
function CommunityMainController($scope,
_,
Security,
Community,
Users) {
var vm = this;
vm.isEditor = Security.isEditor();
vm.isAdmin = Security.isAdmin();
vm.isAuthenticated = Security.isAuthenticated();
vm.leaderboards = {};
vm.users = [];
Community.getLeaderboards()
.then(function(response) {
angular.copy(response, vm.leaderboards);
});
// setup initial paging var and data update
vm.page = 1;
vm.count = 24;
vm.totalItems = Number();
vm.totalPages = Number();
$scope.$watch(function(){ return vm.totalItems; }, function() {
vm.totalPages = Math.ceil(vm.totalItems / vm.count);
});
vm.model = {};
var updateData = _.debounce(function () {
var filters = [{
field: 'display_name',
term: vm.model.filter
}];
var sorting = [{
field: vm.model.sort_by,
direction: vm.model.sort_order
}];
var limit = vm.model.limit;
fetchUsers(vm.count, vm.page, sorting, filters, limit, vm.model.role, vm.model.area_of_expertise)
.then(function(data){
angular.copy(data.result, vm.users);
vm.totalItems = data.total;
});
}, 250);
vm.formFields = [
{
key: 'filter',
type: 'input',
className: 'col-xs-2',
templateOptions: {
label: 'Find User',
required: false
},
watcher: {
listener: function() {
updateData();
}
}
},
{
key: 'role',
type: 'select',
className: 'col-xs-2',
defaultValue: undefined,
templateOptions: {
label: 'Role',
required: false,
options: [
{ value: undefined, name: '--' },
{ value: 'curator', name: 'Curator'},
{ value: 'editor', name: 'Editor' },
{ value: 'admin', name: 'Administrator' }
]
},
watcher: {
listener: function() {
updateData();
}
}
},
{
key: 'area_of_expertise',
type: 'select',
className: 'col-xs-2',
defaultValue: undefined,
templateOptions: {
label: 'Area of Expertise',
required: false,
options: [
{ value: undefined, name: '--' },
{ value: 'Patient Advocate', name: 'Patient Advocate'},
{ value: 'Clinical Scientist', name: 'Clinical Scientist' },
{ value: 'Research Scientist', name: 'Research Scientist' }
]
},
watcher: {
listener: function() {
updateData();
}
}
},
{
key: 'sort_by',
type: 'select',
className: 'col-xs-2',
defaultValue: 'most_active',
templateOptions: {
label: 'Sort By',
required: false,
options: [
// last_seen, recent_activity, join_date, most_active
{name: 'Last seen', value: 'last_seen', sort_order: 'desc'},
{name: 'Recent activity', value: 'recent_activity', sort_order: 'desc'},
{name: 'Join date', value: 'join_date', sort_order: 'asc'},
{name: 'Most active', value: 'most_active', sort_order: 'desc'}
]
},
watcher: {
listener: function(field, newValue) {
if(!_.isUndefined(newValue)) {
vm.model.sort_order = _.find(field.templateOptions.options, {value: newValue}).sort_order;
}
updateData();
}
}
},
{
key: 'sort_order',
type: 'select',
className: 'col-xs-2',
defaultValue: 'desc',
templateOptions: {
label: 'Sort Order',
required: false,
options: [
{ name: 'Ascending', value: 'asc' },
{ name: 'Descending', value: 'desc' }
]
},
watcher: {
listener: function() {
updateData();
}
}
},
{
key: 'limit',
type: 'select',
className: 'col-xs-2',
defaultValue: 'this_month',
templateOptions: {
label: 'Limit To',
required: false,
options: [
// this_week, this_month, this_year, all_time
{name: 'All time', value: 'all_time'},
{name: 'This week', value: 'this_week'},
{name: 'This month', value: 'this_month'},
{name: 'This year', value: 'this_year'}
]
},
watcher: {
listener: function() {
updateData();
}
}
},
];
updateData();
vm.pageChanged = function() {
updateData();
};
function fetchUsers(count, page, sorting, filters, limit, role, area_of_expertise) {
var request;
request = {
count: count,
page: page
};
if(role) {
request['filter[role]'] = role;
}
if(area_of_expertise) {
request['filter[area_of_expertise]'] = area_of_expertise;
}
request['limit[' + sorting[0].field + ']'] = limit;
if (filters.length > 0) {
_.each(filters, function(filter) {
request['filter[' + filter.field + ']'] = filter.term;
});
}
if (sorting.length > 0) {
_.each(sorting, function(sort) {
request['sorting[' + sort.field + ']'] = sort.direction;
});
}
return Users.query(request);
}
}
})();
| yanyangfeng/civic-client | src/app/views/community/main/communityMain.js | JavaScript | mit | 6,571 |
<div class="body-wrap">
<div class="top-tools">
<a class="inner-link" href="#Ext.tree.MultiSelectionModel-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
<a class="inner-link" href="#Ext.tree.MultiSelectionModel-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
<a class="inner-link" href="#Ext.tree.MultiSelectionModel-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
<a class="inner-link" href="#Ext.tree.MultiSelectionModel-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
<a class="bookmark" href="../docs/?class=Ext.tree.MultiSelectionModel"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
</div>
<div class="inheritance res-block">
<pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
<img src="resources/elbow-end.gif"/>MultiSelectionModel</pre></div>
<h1>Class Ext.tree.MultiSelectionModel</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td class="hd-info">Ext.tree</td></tr>
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/TreeSelectionModel.js" target="_blank">TreeSelectionModel.js</a></td></tr>
<tr><td class="label">Class:</td><td class="hd-info">MultiSelectionModel</td></tr>
<tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
</table>
<div class="description">
Multi selection for a TreePanel. </div>
<div class="hr"></div>
<a id="Ext.tree.MultiSelectionModel-configs"></a>
<h2>Config Options</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Config Options</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="config-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-listeners"></a>
<b>listeners</b> : Object <div class="mdesc">
<div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
<div class="long">
(optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
</tr>
</table>
<a id="Ext.tree.MultiSelectionModel-props"></a>
<h2>Public Properties</h2>
<div class="no-members">This class has no public properties.</div> <a id="Ext.tree.MultiSelectionModel-methods"></a>
<h2>Public Methods</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Method</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-addEvents"></a>
<b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
<div class="short">Used to define events on this Observable</div>
<div class="long">
Used to define events on this Observable <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-addListener"></a>
<b>addListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
<div class="short">Appends an event handler to this component</div>
<div class="long">
Appends an event handler to this component <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
properties. This may contain any of the following properties:<ul>
<li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
<li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
<li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
<li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
by the specified number of milliseconds. If the event fires again within that time, the original
handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
</ul><br>
<p>
<b>Combining Options</b><br>
Using the options argument, it is possible to combine different types of listeners:<br>
<br>
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
single: true,
delay: 100,
forumId: 4
});</code></pre>
<p>
<b>Attaching multiple handlers in 1 call</b><br>
The method also allows for a single argument to be passed which is a config object containing properties
which specify multiple handlers.
<p>
<pre><code>foo.on({
<em>'click'</em> : {
fn: <b>this</b>.onClick,
scope: <b>this</b>,
delay: 100
},
<em>'mouseover'</em> : {
fn: <b>this</b>.onMouseOver,
scope: <b>this</b>
},
<em>'mouseout'</em> : {
fn: <b>this</b>.onMouseOut,
scope: <b>this</b>
}
});</code></pre>
<p>
Or a shorthand syntax:<br>
<pre><code>foo.on({
<em>'click'</em> : <b>this</b>.onClick,
<em>'mouseover'</em> : <b>this</b>.onMouseOver,
<em>'mouseout'</em> : <b>this</b>.onMouseOut,
scope: <b>this</b>
});</code></pre></div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-clearSelections"></a>
<b>clearSelections</b>() : void <div class="mdesc">
<div class="short">Clear all selections</div>
<div class="long">
Clear all selections <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MultiSelectionModel</td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-fireEvent"></a>
<b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
<div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
<div class="long">
Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-getSelectedNodes"></a>
<b>getSelectedNodes</b>() : Array <div class="mdesc">
<div class="short">Returns an array of the selected nodes</div>
<div class="long">
Returns an array of the selected nodes <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Array</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MultiSelectionModel</td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-hasListener"></a>
<b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
<div class="short">Checks to see if this object has any listeners for a specified event</div>
<div class="long">
Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-isSelected"></a>
<b>isSelected</b>( <code>TreeNode node</code> ) : Boolean <div class="mdesc">
<div class="short">Returns true if the node is selected</div>
<div class="long">
Returns true if the node is selected <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>node</code> : TreeNode<div class="sub-desc">The node to check</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MultiSelectionModel</td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-on"></a>
<b>on</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
<div class="short">Appends an event handler to this element (shorthand for addListener)</div>
<div class="long">
Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-purgeListeners"></a>
<b>purgeListeners</b>() : void <div class="mdesc">
<div class="short">Removes all listeners for this object</div>
<div class="long">
Removes all listeners for this object <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-relayEvents"></a>
<b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc">
<div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
<div class="long">
Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-removeListener"></a>
<b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
<div class="short">Removes a listener</div>
<div class="long">
Removes a listener <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-resumeEvents"></a>
<b>resumeEvents</b>() : void <div class="mdesc">
<div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
<div class="long">
Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>) <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-select"></a>
<b>select</b>( <code>TreeNode node</code>, <span class="optional" title="Optional">[<code>EventObject e</code>]</span>, <code>Boolean keepExisting</code> ) : TreeNode <div class="mdesc">
<div class="short">Select a node.</div>
<div class="long">
Select a node. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>node</code> : TreeNode<div class="sub-desc">The node to select</div></li><li><code>e</code> : EventObject<div class="sub-desc">(optional) An event associated with the selection</div></li><li><code>keepExisting</code> : Boolean<div class="sub-desc">True to retain existing selections</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>TreeNode</code><div class="sub-desc">The selected node</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MultiSelectionModel</td>
</tr>
<tr class="method-row inherited alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-suspendEvents"></a>
<b>suspendEvents</b>() : void <div class="mdesc">
<div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
<div class="long">
Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>) <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
</tr>
<tr class="method-row inherited expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-un"></a>
<b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
<div class="short">Removes a listener (shorthand for removeListener)</div>
<div class="long">
Removes a listener (shorthand for removeListener) <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-unselect"></a>
<b>unselect</b>( <code>TreeNode node</code> ) : void <div class="mdesc">
<div class="short">Deselect a node.</div>
<div class="long">
Deselect a node. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>node</code> : TreeNode<div class="sub-desc">The node to unselect</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>void</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">MultiSelectionModel</td>
</tr>
</table>
<a id="Ext.tree.MultiSelectionModel-events"></a>
<h2>Public Events</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Event</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="event-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.tree.MultiSelectionModel-selectionchange"></a>
<b>selectionchange</b> : ( <code>MultiSelectionModel this</code>, <code>Array nodes</code> ) <div class="mdesc">
<div class="short">Fires when the selected nodes change</div>
<div class="long">
Fires when the selected nodes change <div class="mdetail-params">
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
<ul><li><code>this</code> : MultiSelectionModel<div class="sub-desc"></div></li><li><code>nodes</code> : Array<div class="sub-desc">Array of the selected nodes</div></li> </ul>
</div>
</div>
</div>
</td>
<td class="msource">MultiSelectionModel</td>
</tr>
</table>
</div> | stexas/DBAdmin | ext/docs/output/Ext.tree.MultiSelectionModel.html | HTML | mit | 26,250 |
from jinja2 import Template
from praw.models import Comment, Message
import bot_logger
import crypto
import lang
import models
import utils
def register_user(msg):
user = models.User(msg.author.name)
if not user.is_registered():
user.get_new_address()
if user.address:
content_reply = Template(lang.message_register_success + lang.message_footer).render(
username=user.username,
address=user.address)
tittle_reply = 'you are registered'
user.register()
models.HistoryStorage.add_to_history(msg.author.name, "", "", "", "register")
# create a backup of wallet
crypto.backup_wallet()
else:
bot_logger.logger.warning('Error during register !')
else:
bot_logger.logger.info('%s are already registered ' % user.username)
# pending_tips is balance of tip send to unregistered users
pending_tips = user.get_balance_pending_tip()
unconfirmed_balance = user.get_balance_unconfirmed()
spendable_balance = user.get_balance()
bot_logger.logger.info('user %s spendable_balance = %s' % (user.username, spendable_balance))
unconfirmed_value_usd = utils.get_coin_value(unconfirmed_balance)
spendable_value_usd = utils.get_coin_value(spendable_balance)
pending_tips_value_usd = utils.get_coin_value(pending_tips)
content_reply = Template(
lang.message_already_registered + lang.message_account_details + lang.message_footer).render(
username=msg.author.name,
address=user.address,
spendable_balance=str(spendable_balance),
spendable_value_usd=str(spendable_value_usd),
unconfirmed_balance=str(unconfirmed_balance),
unconfirmed_value_usd=str(unconfirmed_value_usd),
pending_tips=str(pending_tips),
pending_tips_value_usd=str(pending_tips_value_usd)
)
tittle_reply = 'you are already registered'
# send PM so just reply
if type(msg) is Message:
msg.reply(content_reply)
# we have just comment so send info in PM
if type(msg) is Comment:
user.send_private_message(tittle_reply, content_reply)
| just-an-dev/sodogetip | commands/register.py | Python | mit | 2,272 |
from __future__ import unicode_literals
from django.apps import AppConfig
class FileGenerationConfig(AppConfig):
name = 'json_fields'
| craigsander/evergreen | evergreen/utils/json_fields/apps.py | Python | mit | 141 |
<?php
use RedisPriorityQueue as RPQ;
// Requires
require_once(__DIR__.'/../utils/redis_instance.php');
require_once(__DIR__.'/../utils/const.php');
require_once(__DIR__.'/../lib/Lua.php');
require_once(__DIR__.'/../lib/Queue.php');
// Create Queue instance with Redis connection
$q = new RPQ\Queue($r->getConnection());
// Set queue name
$q->setQueueName(QUEUE_NAME);
// Run
echo "* pop (one):\n";
$res = $q->popOne();
echo $res."\n";
// Run
echo "* pop (one, ascending):\n";
$res = $q->popOne('asc');
echo $res."\n";
// Run
echo "* pop (many):\n";
$res = $q->popMany('desc', MULTIPLE_ITEMS_COUNT);
echo json_encode($res)."\n";
| gabfl/redis-priority-queue | clients/php/tests/pop.php | PHP | mit | 634 |
/**
*
* TextInput
*
*/
import React from 'react';
import styles from './styles.css';
import classNames from 'classnames';
class TextInput extends React.Component { // eslint-disable-line react/prefer-stateless-function
value() {
return this.field.value;
}
render() {
const { errorText } = this.props;
const fieldError = errorText ? (
<div
className={styles.errorMessage}
>
{errorText}
</div>
) : null;
return (
<div>
<input
className={classNames(styles.input, this.props.className, { [styles.inputError]: this.errorText})}
placeholder= {this.props.placeholder}
ref={(f) => { this.field = f;}}
type="text"
/>
{fieldError}
</div>
);
}
}
TextInput.propTypes = {
errorText: React.PropTypes.string,
placeholder: React.PropTypes.string,
className: React.PropTypes.string,
}
export default TextInput;
| kathydoody/scalable-react-demo | app/components/TextInput/index.js | JavaScript | mit | 955 |
#include <iostream>
#include <vector>
#include "abstractnode.h"
#include "datanode.h"
#include "inputnode.h"
#include "loopnode.h"
#include "outputnode.h"
#include "parser.h"
#include "pointernode.h"
#include "programnode.h"
#include "tokenstream.h"
Parser::Parser(const char* file_name) :
file_name_(file_name),
token_stream_(new TokenStream(file_name))
{}
const int Parser::SumAdjacentOperators(const char start_op, const char increment_op, const char decrement_op)
{
int total_diff;
if (start_op == increment_op) {
total_diff = 1;
} else if (start_op == decrement_op) {
total_diff = -1;
} else {
return 0;
}
// only peek, b/c if it's not a character we care about it should be left
// to the main parsing routine
char next = token_stream_->Peek();
while (next == increment_op || next == decrement_op) {
total_diff += (next == increment_op ? 1 : -1);
token_stream_->Get();
next = token_stream_->Peek();
}
return total_diff;
}
// Parses the program. Note this allocates the tree, so you'll need to delete this pointer.
const ProgramNode* Parser::Parse(bool& program_requires_input)
{
program_requires_input = false;
// check that file opened OK
if (!token_stream_->IsOpen()) {
std::cout << "Failed to open " << file_name_ << ". Make sure the file exists and that the path is correct." << std::endl;
return nullptr;
}
// create root node
ProgramNode* root = new ProgramNode();
// create node stack, for loops
std::vector<AbstractNode*> parentStack;
parentStack.push_back(root);
// begin reading program
char c = token_stream_->Get();
// loop until the read fails
while (token_stream_->Good()) {
// switch on input character
switch (c) {
case '>':
case '<':
new PointerNode(parentStack.back(), SumAdjacentOperators(c, '>', '<'));
break;
case '+':
case '-':
new DataNode(parentStack.back(), SumAdjacentOperators(c, '+', '-'), false);
break;
case '.':
new OutputNode(parentStack.back());
break;
case ',':
new InputNode(parentStack.back());
program_requires_input = true;
break;
case '[':
{
LoopNode* loop = new LoopNode(parentStack.back());
parentStack.push_back(loop);
}
break;
case ']':
parentStack.pop_back();
// make sure we didn't pop root, since that indicates a mismatched bracket
// if we did, bail out
if (parentStack.size() == 0) {
std::cout << "Unexpected ] encountered! No matching [ to close." << std::endl;
delete root;
return nullptr;
}
break;
default:
// do nothing on unknown character
break;
}
c = token_stream_->Get();
}
return root;
}
Parser::~Parser(void)
{
delete token_stream_;
}
| jon-lundy/brainfpp | parser.cpp | C++ | mit | 2,672 |
/**
* \file
*
* \brief AVR XMEGA C42048A LCD component Example
*
* Copyright (c) 2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel microcontroller product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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.
*
* \asf_license_stop
*
*/
/**
* \mainpage
*
* \section intro Introduction
* This simple example shows how to use the \ref c42048a_group to write characters,
* set or clear icons on LCD glass.
*
* \section files Main files:
* - c42048a.c LCD component driver implementation
* - c42048a.h LCD configuration of LCD targeted
* - lcd.h LCD XMEGA Controller driver definitions
* - lcd.c LCD XMEGA Controller driver implementation
* - lcd.h LCD XMEGA Controller driver definitions
* - lcd_c42048a_example.c example application
* - conf_example.h: configuration of the example
*
* \section driverinfo LCD Component Driver
* The YMMC42048A LCD component driver can be found \ref c42048a_group "here".
*
* \section deviceinfo Device Info
* All AVR XMEGA devices with an tc can be used.
*
* \section exampledescription Description of the example
*
* The example configures the LCD Controller in a mode defined by the LCD glass
* board connections and the technical characteristics of the LCD component
* used. It used the following LCD controller features:
* - the LCD interrupt,
* - the hardware blinking,
* - the digit hardware encoder,
* - the LCD contrast control.
*
* The LCD is setup to use the 32.768 kHz from ULP and generates LCD frames at
* 64 Hz using a low power waveform to reduce toggle activity and hence power
* consumption. To show the LCD controller capability to run in power-save mode,
* this mode is applied when it is possible.
*
* \section compinfo Compilation Info
* This software was written for the GNU GCC and IAR for AVR.
* Other compilers may or may not work.
*
* \section contactinfo Contact Information
* For further information, visit
* <A href="http://www.atmel.com/">Atmel</A>.\n
*/
/**
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
*/
#include <compiler.h>
#include <board.h>
#include <conf_example.h>
#include <pmic.h>
#include <sleepmgr.h>
#include <string.h>
#include <sysclk.h>
#include <gpio.h>
#include <c42048a.h>
int main(void)
{
uint8_t lcd_text[] = "XmegaB1";
uint16_t i;
sysclk_init();
pmic_init();
sleepmgr_init();
board_init();
c42048a_init();
c42048a_set_contrast(60);
c42048a_blinkrate_init(LCD_BLINKRATE_1Hz_gc);
// Alphanumeric
c42048a_set_text(lcd_text);
// Numeric
c42048a_set_numeric_dec(1245);
// All pixels "on" blinking
c42048a_set_blink_screen();
c42048a_wait_int_period(16);
c42048a_clear_blink_screen();
// AVR icon blinking alone
c42048a_blink_pixel(ICON_AVR);
c42048a_wait_int_period(16);
// AVR icon on
c42048a_set_pixel(ICON_AVR);
// USB icon blinking
c42048a_blink_pixel(ICON_USB);
// AM is not part of blinking icons
// AM will be ON only
c42048a_blink_pixel(ICON_AM);
// Display a progress bar graph value
for(i=1; i<256; i+=16) {
c42048a_bar_graph((uint8_t)i);
c42048a_wait_int_period(1);
}
c42048a_wait_int_period(4);
// Blink entire screen 8 times
c42048a_set_blink_screen();
c42048a_wait_int_period(16);
// Unblink all the screen
c42048a_clear_blink_screen();
while(true) {
sleepmgr_enter_sleep();
}
}
| femtoio/femto-usb-blink-example | blinky/blinky/asf-3.21.0/xmega/components/display/c42048a/example/lcd_c42048a_example.c | C | mit | 4,863 |
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("Telehash.Android.Resource", IsApplication=false)]
namespace Telehash.Android
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public partial class Attribute
{
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class String
{
// aapt resource value: 0x7f020001
public static int ApplicationName = 2130837505;
// aapt resource value: 0x7f020000
public static int Hello = 2130837504;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
}
}
#pragma warning restore 1591
| tecmobo/telehash.net | Telehash.Android/Resources/Resource.Designer.cs | C# | mit | 1,355 |
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="Hugo 0.53 with theme Tranquilpeak 0.4.3-BETA">
<title>Sf</title>
<meta name="author" content="Ítalo Cegatta">
<meta name="keywords" content="">
<link rel="icon" href="https://italocegatta.github.io/favicon.png">
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://italocegatta.github.io/tags/sf/index.xml">
<meta name="description" content="R, Floresta e Data Science">
<meta property="og:description" content="R, Floresta e Data Science">
<meta property="og:type" content="blog">
<meta property="og:title" content="Sf">
<meta property="og:url" content="/tags/sf/">
<meta property="og:site_name" content="Italo Cegatta">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Italo Cegatta">
<meta name="twitter:description" content="R, Floresta e Data Science">
<meta property="og:image" content="http://i.imgur.com/9MOS3vs.png">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.min.css" integrity="sha256-vuXZ9LGmmwtjqFX1F+EKin1ThZMub58gKULUyf0qECk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/helpers/jquery.fancybox-thumbs.min.css" integrity="sha256-SEa4XYAHihTcEP1f5gARTB2K26Uk8PsndQYHQC1f4jU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://italocegatta.github.io/css/style-jsjn0006wyhpyzivf6yceb31gvpjatbcs3qzjvlumobfnugccvobqwxnnaj8.min.css" />
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-77144482-1', 'auto');
ga('send', 'pageview');
}
</script>
</head>
<body>
<div id="blog">
<header id="header" data-behavior="2">
<i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i>
<div class="header-title">
<a class="header-title-link" href="https://italocegatta.github.io/">Italo Cegatta</a>
</div>
<a class="header-right-picture "
href="https://italocegatta.github.io/#about">
<img class="header-picture" src="http://i.imgur.com/9MOS3vs.png" alt="Foto do autor" />
</a>
</header>
<nav id="sidebar" data-behavior="2">
<div class="sidebar-container">
<div class="sidebar-profile">
<a href="https://italocegatta.github.io/#about">
<img class="sidebar-profile-picture" src="http://i.imgur.com/9MOS3vs.png" alt="Foto do autor" />
</a>
<h4 class="sidebar-profile-name">Ítalo Cegatta</h4>
<h5 class="sidebar-profile-bio">R, Floresta e Data Science</h5>
</div>
<ul class="sidebar-buttons">
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://italocegatta.github.io/">
<i class="sidebar-button-icon fa fa-lg fa-home"></i>
<span class="sidebar-button-desc">Início</span>
</a>
</li>
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://italocegatta.github.io/categories">
<i class="sidebar-button-icon fa fa-lg fa-bookmark"></i>
<span class="sidebar-button-desc">Categorias</span>
</a>
</li>
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://italocegatta.github.io/archives">
<i class="sidebar-button-icon fa fa-lg fa-archive"></i>
<span class="sidebar-button-desc">Arquivo</span>
</a>
</li>
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://italocegatta.github.io/sobre">
<i class="sidebar-button-icon fa fa-lg fa-question"></i>
<span class="sidebar-button-desc">Sobre</span>
</a>
</li>
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://italocegatta.github.io/mailto:[email protected]">
<i class="sidebar-button-icon fa fa-lg fa-envelope"></i>
<span class="sidebar-button-desc">Email</span>
</a>
</li>
</ul>
<ul class="sidebar-buttons">
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://github.com/italocegatta" target="_blank" rel="noopener">
<i class="sidebar-button-icon fa fa-lg fa-code"></i>
<span class="sidebar-button-desc">GitHub</span>
</a>
</li>
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://www.linkedin.com/in/italocegatta" target="_blank" rel="noopener">
<i class="sidebar-button-icon fa fa-lg fa-briefcase"></i>
<span class="sidebar-button-desc">Linkedin</span>
</a>
</li>
</ul>
<ul class="sidebar-buttons">
<li class="sidebar-button">
<a class="sidebar-button-link " href="http://eepurl.com/b03nmD" target="_blank" rel="noopener">
<i class="sidebar-button-icon fa fa-lg fa-address-book"></i>
<span class="sidebar-button-desc">Inscreva-se</span>
</a>
</li>
<li class="sidebar-button">
<a class="sidebar-button-link " href="https://italocegatta.github.io/index.xml">
<i class="sidebar-button-icon fa fa-lg fa-rss"></i>
<span class="sidebar-button-desc">RSS</span>
</a>
</li>
</ul>
</div>
</nav>
<div id="main" data-behavior="2"
class="
hasCoverMetaIn
">
<section class="postShorten-group main-content-wrap">
<h2>
Tag: Sf
<a class="rss-icon" href="https://italocegatta.github.io/tags/sf/index.xml"><i class="fa fa-rss-square"></i></a>
</h2>
<article class="postShorten postShorten--thumbnailimg-top" itemscope itemType="http://schema.org/BlogPosting">
<div class="postShorten-wrap">
<a href="https://italocegatta.github.io/qual-estado-tem-mais-pau-rodado/">
<div class="postShorten-thumbnailimg">
<img alt="" itemprop="image" src="http://i.imgur.com/j1kqVed.png"/>
</div>
</a>
<div class="postShorten-header">
<h1 class="postShorten-title" itemprop="headline">
<a class="link-unstyled" href="https://italocegatta.github.io/qual-estado-tem-mais-pau-rodado/">
Qual Estado tem mais pau-rodado?
</a>
</h1>
<div class="postShorten-meta post-meta">
<time itemprop="datePublished" datetime="2018-03-24T00:00:00Z">
24 Março 2018
</time>
<span>em</span>
<a class="category-link" href="https://italocegatta.github.io/categories/graficos">Gráficos</a>
</div>
</div>
<div class="postShorten-excerpt" itemprop="articleBody">
Em Cuiabá, cidade que nasci e cresci, pau-rodado é um substantivo que define pessoas que nasceram em outro Estado mas moram em Cuiabá e ali construíram suas vidas. Aliás, Cuiabá sempre foi conhecida por ser uma Cidade super acolhedora e talvez por isso todos encaram o dito pau-rodado de uma forma engraçada e sem qualquer sentido pejorativo.
Muito bem, meu interesse com este post é analisar o comportamento dos fluxos migratórios entre Estados e assim encontrar os Estados que tem mais e menos pau-rodado em sua população residente.
<p>
<a href="https://italocegatta.github.io/qual-estado-tem-mais-pau-rodado/" class="postShorten-excerpt_link link">Continuar leitura</a>
</p>
</div>
</div>
</article>
<article class="postShorten postShorten--thumbnailimg-top" itemscope itemType="http://schema.org/BlogPosting">
<div class="postShorten-wrap">
<a href="https://italocegatta.github.io/graficos-com-dimensao-espacial-e-temporal/">
<div class="postShorten-thumbnailimg">
<img alt="" itemprop="image" src="http://i.imgur.com/ZlNUk70.png"/>
</div>
</a>
<div class="postShorten-header">
<h1 class="postShorten-title" itemprop="headline">
<a class="link-unstyled" href="https://italocegatta.github.io/graficos-com-dimensao-espacial-e-temporal/">
Gráficos com dimensão espacial e temporal
</a>
</h1>
<div class="postShorten-meta post-meta">
<time itemprop="datePublished" datetime="2017-07-08T00:00:00Z">
8 Julho 2017
</time>
<span>em</span>
<a class="category-link" href="https://italocegatta.github.io/categories/graficos">Gráficos</a>
</div>
</div>
<div class="postShorten-excerpt" itemprop="articleBody">
O post de hoje é sobre visualização de dados com dimensão espacial e temporal. Basicamente são gráficos que têm uma representação geográfica associada a informações que variam no tempo. Este tipo de análise é comum no meu dia a dia e por isso resolvi deixar 3 alternativas registradas aqui. O contexto que iremos abordar está relacionado ao banco de dados de focos de incêndios registrados pelo INPE no Programa Queimadas Monitoramento por Satélites.
<p>
<a href="https://italocegatta.github.io/graficos-com-dimensao-espacial-e-temporal/" class="postShorten-excerpt_link link">Continuar leitura</a>
</p>
</div>
</div>
</article>
</section>
<footer id="footer" class="main-content-wrap">
<span class="copyrights">
© 2019 Ítalo Cegatta. All Rights Reserved
</span>
<a href="https://github.com/akirak/hugo-tranquilpeak-theme">Tranquilpeak theme</a>
</footer>
</div>
</div>
<div id="about">
<div id="about-card">
<div id="about-btn-close">
<i class="fa fa-remove"></i>
</div>
<img id="about-card-picture" src="http://i.imgur.com/9MOS3vs.png" alt="Foto do autor" />
<h4 id="about-card-name">Ítalo Cegatta</h4>
<div id="about-card-bio">R, Floresta e Data Science</div>
<div id="about-card-job">
<i class="fa fa-briefcase"></i>
<br/>
Suzano S.A.
</div>
<div id="about-card-location">
<i class="fa fa-map-marker"></i>
<br/>
Americana-SP
</div>
</div>
</div>
<div id="algolia-search-modal" class="modal-container">
<div class="modal">
<div class="modal-header">
<span class="close-button"><i class="fa fa-close"></i></span>
<a href="https://algolia.com" target="_blank" rel="noopener" class="searchby-algolia text-color-light link-unstyled">
<span class="searchby-algolia-text text-color-light text-small">by</span>
<img class="searchby-algolia-logo" src="https://www.algolia.com/static_assets/images/press/downloads/algolia-light.svg">
</a>
<i class="search-icon fa fa-search"></i>
<form id="algolia-search-form">
<input type="text" id="algolia-search-input" name="search"
class="form-control input--large search-input" placeholder="Pesquisar" />
</form>
</div>
<div class="modal-body">
<div class="no-result text-color-light text-center"></div>
<div class="results">
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/o-quao-popular-e-o-seu-nome/">
<h3 class="media-heading">O quão popular é o seu nome?</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Jan 1, 2019
</span>
</span>
<div class="media-content hide-xs font-merryweather">No Censo 2010, o IBGE incorporou no levantamento a coleta de nomes (apenas o primeiro) e sobrenome (apenas o último). Para quem é curioso por coisas sem muita utilidade prática (e eu jogo forte nesse time!), vale a pena entrar no site https://censo2010.ibge.gov.br/nomes e conferir as estatísticas do nome de interesse.
O site é legal, mas eu queria ter os dados na mão para fazer as coisas do meu jeito.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/risco-de-incendio-pela-formula-de-monte-alegre/">
<h3 class="media-heading">Risco de incêndio pela Fórmula de Monte Alegre</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Jul 7, 2018
</span>
</span>
<div class="media-content hide-xs font-merryweather">No setor florestal o fogo é uma questão recorrente e preocupante. Utilizar um índice de risco ou perigo de incêndio ajuda, no mínimo, no planejamento e no alerta para quem mora no entorno de maciços florestais como parques, hortos e plantios florestais.
A Fórmula de Monte Alegre (FMA) é um índice bastante simples, foi proposta em 1972 por Soares (1972) e utiliza apenas a umidade relativa do ar às 13h e a precipitação para calcular o risco de incêndio.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/qual-estado-tem-mais-pau-rodado/">
<h3 class="media-heading">Qual Estado tem mais pau-rodado?</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Mar 3, 2018
</span>
</span>
<div class="media-content hide-xs font-merryweather">Em Cuiabá, cidade que nasci e cresci, pau-rodado é um substantivo que define pessoas que nasceram em outro Estado mas moram em Cuiabá e ali construíram suas vidas. Aliás, Cuiabá sempre foi conhecida por ser uma Cidade super acolhedora e talvez por isso todos encaram o dito pau-rodado de uma forma engraçada e sem qualquer sentido pejorativo.
Muito bem, meu interesse com este post é analisar o comportamento dos fluxos migratórios entre Estados e assim encontrar os Estados que tem mais e menos pau-rodado em sua população residente.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/100-anos-do-posto-meteorologico-da-esalq/">
<h3 class="media-heading">100 anos do posto meteorológico da ESALQ</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Oct 10, 2017
</span>
</span>
<div class="media-content hide-xs font-merryweather">No dia 31 de dezembro de 2016 o Posto Meteorológico da ESALQ/USP completou 100 anos de funcionamento. Em “comemoração” a este belo banco de dados, pretendo fazer alguns gráficos para analisar, sem muita pretensão, como o clima variou de lá pra cá.
No site do Posto podemos encontrar os dados nas escalas diária e mensal. Separei apenas os dados mensais para vermos aqui. Fiz algumas poucas adaptações no banco para poder pelo menos iniciar a análise.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/engenheiro-florestal-ou-cientista-de-dados/">
<h3 class="media-heading">Engenheiro Florestal ou Cientista de Dados?</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Sep 9, 2017
</span>
</span>
<div class="media-content hide-xs font-merryweather">No meio do colegial tive a sorte de ser ‘convencido’ por um amigo da família que Engenharia Florestal seria uma ótima profissão para mim. Vocês sabem que um jovem de 16 anos pouco sabe sobre o mercado de trabalho. Naquela época o único contato profissional que tive foi como menor aprendiz numa concessionária de veículos.
Chegando na ESALQ para o curso de Eng. Florestal, a primeira coisa que eu fiz foi entrar no Grupo Florestal Monte Olimpo (GFMO).</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/como-um-cientista-de-dados-pesquisa-o-carro-que-quer-comprar/">
<h3 class="media-heading">Como um cientista de dados pesquisa o carro que quer comprar?</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Jul 7, 2017
</span>
</span>
<div class="media-content hide-xs font-merryweather">Estou naquela parte da vida em que se planeja comprar um carro. Como eu sou, acima de todos os sonhos, pão duro, decidir qual marca, modelo, versão e ano do veículo não vai ser fácil. Pensando nisso resolvi escrever o pacote fipe no R para me ajudar a tomar esta decisão. O objetivo deste post é apresentar o pacote e as funções que auxiliam na coleta das informações da tabela FIPE.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/graficos-com-dimensao-espacial-e-temporal/">
<h3 class="media-heading">Gráficos com dimensão espacial e temporal</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Jul 7, 2017
</span>
</span>
<div class="media-content hide-xs font-merryweather">O post de hoje é sobre visualização de dados com dimensão espacial e temporal. Basicamente são gráficos que têm uma representação geográfica associada a informações que variam no tempo. Este tipo de análise é comum no meu dia a dia e por isso resolvi deixar 3 alternativas registradas aqui. O contexto que iremos abordar está relacionado ao banco de dados de focos de incêndios registrados pelo INPE no Programa Queimadas Monitoramento por Satélites.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/interpolacao-pelo-inverso-do-quadrado-da-distancia/">
<h3 class="media-heading">Interpolação pelo inverso do quadrado da distância</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Apr 4, 2017
</span>
</span>
<div class="media-content hide-xs font-merryweather">É comum quando temos um determinado valor distribuído espacialmente e queremos estimá-lo para um ponto específico. Existem inúmeras formas de se chegar nesta estimativa, mas quero mostrar apenas uma neste post. O objetivo é estimar o quanto choveu em Itapetininga-SP, a partir de dados de chuva de outras 6 cidades próximas. Utilizaremos para isso os dados das estações automáticas do INMET.
Primeiro, vamos importar e visualizar os dados que temos disponível.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/download-automatico-de-imagens-modis/">
<h3 class="media-heading">Download automático de imagens MODIS</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Jan 1, 2017
</span>
</span>
<div class="media-content hide-xs font-merryweather">O MODIS (MODerate resolution Imaging Spectroradiometer) faz parte de um programa da NASA para monitoramento da superfície terrestre. Os satélites Terra e Aqua fornecem informações muito interessantes para o setor agroflorestal e nos permite entender de maneira bastante eficaz a dinâmica do uso do solo e de crescimento das nossas culturas.
O MODOIS tem diversos produtos, mas neste post vamos tratar especificamente do produto MOD13Q1, que disponibiliza a cada 16 dias um raster de EVI e NDVI com resolução de 250 m.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
<div class="media">
<div class="media-body">
<a class="link-unstyled" href="https://italocegatta.github.io/indice-de-uniformidade-pv50/">
<h3 class="media-heading">Índice de uniformidade (PV50)</h3>
</a>
<span class="media-meta">
<span class="media-date text-small">
Oct 10, 2016
</span>
</span>
<div class="media-content hide-xs font-merryweather">O PV50 é hoje o índice mais utilizado quando queremos expressar a uniformidade de um plantio florestal. Hakamada (2012) apresentou um estudo detalhado sobre diversos índices e concluiu que o PV50 é o índice mais indicado para explicar a relação entre uniformidade, qualidade silvicultural e produtividade em plantios homogêneos de Eucalyptus.
O objetivo deste post é mostrar, passo a passo, como calcular este índice no R e fazer uma breve análise de seus resultados.</div>
</div>
<div style="clear:both;"></div>
<hr>
</div>
</div>
</div>
<div class="modal-footer">
<p class="results-count text-medium"
data-message-zero=""
data-message-one=""
data-message-other="">
20 posts found
</p>
</div>
</div>
</div>
<div id="cover" style="background-image:url('http://i.imgur.com/0YSWdvY.png');"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.7/js/jquery.fancybox.min.js" integrity="sha256-GEAnjcTqVP+vBp3SSc8bEDQqvWAZMiHyUSIorrWwH50=" crossorigin="anonymous"></script>
<script src="https://italocegatta.github.io/js/script-qi9wbxp2ya2j6p7wx1i6tgavftewndznf4v0hy2gvivk1rxgc3lm7njqb6bz.min.js"></script>
<script>
$(document).ready(function() {
hljs.configure({ classPrefix: '', useBR: false });
$('pre.code-highlight > code, pre > code').each(function(i, block) {
if (!$(this).hasClass('codeblock')) {
$(this).addClass('codeblock');
}
hljs.highlightBlock(block);
});
});
</script>
</body>
</html>
| italocegatta/italocegatta.github.io | tags/sf/index.html | HTML | mit | 24,864 |
package tek.render;
import static org.lwjgl.opengl.GL20.*;
import java.io.File;
import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map.Entry;
//we're going to be using a lot of math variables in this class
import org.joml.*;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;
import tek.Engine;
import tek.ResourceLoader;
public class Shader {
private static HashMap<String,Shader> shaders;
static{
shaders = new HashMap<>();
}
private int id;
private String vertex, fragment, name;
private boolean bound = false, destroyed = false;
private HashMap<String,Integer> uniforms;
private FloatBuffer buffer;
public Shader(String name, String vertex, String fragment){
this.name = name;
this.vertex = vertex;
this.fragment = fragment;
//create each sub shader
int vid = createShader(GL_VERTEX_SHADER, vertex);
int fid = createShader(GL_FRAGMENT_SHADER, fragment);
//create the program id
id = glCreateProgram();
//attach each individual shader
glAttachShader(id, vid);
glAttachShader(id, fid);
//link the shaders together to make the program
glLinkProgram(id);
//if there is an error with linking, output the message
if(glGetProgrami(id, GL_LINK_STATUS) == GL11.GL_FALSE){
System.err.println(glGetProgramInfoLog(id, 1024));
glDeleteProgram(id);
}
//remove the sub shader instances (already compiled into a whole)
glDetachShader(id, vid);
glDetachShader(id, fid);
//add the shader program to the shader list by both paths of the shaders
//note: collision will occur when reusing sub shaders
shaders.put(name, this);
shaders.put(vertex, this);
shaders.put(fragment, this);
//setup a uniform map (string uniform name, integer uniform location)
uniforms = new HashMap<>();
//create a buffer for 4x4 matrices
buffer = BufferUtils.createFloatBuffer(16);
}
public Shader(String vertex, String fragment){
this.vertex = vertex;
this.fragment = fragment;
//create each sub shader
int vid = createShader(GL_VERTEX_SHADER, vertex);
int fid = createShader(GL_FRAGMENT_SHADER, fragment);
//create the program id
id = glCreateProgram();
//attach each individual shader
glAttachShader(id, vid);
glAttachShader(id, fid);
//link the shaders together to make the program
glLinkProgram(id);
//if there is an error with linking, output the message
if(glGetProgrami(id, GL_LINK_STATUS) == GL11.GL_FALSE){
System.err.println(glGetProgramInfoLog(id, 1024));
glDeleteProgram(id);
}
//remove the sub shader instances (already compiled into a whole)
glDetachShader(id, vid);
glDetachShader(id, fid);
//add the shader program to the shader list by both paths of the shaders
//note: collision will occur when reusing sub shaders
shaders.put(vertex, this);
shaders.put(fragment, this);
//setup a uniform map (string uniform name, integer uniform location)
uniforms = new HashMap<>();
//create a buffer for 4x4 matrices
buffer = BufferUtils.createFloatBuffer(16);
}
/** Create a shader by type and file
*
* @param type type of shader (vertex or fragment)
* @param path path to shader file
* @return a shader id
*/
private int createShader(int type, String path){
//create the shader id
int id = glCreateShader(type);
//get and place the source to the shader
glShaderSource(id, ResourceLoader.getText(path));
//compile the shader
glCompileShader(id);
//check for compilation issues, if present, output them
if(glGetShaderi(id, GL_COMPILE_STATUS) == GL11.GL_FALSE){
System.err.println(glGetShaderInfoLog(id, 1024));
//don't leak the shader
glDeleteShader(id);
}
return id;
}
/** Set a matrix uniform
*
* @param uniform name of a uniform
* @param mat matrix to set
*/
public void set(String uniform, Matrix4f mat){
GL20.glUniformMatrix4fv(getUniform(uniform), false, mat.get(buffer));
}
/** Set a vec3 uniform
*
* @param uniform name of a uniform
* @param vec vec3 to set
*/
public void set(String uniform, Vector3f vec){
GL20.glUniform3f(getUniform(uniform), vec.x, vec.y, vec.z);
}
/** Set a vec2 uniform
*
* @param uniform name of a uniform
* @param vec vec2 to set
*/
public void set(String uniform, Vector2f vec){
GL20.glUniform2f(getUniform(uniform), vec.x, vec.y);
}
/** Set an array or individual integer(s)
*
* @param uniform name of a uniform
* @param ints integer(s) to set
*/
public void set(String uniform, int... ints){
if(ints.length == 1){
GL20.glUniform1i(getUniform(uniform), ints[0]);
}else if(ints.length == 2){
GL20.glUniform2i(getUniform(uniform), ints[0], ints[1]);
}else if(ints.length == 3){
GL20.glUniform3i(getUniform(uniform), ints[0], ints[1], ints[2]);
}else if(ints.length >= 4){
GL20.glUniform4i(getUniform(uniform), ints[0], ints[1], ints[2], ints[3]);
}
}
/** Set an array or individual float(s)
*
* @param uniform name of a uniform
* @param floats float(s) to set
*/
public void set(String uniform, float...floats){
if(floats.length == 1){
GL20.glUniform1f(getUniform(uniform), floats[0]);
}else if(floats.length == 2){
GL20.glUniform2f(getUniform(uniform), floats[0], floats[1]);
}else if(floats.length == 3){
GL20.glUniform3f(getUniform(uniform), floats[0], floats[1], floats[2]);
}else if(floats.length >= 4){
GL20.glUniform4f(getUniform(uniform), floats[0], floats[1], floats[2], floats[3]);
}
}
/**Set a boolean value on the shader
*
* @param uniform name of the uniform
* @param value the value of the boolean
*/
public void set(String uniform, boolean value){
GL20.glUniform1i(getUniform(uniform), value ? 1 : 0);
}
/** Get the location of a uniform by name
*
* @param uniform name of a uniform
* @return location of the uniform
*/
public int getUniform(String uniform){
if(uniforms.containsKey(uniform))
return uniforms.get(uniform);
int loc = glGetUniformLocation(id, uniform);
uniforms.put(uniform, loc);
return loc;
}
/** Name the shader
*
* @param name name of the shader
*/
public void name(String name){
if(this.name != null){
shaders.remove(name);
}
shaders.put(name, this);
this.name = name;
}
/**
* tell opengl to use this shader program
*/
public void bind(){
//if this shader is bound, then do nothing
if(bound)
return;
//make sure all of the other `bound` variables aren't set
unbindOthers();
//bind the shader in opengl
glUseProgram(id);
//update the binding check
bound = true;
}
/** Get if the shader is destroyed
*
* @return if the shader is destroyed
*/
public boolean isDestroyed(){
return destroyed;
}
/** Get the name of the shader
*
* @return name of the shader
*/
public String getName(){
return name;
}
/** Get the path of the vertex shader
*
* @return path of the vertex shader
*/
public String getVertex(){
return vertex;
}
/** Get the path of the fragment shader
*
* @return path of the fragment shader
*/
public String getFragment(){
return fragment;
}
/** Get if the shader is bound
*
* @return if the shader is bound
*/
public boolean isBound(){
return bound;
}
/** Get the id of the shader
*
* @return the id of the shader
*/
public int getId(){
return id;
}
/**
* Delete the shader in opengl
*/
public void destroy(){
//prevent from any repeat calls
if(destroyed)
return;
destroyed = true;
glDeleteProgram(id);
}
/**
* Set the shader to not bound
*/
protected void setUnbound(){
bound = false;
}
/**
* Unbind other shaders
*/
protected void unbindOthers(){
for(Shader shader : shaders.values()){
if(shader != this)
shader.setUnbound();
}
}
/**
* Unbind all shaders
*/
public static void unbind(){
glUseProgram(0);
for(Shader shader : shaders.values()){
shader.setUnbound();
}
}
/** Get a shader by name or accessible string
*
* @param shader name or accessible string of shader
* @return the shader
*/
public static Shader get(String shader){
return shaders.get(shader);
}
/** Get a shader by id
*
* @param id Id of the shader
* @return the shader
*/
public static Shader get(int id){
for(Shader shader : shaders.values()){
if(shader.id == id)
return shader;
}
return null;
}
/** Load all of matching name shader files in a directory
*
* @param path directory to shaders
*/
public static void loadAll(String path){
File root = new File(path);
if(!root.isDirectory() || !root.exists()){
System.out.println("Directory of: "+path+" does not exist");
return;
}
//attribs: string[] [0] = name [1-2] = file path (extension incl)
ArrayList<String[]> matches = new ArrayList<String[]>();
for(File file : root.listFiles()){
boolean matchFound = false;
//get name (strip file extension)
String name = file.getName().substring(0, file.getName().lastIndexOf("."));
for(String[] attribs : matches){
if(attribs[0].toLowerCase().equals(name.toLowerCase())){
//if the included shader isn't a duplicate
if(!attribs[1].toLowerCase().equals(file.getPath())){
matchFound = true;
String[] temp = new String[3];
temp[0] = attribs[0];
//if the normalized string is a vertex shader
if(attribs[1].toLowerCase().endsWith("vs") || attribs[1].toLowerCase().endsWith("vert")){
//file already loaded is a fragment shader
temp[1] = attribs[1];
temp[2] = file.getPath();
}else if(attribs[1].toLowerCase().endsWith("fs") || attribs[1].toLowerCase().endsWith("frag")){
//file already loaded is a vertex shader
temp[1] = file.getPath();
temp[2] = attribs[1];
}
//remove old shader attributes
matches.remove(attribs);
//update the array
attribs = temp;
//add the complete attributes
matches.add(attribs);
}
}
}
//if no matches found, add one to the array
if(!matchFound){
matches.add(new String[]{name, file.getPath()});
}
}
for(String[] match : matches){
if(match.length == 3){
//create a new shader with the attributed features of the match
new Shader(match[0], match[1], match[2]);
//if we're debugging
if(Engine.DEBUG)
//output the addressable shader
System.out.println(match.length);
}
}
}
public static void outputMap(){
//map of shaders with addressable strings
HashMap<Shader, ArrayList<String>> map = new HashMap<>();
//for each entry in the shader map
for(Entry<String, Shader> entry : shaders.entrySet()){
//if the shader has already been listed, add the key to the
//accessible array that exists
if(map.containsKey(entry.getValue())){
map.get(entry.getValue()).add(entry.getKey());
}else{
//otherwise, make a list for other strings to be added to
//as needed
ArrayList<String> list = new ArrayList<String>();
list.add(entry.getKey());
map.put(entry.getValue(), list);
}
}
for(Entry<Shader, ArrayList<String>> entry : map.entrySet()){
StringBuilder ln = new StringBuilder();
entry.getValue().forEach((str)->ln.append(str +","));
System.out.println("{ "+ln.toString()+" }");
}
}
public static Collection<Shader> getShaders(){
return shaders.values();
}
public static void destroyAll(){
ArrayList<Shader> checks = new ArrayList<Shader>();
//clear the objects
for(Shader shader : shaders.values()){
if(!checks.contains(shader)){
shader.destroy();
checks.add(shader);
}
}
//clear out all of the objects
checks.clear();
shaders.clear();
}
public static void updateCheck(){
ArrayList<Shader> checks = new ArrayList<Shader>();
//filter out dead shaders
for(Shader shader : shaders.values()){
if(shader.isDestroyed() && !checks.contains(shader)){
checks.add(shader);
}
}
//remove all of the dead shaders
shaders.values().removeAll(checks);
//make sure there aren't any stray references
checks.clear();
}
public static String getAliases(Shader shader){
StringBuilder aliases = new StringBuilder();
for(Entry<String, Shader> entry : shaders.entrySet()){
if(entry.getValue() == shader)
aliases.append(entry.getKey()+",");
}
//remove trailing comma
return aliases.substring(0, aliases.length() -1);
}
public static boolean exists(String name){
String lowercase = name.toLowerCase();
for(Shader shader : shaders.values()){
if(shader.getName().toLowerCase().equals(lowercase)){
return true;
}
}
return false;
}
public static boolean exists(String vertex, String fragment){
String lwrV = vertex.toLowerCase();
String lwrF = fragment.toLowerCase();
for(Shader shader : shaders.values()){
if(shader.fragment.toLowerCase().equals(lwrF)
&& shader.vertex.toLowerCase().equals(lwrV))
return true;
}
return false;
}
public static HashMap<String, Shader> getMap(){
return shaders;
}
} | GunnarJ1/LD-38 | src/tek/render/Shader.java | Java | mit | 13,163 |
version https://git-lfs.github.com/spec/v1
oid sha256:f9bc528357df1bd4e6f28a3086c939dbbceeaf058f8bd7c44ada2f4e7727a589
size 9836
| yogeshsaroya/new-cdnjs | ajax/libs/yui/3.15.0/event-outside/event-outside-coverage.js | JavaScript | mit | 129 |
# dpx.js
DPX Image Reader in Javascript
## Description
A native javascript implementation of the DPX Image format ( V1 and V2 ). This includes a front end library written for use in the browser directly along with an example page to get started. The backend implementation is built for nodejs use to read the image data and the header information.
### dpx-fe.js
### dpx.js
## License
The MIT License (MIT)
Copyright (c) 2015 Armen Filipetyan
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.
| armenfilipetyan/dpx.js | README.md | Markdown | mit | 1,472 |
package org.littlewings.infinispan.authentication.token;
import org.infinispan.client.hotrod.RemoteCache;
import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
import org.infinispan.client.hotrod.exceptions.HotRodClientException;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
public class TokenAuthnAuthzTest {
@Test
public void authnAndAuthz() {
String readWriteUserToken = "[read-writeロールを持つユーザーのアクセストークン]";
try (RemoteCacheManager cacheManager = new RemoteCacheManager(
new ConfigurationBuilder()
.addServers("172.17.0.3:11222")
.security()
.authentication()
.saslMechanism("OAUTHBEARER")
.token(readWriteUserToken)
.build())) {
RemoteCache<String, String> cache = cacheManager.getCache("secureCache");
cache.put("key1", "value1");
assertThat(cache.get("key1")).isEqualTo("value1");
}
String readOnlyUserToken = "[read-onlyロールを持つユーザーのアクセストークン]";
try (RemoteCacheManager cacheManager = new RemoteCacheManager(
new ConfigurationBuilder()
.addServers("172.17.0.3:11222")
.security()
.authentication()
.saslMechanism("OAUTHBEARER")
.token(readOnlyUserToken)
.build())) {
RemoteCache<String, String> cache = cacheManager.getCache("secureCache");
assertThat(cache.get("key1")).isEqualTo("value1");
assertThatThrownBy(() -> cache.put("key2", "value2"))
.isInstanceOf(HotRodClientException.class)
.hasMessageContainingAll("Unauthorized access", "lacks 'WRITE' permission");
}
}
@Test
public void noAuth() {
try (RemoteCacheManager cacheManager = new RemoteCacheManager(
new ConfigurationBuilder()
.addServers("172.17.0.3:11222")
.build())) {
RemoteCache<String, String> cache = cacheManager.getCache("secureCache");
assertThatThrownBy(() -> cache.put("key1", "value1"))
.isInstanceOf(HotRodClientException.class)
.hasMessageContaining("Unauthorized 'PUT' operation");
}
}
}
| kazuhira-r/infinispan-getting-started | remote-authn-authz-token/src/test/java/org/littlewings/infinispan/authentication/token/TokenAuthnAuthzTest.java | Java | mit | 2,691 |
TESTING_CONF = kong_TEST.yml
DEVELOPMENT_CONF = kong_DEVELOPMENT.yml
DEV_ROCKS=busted luacov luacov-coveralls luacheck
.PHONY: install dev clean start restart seed drop lint test test-integration test-plugins test-all coverage
install:
@if [ `uname` = "Darwin" ]; then \
luarocks make kong-*.rockspec; \
else \
luarocks make kong-*.rockspec \
PCRE_LIBDIR=`find / -type f -name "libpcre.so*" -print -quit | xargs dirname` \
OPENSSL_LIBDIR=`find / -type f -name "libssl.so*" -print -quit | xargs dirname`; \
fi
dev: install
@for rock in $(DEV_ROCKS) ; do \
if ! command -v $$rock &> /dev/null ; then \
echo $$rock not found, installing via luarocks... ; \
luarocks install $$rock ; \
else \
echo $$rock already installed, skipping ; \
fi \
done;
bin/kong config -c kong.yml -e TEST
bin/kong config -c kong.yml -e DEVELOPMENT
bin/kong migrations -c $(DEVELOPMENT_CONF) up
clean:
@bin/kong migrations -c $(DEVELOPMENT_CONF) reset
rm -f $(DEVELOPMENT_CONF) $(TESTING_CONF)
rm -f luacov.*
rm -rf nginx_tmp
start:
@bin/kong start -c $(DEVELOPMENT_CONF)
stop:
@bin/kong stop -c $(DEVELOPMENT_CONF)
restart:
@bin/kong restart -c $(DEVELOPMENT_CONF)
seed:
@bin/kong db -c $(DEVELOPMENT_CONF) seed
drop:
@bin/kong db -c $(DEVELOPMENT_CONF) drop
lint:
@find kong spec -name '*.lua' ! -name 'invalid-module.lua' | xargs luacheck -q
test:
@busted -v spec/unit
test-integration:
@busted -v spec/integration
test-plugins:
@busted -v spec/plugins
coverage:
@rm -f luacov.*
@busted --coverage spec/
@luacov -c spec/.luacov
@tail -n 1 luacov.report.out | awk '{ print $$3 }'
| ChristopherBiscardi/kong | Makefile | Makefile | mit | 1,631 |
/**************************************************************************************************
* Module: Patient
* Author(s): Sean Malone
* Description: This module is used to query the database for the order ViewModel.
*************************************************************************************************/
define(function(require) {
/***********************************************************************************************
* Includes
**********************************************************************************************/
var system = require('durandal/system'); // System logger
var Forms = require('modules/form');
var forms = new Forms();
/**********************************************************************************************
* Constructor
*********************************************************************************************/
var order = function() {}
/**********************************************************************************************
* Get Methods
*
* These methods retrieve information from the database via SELECT queries
*********************************************************************************************/
// Role
order.prototype.getRole = function(id, practiceId) {
return this.query({
mode: 'select',
table: 'user',
fields: '*',
join: "JOIN role ON user.role_id=role.id",
where: "WHERE user.id='" + id +"' AND user.practice_id='" + practiceId + "'"
});
}
// Get Patient ID
order.prototype.getPatientId = function() {
return this.query({
mode: 'select',
table: 'order',
fields: 'id',
order: 'ORDER BY id DESC',
limit: 'LIMIT 1'
});
}
// Get All Patients
order.prototype.getPatients = function() {
return this.query({
mode: 'select',
table: 'order',
fields: '*'
});
}
// Get Personal Information for a Single Patient
order.prototype.getPatient = function(id, practiceId) {
return this.query({
mode: 'select',
table: 'patient',
fields: '*',
where: "WHERE id='" + id + "' AND practice_id='" + practiceId + "'"
});
}
// Get Patient information from ServiceRecord
order.prototype.getPatientFromService = function(id) {
var fields = [
'patient.id', 'patient.practice_id', 'patient.physician_id', 'id_number', 'id_type',
'first_name', 'middle_name', 'last_name', 'address', 'city', 'state', 'zip', 'province',
'country', 'phone', 'phone_ext', 'mobile', 'date_of_birth', 'alias', 'gender'
];
return this.query({
mode: 'select',
table: 'service_record',
fields: fields,
join: "LEFT JOIN patient ON service_record.patient_id=patient.id",
where: "WHERE service_record.id='" + id + "'"
})
}
// Get All Users
order.prototype.getUsers = function(id) {
return this.query({
mode: 'select',
table: 'user',
fields: '*',
where: "WHERE practice_id='" + id + "'"
});
}
// Get Vital Signs
order.prototype.getVitals = function(id) {
return this.query({
mode: 'select',
table: 'vital_signs',
fields: '*',
where: "WHERE service_record_id='" + id + "'"
});
}
// Ge Service Record
order.prototype.getServiceRecord = function(patientId, practiceId, date) {
return this.query({
mode: 'select',
table: 'service_record',
fields: '*',
where: "WHERE patient_id='" + patientId + "' AND practice_id='"
+ practiceId + "' AND date='" + date + "'"
});
}
// Get Diagnostic Centers
order.prototype.getCenters = function(id) {
return this.query({
mode: 'select',
table: 'diagnostic_center',
fields: '*',
where: "WHERE practice_id='" + id + "'"
});
}
// Get Order Types
order.prototype.getOrderTypes = function(id, type) {
return this.query({
mode: 'select',
table: 'order_category',
fields: '*',
where: "WHERE practice_id='" + id + "' AND type='" + type + "'"
});
}
// Get Order
order.prototype.getOrder = function(id) {
return this.query({
mode: 'select',
table: 'orders',
fields: '*',
where: "WHERE id='" + id + "'"
});
}
// Get All Orders
order.prototype.getOrders = function(id, type) {
var fields = ['orders.id', 'orders.service_record_id', 'orders.in_office', 'orders.instructions',
'orders.assigned_to', 'orders.date', 'orders.order_category_id', 'order_category.description',
'orders.type', 'orders.comment', 'orders.center', 'orders.group'
];
return this.query({
mode: 'select',
table: 'orders',
fields: 'orders.id, orders.service_record_id, orders.in_office, orders.instructions,' +
'orders.assigned_to, orders.date, orders.order_category_id, order_category.description,' +
'orders.type, orders.comment, orders.center, orders.group',
join: "LEFT JOIN order_category ON orders.order_category_id=order_category.id",
where: "WHERE service_record_id='" + id + "' AND orders.type LIKE '" + type + "%'"
});
}
// Get Order Group
order.prototype.getOrderGroup = function(id) {
return this.query({
mode: 'select',
table: 'orders',
fields: '`group`',
where: "WHERE service_record_id='" + id + "'",
order: "ORDER BY `group` DESC",
limit: "LIMIT 1"
});
}
// Get Office Procedure Types
order.prototype.getOfficeProcedureTypes = function(id) {
return this.query({
mode: 'select',
table: 'office_procedure_type',
fields: '*',
where: "WHERE practice_id='" + id + "'"
});
}
// Get Office Procedures
order.prototype.getOfficeProcedures = function(id) {
return this.query({
mode: 'select',
table: 'office_procedure',
fields: '*',
where: "WHERE order_id='" + id + "'"
});
}
// Get Supply Types
order.prototype.getSupplyTypes = function(id) {
return this.query({
mode: 'select',
table: 'supply_type',
fields: '*',
where: "WHERE practice_id='" + id + "'"
});
}
// Get Supplies
order.prototype.getSupplies = function(id) {
return this.query({
mode: 'select',
table: 'supplies',
fields: '*',
where: "WHERE order_id='" + id + "'"
});
}
// Get Medicine List
order.prototype.getMedicines = function() {
return this.query({
mode: 'select',
fields: '*',
table: 'medicine_list',
});
}
// Get Diluent List
order.prototype.getDiluents = function() {
return this.query({
mode: 'select',
fields: 'diluent',
table: 'diluent_list',
});
}
// Get Drug Orders
order.prototype.getDrugOrders = function(id) {
return this.query({
mode: 'select',
fields: '*',
table: 'drug_order',
where: "WHERE order_id='" + id + "'"
});
}
// Get Medication Order Logs
order.prototype.getMedicationOrderLogs = function(id) {
return this.query({
mode: 'select',
fields: '*',
table: 'medication_order_log',
where: "WHERE order_id='" + id + "'"
});
}
// Get Venous Access
order.prototype.getVenousAccess = function(id) {
return this.query({
mode: 'select',
fields: '*',
table: 'venous_access',
where: "WHERE service_record_id='" + id + "'"
});
}
// Get Medications
order.prototype.getMedications = function(id) {
return this.query({
mode: 'select',
fields: '*',
table: 'medication',
where: "WHERE service_record_id='" + id + "'"
});
}
// Get Allergies
order.prototype.getAllergies = function(id) {
return this.query({
mode: 'select',
fields: 'count(*) AS count',
table: 'allergies_intolerance',
where: "WHERE service_record_id='" + id + "' AND type='Allergy'"
});
}
// Get Intolerances
order.prototype.getIntolerances = function(id) {
return this.query({
mode: 'select',
fields: 'count(*) AS count',
table: 'allergies_intolerance',
where: "WHERE service_record_id='" + id + "' AND type='Intolerance'"
});
}
/**********************************************************************************************
* Save Methods
*
* These methods add information to the database via INSERT and UPDATE queries
*********************************************************************************************/
// Add Personal Information for a Single Patient
order.prototype.savePatient = function(id, data) {
var self = this;
var fields = ['practice_id', 'id', 'first_name', 'middle_name', 'last_name', 'alias',
'date_of_birth', 'id_number', 'id_type', 'physician_id', 'address', 'city', 'state',
'zip', 'province', 'country', 'phone', 'phone_ext', 'mobile', 'gender', 'marital_status',
'family_history_type','family_history_comment', 'routine_exam_comment', 'insurance_type',
'record_status', 'contact_name', 'contact_phone', 'contact_mobile', 'contact_relationship',
'insurance_name', 'email'];
var values = $.map(data, function(k,v) {
if(v != 'lastFirstName' && v!= 'insuredType')
if(k() == null || k() == undefined) {
return [''];
}
else
return [k()];
});
var newId = '';
if(id == 'new') {
return self.query({
mode: 'select',
table: 'order',
fields: 'id',
order: 'ORDER BY id DESC',
limit: 'LIMIT 1'
}).success(function(data) {
$.each(data, function(key, item) {
newId = parseInt(item.id) + 1;
});
values[1] = newId;
self.query({
mode: 'insert',
table: 'order',
fields: fields,
values: values
});
});
}
else {
return self.query({
mode: 'update',
table: '`order`',
fields: fields,
values: values,
where: "WHERE id='" + id + "' AND practice_id='" + practiceId + "'"
});
}
}
// Save Service Record
order.prototype.saveServiceRecord = function(id, data) {
var self = this;
var fields = ['id', 'practice_id', 'order_id', 'physician_id', 'date', 'reason', 'history',
'systems_comment', 'no_known_allergies', 'allergies_verified', 'physical_examination_comment',
'plan_and_instructions'];
var values = $.map(data, function(k,v) {
if(k() == null || k() == undefined) {
return [''];
}
else
return [k()];
});
return self.query({
mode: 'update',
table: 'service_record',
fields: fields,
values: values,
where: "Where id='" + id + "'"
});
}
// Save Order
order.prototype.saveOrder = function(data, method) {
var self = this;
var fields = ['id', 'service_record_id', 'order_category_id',
'type', 'in_office', 'instructions', 'assigned_to', 'date',
'comment', 'center', 'group'];
var values = $.map(data, function(k,v) {
if(v == 'description')
return null;
if(k() == null || k() == undefined) {
return [''];
}
else
return [k()];
});
if(method == "update") {
return self.query({
mode: 'update',
table: 'orders',
fields: fields,
values: values,
where: "Where `group`='" + data.group() + "' AND `order_category_id`='"
+ data.orderCategoryId() + "' AND service_record_id='" + data.serviceRecordId() + "'"
});
}
else {
return self.query({
mode: 'select',
table: 'orders',
fields: 'id',
order: 'ORDER BY id DESC',
limit: 'LIMIT 1',
where: "WHERE service_record_id='" + data.serviceRecordId() + "'"
}).complete(function(d) {
var temp = $.parseJSON(d.responseText);
if(data.length > 0) {
data.id(parseInt(temp[0].id) + 1);
values[0] = parseInt(temp[0].id) + 1;
}
else {
data.id(0);
values[0] = 0;
}
return self.query({
mode: 'insert',
table: 'orders',
fields: fields,
values: values
});
});
}
}
// Save Office Procedure
order.prototype.saveOfficeProcedure = function(data, method) {
var self = this;
var fields = ['id', 'order_id', 'office_procedure_type_id', 'times'];
var values = $.map(data, function(k,v) {
if(v == 'description')
return null;
if(k() == null || k() == undefined) {
return [''];
}
else
return [k()];
});
if(method == "update") {
self.query({
mode: 'update',
table: 'office_procedure',
fields: fields,
values: values,
where: "Where `order_id`='" + data.orderId() + "' AND `office_procedure_type_id`='"
+ data.officeProcedureTypeId() + "'"
});
}
else {
self.query({
mode: 'insert',
table: 'office_procedure',
fields: fields,
values: values
});
}
}
// Save Supply
order.prototype.saveSupply = function(data, method) {
var self = this;
var fields = ['id', 'order_id', 'supply_type_id', 'quantity'];
var values = $.map(data, function(k,v) {
if(v == 'description')
return null;
if(k() == null || k() == undefined) {
return [''];
}
else
return [k()];
});
if(method == "update") {
self.query({
mode: 'update',
table: 'supplies',
fields: fields,
values: values,
where: "Where `order_id`='" + data.orderId() + "' AND `supply_type_id`='"
+ data.supplyTypeId() + "'"
});
}
else {
self.query({
mode: 'insert',
table: 'supplies',
fields: fields,
values: values
});
}
}
// Save Drug Order
order.prototype.saveDrugOrder = function(order, orders) {
var self = this;
var fields = ['id', 'order_id', 'scr', 'crcl', 'medicine', 'dose', 'basis',
'prescribed_dose', 'route', 'diluent', 'volume', 'duration',
'seq', 'days', 'instructions', 'calculated_dose'];
var values = $.map(order, function(k, v) {
if(k() == null || k() == undefined)
return [''];
else
return [k()];
});
if(values[0] != "") {
return self.query({
mode: 'update',
table: 'drug_order',
fields: fields,
values: values,
where: "WHERE id='" + order.id() + "'"
});
}
else {
return self.query({
mode: 'select',
table: 'drug_order',
fields: 'id',
order: "ORDER BY id DESC",
LIMIT: "LIMIT 1"
}).success(function(data) {
var id = 1;
if(data.length > 0)
id = parseInt(data[0].id) + 1;
order.id(id);
values[0] = id;
return self.query({
mode: 'insert',
table: 'drug_order',
fields: fields,
values: values
});
});
}
}
// Save Venous Access
order.prototype.saveVenousAccess = function(venous) {
var self = this;
// Get date
venous.date(forms.dbDate(forms.currentDate()));
var fields = ['id', 'service_record_id', 'day', 'port_access', 'pulse', 'temp', 'bp', 'time', 'date'];
var values = $.map(venous, function(k, v) {
if(k() == null || k() == undefined)
return [''];
else
return [k()];
});
if(values[0] != "") {
return self.query({
mode: 'update',
table: 'venous_access',
fields: fields,
values: values,
where: "WHERE id='" + venous.id() + "'"
});
}
else {
return self.query({
mode: 'select',
table: 'venous_access',
fields: 'id',
order: "ORDER BY id DESC",
LIMIT: "LIMIT 1"
}).success(function(data) {
var id = 1;
if(data.length > 0)
id = parseInt(data[0].id) + 1;
venous.id(id);
values[0] = id;
return self.query({
mode: 'insert',
table: 'venous_access',
fields: fields,
values: values
});
});
}
}
// Save Medication Order Log
order.prototype.saveMedicationOrderLog = function(order) {
var self = this;
var fields = ['id', 'order_id', 'medicine', 'quantity', 'actual_dose', 'sequence_number',
'start_time', 'diluent', 'volume', 'duration', 'end_time', 'comment'];
var values = $.map(order, function(k, v) {
if(k() == null || k() == undefined)
return [''];
else
return [k()];
});
if(values[0] != "") {
return self.query({
mode: 'update',
table: 'medication_order_log',
fields: fields,
values: values,
where: "WHERE id='" + order.id() + "'"
});
}
else {
return self.query({
mode: 'select',
table: 'medication_order_log',
fields: 'id',
order: "ORDER BY id DESC",
LIMIT: "LIMIT 1"
}).success(function(data) {
var id = 1;
if(data.length > 0)
id = parseInt(data[0].id) + 1;
order.id(id);
values[0] = id;
return self.query({
mode: 'insert',
table: 'medication_order_log',
fields: fields,
values: values
});
});
}
}
// Save Medication
order.prototype.saveMedication = function(med) {
var self = this;
var fields = ['id', 'service_record_id', 'medicine', 'strength', 'quantity', 'route',
'sigs', 'status', 'prescribed_by', 'prescribed_date', 'discontinued_by',
'discontinued_date', 'comment', 'is_ordered', 'dispensed_quantity',
'refill', 'refill_quantity'];
var values = $.map(med, function(k, v) {
if(k() == null || k() == undefined)
return [''];
else
return [k()];
});
if(values[0] != "") {
return self.query({
mode: 'update',
table: 'medication',
fields: fields,
values: values,
where: "WHERE id='" + med.id() + "'"
});
}
else {
return self.query({
mode: 'select',
table: 'medication',
fields: 'id',
order: "ORDER BY id DESC",
LIMIT: "LIMIT 1"
}).success(function(data) {
var id = 1;
if(data.length > 0)
id = parseInt(data[0].id) + 1;
med.id(id);
values[0] = id;
return self.query({
mode: 'insert',
table: 'medication',
fields: fields,
values: values
});
});
}
}
/**********************************************************************************************
* Delete Methods
*
* These methods remove information from the database via DELETE queries
*********************************************************************************************/
// Delete Personal Information for a Single Patient
order.prototype.deletePatient = function(id) {
return this.query({
mode: 'delete',
table: 'order',
where: "WHERE id='" + id + "'"
});
}
// Delete Service Record for a Single Patient
order.prototype.deleteServiceRecord = function(id) {
return this.query({
mode: 'delete',
table: 'service_record',
where: "WHERE id='" + id + "'"
});
}
// Delete Order
order.prototype.deleteOrder = function(id, group) {
return this.query({
mode: 'delete',
table: 'orders',
where: "WHERE order_category_id='" + id + "' AND `group`='" + group + "'"
});
}
// Delete Office Procedure
order.prototype.deleteOfficeProcedure = function(data) {
return this.query({
mode: 'delete',
table: 'office_procedure',
where: "WHERE order_id='" + data.orderId() + "' AND office_procedure_type_id='" + data.officeProcedureTypeId() + "'"
});
}
// Delete Supplies
order.prototype.deleteSupply = function(data) {
return this.query({
mode: 'delete',
table: 'supplies',
where: "WHERE order_id='" + data.orderId() + "' AND supply_type_id='" + data.supplyTypeId() + "'"
});
}
// Delete Drug Order
order.prototype.deleteDrugOrder = function(id) {
return this.query({
mode: 'delete',
table: 'drug_order',
where: "WHERE id='" + id + "'"
});
}
// Delete Vital
order.prototype.deleteVital = function(id) {
return this.query({
mode: 'delete',
table: 'venous_access',
where: "WHERE id='" + id + "'"
});
}
// Delete Medication Order Log
order.prototype.deleteMedicationOrderLog = function(id) {
return this.query({
mode: 'delete',
table: 'medication_order_log',
where: "WHERE id='" + id + "'"
});
}
// Delete Medication
order.prototype.deleteMedication = function(id) {
return this.query({
mode: 'delete',
table: 'medication',
where: "WHERE id='" + id + "'"
});
}
/**********************************************************************************************
* Query
*
* This method is used by all other methods to execute the ajax call.
*********************************************************************************************/
order.prototype.query = function(data) {
return $.getJSON('php/query.php',data);
}
/**************************************************************************************************
* Return class so it is usable.
*************************************************************************************************/
return order;
}); | vijaybhalla/PatientCare | App/modules/order.js | JavaScript | mit | 20,026 |
# Certify The Web - Certificate Manager UI for Windows
- Home page for downloads, info and support : [https://certifytheweb.com/](https://certifytheweb.com/)
- Documentation: [https://docs.certifytheweb.com](https://docs.certifytheweb.com)
- Community Discussions: [https://community.certifytheweb.com](https://community.certifytheweb.com)
- Changelog (release notes): https://certifytheweb.com/home/changelog
The SSL/TLS Certificate Management GUI for Windows, powered by [Let's Encrypt](https://letsencrypt.org/) and other ACME certificate authorities. This app makes it easy to automatically request, install and continuously renew free certificates for Windows/IIS or for any other services which requires a domain certificate.
**Certify The Web is used by hundreds of thousands of organisations to manage millions of certificates each month** and is the perfect solution for administrators who want visibility of certificate management for their domains. Centralised dashboard status reporting is also available.


## Features include:
- See more details: https://certifytheweb.com/home/features
- Easy certificate requests & automated SSL bindings (IIS)
- Fetch certificates from ACME Certificate Authorities including **Let's Encrypt, BuyPass Go and ZeroSSL**
- Works with private ACME CA servers including DigiCert, smallstep, Keyon true-Xtender etc.
- Automatic renewal using a background service, with configurable renewal frequency.
- Preview mode to see which actions the app will perform (including which bindings will be added/updated)
- SAN support (multi-domain certificates)
- Single domains, multiple-domains (SAN) and wildcard certificates (*.example.com)
- Http or DNS challenge validation.
- Built-in Http Challenge Server for easier configuration of challenge responses
- DNS Validation via over 26 supported APIs (including Azure DNS, Alibaba Cloud, AWS Route53, Cloudflare, DnsMadeEasy, GoDaddy, OVH, SimpleDNSPlus)
- Stored Credentials (API access keys etc. protected by the Windows Data Protection API)
- Optional pre/post request Deployment Tasks and scripting for advanced deployment (**Exchange, RDS, multi-server, CCS, Apache, nginx, export, webhooks, Azure KeyVault etc**)
The Community edition is free, license keys are available for commercial organisations, users who wish to help fund development or users who require support.
## Requirements:
- Windows Server 2012 R2 or higher (.Net 4.6.2 or higher), 64-bit
- PowerShell 5.1 or higher (for functionality like Deployment Tasks and some DNS providers).
----------
Quick Start (IIS users)
----------
1. Download from [https://certifytheweb.com/](https://certifytheweb.com/) and install it. Chocolatey users can alternatively `choco install certifytheweb`.
2. Click 'New Certificate', optionally choose your IIS site (binding hostnames will be auto detected, or just enter them manually). Save your settings and click 'Request Certificate'
3. All done! The certificate will renew automatically.
Users with more complex requirements can explore the different validation modes, deployment modes and other advanced options.
https://docs.certifytheweb.com
| webprofusion/Certify | README.md | Markdown | mit | 3,325 |
var should = require('should'), // eslint-disable-line no-unused-vars
utils = require('./utils'),
thisCheck = require('../lib/checks/030-assets');
describe('030 Assets', function () {
const options = {checkVersion: 'v3'};
it('should show a warning for missing asset helper when an asset is detected', function (done) {
utils.testCheck(thisCheck, '030-assets/missing', options).then(function (output) {
output.should.be.a.ValidThemeObject();
output.results.pass.should.be.an.Array().with.lengthOf(1);
output.results.pass.should.containEql('GS030-ASSET-SYM');
output.results.fail.should.be.an.Object().with.keys('GS030-ASSET-REQ');
output.results.fail['GS030-ASSET-REQ'].should.be.a.ValidFailObject();
output.results.fail['GS030-ASSET-REQ'].failures.should.be.an.Array().with.lengthOf(1);
output.results.fail['GS030-ASSET-REQ'].failures[0].should.have.keys('ref', 'message');
output.results.fail['GS030-ASSET-REQ'].failures[0].ref.should.eql('default.hbs');
output.results.fail['GS030-ASSET-REQ'].failures[0].message.should.eql('/assets/css/style.css');
done();
}).catch(done);
});
it('should show two warning for missing asset helper when an assets are detected in multiple files', function (done) {
utils.testCheck(thisCheck, '030-assets/twoDefectFiles').then(function (output) {
output.should.be.a.ValidThemeObject();
output.results.pass.should.be.an.Array().with.lengthOf(1);
output.results.pass.should.containEql('GS030-ASSET-SYM');
output.results.fail.should.be.an.Object().with.keys('GS030-ASSET-REQ');
output.results.fail['GS030-ASSET-REQ'].should.be.a.ValidFailObject();
output.results.fail['GS030-ASSET-REQ'].failures.should.be.an.Array().with.lengthOf(2);
output.results.fail['GS030-ASSET-REQ'].failures[0].should.have.keys('ref');
output.results.fail['GS030-ASSET-REQ'].failures[0].ref.should.eql('default.hbs');
output.results.fail['GS030-ASSET-REQ'].failures[0].should.have.keys('message');
output.results.fail['GS030-ASSET-REQ'].failures[0].message.should.eql('/assets/css/style.css');
output.results.fail['GS030-ASSET-REQ'].failures[1].should.have.keys('ref');
output.results.fail['GS030-ASSET-REQ'].failures[1].ref.should.eql('partials/sidebar.hbs');
output.results.fail['GS030-ASSET-REQ'].failures[1].should.have.keys('message');
output.results.fail['GS030-ASSET-REQ'].failures[1].message.should.eql('/assets/images/JohnDo.jpg');
done();
}).catch(done);
});
it('should pass when asset helper is present', function (done) {
utils.testCheck(thisCheck, '030-assets/valid', options).then(function (output) {
output.should.be.a.ValidThemeObject();
output.results.fail.should.be.an.Object().which.is.empty();
output.results.pass.should.be.an.Array().with.lengthOf(2);
output.results.pass.should.containEql('GS030-ASSET-REQ');
output.results.pass.should.containEql('GS030-ASSET-SYM');
done();
}).catch(done);
});
it('should show error when symlink is present', function (done) {
utils.testCheck(thisCheck, '030-assets/symlink', options).then(function (output) {
output.should.be.a.ValidThemeObject();
output.results.pass.should.be.an.Array().with.lengthOf(1);
output.results.pass.should.containEql('GS030-ASSET-REQ');
output.results.fail.should.be.an.Object().with.keys('GS030-ASSET-SYM');
output.results.fail['GS030-ASSET-SYM'].should.be.a.ValidFailObject();
output.results.fail['GS030-ASSET-SYM'].failures.should.be.an.Array().with.lengthOf(1);
output.results.fail['GS030-ASSET-SYM'].failures[0].should.have.keys('ref');
output.results.fail['GS030-ASSET-SYM'].failures[0].ref.should.eql('assets/mysymlink.png');
done();
}).catch(done);
});
});
| TryGhost/gscan | test/030-assets.test.js | JavaScript | mit | 4,163 |
# Web Design for Everybody Capstone by University of Michigan
original - http://alexomb.eu/omb/en/
my project - https://lexnekr.github.io/Coursera-webdesign-capstone/index.html (GithubPages)
## Prototipes
**Mobile:**
1 - https://wireframe.cc/X93UOk
2 - https://wireframe.cc/HbF0ft
3 - https://wireframe.cc/cHLCKD
4 - https://wireframe.cc/uTPcuv
**Tab:**
5 - https://wireframe.cc/4c0VIr
6 - https://wireframe.cc/55SCvF
7 - https://wireframe.cc/Pch5A0
8 - https://wireframe.cc/oS30NA
**Desctop:**
9 - https://wireframe.cc/iws5zf
11 - https://wireframe.cc/LbUgus
12 - https://wireframe.cc/yOF4iL
| lexnekr/Coursera-webdesign-capstone | README.md | Markdown | mit | 611 |
#ifndef PBS_DEBUG_HPP
#define PBS_DEBUG_HPP
#include "PBSBase.hpp"
#if defined(DEBUG1) or defined(DEBUG2)
#define stdlog stderr
static char __kit_log_buffer[MAX_LOG_BUFFER];
std::string getLogTime() {
static char buffer[256];
struct tm *timeNowTMObject;
time_t timeNowTimeTObject;
time(&timeNowTimeTObject);
timeNowTMObject = localtime(&timeNowTimeTObject);
strftime(buffer, sizeof(buffer), "[%F %T]", timeNowTMObject);
return buffer;
}
void flog(const char *fmt, ...) {
va_list argp;
va_start(argp, fmt);
int length = strlen(fmt);
__kit_log_buffer[0] = '\0';
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "\033[;32m%s \033[;35mFATHER PROCESS:\033[;0m ", getLogTime().c_str());
for (int i = 0; i < length; i++) {
if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%d", va_arg(argp, int));
i++;
} else if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 's') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%s", va_arg(argp, const char *));
i++;
} else if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 'c') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%c", va_arg(argp, int));
i++;
} else if (i + 3 < length && fmt[i] == '%' && fmt[i + 1] == 'l' && fmt[i + 2] == 'l' && fmt[i + 3] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%lld", va_arg(argp, long long));
i += 3;
} else if (i + 2 < length && fmt[i] == '%' && fmt[i + 1] == 'l' && fmt[i + 2] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%ld", va_arg(argp, long));
i += 2;
} else {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%c", fmt[i]);
}
}
fprintf(stdlog, "%s", __kit_log_buffer);
va_end(argp);
}
void slog(const char *fmt, ...) {
va_list argp;
va_start(argp, fmt);
int length = strlen(fmt);
__kit_log_buffer[0] = '\0';
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "\033[;32m%s \033[;36mCHILD PROCESS:\033[;0m ", getLogTime().c_str());
for (int i = 0; i < length; i++) {
if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%d", va_arg(argp, int));
i++;
} else if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 's') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%s", va_arg(argp, const char *));
i++;
} else if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 'c') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%c", va_arg(argp, int));
i++;
} else if (i + 3 < length && fmt[i] == '%' && fmt[i + 1] == 'l' && fmt[i + 2] == 'l' && fmt[i + 3] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%lld", va_arg(argp, long long));
i += 3;
} else if (i + 2 < length && fmt[i] == '%' && fmt[i + 1] == 'l' && fmt[i + 2] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%ld", va_arg(argp, long));
i += 2;
} else {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%c", fmt[i]);
}
}
fprintf(stdlog, "%s", __kit_log_buffer);
va_end(argp);
}
void tlog(const char *fmt, ...) {
va_list argp;
va_start(argp, fmt);
int length = strlen(fmt);
__kit_log_buffer[0] = '\0';
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "\033[;32m%s \033[;33mTIMER PROCESS:\033[;0m ", getLogTime().c_str());
for (int i = 0; i < length; i++) {
if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%d", va_arg(argp, int));
i++;
} else if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 's') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%s", va_arg(argp, const char *));
i++;
} else if (i + 1 < length && fmt[i] == '%' && fmt[i + 1] == 'c') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%c", va_arg(argp, int));
i++;
} else if (i + 3 < length && fmt[i] == '%' && fmt[i + 1] == 'l' && fmt[i + 2] == 'l' && fmt[i + 3] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%lld", va_arg(argp, long long));
i += 3;
} else if (i + 2 < length && fmt[i] == '%' && fmt[i + 1] == 'l' && fmt[i + 2] == 'd') {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%ld", va_arg(argp, long));
i += 2;
} else {
sprintf(__kit_log_buffer + strlen(__kit_log_buffer), "%c", fmt[i]);
}
}
fprintf(stdlog, "%s", __kit_log_buffer);
va_end(argp);
}
#endif
#endif
| Kipsora/KitJudge | tools/server/judger/sandbox/include/PBSDebug.hpp | C++ | mit | 4,405 |
/*
* OffloadingManager.h
*
* Created on: 19/set/2014
* Author: greeneyes
*/
#ifndef SRC_NETWORK_OFFLOADINGMANAGER_H_
#define SRC_NETWORK_OFFLOADINGMANAGER_H_
#include <Network/Cooperator.h>
#include <Network/Queue.h>
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <vector>
class NodeNetworkSystem;
class NodeProcessingSystem;
class Connection;
class StartATCMsg;
class DataATCMsg;
class VisualFeatureDecoding;
class Session;
class Message;
class NetworkNode;
#define OFFLOADING_F (float)1514
#define OFFLOADING_H (float)66
class OffloadingManager {
public:
OffloadingManager(NodeProcessingSystem* nps, NodeNetworkSystem* nns);
static OffloadingManager* getInstance(NodeProcessingSystem* nps,
NodeNetworkSystem* nns);
static OffloadingManager* getInstance() {
return _instance;
}
//add keypoints and features from cooperators
void addKeypointsAndFeatures(std::vector<cv::KeyPoint>& kpts,
cv::Mat& features, Session* session, double detTime,
double descTime, double kencTime, double fencTime);
//reset variables and keep track of progresses
void createOffloadingTask(int num_cooperators);
void addCooperator(NetworkNode* c);
void removeCooperator(NetworkNode* c);
cv::Mat computeLoads(cv::Mat& image);
void transmitLoads();
void transmitStartATC(StartATCMsg* const msg);
void timerExpired(const boost::system::error_code& error);
void startTimer();
void runThread();
int getNumAvailableCoop();
void queueATCMsg(DataATCMsg* msg) {
_offloadingQueue.push(msg);
}
void waitForCooperators() {
boost::mutex::scoped_lock lock(_coopRespWaitMutex);
while (_waitingForCoopsResp) {
_coopRespWaitCondVar.wait_for(lock, _waitPeriod);
}
}
std::vector<cv::KeyPoint> getFullKeypoints() const {
return keypoint_buffer;
}
cv::Mat getFullFeatures() const {
return features_buffer;
}
std::vector<unsigned char> getCooperatorsIds() const;
cv::Mat splitLoads(const cv::Mat& wholeImage, const unsigned char numCoops);
private:
const static unsigned char _DEBUG = 2;
const static unsigned short _timerExpiryTime = 2; //[s]
boost::chrono::milliseconds _waitPeriod;
static OffloadingManager* _instance;
bool _waitingForCoopsResp;
mutable boost::mutex _coopArrayMutex;
mutable boost::mutex _coopRespWaitMutex;
boost::condition_variable _coopRespWaitCondVar;
unsigned char _cooperatorsToUse;
unsigned char _receivedCooperators;
std::vector<Cooperator> cooperators;
unsigned char _frameId;
void _probeLinks();
void _sortCooperators();
void _startIncomingThread() {
boost::thread(&OffloadingManager::_incomingThread, this);
}
void _incomingThread();
NodeProcessingSystem* _nodeProcessingSystem;
NodeNetworkSystem* _nodeNetworkSystem;
VisualFeatureDecoding* _decoder;
//used to store keypoints and features from cooperators
std::vector<cv::KeyPoint> keypoint_buffer;
cv::Mat features_buffer;
boost::thread r_thread;
double camDetTime, camDescTime, camkEncTime, camfEncTime;
boost::asio::io_service io;
//deadline timer for receiving data from all cooperators
boost::asio::deadline_timer _timer;
boost::asio::io_service::work work;
Queue<DataATCMsg> _offloadingQueue;
OperativeMode _lastOpMode;
};
#endif /* OFFLOADINGMANAGER_H_ */
| greeneyesproject/testbed-demo | vsn/src/Network/OffloadingManager.h | C | mit | 3,297 |
# A modified main pdb debugger loop (see pdb.py in the Python library!)
from pdb import *
import sys,os,traceback
def main():
mainpyfile = sys.argv[1] # Get script filename
if not os.path.exists(mainpyfile):
print 'Error:', mainpyfile, 'does not exist'
sys.exit(1)
del sys.argv[0] # Hide "pdb.py" from argument list
# Replace pdb's dir with script's dir in front of module search path.
sys.path[0] = os.path.dirname(mainpyfile)
pdb = Pdb()
# 1st customization: prompt w/ a line feed!
pdb.prompt = '(PDB)\n'
# 2nd customization: not an infinite loop!
try:
pdb._runscript(mainpyfile)
if pdb._user_requested_quit:
return
print "The program finished and will not be restarted"
except SystemExit:
# In most cases SystemExit does not warrant a post-mortem session.
print "The program exited via sys.exit(). Exit status: ",
print sys.exc_info()[1]
except:
traceback.print_exc()
print "Uncaught exception. Entering post mortem debugging"
t = sys.exc_info()[2]
while t.tb_next is not None:
t = t.tb_next
pdb.interaction(t.tb_frame,t)
# When invoked as main program, invoke the debugger on a script
if __name__=='__main__':
main()
# under Windows, we need to run Python w/ the -i flag; this ensures that we die!
sys.exit(0)
| ArcherSys/ArcherSys | Lua/SciTE/scite-debug/xpdb.py | Python | mit | 1,418 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Verifier extends CI_Controller {
function __construct() {
parent::__construct();
$this->page_data = array();
$this->load->model("model_verifier");
//$this->load->library('excel');
//$this->page_data["page_content_1"] = "";
}
public function index(){
redirect("verifier/login");
}
public function login() {
if(($this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
redirect('verifier/dashboard');
}
else{
$this->load->view('login');
}
}
public function login_validation() {
if(($this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
redirect('verifier/dashboard');
}
if($this->input->post()){
$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('password', 'Password', 'required');
if($this->form_validation->run() == FALSE){
$this->load->view("login");
}
else{
if($this->model_verifier->login()){
redirect('verifier/dashboard');
}
else{
$data = array(
'err_msg' => "Incorrect Username or Password"
);
$this->load->view('login',$data);
}
}
}
}
public function logout(){
//$userdata = $this->session->all_userdata();
//print_r($userdata);
$this->model_verifier->update_userdata();
$this->session->sess_destroy();
redirect("verifier/login");
}
public function print_error($message){
$this->page_data["err_msg"] = $message;
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('fail_alert_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function print_success($message){
$this->page_data["err_msg"] = $message;
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('success_alert_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function dashboard() {
$this->page_data["message"] = $this->model_verifier->get_message_count();
$this->page_data["pending_approval_siv_no"] = $this->model_verifier->get_no_of_siv('PENDING_APPROVAL');
$this->page_data["approved_siv_no"] = $this->model_verifier->get_no_of_siv('APPROVED');
$this->page_data["rejected_siv_no"] = $this->model_verifier->get_no_of_siv('REJECTED');
$this->page_data["pending_approval_bom_no"] = $this->model_verifier->get_no_of_bom('PENDING_APPROVAL');
$this->page_data["approved_bom_no"] = $this->model_verifier->get_no_of_bom('APPROVED');
$this->page_data["rejected_bom_no"] = $this->model_verifier->get_no_of_bom('REJECTED');
$this->page_data["no_of_uploaded_boms"] = $this->model_verifier->get_no_of_uploaded_bom();
$this->page_data["no_of_calendar_events"] = $this->model_verifier->get_no_of_calendar_events();
$this->page_data["no_of_eg_to_expire"] = $this->model_verifier->get_no_of_components_to_expire_in_3('em');
$this->page_data["no_of_fg_to_expire"] = $this->model_verifier->get_no_of_components_to_expire_in_3('fm');
if(($this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_dashboard_view.php',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
//print_r($this->page_data);
}
else {
redirect("verifier/login");
}
}
//**************SIV***************
public function view_siv_list($type) {
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
//echo $type;
$this->page_data['type'] = $type;
$this->page_data['siv'] = $this->model_verifier->get_issued_siv($type);
//print_r($this->page_data['siv']);
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_siv_list_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function view_full_siv($siv_no) {
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$siv_details = $this->model_verifier->get_siv_by_siv_no($siv_no);
$siv_table_name = $siv_details['table_name'];
//echo $siv_table_name;
$component_details = $this->model_verifier->get_components_of_siv($siv_table_name);
//print_r($component_details);
$this->page_data['siv_details'] = $siv_details;
$this->page_data['component_details'] = $component_details;
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_view_siv_details_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function approve_siv($siv_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$siv_details = $this->model_verifier->get_siv_by_siv_no($siv_no);
$siv_table_name = $siv_details['table_name'];
$component_details = $this->model_verifier->get_components_of_siv($siv_table_name);
//print_r($siv_details);
//print_r($siv_table_name);
//print_r($component_details);
if($this->model_verifier->insert_approved_siv($siv_details, $component_details)){
if($this->model_verifier->change_siv_status($siv_no, 'APPROVED')){
$this->insert_into_calendar("SIV_".$siv_no, date("Y-m-d") , 'siv_approved');
redirect('verifier/print_success/SIV_Approved_Successfully.');
//$this->print_success("SIV Approved Successfully.");
}
}
else{
$this->print_error("Failed to Approve SIV.");
}
}
public function reject_siv($siv_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
if($this->model_verifier->change_siv_status($siv_no, 'REJECTED')){
$this->insert_into_calendar("SIV_".$siv_no, date("Y-m-d") , 'siv_rejected');
//$this->print_success("SIV Rejected.");
redirect('verifier/print_success/SIV_Rejected.');
}
else{
$this->print_success("Failed to Reject SIV.");
}
}
public function print_siv($siv_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$this->page_data['siv_details'] = $this->model_verifier->get_siv_by_siv_no($siv_no);
$siv_table_name = $this->page_data['siv_details']['table_name'];
$this->page_data['siv_details']['date_of_issue'] = preg_replace("!([0-9]{4})-([0-9]{2})-([0123][0-9])!", "$3/$2/$1", $this->page_data['siv_details']['date_of_issue']); //yyyy-mm-dd -> dd/mm/yyyy
$this->page_data['component_details'] = $this->model_verifier->get_components_of_siv($siv_table_name);
//print_r($this->page_data['siv']);
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->load->view('verifier/verifier_print_siv_view',$this->page_data);
}
public function siv_save_as_excel($siv_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$this->load->library('phpexcel');
$this->load->library('PHPExcel/IOFactory');
$objPHPExcel = new phpexcel();
$siv_details = $this->model_verifier->get_siv_by_siv_no($siv_no);
$siv_table_name = $siv_details['table_name']; //eg: siv_#123_em_2011-11-11_1_alanjose
//echo $siv_table_name;
//print_r($siv_details);
$components = $this->model_verifier->get_components_of_siv($siv_table_name);
$file_name = $siv_table_name.".xlsx";
//print_r($components);
$objPHPExcel->getProperties()->setCreator($this->session->userdata('name')); //author the excel file
$objPHPExcel->getActiveSheet()->mergeCells('A1:D1');
$objPHPExcel->getActiveSheet()->setCellValue('A1', $siv_table_name);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, 2, "component_type"); //insert column headings
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, 2, "component_name");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, 2, "date_of_expiry");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, 2, "component_quantity");
$objPHPExcel->getActiveSheet()->getColumnDimension("A")->setAutoSize(true); //auto width
$objPHPExcel->getActiveSheet()->getColumnDimension("B")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("C")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("D")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getStyle("A1")->applyFromArray(array(
"font" => array(
"bold" => true
),
"alignment" => array(
"horizontal" => PHPExcel_Style_Alignment::HORIZONTAL_CENTER
),
"fill" => array(
"type" => PHPExcel_Style_Fill::FILL_SOLID,
"startcolor" => array(
"rgb" => "3C8DBC"
)
),
"borders" => array(
"allborders" => array(
"style" => PHPExcel_Style_Border::BORDER_THIN
)
)
));
$objPHPExcel->getActiveSheet()->getStyle("A2:D2")->applyFromArray(array(
"font" => array(
"bold" => true
),
"alignment" => array(
"horizontal" => PHPExcel_Style_Alignment::HORIZONTAL_CENTER
),
"fill" => array(
"type" => PHPExcel_Style_Fill::FILL_SOLID,
"startcolor" => array(
"rgb" => "00A65A"
)
),
"borders" => array(
"allborders" => array(
"style" => PHPExcel_Style_Border::BORDER_THIN
)
)
));
$r = 3;
foreach($components as $row){
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $r, $row['component_type']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $r, $row['component_name']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $r, $row['date_of_expiry']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $r, $row['component_quantity']);
$r++;
}
$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel2007');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header("Content-Disposition: attachment;filename=".$file_name);
header('Cache-Control: max-age=0');
$objWriter->save('php://output');
}
//**************BOM***************
public function view_assembled_bom_list($type){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$this->page_data['type'] = $type;
$this->page_data['assembled_bom'] = $this->model_verifier->get_assembled_bom($type);
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_assembled_bom_list_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function view_assembled_bom_full($bom_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$bom_details = $this->model_verifier->get_assembled_bom_details($bom_no);
$components = $this->model_verifier->get_assembled_bom_components($bom_details['table_name']);
//print_r($bom_details);
//print_r($components);
$bom_details['date_of_assembly'] = preg_replace("!([0-9]{4})-([0-9]{2})-([0123][0-9])!", "$3/$2/$1", $bom_details['date_of_assembly']); //yyyy-mm-dd -> dd/mm/yyyy
$this->page_data['bom_details'] = $bom_details;
$this->page_data['components'] = $components;
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_view_assembled_bom_details_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function approve_bom($bom_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$bom_details = $this->model_verifier->get_assembled_bom_details($bom_no);
//print_r($bom_details);
$bom_table_name = $bom_details['table_name'];
$component_details = $this->model_verifier->get_assembled_bom_components($bom_table_name);
//print_r($component_details);
if($this->model_verifier->reserve_approved_bom($bom_details, $component_details)){
if($this->model_verifier->change_bom_status($bom_no, 'APPROVED')){
$this->insert_into_calendar("BOM_".$bom_no, date("Y-m-d") , 'bom_approved');
//$this->print_success("BOM Approved Successfully.");
redirect('verifier/print_success/BOM_Approved_Successfully.');
}
}
else{
$this->print_error("Failed to Approve BOM.");
}
}
public function reject_bom($bom_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
if($this->model_verifier->change_bom_status($bom_no, 'REJECTED')){
$this->insert_into_calendar("BOM_".$bom_no, date("Y-m-d") , 'bom_rejected');
redirect('verifier/print_success/BOM_Rejected.');
//$this->print_success("BOM Rejected.");
}
else{
$this->print_success("Failed to Reject BOM.");
}
}
public function print_assembled_bom($bom_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$bom_details = $this->model_verifier->get_assembled_bom_details($bom_no);
$components = $this->model_verifier->get_assembled_bom_components($bom_details['table_name']);
//print_r($bom_details);
//print_r($components);
$bom_details['date_of_assembly'] = preg_replace("!([0-9]{4})-([0-9]{2})-([0123][0-9])!", "$3/$2/$1", $bom_details['date_of_assembly']); //yyyy-mm-dd -> dd/mm/yyyy
$this->page_data['bom_details'] = $bom_details;
$this->page_data['components'] = $components;
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->load->view('verifier/verifier_print_assembled_bom',$this->page_data);
}
public function assembled_bom_save_as_excel($bom_no) { //save as excel for approved, rejected and pending
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$bom_details = $this->model_verifier->get_bom_by_bom_no($bom_no);
if($bom_details['bom_status'] == "APPROVED") {
$this->load->library('phpexcel');
$this->load->library('PHPExcel/IOFactory');
$objPHPExcel = new phpexcel();
$bom_details = $this->model_verifier->get_bom_by_bom_no($bom_no);
$bom_table_name = strtolower($bom_details['bom_name']."_".$bom_details['model_grade']."_".$bom_details['bom_model_no']."_".$bom_details['date_of_assembly']."_".$bom_details['no_of_components']); //eg: athil_em_431_2031-12-23_5
//'component_type, component_name, required_quantity'
//echo $bom_table_name;
//print_r($bom_details);
$components = $this->model_verifier->get_components_of_bom_approved($bom_table_name);
$file_name = $bom_table_name.".xlsx";
//print_r($components);
$objPHPExcel->getProperties()->setCreator($this->session->userdata('name')); //author the excel file
$objPHPExcel->getActiveSheet()->mergeCells('A1:E1');
$objPHPExcel->getActiveSheet()->setCellValue('A1', $bom_table_name);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, 2, "component_no"); //insert column headings
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, 2, "component_type");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, 2, "component_name");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, 2, "required_quantity");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, 2, "issued_quantity");
$objPHPExcel->getActiveSheet()->getColumnDimension("A")->setAutoSize(true); //auto width
$objPHPExcel->getActiveSheet()->getColumnDimension("B")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("C")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("D")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("E")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getStyle("A1")->applyFromArray(array(
"font" => array(
"bold" => true
),
"alignment" => array(
"horizontal" => PHPExcel_Style_Alignment::HORIZONTAL_CENTER
),
"fill" => array(
"type" => PHPExcel_Style_Fill::FILL_SOLID,
"startcolor" => array(
"rgb" => "3C8DBC"
)
),
"borders" => array(
"allborders" => array(
"style" => PHPExcel_Style_Border::BORDER_THIN
)
)
));
$objPHPExcel->getActiveSheet()->getStyle("A2:E2")->applyFromArray(array(
"font" => array(
"bold" => true
),
"alignment" => array(
"horizontal" => PHPExcel_Style_Alignment::HORIZONTAL_CENTER
),
"fill" => array(
"type" => PHPExcel_Style_Fill::FILL_SOLID,
"startcolor" => array(
"rgb" => "00A65A"
)
),
"borders" => array(
"allborders" => array(
"style" => PHPExcel_Style_Border::BORDER_THIN
)
)
));
$r = 3;
$i = 1;
foreach($components as $row){
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $r, $i++);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $r, $row['component_type']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $r, $row['component_name']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $r, $row['required_quantity']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $r, $row['issued_quantity']);
$r++;
}
$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel2007');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header("Content-Disposition: attachment;filename=".$file_name);
header('Cache-Control: max-age=0');
$objWriter->save('php://output');
}
else {
$this->load->library('phpexcel');
$this->load->library('PHPExcel/IOFactory');
$objPHPExcel = new phpexcel();
$bom_details = $this->model_verifier->get_bom_by_bom_no($bom_no);
$bom_table_name = strtolower($bom_details['bom_name']."_".$bom_details['model_grade']."_".$bom_details['bom_model_no']."_".$bom_details['date_of_assembly']."_".$bom_details['no_of_components']); //eg: athil_em_431_2031-12-23_5
//'component_type, component_name, required_quantity'
//echo $bom_table_name;
//print_r($bom_details);
$components = $this->model_verifier->get_components_of_bom($bom_table_name);
$file_name = $bom_table_name.".xlsx";
//print_r($components);
$objPHPExcel->getProperties()->setCreator($this->session->userdata('name')); //author the excel file
$objPHPExcel->getActiveSheet()->mergeCells('A1:D1');
$objPHPExcel->getActiveSheet()->setCellValue('A1', $bom_table_name);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, 2, "component_no"); //insert column headings
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, 2, "component_type");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, 2, "component_name");
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, 2, "required_quantity");
/*if($bom_details['bom_status'] == "APPROVED") {
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, 2, "issued_quantity");
}*/
$objPHPExcel->getActiveSheet()->getColumnDimension("A")->setAutoSize(true); //auto width
$objPHPExcel->getActiveSheet()->getColumnDimension("B")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("C")->setAutoSize(true);
$objPHPExcel->getActiveSheet()->getColumnDimension("D")->setAutoSize(true);
/*if($bom_details['bom_status'] == "APPROVED") {
$objPHPExcel->getActiveSheet()->getColumnDimension("E")->setAutoSize(true);
}*/
$objPHPExcel->getActiveSheet()->getStyle("A1")->applyFromArray(array(
"font" => array(
"bold" => true
),
"alignment" => array(
"horizontal" => PHPExcel_Style_Alignment::HORIZONTAL_CENTER
),
"fill" => array(
"type" => PHPExcel_Style_Fill::FILL_SOLID,
"startcolor" => array(
"rgb" => "3C8DBC"
)
),
"borders" => array(
"allborders" => array(
"style" => PHPExcel_Style_Border::BORDER_THIN
)
)
));
$objPHPExcel->getActiveSheet()->getStyle("A2:D2")->applyFromArray(array(
"font" => array(
"bold" => true
),
"alignment" => array(
"horizontal" => PHPExcel_Style_Alignment::HORIZONTAL_CENTER
),
"fill" => array(
"type" => PHPExcel_Style_Fill::FILL_SOLID,
"startcolor" => array(
"rgb" => "00A65A"
)
),
"borders" => array(
"allborders" => array(
"style" => PHPExcel_Style_Border::BORDER_THIN
)
)
));
$r = 3;
$i = 1;
foreach($components as $row){
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $r, $i++);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $r, $row['component_type']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $r, $row['component_name']);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $r, $row['required_quantity']);
/* if($bom_details['bom_status'] == "APPROVED") {
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $r, $row['issued_quantity']);
}
*/
$r++;
}
$objWriter = IOFactory::createWriter($objPHPExcel, 'Excel2007');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header("Content-Disposition: attachment;filename=".$file_name);
header('Cache-Control: max-age=0');
$objWriter->save('php://output');
}
}
public function delete_assembled_bom($bom_no){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
if($this->model_verifier->delete_assembled_bom($bom_no)){
redirect('verifier/print_success/BOM_Successfully_Deleted.');
}
else {
$this->print_error("BOM Delete Failed!");
}
}
//************RESCREEN****************
public function get_components_for_rescreen($type){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$this->page_data['rescreen_components'] = $this->model_verifier->get_components_for_rescreen($type);
$this->page_data['users'] = $this->model_verifier->get_users('user');
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_to_rescreen_list_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function assign_rescreen(){
$data = $this->input->post();
$sl_no = $this->input->post('sl_no');
$sl_no = $sl_no - 1;
$rescreen_array = array(
'grade' => $data['grade'][$sl_no],
'component_type' => $data['component_type'][$sl_no],
'component_name' => $data['component_name'][$sl_no],
'date_of_expiry' => $data['date_of_expiry'][$sl_no],
'component_quantity' => $data['component_quantity'][$sl_no],
'assigned_user' => $this->input->post('assigned_user')
);
if($this->model_verifier->send_for_rescreen($rescreen_array)){
$this->insert_into_calendar("Re-Screen_Pending", date("Y-m-d") , 'rescreen_pending');
redirect('verifier/print_success/Re-Screen_Assigned_Successfully');
}
else{
$this->print_error("Error! Failed To Assign Re-Screen.");
}
}
public function get_completed_rescreens(){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$this->page_data['rescreens'] = $this->model_verifier->get_rescreens('RESCREEN_OVER');
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_completed_rescreens_list_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function get_approved_rescreens(){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$this->page_data['rescreens'] = $this->model_verifier->get_rescreens('RESCREEN_APPROVED');
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_approved_rescreens_list_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function pending_rescreen() {
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
//$this->get_session_details();
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
//$this->page_data["page_content"] = $this->load->view('verifier/verifier_dashboard_view',$this->page_data,TRUE);
$this->page_data["page_content"] = $this->load->view('verifier/verifier_pending_rescreen_list_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
//print_r($this->page_data);
}
public function view_completed_rescreen($rescreen_id){
$this->page_data['rescreen_data'] = $this->model_verifier->get_rescreen_data($rescreen_id);
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_view_completed_rescreen',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function approve_rescreen($rescreen_id){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
if($this->model_verifier->approve_rescreen($rescreen_id)){
$this->insert_into_calendar("Re-Screen_Approved" , date("Y-m-d") , 'rescreen_approved');
redirect('verifier/print_success/Re-Screen_Approved_Successfully');
}
else{
$this->print_error("Error! Failed to Approve Re-Screen.");
}
}
//*******************CALENDAR************
public function calendar(){
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
//$this->page_data['users'] = $this->model_verifier->get_users('user');
$this->page_data["page_content"] = $this->load->view('verifier/verifier_message_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count;
$this->load->view('verifier/verifier_calendar_view',$this->page_data);
}
public function calendar_get_events() {
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
$events = $this->model_verifier->get_calendar_events();
echo json_encode($events);
}
public function insert_into_calendar($title, $start, $type){ //add rescreen and etc
if((!$this->session->userdata('user_status')) && ($this->session->userdata('user_type') == 'verifier')){
$this->login();
}
switch($type) {
case 'siv_entered' : $color = 'rgb(0,192,239)';
break;
case 'siv_approved' : $color = 'rgb(0,166,90)';
break;
case 'siv_rejected' : $color = 'rgb(221,75,57)';
break;
case 'bom_created' : $color = 'rgb(17,17,17)';
break;
case 'bom_entered' : $color = 'rgb(0,115,183)';
break;
case 'bom_approved' : $color = 'rgb(1,255,112)';
break;
case 'bom_rejected' : $color = 'rgb(96,92,168)';
break;
case 'rescreen_pending' : $color = 'rgb(114,175,210)';
break;
case 'rescreen_completed' : $color = 'rgb(0,31,63)';
break;
case 'rescreen_approved' : $color = 'rgb(210,214,222)';
break;
}
$this->model_verifier->insert_event($title, $start, $color);
}
//*************MESSAGES*****************
public function message($receiver_name = null) { //new
$users = $this->model_verifier->get_all_user_names();
$this->page_data['user_names'] = $users;
if($this->input->post()) {
$receiver_name = $this->input->post('receiver_name');
$sender_name = $this->session->userdata('user_name');
$message_details = $this->model_verifier->get_message_by_sender_name_receiver_name($sender_name, $receiver_name);
$this->page_data['message_details'] = $message_details;
}
else {
if($receiver_name != null) {
$sender_name = $this->session->userdata('user_name');
$message_details = $this->model_verifier->get_message_by_sender_name_receiver_name($sender_name, $receiver_name);
$this->page_data['message_details'] = $message_details;
}
else if($receiver_name == null) {
$users = $this->model_verifier->get_all_user_names();
$receiver_name = $users['0']['user_name'];
$sender_name = $this->session->userdata('user_name');
$message_details = $this->model_verifier->get_message_by_sender_name_receiver_name($sender_name, $receiver_name);
$this->page_data['message_details'] = $message_details;
}
}
$this->page_data['receiver_name'] = $receiver_name;
if(isset($this->page_data['page_content'])){
unset($this->page_data['page_content']);
}
$this->page_data["page_content"] = $this->load->view('verifier/verifier_message_view',$this->page_data,TRUE);
$notification_details = $this->model_verifier->get_message_notification_details(); $this->page_data['notification_details'] = $notification_details; $message_count = $this->model_verifier->get_message_count(); $this->page_data['message_count'] = $message_count; $this->load->view('verifier/verifier_main_view',$this->page_data);
}
public function add_message() { //new
$message = $this->input->post('message');
$receiver_name = $this->input->post('receiver_name');
$sender_name = $this->session->userdata('user_name');
$this->model_verifier->insert_message($sender_name, $receiver_name, $message);
$this->message($receiver_name);
}
} | alanjose10/vssc | application/controllers/Verifier.php | PHP | mit | 49,020 |
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-inappbrowser
[](https://travis-ci.org/apache/cordova-plugin-inappbrowser)
Questo plugin fornisce una vista di browser web che viene visualizzato quando si chiama `di cordova.InAppBrowser.open()`.
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
Il `cordova.InAppBrowser.open()` funzione è definita per essere un rimpiazzo per la funzione `window.open`. Esistenti chiamate `Window` possono utilizzare la finestra di InAppBrowser, sostituendo window.open():
window.open = cordova.InAppBrowser.open;
La finestra di InAppBrowser si comporta come un browser web standard e non può accedere a Cordova APIs. Per questo motivo, è consigliabile la InAppBrowser se è necessario caricare il contenuto (non attendibile) di terze parti, invece di caricamento che in webview Cordova principale. Il InAppBrowser non è soggetto alla whitelist, né sta aprendo il link nel browser di sistema.
La InAppBrowser fornisce di default propri controlli GUI per l'utente (indietro, avanti, fatto).
Per indietro la compatibilità, questo plugin ganci anche `window.open`. Tuttavia, il plugin installato gancio di `window.open` può avere effetti collaterali indesiderati (soprattutto se questo plugin è incluso solo come dipendenza di un altro plugin). Il gancio di `window. open` verrà rimosso in una futura release principale. Fino a quando il gancio è rimosso dal plugin, apps può ripristinare manualmente il comportamento predefinito:
delete window.open // Reverts the call back to it's prototype's default
Sebbene `window.open` sia in ambito globale, InAppBrowser non è disponibile fino a dopo l'evento `deviceready`.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("window.open works well");
}
## Installazione
cordova plugin add cordova-plugin-inappbrowser
Se si desidera che tutti i carichi di pagina nell'app di passare attraverso il InAppBrowser, si può semplicemente collegare `window.open` durante l'inizializzazione. Per esempio:
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.open = cordova.InAppBrowser.open;
}
## cordova.InAppBrowser.open
Apre un URL in una nuova istanza di `InAppBrowser`, l'istanza corrente del browser o il browser di sistema.
var ref = cordova.InAppBrowser.open(url, target, options);
* **ref**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)*
* **url**: l'URL da caricare *(String)*. Chiamare `encodeURI()` su questo, se l'URL contiene caratteri Unicode.
* **target**: la destinazione in cui caricare l'URL, un parametro facoltativo che il valore predefinito è `_self` . *(String)*
* `_self`: Si apre in Cordova WebView se l'URL è nella lista bianca, altrimenti si apre nella`InAppBrowser`.
* `_blank`: Apre il`InAppBrowser`.
* `_system`: Si apre nel browser web del sistema.
* **options**: opzioni per il `InAppBrowser` . Opzionale, inadempiente a: `location=yes` . *(String)*
Il `options` stringa non deve contenere alcun spazio vuoto, e coppie nome/valore ogni funzionalità devono essere separate da una virgola. Caratteristica nomi sono tra maiuscole e minuscole. Tutte le piattaforme supportano il valore riportato di seguito:
* **posizione**: impostata su `yes` o `no` per trasformare il `InAppBrowser` di barra di posizione on o off.
Solo su Android:
* **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente.
* **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra
* **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra
* **zoom**: impostare su `yes` per mostrare i controlli di zoom del browser Android, impostata su `no` per nasconderli. Valore predefinito è `yes`.
* **hardwareback**: impostare `yes` per utilizzare il pulsante Indietro hardware per spostarsi all'indietro tra il `InAppBrowser`di storia. Se esiste una pagina precedente, si chiuderà il `InAppBrowser` . Il valore predefinito è `yes`, quindi è necessario impostare a `no` , se si desidera che il pulsante indietro per chiudere semplicemente il InAppBrowser.
solo iOS:
* **closebuttoncaption**: impostare una stringa da utilizzare come didascalia del pulsante **fatto** . Si noti che è necessario localizzare questo valore a te stesso.
* **disallowoverscroll**: impostare su `yes` o `no` (default è `no` ). Attiva/disattiva la proprietà UIWebViewBounce.
* **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente.
* **ClearCache**: impostare su `yes` per avere il browser cache cookie ha lasciata prima dell'apertura della nuova finestra
* **clearsessioncache**: impostare su `yes` per avere la cache cookie di sessione cancellata prima dell'apertura della nuova finestra
* **Toolbar**: impostare su `yes` o `no` per attivare la barra degli strumenti o disattivare per il InAppBrowser (default`yes`)
* **enableViewportScale**: impostare su `yes` o `no` per impedire la viewport ridimensionamento tramite un tag meta (default`no`).
* **mediaPlaybackRequiresUserAction**: impostare su `yes` o `no` per impedire HTML5 audio o video da AutoPlay (default`no`).
* **allowInlineMediaPlayback**: impostare su `yes` o `no` per consentire la riproduzione dei supporti HTML5 in linea, visualizzare all'interno della finestra del browser, piuttosto che un'interfaccia specifica del dispositivo di riproduzione. L'HTML `video` elemento deve includere anche il `webkit-playsinline` (default di attributo`no`)
* **keyboardDisplayRequiresUserAction**: impostare su `yes` o `no` per aprire la tastiera quando elementi form ricevano lo stato attivo tramite di JavaScript `focus()` chiamata (default`yes`).
* **suppressesIncrementalRendering**: impostare su `yes` o `no` aspettare fino a quando tutti i nuovi contenuti di vista viene ricevuto prima il rendering (default`no`).
* **presentationstyle**: impostare su `pagesheet` , `formsheet` o `fullscreen` per impostare lo [stile di presentazione](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (default`fullscreen`).
* **transitionstyle**: impostare su `fliphorizontal` , `crossdissolve` o `coververtical` per impostare lo [stile di transizione](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (default`coververtical`).
* **toolbarposition**: impostare su `top` o `bottom` (default è `bottom` ). Provoca la barra degli strumenti sia nella parte superiore o inferiore della finestra.
Solo per Windows:
* **nascosti**: impostare su `yes` per creare il browser e caricare la pagina, ma non mostrarlo. L'evento loadstop viene generato quando il caricamento è completato. Omettere o impostata su `no` (impostazione predefinita) per avere il browser aperto e caricare normalmente.
* **fullscreen**: impostata su `yes` per creare il controllo browser senza un bordo attorno ad esso. Siete pregati di notare che se **location=no** viene specificato, non ci sarà nessun controllo presentato all'utente per chiudere la finestra IAB.
### Piattaforme supportate
* Amazon fuoco OS
* Android
* BlackBerry 10
* Firefox OS
* iOS
* Windows 8 e 8.1
* Windows Phone 7 e 8
* Browser
### Esempio
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');
### Firefox OS stranezze
Come plugin non imporre alcun disegno c'è bisogno di aggiungere alcune regole CSS se aperto con `target='_blank'`. Le regole potrebbero apparire come questi
```css
.inAppBrowserWrap {
background-color: rgba(0,0,0,0.75);
color: rgba(235,235,235,1.0);
}
.inAppBrowserWrap menu {
overflow: auto;
list-style-type: none;
padding-left: 0;
}
.inAppBrowserWrap menu li {
font-size: 25px;
height: 25px;
float: left;
margin: 0 10px;
padding: 3px 10px;
text-decoration: none;
color: #ccc;
display: block;
background: rgba(30,30,30,0.50);
}
.inAppBrowserWrap menu li.disabled {
color: #777;
}
```
### Stranezze di Windows
Simile al comportamento visivo finestra di Firefox OS IAB può essere sottoposto a override tramite `inAppBrowserWrap`/ classi CSS`inAppBrowserWrapFullscreen`
### Stranezze browser
* Plugin viene implementato tramite iframe,
* Cronologia di navigazione (pulsanti`indietro` e `Avanti` in LocationBar) non è implementato.
## InAppBrowser
L'oggetto restituito da una chiamata a `di cordova.InAppBrowser.open`.
### Metodi
* addEventListener
* removeEventListener
* close
* show
* executeScript
* insertCSS
## addEventListener
> Aggiunge un listener per un evento dal`InAppBrowser`.
ref.addEventListener(eventname, callback);
* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)*
* **EventName**: l'evento per l'ascolto *(String)*
* **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL.
* **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL.
* **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore durante il caricamento di un URL.
* **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa.
* **richiamata**: la funzione che viene eseguito quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto come parametro.
### Proprietà InAppBrowserEvent
* **tipo**: il eventname, o `loadstart` , `loadstop` , `loaderror` , o `exit` . *(String)*
* **URL**: l'URL che è stato caricato. *(String)*
* **codice**: il codice di errore, solo nel caso di `loaderror` . *(Numero)*
* **messaggio**: il messaggio di errore, solo nel caso di `loaderror` . *(String)*
### Piattaforme supportate
* Amazon fuoco OS
* Android
* iOS
* Windows 8 e 8.1
* Windows Phone 7 e 8
* Browser
### Stranezze browser
eventi `onloadstart` e `loaderror` non sono stati licenziati.
### Esempio rapido
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function(event) { alert(event.url); });
## removeEventListener
> Rimuove un listener per un evento dal`InAppBrowser`.
ref.removeEventListener(eventname, callback);
* **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)*
* **EventName**: interrompere l'attesa per l'evento. *(String)*
* **loadstart**: evento viene generato quando il `InAppBrowser` comincia a caricare un URL.
* **loadstop**: evento viene generato quando il `InAppBrowser` termina il caricamento di un URL.
* **LoadError**: evento viene generato quando il `InAppBrowser` rileva un errore di caricamento di un URL.
* **uscita**: evento viene generato quando il `InAppBrowser` finestra è chiusa.
* **richiamata**: la funzione da eseguire quando viene generato l'evento. La funzione viene passata un `InAppBrowserEvent` oggetto.
### Piattaforme supportate
* Amazon fuoco OS
* Android
* iOS
* Windows 8 e 8.1
* Windows Phone 7 e 8
* Browser
### Esempio rapido
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var myCallback = function(event) { alert(event.url); }
ref.addEventListener('loadstart', myCallback);
ref.removeEventListener('loadstart', myCallback);
## close
> Chiude la `InAppBrowser` finestra.
ref.close();
* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)*
### Piattaforme supportate
* Amazon fuoco OS
* Android
* Firefox OS
* iOS
* Windows 8 e 8.1
* Windows Phone 7 e 8
* Browser
### Esempio rapido
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
ref.close();
## show
> Visualizza una finestra di InAppBrowser che è stato aperto nascosta. Questa chiamata non ha effetto se la InAppBrowser era già visibile.
ref.show();
* **Rif**: riferimento per il InAppBrowser finestra (`InAppBrowser`)
### Piattaforme supportate
* Amazon fuoco OS
* Android
* iOS
* Windows 8 e 8.1
* Browser
### Esempio rapido
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes');
// some time later...
ref.show();
## executeScript
> Inserisce il codice JavaScript nella `InAppBrowser` finestra
ref.executeScript(details, callback);
* **Rif**: fare riferimento alla `InAppBrowser` finestra. *(InAppBrowser)*
* **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)*
* **file**: URL dello script da iniettare.
* **codice**: testo dello script da iniettare.
* **richiamata**: la funzione che viene eseguito dopo che il codice JavaScript viene iniettato.
* Se lo script iniettato è di tipo `code` , il callback viene eseguita con un singolo parametro, che è il valore restituito del copione, avvolto in un `Array` . Per gli script multi-linea, questo è il valore restituito dell'ultima istruzione, o l'ultima espressione valutata.
### Piattaforme supportate
* Amazon fuoco OS
* Android
* iOS
* Windows 8 e 8.1
* Browser
### Esempio rapido
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
ref.executeScript({file: "myscript.js"});
});
### Stranezze browser
* è supportato solo il **code** chiave.
### Stranezze di Windows
A causa di [documenti MSDN](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.webview.invokescriptasync.aspx) lo script richiamato può restituire solo i valori di stringa, altrimenti il parametro, passato al **callback** sarà `[null]`.
## insertCSS
> Inietta CSS nella `InAppBrowser` finestra.
ref.insertCSS(details, callback);
* **Rif**: fare riferimento alla `InAppBrowser` finestra *(InAppBrowser)*
* **injectDetails**: dettagli dello script da eseguire, specificando un `file` o `code` chiave. *(Oggetto)*
* **file**: URL del foglio di stile per iniettare.
* **codice**: testo del foglio di stile per iniettare.
* **richiamata**: la funzione che viene eseguito dopo che il CSS viene iniettato.
### Piattaforme supportate
* Amazon fuoco OS
* Android
* iOS
* Windows
### Esempio rapido
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
ref.insertCSS({file: "mystyles.css"});
}); | KitGalvin/Label_App | app/src/plugins/cordova-plugin-inappbrowser/doc/it/README.md | Markdown | mit | 16,989 |
export default {
"": {
"project-id-version": "PACKAGE VERSION",
"pot-creation-date": "",
"po-revision-date": "2016-08-16 07:47+0000",
"last-translator": "Freddy Hew <[email protected]>",
"language-team": "Chinese (Taiwan) <https://hosted.weblate.org/projects/binary-app/next-gen-app/zh_TW/>",
"language": "zh_tw",
"mime-version": "1.0",
"content-type": "text/plain; charset=UTF-8",
"content-transfer-encoding": "8bit",
"plural-forms": "nplurals=1; plural=0;",
"x-generator": "Weblate 2.8-dev"
},
"All": [
null,
"所有"
],
"Property": [
null,
"財產"
],
"Value": [
null,
"價值"
],
"Balance": [
null,
"餘額"
],
"Trade": [
null,
"交易"
],
"Watchlist": [
null,
"關注清單"
],
"Open Positions": [
null,
"未平倉頭寸"
],
"Profit Table": [
null,
"利潤表"
],
"Statement": [
null,
"帳單"
],
"Settings": [
null,
"設定"
],
"Sign Out": [
null,
"登出"
],
"View": [
null,
"檢視"
],
"Ref.": [
null,
"參考"
],
"Purchase": [
null,
"買入"
],
"Indicative": [
null,
"指示性"
],
"Purchase Date": [
null,
"買入日期"
],
"Purchase Price": [
null,
"買入價格"
],
"Sale Date": [
null,
"賣出日期"
],
"Sale Price": [
null,
"賣出價格"
],
"Profit/Loss": [
null,
"利潤/虧損"
],
"Total": [
null,
"合計"
],
"Location": [
null,
"位置"
],
"Update": [
null,
"更新"
],
"Details": [
null,
"詳細資料"
],
"Trading Limits": [
null,
"交易限制"
],
"Item": [
null,
"項目"
],
"Limit ({currency})": [
null,
"限值 ({貨幣})"
],
"Maximum number of open positions": [
null,
"最大未平倉頭寸數目"
],
"Maximum account cash balance": [
null,
"最大帳戶現金餘額"
],
"Maximum daily turnover": [
null,
"最大日成交量"
],
"Maximum aggregate payouts on open positions": [
null,
"未平倉頭寸的最大賠付總額"
],
"Withdrawal limits": [
null,
"取款限額"
],
"Your withdrawal limit is {limit} (or equivalent in other currency).": [
null,
"您的提款上限是 {限值} (或等值的其他貨幣)。"
],
"You have already withdrawn the equivalent of EUR {drawn}.": [
null,
"您的提款數額相當於歐元 {提款值}。"
],
"An additional password can be used to restrict access to the cashier.": [
null,
"可使用額外密碼來限制對收銀台的存取。"
],
"Sign In": [
null,
"登入"
],
"Get your API token": [
null,
"領取API權杖"
],
"Create Account": [
null,
"新增帳戶"
],
"Action": [
null,
"動作"
],
"Credit/Debit": [
null,
"借記/貸記"
],
"Purchase Time": [
null,
"買入時間"
],
"Back": [
null,
"返回"
],
"Place Order": [
null,
"下訂單"
],
"{asset} will {type} over next {duration}": [
null,
"{資產}將在{類型}期內{時段}"
],
"Price": [
null,
"價格"
],
"Asset": [
null,
"資產"
],
"Type": [
null,
"類型"
],
"Ticks": [
null,
"跳動點"
],
"Amount": [
null,
"金額"
],
"Trade Confirmation": [
null,
"交易確認"
],
"Entry spot": [
null,
"入市現價"
],
"Exit spot": [
null,
"退出現價"
],
"Next": [
null,
"下一頁"
],
"Open Account": [
null,
"開戶"
],
"Upgrade to Real Money Account": [
null,
"升級為真實金錢帳戶"
],
"Date of birth": [
null,
"出生日期"
],
"Home Address": [
null,
"家庭住址"
],
"Security": [
null,
"安全"
],
"Spot": [
null,
"現價"
],
"Change": [
null,
"變更"
],
"Chart": [
null,
"圖表"
],
"Purchase For": [
null,
"買入"
],
"Rise": [
null,
"上漲"
],
"Stake": [
null,
"投注金額"
],
"Payout": [
null,
"賠付額"
],
"Deposit": [
null,
"存款"
],
"Transactions": [
null,
"交易"
],
"Opens": [
null,
"開盤"
],
"Closes": [
null,
"收盤"
],
"Personal": [
null,
"個人"
],
"General": [
null,
"一般條款"
],
"Trading Times": [
null,
"交易時間"
],
"Asset Index": [
null,
"資產指數"
],
"Today": [
null,
"今日"
],
"Yesterday": [
null,
"昨日"
],
"Tomorrow": [
null,
"明日"
],
"Takeout": [
null,
"取得"
],
"News": [
null,
"新聞"
],
"Resources": [
null,
"資源"
],
"Last 7 Days": [
null,
"過去7天"
],
"Last 30 Days": [
null,
"過去30天"
],
"Daily Report": [
null,
"日報"
],
"Up/Down": [
null,
"上/下"
],
"Touch/No Touch": [
null,
"觸及/未觸及"
],
"Ends In/Out": [
null,
"到期時價格處於某個範圍內/外"
],
"Stays In/Goes Out": [
null,
"保持在某個範圍內/外"
],
"Settles": [
null,
"結算"
],
"Language": [
null,
"語言"
],
"Color Theme": [
null,
"顏色主題"
],
"Light": [
null,
"淺色"
],
"Dark": [
null,
"深色"
],
"Name": [
null,
"姓名"
],
"Date Of Birth": [
null,
"出生日期"
],
"Country Of Residence": [
null,
"居住國"
],
"Email": [
null,
"電子郵件"
],
"There are no transactions for selected period": [
null,
"選定時間段內無任何交易"
],
"Sell": [
null,
"售出"
],
"Buy": [
null,
"買入"
],
"Digit Even": [
null,
"數字為偶數"
],
"Touches": [
null,
"觸及"
],
"Digit Over": [
null,
"數字超過限額"
],
"Digit Match": [
null,
"數字匹配"
],
"Digit Under": [
null,
"數字低於限額"
],
"Digit Odd": [
null,
"數字為奇數"
],
"Digit Differs": [
null,
"數字不匹配"
],
"No Touch": [
null,
"未觸及"
],
"Fall": [
null,
"下降"
],
"Asian Down": [
null,
"亞洲下跌期權"
],
"Asian Up": [
null,
"亞洲上漲期權"
],
"Search For Assets": [
null,
"搜尋資產"
],
"Start times": [
null,
"開始時間"
],
"Durations": [
null,
"期現"
],
"Payout/Stake": [
null,
"賠付/投注額"
],
"Purchase for": [
null,
"買入"
],
"payout": [
null,
"賠付額"
],
"stake": [
null,
"投注金額"
],
"Self Exclusion": [
null,
"自我限制"
],
"Cashier Lock": [
null,
"收銀台鎖定"
],
"Change Password": [
null,
"更換密碼"
],
"Password": [
null,
"密碼"
],
"Tick Trade": [
null,
"跳動點交易"
],
"Full Trade": [
null,
"完全自由交易"
],
"Address": [
null,
"地址"
],
"Town/City": [
null,
"城鎮/城市"
],
"State/Province": [
null,
"州/省"
],
"Telephone": [
null,
"電話"
],
"Postal Code / ZIP": [
null,
"郵遞區號"
],
"Cashier password": [
null,
"收銀台密碼"
],
"Re-enter your password": [
null,
"重新輸入密碼"
],
"Current password": [
null,
"目前密碼"
],
"New password": [
null,
"新密碼"
],
"Verify new password": [
null,
"驗證新密碼"
],
"Daily turnover limit": [
null,
"最大日成交量"
],
"Once this limit is reached, you may no longer deposit.": [
null,
"一旦達到此限額,您不可再存入款項。"
],
"Maximum aggregate contract purchases per day.": [
null,
"每日最大累計合約購入額。"
],
"Daily limit on losses": [
null,
"每日虧損限額"
],
"Maximum aggregate loss per day.": [
null,
"每日最大累計虧損額。"
],
"7-day turnover limit": [
null,
"7天期最大交易限額"
],
"Maximum aggregate contract purchases over a 7-day period.": [
null,
"7天期最大累計合約購入額。"
],
"7-day limit on losses": [
null,
"7天期虧損限額"
],
"Maximum aggregate loss over a 7-day period.": [
null,
"7天期最大累計虧損額。"
],
"30-day turnover limit": [
null,
"30天期交易限額"
],
"Maximum aggregate contract purchases over a 30-day period.": [
null,
"30天期最大累計合約購入額。"
],
"30-day limit on losses": [
null,
"30天期虧損限額"
],
"Maximum aggregate loss over a 30-day period.": [
null,
"30天期最大累計虧損額。"
],
"Session duration limit, in minutes": [
null,
"交易期持續時間限制,以分鐘作單位"
],
"You will be automatically logged out after such time.": [
null,
"在該時間後您將自動退出登入。"
],
"Exclude me from the website until": [
null,
"禁止我訪問本網站直到"
],
"Limits": [
null,
"交易限制"
],
"Please enter date in the format YYYY-MM-DD.": [
null,
"請輸入日期,格式為年-月-日。"
],
"New Trade": [
null,
"新交易"
],
"Trade Type": [
null,
"交易類型"
],
"Random 100 Index": [
null,
"隨機100指標"
],
"Article": [
null,
"項目"
],
"Start Later": [
null,
"稍後開始"
],
"Buy Price": [
null,
"購入價格"
],
"Earning (%)": [
null,
"收入(%)"
],
"Profit": [
null,
"利潤"
],
"Entry Price": [
null,
"入市價格"
],
"Exit Price": [
null,
"平倉價格"
],
"Indicative Price": [
null,
"指示價格"
],
"Potential Profit": [
null,
"潛在利潤"
],
"Sell at Market": [
null,
"按市價賣出"
],
"Go back": [
null,
"返回"
],
"You lost ": [
null,
"您輸了 "
],
"Close": [
null,
"收盤"
],
"Low": [
null,
"低"
],
"High": [
null,
"高"
],
"Open": [
null,
"開盤"
],
"Date": [
null,
"日期"
],
"Upcoming Events": [
null,
"未來事件"
],
"Win": [
null,
"贏"
],
"Loss": [
null,
"輸"
],
"Full Screen": [
null,
"全屏"
],
"Start Now": [
null,
"現在開始"
],
"Daily Prices": [
null,
"每日價格"
],
"Spreads": [
null,
"價差"
],
"Confirm new password": [
null,
"確認新密碼"
],
"TICK": [
null,
"跳動點"
],
"Minutes": [
null,
"分鐘"
],
"Seconds": [
null,
"秒"
],
"Hours": [
null,
"小時"
],
"Days": [
null,
"日"
],
"N/A": [
null,
"不可用"
],
"Duration": [
null,
"期限"
],
"Start Time": [
null,
"開始時間"
],
"Now": [
null,
"現在"
],
"Later": [
null,
"稍後"
],
"return": [
null,
"回報"
],
"Portfolio": [
null,
"投資組合"
],
"Video": [
null,
"視訊"
],
"Digit Stats": [
null,
"數字統計"
],
"Favorites": [
null,
"我的最愛"
],
"Open For Trading": [
null,
"開放交易"
],
"Closed": [
null,
"已收盤"
],
"Contract ID": [
null,
"合約ID"
],
"Reference ID": [
null,
"參考ID"
],
"Entry Spot": [
null,
"入市現價"
],
"Entry Spot Time": [
null,
"入市現價時間"
],
"Potential Payout": [
null,
"潛在利潤"
],
"Exit Spot": [
null,
"退出現價"
],
"Exit Spot Time": [
null,
"退出現價時間"
],
"Sell Price": [
null,
"賣出價格"
],
"Sell Time": [
null,
"賣出時間"
],
"Trade Again": [
null,
"再次交易"
],
"Barrier": [
null,
"障礙"
],
"You Won": [
null,
"您贏了"
],
"You Lost": [
null,
"您輸了"
],
"To change your name, date of birth, country of residence, or email, contact Customer Support.": [
null,
"如需更改姓名、生日、居住國或電子郵件地址,請與客服人員聯繫。"
],
"Cashier is locked per your request. To unlock it, enter your password.": [
null,
"根據您的請求,您的收銀台已被鎖定。如需解除鎖定,請輸入密碼。"
],
"Unlock Cashier": [
null,
"解鎖收銀台"
],
"Time out until": [
null,
"時間已過。下次開啟時間為"
],
"No transactions for the selected period": [
null,
"選定時間段內無任何交易"
],
"You have no open contracts": [
null,
"您沒有未平倉合約"
],
"You have no assets in your watchlist": [
null,
"您的關注清單沒有資產"
],
"Basic": [
null,
"基礎"
],
"Digits": [
null,
"數字"
],
"Advanced": [
null,
"高級"
],
"Higher": [
null,
"高於"
],
"Lower": [
null,
"低於"
],
"Ends Outside": [
null,
"處於範圍外"
],
"Ends Between": [
null,
"收於範圍之內"
],
"Stays Between": [
null,
"保持在範圍之內"
],
"Goes Outside": [
null,
"超出範圍之外"
],
"Does Not Touch": [
null,
"未觸及"
],
"Credit / Debit": [
null,
"借記/貸記"
],
"Last 25 Ticks": [
null,
"最近25次跳動"
],
"Last 50 Trades": [
null,
"過去50次交易"
],
"Last 100 Trades": [
null,
"過去100次交易"
],
"Last 500 Trades": [
null,
"過去500次交易"
],
"Last 1000 Trades": [
null,
"過去1000次交易"
],
"Maximum Daily Turnover": [
null,
"最大日成交量"
],
"Commodities": [
null,
"大宗商品"
],
"Major Pairs": [
null,
"主要貨幣對"
],
"Minor Pairs": [
null,
"次要貨幣對"
],
"Smart FX": [
null,
"智慧外匯交易"
],
"Volatility Indices": [
null,
"波動率指數"
],
"Indices": [
null,
"指數"
],
"OTC Stocks": [
null,
"場外交易股票"
],
"Stated limits are subject to change without prior notice": [
null,
"我們保留隨時在沒有預先通知的情況下更改所述限制的權利"
],
"Withdrawal Limits": [
null,
"取款限額"
],
"Withdrawal limit": [
null,
"取款限額"
],
"Already withdrawn": [
null,
"已提取"
],
"Current immediate maximum withdrawal": [
null,
"目前的即時最高取款額"
],
"Create Free Account": [
null,
"新增免費帳戶"
],
"Verification Code": [
null,
"驗證碼"
],
"Confirm Password": [
null,
"確認密碼"
],
"Already have an account?": [
null,
"已經有帳戶?"
],
"Enter a valid verification code": [
null,
"請輸入有效的驗證代碼"
],
"Choose your country": [
null,
"選擇您的國家"
],
"Password should have lower and uppercase letters and 6 characters or more": [
null,
"密碼須包含大小寫字母與至少6個字符"
],
"Passwords do not match": [
null,
"密碼不相符"
],
"Enter a valid email": [
null,
"輸入有效的電子郵件"
],
"Number should between 10 to 120": [
null,
"必須是10至120之間的數字"
],
"Enter your first and last name": [
null,
"輸入姓名"
],
"City must not be empty": [
null,
"城市不可為空"
],
"Address must not be empty": [
null,
"地址不可為空"
],
"Enter a valid phone number": [
null,
"輸入有效的電話號"
],
"Select a secret question": [
null,
"選擇安全提示問題"
],
"Secret answer must be at least 4 characters": [
null,
"安全提示答案必須至少4個字符"
],
"You need to agree to our Terms and Conditions": [
null,
"您必須同意我們的條款和條件"
],
"I agree to the": [
null,
"本人同意"
],
"terms and conditions": [
null,
"條款和條件"
],
"Search for assets": [
null,
"搜尋資產"
],
"Choose a Payment Agent": [
null,
"選擇支付代理"
],
"Confirm New Password": [
null,
"確認新密碼"
],
"First Name": [
null,
"名字"
],
"Last Name": [
null,
"姓氏"
],
"Address First Line": [
null,
"地址第一行"
],
"Address Second Line": [
null,
"地址第二行"
],
"Phone": [
null,
"電話"
],
"Answer To Secret Question": [
null,
"安全提示問題的答案"
],
"Switch to": [
null,
"切換成"
],
"Single Trade": [
null,
"單次交易"
],
"Multi Trade": [
null,
"多次交易"
],
"Current Password": [
null,
"目前密碼"
],
"New Password": [
null,
"新密碼"
],
"Last 50 Ticks": [
null,
"最近50次跳動"
],
"Last 100 Ticks": [
null,
"最近100次跳動"
],
"Last 500 Ticks": [
null,
"最近500次跳動"
],
"Last 1000 Ticks": [
null,
"最近1000次跳動"
],
"Exit Full Screen": [
null,
"退出全屏"
],
"No digit trades for this asset": [
null,
"此資產無數字交易"
],
"Lock Cashier": [
null,
"解鎖收銀台"
],
"Time out until date": [
null,
"時間已過。下次開啟時間為"
],
"Time out until time": [
null,
"時間已過。下次開啟時間為"
],
"Light Theme": [
null,
"淺色主題"
],
"Dark Theme": [
null,
"深色主題"
],
"Password changed successfully": [
null,
"已成功更改密碼"
],
"Settings updated": [
null,
"設定更新"
],
"Address updated": [
null,
"地址更新"
],
"Barrier must not be empty": [
null,
"障礙不可為空"
],
"Duration is out of range": [
null,
"交易期限超出限定範圍"
],
"Start date invalid, it needs to be five minutes or more in the future": [
null,
"開始日期無效,必須是未來的五分鐘或更長時間"
],
"Time format is wrong": [
null,
"時間格式錯誤"
],
"Lower than": [
null,
"低於"
],
"Higher than": [
null,
"高於"
],
"High barrier": [
null,
"高障礙"
],
"Low barrier": [
null,
"低障礙"
],
"Touch spot": [
null,
"觸及現貨價格"
]
} | nuruddeensalihu/binary-next-gen | src/_constants/po/zh_tw.js | JavaScript | mit | 22,279 |
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<title>E-Week 2016 Countdown</title>
<link rel="stylesheet" href="css/style.css" media="all">
<link rel="icon"
type="image/png"
href="img/logo.png"
sizes="32x32">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
</head>
<body id="index">
<center>
<img id="banner" src="img/E-Week 2016.png" style="height:270px;">
</center>
<div id="wrapper">
<div id="gradient"> </div>
<div class="time" id="time" align="center">
Days Hours Minutes Seconds
</div>
<div id="container">
<div id="canvas-content">
<div id="countdown">
<script type="text/javascript">
document.getElementsByTagName('body')[0].style.overflow = 'hidden';
</script>
</div>
<script type="text/javascript" src="js/base.js"></script>
<script type="text/javascript" src="js/box2d.js"></script>
<script type="text/javascript" src="js/io.js"></script>
</div>
</div>
</div>
</body>
</html>
| manishbisht/topaz | EWeek2016-Countdown/index.html | HTML | mit | 1,646 |
/*global describe, beforeEach, it*/
'use strict';
var assert = require('assert');
describe('iomante generator', function () {
it('can be imported without blowing up', function () {
var app = require('../app');
assert(app !== undefined);
});
});
| zimin9u/generator-iomante | test/test-load.js | JavaScript | mit | 260 |
using System;
using LaYumba.Functional;
using System.Collections.Generic;
using System.Linq;
namespace Examples.RandomState
{
using System.Text;
using static F;
public delegate (T Value, int Seed) Generator<T>(int seed);
public static class Gen
{
public static Generator<int> NextInt = (seed) =>
{
seed ^= seed >> 13;
seed ^= seed << 18;
int result = seed & 0x7fffffff;
return (result, result);
};
static Generator<(int, int)> _PairOfInts = (seed0) =>
{
var (a, seed1) = NextInt(seed0);
var (b, seed2) = NextInt(seed1);
return ((a, b), seed2);
};
public static Generator<(int, int)> PairOfInts =>
from a in NextInt
from b in NextInt
select (a, b);
public static Generator<Option<int>> OptionInt =>
from some in NextBool
from i in NextInt
select some ? Some(i) : None;
public static Generator<bool> NextBool
=> from i in NextInt select i % 2 == 0;
public static Generator<char> NextChar
=> from i in NextInt select (char)(i % (char.MaxValue + 1));
public static Generator<IEnumerable<int>> IntList
=> from empty in NextBool
from list in empty ? Empty : NonEmpty
select list;
public static Generator<IEnumerable<int>> Empty
=> Gen.Of(Enumerable.Empty<int>());
public static Generator<IEnumerable<int>> NonEmpty
=> from head in NextInt
from tail in IntList
select List(head).Concat(tail);
public static Generator<string> NextString
=> from ints in IntList
select IntsToString(ints);
static char IntToChar(int i) => (char)(i % (char.MaxValue + 1));
static string IntsToString(this IEnumerable<int> ints)
{
var sb = new StringBuilder();
foreach (var c in ints) sb.Append(IntToChar(c));
return sb.ToString();
}
// helpers
static Generator<T> Of<T>(T value)
=> seed => (value, seed);
static Generator<int> Between(int low, int high)
=> from i in NextInt select low + i % (high - low);
static Generator<T> OneOf<T>(params T[] values)
=> from i in Between(0, values.Length) select values[i];
}
public static class GenExt
{
public static T Run<T>(this Generator<T> gen, int seed)
=> gen(seed).Value;
public static T Run<T>(this Generator<T> gen)
=> gen(Environment.TickCount).Value;
// LINQ
public static Generator<R> Select<T, R>
(this Generator<T> gen, Func<T, R> f)
=> seed0 =>
{
var (t, seed1) = gen(seed0);
return (f(t), seed1);
};
public static Generator<R> SelectMany<T, R>
(this Generator<T> gen, Func<T, Generator<R>> f)
=> seed0 =>
{
var (t, seed1) = gen(seed0);
return f(t)(seed1);
};
public static Generator<RR> SelectMany<T, R, RR>
(this Generator<T> gen
, Func<T, Generator<R>> bind
, Func<T, R, RR> project)
=> seed0 =>
{
var (t, seed1) = gen(seed0);
var (r, seed2) = bind(t)(seed1);
var rr = project(t, r);
return (rr, seed2);
};
}
}
| la-yumba/functional-csharp-code | Examples/Chapter12/Generator.cs | C# | mit | 3,387 |
package com.slack.api.app_backend.outgoing_webhooks.response;
import com.slack.api.model.Attachment;
import lombok.Builder;
import lombok.Data;
import java.util.List;
@Data
@Builder
public class WebhookResponse {
private String text;
private List<Attachment> attachments;
}
| seratch/jslack | slack-app-backend/src/main/java/com/slack/api/app_backend/outgoing_webhooks/response/WebhookResponse.java | Java | mit | 285 |
<?php
/**
* The contents of this file was generated using the WSDLs as provided by eBay.
*
* DO NOT EDIT THIS FILE!
*/
namespace DTS\eBaySDK\MerchantData\Types;
/**
*
* @property string $UnitType
* @property double $UnitQuantity
*/
class UnitInfoType extends \DTS\eBaySDK\Types\BaseType
{
/**
* @var array Properties belonging to objects of this class.
*/
private static $propertyTypes = [
'UnitType' => [
'type' => 'string',
'repeatable' => false,
'attribute' => false,
'elementName' => 'UnitType'
],
'UnitQuantity' => [
'type' => 'double',
'repeatable' => false,
'attribute' => false,
'elementName' => 'UnitQuantity'
]
];
/**
* @param array $values Optional properties and values to assign to the object.
*/
public function __construct(array $values = [])
{
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);
parent::__construct($parentValues);
if (!array_key_exists(__CLASS__, self::$properties)) {
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
}
if (!array_key_exists(__CLASS__, self::$xmlNamespaces)) {
self::$xmlNamespaces[__CLASS__] = 'xmlns="urn:ebay:apis:eBLBaseComponents"';
}
$this->setValues(__CLASS__, $childValues);
}
}
| chain24/ebayprocess-lumen | vendor/dts/ebay-sdk-php/src/MerchantData/Types/UnitInfoType.php | PHP | mit | 1,503 |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Abp;
using Abp.Authorization;
using Abp.Authorization.Users;
using Abp.Configuration;
using Abp.Configuration.Startup;
using Abp.Domain.Uow;
using Abp.Extensions;
using Abp.MultiTenancy;
using Abp.Notifications;
using Abp.Threading;
using Abp.Timing;
using Abp.UI;
using Abp.Web.Models;
using Abp.Zero.Configuration;
using Microsoft.AspNetCore.Mvc;
using PatientManagement.Reservation.Authorization;
using PatientManagement.Reservation.MultiTenancy;
using PatientManagement.Reservation.Web.Models.Account;
using PatientManagement.Reservation.Authorization.Users;
using PatientManagement.Reservation.Controllers;
using PatientManagement.Reservation.Identity;
using PatientManagement.Reservation.Sessions;
using PatientManagement.Reservation.Web.Views.Shared.Components.TenantChange;
using Microsoft.AspNetCore.Identity;
namespace PatientManagement.Reservation.Web.Controllers
{
public class AccountController : ReservationControllerBase
{
private readonly UserManager _userManager;
private readonly TenantManager _tenantManager;
private readonly IMultiTenancyConfig _multiTenancyConfig;
private readonly IUnitOfWorkManager _unitOfWorkManager;
private readonly AbpLoginResultTypeHelper _abpLoginResultTypeHelper;
private readonly LogInManager _logInManager;
private readonly SignInManager _signInManager;
private readonly UserRegistrationManager _userRegistrationManager;
private readonly ISessionAppService _sessionAppService;
private readonly ITenantCache _tenantCache;
private readonly INotificationPublisher _notificationPublisher;
public AccountController(
UserManager userManager,
IMultiTenancyConfig multiTenancyConfig,
TenantManager tenantManager,
IUnitOfWorkManager unitOfWorkManager,
AbpLoginResultTypeHelper abpLoginResultTypeHelper,
LogInManager logInManager,
SignInManager signInManager,
UserRegistrationManager userRegistrationManager,
ISessionAppService sessionAppService,
ITenantCache tenantCache,
INotificationPublisher notificationPublisher)
{
_userManager = userManager;
_multiTenancyConfig = multiTenancyConfig;
_tenantManager = tenantManager;
_unitOfWorkManager = unitOfWorkManager;
_abpLoginResultTypeHelper = abpLoginResultTypeHelper;
_logInManager = logInManager;
_signInManager = signInManager;
_userRegistrationManager = userRegistrationManager;
_sessionAppService = sessionAppService;
_tenantCache = tenantCache;
_notificationPublisher = notificationPublisher;
}
#region Login / Logout
public ActionResult Login(string userNameOrEmailAddress = "", string returnUrl = "", string successMessage = "")
{
if (string.IsNullOrWhiteSpace(returnUrl))
{
returnUrl = GetAppHomeUrl();
}
return View(new LoginFormViewModel
{
ReturnUrl = returnUrl,
IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled,
IsSelfRegistrationAllowed = IsSelfRegistrationEnabled(),
MultiTenancySide = AbpSession.MultiTenancySide
});
}
#pragma warning disable SG0016 // Controller method is vulnerable to CSRF -- No it's not!
[HttpPost]
[UnitOfWork]
public virtual async Task<JsonResult> Login(LoginViewModel loginModel, string returnUrl = "", string returnUrlHash = "")
{
returnUrl = NormalizeReturnUrl(returnUrl);
if (!string.IsNullOrWhiteSpace(returnUrlHash))
{
returnUrl = returnUrl + returnUrlHash;
}
var loginResult = await GetLoginResultAsync(loginModel.UsernameOrEmailAddress, loginModel.Password, GetTenancyNameOrNull());
await _signInManager.SignInAsync(loginResult.Identity, loginModel.RememberMe);
await UnitOfWorkManager.Current.SaveChangesAsync();
return Json(new AjaxResponse { TargetUrl = returnUrl });
}
#pragma warning restore SG0016 // Controller method is vulnerable to CSRF -- No it's not!
public async Task<ActionResult> Logout()
{
await _signInManager.SignOutAsync();
return RedirectToAppHome();
}
private async Task<AbpLoginResult<Tenant, User>> GetLoginResultAsync(string usernameOrEmailAddress, string password, string tenancyName)
{
var loginResult = await _logInManager.LoginAsync(usernameOrEmailAddress, password, tenancyName);
switch (loginResult.Result)
{
case AbpLoginResultType.Success:
return loginResult;
default:
throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result, usernameOrEmailAddress, tenancyName);
}
}
#endregion
#region Register
public ActionResult Register()
{
return RegisterView(new RegisterViewModel());
}
private ActionResult RegisterView(RegisterViewModel model)
{
ViewBag.IsMultiTenancyEnabled = _multiTenancyConfig.IsEnabled;
return View("Register", model);
}
private bool IsSelfRegistrationEnabled()
{
if (!AbpSession.TenantId.HasValue)
{
return false; //No registration enabled for host users!
}
return true;
}
#pragma warning disable SG0016 // Controller method is vulnerable to CSRF
[HttpPost]
[UnitOfWork]
public async Task<ActionResult> Register(RegisterViewModel model)
{
try
{
ExternalLoginInfo externalLoginInfo = null;
if (model.IsExternalLogin)
{
externalLoginInfo = await _signInManager.GetExternalLoginInfoAsync();
if (externalLoginInfo == null)
{
throw new Exception("Can not external login!");
}
model.UserName = model.EmailAddress;
model.Password = Authorization.Users.User.CreateRandomPassword();
}
else
{
if (model.UserName.IsNullOrEmpty() || model.Password.IsNullOrEmpty())
{
throw new UserFriendlyException(L("FormIsNotValidMessage"));
}
}
var user = await _userRegistrationManager.RegisterAsync(
model.Name,
model.Surname,
model.EmailAddress,
model.UserName,
model.Password,
true //Assumed email address is always confirmed. Change this if you want to implement email confirmation.
);
//Getting tenant-specific settings
var isEmailConfirmationRequiredForLogin = await SettingManager.GetSettingValueAsync<bool>(AbpZeroSettingNames.UserManagement.IsEmailConfirmationRequiredForLogin);
if (model.IsExternalLogin)
{
Debug.Assert(externalLoginInfo != null);
if (string.Equals(externalLoginInfo.Principal.FindFirstValue(ClaimTypes.Email), model.EmailAddress, StringComparison.OrdinalIgnoreCase))
{
user.IsEmailConfirmed = true;
}
user.Logins = new List<UserLogin>
{
new UserLogin
{
LoginProvider = externalLoginInfo.LoginProvider,
ProviderKey = externalLoginInfo.ProviderKey,
TenantId = user.TenantId
}
};
}
await _unitOfWorkManager.Current.SaveChangesAsync();
Debug.Assert(user.TenantId != null);
var tenant = await _tenantManager.GetByIdAsync(user.TenantId.Value);
//Directly login if possible
if (user.IsActive && (user.IsEmailConfirmed || !isEmailConfirmationRequiredForLogin))
{
AbpLoginResult<Tenant, User> loginResult;
if (externalLoginInfo != null)
{
loginResult = await _logInManager.LoginAsync(externalLoginInfo, tenant.TenancyName);
}
else
{
loginResult = await GetLoginResultAsync(user.UserName, model.Password, tenant.TenancyName);
}
if (loginResult.Result == AbpLoginResultType.Success)
{
await _signInManager.SignInAsync(loginResult.Identity, false);
return Redirect(GetAppHomeUrl());
}
Logger.Warn("New registered user could not be login. This should not be normally. login result: " + loginResult.Result);
}
return View("RegisterResult", new RegisterResultViewModel
{
TenancyName = tenant.TenancyName,
NameAndSurname = user.Name + " " + user.Surname,
UserName = user.UserName,
EmailAddress = user.EmailAddress,
IsEmailConfirmed = user.IsEmailConfirmed,
IsActive = user.IsActive,
IsEmailConfirmationRequiredForLogin = isEmailConfirmationRequiredForLogin
});
}
catch (UserFriendlyException ex)
{
ViewBag.ErrorMessage = ex.Message;
return View("Register", model);
}
}
#pragma warning restore SG0016 // Controller method is vulnerable to CSRF
#endregion
#region External Login
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult ExternalLogin(string provider, string returnUrl)
{
var redirectUrl = Url.Action(
"ExternalLoginCallback",
"Account",
new
{
ReturnUrl = returnUrl
});
return Challenge(
//TODO: ...?
//new Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
//{
// Items = { { "LoginProvider", provider } },
// RedirectUri = redirectUrl
//},
provider
);
}
[UnitOfWork]
public virtual async Task<ActionResult> ExternalLoginCallback(string returnUrl, string remoteError = null)
{
returnUrl = NormalizeReturnUrl(returnUrl);
if (remoteError != null)
{
Logger.Error("Remote Error in ExternalLoginCallback: " + remoteError);
throw new UserFriendlyException(L("CouldNotCompleteLoginOperation"));
}
var externalLoginInfo = await _signInManager.GetExternalLoginInfoAsync();
if (externalLoginInfo == null)
{
Logger.Warn("Could not get information from external login.");
return RedirectToAction(nameof(Login));
}
await _signInManager.SignOutAsync();
var tenancyName = GetTenancyNameOrNull();
var loginResult = await _logInManager.LoginAsync(externalLoginInfo, tenancyName);
switch (loginResult.Result)
{
case AbpLoginResultType.Success:
await _signInManager.SignInAsync(loginResult.Identity, false);
return Redirect(returnUrl);
case AbpLoginResultType.UnknownExternalLogin:
return await RegisterForExternalLogin(externalLoginInfo);
default:
throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(
loginResult.Result,
externalLoginInfo.Principal.FindFirstValue(ClaimTypes.Email) ?? externalLoginInfo.ProviderKey,
tenancyName
);
}
}
private async Task<ActionResult> RegisterForExternalLogin(ExternalLoginInfo externalLoginInfo)
{
var email = externalLoginInfo.Principal.FindFirstValue(ClaimTypes.Email);
var nameinfo = ExternalLoginInfoHelper.GetNameAndSurnameFromClaims(externalLoginInfo.Principal.Claims.ToList());
var viewModel = new RegisterViewModel
{
EmailAddress = email,
Name = nameinfo.name,
Surname = nameinfo.surname,
IsExternalLogin = true,
ExternalLoginAuthSchema = externalLoginInfo.LoginProvider
};
if (nameinfo.name != null &&
nameinfo.surname != null &&
email != null)
{
return await Register(viewModel);
}
return RegisterView(viewModel);
}
[UnitOfWork]
protected virtual async Task<List<Tenant>> FindPossibleTenantsOfUserAsync(UserLoginInfo login)
{
List<User> allUsers;
using (_unitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant))
{
allUsers = await _userManager.FindAllAsync(login);
}
return allUsers
.Where(u => u.TenantId != null)
.Select(u => AsyncHelper.RunSync(() => _tenantManager.FindByIdAsync(u.TenantId.Value)))
.ToList();
}
#endregion
#region Helpers
public ActionResult RedirectToAppHome()
{
return RedirectToAction("Index", "Home");
}
public string GetAppHomeUrl()
{
return Url.Action("Index", "Home");
}
#endregion
#region Change Tenant
public async Task<ActionResult> TenantChangeModal()
{
var loginInfo = await _sessionAppService.GetCurrentLoginInformations();
return View("/Views/Shared/Components/TenantChange/_ChangeModal.cshtml", new ChangeModalViewModel
{
TenancyName = loginInfo.Tenant?.TenancyName
});
}
#endregion
#region Common
private string GetTenancyNameOrNull()
{
if (!AbpSession.TenantId.HasValue)
{
return null;
}
return _tenantCache.GetOrNull(AbpSession.TenantId.Value)?.TenancyName;
}
private string NormalizeReturnUrl(string returnUrl, Func<string> defaultValueBuilder = null)
{
if (defaultValueBuilder == null)
{
defaultValueBuilder = GetAppHomeUrl;
}
if (returnUrl.IsNullOrEmpty())
{
return defaultValueBuilder();
}
if (Url.IsLocalUrl(returnUrl))
{
return returnUrl;
}
return defaultValueBuilder();
}
#endregion
#region Etc
/// <summary>
/// This is a demo code to demonstrate sending notification to default tenant admin and host admin uers.
/// Don't use this code in production !!!
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public async Task<ActionResult> TestNotification(string message = "")
{
if (message.IsNullOrEmpty())
{
message = "This is a test notification, created at " + Clock.Now;
}
var defaultTenantAdmin = new UserIdentifier(1, 2);
var hostAdmin = new UserIdentifier(null, 1);
await _notificationPublisher.PublishAsync(
"App.SimpleMessage",
new MessageNotificationData(message),
severity: NotificationSeverity.Info,
userIds: new[] { defaultTenantAdmin, hostAdmin }
);
return Content("Sent notification: " + message);
}
#endregion
}
} | Magik3a/PatientManagement_Admin | PatientManagement.Reservation/PatientManagement.Reservation.Web.Mvc/Controllers/AccountController.cs | C# | mit | 16,906 |
USE [ANTERO]
GO
/****** Object: View [dw].[v_haku_ja_valinta_kk_yo] Script Date: 23.3.2020 20:53:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dw].[v_haku_ja_valinta_kk_yo] AS
SELECT --top 10
cast(f.loadtime as date) as Päivitysaika
,Lukumäärä = 1
,[alpa] = 0
,[valpa] = 0
,[Pisteraja] = NULL
,[Ensikertaisena kohdeltava hakija] = f.ensikertainen_hakija
,[Hakemus OID] = f.hakemus_oid
,[Haku AMK/YO] = d46.selite_fi
,[Haku] = d25.haun_nimi_fi
,[Hakuaika] = coalesce(d31.selite_fi,'Tieto puuttuu')
,[Hakukohde] = d10.selite_fi
,[hakukohde OID] = d10.oid
,[Hakutapa] = case d25.hakutapa_fi when 'Jatkuva haku' then 'Erillishaku' else d25.hakutapa_fi end
,[Hakutyyppi] = d25.hakutyyppi_fi
,[Hakukohteen koulutustoimija] = d16a.organisaatio_fi
,[Korkeakoulu] = d16b.organisaatio_fi
,[Toimipiste] = d16c.organisaatio_fi
,[Maakunta (hakukohde)] = d19.maakunta_fi
,[Kunta (hakukohde)] = d19.kunta_fi
,[Hakukohteen koulutusaste] = d20.koulutusaste2002_fi
,[Hakukohteen koulutusala 2002] = d20.koulutusala2002_fi
,[Hakukohteen opintoala 2002] = d20.opintoala2002_fi
,[Koulutusala (1995)] = d20.opintoala1995_fi
,[Koulutusaste, taso 1 (hakukohde)] = d20.koulutusastetaso1_fi
,[Koulutusaste, taso 2 (hakukohde)] = d20.koulutusastetaso2_fi
,[Koulutusala, taso 1 (hakukohde)] = d20.koulutusalataso1_fi
,[Koulutusala, taso 2 (hakukohde)] = d20.koulutusalataso2_fi
,[Koulutusala, taso 3 (hakukohde)] = d20.koulutusalataso3_fi
,[OKM ohjauksen ala (hakukohde)] = d20.okmohjauksenala_fi
,[Hakutoive] = f.hakutoive
,[1 Hakukohde] = d32.selite_fi
,[1 Koulutusala, taso 1] = d33.koulutusalataso1_fi
,[1 Koulutusala, taso 2] = d33.koulutusalataso2_fi
,[1 Koulutusala, taso 3] = d33.koulutusalataso3_fi
,[2 Hakukohde] = d34.selite_fi
,[2 Koulutusala, taso 1] = d35.koulutusalataso1_fi
,[2 Koulutusala, taso 2] = d35.koulutusalataso2_fi
,[2 Koulutusala, taso 3] = d35.koulutusalataso3_fi
,[3 Hakukohde] = d36.selite_fi
,[3 Koulutusala, taso 1] = d37.koulutusalataso1_fi
,[3 Koulutusala, taso 2] = d37.koulutusalataso2_fi
,[3 Koulutusala, taso 3] = d37.koulutusalataso3_fi
,[4 Hakukohde] = d38.selite_fi
,[4 Koulutusala, taso 1] = d39.koulutusalataso1_fi
,[4 Koulutusala, taso 2] = d39.koulutusalataso2_fi
,[4 Koulutusala, taso 3] = d39.koulutusalataso3_fi
,[5 Hakukohde] = d40.selite_fi
,[5 Koulutusala, taso 1] = d41.koulutusalataso1_fi
,[5 Koulutusala, taso 2] = d41.koulutusalataso2_fi
,[5 Koulutusala, taso 3] = d41.koulutusalataso3_fi
,[6 Hakukohde] = d42.selite_fi
,[6 Koulutusala, taso 1] = d43.koulutusalataso1_fi
,[6 Koulutusala, taso 2] = d43.koulutusalataso2_fi
,[6 Koulutusala, taso 3] = d43.koulutusalataso3_fi
,[Valintatapajono] = d47.JonoNimi
,[Pisteet] = d47.Kokonaispisteet
,[Henkilö OID] = henkilo_oid
,[Ikä] = d9.ika_fi
,[Ikäryhmä] = d9.ikaryhma2_fi
,[Kansalaisuus] = COALESCE(d28.maa,'Tieto puuttuu')
,[Kansalaisuus (maanosa)] =
case
when d28.maa_koodi = '246' then 'Suomi'
when d28.maa_koodi in ('-1','999') then 'Tieto puuttuu'
when d28.maanosa_koodi = '1' then 'Eurooppa (pl. Suomi)'
else d28.maanosa
end
,[Kansalaisuus (ryhmä)] =
case
when d28.maa_koodi = '246' then 'Suomi'
when d28.maa_koodi != '246' and (d28.eumaa_koodi = '1' or d28.etamaa_koodi = '1') then 'EU ja ETA'
when d28.maa_koodi in ('-1',999) then 'Tieto puuttuu'
else 'Muut'
end
,[Kotipaikkakunta] = d6.kunta_fi
,[Kotipaikan maakunta] = d6.maakunta_fi
,[Kotipaikan AVI] = d6.avi_fi
,[Kotipaikan ELY] = d6.ely_fi
,[Koulutuksen alkamisvuosi] = f.koulutuksen_alkamisvuosi
,[Koulutuksen alkamiskausi] = d2.selite_fi
,[Koulutuksen kieli] = d27.kieli_fi
,[Opiskelun laajuus] = d3.selite_fi
,[Pohjakoulutuksen maa] =
case
when d4.kytkin_koodi = 1 then 'Ulkomaat'
when d4.kytkin_koodi = 0 then 'Suomi'
else d4.kytkin_fi
end
,[Pohjakoulutus] = d22.selite_fi
,[Sektori] = d20.koulutussektori_fi --coalesce(case when d10.hakukohde like 'Ammatillinen opettajankoulutus%' or d10.hakukohde in ('Ammatillinen erityisopettajankoulutus','Ammatillinen opinto-ohjaajankoulutus') then 'Ammattikorkeakoulutus' else f.sektori_kk end, 'Tuntematon')
,[Sukupuoli] = d7.sukupuoli_fi
,[Toisen asteen koulutuksen suoritusvuosi] = case f.toisen_asteen_koulutuksen_suoritusvuosi when '-1' then 'Tieto puuttuu' else f.toisen_asteen_koulutuksen_suoritusvuosi end
,[Tutkinnon taso] = d45.selite_fi
,[Tutkinnon aloitussykli] = d44.selite_fi
--,[Valinnan tila] = d23.valinnan_tila
--,[Vastaanoton tila] = d24.vastaanoton_tila
,[Äidinkieli] = d8.kieliryhma1_fi
--Ruotsi
,[Förstagångssökande] = case f.ensikertainen_hakija when 'Ei ensikertainen hakija' then 'Ej förstagångssökande' when 'Ensikertainen hakija' then 'Förstagångssökande' else 'Information saknas' end
,[Ansökan YH/Univ.] = d46.selite_sv
,[Ansökning] = d25.haun_nimi_sv
,[Ansökningstiden] = coalesce(d31.selite_sv,'Information saknas')
,[Sökobjekt] = d10.selite_sv
,[Gemensam/separat ansökan] = case d25.hakutapa_sv when 'Fortgående ansökan' then 'Separata antagningar' else d25.hakutapa_sv end
,[Typ av ansökan] = d25.hakutyyppi_sv
,[Högskola (sökobjekt)] = d16b.organisaatio_sv
,[Anstalt (sökobjekt)] = d16c.organisaatio_sv
,[Landskap (sökobjekt)] = d19.maakunta_SV
,[Kommun (sökobjekt)] = d19.kunta_SV
,[Utb.nivå (sökobjekt)] = d20.koulutusaste2002_SV
,[Utb.område (2002) (sökobjekt)] = d20.koulutusala2002_sv
,[Studieområde (2002) (sökobjekt)] = d20.opintoala2002_SV
,[Utb.område (1995) (sökobjekt)] = d20.opintoala1995_SV
,[Utb.nivå, nivå 1 (sökobjekt)] = d20.koulutusastetaso1_sv--coalesce(d20b.iscle2011_SV,'Övriga eller Information saknasa')
,[Utb.nivå, nivå 2 (sökobjekt)] = d20.koulutusastetaso2_sv--coalesce(d20b.koulutusaste_taso2_SV,'Övriga eller Information saknasa')
,[Utb.område, nivå 1 (sökobjekt)] = d20.koulutusalataso1_sv--coalesce(d20b.iscfibroad2013_SV,'Övriga eller Information saknasa')
,[Utb.område, nivå 2 (sökobjekt)] = d20.koulutusalataso2_sv--coalesce(d20b.iscfinarrow2013_SV,'Övriga eller Information saknasa')
,[Utb.område, nivå 3 (sökobjekt)] = d20.koulutusalataso3_sv--coalesce(d20b.iscfi2013_SV,'Övriga eller Information saknasa')
,[UKM-styrningsområde (sökobjekt)] = d20.okmohjauksenala_sv
,[Ansökningsönskemål] = f.hakutoive
,[1 Sökobjekt] = d32.selite_sv
,[1 Utb.område, nivå 1] = d33.koulutusalataso1_sv
,[1 Utb.område, nivå 2] = d33.koulutusalataso2_sv
,[1 Utb.område, nivå 3] = d33.koulutusalataso3_sv
,[2 Sökobjekt] = d34.selite_sv
,[2 Utb.område, nivå 1] = d35.koulutusalataso1_sv
,[2 Utb.område, nivå 2] = d35.koulutusalataso2_sv
,[2 Utb.område, nivå 3] = d35.koulutusalataso3_sv
,[3 Sökobjekt] = d36.selite_sv
,[3 Utb.område, nivå 1] = d37.koulutusalataso1_sv
,[3 Utb.område, nivå 2] = d37.koulutusalataso2_sv
,[3 Utb.område, nivå 3] = d37.koulutusalataso3_sv
,[4 Sökobjekt] = d38.selite_sv
,[4 Utb.område, nivå 1] = d39.koulutusalataso1_sv
,[4 Utb.område, nivå 2] = d39.koulutusalataso2_sv
,[4 Utb.område, nivå 3] = d39.koulutusalataso3_sv
,[5 Sökobjekt] = d40.selite_sv
,[5 Utb.område, nivå 1] = d41.koulutusalataso1_sv
,[5 Utb.område, nivå 2] = d41.koulutusalataso2_sv
,[5 Utb.område, nivå 3] = d41.koulutusalataso3_sv
,[6 Sökobjekt] = d42.selite_sv
,[6 Utb.område, nivå 1] = d43.koulutusalataso1_sv
,[6 Utb.område, nivå 2] = d43.koulutusalataso2_sv
,[6 Utb.område, nivå 3] = d43.koulutusalataso3_sv
,[Ålder] = d9.ika_SV
,[Åldersgrupp] = d9.ikaryhma2_sv
,[Medborgarskap] = d28.maa_SV
,[Medborgarskap (världsdel)] =
case
when d28.maa_koodi = '246' then 'Finland'
when d28.maa_koodi in ('-1','999') then 'Information saknas'
when d28.maanosa_koodi = '1' then 'Europa (exkl. Finland)'
else d28.maanosa_SV
end
,[Medborgarskap (gruppen)] =
case
when d28.maa_koodi = '246' then 'Finland'
when d28.maa_koodi != '246' and (d28.eumaa_koodi = '1' or d28.etamaa_koodi = '1') then 'EU eller EES'
when d28.maa_koodi in ('-1',999) then 'Information saknas'
else 'Andra'
end
,[Hemkommun] = d6.kunta_SV
,[Hemlandskap] = d6.maakunta_SV
,[Begynnelseår] = f.koulutuksen_alkamisvuosi
,[Begynnelsetermin] = d2.selite_sv
,[Utbildningens språk] = d27.kieli_SV
,[Studiernas omfattning] = d3.selite_sv
,[Grundutbildningens land] =
case
when d4.kytkin_koodi = 1 then 'Utomlands'
when d4.kytkin_koodi = 0 then 'Finland'
else d4.kytkin_fi
end
,[Grundutbildning] = d22.selite_sv
,[Sektor] = d20.koulutussektori_sv--coalesce(case when d10.hakukohde like 'Ammatillinen opettajankoulutus%' or d10.hakukohde in ('Ammatillinen erityisopettajankoulutus','Ammatillinen opinto-ohjaajankoulutus') then 'Yrkeshögskoleutbildning' when f.sektori_kk = 'Ammattikorkeakoulutus' then 'Yrkeshögskoleutbildning' when f.sektori_kk = 'Yliopistokoulutus' then 'Universitetsutbildning' else 'Information saknas' end, 'Information saknas')
,[Kön] = d7.sukupuoli_SV
,[År då andra stadiets utbildning avlagts] = case f.toisen_asteen_koulutuksen_suoritusvuosi when '-1' then 'Information saknas' else f.toisen_asteen_koulutuksen_suoritusvuosi end
,[Examensnivå (sökobjekt)] = d45.selite_sv
,[Cykeln (sökobjekt)] = d44.selite_sv
,[Modersmål] = d8.kieliryhma1_sv
--Englanti
,[First-time applicant] = case f.ensikertainen_hakija when 'Ei ensikertainen hakija' then 'Not considered as a first-time applicant' when 'Ensikertainen hakija' then 'Considered as a first-time applicant' else 'Missing data' end
,[Application to UAS/Univ.] = d46.selite_en
,[Application] = d25.haun_nimi_en
,[Application period] = coalesce(d31.selite_en,'Missing data')
,[Applied study programme] = d10.selite_en
,[Joint/separate application] = case when d25.hakutapa_fi in ('Jatkuva haku','Erillishaku') then 'Separate application' when d25.hakutapa_fi = 'Yhteishaku' then 'Joint application' end --Application system
,[Application round] = d25.hakutyyppi_en
,[Higher education institution] = d16b.organisaatio_en
,[Faculty/campus] = d16c.organisaatio_en--isnull(d16.toimipiste_EN,d16.oppilaitos_EN)
,[Region of study programme] = d19.maakunta_EN
,[Municipality of study programme] = d19.kunta_EN
,[Level of education] = d20.koulutusaste2002_EN
,[Field of ed. (2002)] = d20.koulutusala2002_en
,[Subfield of ed. (2002)] = d20.opintoala2002_EN
,[Field of ed. (1995)] = d20.opintoala1995_EN
,[Level of ed., tier 1] = d20.koulutusastetaso1_en--coalesce(d20b.iscle2011_EN,'Unknown')--tier 1
,[Level of ed., tier 2] = d20.koulutusastetaso2_en--coalesce(d20b.koulutusaste_taso2_EN,'Unknown')--tier 2
,[Field of ed., level 1] = d20.koulutusalataso1_en--coalesce(d20b.iscfibroad2013_EN,'Unknown')--tier 1
,[Field of ed., level 2] = d20.koulutusalataso2_en--coalesce(d20b.iscfinarrow2013_EN,'Unknown')--tier 2
,[Field of ed., level 3] = d20.koulutusalataso3_en--coalesce(d20b.iscfi2013_EN,'Unknown')--tier 3
,[Field of ed., HE steering] = d20.okmohjauksenala_en
,[Preference of study programme] = f.hakutoive
,[1 Study programme] = d32.selite_en
,[1 Field of ed., tier 1] = d33.koulutusalataso1_en
,[1 Field of ed., tier 2] = d33.koulutusalataso2_en
,[1 Field of ed., tier 3] = d33.koulutusalataso3_en
,[2 Study programme] = d34.selite_en
,[2 Field of ed., tier 1] = d35.koulutusalataso1_en
,[2 Field of ed., tier 2] = d35.koulutusalataso2_en
,[2 Field of ed., tier 3] = d35.koulutusalataso3_en
,[3 Study programme] = d36.selite_en
,[3 Field of ed., tier 1] = d37.koulutusalataso1_en
,[3 Field of ed., tier 2] = d37.koulutusalataso2_en
,[3 Field of ed., tier 3] = d37.koulutusalataso3_en
,[4 Study programme] = d38.selite_en
,[4 Field of ed., tier 1] = d39.koulutusalataso1_en
,[4 Field of ed., tier 2] = d39.koulutusalataso2_en
,[4 Field of ed., tier 3] = d39.koulutusalataso3_en
,[5 Study programme] = d40.selite_en
,[5 Field of ed., tier 1] = d41.koulutusalataso1_en
,[5 Field of ed., tier 2] = d41.koulutusalataso2_en
,[5 Field of ed., tier 3] = d41.koulutusalataso3_en
,[6 Study programme] = d42.selite_en
,[6 Field of ed., tier 1] = d43.koulutusalataso1_en
,[6 Field of ed., tier 2] = d43.koulutusalataso2_en
,[6 Field of ed., tier 3] = d43.koulutusalataso3_en
,[Age] = d9.ika_EN
,[Age group] = d9.ikaryhma2_en
,[Nationality] = d28.maa_EN
,[Nationality (continent)] =
case
when d28.maa_koodi = '246' then 'Finland'
when d28.maa_koodi in ('-1','999') then 'Missing data'
when d28.maanosa_koodi = '1' then 'Europe (excl. Finland)'
else d28.maanosa_EN
end
,[Nationality (group)] =
case
when d28.maa_koodi = '246' then 'Finland'
when d28.maa_koodi != '246' and (d28.eumaa_koodi = '1' or d28.etamaa_koodi = '1') then 'EU or EEA'
when d28.maa_koodi in ('-1',999) then 'Missing data'
else 'Other'
end
,[Municipality of residence] = d6.kunta_EN
,[Region of residence] = d6.maakunta_EN
,[Year (start of studies)] = f.koulutuksen_alkamisvuosi
,[Term (start of studies)] = d2.selite_en
,[Language of education] = d27.kieli_EN
,[Extent of the study programme] = d3.selite_en
,[Country of prior education] =
case
when d4.kytkin_koodi = 1 then 'Abroad'
when d4.kytkin_koodi = 0 then 'Finland'
else d4.kytkin_fi
end
,[Prior education] = d22.selite_en
,[Sector] = d20.koulutussektori_en--coalesce(case when d10.hakukohde like 'Ammatillinen opettajankoulutus%' or d10.hakukohde in ('Ammatillinen erityisopettajankoulutus','Ammatillinen opinto-ohjaajankoulutus') then 'University of applied sciences education' when f.sektori_kk = 'Ammattikorkeakoulutus' then 'University of applied sciences education' when f.sektori_kk = 'Yliopistokoulutus' then 'University education' else 'Unknown' end, 'Unknown')
,[Gender] = d7.sukupuoli_EN
,[Graduation year (upper secondary education)] = case f.toisen_asteen_koulutuksen_suoritusvuosi when '-1' then 'Unknown' else f.toisen_asteen_koulutuksen_suoritusvuosi end
,[Level of degree] = d45.selite_en
,[Beginning cycle of education] = d44.selite_en
,[Mother tongue] = d8.kieliryhma1_en
--KOODIMUUTTUJAT
,[Koodit Tutkinto (hakukohde)] = d20.koulutusluokitus_koodi
,[Koodit Koulutusala, taso 1 (hakukohde)] = d20.koulutusalataso1_koodi
,[Koodit Koulutusala, taso 2 (hakukohde)] = d20.koulutusalataso2_koodi
,[Koodit Koulutusala, taso 3 (hakukohde)] = d20.koulutusalataso3_koodi
,[Koodit OKM ohjauksen ala (hakukohde)] = d20.okmohjauksenala_koodi
,[Koodit Koulutuksen järjestäjä] = d16a.organisaatio_koodi
,[Koodit Korkeakoulu] = d16b.organisaatio_koodi
,[Koodit Maakunta hakukohde] = d19.maakunta_koodi
,[Koodit Kunta hakukohde] = d19.kunta_koodi
,[Koodit Kotimaakunta hakija] = d6.maakunta_koodi
,[Koodit Kotikunta hakija] = d6.kunta_koodi
--Apusarakkeet mittareille
/* nettouttamatonta hakijamäärää varten valitaan yksi pohjakoulutus per hakija (per haku) */
,[yksi_pk_per_hakija] = case
when f.d_pohjakoulutuskk_id in (select top 1 fh.d_pohjakoulutuskk_id from ANTERO.dw.f_haku_ja_valinta_hakeneet_korkea_aste fh where fh.henkilo_oid=f.henkilo_oid and fh.d_haku_id=f.d_haku_id order by fh.d_pohjakoulutuskk_id) then 1
else 0
end
,[Hakijat2] = case when f.loadtime>=d1.hakijat then 1 else 0 end
,[Ensisijaiset hakijat2] = case when f.loadtime>=d1.hakijat and hakutoive=1 then 1 else 0 end
,[Valitut2] = case when f.loadtime>=d1.valitut and f.valinnan_tila IN ('HYVAKSYTTY','VARASIJALTA_HYVAKSYTTY','PERUNUT') then 1 else 0 end
,[Paikan vastaanottaneet2] = case when f.loadtime>=d1.vastaanottaneet and f.vastaanoton_tila IN ('VASTAANOTTANUT_SITOVASTI','EHDOLLISESTI_VASTAANOTTANUT') then 1 else 0 end
,[Aloittaneet2] = case when f.loadtime>=d1.aloittaneet and f.ilmoittautumisen_tila IN ('LASNA','LASNA_KOKO_LUKUVUOSI','LASNA_SYKSY') then 1 else 0 end
--Järjestys-kentät
,[Ensikertainen hakija järjestys] = left(f.ensikertainen_hakija,2)
,[Hakuaika järjestys] = coalesce(left(d31.selite_fi,3),'ööö')
,[Haku AMK/YO järjestys] = d46.jarjestys_koodi
,[Hakukohteen koulutusaste 2002 järjestys] = d20.jarjestys_koulutusaste2002_koodi
,[Hakukohteen koulutusala 2002 järjestys] = d20.jarjestys_koulutusala2002_koodi
,[Hakukohteen opintoala 2002 järjestys] = d20.jarjestys_opintoala2002_koodi
,[Hakukohteen koulutusala 1995 järjestys] = d20.jarjestys_opintoala1995_koodi
,[Koulutusaste, taso 1 järjestys] = d20.jarjestys_koulutusastetaso1_koodi
,[Koulutusaste, taso 2 järjestys] = d20.jarjestys_koulutusastetaso2_koodi
,[Koulutusala, taso 1 järjestys] = d20.jarjestys_koulutusalataso1_koodi
,[Koulutusala, taso 2 järjestys] = d20.jarjestys_koulutusalataso2_koodi
,[Koulutusala, taso 3 järjestys] = d20.jarjestys_koulutusalataso3_koodi
,[OKM ohjauksen ala järjestys] = d20.jarjestys_okmohjauksenala_koodi
,[Hakutoive järjestys] = f.hakutoive
,[Hakukohteen maakunta järjestys] = d19.jarjestys_maakunta_koodi
,[Hakutapa järjestys] = case when d25.hakutapa_fi='Yhteishaku' then 1 when d25.hakutapa_fi in ('Jatkuva haku','Erillishaku') then 2 else 99 end
,[Hakutyyppi järjestys] = d25.jarjestys_hakutyyppi
,[Ikä järjestys] = d9.jarjestys_ika
,[Ikä 5v järjestys] = d9.jarjestys_ikaryhma2
,[Kansalaisuus järjestys] = d28.jarjestys
,[Kansalaisuus maanosa järjestys] =
case
when d28.maa_koodi = '246' then 1
when d28.maa_koodi in ('-1','999') then 9998
when d28.maanosa_koodi = '1' then 2
else cast(d28.jarjestys_maanosa as int)+1
end
,[Kansalaisuus ryhmä järjestys] =
case
when d28.maa_koodi = '246' then 1
when d28.maa_koodi != '246' and (d28.eumaa_koodi = '1' or d28.etamaa_koodi = '1') then 2
when d28.maa_koodi in ('-1',999) then 99
else 3
end
,[Kotipaikkakunta järjestys] = left(d6.kunta_fi, 4)
,[Kotipaikan maakunta järjestys] = d6.jarjestys_maakunta_koodi
,[Kotipaikan AVI järjestys] = d6.jarjestys_avi_koodi
,[Kotipaikan ELY järjestys] = d6.jarjestys_ely_koodi
,[Koulutuksen kieli järjestys] = d27.kieli_koodi
,[Opiskelun laajuus järjestys] = d3.jarjestys--case when f.Opiskelun_laajuus='' then 9999 when len(opiskelun_laajuus)=2 then '0'+opiskelun_laajuus else f.Opiskelun_laajuus end
,[Pohjakoulutuksen maa järjestys] = d4.jarjestys_kytkin_koodi
,[Pohjakoulutus järjestys] = left(d22.selite_fi,3)--d22.jarjestys--case d22.jarjestys when '98' then 'yy' when 'yo' then 'aa' else d22.jarjestys end
,[Sektori järjestys] = d20.jarjestys_koulutussektori_koodi
,[Sukupuoli järjestys] = d7.jarjestys_sukupuoli_koodi
,[Toisen asteen koulutuksen suoritusvuosi järjestys] = case when f.toisen_asteen_koulutuksen_suoritusvuosi in ('0','Tieto puuttuu') then 9999 else 9999-f.toisen_asteen_koulutuksen_suoritusvuosi end
,[Tutkinnon taso (hakukohde) järjestys] = d45.jarjestys_koodi
,[Tutkinnon aloitussykli (hakukohde) järjestys] = d44.jarjestys_koodi
,[Äidinkieli versio1 järjestys] = d8.jarjestys_kieliryhma1
,[1 Koulutusala, taso 1 järjestys] = d33.jarjestys_koulutusalataso1_koodi
,[1 Koulutusala, taso 2 järjestys] = d33.jarjestys_koulutusalataso2_koodi
,[1 Koulutusala, taso 3 järjestys] = d33.jarjestys_koulutusalataso3_koodi
,[2 Koulutusala, taso 1 järjestys] = d35.jarjestys_koulutusalataso1_koodi
,[2 Koulutusala, taso 2 järjestys] = d35.jarjestys_koulutusalataso2_koodi
,[2 Koulutusala, taso 3 järjestys] = d35.jarjestys_koulutusalataso3_koodi
,[3 Koulutusala, taso 1 järjestys] = d37.jarjestys_koulutusalataso1_koodi
,[3 Koulutusala, taso 2 järjestys] = d37.jarjestys_koulutusalataso2_koodi
,[3 Koulutusala, taso 3 järjestys] = d37.jarjestys_koulutusalataso3_koodi
,[4 Koulutusala, taso 1 järjestys] = d39.jarjestys_koulutusalataso1_koodi
,[4 Koulutusala, taso 2 järjestys] = d39.jarjestys_koulutusalataso2_koodi
,[4 Koulutusala, taso 3 järjestys] = d39.jarjestys_koulutusalataso3_koodi
,[5 Koulutusala, taso 1 järjestys] = d41.jarjestys_koulutusalataso1_koodi
,[5 Koulutusala, taso 2 järjestys] = d41.jarjestys_koulutusalataso2_koodi
,[5 Koulutusala, taso 3 järjestys] = d41.jarjestys_koulutusalataso3_koodi
,[6 Koulutusala, taso 1 järjestys] = d43.jarjestys_koulutusalataso1_koodi
,[6 Koulutusala, taso 2 järjestys] = d43.jarjestys_koulutusalataso2_koodi
,[6 Koulutusala, taso 3 järjestys] = d43.jarjestys_koulutusalataso3_koodi
FROM ANTERO.dw.f_haku_ja_valinta_hakeneet_korkea_aste f
LEFT JOIN ANTERO.dw.d_haku d25 ON d25.id = f.d_haku_id
LEFT JOIN ANTERO.dw.d_kausi d2 ON d2.id = f.d_kausi_koulutuksen_alkamiskausi_id
INNER JOIN ANTERO.sa.sa_haku_ja_valinta_vuosikello_korkea_aste d1 on ((d1.haku_oid=d25.haku_oid and d1.haku_oid is not null) OR (d1.koulutuksen_alkamiskausi=cast(f.koulutuksen_alkamisvuosi as varchar)+cast(d2.jarjestys as varchar) and d25.hakutapa_koodi <> '01' and d1.haku_oid is null)) and f.loadtime >= d1.hakijat
LEFT JOIN ANTERO.dw.d_opintojenlaajuus d3 ON d3.id=f.d_opintojen_laajuus_id
LEFT JOIN ANTERO.dw.d_kytkin d4 ON d4.id=f.d_kytkin_pohjakoulutuskk_ulkomaat_id
LEFT JOIN ANTERO.dw.d_alueluokitus d6 ON d6.id = f.d_alueluokitus_kotipaikka_id
LEFT JOIN ANTERO.dw.d_sukupuoli d7 ON d7.id = f.d_sukupuoli_id
LEFT JOIN ANTERO.dw.d_kieli d8 ON d8.id = f.d_kieli_aidinkieli_id
LEFT JOIN ANTERO.dw.d_ika d9 ON d9.id = f.d_ika_id
LEFT JOIN ANTERO.dw.d_hakukohde d10 ON d10.id = f.d_hakukohde_id
LEFT JOIN ANTERO.dw.d_organisaatioluokitus d16a ON d16a.id = f.d_organisaatio_koulutuksen_jarjestaja_id
LEFT JOIN ANTERO.dw.d_organisaatioluokitus d16b ON d16b.id = f.d_organisaatio_oppilaitos_id
LEFT JOIN ANTERO.dw.d_organisaatioluokitus d16c ON d16c.id = f.d_organisaatio_toimipiste_id
LEFT JOIN ANTERO.dw.d_alueluokitus d19 ON d19.id = f.d_alueluokitus_hakukohde_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d20 ON d20.id = f.d_koulutusluokitus_hakukohde_id
LEFT JOIN ANTERO.dw.d_pohjakoulutus d22 ON d22.id = f.d_pohjakoulutuskk_id
LEFT JOIN ANTERO.dw.d_kieli d27 ON d27.id=f.d_kieli_koulutus_id
LEFT JOIN ANTERO.dw.d_maatjavaltiot2 d30 ON d30.id=f.d_maatjavaltiot_kansalaisuus_id
LEFT JOIN VipunenTK.dbo.d_valtio d28 ON d28.valtio_avain=d30.maatjavaltiot2_koodi
LEFT JOIN ANTERO.dw.d_hakuaika d31 ON d31.id=f.d_hakuaika_id
LEFT JOIN ANTERO.dw.d_hakukohde d32 ON d32.id=f.d_hakukohde_ensisijainen_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d33 ON d33.id=f.d_koulutus_ensisijainen_hakukohde_id
LEFT JOIN ANTERO.dw.d_hakukohde d34 ON d34.id=f.d_hakukohde_toinen_hakukohde_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d35 ON d35.id=f.d_koulutus_toinen_hakukohde_id
LEFT JOIN ANTERO.dw.d_hakukohde d36 ON d36.id=f.d_hakukohde_kolmas_hakukohde_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d37 ON d37.id=f.d_koulutus_kolmas_hakukohde_id
LEFT JOIN ANTERO.dw.d_hakukohde d38 ON d38.id=f.d_hakukohde_neljas_hakukohde_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d39 ON d39.id=f.d_koulutus_neljas_hakukohde__id
LEFT JOIN ANTERO.dw.d_hakukohde d40 ON d40.id=f.d_hakukohde_viides_hakukohde_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d41 ON d41.id=f.d_koulutus_viides_hakukohde_id
LEFT JOIN ANTERO.dw.d_hakukohde d42 ON d42.id=f.d_hakukohde_kuudes_hakukohde_id
LEFT JOIN ANTERO.dw.d_koulutusluokitus d43 ON d43.id=f.d_koulutus_kuudes_hakukohde_id
LEFT JOIN ANTERO.dw.d_tutkinnon_aloitussykli_kk d44 on d44.id=f.d_tutkinnon_aloitussykli_kk_id
LEFT JOIN ANTERO.dw.d_tutkinnon_taso_kk d45 on d45.id=f.d_tutkinnon_taso_kk_id
LEFT JOIN ANTERO.dw.d_haku_amk_yo d46 on d46.id=f.d_haku_amk_yo_id
LEFT JOIN ANTERO.sa.sa_odw_valintatapajono d47 on d47.henkiloOID=f.henkilo_oid and d47.hakukohdeOID=d10.oid and d47.hakuOID=d25.haku_oid
where d20.koulutussektori_koodi = '5'
UNION ALL
--ALOITUSPAIKAT
Select distinct --top 0
cast(f.loadtime as date) as Päivitysaika
,Lukumäärä = 0
,case when f.loadtime>=d4.aloituspaikat then f.[aloituspaikat] else null end as alpa
,case when f.loadtime>=d4.aloituspaikat then f.[valintojen_aloituspaikat] else null end as valpa
,f.alin_laskettuvalintapistemaara as pisteraja
,[Ensikertaisena kohdeltava hakija] = NULL
,[Hakemus OID] = null
,[Haku AMK/YO] = NULL
,[Haku] = d1.haun_nimi_fi
,[Hakuaika] = coalesce(d13.selite_fi,'Tieto puuttuu')
,[Hakukohde] = d3.selite_fi
,[Hakukohde OID] = d3.oid
,[Hakutapa] = case d1.hakutapa_fi when 'Jatkuva haku' then 'Erillishaku' else d1.hakutapa_fi end
,[Hakutyyppi] = d1.hakutyyppi_fi
,[Hakukohteen koulutustoimija] = d8a.organisaatio_fi
,[Hakukohteen oppilaitos] = d8b.organisaatio_fi
,[Hakukohteen toimipiste] = d8c.organisaatio_fi
,[Hakukohteen maakunta] = d5.maakunta_fi
,[Hakukohteen kunta] = d5.kunta_fi
,[Hakukohteen koulutusaste] = d6.koulutusaste2002_fi
,[Hakukohteen koulutusala 2002] = d6.koulutusala2002_fi
,[Hakukohteen opintoala 2002] = d6.opintoala2002_fi
,[Hakukohteen koulutusala 1995] = d6.opintoala1995_fi
,[Koulutusaste, taso 1 (hakukohde)] = d6.koulutusastetaso1_fi
,[Koulutusaste, taso 2 (hakukohde)] = d6.koulutusastetaso2_fi
,[Koulutusala, taso 1 (hakukohde)] = d6.koulutusalataso1_fi
,[Koulutusala, taso 2 (hakukohde)] = d6.koulutusalataso2_fi
,[Koulutusala, taso 3 (hakukohde)] = d6.koulutusalataso3_fi
,[OKM ohjauksen ala (hakukohde)] = d6.okmohjauksenala_fi
,[Hakutoive] = NULL
,[1 hakukohde] = NULL -- d32.hakukohde
,[1 Koulutusala, taso 1] = NULL -- d33b.iscfibroad2013
,[1 Koulutusala, taso 2] = NULL -- d33b.iscfinarrow2013
,[1 Koulutusala, taso 3] = NULL -- d33b.iscfi2013
,[2 hakukohde] = NULL -- d34.hakukohde
,[2 Koulutusala, taso 1] = NULL -- d35b.iscfibroad2013
,[2 Koulutusala, taso 2] = NULL -- d35b.iscfinarrow2013
,[2 Koulutusala, taso 3] = NULL -- d35b.iscfi2013
,[3 hakukohde] = NULL -- d36.hakukohde
,[3 Koulutusala, taso 1] = NULL -- d37b.iscfibroad2013
,[3 Koulutusala, taso 2] = NULL -- d37b.iscfinarrow2013
,[3 Koulutusala, taso 3] = NULL -- d37b.iscfi2013
,[4 hakukohde] = NULL -- d38.hakukohde
,[4 Koulutusala, taso 1] = NULL -- d39b.iscfibroad2013
,[4 Koulutusala, taso 2] = NULL -- d39b.iscfinarrow2013
,[4 Koulutusala, taso 3] = NULL -- d39b.iscfi2013
,[5 hakukohde] = NULL -- d40.hakukohde
,[5 Koulutusala, taso 1] = NULL -- d41b.iscfibroad2013
,[5 Koulutusala, taso 2] = NULL -- d41b.iscfinarrow2013
,[5 Koulutusala, taso 3] = NULL -- d41b.iscfi2013
,[6 hakukohde] = NULL -- d42.hakukohde
,[6 Koulutusala, taso 1] = NULL -- d43b.iscfibroad2013
,[6 Koulutusala, taso 2] = NULL -- d43b.iscfinarrow2013
,[6 Koulutusala, taso 3] = NULL -- d43b.iscfi2013
,[Valintatapajono] = NULL
,[Pisteet] = NULL
,[Henkilö OID] = NULL
,[Ikä] = NULL
,[Ikäryhmä] = NULL
,[Kansalaisuus] = NULL
,[Kansalaisuus (maanosa)] = null
,[Kansalaisuus (ryhmä)] = null
,[Kotipaikkakunta] = NULL
,[Kotipaikan maakunta] = NULL
,[Kotipaikan AVI] = NULL
,[Kotipaikan ELY] = NULL
,[Koulutuksen alkamisvuosi] = f.koulutuksen_alkamisvuosi
,[Koulutuksen alkamiskausi] = d9.selite_fi
,[Koulutuksen kieli] = d7.kieli_fi
,[Opiskelun laajuus] = d2.selite_fi
,[Pohjakoulutuksen maa] = NULL
,[Pohjakoulutus] = NULL
,[Sektori] = d6.koulutussektori_fi--case when d3.selite_fi='Elintarviketieteet, elintarviketieteiden kandidaatti ja maisteri' then 'Yliopistokoulutus' else d6.koulutussektori_fi end
,[Sukupuoli] = NULL
,[Toisen asteen koulutuksen suoritusvuosi] = null
,[Tutkinnon taso (hakukohde)] = d45.selite_fi
,[Tutkinnon aloitussykli (hakukohde)] = d44.selite_fi
--,[Valinnan tila] = NULL
--,[Vastaanoton tila] = NULL
,[Äidinkieli] = NULL
--Ruotsi
,[Förstagångssökande] = null
,[Ansökan YH/Univ.] = null
,[Ansökning] = d1.haun_nimi_sv
,[Ansökningstiden] = coalesce(d13.selite_SV,'Information saknas')
,[Sökobjekt] = d3.selite_sv
,[Gemensam/separat ansökan] = case when d1.hakutapa_fi in ('Jatkuva haku','Erillishaku') then 'Separat ansökan' when d1.hakutapa_fi='Yhteishaku' then 'Gemensam ansökan' end
,[Typ av ansökan] = d1.hakutyyppi_SV
,[Högskola (sökobjekt)] = d8b.organisaatio_sv
,[Anstalt (sökobjekt)] = coalesce(d8c.organisaatio_sv,d8b.organisaatio_sv)
,[Landskap (sökobjekt)] = d5.maakunta_SV
,[Kommun (sökobjekt)] = d5.kunta_SV
,[Utb.nivå (sökobjekt)] = d6.koulutusaste2002_SV
,[Utb.område (2002) (sökobjekt)] = d6.koulutusala2002_sv
,[Studieområde (2002) (sökobjekt)] = d6.opintoala2002_SV
,[Utb.område (1995) (sökobjekt)] = d6.opintoala1995_SV
,[Utb.nivå, nivå 1 (sökobjekt)] = d6.koulutusastetaso1_sv
,[Utb.nivå, nivå 2 (sökobjekt)] = d6.koulutusastetaso2_sv
,[Utb.område, nivå 1 (sökobjekt)] = d6.koulutusalataso1_sv
,[Utb.område, nivå 2 (sökobjekt)] = d6.koulutusalataso2_sv
,[Utb.område, nivå 3 (sökobjekt)] = d6.koulutusalataso3_sv
,[UKM-styrningsområde (sökobjekt)] = d6.okmohjauksenala_sv
,[Ansökningsönskemål] = null
,[1 Sökobjekt] = NULL -- d32.hakukohde_SV
,[1 Utb.område, nivå 1] = NULL -- d33b.iscfibroad2013_SV
,[1 Utb.område, nivå 2] = NULL -- d33b.iscfinarrow2013_SV
,[1 Utb.område, nivå 3] = NULL -- d33b.iscfi2013_SV
,[2 Sökobjekt] = NULL -- d34.hakukohde_SV
,[2 Utb.område, nivå 1] = NULL -- d35b.iscfibroad2013_SV
,[2 Utb.område, nivå 2] = NULL -- d35b.iscfinarrow2013_SV
,[2 Utb.område, nivå 3] = NULL -- d35b.iscfi2013_SV
,[3 Sökobjekt] = NULL -- d36.hakukohde_SV
,[3 Utb.område, nivå 1] = NULL -- d37b.iscfibroad2013_SV
,[3 Utb.område, nivå 2] = NULL -- d37b.iscfinarrow2013_SV
,[3 Utb.område, nivå 3] = NULL -- d37b.iscfi2013_SV
,[4 Sökobjekt] = NULL -- d38.hakukohde_SV
,[4 Utb.område, nivå 1] = NULL -- d39b.iscfibroad2013_SV
,[4 Utb.område, nivå 2] = NULL -- d39b.iscfinarrow2013_SV
,[4 Utb.område, nivå 3] = NULL -- d39b.iscfi2013_SV
,[5 Sökobjekt] = NULL -- d40.hakukohde_SV
,[5 Utb.område, nivå 1] = NULL -- d41b.iscfibroad2013_SV
,[5 Utb.område, nivå 2] = NULL -- d41b.iscfinarrow2013_SV
,[5 Utb.område, nivå 3] = NULL -- d41b.iscfi2013_SV
,[6 Sökobjekt] = NULL -- d42.hakukohde_SV
,[6 Utb.område, nivå 1] = NULL -- d43b.iscfibroad2013_SV
,[6 Utb.område, nivå 2] = NULL -- d43b.iscfinarrow2013_SV
,[6 Utb.område, nivå 3] = NULL -- d43b.iscfi2013_SV
,[Ålder] = null
,[Åldersgrupp] = null
,[Medborgarskap] = null
,[Medborgarskap (världsdel)] = null
,[Medborgarskap (gruppen)] = null
,[Hemkommun] = null
,[Hemlandskap] = null
,[Begynnelseår] = f.koulutuksen_alkamisvuosi
,[Begynnelsetermin] = d9.selite_sv
,[Utbildningens språk] = d7.kieli_SV
,[Studiernas omfattning] = d2.selite_fi
,[Grundutbildningens land] = null
,[Grundutbildning] = null
,[Sektor] = d6.koulutussektori_sv--coalesce(case when d3.selite_fi like 'Ammatillinen opettajankoulutus%' or d3.selite_fi in ('Ammatillinen erityisopettajankoulutus','Ammatillinen opinto-ohjaajankoulutus') then 'Yrkeshögskoleutbildning' when d6.koulutussektori_fi = 'Ammattikorkeakoulutus' then 'Yrkeshögskoleutbildning' when d6.koulutussektori_fi = 'Yliopistokoulutus' then 'Universitetsutbildning' else 'Information saknas' end, 'Information saknas')
,[Kön] = null
,[År då andra stadiets utbildning avlagts] = null
,[Examensnivå (sökobjekt)] = d45.selite_sv
,[Cykeln (sökobjekt)] = d44.selite_sv
,[Modersmål] = null
--Englanti
,[First-time applicant] = null
,[Application to UAS/Univ.] = null
,[Application] = d1.haun_nimi_EN
,[Application period] = coalesce(d13.selite_EN,'Missing data')
,[Applied study programme] = d3.selite_EN
,[Joint/separate application] = case when d1.hakutapa_fi in ('Jatkuva haku','Erillishaku') then 'Separate application' when d1.hakutapa_fi='Yhteishaku' then 'Joint application' end
,[Application round] = d1.hakutyyppi_EN
,[Higher education institution] = d8b.organisaatio_EN
,[Faculty/campus] = coalesce(d8c.organisaatio_EN,d8b.organisaatio_EN)
,[Region of study programme] = d5.maakunta_EN
,[Municipality of study programme] = d5.kunta_EN
,[Level of education] = d6.koulutusaste2002_EN
,[Field of ed. (2002)] = d6.Koulutusala2002_EN
,[Subfield of ed. (2002)] = d6.opintoala2002_EN
,[Field of ed. (1995)] = d6.opintoala1995_EN
,[Level of ed., tier 1] = d6.koulutusastetaso1_en
,[Level of ed., tier 2] = d6.koulutusastetaso2_en
,[Field of ed., level 1] = d6.koulutusalataso1_en
,[Field of ed., level 2] = d6.koulutusalataso2_en
,[Field of ed., level 3] = d6.koulutusalataso3_en
,[Field of ed., HE steering] = d6.okmohjauksenala_EN
,[Preference of study programme] = null
,[1 Study programme] = NULL -- d32.hakukohde_EN
,[1 Field of ed., tier 1] = NULL -- d33b.iscfibroad2013_EN
,[1 Field of ed., tier 2] = NULL -- d33b.iscfinarrow2013_EN
,[1 Field of ed., tier 3] = NULL -- d33b.iscfi2013_EN
,[2 Study programme] = NULL -- d34.hakukohde_EN
,[2 Field of ed., tier 1] = NULL -- d35b.iscfibroad2013_EN
,[2 Field of ed., tier 2] = NULL -- d35b.iscfinarrow2013_EN
,[2 Field of ed., tier 3] = NULL -- d35b.iscfi2013_EN
,[3 Study programme] = NULL -- d36.hakukohde_EN
,[3 Field of ed., tier 1] = NULL -- d37b.iscfibroad2013_EN
,[3 Field of ed., tier 2] = NULL -- d37b.iscfinarrow2013_EN
,[3 Field of ed., tier 3] = NULL -- d37b.iscfi2013_EN
,[4 Study programme] = NULL -- d38.hakukohde_EN
,[4 Field of ed., tier 1] = NULL -- d39b.iscfibroad2013_EN
,[4 Field of ed., tier 2] = NULL -- d39b.iscfinarrow2013_EN
,[4 Field of ed., tier 3] = NULL -- d39b.iscfi2013_EN
,[5 Study programme] = NULL -- d40.hakukohde_EN
,[5 Field of ed., tier 1] = NULL -- d41b.iscfibroad2013_EN
,[5 Field of ed., tier 2] = NULL -- d41b.iscfinarrow2013_EN
,[5 Field of ed., tier 3] = NULL -- d41b.iscfi2013_EN
,[6 Study programme] = NULL -- d42.hakukohde_EN
,[6 Field of ed., tier 1] = NULL -- d43b.iscfibroad2013_EN
,[6 Field of ed., tier 2] = NULL -- d43b.iscfinarrow2013_EN
,[6 Field of ed., tier 3] = NULL -- d43b.iscfi2013_EN
,[Age] = null
,[Age group] = null
,[Nationality] = null
,[Nationality (continent)] = null
,[Nationality (group)] = null
,[Municipality of residence] = null
,[Region of residence] = null
,[Year (start of studies)] = f.koulutuksen_alkamisvuosi
,[Term (start of studies)] = d9.selite_EN
,[Language of education] = d7.kieli_EN
,[Extent of the study programme] = d2.selite_fi
,[Country of prior education] = null
,[Prior education] = null
,[Sector] = d6.koulutussektori_en--coalesce(case when d3.selite_fi like 'Ammatillinen opettajankoulutus%' or d3.selite_fi in ('Ammatillinen erityisopettajankoulutus','Ammatillinen opinto-ohjaajankoulutus') then 'University of applied sciences education' when d6.koulutussektori_fi = 'Ammattikorkeakoulutus' then 'University of applied sciences education' when d6.koulutussektori_fi = 'Yliopistokoulutus' then 'University education' else 'Unknown' end, 'Unknown')
,[Gender] = null
,[Graduation year (upper secondary education)] = null
,[Level of degree] = d45.selite_en
,[Beginning cycle of education] = d44.selite_en
,[Mother tongue] = null
--KOODIMUUTTUJAT
,[Koodit Tutkinto (hakukohde)] = d6.koulutusluokitus_koodi
,[Koodit Koulutusala, taso 1 (hakukohde)] = d6.koulutusalataso1_koodi
,[Koodit Koulutusala, taso 2 (hakukohde)] = d6.koulutusalataso2_koodi
,[Koodit Koulutusala, taso 3 (hakukohde)] = d6.koulutusalataso3_koodi
,[Koodit OKM ohjauksen ala (hakukohde)] = d6.okmohjauksenala_koodi
,[Koodit Koulutuksen järjestäjä] = d8a.organisaatio_koodi
,[Koodit Korkeakoulu] = d8b.organisaatio_koodi
,[Koodit Maakunta hakukohde] = d5.maakunta_koodi
,[Koodit Kunta hakukohde] = d5.kunta_koodi
,[Koodit Kotimaakunta hakija] = null
,[Koodit Kotikunta hakija] = null
,[yksi_pk_per_hakija] = 0
,[Hakijat2] = 0
,[Ensisijaiset hakijat2] = 0
,[Valitut2] = 0
,[Paikan vastaanottaneet2] = 0
,[Aloittaneet2] = 0
,[Ensikertainen hakija järjestys] = 'öö'
,[Hakuaika järjestys] = coalesce(left(d13.selite_fi,3),'ööö')--case when coalesce(isnull(d13.selite_fi,''),'')='' then 'ööö' else d13.selite_fi end
,[Haku AMK/YO järjestys] = 99
,[Hakukohteen koulutusaste 2002 järjestys] = d6.jarjestys_koulutusaste2002_koodi
,[Hakukohteen koulutusala 2002 järjestys] = d6.jarjestys_koulutusala2002_koodi
,[Hakukohteen opintoala 2002 järjestys] = d6.jarjestys_opintoala2002_koodi
,[Hakukohteen koulutusala 1995 järjestys] = d6.jarjestys_opintoala1995_koodi
,[Koulutusaste, taso 1 järjestys] = d6.jarjestys_koulutusastetaso1_koodi
,[Koulutusaste, taso 2 järjestys] = d6.jarjestys_koulutusastetaso2_koodi
,[Koulutusala, taso 1 järjestys] = d6.jarjestys_koulutusalataso1_koodi
,[Koulutusala, taso 2 järjestys] = d6.jarjestys_koulutusalataso2_koodi
,[Koulutusala, taso 3 järjestys] = d6.jarjestys_koulutusalataso3_koodi
,[OKM ohjauksen ala järjestys] = d6.jarjestys_okmohjauksenala_koodi
,[Hakutoive järjestys] = 99
,[Hakukohteen maakunta järjestys] = d5.jarjestys_maakunta_koodi
,[Hakutapa järjestys] = case when d1.hakutapa_fi='Yhteishaku' then 1 when d1.hakutapa_fi in ('Jatkuva haku','Erillishaku') then 2 else 99 end
,[Hakutyyppi järjestys] = d1.jarjestys_hakutyyppi
,[Ikä järjestys] = 9999
,[Ikä 5v järjestys] = 9999
,[Kansalaisuus järjestys] = 99999
,[Kansalaisuus maanosa järjestys] = 9999
,[Kansalaisuus ryhmä järjestys] = 999999
,[Kotipaikkakunta järjestys] = 'ööö'
,[Kotipaikan maakunta järjestys] = 9999
,[Kotipaikan AVI järjestys] = 9999
,[Kotipaikan ELY järjestys] = 9999
,[Koulutuksen kieli järjestys] = d7.kieli_koodi
,[Opiskelun laajuus järjestys] = d2.jarjestys--case when f.Opiskelun_laajuus='' then 9999 when len(opiskelun_laajuus)=2 then '0'+opiskelun_laajuus else f.Opiskelun_laajuus end
,[Pohjakoulutuksen maa järjestys] = 999
,[Pohjakoulutus järjestys] = 'ööö'
,[Sektori järjestys] = d6.jarjestys_koulutussektori_koodi
,[Sukupuoli järjestys] = 999999
,[Toisen asteen koulutuksen suoritusvuosi järjestys] = 9999
,[Tutkinnon taso (hakukohde) järjestys] = d45.jarjestys_koodi
,[Tutkinnon aloitussykli (hakukohde) järjestys] = d44.jarjestys_koodi
,[Äidinkieli versio1 järjestys] = 999999
,[1 Koulutusala, taso 1 järjestys] = 999
,[1 Koulutusala, taso 2 järjestys] = 999
,[1 Koulutusala, taso 3 järjestys] = 999
,[2 Koulutusala, taso 1 järjestys] = 999
,[2 Koulutusala, taso 2 järjestys] = 999
,[2 Koulutusala, taso 3 järjestys] = 999
,[3 Koulutusala, taso 1 järjestys] = 999
,[3 Koulutusala, taso 2 järjestys] = 999
,[3 Koulutusala, taso 3 järjestys] = 999
,[4 Koulutusala, taso 1 järjestys] = 999
,[4 Koulutusala, taso 2 järjestys] = 999
,[4 Koulutusala, taso 3 järjestys] = 999
,[5 Koulutusala, taso 1 järjestys] = 999
,[5 Koulutusala, taso 2 järjestys] = 999
,[5 Koulutusala, taso 3 järjestys] = 999
,[6 Koulutusala, taso 1 järjestys] = 999
,[6 Koulutusala, taso 2 järjestys] = 999
,[6 Koulutusala, taso 3 järjestys] = 999
FROM [dw].[f_haku_ja_valinta_aloituspaikat_ja_pistemaarat] f
LEFT JOIN d_haku d1 on d1.id=f.d_haku_id
LEFT JOIN d_kausi d9 on d9.id=f.d_kausi_koulutuksen_alkamiskausi_id
INNER JOIN ANTERO.sa.sa_haku_ja_valinta_vuosikello_korkea_aste d4 on ((d4.haku_oid=d1.haku_oid and d4.haku_oid is not null) OR (d4.koulutuksen_alkamiskausi=cast(f.koulutuksen_alkamisvuosi as varchar)+cast(d9.jarjestys as varchar) and d1.hakutapa_koodi <> '01' and d4.haku_oid is null)) and f.loadtime >= d4.aloituspaikat
LEFT JOIN d_opintojenlaajuus d2 on d2.id=f.d_opintojen_laajuus_id
LEFT JOIN d_hakukohde d3 on d3.id=f.d_hakukohde_id
LEFT JOIN d_alueluokitus d5 on d5.id=f.d_alueluokitus_hakukohde_id
LEFT JOIN d_koulutusluokitus d6 on d6.id=f.d_koulutusluokitus_hakukohde_id
LEFT JOIN d_kieli d7 on d7.id=f.d_kieli_koulutus_id
LEFT JOIN d_organisaatioluokitus d8a on d8a.id=d_organisaatio_koulutuksen_jarjestaja_id
LEFT JOIN d_organisaatioluokitus d8b on d8b.id=d_organisaatio_oppilaitos_id
LEFT JOIN d_organisaatioluokitus d8c on d8c.id=d_organisaatio_toimipiste_id
LEFT JOIN d_hakuaika d13 on d13.id=f.d_hakuaika_id
LEFT JOIN ANTERO.dw.d_tutkinnon_aloitussykli_kk d44 on d44.id=f.d_tutkinnon_aloitussykli_kk_id
LEFT JOIN ANTERO.dw.d_tutkinnon_taso_kk d45 on d45.id=f.d_tutkinnon_taso_kk_id
where (f.koulutuksen_alkamisvuosi > 2016 OR (f.koulutuksen_alkamisvuosi = 2016 and d9.selite_fi = 'Syksy'))
and d1.korkeakouluhaku = 1 and d6.koulutussektori_koodi = '5'
| CSCfi/antero | db/sql/2912__alter_view_haku_ja_valinta_kk_yo.sql | SQL | mit | 41,130 |
<?php declare(strict_types = 1);
namespace IntervalParser;
class IntervalIterator implements \Iterator
{
private $intervals = [];
public function __construct(array $intervals)
{
$this->intervals = $intervals;
}
public function rewind()
{
reset($this->intervals);
}
public function current()
{
return current($this->intervals);
}
public function key()
{
return key($this->intervals);
}
public function next()
{
return next($this->intervals);
}
public function valid()
{
return key($this->intervals) !== null;
}
}
| ekinhbayar/IntervalParser | src/IntervalIterator.php | PHP | mit | 644 |
from flask import render_template
from ..query import parse as parse_query
from .. import name
def format_query_result(query):
return {
'uri': format_posts,
'query': format_posts,
}[parse_query(query.text).method](query)
def format_posts(query):
return render_template('ehentai/result/posts.html', query=query)
def format_notice_body(notice):
return {
'post.new': format_new_post_notice
}[notice.change.kind](notice)
def format_new_post_notice(notice):
return render_template('ehentai/notice/new_post.html', notice=notice)
def format_help_page():
return render_template('ehentai/help.html')
def format_advanced_search(**kargs):
return render_template('ehentai/search/main.html', kind=name)
| Answeror/torabot | torabot/mods/ehentai/views/web.py | Python | mit | 758 |
init(𝒜::ASB07, 𝑆::AbstractSystem, 𝑂::Options) = init!(𝒜, 𝑆, copy(𝑂))
function init!(::ASB07, 𝑆::AbstractSystem, 𝑂::Options)
𝑂[:n] = statedim(𝑆)
return validate_solver_options_and_add_default_values!(𝑂)
end
| JuliaReach/Reachability.jl | src/ReachSets/ContinuousPost/ASB07/init.jl | Julia | mit | 249 |
<div id="wrapper">
<div ng-include="'/views/orgs/menu.html'"></div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div>
<div class='row'>
<h2>Custom Apps</h2>
</div>
<div class='row' >
<div class='col-xs-1 col-sm-1 col-md-1' ng-show="!showSelectedRecord">
<a id="download" class="btn btn-primary" role="button">
<span class="glyphicon glyphicon-download"></span>
<span>download</span>
</a>
</div>
<div class='col-xs-1 col-sm-1 col-md-1' ng-show="!showSelectedRecord">
<a id="upload" class="btn btn-primary" role="button">
<span class="glyphicon glyphicon-upload"></span>
<span>upload</span>
</a>
</div>
<div id="selectedButton" class='col-xs-1 col-sm-1 col-md-1' ng-click="deselect()" >
<a id="selectedButton" class="btn btn-primary" role="button" >
<span>
{{orgsCustom_appsSelected.name}}
</span>
</a>
</div>
</div>
<div id='showRecord' ng-if="showSelectedRecord">
<div class="row">
<div class="col-lg-12">
<form novalidate>
<formly-form model="orgsCustom_appsSelected" fields="orgsCustom_appsFields" form="orgsCustom_appsForm">
<!-- <button type="submit" class="btn btn-primary" ng-disabled="orgsCustom_appsForm.$invalid" ng-click="save()">Save</button> -->
</formly-form>
</form>
</div>
</div>
</div>
<div id='uploadResults' ng-if="showUploadResults">
<div class="row" >
<div id='closeButton' class='col-xs-1 col-sm-1 col-md-1' ng-click="closeResults()">
<span class="glyphicon glyphicon-remove "style="font-size:2em;"></span>
</div>
</div>
<div class="row" >
<div class="panel panel-default">
<div class="panel-heading">Upload Results:</div>
<table class="table">
<thead>
<tr>
<th>Index</th>
<th>Status</th>
<th>Message</th>
</tr>
</thead>
<tr ng-repeat="x in updateResults">
<td>{{ $index }}</td>
<td>{{ x.status }}</td>
<td>{{ x.message}}</td>
</tr>
</table>
</div>
</div>
</div>
<div class='row' ng-if="!showSelectedRecord">
<div class='col-xs-12 col-sm-12 col-md-12'>
<div ui-grid='orgsCustom_appsGridOptions'ui-grid-edit ui-grid-importer ui-grid-resize-columns ui-grid-exporter class='mainGrid'></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
| marcerod/scmBrowser | app/views/orgs/orgsCustom_apps/orgsCustom_apps.html | HTML | mit | 2,904 |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class RecaptchaVerifier {
clear() {
//
}
async render() {
throw new Error("not-implemented");
}
async verify() {
throw new Error("not-implemented");
}
}
exports.RecaptchaVerifier = RecaptchaVerifier;
//# sourceMappingURL=RecaptchaVerifier.js.map | forest-fire/firemock | dist/cjs/auth/client-sdk/AuthProviders/RecaptchaVerifier.js | JavaScript | mit | 370 |
---
title: Contentment for Over-Driven Perfectionists
image: /img/popeye-spinach.png
summary: Contentment is a huge element of the success of a cross-cultural gospel worker, and discontent is a massive pitfall. But this pitfall can come up on us in less than expected ways...
tags:
- missionary health
---
Contentment is a huge element of the success of a cross-cultural gospel worker. A content and <a href="{{ site.url }}{{ site.baseurl }}/articles/persevere-with-thankfulness/" target="_blank">thankful heart</a> is a lot like <a href="https://www.youtube.com/watch?v=pcOrSWr2HLU" target="_blank">what spinach was for Popeye</a>. It propels him forward with all kinds of life and strength.
<a href="http://northlondonchurch.org/ministers-blog/post/christology-for-amateurs-2-adoptionism" target="_blank"><img src="/img/popeye-spinach.png" alt="contentment brings energy"></a>
Conversely, discontentment is a huge pitfall, one of the biggest disablers in the life of faith. **If contentment is Popeye's spinach, discontentment is a soccer player's broken ankle.** It just takes us right out, and ruins our life. We're often told to guard against discontentment about our living situations, the public transit in the city we're living, or the food we have to eat all the time, or our singleness, or the commitments of a family with kids.
But that nasty, disabling discontentment can come in some more surprising and devious forms.
It can be something as simple or unassuming as discontentment with our ministry performance, or our opportunities to meet people and share the good news, or our amount of hours available for language study. I'm not talking about the kind of forward-driving dissatisfaction with mediocrity that propels us forward to hard work and excellence. I'm talking about a stagnant, despairing negativity that does nothing but lead us into self-pity, stress, and gloom.
### Guess what? You may not be as productive as you think you should be
A lot of really driven people who were smart and successful in their home countries can struggle with this. When driven, hard-working people step into a whole 'nother world, filled with a new language, a culture they aren't comfortable in, and all kinds of crazy spiritual opposition, suddenly they face the reality that they can't do what they should, what they feel they MUST do! There are just all kinds of unforeseen hindrances that crop up in this kind of life. And these little (or big) obstacles that suppress their precious success and destroy their valuable work programme become looming monsters that are constantly ruining their life. These setbacks can work to become the focal point of so much deliberation, frustration, and anxiety.
This last year or so, for example, I have had some constant problems with my housing situation. I came pretty close to despair, (and very close to raging frustration) about how I had to keep on spending hours and hours and days and days trying to clean up some mold outbreak, or move from place to place, or freak out about what I could do with a bunch of expired paint that some painters incidentally ruined my bedroom with. Why did I have to lose such a huge chunk of my precious time in this country over this senseless difficulty?
Getting upset about these obstacles and hindrances can seem like the proper expression of every fiber of our driven, successful beings, but it's not. There's a restlessness that pushes us forward to change what we can and get over obstacles and succeed. And then there's a discontent that does nothing but convince us of the impossibility of doing the amount that we want to. It tries to tell us that the 70% we can do it is really nothing because we're not able to do the 85% that we think we should. It's as illogical and ridiculous as someone saying "you can't get there from here." What?! Why not just turn around and start walking towards the road that does get there? Why not just do the 70% and rejoice? Because walking towards that round-about road is better than throwing your hands up and saying "ah, well I can't get there from here." And doing the 70% with a spirit of thanksgiving and his joy propelling us forward is better than diving into gloom and doing 0%.
>"Be joyful always, pray continually.
>Give thanks in all circumstance,
>for this is God's will for you in Christ Jesus."
> 1 Thess. 5:16-18
It may seem that your practical commitments, or things your leadership makes you do, or that nasty situation you're in might take 40% of your time and efforts. You might feel like all of your efforts are actually only 60% of what could be done, because of those annoying obstacles in the way.
But if you give up contentment and fall into bitterness and discouragement, you'll loose 100% of it.
Embrace the 60% or the 80% or the 20% that you can do. After all, we're dead anyways. Anything we do in this impossible, backwards life is a miracle. So relax. Enjoy him and the little things he's putting before you. When your faithful, thankful, joyful, and content with little... he will give you a lot. And everything comes from him.
For the purpose of this next example, let's think of ourselves as children, which is what we really are. The cross-cultural language-learning process just makes this more painfully obvious. Discontent works a little bit like this:
<img src="/img/content-and-discontent.png" alt="discontent brings discouragement">
But if the child could just relax, and not listen to the discontentment monster, there's plenty of great thıngs that could be done with the 3 blocks their Father's given him.
>"For you are God's workmanship, created in Christ Jesus to do good works,
which he prepared in advance for you to do, that you may walk in them." (Eph 2:10)
Just like Abraham did, trust this promise of God, even if it seems impossible and ridiculous, and even if it seems like the whole world is working against you. Abraham was weak and old, and physically incapable of producing anything but...
>"No amount of unbelief caused him to doubt the promise of God.
But he grew strong in faith as he gave glory to God." (Romans 4:20)
Take God at his word, praise him, and you'll grow strong in faith.
If your driven, harsh dissatisfaction with whatever you're facing doesn't help you to be overflowing with joy in your current situation, it's not helping at all. Because every bit of usefulness that we could ever produce springs forward out of a joyful heart in him.
"May the God of hope fill you with all joy and peace as you trust in him.
So that you may overflow with hope by the power of the Holy Spirit." (Romans 15:13)
### (Human) perfectionism doesn't really help
Jesus tells us to "be perfect." (Matt. 5:48) The word there means to be <a href="http://stephanus.tlg.uci.edu/lsj/#eid=105840&context=lsj&action=from-search" target="_blank"> perfect, complete, finished, or fully developed</a>. We're to grow fully, completely, and perfectly in holiness and goodness, and so to act and think like our heavenly father. Leaning and trusting God for his perfect, no-compromises life of holiness and truth is good. But there's another kind of perfectionism, a kind of human striving towards arbitrary ideals and a ruthless evaluation of everything we do. This is different, and it's bad.
Andrew Murray, in the wonderful book <a href="http://www.amazon.com/Abide-Christ-Andrew-Murray/dp/161949101X/ref=sr_1_1?ie=UTF8&qid=1426246433&sr=8-1&keywords=abide+in+Christ" target="_blank">Abide in Christ</a> talked about something similar that he called *"The impatience of the flesh, which forms its judgment of the life and progress of the soul not after the divine but the human standard."*
This kind of perfectionism is an ever-illusive, undefinable, insatiable monster, looking to suck your life and happiness away. Ok, maybe that sounds a bit harsh, but whatever it is, it's often not life giving. It tends to just throws some arbitrary ideals at us that we often can't measure up to. In other words: it doesn't help, it just stands there and makes you feel terrible.
But Christ--not our cold ideals of what we think our life and work should look like--always beckons us on with understanding, care, love, and encouragement. Jesus knew how to work with and be happy with many non-ideal people and situations. He looked at his semi-effectual disciples, carrying on immaturely with their slightly misguided focus, and...
>"full of joy through the Holy Spirit, said, 'I praise you Father, Lord of heaven and earth because you have hidden these things fro the wise and learned, and revealed them to little children. Yes, father, for this was your good pleasure.'" (Matt. 11:25)
Seeing a bit of the Father's joy and pleasure trumps all. Always.
The apostle Paul, one of the hugest forces in the spread of the Gospel, did not always have what appeared to be an ideal and productive life. Let's have a look at some of his life and work conditions: Being in hunger, getting slandered and locked up in jail cells, being shipwrecked, being terribly sick, being tied up and flogged, living under house arrest. These are not exactly elements of a healthy, productive, optimized life. In fact, it's pretty much impossible to do anything useful at all while you are in these situations. But that didn't seem to bother him too much.
>"I have learned **to be content** whatever the circumstances. I know what it is to be in need, and I know what it is to have plenty. I have learned the secret of being content in any and every situation, whether well fed or hungry, whether living in plenty or in want. I can do all this through him who gives me strength." (Phil. 4:11-13)
In all these situations, Paul knew Christ and his joy and strength inside of him, and he got to see God working miraculously in all kinds of ridiculous situations. He was less concerned with himself, and more concerned with Christ. He realized that his own life wasn't really that big of a deal, but that Jesus meant everything. And so he was content to have Christ. That was enough, and he could happily work at an endless stream of awesome opportunities that God was bringing in front of him. All he needed was a steady diet of <s>spinach</s> contentment.
| mark4co/mark4co.github.io | _posts/articles/2015-03-14-contentment-for-perfectionists.md | Markdown | mit | 10,304 |
<md-content scroll-y layout-fill="" flex class="md-padding">
<div class="col-sm-4">
<img src="{{ userProfile.avatar }}" class="img img-responsive img-thumbnail" />
</div>
<div class="col-sm-6">
<h1>{{ userProfile.firstName }} {{ userProfile.lastName }}</h1>
<h3>{{ userProfile.username }}</h3>
</div>
</md-content> | valkirilov/ChatPrivately | public/dashboard/user.tmpl.html | HTML | mit | 338 |
# BioLinkedData-HandsOn
Online [presentation](https://htmlpreview.github.io/?https://github.com/albangaignard/BioLinkedData-HandsOn/blob/master/handsOn.html)
# Install python / jupyter notebook environment
1. `conda create -n jupyter python`
1. `source activate jupyter`
1. `conda install jupyter`
1. `conda install sparqlwrapper -c conda-forge`
| albangaignard/BioLinkedData-HandsOn | README.md | Markdown | mit | 349 |
// MIT License
// Copyright (c) 2016 rutcode-go
package ddd_isolator
const (
userRepoGo = `package repo
import (
"github.com/gogap/isolator"
"{{.PathDomain}}"
)
import _ "github.com/go-sql-driver/mysql"
type UserRepository interface {
isolator.Object
GetUser() domain.User
}
`
userRepoRedisGo = `package repo
import (
"fmt"
"github.com/gogap/isolator"
"{{.PathDomain}}"
)
func NewRedisRepo() UserRepository {
return &RedisRepo{}
}
type RedisRepo struct {
session *isolator.Session
}
func (p *RedisRepo) Derive(session *isolator.Session) (obj isolator.Object, err error) {
return &RedisRepo{
session: session,
}, nil
}
func (p *RedisRepo) GetUser() domain.User {
fmt.Println("Hello, repo Redis! - Get user name from Redis")
return domain.User{Id: "2", Name: "Redis"}
}
`
userRepoSqlGo = `package repo
import (
"fmt"
"github.com/gogap/isolator"
"{{.PathDomain}}"
)
import _ "github.com/go-sql-driver/mysql"
func NewSqlRepo() UserRepository {
return &SqlRepo{}
}
type SqlRepo struct {
session *isolator.Session
}
func (p *SqlRepo) Derive(session *isolator.Session) (obj isolator.Object, err error) {
return &SqlRepo{
session: session,
}, nil
}
func (p *SqlRepo) GetUser() domain.User {
fmt.Println("Hello, repo Sql! - Get user name from Sql")
return domain.User{Id: "1", Name: "Sql"}
}
`
)
| go-rut/gorut | tpl/ddd_isolator/folder_repo.go | GO | mit | 1,353 |
FROM debian:latest
RUN apt-get update \
&& apt-get install -y \
gawk \
perl \
sed \
git \
python3 \
python3-pip \
pandoc \
biber \
latexmk \
texlive \
texlive-science \
texlive-fonts-extra \
texlive-plain-generic \
texlive-bibtex-extra
RUN pip3 install rst2html5
WORKDIR "/zips"
ENTRYPOINT ["make", "all"]
| zcash/zips | Dockerfile | Dockerfile | mit | 429 |
class SignUpsController < ApplicationController
def index
@network_events = NetworkEvent.where(scheduled_at: Date.today..1.week.from_now)
end
def new
@network_event = NetworkEvent.find(params[:network_event_id])
@participation = Participation.new(:level => params[:level])
@member = Member.new
@searched = false
@level = params[:level]
end
def create
@network_event = NetworkEvent.find(params[:network_event_id])
@member = Member.new
if params[:commit] == "Confirm attendance"
member_level = participation_params[:level]
@level = ""
@participation = Participation.new(member_id: participation_params[:member_id], network_event_id: @network_event.id, level: participation_params[:level])
@participation.user = current_user
respond_to do |format|
if @participation.save
format.html { redirect_to action: 'new', level: member_level}
format.json { render @participation}
else
format.html { render :new}
format.json { render json: @participation.errors, status: :unprocessable_entity}
end
end
elsif params[:member_id].present?
member_level = params[:level]
@member = Member.find(params[:member_id])
respond_to do |format|
if @member.update(member_params)
participation = Participation.new(member_id: @member.id, network_event_id: @network_event.id, level: params[:level])
participation.user = current_user
participation.save
flash[:sign_up_success] = 'Member was updated successfully'
format.html { redirect_to action: 'new', level: member_level}
format.json { render @member}
else
format.html { render :new}
format.json { render json: @member.errors, status: :unprocessable_entity}
end
end
else
member_level = params[:level]
@member = Member.new(member_params)
@member.user = current_user
respond_to do |format|
if @member.save
participation = Participation.new(member_id: @member.id, network_event_id: @network_event.id, level: params[:level])
participation.user = current_user
participation.save
flash[:sign_up_success] = 'Member was created successfully'
format.html { redirect_to action: 'new', level: member_level}
format.json { render @member}
else
format.html { render :new}
format.json { render json: @member.errors, status: :unprocessable_entity}
end
end
end
end
def update
end
private
def member_params
params.permit(member: [:id, :first_name, :last_name, :phone, :email, :identity, :school_id, :graduating_class_id])[:member]
end
def participation_params
params.permit(participation: [:member_id, :level])[:participation]
end
end
| TadBirmingham/network | app/controllers/sign_ups_controller.rb | Ruby | mit | 2,920 |
module.exports = function (grunt) {
'use strict';
var opn = require('opn');
var options = {
pkg: require('./package'), // <%=pkg.name%>
// Global Grunt vars. Edit this file to change vars
config : require('./_grunt-configs/config.js')
};
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt, {pattern: ["grunt-*", "chotto"]});
// Load grunt configurations automatically
var configs = require('load-grunt-configs')(grunt, options);
// Define the configuration for all the tasks
grunt.initConfig(configs);
/**
* Available tasks:
* grunt : Alias for 'serve' task, below (the default task)
* grunt serve : watch js, images & scss and run a local server
* grunt start : Opens the post-install setup checklist on the Kickoff site
* grunt watch : run sass:kickoff, uglify and livereload
* grunt dev : run uglify, sass:kickoff & autoprefixer:kickoff
* grunt deploy : run jshint, uglify, sass:kickoff and csso
* grunt styleguide : watch js & scss, run a local server for editing the styleguide
* grunt images : compress all non-grunticon images & then run `grunt icons`
* grunt icons : generate the icons. uses svgmin and grunticon
* grunt checks : run jshint, scsslint and html validator
* grunt travis : used by travis ci only
*/
/**
* GRUNT * Alias for 'serve' task, below
*/
grunt.registerTask('default', ['serve']);
/**
* GRUNT SERVE * A task for a static server with a watch
* run browserSync and watch
*/
grunt.registerTask('serve', [
'shimly',
'compileJS',
'compileCSS',
'clean:tempCSS',
'copy:modernizr',
//'images',
'browserSync:serve',
'watch'
]);
/**
* GRUNT START
* Opens the post-install setup checklist on the Kickoff site
*/
grunt.registerTask('start', function() {
opn('http://trykickoff.github.io/learn/checklist.html');
});
/**
* GRUNT DEV * A task for development
* run uglify, sass:kickoff & autoprefixer:kickoff
*/
grunt.registerTask('dev', [
'shimly',
'compileJS',
'compileCSS',
'clean:tempCSS',
'copy:modernizr',
'images'
]);
/**
* GRUNT DEPLOY * A task for your production environment
* run uglify, sass, autoprefixer and csso
*/
grunt.registerTask('deploy', [
'shimly',
'compileJS',
'compileCSS',
'csso',
'clean:tempCSS',
'copy:modernizr',
'images'
]);
/**
* GRUNT STYLEGUIDE * A task to view the styleguide
*/
grunt.registerTask('styleguide', [
'shimly',
'compileJS',
'compileCSS',
'clean:tempCSS',
'images',
'browserSync:styleguide',
'watch'
]);
/**
* GRUNT IMAGES * A task to compress all non-grunticon images
*/
grunt.registerTask('images', [
'newer:imagemin:images',
'icons'
]);
/**
* GRUNT ICONS * A task to create all icons using grunticon
*/
grunt.registerTask('icons', [
'clean:icons',
'newer:imagemin:grunticon',
'grunticon'
]);
/**
* GRUNT CHECKS * Check code for errors
* run jshint
*/
grunt.registerTask('checks', [
'jshint:project',
'scsslint',
'validation'
]);
/**
* Travis CI to test build
*/
grunt.registerTask('travis', [
'jshint:project',
'uglify',
'sass:kickoff'
]);
/**
* Utility classes
*/
// Compile JS
grunt.registerTask('compileJS', [
'chotto:js',
'uglify',
]);
// Compile CSS
grunt.registerTask('compileCSS', [
'sass',
'autoprefixer'
]);
};
| fabzl/zebra93-website | Gruntfile.js | JavaScript | mit | 3,410 |
SHELL = /bin/sh
# SOURCE FILES
MODULE = mct
SRCS_F90 = m_MCTWorld.F90 \
m_AttrVect.F90 \
m_GlobalMap.F90 \
m_GlobalSegMap.F90 \
m_GlobalSegMapComms.F90 \
m_Accumulator.F90 \
m_SparseMatrix.F90 \
m_Navigator.F90 \
m_AttrVectComms.F90 \
m_AttrVectReduce.F90 \
m_AccumulatorComms.F90 \
m_GeneralGrid.F90 \
m_GeneralGridComms.F90 \
m_SpatialIntegral.F90 \
m_SpatialIntegralV.F90 \
m_MatAttrVectMul.F90 \
m_Merge.F90 \
m_GlobalToLocal.F90 \
m_ExchangeMaps.F90 \
m_ConvertMaps.F90 \
m_SparseMatrixDecomp.F90 \
m_SparseMatrixToMaps.F90 \
m_SparseMatrixComms.F90 \
m_SparseMatrixPlus.F90 \
m_Router.F90 \
m_Rearranger.F90 \
m_Transfer.F90
OBJS_ALL = $(SRCS_F90:.F90=.o)
# MACHINE AND COMPILER FLAGS
include ../Makefile.conf
# TARGETS
all: lib$(MODULE).a
lib$(MODULE).a: $(OBJS_ALL)
$(RM) $@
$(AR) $@ $(OBJS_ALL)
# ADDITIONAL FLAGS SPECIFIC FOR MCT COMPILATION
MCTFLAGS = $(INCFLAG)$(MPEUPATH)
# RULES
.SUFFIXES:
.SUFFIXES: .F90 .o
$(F90RULE):
$(FC) -c $(INCPATH) $(DEFS) $(FCFLAGS) $(F90FLAGS) $(MCTFLAGS) $*.F90
$(F90RULECPP):
$(FPP) $(DEFS) $(FPPFLAGS) $*.F90 $*.f90
$(FC) -c $(INCPATH) $(FCFLAGS) $(F90FLAGS) $(MCTFLAGS) $*.f90
$(RM) $*.f90
clean:
${RM} *.o *.mod lib$(MODULE).a
install: all
$(MKINSTALLDIRS) $(libdir) $(includedir)
$(INSTALL) lib$(MODULE).a -m 644 $(libdir)
@for modfile in *.mod; do \
echo $(INSTALL) $$modfile -m 644 $(includedir); \
$(INSTALL) $$modfile -m 644 $(includedir); \
done
# DEPENDENCIES
$(OBJS_ALL): $(MPEUPATH)/libmpeu.a
m_AttrVect.o:
m_Accumulator.o: m_AttrVect.o
m_GlobalMap.o:
m_GlobalSegMap.o:
m_GlobalSegMapComms.o: m_GlobalSegMap.o
m_Navigator.o:
m_AttrVectComms.o: m_AttrVect.o m_GlobalMap.o
m_AttrVectReduce.o: m_AttrVect.o
m_AccumulatorComms.o: m_AttrVect.o m_GlobalMap.o m_AttrVectComms.o
m_SparseMatrix.o: m_AttrVect.o m_GlobalMap.o m_AttrVectComms.o
m_GeneralGrid.o: m_AttrVect.o
m_GeneralGridComms.o: m_AttrVect.o m_GeneralGrid.o m_AttrVectComms.o m_GlobalMap.o m_GlobalSegMap.o
m_MatAttrVectMul.o: m_AttrVect.o m_SparseMatrix.o m_GlobalMap.o m_GlobalSegMap.o m_SparseMatrixPlus.o m_Rearranger.o
m_Merge.o: m_AttrVect.o m_GeneralGrid.o
m_Router.o: m_GlobalToLocal.o m_MCTWorld.o m_GlobalSegMap.o m_ExchangeMaps.o
m_Rearranger.o: m_Router.o m_MCTWorld.o m_GlobalSegMap.o m_AttrVect.o
m_GlobalToLocal.o: m_GlobalSegMap.o
m_ExchangeMaps.o: m_GlobalMap.o m_GlobalSegMap.o m_MCTWorld.o m_ConvertMaps.o
m_ConvertMaps.o: m_GlobalMap.o m_GlobalSegMap.o m_MCTWorld.o
m_SparseMatrixDecomp.o: m_SparseMatrix.o m_GlobalSegMap.o
m_SparseMatrixToMaps.o: m_SparseMatrix.o m_GlobalSegMap.o
m_SparseMatrixComms.o: m_SparseMatrix.o m_SparseMatrixDecomp.o m_GlobalSegMap.o m_AttrVectComms.o
accumulate.o: m_AttrVect.o m_Accumulator.o
m_SpatialIntegral.o: m_SpatialIntegralV.o m_GeneralGrid.o m_AttrVect.o m_AttrVectReduce.o
m_SpatialIntegralV.o: m_AttrVect.o m_AttrVectReduce.o
m_Transfer.o: m_AttrVect.o m_Router.o m_MCTWorld.o
m_SparseMatrixPlus.o: m_GlobalSegMap.o m_Rearranger.o m_SparseMatrix.o m_SparseMatrixComms.o m_SparseMatrixToMaps.o m_GlobalToLocal.o
| mcflugen/roms-lite | src/roms/Lib/MCT/mct/Makefile | Makefile | mit | 3,227 |
<?php
/*
MIT License
Copyright 2013-2021 Zordius Chen. All Rights Reserved.
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.
Origin: https://github.com/zordius/lightncandy
*/
/**
* the major file of LightnCandy compiler
*
* @package LightnCandy
* @author Zordius <[email protected]>
*/
namespace LightnCandy;
/**
* LightnCandy major static class
*/
class LightnCandy extends Flags
{
protected static $lastContext;
public static $lastParsed;
/**
* Compile handlebars template into PHP code.
*
* @param string $template handlebars template string
* @param array<string,array|string|integer> $options LightnCandy compile time and run time options, default is array('flags' => LightnCandy::FLAG_BESTPERFORMANCE)
*
* @return string|false Compiled PHP code when successed. If error happened and compile failed, return false.
*/
public static function compile($template, $options = array('flags' => self::FLAG_BESTPERFORMANCE))
{
$context = Context::create($options);
if (static::handleError($context)) {
return false;
}
$code = Compiler::compileTemplate($context, SafeString::escapeTemplate($template));
static::$lastParsed = Compiler::$lastParsed;
// return false when fatal error
if (static::handleError($context)) {
return false;
}
// Or, return full PHP render codes as string
return Compiler::composePHPRender($context, $code);
}
/**
* Compile handlebars partial into PHP function code.
*
* @param string $template handlebars template string
* @param array<string,array|string|integer> $options LightnCandy compile time and run time options, default is array('flags' => LightnCandy::FLAG_BESTPERFORMANCE)
*
* @return string|false Compiled PHP code when successed. If error happened and compile failed, return false.
*
* @expect false when input '{{"}}', array('flags' => LightnCandy::FLAG_HANDLEBARS)
*/
public static function compilePartial($template, $options = array('flags' => self::FLAG_BESTPERFORMANCE))
{
$context = Context::create($options);
if (static::handleError($context)) {
return false;
}
$code = Partial::compile($context, SafeString::escapeTemplate($template));
static::$lastParsed = Compiler::$lastParsed;
// return false when fatal error
if (static::handleError($context)) {
return false;
}
return $code;
}
/**
* Handle exists error and return error status.
*
* @param array<string,array|string|integer> $context Current context of compiler progress.
*
* @throws \Exception
* @return boolean True when error detected
*
* @expect false when input array('error' => array())
* @expect true when input array('error' => array('some error'), 'flags' => array('errorlog' => 0, 'exception' => 0))
*/
protected static function handleError(&$context)
{
static::$lastContext = $context;
if (count($context['error'])) {
if ($context['flags']['errorlog']) {
error_log(implode("\n", $context['error']));
}
if ($context['flags']['exception']) {
throw new \Exception(implode("\n", $context['error']));
}
return true;
}
return false;
}
/**
* Get last compiler context.
*
* @return array<string,array|string|integer> Context data
*/
public static function getContext()
{
return static::$lastContext;
}
/**
* Get a working render function by a string of PHP code. This method may requires php setting allow_url_include=1 and allow_url_fopen=1 , or access right to tmp file system.
*
* @param string $php PHP code
* @param string|null $tmpDir Optional, change temp directory for php include file saved by prepare() when cannot include PHP code with data:// format.
* @param boolean $delete Optional, delete temp php file when set to tru. Default is true, set it to false for debug propose
*
* @return Closure|false result of include()
*
* @deprecated
*/
public static function prepare($php, $tmpDir = null, $delete = true)
{
$php = "<?php $php ?>";
if (!ini_get('allow_url_include') || !ini_get('allow_url_fopen')) {
if (!is_string($tmpDir) || !is_dir($tmpDir)) {
$tmpDir = sys_get_temp_dir();
}
}
if (is_dir($tmpDir)) {
$fn = tempnam($tmpDir, 'lci_');
if (!$fn) {
error_log("Can not generate tmp file under $tmpDir!!\n");
return false;
}
if (!file_put_contents($fn, $php)) {
error_log("Can not include saved temp php code from $fn, you should add $tmpDir into open_basedir!!\n");
return false;
}
$phpfunc = include($fn);
if ($delete) {
unlink($fn);
}
return $phpfunc;
}
return include('data://text/plain,' . urlencode($php));
}
}
| zordius/lightncandy | src/LightnCandy.php | PHP | mit | 6,245 |
<?php
/* AcmeDemoBundle:Secured:login.html.twig */
class __TwigTemplate_30e2b919164c4389efdd3a5730518be0 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->blocks = array(
'content' => array($this, 'block_content'),
);
}
protected function doGetParent(array $context)
{
return "AcmeDemoBundle::layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 29
$context["code"] = $this->env->getExtension('demo')->getCode($this);
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
}
// line 3
public function block_content($context, array $blocks = array())
{
// line 4
echo " <h1>Login</h1>
<p>
Choose between two default users: <em>user/userpass</em> <small>(ROLE_USER)</small> or <em>admin/adminpass</em> <small>(ROLE_ADMIN)</small>
</p>
";
// line 10
if ($this->getContext($context, "error")) {
// line 11
echo " <div class=\"error\">";
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "error"), "message"), "html", null, true);
echo "</div>
";
}
// line 13
echo "
<form action=\"";
// line 14
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_security_check"), "html", null, true);
echo "\" method=\"post\" id=\"login\">
<div>
<label for=\"username\">Username</label>
<input type=\"text\" id=\"username\" name=\"_username\" value=\"";
// line 17
echo twig_escape_filter($this->env, $this->getContext($context, "last_username"), "html", null, true);
echo "\" />
</div>
<div>
<label for=\"password\">Password</label>
<input type=\"password\" id=\"password\" name=\"_password\" />
</div>
<input type=\"submit\" class=\"symfony-button-grey\" value=\"LOGIN\" />
</form>
";
}
public function getTemplateName()
{
return "AcmeDemoBundle:Secured:login.html.twig";
}
public function isTraitable()
{
return false;
}
}
| murindwaz/pascalrepo | symptool/app/cache/dev/twig/30/e2/b919164c4389efdd3a5730518be0.php | PHP | mit | 2,363 |
naver-site-verification: naver37bf693021e7744c22995f9ce9846d21.html | wizdia/wizdia.github.com | naver37bf693021e7744c22995f9ce9846d21.html | HTML | mit | 67 |
package testing;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.util.concurrent.TimeUnit;
/**
* Grabar el siguiente caso de prueba
Entrar en OpenCart (demo.opencart.com).
Buscar el producto "iPhone" (primero ingresar el nombre del producto, luego tocar el botón de la lupa)
Verificar que el primer elemento que se muestra es el que corresponde a un iPhone.
Luego que pudieron grabar y reproducir esto en el Selenium Builder, exportar el caso de prueba a código Java. Cargar ese código Java dentro de Eclipse, y asegurarse que funcione adecuadamente como una prueba JUnit.
*/
public class Desafio1Test {
FirefoxDriver wd;
@Before
public void setUp() throws Exception {
wd = new FirefoxDriver();
wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
}
@Test
public void testDesafio1(){
wd.get("http://demo.opencart.com");
wd.findElement(By.name("search")).click();
wd.findElement(By.name("search")).clear();
wd.findElement(By.name("search")).sendKeys("iphone");
wd.findElement(By.xpath("//span[@class='input-group-btn']/button")).click();
wd.findElement(By.id("grid-view")).click();
wd.findElement(By.xpath("//div[@class='image']/a/img")).click();
String nombre = wd.findElement(By.cssSelector("h1")).getText();
Assert.assertEquals("Name first element differen","iphone",nombre.toLowerCase());
wd.close();
wd.quit();
}
}
| nandotorterolo/TestingUCU2016 | src/test/java/testing/Desafio1Test.java | Java | mit | 1,598 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>API Documentation</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
var code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
xhr.send(null);
});
}
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">API Documentation</a>
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="../namespaces/JC.html">\JC</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i> Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i> Errors <span class="label label-info pull-right">0</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i> Markers <span class="label label-info pull-right">0</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-192508877"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-192508877" class="accordion-body collapse in">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-1334212083"></a>
<a href="../namespaces/JC.html" style="margin-left: 30px; padding-left: 0">JC</a>
</div>
<div id="namespace-1334212083" class="accordion-body collapse ">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-1237516481"></a>
<a href="../namespaces/JC.FrontBundle.html" style="margin-left: 30px; padding-left: 0">FrontBundle</a>
</div>
<div id="namespace-1237516481" class="accordion-body collapse ">
<div class="accordion-inner">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-target="#namespace-768034695"></a>
<a href="../namespaces/JC.FrontBundle.Controller.html" style="margin-left: 30px; padding-left: 0">Controller</a>
</div>
<div id="namespace-768034695" class="accordion-body collapse ">
<div class="accordion-inner">
<ul>
<li class="class"><a href="../classes/JC.FrontBundle.Controller.DefaultController.html">DefaultController</a></li>
</ul>
</div>
</div>
</div>
</div>
<ul>
<li class="class"><a href="../classes/JC.FrontBundle.JCFrontBundle.html">JCFrontBundle</a></li>
</ul>
</div>
</div>
</div>
</div>
<ul>
</ul>
</div>
</div>
</div>
</div>
<ul>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>Controller</small>DefaultController.php</h1>
<p><em>Controleur pour les pages d'accueil et de présentation du site</em></p>
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/JC.FrontBundle.Controller.DefaultController.html">DefaultController</a></td>
<td><em>Controleur pour les pages d'accueil et de présentation du site</em></td>
</tr>
</table>
</div>
<aside class="span4 detailsbar">
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
author
</th>
<td>
<p>Juliana Leclaire <a href="mailto:[email protected]">[email protected]</a></p>
<p>Céline de Roland <a href="mailto:[email protected]">[email protected]</a></p>
</td>
</tr>
<tr>
<th>
version
</th>
<td>
<p>= 2.0</p>
</td>
</tr>
</table>
</aside>
</div>
</div>
</section>
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/Controller/DefaultController.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
<li><a href="../namespaces/JC.html">\JC</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on June 1st, 2014 at 17:47.
</section>
</section>
</section>
</footer>
</div>
</body>
</html>
| celinederoland/DataNavigator | doc/files/Controller.DefaultController.php.html | HTML | mit | 15,395 |
<div class="footer">
<nav class="navbar navbar-default">
<div class="container-fluid">
<?php
wp_nav_menu( array(
'menu' => 'footer-menu',
'theme_location' => 'footer-menu',
'depth' => 2,
'menu_class' => 'nav navbar-nav',
));
?>
</div>
</nav>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<?php wp_footer(); ?>
</body>
</html> | recruitro/lesser | footer.php | PHP | mit | 626 |
/**
* @author ChalkPE <[email protected]>
* @since 2016-09-06
*/
#include <stdio.h>
int main(){
int x, y, n, a[11][11] = {0};
for(scanf("%d", &n), a[1][1] = y = 1; y <= n; y++) for(x = 1; x <= y; x++) a[y][x] += a[y - 1][x - 1] + a[y - 1][x];
for(y = n; y >= 1; y--, printf("\n")) for(x = 1; x <= y; x++) printf("%d ", a[y][x]);
} | ChalkPE/Coin | sspark/2016/09/p1150.c | C | mit | 344 |
# whmcs-modules-servers-shadowsocksr
ShadowsocksR module for WHMCS.
Forked from [babytomas/Shadowsocks-For-WHMCS](https://github.com/babytomas/Shadowsocks-For-WHMCS).
| neworld-tech/whmcs-modules-servers-shadowsocksr | README.md | Markdown | mit | 167 |
require 'test_helper'
require 'slv'
class DefaultTest < Test::Unit::TestCase
def setup
end
def teardown
end
def test_the_truth
assert true
end
def test_version
assert SLV::VERSION > '0.0.1', "Version should be > 0.0.1"
end
def test_download_pdf
http = SLV::HTTP.new
assert_not_nil http.get_issue(Time.now.year, 1)
assert_nil http.get_issue(Time.now.year, 0)
end
end
| atonevski/slv | test/default_test.rb | Ruby | mit | 412 |
Ext.define('ship.view.filter.FilterTreePanel', {
extend: 'Ext.tree.Panel',
xtype: 'filter-tree',
requires: [
'ship.store.filter.FilterTreeStore'
],
store: Ext.create('ship.store.filter.FilterTreeStore'),
useArrows: true,
rootVisible: false
}); | kuun/dataship | shipwheel/webapp/app/view/filter/FilterTreePanel.js | JavaScript | mit | 279 |
class FoursquareWorker
require 'foursquare2'
@queue = :observers
attr_accessor :account
def initialize(oauth_account_id)
@account = OauthAccount.find(oauth_account_id)
end
def client
@client ||= Foursquare2::Client.new oauth_token: @account.token
end
def fs_user_id
@fs_user_id ||= self.client.user('self').id
end
def min_id
@account.payload[:min_id]
end
def min_id=(id)
@account.payload[:min_id] = id
@account.save and @account.reload
id
end
def reset_ids!
self.min_id=nil
end
def get_recent_checkins(options={})
params = {limit: 30}
results = self.client.user_checkins(params.merge(options))
@fetched += results.items.size
results
end
def get_all_checkins
@fetched = 0
@times_ran = 0
params = {}
params[:afterTimestamp] = self.min_id if self.min_id.is_a? Integer
results = self.get_recent_checkins(params)
@count = results['count']
@fetched = results['items'].size
results = results.items
results.delete_at(-1) if results.last.createdAt == self.min_id
unless results.empty?
while @fetched < @count and @times_ran < 30
results += self.get_recent_checkins(params.merge(offset: @fetched)).items
@times_ran += 1
end
end
results
end
def self.perform(oauth_account_id)
worker = self.new(oauth_account_id)
checkins = worker.get_all_checkins
for checkin in checkins
ManybotsFoursquare::Checkin.new(worker.fs_user_id, checkin, worker.account.user).post_to_manybots!
end
worker.min_id = checkins.first.createdAt
end
end | manybots/manybots-foursquare | app/workers/foursquare_worker.rb | Ruby | mit | 1,644 |
import React from 'react';
import {Card, CardFooter, CardHeader, CardBody} from 'reactstrap';
const CardBox = ({icon, title, children, footer}) => {
return (
<Card className="mb-5">
<CardHeader>
<i className={icon}/>
{" " + title}
</CardHeader>
<CardBody>{children}</CardBody>
<CardFooter>{footer}</CardFooter>
</Card>
)
};
export default CardBox; | cosminseceleanu/react-sb-admin-bootstrap4 | src/components/ui/card-box.js | JavaScript | mit | 454 |
const constants = require('../constants');
function increase(n) {
return {
type: constants.INCREASE,
amount: n
};
}
function decrease(n) {
return {
type: constants.DECREASE,
amount: n
};
}
module.exports = { increase, decrease };
| uniqname/redux-simple-router | examples/basic/actions/count.js | JavaScript | mit | 257 |
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Search · Jewelry</title>
<link rel="shortcut icon" type="image/png" href="http://kathrinegreenberg.github.io/ecommerce-website/images/favicon.png">
<meta name="description" content="">
<meta name="handheldfriendly" content="true">
<meta name="mobileoptimized" content="240">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Josefin+Sans:300,400,600,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Dawning+of+a+New+Day' rel='stylesheet' type='text/css'>
<link href="/css/rings-and-things.css" rel="stylesheet">
</head>
<body>
<header class="head">
<div class="grid">
<div class="unit gutter unit-s-1-6 unit-m-1-6 unit-l-1-6">
<img class="img-flex hide" src="/images/logo.svg" alt="">
</div>
<div class="unit gutter unit-s-1 unit-m-1-6 unit-l-1-2">
<h1 class="yotta hide2">Rings & Things</h1>
<h2 class="zetta">Rings & Things</h2>
</div>
<div class="unit gutter unit-s-1-6 unit-m-2-3 unit-l-1-3 search">
<form id="tfnewsearch" method="get" action="/search/">
<input type="text" class="tftextinput" size="23" maxlength="120"><input type="submit" value="search" class="search-button">
</form>
</div>
</div>
<nav class="nav">
<ul class="list-group">
<li class="list-group-item list-group-item-inline">
<a class="" href="/">Home</a>
</li>
<li class="list-group-item list-group-item-inline">
<a class="" href="/products/">Products</a>
</li>
<li class="list-group-item list-group-item-inline">
<a class="" href="/about/">About</a>
</li>
</ul>
</nav>
</header>
<p>You searched for "earrings". Here are your results:</p>
<ul class="product bottom grid media">
<li class="unit gutter unit-s-1 unit-m-1-3 unit-l-1-4 background">
<a href="/products/earrings/blue-earrings/">
<img class="img-flex border smaller" src="/images/earrings/blueearrings.jpg" alt=""></a>
<a href="/products/earrings/blue-earrings/">
<div class="gutter mega centertext">Blue Earrings</div></a>
</li>
<li class="unit gutter unit-s-1 unit-m-1-3 unit-l-1-4 background">
<a href="/products/earrings/flower-earrings/">
<img class="img-flex border smaller" src="/images/earrings/flowerearrings.jpg" alt=""></a>
<a href="/products/earrings/flower-earrings/">
<div class="gutter mega centertext">Flower Earrings</div></a>
</li>
<li class="unit gutter unit-s-1 unit-m-1-3 unit-l-1-4 background">
<a href="/products/earrings/snake-earrings/">
<img class="img-flex border smaller" src="/images/earrings/snakeearrings.jpg" alt=""></a>
<a href="/products/earrings/snake-earrings/">
<div class="gutter mega centertext">Snake Earrings</div></a>
</li>
<li class="unit gutter unit-s-1 unit-m-1-3 unit-l-1-4 background">
<a href="/products/earrings/spike-earrings/">
<img class="img-flex border smaller" src="/images/earrings/spikeearrings.jpg" alt=""></a>
<a href="/products/earrings/spike-earrings/">
<div class="gutter mega centertext">Spike Earrings</div></a>
</li>
<li class="unit gutter unit-s-1 unit-m-1-3 unit-l-1-4 background">
<a href="/products/earrings/wheel-earrings/">
<img class="img-flex border smaller" src="/images/earrings/wheelearrings.jpg" alt=""></a>
<a href="/products/earrings/wheel-earrings/">
<div class="gutter mega centertext">Wheel Earrings</div></a>
</li>
</ul>
<footer>
<div class="grid">
<div class="unit gutter unit-s-1 unit-m-1-3 unit-l-1-3">
<p>Copyright © 2013</p>
</div>
<div class="unit gutter unit-s-1 unit-m-1-6 unit-l-1-3">
<p>Terms</p>
</div>
<div class="unit gutter unit-s-1 unit-m-1-2 unit-l-1-3">
<ul class="list-group">
<li class="list-group-item list-group-item-inline marg">
<img src="/images/facebook.svg" alt="">
</li>
<li class="list-group-item list-group-item-inline marg">
<img src="/images/twitter.svg" alt="">
</li>
</ul>
</div>
</div>
</footer>
</body>
</html>
| kathrinegreenberg/ecommerce-website | _site/search/index.html | HTML | mit | 4,274 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<h5>Coverage Report - IndexOutOfRangeException</h5>
<div class="separator"> </div>
<table class="report">
<thead><tr> <td class="heading">Classes in this File</td> <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td> <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td> <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
<tr><td><a href="IndexOutOfRangeException.html">IndexOutOfRangeException</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">100%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">2/2</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">0.0;</span>0</td></tr>
</table>
<div class="separator"> </div>
<p>Unable to locate IndexOutOfRangeException.java. Have you specified the source directory?</p>
<div class="footer">Report generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a> 2.1.1 on 3/24/15 3:35 PM.</div>
</body>
</html>
| wilkenstein/redis-mock-java | target/site/cobertura/IndexOutOfRangeException.html | HTML | mit | 2,187 |
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using zSprite;
namespace GameName1.Gnomoria.Scripts
{
public class MainMenu : Script
{
private void ongui()
{
//if (gui.button(new Vector2(300, 200), "new game"))
{
rootObject.broadcast("loadmap");
this.enabled = false;
}
}
}
}
| cphillips83/DynamicGameEngine | TerrariaClone/Gnomoria/Scripts/MainMenu.cs | C# | mit | 454 |
"use strict"
module.exports = function(sequelize, DataTypes) {
var TransactionType = sequelize.define("TransactionType", {
type: {
type: DataTypes.STRING,
allowNull: false
}
}, {
classMethods: {
associate: function(models) {
TransactionType.hasMany(models.Transaction);
}
}
});
return TransactionType;
} | andreivisan/Personal_Finance | models/transactionType.js | JavaScript | mit | 417 |
/*!
* Mowe Contact v1.0.0 (http://letsmowe.com/)
* Copyright 2013-2016 Kabana's Info Developers
* Licensed under MIT (https://github.com/noibe/villa/blob/master/LICENSE)
*/
var Contact = (function() {
/**
* Constructor of Contact
* Needs of jQuery Ajax (>1.11.3)
* @param viewport
* @param options
* @constructor menu
*/
function Contact(viewport, options) {
var self = this;
this.viewport = viewport;
this.url = !!options.url ? options.url : false;
this.data = {};
this.fields = {};
this.clickCtrl = function() {
self.initResponse(this);
};
this.asyncSuccessCtrl = function(data) {
console.log(data);
if (data.sent)
self.showMessage();
//else
// self.send();
};
this.asyncErrorCtrl = function(data) {
console.log('erro');
//self.send();
};
}
Contact.prototype.showMessage = function() {
console.log('hhee');
};
Contact.prototype.send = function() {
// TODO - fallback to init send action
console.log('enviando');
$.ajax({
url: this.url,
type: 'jsonp',
cache: false,
data: this.data,
method: 'get',
timeout: 30000,
success: this.asyncSuccessCtrl,
error: this.asyncErrorCtrl
});
};
Contact.prototype.initSend = function() {
this.send();
};
Contact.prototype.loadTextFieldValue = function(element) {
return element ? element.value : false;
};
Contact.prototype.loadFieldsData = function(initSend) {
this.data.name = this.loadTextFieldValue(this.fields.name);
this.data.mail = this.loadTextFieldValue(this.fields.mail);
this.data.phone = this.loadTextFieldValue(this.fields.phone);
this.data.message = this.loadTextFieldValue(this.fields.message);
if (initSend) this.initSend();
};
Contact.prototype.validateTextField = function(element) {
return element ? element.value != '' : false;
};
Contact.prototype.validateOptionalFields = function() {
return (!!this.validateTextField(this.fields.phone) || !!this.validateTextField(this.fields.mail));
};
Contact.prototype.validateFields = function() {
return !(!this.validateTextField(this.fields.name) || !this.validateTextField(this.fields.message) || !this.validateOptionalFields());
};
Contact.prototype.initResponse = function(event) {
if (this.validateFields())
this.loadFieldsData(true);
else {
// TODO - error function
}
};
Contact.prototype.addListeners = function() {
addListener(this.submit, 'click','onclick',this.clickCtrl, false);
};
Contact.prototype.getFields = function() {
this.fields.name = document.getElementById('cNome');
this.fields.mail = document.getElementById('cEmail');
this.fields.phone = document.getElementById('cPhone');
this.fields.message = document.getElementById('cMensagem');
this.submit = document.getElementById('cSubmit');
this.addListeners();
};
Contact.prototype.init = function() {
this.getFields();
};
return Contact;
})(); | magmafantastico/promafa | js/contact.js | JavaScript | mit | 2,941 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Qoheleth - n montano</title>
<meta name="description" content="Montano moved his queen forward a square. To this, Jack moved an entire row of pieces forward. “Can you–wait. Can you do that?” asked Montano. ...">
<link href='https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,900,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/main.css">
<link rel="canonical" href="http://erikradio.github.io/2011/02/Qoheleth">
<link rel="alternate" type="application/rss+xml" title="n montano" href="http://erikradio.github.io/feed.xml">
</head>
<body>
<main class="u-container">
<div class="c-page">
<header class="c-page__header">
<p>
<a href="/">*</a>
<!-- <span class="u-separate"></span> <a href="/about/">About</a><span class="u-separate"></span><a href="/feed.xml">RSS</a> -->
</p>
</header>
<div class="c-page__main">
<article class="c-article">
<header class="c-article__header">
<h1 class="c-article__title">Qoheleth</h1>
<p class="c-article__time"><time datetime="2011-02-12T00:00:00-06:00" itemprop="datePublished">Feb 12, 2011</time></p>
</header>
<div class="c-article__main">
<p>Montano moved his queen forward a square. To this, Jack moved an entire row
of pieces forward. “Can you–wait. Can you do that?” asked
Montano. “Do what?” “That move.” “I don’t remember what the move was.” “Did you write
it down? OH- I haven’t been writing mine down either!” “Oh
shoot.” They struggled over the board, not knowing what had
happened. Later, Montano followed Don onto the midnight grass. “Do you play chyess?” he asked. Don gave him a confused look. “How about
chyeckers?” Still nothing. “Because I was playing with this guy, but we have a question about
the rules-“ “Get over here!” shouted Kane from in front of the garage
where she was waiting with another girl. Don and Montano complied. “So tonight we’re going to
a strip club. Is everyone in?” Montano flashed a look of discontent. “What’s the matter? You
don’t want to go? You just want to stay home and masturbate? Is that it?” Montano tried to
protest. “No,” she said. “Look: it’s either your pole, or the club’s pole.” En route, everyone became somebody else. The club was a sparse
modernist room consisting of three sections with three couches each that formed open squares.
Strobe lights flashed on and off. Chad and the two girls sat down. Immediately, the blond
turned and pressed her lips violently against his. “I want you. I want you now.” Chad looked over to the bathroom to see a man walk out. “That should take
care of the smell,” he said as he paused to sniff the air. “No! OH NO!” He pressed a button on
the wall and ran back into the bathroom. Chad ran out into the fields,
pursued by the blond. “Why? Why won’t you have me?” she asked. “I’m not going to talk about this.” He turned to look at her. Fields of
flowers stretched endlessly behind her. (“The symbolism!” thought Erasmus.) “Does this change
anything?” she asked, sunflowers standing defensively beside her. Montano sat among a crowd, watching the chennis match. Next to him he heard a small boy
wet his pants. Montano shot him a look out of the corner of his eye. “Should I have done that?” he asked. “Sure,” said SAM, leaning in.
“But maybe not next time.” “I only did it because I’m afraid of the
monster down there.”</p>
</div>
<footer class="c-article__footer">
<p>
</p>
</footer>
</article>
</div>
<footer class="c-page__footer">
<p>© erik radio 2016</p>
<!-- <p>Follow: </p> -->
</footer>
</div>
</main>
</body>
</html>
| nmontano/nmontano.github.io | _site/2011/02/Qoheleth.html | HTML | mit | 4,233 |
import random
import sys
import time
import types
import warnings
import numpy as np
import pathos.multiprocessing as multiprocessing
from lcc.entities.exceptions import InvalidOption
from lcc.entities.exceptions import QueryInputError
from lcc.stars_processing.stars_filter import StarsFilter
from lcc.stars_processing.tools.stats_manager import StatsManager
class ParamsEstimator(object):
"""
Attributes
----------
searched : list of `Star` objects
Searched stars
others : list of `Star` objects
Contamination stars
descriptors : list, iterable
Unconstructed descriptor objects
deciders : list, iterable
Decider instances
tuned_params : list of dicts
List of parameters to tune
static_params : dict
Constant values for descriptors and deciders
num_proc : NoneType, bool, int
Number of cores to use for parallel computing. If 'True' all cores will be used
multiproc : bool, int
If True task will be distributed into threads by using all cores. If it is number,
just that number of cores are used
"""
def __init__(self, searched, others, descriptors, deciders, tuned_params,
split_ratio=0.7, static_params={}, multiproc=True):
"""
Parameters
----------
searched : list
Searched stars
others : list
Contamination stars
descriptors : list, iterable
Unconstructed descriptors object
deciders : list, iterable
Unconstructed decider instances
tuned_params : list of dicts
List of parameters to tune
EXAMPLE
[{'AbbeValue' : {'bins' : 10, ..}, 'NeuronDecider' : {'hidden_layers': 2, ..}, .. ]
split_ratio : float
Percentage number of train sample
static_params : dict
Constant values for descriptors and deciders. Format is the
same one item of tuned_params
multiproc : bool, int
If True task will be distributed into threads by using all cores. If it is number,
just that number of cores are used
"""
random.shuffle(searched)
random.shuffle(others)
self.searched_train = searched[:int(len(searched) * split_ratio)]
self.searched_test = searched[int(len(searched) * split_ratio):]
self.others_train = others[:int(len(others) * split_ratio)]
self.others_test = others[int(len(others) * split_ratio):]
self.descriptors = descriptors
self.deciders = deciders
self.tuned_params = tuned_params
self.static_params = static_params
self.stats_list = []
self.stats = {}
self.filters = []
self.multiproc = multiproc
def evaluateCombinations(self, tuned_params=None):
"""
Evaluate all combination of the filter parameters
Returns
-------
list
Filters created from particular combinations
list
Statistical values of all combinations
list
Input parameters of all combinations
"""
if not tuned_params:
tuned_params = self.tuned_params
if self.multiproc:
if self.multiproc is True:
n_cpu = multiprocessing.cpu_count()
else:
n_cpu = self.multiproc
pool = multiprocessing.Pool(n_cpu)
result = pool.map_async(self.evaluate, tuned_params)
pool.close() # No more work
n = len(tuned_params)
while True:
if result.ready():
break
sys.stderr.write('\rEvaluated combinations: {0} / {1}'.format(n - result._number_left, n))
time.sleep(0.6)
result = result.get()
sys.stderr.write('\rAll {0} combinations have been evaluated'.format(n))
# result = pool.map(self.evaluate, tuned_params)
else:
result = [self.evaluate(tp) for tp in tuned_params]
for stars_filter, stats in result:
self.stats_list.append(stats)
self.filters.append(stars_filter)
return self.stats_list, self.filters, tuned_params
def fit(self, score_func=None, opt="max", save_params=None):
"""
Find the best combination of the filter parameters
Parameters
----------
score_func : function
Function which takes dict of statistical values and return
a score
opt : str
Option for evaluating scores
"max" - Returns the highest score
"min" - Returns the lowermost score
save_params : dict
Parameters for saving outputs. For each output there are some
mandatory keys:
ROC plot:
"roc_plot_path"
"roc_plot_name"
"roc_plot_title" - optional
ROC data file:
"roc_data_path"
"roc_data_name"
"roc_data_delim" - optional
Statistical params of all combinations:
"stats_path"
"stats_name"
"stats_delim" - optional
Returns
-------
object
Filter created from the best parameters
dict
Statistical values of the best combination
dict
Input parameters of the best combination
"""
if not save_params:
save_params = {}
stats_list, filters, tuned_params = self.evaluateCombinations()
try:
self.saveOutput(save_params)
except Exception as e:
warnings.warn("\nError during saving outputs...:\n\t%s" % e)
scores = []
for stat in stats_list:
if not score_func:
score = stat.get("precision", 0)
else:
score = score_func(**stat)
scores.append(score)
if opt == "max":
best_id = np.argmax(scores)
elif opt == "min":
best_id = np.argmin(scores)
else:
raise InvalidOption("Available options are: 'max' or 'min'.")
self.best_id = best_id
return filters[best_id], stats_list[best_id], tuned_params[best_id]
def evaluate(self, combination):
"""
Parameters
----------
combination : dict
Dictionary of dictionaries - one per a descriptor.
EXAMPLE
{'AbbeValue': {'bin':10, .. }, .. }
Returns
-------
tuple
Stars filter, statistical values
"""
descriptors = []
deciders = []
n = len(self.descriptors)
for i, des in enumerate(self.descriptors + self.deciders):
try:
static_params = self.static_params.get(des.__name__, {})
_params = combination.get(des.__name__, {})
params = _params.copy()
params.update(static_params)
if i < n:
descriptors.append(des(**params))
else:
deciders.append(des(**params))
except TypeError:
raise QueryInputError("Not enough parameters to construct constructor {0}\nGot: {1}".format(
des.__name__, params))
stars_filter = StarsFilter(descriptors, deciders)
stars_filter.learn(self.searched_train, self.others_train)
stat = stars_filter.getStatistic(self.searched_test, self.others_test)
return stars_filter, stat
def saveOutput(self, save_params):
"""
Parameters
----------
save_params : dict
Parameters for saving outputs. For each output there are some
mandatory keys:
ROC plot:
"roc_plot_path"
"roc_plot_name"
"roc_plot_title" - optional
ROC data file:
"roc_data_path"
"roc_data_name"
"roc_data_delim" - optional
Statistical params of all combinations:
"stats_path"
"stats_name"
"stats_delim" - optional
"""
to_save = self._prepareStatus(self.stats_list, self.tuned_params)
self.stats = to_save
man = StatsManager(to_save)
if "roc_plot_path" in save_params and "roc_plot_name" in save_params:
man.plotROC(save=True,
title=save_params.get("roc_plot_title", "ROC"),
path=save_params.get("roc_plot_path"),
file_name=save_params.get("roc_plot_name"))
if "roc_data_path" in save_params and "roc_data_name" in save_params:
man.saveROCfile(path=save_params.get("roc_data_path"),
file_name=save_params.get("roc_data_name"),
delim=save_params.get("stats_delim", "\t"))
if "stats_path" in save_params and "stats_name" in save_params:
man.saveStats(path=save_params.get("stats_path"),
file_name=save_params.get("stats_name"),
delim=save_params.get("stats_delim", "\t"),
overwrite=True)
def _prepareStatus(self, stats_list, tuned_params):
result = []
for st, tun in zip(stats_list, tuned_params):
x = st.copy()
unpacked_tun = self._mergeTwoDict(st, tun)
x.update(unpacked_tun)
result.append(x)
return result
def _mergeTwoDict(self, stat, tun):
unpacked_tun = []
for prefix, inner_dict in tun.items():
for key, value in inner_dict.items():
if hasattr(value, "__iter__"):
# if len(value) > 0 and not isinstance(value[0], types.InstanceType):
# unpacked_tun.append((key,value))
#
pass
elif not isinstance(value, types.InstanceType):
unpacked_tun.append((":".join([prefix, key]), value))
return unpacked_tun
| mavrix93/LightCurvesClassifier | lcc/stars_processing/tools/params_estim.py | Python | mit | 10,318 |
using System;
namespace PeterJuhasz.AspNetCore.Extensions.Security;
[Flags]
public enum CspSandboxRules
{
Sandbox = 0,
AllowForms,
AllowSameOrigin,
AllowScripts,
AllowPopups,
AllowModals,
AllowOrientationLock,
AllowPointerLock,
AllowPresentation,
AllowPopupsToEscapeSandbox,
AllowTopNavigation,
}
| Peter-Juhasz/aspnetcoresecurity | src/ContentSecurityPolicy/CspSandboxRules.cs | C# | mit | 347 |
using System;
using System.Collections.Generic;
using System.Drawing; // Librería agregada, para poder dibujar
using System.Drawing.Drawing2D; // Librería agregada, para poder dibujar
using System.Linq;
using System.Text;
using System.Threading.Tasks; // Librería agregada, para el manejo de hilos de ejecución
namespace Proyecto
{
[Serializable]
public class CVertice {
// Atributos
public string Valor; // Valor que almacena (representa) el nodo
public List < CArco > ListaAdyacencia; // Lista de adyacencia del nodo
public Boolean Visitado;//variable que sirve para marcar como visto el nodo en un recorrido
public CVertice Padre;//nodo que sirve en los recorridos como el antecesor
public int distancianodo;//guarda la distancia que hay entre el nodo inicio en el algoritmo de Dijkstra
public bool pesoasignado;
// Propiedades
public Color Color {
get {
return color_nodo;
}
set {
color_nodo = value;
}
}
public Color FontColor {
get {
return color_fuente;
}
set {
color_fuente = value;
}
}
public Point Posicion {
get {
return _posicion;
}
set {
_posicion = value;
}
}
public Size Dimensiones {
get {
return dimensiones;
}
set {
radio = value.Width / 2;
dimensiones = value;
}
}
static int size = 35; // Tamaño del nodo
Size dimensiones;
Color color_nodo; // Color definido para el nodo
Color color_fuente; // Color definido para la fuente del nombre del nodo
Point _posicion; // Dónde se dibujará el nodo
int radio; // Radio del objeto que representa el nodo
// Métodos
// Constructor de la clase, recibe como parámetro el nombre del nodo (el valor que tendrá)
public CVertice(string Valor) {
this.Valor = Valor;
this.ListaAdyacencia = new List < CArco > ();
this.Color = Color.LightSeaGreen; // Definimos el color del nodo
this.Dimensiones = new Size(size, size); // Definimos las dimensiones del circulo
this.FontColor = Color.White; // Color de la fuente
}
public CVertice(): this("") {} // Constructor por defecto
// Método para dibujar el nodo
public void DibujarVertice(Graphics g, Image Imagen = null)
{
SolidBrush b = new SolidBrush(this.color_nodo);
// Definimos donde dibujaremos el nodo
Rectangle areaNodo = new Rectangle(this._posicion.X - radio, this._posicion.Y - radio,
this.dimensiones.Width, this.dimensiones.Height);
g.FillEllipse(b, areaNodo);
if (Imagen != null)
g.DrawImage(Imagen, areaNodo);
g.DrawString(this.Valor, new Font("Arial", 14), new SolidBrush(color_fuente),
this._posicion.X, this._posicion.Y,
new StringFormat() {
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center
}
);
if (Imagen == null)
g.DrawEllipse(new Pen(Brushes.Black, (float) 1.0), areaNodo);
b.Dispose();
}
// Método para dibujar los arcos
public void DibujarArco(Graphics g, bool DiGrafo)
{
float distancia;
int difY, difX;
foreach (CArco arco in ListaAdyacencia)
{
difX = this.Posicion.X - arco.nDestino.Posicion.X;
difY = this.Posicion.Y - arco.nDestino.Posicion.Y;
distancia = (float)Math.Sqrt((difX * difX + difY * difY));
AdjustableArrowCap bigArrow = new AdjustableArrowCap(4, 4, true);
bigArrow.BaseCap = System.Drawing.Drawing2D.LineCap.Triangle;
if (DiGrafo)
{
g.DrawLine(new Pen(new SolidBrush(arco.color), arco.grosor_flecha)
{
CustomEndCap = bigArrow,
Alignment = PenAlignment.Center
},
_posicion,
new Point(arco.nDestino.Posicion.X + (int)(radio * difX / distancia),
arco.nDestino.Posicion.Y + (int)(radio * difY / distancia)
)
);
}
else
{
g.DrawLine(new Pen(new SolidBrush(arco.color), arco.grosor_flecha),
_posicion,
new Point(arco.nDestino.Posicion.X + (int)(radio * difX / distancia),
arco.nDestino.Posicion.Y + (int)(radio * difY / distancia)
)
);
}
g.DrawString(
arco.peso.ToString(),
new Font("Arial", 12),
new SolidBrush(arco.Cfuente),
this._posicion.X - (int)((difX / 2)),
this._posicion.Y - (int)((difY / 2)),
new StringFormat()
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Far
}
);
}
}
// Método para detectar posición en el panel donde se dibujará el nodo
public bool DetectarPunto(Point p) {
GraphicsPath posicion = new GraphicsPath();
posicion.AddEllipse(new Rectangle(this._posicion.X - this.dimensiones.Width / 2,
this._posicion.Y - this.dimensiones.Height / 2,
this.dimensiones.Width, this.dimensiones.Height));
bool retval = posicion.IsVisible(p);
posicion.Dispose();
return retval;
}
override public string ToString() {
return this.Valor;
}
}
[Serializable]
public class CArco
{ // Atributos
public CVertice nDestino;
public int peso;
public float grosor_flecha;
public Color color;
public Boolean seleccionada= false;
public Color Cfuente;
//Métodos
public CArco(CVertice destino)
: this(destino, 1)
{
this.nDestino = destino;
}
public CArco(CVertice destino, int peso)
{
this.nDestino = destino;
this.peso = peso;
this.grosor_flecha = 2;
this.color = Color.Black;
this.Cfuente = Color.Black;
}
}
} | sancas/ILC | Proyecto/Proyecto/CVertice.cs | C# | mit | 6,956 |
# jorge-cardoso.github.io
Web site for Jorge Cardoso
## Run locally
$ jekyll serve
| jorge-cardoso/jorge-cardoso.github.io | README.md | Markdown | mit | 85 |
// 引入核心模块
import { NgModule } from '@angular/core';
import { RouterModule, Routes, PreloadAllModules } from '@angular/router';
const routes: Routes = [
{ path: 'signup', loadChildren: './func/sign-up/sign-up.module#SignUpModule' },
{ path: 'login', loadChildren: './func/log-in/log-in.module#LogInModule' },
{ path: 'blog', loadChildren: './func/blog/blog.module#BlogModule' },
{ path: 'chat', loadChildren: './func/chat/chat.module#ChatModule' },
{ path: 'game', loadChildren: './func/game/game.module#GameModule' },
{ path: 'game3d', loadChildren: './func/game-3d/game-3d.module#Game3DModule' },
{ path: 'study', loadChildren: './func/study/study.module#StudyModule' },
{ path: 'account', loadChildren: './func/account/account.module#AccountModule' },
{ path: '404', loadChildren: './func/page-not-found/page-not-found.module#PageNotFoundModule'},
{ path: '', loadChildren: './func/home/home.module#HomeModule', pathMatch: 'full' },
{ path: '**', redirectTo: '404' }
];
// PreloadAllModules预加载所有Module , {preloadingStrategy: PreloadAllModules}, 不加就是lazy loading
// RouteModule.forRoot(ROUTES, { preloadingStrategy: PreloadAllModules })
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule {}
| TaylorPzreal/curriculum-vitae | src/app/app-routing.module.ts | TypeScript | mit | 1,309 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("05.BombNumbers")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("05.BombNumbers")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8258613f-4a98-4768-8e68-3ba19d4f33fd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| kalinmarkov/SoftUni | Programming Fundamentals/10.ListExercise/05.BombNumbers/Properties/AssemblyInfo.cs | C# | mit | 1,404 |
import Ember from 'ember';
import layout from '../templates/components/editable-label';
export default Ember.Component.extend({
layout: layout,
templateName: 'editable-label',
classNames: ['editable-label'],
placeholder: '',
isEditing: false,
value: null,
displayName: Ember.computed(function() {
if (Ember.isNone(this.get('value')) || this.get('value') === '') {
return this.get('placeholder');
} else {
return this.get('value');
}
}).property('value', 'placeholder'),
innerTextField: Ember.TextField.extend({
valueBinding: Ember.Binding.oneWay('parentView.value'),
didInsertElement: function() {
return this.$().focus();
},
blur: function() {
this.set('parentView.isEditing', false);
return this.set('parentView.value', this.get('value'));
}
}),
editLabel: function() {
return this.set('isEditing', true);
}
});
| jordansmith42/ember-widgets-addon | addon/components/editable-label.js | JavaScript | mit | 905 |
# PnP Unit Test report for OnPremAppOnly on Friday, November 6, 2015 #
This page is showing the results of the PnP unit test run.
## Test configuration ##
This report contains the unit test results from the following run:
Parameter | Value
----------|------
PnP Unit Test configuration | OnPremAppOnly
Test run date | Friday, November 6, 2015
Test run time | 10:21 PM
PnP branch | dev
Visual Studio build configuration | debug15
## Test summary ##
During this test run 269 tests have been executed with following outcome:
Parameter | Value
----------|------
Executed tests | 269
Elapsed time | 0h 18m 44s
Passed tests | 221
Failed tests | **0**
Skipped tests | 48
Was canceled | False
Was aborted | False
Error |
## Test run details ##
### Failed tests ###
<table>
<tr>
<td><b>Test name</b></td>
<td><b>Test outcome</b></td>
<td><b>Duration</b></td>
<td><b>Message</b></td>
</tr>
</table>
### Skipped tests ###
<table>
<tr>
<td><b>Test name</b></td>
<td><b>Test outcome</b></td>
<td><b>Duration</b></td>
<td><b>Message</b></td>
</tr>
<tr><td>Microsoft.SharePoint.Client.Tests.ListExtensionsTests.SetDefaultColumnValuesTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Tests.AppModelExtensions.SearchExtensionsTests.SetSiteCollectionSearchCenterUrlTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Search tests are not supported when testing using app-only</td></tr>
<tr><td>Tests.AppModelExtensions.SearchExtensionsTests.GetSearchConfigurationFromWebTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Search tests are not supported when testing using app-only</td></tr>
<tr><td>Tests.AppModelExtensions.SearchExtensionsTests.GetSearchConfigurationFromSiteTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Search tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.CreateTaxonomyFieldTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.CreateTaxonomyFieldMultiValueTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.SetTaxonomyFieldValueTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.CreateTaxonomyFieldLinkedToTermSetTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.CreateTaxonomyFieldLinkedToTermTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetTaxonomySessionTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetDefaultKeywordsTermStoreTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetDefaultSiteCollectionTermStoreTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetTermSetsByNameTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetTermGroupByNameTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetTermGroupByIdTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetTermByNameTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.GetTaxonomyItemByPathTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.AddTermToTermsetTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.AddTermToTermsetWithTermIdTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ImportTermsTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ImportTermsToTermStoreTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ImportTermSetSampleShouldCreateSetTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ImportTermSetShouldUpdateSetTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ImportTermSetShouldUpdateByGuidTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ExportTermSetTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ExportTermSetFromTermstoreTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.TaxonomyExtensionsTests.ExportAllTermsTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.UploadFileWebDavTest</td><td>Skipped</td><td>0h 0m 1s</td><td>Assert.Inconclusive failed. Tests involving webdav are not supported when testing using app-only</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorGetFile1Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorGetFile2Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorGetFiles1Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorGetFiles2Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorGetFileBytes1Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorGetFileBytes2Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorSaveStream1Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorSaveStream2Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorSaveStream3Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorDelete1Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorAzureTests.AzureConnectorDelete2Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectTermGroupsTests.CanProvisionToSiteCollectionTermGroupUsingToken</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectTermGroupsTests.CanProvisionObjects</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. Taxonomy tests are not supported when testing using app-only</td></tr>
<tr><td>Tests.Framework.Providers.BaseTemplateTests.DumpBaseTemplates</td><td>Skipped</td><td>0h 0m 0s</td><td></td></tr>
<tr><td>Tests.Framework.Providers.BaseTemplateTests.DumpSingleTemplate</td><td>Skipped</td><td>0h 0m 0s</td><td></td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLAzureStorageGetTemplatesTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLAzureStorageGetTemplate1Test</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLAzureStorageGetTemplate2SecureTest</td><td>Skipped</td><td>0h 0m 0s</td><td>Assert.Inconclusive failed. No Azure Storage Key defined in App.Config, so can't test</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.InstallSolutionTest</td><td>Skipped</td><td>0h 0m 0s</td><td></td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.UninstallSolutionTest</td><td>Skipped</td><td>0h 0m 0s</td><td></td></tr>
</table>
### Passed tests ###
<table>
<tr>
<td><b>Test name</b></td>
<td><b>Test outcome</b></td>
<td><b>Duration</b></td>
</tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.CanUploadHtmlPageLayoutAndConvertItToAspxVersionTest</td><td>Passed</td><td>0h 0m 51s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.CanUploadPageLayoutTest</td><td>Passed</td><td>0h 0m 45s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.CanUploadPageLayoutWithPathTest</td><td>Passed</td><td>0h 0m 43s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.AllowAllPageLayoutsTest</td><td>Passed</td><td>0h 0m 43s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.DeployThemeAndCreateComposedLookTest</td><td>Passed</td><td>0h 0m 45s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.ComposedLookExistsTest</td><td>Passed</td><td>0h 0m 42s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.GetCurrentComposedLookTest</td><td>Passed</td><td>0h 0m 55s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.CreateComposedLookShouldWorkTest</td><td>Passed</td><td>0h 0m 40s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.CreateComposedLookByNameShouldWorkTest</td><td>Passed</td><td>0h 0m 44s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.SetComposedLookInheritsTest</td><td>Passed</td><td>0h 1m 4s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.SetComposedLookResetInheritanceTest</td><td>Passed</td><td>0h 1m 21s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.SeattleMasterPageIsUnchangedTest</td><td>Passed</td><td>0h 0m 42s</td></tr>
<tr><td>Tests.AppModelExtensions.BrandingExtensionsTests.IsSubsiteTest</td><td>Passed</td><td>0h 0m 41s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.NotLoadedPropertyExceptionTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsurePropertyTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.NotLoadedCollectionExceptionTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsureCollectionPropertyTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.NotLoadedComplexPropertyExceptionTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsureComplexPropertyTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsureMultiplePropertiesTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsurePropertiesIncludeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsurePropertyIncludeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsureComplexPropertyWithDependencyTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.ClientObjectExtensionsTests.EnsureComplexPropertiesWithDependencyTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FeatureExtensionsTests.ActivateSiteFeatureTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FeatureExtensionsTests.ActivateWebFeatureTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FeatureExtensionsTests.DeactivateSiteFeatureTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FeatureExtensionsTests.DeactivateWebFeatureTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FeatureExtensionsTests.IsSiteFeatureActiveTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FeatureExtensionsTests.IsWebFeatureActiveTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CreateFieldTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CanAddContentTypeToListByName</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CanRemoveContentTypeFromListByName</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CanRemoveContentTypeFromListById</td><td>Passed</td><td>0h 0m 6s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CreateExistingFieldTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.GetContentTypeByIdTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.RemoveFieldByInternalNameThrowsOnNoMatchTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CreateFieldFromXmlTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ContentTypeExistsByNameTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ContentTypeExistsByIdTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ContentTypeExistsByNameInSubWebTest</td><td>Passed</td><td>0h 0m 7s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ContentTypeExistsByIdInSubWebTest</td><td>Passed</td><td>0h 0m 6s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ContentTypeExistsByNameSearchInSiteHierarchyTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ContentTypeExistsByIdSearchInSiteHierarchyTest</td><td>Passed</td><td>0h 0m 6s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.AddFieldToContentTypeTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.AddFieldToContentTypeMakeRequiredTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.SetDefaultContentTypeToListTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.ReorderContentTypesTest</td><td>Passed</td><td>0h 0m 7s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.FieldAndContentTypeExtensionsTests.CreateContentTypeByXmlTest</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.AddJsLinkToWebTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.AddJsLinkToSiteTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.AddJsLinkIEnumerableToWebTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.AddJsLinkIEnumerableToSiteTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.DeleteJsLinkFromWebTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.DeleteJsLinkFromSiteTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.AddJsBlockToWebTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.JavaScriptExtensionsTests.AddJsBlockToSiteTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.ListExtensionsTests.CreateListTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.ListRatingExtensionTest.EnableRatingExperienceTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.ListRatingExtensionTest.EnableLikesExperienceTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.GetAdministratorsTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddAdministratorsTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddGroupTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.GroupExistsTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelToGroupTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelToGroupSubSiteTest</td><td>Passed</td><td>0h 0m 6s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelToGroupListTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelToGroupListItemTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.RemovePermissionLevelFromGroupSubSiteTest</td><td>Passed</td><td>0h 0m 6s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelByRoleDefToGroupTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelToUserTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddPermissionLevelToUserTestByRoleDefTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddSamePermissionLevelTwiceToGroupTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.SecurityExtensionsTests.AddReaderAccessToEveryoneTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.StructuralNavigationExtensionsTests.GetNavigationSettingsTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.StructuralNavigationExtensionsTests.UpdateNavigationSettingsTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.StructuralNavigationExtensionsTests.UpdateNavigationSettings2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.CheckOutFileTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.CheckInFileTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.UploadFileTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.VerifyIfUploadRequiredTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.SetFilePropertiesTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.GetFileTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.EnsureSiteFolderTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.EnsureLibraryFolderTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.FileFolderExtensionsTests.EnsureLibraryFolderRecursiveTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.Tenant15ExtensionsTests.CreateDeleteSiteCollectionTest</td><td>Passed</td><td>0h 0m 26s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.AddTopNavigationNodeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.AddQuickLaunchNodeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.AddSearchNavigationNodeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.DeleteTopNavigationNodeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.DeleteQuickLaunchNodeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.DeleteSearchNavigationNodeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.NavigationExtensionsTests.DeleteAllNavigationNodesTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Diagnostics.LogTests.LogTest1</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorGetFile1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorGetFile2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorGetFile3Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorGetFiles1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorGetFiles2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorGetFileBytes1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorSaveStream1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorSaveStream2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorSaveStream3Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorDelete1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorFileSystemTests.FileConnectorDelete2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFile1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFile2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFiles1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFiles2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFiles3Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFileBytes1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorGetFileBytes2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorSaveStream1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorSaveStream2Test</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorSaveStream3Test</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorDelete1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Connectors.ConnectorSharePointTests.SharePointConnectorDelete2Test</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ExtensibilityCallOut.ExtensibilityTests.CanProviderCallOut</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ExtensibilityCallOut.ExtensibilityTests.ProviderCallOutThrowsException</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ExtensibilityCallOut.ExtensibilityTests.ProviderAssemblyMissingThrowsAgrumentException</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ExtensibilityCallOut.ExtensibilityTests.ProviderTypeNameMissingThrowsAgrumentException</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ExtensibilityCallOut.ExtensibilityTests.ProviderClientCtxIsNullThrowsAgrumentNullException</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectAuditSettingsTests.CanExtractAuditSettings</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectAuditSettingsTests.CanProvisionAuditSettings</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectRegionalSettingsTests.CanExtractRegionalSettings</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectRegionalSettingsTests.CanProvisionRegionalSettings</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectSupportedUILanguagesTests.CanExtractSupportedUILanguages</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectSupportedUILanguagesTests.CanProvisionSupportedUILanguages</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectComposedLookTests.CanCreateComposedLooks</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectPagesTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectPagesTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectSiteSecurityTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectSiteSecurityTests.CanCreateEntities1</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectSiteSecurityTests.CanCreateEntities2</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectPropertyBagEntryTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectPropertyBagEntryTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectListInstanceTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectListInstanceTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 18s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectFilesTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectFilesTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectFeaturesTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectFeaturesTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectCustomActionsTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectCustomActionsTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectFieldTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectFieldTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectContentTypeTests.CanProvisionObjects</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.ObjectContentTypeTests.CanCreateEntities</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Tests.Framework.ObjectHandlers.TokenParserTests.ParseTests</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.Providers.BaseTemplateTests.GetBaseTemplateForCurrentSiteTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLFileSystemGetTemplatesTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLFileSystemGetTemplate1Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLFileSystemGetTemplate2Test</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLFileSystemConvertTemplatesFromV201503toV201505</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.ResolveSchemaFormatV201503</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.ResolveSchemaFormatV201505</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLResolveValidXInclude</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.Providers.XMLProvidersTests.XMLResolveInvalidXInclude</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanDeserializeXMLToDomainObject1</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectToXML1</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectToXMLStream1</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanDeserializeXMLToDomainObject2</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectToXML2</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetTemplateNameandVersion</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetPropertyBagEntries</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetOwners</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetAdministrators</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetMembers</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetVistors</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetFeatures</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanGetCustomActions</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeToJSon</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeToXml</td><td>Passed</td><td>0h 0m 23s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.ValidateFullProvisioningSchema5</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.ValidateSharePointProvisioningSchema6</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanDeserializeXMLToDomainObject5</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanDeserializeXMLToDomainObject6</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectToXML6</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectToXML5ByIdentifier</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectToXML5ByFileLink</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanSerializeDomainObjectWithJsonFormatter</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.CanHandleDomainObjectWithJsonFormatter</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.AreTemplatesEqual</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Framework.ProvisioningTemplates.DomainModelTests.GetRemoteTemplateTest</td><td>Passed</td><td>0h 0m 20s</td></tr>
<tr><td>Utilities.Tests.JsonUtilityTests.SerializeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Utilities.Tests.JsonUtilityTests.DeserializeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Utilities.Tests.JsonUtilityTests.DeserializeListTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Utilities.Tests.JsonUtilityTests.DeserializeListIsNotFixedSizeTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Utilities.Tests.JsonUtilityTests.DeserializeListNoDataStillWorksTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Utilities.EncryptionUtilityTests.ToSecureStringTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Utilities.EncryptionUtilityTests.ToInSecureStringTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Utilities.EncryptionUtilityTests.EncryptStringWithDPAPITest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Utilities.EncryptionUtilityTests.DecryptStringWithDPAPITest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.Diagnostics.PnPMonitoredScopeTests.PnPMonitoredScopeNestingTest</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.UrlUtilityTests.ContainsInvalidCharsReturnsFalseForValidString</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.UrlUtilityTests.ContainsInvalidUrlCharsReturnsTrueForInvalidString</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.UrlUtilityTests.StripInvalidUrlCharsReturnsStrippedString</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Tests.AppModelExtensions.UrlUtilityTests.ReplaceInvalidUrlCharsReturnsStrippedString</td><td>Passed</td><td>0h 0m 0s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.SetPropertyBagValueIntTest</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.SetPropertyBagValueStringTest</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.SetPropertyBagValueMultipleRunsTest</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.RemovePropertyBagValueTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.GetPropertyBagValueIntTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.GetPropertyBagValueStringTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.PropertyBagContainsKeyTest</td><td>Passed</td><td>0h 0m 3s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.GetIndexedPropertyBagKeysTest</td><td>Passed</td><td>0h 0m 7s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.AddIndexedPropertyBagKeyTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.RemoveIndexedPropertyBagKeyTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.GetProvisioningTemplateTest</td><td>Passed</td><td>0h 0m 24s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.GetAppInstancesTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.RemoveAppInstanceByTitleTest</td><td>Passed</td><td>0h 0m 2s</td></tr>
<tr><td>Microsoft.SharePoint.Client.Tests.WebExtensionsTests.IsSubWebTest</td><td>Passed</td><td>0h 0m 1s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.CanAddLayoutToWikiPageTest</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.CanAddHtmlToWikiPageTest</td><td>Passed</td><td>0h 0m 4s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.ProveThatWeCanAddHtmlToPageAfterChangingLayoutTest</td><td>Passed</td><td>0h 0m 5s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.CanCreatePublishingPageTest</td><td>Passed</td><td>0h 0m 15s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.PublishingPageWithInvalidCharsIsCorrectlyCreatedTest</td><td>Passed</td><td>0h 0m 14s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.CanCreatePublishedPublishingPageWhenModerationIsEnabledTest</td><td>Passed</td><td>0h 0m 14s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.CanCreatePublishedPublishingPageWhenModerationIsDisabledTest</td><td>Passed</td><td>0h 0m 12s</td></tr>
<tr><td>Tests.AppModelExtensions.PageExtensionsTests.CreatedPublishingPagesSetsTitleCorrectlyTest</td><td>Passed</td><td>0h 0m 16s</td></tr>
</table>
| BobGerman/PnP-Sites-Core | Core/UnitTestResults/PnPUnitTestResults-20151106-OnPremAppOnly-635824488657118399.md | Markdown | mit | 40,964 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.