text
large_stringlengths 384
2.05k
| rank_avg
float64 1
4.19k
⌀ | rank_max
float64 1
8.21k
⌀ | rank_min
float64 1
5.03k
⌀ | rank_median
float64 1
4.21k
⌀ | rank_by_avgsim
float64 1
4.19k
⌀ | avgsim_to_github
float32 0.77
0.85
⌀ | dataset
large_stringclasses 1
value |
|---|---|---|---|---|---|---|---|
ing>windowTool.debuggerConsole</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAAC065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {650, 209}}</string>
<key>RubberWindowFrame</key>
<string>-755 471 650 250 -1680 30 1680 1050 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>209pt</string>
</dict>
</array>
<key>Proportion</key>
<string>209pt</string>
</dict>
</array>
<key>Name</key>
<string>Debugger Console</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugCLIModule</string>
</array>
<key>StatusbarIsVisible</key>
<true/>
<key>TableOfContents</key>
<array>
<string>1C78EAAD065D492600B07095</string>
<string>8E6CE88B120A029200A88205</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>-755 471 650 250 -1680 30 1680 1050 </string>
<key>WindowToolGUID</key>
<string>1C78EAAD065D492600B07095</string>
<key>WindowToolIsVisible</key>
<true/>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.scm</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB2065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB3065D492600B07095</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {452, 0}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>0pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052920623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>SCM</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ConsoleFrame</key>
<string>{{0, 259}, {452, 0}}</string>
<key>Frame</key>
<string>{{0, 7}, {452, 259}}</string>
<key>RubberWindowFrame</key
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
>
<string>743 379 452 308 0 0 1280 1002 </string>
<key>TableConfiguration</key>
<array>
<string>Status</string>
<real>30</real>
<string>FileName</string>
<real>199</real>
<string>Path</string>
<real>197.0950012207031</real>
</array>
<key>TableFrame</key>
<string>{{0, 0}, {452, 250}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Proportion</key>
<string>262pt</string>
</dict>
</array>
<key>Proportion</key>
<string>266pt</string>
</dict>
</array>
<key>Name</key>
<string>SCM</string>
<key>ServiceClasses</key>
<array>
<string>PBXCVSModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAB4065D492600B07095</string>
<string>1C78EAB5065D492600B07095</string>
<string>1C78EAB2065D492600B07095</string>
<string>1CD052920623707200166675</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.scm</string>
<key>WindowString</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CE0B1FE06471DED0097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>no</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
<array>
<real>168</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 0}, {168, 350}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<integer>0</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {185, 368}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>MainColumn</string>
<real>168</real>
</array>
<key>RubberWindowFrame</key>
<string>315 424 744 409 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
<string>185pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA1AED706398EBD00589147</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{190, 0}, {554, 368}}</string>
<key>RubberWindowFrame</key>
<string>315 424 744 409 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
<key>Proportion</key>
<string>554pt</string>
</dict>
</array>
<
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
key>Proportion</key>
<string>368pt</string>
</dict>
</array>
<key>MajorVersion</key>
<integer>3</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>Breakpoints</string>
<key>ServiceClasses</key>
<array>
<string>PBXSmartGroupTreeModule</string>
<string>XCDetailModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CDDB66807F98D9800BB5817</string>
<string>1CDDB66907F98D9800BB5817</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CA1AED706398EBD00589147</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.breakpointsV3</string>
<key>WindowString</key>
<string>315 424 744 409 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CDDB66807F98D9800BB5817</string>
<key>WindowToolIsVisible</key>
<integer>1</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.debugAnimator</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debug Visualizer</string>
<key>ServiceClasses</key>
<array>
<string>PBXNavigatorGroup</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugAnimatorV3</string>
<key>WindowString</key>
<string>100 100 700 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.bookmarks</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Proportion</key>
<string>100%</string>
</dic
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
t>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Bookmarks</string>
<key>ServiceClasses</key>
<array>
<string>PBXBookmarksModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>0</integer>
<key>WindowString</key>
<string>538 42 401 187 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.projectFormatConflicts</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Project Format Conflicts</string>
<key>ServiceClasses</key>
<array>
<string>XCProjectFormatConflictsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>0</integer>
<key>WindowContentMinSize</key>
<string>450 300</string>
<key>WindowString</key>
<string>50 850 472 307 0 0 1440 877</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.classBrowser</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>OptionsSetName</key>
<string>Hierarchy, all classes</string>
<key>PBXProjectModuleGUID</key>
<string>1CA6456E063B45B4001379D8</string>
<key>PBXProjectModuleLabel</key>
<string>Class Browser - NSObject</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ClassesFrame</key>
<string>{{0, 0}, {374, 96}}</string>
<key>ClassesTreeTableConfiguration</key>
<array>
<string>PBXClassNameColumnIdentifier</string>
<real>208</real>
<string>PBXClassBookColumnIde
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ntifier</string>
<real>22</real>
</array>
<key>Frame</key>
<string>{{0, 0}, {630, 331}}</string>
<key>MembersFrame</key>
<string>{{0, 105}, {374, 395}}</string>
<key>MembersTreeTableConfiguration</key>
<array>
<string>PBXMemberTypeIconColumnIdentifier</string>
<real>22</real>
<string>PBXMemberNameColumnIdentifier</string>
<real>216</real>
<string>PBXMemberTypeColumnIdentifier</string>
<real>97</real>
<string>PBXMemberBookColumnIdentifier</string>
<real>22</real>
</array>
<key>PBXModuleWindowStatusBarHidden2</key>
<integer>1</integer>
<key>RubberWindowFrame</key>
<string>385 179 630 352 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Proportion</key>
<string>332pt</string>
</dict>
</array>
<key>Proportion</key>
<string>332pt</string>
</dict>
</array>
<key>Name</key>
<string>Class Browser</string>
<key>ServiceClasses</key>
<array>
<string>PBXClassBrowserModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>0</integer>
<key>TableOfContents</key>
<array>
<string>1C0AD2AF069F1E9B00FABCE6</string>
<string>1C0AD2B0069F1E9B00FABCE6</string>
<string>1CA6456E063B45B4001379D8</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.classbrowser</string>
<key>WindowString</key>
<string>385 179 630 352 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C0AD2AF069F1E9B00FABCE6</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.refactoring</string>
<key>IncludeInToolsMenu</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>Geom
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
etryConfiguration</key>
<dict>
<key>Frame</key>
<string>{0, 0}, {500, 335}</string>
<key>RubberWindowFrame</key>
<string>{0, 0}, {500, 335}</string>
</dict>
<key>Module</key>
<string>XCRefactoringModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Refactoring</string>
<key>ServiceClasses</key>
<array>
<string>XCRefactoringModule</string>
</array>
<key>WindowString</key>
<string>200 200 500 356 0 0 1920 1200 </string>
</dict>
</array>
</dict>
</plist>
class Libxkbcommon < Formula
desc "Keyboard handling library"
homepage "https://xkbcommon.org/"
url "https://xkbcommon.org/download/libxkbcommon-1.0.1.tar.xz"
sha256 "ab68b25341c99f2218d7cf3dad459c1827f411219901ade05bbccbdb856b6c8d"
license "MIT"
head "https://github.com/xkbcommon/libxkbcommon.git"
bottle do
sha256 "9b9a3ca86b9a7319a3cef8b1edb6c17e5dc6199a83bf61877975f16065d8fa82" => :catalina
sha256 "10e46156eb6eece206f22f25e7662722490d56268cc54d34db1dab02aba8a3ca" => :mojave
sha256 "b38bfdf4dba9b991117087b0276ffa7d1221bafbefc6247cc504c79c2cbb3a91" => :high_sierra
end
depends_on "bison" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on :x11
def install
mkdir "build" do
system "meson", *std_meson_args, "-Denable-wayland=false", "-Denable-docs=false", ".."
system "ninja", "install", "-v"
end
end
test do
(testpath/"test.c").write <<~EOS
#include <stdlib.h>
#include <xkbcommon/xkbcommon.h>
int main() {
return (xkb_context_new(XKB_CONTEXT_NO_FLAGS) == NULL)
? EXIT_FAILURE
: EXIT_SUCCESS;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lxkbcommon",
"-o", "test"
system "./test"
end
end
<!-- /snippets/soci
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
al-sharing.liquid -->
<div class="social-sharing">
{% if settings.share_facebook %}
<a target="_blank" href="//www.facebook.com/sharer.php?u={{ shop.url | append: share_permalink }}">
{% include 'icon-facebook' %}
<span aria-hidden="true">{{ 'general.social.share_on_facebook' | t }}</span>
<span class="visually-hidden">{{ 'general.social.alt_text.share_on_facebook' | t }}</span>
</a>
{% endif %}
{% if settings.share_twitter %}
<a target="_blank" href="//twitter.com/share?text={{ share_title | url_param_escape }}&url={{ shop.url | append: share_permalink }}">
{% include 'icon-twitter' %}
<span aria-hidden="true">{{ 'general.social.share_on_twitter' | t }}</span>
<span class="visually-hidden">{{ 'general.social.alt_text.share_on_twitter' | t }}</span>
</a>
{% endif %}
{% if settings.share_pinterest %}
<a target="_blank" href="//pinterest.com/pin/create/button/?url={{ shop.url | append: share_permalink }}&media={{ share_image | img_url: '1024x1024' }}&description={{ share_title | url_param_escape }}">
{% include 'icon-pinterest' %}
<span aria-hidden="true">{{ 'general.social.share_on_pinterest' | t }}</span>
<span class="visually-hidden">{{ 'general.social.alt_text.share_on_pinterest' | t }}</span>
</a>
{% endif %}
</div>
---
-api-id: P:Windows.Devices.Bluetooth.BluetoothLEAppearanceCategories.Thermometer
-api-type: winrt property
-api-device-family-note: xbox
---
<!-- Property syntax
public ushort Thermometer { get; }
-->
# Windows.Devices.Bluetooth.BluetoothLEAppearanceCategories.Thermometer
## -description
Gets the thermometer appearance category code.
## -property-value
The appearance category code for a thermometer Bluetooth LE device.
## -remarks
## -examples
## -see-also
## -capabilities
bluetooth
<?php
namespace Home\Action;
/**
* ============================================================================
* WSTMall开源商城
* 官网地址:http://www.wstmall.net
* 联系QQ:707563272
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
* ============================================================================
* 属性控制器
*/
class AttributesAction extends BaseAction{
/**
* 跳到新增/编辑页面
*/
public function toEdit(){
$this->isShopLogin();
$m = D('Home/Attributes');
$object = array();
if((int)I('id',0)>0){
$object = $m->get();
}else{
$object = $m->getModel();
$object['catId'] = (int)I('catId');
}
$m = D('Home/AttributeCats');
$this->assign('cat',$m->get((int)$object['catId']));
$this->assign('object',$object);
$this->assign('umark',"AttributeCats");
$this->display('shops/attributes/edit');
}
/**
* 新增/修改操作
*/
public function edit(){
$this->isShopLogin();
$m = D('Home/Attributes');
$rs = array();
$rs = $m->edit();
$this->ajaxReturn($rs);
}
/**
* 删除操作
*/
public function del(){
$this->isShopLogin();
$m = D('Home/Attributes');
$rs = $m->del();
$this->ajaxReturn($rs);
}
/**
* 分页查询
*/
public function index(){
$this->isShopLogin();
$m = D('Home/AttributeCats');
$this->assign('cat',$m->get((int)I('catId')));
$this->assign('catList',$m->queryByList());
$m = D('Home/Attributes');
$list = $m->queryByPage();
$this->assign('List',$list);
$this->assign('umark',"AttributeCats");
$this->display("shops/attributes/list");
}
/**
* 获取列表
*/
public function getAttributes(){
$m = D('Home/Attributes');
$list = $m->queryByListForGoods();
$rs = array('status'=>1,'list'=>$list);
$this->ajaxReturn($rs);
}
};
?>
//===-- FindAllMacros.cpp - find all macros ---------------------*- 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
//
//===----------------------------------------------------------------------===//
#include "FindAllMacros.h"
#include "HeaderMapCollector.h"
#
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
include "PathConfig.h"
#include "SymbolInfo.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/Token.h"
#include "llvm/Support/Path.h"
namespace clang {
namespace find_all_symbols {
llvm::Optional<SymbolInfo>
FindAllMacros::CreateMacroSymbol(const Token &MacroNameTok,
const MacroInfo *info) {
std::string FilePath =
getIncludePath(*SM, info->getDefinitionLoc(), Collector);
if (FilePath.empty())
return llvm::None;
return SymbolInfo(MacroNameTok.getIdentifierInfo()->getName(),
SymbolInfo::SymbolKind::Macro, FilePath, {});
}
void FindAllMacros::MacroDefined(const Token &MacroNameTok,
const MacroDirective *MD) {
if (auto Symbol = CreateMacroSymbol(MacroNameTok, MD->getMacroInfo()))
++FileSymbols[*Symbol].Seen;
}
void FindAllMacros::MacroUsed(const Token &Name, const MacroDefinition &MD) {
if (!MD || !SM->isInMainFile(SM->getExpansionLoc(Name.getLocation())))
return;
if (auto Symbol = CreateMacroSymbol(Name, MD.getMacroInfo()))
++FileSymbols[*Symbol].Used;
}
void FindAllMacros::MacroExpands(const Token &MacroNameTok,
const MacroDefinition &MD, SourceRange Range,
const MacroArgs *Args) {
MacroUsed(MacroNameTok, MD);
}
void FindAllMacros::Ifdef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) {
MacroUsed(MacroNameTok, MD);
}
void FindAllMacros::Ifndef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MD) {
MacroUsed(MacroNameTok, MD);
}
void FindAllMacros::EndOfMainFile() {
Reporter->reportSymbols(SM->getFileEntryForID(SM->getMainFileID())->getName(),
FileSymbols);
FileSymbols.clear();
}
} // namespace find_all_symbols
} // namespace clang
// go run mksysnum.go https://gitweb.
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,dragonfly
package unix
const (
// SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
SYS_EXIT = 1 // { void exit(int rval); }
SYS_FORK = 2 // { int fork(void); }
SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); }
SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); }
SYS_OPEN = 5 // { int open(char *path, int flags, int mode); }
SYS_CLOSE = 6 // { int close(int fd); }
SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, struct rusage *rusage); } wait4 wait_args int
SYS_LINK = 9 // { int link(char *path, char *link); }
SYS_UNLINK = 10 // { int unlink(char *path); }
SYS_CHDIR = 12 // { int chdir(char *path); }
SYS_FCHDIR = 13 // { int fchdir(int fd); }
SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
SYS_GETPID = 20 // { pid_t getpid(void); }
SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
SYS_SETUID = 23 // { int setuid(uid_t uid); }
SYS_GETUID = 24 // { uid_t getuid(void); }
SYS_GETEUID = 25 // { uid_t geteuid(void); }
SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, int data); }
SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); }
SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); }
SYS_RECVFROM = 29 // { int recvfrom(int
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
s, caddr_t buf, size_t len, int flags, caddr_t from, int *fromlenaddr); }
SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); }
SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); }
SYS_ACCESS = 33 // { int access(char *path, int flags); }
SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
SYS_SYNC = 36 // { int sync(void); }
SYS_KILL = 37 // { int kill(int pid, int signum); }
SYS_GETPPID = 39 // { pid_t getppid(void); }
SYS_DUP = 41 // { int dup(int fd); }
SYS_PIPE = 42 // { int pipe(void); }
SYS_GETEGID = 43 // { gid_t getegid(void); }
SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); }
SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
SYS_GETGID = 47 // { gid_t getgid(void); }
SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
SYS_ACCT = 51 // { int acct(char *path); }
SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); }
SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); }
SYS_REBOOT = 55 // { int reboot(int opt); }
SYS_REVOKE = 56 // { int revoke(char *path); }
SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
SYS_CHROOT = 61 // { int chroot(char *path); }
SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
SYS_VFORK = 66 // { pid_t vfork(void); }
SYS_SBRK =
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
69 // { int sbrk(int incr); }
SYS_SSTK = 70 // { int sstk(int incr); }
SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); }
SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); }
SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
SYS_GETPGRP = 81 // { int getpgrp(void); }
SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
SYS_SWAPON = 85 // { int swapon(char *name); }
SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
SYS_DUP2 = 90 // { int dup2(int from, int to); }
SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); }
SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
SYS_FSYNC = 95 // { int fsync(int fd); }
SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); }
SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, caddr_t val, int valsize); }
SYS_LISTEN = 106 // { int listen(int s, int backlog); }
SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); }
SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, i
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
nt name, caddr_t val, int *avalsize); }
SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); }
SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); }
SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
SYS_RENAME = 128 // { int rename(char *from, char *to); }
SYS_FLOCK = 131 // { int flock(int fd, int how); }
SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); }
SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, int flags, caddr_t to, int tolen); }
SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); }
SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
SYS_RMDIR = 137 // { int rmdir(char *path); }
SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
SYS_SETSID = 147 // { int setsid(void); }
SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); }
SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); }
SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
SYS_UNAME = 164 // { int uname(struct utsname *name); }
SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
*rtp); }
SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
SYS_SETGID = 181 // { int setgid(gid_t gid); }
SYS_SETEGID = 182 // { int setegid(gid_t egid); }
SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, struct rlimit *rlp); } getrlimit __getrlimit_args int
SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int
SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); }
// SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int
SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); }
SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); }
SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int
SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); }
SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); }
SYS_UNDELETE = 205 // { int undelete(char *path); }
SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); }
SYS_GETPGID = 207 // { int getpgid(pid_t pid); }
SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, int timeout); }
SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); }
SYS_SEMGET
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
= 221 // { int semget(key_t key, int nsems, int semflg); }
SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, u_int nsops); }
SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); }
SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); }
SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, int shmflg); }
SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); }
SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); }
SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); }
SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, struct timespec *tp); }
SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); }
SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); }
SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); }
SYS_RFORK = 251 // { int rfork(int flags); }
SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, int timeout); }
SYS_ISSETUGID = 253 // { int issetugid(void); }
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); }
SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, u_int iovcnt, int flags, off_t offset); }
SYS_EXTPWR
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,u_int iovcnt, int flags, off_t offset); }
SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); }
SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
SYS_MODNEXT = 300 // { int modnext(int modid); }
SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); }
SYS_MODFNEXT = 302 // { int modfnext(int modid); }
SYS_MODFIND = 303 // { int modfind(const char *name); }
SYS_KLDLOAD = 304 // { int kldload(const char *file); }
SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); }
SYS_KLDFIND = 306 // { int kldfind(const char *file); }
SYS_KLDNEXT = 307 // { int kldnext(int fileid); }
SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); }
SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); }
SYS_GETSID = 310 // { int getsid(pid_t pid); }
SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); }
SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); }
SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); }
SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); }
SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); }
SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); }
SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); }
SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); }
SYS_YIELD = 321 // { int yield(void); }
SYS_MLOCKALL = 32
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
4 // { int mlockall(int how); }
SYS_MUNLOCKALL = 325 // { int munlockall(void); }
SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); }
SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); }
SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); }
SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); }
SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); }
SYS_SCHED_YIELD = 331 // { int sched_yield (void); }
SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); }
SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); }
SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); }
SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); }
SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); }
SYS_JAIL = 338 // { int jail(struct jail *jail); }
SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, sigset_t *oset); }
SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); }
SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); }
SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); }
SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); }
SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,siginfo_t *info, const struct timespec *timeout); }
SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,siginfo_t *info); }
SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); }
SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
acl *aclp); }
SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); }
SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); }
SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); }
SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); }
SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, acl_type_t type, struct acl *aclp); }
SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); }
SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); }
SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); }
SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); }
SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); }
SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
SYS_KQUEUE = 362 // { int kqueue(void); }
SYS_KEVENT = 363 // { int kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); }
SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); }
SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); }
SYS_SENDFILE
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
= 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr, off_t *sbytes, int flags); }
SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); }
SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); }
SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); }
SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); }
SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); }
SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); }
SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); }
SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); }
SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); }
SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); }
SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); }
SYS_CLOSEFROM = 474 // { int closefrom(int fd); }
SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); }
SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); }
SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); }
SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); }
SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, long *basep); }
SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); }
SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, int bytes); }
SYS_EXTACCEPT
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
= 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); }
SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); }
SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); }
SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); }
SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); }
SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, struct trapframe *tframe, struct vextframe *vframe); }
SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, int prot, int flags, int fd, off_t offset); }
SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, size_t len); }
SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, size_t len, int behav, off_t value); }
SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, size_t nbyte, int flags, off_t offset); }
SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, size_t nbyte, int flags, off_t offset); }
SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); }
SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); }
SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); }
SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); }
SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); }
SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sigmask); }
SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); }
SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); }
SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
, struct statvfs *buf); }
SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, struct statvfs *vbuf, long vbufsize, int flags); }
SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); }
SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, struct stat *sb, int flags); }
SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, int flags); }
SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, int flags); }
SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); }
SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, int flags); }
SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, mode_t mode, struct mq_attr *attr); }
SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); }
SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); }
SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat); }
SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat); }
SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, const struct sigevent *notification); }
SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); }
SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio); }
SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); }
SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); }
SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); }
SYS_IOPRIO_GET = 521 // { int ioprio_get(
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
int which, int who); }
SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); }
SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, char *new); }
SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); }
SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); }
SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); }
SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); }
SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); }
SYS_SWAPOFF = 529 // { int swapoff(char *name); }
SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, struct plistref *pref); }
SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flags); }
SYS_EACCESS = 532 // { int eaccess(char *path, int flags); }
SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
SYS_PROCCTL = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); }
SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, int flags, int atflags);}
SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); }
SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); }
SYS_ACCEPT4 = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); }
SYS_LWP_SETNAME = 542 // { int lwp_setname(lwpid_t tid, const char *name); }
SYS_PPOLL = 543 // { int ppoll(struct pollfd *fds, u_int nfds,
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
const struct timespec *ts, const sigset_t *sigmask); }
SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); }
SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); }
SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); }
)
/*
* Created on Jul 6, 2007
*
* Copyright (c) 2007, The JUNG Authors
*
* All rights reserved.
*
* This software is open-source under the BSD license; see either
* "license.txt" or
* https://github.com/jrtom/jung/blob/master/LICENSE for a description.
*/
package edu.uci.ics.jung.algorithms.scoring;
import java.util.Map;
/**
* An interface for algorithms that assign scores to edges.
*
* @param <E> the edge type
* @param <S> the score type
*/
public interface EdgeScorer<E, S> {
/**
* @param e the edge whose score is requested
* @return the algorithm's score for this edge
*/
public S getEdgeScore(E e);
public Map<E, S> edgeScores();
}
#include <stdio.h>
int main(){
char ch;
int count = 0;
while( (ch = getchar()) != EOF ){
count++;
if(ch == ' ' || ch == '\n'){
printf("%d ", count - 1);
count = 0;
}
}
return 0;
}
print ("Hello World")
print ("Hello World")
// 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(PTR
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ACE_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)))
}
# Contributing
We love contribution from everyone. Please open an issue if you encounter a bug, or have feature requests, or get a documentation issue, or anything.
Issues tagged with [help-wanted](https://github.com/depcheck/depcheck/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22help+wanted%22+) are desired to get support.
## Setup machine
Clone the repository, install the npm dependencies. That is all:
```sh
git clone https://github.com/depcheck/depcheck.git
cd depcheck
npm install
```
## Design
Please read and understand the [pluggable design](https://github.com/depcheck/depcheck/blob/master/doc/pluggable-design.md) if you are going to implement new features.
Basically, it divides the depcheck process into three steps handled by different components.
1. Walk the files under the depcheck directory, managed by depcheck itself.
2. Parse file to abstract syntax tree (aka, AST), handled by [parser](https://github.com/depcheck/depcheck/blob/master/doc/pluggable-design.md#parser). Besides, dependencies can be reported directly with [special parser](https://github.com/depcheck/depcheck/blob/master/doc/pluggable-design.md#special-parser).
3. Detect dependencies from AST, handled by [detector](https://github.com/depcheck/depcheck/blob/master/doc/pluggable-design.md#detector).
## Test driven
Run test:
```
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
sh
npm run test
```
All modification should have test to support it and avoid regression if possible.
Depcheck API and CLI test cases are defined in [spec.json](https://github.com/depcheck/depcheck/blob/master/test/spec.json). Special parsers test cases are defined in [their own test files](https://github.com/depcheck/depcheck/tree/master/test/special).
## Code style
Run code style check:
```sh
npm run lint
```
This project follows the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript), and is enforced by [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) preset.
It is a must to pass code style check when you do code modifications.
## Self check
Run self check commands:
```sh
npm run depcheck
npm run depcheck-json
```
To be a better tool, we decide to eat our own dog food. Self check will check the unused dependencies in this project.
It might get false alerts or regressions if introducing new features. Some could be skipped using `--ignores` parameter as a workaround, some should be fixed to avoid broking existing features. Please let us know if you get into such situation.
## Pull request
Please rebase to the top main branch when sending a pull request. Both Travis and AppVeyor check should be passed.
Test coverage is minor. However, if there is a huge effect on test coverage, we could take a look.
namespace ClassLib079
{
public class Class083
{
public static string Property => "ClassLib079";
}
}
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.
* Se
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
e the License for the specific language governing permissions and
* limitations under the License.
*/
class Main {
private static boolean $inline$false() { return false; }
/// CHECK-START: void Main.main(java.lang.String[]) dead_code_elimination (before)
/// CHECK-DAG: <<Const0:i\d+>> IntConstant 0
/// CHECK-DAG: <<Const1:i\d+>> IntConstant 1
/// CHECK-DAG: <<Phi:i\d+>> Phi [<<Const0>>,<<Add:i\d+>>] loop:{{B\d+}}
/// CHECK-DAG: InvokeVirtual [{{l\d+}},<<Phi>>] method_name:java.io.PrintStream.println
/// CHECK-DAG: <<Add>> Add [<<Phi>>,<<Const1>>]
public static void main(String[] args) {
if ($inline$false()) {
int x = 0;
while (true) {
System.out.println(x++);
}
}
}
}
/* sptcon.f -- translated by f2c (version 20061008).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the command line, as in
cc *.o -lf2c -lm
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
http://www.netlib.org/f2c/libf2c.zip
*/
#include "f2c.h"
#include "blaswrap.h"
/* Table of constant values */
static integer c__1 = 1;
/* Subroutine */ int sptcon_(integer *n, real *d__, real *e, real *anorm,
real *rcond, real *work, integer *info)
{
/* System generated locals */
integer i__1;
real r__1;
/* Local variables */
integer i__, ix;
extern /* Subroutine */ int xerbla_(char *, integer *);
extern integer isamax_(integer *, real *, integer *);
real ainvnm;
/* -- LAPACK routine (version 3.2) -- */
/* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/* November 2006 */
/* .. Scalar Arguments .. */
/* .. */
/* .. Array Arguments .. */
/* .. */
/* Purpose */
/* ======= */
/* SPTCON computes the reciprocal of the condition number (in the */
/*
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
1-norm) of a real symmetric positive definite tridiagonal matrix */
/* using the factorization A = L*D*L**T or A = U**T*D*U computed by */
/* SPTTRF. */
/* Norm(inv(A)) is computed by a direct method, and the reciprocal of */
/* the condition number is computed as */
/* RCOND = 1 / (ANORM * norm(inv(A))). */
/* Arguments */
/* ========= */
/* N (input) INTEGER */
/* The order of the matrix A. N >= 0. */
/* D (input) REAL array, dimension (N) */
/* The n diagonal elements of the diagonal matrix D from the */
/* factorization of A, as computed by SPTTRF. */
/* E (input) REAL array, dimension (N-1) */
/* The (n-1) off-diagonal elements of the unit bidiagonal factor */
/* U or L from the factorization of A, as computed by SPTTRF. */
/* ANORM (input) REAL */
/* The 1-norm of the original matrix A. */
/* RCOND (output) REAL */
/* The reciprocal of the condition number of the matrix A, */
/* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the */
/* 1-norm of inv(A) computed in this routine. */
/* WORK (workspace) REAL array, dimension (N) */
/* INFO (output) INTEGER */
/* = 0: successful exit */
/* < 0: if INFO = -i, the i-th argument had an illegal value */
/* Further Details */
/* =============== */
/* The method used is described in Nicholas J. Higham, "Efficient */
/* Algorithms for Computing the Condition Number of a Tridiagonal */
/* Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986. */
/* ===================================================================== */
/* .. Parameters .. */
/* .. */
/* .. Local Scalars .. */
/* .. */
/* .. External Functions .. */
/* .. */
/* .. External Subroutines .. */
/* .. */
/* .. Intrinsic Functions .. */
/* .. */
/* .. Executable Statements .. */
/* Test the input arguments. */
/* Parameter adjustments */
--work;
--e;
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
--d__;
/* Function Body */
*info = 0;
if (*n < 0) {
*info = -1;
} else if (*anorm < 0.f) {
*info = -4;
}
if (*info != 0) {
i__1 = -(*info);
xerbla_("SPTCON", &i__1);
return 0;
}
/* Quick return if possible */
*rcond = 0.f;
if (*n == 0) {
*rcond = 1.f;
return 0;
} else if (*anorm == 0.f) {
return 0;
}
/* Check that D(1:N) is positive. */
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
if (d__[i__] <= 0.f) {
return 0;
}
/* L10: */
}
/* Solve M(A) * x = e, where M(A) = (m(i,j)) is given by */
/* m(i,j) = abs(A(i,j)), i = j, */
/* m(i,j) = -abs(A(i,j)), i .ne. j, */
/* and e = [ 1, 1, ..., 1 ]'. Note M(A) = M(L)*D*M(L)'. */
/* Solve M(L) * x = e. */
work[1] = 1.f;
i__1 = *n;
for (i__ = 2; i__ <= i__1; ++i__) {
work[i__] = work[i__ - 1] * (r__1 = e[i__ - 1], dabs(r__1)) + 1.f;
/* L20: */
}
/* Solve D * M(L)' * x = b. */
work[*n] /= d__[*n];
for (i__ = *n - 1; i__ >= 1; --i__) {
work[i__] = work[i__] / d__[i__] + work[i__ + 1] * (r__1 = e[i__],
dabs(r__1));
/* L30: */
}
/* Compute AINVNM = max(x(i)), 1<=i<=n. */
ix = isamax_(n, &work[1], &c__1);
ainvnm = (r__1 = work[ix], dabs(r__1));
/* Compute the reciprocal condition number. */
if (ainvnm != 0.f) {
*rcond = 1.f / ainvnm / *anorm;
}
return 0;
/* End of SPTCON */
} /* sptcon_ */
; RUN: opt < %s -sccp -S | not grep select
@A = constant i32 10
define i712 @test1() {
%P = getelementptr i32, i32* @A, i32 0
%B = ptrtoint i32* %P to i64
%BB = and i64 %B, undef
%C = icmp sge i64 %BB, 0
%X = select i1 %C, i712 0, i712 1
ret i712 %X
}
define i712 @test2(i1 %C) {
%X = select i1 %C, i712 0, i712 undef
ret i712 %X
}
define({
zh: {
'Allowed values:' : '允許值:',
'Compare all with predecessor': '預先比較所有',
'compare changes to:' : '比較變更:',
'compared to'
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
: '對比',
'Default value:' : '默認值:',
'Description' : '描述',
'Field' : '字段',
'General' : '概括',
'Generated with' : '生成工具',
'Name' : '名稱',
'No response values.' : '無對應資料.',
'optional' : '選項',
'Parameter' : '參數',
'Permission:' : '允許:',
'Response' : '回應',
'Send' : '發送',
'Send a Sample Request' : '發送試用需求',
'show up to version:' : '顯示到版本:',
'Size range:' : '尺寸範圍:',
'Type' : '類型',
'url' : '網址'
}
});
// Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compatibility
import (
"github.com/hazelcast/hazelcast-go-client/serialization"
)
type aPortable struct {
bool bool
b byte
c uint16
d float64
s int16
f float32
i int32
l int64
str string
p serialization.Portable
booleans []bool
bytes []byte
chars []uint16
doubles []float64
shorts []int16
floats []float32
ints []int32
longs []int64
strings []string
portables []serialization.Portable
booleansNull []bool
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
bytesNull []byte
charsNull []uint16
doublesNull []float64
shortsNull []int16
floatsNull []float32
intsNull []int32
longsNull []int64
stringsNull []string
}
func (*aPortable) ClassID() int32 {
return portableClassID
}
func (*aPortable) FactoryID() int32 {
return portableFactoryID
}
func (p *aPortable) WritePortable(writer serialization.PortableWriter) error {
writer.WriteBool("bool", p.bool)
writer.WriteByte("b", p.b)
writer.WriteUInt16("c", p.c)
writer.WriteFloat64("d", p.d)
writer.WriteInt16("s", p.s)
writer.WriteFloat32("f", p.f)
writer.WriteInt32("i", p.i)
writer.WriteInt64("l", p.l)
writer.WriteUTF("str", p.str)
if p != nil {
writer.WritePortable("p", p)
} else {
writer.WriteNilPortable("p", portableFactoryID, portableClassID)
}
writer.WriteBoolArray("booleans", p.booleans)
writer.WriteByteArray("bs", p.bytes)
writer.WriteUInt16Array("cs", p.chars)
writer.WriteFloat64Array("ds", p.doubles)
writer.WriteInt16Array("ss", p.shorts)
writer.WriteFloat32Array("fs", p.floats)
writer.WriteInt32Array("is", p.ints)
writer.WriteInt64Array("ls", p.longs)
writer.WriteUTFArray("strs", p.strings)
writer.WritePortableArray("ps", p.portables)
writer.WriteBoolArray("booleansNull", p.booleansNull)
writer.WriteByteArray("bsNull", p.bytesNull)
writer.WriteUInt16Array("csNull", p.charsNull)
writer.WriteFloat64Array("dsNull", p.doublesNull)
writer.WriteInt16Array("ssNull", p.shortsNull)
writer.WriteFloat32Array("fsNull", p.floatsNull)
writer.WriteInt32Array("isNull", p.intsNull)
writer.WriteInt64Array("lsNull", p.longsNull)
writer.WriteUTFArray("strsNull", p.stringsNull)
return nil
}
func (p *aPortable) ReadPortable(reader serialization.PortableReader) error {
p.bool = reader.ReadBool("bool")
p.b = reader.ReadByte("b")
p.c = reader.ReadUInt16("c")
p.d = reader.ReadFloat64("d")
p.s = reader.ReadInt16("s")
p.f = reader.ReadFloat32("f")
p.i = reader.ReadInt32("i")
p.l = reader.ReadInt64("l")
p.str = reader.ReadUTF("str")
p.p = reader.ReadPortable("p")
p.
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
booleans = reader.ReadBoolArray("booleans")
p.bytes = reader.ReadByteArray("bs")
p.chars = reader.ReadUInt16Array("cs")
p.doubles = reader.ReadFloat64Array("ds")
p.shorts = reader.ReadInt16Array("ss")
p.floats = reader.ReadFloat32Array("fs")
p.ints = reader.ReadInt32Array("is")
p.longs = reader.ReadInt64Array("ls")
p.strings = reader.ReadUTFArray("strs")
p.portables = reader.ReadPortableArray("ps")
p.booleansNull = reader.ReadBoolArray("booleansNull")
p.bytesNull = reader.ReadByteArray("bsNull")
p.charsNull = reader.ReadUInt16Array("csNull")
p.doublesNull = reader.ReadFloat64Array("dsNull")
p.shortsNull = reader.ReadInt16Array("ssNull")
p.floatsNull = reader.ReadFloat32Array("fsNull")
p.intsNull = reader.ReadInt32Array("isNull")
p.longsNull = reader.ReadInt64Array("lsNull")
p.stringsNull = reader.ReadUTFArray("strsNull")
return nil
}
/*
* jPOS Project [http://jpos.org]
* Copyright (C) 2000-2020 jPOS Software SRL
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.jpos.iso.packager;
import java.io.IOException;
import org.jpos.iso.ISOComponent;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOMsg;
import org.jpos.iso.ISOPackager;
import org.jpos.util.Log;
import java.io.InputStream;
public class FSDPackager extends Log implements ISOPackager {
public byte[] pack (ISOComponent m) throws ISOException {
return m.pack ();
}
public int unpack
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
(ISOComponent m, byte[] b) throws ISOException {
return m.unpack (b);
}
public void unpack (ISOComponent m, InputStream in) throws ISOException {
try {
m.unpack (in);
} catch (IOException e) {
throw new ISOException (e);
}
}
public String getFieldDescription(ISOComponent m, int fldNumber) {
return null;
}
public ISOMsg createISOMsg() {
return new ISOMsg();
}
public String getDescription () {
return getClass().getName();
}
}
#ifndef QTSCRIPTSHELL_QWIDGETITEM_H
#define QTSCRIPTSHELL_QWIDGETITEM_H
#include <qlayoutitem.h>
#include <QtScript/qscriptvalue.h>
class QtScriptShell_QWidgetItem : public QWidgetItem
{
public:
QtScriptShell_QWidgetItem(QWidget* w);
~QtScriptShell_QWidgetItem();
Qt::Orientations expandingDirections() const;
QRect geometry() const;
bool hasHeightForWidth() const;
int heightForWidth(int arg__1) const;
void invalidate();
bool isEmpty() const;
QLayout* layout();
QSize maximumSize() const;
int minimumHeightForWidth(int arg__1) const;
QSize minimumSize() const;
void setGeometry(const QRect& arg__1);
QSize sizeHint() const;
QSpacerItem* spacerItem();
QWidget* widget();
QScriptValue __qtscript_self;
};
#endif // QTSCRIPTSHELL_QWIDGETITEM_H
#~ Copyright 2002-2007 Rene Rivera.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or copy at
#~ http://www.boost.org/LICENSE_1_0.txt)
# Clean env vars of any "extra" empty values.
for local v in ARGV CC CFLAGS LIBS
{
local values ;
for local x in $($(v))
{
if $(x) != ""
{
values += $(x) ;
}
}
$(v) = $(values) ;
}
# Platform related specifics.
if $(OS) = NT { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }
else { rule .path { return "$(<:J=/)" ; } }
. = "." ;
./ ?= "" ;
# Info about what we are building.
_VERSION_ = 3 1 19 ;
NAME = boost-jam
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
;
VERSION = $(_VERSION_:J=$(.)) ;
RELEASE = 1 ;
LICENSE = LICENSE_1_0 ;
# Generate development debug binaries?
if --debug in $(ARGV)
{
debug = true ;
}
if --profile in $(ARGV)
{
profile = true ;
}
# Attempt to generate and/or build the grammar?
if --grammar in $(ARGV)
{
grammar = true ;
}
# Do we need to add a default build type argument?
if ! ( --release in $(ARGV) ) &&
! ( --debug in $(ARGV) ) &&
! ( --profile in $(ARGV) )
{
ARGV += --release ;
}
# Enable, and configure, Python hooks.
with-python = ;
python-location = [ MATCH --with-python=(.*) : $(ARGV) ] ;
if $(python-location)
{
with-python = true ;
}
if $(with-python)
{
if $(OS) = NT
{
--python-include = [ .path $(python-location) include ] ;
--python-lib = ;
for local v in 27 26 25 24 23 22
{
--python-lib ?=
[ GLOB [ .path $(python-location) libs ] : "python$(v).lib" ]
[ GLOB $(python-location) [ .path $(python-location) libs ]
$(Path) $(PATH) $(path) : "python$(v).dll" ]
;
if ! $(--python-lib[2])
{
--python-lib = ;
}
}
--python-lib = $(--python-lib[1]) ;
}
else if $(OS) = MACOSX
{
--python-include = [ .path $(python-location) Headers ] ;
--python-lib = $(python-location) Python ;
}
else
{
--python-include = ;
--python-lib = ;
for local v in 2.7 2.6 2.5 2.4 2.3 2.2
{
local inc = [ GLOB [ .path $(python-location) include ] : python$(v) ] ;
local lib = [ GLOB [ .path $(python-location) lib ] : libpython$(v)* ] ;
if $(inc) && $(lib)
{
--python-include ?= $(inc) ;
--python-lib ?= $(lib[1]:D) python$(v) ;
}
}
}
}
if $(--python-include) || $(--python-lib)
{
ECHO "Python includes: $(--python-include:J=)" ;
ECHO "Python includes: $(--python-lib:J=)" ;
}
# Boehm GC?
i
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
f --gc in $(ARGV)
{
--boehm-gc = true ;
}
if $(--boehm-gc)
{
--extra-include += [ .path [ PWD ] "boehm_gc" "include" ] ;
}
# Duma?
if --duma in $(ARGV)
{
--duma = true ;
}
if $(--duma)
{
--extra-include += [ .path [ PWD ] "duma" ] ;
}
# An explicit root for the toolset? (trim spaces)
toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ;
{
local t = [ MATCH "[ ]*(.*)" : $(toolset-root:J=" ") ] ;
toolset-root = ;
while $(t)
{
t = [ MATCH "([^ ]+)([ ]*)(.*)" : $(t) ] ;
toolset-root += $(t[1]) ;
if $(t[3]) { toolset-root += $(t[2]) ; }
t = $(t[3]) ;
}
toolset-root = $(toolset-root:J="") ;
}
# Configure the implemented toolsets. These are minimal commands and options to
# compile the full Jam. When adding new toolsets make sure to add them to the
# "known" list also.
rule toolset ( name command .type ? : opt.out + : opt.define * : flags * : linklibs * )
{
.type ?= "" ;
tool.$(name)$(.type).cc ?= $(command) ;
tool.$(name)$(.type).opt.out ?= $(opt.out) ;
tool.$(name)$(.type).opt.define ?= $(opt.define) ;
tool.$(name)$(.type).flags ?= $(flags) ;
tool.$(name)$(.type).linklibs ?= $(linklibs) ;
if ! $(name) in $(toolsets) { toolsets += $(name) ; }
}
rule if-os ( os + : yes-opt * : no-opt * )
{ if $(os) in $(OS) { return $(yes-opt) ; } else { return $(no-opt) ; } }
rule opt ( type : yes-opt * : no-opt * )
{ if $(type) in $(ARGV) { return $(yes-opt) ; } else { return $(no-opt) ; } }
## HP-UX aCC compiler
toolset acc cc : "-o " : -D
: -Ae
[ opt --release : -s -O3 ]
[ opt --debug : -g -pg ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Borland C++ 5.5.x
toolset borland bcc32 : -e -n : /D
: -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib"
[ opt --release : -O2 -vi -w-inl ]
[ opt --debug : -v -Od -vi- ]
-I$(--python-include) -I$(--extra-include)
: $(--python-lib[1]) ;
## Generic Unix cc
if ! $(CC) { CC = cc ; }
toolse
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
t cc $(CC) : "-o " : -D
: $(CFLAGS)
[ opt --release : -s -O ]
[ opt --debug : -g ]
-I$(--python-include) -I$(--extra-include)
: $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Comeau C/C++ 4.x
toolset como como : "-o " : -D
: --c
[ opt --release : --inlining ]
[ opt --debug : --no_inlining ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Clang Linux 2.8+
toolset clang clang : "-o " : -D
: -Wno-unused -Wno-format
[ opt --release : -Os ]
[ opt --debug : -g -O0 -fno-inline ]
[ opt --profile : -finline-functions -g ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## MacOSX Darwin, using GCC 2.9.x, 3.x
toolset darwin cc : "-o " : -D
:
[ opt --release : -Wl,-x -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline -pg ]
[ opt --profile : -Wl,-x -O3 -finline-functions -g -pg ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## GCC 2.x, 3.x, 4.x
toolset gcc gcc : "-o " : -D
: -pedantic -fno-strict-aliasing
[ opt --release : [ opt --symbols : -g : -s ] -O3 ]
[ opt --debug : -g -O0 -fno-inline ]
[ opt --profile : -O3 -g -pg ]
-I$(--python-include) -I$(--extra-include) -Wno-long-long
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll
toolset gcc-nocygwin gcc : "-o " : -D
: -s -O3 -mno-cygwin
[ opt --release : -finline-functions ]
[ opt --debug : -s -O3 -fno-inline -pg ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Intel C/C++ for Darwin
toolset intel-darwin icc : "-o " : -D
:
[ opt --release : -O3 ]
[ opt --debug : -g -O0 -p ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Intel C/C++ for Linux
toolset intel-linux icc : "-o " : -D
:
[ opt --release : -Xlinker -s -O3 ]
[ opt --debug : -g -O
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
0 -p ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Intel C/C++ for Win32
toolset intel-win32 icl : /Fe : -D
: /nologo
[ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## KCC ?
toolset kcc KCC : "-o " : -D
:
[ opt --release : -s +K2 ]
[ opt --debug : -g +K0 ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Borland Kylix
toolset kylix bc++ : -o : -D
: -tC -q
[ opt --release : -O2 -vi -w-inl ]
[ opt --debug : -v -Od -vi- ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Metrowerks CodeWarrior 8.x
{
# Even though CW can compile all files at once, it crashes if it tries in
# the bjam case.
local mwcc ; if $(OS) != NT { mwcc = mwc$(OSPLAT:L) ; }
mwcc ?= mwcc ;
toolset metrowerks $(mwcc) : "-o " : -D
: -c -lang c -subsystem console -cwd include
[ opt --release : -runtime ss -opt full -inline all ]
[ opt --debug : -runtime ssd -opt none -inline off ]
-I$(--python-include) -I$(--extra-include) ;
toolset metrowerks $(mwcc) .link : "-o " :
: -subsystem console -lkernel32.lib -ladvapi32.lib -luser32.lib
[ opt --release : -runtime ss ]
[ opt --debug : -runtime ssd ]
: $(--python-lib[1]) ;
}
## MINGW GCC
toolset mingw gcc : "-o " : -D
:
[ opt --release : -s -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline -pg ]
-I$(--python-include) -I$(--extra-include)
: $(--python-lib[2]) ;
## MIPS Pro
toolset mipspro cc : "-o " : -D
:
[ opt --release : -s -O3 -g0 -INLINE:none ]
[ opt --debug : -g -O0 -INLINE ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Microsoft Visual Studio C++ 6.x
toolset msvc cl : /Fe /Fe /Fd
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
/Fo : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## QNX 6.x GCC 3.x/2.95.3
toolset qcc qcc : "-o " : -D
: -Wc,-pedantic -Wc,-fno-strict-aliasing
[ opt --release : [ opt --symbols : -g ] -O3 -Wc,-finline-functions ]
[ opt --debug : -g -O0 -Wc,-fno-inline ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Qlogic Pathscale 2.4
toolset pathscale pathcc : "-o " : -D
:
[ opt --release : -s -Ofast -O3 ]
[ opt --debug : -g ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Portland Group Pgi 6.2
toolset pgi pgcc : "-o " : -D
:
[ opt --release : -s -O3 ]
[ opt --debug : -g ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Sun Workshop 6 C++
toolset sun cc : "-o " : -D
:
[ opt --release : -s -xO3 ]
[ opt --debug : -g ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Sun Workshop 6 C++ (old alias)
toolset sunpro cc : "-o " : -D
:
[ opt --release : -s -xO3 ]
[ opt --debug : -g ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Compaq Alpha CXX
toolset tru64cxx cc : "-o " : -D
:
[ opt --release : -s -O5 -inline speed ]
[ opt --debug : -g -O0 -pg ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## IBM VisualAge C++ or IBM XL C/C++ for Aix or IBM XL C/C++ for Linux (Big endian)
toolset vacpp xlc : "-o " : -D
:
[ opt --release : -s -O3 -qstrict -qinline ]
[ opt --debug : -g -qNOOPTimize -qnoinline -pg ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) [ if-os AIX : -bmaxdata:0x40000000 ] ;
## IBM XL C/C++ for Lin
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ux (little endian)
toolset xlcpp xlC : "-o " : -D
: -Wno-unused -Wno-format
[ opt --release : -s ]
[ opt --debug : -g -qNOOPTimize -qnoinline -pg ]
-I$(--python-include) -I$(--extra-include)
: -L$(--python-lib[1]) -l$(--python-lib[2]) ;
## Microsoft Visual C++ .NET 7.x
toolset vc7 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## Microsoft Visual C++ 2005
toolset vc8 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## Microsoft Visual C++ 2008
toolset vc9 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## Microsoft Visual C++ 2010
toolset vc10 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## Microsoft Visual C++ 2012
toolset vc11 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
## Microsoft Visual C++ 2013
toolset vc12 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.li
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
b advapi32.lib user32.lib $(--python-lib[1]) ;
toolset vc14 cl : /Fe /Fe /Fd /Fo : -D
: /nologo
[ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
[ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
-I$(--python-include) -I$(--extra-include)
: kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;
# First set the build commands and options according to the
# preset toolset.
toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
if ! $(toolset)
{
# For some reason, the following test does not catch empty toolset.
ECHO "###" ;
ECHO "###" No toolset specified. Please use --toolset option. ;
ECHO "###" ;
ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
EXIT "###" ;
}
if ! $(toolset) in $(toolsets)
{
ECHO "###" ;
ECHO "###" Unknown toolset: $(toolset) ;
ECHO "###" ;
ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
EXIT "###" ;
}
--cc = $(tool.$(toolset).cc) ;
if $(tool.$(toolset).opt.out[2])
{
if $(tool.$(toolset).opt.out[1]) = $(tool.$(toolset).opt.out[2])
{
--out = $(tool.$(toolset).opt.out[1]) ;
--dir = $(tool.$(toolset).opt.out[3-]) ;
}
else
{
--bin = $(tool.$(toolset).opt.out[1]) ;
--dir = $(tool.$(toolset).opt.out[2-]) ;
}
}
else
{
--out = $(tool.$(toolset).opt.out) ;
}
--def = $(tool.$(toolset).opt.define) ;
--flags = $(tool.$(toolset).flags) ;
--defs = $(tool.$(toolset).defines) ;
--libs = $(tool.$(toolset).linklibs) ;
if $(tool.$(toolset).link.cc)
{
--link = $(tool.$(toolset).link.cc) ;
if $(tool.$(toolset).link.opt.out[2])
{
if $(tool.$(toolset).link.opt.out[1]) = $(tool.$(toolset).link.opt.out[2])
{
--link-out = $(tool.$(toolset).link.opt.out[1]) ;
--link-dir = $(tool.$(toolset).link.opt.out[3-]) ;
}
else
{
--link-bin = $(tool.$(toolset).link.opt.out[1]) ;
--link-dir = $(tool.$(toolset).link.opt.out[2-]) ;
}
}
else
{
--link-out = $(tool.$(toolset).link.
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
opt.out) ;
}
--link-def = $(tool.$(toolset).link.opt.define) ;
--link-flags = $(tool.$(toolset).link.flags) ;
--link-defs = $(tool.$(toolset).link.defines) ;
--link-libs = $(tool.$(toolset).link.linklibs) ;
}
# Put executables in platform-specific subdirectory.
locate-target = $(LOCATE_TARGET) ;
if $(OSPLAT)
{
locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else
{
locate-target ?= bin$(.)$(OS:L) ;
platform = $(OS:L) ;
}
if $(debug)
{
locate-target = [ .path $(locate-target)$(.)debug ] ;
}
if $(profile)
{
locate-target = [ .path $(locate-target)$(.)profile ] ;
}
else
{
locate-target = [ .path $(locate-target) ] ;
}
if --show-locate-target in $(ARGV)
{
ECHO $(locate-target) ;
}
# We have some different files for UNIX, and NT.
jam.source =
command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c
hash.c hcache.c headers.c hdrmacro.c jam.c jambase.c jamgram.c lists.c
make.c make1.c mem.c object.c option.c output.c parse.c pathsys.c regexp.c
rules.c scan.c search.c subst.c w32_getreg.c timestamp.c variable.c
modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c
[ .path modules set.c ] [ .path modules path.c ] [ .path modules regex.c ]
[ .path modules property-set.c ] [ .path modules sequence.c ] [ .path modules order.c ] ;
if $(OS) = NT
{
jam.source += execnt.c filent.c pathnt.c ;
}
else
{
jam.source += execunix.c fileunix.c pathunix.c ;
}
# Debug assertions, or not.
if ! $(debug) || --noassert in $(ARGV)
{
--defs += NDEBUG ;
}
# Enable some optional features.
--defs += OPT_HEADER_CACHE_EXT ;
--defs += OPT_GRAPH_DEBUG_EXT ;
--defs += OPT_SEMAPHORE ;
--defs += OPT_AT_FILES ;
--defs += OPT_DEBUG_PROFILE ;
# Bug fixes
--defs += OPT_FIX_TARGET_VARIABLES_EXT ;
#~ --defs += OPT_NO_EXTERNAL_VARIABLE_SPLIT ;
# Improvements
--defs += OPT_IMPROVED_PATIENCE_EXT ;
# Use Boehm GC memory allocator?
if $(--boehm-gc)
{
--defs += OPT_BOEHM_GC ;
if $(debug)
{
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
--defs += GC_DEBUG ;
}
}
if $(--duma)
{
--defs += OPT_DUMA ;
}
if ( $(OS) = NT ) && ! NT in $(--defs)
{
--defs += NT ;
}
--defs += YYSTACKSIZE=5000 ;
if $(with-python)
{
--defs += HAVE_PYTHON ;
}
if $(debug)
{
--defs += BJAM_NEWSTR_NO_ALLOCATE ;
}
# The basic symbolic targets...
NOTFILE all clean dist ;
ALWAYS clean ;
# Utility rules and actions...
rule .clean
{
[DELETE] clean : $(<) ;
}
if $(OS) = NT { actions piecemeal together existing [DELETE] {
del /F /Q "$(>)"
} }
if $(UNIX) = true { actions piecemeal together existing [DELETE] {
rm -f "$(>)"
} }
if $(OS) = NT {
--chmod+w = "attrib -r " ;
}
if $(UNIX) = true {
--chmod+w = "chmod +w " ;
}
rule .mkdir
{
NOUPDATE $(<) ;
if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; }
if ! $(md<$(<)>) { [MKDIR] $(<) ; md<$(<)> = - ; }
}
if $(OS) = NT { actions [MKDIR] {
md "$(<)"
} }
if $(UNIX) = true { actions [MKDIR] {
mkdir "$(<)"
} }
rule .exe
{
local exe = $(<) ;
if $(OS) = NT || ( $(UNIX) = true && $(OS) = CYGWIN ) { exe = $(exe:S=.exe) ; }
LOCATE on $(exe) = $(locate-target) ;
DEPENDS all : $(exe) ;
.mkdir $(locate-target) ;
if $(--link)
{
local objs ;
for local s in $(>)
{
# Translate any subdir elements into a simple file name.
local o = [ MATCH "([^/]+)[/]?(.+)" : $(s) ] ;
o = $(o:J=_) ;
o = $(o:S=.o) ;
objs += $(o) ;
LOCATE on $(o) = $(locate-target) ;
DEPENDS $(exe) : $(o) ;
DEPENDS $(o) : $(s) ;
DEPENDS $(o) : $(locate-target) ;
[COMPILE] $(o) : $(s) ;
.clean $(o) ;
}
DEPENDS $(exe) : $(objs) ;
DEPENDS $(exe) : $(locate-target) ;
[COMPILE.LINK] $(exe) : $(objs) ;
.clean $(exe) ;
}
else
{
DEPENDS $(exe) : $(>) ;
DEPENDS $(exe) : $(locate-target) ;
[COMPILE] $(exe) : $(>) ;
.clean $(exe) ;
}
return $(exe) ;
}
if ! $
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
(--def[2]) { actions [COMPILE] {
"$(--cc)" "$(--bin)$(<:D=)" "$(--dir)$(<:D)$(./)" $(--out)$(<) "$(--def)$(--defs)" "$(--flags)" "$(>)" "$(--libs)"
} }
else { actions [COMPILE] {
"$(--cc)" "$(--bin)$(<:D=)" "$(--dir)$(<:D)$(./)" $(--out)$(<) "$(--def[1])$(--defs:J=$(--def[2]))$(--def[3])" "$(--flags)" "$(>)" "$(--libs)"
} }
actions [COMPILE.LINK] {
"$(--link)" "$(--link-bin)$(<:D=)" "$(--link-dir)$(<:D)$(./)" "$(--link-out)$(<)" "$(--link-def)$(--link-defs)" "$(--link-flags)" "$(>)" "$(--link-libs)"
}
rule .link
{
DEPENDS all : $(<) ;
DEPENDS $(<) : $(>) ;
[LINK] $(<) : $(>) ;
.clean $(<) ;
}
if $(OS) = NT { actions [LINK] {
copy "$(>)" "$(<)"
} }
if $(UNIX) = true { actions [LINK] {
ln -fs "$(>)" "$(<)"
} }
rule .copy
{
DEPENDS all : $(<) ;
DEPENDS $(<) : $(>) ;
[COPY] $(<) : $(>) ;
.clean $(<) ;
}
# Will be redefined later.
actions [COPY]
{
}
rule .move
{
DEPENDS $(<) : $(>) ;
[MOVE] $(<) : $(>) ;
}
if $(OS) = NT { actions [MOVE] {
del /f "$(<)"
rename "$(>)" "$(<)"
} }
if $(UNIX) = true { actions [MOVE] {
mv -f "$(>)" "$(<)"
} }
# Generate the grammar tokens table, and the real yacc grammar.
rule .yyacc
{
local exe = [ .exe yyacc : yyacc.c ] ;
NOUPDATE $(exe) ;
DEPENDS $(<) : $(exe) $(>) ;
LEAVES $(<) ;
yyacc.exe on $(<) = $(exe:R=$(locate-target)) ;
[YYACC] $(<) : $(>) ;
}
actions [YYACC] {
$(--chmod+w)$(<[1])
$(--chmod+w)$(<[2])
"$(yyacc.exe)" "$(<)" "$(>)"
}
if $(grammar)
{
.yyacc jamgram.y jamgramtab.h : jamgram.yy ;
}
else if $(debug)
{
.exe yyacc : yyacc.c ;
}
# How to build the grammar.
if $(OS) = NT
{
SUFEXE = .exe ;
# try some other likely spellings...
PATH ?= $(Path) ;
PATH ?= $(path) ;
}
SUFEXE ?= "" ;
yacc ?= [ GLOB $(PATH) : yacc$(SUFEXE) ] ;
yacc ?= [ GLOB $(PATH) : bison$(SUFEXE) ] ;
yacc ?= [ GLOB "$(ProgramFiles:J= )\\GnuWin32\\bin"
"C:\\Program Files\\GnuWin32\\bin" : bison$(SUFEXE) ] ;
yacc = $(yacc[1]) ;
switch $(yacc:D=:S=)
{
case bison : ya
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
cc += -d --yacc ;
case yacc : yacc += -d ;
}
if $(debug) && $(yacc)
{
yacc += -t -v ;
}
yacc += $(YACCFLAGS) ;
rule .yacc
{
DEPENDS $(<) : $(>) ;
LEAVES $(<) ;
[YACC] $(<) : $(>) ;
}
if $(OS) = NT { actions [YACC] {
"$(yacc)" "$(>)"
if not errorlevel 1 (
del /f "$(<[1])"
rename y.tab$(<[1]:S) "$(<[1])"
del /f $(<[2])
rename y.tab$(<[2]:S) "$(<[2])"
) else set _error_ =
} }
if $(UNIX) = true { actions [YACC] {
if ` "$(yacc)" "$(>)" ` ; then
mv -f y.tab$(<[1]:S) "$(<[1])"
mv -f y.tab$(<[2]:S) "$(<[2])"
else
exit 1
fi
} }
if $(grammar) && ! $(yacc)
{
EXIT Could not find the 'yacc' tool, and therefore can not build the
grammar. ;
}
if $(grammar) && $(yacc)
{
.yacc jamgram.c jamgram.h : jamgram.y ;
}
# How to build the compiled in jambase.
rule .mkjambase
{
local exe = [ .exe mkjambase : mkjambase.c ] ;
DEPENDS $(<) : $(exe) $(>) ;
LEAVES $(<) ;
mkjambase.exe on $(<) = $(exe:R=$(locate-target)) ;
[MKJAMBASE] $(<) : $(>) ;
}
actions [MKJAMBASE] {
$(--chmod+w)$(<)
$(mkjambase.exe) "$(<)" "$(>)"
}
if $(debug)
{
.mkjambase jambase.c : Jambase ;
}
# How to build Jam.
rule .jam
{
$(>).exe = [ .exe $(>) : $(jam.source) ] ;
DEPENDS all : $($(>).exe) ;
# Make a copy under the old name.
$(<).exe = $(<:S=$($(>).exe:S)) ;
LOCATE on $($(<).exe) = $(locate-target) ;
.copy $($(<).exe) : $($(>).exe) ;
DEPENDS all : $($(<).exe) ;
}
.jam bjam : b2 ;
# Scan sources for header dependencies.
#
# In order to keep things simple, we made a slight compromise here - we only
# detect changes in headers included relative to the current folder as opposed
# to those included from somewhere on the include path.
rule .scan ( targets + )
{
HDRRULE on $(targets) = .hdr.scan ;
HDRSCAN on $(targets) = "^[ \t]*#[ \t]*include[ \t]*\"([^\"]*)\".*$" ;
}
rule .hdr.scan ( target : includes * : binding )
{
local target-path = [ NORMALIZE_PATH $(binding:D) ] ;
# Ext
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ra grist provides target name uniqueness when referencing same name
# header files from different folders.
local include-targets = <$(target-path)>$(includes) ;
NOCARE $(include-targets) ;
INCLUDES $(target) : $(include-targets) ;
SEARCH on $(include-targets) = $(target-path) ;
ISFILE $(include-targets) ;
.scan $(include-targets) ;
}
.scan $(jam.source) ;
# Distribution making from here on out. Assumes that the docs are already built
# as HTML at ../doc/html. Otherwise they will not be included in the built
# distribution archive.
dist.license =
[ GLOB . : $(LICENSE).txt ]
;
dist.license = $(dist.license:D=)
[ GLOB [ .path .. .. .. ] : $(LICENSE).txt ]
[ GLOB [ .path .. boost ] : $(LICENSE).txt ] ;
dist.docs =
[ GLOB . : *.png *.css *.html ]
;
dist.docs = $(dist.docs:D=)
[ GLOB [ .path images ] : *.png ]
[ GLOB [ .path jam ] : *.html ]
;
dist.source =
[ GLOB . : *.c *.h ]
;
dist.source = $(dist.source:D=)
$(dist.license[1])
$(dist.docs)
build.jam build.bat build.sh
Jambase
jamgram.y jamgram.yy
[ .path modules set.c ]
[ .path modules path.c ]
[ .path modules regex.c ]
[ .path modules property-set.c ]
[ .path modules sequence.c ]
[ .path modules order.c ]
[ GLOB [ .path boehm_gc ] : * ]
[ GLOB [ .path boehm_gc include ] : * ]
[ GLOB [ .path boehm_gc include private ] : * ]
[ GLOB [ .path boehm_gc cord ] : * ]
[ GLOB [ .path boehm_gc Mac_files ] : * ]
[ GLOB [ .path boehm_gc tests ] : * ]
[ GLOB [ .path boehm_gc doc ] : * ]
;
dist.bin =
bjam
;
dist.bin =
$(dist.license[1])
$(dist.bin:S=$(bjam.exe:S))
;
if $(OS) = NT
{
zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7z.exe" ] ;
zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7zn.exe" ] ;
zip ?= [ GLOB $(PATH) : zip.exe ] ;
zip ?= zip ;
zip = $(zip[1]) ;
switch $(zip:D=:S=)
{
case 7z* : zip += a -r -tzip -mx=9 ;
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
case zip : zip += -9r ;
}
actions piecemeal [PACK] {
"$(zip)" "$(<)" "$(>)"
}
actions piecemeal [ZIP] {
"$(zip)" "$(<)" "$(>)"
}
actions piecemeal [COPY] {
copy /Y "$(>)" "$(<)" >NUL:
}
}
if $(UNIX) = true
{
tar ?= [ GLOB $(PATH) : star bsdtar tar ] ;
tar = $(tar[1]) ;
switch $(tar:D=:S=)
{
case star : tar += -c artype=pax -D -d -to-stdout ;
case * : tar += -c -f - ;
}
actions [PACK] {
"$(tar)" "$(>)" | gzip -c9 > "$(<)"
}
#~ actions [PACK] {
#~ tar cf "$(<:S=.tar)" "$(>)"
#~ }
actions [ZIP] {
gzip -c9 "$(>)" > "$(<)"
}
actions [COPY] {
cp -Rpf "$(>)" "$(<)"
}
}
# The single binary, compressed.
rule .binary
{
local zip ;
if $(OS) = NT { zip = $($(<).exe:S=.zip) ; }
if $(UNIX) = true { zip = $($(<).exe:S=.tgz) ; }
zip = $(zip:S=)-$(VERSION)-$(RELEASE)-$(platform)$(zip:S) ;
DEPENDS $(zip) : $($(<).exe) ;
DEPENDS dist : $(zip) ;
#~ LOCATE on $(zip) = $(locate-target) ;
if $(OS) = NT { [ZIP] $(zip) : $($(<).exe) ; }
if $(UNIX) = true { [PACK] $(zip) : $($(<).exe) ; }
.clean $(zip) ;
}
# Package some file.
rule .package ( dst-dir : src-files + )
{
local dst-files ;
local src-files-actual ;
for local src-path in $(src-files)
{
if ! [ GLOB $(src-path:P) : $(src-path:B) ] || [ CHECK_IF_FILE $(src-path) ]
{
local src-subdir = $(src-path:D) ;
local src-file = $(src-path) ;
while $(src-subdir:D) { src-subdir = $(src-subdir:D) ; }
if $(src-subdir) = ".."
{
src-file = $(src-file:D=) ;
}
dst-files += $(src-file:R=$(dst-dir)) ;
src-files-actual += $(src-path) ;
}
}
local pack ;
if $(OS) = NT { pack = $(dst-dir).zip ; }
if $(UNIX) = true { pack = $(dst-dir).tgz ; }
DEPENDS dist : $(pack) ;
DEPENDS $(pack) : $(dst-files) ;
local dst-files-queue = $(dst-files)
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
;
for local src-path in $(src-files-actual)
{
local dst-file = $(dst-files-queue[1]) ;
dst-files-queue = $(dst-files-queue[2-]) ;
DEPENDS $(dst-file) : $(src-path) $(dst-file:D) ;
.mkdir $(dst-file:D) ;
[COPY] $(dst-file) : $(src-path) ;
.clean $(dst-file) ;
}
[PACK] $(pack) : $(dst-files) ;
.clean $(pack) ;
}
# RPM distro file.
rpm-tool = [ GLOB $(PATH) : "rpmbuild" ] ;
rpm-tool ?= [ GLOB $(PATH) : "rpm" ] ;
rpm-tool = $(rpm-tool[1]) ;
rule .rpm ( name : source )
{
local rpm-arch ;
switch $(OSPLAT)
{
case X86 : rpm-arch ?= i386 ;
case PPC : rpm-arch ?= ppc ;
case AXP : rpm-arch ?= alpha ;
# no guaranty for these:
case IA64 : rpm-arch ?= ia64 ;
case ARM : rpm-arch ?= arm ;
case SPARC : rpm-arch ?= sparc ;
case * : rpm-arch ?= other ;
}
local target = $(name)-rpm ;
NOTFILE $(target) ;
DEPENDS dist : $(target) ;
DEPENDS $(target) : $(name).$(rpm-arch).rpm $(name).src.rpm ;
DEPENDS $(name).$(rpm-arch).rpm : $(source) ;
DEPENDS $(name).src.rpm : $(name).$(rpm-arch).rpm ;
docs on $(target) = $(dist.docs:J=" ") ;
arch on $(target) = $(rpm-arch) ;
if $(rpm-arch) = ppc { target-opt on $(target) = --target= ; }
else { target-opt on $(target) = "--target " ; }
[RPM] $(target) : $(source) ;
.clean $(name).$(rpm-arch).rpm $(name).src.rpm ;
}
actions [RPM] {
set -e
export BOOST_JAM_TOOLSET="$(toolset)"
$(rpm-tool) -ta $(target-opt)$(arch) $(>) | tee rpm.out
cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` .
rm -f rpm.out
}
# The distribution targets. Do not bother with them unless this is a
# distribution build.
if dist in $(ARGV)
{
#~ .binary bjam ;
.package $(NAME)-$(VERSION) : $(dist.source) ;
.package $(NAME)-$(VERSION)-$(RELEASE)-$(platform) : $(dist.bin) ;
if $(rpm-tool)
{
#~ .rpm $(NAME)-$(VERSION)-$(RELEASE) : $(NAME)-$(VERSION).t
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
gz ;
}
}
/*****************************************************************
|
| Platinum - Managed DeviceData
|
| Copyright (c) 2004-2010, Plutinosoft, LLC.
| All rights reserved.
| http://www.plutinosoft.com
|
| 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.
|
| OEMs, ISVs, VARs and other distributors that combine and
| distribute commercially licensed software with Platinum software
| and do not wish to distribute the source code for the commercially
| licensed software under version 2, or (at your option) any later
| version, of the GNU General Public License (the "GPL") must enter
| into a commercial license agreement with Plutinosoft, LLC.
|
| 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; see the file LICENSE.txt. If not, write to
| the Free Software Foundation, Inc.,
| 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
| http://www.gnu.org/licenses/gpl-2.0.html
|
****************************************************************/
#pragma once
namespace Platinum
{
/*----------------------------------------------------------------------
| DeviceIcon
+---------------------------------------------------------------------*/
public ref class DeviceIcon : public ManagedWrapper<PLT_DeviceIcon>
{
public:
// properties
PLATINUM_MANAGED_IMPLEMENT_STRING_PROPERTY(String^, MimeType, m_MimeType, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_PROPERTY(Int32, Width, m_Width, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_PROPERTY(Int32, Height, m_Height, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_PROPERTY(Int32, De
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
pth, m_Depth, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_STRING_PROPERTY(String^, UrlPath, m_UrlPath, m_pHandle);
internal:
DeviceIcon(PLT_DeviceIcon& native) :
ManagedWrapper<PLT_DeviceIcon>(native)
{}
public:
DeviceIcon() :
ManagedWrapper<PLT_DeviceIcon>()
{}
DeviceIcon(String^ mimeType, Int32 width, Int32 height, Int32 depth, String^ urlPath) :
ManagedWrapper<PLT_DeviceIcon>()
{
MimeType = mimeType;
Width = width;
Height = height;
Depth = depth;
UrlPath = urlPath;
}
};
}
// marshal wrapper
PLATINUM_MANAGED_MARSHAL_AS(Platinum::DeviceIcon, PLT_DeviceIcon);
namespace Platinum
{
ref class Service;
/*----------------------------------------------------------------------
| DeviceData
+---------------------------------------------------------------------*/
public ref class DeviceData
{
protected:
PLT_DeviceDataReference* m_pHandle;
public:
property String^ Description
{
String^ get()
{
NPT_String s;
Helpers::ThrowOnError((*m_pHandle)->GetDescription(s));
return gcnew String(s);
}
}
property Uri^ DescriptionUrl
{
Uri^ get()
{
return marshal_as<Uri^>((*m_pHandle)->GetDescriptionUrl());
}
}
property Uri^ UrlBase
{
Uri^ get()
{
return marshal_as<Uri^>((*m_pHandle)->GetURLBase());
}
}
property Uri^ IconUrl
{
Uri^ get()
{
return marshal_as<Uri^>((*m_pHandle)->GetIconUrl());
}
}
property TimeSpan^ LeaseTime
{
TimeSpan^ get()
{
return marshal_as<TimeSpan>((*m_pHandle)->GetLeaseTime());
}
}
property String^ UUID
{
String^ get()
{
return gcnew String((*m_pHandle)->GetUUID());
}
}
property String^ FriendlyName
{
String^ get()
{
return gcnew String((*m_pHandle)->GetFriendlyName());
}
}
property String^ TypeName
{
String^ get()
{
return gcnew String((*m_pHandle)->GetType());
}
}
property String^ ModelDescription
{
String^ get()
{
return gcnew String((*m_pHandle)->GetModelDescription());
}
}
property String^ ParentUUID
{
String^ get(
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
)
{
return gcnew String((*m_pHandle)->GetParentUUID());
}
}
property IEnumerable<Service^>^ Services
{
IEnumerable<Service^>^ get();
}
property IEnumerable<DeviceData^>^ EmbeddedDevices
{
IEnumerable<DeviceData^>^ get();
}
internal:
property PLT_DeviceDataReference& Handle
{
PLT_DeviceDataReference& get()
{
return *m_pHandle;
}
}
public:
DeviceData^ FindEmbeddedDeviceByType(String^ type);
Service^ FindServiceById(String^ serviceId);
Service^ FindServiceByType(String^ type);
Service^ FindServiceBySCPDURL(Uri^ url);
Service^ FindServiceByControlURL(Uri^ url);
Service^ FindServiceByEventSubURL(Uri^ url);
public:
virtual Boolean Equals(Object^ obj) override
{
if (obj == nullptr)
return false;
if (!this->GetType()->IsInstanceOfType(obj))
return false;
return (*m_pHandle == *((DeviceData^)obj)->m_pHandle);
}
internal:
DeviceData(PLT_DeviceDataReference& devData)
{
if (devData.IsNull())
throw gcnew ArgumentNullException("devData");
m_pHandle = new PLT_DeviceDataReference(devData);
}
DeviceData(PLT_DeviceData& devData)
{
m_pHandle = new PLT_DeviceDataReference(&devData);
}
public:
~DeviceData()
{
// clean-up managed
// clean-up unmanaged
this->!DeviceData();
}
!DeviceData()
{
// clean-up unmanaged
if (m_pHandle != 0)
{
delete m_pHandle;
m_pHandle = 0;
}
}
};
}
// marshal wrapper
PLATINUM_MANAGED_MARSHAL_AS(Platinum::DeviceData, PLT_DeviceData);
PLATINUM_MANAGED_MARSHAL_AS(Platinum::DeviceData, PLT_DeviceDataReference);
gcr.io/google_containers/kube-controller-manager:v1.13.0-alpha.3
package linkedql
import (
"encoding/json"
"fmt"
"github.com/cayleygraph/cayley/graph"
"github.com/cayleygraph/cayley/query/path"
"github.com/cayleygraph/quad"
"github.com/cayleygraph/quad/voc"
)
// PropertyPathI is an interface to be used where a path of properties is expected.
type PropertyPathI interface {
BuildPath(qs graph.QuadStore, ns *voc.
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
Namespaces) (*path.Path, error)
}
// PropertyPath is a struct wrapping PropertyPathI
type PropertyPath struct {
PropertyPathI
}
// NewPropertyPath constructs a new PropertyPath
func NewPropertyPath(p PropertyPathI) *PropertyPath {
return &PropertyPath{PropertyPathI: p}
}
// Description implements Step.
func (*PropertyPath) Description() string {
return "PropertyPath is a string, multiple strins or path describing a set of properties"
}
// UnmarshalJSON implements RawMessage
func (p *PropertyPath) UnmarshalJSON(data []byte) error {
var errors []error
var propertyIRIs PropertyIRIs
err := json.Unmarshal(data, &propertyIRIs)
if err == nil {
p.PropertyPathI = propertyIRIs
return nil
}
errors = append(errors, err)
var propertyIRIStrings PropertyIRIStrings
err = json.Unmarshal(data, &propertyIRIStrings)
if err == nil {
p.PropertyPathI = propertyIRIStrings
return nil
}
errors = append(errors, err)
var propertyIRI PropertyIRI
err = json.Unmarshal(data, &propertyIRI)
if err == nil {
p.PropertyPathI = propertyIRI
return nil
}
errors = append(errors, err)
var propertyIRIString PropertyIRIString
err = json.Unmarshal(data, &propertyIRIString)
if err == nil {
p.PropertyPathI = propertyIRIString
return nil
}
errors = append(errors, err)
step, err := Unmarshal(data)
if err == nil {
pathStep, ok := step.(PathStep)
if ok {
p.PropertyPathI = pathStep
return nil
}
errors = append(errors, fmt.Errorf("Step of type %T is not a PathStep. A PropertyPath step must be a PathStep", step))
}
errors = append(errors, err)
return formatMultiError(errors)
}
// PropertyIRIs is a slice of property IRIs.
type PropertyIRIs []PropertyIRI
// BuildPath implements PropertyPath.
func (p PropertyIRIs) BuildPath(qs graph.QuadStore, ns *voc.Namespaces) (*path.Path, error) {
var values []quad.Value
for _, iri := range p {
values = append(values, iri.full(ns))
}
return path.StartPath(qs, values...), nil
}
// PropertyIRIStrings is a slice of property IRI strings.
type PropertyIRIStrin
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
gs []string
// PropertyIRIs casts PropertyIRIStrings into PropertyIRIs
func (p PropertyIRIStrings) PropertyIRIs() PropertyIRIs {
var iris PropertyIRIs
for _, iri := range p {
iris = append(iris, PropertyIRI(iri))
}
return iris
}
// BuildPath implements PropertyPath.
func (p PropertyIRIStrings) BuildPath(qs graph.QuadStore, ns *voc.Namespaces) (*path.Path, error) {
return p.PropertyIRIs().BuildPath(qs, ns)
}
// PropertyIRI is an IRI of a Property
type PropertyIRI quad.IRI
func (p PropertyIRI) full(ns *voc.Namespaces) quad.IRI {
return quad.IRI(p).FullWith(ns)
}
// BuildPath implements PropertyPath
func (p PropertyIRI) BuildPath(qs graph.QuadStore, ns *voc.Namespaces) (*path.Path, error) {
return path.StartPath(qs, p.full(ns)), nil
}
// PropertyIRIString is a string of IRI of a Property
type PropertyIRIString string
// BuildPath implements PropertyPath
func (p PropertyIRIString) BuildPath(qs graph.QuadStore, ns *voc.Namespaces) (*path.Path, error) {
iri := PropertyIRI(p)
return iri.BuildPath(qs, ns)
}
// PropertyStep is a step that should resolve to a path of properties
type PropertyStep struct {
PathStep
}
// BuildPath implements PropertyPath
func (p PropertyStep) BuildPath(qs graph.QuadStore, ns *voc.Namespaces) (*path.Path, error) {
return p.BuildPath(qs, ns)
}
# Toy VS Code Extension for clangd
## What's in the folder
* This folder contains all of the files necessary for your extension
* `package.json` - this is the manifest file in which you declare your extension and command.
The sample plugin registers a command and defines its title and command name. With this information
VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
* `src/extension.ts` - this is the main file where you will provide the implementation of your command.
The file exports one function, `activate`, which is called the very first time your extension is
activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
We pass the f
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
unction containing the implementation of the command as the second parameter to
`registerCommand`.
## Get up and running straight away
* press `F5` to open a new window with your extension loaded
* run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`
* set breakpoints in your code inside `src/extension.ts` to debug your extension
* find output from your extension in the debug console
## Make changes
* you can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`
* you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes
## Explore the API
* you can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts`
## Run tests
* open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests`
* press `F5` to run the tests in a new window with your extension loaded
* see the output of the test result in the debug console
* make changes to `test/extension.test.ts` or create new test files inside the `test` folder
* by convention, the test runner will only consider files matching the name pattern `**.test.ts`
* you can create folders inside the `test` folder to structure your tests any way you want
# PostProcessStage
The `vc-stage-process-post` component is used to run a post-process stage on either the texture rendered by the scene or the output of a previous post-process stage.
## Example
### Load a PostProcessStage
#### Preview
<doc-preview>
<template>
<div class="viewer">
<vc-viewer @ready="ready" >
<vc-stage-process-post :fragmentShader="fragmentShader"></vc-stage-process-post>
</vc-viewer>
</div>
</template>
<script>
export default {
data () {
return {
fragmentShader: `
uniform sampler2D colorTexture;
varying vec2 v_textureCoordinates;
float hash(float x){
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
return fract(sin(x*23.3)*13.13);
}
void main(void){
float time = czm_frameNumber / 60.0;
vec2 resolution = czm_viewport.zw;
vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);
vec3 c=vec3(.6,.7,.8);
float a=-.4;
float si=sin(a),co=cos(a);
uv*=mat2(co,-si,si,co);
uv*=length(uv+vec2(0,4.9))*.3+1.;
float v=1.-sin(hash(floor(uv.x*100.))*2.);
float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;
c*=v*b;
gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5);
} `
}
},
methods: {
ready (cesiumInstance) {
this.cesiumInstance = cesiumInstance
const {Cesium, viewer} = this.cesiumInstance
}
}
}
</script>
</doc-preview>
#### Code
```html
<template>
<div class="viewer">
<vc-viewer @ready="ready">
<vc-stage-process-post :fragmentShader="fragmentShader"></vc-stage-process-post>
</vc-viewer>
</div>
</template>
<script>
export default {
data() {
return {
fragmentShader: `
uniform sampler2D colorTexture;
varying vec2 v_textureCoordinates;
float hash(float x){
return fract(sin(x*23.3)*13.13);
}
void main(void){
float time = czm_frameNumber / 60.0;
vec2 resolution = czm_viewport.zw;
vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);
vec3 c=vec3(.6,.7,.8);
float a=-.4;
float si=sin(a),co=cos(a);
uv*=mat2(co,-si,si,co);
uv*=length(uv+vec2(0,4.9))*.3+1.;
float v=1.-sin(hash(floor(uv.x*100.))*2.);
float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;
c*=v*b;
gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates),
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
vec4(c,1), 0.5);
} `
}
},
methods: {
ready(cesiumInstance) {
this.cesiumInstance = cesiumInstance
const { Cesium, viewer } = this.cesiumInstance
}
}
}
</script>
```
## Instance Properties
<!-- prettier-ignore -->
| name | type | default | description |
| ---------------------- | ------- | ------ | -------------------------------------------------------------------------- |
| fragmentShader | String | | `required` The fragment shader to use. The default sampler2D uniforms are colorTexture and depthTexture.|
| uniforms | Object | | `optional` An object whose properties will be used to set the shaders uniforms. |
| textureScale | Number | `1.0` | `optional` A number in the range (0.0, 1.0] used to scale the texture dimensions. A scale of 1.0 will render this post-process stage to a texture the size of the viewport.|
| forcePowerOfTwo | Boolean | `false` | `optional` Whether or not to force the texture dimensions to be both equal powers of two. The power of two will be the next power of two of the minimum of the dimensions.|
| sampleMode | Number | `0` | `optional` How to sample the input color texture. **{NEAREST: 0, LINEAR: 1}**|
| pixelFormat | Number | | `optional` The color pixel format of the output texture. |
| pixelDatatype | Number | | `optional` The pixel data type of the output texture. |
| clearColor | Object\|Array\|String | `BLACK` | `optional` The color to clear the output texture to. |
| scissorRectangle | Object | | `optional` The rectangle to use for the scissor test. |
| name | String | | `optional` The unique name of this post-process stage for reference by other stages in a composite. If a name is not supplied, a GUID will be generated. |
---
## Event
<!-- prettier-ignore -->
| name | parameter | description |
| ---- | --------- | ----------- |
| ready | {Cesium, viewer, cesiumObject} | Triggers when the component is ready. It returns a core class of Cesium, a viewer instance, and the cesiumObject. |
---
import Parser from './htm
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
lparser2/lib/Parser'
// monkey patching
Parser.prototype.ondeclaration = function(value){
if(this._cbs.ondeclaration){
this._cbs.ondeclaration(value);
} else if(this._cbs.onprocessinginstruction){
var name = this._getInstructionName(value);
this._cbs.onprocessinginstruction("!" + name, "!" + value);
}
}
Parser.prototype.oncdata = function(value){
this._updatePosition(1);
if(this._options.xmlMode || this._options.recognizeCDATA){
if(this._cbs.oncdatastart) this._cbs.oncdatastart(value)
// we don't want `ontext` getting called here
if(this._cbs.oncdataend) this._cbs.oncdataend()
} else {
this.oncomment("[CDATA[" + value + "]]")
}
}
export default Parser
module.exports = function getId(urlPath) {
return urlPath.match(/([^\/]*)\/*$/)[0]
}
/*
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 lister-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "k8s.io/api/storage/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// CSINodeLister helps list CSINodes.
type CSINodeLister interface {
// List lists all CSINodes in the indexer.
List(selector labels.Selector) (ret []*v1beta1.CSINode, err error)
// Get retrieves the CSINode from the index for a given name.
Get(name string) (*v1beta1.CSINode, error)
CSINodeListerExpansion
}
// cSINodeLister implements the CSINodeLister interface.
type cSINodeLister struct {
indexer cache.Indexer
}
// NewCSINodeLister returns a new CSINod
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
eLister.
func NewCSINodeLister(indexer cache.Indexer) CSINodeLister {
return &cSINodeLister{indexer: indexer}
}
// List lists all CSINodes in the indexer.
func (s *cSINodeLister) List(selector labels.Selector) (ret []*v1beta1.CSINode, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.CSINode))
})
return ret, err
}
// Get retrieves the CSINode from the index for a given name.
func (s *cSINodeLister) Get(name string) (*v1beta1.CSINode, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("csinode"), name)
}
return obj.(*v1beta1.CSINode), nil
}
/* @flow */
(process.allowedNodeEnvironmentFlags: Set<string>);
(process.allowedNodeEnvironmentFlags: string); // error
{
"insecure-registries": ["mtksms10.mediatek.inc:5000", "mtksitap54.mediatek.inc:5000"]
}
version https://git-lfs.github.com/spec/v1
oid sha256:343528382fd120f42c3274e95963659198f37650aac4324bc3d311348ad6615b
size 2712
# delayed-stream
Buffers events from a stream until you are ready to handle them.
## Installation
``` bash
npm install delayed-stream
```
## Usage
The following example shows how to write a http echo server that delays its
response by 1000 ms.
``` javascript
var DelayedStream = require('delayed-stream');
var http = require('http');
http.createServer(function(req, res) {
var delayed = DelayedStream.create(req);
setTimeout(function() {
res.writeHead(200);
delayed.pipe(res);
}, 1000);
});
```
If you are not using `Stream#pipe`, you can also manually release the buffered
events by calling `delayedStream.resume()`:
``` javascript
var delayed = DelayedStream.create(req);
setTimeout(function() {
// Emit all buffered events and resume underlaying source
delayed.resume();
}, 1000);
```
## Implementation
In order to use this meta stream properly, here are a few things you should
know about the implementation.
### Event Buffering / Proxying
Al
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
l events of the `source` stream are hijacked by overwriting the `source.emit`
method. Until node implements a catch-all event listener, this is the only way.
However, delayed-stream still continues to emit all events it captures on the
`source`, regardless of whether you have released the delayed stream yet or
not.
Upon creation, delayed-stream captures all `source` events and stores them in
an internal event buffer. Once `delayedStream.release()` is called, all
buffered events are emitted on the `delayedStream`, and the event buffer is
cleared. After that, delayed-stream merely acts as a proxy for the underlaying
source.
### Error handling
Error events on `source` are buffered / proxied just like any other events.
However, `delayedStream.create` attaches a no-op `'error'` listener to the
`source`. This way you only have to handle errors on the `delayedStream`
object, rather than in two places.
### Buffer limits
delayed-stream provides a `maxDataSize` property that can be used to limit
the amount of data being buffered. In order to protect you from bad `source`
streams that don't react to `source.pause()`, this feature is enabled by
default.
## API
### DelayedStream.create(source, [options])
Returns a new `delayedStream`. Available options are:
* `pauseStream`
* `maxDataSize`
The description for those properties can be found below.
### delayedStream.source
The `source` stream managed by this object. This is useful if you are
passing your `delayedStream` around, and you still want to access properties
on the `source` object.
### delayedStream.pauseStream = true
Whether to pause the underlaying `source` when calling
`DelayedStream.create()`. Modifying this property afterwards has no effect.
### delayedStream.maxDataSize = 1024 * 1024
The amount of data to buffer before emitting an `error`.
If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
refers to bytes.
If the underlaying source is emitting JavaScript strings, the size refers to
characters.
If you know what you are doin
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
g, you can set this property to `Infinity` to
disable this feature. You can also modify this property during runtime.
### delayedStream.maxDataSize = 1024 * 1024
The amount of data to buffer before emitting an `error`.
If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
refers to bytes.
If the underlaying source is emitting JavaScript strings, the size refers to
characters.
If you know what you are doing, you can set this property to `Infinity` to
disable this feature.
### delayedStream.dataSize = 0
The amount of data buffered so far.
### delayedStream.readable
An ECMA5 getter that returns the value of `source.readable`.
### delayedStream.resume()
If the `delayedStream` has not been released so far, `delayedStream.release()`
is called.
In either case, `source.resume()` is called.
### delayedStream.pause()
Calls `source.pause()`.
### delayedStream.pipe(dest)
Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.
### delayedStream.release()
Emits and clears all events that have been buffered up so far. This does not
resume the underlaying source, use `delayedStream.resume()` instead.
## License
delayed-stream is licensed under the MIT license.
# == License
# Ekylibre - Simple agricultural ERP
# Copyright (C) 2012-2013 David Joulin, Brice Texier
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
module Backend
class PlantsController < Backend::MattersController
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
include InspectionViewable
def self.list_conditions
code = ''
code = search_conditions(products: %i[name work_number]) + " ||= []\n"
code << "if params[:born_at].present? && params[:born_at].to_s != 'all'\n"
code << " c[0] << ' AND #{Plant.table_name}.born_at::DATE BETWEEN ? AND ?'\n"
code << " if params[:born_at].to_s == 'interval'\n"
code << " c << params[:born_at_started_on]\n"
code << " c << params[:born_at_stopped_on]\n"
code << " else\n"
code << " interval = params[:born_at].to_s.split('_')\n"
code << " c << interval.first\n"
code << " c << interval.second\n"
code << " end\n"
code << "end\n"
code << "if params[:dead_at].present? && params[:dead_at].to_s != 'all'\n"
code << " c[0] << ' AND #{Plant.table_name}.dead_at::DATE BETWEEN ? AND ?'\n"
code << " if params[:dead_at].to_s == 'interval'\n"
code << " c << params[:dead_at_started_on]\n"
code << " c << params[:dead_at_stopped_on]\n"
code << " else\n"
code << " interval = params[:dead_at].to_s.split('_')\n"
code << " c << interval.first\n"
code << " c << interval.second\n"
code << " end\n"
code << "end\n"
code << "if params[:variety].present?\n"
code << " c[0] << ' AND #{Plant.table_name}.variety = ?'\n"
code << " c << params[:variety]\n"
code << "end\n"
code << "if params[:area].present?\n"
code << " interval = params[:area].split(',')\n"
code << " c[0] << ' AND (SELECT (ST_Area(ST_Transform(ST_GeomFromEWKB(#{Plant.table_name}.initial_shape),2154))) BETWEEN ? AND ?)'\n"
code << " c << interval.first.to_i * 10_000\n"
code << " c << interval.last.to_i * 10_000\n"
code << "end\n"
code << "c\n "
code.c
end
list(conditions: list_conditions) do |t|
t.action :destroy, if: :destroyable?
t.column :name, url: true
t.column :work_number
t.column :variety
t.column :work_name, through: :contai
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ner, url: true
t.column :net_surface_area, datatype: :measure
t.status
t.column :born_at
t.column :dead_at
end
list :plant_countings, conditions: { plant_id: 'params[:id]'.c } do |t|
t.column :number, url: true
t.status label: :state
t.column :read_at, label: :date
end
end
end
require 'test_helper'
class UtilTest < Haml::TestCase
include Haml::Util
def test_silence_warnings
old_stderr, $stderr = $stderr, StringIO.new
warn "Out"
assert_equal("Out\n", $stderr.string)
silence_warnings {warn "In"}
assert_equal("Out\n", $stderr.string)
ensure
$stderr = old_stderr
end
def test_check_encoding_does_not_destoy_the_given_string
string_with_bom = File.read(File.dirname(__FILE__) + '/templates/with_bom.haml', :encoding => Encoding::UTF_8)
original = string_with_bom.dup
check_encoding(string_with_bom)
assert_equal(original, string_with_bom)
end
end
# Automatically created by: scrapy startproject
#
# For more information about the [deploy] section see:
# https://scrapyd.readthedocs.org/en/latest/deploy.html
[settings]
default = taobao_spider.settings
[deploy]
#url = http://localhost:6800/
project = taobao_spider
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
//
#import <Foundation/NSScriptCommand.h>
@interface GoForwardScriptCommand : NSScriptCommand
{
}
- (id)performDefaultImplementation;
@end
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: Xilinx
// Engineer: Parimal Patel
// Module Name: pulse_gen
// Project Name:
// Target Devices:
// Tool Versions:
// Description: This module takes multi-cycle pulse (generated by GPIO writes) and
// outputs synchronized one clock wide pulse
//////////////////////////////////////////////////////////////////////////////////
module pulse_gen(
inp
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ut async_in,
input sync_clk,
output reg pulsed_out
);
reg edge_detect;
always @(posedge async_in or posedge pulsed_out)
if(pulsed_out)
edge_detect <= 0;
else
edge_detect <= 1;
always @(posedge sync_clk)
pulsed_out <= edge_detect;
endmodule
#
# Copyright (C) 2009 David Cooper <dave@kupesoft.com>
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
VIDEO_MENU:=Video Support
V4L2_DIR=v4l2-core
V4L2_USB_DIR=usb
#
# Video Display
#
define KernelPackage/backlight
SUBMENU:=$(VIDEO_MENU)
TITLE:=Backlight support
DEPENDS:=@DISPLAY_SUPPORT
HIDDEN:=1
KCONFIG:=CONFIG_BACKLIGHT_CLASS_DEVICE \
CONFIG_BACKLIGHT_LCD_SUPPORT=y \
CONFIG_LCD_CLASS_DEVICE=n \
CONFIG_BACKLIGHT_GENERIC=n \
CONFIG_BACKLIGHT_ADP8860=n \
CONFIG_BACKLIGHT_ADP8870=n \
CONFIG_BACKLIGHT_OT200=n \
CONFIG_BACKLIGHT_PM8941_WLED=n
FILES:=$(LINUX_DIR)/drivers/video/backlight/backlight.ko
AUTOLOAD:=$(call AutoProbe,video backlight)
endef
define KernelPackage/backlight/description
Kernel module for Backlight support.
endef
$(eval $(call KernelPackage,backlight))
define KernelPackage/backlight-pwm
SUBMENU:=$(VIDEO_MENU)
TITLE:=PWM Backlight support
DEPENDS:=+kmod-backlight
KCONFIG:=CONFIG_BACKLIGHT_PWM
FILES:=$(LINUX_DIR)/drivers/video/backlight/pwm_bl.ko
AUTOLOAD:=$(call AutoProbe,video pwm_bl)
endef
define KernelPackage/backlight-pwm/description
Kernel module for PWM based Backlight support.
endef
$(eval $(call KernelPackage,backlight-pwm))
define KernelPackage/fb
SUBMENU:=$(VIDEO_MENU)
TITLE:=Framebuffer and framebuffer console support
DEPENDS:=@DISPLAY_SUPPORT
KCONFIG:= \
CONFIG_FB \
CONFIG_FB_MXS=n \
CONFIG_FB_SM750=n \
CONFIG_FRAMEBUFFER_CONSOLE=y \
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y \
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y \
CONFIG_FONTS=y \
CONFIG_FONT_8x8=y \
CONFIG_FONT_8x16=y \
CONFIG_FONT_6x11=n \
CO
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
NFIG_FONT_7x14=n \
CONFIG_FONT_PEARL_8x8=n \
CONFIG_FONT_ACORN_8x8=n \
CONFIG_FONT_MINI_4x6=n \
CONFIG_FONT_6x10=n \
CONFIG_FONT_SUN8x16=n \
CONFIG_FONT_SUN12x22=n \
CONFIG_FONT_10x18=n \
CONFIG_VT=y \
CONFIG_CONSOLE_TRANSLATIONS=y \
CONFIG_VT_CONSOLE=y \
CONFIG_VT_HW_CONSOLE_BINDING=y
FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb.ko \
$(LINUX_DIR)/lib/fonts/font.ko
AUTOLOAD:=$(call AutoLoad,06,fb font)
endef
define KernelPackage/fb/description
Kernel support for framebuffers and framebuffer console.
endef
define KernelPackage/fb/x86
FILES+=$(LINUX_DIR)/arch/x86/video/fbdev.ko
AUTOLOAD:=$(call AutoLoad,06,fbdev fb font)
endef
$(eval $(call KernelPackage,fb))
define KernelPackage/fb-cfb-fillrect
SUBMENU:=$(VIDEO_MENU)
TITLE:=Framebuffer software rectangle filling support
DEPENDS:=+kmod-fb
KCONFIG:=CONFIG_FB_CFB_FILLRECT
FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/cfbfillrect.ko
AUTOLOAD:=$(call AutoLoad,07,cfbfillrect)
endef
define KernelPackage/fb-cfb-fillrect/description
Kernel support for software rectangle filling
endef
$(eval $(call KernelPackage,fb-cfb-fillrect))
define KernelPackage/fb-cfb-copyarea
SUBMENU:=$(VIDEO_MENU)
TITLE:=Framebuffer software copy area support
DEPENDS:=+kmod-fb
KCONFIG:=CONFIG_FB_CFB_COPYAREA
FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/cfbcopyarea.ko
AUTOLOAD:=$(call AutoLoad,07,cfbcopyarea)
endef
define KernelPackage/fb-cfb-copyarea/description
Kernel support for software copy area
endef
$(eval $(call KernelPackage,fb-cfb-copyarea))
define KernelPackage/fb-cfb-imgblt
SUBMENU:=$(VIDEO_MENU)
TITLE:=Framebuffer software image blit support
DEPENDS:=+kmod-fb
KCONFIG:=CONFIG_FB_CFB_IMAGEBLIT
FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/cfbimgblt.ko
AUTOLOAD:=$(call AutoLoad,07,cfbimgblt)
endef
define KernelPackage/fb-cfb-imgblt/description
Kernel support for software image blitting
endef
$(eval $(call KernelPackage,fb-cfb-imgblt))
define KernelPackage/fb-sys-fops
SUBMENU:=$(VIDEO_MENU)
TITLE:=Framebuffer so
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ftware sys ops support
DEPENDS:=+kmod-fb
KCONFIG:=CONFIG_FB_SYS_FOPS
FILES:=$(LINUX_DIR)/drivers/video/fbdev/core/fb_sys_fops.ko
AUTOLOAD:=$(call AutoLoad,07,fbsysfops)
endef
define KernelPackage/fb-sys-fops/description
Kernel support for framebuffer sys ops
endef
$(eval $(call KernelPackage,fb-sys-fops))
define KernelPackage/drm
SUBMENU:=$(VIDEO_MENU)
TITLE:=Direct Rendering Manager (DRM) support
HIDDEN:=1
DEPENDS:=+kmod-dma-buf +kmod-i2c-core
KCONFIG:=CONFIG_DRM
FILES:=$(LINUX_DIR)/drivers/gpu/drm/drm.ko
AUTOLOAD:=$(call AutoLoad,05,drm)
endef
define KernelPackage/drm/description
Direct Rendering Manager (DRM) core support
endef
$(eval $(call KernelPackage,drm))
define KernelPackage/drm-imx
SUBMENU:=$(VIDEO_MENU)
TITLE:=Freescale i.MX DRM support
DEPENDS:=@TARGET_imx6 +kmod-drm +kmod-fb +kmod-fb-cfb-copyarea +kmod-fb-cfb-imgblt +kmod-fb-cfb-fillrect +kmod-fb-sys-fops
KCONFIG:=CONFIG_DRM_IMX \
CONFIG_DRM_FBDEV_EMULATION=y \
CONFIG_DRM_FBDEV_OVERALLOC=100 \
CONFIG_IMX_IPUV3_CORE \
CONFIG_RESET_CONTROLLER=y \
CONFIG_DRM_IMX_IPUV3 \
CONFIG_IMX_IPUV3 \
CONFIG_DRM_KMS_HELPER \
CONFIG_FB_SYS_FILLRECT \
CONFIG_FB_SYS_COPYAREA \
CONFIG_FB_SYS_IMAGEBLIT \
CONFIG_DRM_KMS_FB_HELPER=y \
CONFIG_DRM_GEM_CMA_HELPER=y \
CONFIG_DRM_KMS_CMA_HELPER=y \
CONFIG_DRM_IMX_FB_HELPER \
CONFIG_DRM_IMX_PARALLEL_DISPLAY=n \
CONFIG_DRM_IMX_TVE=n \
CONFIG_DRM_IMX_LDB=n \
CONFIG_DRM_IMX_HDMI=n
FILES:= \
$(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko \
$(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko \
$(LINUX_DIR)/drivers/video/fbdev/core/syscopyarea.ko \
$(LINUX_DIR)/drivers/video/fbdev/core/sysfillrect.ko \
$(LINUX_DIR)/drivers/video/fbdev/core/sysimgblt.ko \
$(LINUX_DIR)/drivers/gpu/drm/drm_kms_helper.ko
AUTOLOAD:=$(call AutoLoad,05,imxdrm imx-ipu-v3 imx-ipuv3-crtc)
endef
define KernelPackage/drm-imx/description
Direct Rendering Manager (DRM) support for Freescale i.MX
endef
$(eval $(call KernelPackage,drm-imx))
define KernelPackage/drm-imx-hdmi
SUBMENU:=$(VIDEO_MENU)
TITL
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
E:=Freescale i.MX HDMI DRM support
DEPENDS:=+kmod-sound-core kmod-drm-imx
KCONFIG:=CONFIG_DRM_IMX_HDMI \
CONFIG_DRM_DW_HDMI_AHB_AUDIO \
CONFIG_DRM_DW_HDMI_I2S_AUDIO
FILES:= \
$(LINUX_DIR)/drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko \
$(LINUX_DIR)/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.ko \
$(LINUX_DIR)/drivers/gpu/drm/imx/dw_hdmi-imx.ko
AUTOLOAD:=$(call AutoLoad,05,dw-hdmi dw-hdmi-ahb-audio.ko dw_hdmi-imx)
endef
define KernelPackage/drm-imx-hdmi/description
Direct Rendering Manager (DRM) support for Freescale i.MX HDMI
endef
$(eval $(call KernelPackage,drm-imx-hdmi))
define KernelPackage/drm-imx-ldb
SUBMENU:=$(VIDEO_MENU)
TITLE:=Freescale i.MX LVDS DRM support
DEPENDS:=+kmod-backlight kmod-drm-imx
KCONFIG:=CONFIG_DRM_IMX_LDB \
CONFIG_DRM_PANEL_SIMPLE \
CONFIG_DRM_PANEL=y \
CONFIG_DRM_PANEL_SAMSUNG_LD9040=n \
CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=n \
CONFIG_DRM_PANEL_LG_LG4573=n \
CONFIG_DRM_PANEL_LD9040=n \
CONFIG_DRM_PANEL_LVDS=n \
CONFIG_DRM_PANEL_S6E8AA0=n \
CONFIG_DRM_PANEL_SITRONIX_ST7789V=n
FILES:=$(LINUX_DIR)/drivers/gpu/drm/imx/imx-ldb.ko \
$(LINUX_DIR)/drivers/gpu/drm/panel/panel-simple.ko
AUTOLOAD:=$(call AutoLoad,05,imx-ldb)
endef
define KernelPackage/drm-imx-ldb/description
Direct Rendering Manager (DRM) support for Freescale i.MX LVDS
endef
$(eval $(call KernelPackage,drm-imx-ldb))
#
# Video Capture
#
define KernelPackage/video-core
SUBMENU:=$(VIDEO_MENU)
TITLE=Video4Linux support
DEPENDS:=@PCI_SUPPORT||USB_SUPPORT +PACKAGE_kmod-i2c-core:kmod-i2c-core
KCONFIG:= \
CONFIG_MEDIA_SUPPORT \
CONFIG_MEDIA_CAMERA_SUPPORT=y \
CONFIG_VIDEO_DEV \
CONFIG_VIDEO_V4L1=y \
CONFIG_VIDEO_ALLOW_V4L1=y \
CONFIG_VIDEO_CAPTURE_DRIVERS=y \
CONFIG_V4L_USB_DRIVERS=y \
CONFIG_V4L_PCI_DRIVERS=y \
CONFIG_V4L_PLATFORM_DRIVERS=y \
CONFIG_V4L_ISA_PARPORT_DRIVERS=y
FILES:= \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-common.ko \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
endef
define KernelPackag
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
e/video-core/description
Kernel modules for Video4Linux support
endef
$(eval $(call KernelPackage,video-core))
define AddDepends/video
SUBMENU:=$(VIDEO_MENU)
DEPENDS+=kmod-video-core $(1)
endef
define AddDepends/camera
$(AddDepends/video)
KCONFIG+=CONFIG_MEDIA_USB_SUPPORT=y \
CONFIG_MEDIA_CAMERA_SUPPORT=y
endef
define KernelPackage/video-videobuf2
TITLE:=videobuf2 lib
DEPENDS:=+kmod-dma-buf
KCONFIG:= \
CONFIG_VIDEOBUF2_CORE \
CONFIG_VIDEOBUF2_MEMOPS \
CONFIG_VIDEOBUF2_VMALLOC
FILES:= \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-core.ko \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-v4l2.ko@ge4.4 \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-memops.ko \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videobuf2-vmalloc.ko
AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf-v4l2@ge4.4 videobuf2-memops videobuf2-vmalloc)
$(call AddDepends/video)
endef
define KernelPackage/video-videobuf2/description
Kernel modules that implements three basic types of media buffers.
endef
$(eval $(call KernelPackage,video-videobuf2))
define KernelPackage/video-cpia2
TITLE:=CPIA2 video driver
DEPENDS:=@USB_SUPPORT +kmod-usb-core
KCONFIG:=CONFIG_VIDEO_CPIA2
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/cpia2/cpia2.ko
AUTOLOAD:=$(call AutoProbe,cpia2)
$(call AddDepends/camera)
endef
define KernelPackage/video-cpia2/description
Kernel modules for supporting CPIA2 USB based cameras
endef
$(eval $(call KernelPackage,video-cpia2))
define KernelPackage/video-pwc
TITLE:=Philips USB webcam support
DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-video-videobuf2
KCONFIG:= \
CONFIG_USB_PWC \
CONFIG_USB_PWC_DEBUG=n
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/pwc/pwc.ko
AUTOLOAD:=$(call AutoProbe,pwc)
$(call AddDepends/camera)
endef
define KernelPackage/video-pwc/description
Kernel modules for supporting Philips USB based cameras
endef
$(eval $(call KernelPackage,video-pwc))
define KernelPackage/video-uvc
TITLE:=USB Video Class (UVC) support
DEPENDS:=@USB_SUPP
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ORT +kmod-usb-core +kmod-video-videobuf2 +kmod-input-core
KCONFIG:= CONFIG_USB_VIDEO_CLASS
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/uvc/uvcvideo.ko
AUTOLOAD:=$(call AutoProbe,uvcvideo)
$(call AddDepends/camera)
endef
define KernelPackage/video-uvc/description
Kernel modules for supporting USB Video Class (UVC) devices
endef
$(eval $(call KernelPackage,video-uvc))
define KernelPackage/video-gspca-core
MENU:=1
TITLE:=GSPCA webcam core support framework
DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-input-core
KCONFIG:=CONFIG_USB_GSPCA
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_main.ko
AUTOLOAD:=$(call AutoProbe,gspca_main)
$(call AddDepends/camera)
endef
define KernelPackage/video-gspca-core/description
Kernel modules for supporting GSPCA based webcam devices. Note this is just
the core of the driver, please select a submodule that supports your webcam.
endef
$(eval $(call KernelPackage,video-gspca-core))
define AddDepends/camera-gspca
SUBMENU:=$(VIDEO_MENU)
DEPENDS+=kmod-video-gspca-core $(1)
endef
define KernelPackage/video-gspca-conex
TITLE:=conex webcam support
KCONFIG:=CONFIG_USB_GSPCA_CONEX
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_conex.ko
AUTOLOAD:=$(call AutoProbe,gspca_conex)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-conex/description
The Conexant Camera Driver (conex) kernel module
endef
$(eval $(call KernelPackage,video-gspca-conex))
define KernelPackage/video-gspca-etoms
TITLE:=etoms webcam support
KCONFIG:=CONFIG_USB_GSPCA_ETOMS
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_etoms.ko
AUTOLOAD:=$(call AutoProbe,gspca_etoms)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-etoms/description
The Etoms USB Camera Driver (etoms) kernel module
endef
$(eval $(call KernelPackage,video-gspca-etoms))
define KernelPackage/video-gspca-finepix
TITLE:=finepix webcam support
KCONFIG:=CONFIG_USB_GSPCA_FINEPIX
FILES:=$(LINUX_DIR)/driver
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
s/media/$(V4L2_USB_DIR)/gspca/gspca_finepix.ko
AUTOLOAD:=$(call AutoProbe,gspca_finepix)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-finepix/description
The Fujifilm FinePix USB V4L2 driver (finepix) kernel module
endef
$(eval $(call KernelPackage,video-gspca-finepix))
define KernelPackage/video-gspca-mars
TITLE:=mars webcam support
KCONFIG:=CONFIG_USB_GSPCA_MARS
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_mars.ko
AUTOLOAD:=$(call AutoProbe,gspca_mars)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-mars/description
The Mars USB Camera Driver (mars) kernel module
endef
$(eval $(call KernelPackage,video-gspca-mars))
define KernelPackage/video-gspca-mr97310a
TITLE:=mr97310a webcam support
KCONFIG:=CONFIG_USB_GSPCA_MR97310A
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_mr97310a.ko
AUTOLOAD:=$(call AutoProbe,gspca_mr97310a)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-mr97310a/description
The Mars-Semi MR97310A USB Camera Driver (mr97310a) kernel module
endef
$(eval $(call KernelPackage,video-gspca-mr97310a))
define KernelPackage/video-gspca-ov519
TITLE:=ov519 webcam support
KCONFIG:=CONFIG_USB_GSPCA_OV519
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_ov519.ko
AUTOLOAD:=$(call AutoProbe,gspca_ov519)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-ov519/description
The OV519 USB Camera Driver (ov519) kernel module
endef
$(eval $(call KernelPackage,video-gspca-ov519))
define KernelPackage/video-gspca-ov534
TITLE:=ov534 webcam support
KCONFIG:=CONFIG_USB_GSPCA_OV534
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_ov534.ko
AUTOLOAD:=$(call AutoProbe,gspca_ov534)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-ov534/description
The OV534 USB Camera Driver (ov534) kernel module
endef
$(eval $(call KernelPackage,video-gspca-ov534))
define KernelPackage/video-gspca-ov534-9
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
TITLE:=ov534-9 webcam support
KCONFIG:=CONFIG_USB_GSPCA_OV534_9
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_ov534_9.ko
AUTOLOAD:=$(call AutoProbe,gspca_ov534_9)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-ov534-9/description
The OV534-9 USB Camera Driver (ov534_9) kernel module
endef
$(eval $(call KernelPackage,video-gspca-ov534-9))
define KernelPackage/video-gspca-pac207
TITLE:=pac207 webcam support
KCONFIG:=CONFIG_USB_GSPCA_PAC207
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_pac207.ko
AUTOLOAD:=$(call AutoProbe,gspca_pac207)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-pac207/description
The Pixart PAC207 USB Camera Driver (pac207) kernel module
endef
$(eval $(call KernelPackage,video-gspca-pac207))
define KernelPackage/video-gspca-pac7311
TITLE:=pac7311 webcam support
KCONFIG:=CONFIG_USB_GSPCA_PAC7311
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_pac7311.ko
AUTOLOAD:=$(call AutoProbe,gspca_pac7311)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-pac7311/description
The Pixart PAC7311 USB Camera Driver (pac7311) kernel module
endef
$(eval $(call KernelPackage,video-gspca-pac7311))
define KernelPackage/video-gspca-se401
TITLE:=se401 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SE401
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_se401.ko
AUTOLOAD:=$(call AutoProbe,gspca_se401)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-se401/description
The SE401 USB Camera Driver kernel module
endef
$(eval $(call KernelPackage,video-gspca-se401))
define KernelPackage/video-gspca-sn9c20x
TITLE:=sn9c20x webcam support
KCONFIG:=CONFIG_USB_GSPCA_SN9C20X
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sn9c20x.ko
AUTOLOAD:=$(call AutoProbe,gspca_sn9c20x)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sn9c20x/description
The SN9C20X USB Camera Driver (sn9c20x) kern
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
el module
endef
$(eval $(call KernelPackage,video-gspca-sn9c20x))
define KernelPackage/video-gspca-sonixb
TITLE:=sonixb webcam support
KCONFIG:=CONFIG_USB_GSPCA_SONIXB
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sonixb.ko
AUTOLOAD:=$(call AutoProbe,gspca_sonixb)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sonixb/description
The SONIX Bayer USB Camera Driver (sonixb) kernel module
endef
$(eval $(call KernelPackage,video-gspca-sonixb))
define KernelPackage/video-gspca-sonixj
TITLE:=sonixj webcam support
KCONFIG:=CONFIG_USB_GSPCA_SONIXJ
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sonixj.ko
AUTOLOAD:=$(call AutoProbe,gspca_sonixj)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sonixj/description
The SONIX JPEG USB Camera Driver (sonixj) kernel module
endef
$(eval $(call KernelPackage,video-gspca-sonixj))
define KernelPackage/video-gspca-spca500
TITLE:=spca500 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SPCA500
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca500.ko
AUTOLOAD:=$(call AutoProbe,gspca_spca500)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-spca500/description
The SPCA500 USB Camera Driver (spca500) kernel module
endef
$(eval $(call KernelPackage,video-gspca-spca500))
define KernelPackage/video-gspca-spca501
TITLE:=spca501 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SPCA501
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca501.ko
AUTOLOAD:=$(call AutoProbe,gspca_spca501)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-spca501/description
The SPCA501 USB Camera Driver (spca501) kernel module
endef
$(eval $(call KernelPackage,video-gspca-spca501))
define KernelPackage/video-gspca-spca505
TITLE:=spca505 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SPCA505
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca505.ko
AUTOLOAD:=$(call AutoProbe,gspca_spca505)
$(call AddDepe
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
nds/camera-gspca)
endef
define KernelPackage/video-gspca-spca505/description
The SPCA505 USB Camera Driver (spca505) kernel module
endef
$(eval $(call KernelPackage,video-gspca-spca505))
define KernelPackage/video-gspca-spca506
TITLE:=spca506 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SPCA506
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca506.ko
AUTOLOAD:=$(call AutoProbe,gspca_spca506)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-spca506/description
The SPCA506 USB Camera Driver (spca506) kernel module
endef
$(eval $(call KernelPackage,video-gspca-spca506))
define KernelPackage/video-gspca-spca508
TITLE:=spca508 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SPCA508
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca508.ko
AUTOLOAD:=$(call AutoProbe,gspca_spca508)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-spca508/description
The SPCA508 USB Camera Driver (spca508) kernel module
endef
$(eval $(call KernelPackage,video-gspca-spca508))
define KernelPackage/video-gspca-spca561
TITLE:=spca561 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SPCA561
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_spca561.ko
AUTOLOAD:=$(call AutoProbe,gspca_spca561)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-spca561/description
The SPCA561 USB Camera Driver (spca561) kernel module
endef
$(eval $(call KernelPackage,video-gspca-spca561))
define KernelPackage/video-gspca-sq905
TITLE:=sq905 webcam support
KCONFIG:=CONFIG_USB_GSPCA_SQ905
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq905.ko
AUTOLOAD:=$(call AutoProbe,gspca_sq905)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sq905/description
The SQ Technologies SQ905 based USB Camera Driver (sq905) kernel module
endef
$(eval $(call KernelPackage,video-gspca-sq905))
define KernelPackage/video-gspca-sq905c
TITLE:=sq905c webcam support
KCONFIG:=CONFIG_USB_GSPCA_SQ905C
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sq905c.ko
AUTOLOAD:=$(call AutoProbe,gspca_sq905c)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sq905c/description
The SQ Technologies SQ905C based USB Camera Driver (sq905c) kernel module
endef
$(eval $(call KernelPackage,video-gspca-sq905c))
define KernelPackage/video-gspca-stk014
TITLE:=stk014 webcam support
KCONFIG:=CONFIG_USB_GSPCA_STK014
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_stk014.ko
AUTOLOAD:=$(call AutoProbe,gspca_stk014)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-stk014/description
The Syntek DV4000 (STK014) USB Camera Driver (stk014) kernel module
endef
$(eval $(call KernelPackage,video-gspca-stk014))
define KernelPackage/video-gspca-sunplus
TITLE:=sunplus webcam support
KCONFIG:=CONFIG_USB_GSPCA_SUNPLUS
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_sunplus.ko
AUTOLOAD:=$(call AutoProbe,gspca_sunplus)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-sunplus/description
The SUNPLUS USB Camera Driver (sunplus) kernel module
endef
$(eval $(call KernelPackage,video-gspca-sunplus))
define KernelPackage/video-gspca-t613
TITLE:=t613 webcam support
KCONFIG:=CONFIG_USB_GSPCA_T613
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_t613.ko
AUTOLOAD:=$(call AutoProbe,gspca_t613)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-t613/description
The T613 (JPEG Compliance) USB Camera Driver (t613) kernel module
endef
$(eval $(call KernelPackage,video-gspca-t613))
define KernelPackage/video-gspca-tv8532
TITLE:=tv8532 webcam support
KCONFIG:=CONFIG_USB_GSPCA_TV8532
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_tv8532.ko
AUTOLOAD:=$(call AutoProbe,gspca_tv8532)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-tv8532/description
The TV8532 USB Camera Driver (tv8532) kernel module
endef
$(eval $(call KernelPacka
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ge,video-gspca-tv8532))
define KernelPackage/video-gspca-vc032x
TITLE:=vc032x webcam support
KCONFIG:=CONFIG_USB_GSPCA_VC032X
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_vc032x.ko
AUTOLOAD:=$(call AutoProbe,gspca_vc032x)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-vc032x/description
The VC032X USB Camera Driver (vc032x) kernel module
endef
$(eval $(call KernelPackage,video-gspca-vc032x))
define KernelPackage/video-gspca-zc3xx
TITLE:=zc3xx webcam support
KCONFIG:=CONFIG_USB_GSPCA_ZC3XX
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_zc3xx.ko
AUTOLOAD:=$(call AutoProbe,gspca_zc3xx)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-zc3xx/description
The ZC3XX USB Camera Driver (zc3xx) kernel module
endef
$(eval $(call KernelPackage,video-gspca-zc3xx))
define KernelPackage/video-gspca-m5602
TITLE:=m5602 webcam support
KCONFIG:=CONFIG_USB_M5602
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/m5602/gspca_m5602.ko
AUTOLOAD:=$(call AutoProbe,gspca_m5602)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-m5602/description
The ALi USB m5602 Camera Driver (m5602) kernel module
endef
$(eval $(call KernelPackage,video-gspca-m5602))
define KernelPackage/video-gspca-stv06xx
TITLE:=stv06xx webcam support
KCONFIG:=CONFIG_USB_STV06XX
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/stv06xx/gspca_stv06xx.ko
AUTOLOAD:=$(call AutoProbe,gspca_stv06xx)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-stv06xx/description
The STV06XX USB Camera Driver (stv06xx) kernel module
endef
$(eval $(call KernelPackage,video-gspca-stv06xx))
define KernelPackage/video-gspca-gl860
TITLE:=gl860 webcam support
KCONFIG:=CONFIG_USB_GL860
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gl860/gspca_gl860.ko
AUTOLOAD:=$(call AutoProbe,gspca_gl860)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-gl800/description
The GL
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
860 USB Camera Driver (gl860) kernel module
endef
$(eval $(call KernelPackage,video-gspca-gl860))
define KernelPackage/video-gspca-jeilinj
TITLE:=jeilinj webcam support
KCONFIG:=CONFIG_USB_GSPCA_JEILINJ
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_jeilinj.ko
AUTOLOAD:=$(call AutoProbe,gspca_jeilinj)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-jeilinj/description
The JEILINJ USB Camera Driver (jeilinj) kernel module
endef
$(eval $(call KernelPackage,video-gspca-jeilinj))
define KernelPackage/video-gspca-konica
TITLE:=konica webcam support
KCONFIG:=CONFIG_USB_GSPCA_KONICA
FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/gspca/gspca_konica.ko
AUTOLOAD:=$(call AutoProbe,gspca_konica)
$(call AddDepends/camera-gspca)
endef
define KernelPackage/video-gspca-konica/description
The Konica USB Camera Driver (konica) kernel module
endef
$(eval $(call KernelPackage,video-gspca-konica))
/*
Copyright 2014 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.
*/
package util
import (
"bytes"
"errors"
"fmt"
"io"
"net/url"
"os"
"strconv"
"strings"
"time"
jsonpatch "github.com/evanphx/json-patch"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/cli-runtime/pkg/
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
genericclioptions"
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/rest"
"k8s.io/client-go/scale"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
utilexec "k8s.io/utils/exec"
)
const (
ApplyAnnotationsFlag = "save-config"
DefaultErrorExitCode = 1
)
type debugError interface {
DebugError() (msg string, args []interface{})
}
// AddSourceToErr adds handleResourcePrefix and source string to error message.
// verb is the string like "creating", "deleting" etc.
// source is the filename or URL to the template file(*.json or *.yaml), or stdin to use to handle the resource.
func AddSourceToErr(verb string, source string, err error) error {
if source != "" {
if statusError, ok := err.(apierrors.APIStatus); ok {
status := statusError.Status()
status.Message = fmt.Sprintf("error when %s %q: %v", verb, source, status.Message)
return &apierrors.StatusError{ErrStatus: status}
}
return fmt.Errorf("error when %s %q: %v", verb, source, err)
}
return err
}
var fatalErrHandler = fatal
// BehaviorOnFatal allows you to override the default behavior when a fatal
// error occurs, which is to call os.Exit(code). You can pass 'panic' as a function
// here if you prefer the panic() over os.Exit(1).
func BehaviorOnFatal(f func(string, int)) {
fatalErrHandler = f
}
// DefaultBehaviorOnFatal allows you to undo any previous override. Useful in
// tests.
func DefaultBehaviorOnFatal() {
fatalErrHandler = fatal
}
// fatal prints the message (if provided) and then exits. If V(2) or greater,
// klog.Fatal is invoked for extended information.
func fatal(msg string, code int) {
if klog.V(2) {
klog.FatalDepth(2, msg)
}
if len(msg) > 0 {
// add newline if needed
if !strings.HasSuffix(msg, "\n") {
msg += "\n"
}
fmt.Fprint(os.Stderr, msg)
}
os.Exit(code)
}
// ErrExit may be passed to CheckError to instruct it to output nothing but exit with
// status code 1.
var ErrExit = fmt.Errorf("exit")
// CheckErr prints a user friendly error to STDERR and exits with a non-zer
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
o
// exit code. Unrecognized errors will be printed with an "error: " prefix.
//
// This method is generic to the command in use and may be used by non-Kubectl
// commands.
func CheckErr(err error) {
checkErr(err, fatalErrHandler)
}
// CheckDiffErr prints a user friendly error to STDERR and exits with a
// non-zero and non-one exit code. Unrecognized errors will be printed
// with an "error: " prefix.
//
// This method is meant specifically for `kubectl diff` and may be used
// by other commands.
func CheckDiffErr(err error) {
checkErr(err, func(msg string, code int) {
fatalErrHandler(msg, code+1)
})
}
// checkErr formats a given error as a string and calls the passed handleErr
// func with that string and an kubectl exit code.
func checkErr(err error, handleErr func(string, int)) {
// unwrap aggregates of 1
if agg, ok := err.(utilerrors.Aggregate); ok && len(agg.Errors()) == 1 {
err = agg.Errors()[0]
}
if err == nil {
return
}
switch {
case err == ErrExit:
handleErr("", DefaultErrorExitCode)
case apierrors.IsInvalid(err):
details := err.(*apierrors.StatusError).Status().Details
s := "The request is invalid"
if details == nil {
handleErr(s, DefaultErrorExitCode)
return
}
if len(details.Kind) != 0 || len(details.Name) != 0 {
s = fmt.Sprintf("The %s %q is invalid", details.Kind, details.Name)
}
if len(details.Causes) > 0 {
errs := statusCausesToAggrError(details.Causes)
handleErr(MultilineError(s+": ", errs), DefaultErrorExitCode)
} else {
handleErr(s, DefaultErrorExitCode)
}
case clientcmd.IsConfigurationInvalid(err):
handleErr(MultilineError("Error in configuration: ", err), DefaultErrorExitCode)
default:
switch err := err.(type) {
case *meta.NoResourceMatchError:
switch {
case len(err.PartialResource.Group) > 0 && len(err.PartialResource.Version) > 0:
handleErr(fmt.Sprintf("the server doesn't have a resource type %q in group %q and version %q", err.PartialResource.Resource, err.PartialResource.Group, err.PartialResource.Version), Defaul
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
tErrorExitCode)
case len(err.PartialResource.Group) > 0:
handleErr(fmt.Sprintf("the server doesn't have a resource type %q in group %q", err.PartialResource.Resource, err.PartialResource.Group), DefaultErrorExitCode)
case len(err.PartialResource.Version) > 0:
handleErr(fmt.Sprintf("the server doesn't have a resource type %q in version %q", err.PartialResource.Resource, err.PartialResource.Version), DefaultErrorExitCode)
default:
handleErr(fmt.Sprintf("the server doesn't have a resource type %q", err.PartialResource.Resource), DefaultErrorExitCode)
}
case utilerrors.Aggregate:
handleErr(MultipleErrors(``, err.Errors()), DefaultErrorExitCode)
case utilexec.ExitError:
handleErr(err.Error(), err.ExitStatus())
default: // for any other error type
msg, ok := StandardErrorMessage(err)
if !ok {
msg = err.Error()
if !strings.HasPrefix(msg, "error: ") {
msg = fmt.Sprintf("error: %s", msg)
}
}
handleErr(msg, DefaultErrorExitCode)
}
}
}
func statusCausesToAggrError(scs []metav1.StatusCause) utilerrors.Aggregate {
errs := make([]error, 0, len(scs))
errorMsgs := sets.NewString()
for _, sc := range scs {
// check for duplicate error messages and skip them
msg := fmt.Sprintf("%s: %s", sc.Field, sc.Message)
if errorMsgs.Has(msg) {
continue
}
errorMsgs.Insert(msg)
errs = append(errs, errors.New(msg))
}
return utilerrors.NewAggregate(errs)
}
// StandardErrorMessage translates common errors into a human readable message, or returns
// false if the error is not one of the recognized types. It may also log extended
// information to klog.
//
// This method is generic to the command in use and may be used by non-Kubectl
// commands.
func StandardErrorMessage(err error) (string, bool) {
if debugErr, ok := err.(debugError); ok {
klog.V(4).Infof(debugErr.DebugError())
}
status, isStatus := err.(apierrors.APIStatus)
switch {
case isStatus:
switch s := status.Status(); {
case s.Reason == metav1.StatusReasonUnauthorized:
return fmt.Sprintf
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
("error: You must be logged in to the server (%s)", s.Message), true
case len(s.Reason) > 0:
return fmt.Sprintf("Error from server (%s): %s", s.Reason, err.Error()), true
default:
return fmt.Sprintf("Error from server: %s", err.Error()), true
}
case apierrors.IsUnexpectedObjectError(err):
return fmt.Sprintf("Server returned an unexpected response: %s", err.Error()), true
}
switch t := err.(type) {
case *url.Error:
klog.V(4).Infof("Connection error: %s %s: %v", t.Op, t.URL, t.Err)
switch {
case strings.Contains(t.Err.Error(), "connection refused"):
host := t.URL
if server, err := url.Parse(t.URL); err == nil {
host = server.Host
}
return fmt.Sprintf("The connection to the server %s was refused - did you specify the right host or port?", host), true
}
return fmt.Sprintf("Unable to connect to the server: %v", t.Err), true
}
return "", false
}
// MultilineError returns a string representing an error that splits sub errors into their own
// lines. The returned string will end with a newline.
func MultilineError(prefix string, err error) string {
if agg, ok := err.(utilerrors.Aggregate); ok {
errs := utilerrors.Flatten(agg).Errors()
buf := &bytes.Buffer{}
switch len(errs) {
case 0:
return fmt.Sprintf("%s%v\n", prefix, err)
case 1:
return fmt.Sprintf("%s%v\n", prefix, messageForError(errs[0]))
default:
fmt.Fprintln(buf, prefix)
for _, err := range errs {
fmt.Fprintf(buf, "* %v\n", messageForError(err))
}
return buf.String()
}
}
return fmt.Sprintf("%s%s\n", prefix, err)
}
// PrintErrorWithCauses prints an error's kind, name, and each of the error's causes in a new line.
// The returned string will end with a newline.
// Returns true if a case exists to handle the error type, or false otherwise.
func PrintErrorWithCauses(err error, errOut io.Writer) bool {
switch t := err.(type) {
case *apierrors.StatusError:
errorDetails := t.Status().Details
if errorDetails != nil {
fmt.Fprintf(errOut, "error: %s %q is invalid\n\n", errorDeta
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ils.Kind, errorDetails.Name)
for _, cause := range errorDetails.Causes {
fmt.Fprintf(errOut, "* %s: %s\n", cause.Field, cause.Message)
}
return true
}
}
fmt.Fprintf(errOut, "error: %v\n", err)
return false
}
// MultipleErrors returns a newline delimited string containing
// the prefix and referenced errors in standard form.
func MultipleErrors(prefix string, errs []error) string {
buf := &bytes.Buffer{}
for _, err := range errs {
fmt.Fprintf(buf, "%s%v\n", prefix, messageForError(err))
}
return buf.String()
}
// messageForError returns the string representing the error.
func messageForError(err error) string {
msg, ok := StandardErrorMessage(err)
if !ok {
msg = err.Error()
}
return msg
}
func UsageErrorf(cmd *cobra.Command, format string, args ...interface{}) error {
msg := fmt.Sprintf(format, args...)
return fmt.Errorf("%s\nSee '%s -h' for help and examples", msg, cmd.CommandPath())
}
func IsFilenameSliceEmpty(filenames []string, directory string) bool {
return len(filenames) == 0 && directory == ""
}
func GetFlagString(cmd *cobra.Command, flag string) string {
s, err := cmd.Flags().GetString(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return s
}
// GetFlagStringSlice can be used to accept multiple argument with flag repetition (e.g. -f arg1,arg2 -f arg3 ...)
func GetFlagStringSlice(cmd *cobra.Command, flag string) []string {
s, err := cmd.Flags().GetStringSlice(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return s
}
// GetFlagStringArray can be used to accept multiple argument with flag repetition (e.g. -f arg1 -f arg2 ...)
func GetFlagStringArray(cmd *cobra.Command, flag string) []string {
s, err := cmd.Flags().GetStringArray(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return s
}
func GetFlagBool(cmd *cobra.Command, flag string) bool {
b, err := cmd.Flags().GetBool(flag)
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return b
}
// Assumes the flag has a default value.
func GetFlagInt(cmd *cobra.Command, flag string) int {
i, err := cmd.Flags().GetInt(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return i
}
// Assumes the flag has a default value.
func GetFlagInt32(cmd *cobra.Command, flag string) int32 {
i, err := cmd.Flags().GetInt32(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return i
}
// Assumes the flag has a default value.
func GetFlagInt64(cmd *cobra.Command, flag string) int64 {
i, err := cmd.Flags().GetInt64(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return i
}
func GetFlagDuration(cmd *cobra.Command, flag string) time.Duration {
d, err := cmd.Flags().GetDuration(flag)
if err != nil {
klog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
}
return d
}
func GetPodRunningTimeoutFlag(cmd *cobra.Command) (time.Duration, error) {
timeout := GetFlagDuration(cmd, "pod-running-timeout")
if timeout <= 0 {
return timeout, fmt.Errorf("--pod-running-timeout must be higher than zero")
}
return timeout, nil
}
func AddValidateFlags(cmd *cobra.Command) {
cmd.Flags().Bool("validate", true, "If true, use a schema to validate the input before sending it")
}
func AddValidateOptionFlags(cmd *cobra.Command, options *ValidateOptions) {
cmd.Flags().BoolVar(&options.EnableValidation, "validate", options.EnableValidation, "If true, use a schema to validate the input before sending it")
}
func AddFilenameOptionFlags(cmd *cobra.Command, options *resource.FilenameOptions, usage string) {
AddJsonFilenameFlag(cmd.Flags(), &options.Filenames, "Filename, directory, or URL to files "+usage)
AddKustomizeFlag(cmd.Flags(), &options.Kustomize)
cmd.Flags().BoolVarP(&options.Recursive, "recursive", "R", opti
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ons.Recursive, "Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.")
}
func AddJsonFilenameFlag(flags *pflag.FlagSet, value *[]string, usage string) {
flags.StringSliceVarP(value, "filename", "f", *value, usage)
annotations := make([]string, 0, len(resource.FileExtensions))
for _, ext := range resource.FileExtensions {
annotations = append(annotations, strings.TrimLeft(ext, "."))
}
flags.SetAnnotation("filename", cobra.BashCompFilenameExt, annotations)
}
// AddKustomizeFlag adds kustomize flag to a command
func AddKustomizeFlag(flags *pflag.FlagSet, value *string) {
flags.StringVarP(value, "kustomize", "k", *value, "Process the kustomization directory. This flag can't be used together with -f or -R.")
}
// AddDryRunFlag adds dry-run flag to a command. Usually used by mutations.
func AddDryRunFlag(cmd *cobra.Command) {
cmd.Flags().String(
"dry-run",
"none",
`Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.`,
)
cmd.Flags().Lookup("dry-run").NoOptDefVal = "unchanged"
}
func AddServerSideApplyFlags(cmd *cobra.Command) {
cmd.Flags().Bool("server-side", false, "If true, apply runs in the server instead of the client.")
cmd.Flags().Bool("force-conflicts", false, "If true, server-side apply will force the changes against conflicts.")
cmd.Flags().String("field-manager", "kubectl", "Name of the manager used to track field ownership.")
}
func AddPodRunningTimeoutFlag(cmd *cobra.Command, defaultTimeout time.Duration) {
cmd.Flags().Duration("pod-running-timeout", defaultTimeout, "The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running")
}
func AddApplyAnnotationFlags(cmd *cobra.Command) {
cmd.Flags().Bool(ApplyAnnotationsFlag, false, "If true, the configuration of current object will be saved in its annotation. Oth
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
erwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
}
func AddApplyAnnotationVarFlags(cmd *cobra.Command, applyAnnotation *bool) {
cmd.Flags().BoolVar(applyAnnotation, ApplyAnnotationsFlag, *applyAnnotation, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
}
// AddGeneratorFlags adds flags common to resource generation commands
// TODO: need to take a pass at other generator commands to use this set of flags
func AddGeneratorFlags(cmd *cobra.Command, defaultGenerator string) {
cmd.Flags().String("generator", defaultGenerator, "The name of the API generator to use.")
cmd.Flags().MarkDeprecated("generator", "has no effect and will be removed in the future.")
AddDryRunFlag(cmd)
}
type ValidateOptions struct {
EnableValidation bool
}
// Merge requires JSON serialization
// TODO: merge assumes JSON serialization, and does not properly abstract API retrieval
func Merge(codec runtime.Codec, dst runtime.Object, fragment string) (runtime.Object, error) {
// encode dst into versioned json and apply fragment directly too it
target, err := runtime.Encode(codec, dst)
if err != nil {
return nil, err
}
patched, err := jsonpatch.MergePatch(target, []byte(fragment))
if err != nil {
return nil, err
}
out, err := runtime.Decode(codec, patched)
if err != nil {
return nil, err
}
return out, nil
}
// DumpReaderToFile writes all data from the given io.Reader to the specified file
// (usually for temporary use).
func DumpReaderToFile(reader io.Reader, filename string) error {
f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return err
}
defer f.Close()
buffer := make([]byte, 1024)
for {
count, err := reader.Read(buffer)
if err == io.EOF {
break
}
if err != nil {
return err
}
_, err = f.Write(buffer[:c
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ount])
if err != nil {
return err
}
}
return nil
}
func GetServerSideApplyFlag(cmd *cobra.Command) bool {
return GetFlagBool(cmd, "server-side")
}
func GetForceConflictsFlag(cmd *cobra.Command) bool {
return GetFlagBool(cmd, "force-conflicts")
}
func GetFieldManagerFlag(cmd *cobra.Command) string {
return GetFlagString(cmd, "field-manager")
}
type DryRunStrategy int
const (
DryRunNone DryRunStrategy = iota
DryRunClient
DryRunServer
)
func GetDryRunStrategy(cmd *cobra.Command) (DryRunStrategy, error) {
var dryRunFlag = GetFlagString(cmd, "dry-run")
b, err := strconv.ParseBool(dryRunFlag)
// The flag is not a boolean
if err != nil {
switch dryRunFlag {
case cmd.Flag("dry-run").NoOptDefVal:
klog.Warning(`--dry-run is deprecated and can be replaced with --dry-run=client.`)
return DryRunClient, nil
case "client":
return DryRunClient, nil
case "server":
return DryRunServer, nil
case "none":
return DryRunNone, nil
default:
return DryRunNone, fmt.Errorf(`Invalid dry-run value (%v). Must be "none", "server", or "client".`, dryRunFlag)
}
}
// The flag was a boolean
if b {
klog.Warningf(`--dry-run=%v is deprecated (boolean value) and can be replaced with --dry-run=%s.`, dryRunFlag, "client")
return DryRunClient, nil
}
klog.Warningf(`--dry-run=%v is deprecated (boolean value) and can be replaced with --dry-run=%s.`, dryRunFlag, "none")
return DryRunNone, nil
}
// PrintFlagsWithDryRunStrategy sets a success message at print time for the dry run strategy
//
// TODO(juanvallejo): This can be cleaned up even further by creating
// a PrintFlags struct that binds the --dry-run flag, and whose
// ToPrinter method returns a printer that understands how to print
// this success message.
func PrintFlagsWithDryRunStrategy(printFlags *genericclioptions.PrintFlags, dryRunStrategy DryRunStrategy) *genericclioptions.PrintFlags {
switch dryRunStrategy {
case DryRunClient:
printFlags.Complete("%s (dry run)")
case DryRunServer:
printFlags.Complete("%s (server dry run)"
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
)
}
return printFlags
}
// GetResourcesAndPairs retrieves resources and "KEY=VALUE or KEY-" pair args from given args
func GetResourcesAndPairs(args []string, pairType string) (resources []string, pairArgs []string, err error) {
foundPair := false
for _, s := range args {
nonResource := (strings.Contains(s, "=") && s[0] != '=') || (strings.HasSuffix(s, "-") && s != "-")
switch {
case !foundPair && nonResource:
foundPair = true
fallthrough
case foundPair && nonResource:
pairArgs = append(pairArgs, s)
case !foundPair && !nonResource:
resources = append(resources, s)
case foundPair && !nonResource:
err = fmt.Errorf("all resources must be specified before %s changes: %s", pairType, s)
return
}
}
return
}
// ParsePairs retrieves new and remove pairs (if supportRemove is true) from "KEY=VALUE or KEY-" pair args
func ParsePairs(pairArgs []string, pairType string, supportRemove bool) (newPairs map[string]string, removePairs []string, err error) {
newPairs = map[string]string{}
if supportRemove {
removePairs = []string{}
}
var invalidBuf bytes.Buffer
var invalidBufNonEmpty bool
for _, pairArg := range pairArgs {
if strings.Contains(pairArg, "=") && pairArg[0] != '=' {
parts := strings.SplitN(pairArg, "=", 2)
if len(parts) != 2 {
if invalidBufNonEmpty {
invalidBuf.WriteString(", ")
}
invalidBuf.WriteString(pairArg)
invalidBufNonEmpty = true
} else {
newPairs[parts[0]] = parts[1]
}
} else if supportRemove && strings.HasSuffix(pairArg, "-") && pairArg != "-" {
removePairs = append(removePairs, pairArg[:len(pairArg)-1])
} else {
if invalidBufNonEmpty {
invalidBuf.WriteString(", ")
}
invalidBuf.WriteString(pairArg)
invalidBufNonEmpty = true
}
}
if invalidBufNonEmpty {
err = fmt.Errorf("invalid %s format: %s", pairType, invalidBuf.String())
return
}
return
}
// IsSiblingCommandExists receives a pointer to a cobra command and a target string.
// Returns true if the target string is found in the list of siblin
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
g commands.
func IsSiblingCommandExists(cmd *cobra.Command, targetCmdName string) bool {
for _, c := range cmd.Parent().Commands() {
if c.Name() == targetCmdName {
return true
}
}
return false
}
// DefaultSubCommandRun prints a command's help string to the specified output if no
// arguments (sub-commands) are provided, or a usage error otherwise.
func DefaultSubCommandRun(out io.Writer) func(c *cobra.Command, args []string) {
return func(c *cobra.Command, args []string) {
c.SetOutput(out)
RequireNoArguments(c, args)
c.Help()
CheckErr(ErrExit)
}
}
// RequireNoArguments exits with a usage error if extra arguments are provided.
func RequireNoArguments(c *cobra.Command, args []string) {
if len(args) > 0 {
CheckErr(UsageErrorf(c, "unknown command %q", strings.Join(args, " ")))
}
}
// StripComments will transform a YAML file into JSON, thus dropping any comments
// in it. Note that if the given file has a syntax error, the transformation will
// fail and we will manually drop all comments from the file.
func StripComments(file []byte) []byte {
stripped := file
stripped, err := yaml.ToJSON(stripped)
if err != nil {
stripped = ManualStrip(file)
}
return stripped
}
// ManualStrip is used for dropping comments from a YAML file
func ManualStrip(file []byte) []byte {
stripped := []byte{}
lines := bytes.Split(file, []byte("\n"))
for i, line := range lines {
if bytes.HasPrefix(bytes.TrimSpace(line), []byte("#")) {
continue
}
stripped = append(stripped, line...)
if i < len(lines)-1 {
stripped = append(stripped, '\n')
}
}
return stripped
}
// ScaleClientFunc provides a ScalesGetter
type ScaleClientFunc func(genericclioptions.RESTClientGetter) (scale.ScalesGetter, error)
// ScaleClientFn gives a way to easily override the function for unit testing if needed.
var ScaleClientFn ScaleClientFunc = scaleClient
// scaleClient gives you back scale getter
func scaleClient(restClientGetter genericclioptions.RESTClientGetter) (scale.ScalesGetter, error) {
discoveryClient, err :=
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
restClientGetter.ToDiscoveryClient()
if err != nil {
return nil, err
}
clientConfig, err := restClientGetter.ToRESTConfig()
if err != nil {
return nil, err
}
setKubernetesDefaults(clientConfig)
restClient, err := rest.RESTClientFor(clientConfig)
if err != nil {
return nil, err
}
resolver := scale.NewDiscoveryScaleKindResolver(discoveryClient)
mapper, err := restClientGetter.ToRESTMapper()
if err != nil {
return nil, err
}
return scale.New(restClient, mapper, dynamic.LegacyAPIPathResolverFunc, resolver), nil
}
func Warning(cmdErr io.Writer, newGeneratorName, oldGeneratorName string) {
fmt.Fprintf(cmdErr, "WARNING: New generator %q specified, "+
"but it isn't available. "+
"Falling back to %q.\n",
newGeneratorName,
oldGeneratorName,
)
}
package random
import (
"math/rand"
"strings"
"time"
)
type (
Random struct {
}
)
// Charsets
const (
Uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Lowercase = "abcdefghijklmnopqrstuvwxyz"
Alphabetic = Uppercase + Lowercase
Numeric = "0123456789"
Alphanumeric = Alphabetic + Numeric
Symbols = "`" + `~!@#$%^&*()-_+={}[]|\;:"<>,./?`
Hex = Numeric + "abcdef"
)
var (
global = New()
)
func New() *Random {
rand.Seed(time.Now().UnixNano())
return new(Random)
}
func (r *Random) String(length uint8, charsets ...string) string {
charset := strings.Join(charsets, "")
if charset == "" {
charset = Alphanumeric
}
b := make([]byte, length)
for i := range b {
b[i] = charset[rand.Int63()%int64(len(charset))]
}
return string(b)
}
func String(length uint8, charsets ...string) string {
return global.String(length, charsets...)
}
using System;
namespace SAEA.MVC
{
/// <summary>
/// 缓存
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class OutputCacheAttribute : Attribute, IFilter
{
int _duration = -1;
public int Order { get; set; } = -1;
public OutputCacheAttribute(int Duration = 60)
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
{
_duration = Duration;
}
/// <summary>
/// 方法执行前
/// </summary>
/// <returns></returns>
public string OnActionExecuting()
{
var result = "0,60";
if (!HttpContext.Current.Session.CachedPath.Contains(HttpContext.Current.Request.Url))
{
HttpContext.Current.Session.CachedPath.Add(HttpContext.Current.Request.Url, DateTime.Now.AddSeconds(_duration));
result = "0" + "," + _duration;
}
else
{
var cp = HttpContext.Current.Session.CachedPath.Get(HttpContext.Current.Request.Url);
if (cp != null)
{
result = "1" + "," + (int)(cp.Expired - DateTime.Now).TotalSeconds;
}
}
return result;
}
}
}
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six import iteritems
from ..configuration import Configuration
from ..api_client import ApiClient
class AdmissionregistrationApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_client
else:
if not config.api_client:
config.api_client = ApiClient()
self.api_client = config.api_client
def get_api_group(self, **kwargs):
"""
get information of a group
This method makes a synchronous HTTP request by default. To make
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_api_group(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.get_api_group_with_http_info(**kwargs)
else:
(data) = self.get_api_group_with_http_info(**kwargs)
return data
def get_api_group_with_http_info(self, **kwargs):
"""
get information of a group
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_api_group_with_http_info(callback=callback_function)
:param callback function: The callback function
for asynchronous request. (optional)
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""
all_params = []
all_params.append('callback')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_api_group" % key
)
params[key] = val
del params['kwargs']
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
collection_formats = {}
resource_path = '/apis/admissionregistration.k8s.io/'.replace('{format}', 'json')
path_params = {}
query_params = {}
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'])
# Authentication setting
auth_settings = ['BearerToken']
return self.api_client.call_api(resource_path, 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='V1APIGroup',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
/*
* This file is part of Telegram Server
* Copyright (C) 2015 Aykut Alparslan KOÇ
*
* Telegram Server 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 Foundati
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
on, either version 3 of the License, or
* (at your option) any later version.
*
* Telegram Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.telegram.tl.auth;
import org.telegram.mtproto.ProtocolBuffer;
import org.telegram.tl.*;
public class BindTempAuthKey extends TLObject {
public static final int ID = -841733627;
public long perm_auth_key_id;
public long nonce;
public int expires_at;
public byte[] encrypted_message;
public BindTempAuthKey() {
}
public BindTempAuthKey(long perm_auth_key_id, long nonce, int expires_at, byte[] encrypted_message){
this.perm_auth_key_id = perm_auth_key_id;
this.nonce = nonce;
this.expires_at = expires_at;
this.encrypted_message = encrypted_message;
}
@Override
public void deserialize(ProtocolBuffer buffer) {
perm_auth_key_id = buffer.readLong();
nonce = buffer.readLong();
expires_at = buffer.readInt();
encrypted_message = buffer.readBytes();
}
@Override
public ProtocolBuffer serialize() {
ProtocolBuffer buffer = new ProtocolBuffer(32);
serializeTo(buffer);
return buffer;
}
@Override
public void serializeTo(ProtocolBuffer buff) {
buff.writeInt(getConstructor());
buff.writeLong(perm_auth_key_id);
buff.writeLong(nonce);
buff.writeInt(expires_at);
buff.writeBytes(encrypted_message);
}
public int getConstructor() {
return ID;
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "chat-file-pause-big.png",
"scale" : "1x"
},
{
"idiom" : "universal",
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
"filename" : "chat-file-pause-big@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
# -*- encoding : utf-8 -*-
# ClientSideValidations Initializer
# Uncomment to disable uniqueness validator, possible security issue
# ClientSideValidations::Config.disabled_validators = [:uniqueness]
# Uncomment to validate number format with current I18n locale
# ClientSideValidations::Config.number_format_with_locale = true
# Uncomment the following block if you want each input field to have the validation messages attached.
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
unless html_tag =~ /^<label/
%{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
else
%{<div class="field_with_errors">#{html_tag}</div>}.html_safe
end
end
/*------------------------------------------------------------------------
* (The MIT License)
*
* Copyright (c) 2008-2011 Rhomobile, Inc.
*
* 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
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* http://rhomobile.com
*------------------------------------------------------------------------*/
#include "rhodes/JNIRhodes.h"
#include "rhodes/JNIRhoRuby.h"
#include "rhodes/jni/com_rhomobile_rhodes_alert_Alert.h"
#include "rhodes/jni/com_rhomobile_rhodes_alert_PopupActivity.h"
#include <common/rhoparams.h>
#include <common/RhodesApp.h>
#undef DEFAULT_LOGCATEGORY
#define DEFAULT_LOGCATEGORY "Alert"
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_alert_PopupActivity_doCallback
(JNIEnv *env, jclass, jstring url, jstring id, jstring title)
{
rho_rhodesapp_callPopupCallback(rho_cast<std::string>(env, url).c_str(),
rho_cast<std::string>(env, id).c_str(), rho_cast<std::string>(env, title).c_str());
}
RHO_GLOBAL void alert_show_status(const char* szTitle, const char* szMessage, const char* szHide)
{
JNIEnv *env = jnienv();
jclass cls = getJNIClass(RHODES_JAVA_CLASS_ALERT);
if (!cls) return;
jmethodID mid = getJNIClassStaticMethod(env, cls, "showStatusPopup", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
if (!mid) return;
RAWLOG_INFO("alert_show_status");
jhstring jhTitle = rho_cast<jstring>(env, szTitle);
jhstring jhMessage = rho_cast<jstring>(env, szMessage);
jhstring jhHide = rho_cast<jstring>(env, szHide);
env->CallStaticVoidMethod(cls, mid, jhTitle.get(),
jhMessage.get(), jhHide.get());
}
RHO_GLOBAL void alert_show_popup(rho_param *p)
{
JNIEnv *env = jnienv();
jclass cls = getJNIClass(RHODES_JAVA_CLASS_ALERT);
if (!cls) return;
jmethodID mid = getJNIClassStaticMethod(env, cls, "showPopup", "(Ljava/lang/Object;)V");
if (!mid) return;
if (p->type != RHO_PARAM_STRING && p->type != RHO_PARAM_HASH) {
RAWLOG_ERROR("show_popup: wrong input parameter (expect String or Hash)");
return;
}
jhobject paramsObj = RhoValueConverter(env).createObject(p
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
);
env->CallStaticVoidMethod(cls, mid, paramsObj.get());
}
RHO_GLOBAL void alert_hide_popup()
{
JNIEnv *env = jnienv();
jclass cls = getJNIClass(RHODES_JAVA_CLASS_ALERT);
if (!cls) return;
jmethodID mid = getJNIClassStaticMethod(env, cls, "hidePopup", "()V");
if (!mid) return;
env->CallStaticVoidMethod(cls, mid);
}
RHO_GLOBAL void alert_vibrate(int duration_ms)
{
JNIEnv *env = jnienv();
jclass cls = getJNIClass(RHODES_JAVA_CLASS_ALERT);
if (!cls) return;
jmethodID mid = getJNIClassStaticMethod(env, cls, "vibrate", "(I)V");
if (!mid) return;
env->CallStaticVoidMethod(cls, mid, duration_ms);
}
RHO_GLOBAL void alert_play_file(char* file_name, char *media_type)
{
JNIEnv *env = jnienv();
jclass cls = getJNIClass(RHODES_JAVA_CLASS_ALERT);
if (!cls) return;
jmethodID mid = getJNIClassStaticMethod(env, cls, "playFile", "(Ljava/lang/String;Ljava/lang/String;)V");
if (!mid) return;
jhstring jhFileName = rho_cast<jstring>(env, file_name);
jhstring jhMedia = rho_cast<jstring>(env, media_type);
env->CallStaticVoidMethod(cls, mid, jhFileName.get(), jhMedia.get());
}
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:starter_architecture_flutter_firebase/app/home/jobs/empty_content.dart';
import 'package:starter_architecture_flutter_firebase/app/top_level_providers.dart';
class AuthWidget extends ConsumerWidget {
const AuthWidget({
Key key,
@required this.signedInBuilder,
@required this.nonSignedInBuilder,
}) : super(key: key);
final WidgetBuilder nonSignedInBuilder;
final WidgetBuilder signedInBuilder;
@override
Widget build(BuildContext context, ScopedReader watch) {
final authStateChanges = watch(authStateChangesProvider);
return authStateChanges.when(
data: (user) => _data(context, user),
loading: () => const Scaffold(
body: Center(
child: CircularProgressI
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
ndicator(),
),
),
error: (_, __) => const Scaffold(
body: EmptyContent(
title: 'Something went wrong',
message: 'Can\'t load data right now.',
),
),
);
}
Widget _data(BuildContext context, User user) {
if (user != null) {
return signedInBuilder(context);
}
return nonSignedInBuilder(context);
}
}
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're
# using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug
# a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
[](https://travis-ci.org/ufoai/ufoai)
[](https://ci.appveyor.com/project/ufoai/ufoai)
Please see the [wiki](http://ufoai.sf.net) for more information on how to compile the game and the gamedata
<div align="center">
<a href="https://offline-plugin.now.sh/"><img src="https://rawgit.com/NekR/offline-plugin/master/logo/logo.svg" width="120" alt="offline-plugin logo"></a>
<h1><code>offline-plugin</code> for webpack</h1>
<a href="#backers"><img src="https://opencollective.com/offline-plugin/backers/badge.svg" alt="backers" /></a>
<a href="#sponsors"><img src="https://opencollective.com/offline-plugin/sponsors/badge.svg" alt="sponsors" /></a>
<a href="https://www.npmjs.com/package/offline-plugin"><img src="https://img.shields.io/npm/v/offline-plugin.svg?maxAge=3600&v4" alt="npm"></a>
<a href="https://www.npmjs.com/package/offline-plugin"><img src="https://img.shields.io/npm/dm/offline-plugin.svg?maxAge=3600" alt="npm"></a>
</div>
<br>
This plugin is intended to provide an offline experience for **webpack** projects. It uses **ServiceW
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
orker**, and **AppCache** as a fallback under the hood. Simply include this plugin in your ``webpack.config``, and the accompanying runtime in your client script, and your project will become offline ready by caching all (or some) of the webpack output assets.
<div align="center">
<h1>Sponsors</h1>
<a href="https://opencollective.com/offline-plugin/sponsor/0/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/1/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/2/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/3/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/4/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/5/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/6/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/7/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/8/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/9/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/10/website"
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/11/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/12/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/13/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/14/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/15/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/16/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/17/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/18/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/19/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/20/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/21/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/22/website" target="_blank"><im
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
g src="https://opencollective.com/offline-plugin/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/23/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/24/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/25/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/26/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/27/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/28/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/sponsor/29/website" target="_blank"><img src="https://opencollective.com/offline-plugin/sponsor/29/avatar.svg"></a>
Become a sponsor and get your logo on our README on Github with a link to your site.<br>
<strong><a href="https://opencollective.com/offline-plugin#sponsor">Become a sponsor</a></strong>
</div>
## Install
`npm install offline-plugin [--save-dev]`
## Setup
First, instantiate the plugin in your `webpack.config`:
```js
// webpack.config.js example
var OfflinePlugin = require('offline-plugin');
module.exports = {
// ...
plugins: [
// ... other plugins
// it's always better if OfflinePlugin is the last plugin added
new OfflinePlugin()
]
// ...
}
```
_(and optionally configure with [options](docs/options.md))_
Then, add the [runtime](docs/runtime.md) into your entry file (typically main entry):
```js
require('offline-plugin/runtime').install();
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
```
ES6/Babel/TypeScript
```js
import * as OfflinePluginRuntime from 'offline-plugin/runtime';
OfflinePluginRuntime.install();
```
> For more details of usage with `TypeScript` see [here](docs/typescript.md)
### `offline-plugin` isn't working?
:information_source: **[Troubleshooting](docs/troubleshooting.md)** | **[FAQ](docs/FAQ.md)**
## Docs
* [Options](docs/options.md)
* [Caches](docs/caches.md)
* [Update process](docs/updates.md)
* [Cache Maps](docs/cache-maps.md)
* [Runtime API](docs/runtime.md)
## Examples
* [Single Page Application](docs/examples/SPA.md)
## Articles
* [Easy Offline First Apps With Webpack's Offline Plugin](https://dev.to/kayis/easy-offline-first-apps-with-webpacks-offline-plugin)
* [Handling Client Side App Updates (with Service Workers)](https://zach.codes/handling-client-side-app-updates-with-service-workers/)
## Options
All options are optional and `offline-plugin` can be used without specifying them.
#### [See all available options here.](docs/options.md)
## Who is using `offline-plugin`
<div align="center">
<strong>Demo:<br><a href="https://offline-plugin.now.sh/"> Progressive Web App built with <code>offline-plugin</code></a></strong><br>
<div>(<a href="https://github.com/NekR/offline-plugin-pwa"><i>source code</i></a>)</div>
</div>
### Projects
* [React Boilerplate](https://github.com/mxstbr/react-boilerplate)
* [Phenomic](https://phenomic.io)
* [React, Universally](https://github.com/ctrlplusb/react-universally)
### PWAs
* [`offline-plugin` PWA](https://offline-plugin.now.sh/)
* [Omroep West](https://m.omroepwest.nl/)
* [Preact](https://preactjs.com/) ([source](https://github.com/developit/preact-www))
* [CodePan](https://codepan.net) ([source](https://github.com/egoist/codepan))
* [Offline Kanban](https://offline-kanban.herokuapp.com) ([source](https://github.com/sarmadsangi/offline-kanban))
* [Online Board](https://onlineboard.sonnywebdesign.com/) ([source](https://github.com/andreasonny83/online-board))
* [Fluid Outliner](https://fluid-notion.github.io/flui
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
d-outliner/) ([source](https://github.com/fluid-notion/fluid-outliner))
_If you are using `offline-plugin`, feel free to submit a PR to add your project to this list._
## Like `offline-plugin`?
Support it by giving [feedback](https://github.com/NekR/offline-plugin/issues), [contributing](CONTRIBUTING.md), becoming a [backer/sponsor](https://opencollective.com/offline-plugin) or just by 🌟 starring the project!
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/offline-plugin#backer)]
<a href="https://opencollective.com/offline-plugin/backer/0/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/1/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/2/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/3/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/4/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/5/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/6/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/7/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/offline-plugin/backer/8/website" target="_blank"><img src="https://opencollective.com/offline-plugin/backer/8/avatar.svg"></a>
<a hr
| null | null | null | null | null | null |
github_plus_top10pct_by_avg
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.