/*

	Zen Photo Default 1.0

*/

/* Basics
------------------------------ */
html {
	/* Moz */
	height: 100%;
}

/* Main Layout
------------------------------ */
body {
	background: #F5F5F3;
	margin: 0px;
	padding: 0px 0px 50px;
	text-align: center;
}
#main {
	display: inline-block;
	text-align: left;
	margin: 20px auto;
	width: 685px;
	background: #fff;
	padding: 20px 30px 70px;
	border-top: 1px solid #E6E6DF;
	border-right: 1px solid #E6E6DF;
	border-bottom: 5px solid #E6E6DF;
	border-left: 1px solid #E6E6DF;
}
#credit, #sort {
	margin: 0 auto;
	width: 640px;
	font-size: 85%;
	color: #96967E;
	text-align: center;
	clear: both;
}
#credit a, #sort a {
	color: #96967E;
	border-bottom: 1px dotted #96967E;
}
#credit a:hover, #sort a:hover {
	color: #BDBDAE;
	border-bottom: 1px solid #BDBDAE;
}

/* OpenStreetMap  */
div#osm_map {
	margin: 20px 0;
}

/* Scriptless Social Sharing */
ul.scriptless_socialsharing li {
	display: inline-block !important;
}

#gallerytitle {
	border-bottom: 1px solid #E6E6DF;
	padding-bottom: 14px;
	margin-bottom: 20px;
	/*min-height: 40px;
	_height: 40px;*/
}
#gallerytitle h2 {
	font-weight: normal;
	font-size: 12pt;
	margin-top: 18px;
	width:510px;
}

/* Link Styles
------------------------------ */
a:link, a:active, a:visited {
	text-decoration: none; color: #17A;
}

a:hover, a:focus {
	color: #6BD;
}

/* Text Styles
------------------------------ */
body {
	font: normal 82%/200% "Helvetica Neue", "Lucida Grande", Arial, Helvetica, sans-serif;
	color: #5A5A4B;
	line-height: 1.5em;
}
h2 {
	font: 115% "Helvetica Neue", "Lucida Grande", Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #002E5B;
}
h2 a:link, h2 a:visited {
	color: #8DB8CF;
}
h2 span {
	color: #8DB8CF;
}
h2 a:hover {
	color: #94c2e5;
}
h3 {
	font: 110% "Helvetica Neue", "Lucida Grande", Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #002E5B;
	margin-top: 30px;
}

/* Miscellaneous
------------------------------ */
hr {
	clear: both;
	height: 0;
	border: 0;
	border-top: 1px solid #E6E6DF;
	margin: 0 0 12px 0;
	padding: 0;
}
img {
	border: 0;
}
blockquote {
	border-left: 1px dotted #96967E;
	margin-left: 20px;
	padding-left: 20px;
	color: #363630;
}

#imagemetadata {
	text-align: right;
}

#imagemetadata table {
	text-align: left;
	line-height: 1em;
	border: 1px solid #ccc;
	top: 2em;
	right: 0px;
	background-color: #fafafa;
}

#imagemetadata table td {
	border-bottom: 1px solid #f0f0f0;
	background-color: #f8f8f8;
	padding: 2px 5px;
}

/* Page Navigation
------------------------------ */
ul.pagelist {
	clear: both;
	padding: 0;
	margin: 20px 0 0 0;
	list-style-type: none;
}
ul.pagelist li {
	display: inline;
}
ul.pagelist li a, ul.pagelist span.disabledlink {
	padding: 4px;
}
ul.pagelist li.current a {
	font-weight: bold;
	cursor: default;
	color: #5A5A4B;
}
ul.pagelist li.prev {
	margin-right: 10px;
}
ul.pagelist li.next {
	margin-left: 10px;
}
.disabledlink {
	color: #ddd;
	cursor: default;
}
.pagenav {
	clear: both;
}
.disabled_nav {
	visibility: hidden;
}

/* AJAX
------------------------------ */
#albumDescEditable, #albumTagsEditable {
	margin-bottom: 12px;
}
#imageDescEditable, #albumTagsEditable {
	margin-top: 24px;
}
#imageDesc, #exif_link {
	margin-bottom: 4px;
}

#exif_link {
	float: right;
}

/* Tags
------------------------------ */
ul.taglist {
	list-style-type: none;
	display: block;
	margin-bottom:20px !important;
}

ul.taglist li {
	background: url(../images/tag.png) no-repeat left center;
	list-style-type: none;
	padding-left: 18px;
	float:left;
	padding-right: 5px;
	color: #999999;
	display: inline;
	list-style-type: none;
}

span.tags_title {
	background: none;
	padding-right: 5px;
	padding-left: 0;
	float: left;
	display: block;
}

/* Image Thumbnails
------------------------------ */
#images {
	float: left;
	width: 650px;
	border: 0px solid gray;
}
.imagethumb a, .imagethumb a:hover {
	display: block;
	padding: 9px;
	margin: 0px 9px 9px 0px;
	line-height: 0px;
		border: 1px solid #e6e6e6;
		background-color: #f6f6f6;
}
.imagethumb a:visited {
		background-color: #fcfcfc;
		border: 1px solid #f8f8f8;
}
.imagethumb a:hover {
	background-color: #f3f3f3;
	border: 1px solid #cccccc;
}
.imagethumb {
	float: left;
	position: relative;
}
.albumdesc2 {
	line-height: 18px;
}

/* Album Thumbnails
------------------------------ */
#albums {
	float: left;
}
.album {
	margin: 0 12px 8px 0;
	padding: 10px 8px 2px 10px;
	float: left;
	width: 305px;
	border: 1px solid #E7F0F5;
	background: #F7F9FD;
	line-height: 100%;
	position: relative;
}
.album a img {  }
.album .thumb {
		float: left;
		margin-right: 6px;
}
.album h3 {
	padding: 0;
	margin: 0;
}
.album p {
	line-height: 12px;
	font-size: 11px;
		padding: 4px 0px 0px;
		margin: 0px;
}
.albumdesc small {
	color: #8DB8CF;
}

/* favorites styles */
.album .imageFavorites {
position: absolute;
right: 5px;
bottom: 5px;
z-index: 2000;
}
.imagethumb .imageFavorites {
position: absolute;
right: 12px;
bottom: 18px;
z-index: 2000;
}

.imageFavorites input:hover {
cursor: pointer !important;
}

/* Individual Image
------------------------------ */
.image {
	margin: 0;
	padding: 0;
	border: 0;
}
#image {
	text-align: center;
	line-height: 0;
}
.imgnav {
	float: right;
	width: 140px;
	text-align: center;
	border: 1px solid #D5E6EE;
	background: #EEF5F9;
	margin-top: -10px;
}
.imgnav .imgprevious a, .imgnav .imgnext a {
	display: block;
	width: 50%;
	height: 100%;
	float: left;
	padding: 4px 0;
	font-size: 120%;
	line-height: 180%;
	color: #237898;
}
.imgnav .imgprevious a:hover, .imgnav .imgnext a:hover {
	background-color: #fff;
	color: #002E5B;
}
.imgnav .imgprevious a {
	float: left;
}
.imgnav .imgnext a {
	float: right;
}
#narrow {
	margin: 0 auto;
	width: 440px;
}

/* Clear floats
------------------------------ */
.clearfloat {
	clear: both;
}

/* Comments
------------------------------ */
#comments {
	clear: both;
}
.comment {
	padding: 10px;
	border: 1px solid #E7F0F5;
	background: #FBFCFD;
	margin-bottom: 12px;
}
.commentmeta {
	margin-bottom: 12px;
}
.commentauthor {
	font-weight: bold;
}
.commentdate {
	margin-top: 12px;
	color: #8DB8CF;
	font-size: 85%;
}

/* jQuery pagination comments */

.Pagination {
	margin-bottom: 10px;
}

.Pagination span.current,
.Pagination span.next,
.Pagination a,
.Pagination a.next {
	padding:0px 4px 0px 4px;
	margin-left: 0px;
	margin-right: 0px;
}

.Pagination span.prev,
.Pagination a.prev {
	padding:0px 4px 0px 0px;
	margin-left: 0;
	margin-right: 0px;
}

img#captcha {
display: block;
float: left;
margin-bottom: 5px;
}
input#code {
float: left;
margin-left: 10px;
width: 10em !important;
}
#recaptcha_widget_div {
float: left;
}

/* Forms
------------------------------ */

.inputbox {
	width: 250px;
	padding: 2px;
}
textarea {
	padding: 4px;
	width: 100%;
	color: #5A5A4B;
	font: 100%/200% "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.checkbox {
	cursor: pointer;
}
.button {
	cursor: pointer;
	padding: 5px 10px;
}
label {
	cursor: pointer;
}
label:hover {
	color: #000;
}
#map {margin-left: -77px;}
#rating { margin-top: 10px; }

/* Search Box
------------------------------ */
#search {
	float: right;
	text-align: left;
	margin:0;
	padding:0;
	background: #fff;
}
#search input.button {
	padding: 1px;
	font-size: 80%;
}

#search ul {
border: 1px solid #ccc; position:absolute; text-align:left; list-style: none;
height: 8em; width: 20em; overflow: auto;
background-color: white;
z-index: 10;
}

#searchfields_icon {
position: relative;
top: 4px;
}
.clear {
	clear:both;
	height:10px;
}

/* Archive View
---------------------------- */
#archive{
	width: 300px;
	margin: 0 auto;
	text-align: center;
}
ul.archive * {
	padding:0;
	margin:0;
	list-style:none;
}
ul.archive .year {
	margin-top:10px;
	text-align: center;
	margin-bottom:5px;
	font-weight:bold;
	font-size:18px;
}
ul.archive .month {
	font-size: 14px;
	list-style:none;
	border-top:2px solid #E6E6DF;
	padding-top: 5px;
}

/* Tag Cloud
---------------------------- */
#tag_cloud {
	text-align: center;
	background: #eee;
}

#tag_cloud ul li {
	display: inline;
	list-style-type: none;
}

#tag_cloud p {
	padding:10px 0;
	margin:20px 0;
	background: #fff;
	border-top: 3px solid #E6E6DF;
	border-bottom: 3px solid #E6E6DF;
	font-size: 18px;
	font-weight:bold;
	text-align: center;
}
/* Error Messages
------------------------------ */
.error {
	color: #C33;
	font-weight: bold;
}
.errorbox {
	padding: 20px;
	background-color: #FDD;
	border-top: 1px solid #FAA;
	border-left: 1px solid #FAA;
	border-right: 1px solid #FAA;
	border-bottom: 5px solid #FAA;
	margin-bottom: 10px;
	font-size: 100%;
	color: #DD6666;
}
.errorbox h2 {
	color: #DD6666;
	font-size: 100%;
	font-weight: bold;
	margin: 0px;
}
.errorlist {
	list-style-type: none;
}

/* box for important notes
------------------------------ */
.notebox {
	padding: 5px 10px 5px 10px;
	background-color: #FFEFB7;
	border-width: 1px 1px 2px 1px;
	border-color: #FFDEB5;
	border-style: solid;
	margin-bottom: 10px;
	font-size: 100%;
	-moz-border-radius: 5px;
	-khtml-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
}

.notebox li {
	list-style-type: none;
}

.notebox h2,.notebox strong {
	color: #663300;
	font-size: 100%;
	font-weight: bold;
	margin-bottom: 1em;
}
/* Messages
------------------------------ */
.messagebox {
	background-color: #C0FFA8;
	padding: 10px 15px 10px 15px;
	border-width: 1px 1px 2px 1px;
	border-color: #8BD37C;
	border-style: solid;
	margin-bottom: 10px;
}

.messagebox h2 {
	color: #006633;
	font-size: 100%;
	font-weight: bold;
	margin-bottom: 1em;
}

.button {
	cursor: pointer;
	padding: 5px 10px;
}

label {
	cursor: pointer;
}

label:hover {
	color: #000;
}

#registration_form p,
#commentform p,
#mailform p {
clear: both;
}

#registration_form label,
#commentform label,
#mailform label {
width: 30% !important;
float: left;
display: block;
}
#registration_form label[for=admin_dataconfirmation],
#commentform label[for=comment_dataconfirmation],
#mailform label[for=dataconfirmation] {
	width: 100% !important;
	float: none;
}
#registration_form input[type="text"],
#registration_form input[type="password"],
#mailform input[type="text"],
#commentform input[type="text"] {
width: 65%;
}

input.button {
padding: 5px 8px 5px 8px!important;
margin: 5px 0 0 0;
}

#mailform textarea,
#commentform textarea#comment {
clear: both;
width: 95% !important;
height: 150px;
}

form input[type="submit"],
form input[type="reset"],
form input[type="button"],
a.slideshowlink {
background-color: #EEF5F9;
border: 0;
font-size: 12px;
}

a.slideshowlink {
padding: 5px 6px 3px 6px;
margin-top: 10px !important;
clear: both;
margin-top: 10px;
display: inline-block;
}

.clearall {
clear: both !important;
}
.clearleft {
clear: left !important;
}
.clearright {
clear: right !important;
}

/* reCaptcha
------------------------------ */
.g-recaptcha {
	display: inline-block;
}

{'repo_name': 'zenphoto/zenphoto', 'stars': '222', 'repo_language': 'PHP', 'file_name': 'jquery.ui.datepicker-tj.js', 'mime_type': 'text/plain', 'hash': 3618883577371371429, 'source_dataset': 'data'}


Compiling Embree
================

We recommend to use CMake to build Embree. Do not enable fast-math
optimizations; these might break Embree.

Linux and macOS
---------------

To compile Embree you need a modern C++ compiler that supports
C++11. Embree is tested with the following compilers:

Linux

  - Intel® Compiler 2020 Update 1
  - Intel® Compiler 2019 Update 4
  - Intel® Compiler 2017 Update 1
  - Intel® Compiler 2016 Update 3
  - Intel® Compiler 2015 Update 3
  - Clang 5.0.0
  - Clang 4.0.0
  - GCC 10.0.1 (Fedora 32) AVX512 support
  - GCC  8.3.1 (Fedora 28) AVX512 support
  - GCC  7.3.1 (Fedora 27) AVX2 support
  - GCC  7.3.1 (Fedora 26) AVX2 support
  - GCC  6.4.1 (Fedora 25) AVX2 support

macOS

  - Intel® Compiler 2020 Update 1
  - Intel® Compiler 2019 Update 4
  - Apple LLVM 10.0.1 (macOS 10.14.6)

Embree supports using the Intel® Threading Building Blocks (TBB) as the
tasking system. For performance and flexibility reasons we recommend
to use Embree with the Intel® Threading Building Blocks (TBB) and best
also use TBB inside your application. Optionally you can disable TBB
in Embree through the `EMBREE_TASKING_SYSTEM` CMake variable.

Embree supports the Intel® SPMD Program Compiler (ISPC), which allows
straightforward parallelization of an entire renderer. If you do not
want to use ISPC then you can disable `EMBREE_ISPC_SUPPORT` in
CMake. Otherwise, download and install the ISPC binaries (we have
tested ISPC version 1.9.1) from
[ispc.github.io](https://ispc.github.io/downloads.html). After
installation, put the path to `ispc` permanently into your `PATH`
environment variable or you need to correctly set the
`ISPC_EXECUTABLE` variable during CMake configuration.

You additionally have to install CMake 3.1.0 or higher and the developer
version of GLUT.

Under macOS, all these dependencies can be installed
using [MacPorts](http://www.macports.org/):

    sudo port install cmake tbb-devel glfw-devel

Depending on your Linux distribution you can install these dependencies
using `yum` or `apt-get`.  Some of these packages might already be
installed or might have slightly different names.

Type the following to install the dependencies using `yum`:

    sudo yum install cmake
    sudo yum install tbb-devel
    sudo yum install glfw-devel

Type the following to install the dependencies using `apt-get`:

    sudo apt-get install cmake-curses-gui
    sudo apt-get install libtbb-dev
    sudo apt-get install libglfw3-dev

Finally you can compile Embree using CMake. Create a build directory
inside the Embree root directory and execute `ccmake ..` inside this
build directory.

    mkdir build
    cd build
    ccmake ..

Per default CMake will use the compilers specified with the `CC` and
`CXX` environment variables. Should you want to use a different
compiler, run `cmake` first and set the `CMAKE_CXX_COMPILER` and
`CMAKE_C_COMPILER` variables to the desired compiler. For example, to
use the Intel® Compiler instead of the default GCC on most Linux machines
(`g++` and `gcc`), execute

    cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc ..

Similarly, to use Clang set the variables to `clang++` and `clang`,
respectively. Note that the compiler variables cannot be changed anymore
after the first run of `cmake` or `ccmake`.

Running `ccmake` will open a dialog where you can perform various
configurations as described below in [CMake Configuration]. After having
configured Embree, press `c` (for configure) and `g` (for generate) to
generate a Makefile and leave the configuration. The code can be
compiled by executing make.

    make

The executables will be generated inside the build folder. We recommend
to finally install the Embree library and header files on your
system. Therefore set the `CMAKE_INSTALL_PREFIX` to `/usr` in cmake
and type:

    sudo make install

If you keep the default `CMAKE_INSTALL_PREFIX` of `/usr/local` then
you have to make sure the path `/usr/local/lib` is in your
`LD_LIBRARY_PATH`.

You can also uninstall Embree again by executing:

    sudo make uninstall

If you cannot install Embree on your system (e.g. when you don't have
administrator rights) you need to add embree_root_directory/build to
your `LD_LIBRARY_PATH`.

Windows
-------

Embree is tested using the following compilers under Windows:

  - Visual Studio 2019
  - Visual Studio 2017
  - Visual Studio 2015 (Update\ 1)
  - Intel® Compiler 2019 Update 6
  - Intel® Compiler 2017 Update 8
  - LLVM Clang 9.0.0

To compile Embree for AVX-512 you have to use the Intel® Compiler.

Embree supports using the Intel® Threading Building Blocks (TBB) as the
tasking system. For performance and flexibility reasons we recommend
to use Embree with the Intel® Threading Building Blocks (TBB) and best
also use TBB inside your application. Optionally you can disable TBB
in Embree through the `EMBREE_TASKING_SYSTEM` CMake variable.

Embree will either find the Intel® Threading Building Blocks (TBB)
installation that comes with the Intel® Compiler, or you can install the
binary distribution of TBB directly from
[www.threadingbuildingblocks.org](https://www.threadingbuildingblocks.org/download)
into a folder named `tbb` into your Embree root directory. You also have
to make sure that the libraries `tbb.dll` and `tbb_malloc.dll` can be
found when executing your Embree applications, e.g. by putting the path
to these libraries into your `PATH` environment variable.

Embree supports the Intel® SPMD Program Compiler (ISPC), which allows
straightforward parallelization of an entire renderer. When installing
ISPC, make sure to download an ISPC version from
[ispc.github.io](https://ispc.github.io/downloads.html) that is
compatible with your Visual Studio version. After installation, put
the path to `ispc.exe` permanently into your `PATH` environment
variable or you need to correctly set the `ISPC_EXECUTABLE` variable
during CMake configuration. We have tested ISPC version 1.9.1. If you
do not want to use ISPC then you can disable `EMBREE_ISPC_SUPPORT` in
CMake.

You additionally have to install [CMake](http://www.cmake.org/download/)
(version 2.8.11 or higher). Note that you need a native Windows CMake
installation, because CMake under Cygwin cannot generate solution files
for Visual Studio.

### Using the IDE

Run `cmake-gui`, browse to the Embree sources, set the build directory
and click Configure. Now you can select the Generator, e.g. "Visual
Studio 12 2013" for a 32-bit build or "Visual Studio 12 2013 Win64"
for a 64-bit build.

To use a different compiler than the Microsoft Visual C++ compiler, you
additionally need to specify the proper compiler toolset through the
option "Optional toolset to use (-T parameter)". E.g. to use Clang for
compilation set the toolset to "LLVM_v142", to use the Intel®
Compiler 2017 for compilation set the toolset to "Intel C++
Compiler 17.0".

Do not change the toolset manually in a solution file (neither through
the project properties dialog, nor through the "Use Intel Compiler"
project context menu), because then some compiler specific command line
options cannot be set by CMake.

Most configuration parameters described in the [CMake Configuration]
can be set under Windows as well. Finally, click "Generate" to create
the Visual Studio solution files.

The following CMake options are only available under Windows:

+ `CMAKE_CONFIGURATION_TYPE`:  List of generated
  configurations. Default value is Debug;Release;RelWithDebInfo.

+  `USE_STATIC_RUNTIME`: Use the static version of the C/C++ runtime
  library. This option is turned OFF by default.

Use the generated Visual Studio solution file `embree2.sln` to compile
the project. To build Embree with support for the AVX2 instruction set
you need at least Visual Studio 2013 (Update\ 4).

We recommend enabling syntax highlighting for the `.ispc` source and
`.isph` header files. To do so open Visual Studio, go to Tools ⇒
Options ⇒ Text Editor ⇒ File Extension and add the `isph` and `ispc`
extensions for the "Microsoft Visual C++" editor.

### Using the Command Line

Embree can also be configured and built without the IDE using the Visual
Studio command prompt:

    cd path\to\embree
    mkdir build
    cd build
    cmake -G "Visual Studio 12 2013 Win64" ..
    cmake --build . --config Release

To use the Intel® Compiler, set the proper toolset, e.g. for Intel
Compiler 17.0:

    cmake -G "Visual Studio 12 2013 Win64" -T "Intel C++ Compiler 17.0" ..
    cmake --build . --config Release

You can also build only some projects with the `--target` switch.
Additional parameters after "`--`" will be passed to `msbuild`. For
example, to build the Embree library in parallel use

    cmake --build . --config Release --target embree -- /m

CMake Configuration
-------------------

The default CMake configuration in the configuration dialog should be
appropriate for most usages. The following list describes all
parameters that can be configured in CMake:

+ `CMAKE_BUILD_TYPE`: Can be used to switch between Debug mode
  (Debug), Release mode (Release) (default), and Release mode with
  enabled assertions and debug symbols (RelWithDebInfo).

+ `EMBREE_STACK_PROTECTOR`: Enables protection of return address
  from buffer overwrites. This option is OFF by default.

+ `EMBREE_ISPC_SUPPORT`: Enables ISPC support of Embree. This option
  is ON by default.

+ `EMBREE_STATIC_LIB`: Builds Embree as a static library (OFF by
  default). Further multiple static libraries are generated for the
  different ISAs selected (e.g. `embree3.a`, `embree3_sse42.a`,
  `embree3_avx.a`, `embree3_avx2.a`, `embree3_avx512knl.a`,
  `embree3_avx512skx.a`). You have to link these libraries in exactly
  this order of increasing ISA.

+ `EMBREE_API_NAMESPACE`: Specifies a namespace name to put all Embree
  API symbols inside. By default no namespace is used and plain C symbols
  exported.

+ `EMBREE_LIBRARY_NAME`: Specifies the name of the Embree library file
  created. By default the name embree3 is used.

+ `EMBREE_IGNORE_CMAKE_CXX_FLAGS`: When enabled, Embree ignores
  default CMAKE_CXX_FLAGS. This option is turned ON by default.

+ `EMBREE_TUTORIALS`: Enables build of Embree tutorials (default ON).

+ `EMBREE_BACKFACE_CULLING`: Enables backface culling, i.e. only
  surfaces facing a ray can be hit. This option is turned OFF by
  default.

+ `EMBREE_COMPACT_POLYS`: Enables compact tris/quads, i.e. only
  geomIDs and primIDs are stored inside the leaf nodes.

+ `EMBREE_FILTER_FUNCTION`: Enables the intersection filter function
  feature (ON by default).

+ `EMBREE_RAY_MASK`: Enables the ray masking feature (OFF by default).

+ `EMBREE_RAY_PACKETS`: Enables ray packet traversal kernels. This
  feature is turned ON by default. When turned on packet traversal is
  used internally and packets passed to rtcIntersect4/8/16 are kept
  intact in callbacks (when the ISA of appropiate width is enabled).

+ `EMBREE_IGNORE_INVALID_RAYS`: Makes code robust against the risk of
  full-tree traversals caused by invalid rays (e.g. rays containing
  INF/NaN as origins). This option is turned OFF by default.

+ `EMBREE_TASKING_SYSTEM`: Chooses between Intel® Threading TBB
  Building Blocks (TBB), Parallel Patterns Library (PPL) (Windows
  only), or an internal tasking system (INTERNAL). By default TBB is
  used.

+ `EMBREE_TBB_ROOT`: If Intel® Threading TBB Building Blocks (TBB)
  is used as a tasking system, search the library in this directory
  tree.

+ `EMBREE_TBB_POSTFIX`: If Intel® Threading TBB Building Blocks (TBB)
  is used as a tasking system, link to tbb<EMBREE_TBB_POSTFIX>.(so,dll,lib).
  Defaults to the empty string.

+ `EMBREE_TBB_DEBUG_ROOT`: If Intel® Threading TBB Building Blocks (TBB)
  is used as a tasking system, search the library in this directory
  tree in Debug mode. Defaults to `EMBREE_TBB_ROOT`.

+ `EMBREE_TBB_DEBUG_POSTFIX`: If Intel® Threading TBB Building Blocks (TBB)
  is used as a tasking system, link to tbb<EMBREE_TBB_DEBUG_POSTFIX>.(so,dll,lib)
  in Debug mode. Defaults to "_debug".

+ `EMBREE_MAX_ISA`: Select highest supported ISA (SSE2, SSE4.2, AVX,
  AVX2, AVX512KNL, AVX512SKX, or NONE). When set to NONE the
  EMBREE_ISA_* variables can be used to enable ISAs individually. By
  default the option is set to AVX2.

+ `EMBREE_ISA_SSE2`: Enables SSE2 when EMBREE_MAX_ISA is set to
  NONE. By default this option is turned OFF.

+ `EMBREE_ISA_SSE42`: Enables SSE4.2 when EMBREE_MAX_ISA is set to
  NONE. By default this option is turned OFF.

+ `EMBREE_ISA_AVX`: Enables AVX when EMBREE_MAX_ISA is set to NONE. By
  default this option is turned OFF.

+ `EMBREE_ISA_AVX2`: Enables AVX2 when EMBREE_MAX_ISA is set to
  NONE. By default this option is turned OFF.

+ `EMBREE_ISA_AVX512KNL`: Enables AVX-512 for Xeon Phi when
  EMBREE_MAX_ISA is set to NONE. By default this option is turned OFF.

+ `EMBREE_ISA_AVX512SKX`: Enables AVX-512 for Skylake when
  EMBREE_MAX_ISA is set to NONE. By default this option is turned OFF.

+ `EMBREE_GEOMETRY_TRIANGLE`: Enables support for trianglegeometries
  (ON by default).

+ `EMBREE_GEOMETRY_QUAD`: Enables support for quad geometries (ON by
  default).

+ `EMBREE_GEOMETRY_CURVE`: Enables support for curve geometries (ON by
  default).

+ `EMBREE_GEOMETRY_SUBDIVISION`: Enables support for subdivision
  geometries (ON by default).

+ `EMBREE_GEOMETRY_INSTANCE`: Enables support for instances (ON by
  default).

+ `EMBREE_GEOMETRY_USER`: Enables support for user defined geometries
  (ON by default).

+ `EMBREE_GEOMETRY_POINT`: Enables support for point geometries
  (ON by default).

+ `EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR`: Specifies a
  factor that controls the self intersection avoidance feature for flat
  curves. Flat curve intersections which are closer than
  curve_radius*`EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR` to
  the ray origin are ignored. A value of 0.0f disables self
  intersection avoidance while 2.0f is the default value.

+ `EMBREE_MIN_WIDTH`: Enabled the min-width feature, which allows
  increasing the radius of curves and points to match some amount of
  pixels. See [rtcSetGeometryMaxRadiusScale] for more details.

+ `EMBREE_MAX_INSTANCE_LEVEL_COUNT`: Specifies the maximum number of nested
  instance levels. Should be greater than 0; the default value is 1.
  Instances nested any deeper than this value will silently disappear in
  release mode, and cause assertions in debug mode.

Using Embree
=============

The most convenient way of using Embree is through CMake. Just let
CMake find Embree using the `FIND_PACKAGE` function inside your
`CMakeLists.txt` file:

     FIND_PACKAGE(embree 3.0 REQUIRED)

If you installed Embree using the Linux RPM or macOS PKG installer,
this will automatically find Embree. If you used the `zip` or `tar.gz`
files to extract Embree, you need to set the `embree_DIR` variable to
the folder you extracted Embree to. If you used the Windows MSI
installer, you need to set `embree_DIR` to point to the Embree install
location (e.g. `C:\Program Files\Intel\Embree3`).

The `FIND_PACKAGE` function will create an embree target that
you can add to your target link libraries:

    TARGET_LINK_LIBRARIES(application embree)

Now please have a look at the [Embree Tutorials] source code and the
[Embree API] section to get started.

\pagebreak

{'repo_name': 'embree/embree', 'stars': '1261', 'repo_language': 'C++', 'file_name': 'triangle_uv.fig', 'mime_type': 'text/plain', 'hash': -7060639458024358994, 'source_dataset': 'data'}


---
layout: news_post
title: "RubyConf Тайвань 2014 открыта к подаче заявок"
author: "Juanito Fatas"
translator: "gazay"
date: 2013-12-09 13:40:00 +0000
lang: ru
---

RubyConf Тайвань 2014 пройдет в Тайпей, Тайвань 25-26 апреля 2014 года.

Если вы хотите выступить на RubyConf Тайвань 2014, пожалуйста, отправьте
заявку. Любые темы, относящиеся к Ruby, приветствуются.

Возможны два формата выступления:

* Рассказ (25 минут),
* Сессия (50 минут).

**Заявки будут утверждены до 28 января 2014 года**

[Пожалуйста, заполните вашу заявку здесь.][submit-proposal]

Если у вас появились вопросы, вы можете обратиться по email:

contact@rubyconf.tw

[Подробности RubyConf Taiwan 2014 на Lanyrd.][rubyconf-tw-2014-lanyrd]

[rubyconf-tw-2014-lanyrd]: http://lanyrd.com/2014/rubyconftw/
[submit-proposal]: https://kktix.com/events/rubyconftw2014-cfp?locale=en

{'repo_name': 'ruby/www.ruby-lang.org', 'stars': '765', 'repo_language': 'Ruby', 'file_name': 'examples.js', 'mime_type': 'text/plain', 'hash': -8201774398337599520, 'source_dataset': 'data'}


/*
 * Copyright 2016 Hannes Dorfmann.
 *
 * 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 com.hannesdorfmann.mosby3.sample.mvi.businesslogic.searchengine;

import android.support.annotation.NonNull;
import com.hannesdorfmann.mosby3.sample.mvi.businesslogic.http.ProductBackendApiDecorator;
import com.hannesdorfmann.mosby3.sample.mvi.businesslogic.model.Product;
import io.reactivex.Observable;
import java.util.List;
import java.util.concurrent.TimeUnit;

/**
 * With this class you can search for products
 *
 * @author Hannes Dorfmann
 */
public class SearchEngine {
  private final ProductBackendApiDecorator backend;

  public SearchEngine(ProductBackendApiDecorator productApi) {
    this.backend = productApi;
  }

  public Observable<List<Product>> searchFor(@NonNull String searchQueryText) {

    if (searchQueryText == null) {
      return Observable.error(new NullPointerException("SearchQueryText == null"));
    }

    if (searchQueryText.length() == 0) {
      return Observable.error(new IllegalArgumentException("SearchQueryTest is blank"));
    }

    return backend.getAllProducts()
        .delay(1000, TimeUnit.MILLISECONDS)
        .flatMap(Observable::fromIterable)
        .filter(product -> isProductMatchingSearchCriteria(product, searchQueryText))
        .toList()
        .toObservable();
  }

  /**
   * Filters those items that contains the search query text in name, description or category
   */
  private boolean isProductMatchingSearchCriteria(Product product, String searchQueryText) {
    String words[] = searchQueryText.split(" ");
    for (String w : words) {
      if (product.getName().contains(w)) return true;
      if (product.getDescription().contains(w)) return true;
      if (product.getCategory().contains(w)) return true;
    }
    return false;
  }
}

{'repo_name': 'sockeqwe/mosby', 'stars': '5416', 'repo_language': 'Java', 'file_name': 'ViewGroupMvpDelegateImplTest.java', 'mime_type': 'text/x-java', 'hash': -1971681314872576017, 'source_dataset': 'data'}


//@flow

type CA = {|
  __type: 'A',
|};

type CB = {|
  __type: 'B',
|};

export opaque type C = CA | CB;

function t(applicationType: $PropertyType<C, '__type'>): number {
  switch (applicationType) {
    case 'A':
      return 42;
    case 'B':
      return 42;
    default:
      return 42;
  }
}

{'repo_name': 'facebook/flow', 'stars': '20773', 'repo_language': 'OCaml', 'file_name': 'Dockerfile', 'mime_type': 'text/plain', 'hash': -9032251212783293231, 'source_dataset': 'data'}


/*
 * Copyright 2016 Red Hat, Inc. and/or its affiliates
 * and other contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.keycloak.testsuite.util;

import org.keycloak.representations.idm.AuthenticationExecutionRepresentation;

/**
 * @author Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.
 */
public class ExecutionBuilder {

    private AuthenticationExecutionRepresentation rep = new AuthenticationExecutionRepresentation();

    public static ExecutionBuilder create() {
        return new ExecutionBuilder();
    }

    private ExecutionBuilder() {
    }

    public ExecutionBuilder id(String id) {
        rep.setId(id);
        return this;
    }

    public ExecutionBuilder parentFlow(String parentFlow) {
        rep.setParentFlow(parentFlow);
        return this;
    }

    public ExecutionBuilder requirement(String requirement) {
        rep.setRequirement(requirement);
        return this;
    }

    public ExecutionBuilder authenticator(String authenticator) {
        rep.setAuthenticator(authenticator);
        return this;
    }

    public ExecutionBuilder priority(int priority) {
        rep.setPriority(priority);
        return this;
    }

    public ExecutionBuilder authenticatorFlow(boolean authenticatorFlow) {
        rep.setAutheticatorFlow(authenticatorFlow);
        return this;
    }

    public AuthenticationExecutionRepresentation build() {
        return rep;
    }

}

{'repo_name': 'keycloak/keycloak', 'stars': '6650', 'repo_language': 'Java', 'file_name': 'pom.xml', 'mime_type': 'text/xml', 'hash': -7855265551154056810, 'source_dataset': 'data'}


package com.lyl.animationtest.one;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.transition.Explode;
import android.transition.Transition;
import android.transition.TransitionInflater;
import android.view.View;
import android.view.animation.AccelerateInterpolator;

import com.lyl.animationtest.R;
import com.lyl.animationtest.Sample;
import com.lyl.animationtest.base.BaseActivity;
import com.lyl.animationtest.databinding.ActivityTransition2Binding;

public class TransitionActivity2 extends BaseActivity {

    private int type;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(com.lyl.animationtest.R.layout.activity_transition2);
        bindData();
        setupWindowAnimations();
        setupLayout();
        setupToolbar();
    }

    private void bindData() {
        ActivityTransition2Binding transition2Binding = DataBindingUtil.setContentView(this, R.layout
                .activity_transition2);
        Sample sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);
        type = getIntent().getExtras().getInt(EXTRA_TYPE);
        transition2Binding.setTransition2Sample(sample);
    }

    private void setupWindowAnimations() {
        Transition transition;

        if (type == TYPE_PROGRAMMATICALLY) {
            transition = buildEnterTransition();
        } else {
            transition = TransitionInflater.from(this).inflateTransition(R.transition.explode);
        }

        getWindow().setEnterTransition(transition);
    }

    private void setupLayout() {
        findViewById(R.id.exit_button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               finishAfterTransition();
            }
        });
    }

    private Transition buildEnterTransition() {
        Explode enterTransition = new Explode();
        enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));
        // 修饰动画，定义动画的变化率
        enterTransition.setInterpolator(new AccelerateInterpolator());
        return enterTransition;
    }
}

{'repo_name': 'Wing-Li/Material-Animations-CN', 'stars': '125', 'repo_language': 'Java', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/x-java', 'hash': -5504923207864125817, 'source_dataset': 'data'}


/*
 * driver/i2c-s3.c
 *
 * Copyright(c) 2007-2020 Jianjun Jiang <8192542@qq.com>
 * Official site: http://xboot.org
 * Mobile phone: +86-18665388956
 * QQ: 8192542
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

#include <xboot.h>
#include <clk/clk.h>
#include <reset/reset.h>
#include <gpio/gpio.h>
#include <i2c/i2c.h>

enum {
	I2C_ADDR			= 0x000,
	I2C_XADDR			= 0x004,
	I2C_DATA 			= 0x008,
	I2C_CNTR			= 0x00c,
	I2C_STAT			= 0x010,
	I2C_CCR				= 0x014,
	I2C_SRST			= 0x018,
	I2C_EFR				= 0x01c,
	I2C_LCR				= 0x020,
};

enum {
	I2C_STAT_BUS_ERROR	= 0x00,
	I2C_STAT_TX_START	= 0x08,
	I2C_STAT_TX_RSTART	= 0x10,
	I2C_STAT_TX_AW_ACK	= 0x18,
	I2C_STAT_TX_AW_NAK	= 0x20,
	I2C_STAT_TXD_ACK	= 0x28,
	I2C_STAT_TXD_NAK	= 0x30,
	I2C_STAT_LOST_ARB	= 0x38,
	I2C_STAT_TX_AR_ACK	= 0x40,
	I2C_STAT_TX_AR_NAK	= 0x48,
	I2C_STAT_RXD_ACK	= 0x50,
	I2C_STAT_RXD_NAK	= 0x58,
	I2C_STAT_IDLE		= 0xf8,
};

struct i2c_s3_pdata_t {
	virtual_addr_t virt;
	char * clk;
	int reset;
	int sda;
	int sdacfg;
	int scl;
	int sclcfg;
};

static void s3_i2c_set_rate(struct i2c_s3_pdata_t * pdat, u64_t rate)
{
	u64_t pclk = clk_get_rate(pdat->clk);
	s64_t freq, delta, best = 0x7fffffffffffffffLL;
	int tm = 5, tn = 0;
	int m, n;

	for(n = 0; n <= 7; n++)
	{
		for(m = 0; m <= 15; m++)
		{
			freq = pclk / (10 * (m + 1) * (1 << n));
			delta = rate - freq;
			if(delta >= 0 && delta < best)
			{
				tm = m;
				tn = n;
				best = delta;
			}
			if(best == 0)
				break;
		}
	}
	write32(pdat->virt + I2C_CCR, ((tm & 0xf) << 3) | ((tn & 0x7) << 0));
}

static int s3_i2c_wait_status(struct i2c_s3_pdata_t * pdat)
{
	ktime_t timeout = ktime_add_ms(ktime_get(), 1);
	do {
		if((read32(pdat->virt + I2C_CNTR) & (1 << 3)))
			return read32(pdat->virt + I2C_STAT);
	} while(ktime_before(ktime_get(), timeout));
	return I2C_STAT_BUS_ERROR;
}

static int s3_i2c_start(struct i2c_s3_pdata_t * pdat)
{
	u32_t val;

	val = read32(pdat->virt + I2C_CNTR);
	val |= (1 << 5) | (1 << 3);
	write32(pdat->virt + I2C_CNTR, val);

	ktime_t timeout = ktime_add_ms(ktime_get(), 1);
	do {
		if(!(read32(pdat->virt + I2C_CNTR) & (1 << 5)))
			break;
	} while(ktime_before(ktime_get(), timeout));
	return s3_i2c_wait_status(pdat);
}

static int s3_i2c_stop(struct i2c_s3_pdata_t * pdat)
{
	u32_t val;

	val = read32(pdat->virt + I2C_CNTR);
	val |= (1 << 4) | (1 << 3);
	write32(pdat->virt + I2C_CNTR, val);

	ktime_t timeout = ktime_add_ms(ktime_get(), 1);
	do {
		if(!(read32(pdat->virt + I2C_CNTR) & (1 << 4)))
			break;
	} while(ktime_before(ktime_get(), timeout));
	return s3_i2c_wait_status(pdat);
}

static int s3_i2c_send_data(struct i2c_s3_pdata_t * pdat, u8_t dat)
{
	write32(pdat->virt + I2C_DATA, dat);
	write32(pdat->virt + I2C_CNTR, read32(pdat->virt + I2C_CNTR) | (1 << 3));
	return s3_i2c_wait_status(pdat);
}

static int s3_i2c_read(struct i2c_s3_pdata_t * pdat, struct i2c_msg_t * msg)
{
	u8_t * p = msg->buf;
	int len = msg->len;

	if(s3_i2c_send_data(pdat, (u8_t)(msg->addr << 1 | 1)) != I2C_STAT_TX_AR_ACK)
		return -1;

	write32(pdat->virt + I2C_CNTR, read32(pdat->virt + I2C_CNTR) | (1 << 2));
	while(len > 0)
	{
		if(len == 1)
		{
			write32(pdat->virt + I2C_CNTR, (read32(pdat->virt + I2C_CNTR) & ~(1 << 2)) | (1 << 3));
			if(s3_i2c_wait_status(pdat) != I2C_STAT_RXD_NAK)
				return -1;
		}
		else
		{
			write32(pdat->virt + I2C_CNTR, read32(pdat->virt + I2C_CNTR) | (1 << 3));
			if(s3_i2c_wait_status(pdat) != I2C_STAT_RXD_ACK)
				return -1;
		}
		*p++ = read32(pdat->virt + I2C_DATA);
		len--;
	}
	return 0;
}

static int s3_i2c_write(struct i2c_s3_pdata_t * pdat, struct i2c_msg_t * msg)
{
	u8_t * p = msg->buf;
	int len = msg->len;

	if(s3_i2c_send_data(pdat, (u8_t)(msg->addr << 1)) != I2C_STAT_TX_AW_ACK)
		return -1;
	while(len > 0)
	{
		if(s3_i2c_send_data(pdat, *p++) != I2C_STAT_TXD_ACK)
			return -1;
		len--;
	}
	return 0;
}

static int i2c_s3_xfer(struct i2c_t * i2c, struct i2c_msg_t * msgs, int num)
{
	struct i2c_s3_pdata_t * pdat = (struct i2c_s3_pdata_t *) i2c->priv;
	struct i2c_msg_t * pmsg = msgs;
	int i, res;

	if(!msgs || num <= 0)
		return 0;

	if(s3_i2c_start(pdat) != I2C_STAT_TX_START)
		return 0;

	for(i = 0; i < num; i++, pmsg++)
	{
		if(i != 0)
		{
			if(s3_i2c_start(pdat) != I2C_STAT_TX_RSTART)
				break;
		}
		if(pmsg->flags & I2C_M_RD)
			res = s3_i2c_read(pdat, pmsg);
		else
			res = s3_i2c_write(pdat, pmsg);
		if(res < 0)
			break;
	}
	s3_i2c_stop(pdat);

	return i;
}

static struct device_t * i2c_s3_probe(struct driver_t * drv, struct dtnode_t * n)
{
	struct i2c_s3_pdata_t * pdat;
	struct i2c_t * i2c;
	struct device_t * dev;
	virtual_addr_t virt = phys_to_virt(dt_read_address(n));
	char * clk = dt_read_string(n, "clock-name", NULL);

	pdat = malloc(sizeof(struct i2c_s3_pdata_t));
	if(!pdat)
		return NULL;

	i2c = malloc(sizeof(struct i2c_t));
	if(!i2c)
	{
		free(pdat);
		return NULL;
	}

	pdat->virt = virt;
	pdat->clk = strdup(clk);
	pdat->reset = dt_read_int(n, "reset", -1);
	pdat->sda = dt_read_int(n, "sda-gpio", -1);
	pdat->sdacfg = dt_read_int(n, "sda-gpio-config", -1);
	pdat->scl = dt_read_int(n, "scl-gpio", -1);
	pdat->sclcfg = dt_read_int(n, "scl-gpio-config", -1);

	i2c->name = alloc_device_name(dt_read_name(n), -1);
	i2c->xfer = i2c_s3_xfer;
	i2c->priv = pdat;

	clk_enable(pdat->clk);
	if(pdat->reset >= 0)
		reset_deassert(pdat->reset);
	if(pdat->sda >= 0)
	{
		if(pdat->sdacfg >= 0)
			gpio_set_cfg(pdat->sda, pdat->sdacfg);
		gpio_set_pull(pdat->sda, GPIO_PULL_UP);
	}
	if(pdat->scl >= 0)
	{
		if(pdat->sclcfg >= 0)
			gpio_set_cfg(pdat->scl, pdat->sclcfg);
		gpio_set_pull(pdat->scl, GPIO_PULL_UP);
	}
	s3_i2c_set_rate(pdat, (u64_t)dt_read_long(n, "clock-frequency", 400000));
	write32(pdat->virt + I2C_CNTR, 1 << 6);
	write32(pdat->virt + I2C_SRST, 1 << 0);

	if(!(dev = register_i2c(i2c, drv)))
	{
		clk_disable(pdat->clk);
		free(pdat->clk);
		free_device_name(i2c->name);
		free(i2c->priv);
		free(i2c);
		return NULL;
	}
	return dev;
}

static void i2c_s3_remove(struct device_t * dev)
{
	struct i2c_t * i2c = (struct i2c_t *)dev->priv;
	struct i2c_s3_pdata_t * pdat = (struct i2c_s3_pdata_t *)i2c->priv;

	if(i2c)
	{
		unregister_i2c(i2c);
		clk_disable(pdat->clk);
		free(pdat->clk);
		free_device_name(i2c->name);
		free(i2c->priv);
		free(i2c);
	}
}

static void i2c_s3_suspend(struct device_t * dev)
{
}

static void i2c_s3_resume(struct device_t * dev)
{
}

static struct driver_t i2c_s3 = {
	.name		= "i2c-s3",
	.probe		= i2c_s3_probe,
	.remove		= i2c_s3_remove,
	.suspend	= i2c_s3_suspend,
	.resume		= i2c_s3_resume,
};

static __init void i2c_s3_driver_init(void)
{
	register_driver(&i2c_s3);
}

static __exit void i2c_s3_driver_exit(void)
{
	unregister_driver(&i2c_s3);
}

driver_initcall(i2c_s3_driver_init);
driver_exitcall(i2c_s3_driver_exit);

{'repo_name': 'xboot/xboot', 'stars': '337', 'repo_language': 'C', 'file_name': 'org.eclipse.cdt.codan.core.prefs', 'mime_type': 'text/plain', 'hash': 6846333679428166232, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: 18a9a61be9f813340b3448618bedebff
TextureImporter:
  fileIDToRecycleName: {}
  serializedVersion: 2
  mipmaps:
    mipMapMode: 0
    enableMipMap: 1
    linearTexture: 0
    correctGamma: 0
    fadeOut: 0
    borderMipMap: 0
    mipMapFadeDistanceStart: 1
    mipMapFadeDistanceEnd: 3
  bumpmap:
    convertToNormalMap: 0
    externalNormalMap: 0
    heightScale: .25
    normalMapFilter: 0
  isReadable: 0
  grayScaleToAlpha: 0
  generateCubemap: 0
  cubemapConvolution: 0
  cubemapConvolutionSteps: 8
  cubemapConvolutionExponent: 1.5
  seamlessCubemap: 0
  textureFormat: -1
  maxTextureSize: 1024
  textureSettings:
    filterMode: 1
    aniso: 3
    mipBias: -1
    wrapMode: 1
  nPOTScale: 1
  lightmap: 1
  rGBM: 0
  compressionQuality: 100
  spriteMode: 0
  spriteExtrude: 1
  spriteMeshType: 1
  alignment: 0
  spritePivot: {x: .5, y: .5}
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
  spritePixelsToUnits: 100
  alphaIsTransparency: 0
  textureType: 6
  buildTargetSettings: []
  spriteSheet:
    sprites: []
  spritePackingTag:
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Unity-Technologies/Animation-Instancing', 'stars': '700', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': 6044203253094221946, 'source_dataset': 'data'}


\{% if User::require_acl ('admin/add') %}

\{"Add {{appname|cli\Filter::title}}"}

\{% end %}

{{ fields|make_fields_header (array_slice (%s, 1)) }}

\{% foreach items %}

{{ fields|make_fields_row (array_slice (%s, 1)) }}

			\{% if User::require_acl ('admin/edit') %}
			id }}">\{"Edit"}
			\{% end %}
			\{% if User::require_acl ('admin/delete') %}
			|
			id }}"
				onclick="return $.confirm_and_post (this, '\{"Are you sure you want to delete this {{appname|cli\Filter::spaces}}?"}')">\{"Delete"}
			\{% end %}

\{% end %}

\{! navigation/pager?style=text&url=[url]&total=[total]&count=[count]&limit=[limit] !}

{'repo_name': 'jbroadway/elefant', 'stars': '179', 'repo_language': 'PHP', 'file_name': 'jquery.js', 'mime_type': 'text/plain', 'hash': -154189556731961291, 'source_dataset': 'data'}


<!DOCTYPE html>

		<link rel="stylesheet" href="../../../codebase/webix.css" type="text/css" media="screen" charset="utf-8">

		<title>Toggle Button ('toggle')</title>

{'repo_name': 'sniperHW/distri.lua', 'stars': '142', 'repo_language': 'C', 'file_name': 'tutorial.md', 'mime_type': 'text/plain', 'hash': -2200627655485616825, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: a209a050d7fbe184c9445adb766bc735
NativeFormatImporter:
  externalObjects: {}
  mainObjectFileID: 11400000
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Unity-Technologies/SpaceshipDemo', 'stars': '365', 'repo_language': 'C#', 'file_name': 'EditorUserSettings.asset', 'mime_type': 'text/plain', 'hash': -2594020128387246317, 'source_dataset': 'data'}


// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build windows

// func servicemain(argc uint32, argv **uint16)
TEXT ·servicemain(SB),7,$0
	MOVL	CX, ·sArgc(SB)
	MOVQ	DX, ·sArgv(SB)

	SUBQ	$32, SP		// stack for the first 4 syscall params

	MOVQ	·sName(SB), CX
	MOVQ	$·servicectlhandler(SB), DX
	// BUG(pastarmovj): Figure out a way to pass in context in R8.
	// Set context to 123456 to test issue #25660.
	MOVQ	$123456, R8
	MOVQ	·cRegisterServiceCtrlHandlerExW(SB), AX
	CALL	AX
	CMPQ	AX, $0
	JE	exit
	MOVQ	AX, ·ssHandle(SB)

	MOVQ	·goWaitsH(SB), CX
	MOVQ	·cSetEvent(SB), AX
	CALL	AX

	MOVQ	·cWaitsH(SB), CX
	MOVQ	$4294967295, DX
	MOVQ	·cWaitForSingleObject(SB), AX
	CALL	AX

exit:
	ADDQ	$32, SP
	RET

// I do not know why, but this seems to be the only way to call
// ctlHandlerProc on Windows 7.

// func ·servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
TEXT ·servicectlhandler(SB),7,$0
	MOVQ	·ctlHandlerExProc(SB), AX
	JMP	AX

{'repo_name': 'jdcloud-bds/bds', 'stars': '1043', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': 6376998207133150043, 'source_dataset': 'data'}


# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 11:22-0500\n"
"PO-Revision-Date: 2020-04-19 18:49+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
"Language: ro\n"

#: ../3.0/prefsui.glade.h:1 ../3.2/prefsui.glade.h:1 ../3.4/prefsui.glade.h:1
msgid "Multi-Core System Monitor Preferences"
msgstr ""

#: ../3.0/prefsui.glade.h:2 ../3.2/prefsui.glade.h:2 ../3.4/prefsui.glade.h:2
msgid "Labels"
msgstr "Etichete"

#: ../3.0/prefsui.glade.h:3 ../3.2/prefsui.glade.h:3 ../3.4/prefsui.glade.h:3
msgid "Refresh Rate (ms)"
msgstr "Rata de reîmprospătare (ms)"

#: ../3.0/prefsui.glade.h:4 ../3.2/prefsui.glade.h:4
msgid "Height"
msgstr "Înălțime"

#: ../3.0/prefsui.glade.h:5 ../3.2/prefsui.glade.h:6 ../3.4/prefsui.glade.h:5
msgid "Background Color"
msgstr "Culoare de fundal"

#: ../3.0/prefsui.glade.h:6 ../3.2/prefsui.glade.h:7 ../3.4/prefsui.glade.h:6
msgid "General"
msgstr "General"

#: ../3.0/prefsui.glade.h:7 ../3.2/prefsui.glade.h:8 ../3.4/prefsui.glade.h:7
#: ../3.0/prefs.js:279 ../3.0/prefs.js:393 ../3.2/prefs.js:283
#: ../3.2/prefs.js:398 ../3.4/prefs.js:327 ../3.4/prefs.js:463
msgid "Enable"
msgstr "Activează"

#: ../3.0/prefsui.glade.h:8 ../3.2/prefsui.glade.h:9 ../3.4/prefsui.glade.h:8
msgid "Width"
msgstr "Lățime"

#: ../3.0/prefsui.glade.h:9 ../3.2/prefsui.glade.h:10 ../3.4/prefsui.glade.h:9
msgid "Colors"
msgstr "Culori"

#: ../3.0/prefsui.glade.h:10 ../3.2/prefsui.glade.h:11
#: ../3.4/prefsui.glade.h:10 ../3.0/DataProviders.js:97
#: ../3.0/DataProviders.js:104 ../3.0/prefs.js:183 ../3.2/DataProviders.js:97
#: ../3.2/DataProviders.js:104 ../3.2/prefs.js:187 ../3.4/DataProviders.js:55
#: ../3.4/prefs.js:195
msgid "CPU"
msgstr "CPU"

#: ../3.0/prefsui.glade.h:11 ../3.2/prefsui.glade.h:12
#: ../3.4/prefsui.glade.h:11
msgid "Usedup"
msgstr "Utilizat"

#: ../3.0/prefsui.glade.h:12 ../3.2/prefsui.glade.h:13
#: ../3.4/prefsui.glade.h:12
msgid "Cached"
msgstr "În cache"

#: ../3.0/prefsui.glade.h:13 ../3.2/prefsui.glade.h:14
#: ../3.4/prefsui.glade.h:13
msgid "Buffer"
msgstr "Tampon"

#: ../3.0/prefsui.glade.h:14 ../3.2/prefsui.glade.h:15
#: ../3.4/prefsui.glade.h:14
msgid "Free"
msgstr "Liber"

#: ../3.0/prefsui.glade.h:15 ../3.2/prefsui.glade.h:16
#: ../3.4/prefsui.glade.h:15 ../3.0/DataProviders.js:187
#: ../3.2/DataProviders.js:187 ../3.4/DataProviders.js:192
msgid "Swap"
msgstr "Swap"

#: ../3.0/prefsui.glade.h:16 ../3.2/prefsui.glade.h:17
#: ../3.4/prefsui.glade.h:16
msgid "Memory"
msgstr "Memorie"

#: ../3.0/prefsui.glade.h:17 ../3.2/prefsui.glade.h:18
#: ../3.4/prefsui.glade.h:17
msgid "Scaling"
msgstr "Scalare"

#: ../3.0/prefsui.glade.h:18 ../3.2/prefsui.glade.h:19
#: ../3.4/prefsui.glade.h:18
msgid "Auto Scale"
msgstr "Scalare automată"

#: ../3.0/prefsui.glade.h:19 ../3.2/prefsui.glade.h:20
#: ../3.4/prefsui.glade.h:19
msgid "Logarithmic"
msgstr "Logaritmică"

#: ../3.0/prefsui.glade.h:20 ../3.2/prefsui.glade.h:21
#: ../3.4/prefsui.glade.h:20
msgid "Devices"
msgstr "Dispozitive"

#: ../3.0/prefsui.glade.h:21 ../3.2/prefsui.glade.h:22
#: ../3.4/prefsui.glade.h:21
msgid "Network"
msgstr "Rețea"

#: ../3.0/prefsui.glade.h:22 ../3.2/prefsui.glade.h:23
#: ../3.4/prefsui.glade.h:22
msgid "Disk IO"
msgstr "Scriere/citire disc"

#: ../3.0/prefsui.glade.h:23 ../3.2/prefsui.glade.h:24
#: ../3.4/prefsui.glade.h:23
msgid "Scaling Description"
msgstr "Descriere scalare"

#: ../3.0/prefsui.glade.h:24 ../3.2/prefsui.glade.h:25
#: ../3.4/prefsui.glade.h:24
msgid "Close"
msgstr "Închide"

#: ../3.0/prefsui.glade.h:25 ../3.2/prefsui.glade.h:26
#: ../3.4/prefsui.glade.h:25
msgid ""
"Auto Scaling:\n"
"\tThis will scale the line graph by the largest reading within the\n"
"\tdisplayed area. Once the largest reading is no longer displayed\n"
"\tthe next largest becomes the new value by which the readings\n"
"\tare scaled. This lets the plot \"zoom\" to show details of the graph.\n"
"\tHowever, it also means that if there is a large reading small readings\n"
"\tmay become indistinguishable from 0. And if there are only small readings\n"
"\tthen slightly larger readings may appear larger than they should.\n"
"\tIf not enabled the largest value used will be the largest reading since\n"
"\tcinnamon was started.\n"
"\n"
"Logarithmic Scaling:\n"
"\tThis transforms the readings so that they are displayed using a\n"
"\tlogarithmic scale. If you are not familiar basically, it reduces the\n"
"\tlarge values so that they dont dominate the smaller readings."
msgstr ""
"Scalare automată:\n"
"\tSe va proporționa linia graficului după cea mai mare citire din\n"
"\tsecțiunea afișată. După ce această citire nu mai este afișată, \n"
"\turmătoarea cea mai mare devine citirea după care se proporționează\n"
"\tcelelalte citiri. Astfel se permite graficului mărirea pentru a arăta detalii.\n"
"\tÎnsă înseamnă și că dacă există o citire mare, citirile mici nu se pot\n"
"\tdistinge de 0. Iar dacă sunt numai citiri mici, citirile cu puțin mai mari\n"
"\tpot părea mai mari decât sunt. Dacă nu este activat, cea mai mare\n"
"\tde la pornirea Cinnamon va fi folosită ca cea mai mare valoare.\n"
"\n"
"Scalare logaritmică:\n"
"\tSe transformă citirile astfel încât sunt afișate folosind o scară\n"
"\tlogaritmică. Pe scurt, se reduc valorile mari astfel încât să nu\n"
"\tle domine pe cele mai mici."

#: ../3.2/prefsui.glade.h:5 ../3.4/prefsui.glade.h:4
msgid "Label Color"
msgstr "Culoare etichete"

#: ../3.0/DataProviders.js:103 ../3.2/DataProviders.js:103
#: ../3.4/DataProviders.js:123
msgid "------------- CPU ------------"
msgstr "------------- CPU ------------"

#: ../3.0/DataProviders.js:144 ../3.2/DataProviders.js:144
#: ../3.4/DataProviders.js:138
msgid "MEM"
msgstr "MEM"

#: ../3.0/DataProviders.js:150 ../3.2/DataProviders.js:150
#: ../3.4/DataProviders.js:158
msgid "----------- Memory -----------"
msgstr "----------- Memorie ----------"

#: ../3.0/DataProviders.js:151 ../3.2/DataProviders.js:151
msgid "Usedup:"
msgstr "Utilizat:"

#: ../3.0/DataProviders.js:152 ../3.2/DataProviders.js:152
#: ../3.4/DataProviders.js:159
msgid "Cached:"
msgstr "În cache:"

#: ../3.0/DataProviders.js:153 ../3.2/DataProviders.js:153
#: ../3.4/DataProviders.js:159
msgid "Buffer:"
msgstr "Tampon:"

#: ../3.0/DataProviders.js:154 ../3.2/DataProviders.js:154
#: ../3.4/DataProviders.js:159
msgid "Free:"
msgstr "Liber:"

#: ../3.0/DataProviders.js:181 ../3.2/DataProviders.js:181
#: ../3.4/DataProviders.js:173
msgid "SWAP"
msgstr "SWAP"

#: ../3.0/DataProviders.js:186 ../3.2/DataProviders.js:186
#: ../3.4/DataProviders.js:191
msgid "------------ Swap ------------"
msgstr "------------ Swap ------------"

#: ../3.0/DataProviders.js:251 ../3.2/DataProviders.js:251
#: ../3.4/DataProviders.js:202
msgid "NET"
msgstr "NET"

#: ../3.0/DataProviders.js:292 ../3.2/DataProviders.js:292
#: ../3.4/DataProviders.js:286
msgid "---------- Networks ----------"
msgstr "---------- Rețele ------------"

#: ../3.0/DataProviders.js:294 ../3.2/DataProviders.js:294
#: ../3.4/DataProviders.js:297
msgid "Down:"
msgstr "Descărcare:"

#: ../3.0/DataProviders.js:294 ../3.2/DataProviders.js:294
#: ../3.4/DataProviders.js:298
msgid "Up:"
msgstr "Încărcare:"

#: ../3.0/DataProviders.js:295 ../3.2/DataProviders.js:295
msgid "(KiB/s)"
msgstr "(KiB/s)"

#: ../3.0/DataProviders.js:368 ../3.2/DataProviders.js:368
#: ../3.4/DataProviders.js:314
msgid "DISK"
msgstr "DISC"

#: ../3.0/DataProviders.js:394 ../3.2/DataProviders.js:394
#: ../3.4/DataProviders.js:375
msgid "------------ Disks -----------"
msgstr "------------ Discuri ---------"

#: ../3.0/DataProviders.js:396 ../3.2/DataProviders.js:396
#: ../3.4/DataProviders.js:383
msgid "Read:"
msgstr "Citire:"

#: ../3.0/DataProviders.js:396 ../3.2/DataProviders.js:396
#: ../3.4/DataProviders.js:384
msgid "Write:"
msgstr "Scriere:"

#: ../3.0/DataProviders.js:397 ../3.2/DataProviders.js:397
msgid "(MiB/s)"
msgstr "(MiB/s)"

#: ../3.0/ErrorApplet.js:28 ../3.0/ErrorApplet.js:34 ../3.2/ErrorApplet.js:28
#: ../3.2/ErrorApplet.js:34
msgid "Multi-Core System Monitor Error."
msgstr "Eroare în Multi-Core System Monitor."

#: ../3.0/applet.js:132 ../3.2/applet.js:129 ../3.4/applet.js:254
msgid "Preferences"
msgstr "Preferințe"

#: ../3.0/applet.js:313 ../3.2/applet.js:324
msgid "Please install \"gir1.2-gtop-2.0\" package."
msgstr "Este necesară instalarea pachetului \"gir1.2-gtop-2.0\"."

#: ../3.0/prefs.js:290 ../3.2/prefs.js:294 ../3.4/prefs.js:338
msgid "Down"
msgstr "Descărcare"

#: ../3.0/prefs.js:298 ../3.2/prefs.js:302 ../3.4/prefs.js:346
msgid "Up"
msgstr "Încărcare"

#: ../3.0/prefs.js:406 ../3.2/prefs.js:414 ../3.4/prefs.js:479
msgid "Read"
msgstr "Citire"

#: ../3.0/prefs.js:414 ../3.2/prefs.js:423 ../3.4/prefs.js:488
msgid "Write"
msgstr "Scriere"

#: ../3.0/prefs.js:530 ../3.2/prefs.js:540
msgid "Error while saving file:"
msgstr "Eroare la salvarea fișierului:"

#: ../3.4/DataProviders.js:46
msgid "/s"
msgstr "/s"

#: ../3.4/DataProviders.js:126
msgid "Core"
msgstr "Nucleu"

#: ../3.4/DataProviders.js:159
msgid "Used:"
msgstr "Utilizat:"

#: ../3.4/applet.js:60
msgid "Dependency missing"
msgstr "Lipsește o dependință"

#: ../3.4/applet.js:62
msgid ""
"Please install the GTop package\n"
"\tUbuntu / Mint: gir1.2-gtop-2.0\n"
"\tFedora: libgtop2-devel\n"
"\tArch: libgtop\n"
"to use "
msgstr ""
"Este necesară instalarea pachetului GTop\n"
"\tUbuntu / Mint: gir1.2-gtop-2.0\n"
"\tFedora: libgtop2-devel\n"
"\tArch: libgtop\n"
"pentru a folosi"

{'repo_name': 'linuxmint/cinnamon-spices-applets', 'stars': '317', 'repo_language': 'JavaScript', 'file_name': 'fr.po', 'mime_type': 'text/x-po', 'hash': 5551673280430083296, 'source_dataset': 'data'}


// $Id: BinaryInterferenceModelC.nc,v 1.5 2010-06-29 22:07:51 scipio Exp $
/*
 * Copyright (c) 2005 Stanford University. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * - Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the
 *   distribution.
 * - Neither the name of the copyright holder nor the names of
 *   its contributors may be used to endorse or promote products derived
 *   from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/**
 * A binary interference model with length-independent packet error
 * rates (the old TOSSIM-packet story).
 *
 * @author Philip Levis
 * @date   December 2 2005
 */

#include <sim_binary.h>

module BinaryInterferenceModelC {
  provides interface SimpleRadioModel as Model;
}

implementation {

  message_t* outgoing;
  bool requestAck;

  void sim_binary_ack_handle(sim_event_t* evt)  {
    if (outgoing != NULL && requestAck) {
      signal Model.acked(outgoing);
    }
  }

  sim_event_t receiveEvent;
  sim_time_t clearTime = 0;
  bool collision = FALSE;
  message_t* incoming = NULL;
  int incomingSource;

  command bool Model.clearChannel() {
    dbg("Binary", "Checking clear channel @ %s: %i\n", sim_time_string(), (clearTime < sim_time()));
    return clearTime < sim_time();
  }

  void sim_schedule_ack(int source, sim_time_t time) {
    sim_event_t* ackEvent = (sim_event_t*)malloc(sizeof(sim_event_t));
    ackEvent->mote = source;
    ackEvent->force = 0;
    ackEvent->cancelled = 0;
    ackEvent->time = time;
    ackEvent->handle = sim_binary_ack_handle;
    ackEvent->cleanup = sim_queue_cleanup_event;
    sim_queue_insert(ackEvent);
  }

  void sim_binary_receive_handle(sim_event_t* evt) {
    // If there was no collision, and we pass the loss
    // rate...
    if (!collision) {
      double loss = sim_binary_loss(incomingSource, sim_node());
      int randVal = sim_random() % 1000000;
      dbg("Binary", "Handling receive event for %i.\n", sim_node());
      loss *= 1000000.0;
      if (randVal < (int)loss) {
	signal Model.receive(incoming);

	loss = sim_binary_loss(sim_node(), incomingSource);
	randVal = sim_random() % 1000000;
	loss *= 1000000.0;
	if (randVal < (int)loss) {
	  sim_schedule_ack(incomingSource, sim_time());
	}
      }
      else {
	dbg("Binary", "Packet lost.\n");
      }
    }
    else {
      dbg("Binary", "Receive event for %i was a collision.\n", sim_node());
    }
    incoming = NULL;
  }

  void enqueue_receive_event(int source, sim_time_t endTime, message_t* msg) {
    if (incoming == NULL) {
      dbg("Binary", "Formatting reception event for %i.\n", sim_node());
      receiveEvent.time = endTime;
      receiveEvent.mote = sim_node();
      receiveEvent.cancelled = 0;
      receiveEvent.force = 0;
      receiveEvent.handle = sim_binary_receive_handle;
      receiveEvent.cleanup = sim_queue_cleanup_none;
      incoming = msg;
      sim_queue_insert(&receiveEvent);
      incoming = msg;
      incomingSource = source;
    }
  }

  void sim_binary_put(int dest, message_t* msg, sim_time_t endTime, bool receive) {
    int prevNode = sim_node();
    sim_set_node(dest);
    if (clearTime < sim_time() && receive) {
      dbg("Binary", "Enqueing reception event for %i.\n", dest);
      enqueue_receive_event(prevNode, endTime - 1, msg);
      collision = FALSE;
    }
    else {
      collision = TRUE;
    }
    if (endTime > clearTime) {
      clearTime = endTime;
    }
    sim_set_node(prevNode);
  }

  command void Model.putOnAirToAll(message_t* msg, bool ack, sim_time_t endTime) {
    link_t* link = sim_binary_first(sim_node());
    requestAck = FALSE;
    outgoing = msg;
    dbg("Binary", "Node %i broadcasting, first link is 0x%p.\n", sim_node(), sim_binary_first(sim_node()));
    while (link != NULL) {
      int other = link->mote;
      dbg("Binary", "Node %i transmitting to %i.\n", sim_node(), other);
      sim_binary_put(other, msg, endTime, TRUE);
      link = sim_binary_next(link);
    }
  }

  command void Model.putOnAirTo(int dest, message_t* msg, bool ack, sim_time_t endTime) {
    link_t* link = sim_binary_first(sim_node());
    requestAck = ack;
    outgoing = msg;

    while (link != NULL) {
      int other = link->mote;
      sim_binary_put(other, msg, endTime, other == dest);
      dbg("Binary", "Node %i transmitting to %i.\n", sim_node(), dest);
      link = sim_binary_next(link);
    }
  }

 default event void Model.receive(message_t* msg) {}

}

{'repo_name': 'tinyos/tinyos-main', 'stars': '1052', 'repo_language': 'nesC', 'file_name': 'UartControl.nc', 'mime_type': 'text/plain', 'hash': 119463874248847000, 'source_dataset': 'data'}


/*
 * Copyright (C) 2015 Texas Instruments
 * Author: Jyri Sarha <jsarha@ti.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <drm/drmP.h>

#include <drm/drm_atomic.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_atomic_helper.h>
#include <uapi/drm/drm_fourcc.h>

#include "tilcdc_drv.h"

static struct drm_plane_funcs tilcdc_plane_funcs = {
	.update_plane	= drm_atomic_helper_update_plane,
	.disable_plane	= drm_atomic_helper_disable_plane,
	.destroy	= drm_plane_cleanup,
	.reset		= drm_atomic_helper_plane_reset,
	.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
	.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
};

static int tilcdc_plane_atomic_check(struct drm_plane *plane,
				     struct drm_plane_state *state)
{
	struct drm_crtc_state *crtc_state;
	struct drm_plane_state *old_state = plane->state;
	unsigned int pitch;

	if (!state->crtc)
		return 0;

	if (WARN_ON(!state->fb))
		return -EINVAL;

	if (state->crtc_x || state->crtc_y) {
		dev_err(plane->dev->dev, "%s: crtc position must be zero.",
			__func__);
		return -EINVAL;
	}

	crtc_state = drm_atomic_get_existing_crtc_state(state->state,
							state->crtc);
	/* we should have a crtc state if the plane is attached to a crtc */
	if (WARN_ON(!crtc_state))
		return 0;

	if (crtc_state->mode.hdisplay != state->crtc_w ||
	    crtc_state->mode.vdisplay != state->crtc_h) {
		dev_err(plane->dev->dev,
			"%s: Size must match mode (%dx%d == %dx%d)", __func__,
			crtc_state->mode.hdisplay, crtc_state->mode.vdisplay,
			state->crtc_w, state->crtc_h);
		return -EINVAL;
	}

	pitch = crtc_state->mode.hdisplay *
		state->fb->format->cpp[0];
	if (state->fb->pitches[0] != pitch) {
		dev_err(plane->dev->dev,
			"Invalid pitch: fb and crtc widths must be the same");
		return -EINVAL;
	}

	if (state->fb && old_state->fb &&
	    state->fb->format != old_state->fb->format) {
		dev_dbg(plane->dev->dev,
			"%s(): pixel format change requires mode_change\n",
			__func__);
		crtc_state->mode_changed = true;
	}

	return 0;
}

static void tilcdc_plane_atomic_update(struct drm_plane *plane,
				       struct drm_plane_state *old_state)
{
	struct drm_plane_state *state = plane->state;

	if (!state->crtc)
		return;

	if (WARN_ON(!state->fb || !state->crtc->state))
		return;

	tilcdc_crtc_update_fb(state->crtc,
			      state->fb,
			      state->crtc->state->event);
}

static const struct drm_plane_helper_funcs plane_helper_funcs = {
	.atomic_check = tilcdc_plane_atomic_check,
	.atomic_update = tilcdc_plane_atomic_update,
};

int tilcdc_plane_init(struct drm_device *dev,
		      struct drm_plane *plane)
{
	struct tilcdc_drm_private *priv = dev->dev_private;
	int ret;

	ret = drm_plane_init(dev, plane, 1,
			     &tilcdc_plane_funcs,
			     priv->pixelformats,
			     priv->num_pixelformats,
			     true);
	if (ret) {
		dev_err(dev->dev, "Failed to initialize plane: %d\n", ret);
		return ret;
	}

	drm_plane_helper_add(plane, &plane_helper_funcs);

	return 0;
}

{'repo_name': 'sslab-gatech/janus', 'stars': '122', 'repo_language': 'C', 'file_name': 'spectrum_span.h', 'mime_type': 'text/x-c', 'hash': -462546073020677436, 'source_dataset': 'data'}


/*
 * Copyright (c) 2016 gnome-pomodoro contributors
 *
 * 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 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 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/>.
 *
 * Authors: Kamil Prusko <kamilprusko@gmail.com>
 */

using GLib;

namespace Pomodoro
{
    public class TimerActionGroup : GLib.SimpleActionGroup
    {
        public Pomodoro.Timer timer { get; construct set; }

        private GLib.SimpleAction start_action;
        private GLib.SimpleAction stop_action;
        private GLib.SimpleAction pause_action;
        private GLib.SimpleAction resume_action;
        private GLib.SimpleAction state_action;

        public TimerActionGroup (Pomodoro.Timer timer)
        {
            this.timer = timer;

            timer.set_data<GLib.ActionGroup> ("action-group", this as GLib.ActionGroup);

            this.start_action = new GLib.SimpleAction ("start", null);
            this.start_action.activate.connect (this.activate_start);
            this.add_action (this.start_action);

            this.stop_action = new GLib.SimpleAction ("stop", null);
            this.stop_action.activate.connect (this.activate_stop);
            this.add_action (this.stop_action);

            this.pause_action = new GLib.SimpleAction ("pause", null);
            this.pause_action.activate.connect (this.activate_pause);
            this.add_action (this.pause_action);

            this.resume_action = new GLib.SimpleAction ("resume", null);
            this.resume_action.activate.connect (this.activate_resume);
            this.add_action (this.resume_action);

            this.state_action = new GLib.SimpleAction.stateful ("state",
                                                                GLib.VariantType.STRING,
                                                                new GLib.Variant.string (this.timer.state.name));
            this.state_action.activate.connect (this.activate_state);
            this.add_action (this.state_action);

            this.timer.state_changed.connect_after (this.on_timer_state_changed);
            this.timer.notify["is-paused"].connect_after (this.on_timer_is_paused_notify);

            this.update_action_states ();
        }

        public static GLib.ActionGroup for_timer (Pomodoro.Timer timer)
        {
            var action_group = timer.get_data<GLib.ActionGroup> ("action-group");

            if (action_group == null)
            {
                action_group = new TimerActionGroup (timer);
            }

            return action_group;
        }

        private void update_action_states ()
        {
            var is_disabled = this.timer.state is Pomodoro.DisabledState;
            var is_paused = this.timer.is_paused;

            this.start_action.set_enabled (is_disabled);
            this.stop_action.set_enabled (!is_disabled);
            this.pause_action.set_enabled (!is_disabled && !is_paused);
            this.resume_action.set_enabled (!is_disabled && is_paused);
            this.state_action.set_state (new GLib.Variant.string (this.timer.state.name));
        }

        private void on_timer_state_changed (Pomodoro.TimerState state,
                                             Pomodoro.TimerState previous_state)
        {
            this.update_action_states ();
        }

        private void on_timer_is_paused_notify ()
        {
            var is_disabled = this.timer.state is Pomodoro.DisabledState;
            var is_paused = this.timer.is_paused;

            this.pause_action.set_enabled (!is_disabled && !is_paused);
            this.resume_action.set_enabled (!is_disabled && is_paused);
        }

        private void activate_start (GLib.SimpleAction action,
                                     GLib.Variant?     parameter)
        {
            this.timer.start ();
        }

        private void activate_stop (GLib.SimpleAction action,
                                    GLib.Variant?     parameter)
        {
            this.timer.stop ();
        }

        private void activate_pause (GLib.SimpleAction action,
                                     GLib.Variant?     parameter)
        {
            this.timer.pause ();
        }

        private void activate_resume (GLib.SimpleAction action,
                                      GLib.Variant?     parameter)
        {
            this.timer.resume ();
        }

        private void activate_state (GLib.SimpleAction action,
                                     GLib.Variant?     parameter)
        {
            var state = Pomodoro.TimerState.lookup (parameter.get_string ());

            if (state != null)
            {
                this.timer.state = state;
            }
        }
    }
}

{'repo_name': 'codito/gnome-pomodoro', 'stars': '1279', 'repo_language': 'Vala', 'file_name': 'resources.xml', 'mime_type': 'text/xml', 'hash': -2138217082903856449, 'source_dataset': 'data'}


# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

"""
safe_eval module - methods intended to provide more restricted alternatives to
                   evaluate simple and/or untrusted code.

Methods in this module are typically used as alternatives to eval() to parse
OpenERP domain strings, conditions and expressions, mostly based on locals
condition/math builtins.
"""

# Module partially ripped from/inspired by several different sources:
#  - http://code.activestate.com/recipes/286134/
#  - safe_eval in lp:~xrg/openobject-server/optimize-5.0
#  - safe_eval in tryton http://hg.tryton.org/hgwebdir.cgi/trytond/rev/bbb5f73319ad
import dis
from opcode import HAVE_ARGUMENT, opmap, opname

import functools
from psycopg2 import OperationalError
from types import CodeType
import logging
import sys
import werkzeug

from .misc import ustr
from . import pycompat

import odoo

unsafe_eval = eval

__all__ = ['test_expr', 'safe_eval', 'const_eval']

# The time module is usually already provided in the safe_eval environment
# but some code, e.g. datetime.datetime.now() (Windows/Python 2.5.2, bug
# lp:703841), does import time.
_ALLOWED_MODULES = ['_strptime', 'math', 'time']

_UNSAFE_ATTRIBUTES = ['f_builtins', 'f_globals', 'f_locals', 'gi_frame',
                      'co_code', 'func_globals']
_POSSIBLE_OPCODES_P3 = [
    # opcodes for `with` statement cleanup process
    'WITH_CLEANUP_START', 'WITH_CLEANUP_FINISH',
    # f-strings
    'FORMAT_VALUE', 'BUILD_STRING',
    # extended iterable unpacking: LHS has * e.g. `a, *b, c = thing()`
    'UNPACK_EX',
    # collection literals with unpacking e.g. [*a, *b]
    'BUILD_LIST_UNPACK', 'BUILD_TUPLE_UNPACK', 'BUILD_SET_UNPACK', 'BUILD_MAP_UNPACK',
    # packs args/kwargs for calls with multiple unpacks e.g. foo(*a, *b, *c)
    'BUILD_TUPLE_UNPACK_WITH_CALL', 'BUILD_MAP_UNPACK_WITH_CALL',
    # ???
    'GET_YIELD_FROM_ITER',
    # matrix operator
    'BINARY_MATRIX_MULTIPLY', 'INPLACE_MATRIX_MULTIPLY',
]

# opcodes necessary to build literal values
_CONST_OPCODES = set(opmap[x] for x in [
    # stack manipulations
    'POP_TOP', 'ROT_TWO', 'ROT_THREE', 'ROT_FOUR', 'DUP_TOP', 'DUP_TOPX',
    'DUP_TOP_TWO',  # replaces DUP_TOPX in P3
    'LOAD_CONST',
    'RETURN_VALUE', # return the result of the literal/expr evaluation
    # literal collections
    'BUILD_LIST', 'BUILD_MAP', 'BUILD_TUPLE', 'BUILD_SET',
    # 3.6: literal map with constant keys https://bugs.python.org/issue27140
    'BUILD_CONST_KEY_MAP',
    # until Python 3.5, literal maps are compiled to creating an empty map
    # (pre-sized) then filling it key by key
    'STORE_MAP',
] if x in opmap)

# operations on literal values
_EXPR_OPCODES = _CONST_OPCODES.union(set(opmap[x] for x in [
    'UNARY_POSITIVE', 'UNARY_NEGATIVE', 'UNARY_NOT',
    'UNARY_INVERT', 'BINARY_POWER', 'BINARY_MULTIPLY',
    'BINARY_DIVIDE', 'BINARY_FLOOR_DIVIDE', 'BINARY_TRUE_DIVIDE',
    'BINARY_MODULO', 'BINARY_ADD', 'BINARY_SUBTRACT', 'BINARY_SUBSCR',
    'BINARY_LSHIFT', 'BINARY_RSHIFT', 'BINARY_AND', 'BINARY_XOR',
    'BINARY_OR', 'INPLACE_ADD', 'INPLACE_SUBTRACT', 'INPLACE_MULTIPLY',
    'INPLACE_DIVIDE', 'INPLACE_REMAINDER', 'INPLACE_POWER',
    'INPLACE_LEFTSHIFT', 'INPLACE_RIGHTSHIFT', 'INPLACE_AND',
    'INPLACE_XOR','INPLACE_OR', 'STORE_SUBSCR',
    # slice operations (Python 3 only has BUILD_SLICE)
    'SLICE+0', 'SLICE+1', 'SLICE+2', 'SLICE+3', 'BUILD_SLICE',
    # comprehensions
    'LIST_APPEND', 'MAP_ADD', 'SET_ADD',
    'COMPARE_OP',
] if x in opmap))

_SAFE_OPCODES = _EXPR_OPCODES.union(set(opmap[x] for x in [
    'POP_BLOCK', 'POP_EXCEPT', # Seems to be a special-case of POP_BLOCK for P3
    'SETUP_LOOP', 'BREAK_LOOP', 'CONTINUE_LOOP',
    'MAKE_FUNCTION', 'CALL_FUNCTION',
    'EXTENDED_ARG',  # P3.6 for long jump offsets.
    # P3: https://bugs.python.org/issue27213
    'CALL_FUNCTION_EX',
    # Already in P2 but apparently the first one is used more aggressively in P3
    'CALL_FUNCTION_KW', 'CALL_FUNCTION_VAR', 'CALL_FUNCTION_VAR_KW',
    # Added in P3.7 https://bugs.python.org/issue26110
    'CALL_METHOD', 'LOAD_METHOD',
    'GET_ITER', 'FOR_ITER', 'YIELD_VALUE',
    'JUMP_FORWARD', 'JUMP_IF_TRUE', 'JUMP_IF_FALSE', 'JUMP_ABSOLUTE',
    # Added in P3.8: https://bugs.python.org/issue17611
    'BEGIN_FINALLY', 'CALL_FINALLY', 'POP_FINALLY',
    # New in Python 2.7 - http://bugs.python.org/issue4715 :
    'JUMP_IF_FALSE_OR_POP', 'JUMP_IF_TRUE_OR_POP', 'POP_JUMP_IF_FALSE',
    'POP_JUMP_IF_TRUE', 'SETUP_EXCEPT', 'SETUP_FINALLY', 'END_FINALLY',
    'RAISE_VARARGS', 'LOAD_NAME', 'STORE_NAME', 'DELETE_NAME', 'LOAD_ATTR',
    'LOAD_FAST', 'STORE_FAST', 'DELETE_FAST', 'UNPACK_SEQUENCE',
    'LOAD_GLOBAL', # Only allows access to restricted globals
] if x in opmap))

_logger = logging.getLogger(__name__)

if hasattr(dis, 'get_instructions'):
    def _get_opcodes(codeobj):
        """_get_opcodes(codeobj) -> [opcodes]

        Extract the actual opcodes as an iterator from a code object

        >>> c = compile("[1 + 2, (1,2)]", "", "eval")
        >>> list(_get_opcodes(c))
        [100, 100, 23, 100, 100, 102, 103, 83]
        """
        return (i.opcode for i in dis.get_instructions(codeobj))
else:
    def _get_opcodes(codeobj):
        i = 0
        byte_codes = codeobj.co_code
        while i < len(byte_codes):
            code = ord(byte_codes[i:i+1])
            yield code

            if code >= HAVE_ARGUMENT:
                i += 3
            else:
                i += 1

def assert_no_dunder_name(code_obj, expr):
    """ assert_no_dunder_name(code_obj, expr) -> None

    Asserts that the code object does not refer to any "dunder name"
    (__$name__), so that safe_eval prevents access to any internal-ish Python
    attribute or method (both are loaded via LOAD_ATTR which uses a name, not a
    const or a var).

    Checks that no such name exists in the provided code object (co_names).

    :param code_obj: code object to name-validate
    :type code_obj: CodeType
    :param str expr: expression corresponding to the code object, for debugging
                     purposes
    :raises NameError: in case a forbidden name (containing two underscores)
                       is found in ``code_obj``

    .. note:: actually forbids every name containing 2 underscores
    """
    for name in code_obj.co_names:
        if "__" in name or name in _UNSAFE_ATTRIBUTES:
            raise NameError('Access to forbidden name %r (%r)' % (name, expr))

def assert_valid_codeobj(allowed_codes, code_obj, expr):
    """ Asserts that the provided code object validates against the bytecode
    and name constraints.

    Recursively validates the code objects stored in its co_consts in case
    lambdas are being created/used (lambdas generate their own separated code
    objects and don't live in the root one)

    :param allowed_codes: list of permissible bytecode instructions
    :type allowed_codes: set(int)
    :param code_obj: code object to name-validate
    :type code_obj: CodeType
    :param str expr: expression corresponding to the code object, for debugging
                     purposes
    :raises ValueError: in case of forbidden bytecode in ``code_obj``
    :raises NameError: in case a forbidden name (containing two underscores)
                       is found in ``code_obj``
    """
    assert_no_dunder_name(code_obj, expr)

    # almost twice as fast as a manual iteration + condition when loading
    # /web according to line_profiler
    codes = set(_get_opcodes(code_obj)) - allowed_codes
    if codes:
        raise ValueError("forbidden opcode(s) in %r: %s" % (expr, ', '.join(opname[x] for x in codes)))

    for const in code_obj.co_consts:
        if isinstance(const, CodeType):
            assert_valid_codeobj(allowed_codes, const, 'lambda')

def test_expr(expr, allowed_codes, mode="eval"):
    """test_expr(expression, allowed_codes[, mode]) -> code_object

    Test that the expression contains only the allowed opcodes.
    If the expression is valid and contains only allowed codes,
    return the compiled code object.
    Otherwise raise a ValueError, a Syntax Error or TypeError accordingly.
    """
    try:
        if mode == 'eval':
            # eval() does not like leading/trailing whitespace
            expr = expr.strip()
        code_obj = compile(expr, "", mode)
    except (SyntaxError, TypeError, ValueError):
        raise
    except Exception as e:
        exc_info = sys.exc_info()
        pycompat.reraise(ValueError, ValueError('"%s" while compiling\n%r' % (ustr(e), expr)), exc_info[2])
    assert_valid_codeobj(allowed_codes, code_obj, expr)
    return code_obj

def const_eval(expr):
    """const_eval(expression) -> value

    Safe Python constant evaluation

    Evaluates a string that contains an expression describing
    a Python constant. Strings that are not valid Python expressions
    or that contain other code besides the constant raise ValueError.

    >>> const_eval("10")
    10
    >>> const_eval("[1,2, (3,4), {'foo':'bar'}]")
    [1, 2, (3, 4), {'foo': 'bar'}]
    >>> const_eval("1+2")
    Traceback (most recent call last):
    ...
    ValueError: opcode BINARY_ADD not allowed
    """
    c = test_expr(expr, _CONST_OPCODES)
    return unsafe_eval(c)

def expr_eval(expr):
    """expr_eval(expression) -> value

    Restricted Python expression evaluation

    Evaluates a string that contains an expression that only
    uses Python constants. This can be used to e.g. evaluate
    a numerical expression from an untrusted source.

    >>> expr_eval("1+2")
    3
    >>> expr_eval("[1,2]*2")
    [1, 2, 1, 2]
    >>> expr_eval("__import__('sys').modules")
    Traceback (most recent call last):
    ...
    ValueError: opcode LOAD_NAME not allowed
    """
    c = test_expr(expr, _EXPR_OPCODES)
    return unsafe_eval(c)

def _import(name, globals=None, locals=None, fromlist=None, level=-1):
    if globals is None:
        globals = {}
    if locals is None:
        locals = {}
    if fromlist is None:
        fromlist = []
    if name in _ALLOWED_MODULES:
        return __import__(name, globals, locals, level)
    raise ImportError(name)
_BUILTINS = {
    '__import__': _import,
    'True': True,
    'False': False,
    'None': None,
    'bytes': bytes,
    'str': str,
    'unicode': str,
    'bool': bool,
    'int': int,
    'float': float,
    'enumerate': enumerate,
    'dict': dict,
    'list': list,
    'tuple': tuple,
    'map': map,
    'abs': abs,
    'min': min,
    'max': max,
    'sum': sum,
    'reduce': functools.reduce,
    'filter': filter,
    'round': round,
    'len': len,
    'repr': repr,
    'set': set,
    'all': all,
    'any': any,
    'ord': ord,
    'chr': chr,
    'divmod': divmod,
    'isinstance': isinstance,
    'range': range,
    'xrange': range,
    'zip': zip,
    'Exception': Exception,
}
def safe_eval(expr, globals_dict=None, locals_dict=None, mode="eval", nocopy=False, locals_builtins=False):
    """safe_eval(expression[, globals[, locals[, mode[, nocopy]]]]) -> result

    System-restricted Python expression evaluation

    Evaluates a string that contains an expression that mostly
    uses Python constants, arithmetic expressions and the
    objects directly provided in context.

    This can be used to e.g. evaluate
    an OpenERP domain expression from an untrusted source.

    :throws TypeError: If the expression provided is a code object
    :throws SyntaxError: If the expression provided is not valid Python
    :throws NameError: If the expression provided accesses forbidden names
    :throws ValueError: If the expression provided uses forbidden bytecode
    """
    if type(expr) is CodeType:
        raise TypeError("safe_eval does not allow direct evaluation of code objects.")

    # prevent altering the globals/locals from within the sandbox
    # by taking a copy.
    if not nocopy:
        # isinstance() does not work below, we want *exactly* the dict class
        if (globals_dict is not None and type(globals_dict) is not dict) \
                or (locals_dict is not None and type(locals_dict) is not dict):
            _logger.warning(
                "Looks like you are trying to pass a dynamic environment, "
                "you should probably pass nocopy=True to safe_eval().")
        if globals_dict is not None:
            globals_dict = dict(globals_dict)
        if locals_dict is not None:
            locals_dict = dict(locals_dict)

    if globals_dict is None:
        globals_dict = {}

    globals_dict['__builtins__'] = _BUILTINS
    if locals_builtins:
        if locals_dict is None:
            locals_dict = {}
        locals_dict.update(_BUILTINS)
    c = test_expr(expr, _SAFE_OPCODES, mode=mode)
    try:
        return unsafe_eval(c, globals_dict, locals_dict)
    except odoo.exceptions.except_orm:
        raise
    except odoo.exceptions.Warning:
        raise
    except odoo.exceptions.RedirectWarning:
        raise
    except odoo.exceptions.AccessDenied:
        raise
    except odoo.exceptions.AccessError:
        raise
    except werkzeug.exceptions.HTTPException:
        raise
    except odoo.http.AuthenticationError:
        raise
    except OperationalError:
        # Do not hide PostgreSQL low-level exceptions, to let the auto-replay
        # of serialized transactions work its magic
        raise
    except odoo.exceptions.MissingError:
        raise
    except Exception as e:
        exc_info = sys.exc_info()
        pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
def test_python_expr(expr, mode="eval"):
    try:
        test_expr(expr, _SAFE_OPCODES, mode=mode)
    except (SyntaxError, TypeError, ValueError) as err:
        if len(err.args) >= 2 and len(err.args[1]) >= 4:
            error = {
                'message': err.args[0],
                'filename': err.args[1][0],
                'lineno': err.args[1][1],
                'offset': err.args[1][2],
                'error_line': err.args[1][3],
            }
            msg = "%s : %s at line %d\n%s" % (type(err).__name__, error['message'], error['lineno'], error['error_line'])
        else:
            msg = ustr(err)
        return msg
    return False

{'repo_name': 'odoo/odoo', 'stars': '18107', 'repo_language': 'JavaScript', 'file_name': 'format', 'mime_type': 'text/plain', 'hash': -550429779134841746, 'source_dataset': 'data'}


<!DOCTYPE html lang="en">

        <title>{{ title }}</title>
        {% include 'includes/head.html' %}

        {% include 'includes/logo_header.html' %}

            home
            bitcoin

Bitcoin Explorer

            <form action="/explorer/search" method="POST">
                <input class="ui-corner-all bitcoind_search_input" name="search" type="text">
                <input type="submit" class="ui-button ui-widget ui-corner-all bitcoind_search_button" value="Search">

                Search for addresses, blocks, or transactions...
            </form>

Address

Address

{{address}}

Confirmed Balance

{{confirmed_balance}} BTC

Unconfirmed Balance

{{unconfirmed_balance}} BTC

Transactions

                TX ID
                Block

                {% for tx in txs %}

                        {{ tx.tx_hash }}
                        {% if tx.height %} {{ tx.height }} {% else %} Unconfirmed {% endif %}

                {% endfor %}

        {% include 'includes/footer.html' %}

{'repo_name': 'mynodebtc/mynode', 'stars': '173', 'repo_language': 'HTML', 'file_name': 'fan_control.service', 'mime_type': 'text/plain', 'hash': 5863401119604433980, 'source_dataset': 'data'}


//===- llvm/Analysis/FindUsedTypes.h - Find all Types in use ----*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass is used to seek out all of the types in use by the program.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_ANALYSIS_FINDUSEDTYPES_H
#define LLVM_ANALYSIS_FINDUSEDTYPES_H

#include "llvm/Pass.h"
#include <set>

namespace llvm {

class Type;
class Value;

class FindUsedTypes : public ModulePass {
  std::set<const Type *> UsedTypes;
public:
  static char ID; // Pass identification, replacement for typeid
  FindUsedTypes() : ModulePass(ID) {}

  /// getTypes - After the pass has been run, return the set containing all of
  /// the types used in the module.
  ///
  const std::set<const Type *> &getTypes() const { return UsedTypes; }

  /// Print the types found in the module.  If the optional Module parameter is
  /// passed in, then the types are printed symbolically if possible, using the
  /// symbol table from the module.
  ///
  void print(raw_ostream &o, const Module *M) const;

private:
  /// IncorporateType - Incorporate one type and all of its subtypes into the
  /// collection of used types.
  ///
  void IncorporateType(const Type *Ty);

  /// IncorporateValue - Incorporate all of the types used by this value.
  ///
  void IncorporateValue(const Value *V);

public:
  /// run - This incorporates all types used by the specified module
  bool runOnModule(Module &M);

  /// getAnalysisUsage - We do not modify anything.
  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
    AU.setPreservesAll();
  }
};

} // End llvm namespace

#endif

{'repo_name': 'LuaAV/LuaAV', 'stars': '114', 'repo_language': 'C++', 'file_name': 'starfish.obj', 'mime_type': 'text/plain', 'hash': -1949457550417305402, 'source_dataset': 'data'}


/*
 * Copyright (c) 2017 Uber Technologies, 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 CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

// STUB CLASS FOR PURPOSES OF REGRESSION TESTING ONLY

package android.support.v4.app;

import android.os.Bundle;
import android.os.PersistableBundle;

public class ActivityCompat {

  protected void onCreate(Bundle savedInstanceState) {}

  public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {}
}

{'repo_name': 'uber/NullAway', 'stars': '2792', 'repo_language': 'Java', 'file_name': 'MyClassTest.java', 'mime_type': 'text/x-java', 'hash': 1346226219605513905, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: ac1aaba0cd625f144affca878c85bc76
timeCreated: 1471565109
licenseType: Free
TextScriptImporter:
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Reinisch/Darkest-Dungeon-Unity', 'stars': '328', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': 7711980035661028333, 'source_dataset': 'data'}


<!DOCTYPE html>

    <meta charset="utf-8">
    <title>CSS Reftest Reference</title>
    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">

{'repo_name': 'Feodor2/Mypal', 'stars': '149', 'repo_language': 'None', 'file_name': 'moz.build', 'mime_type': 'text/plain', 'hash': 2119194106820556210, 'source_dataset': 'data'}