text stringlengths 2 1.04M | meta dict |
|---|---|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Previewer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
| {
"content_hash": "0cefc1a79fd1d47ffe840c9b95644651",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 151,
"avg_line_length": 41.92307692307692,
"alnum_prop": 0.5669724770642202,
"repo_name": "Arefu/Wolf",
"id": "0f460c789bc97ae0c4db3a7382c8ac1b8a7b2e7f",
"size": "1092",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Previewer/Properties/Settings.Designer.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "23901"
},
{
"name": "C#",
"bytes": "474690"
},
{
"name": "C++",
"bytes": "8027"
}
],
"symlink_target": ""
} |
import numpy as np
from collections import namedtuple
from pysc2.agents import base_agent
from pysc2.lib import actions
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.autograd as autograd
from torch.autograd import Variable
from torch.utils.data import DataLoader, Dataset
from starcraft_agents.a2c_model import A2CModel
from starcraft_agents.learning_agent import LearningAgent
from starcraft_agents.saved_actions import TrajectoryDataset
from torchnet.logger import VisdomPlotLogger, VisdomLogger
import torchnet as tnt
class A2CAgent(LearningAgent):
"""The start of a basic A2C agent for learning agents."""
def __init__(self, screen_width, screen_height, horizon,
num_processes=2,
fully_conv=False,
expirement_name="default_expirement",
learning_rate=7e-4,
value_coef=1.0,
entropy_coef=1e-4,
in_channels=8,
continue_training=False,
summary=None):
super(A2CAgent, self).__init__(expirement_name)
num_functions = len(actions.FUNCTIONS)
self.model = A2CModel(num_functions=num_functions,
expirement_name=expirement_name,
screen_width=screen_width,
screen_height=screen_height).cuda()
self.screen_width = screen_width
self.screen_height = screen_height
self.summary = summary
self.in_channels = in_channels
self.horizon = horizon
self.num_processes = num_processes
self.max_grad = 0.5
self.entropy_coef = entropy_coef
self.value_coef = value_coef
self.gamma = 0.95
self.tau = 0.97
self.saved_actions = TrajectoryDataset(self.horizon,
self.num_processes,
screen_width,
screen_height)
if continue_training:
self.model.load_state_dict(torch.load(f"./models/{expirement_name}.pth"))
self.model.eval()
print(f"learning rate set to: {learning_rate}")
self.optimizer = optim.Adam(self.model.parameters(),
lr=learning_rate)
self.final_rewards = torch.zeros(1, 1)
self.setup_loggers()
def setup_loggers(self):
# visdom setup
self.loss_meter = tnt.meter.AverageValueMeter()
self.loss_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'Train Loss'})
self.pi_loss_meter = tnt.meter.AverageValueMeter()
self.pi_loss_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'Policy Loss'})
self.xy_loss_meter = tnt.meter.AverageValueMeter()
self.xy_loss_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'XY Loss'})
self.value_loss_meter = tnt.meter.AverageValueMeter()
self.value_loss_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'Value Loss'})
self.reward_meter = tnt.meter.AverageValueMeter()
self.reward_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'Batch Reward'})
self.entropy_meter = tnt.meter.AverageValueMeter()
self.entropy_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'Entropy'})
self.adv_meter = tnt.meter.AverageValueMeter()
self.adv_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': 'Advantage'})
self.episode_logger = VisdomPlotLogger('line',
env=self.expirement_name,
opts={'title': "Episode Score"})
self.episode_meter = tnt.meter.MovingAverageValueMeter(windowsize=3)
def finish_step(self):
self.saved_actions.step()
def reset_meters(self):
self.adv_meter.reset()
self.loss_meter.reset()
self.pi_loss_meter.reset()
self.value_loss_meter.reset()
self.entropy_meter.reset()
self.xy_loss_meter.reset()
def rollout(self):
self.reset_meters()
self.saved_actions.compute_advantages(self.gamma)
loader = DataLoader(self.saved_actions, batch_size=self.horizon, shuffle=True)
for screens, minimaps, games, actions, x1s, y1s, rewards, returns in loader:
values, lp, x_lp, y_lp, dist_entropy, spatial_entropy = self.model.evaluate_actions(
Variable(screens).cuda(),
Variable(minimaps).cuda(),
Variable(games).cuda(),
Variable(actions).cuda(),
Variable(x1s).cuda(),
Variable(y1s).cuda())
rewards_var = Variable(rewards).cuda()
returns_var = Variable(returns).cuda()
advs = (returns_var - values).data
advs_var = Variable(advs).cuda()
dist_entropy *= self.entropy_coef
spatial_entropy *= self.entropy_coef
pg_loss = ((lp + x_lp + y_lp) * advs_var).mean()
pg_loss -= dist_entropy
pg_loss -= spatial_entropy
vf_loss = (values - rewards_var).pow(2).mean() * self.value_coef
train_loss = pg_loss + vf_loss
self.optimizer.zero_grad()
nn.utils.clip_grad_norm(self.model.parameters(), self.max_grad)
train_loss.backward()
self.optimizer.step()
self.loss_meter.add(train_loss.data[0])
self.pi_loss_meter.add(pg_loss.data[0])
self.entropy_meter.add(dist_entropy.data[0] + spatial_entropy.data[0])
self.value_loss_meter.add(vf_loss.data[0])
self.reward_meter.add(rewards.sum())
self.adv_meter.add(advs.mean())
self.loss_logger.log(self.steps, self.loss_meter.value()[0])
self.pi_loss_logger.log(self.steps, self.pi_loss_meter.value()[0])
self.reward_logger.log(self.steps, self.reward_meter.value()[0])
self.entropy_logger.log(self.steps, self.entropy_meter.value()[0])
self.value_loss_logger.log(self.steps, self.value_loss_meter.value()[0])
self.adv_logger.log(self.steps, self.adv_meter.value()[0])
self.episode_logger.log(self.steps, self.episode_meter.value()[0])
| {
"content_hash": "5edf4b83f20f0533709c24b7f12b0085",
"timestamp": "",
"source": "github",
"line_count": 166,
"max_line_length": 96,
"avg_line_length": 44.25301204819277,
"alnum_prop": 0.5294037571467465,
"repo_name": "ShawnSpooner/starcraft_agents",
"id": "33da285498072eb0cb721d1cbdf2f66dbfce114a",
"size": "7346",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "starcraft_agents/a2c_agent.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Python",
"bytes": "26860"
},
{
"name": "Shell",
"bytes": "188"
}
],
"symlink_target": ""
} |
Bing Maps Layer for leaflet v0.7. This plugin is created by following [leaflet-bing-layer](https://github.com/gmaclennan/leaflet-bing-layer) plugin.
By default this plugin doesn't work on IE. If you want it to work, then add the following to your webpage:
```html
<!--[if IE]--><script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script><!--[endif]-->
```
[Here is a link](https://github.com/mertemin/leaflet-bing) to the plugin for leaflet 1.0.
### L.TileLayer.Bing(options)
Creates a new Bing Maps layer.
### Parameters
| parameter | type | description |
| ----------------------------- | -------------- | ----------------------------------------------------------------------------------------------------- |
| `options` | object | Inherits from [L.TileLayer options](http://mourner.github.io/Leaflet/reference.html#tilelayer-options) (e.g. you can set `minZoom` and `maxZoom` etc.) |
| `options.key` | string | A valid [Bing Maps Key](https://msdn.microsoft.com/en-us/library/ff428642.aspx) [_required_] |
| `[options.imagery]` | string | _optional:_ [Imagery Type](https://msdn.microsoft.com/en-us/library/ff701716.aspx) [_default=Road_] <br>- `Aerial` - Aerial imagery<br>- `AerialWithLabels` - Aerial imagery with a road overlay<br>- `Road` - Roads without additional imagery<br> |
| `[options.culture]` | string | _optional:_ Language for labels, [see options](https://msdn.microsoft.com/en-us/library/hh441729.aspx) [_default=en_US_] |
### Example
```js
var map = L.map('map').setView([47.614909, -122.194013], 15);
L.TileLayer.Bing({ key: 'YOUR-BING-MAPS-KEY', imagery: 'Aerial', culture: 'en-US' }).addTo(map);
```
### License
MIT
| {
"content_hash": "2678e9f111b6708957fe8bbe2e352c5d",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 291,
"avg_line_length": 60.34375,
"alnum_prop": 0.5520455722423615,
"repo_name": "mertemin/leaflet-bing-0.7",
"id": "827a75247f61eb8660881f6e9d0264fab2b848ba",
"size": "1946",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "4207"
}
],
"symlink_target": ""
} |
package com.xiaoaiqinqin.controller;
import org.springframework.stereotype.Controller;
/**
*
* Like 控制层
*
*/
@Controller
public class LikeController {
} | {
"content_hash": "c68e106bdf35cd9ab3fce8f4b026c6b7",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 49,
"avg_line_length": 11.428571428571429,
"alnum_prop": 0.7375,
"repo_name": "lcqjava/lcq-java",
"id": "38cfeb3d36009a15ab3737f1fd224d8aef02cd37",
"size": "166",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lcq-xiaoaiqinqin/xiaoaiqinqin-web/src/main/java/com/xiaoaiqinqin/controller/LikeController.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "350857"
},
{
"name": "JavaScript",
"bytes": "968"
},
{
"name": "Thrift",
"bytes": "234"
}
],
"symlink_target": ""
} |
package com.showcast.hvscroll.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;
import com.showcast.hvscroll.draw.AbsHorizontalVerticalScrollTableDraw;
import com.showcast.hvscroll.draw.IHVScrollTable;
import com.showcast.hvscroll.draw.SimpleHVScrollTableDraw;
import com.showcast.hvscroll.entity.CellEntity;
import com.showcast.hvscroll.entity.TableEntity;
import com.showcast.hvscroll.params.CellParams;
/**
* Created by taro on 16/8/17.
*/
public class HorizontalVerticalScrollView extends View {
private AbsHorizontalVerticalScrollTableDraw mHvDraw = new SimpleHVScrollTableDraw(this);
public HorizontalVerticalScrollView(Context context) {
super(context);
this.initial();
}
public HorizontalVerticalScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
this.initial();
}
public HorizontalVerticalScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
this.initial();
}
private void initial() {
//
// //menu
// MenuParams menuParams = new MenuParams();
// menuParams.setIsDrawRowMenu(true);
// menuParams.setIsDrawColumn(false);
// menuParams.getSetting(Constant.MENU_ROW).setMenuFrozen(false, true);
// menuParams.getSetting(Constant.MENU_ROW).addFrozenItemIndex(0);
//
// //cell
// CellParams cellParams = new CellParams();
//// cellParams.getDefaultDrawStyle().setStrokeColor(Color.TRANSPARENT);
// cellParams.getSetting(Constant.LINE_COLUMN).addFrozenItemIndex(0);
// BaseDrawStyle style = new BaseDrawStyle();
// style.setBackgroundColor(Color.LTGRAY);
// cellParams.addNewDrawStyle("first", style);
//
// //global
// GlobalParams globalParams = new GlobalParams();
// globalParams.setStrokeColor(Color.WHITE);
// globalParams.setStrokeWidth(4);
// globalParams.setIsDrawCellStroke(false);
// globalParams.setCanvasBackgroundColor(Color.LTGRAY);
// globalParams.setIsDrawMask(false);
// globalParams.setMaskWidthPercent(1, 0.8f);
// globalParams.setMaskAlpha(100);
// globalParams.setMaskStartLine(3);
// globalParams.setMaskColor(Color.WHITE);
// globalParams.setMaskSplitLineColor(Color.WHITE);
// mHvDraw.setParams(globalParams, menuParams, cellParams);
// mHvDraw.setTable(TableEntity.getExampleTable());
// TableEntity table = new TableEntity(10, 8);
// for (int i = 0; i < 10; i++) {
// for (int j = 0; j < 8; j++) {
// table.addCellWithoutSpan(new CellEntity(i, j, "cell" + i + "-" + j));
// }
// }
// mHvDraw.setCellParams(new CellParams());
// mHvDraw.setTable(table);
}
public IHVScrollTable getHVScrollTable() {
return mHvDraw;
}
@Override
protected void onDraw(Canvas canvas) {
// if (isInEditMode()) {
// if (mHvDraw.getTable() == null) {
// TableEntity table = new TableEntity(10, 8);
// for (int i = 0; i < 10; i++) {
// for (int j = 0; j < 8; j++) {
// table.addCellWithoutSpan(new CellEntity(i, j, "cell" + i + "-" + j));
// }
// }
// mHvDraw.setCellParams(new CellParams());
// mHvDraw.setTable(table);
// }
// }
mHvDraw.drawCanvas(canvas);
}
}
| {
"content_hash": "8fb8b785c848a75d3deb466ce62e56ab",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 96,
"avg_line_length": 36.93814432989691,
"alnum_prop": 0.6313145408875244,
"repo_name": "CrazyTaro/HorizontalVerticalScrollView",
"id": "1396fc17481fa563284b25633b0bb1835dbdd68c",
"size": "3583",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "hvscroll/src/main/java/com/showcast/hvscroll/ui/HorizontalVerticalScrollView.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "177553"
}
],
"symlink_target": ""
} |
package org.jcodec.containers.mxf.model;
import java.util.Iterator;
import org.jcodec.common.logging.Logger;
import java.nio.ByteBuffer;
import java.util.Map;
import java.util.Map.Entry;
/**
* This class is part of JCodec ( www.jcodec.org ) This software is distributed
* under FreeBSD License
*
* @author The JCodec project
*
*/
public class MPEG2VideoDescriptor extends CDCIEssenceDescriptor {
private byte singleSequence;
private byte constantBFrames;
private byte codedContentType;
private byte lowDelay;
private byte closedGOP;
private byte identicalGOP;
private short maxGOP;
private short bPictureCount;
private int bitRate;
private byte profileAndLevel;
public MPEG2VideoDescriptor(UL ul) {
super(ul);
}
protected void read(Map<Integer, ByteBuffer> tags) {
super.read(tags);
for (Iterator<Entry<Integer, ByteBuffer>> it = tags.entrySet().iterator(); it.hasNext();) {
Entry<Integer, ByteBuffer> entry = it.next();
ByteBuffer _bb = entry.getValue();
switch (entry.getKey()) {
case 0x8000:
singleSequence = _bb.get();
break;
case 0x8001:
constantBFrames = _bb.get();
break;
case 0x8002:
codedContentType = _bb.get();
break;
case 0x8003:
lowDelay = _bb.get();
break;
case 0x8004:
closedGOP = _bb.get();
break;
case 0x8005:
identicalGOP = _bb.get();
break;
case 0x8006:
maxGOP = _bb.getShort();
break;
case 0x8007:
bPictureCount = (short) (_bb.get() & 0xff);
break;
case 0x8008:
bitRate = _bb.getInt();
break;
case 0x8009:
profileAndLevel = _bb.get();
break;
default:
Logger.warn(String.format("Unknown tag [ " + ul + "]: %04x + (" + _bb.remaining() + ")", entry.getKey()));
continue;
}
it.remove();
}
}
public byte getSingleSequence() {
return singleSequence;
}
public byte getConstantBFrames() {
return constantBFrames;
}
public byte getCodedContentType() {
return codedContentType;
}
public byte getLowDelay() {
return lowDelay;
}
public byte getClosedGOP() {
return closedGOP;
}
public byte getIdenticalGOP() {
return identicalGOP;
}
public short getMaxGOP() {
return maxGOP;
}
public short getbPictureCount() {
return bPictureCount;
}
public int getBitRate() {
return bitRate;
}
public byte getProfileAndLevel() {
return profileAndLevel;
}
} | {
"content_hash": "37c7fab648f1b727a43c196f2ad500dc",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 122,
"avg_line_length": 24.733333333333334,
"alnum_prop": 0.5400943396226415,
"repo_name": "Dacaspex/Fractal",
"id": "6fb71a62f36f0354bb1da2bdc1c0c33d35af3632",
"size": "2968",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "org/jcodec/containers/mxf/model/MPEG2VideoDescriptor.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "2941335"
}
],
"symlink_target": ""
} |
package sixpack
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/url"
"regexp"
"time"
)
const pattern string = `^[a-z0-9][a-z0-9\-_ ]*$`
var BaseUrl string = "http://localhost:5000"
type Options struct {
ClientID []byte
BaseUrl *url.URL
IP string
UserAgent string
}
func (opts *Options) Values() url.Values {
v := url.Values{}
if opts.IP != "" {
v.Set("ip_address", opts.IP)
}
if opts.UserAgent != "" {
v.Set("user_agent", opts.UserAgent)
}
return v
}
type Alternative struct {
Name string `json:"name"`
}
type Experiment struct {
Version int `json:"version"`
Name string `json:"name"`
}
type Response struct {
Status string `json:"status"`
ClientID string `json:"client_id"`
Alternative Alternative `json:"alternative"`
Experiment Experiment `json:"experiment"`
}
type Session struct {
Client *http.Client
Options *Options
}
func NewSession(opts Options) (*Session, error) {
if len(opts.ClientID) == 0 {
id, err := GenerateClientID()
if err != nil {
return nil, err
}
opts.ClientID = id
}
if opts.BaseUrl == nil {
u, err := url.Parse(BaseUrl)
if err != nil {
return nil, err
}
opts.BaseUrl = u
}
timeout := time.Duration(250 * time.Millisecond)
transport := http.Transport{
Dial: func(network, addr string) (net.Conn, error) {
return net.DialTimeout(network, addr, timeout)
},
}
return &Session{
Client: &http.Client{
Transport: &transport,
},
Options: &opts,
}, nil
}
func (s *Session) Participate(name string, alternatives []string, force string) (r *Response, err error) {
rex := regexp.MustCompile(pattern)
if !rex.MatchString(name) {
return nil, errors.New("Bad experiment name")
}
if len(alternatives) < 2 {
return nil, errors.New("Must specify at least 2 alternatives")
}
for _, alt := range alternatives {
if !rex.MatchString(alt) {
return nil, errors.New(fmt.Sprintf("Bad alternative name: %s", alt))
}
}
if force != "" {
for _, alt := range alternatives {
if force == alt {
return s.forceResponse(name, force), nil
}
}
}
endpoint, _ := url.Parse("/participate")
params := s.Options.Values()
params.Set("client_id", string(s.Options.ClientID))
params.Set("experiment", name)
for _, alt := range alternatives {
params.Add("alternatives", alt)
}
r, err = s.request(endpoint, params)
if err != nil {
return s.fallbackResponse(alternatives[0]), nil
}
return
}
func (s *Session) Convert(name string) (r *Response, err error) {
endpoint, _ := url.Parse("/convert")
params := s.Options.Values()
params.Set("client_id", string(s.Options.ClientID))
params.Set("experiment", name)
return s.request(endpoint, params)
}
func (s *Session) request(endpoint *url.URL, params url.Values) (r *Response, err error) {
u := s.Options.BaseUrl.ResolveReference(endpoint)
u.RawQuery = params.Encode()
resp, err := s.Client.Get(u.String())
if err != nil {
return
}
defer resp.Body.Close()
b, err := ioutil.ReadAll(resp.Body)
if err != nil {
return
}
if resp.StatusCode == http.StatusInternalServerError {
return nil, errors.New(string(b))
}
err = json.Unmarshal(b, &r)
if err != nil {
return
}
return
}
func (s *Session) forceResponse(name, force string) *Response {
return &Response{
Status: "ok",
Alternative: Alternative{
Name: force,
},
Experiment: Experiment{
Version: 0,
Name: name,
},
ClientID: string(s.Options.ClientID),
}
}
func (s *Session) fallbackResponse(alt string) *Response {
return &Response{
Status: "failed",
Alternative: Alternative{
Name: alt,
},
}
}
| {
"content_hash": "658948d35c7c638e1444d4076f0a8d3f",
"timestamp": "",
"source": "github",
"line_count": 193,
"max_line_length": 106,
"avg_line_length": 18.906735751295336,
"alnum_prop": 0.6494930117840504,
"repo_name": "subosito/sixpack-go",
"id": "b25dc83eb13cf622ebfc659bd75e9f4870f694a7",
"size": "3649",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "sixpack/sixpack.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "10455"
}
],
"symlink_target": ""
} |
using System;
namespace Quartz.Server
{
/// <summary>
/// Service interface for core Quartz.NET server.
/// </summary>
public interface IQuartzServer
{
/// <summary>
/// Initializes the instance of <see cref="IQuartzServer"/>.
/// Initialization will only be called once in server's lifetime.
/// </summary>
void Initialize();
/// <summary>
/// Starts this instance.
/// </summary>
void Start();
/// <summary>
/// Stops this instance.
/// </summary>
void Stop();
/// <summary>
/// Pauses all activity in scheudler.
/// </summary>
void Pause();
/// <summary>
/// Resumes all acitivity in server.
/// </summary>
void Resume();
}
} | {
"content_hash": "b112ba54b6f2228d73bac139be7b4d55",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 73,
"avg_line_length": 22.916666666666668,
"alnum_prop": 0.5054545454545455,
"repo_name": "cuitdream/testGit",
"id": "f2d048a472a3000c0f2426b4af3b961ca855280f",
"size": "825",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "server/Quartz.Server/IQuartzServer.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "276330"
}
],
"symlink_target": ""
} |
extern crate diesel;
mod config;
mod server;
mod session;
use config::Config;
use diesel::r2d2;
use futures::prelude::*;
use holomorph::{ContextualError, WithContext};
use log::{error, info};
use openssl::rsa::{Padding, Rsa};
use runtime::net::TcpListener;
use server::Server;
use session::Session;
use std::sync::Arc;
const RSA_KEY_SIZE: u32 = 256;
fn server(config_path: &str) -> Result<Server, ContextualError> {
let config: Config = toml::from_str(
&std::fs::read_to_string(config_path).context("could not read config file")?,
)
.context("could not parse config file as TOML")?;
let signature_key = Rsa::private_key_from_pem(
&std::fs::read(&config.server.private_key.path)
.context("could not read private key file")?,
)
.context("could not parse RSA private key as PEM")?;
let keypair = Rsa::generate(RSA_KEY_SIZE * 8).context("could not generate RSA key pair")?;
let mut public_key = vec![0; signature_key.size() as _];
let n = signature_key
.private_encrypt(
&keypair
.public_key_to_der()
.context("could not DER-encode generated RSA public key")?,
&mut public_key[..],
Padding::PKCS1,
)
.context("could not sign generated RSA public key")?;
public_key.truncate(n);
let database_pool = r2d2::Builder::new()
.max_size(config.database.pool_size)
.build(r2d2::ConnectionManager::new(&config.database.url))
.context("could not build database pool")?;
let mut server = Server {
config,
database_pool,
public_key,
private_key: keypair,
game_servers: Default::default(),
};
server.load()?;
Ok(server)
}
#[runtime::main(runtime_tokio::Tokio)]
async fn main() -> std::io::Result<()> {
env_logger::init();
let config_path = std::env::args().nth(1).unwrap_or("config.toml".to_string());
let server = match server(&config_path) {
Ok(server) => server,
Err(err) => {
error!("{}", err);
std::process::exit(1);
}
};
let mut listener = TcpListener::bind(&server.config.server.bind_address)?;
let mut incoming = listener.incoming();
info!("listening on {}", server.config.server.bind_address);
let server = Arc::new(server);
while let Some(stream) = incoming.next().await {
let server = server.clone();
runtime::spawn(async move { Session::new(stream?, server).run().await });
}
Ok(())
}
| {
"content_hash": "8e4129acdb480e64fbc345d492dc0949",
"timestamp": "",
"source": "github",
"line_count": 89,
"max_line_length": 94,
"avg_line_length": 28.629213483146067,
"alnum_prop": 0.6020408163265306,
"repo_name": "scalexm/holomorph",
"id": "e79883d457cff63ee7db3f2a26d90b8f4b273023",
"size": "2614",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "login/src/main.rs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PLpgSQL",
"bytes": "1145"
},
{
"name": "Rust",
"bytes": "604026"
},
{
"name": "TSQL",
"bytes": "328"
}
],
"symlink_target": ""
} |
package docker
import (
"context"
"fmt"
"io"
"io/ioutil"
"mime"
"net/http"
"net/url"
"os"
"strconv"
"github.com/containers/image/docker/reference"
"github.com/containers/image/manifest"
"github.com/containers/image/types"
"github.com/docker/distribution/registry/client"
"github.com/opencontainers/go-digest"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
type dockerImageSource struct {
ref dockerReference
c *dockerClient
// State
cachedManifest []byte // nil if not loaded yet
cachedManifestMIMEType string // Only valid if cachedManifest != nil
}
// newImageSource creates a new ImageSource for the specified image reference.
// The caller must call .Close() on the returned ImageSource.
func newImageSource(sys *types.SystemContext, ref dockerReference) (*dockerImageSource, error) {
c, err := newDockerClientFromRef(sys, ref, false, "pull")
if err != nil {
return nil, err
}
return &dockerImageSource{
ref: ref,
c: c,
}, nil
}
// Reference returns the reference used to set up this source, _as specified by the user_
// (not as the image itself, or its underlying storage, claims). This can be used e.g. to determine which public keys are trusted for this image.
func (s *dockerImageSource) Reference() types.ImageReference {
return s.ref
}
// Close removes resources associated with an initialized ImageSource, if any.
func (s *dockerImageSource) Close() error {
return nil
}
// LayerInfosForCopy() returns updated layer info that should be used when reading, in preference to values in the manifest, if specified.
func (s *dockerImageSource) LayerInfosForCopy(ctx context.Context) ([]types.BlobInfo, error) {
return nil, nil
}
// simplifyContentType drops parameters from a HTTP media type (see https://tools.ietf.org/html/rfc7231#section-3.1.1.1)
// Alternatively, an empty string is returned unchanged, and invalid values are "simplified" to an empty string.
func simplifyContentType(contentType string) string {
if contentType == "" {
return contentType
}
mimeType, _, err := mime.ParseMediaType(contentType)
if err != nil {
return ""
}
return mimeType
}
// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).
// It may use a remote (= slow) service.
// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);
// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).
func (s *dockerImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {
if instanceDigest != nil {
return s.fetchManifest(ctx, instanceDigest.String())
}
err := s.ensureManifestIsLoaded(ctx)
if err != nil {
return nil, "", err
}
return s.cachedManifest, s.cachedManifestMIMEType, nil
}
func (s *dockerImageSource) fetchManifest(ctx context.Context, tagOrDigest string) ([]byte, string, error) {
path := fmt.Sprintf(manifestPath, reference.Path(s.ref.ref), tagOrDigest)
headers := make(map[string][]string)
headers["Accept"] = manifest.DefaultRequestedManifestMIMETypes
res, err := s.c.makeRequest(ctx, "GET", path, headers, nil)
if err != nil {
return nil, "", err
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
return nil, "", errors.Wrapf(client.HandleErrorResponse(res), "Error reading manifest %s in %s", tagOrDigest, s.ref.ref.Name())
}
manblob, err := ioutil.ReadAll(res.Body)
if err != nil {
return nil, "", err
}
return manblob, simplifyContentType(res.Header.Get("Content-Type")), nil
}
// ensureManifestIsLoaded sets s.cachedManifest and s.cachedManifestMIMEType
//
// ImageSource implementations are not required or expected to do any caching,
// but because our signatures are “attached” to the manifest digest,
// we need to ensure that the digest of the manifest returned by GetManifest(ctx, nil)
// and used by GetSignatures(ctx, nil) are consistent, otherwise we would get spurious
// signature verification failures when pulling while a tag is being updated.
func (s *dockerImageSource) ensureManifestIsLoaded(ctx context.Context) error {
if s.cachedManifest != nil {
return nil
}
reference, err := s.ref.tagOrDigest()
if err != nil {
return err
}
manblob, mt, err := s.fetchManifest(ctx, reference)
if err != nil {
return err
}
// We might validate manblob against the Docker-Content-Digest header here to protect against transport errors.
s.cachedManifest = manblob
s.cachedManifestMIMEType = mt
return nil
}
func (s *dockerImageSource) getExternalBlob(ctx context.Context, urls []string) (io.ReadCloser, int64, error) {
var (
resp *http.Response
err error
)
for _, url := range urls {
resp, err = s.c.makeRequestToResolvedURL(ctx, "GET", url, nil, nil, -1, false)
if err == nil {
if resp.StatusCode != http.StatusOK {
err = errors.Errorf("error fetching external blob from %q: %d", url, resp.StatusCode)
logrus.Debug(err)
continue
}
break
}
}
if resp.Body != nil && err == nil {
return resp.Body, getBlobSize(resp), nil
}
return nil, 0, err
}
func getBlobSize(resp *http.Response) int64 {
size, err := strconv.ParseInt(resp.Header.Get("Content-Length"), 10, 64)
if err != nil {
size = -1
}
return size
}
// GetBlob returns a stream for the specified blob, and the blob’s size (or -1 if unknown).
func (s *dockerImageSource) GetBlob(ctx context.Context, info types.BlobInfo) (io.ReadCloser, int64, error) {
if len(info.URLs) != 0 {
return s.getExternalBlob(ctx, info.URLs)
}
path := fmt.Sprintf(blobsPath, reference.Path(s.ref.ref), info.Digest.String())
logrus.Debugf("Downloading %s", path)
res, err := s.c.makeRequest(ctx, "GET", path, nil, nil)
if err != nil {
return nil, 0, err
}
if res.StatusCode != http.StatusOK {
// print url also
return nil, 0, errors.Errorf("Invalid status code returned when fetching blob %d", res.StatusCode)
}
return res.Body, getBlobSize(res), nil
}
// GetSignatures returns the image's signatures. It may use a remote (= slow) service.
// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for
// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list
// (e.g. if the source never returns manifest lists).
func (s *dockerImageSource) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error) {
if err := s.c.detectProperties(ctx); err != nil {
return nil, err
}
switch {
case s.c.signatureBase != nil:
return s.getSignaturesFromLookaside(ctx, instanceDigest)
case s.c.supportsSignatures:
return s.getSignaturesFromAPIExtension(ctx, instanceDigest)
default:
return [][]byte{}, nil
}
}
// manifestDigest returns a digest of the manifest, from instanceDigest if non-nil; or from the supplied reference,
// or finally, from a fetched manifest.
func (s *dockerImageSource) manifestDigest(ctx context.Context, instanceDigest *digest.Digest) (digest.Digest, error) {
if instanceDigest != nil {
return *instanceDigest, nil
}
if digested, ok := s.ref.ref.(reference.Digested); ok {
d := digested.Digest()
if d.Algorithm() == digest.Canonical {
return d, nil
}
}
if err := s.ensureManifestIsLoaded(ctx); err != nil {
return "", err
}
return manifest.Digest(s.cachedManifest)
}
// getSignaturesFromLookaside implements GetSignatures() from the lookaside location configured in s.c.signatureBase,
// which is not nil.
func (s *dockerImageSource) getSignaturesFromLookaside(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error) {
manifestDigest, err := s.manifestDigest(ctx, instanceDigest)
if err != nil {
return nil, err
}
// NOTE: Keep this in sync with docs/signature-protocols.md!
signatures := [][]byte{}
for i := 0; ; i++ {
url := signatureStorageURL(s.c.signatureBase, manifestDigest, i)
if url == nil {
return nil, errors.Errorf("Internal error: signatureStorageURL with non-nil base returned nil")
}
signature, missing, err := s.getOneSignature(ctx, url)
if err != nil {
return nil, err
}
if missing {
break
}
signatures = append(signatures, signature)
}
return signatures, nil
}
// getOneSignature downloads one signature from url.
// If it successfully determines that the signature does not exist, returns with missing set to true and error set to nil.
// NOTE: Keep this in sync with docs/signature-protocols.md!
func (s *dockerImageSource) getOneSignature(ctx context.Context, url *url.URL) (signature []byte, missing bool, err error) {
switch url.Scheme {
case "file":
logrus.Debugf("Reading %s", url.Path)
sig, err := ioutil.ReadFile(url.Path)
if err != nil {
if os.IsNotExist(err) {
return nil, true, nil
}
return nil, false, err
}
return sig, false, nil
case "http", "https":
logrus.Debugf("GET %s", url)
req, err := http.NewRequest("GET", url.String(), nil)
if err != nil {
return nil, false, err
}
req = req.WithContext(ctx)
res, err := s.c.client.Do(req)
if err != nil {
return nil, false, err
}
defer res.Body.Close()
if res.StatusCode == http.StatusNotFound {
return nil, true, nil
} else if res.StatusCode != http.StatusOK {
return nil, false, errors.Errorf("Error reading signature from %s: status %d", url.String(), res.StatusCode)
}
sig, err := ioutil.ReadAll(res.Body)
if err != nil {
return nil, false, err
}
return sig, false, nil
default:
return nil, false, errors.Errorf("Unsupported scheme when reading signature from %s", url.String())
}
}
// getSignaturesFromAPIExtension implements GetSignatures() using the X-Registry-Supports-Signatures API extension.
func (s *dockerImageSource) getSignaturesFromAPIExtension(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error) {
manifestDigest, err := s.manifestDigest(ctx, instanceDigest)
if err != nil {
return nil, err
}
parsedBody, err := s.c.getExtensionsSignatures(ctx, s.ref, manifestDigest)
if err != nil {
return nil, err
}
var sigs [][]byte
for _, sig := range parsedBody.Signatures {
if sig.Version == extensionSignatureSchemaVersion && sig.Type == extensionSignatureTypeAtomic {
sigs = append(sigs, sig.Content)
}
}
return sigs, nil
}
// deleteImage deletes the named image from the registry, if supported.
func deleteImage(ctx context.Context, sys *types.SystemContext, ref dockerReference) error {
c, err := newDockerClientFromRef(sys, ref, true, "push")
if err != nil {
return err
}
// When retrieving the digest from a registry >= 2.3 use the following header:
// "Accept": "application/vnd.docker.distribution.manifest.v2+json"
headers := make(map[string][]string)
headers["Accept"] = []string{manifest.DockerV2Schema2MediaType}
refTail, err := ref.tagOrDigest()
if err != nil {
return err
}
getPath := fmt.Sprintf(manifestPath, reference.Path(ref.ref), refTail)
get, err := c.makeRequest(ctx, "GET", getPath, headers, nil)
if err != nil {
return err
}
defer get.Body.Close()
manifestBody, err := ioutil.ReadAll(get.Body)
if err != nil {
return err
}
switch get.StatusCode {
case http.StatusOK:
case http.StatusNotFound:
return errors.Errorf("Unable to delete %v. Image may not exist or is not stored with a v2 Schema in a v2 registry", ref.ref)
default:
return errors.Errorf("Failed to delete %v: %s (%v)", ref.ref, manifestBody, get.Status)
}
digest := get.Header.Get("Docker-Content-Digest")
deletePath := fmt.Sprintf(manifestPath, reference.Path(ref.ref), digest)
// When retrieving the digest from a registry >= 2.3 use the following header:
// "Accept": "application/vnd.docker.distribution.manifest.v2+json"
delete, err := c.makeRequest(ctx, "DELETE", deletePath, headers, nil)
if err != nil {
return err
}
defer delete.Body.Close()
body, err := ioutil.ReadAll(delete.Body)
if err != nil {
return err
}
if delete.StatusCode != http.StatusAccepted {
return errors.Errorf("Failed to delete %v: %s (%v)", deletePath, string(body), delete.Status)
}
if c.signatureBase != nil {
manifestDigest, err := manifest.Digest(manifestBody)
if err != nil {
return err
}
for i := 0; ; i++ {
url := signatureStorageURL(c.signatureBase, manifestDigest, i)
if url == nil {
return errors.Errorf("Internal error: signatureStorageURL with non-nil base returned nil")
}
missing, err := c.deleteOneSignature(url)
if err != nil {
return err
}
if missing {
break
}
}
}
return nil
}
| {
"content_hash": "7bd5f2546b3388573b08930df3512b12",
"timestamp": "",
"source": "github",
"line_count": 386,
"max_line_length": 148,
"avg_line_length": 32.7720207253886,
"alnum_prop": 0.7135177865612649,
"repo_name": "praveenkumar/minishift",
"id": "98f6067e1e060c42e4de8733c4945fe35a4ba1fd",
"size": "12656",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "vendor/github.com/containers/image/docker/docker_image_src.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Gherkin",
"bytes": "76817"
},
{
"name": "Go",
"bytes": "963321"
},
{
"name": "Makefile",
"bytes": "12248"
},
{
"name": "Python",
"bytes": "6457"
},
{
"name": "Shell",
"bytes": "22719"
}
],
"symlink_target": ""
} |
#ifndef tomvizConvertToFloatReaction_h
#define tomvizConvertToFloatReaction_h
#include <pqReaction.h>
namespace tomviz {
class DataSource;
class ConvertToFloatReaction : public pqReaction
{
Q_OBJECT
public:
ConvertToFloatReaction(QAction* parent);
void convertToFloat();
protected:
void updateEnableState() override;
void onTriggered() override { convertToFloat(); }
private:
Q_DISABLE_COPY(ConvertToFloatReaction)
};
}
#endif
| {
"content_hash": "59494174e374339ab14491698d580c13",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 51,
"avg_line_length": 16.555555555555557,
"alnum_prop": 0.7785234899328859,
"repo_name": "cjh1/tomviz",
"id": "be70d50f2ded45aae55c88373e54c5c74b6c80d8",
"size": "1078",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "tomviz/ConvertToFloatReaction.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C++",
"bytes": "1339808"
},
{
"name": "CMake",
"bytes": "35873"
},
{
"name": "Python",
"bytes": "259761"
},
{
"name": "Shell",
"bytes": "302"
}
],
"symlink_target": ""
} |
<?php
namespace app\models\AlertSender;
use app\models\Alert;
use app\models\BrowserAlert;
class AlertSenderBrowser implements InterfaceAlertSender
{
public function send(Alert $alert)
{
if ($alert->recipient_id) {
$model = new BrowserAlert();
$model->subject = $alert->subject;
$model->text = $alert->text;
$model->user_id = $alert->recipient->getId();
$model->sender_id = $alert->sender_id;
$model->save();
} else {
foreach (User::find()->all() as $user) {
$model = new BrowserAlert();
$model->subject = $alert->subject;
$model->text = $alert->text;
$model->user_id = $user->getId();
$model->save();
}
}
}
} | {
"content_hash": "c158c99ce3afc081a4b9b18beaf2b340",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 57,
"avg_line_length": 27.5,
"alnum_prop": 0.5066666666666667,
"repo_name": "gwynplaine2006/test_yii2",
"id": "f1c90551f6b91430cbc20901f75ee954bcf6086e",
"size": "825",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "models/AlertSender/AlertSenderBrowser.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1030"
},
{
"name": "CSS",
"bytes": "1364"
},
{
"name": "JavaScript",
"bytes": "241"
},
{
"name": "PHP",
"bytes": "223377"
}
],
"symlink_target": ""
} |
<?php
namespace Easy\Bundle\VentesBundle\Controller;
use Doctrine\ORM\EntityNotFoundException;
use Easy\Bundle\VentesBundle\Entity\ProductSale;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ProductSaleController extends Controller
{
public function listAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$repo = $em->getRepository('EasyVentesBundle:Event');
$sess = $this->get('session');
$sess->set('event_id', $request->get('id'));
$event = $repo->find($request->get('id'));
if (empty($event)) {
return $this->redirect($this->generateUrl('easy_event_list'));
}
$categories = $event->getCategories();
$repoP = $em->getRepository('EasyVentesBundle:Product');
$repoPS = $em->getRepository('EasyVentesBundle:ProductSale');
$products = array();
foreach ($categories as $category) {
$productsType = $repoP->findProductsType($category->getId());
foreach ($productsType as $product) {
$p = $repoP->find($product->getId());
$ps = $repoPS->findBy(array('product' => $product, 'event' => $event));
if ($ps) {
$p->setQty($ps[0]->getQty());
$products[] = $p;
} else {
if ($p->getActive()) {
$p->setQty(0);
$products[] = $p;
}
}
}
}
return $this->render('EasyVentesBundle:ProductSale:list.html.twig', array('products' => $products));
}
public function bestAction()
{
$em = $this->getDoctrine()->getManager();
$repoE = $em->getRepository('EasyVentesBundle:Event');
$repo = $em->getRepository('EasyVentesBundle:ProductSale');
$events = $repoE->findThreeEvents();
$products = array();
foreach ($events as $event) {
$productSale = $repo->findBy(array('event' => $event));
foreach ($productSale as $ps) {
if (isset($products[$ps->getProduct()->getId()])) {
$products[$ps->getProduct()->getId()] = $products[$ps->getProduct()->getId()] + $ps->getQty();
} else {
$products[$ps->getProduct()->getId()] = $ps->getQty();
}
}
}
$i = 0;
$best = array();
while ($i < 10) {
if (!$products) {
$i = 10;
}
foreach ($products as $id => $qty) {
foreach ($products as $idc => $qtyc) {
if (isset($best[$i][1])) {
if ($qtyc > $best[$i][1] && $idc !== $best[$i][0]) {
$best[$i][0] = $idc;
$best[$i][1] = $qtyc;
}
} else {
$best[$i][0] = $id;
$best[$i][1] = $qty;
}
}
unset($products[$best[$i][0]]);
$i++;
break;
}
}
$i = 0;
$products = array();
$repoP = $em->getRepository('EasyVentesBundle:Product');
while ($i < 10) {
if (isset($best[$i][0])) {
$product = $repoP->find($best[$i][0]);
$product->setQty($best[$i][1]);
$products[] = $product;
}
$i++;
}
return $this->render('EasyVentesBundle:ProductSale:best.html.twig', array('products' => $products));
}
public function sendEmailThankAction(Request $request) {
$em = $this->getDoctrine()->getManager();
$event = $em->getRepository("EasyVentesBundle:Event")
->findOneBy(array("id" => $request->get('id')));
$usersEvent = $em->getRepository("EasyVentesBundle:UserEvent")
->findBy(array("event" => $event));
$productSalesEvent = $em->createQuery("SELECT p FROM EasyVentesBundle:Product p WHERE p.id IN (SELECT IDENTITY(q.product) FROM EasyVentesBundle:ProductSale q WHERE q.event = :eventID ORDER BY q.qty )")
->setParameter('eventID',$this->get('session')->get('event_id') )
->setMaxResults(3)
->getResult();
foreach ($usersEvent as $userEvent) {
$message = \Swift_Message::newInstance()
->setSubject("Merci d'avoir participer à notre évènement")
->setFrom(array('yamgoue.daniella@gmail.com' => "Société easyVentes"))
->setTo($userEvent->getUser()->getEmail())
->setContentType("text/html")
->setBody(
$this->renderView(
'EasyClientBundle:Mailer:thanks.html.twig', array("productSalesEvent" => $productSalesEvent))
)
;
$this->get('mailer')->send($message);
}
return $this->redirect($this->generateUrl("easy_event_list"));
}
public function updateAction()
{
$sess = $this->get('session');
$event_id = $sess->get('event_id');
$product_id = isset($_POST['product_id']) ? $_POST['product_id'] : null;
$qty = isset($_POST['qty']) ? $_POST['qty'] : null;
if (empty($event_id) || empty($product_id) || empty($qty)) {
return $this->redirect($this->generateUrl('easy_event_list'));
} else {
$em = $this->getDoctrine()->getManager();
$repoE = $em->getRepository('EasyVentesBundle:Event');
$repoP = $em->getRepository('EasyVentesBundle:Product');
$repoPS = $em->getRepository('EasyVentesBundle:ProductSale');
$event = $repoE->find($event_id);
$product = $repoP->find($product_id);
$fb = $sess->getFlashbag();
$ps = $repoPS->findBy(array('product' => $product, 'event' => $event));
if ($ps) {
$nbProduct = $ps[0]->getQty() + $product->getQty();
$diff = $ps[0]->getQty() - $qty;
} else {
$nbProduct = $product->getQty();
$diff = 0 - $qty;
}
if ($nbProduct < $qty) {
$fb->add('warning', "Vous avez moins de ".$qty." ".$product->getName()." en stock");
} else {
if ($qty < 0) {
$fb->add('warning', "La quantité doit être positive");
} else {
if (!$ps) {
$productSale = new ProductSale();
$productSale->setEvent($event)
->setProduct($product)
->setQty($qty);
$em->persist($productSale);
} else {
$ps[0]->setQty($qty);
$em->persist($ps[0]);
}
$em->flush();
$product->setQty($product->getQty() + $diff);
$em->persist($product);
$em->flush();
$fb->add('success', "Modification effectuée");
}
}
return $this->redirect($this->generateUrl("easy_productsale_list", array('id' => $event_id)));
}
}
} | {
"content_hash": "5bf4a3101f75418355abc3153d5d8348",
"timestamp": "",
"source": "github",
"line_count": 196,
"max_line_length": 209,
"avg_line_length": 40.01020408163265,
"alnum_prop": 0.4492476409079316,
"repo_name": "ydn47/easyventes",
"id": "abbce8dc5b5b6ca54395fce8d86a20beb10e5c87",
"size": "7850",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Easy/Bundle/VentesBundle/Controller/ProductSaleController.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "3073"
},
{
"name": "CSS",
"bytes": "13521"
},
{
"name": "PHP",
"bytes": "342891"
}
],
"symlink_target": ""
} |
package org.docksidestage.dbflute.bsentity.dbmeta;
import java.util.List;
import java.util.Map;
import org.dbflute.Entity;
import org.dbflute.optional.OptionalEntity;
import org.dbflute.dbmeta.AbstractDBMeta;
import org.dbflute.dbmeta.info.*;
import org.dbflute.dbmeta.name.*;
import org.dbflute.dbmeta.property.PropertyGateway;
import org.dbflute.dbway.DBDef;
import org.docksidestage.dbflute.allcommon.*;
import org.docksidestage.dbflute.exentity.*;
/**
* The DB meta of MEMBER_ADDRESS. (Singleton)
* @author DBFlute(AutoGenerator)
*/
public class MemberAddressDbm extends AbstractDBMeta {
// ===================================================================================
// Singleton
// =========
private static final MemberAddressDbm _instance = new MemberAddressDbm();
private MemberAddressDbm() {}
public static MemberAddressDbm getInstance() { return _instance; }
// ===================================================================================
// Current DBDef
// =============
public String getProjectName() { return DBCurrent.getInstance().projectName(); }
public String getProjectPrefix() { return DBCurrent.getInstance().projectPrefix(); }
public String getGenerationGapBasePrefix() { return DBCurrent.getInstance().generationGapBasePrefix(); }
public DBDef getCurrentDBDef() { return DBCurrent.getInstance().currentDBDef(); }
// ===================================================================================
// Property Gateway
// ================
// -----------------------------------------------------
// Column Property
// ---------------
protected final Map<String, PropertyGateway> _epgMap = newHashMap();
{ xsetupEpg(); }
protected void xsetupEpg() {
setupEpg(_epgMap, et -> ((MemberAddress)et).getMemberAddressId(), (et, vl) -> ((MemberAddress)et).setMemberAddressId(cti(vl)), "memberAddressId");
setupEpg(_epgMap, et -> ((MemberAddress)et).getMemberId(), (et, vl) -> ((MemberAddress)et).setMemberId(cti(vl)), "memberId");
setupEpg(_epgMap, et -> ((MemberAddress)et).getValidBeginDate(), (et, vl) -> ((MemberAddress)et).setValidBeginDate(ctld(vl)), "validBeginDate");
setupEpg(_epgMap, et -> ((MemberAddress)et).getValidEndDate(), (et, vl) -> ((MemberAddress)et).setValidEndDate(ctld(vl)), "validEndDate");
setupEpg(_epgMap, et -> ((MemberAddress)et).getAddress(), (et, vl) -> ((MemberAddress)et).setAddress((String)vl), "address");
setupEpg(_epgMap, et -> ((MemberAddress)et).getRegionId(), (et, vl) -> {
CDef.Region cls = (CDef.Region)gcls(et, columnRegionId(), vl);
if (cls != null) {
((MemberAddress)et).setRegionIdAsRegion(cls);
} else {
((MemberAddress)et).mynativeMappingRegionId(ctn(vl, Integer.class));
}
}, "regionId");
setupEpg(_epgMap, et -> ((MemberAddress)et).getRegisterDatetime(), (et, vl) -> ((MemberAddress)et).setRegisterDatetime(ctldt(vl)), "registerDatetime");
setupEpg(_epgMap, et -> ((MemberAddress)et).getRegisterUser(), (et, vl) -> ((MemberAddress)et).setRegisterUser((String)vl), "registerUser");
setupEpg(_epgMap, et -> ((MemberAddress)et).getUpdateDatetime(), (et, vl) -> ((MemberAddress)et).setUpdateDatetime(ctldt(vl)), "updateDatetime");
setupEpg(_epgMap, et -> ((MemberAddress)et).getUpdateUser(), (et, vl) -> ((MemberAddress)et).setUpdateUser((String)vl), "updateUser");
setupEpg(_epgMap, et -> ((MemberAddress)et).getVersionNo(), (et, vl) -> ((MemberAddress)et).setVersionNo(ctl(vl)), "versionNo");
}
public PropertyGateway findPropertyGateway(String prop)
{ return doFindEpg(_epgMap, prop); }
// -----------------------------------------------------
// Foreign Property
// ----------------
protected final Map<String, PropertyGateway> _efpgMap = newHashMap();
{ xsetupEfpg(); }
@SuppressWarnings("unchecked")
protected void xsetupEfpg() {
setupEfpg(_efpgMap, et -> ((MemberAddress)et).getMember(), (et, vl) -> ((MemberAddress)et).setMember((OptionalEntity<Member>)vl), "member");
setupEfpg(_efpgMap, et -> ((MemberAddress)et).getRegion(), (et, vl) -> ((MemberAddress)et).setRegion((OptionalEntity<Region>)vl), "region");
}
public PropertyGateway findForeignPropertyGateway(String prop)
{ return doFindEfpg(_efpgMap, prop); }
// ===================================================================================
// Table Info
// ==========
protected final String _tableDbName = "MEMBER_ADDRESS";
protected final String _tableDispName = "MEMBER_ADDRESS";
protected final String _tablePropertyName = "memberAddress";
protected final TableSqlName _tableSqlName = new TableSqlName("MEMBER_ADDRESS", _tableDbName);
{ _tableSqlName.xacceptFilter(DBFluteConfig.getInstance().getTableSqlNameFilter()); }
public String getTableDbName() { return _tableDbName; }
public String getTableDispName() { return _tableDispName; }
public String getTablePropertyName() { return _tablePropertyName; }
public TableSqlName getTableSqlName() { return _tableSqlName; }
protected final String _tableAlias = "会員住所情報";
public String getTableAlias() { return _tableAlias; }
// ===================================================================================
// Column Info
// ===========
protected final ColumnInfo _columnMemberAddressId = cci("MEMBER_ADDRESS_ID", "MEMBER_ADDRESS_ID", null, "会員住所ID", Integer.class, "memberAddressId", null, true, true, true, "INTEGER", 10, 0, null, "NEXT VALUE FOR \"PUBLIC\".\"SYSTEM_SEQUENCE_84C3EE09_8875_4940_BD75_DDDE622212FF\"", false, null, null, null, null, null, false);
protected final ColumnInfo _columnMemberId = cci("MEMBER_ID", "MEMBER_ID", null, "会員ID", Integer.class, "memberId", null, false, false, true, "INTEGER", 10, 0, null, null, false, null, null, "member", null, null, false);
protected final ColumnInfo _columnValidBeginDate = cci("VALID_BEGIN_DATE", "VALID_BEGIN_DATE", null, "有効開始日", java.time.LocalDate.class, "validBeginDate", null, false, false, true, "DATE", 10, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnValidEndDate = cci("VALID_END_DATE", "VALID_END_DATE", null, "有効終了日", java.time.LocalDate.class, "validEndDate", null, false, false, true, "DATE", 10, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnAddress = cci("ADDRESS", "ADDRESS", null, "住所", String.class, "address", null, false, false, true, "VARCHAR", 200, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnRegionId = cci("REGION_ID", "REGION_ID", null, "地域ID", Integer.class, "regionId", null, false, false, true, "INTEGER", 10, 0, null, null, false, null, null, "region", null, CDef.DefMeta.Region, false);
protected final ColumnInfo _columnRegisterDatetime = cci("REGISTER_DATETIME", "REGISTER_DATETIME", null, null, java.time.LocalDateTime.class, "registerDatetime", null, false, false, true, "TIMESTAMP", 26, 6, null, null, true, null, null, null, null, null, false);
protected final ColumnInfo _columnRegisterUser = cci("REGISTER_USER", "REGISTER_USER", null, null, String.class, "registerUser", null, false, false, true, "VARCHAR", 200, 0, null, null, true, null, null, null, null, null, false);
protected final ColumnInfo _columnUpdateDatetime = cci("UPDATE_DATETIME", "UPDATE_DATETIME", null, null, java.time.LocalDateTime.class, "updateDatetime", null, false, false, true, "TIMESTAMP", 26, 6, null, null, true, null, null, null, null, null, false);
protected final ColumnInfo _columnUpdateUser = cci("UPDATE_USER", "UPDATE_USER", null, null, String.class, "updateUser", null, false, false, true, "VARCHAR", 200, 0, null, null, true, null, null, null, null, null, false);
protected final ColumnInfo _columnVersionNo = cci("VERSION_NO", "VERSION_NO", null, null, Long.class, "versionNo", null, false, false, true, "BIGINT", 19, 0, null, null, false, OptimisticLockType.VERSION_NO, null, null, null, null, false);
/**
* (会員住所ID)MEMBER_ADDRESS_ID: {PK, ID, NotNull, INTEGER(10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnMemberAddressId() { return _columnMemberAddressId; }
/**
* (会員ID)MEMBER_ID: {UQ+, IX, NotNull, INTEGER(10), FK to MEMBER}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnMemberId() { return _columnMemberId; }
/**
* (有効開始日)VALID_BEGIN_DATE: {+UQ, NotNull, DATE(10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnValidBeginDate() { return _columnValidBeginDate; }
/**
* (有効終了日)VALID_END_DATE: {NotNull, DATE(10)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnValidEndDate() { return _columnValidEndDate; }
/**
* (住所)ADDRESS: {NotNull, VARCHAR(200)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnAddress() { return _columnAddress; }
/**
* (地域ID)REGION_ID: {IX, NotNull, INTEGER(10), FK to REGION, classification=Region}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnRegionId() { return _columnRegionId; }
/**
* REGISTER_DATETIME: {NotNull, TIMESTAMP(26, 6)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnRegisterDatetime() { return _columnRegisterDatetime; }
/**
* REGISTER_USER: {NotNull, VARCHAR(200)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnRegisterUser() { return _columnRegisterUser; }
/**
* UPDATE_DATETIME: {NotNull, TIMESTAMP(26, 6)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnUpdateDatetime() { return _columnUpdateDatetime; }
/**
* UPDATE_USER: {NotNull, VARCHAR(200)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnUpdateUser() { return _columnUpdateUser; }
/**
* VERSION_NO: {NotNull, BIGINT(19)}
* @return The information object of specified column. (NotNull)
*/
public ColumnInfo columnVersionNo() { return _columnVersionNo; }
protected List<ColumnInfo> ccil() {
List<ColumnInfo> ls = newArrayList();
ls.add(columnMemberAddressId());
ls.add(columnMemberId());
ls.add(columnValidBeginDate());
ls.add(columnValidEndDate());
ls.add(columnAddress());
ls.add(columnRegionId());
ls.add(columnRegisterDatetime());
ls.add(columnRegisterUser());
ls.add(columnUpdateDatetime());
ls.add(columnUpdateUser());
ls.add(columnVersionNo());
return ls;
}
{ initializeInformationResource(); }
// ===================================================================================
// Unique Info
// ===========
// -----------------------------------------------------
// Primary Element
// ---------------
protected UniqueInfo cpui() { return hpcpui(columnMemberAddressId()); }
public boolean hasPrimaryKey() { return true; }
public boolean hasCompoundPrimaryKey() { return false; }
// -----------------------------------------------------
// Unique Element
// --------------
public UniqueInfo uniqueOf() {
List<ColumnInfo> ls = newArrayListSized(4);
ls.add(columnMemberId());
ls.add(columnValidBeginDate());
return hpcui(ls);
}
// ===================================================================================
// Relation Info
// =============
// cannot cache because it uses related DB meta instance while booting
// (instead, cached by super's collection)
// -----------------------------------------------------
// Foreign Property
// ----------------
/**
* (会員)MEMBER by my MEMBER_ID, named 'member'.
* @return The information object of foreign property. (NotNull)
*/
public ForeignInfo foreignMember() {
Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnMemberId(), MemberDbm.getInstance().columnMemberId());
return cfi("FK_MEMBER_ADDRESS_MEMBER", "member", this, MemberDbm.getInstance(), mp, 0, org.dbflute.optional.OptionalEntity.class, false, false, false, false, null, null, false, "memberAddressList", false);
}
/**
* (地域)REGION by my REGION_ID, named 'region'.
* @return The information object of foreign property. (NotNull)
*/
public ForeignInfo foreignRegion() {
Map<ColumnInfo, ColumnInfo> mp = newLinkedHashMap(columnRegionId(), RegionDbm.getInstance().columnRegionId());
return cfi("FK_MEMBER_ADDRESS_REGION", "region", this, RegionDbm.getInstance(), mp, 1, org.dbflute.optional.OptionalEntity.class, false, false, false, false, null, null, false, "memberAddressList", false);
}
// -----------------------------------------------------
// Referrer Property
// -----------------
// ===================================================================================
// Various Info
// ============
public boolean hasIdentity() { return true; }
public boolean hasVersionNo() { return true; }
public ColumnInfo getVersionNoColumnInfo() { return _columnVersionNo; }
public boolean hasCommonColumn() { return true; }
public List<ColumnInfo> getCommonColumnInfoList()
{ return newArrayList(columnRegisterDatetime(), columnRegisterUser(), columnUpdateDatetime(), columnUpdateUser()); }
public List<ColumnInfo> getCommonColumnInfoBeforeInsertList()
{ return newArrayList(columnRegisterDatetime(), columnRegisterUser(), columnUpdateDatetime(), columnUpdateUser()); }
public List<ColumnInfo> getCommonColumnInfoBeforeUpdateList()
{ return newArrayList(columnUpdateDatetime(), columnUpdateUser()); }
// ===================================================================================
// Type Name
// =========
public String getEntityTypeName() { return "org.docksidestage.dbflute.exentity.MemberAddress"; }
public String getConditionBeanTypeName() { return "org.docksidestage.dbflute.cbean.MemberAddressCB"; }
public String getBehaviorTypeName() { return "org.docksidestage.dbflute.exbhv.MemberAddressBhv"; }
// ===================================================================================
// Object Type
// ===========
public Class<MemberAddress> getEntityType() { return MemberAddress.class; }
// ===================================================================================
// Object Instance
// ===============
public MemberAddress newEntity() { return new MemberAddress(); }
// ===================================================================================
// Map Communication
// =================
public void acceptPrimaryKeyMap(Entity et, Map<String, ? extends Object> mp)
{ doAcceptPrimaryKeyMap((MemberAddress)et, mp); }
public void acceptAllColumnMap(Entity et, Map<String, ? extends Object> mp)
{ doAcceptAllColumnMap((MemberAddress)et, mp); }
public Map<String, Object> extractPrimaryKeyMap(Entity et) { return doExtractPrimaryKeyMap(et); }
public Map<String, Object> extractAllColumnMap(Entity et) { return doExtractAllColumnMap(et); }
}
| {
"content_hash": "c05d87ce6bce3ebc66b4b94b1db8a6cf",
"timestamp": "",
"source": "github",
"line_count": 275,
"max_line_length": 330,
"avg_line_length": 64.84,
"alnum_prop": 0.5368739835118613,
"repo_name": "lastaflute/lastaflute-example-harbor",
"id": "45dd20ca04cf47933c0c9764d471c02b2c95a1cc",
"size": "18550",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/org/docksidestage/dbflute/bsentity/dbmeta/MemberAddressDbm.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "41297"
},
{
"name": "CSS",
"bytes": "40876"
},
{
"name": "HTML",
"bytes": "540974"
},
{
"name": "Java",
"bytes": "4088957"
},
{
"name": "JavaScript",
"bytes": "12637"
},
{
"name": "Perl",
"bytes": "9821"
},
{
"name": "Python",
"bytes": "3285"
},
{
"name": "Roff",
"bytes": "105"
},
{
"name": "Shell",
"bytes": "27982"
},
{
"name": "XSLT",
"bytes": "218435"
}
],
"symlink_target": ""
} |
using System.Collections.Generic;
namespace Ink.Parsed
{
internal interface IWeavePoint
{
int indentationDepth { get; }
Runtime.Container runtimeContainer { get; }
List<Parsed.Object> content { get; }
string name { get; }
}
}
| {
"content_hash": "eac5c7f70ef0a87f0d6b8f256afe1caa",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 51,
"avg_line_length": 19.571428571428573,
"alnum_prop": 0.6240875912408759,
"repo_name": "ivaylo5ev/ink",
"id": "1ca1a5af9c70938ee71578090ba84e5ff0219eb3",
"size": "276",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "compiler/ParsedHierarchy/IWeavePoint.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "753302"
},
{
"name": "Shell",
"bytes": "6761"
}
],
"symlink_target": ""
} |
package com.challengercity.datura;
import java.util.ArrayList;
import static org.lwjgl.opengl.GL11.glColor4f;
/**
*
* @author Ben Sergent V/ha1fBit
*/
public abstract class Screen {
private ArrayList<GUI> renderGUIList = new ArrayList<GUI>();
private Datura ug = Datura.getGameInstance();
private int idCount = 0;
protected int tempScreenId;
public Screen() {
Renderer.addToRenderList(this);
}
public abstract void actionPerformed(int actionId);
public void render() {
for (int i = 0; i<renderGUIList.size(); i++) {
glColor4f(1.0f,1.0f,1.0f,1.0f);
renderGUIList.get(i).draw();
}
}
public int getRenderId() {
int id = idCount;
idCount++;
return id;
}
public ArrayList getRenderList() {
return renderGUIList;
}
public void addToRenderList(RenderableObject ro) {
if (ro instanceof GUI) {
renderGUIList.add((GUI) ro);
} else {
Datura.log(Screen.class, "Failed to add GUI to render list, "+ro.getClass());
}
}
public void removeFromRenderList(RenderableObject ro) {
renderGUIList.remove((GUI) ro);
}
public void tick(long delta) {
}
public void mouseUpdate() {
for (int i = 0; i<renderGUIList.size(); i++) {
renderGUIList.get(i).checkMouse();
}
}
}
| {
"content_hash": "dd4150e38515ad0f587ac28e998f7a99",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 89,
"avg_line_length": 23.370967741935484,
"alnum_prop": 0.5790200138026225,
"repo_name": "bsergent/Datura",
"id": "fc8b39431c076e18392831dc89a9100080531707",
"size": "1449",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/com/challengercity/datura/Screen.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "173191"
}
],
"symlink_target": ""
} |
FROM balenalib/qemux86-64-alpine:3.12-run
# remove several traces of python
RUN apk del python*
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# install python dependencies
RUN apk add --no-cache ca-certificates libffi \
&& apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1
# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059
# point Python at a system-provided certificate database. Otherwise, we might hit CERTIFICATE_VERIFY_FAILED.
# https://www.python.org/dev/peps/pep-0476/#trust-database
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt
ENV PYTHON_VERSION 3.8.9
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 21.0.1
ENV SETUPTOOLS_VERSION 56.0.0
RUN set -x \
&& buildDeps=' \
curl \
gnupg \
' \
&& apk add --no-cache --virtual .build-deps $buildDeps \
&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-alpine-amd64-openssl1.1.tar.gz" \
&& echo "57f5474bdcb0d87be365d5e1094eae095b85a003accae2b8968b336e0e5e0ca6 Python-$PYTHON_VERSION.linux-alpine-amd64-openssl1.1.tar.gz" | sha256sum -c - \
&& tar -xzf "Python-$PYTHON_VERSION.linux-alpine-amd64-openssl1.1.tar.gz" --strip-components=1 \
&& rm -rf "Python-$PYTHON_VERSION.linux-alpine-amd64-openssl1.1.tar.gz" \
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c get-pip.py" | sha256sum -c - \
&& python3 get-pip.py \
&& rm get-pip.py \
; fi \
&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& ln -sf pip3 pip \
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
&& ln -sf idle3 idle \
&& ln -sf pydoc3 pydoc \
&& ln -sf python3 python \
&& ln -sf python3-config python-config
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
&& echo "Running test-stack@python" \
&& chmod +x test-stack@python.sh \
&& bash test-stack@python.sh \
&& rm -rf test-stack@python.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: Intel 64-bit (x86-64) \nOS: Alpine Linux 3.12 \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.8.9, Pip v21.0.1, Setuptools v56.0.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info
RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& ln -f /bin/sh /bin/sh.real \
&& ln -f /bin/sh-shim /bin/sh | {
"content_hash": "f2f4ed950fdc059083f67d50f99652fd",
"timestamp": "",
"source": "github",
"line_count": 77,
"max_line_length": 728,
"avg_line_length": 53.45454545454545,
"alnum_prop": 0.7111273080660836,
"repo_name": "nghiant2710/base-images",
"id": "1aba5439eb3c94a38103b7a7c3a7fce26776523b",
"size": "4137",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "balena-base-images/python/qemux86-64/alpine/3.12/3.8.9/run/Dockerfile",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "144558581"
},
{
"name": "JavaScript",
"bytes": "16316"
},
{
"name": "Shell",
"bytes": "368690"
}
],
"symlink_target": ""
} |
MODULE MOD_WRSTART
CONTAINS
SUBROUTINE WRSTART
use MOD_DATOM_M
use MOD_DECON
use MOD_DECSTAR_M
use MOD_FGRID
use MOD_GEOMESH
use MOD_GRADIFF
use MOD_GREYM
use MOD_PRIBLA
use MOD_PRIDAT
use MOD_PRIGH
use MOD_PRIMOD
use MOD_WRITPOP
use MOD_WRVEL
use MOD_JSTART
use MOD_PRICOMP
use MOD_REBLANK
use MOD_WRITMOD
use MOD_TICTOC
use MOD_ERROR
use MOD_chemeq
use ABUNDANCES
USE COMMON_BLOCK
USE FILE_OPERATIONS
USE VARDATOM
USE VARHMINUS
! THIS PROGRAM IS TO INITIALIZE THE MODEL FILE FOR SUBSEQUENT
! CALCULATION OF THE NON-LTE MULTI-LEVEL LINE FORMATION.
! IT MAKES USE OF THE ATOMIC DATA (FILE DATOM)
! AND THE FREQUENCY GRID (FILE FGRID)
! PRESENT VERSION: MODEL ATMOSPHERE OF HELIUM (CODE NR. "1") WITH
! HYDROGEN "2"
! FOR IMPLEMENTATION OF ADDITIONAL ELEMENTS:
! MODIFY SUBROUTINES "DATOM", "DECSTAR"
! INSERT CORRESPONDING ATOMIC DATA INTO SUBR. "COLLI", "PHOTOCS"
IMPLICIT REAL*8(A - H, O - Z)
INTEGER :: IPDIM, NBDIM
parameter(IPDIM = 25, NBDIM = 99)
COMMON /LIBLDAT/ SCAGRI(IPDIM), SCAEVT(IPDIM, NBDIM), ABSEVT(IPDIM, NBDIM)
COMMON /LIBLPAR/ ALMIN, ALMAX, LBLAON, IPMAX, NBMAX, NBINW
COMMON /LIBLFAC/ SCAFAC(NDDIM, NFDIM), ABSFAC(NDDIM, NFDIM)
COMMON /VELPAR/ VFINAL, VMIN, BETA, VPAR1, VPAR2, RCON, HSCALE
COMMON /COMTEFF/ TEFF, TMIN, TMODIFY, SPHERIC
COMMON /COMLBKG/ LBKG, XLBKG1, XLBKG2
! LBKG - KEYWORD FOR NON-LTE OPACITY DISTRIBUTION FUNCTIONS
! XLBKB1, XLBKG2: WAVELENTH RANGE FOR THE ODF
INTEGER XLBKG1, XLBKG2
LOGICAL LBKG
LOGICAL TTABLE, TPLOT, SPHERIC, FAL
CHARACTER MODHEAD*104
CHARACTER NAME*10, fstring*24
integer timer
real*8 ATMEAN, AMU
integer NA
REAL*8 CSARR(5000,4)
REAL*8, DIMENSION(:), ALLOCATABLE :: ELEC_CONC, HEAVY_ELEM_CONC
REAL*8, DIMENSION(:), ALLOCATABLE :: VELO_NE, VELO_E
CHARACTER(:), ALLOCATABLE :: AMF
REAL*8 :: H
DATA AMU /1.660531d-24/
call FDATE(fstring)
call TIC(timer)
! READ ATOMIC DATA FROM FILE DATOM
CALL DATOM_M(N,LEVEL,NCHARG,WEIGHT,ELEVEL,EION,MAINQN,
$ EINST,ALPHA,SEXPO,AGAUNT,COCO,KEYCOL,ALTESUM,
$ INDNUP,INDLOW,LASTIND,NATOM,
$ ELEMENT,SYMBOL,NOM,KODAT,ATMASS,STAGE,NFIRST,
$ NLAST,WAVARR,SIGARR,NFDIM)
! DECODING INPUT DATA
CALL DECSTAR_M(MODHEAD,FM,RSTAR,VDOP,TTABLE,FAL,LBKG,XLBKG1,XLBKG2,
$ TPLOT,NATOM,ABXYZ,KODAT,IDAT,LBLANK,ATMEAN, AMU)
! if PRINT DATOM option in CARDS is set, printout the atomic data
IF (IDAT.EQ.1)
$CALL PRIDAT(N,LEVEL,NCHARG, WEIGHT,ELEVEL,EION,EINST,
$ KODAT,ALPHA,SEXPO,AGAUNT,COCO,KEYCOL,ALTESUM,
$ NATOM,ELEMENT,NOM,ABXYZ,ATMASS)
!*** PRINTOUT OF THE CHEMICAL COMPOSITION
CALL PRICOMP(N,EINST,NCHARG,NOM,NATOM,ABXYZ,ATMASS,
$ STAGE,NFIRST,NLAST,ELEMENT,SYMBOL,LASTIND,
$ INDLOW,INDNUP)
! GENERATION OF THE CONTINUOUS FREQUENCY GRID
CALL FGRID(NFDIM,NF,XLAMBDA,FWEIGHT,AKEY,NOM,SYMBOL,NATOM,N,NCHARG,ELEVEL,EION,EINST)
CALL GEOMESH(RADIUS, ENTOT, T, FAL, P, Z, RSTAR, AMU, ATMEAN, ND, NP)
allocate(XJC(ND))
allocate(XJCARR(ND, NF))
allocate(XJL(ND, LASTIND))
allocate(EDDI(3, ND))
allocate(EDDARR(3, ND, NF))
allocate(TAUROSS(ND))
allocate(RNE(ND))
allocate(VELO(ND))
allocate(GRADI(ND))
allocate(EMFLUX(NF))
allocate(ENLTE(N))
allocate(POPNUM(ND, N))
allocate(HTOT(ND))
allocate(GTOT(ND))
allocate(XTOT(ND))
allocate(ETOT(ND))
allocate(POP1(ND, N))
allocate(POP2(ND, N))
allocate(POP3(ND, N))
CALL mol_ab(ABXYZn, ABXYZ, SYMBOL, ENTOT, T, ND)
IF(.NOT. ALLOCATED(ABXYZ_small)) allocate(ABXYZ_small(NATOM))
IF(.NOT. ALLOCATED(ABXYZn_small)) allocate(ABXYZn_small(NATOM, ND))
ABXYZ_small(1:NATOM)=ABXYZ(1:NATOM)
do i = 1, ND
do j = 1, NATOM
ABXYZn_small(j,i) = ABXYZn(j,i)
enddo
enddo
! RINAT TAGIROV:
! Calculation or read-out of the velocity field.
! In case of the calculation
! the expansion law is regulated with the boundary
! condition parameters VMIN and VFINAL
! which are set in the CARDS file.
! Using these parameters INITVEL subroutine
! generates VPAR1 and VPAR2 parameters
! entering the function WRVEL below which calculates the ultimate velocities.
! In case of the read-out the velocity is read from the VEL_FIELD_FILE set in FILE_OPERATIONS.FOR
! and if there is a local extremum in the input data...
! (local maximum in case of negative velocities, local minimum in case of positive velocities;
! at least it was like that in the 3D simulation data I worked with and => EXTRAP_VEL_FIELD subroutine
! below works only for this two cases, however the rest of the code can't handle the negative case
! because apparently the frequency initial condition in it is not suited for contracting flows,
! see Mihalas, Kunasz & Hummer, ApJ, 202:465-489, 1975, Appendix B for details about various velocity laws and the
! type of radiative transfer scheme implemented in the code)
! ...the law gets extrapolated from the point of the extremum
! to the innermost point yelding therefore a monotonically increasing/decreasing function.
! The height grid in the VEL_FIELD_FILE has to be the same as in the atmosphere model file ATM_MOD.
! The TABLE string in CARDS file was used before to
! control the calculation/read-out option but is obsolete now (it is still in the CARDS file though).
! The logical variable VEL_FIELD_FROM_FILE is declared in comblock.for and set in hminus.for.
! The units of velocity in the VEL_FIELD_FILE are km/s, height is in km.
! The first column is height, the second is velocity.
IF (VEL_FIELD_FROM_FILE) THEN
ALLOCATE(VELO_NE(ND))
ALLOCATE(VELO_E(ND))
FILE_UNIT = 1832
OPEN(UNIT = FILE_UNIT, FILE = VEL_FIELD_FILE, ACTION = 'READ')
DO I = 1, ND; READ(FILE_UNIT, *) H, VELO_NE(I); ENDDO
CLOSE(FILE_UNIT)
! Extrapolation of the velocity law. If there is no local minimum/maximum then VELO_E = VELO_NE.
VELO_E = EXTRAP_VEL_FIELD(VELO_NE(1 : ND), ND)
VELO(1 : ND) = VELO_E(1 : ND)
ELSE
DO L = 1, ND; VELO(L) = WRVEL(RADIUS(L)); ENDDO
ENDIF
CALL GRADIFF(ND,VELO,GRADI,RADIUS)
C*** STAPEL: NUMBER OF FREE ELECTRONS PER ATOM
C*** S T A R T A P P R O X I M A T I O N
STAPEL = 0.0d0
DO NA = 1, NATOM; STAPEL = STAPEL + ABXYZ(NA) * (STAGE(NA) - 1.); ENDDO
RNE(1 : ND) = STAPEL
C*** Read Line-blanketing table
IF (LBLANK.NE.0) LBLANK=-2
CALL REBLANK (LBLANK,NF,XLAMBDA,ND,ENTOT,RNE,SCAFAC,ABSFAC)
IF (ABS(LBLANK).EQ.2)
$CALL PRIBLA (LBLANK,ENTOT,ND,XLAMBDA,NF,JOBNUM,MODHEAD,SCAFAC,ABSFAC)
C*** TEMPERATURE STRATIFICATION AND INITIAL POPNUMBERS (LTE)
CALL GREYM(ND,T,RADIUS,XLAMBDA,FWEIGHT,NF,ENTOT,RNE,RSTAR,
$ ALPHA,SEXPO,AGAUNT,POPNUM,TAUROSS,R23,TTABLE,
$ LBKG,XLBKG1,XLBKG2,N,
$ LEVEL,NCHARG,WEIGHT,ELEVEL,EION,EINST,ENLTE,KODAT,
$ NOM,NFIRST,NLAST,NATOM,WAVARR,SIGARR)
CALL PRIMOD(ND,RADIUS,RSTAR,ENTOT,T,VELO,GRADI,NP,MODHEAD,JOBNUM,TTABLE,TAUROSS,R23)
!=================================================================
! CONSTANT ELECTRON CONCENTRATION RUN AND/OR LTE RUN
IF (LTE_RUN .OR. CONST_ELEC) THEN
! IF (LTE_RUN) THEN
ALLOCATE(ELEC_CONC(ND))
ALLOCATE(HEAVY_ELEM_CONC(ND))
ELEC_CONC = READ_ATM_MOD(fal_mod_file, '3')
HEAVY_ELEM_CONC = READ_ATM_MOD(fal_mod_file, '4')
RNE(1 : ND) = ELEC_CONC(1 : ND) / HEAVY_ELEM_CONC(1 : ND)
DEALLOCATE(ELEC_CONC)
DEALLOCATE(HEAVY_ELEM_CONC)
ENDIF
!=================================================================
! MODFILE: MASS STORAGE FILE IN NAME-INDEX MODE
TOTOUT = 0.0d0
TOTIN = 0.0d0
POP1(:, :) = 0.0d0
POP2(:, :) = 0.0d0
POP3(:, :) = 0.0d0
HTOT(1 : ND) = 0.0d0
GTOT(1 : ND) = 0.0d0
XTOT(1 : ND) = 0.0d0
ETOT(1 : ND) = 0.0d0
EMFLUX(1 : NF) = 0.0d0
if (allocated(wcharm)) deallocate(wcharm)
allocate(wcharm(ND, NF))
WCHARM(1 : ND, 1 : NF) = 0.0d0
IFL = 3; open(IFL, file = 'MODFILE', STATUS = 'UNKNOWN')
JOBNUM = 0
CALL WRITMOD(IFL,N,ND,TEFF,RADIUS,NP,P,Z,ENTOT,VELO,GRADI,RSTAR,VDOP,NF,
$ XLAMBDA(1 : NF),FWEIGHT(1 : NF),AKEY(1 : NF),
$ ABXYZ,NATOM,MODHEAD,JOBNUM)
CLOSE(ifl)
ifl = 3; open(ifl, file = 'POPNUM', status = 'unknown')
call writpop(ifl, T, popnum, pop1, pop2, pop3, rne, n, nd, modhead, jobnum)
close(ifl)
! START APPROXIMATION FOR THE RADIATION FIELD
! JSTART writes the files RADIOC and RADIOL
EDDI(1 : 3, 1 : ND) = 0.0d0
CALL JSTART(NF,XLAMBDA(1 : NF),ND,T,XJC,XJL,
$ HTOT,GTOT,XTOT,ETOT,EMFLUX,TOTIN,TOTOUT,
$ NCHARG,ELEVEL,EDDI,WCHARM,NOM,N,EINST,
$ MODHEAD,JOBNUM,TEFF)
write(*, *) 'WRSTART - ', fstring, ' run time: ', TOC(timer)
open(78, file = 'MODHIST', status = 'unknown')
write(78, *) 'WRSTART - ', fstring, ' run time: ', TOC(timer)
close(78)
RETURN
END SUBROUTINE
FUNCTION EXTRAP_VEL_FIELD(VEL, ND) RESULT(VEL_E)
USE FILE_OPERATIONS
USE COMMON_BLOCK
IMPLICIT NONE
INTEGER, INTENT(IN) :: ND
REAL*8, DIMENSION(ND), INTENT(IN) :: VEL
REAL*8, DIMENSION(ND) :: VEL_E
INTEGER :: I, ML, NI, EXTRLOC
REAL*8 :: A, B
VEL_E(1 : ND) = VEL(1 : ND)
IF (VEL(1) .GT. 0) EXTRLOC = MINLOC(VEL, 1)
IF (VEL(1) .LT. 0) EXTRLOC = MAXLOC(VEL, 1)
! If there is no local minimum/maximum then no extrapolation is needed
IF (EXTRLOC .EQ. 1) THEN
WRITE(*, '(/,A,1x,A,1x,A,/)') 'NO LOCAL MINIMUM/MAXIMUM WAS FOUND IN', VEL_FIELD_FILE,
$ '=> NO EXTRAPOLATION HAS BEEN PERFORMED.
$ PROCESSING THE VELOCITY FIELD AS IT IS.'
RETURN
ENDIF
ML = EXTRLOC; NI = ML - 1
A = (VEL(ML) - VEL(NI)) / (HEIGHT(ML) - HEIGHT(NI))
B = VEL(ML) - A * HEIGHT(ML)
DO I = ML + 1, ND, 1; VEL_E(I) = A * HEIGHT(I) + B; ENDDO
RETURN
END FUNCTION EXTRAP_VEL_FIELD
END MODULE
| {
"content_hash": "39f3242073d3aaa40d1b19e3d8de72cb",
"timestamp": "",
"source": "github",
"line_count": 353,
"max_line_length": 118,
"avg_line_length": 31.03116147308782,
"alnum_prop": 0.5921124703304729,
"repo_name": "rtagirov/nessy",
"id": "efd136439c0de07608c6c299fe501924877fea72",
"size": "10954",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/wrstart.for",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Fortran",
"bytes": "1313331"
},
{
"name": "Makefile",
"bytes": "326"
},
{
"name": "Shell",
"bytes": "68709"
}
],
"symlink_target": ""
} |
<?php
// simple connection test
$host = 'imap.gmail.com';
$port = 993;
echo $host.':'.$port;
$streamContextSettings = array(
'ssl' => array(
'verify_host' => true,
'verify_peer' => true,
'verify_peer_name' => true,
'allow_self_signed' => false
)
);
$streamContext = stream_context_create($streamContextSettings);
$errorStr = '';
$errorNo = 0;
$connection = stream_socket_client($host.':'.$port, $errorNo, $errorStr, 5, STREAM_CLIENT_CONNECT, $streamContext);
if (is_resource($connection)) {
echo ' = OK';
fclose($connection);
} else {
echo ' = ERROR ([#'.$errorNo.'] '.$errorStr.')';
}
| {
"content_hash": "251ab3629d43a8c785cd76e4ff553981",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 115,
"avg_line_length": 20.2,
"alnum_prop": 0.6320132013201321,
"repo_name": "RainLoop/rainloop-webmail",
"id": "4bb167b2b6e8c5f3cbbd549d04170f247739c292",
"size": "606",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "build/test_ssl_connection.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4717"
},
{
"name": "Dockerfile",
"bytes": "1199"
},
{
"name": "HTML",
"bytes": "253438"
},
{
"name": "Hack",
"bytes": "14"
},
{
"name": "JavaScript",
"bytes": "770242"
},
{
"name": "Less",
"bytes": "136308"
},
{
"name": "Makefile",
"bytes": "1701"
},
{
"name": "PHP",
"bytes": "4569318"
},
{
"name": "Shell",
"bytes": "7471"
}
],
"symlink_target": ""
} |
/*
* 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 io.prestosql.tests;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import io.airlift.testing.Closeables;
import io.prestosql.Session;
import io.prestosql.connector.ConnectorId;
import io.prestosql.cost.StatsCalculator;
import io.prestosql.metadata.AllNodes;
import io.prestosql.metadata.Metadata;
import io.prestosql.metadata.QualifiedObjectName;
import io.prestosql.metadata.SessionPropertyManager;
import io.prestosql.server.testing.TestingPrestoServer;
import io.prestosql.spi.Node;
import io.prestosql.spi.Plugin;
import io.prestosql.split.PageSourceManager;
import io.prestosql.split.SplitManager;
import io.prestosql.sql.parser.SqlParserOptions;
import io.prestosql.sql.planner.NodePartitioningManager;
import io.prestosql.testing.MaterializedResult;
import io.prestosql.testing.QueryRunner;
import io.prestosql.testing.TestingAccessControlManager;
import io.prestosql.transaction.TransactionManager;
import org.intellij.lang.annotations.Language;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import static io.prestosql.tests.AbstractTestQueries.TEST_CATALOG_PROPERTIES;
import static io.prestosql.tests.AbstractTestQueries.TEST_SYSTEM_PROPERTIES;
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
public final class StandaloneQueryRunner
implements QueryRunner
{
private final TestingPrestoServer server;
private final TestingPrestoClient prestoClient;
private final ReadWriteLock lock = new ReentrantReadWriteLock();
public StandaloneQueryRunner(Session defaultSession)
throws Exception
{
requireNonNull(defaultSession, "defaultSession is null");
try {
server = createTestingPrestoServer();
}
catch (Exception e) {
close();
throw e;
}
this.prestoClient = new TestingPrestoClient(server, defaultSession);
refreshNodes();
server.getMetadata().addFunctions(AbstractTestQueries.CUSTOM_FUNCTIONS);
SessionPropertyManager sessionPropertyManager = server.getMetadata().getSessionPropertyManager();
sessionPropertyManager.addSystemSessionProperties(TEST_SYSTEM_PROPERTIES);
sessionPropertyManager.addConnectorSessionProperties(new ConnectorId("catalog"), TEST_CATALOG_PROPERTIES);
}
@Override
public MaterializedResult execute(@Language("SQL") String sql)
{
lock.readLock().lock();
try {
return prestoClient.execute(sql).getResult();
}
finally {
lock.readLock().unlock();
}
}
@Override
public MaterializedResult execute(Session session, @Language("SQL") String sql)
{
lock.readLock().lock();
try {
return prestoClient.execute(session, sql).getResult();
}
finally {
lock.readLock().unlock();
}
}
@Override
public void close()
{
Closeables.closeQuietly(prestoClient);
Closeables.closeQuietly(server);
}
@Override
public int getNodeCount()
{
return 1;
}
@Override
public Session getDefaultSession()
{
return prestoClient.getDefaultSession();
}
@Override
public TransactionManager getTransactionManager()
{
return server.getTransactionManager();
}
@Override
public Metadata getMetadata()
{
return server.getMetadata();
}
@Override
public SplitManager getSplitManager()
{
return server.getSplitManager();
}
@Override
public PageSourceManager getPageSourceManager()
{
return server.getPageSourceManager();
}
@Override
public NodePartitioningManager getNodePartitioningManager()
{
return server.getNodePartitioningManager();
}
@Override
public StatsCalculator getStatsCalculator()
{
return server.getStatsCalculator();
}
@Override
public TestingAccessControlManager getAccessControl()
{
return server.getAccessControl();
}
public TestingPrestoServer getServer()
{
return server;
}
public void refreshNodes()
{
AllNodes allNodes;
do {
try {
MILLISECONDS.sleep(10);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
break;
}
allNodes = server.refreshNodes();
}
while (allNodes.getActiveNodes().isEmpty());
}
private void refreshNodes(ConnectorId connectorId)
{
Set<Node> activeNodesWithConnector;
do {
try {
MILLISECONDS.sleep(10);
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
break;
}
activeNodesWithConnector = server.getActiveNodesWithConnector(connectorId);
}
while (activeNodesWithConnector.isEmpty());
}
public void installPlugin(Plugin plugin)
{
server.installPlugin(plugin);
}
public void createCatalog(String catalogName, String connectorName)
{
createCatalog(catalogName, connectorName, ImmutableMap.of());
}
public void createCatalog(String catalogName, String connectorName, Map<String, String> properties)
{
ConnectorId connectorId = server.createCatalog(catalogName, connectorName, properties);
refreshNodes(connectorId);
}
@Override
public List<QualifiedObjectName> listTables(Session session, String catalog, String schema)
{
lock.readLock().lock();
try {
return prestoClient.listTables(session, catalog, schema);
}
finally {
lock.readLock().unlock();
}
}
@Override
public boolean tableExists(Session session, String table)
{
lock.readLock().lock();
try {
return prestoClient.tableExists(session, table);
}
finally {
lock.readLock().unlock();
}
}
@Override
public Lock getExclusiveLock()
{
return lock.writeLock();
}
private static TestingPrestoServer createTestingPrestoServer()
throws Exception
{
ImmutableMap.Builder<String, String> properties = ImmutableMap.<String, String>builder()
.put("query.client.timeout", "10m")
.put("exchange.http-client.idle-timeout", "1h")
.put("node-scheduler.min-candidates", "1")
.put("datasources", "system");
return new TestingPrestoServer(true, properties.build(), null, null, new SqlParserOptions(), ImmutableList.of());
}
}
| {
"content_hash": "278ebc2a001f207d581615d6424afe7a",
"timestamp": "",
"source": "github",
"line_count": 266,
"max_line_length": 121,
"avg_line_length": 28.402255639097746,
"alnum_prop": 0.6668431502316347,
"repo_name": "sopel39/presto",
"id": "e5ee7c4d879a080d43db1aef9c8ac5d53c9dcaee",
"size": "7555",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "presto-tests/src/main/java/io/prestosql/tests/StandaloneQueryRunner.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "26917"
},
{
"name": "CSS",
"bytes": "12957"
},
{
"name": "HTML",
"bytes": "28832"
},
{
"name": "Java",
"bytes": "31249883"
},
{
"name": "JavaScript",
"bytes": "211244"
},
{
"name": "Makefile",
"bytes": "6830"
},
{
"name": "PLSQL",
"bytes": "2797"
},
{
"name": "PLpgSQL",
"bytes": "11504"
},
{
"name": "Python",
"bytes": "7811"
},
{
"name": "SQLPL",
"bytes": "926"
},
{
"name": "Shell",
"bytes": "29857"
},
{
"name": "Thrift",
"bytes": "12631"
}
],
"symlink_target": ""
} |
// Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al.
// http://www.avisynth.org
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
// http://www.gnu.org/copyleft/gpl.html .
//
// Linking Avisynth statically or dynamically with other modules is making a
// combined work based on Avisynth. Thus, the terms and conditions of the GNU
// General Public License cover the whole combination.
//
// As a special exception, the copyright holders of Avisynth give you
// permission to link Avisynth with independent modules that communicate with
// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
// terms of these independent modules, and to copy and distribute the
// resulting combined work under terms of your choice, provided that
// every copy of the combined work is accompanied by a complete copy of
// the source code of Avisynth (the version of Avisynth used to produce the
// combined work), being distributed under the terms of the GNU General
// Public License plus this exception. An independent module is a module
// which is not derived from or based on Avisynth, such as 3rd-party filters,
// import and export plugins, or graphical user interfaces.
#ifndef __Field_H__
#define __Field_H__
#include "../internal.h"
/**********************************************************************
* Reverse Engineering GetParity
* -----------------------------
* Notes for self - and hopefully useful to others.
*
* AviSynth is capable of dealing with both progressive and interlaced
* material. The main problem is, that it often doesn't know what it
* recieves from source filters.
*
* The fieldbased property in VideoInfo is made to give guides to
* AviSynth on what to expect - unfortunately it is not that easy.
*
* GetParity is made to distinguish TFF and BFF. When a given frame is
* returning true, it means that this frame should be considered
* top field.
* So an interlaced image always returning true must be interpreted as
* TFF.
*
* SeparateFields splits out Top and Bottom frames. It returns true on
* GetParity for Top fields and false for Bottom fields.
*
**********************************************************************/
class ComplementParity : public GenericVideoFilter
/**
* Class to switch field precedence
**/
{
public:
ComplementParity(PClip _child) : GenericVideoFilter(_child) {
if (vi.IsBFF() && !vi.IsTFF()) {
vi.Clear(VideoInfo::IT_BFF);
vi.Set(VideoInfo::IT_TFF);
}
else if (!vi.IsBFF() && vi.IsTFF()) {
vi.Set(VideoInfo::IT_BFF);
vi.Clear(VideoInfo::IT_TFF);
}
// else both were set (illegal state) or both were unset (parity unknown)
}
inline bool __stdcall GetParity(int n)
{ return !child->GetParity(n); }
inline static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env)
{ return new ComplementParity(args[0].AsClip()); }
};
class AssumeParity : public GenericVideoFilter
/**
* Class to assume field precedence, AssumeTFF() & AssumeBFF()
**/
{
public:
AssumeParity(PClip _child, bool _parity) : GenericVideoFilter(_child), parity(_parity) {
if (parity) {
vi.Clear(VideoInfo::IT_BFF);
vi.Set(VideoInfo::IT_TFF);
} else {
vi.Set(VideoInfo::IT_BFF);
vi.Clear(VideoInfo::IT_TFF);
}
}
inline bool __stdcall GetParity(int n)
{ return parity ^ (vi.IsFieldBased() && (n & 1)); }
inline static AVSValue __cdecl Create(AVSValue args, void* user_data, IScriptEnvironment* env)
{ return new AssumeParity(args[0].AsClip(), user_data!=0); }
private:
bool parity;
};
class AssumeFieldBased : public GenericVideoFilter
/**
* Class to assume field-based video
**/
{
public:
AssumeFieldBased(PClip _child) : GenericVideoFilter(_child)
{ vi.SetFieldBased(true); vi.Clear(VideoInfo::IT_BFF); vi.Clear(VideoInfo::IT_TFF); }
inline bool __stdcall GetParity(int n)
{ return n&1; }
inline static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env)
{ return new AssumeFieldBased(args[0].AsClip()); }
};
class AssumeFrameBased : public GenericVideoFilter
/**
* Class to assume frame-based video
**/
{
public:
AssumeFrameBased(PClip _child) : GenericVideoFilter(_child)
{ vi.SetFieldBased(false); vi.Clear(VideoInfo::IT_BFF); vi.Clear(VideoInfo::IT_TFF); }
inline bool __stdcall GetParity(int n)
{ return false; }
inline static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env)
{ return new AssumeFrameBased(args[0].AsClip()); }
};
class SeparateFields : public GenericVideoFilter
/**
* Class to separate fields of interlaced video
**/
{
public:
SeparateFields(PClip _child, IScriptEnvironment* env);
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
inline bool __stdcall GetParity(int n)
{ return child->GetParity(n>>1) ^ (n&1); }
static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
};
class DoubleWeaveFields : public GenericVideoFilter
/**
* Class to weave fields into an equal number of frames
**/
{
public:
DoubleWeaveFields(PClip _child);
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
// bool GetParity(int n);
private:
void CopyField(const PVideoFrame& dst, const PVideoFrame& src, bool parity);
};
class DoubleWeaveFrames : public GenericVideoFilter
/**
* Class to double-weave frames
**/
{
public:
DoubleWeaveFrames(PClip _child);
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
inline bool __stdcall GetParity(int n)
{ return child->GetParity(n>>1) ^ (n&1); }
private:
void CopyAlternateLines(const PVideoFrame& dst, const PVideoFrame& src, bool parity);
};
class Interleave : public IClip
/**
* Class to interleave several clips frame-by-frame
**/
{
public:
Interleave(int _num_children, const PClip* _child_array, IScriptEnvironment* env);
inline const VideoInfo& __stdcall GetVideoInfo()
{ return vi; }
inline PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env)
{ return child_array[n % num_children]->GetFrame(n / num_children, env); }
inline void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env)
{ child_array[0]->GetAudio(buf, start, count, env); }
inline bool __stdcall GetParity(int n)
{ return child_array[n % num_children]->GetParity(n / num_children); }
virtual ~Interleave()
{ delete[] child_array; }
static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
void __stdcall SetCacheHints(int cachehints,int frame_range) { };
private:
const int num_children;
const PClip* child_array;
VideoInfo vi;
};
class SelectEvery : public GenericVideoFilter
/**
* Class to perform generalized pulldown (patterned frame removal)
**/
{
public:
SelectEvery(PClip _child, int _every, int _from);
inline PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env)
{ return child->GetFrame(n*every+from, env); }
inline bool __stdcall GetParity(int n)
{ return child->GetParity(n*every+from); }
static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
inline static AVSValue __cdecl Create_SelectEven(AVSValue args, void*, IScriptEnvironment* env)
{ return new SelectEvery(args[0].AsClip(), 2, 0); }
inline static AVSValue __cdecl Create_SelectOdd(AVSValue args, void*, IScriptEnvironment* env)
{ return new SelectEvery(args[0].AsClip(), 2, 1); }
private:
const int every, from;
};
class Fieldwise : public GenericVideoFilter
/**
* Helper class for Bob filter
**/
{
public:
Fieldwise(PClip _child1, PClip _child2);
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
private:
PClip child2;
};
class SelectRangeEvery : public GenericVideoFilter {
int every, length;
bool audio;
public:
SelectRangeEvery(PClip _child, int _every, int _length, int _offset, bool _audio, IScriptEnvironment* env);
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
bool __stdcall GetParity(int n);
static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env);
void __stdcall SelectRangeEvery::GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env);
};
/**** Factory methods ****/
static AVSValue __cdecl Create_DoubleWeave(AVSValue args, void*, IScriptEnvironment* env);
static AVSValue __cdecl Create_Weave(AVSValue args, void*, IScriptEnvironment* env);
static AVSValue __cdecl Create_Pulldown(AVSValue args, void*, IScriptEnvironment* env);
static AVSValue __cdecl Create_SwapFields(AVSValue args, void*, IScriptEnvironment* env);
static AVSValue __cdecl Create_Bob(AVSValue args, void*, IScriptEnvironment* env);
static PClip new_SeparateFields(PClip _child, IScriptEnvironment* env);
static PClip new_AssumeFrameBased(PClip _child);
#endif // __Field_H__
| {
"content_hash": "280af4a64022bb16de27bbfb9ce674c9",
"timestamp": "",
"source": "github",
"line_count": 282,
"max_line_length": 110,
"avg_line_length": 34.663120567375884,
"alnum_prop": 0.689002557544757,
"repo_name": "dcherian/tools",
"id": "68d39a44d1e472cc841cf414fb506cb2852b627c",
"size": "9775",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "misc/avisynth-reader/avisynth/src/filters/field.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "9785"
},
{
"name": "Batchfile",
"bytes": "11634"
},
{
"name": "C",
"bytes": "902842"
},
{
"name": "C++",
"bytes": "7682495"
},
{
"name": "CMake",
"bytes": "228301"
},
{
"name": "CSS",
"bytes": "25741"
},
{
"name": "Emacs Lisp",
"bytes": "327"
},
{
"name": "Fortran",
"bytes": "3624853"
},
{
"name": "HTML",
"bytes": "1658079"
},
{
"name": "Java",
"bytes": "780"
},
{
"name": "M",
"bytes": "112792"
},
{
"name": "Makefile",
"bytes": "4177"
},
{
"name": "Mathematica",
"bytes": "7607"
},
{
"name": "Matlab",
"bytes": "15447438"
},
{
"name": "Mercury",
"bytes": "115"
},
{
"name": "NSIS",
"bytes": "115345"
},
{
"name": "Objective-C",
"bytes": "44801"
},
{
"name": "Pascal",
"bytes": "1724"
},
{
"name": "Perl",
"bytes": "24569"
},
{
"name": "Python",
"bytes": "424764"
},
{
"name": "Shell",
"bytes": "178820"
},
{
"name": "TeX",
"bytes": "322500"
},
{
"name": "Vim script",
"bytes": "1360"
}
],
"symlink_target": ""
} |
package com.castlemon.maven.processing;
import org.springframework.stereotype.Component;
import com.castlemon.maven.domain.RunData;
import com.castlemon.maven.domain.Usage;
@Component
public class StatsGenerator {
public void generateStats(RunData runData) {
for (Usage usage : runData.getUsages()) {
if (runData.getVersionCounts().containsKey(usage.getVersionUsed())) {
int count = runData.getVersionCounts().get(usage.getVersionUsed());
runData.getVersionCounts().put(usage.getVersionUsed(), ++count);
} else {
runData.getVersionCounts().put(usage.getVersionUsed(), 1);
}
}
}
}
| {
"content_hash": "3db9eb80398fcd79fdfcf38c1bde6f62",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 75,
"avg_line_length": 30.045454545454547,
"alnum_prop": 0.6883509833585476,
"repo_name": "TrueDub/maven-usage",
"id": "f3f9f2d26a45fb589e55f135d07dc31b1f0b73a6",
"size": "661",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "src/main/java/com/castlemon/maven/processing/StatsGenerator.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "FreeMarker",
"bytes": "3291"
},
{
"name": "Java",
"bytes": "69886"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_20) on Mon May 02 10:23:15 CEST 2011 -->
<TITLE>
play.utils Class Hierarchy (Play! API)
</TITLE>
<META NAME="date" CONTENT="2011-05-02">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="play.utils Class Hierarchy (Play! API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../play/test/package-tree.html"><B>PREV</B></A>
<A HREF="../../play/vfs/package-tree.html"><B>NEXT</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?play/utils/package-tree.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
Hierarchy For Package play.utils
</H2>
</CENTER>
<DL>
<DT><B>Package Hierarchies:</B><DD><A HREF="../../overview-tree.html">All Packages</A></DL>
<HR>
<H2>
Class Hierarchy
</H2>
<UL>
<LI TYPE="circle">java.lang.Object<UL>
<LI TYPE="circle">java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)
<UL>
<LI TYPE="circle">java.util.HashMap<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable)
<UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/Properties.html" title="class in play.utils"><B>Properties</B></A></UL>
</UL>
<LI TYPE="circle">org.apache.log4j.AppenderSkeleton (implements org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler)
<UL>
<LI TYPE="circle">org.apache.log4j.WriterAppender<UL>
<LI TYPE="circle">org.apache.log4j.ConsoleAppender<UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/ANSIConsoleAppender.html" title="class in play.utils"><B>ANSIConsoleAppender</B></A></UL>
</UL>
</UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/Default.html" title="class in play.utils"><B>Default</B></A><LI TYPE="circle">java.util.Dictionary<K,V><UL>
<LI TYPE="circle">java.util.Hashtable<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable)
<UL>
<LI TYPE="circle">java.util.Properties<UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/OrderSafeProperties.html" title="class in play.utils"><B>OrderSafeProperties</B></A></UL>
</UL>
</UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/FakeRequestCreator.html" title="class in play.utils"><B>FakeRequestCreator</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/HTML.html" title="class in play.utils"><B>HTML</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/HTML.HtmlCharacterEntityReferences.html" title="class in play.utils"><B>HTML.HtmlCharacterEntityReferences</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/Java.html" title="class in play.utils"><B>Java</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/Java.FieldWrapper.html" title="class in play.utils"><B>Java.FieldWrapper</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/NoOpEntityResolver.html" title="class in play.utils"><B>NoOpEntityResolver</B></A> (implements org.xml.sax.EntityResolver)
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/PThreadFactory.html" title="class in play.utils"><B>PThreadFactory</B></A> (implements java.util.concurrent.ThreadFactory)
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/SmartFuture.html" title="class in play.utils"><B>SmartFuture</B></A><V> (implements play.utils.<A HREF="../../play/utils/Action.html" title="interface in play.utils">Action</A><T>, java.util.concurrent.Future<V>)
<LI TYPE="circle">javax.net.SocketFactory<UL>
<LI TYPE="circle">javax.net.ssl.SSLSocketFactory<UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/YesSSLSocketFactory.html" title="class in play.utils"><B>YesSSLSocketFactory</B></A></UL>
</UL>
<LI TYPE="circle">java.lang.Throwable (implements java.io.Serializable)
<UL>
<LI TYPE="circle">java.lang.Exception<UL>
<LI TYPE="circle">java.lang.RuntimeException<UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/FastRuntimeException.html" title="class in play.utils"><B>FastRuntimeException</B></A></UL>
</UL>
</UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/Utils.html" title="class in play.utils"><B>Utils</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/Utils.AlternativeDateFormat.html" title="class in play.utils"><B>Utils.AlternativeDateFormat</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/Utils.Maps.html" title="class in play.utils"><B>Utils.Maps</B></A><LI TYPE="circle">play.utils.<A HREF="../../play/utils/YesSSLSocketFactory.YesTrustManager.html" title="class in play.utils"><B>YesSSLSocketFactory.YesTrustManager</B></A> (implements javax.net.ssl.X509TrustManager)
</UL>
</UL>
<H2>
Interface Hierarchy
</H2>
<UL>
<LI TYPE="circle">play.utils.<A HREF="../../play/utils/Action.html" title="interface in play.utils"><B>Action</B></A><T></UL>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../play/test/package-tree.html"><B>PREV</B></A>
<A HREF="../../play/vfs/package-tree.html"><B>NEXT</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?play/utils/package-tree.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<a href="http://guillaume.bort.fr">Guillaume Bort</a> & <a href="http://www.zenexity.fr">zenexity</a> - Distributed under <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache 2 licence</a>, without any warrantly
</BODY>
</HTML>
| {
"content_hash": "8d89601c7b8006617a9b2d889b71509c",
"timestamp": "",
"source": "github",
"line_count": 193,
"max_line_length": 836,
"avg_line_length": 50.84455958549223,
"alnum_prop": 0.6599408947314787,
"repo_name": "lafayette/JBTT",
"id": "af9c7414041122cfb8bcddcc13fad4d9ad8fddb8",
"size": "9813",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "framework/documentation/api/play/utils/package-tree.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "76128"
},
{
"name": "C++",
"bytes": "30518"
},
{
"name": "Java",
"bytes": "1882568"
},
{
"name": "JavaScript",
"bytes": "1326008"
},
{
"name": "Python",
"bytes": "8682515"
},
{
"name": "Shell",
"bytes": "1977"
}
],
"symlink_target": ""
} |
__author__ = 'alicia.williams'
#Week Three: Pig Latin
#CIS-125 FA 2015
# File: PigLatinAssignment.py
# This program takes English words and translates them to Pig Latin.
def main():
print("This program translates an English word to Pig Latin. \n")
#Prompting the user to enter an English word to translate.
#To compensate for the case sensitivity, I created another variable with the
#lower string method and attached that to the eng variable to make the
#outputs all lowercase.
eng = input("Please enter an Engilsh word to translate: ")
pig = eng.lower()
vowel = "aeiouAEIOU"
#Translate the word into Pig Latin.
#Printing the translated word.
if pig[0] in vowel:
print(pig + "yay")
else:
print(pig[1:] + pig[0] + "ay")
main() | {
"content_hash": "be72406e20a31a2bab78c3b96e90f924",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 80,
"avg_line_length": 29.925925925925927,
"alnum_prop": 0.6683168316831684,
"repo_name": "ajanaew24/Week-Three-Assignment",
"id": "18bf0b6f0e386a0ad1dc8e4c4a7a83e81dac5c31",
"size": "808",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "PigLatinAssignment.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "1822"
}
],
"symlink_target": ""
} |
using content::BrowserThread;
namespace safe_browsing {
SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager()
: v4_get_hash_protocol_manager_(NULL) {
}
SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() {
DCHECK(v4_get_hash_protocol_manager_ == NULL);
}
void SafeBrowsingDatabaseManager::StartOnIOThread(
net::URLRequestContextGetter* request_context_getter,
const V4ProtocolConfig& config) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (request_context_getter) {
// Instantiate a V4GetHashProtocolManager.
v4_get_hash_protocol_manager_ = V4GetHashProtocolManager::Create(
request_context_getter, config);
}
}
// |shutdown| not used. Destroys the v4 protocol managers. This may be called
// multiple times during the life of the DatabaseManager.
// Must be called on IO thread.
void SafeBrowsingDatabaseManager::StopOnIOThread(bool shutdown) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
// This cancels all in-flight GetHash requests.
if (v4_get_hash_protocol_manager_) {
delete v4_get_hash_protocol_manager_;
v4_get_hash_protocol_manager_ = NULL;
}
}
void SafeBrowsingDatabaseManager::CheckApiBlacklistUrl(const GURL& url,
Client* client) {
// TODO(kcarattini): Implement this.
}
} // namespace safe_browsing
| {
"content_hash": "bcecf66039b372b7ab1690cfaa7d8b06",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 77,
"avg_line_length": 32.609756097560975,
"alnum_prop": 0.7217651458489155,
"repo_name": "was4444/chromium.src",
"id": "b8998b4431fcdde86dadd3b664dde8504c2f1b05",
"size": "1762",
"binary": false,
"copies": "1",
"ref": "refs/heads/nw15",
"path": "components/safe_browsing_db/database_manager.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
const propTypes = {
item: PropTypes.object,
index: PropTypes.number,
activateIndex: PropTypes.number,
onSelectItem: PropTypes.func
};
export default class MenuItem extends Component {
constructor(props, context) {
super(props, context);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
const { index, onSelectItem } = this.props;
onSelectItem(index);
}
render() {
const { item, index, activateIndex } = this.props;
return (
<li
className={classNames({
'video-react-menu-item': true,
'video-react-selected': index === activateIndex
})}
role="menuitem"
onClick={this.handleClick}
>
{item.label}
<span className="video-react-control-text" />
</li>
);
}
}
MenuItem.propTypes = propTypes;
MenuItem.displayName = 'MenuItem';
| {
"content_hash": "12ea3097abc25bc48e4f8d0a3de065d2",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 57,
"avg_line_length": 23.046511627906977,
"alnum_prop": 0.6367305751765893,
"repo_name": "video-react/video-react",
"id": "00e2610b4d79ef98e5e1ae0b15dbdcdedb3da0f4",
"size": "991",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/components/menu/MenuItem.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "158659"
},
{
"name": "SCSS",
"bytes": "59199"
},
{
"name": "Shell",
"bytes": "3552"
}
],
"symlink_target": ""
} |
/************************************************************************
* libc/math/lib_modfl.c
*
* This file is a part of NuttX:
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Ported by: Darcy Gong
*
* It derives from the Rhombs OS math library by Nick Johnson which has
* a compatibile, MIT-style license:
*
* Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
************************************************************************/
/************************************************************************
* Included Files
************************************************************************/
#include <tinyara/config.h>
#include <tinyara/compiler.h>
#include <stdint.h>
#include <math.h>
/************************************************************************
* Public Functions
************************************************************************/
#ifdef CONFIG_HAVE_LONG_DOUBLE
long double modfl(long double x, long double *iptr)
{
if (fabs(x) >= 4503599627370496.0) {
*iptr = x;
return 0.0;
} else if (fabs(x) < 1.0) {
*iptr = 0.0;
return x;
} else {
*iptr = (long double)(int64_t)x;
return (x - *iptr);
}
}
#endif
| {
"content_hash": "6c4f3907cf15bcdc78a2bf5d2c40721e",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 75,
"avg_line_length": 34.05263157894737,
"alnum_prop": 0.5507470376094796,
"repo_name": "guswns0528/TizenRT",
"id": "010f5c0f1469ed6a6bcb18566ba4922bbd79aad7",
"size": "2716",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "lib/libc/math/lib_modfl.c",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "206235"
},
{
"name": "Batchfile",
"bytes": "39014"
},
{
"name": "C",
"bytes": "29303779"
},
{
"name": "C++",
"bytes": "532552"
},
{
"name": "HTML",
"bytes": "2149"
},
{
"name": "Makefile",
"bytes": "498279"
},
{
"name": "Objective-C",
"bytes": "90599"
},
{
"name": "Python",
"bytes": "31505"
},
{
"name": "Shell",
"bytes": "129081"
},
{
"name": "Tcl",
"bytes": "325812"
}
],
"symlink_target": ""
} |
package org.apache.flink.streaming.runtime.tasks;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.runtime.jobgraph.OperatorID;
import org.apache.flink.streaming.api.graph.StreamConfig;
import org.apache.flink.streaming.api.graph.StreamEdge;
import org.apache.flink.streaming.api.graph.StreamNode;
import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
import org.apache.flink.streaming.api.operators.OneInputStreamOperatorFactory;
import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
import org.apache.flink.streaming.api.operators.StreamOperator;
import org.apache.flink.streaming.api.operators.StreamOperatorFactory;
import org.apache.flink.streaming.runtime.partitioner.BroadcastPartitioner;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import static org.apache.flink.util.Preconditions.checkNotNull;
/**
* Helper class to build StreamConfig for chain of operators.
*/
public class StreamConfigChainer<OWNER> {
private final OWNER owner;
private final StreamConfig headConfig;
private final Map<Integer, StreamConfig> chainedConfigs = new HashMap<>();
private final long bufferTimeout;
private StreamConfig tailConfig;
private int chainIndex = 0;
StreamConfigChainer(OperatorID headOperatorID, StreamConfig headConfig, OWNER owner) {
this.owner = checkNotNull(owner);
this.headConfig = checkNotNull(headConfig);
this.tailConfig = checkNotNull(headConfig);
this.bufferTimeout = headConfig.getBufferTimeout();
head(headOperatorID);
}
private void head(OperatorID headOperatorID) {
headConfig.setOperatorID(headOperatorID);
headConfig.setChainStart();
headConfig.setChainIndex(chainIndex);
headConfig.setBufferTimeout(bufferTimeout);
}
public <T> StreamConfigChainer<OWNER> chain(
OperatorID operatorID,
OneInputStreamOperator<T, T> operator,
TypeSerializer<T> typeSerializer,
boolean createKeyedStateBackend) {
return chain(operatorID, operator, typeSerializer, typeSerializer, createKeyedStateBackend);
}
public <T> StreamConfigChainer<OWNER> chain(
OneInputStreamOperator<T, T> operator,
TypeSerializer<T> typeSerializer) {
return chain(new OperatorID(), operator, typeSerializer);
}
public <T> StreamConfigChainer<OWNER> chain(
OperatorID operatorID,
OneInputStreamOperator<T, T> operator,
TypeSerializer<T> typeSerializer) {
return chain(operatorID, operator, typeSerializer, typeSerializer, false);
}
public <T> StreamConfigChainer<OWNER> chain(
OneInputStreamOperatorFactory<T, T> operatorFactory,
TypeSerializer<T> typeSerializer) {
return chain(new OperatorID(), operatorFactory, typeSerializer);
}
public <T> StreamConfigChainer<OWNER> chain(
OperatorID operatorID,
OneInputStreamOperatorFactory<T, T> operatorFactory,
TypeSerializer<T> typeSerializer) {
return chain(operatorID, operatorFactory, typeSerializer, typeSerializer, false);
}
private <IN, OUT> StreamConfigChainer<OWNER> chain(
OperatorID operatorID,
OneInputStreamOperator<IN, OUT> operator,
TypeSerializer<IN> inputSerializer,
TypeSerializer<OUT> outputSerializer,
boolean createKeyedStateBackend) {
return chain(
operatorID,
SimpleOperatorFactory.of(operator),
inputSerializer,
outputSerializer,
createKeyedStateBackend);
}
public <IN, OUT> StreamConfigChainer<OWNER> chain(
OperatorID operatorID,
StreamOperatorFactory<OUT> operatorFactory,
TypeSerializer<IN> inputSerializer,
TypeSerializer<OUT> outputSerializer,
boolean createKeyedStateBackend) {
chainIndex++;
tailConfig.setChainedOutputs(Collections.singletonList(
new StreamEdge(
new StreamNode(tailConfig.getChainIndex(), null, null, (StreamOperator<?>) null, null, null, null),
new StreamNode(chainIndex, null, null, (StreamOperator<?>) null, null, null, null),
0,
Collections.<String>emptyList(),
null,
null)));
tailConfig = new StreamConfig(new Configuration());
tailConfig.setStreamOperatorFactory(checkNotNull(operatorFactory));
tailConfig.setOperatorID(checkNotNull(operatorID));
tailConfig.setTypeSerializersIn(inputSerializer);
tailConfig.setTypeSerializerOut(outputSerializer);
if (createKeyedStateBackend) {
// used to test multiple stateful operators chained in a single task.
tailConfig.setStateKeySerializer(inputSerializer);
}
tailConfig.setChainIndex(chainIndex);
tailConfig.setBufferTimeout(bufferTimeout);
chainedConfigs.put(chainIndex, tailConfig);
return this;
}
public OWNER finish() {
List<StreamEdge> outEdgesInOrder = new LinkedList<StreamEdge>();
outEdgesInOrder.add(
new StreamEdge(
new StreamNode(chainIndex, null, null, (StreamOperator<?>) null, null, null, null),
new StreamNode(chainIndex , null, null, (StreamOperator<?>) null, null, null, null),
0,
Collections.<String>emptyList(),
new BroadcastPartitioner<Object>(),
null));
tailConfig.setChainEnd();
tailConfig.setOutputSelectors(Collections.emptyList());
tailConfig.setNumberOfOutputs(1);
tailConfig.setOutEdgesInOrder(outEdgesInOrder);
tailConfig.setNonChainedOutputs(outEdgesInOrder);
headConfig.setTransitiveChainedTaskConfigs(chainedConfigs);
headConfig.setOutEdgesInOrder(outEdgesInOrder);
return owner;
}
}
| {
"content_hash": "e52e91a5e6f22a004bfa64ada0540eb3",
"timestamp": "",
"source": "github",
"line_count": 157,
"max_line_length": 103,
"avg_line_length": 34.496815286624205,
"alnum_prop": 0.7856351550960118,
"repo_name": "jinglining/flink",
"id": "b1915125884def17b91479486363533f724a1c7b",
"size": "6217",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamConfigChainer.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "4588"
},
{
"name": "CSS",
"bytes": "58146"
},
{
"name": "Clojure",
"bytes": "93329"
},
{
"name": "Dockerfile",
"bytes": "12142"
},
{
"name": "FreeMarker",
"bytes": "25294"
},
{
"name": "HTML",
"bytes": "108358"
},
{
"name": "Java",
"bytes": "52000074"
},
{
"name": "JavaScript",
"bytes": "1829"
},
{
"name": "Makefile",
"bytes": "5134"
},
{
"name": "Python",
"bytes": "1016879"
},
{
"name": "Scala",
"bytes": "13770008"
},
{
"name": "Shell",
"bytes": "514468"
},
{
"name": "TSQL",
"bytes": "123113"
},
{
"name": "TypeScript",
"bytes": "247320"
}
],
"symlink_target": ""
} |
- [ ] Is this a question or bug? [Stack Overflow](https://stackoverflow.com/questions/tagged/createjs) is a much better place to ask any questions you may have.
- [ ] Did you search the [issues](https://github.com/CreateJS/SoundJS/issues) to see if someone else has already reported your issue? If yes, please add more details if you have any!
- [ ] If you're using an older [version](https://github.com/CreateJS/SoundJS/blob/master/VERSIONS.txt), have you tried the latest?
- [ ] If you're requesting a new feature; provide as many details as you can. Why do you want this feature? Do you have ideas for how this feature should be implemented? Pseudocode is always welcome!
### Issue Details
* Version used (Ex; 1.0):
* Describe whats happening (Include any relevant console errors, a [Gist](https://gist.github.com/) is preferred for longer errors):
* OS & Browser version *(Please be specific)* (Ex; Windows 10 Home, Chrome 62.0.3202.94):
* Do you know of any workarounds?
* Provide any extra details that will help us fix your issue. Including a link to a [CodePen.io](https://codepen.io) or [JSFiddle.net](https://jsfiddle.net) example that shows the issue in isolation will greatly increase the chance of getting a quick response.
| {
"content_hash": "c5893e175455b036c80aa7914e301b01",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 260,
"avg_line_length": 48.23076923076923,
"alnum_prop": 0.7416267942583732,
"repo_name": "CreateJS/SoundJS",
"id": "4ca50b6cf318b9dd1d15d9b1a64b912c5a779783",
"size": "1263",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ISSUE_TEMPLATE.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ActionScript",
"bytes": "20063"
},
{
"name": "CSS",
"bytes": "90604"
},
{
"name": "HTML",
"bytes": "83442"
},
{
"name": "JavaScript",
"bytes": "1094455"
}
],
"symlink_target": ""
} |
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import { hashHistory } from 'react-router';
import { routerMiddleware, push } from 'react-router-redux';
import createLogger from 'redux-logger';
import rootReducer from '../reducers';
import remoteActionMiddleware from './remote_action_middleware'
import * as Actions from '../actions/installerActions';
import type { counterStateType } from '../reducers/counter';
import io from 'socket.io-client'
const actionCreators = {
...Actions,
push,
};
const logger = createLogger({
level: 'info',
collapsed: true
});
const router = routerMiddleware(hashHistory);
// If Redux DevTools Extension is installed use it, otherwise use Redux compose
/* eslint-disable no-underscore-dangle */
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
// Options: http://zalmoxisus.github.io/redux-devtools-extension/API/Arguments.html
actionCreators,
}) :
compose;
const socket = io('http://localhost:8090');
/* eslint-enable no-underscore-dangle */
const enhancer = composeEnhancers(
applyMiddleware(thunk, router, logger,remoteActionMiddleware(socket))
);
export default function configureStore(initialState?: counterStateType) {
const store = createStore(rootReducer, initialState, enhancer);
if (module.hot) {
module.hot.accept('../reducers', () =>
store.replaceReducer(require('../reducers')) // eslint-disable-line global-require
);
}
return store;
}
| {
"content_hash": "32496fb724b076f499878ab7c78dfda2",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 88,
"avg_line_length": 32.3125,
"alnum_prop": 0.7350096711798839,
"repo_name": "rafser01/installer_electron",
"id": "465f7b282b689003c24d9c3bc47832e5b5b10dba",
"size": "1551",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/store/configureStore.development.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2650"
},
{
"name": "HTML",
"bytes": "926"
},
{
"name": "JavaScript",
"bytes": "510008"
}
],
"symlink_target": ""
} |
package com.palantir.atlasdb.keyvalue.dbkvs.impl.oracle;
import com.palantir.atlasdb.AtlasDbConstants;
public final class PrimaryKeyConstraintNames {
private PrimaryKeyConstraintNames() {
// Utility class
}
public static String get(String name) {
return AtlasDbConstants.PRIMARY_KEY_CONSTRAINT_PREFIX + name;
}
}
| {
"content_hash": "a196a06d6b96836bbe0733e5044242f8",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 69,
"avg_line_length": 23.333333333333332,
"alnum_prop": 0.7314285714285714,
"repo_name": "palantir/atlasdb",
"id": "1bce4086f900d66dcb064c8dd60efec349ad0487",
"size": "984",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "atlasdb-dbkvs/src/main/java/com/palantir/atlasdb/keyvalue/dbkvs/impl/oracle/PrimaryKeyConstraintNames.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Clojure",
"bytes": "15901"
},
{
"name": "Dockerfile",
"bytes": "1339"
},
{
"name": "FreeMarker",
"bytes": "7719"
},
{
"name": "Groovy",
"bytes": "56144"
},
{
"name": "Java",
"bytes": "15808101"
},
{
"name": "Python",
"bytes": "8139"
},
{
"name": "Shell",
"bytes": "26450"
}
],
"symlink_target": ""
} |
'use strict'
var traceHelper = require('../helpers/traceHelper')
function TraceAnalyser (_cache) {
this.traceCache = _cache
this.trace = null
}
TraceAnalyser.prototype.analyse = function (trace, tx, callback) {
this.trace = trace
this.traceCache.pushStoreChanges(0, tx.to)
var context = {
storageContext: [tx.to],
currentCallIndex: 0,
lastCallIndex: 0
}
var callStack = [tx.to]
this.traceCache.pushCall(trace[0], 0, callStack[0], callStack.slice(0))
if (traceHelper.isContractCreation(tx.to)) {
this.traceCache.pushContractCreation(tx.to, tx.input)
}
this.buildCalldata(0, this.trace[0], tx, true)
for (var k = 0; k < this.trace.length; k++) {
var step = this.trace[k]
this.buildMemory(k, step)
context = this.buildDepth(k, step, tx, callStack, context)
context = this.buildStorage(k, step, context)
this.buildReturnValues(k, step)
}
callback(null, true)
}
TraceAnalyser.prototype.buildReturnValues = function (index, step) {
if (traceHelper.isReturnInstruction(step)) {
var offset = 2 * parseInt(step.stack[step.stack.length - 1], 16)
var size = 2 * parseInt(step.stack[step.stack.length - 2], 16)
var memory = this.trace[this.traceCache.memoryChanges[this.traceCache.memoryChanges.length - 1]].memory
this.traceCache.pushReturnValue(index, '0x' + memory.join('').substr(offset, size))
}
}
TraceAnalyser.prototype.buildCalldata = function (index, step, tx, newContext) {
var calldata = ''
if (index === 0) {
calldata = tx.input
this.traceCache.pushCallDataChanges(index, calldata)
} else if (!newContext) {
var lastCall = this.traceCache.callsData[this.traceCache.callDataChanges[this.traceCache.callDataChanges.length - 2]]
this.traceCache.pushCallDataChanges(index + 1, lastCall)
} else {
var memory = this.trace[this.traceCache.memoryChanges[this.traceCache.memoryChanges.length - 1]].memory
var callStep = this.trace[index]
var stack = callStep.stack
var offset = ''
var size = ''
if (callStep.op === 'DELEGATECALL') {
offset = 2 * parseInt(stack[stack.length - 3], 16)
size = 2 * parseInt(stack[stack.length - 4], 16)
} else {
offset = 2 * parseInt(stack[stack.length - 4], 16)
size = 2 * parseInt(stack[stack.length - 5], 16)
}
calldata = '0x' + memory.join('').substr(offset, size)
this.traceCache.pushCallDataChanges(index + 1, calldata)
}
}
TraceAnalyser.prototype.buildMemory = function (index, step) {
if (step.memory) {
this.traceCache.pushMemoryChanges(index)
}
}
TraceAnalyser.prototype.buildStorage = function (index, step, context) {
if (traceHelper.newContextStorage(step) && !traceHelper.isCallToPrecompiledContract(index, this.trace)) {
var calledAddress = traceHelper.resolveCalledAddress(index, this.trace)
if (calledAddress) {
context.storageContext.push(calledAddress)
} else {
console.log('unable to build storage changes. ' + index + ' does not match with a CALL. storage changes will be corrupted')
}
this.traceCache.pushStoreChanges(index + 1, context.storageContext[context.storageContext.length - 1])
} else if (traceHelper.isSSTOREInstruction(step)) {
this.traceCache.pushStoreChanges(index + 1, context.storageContext[context.storageContext.length - 1], step.stack[step.stack.length - 1], step.stack[step.stack.length - 2])
} else if (traceHelper.isReturnInstruction(step)) {
context.storageContext.pop()
this.traceCache.pushStoreChanges(index + 1, context.storageContext[context.storageContext.length - 1])
}
return context
}
TraceAnalyser.prototype.buildDepth = function (index, step, tx, callStack, context) {
if (traceHelper.isCallInstruction(step) && !traceHelper.isCallToPrecompiledContract(index, this.trace)) {
var newAddress
if (traceHelper.isCreateInstruction(step)) {
newAddress = traceHelper.contractCreationToken(index)
callStack.push(newAddress)
var lastMemoryChange = this.traceCache.memoryChanges[this.traceCache.memoryChanges.length - 1]
this.traceCache.pushContractCreationFromMemory(index, newAddress, this.trace, lastMemoryChange)
} else {
newAddress = traceHelper.resolveCalledAddress(index, this.trace)
if (newAddress) {
callStack.push(newAddress)
} else {
console.log('unable to build depth changes. ' + index + ' does not match with a CALL. depth changes will be corrupted')
}
}
this.traceCache.pushCall(step, index + 1, newAddress, callStack.slice(0))
this.buildCalldata(index, step, tx, true)
this.traceCache.pushSteps(index, context.currentCallIndex)
context.lastCallIndex = context.currentCallIndex
context.currentCallIndex = 0
} else if (traceHelper.isReturnInstruction(step) || traceHelper.isStopInstruction(step) || step.error || step.invalidDepthChange) {
if (index < this.trace.length) {
callStack.pop()
this.traceCache.pushCall(step, index + 1, null, callStack.slice(0), step.error || step.invalidDepthChange)
this.buildCalldata(index, step, tx, false)
this.traceCache.pushSteps(index, context.currentCallIndex)
context.currentCallIndex = context.lastCallIndex + 1
}
} else {
this.traceCache.pushSteps(index, context.currentCallIndex)
context.currentCallIndex++
}
return context
}
module.exports = TraceAnalyser
| {
"content_hash": "cf88b4fe66cb02786a23f2dd0147b914",
"timestamp": "",
"source": "github",
"line_count": 128,
"max_line_length": 176,
"avg_line_length": 42.015625,
"alnum_prop": 0.7116028263294906,
"repo_name": "cdetrio/remix",
"id": "66aefa2c51ab6af8b02eaf3e71575a42a74cfe9f",
"size": "5378",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/trace/traceAnalyser.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "596"
},
{
"name": "JavaScript",
"bytes": "312360"
},
{
"name": "Shell",
"bytes": "1944"
}
],
"symlink_target": ""
} |
Express Admin is a NodeJS tool for easy creation of user friendly administrative interface for MySQL, MariaDB, SQLite and PostgreSQL databases.
It's built with: [Hogan.js][1] ([mustache.js][2]), [Express][3], [mysql][4] and [Bootstrap][5].
The configuration is done through hand editing `json` files, although in the future there might be some kind of a GUI tool for that.
### Features
- All types of sql table relationships
- Internationalization
- Custom views and events
- All kinds of browser side libraries and controls
- All themes from [Bootswatch][6]
### Resources
- [Introductory Screencast][7]
- [GitHub Repository][8]
- [Examples][9]
[1]: http://twitter.github.io/hogan.js/
[2]: https://github.com/janl/mustache.js/
[3]: http://expressjs.com/
[4]: https://github.com/felixge/node-mysql
[5]: http://twitter.github.io/bootstrap/
[6]: http://bootswatch.com/
[7]: http://www.youtube.com/watch?v=1CdoCB96QNk
[8]: https://github.com/simov/express-admin
[9]: https://github.com/simov/express-admin-examples
| {
"content_hash": "7df2a4351741873d243359f4db853034",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 143,
"avg_line_length": 32.46875,
"alnum_prop": 0.7151106833493744,
"repo_name": "simov/express-admin-site",
"id": "794bc46fa693a461322e6c812f7d3d62919ec483",
"size": "1057",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "markdown/about.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "25290"
},
{
"name": "JavaScript",
"bytes": "17247"
}
],
"symlink_target": ""
} |
/*jslint nomen:true*/
/*global define, requirejs*/
define([
'underscore',
'./app/application',
'./app/routes',
'module'
].concat(requirejs.s.contexts._.config.appmodules), function (_, Application, routes, module) {
'use strict';
var app, options;
options = _.extend(module.config(), {
// load routers
routes: function (match) {
var i;
for (i = 0; i < routes.length; i += 1) {
match(routes[i][0], routes[i][1]);
}
},
// define template for page title
titleTemplate: function (data) {
return data.subtitle || '';
}
});
app = new Application(options);
return app;
});
| {
"content_hash": "ed33d416b0f696652fad1dc6441ce105",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 95,
"avg_line_length": 24.066666666666666,
"alnum_prop": 0.5207756232686981,
"repo_name": "MarkThink/OROCRM",
"id": "a2e7f236f127eceadcfea1a90cfd5903542c8738",
"size": "722",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "vendor/oro/platform/src/Oro/Bundle/UIBundle/Resources/public/js/app.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "712403"
},
{
"name": "JavaScript",
"bytes": "3629750"
},
{
"name": "PHP",
"bytes": "228039"
}
],
"symlink_target": ""
} |
/*
An item describes what is available to be stocked as inventory at a location.
*/
SELECT * FROM item
;
| {
"content_hash": "bf253904491da4d28ac0531aff8d94ad",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 77,
"avg_line_length": 15.285714285714286,
"alnum_prop": 0.719626168224299,
"repo_name": "nathanmoon/sql-tutorial",
"id": "82b8425d215df42cfc99d1aab692b43d991994bb",
"size": "107",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "queries/tut-items.sql",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PLpgSQL",
"bytes": "2780"
},
{
"name": "Python",
"bytes": "15482"
},
{
"name": "Shell",
"bytes": "1233"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "8a727883fc46240ce7ad83fda5faee10",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.307692307692308,
"alnum_prop": 0.6940298507462687,
"repo_name": "mdoering/backbone",
"id": "1a676f5dc2af22c1d37d61ec0cb78804943adc15",
"size": "187",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Fabales/Fabaceae/Aeschynomene/Aeschynomene rosei/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
// TODO: Comment me!
extern cpFloat cp_constraint_bias_coef;
struct cpConstraintClass;
struct cpConstraint;
typedef void (*cpConstraintPreStepFunction)(struct cpConstraint *constraint, cpFloat dt, cpFloat dt_inv);
typedef void (*cpConstraintApplyImpulseFunction)(struct cpConstraint *constraint);
typedef cpFloat (*cpConstraintGetImpulseFunction)(struct cpConstraint *constraint);
typedef struct cpConstraintClass {
cpConstraintPreStepFunction preStep;
cpConstraintApplyImpulseFunction applyImpulse;
cpConstraintGetImpulseFunction getImpulse;
} cpConstraintClass;
typedef struct cpConstraint {
const cpConstraintClass *klass;
cpBody *a, *b;
cpFloat maxForce;
cpFloat biasCoef;
cpFloat maxBias;
cpDataPointer data;
} cpConstraint;
#ifdef CP_USE_DEPRECATED_API_4
typedef cpConstraint cpJoint;
#endif
void cpConstraintDestroy(cpConstraint *constraint);
void cpConstraintFree(cpConstraint *constraint);
#define cpConstraintCheckCast(constraint, struct) \
cpAssert(constraint->klass == struct##GetClass(), "Constraint is not a "#struct);
#define CP_DefineConstraintGetter(struct, type, member, name) \
static inline type \
struct##Get##name(cpConstraint *constraint){ \
cpConstraintCheckCast(constraint, struct); \
return ((struct *)constraint)->member; \
} \
#define CP_DefineConstraintSetter(struct, type, member, name) \
static inline void \
struct##Set##name(cpConstraint *constraint, type value){ \
cpConstraintCheckCast(constraint, struct); \
((struct *)constraint)->member = value; \
} \
#define CP_DefineConstraintProperty(struct, type, member, name) \
CP_DefineConstraintGetter(struct, type, member, name) \
CP_DefineConstraintSetter(struct, type, member, name)
// Built in Joint types
#include "cpPinJoint.h"
#include "cpSlideJoint.h"
#include "cpPivotJoint.h"
#include "cpGrooveJoint.h"
#include "cpDampedSpring.h"
#include "cpDampedRotarySpring.h"
#include "cpRotaryLimitJoint.h"
#include "cpRatchetJoint.h"
#include "cpGearJoint.h"
#include "cpSimpleMotor.h"
| {
"content_hash": "02947f1e081fe596295406f93518a767",
"timestamp": "",
"source": "github",
"line_count": 73,
"max_line_length": 105,
"avg_line_length": 27.45205479452055,
"alnum_prop": 0.7849301397205589,
"repo_name": "adambyram/pinballmini-ios",
"id": "a361d7aab2246fe26f45c0f090ecc855744f2b76",
"size": "3121",
"binary": false,
"copies": "9",
"ref": "refs/heads/master",
"path": "External Libraries/Chipmunk/Include/constraints/cpConstraint.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "418575"
},
{
"name": "Objective-C",
"bytes": "1047205"
}
],
"symlink_target": ""
} |
const ELEMENT_NODE = 1
export function isElement (node: Node): node is Element {
return node.nodeType === ELEMENT_NODE
}
| {
"content_hash": "1f515d663adc142154a368b06b42f940",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 57,
"avg_line_length": 24.8,
"alnum_prop": 0.7258064516129032,
"repo_name": "calebmer/vulture",
"id": "bf4f67e6725e6e5728bf3d8d92b641629cb79959",
"size": "124",
"binary": false,
"copies": "1",
"ref": "refs/heads/next",
"path": "packages/vulture-dom/src/utils/node.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "34414"
},
{
"name": "TypeScript",
"bytes": "41727"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OpenNLP.Tools.Util.Process
{
/// <summary>
/// Constructs a token (of arbitrary type) from a string and its position
/// in the underlying text. This is used to create tokens in JFlex lexers
/// such as PTBTokenizer.
/// </summary>
public interface ILexedTokenFactory<T>
{
/// <summary>
/// Constructs a token (of arbitrary type) from a string and its position
/// in the underlying text. (The int arguments are used just to record token
/// character offsets in an underlying text. This method does not take a substring of {@code str}.)
/// </summary>
/// <param name="str">The string extracted by the lexer.</param>
/// <param name="begin">The offset in the document of the first character in this string.</param>
/// <param name="length">The number of characters the string takes up in the document.</param>
/// <returns>The token of type T</returns>
T MakeToken(string str, int begin, int length);
}
} | {
"content_hash": "c43a3edd78e3834a78c0c32b7488d591",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 107,
"avg_line_length": 40.964285714285715,
"alnum_prop": 0.6617262423714037,
"repo_name": "mlennox/OpenNlp",
"id": "747336f389701f35508894891db07fa42f6bd7f9",
"size": "1149",
"binary": false,
"copies": "3",
"ref": "refs/heads/dotnetcore",
"path": "OpenNLP.Old/Tools/Util/Process/ILexedTokenFactory.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "3024166"
},
{
"name": "Roff",
"bytes": "2511"
}
],
"symlink_target": ""
} |
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.badlogic.gdx.physics.bullet.collision;
import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Matrix3;
import com.badlogic.gdx.math.Matrix4;
public class CollisionObjectWrapper extends BulletBase {
private long swigCPtr;
protected CollisionObjectWrapper(final String className, long cPtr, boolean cMemoryOwn) {
super(className, cPtr, cMemoryOwn);
swigCPtr = cPtr;
}
/** Construct a new CollisionObjectWrapper, normally you should not need this constructor it's intended for low-level usage. */
public CollisionObjectWrapper(long cPtr, boolean cMemoryOwn) {
this("CollisionObjectWrapper", cPtr, cMemoryOwn);
construct();
}
@Override
protected void reset(long cPtr, boolean cMemoryOwn) {
if (!destroyed)
destroy();
super.reset(swigCPtr = cPtr, cMemoryOwn);
}
public static long getCPtr(CollisionObjectWrapper obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@Override
protected void finalize() throws Throwable {
if (!destroyed)
destroy();
super.finalize();
}
@Override protected synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
CollisionJNI.delete_CollisionObjectWrapper(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public btCollisionObjectWrapper wrapper;
@Override
protected void construct() {
super.construct();
wrapper = btCollisionObjectWrapper.obtain(getWrapper().getCPointer(), false);
}
@Override
public void dispose() {
if (wrapper != null) {
btCollisionObjectWrapper.free(wrapper);
wrapper = null;
}
super.dispose();
}
public CollisionObjectWrapper(btCollisionObjectWrapper parent, btCollisionShape shape, btCollisionObject collisionObject, Matrix4 worldTransform, int partId, int index) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_0(btCollisionObjectWrapper.getCPtr(parent), parent, btCollisionShape.getCPtr(shape), shape, btCollisionObject.getCPtr(collisionObject), collisionObject, worldTransform, partId, index), true);
}
public CollisionObjectWrapper(btCollisionObjectWrapper parent, btCollisionShape shape, btCollisionObject collisionObject, Matrix4 worldTransform, int partId) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_1(btCollisionObjectWrapper.getCPtr(parent), parent, btCollisionShape.getCPtr(shape), shape, btCollisionObject.getCPtr(collisionObject), collisionObject, worldTransform, partId), true);
}
public CollisionObjectWrapper(btCollisionObjectWrapper parent, btCollisionShape shape, btCollisionObject collisionObject, Matrix4 worldTransform) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_2(btCollisionObjectWrapper.getCPtr(parent), parent, btCollisionShape.getCPtr(shape), shape, btCollisionObject.getCPtr(collisionObject), collisionObject, worldTransform), true);
}
public CollisionObjectWrapper(btCollisionShape shape, btCollisionObject collisionObject, Matrix4 worldTransform, int partId, int index) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_3(btCollisionShape.getCPtr(shape), shape, btCollisionObject.getCPtr(collisionObject), collisionObject, worldTransform, partId, index), true);
}
public CollisionObjectWrapper(btCollisionShape shape, btCollisionObject collisionObject, Matrix4 worldTransform, int partId) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_4(btCollisionShape.getCPtr(shape), shape, btCollisionObject.getCPtr(collisionObject), collisionObject, worldTransform, partId), true);
}
public CollisionObjectWrapper(btCollisionShape shape, btCollisionObject collisionObject, Matrix4 worldTransform) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_5(btCollisionShape.getCPtr(shape), shape, btCollisionObject.getCPtr(collisionObject), collisionObject, worldTransform), true);
}
public CollisionObjectWrapper(btCollisionObjectWrapper parent, btCollisionObject collisionObject, int partId, int index) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_6(btCollisionObjectWrapper.getCPtr(parent), parent, btCollisionObject.getCPtr(collisionObject), collisionObject, partId, index), true);
}
public CollisionObjectWrapper(btCollisionObjectWrapper parent, btCollisionObject collisionObject, int partId) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_7(btCollisionObjectWrapper.getCPtr(parent), parent, btCollisionObject.getCPtr(collisionObject), collisionObject, partId), true);
}
public CollisionObjectWrapper(btCollisionObjectWrapper parent, btCollisionObject collisionObject) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_8(btCollisionObjectWrapper.getCPtr(parent), parent, btCollisionObject.getCPtr(collisionObject), collisionObject), true);
}
public CollisionObjectWrapper(btCollisionObject collisionObject, int partId, int index) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_9(btCollisionObject.getCPtr(collisionObject), collisionObject, partId, index), true);
}
public CollisionObjectWrapper(btCollisionObject collisionObject, int partId) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_10(btCollisionObject.getCPtr(collisionObject), collisionObject, partId), true);
}
public CollisionObjectWrapper(btCollisionObject collisionObject) {
this(CollisionJNI.new_CollisionObjectWrapper__SWIG_11(btCollisionObject.getCPtr(collisionObject), collisionObject), true);
}
private btCollisionObjectWrapper getWrapper() {
return btCollisionObjectWrapper.internalTemp(CollisionJNI.CollisionObjectWrapper_getWrapper(swigCPtr, this), false);
}
}
| {
"content_hash": "bcc7de475e68d8959cd3fc5cb545a2d0",
"timestamp": "",
"source": "github",
"line_count": 130,
"max_line_length": 246,
"avg_line_length": 46.51538461538462,
"alnum_prop": 0.7752604597320986,
"repo_name": "lordjone/libgdx",
"id": "c80f45804d17376af48bcaf5414436d505a44140",
"size": "6047",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "extensions/gdx-bullet/jni/swig-src/collision/com/badlogic/gdx/physics/bullet/collision/CollisionObjectWrapper.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Awk",
"bytes": "3965"
},
{
"name": "C",
"bytes": "8965308"
},
{
"name": "C++",
"bytes": "8915757"
},
{
"name": "CSS",
"bytes": "60986"
},
{
"name": "Groovy",
"bytes": "8206"
},
{
"name": "Java",
"bytes": "11815543"
},
{
"name": "JavaScript",
"bytes": "48"
},
{
"name": "Lua",
"bytes": "821"
},
{
"name": "Objective-C",
"bytes": "85527"
},
{
"name": "Objective-C++",
"bytes": "58296"
},
{
"name": "OpenEdge ABL",
"bytes": "8244"
},
{
"name": "PHP",
"bytes": "726"
},
{
"name": "Perl",
"bytes": "662"
},
{
"name": "Python",
"bytes": "172284"
},
{
"name": "Ragel in Ruby Host",
"bytes": "28112"
},
{
"name": "Shell",
"bytes": "288985"
}
],
"symlink_target": ""
} |
import React from 'react'; // eslint-disable-line no-unused-vars
import { mount } from 'enzyme';
import moment from 'moment';
import { getNewDateStateChange } from '../Calendar';
import Calendar from '../Calendar';
describe('Calendar', () => {
let wrapper;
beforeEach(() => {
const theme = {
Colors: {},
Fonts: {},
FontSizes: {},
Spacing: {}
};
const mockCallback = jest.fn();
wrapper = mount(
<Calendar
onDateSelect={mockCallback}
selectedDate={1533124800}
theme={theme}
/>
);
});
describe('rendering', () => {
it('should mount and render 35 calendar days', () => {
expect(wrapper.find('.calendar-day')).toHaveLength(35);
});
it('should only render one focused day', () => {
expect(wrapper.find('#focused-day')).toHaveLength(1);
});
});
describe('getNewDateStateChange', () => {
const focusedDay = moment('2018-01-17');
const startDate = moment('2018-01-17').startOf('month').startOf('week');
const endDate = moment('2018-01-17').endOf('month').endOf('week');
it('should return an object with a focusedDay key when right key is pressed', () => {
const result = {
focusedDay: moment(focusedDay).add(1, 'days').startOf('day').unix()
};
expect(getNewDateStateChange({ code: 'right', focusedDay, startDate, endDate })).toEqual(result);
});
it('should return an object with a focusedDay key and a currentDate key when right key is pressed and newDate is outside of start and end date bounds', () => {
const result = {
focusedDay: moment(focusedDay).add(1, 'days').startOf('day').unix(),
currentDate: moment(focusedDay).add(1, 'days').startOf('day').unix()
};
//deliberately set to be out of range
const endDate = moment(focusedDay).clone();
expect(getNewDateStateChange({ code: 'right', focusedDay, startDate, endDate })).toEqual(result);
});
it('should return an object with a focusedDay key when left key is pressed', () => {
const result = {
focusedDay: moment(focusedDay).subtract(1, 'days').startOf('day').unix()
};
expect(getNewDateStateChange({ code: 'left', focusedDay, startDate, endDate })).toEqual(result);
});
it('should return an object with a focusedDay key and a currentDate key when left key is pressed and newDate is outside of start and end date bounds', () => {
const result = {
focusedDay: moment(focusedDay).subtract(1, 'days').startOf('day').unix(),
currentDate: moment(focusedDay).subtract(1, 'days').startOf('day').unix()
};
//deliberately set to be out of range
const startDate = moment(focusedDay).clone();
expect(getNewDateStateChange({ code: 'left', focusedDay, startDate, endDate })).toEqual(result);
});
it('should return correct day when up key is pressed', () => {
const result = {
focusedDay: moment(focusedDay).subtract(7, 'days').startOf('day').unix()
};
expect(getNewDateStateChange({ code: 'up', focusedDay, startDate, endDate })).toEqual(result);
});
it('should return correct day when down key is pressed', () => {
const result = {
focusedDay: moment(focusedDay).add(7, 'days').startOf('day').unix()
};
expect(getNewDateStateChange({ code: 'down', focusedDay, startDate, endDate })).toEqual(result);
});
});
});
| {
"content_hash": "dd928a7fda000d91c6cc3724ef34a864",
"timestamp": "",
"source": "github",
"line_count": 102,
"max_line_length": 163,
"avg_line_length": 33.80392156862745,
"alnum_prop": 0.6203596287703016,
"repo_name": "mxenabled/mx-react-components",
"id": "d2960d0f6ccf3bf596d6139a4aa41387118e8a2c",
"size": "3448",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/components/__tests__/Calendar-test.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "432140"
}
],
"symlink_target": ""
} |
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2016. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.hal;
import java.nio.IntBuffer;
import java.nio.LongBuffer;
import com.snobot.simulator.SensorActuatorRegistry;
import com.snobot.simulator.module_wrapper.AnalogWrapper;
public class AnalogJNI extends JNIWrapper
{
private static AnalogWrapper getWrapperFromBuffer(long buffer)
{
int port = (int) buffer;
return SensorActuatorRegistry.get().getAnalog().get(port);
}
private static double sAnalogSampleRate;
/**
* <i>native declaration :
* AthenaJava\target\native\include\HAL\Analog.h:58</i><br>
* enum values
*/
public static interface AnalogTriggerType
{
/**
* <i>native declaration :
* AthenaJava\target\native\include\HAL\Analog.h:54</i>
*/
public static final int kInWindow = 0;
/**
* <i>native declaration :
* AthenaJava\target\native\include\HAL\Analog.h:55</i>
*/
public static final int kState = 1;
/**
* <i>native declaration :
* AthenaJava\target\native\include\HAL\Analog.h:56</i>
*/
public static final int kRisingPulse = 2;
/**
* <i>native declaration :
* AthenaJava\target\native\include\HAL\Analog.h:57</i>
*/
public static final int kFallingPulse = 3;
};
public static long initializeAnalogInputPort(long port_pointer)
{
AnalogWrapper wrapper = new AnalogWrapper((int) port_pointer);
SensorActuatorRegistry.get().register(wrapper, (int) port_pointer);
return port_pointer;
}
public static void freeAnalogInputPort(long port_pointer)
{
}
public static long initializeAnalogOutputPort(long port_pointer)
{
AnalogWrapper wrapper = new AnalogWrapper((int) port_pointer);
SensorActuatorRegistry.get().register(wrapper, (int) port_pointer);
return port_pointer;
}
public static void freeAnalogOutputPort(long port_pointer)
{
}
public static boolean checkAnalogModule(byte module)
{
return false;
}
public static boolean checkAnalogInputChannel(int pin)
{
return !SensorActuatorRegistry.get().getAnalog().containsKey(pin);
}
public static boolean checkAnalogOutputChannel(int pin)
{
return false;
}
public static void setAnalogOutput(long port_pointer, double voltage)
{
}
public static double getAnalogOutput(long port_pointer)
{
return 0;
}
public static void setAnalogSampleRate(double samplesPerSecond)
{
sAnalogSampleRate = samplesPerSecond;
}
public static double getAnalogSampleRate()
{
return sAnalogSampleRate;
}
public static void setAnalogAverageBits(long analog_port_pointer, int bits)
{
}
public static int getAnalogAverageBits(long analog_port_pointer)
{
return 1;
}
public static void setAnalogOversampleBits(long analog_port_pointer, int bits)
{
}
public static int getAnalogOversampleBits(long analog_port_pointer)
{
return 0;
}
public static short getAnalogValue(long analog_port_pointer)
{
return 0;
}
public static int getAnalogAverageValue(long analog_port_pointer)
{
return 0;
}
public static int getAnalogVoltsToValue(long analog_port_pointer, double voltage)
{
return 0;
}
public static double getAnalogVoltage(long analog_port_pointer)
{
return getWrapperFromBuffer(analog_port_pointer).getVoltage();
}
public static double getAnalogAverageVoltage(long analog_port_pointer)
{
return 0;
}
public static int getAnalogLSBWeight(long analog_port_pointer)
{
return 256;
}
public static int getAnalogOffset(long analog_port_pointer)
{
return 0;
}
public static boolean isAccumulatorChannel(long analog_port_pointer)
{
return false;
}
public static void initAccumulator(long analog_port_pointer)
{
}
public static void resetAccumulator(long analog_port_pointer)
{
getWrapperFromBuffer(analog_port_pointer).setAccumulator(0);
}
public static void setAccumulatorCenter(long analog_port_pointer, int center)
{
}
public static void setAccumulatorDeadband(long analog_port_pointer, int deadband)
{
}
public static long getAccumulatorValue(long analog_port_pointer)
{
return 0;
}
public static int getAccumulatorCount(long analog_port_pointer)
{
return 0;
}
public static void getAccumulatorOutput(long analog_port_pointer, LongBuffer value, IntBuffer count)
{
double accum_value = getWrapperFromBuffer(analog_port_pointer).getAccumulator();
accum_value *= 1000000000;
accum_value *= .007; // Volts per degree second
accum_value *= 100;
value.put((long) accum_value);
count.put(1);
}
public static long initializeAnalogTrigger(long port_pointer, IntBuffer index)
{
return port_pointer;
}
public static void cleanAnalogTrigger(long analog_trigger_pointer)
{
}
public static void setAnalogTriggerLimitsRaw(long analog_trigger_pointer, int lower, int upper)
{
}
public static void setAnalogTriggerLimitsVoltage(long analog_trigger_pointer, double lower, double upper)
{
}
public static void setAnalogTriggerAveraged(long analog_trigger_pointer, boolean useAveragedValue)
{
}
public static void setAnalogTriggerFiltered(long analog_trigger_pointer, boolean useFilteredValue)
{
}
public static boolean getAnalogTriggerInWindow(long analog_trigger_pointer)
{
return false;
}
public static boolean getAnalogTriggerTriggerState(long analog_trigger_pointer)
{
return false;
}
public static boolean getAnalogTriggerOutput(long analog_trigger_pointer, int type)
{
return false;
}
}
| {
"content_hash": "8f8e982c2c82242365cceeac7b2e2b33",
"timestamp": "",
"source": "github",
"line_count": 262,
"max_line_length": 109,
"avg_line_length": 25.03053435114504,
"alnum_prop": 0.6354071363220494,
"repo_name": "ArcticWarriors/snobot-2016",
"id": "0d8171172ab7927ee602bcf4bc1d188e5980bd81",
"size": "6558",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Simulator/2016MockWpi/src/edu/wpi/first/wpilibj/hal/AnalogJNI.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "72"
},
{
"name": "Java",
"bytes": "2567970"
},
{
"name": "Python",
"bytes": "10436"
}
],
"symlink_target": ""
} |
module Google
module Analytics
module Admin
module V1alpha
# The request for a Data Access Record Report.
# @!attribute [rw] entity
# @return [::String]
# The Data Access Report is requested for this property.
# For example if "123" is your GA4 property ID, then entity should be
# "properties/123".
# @!attribute [rw] dimensions
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessDimension>]
# The dimensions requested and displayed in the response. Requests are
# allowed up to 9 dimensions.
# @!attribute [rw] metrics
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessMetric>]
# The metrics requested and displayed in the response. Requests are allowed
# up to 10 metrics.
# @!attribute [rw] date_ranges
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessDateRange>]
# Date ranges of access records to read. If multiple date ranges are
# requested, each response row will contain a zero based date range index. If
# two date ranges overlap, the access records for the overlapping days is
# included in the response rows for both date ranges. Requests are allowed up
# to 2 date ranges.
# @!attribute [rw] dimension_filter
# @return [::Google::Analytics::Admin::V1alpha::AccessFilterExpression]
# Dimension filters allow you to restrict report response to specific
# dimension values which match the filter. For example, filtering on access
# records of a single user. To learn more, see [Fundamentals of Dimension
# Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters)
# for examples. Metrics cannot be used in this filter.
# @!attribute [rw] metric_filter
# @return [::Google::Analytics::Admin::V1alpha::AccessFilterExpression]
# Metric filters allow you to restrict report response to specific metric
# values which match the filter. Metric filters are applied after aggregating
# the report's rows, similar to SQL having-clause. Dimensions cannot be used
# in this filter.
# @!attribute [rw] offset
# @return [::Integer]
# The row count of the start row. The first row is counted as row 0. If
# offset is unspecified, it is treated as 0. If offset is zero, then this
# method will return the first page of results with `limit` entries.
#
# To learn more about this pagination parameter, see
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
# @!attribute [rw] limit
# @return [::Integer]
# The number of rows to return. If unspecified, 10,000 rows are returned. The
# API returns a maximum of 100,000 rows per request, no matter how many you
# ask for. `limit` must be positive.
#
# The API may return fewer rows than the requested `limit`, if there aren't
# as many remaining rows as the `limit`. For instance, there are fewer than
# 300 possible values for the dimension `country`, so when reporting on only
# `country`, you can't get more than 300 rows, even if you set `limit` to a
# higher value.
#
# To learn more about this pagination parameter, see
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
# @!attribute [rw] time_zone
# @return [::String]
# This request's time zone if specified. If unspecified, the property's time
# zone is used. The request's time zone is used to interpret the start & end
# dates of the report.
#
# Formatted as strings from the IANA Time Zone database
# (https://www.iana.org/time-zones); for example "America/New_York" or
# "Asia/Tokyo".
# @!attribute [rw] order_bys
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessOrderBy>]
# Specifies how rows are ordered in the response.
# @!attribute [rw] return_entity_quota
# @return [::Boolean]
# Toggles whether to return the current state of this Analytics Property's
# quota. Quota is returned in [AccessQuota](#AccessQuota).
class RunAccessReportRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# The customized Data Access Record Report response.
# @!attribute [rw] dimension_headers
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessDimensionHeader>]
# The header for a column in the report that corresponds to a specific
# dimension. The number of DimensionHeaders and ordering of DimensionHeaders
# matches the dimensions present in rows.
# @!attribute [rw] metric_headers
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessMetricHeader>]
# The header for a column in the report that corresponds to a specific
# metric. The number of MetricHeaders and ordering of MetricHeaders matches
# the metrics present in rows.
# @!attribute [rw] rows
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccessRow>]
# Rows of dimension value combinations and metric values in the report.
# @!attribute [rw] row_count
# @return [::Integer]
# The total number of rows in the query result. `rowCount` is independent of
# the number of rows returned in the response, the `limit` request
# parameter, and the `offset` request parameter. For example if a query
# returns 175 rows and includes `limit` of 50 in the API request, the
# response will contain `rowCount` of 175 but only 50 rows.
#
# To learn more about this pagination parameter, see
# [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
# @!attribute [rw] quota
# @return [::Google::Analytics::Admin::V1alpha::AccessQuota]
# The quota state for this Analytics property including this request.
class RunAccessReportResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetAccount RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the account to lookup.
# Format: accounts/\\{account}
# Example: "accounts/100"
class GetAccountRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListAccounts RPC.
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return. The service may return
# fewer than this value, even if there are additional pages.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200; (higher values will be coerced to the maximum)
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListAccounts` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `ListAccounts` must
# match the call that provided the page token.
# @!attribute [rw] show_deleted
# @return [::Boolean]
# Whether to include soft-deleted (ie: "trashed") Accounts in the
# results. Accounts can be inspected to determine whether they are deleted or
# not.
class ListAccountsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListAccounts RPC.
# @!attribute [rw] accounts
# @return [::Array<::Google::Analytics::Admin::V1alpha::Account>]
# Results that were accessible to the caller.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListAccountsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteAccount RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the Account to soft-delete.
# Format: accounts/\\{account}
# Example: "accounts/100"
class DeleteAccountRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateAccount RPC.
# @!attribute [rw] account
# @return [::Google::Analytics::Admin::V1alpha::Account]
# Required. The account to update.
# The account's `name` field is used to identify the account.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdateAccountRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ProvisionAccountTicket RPC.
# @!attribute [rw] account
# @return [::Google::Analytics::Admin::V1alpha::Account]
# The account to create.
# @!attribute [rw] redirect_uri
# @return [::String]
# Redirect URI where the user will be sent after accepting Terms of Service.
# Must be configured in Developers Console as a Redirect URI
class ProvisionAccountTicketRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ProvisionAccountTicket RPC.
# @!attribute [rw] account_ticket_id
# @return [::String]
# The param to be passed in the ToS link.
class ProvisionAccountTicketResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetProperty RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the property to lookup.
# Format: properties/\\{property_id}
# Example: "properties/1000"
class GetPropertyRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListProperties RPC.
# @!attribute [rw] filter
# @return [::String]
# Required. An expression for filtering the results of the request.
# Fields eligible for filtering are:
# `parent:`(The resource name of the parent account/property) or
# `ancestor:`(The resource name of the parent account) or
# `firebase_project:`(The id or number of the linked firebase project).
# Some examples of filters:
#
# ```
# | Filter | Description |
# |-----------------------------|-------------------------------------------|
# | parent:accounts/123 | The account with account id: 123. |
# | parent:properties/123 | The property with property id: 123. |
# | ancestor:accounts/123 | The account with account id: 123. |
# | firebase_project:project-id | The firebase project with id: project-id. |
# | firebase_project:123 | The firebase project with number: 123. |
# ```
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return. The service may return
# fewer than this value, even if there are additional pages.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200; (higher values will be coerced to the maximum)
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListProperties` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `ListProperties` must
# match the call that provided the page token.
# @!attribute [rw] show_deleted
# @return [::Boolean]
# Whether to include soft-deleted (ie: "trashed") Properties in the
# results. Properties can be inspected to determine whether they are deleted
# or not.
class ListPropertiesRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListProperties RPC.
# @!attribute [rw] properties
# @return [::Array<::Google::Analytics::Admin::V1alpha::Property>]
# Results that matched the filter criteria and were accessible to the caller.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListPropertiesResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateProperty RPC.
# @!attribute [rw] property
# @return [::Google::Analytics::Admin::V1alpha::Property]
# Required. The property to update.
# The property's `name` field is used to identify the property to be
# updated.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdatePropertyRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateProperty RPC.
# @!attribute [rw] property
# @return [::Google::Analytics::Admin::V1alpha::Property]
# Required. The property to create.
# Note: the supplied property must specify its parent.
class CreatePropertyRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteProperty RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the Property to soft-delete.
# Format: properties/\\{property_id}
# Example: "properties/1000"
class DeletePropertyRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetUserLink RPC.
# @!attribute [rw] name
# @return [::String]
# Required. Example format: accounts/1234/userLinks/5678
class GetUserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for BatchGetUserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. The account or property that all user links in the request are
# for. The parent of all provided values for the 'names' field must match
# this field.
# Example format: accounts/1234
# @!attribute [rw] names
# @return [::Array<::String>]
# Required. The names of the user links to retrieve.
# A maximum of 1000 user links can be retrieved in a batch.
# Format: accounts/\\{accountId}/userLinks/\\{userLinkId}
class BatchGetUserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for BatchGetUserLinks RPC.
# @!attribute [rw] user_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::UserLink>]
# The requested user links.
class BatchGetUserLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListUserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: accounts/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of user links to return.
# The service may return fewer than this value.
# If unspecified, at most 200 user links will be returned.
# The maximum value is 500; values above 500 will be coerced to 500.
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListUserLinks` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `ListUserLinks` must
# match the call that provided the page token.
class ListUserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListUserLinks RPC.
# @!attribute [rw] user_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::UserLink>]
# List of UserLinks. These will be ordered stably, but in an arbitrary order.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListUserLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for AuditUserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: accounts/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of user links to return.
# The service may return fewer than this value.
# If unspecified, at most 1000 user links will be returned.
# The maximum value is 5000; values above 5000 will be coerced to 5000.
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `AuditUserLinks` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `AuditUserLinks` must
# match the call that provided the page token.
class AuditUserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for AuditUserLinks RPC.
# @!attribute [rw] user_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::AuditUserLink>]
# List of AuditUserLinks. These will be ordered stably, but in an arbitrary
# order.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class AuditUserLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateUserLink RPC.
#
# Users can have multiple email addresses associated with their Google
# account, and one of these email addresses is the "primary" email address.
# Any of the email addresses associated with a Google account may be used
# for a new UserLink, but the returned UserLink will always contain the
# "primary" email address. As a result, the input and output email address
# for this request may differ.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: accounts/1234
# @!attribute [rw] notify_new_user
# @return [::Boolean]
# Optional. If set, then email the new user notifying them that they've been granted
# permissions to the resource.
# @!attribute [rw] user_link
# @return [::Google::Analytics::Admin::V1alpha::UserLink]
# Required. The user link to create.
class CreateUserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for BatchCreateUserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. The account or property that all user links in the request are for.
# This field is required. The parent field in the CreateUserLinkRequest
# messages must either be empty or match this field.
# Example format: accounts/1234
# @!attribute [rw] notify_new_users
# @return [::Boolean]
# Optional. If set, then email the new users notifying them that they've been granted
# permissions to the resource. Regardless of whether this is set or not,
# notify_new_user field inside each individual request is ignored.
# @!attribute [rw] requests
# @return [::Array<::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest>]
# Required. The requests specifying the user links to create.
# A maximum of 1000 user links can be created in a batch.
class BatchCreateUserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for BatchCreateUserLinks RPC.
# @!attribute [rw] user_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::UserLink>]
# The user links created.
class BatchCreateUserLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateUserLink RPC.
# @!attribute [rw] user_link
# @return [::Google::Analytics::Admin::V1alpha::UserLink]
# Required. The user link to update.
class UpdateUserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for BatchUpdateUserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. The account or property that all user links in the request are
# for. The parent field in the UpdateUserLinkRequest messages must either be
# empty or match this field.
# Example format: accounts/1234
# @!attribute [rw] requests
# @return [::Array<::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest>]
# Required. The requests specifying the user links to update.
# A maximum of 1000 user links can be updated in a batch.
class BatchUpdateUserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for BatchUpdateUserLinks RPC.
# @!attribute [rw] user_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::UserLink>]
# The user links updated.
class BatchUpdateUserLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteUserLink RPC.
# @!attribute [rw] name
# @return [::String]
# Required. Example format: accounts/1234/userLinks/5678
class DeleteUserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for BatchDeleteUserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. The account or property that all user links in the request are
# for. The parent of all values for user link names to delete must match this
# field.
# Example format: accounts/1234
# @!attribute [rw] requests
# @return [::Array<::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest>]
# Required. The requests specifying the user links to update.
# A maximum of 1000 user links can be updated in a batch.
class BatchDeleteUserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateFirebaseLink RPC
# @!attribute [rw] parent
# @return [::String]
# Required. Format: properties/\\{property_id}
# Example: properties/1234
# @!attribute [rw] firebase_link
# @return [::Google::Analytics::Admin::V1alpha::FirebaseLink]
# Required. The Firebase link to create.
class CreateFirebaseLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteFirebaseLink RPC
# @!attribute [rw] name
# @return [::String]
# Required. Format: properties/\\{property_id}/firebaseLinks/\\{firebase_link_id}
# Example: properties/1234/firebaseLinks/5678
class DeleteFirebaseLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListFirebaseLinks RPC
# @!attribute [rw] parent
# @return [::String]
# Required. Format: properties/\\{property_id}
# Example: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return. The service may return
# fewer than this value, even if there are additional pages.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200; (higher values will be coerced to the maximum)
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListFirebaseLinks` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `ListProperties` must
# match the call that provided the page token.
class ListFirebaseLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListFirebaseLinks RPC
# @!attribute [rw] firebase_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::FirebaseLink>]
# List of FirebaseLinks. This will have at most one value.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
# Currently, Google Analytics supports only one FirebaseLink per property,
# so this will never be populated.
class ListFirebaseLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetGlobalSiteTag RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the site tag to lookup.
# Note that site tags are singletons and do not have unique IDs.
# Format: properties/\\{property_id}/dataStreams/\\{stream_id}/globalSiteTag
# Example: "properties/123/dataStreams/456/globalSiteTag"
class GetGlobalSiteTagRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateGoogleAdsLink RPC
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] google_ads_link
# @return [::Google::Analytics::Admin::V1alpha::GoogleAdsLink]
# Required. The GoogleAdsLink to create.
class CreateGoogleAdsLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateGoogleAdsLink RPC
# @!attribute [rw] google_ads_link
# @return [::Google::Analytics::Admin::V1alpha::GoogleAdsLink]
# The GoogleAdsLink to update
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdateGoogleAdsLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteGoogleAdsLink RPC.
# @!attribute [rw] name
# @return [::String]
# Required. Example format: properties/1234/googleAdsLinks/5678
class DeleteGoogleAdsLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListGoogleAdsLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListGoogleAdsLinks` call.
# Provide this to retrieve the subsequent page.
#
# When paginating, all other parameters provided to `ListGoogleAdsLinks` must
# match the call that provided the page token.
class ListGoogleAdsLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListGoogleAdsLinks RPC.
# @!attribute [rw] google_ads_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>]
# List of GoogleAdsLinks.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListGoogleAdsLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetDataSharingSettings RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the settings to lookup.
# Format: accounts/\\{account}/dataSharingSettings
# Example: "accounts/1000/dataSharingSettings"
class GetDataSharingSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListAccountSummaries RPC.
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of AccountSummary resources to return. The service may
# return fewer than this value, even if there are additional pages.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200; (higher values will be coerced to the maximum)
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListAccountSummaries` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `ListAccountSummaries`
# must match the call that provided the page token.
class ListAccountSummariesRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListAccountSummaries RPC.
# @!attribute [rw] account_summaries
# @return [::Array<::Google::Analytics::Admin::V1alpha::AccountSummary>]
# Account summaries of all accounts the caller has access to.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListAccountSummariesResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for AcknowledgeUserDataCollection RPC.
# @!attribute [rw] property
# @return [::String]
# Required. The property for which to acknowledge user data collection.
# @!attribute [rw] acknowledgement
# @return [::String]
# Required. An acknowledgement that the caller of this method understands the terms
# of user data collection.
#
# This field must contain the exact value:
# "I acknowledge that I have the necessary privacy disclosures and rights
# from my end users for the collection and processing of their data,
# including the association of such data with the visitation information
# Google Analytics collects from my site and/or app property."
class AcknowledgeUserDataCollectionRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for AcknowledgeUserDataCollection RPC.
class AcknowledgeUserDataCollectionResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for SearchChangeHistoryEvents RPC.
# @!attribute [rw] account
# @return [::String]
# Required. The account resource for which to return change history resources.
# @!attribute [rw] property
# @return [::String]
# Optional. Resource name for a child property. If set, only return changes
# made to this property or its child resources.
# @!attribute [rw] resource_type
# @return [::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryResourceType>]
# Optional. If set, only return changes if they are for a resource that matches at
# least one of these types.
# @!attribute [rw] action
# @return [::Array<::Google::Analytics::Admin::V1alpha::ActionType>]
# Optional. If set, only return changes that match one or more of these types of
# actions.
# @!attribute [rw] actor_email
# @return [::Array<::String>]
# Optional. If set, only return changes if they are made by a user in this list.
# @!attribute [rw] earliest_change_time
# @return [::Google::Protobuf::Timestamp]
# Optional. If set, only return changes made after this time (inclusive).
# @!attribute [rw] latest_change_time
# @return [::Google::Protobuf::Timestamp]
# Optional. If set, only return changes made before this time (inclusive).
# @!attribute [rw] page_size
# @return [::Integer]
# Optional. The maximum number of ChangeHistoryEvent items to return.
# The service may return fewer than this value, even if there are additional
# pages. If unspecified, at most 50 items will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
# Provide this to retrieve the subsequent page. When paginating, all other
# parameters provided to `SearchChangeHistoryEvents` must match the call that
# provided the page token.
class SearchChangeHistoryEventsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for SearchAccounts RPC.
# @!attribute [rw] change_history_events
# @return [::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>]
# Results that were accessible to the caller.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class SearchChangeHistoryEventsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetMeasurementProtocolSecret RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the measurement protocol secret to lookup.
# Format:
# properties/\\{property}/dataStreams/\\{dataStream}/measurementProtocolSecrets/\\{measurementProtocolSecret}
class GetMeasurementProtocolSecretRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateMeasurementProtocolSecret RPC
# @!attribute [rw] parent
# @return [::String]
# Required. The parent resource where this secret will be created.
# Format: properties/\\{property}/dataStreams/\\{dataStream}
# @!attribute [rw] measurement_protocol_secret
# @return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret]
# Required. The measurement protocol secret to create.
class CreateMeasurementProtocolSecretRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteMeasurementProtocolSecret RPC
# @!attribute [rw] name
# @return [::String]
# Required. The name of the MeasurementProtocolSecret to delete.
# Format:
# properties/\\{property}/dataStreams/\\{dataStream}/measurementProtocolSecrets/\\{measurementProtocolSecret}
class DeleteMeasurementProtocolSecretRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateMeasurementProtocolSecret RPC
# @!attribute [rw] measurement_protocol_secret
# @return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret]
# Required. The measurement protocol secret to update.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# The list of fields to be updated. Omitted fields will not be updated.
class UpdateMeasurementProtocolSecretRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListMeasurementProtocolSecret RPC
# @!attribute [rw] parent
# @return [::String]
# Required. The resource name of the parent stream.
# Format:
# properties/\\{property}/dataStreams/\\{dataStream}/measurementProtocolSecrets
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 10 resources will be returned.
# The maximum value is 10. Higher values will be coerced to the maximum.
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListMeasurementProtocolSecrets`
# call. Provide this to retrieve the subsequent page. When paginating, all
# other parameters provided to `ListMeasurementProtocolSecrets` must match
# the call that provided the page token.
class ListMeasurementProtocolSecretsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListMeasurementProtocolSecret RPC
# @!attribute [rw] measurement_protocol_secrets
# @return [::Array<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>]
# A list of secrets for the parent stream specified in the request.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListMeasurementProtocolSecretsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetGoogleSignalsSettings RPC
# @!attribute [rw] name
# @return [::String]
# Required. The name of the google signals settings to retrieve.
# Format: properties/\\{property}/googleSignalsSettings
class GetGoogleSignalsSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateGoogleSignalsSettings RPC
# @!attribute [rw] google_signals_settings
# @return [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings]
# Required. The settings to update.
# The `name` field is used to identify the settings to be updated.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdateGoogleSignalsSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateConversionEvent RPC
# @!attribute [rw] conversion_event
# @return [::Google::Analytics::Admin::V1alpha::ConversionEvent]
# Required. The conversion event to create.
# @!attribute [rw] parent
# @return [::String]
# Required. The resource name of the parent property where this conversion event will
# be created. Format: properties/123
class CreateConversionEventRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetConversionEvent RPC
# @!attribute [rw] name
# @return [::String]
# Required. The resource name of the conversion event to retrieve.
# Format: properties/\\{property}/conversionEvents/\\{conversion_event}
# Example: "properties/123/conversionEvents/456"
class GetConversionEventRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteConversionEvent RPC
# @!attribute [rw] name
# @return [::String]
# Required. The resource name of the conversion event to delete.
# Format: properties/\\{property}/conversionEvents/\\{conversion_event}
# Example: "properties/123/conversionEvents/456"
class DeleteConversionEventRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListConversionEvents RPC
# @!attribute [rw] parent
# @return [::String]
# Required. The resource name of the parent property.
# Example: 'properties/123'
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200; (higher values will be coerced to the maximum)
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListConversionEvents` call.
# Provide this to retrieve the subsequent page.
# When paginating, all other parameters provided to `ListConversionEvents`
# must match the call that provided the page token.
class ListConversionEventsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListConversionEvents RPC.
# @!attribute [rw] conversion_events
# @return [::Array<::Google::Analytics::Admin::V1alpha::ConversionEvent>]
# The requested conversion events
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListConversionEventsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetDisplayVideo360AdvertiserLink RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DisplayVideo360AdvertiserLink to get.
# Example format: properties/1234/displayVideo360AdvertiserLink/5678
class GetDisplayVideo360AdvertiserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListDisplayVideo360AdvertiserLinks RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListDisplayVideo360AdvertiserLinks`
# call. Provide this to retrieve the subsequent page.
#
# When paginating, all other parameters provided to
# `ListDisplayVideo360AdvertiserLinks` must match the call that provided the
# page token.
class ListDisplayVideo360AdvertiserLinksRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListDisplayVideo360AdvertiserLinks RPC.
# @!attribute [rw] display_video_360_advertiser_links
# @return [::Array<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>]
# List of DisplayVideo360AdvertiserLinks.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListDisplayVideo360AdvertiserLinksResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateDisplayVideo360AdvertiserLink RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] display_video_360_advertiser_link
# @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink]
# Required. The DisplayVideo360AdvertiserLink to create.
class CreateDisplayVideo360AdvertiserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteDisplayVideo360AdvertiserLink RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DisplayVideo360AdvertiserLink to delete.
# Example format: properties/1234/displayVideo360AdvertiserLinks/5678
class DeleteDisplayVideo360AdvertiserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateDisplayVideo360AdvertiserLink RPC.
# @!attribute [rw] display_video_360_advertiser_link
# @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink]
# The DisplayVideo360AdvertiserLink to update
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Omitted fields will not be updated.
# To replace the entire entity, use one path with the string "*" to match
# all fields.
class UpdateDisplayVideo360AdvertiserLinkRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetDisplayVideo360AdvertiserLinkProposal RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DisplayVideo360AdvertiserLinkProposal to get.
# Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678
class GetDisplayVideo360AdvertiserLinkProposalRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListDisplayVideo360AdvertiserLinkProposals RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous
# `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve
# the subsequent page.
#
# When paginating, all other parameters provided to
# `ListDisplayVideo360AdvertiserLinkProposals` must match the call that
# provided the page token.
class ListDisplayVideo360AdvertiserLinkProposalsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListDisplayVideo360AdvertiserLinkProposals RPC.
# @!attribute [rw] display_video_360_advertiser_link_proposals
# @return [::Array<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>]
# List of DisplayVideo360AdvertiserLinkProposals.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListDisplayVideo360AdvertiserLinkProposalsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateDisplayVideo360AdvertiserLinkProposal RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] display_video_360_advertiser_link_proposal
# @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal]
# Required. The DisplayVideo360AdvertiserLinkProposal to create.
class CreateDisplayVideo360AdvertiserLinkProposalRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteDisplayVideo360AdvertiserLinkProposal RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete.
# Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678
class DeleteDisplayVideo360AdvertiserLinkProposalRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ApproveDisplayVideo360AdvertiserLinkProposal RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve.
# Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678
class ApproveDisplayVideo360AdvertiserLinkProposalRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ApproveDisplayVideo360AdvertiserLinkProposal RPC.
# @!attribute [rw] display_video_360_advertiser_link
# @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink]
# The DisplayVideo360AdvertiserLink created as a result of approving the
# proposal.
class ApproveDisplayVideo360AdvertiserLinkProposalResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CancelDisplayVideo360AdvertiserLinkProposal RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel.
# Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678
class CancelDisplayVideo360AdvertiserLinkProposalRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateCustomDimension RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] custom_dimension
# @return [::Google::Analytics::Admin::V1alpha::CustomDimension]
# Required. The CustomDimension to create.
class CreateCustomDimensionRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateCustomDimension RPC.
# @!attribute [rw] custom_dimension
# @return [::Google::Analytics::Admin::V1alpha::CustomDimension]
# The CustomDimension to update
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Omitted fields will not be updated.
# To replace the entire entity, use one path with the string "*" to match
# all fields.
class UpdateCustomDimensionRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListCustomDimensions RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListCustomDimensions` call.
# Provide this to retrieve the subsequent page.
#
# When paginating, all other parameters provided to `ListCustomDimensions`
# must match the call that provided the page token.
class ListCustomDimensionsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListCustomDimensions RPC.
# @!attribute [rw] custom_dimensions
# @return [::Array<::Google::Analytics::Admin::V1alpha::CustomDimension>]
# List of CustomDimensions.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListCustomDimensionsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ArchiveCustomDimension RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the CustomDimension to archive.
# Example format: properties/1234/customDimensions/5678
class ArchiveCustomDimensionRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetCustomDimension RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the CustomDimension to get.
# Example format: properties/1234/customDimensions/5678
class GetCustomDimensionRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateCustomMetric RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] custom_metric
# @return [::Google::Analytics::Admin::V1alpha::CustomMetric]
# Required. The CustomMetric to create.
class CreateCustomMetricRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateCustomMetric RPC.
# @!attribute [rw] custom_metric
# @return [::Google::Analytics::Admin::V1alpha::CustomMetric]
# The CustomMetric to update
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Omitted fields will not be updated.
# To replace the entire entity, use one path with the string "*" to match
# all fields.
class UpdateCustomMetricRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListCustomMetrics RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListCustomMetrics` call.
# Provide this to retrieve the subsequent page.
#
# When paginating, all other parameters provided to `ListCustomMetrics` must
# match the call that provided the page token.
class ListCustomMetricsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListCustomMetrics RPC.
# @!attribute [rw] custom_metrics
# @return [::Array<::Google::Analytics::Admin::V1alpha::CustomMetric>]
# List of CustomMetrics.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListCustomMetricsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ArchiveCustomMetric RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the CustomMetric to archive.
# Example format: properties/1234/customMetrics/5678
class ArchiveCustomMetricRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetCustomMetric RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the CustomMetric to get.
# Example format: properties/1234/customMetrics/5678
class GetCustomMetricRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetDataRetentionSettings RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the settings to lookup.
# Format:
# properties/\\{property}/dataRetentionSettings
# Example: "properties/1000/dataRetentionSettings"
class GetDataRetentionSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateDataRetentionSettings RPC.
# @!attribute [rw] data_retention_settings
# @return [::Google::Analytics::Admin::V1alpha::DataRetentionSettings]
# Required. The settings to update.
# The `name` field is used to identify the settings to be updated.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdateDataRetentionSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateDataStream RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] data_stream
# @return [::Google::Analytics::Admin::V1alpha::DataStream]
# Required. The DataStream to create.
class CreateDataStreamRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for DeleteDataStream RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DataStream to delete.
# Example format: properties/1234/dataStreams/5678
class DeleteDataStreamRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateDataStream RPC.
# @!attribute [rw] data_stream
# @return [::Google::Analytics::Admin::V1alpha::DataStream]
# The DataStream to update
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Omitted fields will not be updated.
# To replace the entire entity, use one path with the string "*" to match
# all fields.
class UpdateDataStreamRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListDataStreams RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListDataStreams` call.
# Provide this to retrieve the subsequent page.
#
# When paginating, all other parameters provided to `ListDataStreams` must
# match the call that provided the page token.
class ListDataStreamsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListDataStreams RPC.
# @!attribute [rw] data_streams
# @return [::Array<::Google::Analytics::Admin::V1alpha::DataStream>]
# List of DataStreams.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListDataStreamsResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetDataStream RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the DataStream to get.
# Example format: properties/1234/dataStreams/5678
class GetDataStreamRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetAudience RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the Audience to get.
# Example format: properties/1234/audiences/5678
class GetAudienceRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ListAudiences RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] page_size
# @return [::Integer]
# The maximum number of resources to return.
# If unspecified, at most 50 resources will be returned.
# The maximum value is 200 (higher values will be coerced to the maximum).
# @!attribute [rw] page_token
# @return [::String]
# A page token, received from a previous `ListAudiences` call. Provide this
# to retrieve the subsequent page.
#
# When paginating, all other parameters provided to `ListAudiences` must
# match the call that provided the page token.
class ListAudiencesRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Response message for ListAudiences RPC.
# @!attribute [rw] audiences
# @return [::Array<::Google::Analytics::Admin::V1alpha::Audience>]
# List of Audiences.
# @!attribute [rw] next_page_token
# @return [::String]
# A token, which can be sent as `page_token` to retrieve the next page.
# If this field is omitted, there are no subsequent pages.
class ListAudiencesResponse
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for CreateAudience RPC.
# @!attribute [rw] parent
# @return [::String]
# Required. Example format: properties/1234
# @!attribute [rw] audience
# @return [::Google::Analytics::Admin::V1alpha::Audience]
# Required. The audience to create.
class CreateAudienceRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateAudience RPC.
# @!attribute [rw] audience
# @return [::Google::Analytics::Admin::V1alpha::Audience]
# Required. The audience to update.
# The audience's `name` field is used to identify the audience to be updated.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdateAudienceRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for ArchiveAudience RPC.
# @!attribute [rw] name
# @return [::String]
# Required. Example format: properties/1234/audiences/5678
class ArchiveAudienceRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for GetAttributionSettings RPC.
# @!attribute [rw] name
# @return [::String]
# Required. The name of the attribution settings to retrieve.
# Format: properties/\\{property}/attributionSettings
class GetAttributionSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
# Request message for UpdateAttributionSettings RPC
# @!attribute [rw] attribution_settings
# @return [::Google::Analytics::Admin::V1alpha::AttributionSettings]
# Required. The attribution settings to update.
# The `name` field is used to identify the settings to be updated.
# @!attribute [rw] update_mask
# @return [::Google::Protobuf::FieldMask]
# Required. The list of fields to be updated. Field names must be in snake case
# (e.g., "field_to_update"). Omitted fields will not be updated. To replace
# the entire entity, use one path with the string "*" to match all fields.
class UpdateAttributionSettingsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
end
end
end
end
end
| {
"content_hash": "efcf5911811450468de0b8feda2519ae",
"timestamp": "",
"source": "github",
"line_count": 1519,
"max_line_length": 121,
"avg_line_length": 49.1026991441738,
"alnum_prop": 0.6238620671162535,
"repo_name": "dazuma/google-cloud-ruby",
"id": "fe2f499035ccc0c0d563f7db3ecd57089d4e2d58",
"size": "75251",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "google-analytics-admin-v1alpha/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "23930"
},
{
"name": "CSS",
"bytes": "1422"
},
{
"name": "DIGITAL Command Language",
"bytes": "2216"
},
{
"name": "Go",
"bytes": "1321"
},
{
"name": "HTML",
"bytes": "66414"
},
{
"name": "JavaScript",
"bytes": "1862"
},
{
"name": "Ruby",
"bytes": "103941624"
},
{
"name": "Shell",
"bytes": "19653"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:src="@mipmap/icon_no_more"
android:visibility="gone"
tools:visibility="visible" />
<ExpandableListView
android:id="@+id/expandable_listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white"
android:divider="@null"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:scrollbars="none" />
</FrameLayout>
<CheckBox
android:id="@+id/id_cb_select_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/orange"
android:button="@drawable/selector_add_actor"
android:gravity="right|center_vertical"
android:padding="15dp"
android:text=" 全选"
android:visibility="gone" />
</LinearLayout>
| {
"content_hash": "15cd12d4962b7c2968249ea0665c64e1",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 72,
"avg_line_length": 33.97959183673469,
"alnum_prop": 0.612012012012012,
"repo_name": "iamlisa0526/bolianeducation-child",
"id": "a251a1f095d694e4a122f3cab31e41c5641beed9",
"size": "1669",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/res/layout/activity_participator.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "1580514"
}
],
"symlink_target": ""
} |
using System.ComponentModel;
using System.Text;
using Microsoft.Build.Framework;
public class ConfigureWindowModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
string toolsDirectory;
public string ToolsDirectory
{
get { return toolsDirectory; }
set
{
toolsDirectory = value;
OnPropertyChanged("ToolsDirectory");
}
}
bool overwrite;
public bool Overwrite
{
get { return overwrite; }
set
{
overwrite = value;
OnPropertyChanged("Overwrite");
}
}
bool includeDebugSymbols;
public bool IncludeDebugSymbols
{
get { return includeDebugSymbols; }
set
{
includeDebugSymbols = value;
OnPropertyChanged("IncludeDebugSymbols");
}
}
bool deleteReferences;
public bool DeleteReferences
{
get { return deleteReferences; }
set
{
deleteReferences = value;
OnPropertyChanged("DeleteReferences");
}
}
string targetPath;
public string TargetPath
{
get { return targetPath; }
set
{
targetPath = value;
OnPropertyChanged("TargetPath");
}
}
bool deriveTargetPathFromBuildEngine;
public bool DeriveTargetPathFromBuildEngine
{
get { return deriveTargetPathFromBuildEngine; }
set
{
deriveTargetPathFromBuildEngine = value;
OnPropertyChanged("DeriveTargetPathFromBuildEngine");
}
}
MessageImportance messageImportance;
public MessageImportance MessageImportance
{
get { return messageImportance; }
set
{
messageImportance = value;
OnPropertyChanged("MessageImportance");
}
}
bool runPostBuildEvents;
public bool RunPostBuildEvents
{
get { return runPostBuildEvents; }
set
{
runPostBuildEvents = value;
OnPropertyChanged("RunPostBuildEvents");
}
}
string version;
public string Version
{
get { return version; }
set
{
version = value;
OnPropertyChanged("Version");
}
}
public ConfigureWindowModel()
{
Version = CurrentVersion.Version.ToString();
}
void OnPropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
public string GetErrors()
{
var stringBuilder = new StringBuilder();
if (!DeriveTargetPathFromBuildEngine)
{
if (string.IsNullOrWhiteSpace(TargetPath))
{
stringBuilder.AppendLine("TargetPath is required if you have selected DeriveTargetPathFromBuildEngine.");
}
}
if (string.IsNullOrWhiteSpace(ToolsDirectory))
{
stringBuilder.AppendLine("ToolsDirectory is required.");
}
if (!Overwrite && DeleteReferences)
{
stringBuilder.AppendLine("Overwrite=false and DeleteReferences=true is invalid because if the new file is copied to a different directory it serves no purpose deleting references.");
}
if (stringBuilder.Length == 0)
{
return null;
}
return stringBuilder.ToString();
}
} | {
"content_hash": "337da9b2ba66bcde3338f979de66b1cd",
"timestamp": "",
"source": "github",
"line_count": 160,
"max_line_length": 194,
"avg_line_length": 22.3125,
"alnum_prop": 0.5815126050420169,
"repo_name": "uniquegodwin/Costura",
"id": "d834a6d19b83bffe09bd06209c6e17d125eecae4",
"size": "3572",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CosturaVSPackage/ConfigureWindowModel.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "204974"
},
{
"name": "C#",
"bytes": "136634"
},
{
"name": "C++",
"bytes": "486030"
}
],
"symlink_target": ""
} |
package com.sinotrans.transport.dto.vo;
/**
* Created by emi on 2016/7/21.
* 司机账单返回vo
*/
public class DriverBillRespVo {
private String index;//下标
private String truckCode;//车牌号
private String driverName;//司机名
private String actionDesc;//操作
private String containerNo;//箱号
private String sizeType;//箱型尺寸
private String claimNo; //提单号
private String actIntervalName;//运输区间
private String jjLevel;//应付费用
public String getIndex() {
return index;
}
public void setIndex(String index) {
this.index = index;
}
public String getTruckCode() {
return truckCode;
}
public void setTruckCode(String truckCode) {
this.truckCode = truckCode;
}
public String getDriverName() {
return driverName;
}
public void setDriverName(String driverName) {
this.driverName = driverName;
}
public String getActionDesc() {
return actionDesc;
}
public void setActionDesc(String actionDesc) {
this.actionDesc = actionDesc;
}
public String getContainerNo() {
return containerNo;
}
public void setContainerNo(String containerNo) {
this.containerNo = containerNo;
}
public String getSizeType() {
return sizeType;
}
public void setSizeType(String sizeType) {
this.sizeType = sizeType;
}
public String getClaimNo() {
return claimNo;
}
public void setClaimNo(String claimNo) {
this.claimNo = claimNo;
}
public String getActIntervalName() {
return actIntervalName;
}
public void setActIntervalName(String actIntervalName) {
this.actIntervalName = actIntervalName;
}
public String getJjLevel() {
return jjLevel;
}
public void setJjLevel(String jjLevel) {
this.jjLevel = jjLevel;
}
}
| {
"content_hash": "e1346da78fe3fbb54b4be91885a45e58",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 60,
"avg_line_length": 21.011111111111113,
"alnum_prop": 0.6361713379164463,
"repo_name": "okmnhyxx/car-free-transport",
"id": "50ab6d515b3c86469fe13a8359c4f676cb5568a7",
"size": "1957",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/sinotrans/transport/dto/vo/DriverBillRespVo.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "83328"
},
{
"name": "HTML",
"bytes": "809251"
},
{
"name": "Java",
"bytes": "1301223"
},
{
"name": "JavaScript",
"bytes": "1281417"
}
],
"symlink_target": ""
} |
/**
* Team Validator
* Pokemon Showdown - http://pokemonshowdown.com/
*
* Handles team validation, and specifically learnset checking.
*
* @license MIT license
*/
'use strict';
let Validator;
if (!process.send) {
let validationCount = 0;
let pendingValidations = {};
let ValidatorProcess = (function () {
function ValidatorProcess() {
this.process = require('child_process').fork('team-validator.js', {cwd: __dirname});
let self = this;
this.process.on('message', function (message) {
// Protocol:
// success: "[id]|1[details]"
// failure: "[id]|0[details]"
let pipeIndex = message.indexOf('|');
let id = message.substr(0, pipeIndex);
let success = (message.charAt(pipeIndex + 1) === '1');
if (pendingValidations[id]) {
ValidatorProcess.release(self);
pendingValidations[id](success, message.substr(pipeIndex + 2));
delete pendingValidations[id];
}
});
}
ValidatorProcess.prototype.load = 0;
ValidatorProcess.prototype.active = true;
ValidatorProcess.processes = [];
ValidatorProcess.spawn = function () {
let num = Config.validatorprocesses || 1;
for (let i = 0; i < num; ++i) {
this.processes.push(new ValidatorProcess());
}
};
ValidatorProcess.respawn = function () {
this.processes.splice(0).forEach(function (process) {
process.active = false;
if (!process.load) process.process.disconnect();
});
this.spawn();
};
ValidatorProcess.acquire = function () {
let process = this.processes[0];
for (let i = 1; i < this.processes.length; ++i) {
if (this.processes[i].load < process.load) {
process = this.processes[i];
}
}
++process.load;
return process;
};
ValidatorProcess.release = function (process) {
--process.load;
if (!process.load && !process.active) {
process.process.disconnect();
}
};
ValidatorProcess.send = function (format, team, callback) {
let process = this.acquire();
pendingValidations[validationCount] = callback;
try {
process.process.send('' + validationCount + '|' + format + '|' + team);
} catch (e) {}
++validationCount;
};
return ValidatorProcess;
})();
// Create the initial set of validator processes.
ValidatorProcess.spawn();
exports.ValidatorProcess = ValidatorProcess;
exports.pendingValidations = pendingValidations;
exports.validateTeam = function (format, team, callback) {
ValidatorProcess.send(format, team, callback);
};
let synchronousValidators = {};
exports.validateTeamSync = function (format, team) {
if (!synchronousValidators[format]) synchronousValidators[format] = new Validator(format);
return synchronousValidators[format].validateTeam(team);
};
exports.validateSetSync = function (format, set, teamHas) {
if (!synchronousValidators[format]) synchronousValidators[format] = new Validator(format);
return synchronousValidators[format].validateSet(set, teamHas);
};
exports.checkLearnsetSync = function (format, move, template, lsetData) {
if (!synchronousValidators[format]) synchronousValidators[format] = new Validator(format);
return synchronousValidators[format].checkLearnset(move, template, lsetData);
};
} else {
require('sugar');
global.Config = require('./config/config.js');
if (Config.crashguard) {
process.on('uncaughtException', function (err) {
require('./crashlogger.js')(err, 'A team validator process', true);
});
}
/**
* Converts anything to an ID. An ID must have only lowercase alphanumeric
* characters.
* If a string is passed, it will be converted to lowercase and
* non-alphanumeric characters will be stripped.
* If an object with an ID is passed, its ID will be returned.
* Otherwise, an empty string will be returned.
*/
global.toId = function (text) {
if (text && text.id) {
text = text.id;
} else if (text && text.userid) {
text = text.userid;
}
if (typeof text !== 'string' && typeof text !== 'number') return '';
return ('' + text).toLowerCase().replace(/[^a-z0-9]+/g, '');
};
global.Tools = require('./tools.js').includeMods();
require('./repl.js').start('team-validator-', process.pid, function (cmd) { return eval(cmd); });
let validators = {};
let respond = function respond(id, success, details) {
process.send(id + (success ? '|1' : '|0') + details);
};
process.on('message', function (message) {
// protocol:
// "[id]|[format]|[team]"
let pipeIndex = message.indexOf('|');
let pipeIndex2 = message.indexOf('|', pipeIndex + 1);
let id = message.substr(0, pipeIndex);
let format = message.substr(pipeIndex + 1, pipeIndex2 - pipeIndex - 1);
if (!validators[format]) validators[format] = new Validator(format);
let parsedTeam = [];
parsedTeam = Tools.fastUnpackTeam(message.substr(pipeIndex2 + 1));
let problems;
try {
problems = validators[format].validateTeam(parsedTeam);
} catch (err) {
let stack = err.stack + '\n\n' +
'Additional information:\n' +
'format = ' + format + '\n' +
'team = ' + message.substr(pipeIndex2 + 1) + '\n';
let fakeErr = {stack: stack};
require('./crashlogger.js')(fakeErr, 'A team validation');
problems = ["Your team crashed the team validator. We've been automatically notified and will fix this crash, but you should use a different team for now."];
}
if (problems && problems.length) {
respond(id, false, problems.join('\n'));
} else {
let packedTeam = Tools.packTeam(parsedTeam);
// console.log('FROM: ' + message.substr(pipeIndex2 + 1));
// console.log('TO: ' + packedTeam);
respond(id, true, packedTeam);
}
});
process.on('disconnect', function () {
process.exit();
});
}
Validator = (function () {
function Validator(format) {
this.format = Tools.getFormat(format);
this.tools = Tools.mod(this.format);
}
Validator.prototype.validateTeam = function (team) {
let format = Tools.getFormat(this.format);
if (format.validateTeam) return format.validateTeam.call(this, team);
return this.baseValidateTeam(team);
};
Validator.prototype.baseValidateTeam = function (team) {
let format = this.format;
let tools = this.tools;
let problems = [];
tools.getBanlistTable(format);
if (format.team) {
return false;
}
if (!team || !Array.isArray(team)) {
if (format.canUseRandomTeam) {
return false;
}
return ["You sent invalid team data. If you're not using a custom client, please report this as a bug."];
}
let lengthRange = format.teamLength && format.teamLength.validate;
if (!lengthRange) {
lengthRange = [1, 6];
if (format.gameType === 'doubles') lengthRange[0] = 2;
if (format.gameType === 'triples' || format.gameType === 'rotation') lengthRange[0] = 3;
}
if (team.length < lengthRange[0]) return ["You must bring at least " + lengthRange[0] + " Pok\u00E9mon."];
if (team.length > lengthRange[1]) return ["You may only bring up to " + lengthRange[1] + " Pok\u00E9mon."];
let teamHas = {};
for (let i = 0; i < team.length; i++) {
if (!team[i]) return ["You sent invalid team data. If you're not using a custom client, please report this as a bug."];
let setProblems = (format.validateSet || this.validateSet).call(this, team[i], teamHas);
if (setProblems) {
problems = problems.concat(setProblems);
}
}
for (let i = 0; i < format.teamBanTable.length; i++) {
let bannedCombo = true;
for (let j = 0; j < format.teamBanTable[i].length; j++) {
if (!teamHas[format.teamBanTable[i][j]]) {
bannedCombo = false;
break;
}
}
if (bannedCombo) {
let clause = format.name ? " by " + format.name : '';
problems.push("Your team has the combination of " + format.teamBanTable[i].join(' + ') + ", which is banned" + clause + ".");
}
}
if (format.ruleset) {
for (let i = 0; i < format.ruleset.length; i++) {
let subformat = tools.getFormat(format.ruleset[i]);
if (subformat.onValidateTeam) {
problems = problems.concat(subformat.onValidateTeam.call(tools, team, format, teamHas) || []);
}
}
}
if (format.onValidateTeam) {
problems = problems.concat(format.onValidateTeam.call(tools, team, format, teamHas) || []);
}
if (!problems.length) return false;
return problems;
};
Validator.prototype.validateSet = function (set, teamHas, flags) {
let format = this.format;
let tools = this.tools;
let problems = [];
if (!set) {
return ["This is not a Pokemon."];
}
let template = tools.getTemplate(Tools.getString(set.species));
if (!template.exists) {
return ["The Pokemon '" + set.species + "' does not exist."];
}
set.species = template.species;
set.name = tools.getName(set.name);
let item = tools.getItem(Tools.getString(set.item));
set.item = item.name;
let ability = tools.getAbility(Tools.getString(set.ability));
set.ability = ability.name;
if (!Array.isArray(set.moves)) set.moves = [];
let maxLevel = format.maxLevel || 100;
let maxForcedLevel = format.maxForcedLevel || maxLevel;
if (!set.level) {
set.level = (format.defaultLevel || maxLevel);
}
if (format.forcedLevel) {
set.forcedLevel = format.forcedLevel;
} else if (set.level >= maxForcedLevel) {
set.forcedLevel = maxForcedLevel;
}
if (set.level > maxLevel || set.level === set.forcedLevel || set.level === set.maxForcedLevel) {
set.level = maxLevel;
}
let nameTemplate = tools.getTemplate(set.name);
if (nameTemplate.exists && nameTemplate.name.toLowerCase() === set.name.toLowerCase()) set.name = null;
set.species = set.species;
set.name = set.name || set.species;
let name = set.species;
if (set.species !== set.name) name = set.name + " (" + set.species + ")";
let isHidden = false;
let lsetData = {set:set, format:format};
if (flags) Object.merge(lsetData, flags);
let setHas = {};
if (!template || !template.abilities) {
set.species = 'Unown';
template = tools.getTemplate('Unown');
}
if (format.ruleset) {
for (let i = 0; i < format.ruleset.length; i++) {
let subformat = tools.getFormat(format.ruleset[i]);
if (subformat.onChangeSet) {
problems = problems.concat(subformat.onChangeSet.call(tools, set, format) || []);
}
}
}
if (format.onChangeSet) {
problems = problems.concat(format.onChangeSet.call(tools, set, format, setHas, teamHas) || []);
}
template = tools.getTemplate(set.species);
item = tools.getItem(set.item);
if (item.id && !item.exists) {
return ['"' + set.item + "' is an invalid item."];
}
ability = tools.getAbility(set.ability);
if (ability.id && !ability.exists) {
if (tools.gen < 3) {
// gen 1-2 don't have abilities, just silently remove
ability = tools.getAbility('');
set.ability = '';
} else {
return ['"' + set.ability + "' is an invalid ability."];
}
}
let banlistTable = tools.getBanlistTable(format);
let check = template.id;
let clause = '';
setHas[check] = true;
if (banlistTable[check]) {
clause = typeof banlistTable[check] === 'string' ? " by " + banlistTable[check] : '';
problems.push(set.species + ' is banned' + clause + '.');
} else if (!tools.data.FormatsData[check] || !tools.data.FormatsData[check].tier) {
check = toId(template.baseSpecies);
if (banlistTable[check]) {
clause = typeof banlistTable[check] === 'string' ? " by " + banlistTable[check] : '';
problems.push(template.baseSpecies + ' is banned' + clause + '.');
}
}
check = toId(set.ability);
setHas[check] = true;
if (banlistTable[check]) {
clause = typeof banlistTable[check] === 'string' ? " by " + banlistTable[check] : '';
problems.push(name + "'s ability " + set.ability + " is banned" + clause + ".");
}
check = toId(set.item);
setHas[check] = true;
if (banlistTable[check]) {
clause = typeof banlistTable[check] === 'string' ? " by " + banlistTable[check] : '';
problems.push(name + "'s item " + set.item + " is banned" + clause + ".");
}
if (banlistTable['Unreleased'] && item.isUnreleased) {
problems.push(name + "'s item " + set.item + " is unreleased.");
}
if (banlistTable['Unreleased'] && template.isUnreleased) {
if (!format.requirePentagon || (template.eggGroups[0] === 'Undiscovered' && !template.evos)) {
problems.push(name + " (" + template.species + ") is unreleased.");
}
}
setHas[toId(set.ability)] = true;
if (banlistTable['illegal']) {
// Don't check abilities for metagames with All Abilities
if (tools.gen <= 2) {
set.ability = 'None';
} else if (!banlistTable['ignoreillegalabilities']) {
if (!ability.name) {
problems.push(name + " needs to have an ability.");
} else if (ability.name !== template.abilities['0'] &&
ability.name !== template.abilities['1'] &&
ability.name !== template.abilities['H']) {
problems.push(name + " can't have " + set.ability + ".");
}
if (ability.name === template.abilities['H']) {
isHidden = true;
if (template.unreleasedHidden && banlistTable['illegal']) {
problems.push(name + "'s hidden ability is unreleased.");
} else if (tools.gen === 5 && set.level < 10 && (template.maleOnlyHidden || template.gender === 'N')) {
problems.push(name + " must be at least level 10 with its hidden ability.");
}
if (template.maleOnlyHidden) {
set.gender = 'M';
lsetData.sources = ['5D'];
}
}
}
}
if (set.moves && Array.isArray(set.moves)) {
set.moves = set.moves.filter(function (val) { return val; });
}
if (!set.moves || !set.moves.length) {
problems.push(name + " has no moves.");
} else {
// A limit is imposed here to prevent too much engine strain or
// too much layout deformation - to be exact, this is the Debug
// Mode limitation.
// The usual limit of 4 moves is handled elsewhere - currently
// in the cartridge-compliant set validator: rulesets.js:pokemon
set.moves = set.moves.slice(0, 24);
for (let i = 0; i < set.moves.length; i++) {
if (!set.moves[i]) continue;
let move = tools.getMove(Tools.getString(set.moves[i]));
if (!move.exists) return ['"' + move.name + '" is an invalid move.'];
set.moves[i] = move.name;
check = move.id;
setHas[check] = true;
if (banlistTable[check]) {
clause = typeof banlistTable[check] === 'string' ? " by " + banlistTable[check] : '';
problems.push(name + "'s move " + set.moves[i] + " is banned" + clause + ".");
}
if (banlistTable['Unreleased']) {
if (move.isUnreleased) problems.push(name + "'s move " + set.moves[i] + " is unreleased.");
}
if (banlistTable['illegal']) {
let problem = this.checkLearnset(move, template, lsetData);
if (problem) {
let problemString = name + " can't learn " + move.name;
if (problem.type === 'incompatible') {
if (isHidden) {
problemString = problemString.concat(" because it's incompatible with its ability or another move.");
} else {
problemString = problemString.concat(" because it's incompatible with another move.");
}
} else if (problem.type === 'oversketched') {
problemString = problemString.concat(" because it can only sketch " + problem.maxSketches + " move" + (problem.maxSketches > 1 ? "s" : "") + ".");
} else if (problem.type === 'pokebank') {
problemString = problemString.concat(" because it's only obtainable from a previous generation.");
} else {
problemString = problemString.concat(".");
}
problems.push(problemString);
}
}
}
if (lsetData.sources && lsetData.sources.length === 1 && !lsetData.sourcesBefore) {
// we're restricted to a single source
let source = lsetData.sources[0];
if (source.charAt(1) === 'S') {
// it's an event
let eventData = null;
let splitSource = source.substr(2).split(' ');
let eventTemplate = tools.getTemplate(splitSource[1]);
if (eventTemplate.eventPokemon) eventData = eventTemplate.eventPokemon[parseInt(splitSource[0], 10)];
if (eventData) {
if (eventData.nature && eventData.nature !== set.nature) {
problems.push(name + " must have a " + eventData.nature + " nature because it has a move only available from a specific event.");
}
if (eventData.shiny && !set.shiny) {
problems.push(name + " must be shiny because it has a move only available from a specific event.");
}
if (eventData.generation < 5) eventData.isHidden = false;
if (eventData.isHidden !== undefined && eventData.isHidden !== isHidden) {
problems.push(name + (isHidden ? " can't have" : " must have") + " its hidden ability because it has a move only available from a specific event.");
}
if (tools.gen <= 5 && eventData.abilities && eventData.abilities.indexOf(ability.id) < 0 && (template.species === eventTemplate.species || tools.getAbility(set.ability).gen <= eventData.generation)) {
problems.push(name + " must have " + eventData.abilities.join(" or ") + " because it has a move only available from a specific event.");
}
if (eventData.gender) {
set.gender = eventData.gender;
}
if (eventData.level && set.level < eventData.level) {
problems.push(name + " must be at least level " + eventData.level + " because it has a move only available from a specific event.");
}
}
isHidden = false;
}
}
if (isHidden && lsetData.sourcesBefore) {
if (!lsetData.sources && lsetData.sourcesBefore < 5) {
problems.push(name + " has a hidden ability - it can't have moves only learned before gen 5.");
} else if (lsetData.sources && template.gender && template.gender !== 'F' && !{'Nidoran-M':1, 'Nidorino':1, 'Nidoking':1, 'Volbeat':1}[template.species]) {
let compatibleSource = false;
for (let i = 0, len = lsetData.sources.length; i < len; i++) {
if (lsetData.sources[i].charAt(1) === 'E' || (lsetData.sources[i].substr(0, 2) === '5D' && set.level >= 10)) {
compatibleSource = true;
break;
}
}
if (!compatibleSource) {
problems.push(name + " has moves incompatible with its hidden ability.");
}
}
}
if (banlistTable['illegal'] && set.level < template.evoLevel) {
// FIXME: Event pokemon given at a level under what it normally can be attained at gives a false positive
problems.push(name + " must be at least level " + template.evoLevel + " to be evolved.");
}
if (!lsetData.sources && lsetData.sourcesBefore <= 3 && tools.getAbility(set.ability).gen === 4 && !template.prevo && tools.gen <= 5) {
problems.push(name + " has a gen 4 ability and isn't evolved - it can't use anything from gen 3.");
}
if (!lsetData.sources && lsetData.sourcesBefore >= 3 && (isHidden || tools.gen <= 5) && template.gen <= lsetData.sourcesBefore) {
let oldAbilities = tools.mod('gen' + lsetData.sourcesBefore).getTemplate(set.species).abilities;
if (ability.name !== oldAbilities['0'] && ability.name !== oldAbilities['1'] && !oldAbilities['H']) {
problems.push(name + " has moves incompatible with its ability.");
}
}
}
if (item.megaEvolves === template.species) {
template = tools.getTemplate(item.megaStone);
}
if (template.tier) {
let tier = template.tier;
if (tier.charAt(0) === '(') tier = tier.slice(1, -1);
setHas[toId(tier)] = true;
if (banlistTable[tier]) {
problems.push(template.species + " is in " + tier + ", which is banned.");
}
}
if (teamHas) {
for (let i in setHas) {
teamHas[i] = true;
}
}
for (let i = 0; i < format.setBanTable.length; i++) {
let bannedCombo = true;
for (let j = 0; j < format.setBanTable[i].length; j++) {
if (!setHas[format.setBanTable[i][j]]) {
bannedCombo = false;
break;
}
}
if (bannedCombo) {
clause = format.name ? " by " + format.name : '';
problems.push(name + " has the combination of " + format.setBanTable[i].join(' + ') + ", which is banned" + clause + ".");
}
}
if (format.ruleset) {
for (let i = 0; i < format.ruleset.length; i++) {
let subformat = tools.getFormat(format.ruleset[i]);
if (subformat.onValidateSet) {
problems = problems.concat(subformat.onValidateSet.call(tools, set, format, setHas, teamHas) || []);
}
}
}
if (format.onValidateSet) {
problems = problems.concat(format.onValidateSet.call(tools, set, format, setHas, teamHas) || []);
}
if (!problems.length) {
if (set.forcedLevel) set.level = set.forcedLevel;
return false;
}
return problems;
};
Validator.prototype.checkLearnset = function (move, template, lsetData) {
let tools = this.tools;
move = toId(move);
template = tools.getTemplate(template);
lsetData = lsetData || {};
lsetData.eggParents = lsetData.eggParents || [];
let set = (lsetData.set || (lsetData.set = {}));
let format = (lsetData.format || (lsetData.format = {}));
let alreadyChecked = {};
let level = set.level || 100;
let isHidden = false;
if (set.ability && tools.getAbility(set.ability).name === template.abilities['H']) isHidden = true;
let incompatibleHidden = false;
let limit1 = true;
let sketch = false;
let blockedHM = false;
let sometimesPossible = false; // is this move in the learnset at all?
// This is a pretty complicated algorithm
// Abstractly, what it does is construct the union of sets of all
// possible ways this pokemon could be obtained, and then intersect
// it with a the pokemon's existing set of all possible ways it could
// be obtained. If this intersection is non-empty, the move is legal.
// We apply several optimizations to this algorithm. The most
// important is that with, for instance, a TM move, that Pokemon
// could have been obtained from any gen at or before that TM's gen.
// Instead of adding every possible source before or during that gen,
// we keep track of a maximum gen variable, intended to mean "any
// source at or before this gen is possible."
// set of possible sources of a pokemon with this move, represented as an array
let sources = [];
// the equivalent of adding "every source at or before this gen" to sources
let sourcesBefore = 0;
let noPastGen = !!format.requirePentagon;
// since Gen 3, Pokemon cannot be traded to past generations
let noFutureGen = tools.gen >= 3 ? true : !!(format.banlistTable && format.banlistTable['tradeback']);
do {
alreadyChecked[template.speciesid] = true;
// STABmons hack to avoid copying all of validateSet to formats
if (move !== 'chatter' && lsetData['ignorestabmoves'] && lsetData['ignorestabmoves'][this.tools.getMove(move).category]) {
let types = template.types;
if (template.species === 'Shaymin') types = ['Grass', 'Flying'];
if (template.baseSpecies === 'Hoopa') types = ['Psychic', 'Ghost', 'Dark'];
if (types.indexOf(tools.getMove(move).type) >= 0) return false;
}
if (template.learnset) {
if (template.learnset[move] || template.learnset['sketch']) {
sometimesPossible = true;
let lset = template.learnset[move];
if (!lset || template.speciesid === 'smeargle') {
if (tools.getMove(move).noSketch) return true;
lset = template.learnset['sketch'];
sketch = true;
}
if (typeof lset === 'string') lset = [lset];
for (let i = 0, len = lset.length; i < len; i++) {
let learned = lset[i];
if (noPastGen && learned.charAt(0) !== '6') continue;
if (noFutureGen && parseInt(learned.charAt(0), 10) > tools.gen) continue;
if (learned.charAt(0) !== '6' && isHidden && !tools.mod('gen' + learned.charAt(0)).getTemplate(template.species).abilities['H']) {
// check if the Pokemon's hidden ability was available
incompatibleHidden = true;
continue;
}
if (!template.isNonstandard) {
// HMs can't be transferred
if (tools.gen >= 4 && learned.charAt(0) <= 3 && move in {'cut':1, 'fly':1, 'surf':1, 'strength':1, 'flash':1, 'rocksmash':1, 'waterfall':1, 'dive':1}) continue;
if (tools.gen >= 5 && learned.charAt(0) <= 4 && move in {'cut':1, 'fly':1, 'surf':1, 'strength':1, 'rocksmash':1, 'waterfall':1, 'rockclimb':1}) continue;
// Defog and Whirlpool can't be transferred together
if (tools.gen >= 5 && move in {'defog':1, 'whirlpool':1} && learned.charAt(0) <= 4) blockedHM = true;
}
if (learned.substr(0, 2) in {'4L':1, '5L':1, '6L':1}) {
// gen 4-6 level-up moves
if (level >= parseInt(learned.substr(2), 10)) {
// we're past the required level to learn it
return false;
}
if (!template.gender || template.gender === 'F') {
// available as egg move
learned = learned.charAt(0) + 'Eany';
} else {
// this move is unavailable, skip it
continue;
}
}
if (learned.charAt(1) in {L:1, M:1, T:1}) {
if (learned.charAt(0) === '6') {
// current-gen TM or tutor moves:
// always available
return false;
}
// past-gen level-up, TM, or tutor moves:
// available as long as the source gen was or was before this gen
limit1 = false;
sourcesBefore = Math.max(sourcesBefore, parseInt(learned.charAt(0), 10));
if (tools.gen === 2 && lsetData.hasGen2Move && parseInt(learned.charAt(0), 10) === 1) lsetData.blockedGen2Move = true;
} else if (learned.charAt(1) in {E:1, S:1, D:1}) {
// egg, event, or DW moves:
// only if that was the source
if (learned.charAt(1) === 'E') {
// it's an egg move, so we add each pokemon that can be bred with to its sources
if (learned.charAt(0) === '6') {
// gen 6 doesn't have egg move incompatibilities except for certain cases with baby Pokemon
learned = '6E' + (template.prevo ? template.id : '');
sources.push(learned);
continue;
}
let eggGroups = template.eggGroups;
if (!eggGroups) continue;
if (eggGroups[0] === 'Undiscovered') eggGroups = tools.getTemplate(template.evos[0]).eggGroups;
let atLeastOne = false;
let fromSelf = (learned.substr(1) === 'Eany');
learned = learned.substr(0, 2);
for (let templateid in tools.data.Pokedex) {
let dexEntry = tools.getTemplate(templateid);
if (
// CAP pokemon can't breed
!dexEntry.isNonstandard &&
// can't breed mons from future gens
dexEntry.gen <= parseInt(learned.charAt(0), 10) &&
// genderless pokemon can't pass egg moves
(dexEntry.gender !== 'N' || tools.gen <= 1 && dexEntry.gen <= 1)) {
if (
// chainbreeding
fromSelf ||
// otherwise parent must be able to learn the move
!alreadyChecked[dexEntry.speciesid] && dexEntry.learnset && (dexEntry.learnset[move] || dexEntry.learnset['sketch'])) {
if (dexEntry.eggGroups.intersect(eggGroups).length) {
if (tools.gen === 2 && dexEntry.gen <= 2 && lsetData.hasEggMove && lsetData.hasEggMove !== move) {
// If the mon already has an egg move by a father, other different father can't give it another egg move.
if (lsetData.eggParents.indexOf(dexEntry.species) >= 0) {
// We have to test here that the father of both moves doesn't get both by egg breeding
let learnsFrom = false;
let lsetToCheck = (dexEntry.learnset[lsetData.hasEggMove]) ? dexEntry.learnset[lsetData.hasEggMove] : dexEntry.learnset['sketch'];
if (!lsetToCheck || !lsetToCheck.length) continue;
for (let ltype = 0; ltype < lsetToCheck.length; ltype++) {
// Save first learning type. After that, only save it if we have egg and it's not egg.
learnsFrom = !learnsFrom || learnsFrom === 'E' ? lsetToCheck[ltype].charAt(1) : learnsFrom;
}
// If the previous egg move was learnt by the father through an egg as well:
if (learnsFrom === 'E') {
let secondLearnsFrom = false;
let lsetToCheck = (dexEntry.learnset[move]) ? dexEntry.learnset[move] : dexEntry.learnset['sketch'];
// Have here either the move learnset or sketch learnset for Smeargle.
if (lsetToCheck) {
for (let ltype = 0; ltype < lsetToCheck.length; ltype++) {
// Save first learning type. After that, only save it if we have egg and it's not egg.
secondLearnsFrom = !secondLearnsFrom || secondLearnsFrom === 'E' ? dexEntry.learnset[move][ltype].charAt(1) : secondLearnsFrom;
}
// Ok, both moves are learnt by father through an egg, therefor, it's impossible.
if (secondLearnsFrom === 'E') {
lsetData.blockedGen2Move = true;
continue;
}
}
}
} else {
lsetData.blockedGen2Move = true;
continue;
}
}
lsetData.hasEggMove = move;
lsetData.eggParents.push(dexEntry.species);
// Check if it has a move that needs to come from a prior gen to this egg move.
lsetData.hasGen2Move = lsetData.hasGen2Move || (tools.gen === 2 && tools.getMove(move).gen === 2);
lsetData.blockedGen2Move = lsetData.hasGen2Move && tools.gen === 2 && (lsetData.sourcesBefore ? lsetData.sourcesBefore : sourcesBefore) > 0 && (lsetData.sourcesBefore ? lsetData.sourcesBefore : sourcesBefore) < parseInt(learned.charAt(0), 10);
// we can breed with it
atLeastOne = true;
sources.push(learned + dexEntry.id);
}
}
}
}
// chainbreeding with itself from earlier gen
if (!atLeastOne) sources.push(learned + template.id);
// Egg move tradeback for gens 1 and 2.
if (!noFutureGen) sourcesBefore = Math.max(sourcesBefore, parseInt(learned.charAt(0), 10));
} else if (learned.charAt(1) === 'S') {
// Event Pokémon:
// Available as long as the past gen can get the Pokémon and then trade it back.
sources.push(learned + ' ' + template.id);
if (!noFutureGen) sourcesBefore = Math.max(sourcesBefore, parseInt(learned.charAt(0), 10));
// Check if it has a move that needs to come from a prior gen to this event move.
lsetData.hasGen2Move = lsetData.hasGen2Move || (tools.gen === 2 && tools.getMove(move).gen === 2);
lsetData.blockedGen2Move = lsetData.hasGen2Move && tools.gen === 2 && (lsetData.sourcesBefore ? lsetData.sourcesBefore : sourcesBefore) > 0 && (lsetData.sourcesBefore ? lsetData.sourcesBefore : sourcesBefore) < parseInt(learned.charAt(0), 10);
} else {
// DW Pokemon are at level 10 or at the evolution level
let minLevel = (template.evoLevel && template.evoLevel > 10) ? template.evoLevel : 10;
if (set.level < minLevel) continue;
sources.push(learned);
}
}
}
}
if (format.mimicGlitch && template.gen < 5) {
// include the Mimic Glitch when checking this mon's learnset
let glitchMoves = {metronome:1, copycat:1, transform:1, mimic:1, assist:1};
let getGlitch = false;
for (let i in glitchMoves) {
if (template.learnset[i]) {
if (!(i === 'mimic' && tools.getAbility(set.ability).gen === 4 && !template.prevo)) {
getGlitch = true;
break;
}
}
}
if (getGlitch) {
sourcesBefore = Math.max(sourcesBefore, 4);
if (tools.getMove(move).gen < 5) {
limit1 = false;
}
}
}
}
// also check to see if the mon's prevo or freely switchable formes can learn this move
if (!template.learnset && template.baseSpecies !== template.species) {
// forme takes precedence over prevo only if forme has no learnset
template = tools.getTemplate(template.baseSpecies);
} else if (template.prevo) {
template = tools.getTemplate(template.prevo);
if (template.gen > Math.max(2, tools.gen)) template = null;
if (template && !template.abilities['H']) isHidden = false;
} else if (template.baseSpecies !== template.species && template.baseSpecies !== 'Kyurem' && template.baseSpecies !== 'Pikachu') {
template = tools.getTemplate(template.baseSpecies);
} else {
template = null;
}
} while (template && template.species && !alreadyChecked[template.speciesid]);
if (limit1 && sketch) {
// limit 1 sketch move
if (lsetData.sketchMove) {
return {type:'oversketched', maxSketches: 1};
}
lsetData.sketchMove = move;
}
if (blockedHM) {
// Limit one of Defog/Whirlpool to be transferred
if (lsetData.hm) return {type:'incompatible'};
lsetData.hm = move;
}
if (lsetData.blockedGen2Move) {
// Limit Gen 2 egg moves on gen 1 when move doesn't exist
return {type:'incompatible'};
}
// Now that we have our list of possible sources, intersect it with the current list
if (!sourcesBefore && !sources.length) {
if (noPastGen && sometimesPossible) return {type:'pokebank'};
if (incompatibleHidden) return {type:'incompatible'};
return true;
}
if (!sources.length) sources = null;
if (sourcesBefore || lsetData.sourcesBefore) {
// having sourcesBefore is the equivalent of having everything before that gen
// in sources, so we fill the other array in preparation for intersection
let learned;
if (sourcesBefore && lsetData.sources) {
if (!sources) sources = [];
for (let i = 0, len = lsetData.sources.length; i < len; i++) {
learned = lsetData.sources[i];
if (parseInt(learned.charAt(0), 10) <= sourcesBefore) {
sources.push(learned);
}
}
if (!lsetData.sourcesBefore) sourcesBefore = 0;
}
if (lsetData.sourcesBefore && sources) {
if (!lsetData.sources) lsetData.sources = [];
for (let i = 0, len = sources.length; i < len; i++) {
learned = sources[i];
if (parseInt(learned.charAt(0), 10) <= lsetData.sourcesBefore) {
lsetData.sources.push(learned);
}
}
if (!sourcesBefore) delete lsetData.sourcesBefore;
}
}
if (sources) {
if (lsetData.sources) {
let intersectSources = lsetData.sources.intersect(sources);
if (!intersectSources.length && !(sourcesBefore && lsetData.sourcesBefore)) {
return {type:'incompatible'};
}
lsetData.sources = intersectSources;
} else {
lsetData.sources = sources.unique();
}
}
if (sourcesBefore) {
lsetData.sourcesBefore = Math.min(sourcesBefore, lsetData.sourcesBefore || 6);
}
return false;
};
return Validator;
})();
| {
"content_hash": "eb0aceed7fa1120ead9b20c1fc72b7b4",
"timestamp": "",
"source": "github",
"line_count": 878,
"max_line_length": 255,
"avg_line_length": 39.49658314350797,
"alnum_prop": 0.6287559836207394,
"repo_name": "Nineage/Origin",
"id": "a638ec56a26ec20d71e8cb097a95bacb0a7157c3",
"size": "34680",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "team-validator.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1055"
},
{
"name": "CSS",
"bytes": "22153"
},
{
"name": "HTML",
"bytes": "655"
},
{
"name": "JavaScript",
"bytes": "3215939"
}
],
"symlink_target": ""
} |
package macromedia.asc.embedding.avmplus;
import macromedia.asc.util.Context;
import macromedia.asc.semantics.Builder;
import macromedia.asc.semantics.ObjectValue;
public class WithBuilder extends Builder
{
public void build(Context cx, ObjectValue ob)
{
objectValue = ob;
contextId = cx.getId();
}
public boolean hasRegisterOffset() { return false; }
}
| {
"content_hash": "68c8e4a64ae004d94aaad89a958b0038",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 53,
"avg_line_length": 19.36842105263158,
"alnum_prop": 0.7690217391304348,
"repo_name": "adufilie/flex-sdk",
"id": "44bdb8b01304dc9187437b9d4eb53d1b048be225",
"size": "1187",
"binary": false,
"copies": "13",
"ref": "refs/heads/develop",
"path": "modules/asc/src/java/macromedia/asc/embedding/avmplus/WithBuilder.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "AGS Script",
"bytes": "478"
},
{
"name": "ASP",
"bytes": "6381"
},
{
"name": "ActionScript",
"bytes": "34995123"
},
{
"name": "Awk",
"bytes": "1958"
},
{
"name": "Batchfile",
"bytes": "40336"
},
{
"name": "C",
"bytes": "4601"
},
{
"name": "C++",
"bytes": "10259"
},
{
"name": "CSS",
"bytes": "508448"
},
{
"name": "Groff",
"bytes": "59633"
},
{
"name": "HTML",
"bytes": "84174"
},
{
"name": "Java",
"bytes": "15072764"
},
{
"name": "JavaScript",
"bytes": "110516"
},
{
"name": "PureBasic",
"bytes": "362"
},
{
"name": "Shell",
"bytes": "306455"
},
{
"name": "Visual Basic",
"bytes": "4498"
},
{
"name": "XSLT",
"bytes": "757371"
}
],
"symlink_target": ""
} |
<md-toolbar class="md-hue-2 topbar">
<div class="md-toolbar-tools">
<h2 flex md-truncate>Variables dans ce namespace</h2>
<md-button class="md-fab md-hue-3 md-mini" aria-label="Ajouter un groupe de variables" ng-click="addGroup($event)">
<md-tooltip md-direction="left">Ajouter un groupe</md-tooltip>
<md-icon md-font-set="material-icons">add</md-icon>
</md-button>
</div>
</md-toolbar>
<div class="toolbar-space"></div>
<div class="col-md-offset-1 col-md-10">
<div ng-repeat="group in groupsData" class="col-md-6">
<div md-whiteframe="4">
<md-toolbar>
<div class="md-toolbar-tools">
<h2 flex md-truncate>{{ group['group'].name }}</h2>
<md-button class="md-icon-button md-fab md-mini md-primary md-hue-3" aria-label="Ajouter une variable" ng-click="addVariable($event, group['group'].uuid)">
<md-tooltip md-direction="left">Ajouter une variable</md-tooltip>
<md-icon md-font-set="material-icons">add</md-icon>
</md-button>
<md-button class="md-icon-button md-fab md-mini md-hue-3" aria-label="Supprimer le groupe" ng-click="deleteGroup($event, group['group'].uuid)">
<md-tooltip md-direction="right">Supprimer le groupe</md-tooltip>
<md-icon md-font-set="material-icons">remove</md-icon>
</md-button>
</div>
</md-toolbar>
<md-content>
<md-list>
<md-list-item class="md-3-line" ng-repeat="variable in group['variables']">
<md-icon class="material-icons md-avatar">{{ getTypeIcon(variable.type_class) }}</md-icon>
<div class="md-list-item-text" layout="column">
<h3>{{ variable.name }}</h3>
<h4>{{ getTypeClass(variable.type_class) }}</h4>
<p><strong>Valeur: </strong> {{ variable.value }}</p>
</div>
<md-menu class="md-secondary">
<md-button class="md-icon-button md-mini">
<md-tooltip md-direction="left">Menu</md-tooltip>
<md-icon md-font-set="material-icons">menu</md-icon>
</md-button>
<md-menu-content>
<md-menu-item>
<md-button ng-click="editVariable($event, variable)">Modifier valeur</md-button>
</md-menu-item>
<md-menu-item>
<md-button ng-click="deleteVariable($event, variable.uuid)">Supprimer</md-button>
</md-menu-item>
</md-menu-content>
</md-menu>
</md-list-item>
</md-list>
</md-content>
</div><br />
</div>
</div>
<div ng-include="'/static/js/partials/menu.html'"></div> | {
"content_hash": "3357a71808e8be4bd9874aa6bb1e9539",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 175,
"avg_line_length": 51.44444444444444,
"alnum_prop": 0.4742363468065412,
"repo_name": "Exanis/cannelloni",
"id": "c6de80768c7dc6d8c8af04fee3cb18f0a62d456a",
"size": "3241",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "frontend/static/js/partials/variables.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "105"
},
{
"name": "CSS",
"bytes": "663"
},
{
"name": "HTML",
"bytes": "35557"
},
{
"name": "JavaScript",
"bytes": "39704"
},
{
"name": "Python",
"bytes": "69684"
},
{
"name": "Shell",
"bytes": "72"
}
],
"symlink_target": ""
} |
export default function foo () {
console.log( 'indented with spaces' );
}
| {
"content_hash": "c6ae69fba88792660b2300ed25154a11",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 40,
"avg_line_length": 25.333333333333332,
"alnum_prop": 0.6842105263157895,
"repo_name": "Permutatrix/rollup",
"id": "20f79c77370491d9f1083e36998ff9bb117f672f",
"size": "76",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "test/form/samples/indent-true-spaces/main.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "630872"
}
],
"symlink_target": ""
} |
<?php
/**
* Reference Manager
* @author Jake Josol
* @description Determines the references used by the app
*/
require_once __DIR__."/../vendor/autoload.php";
/****************************************
BASE - Base reference class
****************************************/
class Reference extends Warp\Core\Reference {}
/****************************************
PATHS - Directory paths
****************************************/
Reference::Path("class", __DIR__."/classes/");
Reference::Path("control", __DIR__."/controls/");
Reference::Path("vendor", __DIR__."/../vendor/");
Reference::Path("model", __DIR__."/../application/build/models/");
Reference::Path("controller", __DIR__."/../application/build/controllers/");
Reference::Path("view", __DIR__."/../application/build/views/");
Reference::Path("configuration", __DIR__."/../application/build/configurations/");
Reference::Path("migration", __DIR__."/../application/build/migrations/");
Reference::Path("route", __DIR__."/../application/build/routes/");
Reference::Path("layout", __DIR__."/../application/design/layouts/");
Reference::Path("page", __DIR__."/../application/design/pages/");
Reference::Path("partial", __DIR__."/../application/design/partials/");
Reference::Path("store", __DIR__."/../application/store/");
Reference::Path("resource", __DIR__."/../resources/");
/****************************************
CLASSES - Register Utility classes
****************************************/
Reference::Register();
/****************************************
VENDORS - Register Third party libraries
****************************************/
//Reference::Vendor("Vendor/autoload");
?> | {
"content_hash": "41f8f2fc6ef26b510a7ac43b319fdf11",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 82,
"avg_line_length": 38.22727272727273,
"alnum_prop": 0.5243757431629013,
"repo_name": "jakejosol/warp-project",
"id": "2d0057aced64533f91f0c97e0871f8a06d583311",
"size": "1682",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "references/references.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "209"
},
{
"name": "CSS",
"bytes": "90682"
},
{
"name": "JavaScript",
"bytes": "87338"
},
{
"name": "PHP",
"bytes": "40982"
}
],
"symlink_target": ""
} |
<?php
namespace PHPExiftool\Driver\Tag\MXF;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class ImageStartOffset extends AbstractTag
{
protected $Id = '060e2b34.0101.0102.04180102.00000000';
protected $Name = 'ImageStartOffset';
protected $FullName = 'MXF::Main';
protected $GroupName = 'MXF';
protected $g0 = 'MXF';
protected $g1 = 'MXF';
protected $g2 = 'Video';
protected $Type = 'int32u';
protected $Writable = false;
protected $Description = 'Image Start Offset';
}
| {
"content_hash": "1f98b6826b3ebc5807ef33da8e793d3a",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 59,
"avg_line_length": 16.63888888888889,
"alnum_prop": 0.671118530884808,
"repo_name": "bburnichon/PHPExiftool",
"id": "0625c08d3856849f5e8550b7141f940ebae6893c",
"size": "823",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/PHPExiftool/Driver/Tag/MXF/ImageStartOffset.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "22076400"
}
],
"symlink_target": ""
} |
module Google.YT {
interface Event {
(event: any): void;
}
export interface Events {
onReady?: Event;
onPlayback?: Event;
onStateChange?: Event;
}
export enum ListType {
search,
user_uploads,
playlist,
}
export interface PlayerVars {
autohide?: number;
autoplay?: number;
cc_load_policy?: any;
color?: string;
controls?: number;
disablekb?: number;
enablejsapi?: number;
end?: number;
fs?: number;
iv_load_policy?: number;
list?: string;
listType?: ListType;
loop?;
modestbranding?: number;
origin?;
playerpiid?: string;
playlist?;
rel?: number;
showinfo?: number;
start?: number;
theme?: string;
}
export interface PlayerOptions {
width: number;
height: number;
videoId: string;
playerVars: PlayerVars;
events: Events;
}
interface LoadVideoByTestId {
videoId: string;
startSeconds: number;
endSeconds: number;
suggestedQuality: string;
}
export interface Player {
// Constructor
new (string, playerOptions:PlayerOptions): any;
// Queueing functions
//loadVideoById:(videoId: string, startSeconds: number, suggestedQuality: string)=> void;
loadVideoById:(LoadVideoByTestId)=> void;
// Properties
size;
// Playing
playVideo: () =>void;
pauseVideo: () =>void;
stopVideo: () =>void;
seekTo: (seconds:number, allowSeekAhead:bool) =>void;
clearVideo: () =>void;
// Playlist
nextVideo: () =>void;
previousVideo: () =>void;
playVideoAt:(index: number) =>void;
// Volume
mute: () =>void;
unMute: () =>void;
isMuted: () =>bool;
setVolume: (volume: number) =>void;
getVolume: () =>number;
// Sizing
setSize: (width: number, height: number) =>any;
// Playback
getPlaybackRate: () =>number;
setPlaybackRate: (suggestedRate:number) =>void;
getAvailablePlaybackRates(): number[];
// Behavior
setLoop: (loopPlaylists: bool) =>void;
setShuffle: (shufflePlaylist: bool) =>void;
// Status
getVideoLoadedFraction: () =>number;
getPlayerState: () =>number;
getCurrentTime:()=> number;
getVideoStartBytes:()=>number;
getVideoBytesLoaded: () =>number;
getVideoBytesTotal: () =>number;
// Information
getDuration: () =>number;
getVideoUrl: () =>string;
getVideoEmbedCode: () =>string;
// Playlist
getPlaylist: () =>any[];
getPlaylistIndex:()=>number;
// Event Listener
addEventListener: (event: string, listener: string) =>void;
}
}
interface YT {
Player: Google.YT.Player;
PlayerState: {
BUFFERING: number;
CUED: number;
ENDED: number;
PAUSED: number;
PLAYING: number;
};
} | {
"content_hash": "f2504fe44fdc13260644c0d4ab5dcd25",
"timestamp": "",
"source": "github",
"line_count": 125,
"max_line_length": 97,
"avg_line_length": 24.568,
"alnum_prop": 0.5525887333116248,
"repo_name": "sonwh98/DefinitelyTyped",
"id": "80562713801a15913bc0c4954abdd802c1c52144",
"size": "3350",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "youtube/youtube.d.ts",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
using System;
using System.Threading;
using System.Threading.Tasks;
using ZptSharp.Dom;
using ZptSharp.Expressions;
using ZptSharp.Metal;
using ZptSharp.Rendering;
namespace ZptSharp.SourceAnnotation
{
/// <summary>
/// An implementation of <see cref="IProcessesExpressionContext"/> which adds
/// source annotation to the DOM where it is applicable to do so.
/// </summary>
public class SourceAnnotationContextProcessor : IProcessesExpressionContext
{
readonly IGetsMetalAttributeSpecs metalSpecProvider;
readonly IGetsAnnotationForNode annotationProvider;
readonly IAddsComment commenter;
/// <summary>
/// Processes the context using the rules defined within this object.
/// </summary>
/// <returns>A result object indicating the outcome of processing.</returns>
/// <param name="context">The context to process.</param>
/// <param name="token">An optional cancellation token.</param>
public Task<ExpressionContextProcessingResult> ProcessContextAsync(ExpressionContext context, CancellationToken token = default)
{
if (context == null)
throw new ArgumentNullException(nameof(context));
var node = context.CurrentNode;
if (context.IsRootContext)
AnnotateRootNode(node);
else if (node.IsImported)
AnnotateImportedNode(node);
else if (HasDefineMacroAttribute(node))
AnnotateDefineMacroNode(node);
else if (HasDefineSlotAttribute(node))
AnnotateDefineSlotNode(node);
return Task.FromResult(ExpressionContextProcessingResult.Noop);
}
void AnnotateRootNode(INode node)
{
var annotation = annotationProvider.GetAnnotation(node, TagType.None);
commenter.AddCommentBefore(node, annotation);
}
void AnnotateDefineMacroNode(INode node)
{
var annotation = annotationProvider.GetAnnotation(node);
commenter.AddCommentBefore(node, annotation);
}
void AnnotateImportedNode(INode node)
{
var beforeAnnotation = annotationProvider.GetAnnotation(node);
commenter.AddCommentBefore(node, beforeAnnotation);
var afterAnnotation = annotationProvider.GetPreReplacementAnnotation(node, TagType.End);
commenter.AddCommentAfter(node, afterAnnotation);
}
void AnnotateDefineSlotNode(INode node)
{
var annotation = annotationProvider.GetAnnotation(node);
commenter.AddCommentAfter(node, annotation);
}
bool HasDefineMacroAttribute(INode node)
=> node.GetMatchingAttribute(metalSpecProvider.DefineMacro) != null;
bool HasDefineSlotAttribute(INode node)
=> node.GetMatchingAttribute(metalSpecProvider.DefineSlot) != null;
/// <summary>
/// Initializes a new instance of the <see cref="SourceAnnotationContextProcessor"/> class.
/// </summary>
/// <param name="metalSpecProvider">METAL spec provider.</param>
/// <param name="annotationProvider">Annotation provider.</param>
/// <param name="commenter">Commenter.</param>
public SourceAnnotationContextProcessor(IGetsMetalAttributeSpecs metalSpecProvider,
IGetsAnnotationForNode annotationProvider,
IAddsComment commenter)
{
this.metalSpecProvider = metalSpecProvider ?? throw new ArgumentNullException(nameof(metalSpecProvider));
this.annotationProvider = annotationProvider ?? throw new ArgumentNullException(nameof(annotationProvider));
this.commenter = commenter ?? throw new ArgumentNullException(nameof(commenter));
}
}
}
| {
"content_hash": "c128ec8293fba06d1b0c8bc4b4f8f735",
"timestamp": "",
"source": "github",
"line_count": 94,
"max_line_length": 136,
"avg_line_length": 41.638297872340424,
"alnum_prop": 0.6563617782319877,
"repo_name": "csf-dev/ZPT-Sharp",
"id": "133bf7050144db145625f5aa9a8225f4a73a05e2",
"size": "3916",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ZptSharp/SourceAnnotation/SourceAnnotationContextProcessor.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "AMPL",
"bytes": "4949"
},
{
"name": "Batchfile",
"bytes": "3142"
},
{
"name": "C#",
"bytes": "1670750"
},
{
"name": "HTML",
"bytes": "146448"
},
{
"name": "PowerShell",
"bytes": "2416"
}
],
"symlink_target": ""
} |
package org.apereo.cas.uma.ticket.rpt;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.OAuth20GrantTypes;
import org.apereo.cas.support.oauth.OAuth20ResponseTypes;
import org.apereo.cas.support.oauth.services.OAuthRegisteredService;
import org.apereo.cas.support.oauth.web.endpoints.OAuth20ConfigurationContext;
import org.apereo.cas.ticket.BaseIdTokenGeneratorService;
import org.apereo.cas.ticket.accesstoken.OAuth20AccessToken;
import org.apereo.cas.uma.ticket.permission.UmaPermissionTicket;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.jose4j.jwt.JwtClaims;
import org.jose4j.jwt.NumericDate;
import org.pac4j.core.context.WebContext;
import org.pac4j.core.profile.UserProfile;
import java.util.ArrayList;
import java.util.UUID;
/**
* This is {@link UmaIdTokenGeneratorService}.
*
* @author Misagh Moayyed
* @since 6.0.0
*/
@Slf4j
public class UmaIdTokenGeneratorService extends BaseIdTokenGeneratorService<OAuth20ConfigurationContext> {
public UmaIdTokenGeneratorService(final OAuth20ConfigurationContext configurationContext) {
super(configurationContext);
}
@Override
public String generate(final WebContext context,
final OAuth20AccessToken accessToken,
final long timeoutInSeconds,
final OAuth20ResponseTypes responseType,
final OAuth20GrantTypes grantType,
final OAuthRegisteredService registeredService) {
LOGGER.debug("Attempting to produce claims for the rpt access token [{}]", accessToken);
val authenticatedProfile = getAuthenticatedProfile(context);
val claims = buildJwtClaims(accessToken, timeoutInSeconds,
registeredService, authenticatedProfile, context, responseType);
return encodeAndFinalizeToken(claims, registeredService, accessToken);
}
/**
* Build jwt claims jwt claims.
*
* @param accessToken the access token
* @param timeoutInSeconds the timeout in seconds
* @param service the service
* @param profile the profile
* @param context the context
* @param responseType the response type
* @return the jwt claims
*/
protected JwtClaims buildJwtClaims(final OAuth20AccessToken accessToken,
final long timeoutInSeconds,
final OAuthRegisteredService service,
final UserProfile profile,
final WebContext context,
final OAuth20ResponseTypes responseType) {
val permissionTicket = (UmaPermissionTicket) context.getRequestAttribute(UmaPermissionTicket.class.getName()).orElse(null);
val claims = new JwtClaims();
claims.setJwtId(UUID.randomUUID().toString());
claims.setIssuer(getConfigurationContext().getCasProperties().getAuthn().getOauth().getUma().getCore().getIssuer());
claims.setAudience(String.valueOf(permissionTicket.getResourceSet().getId()));
val expirationDate = NumericDate.now();
expirationDate.addSeconds(timeoutInSeconds);
claims.setExpirationTime(expirationDate);
claims.setIssuedAtToNow();
claims.setSubject(profile.getId());
permissionTicket.getClaims().forEach((k, v) -> claims.setStringListClaim(k, v.toString()));
claims.setStringListClaim(OAuth20Constants.SCOPE, new ArrayList<>(permissionTicket.getScopes()));
claims.setStringListClaim(OAuth20Constants.CLIENT_ID, service.getClientId());
return claims;
}
}
| {
"content_hash": "398b0226d70d6822e9d76d5384c5c7c1",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 131,
"avg_line_length": 44.54761904761905,
"alnum_prop": 0.6892036344200962,
"repo_name": "rkorn86/cas",
"id": "06a36d630ec7b9833ee0aff0a7929844b3ea0d5c",
"size": "3742",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "support/cas-server-support-oauth-uma-core/src/main/java/org/apereo/cas/uma/ticket/rpt/UmaIdTokenGeneratorService.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "241382"
},
{
"name": "Dockerfile",
"bytes": "647"
},
{
"name": "Groovy",
"bytes": "11888"
},
{
"name": "HTML",
"bytes": "145069"
},
{
"name": "Java",
"bytes": "9657912"
},
{
"name": "JavaScript",
"bytes": "36972"
},
{
"name": "Shell",
"bytes": "106049"
}
],
"symlink_target": ""
} |
package org.jboss.logmanager;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import java.util.logging.Filter;
import java.util.logging.Handler;
import java.util.logging.Level;
/**
* A node in the tree of logger names. Maintains weak references to children and a strong reference to its parent.
*/
final class LoggerNode {
/**
* The log context.
*/
private final LogContext context;
/**
* The parent node, or {@code null} if this is the root logger node.
*/
private final LoggerNode parent;
/**
* The fully-qualified name of this logger.
*/
private final String fullName;
/**
* The map of names to child nodes. The child node references are weak.
*/
private final ConcurrentMap<String, LoggerNode> children;
/**
* The handlers for this logger. May only be updated using the {@link #handlersUpdater} atomic updater. The array
* instance should not be modified (treat as immutable).
*/
@SuppressWarnings({ "UnusedDeclaration" })
private volatile Handler[] handlers;
/**
* Flag to specify whether parent handlers are used.
*/
private volatile boolean useParentHandlers = true;
/**
* The filter for this logger instance.
*/
private volatile Filter filter;
/**
* The attachments map.
*/
private volatile Map<Logger.AttachmentKey, Object> attachments = Collections.emptyMap();
/**
* The atomic updater for the {@link #handlers} field.
*/
private static final AtomicArray<LoggerNode, Handler> handlersUpdater = AtomicArray.create(AtomicReferenceFieldUpdater.newUpdater(LoggerNode.class, Handler[].class, "handlers"), Handler.class);
/**
* The atomic updater for the {@link #attachments} field.
*/
private static final AtomicReferenceFieldUpdater<LoggerNode, Map> attachmentsUpdater = AtomicReferenceFieldUpdater.newUpdater(LoggerNode.class, Map.class, "attachments");
/**
* The actual level. May only be modified when the context's level change lock is held; in addition, changing
* this field must be followed immediately by recursively updating the effective loglevel of the child tree.
*/
private volatile java.util.logging.Level level;
/**
* The effective level. May only be modified when the context's level change lock is held; in addition, changing
* this field must be followed immediately by recursively updating the effective loglevel of the child tree.
*/
private volatile int effectiveLevel = Logger.INFO_INT;
/**
* Construct a new root instance.
*
* @param context the logmanager
*/
LoggerNode(final LogContext context) {
parent = null;
fullName = "";
handlersUpdater.clear(this);
this.context = context;
children = context.createChildMap();
}
/**
* Construct a child instance.
*
* @param context the logmanager
* @param parent the parent node
* @param nodeName the name of this subnode
*/
private LoggerNode(LogContext context, LoggerNode parent, String nodeName) {
nodeName = nodeName.trim();
if (nodeName.length() == 0 && parent == null) {
throw new IllegalArgumentException("nodeName is empty, or just whitespace and has no parent");
}
this.parent = parent;
handlersUpdater.clear(this);
if (parent.parent == null) {
if (nodeName.isEmpty()) {
fullName = ".";
} else {
fullName = nodeName;
}
} else {
fullName = parent.fullName + "." + nodeName;
}
this.context = context;
effectiveLevel = parent.effectiveLevel;
children = context.createChildMap();
}
/**
* Get or create a relative logger node. The name is relatively qualified to this node.
*
* @param name the name
* @return the corresponding logger node
*/
LoggerNode getOrCreate(final String name) {
if (name == null || name.length() == 0) {
return this;
} else {
int i = name.indexOf('.');
final String nextName = i == -1 ? name : name.substring(0, i);
LoggerNode nextNode = children.get(nextName);
if (nextNode == null) {
nextNode = new LoggerNode(context, this, nextName);
LoggerNode appearingNode = children.putIfAbsent(nextName, nextNode);
if (appearingNode != null) {
nextNode = appearingNode;
}
}
if (i == -1) {
return nextNode;
} else {
return nextNode.getOrCreate(name.substring(i + 1));
}
}
}
/**
* Get a relative logger, if it exists.
*
* @param name the name
* @return the corresponding logger
*/
LoggerNode getIfExists(final String name) {
if (name == null || name.length() == 0) {
return this;
} else {
int i = name.indexOf('.');
final String nextName = i == -1 ? name : name.substring(0, i);
LoggerNode nextNode = children.get(nextName);
if (nextNode == null) {
return null;
}
if (i == -1) {
return nextNode;
} else {
return nextNode.getIfExists(name.substring(i + 1));
}
}
}
Logger createLogger() {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
return AccessController.doPrivileged(new PrivilegedAction<Logger>() {
public Logger run() {
final Logger logger = new Logger(LoggerNode.this, fullName);
context.incrementRef(fullName);
return logger;
}
});
} else {
final Logger logger = new Logger(this, fullName);
context.incrementRef(fullName);
return logger;
}
}
/**
* Removes one from the reference count.
*/
void decrementRef() {
context.decrementRef(fullName);
}
/**
* Get the children of this logger.
*
* @return the children
*/
Collection<LoggerNode> getChildren() {
return children.values();
}
/**
* Get the log context.
*
* @return the log context
*/
LogContext getContext() {
return context;
}
/**
* Update the effective level if it is inherited from a parent. Must only be called while the logmanager's level
* change lock is held.
*
* @param newLevel the new effective level
*/
void setEffectiveLevel(int newLevel) {
if (level == null) {
effectiveLevel = newLevel;
for (LoggerNode node : children.values()) {
if (node != null) {
node.setEffectiveLevel(newLevel);
}
}
}
}
void setFilter(final Filter filter) {
this.filter = filter;
}
Filter getFilter() {
return filter;
}
int getEffectiveLevel() {
return effectiveLevel;
}
Handler[] getHandlers() {
return handlers;
}
Handler[] clearHandlers() {
final Handler[] handlers = this.handlers;
handlersUpdater.clear(this);
return handlers.length > 0 ? handlers.clone() : handlers;
}
void removeHandler(final Handler handler) {
handlersUpdater.remove(this, handler, true);
}
void addHandler(final Handler handler) {
handlersUpdater.add(this, handler);
}
Handler[] setHandlers(final Handler[] handlers) {
return handlersUpdater.getAndSet(this, handlers);
}
boolean compareAndSetHandlers(final Handler[] oldHandlers, final Handler[] newHandlers) {
return handlersUpdater.compareAndSet(this, oldHandlers, newHandlers);
}
boolean getUseParentHandlers() {
return useParentHandlers;
}
void setUseParentHandlers(final boolean useParentHandlers) {
this.useParentHandlers = useParentHandlers;
}
void publish(final ExtLogRecord record) {
for (Handler handler : handlers) try {
handler.publish(record);
} catch (VirtualMachineError e) {
throw e;
} catch (Throwable t) {
// todo - error handler
}
if (useParentHandlers) {
final LoggerNode parent = this.parent;
if (parent != null) parent.publish(record);
}
}
void setLevel(final Level newLevel) {
final LogContext context = this.context;
final Object lock = context.treeLock;
synchronized (lock) {
final int oldEffectiveLevel = effectiveLevel;
final int newEffectiveLevel;
if (newLevel != null) {
level = newLevel;
newEffectiveLevel = newLevel.intValue();
} else {
final LoggerNode parent = this.parent;
if (parent == null) {
level = Level.INFO;
newEffectiveLevel = Logger.INFO_INT;
} else {
level = null;
newEffectiveLevel = parent.effectiveLevel;
}
}
effectiveLevel = newEffectiveLevel;
if (oldEffectiveLevel != newEffectiveLevel) {
// our level changed, recurse down to children
for (LoggerNode node : children.values()) {
if (node != null) {
node.setEffectiveLevel(newEffectiveLevel);
}
}
}
}
}
Level getLevel() {
return level;
}
@SuppressWarnings({ "unchecked" })
<V> V getAttachment(final Logger.AttachmentKey<V> key) {
if (key == null) {
throw new NullPointerException("key is null");
}
final Map<Logger.AttachmentKey, Object> attachments = this.attachments;
return (V) attachments.get(key);
}
@SuppressWarnings({ "unchecked" })
<V> V attach(final Logger.AttachmentKey<V> key, final V value) {
if (key == null) {
throw new NullPointerException("key is null");
}
if (value == null) {
throw new NullPointerException("value is null");
}
Map<Logger.AttachmentKey, Object> oldAttachments;
Map<Logger.AttachmentKey, Object> newAttachments;
V old;
do {
oldAttachments = attachments;
if (oldAttachments.isEmpty() || oldAttachments.size() == 1 && oldAttachments.containsKey(key)) {
old = (V) oldAttachments.get(key);
newAttachments = Collections.<Logger.AttachmentKey, Object>singletonMap(key, value);
} else {
newAttachments = new HashMap<Logger.AttachmentKey, Object>(oldAttachments);
old = (V) newAttachments.put(key, value);
}
} while (! attachmentsUpdater.compareAndSet(this, oldAttachments, newAttachments));
return old;
}
@SuppressWarnings({ "unchecked" })
<V> V attachIfAbsent(final Logger.AttachmentKey<V> key, final V value) {
if (key == null) {
throw new NullPointerException("key is null");
}
if (value == null) {
throw new NullPointerException("value is null");
}
Map<Logger.AttachmentKey, Object> oldAttachments;
Map<Logger.AttachmentKey, Object> newAttachments;
do {
oldAttachments = attachments;
if (oldAttachments.isEmpty()) {
newAttachments = Collections.<Logger.AttachmentKey, Object>singletonMap(key, value);
} else {
if (oldAttachments.containsKey(key)) {
return (V) oldAttachments.get(key);
}
newAttachments = new HashMap<Logger.AttachmentKey, Object>(oldAttachments);
newAttachments.put(key, value);
}
} while (! attachmentsUpdater.compareAndSet(this, oldAttachments, newAttachments));
return null;
}
@SuppressWarnings({ "unchecked" })
public <V> V detach(final Logger.AttachmentKey<V> key) {
if (key == null) {
throw new NullPointerException("key is null");
}
Map<Logger.AttachmentKey, Object> oldAttachments;
Map<Logger.AttachmentKey, Object> newAttachments;
V result;
do {
oldAttachments = attachments;
result = (V) oldAttachments.get(key);
if (result == null) {
return null;
}
final int size = oldAttachments.size();
if (size == 1) {
// special case - the new map is empty
newAttachments = Collections.emptyMap();
} else if (size == 2) {
// special case - the new map is a singleton
final Iterator<Map.Entry<Logger.AttachmentKey,Object>> it = oldAttachments.entrySet().iterator();
// find the entry that we are not removing
Map.Entry<Logger.AttachmentKey, Object> entry = it.next();
if (entry.getKey() == key) {
// must be the next one
entry = it.next();
}
newAttachments = Collections.singletonMap(entry.getKey(), entry.getValue());
} else {
newAttachments = new HashMap<Logger.AttachmentKey, Object>(oldAttachments);
}
} while (! attachmentsUpdater.compareAndSet(this, oldAttachments, newAttachments));
return result;
}
String getFullName() {
return fullName;
}
LoggerNode getParent() {
return parent;
}
// GC
/**
* Perform finalization actions. This amounts to clearing out the loglevel so that all children are updated
* with the parent's effective loglevel. As such, a lock is acquired from this method which might cause delays in
* garbage collection.
*/
protected void finalize() throws Throwable {
try {
// clear out level so that it spams out to all children
setLevel(null);
} finally {
super.finalize();
}
}
}
| {
"content_hash": "78050da4f26288c0f9347a36be9cb42e",
"timestamp": "",
"source": "github",
"line_count": 448,
"max_line_length": 197,
"avg_line_length": 32.966517857142854,
"alnum_prop": 0.5764777574649604,
"repo_name": "doctau/jboss-logmanager",
"id": "6207e40db0a80eef322dc117cd6f33055df26e9d",
"size": "15478",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/java/org/jboss/logmanager/LoggerNode.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package org.apache.kafka.streams.state;
import java.util.Objects;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.streams.KafkaStreams;
import java.util.Collections;
import java.util.Set;
/**
* Represents the state of an instance (process) in a {@link KafkaStreams} application.
* It contains the user supplied {@link HostInfo} that can be used by developers to build
* APIs and services to connect to other instances, the Set of state stores available on
* the instance and the Set of {@link TopicPartition}s available on the instance.
* NOTE: This is a point in time view. It may change when rebalances happen.
*/
public class StreamsMetadata {
/**
* Sentinel to indicate that the StreamsMetadata is currently unavailable. This can occur during rebalance
* operations.
*/
public final static StreamsMetadata NOT_AVAILABLE = new StreamsMetadata(HostInfo.unavailable(),
Collections.emptySet(),
Collections.emptySet(),
Collections.emptySet(),
Collections.emptySet());
private final HostInfo hostInfo;
private final Set<String> stateStoreNames;
private final Set<TopicPartition> topicPartitions;
private final Set<String> standbyStateStoreNames;
private final Set<TopicPartition> standbyTopicPartitions;
public StreamsMetadata(final HostInfo hostInfo,
final Set<String> stateStoreNames,
final Set<TopicPartition> topicPartitions,
final Set<String> standbyStateStoreNames,
final Set<TopicPartition> standbyTopicPartitions) {
this.hostInfo = hostInfo;
this.stateStoreNames = stateStoreNames;
this.topicPartitions = topicPartitions;
this.standbyTopicPartitions = standbyTopicPartitions;
this.standbyStateStoreNames = standbyStateStoreNames;
}
/**
* The value of {@link org.apache.kafka.streams.StreamsConfig#APPLICATION_SERVER_CONFIG} configured for the streams
* instance, which is typically host/port
*
* @return {@link HostInfo} corresponding to the streams instance
*/
public HostInfo hostInfo() {
return hostInfo;
}
/**
* State stores owned by the instance as an active replica
*
* @return set of active state store names
*/
public Set<String> stateStoreNames() {
return Collections.unmodifiableSet(stateStoreNames);
}
/**
* Topic partitions consumed by the instance as an active replica
*
* @return set of active topic partitions
*/
public Set<TopicPartition> topicPartitions() {
return Collections.unmodifiableSet(topicPartitions);
}
/**
* (Source) Topic partitions for which the instance acts as standby.
*
* @return set of standby topic partitions
*/
public Set<TopicPartition> standbyTopicPartitions() {
return Collections.unmodifiableSet(standbyTopicPartitions);
}
/**
* State stores owned by the instance as a standby replica
*
* @return set of standby state store names
*/
public Set<String> standbyStateStoreNames() {
return Collections.unmodifiableSet(standbyStateStoreNames);
}
public String host() {
return hostInfo.host();
}
@SuppressWarnings("unused")
public int port() {
return hostInfo.port();
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final StreamsMetadata that = (StreamsMetadata) o;
return Objects.equals(hostInfo, that.hostInfo)
&& Objects.equals(stateStoreNames, that.stateStoreNames)
&& Objects.equals(topicPartitions, that.topicPartitions)
&& Objects.equals(standbyStateStoreNames, that.standbyStateStoreNames)
&& Objects.equals(standbyTopicPartitions, that.standbyTopicPartitions);
}
@Override
public int hashCode() {
return Objects.hash(hostInfo, stateStoreNames, topicPartitions, standbyStateStoreNames, standbyTopicPartitions);
}
@Override
public String toString() {
return "StreamsMetadata {" +
"hostInfo=" + hostInfo +
", stateStoreNames=" + stateStoreNames +
", topicPartitions=" + topicPartitions +
", standbyStateStoreNames=" + standbyStateStoreNames +
", standbyTopicPartitions=" + standbyTopicPartitions +
'}';
}
}
| {
"content_hash": "d03544ee9ad5b6db80888af3bcec1233",
"timestamp": "",
"source": "github",
"line_count": 139,
"max_line_length": 120,
"avg_line_length": 35.37410071942446,
"alnum_prop": 0.6223306894447834,
"repo_name": "sslavic/kafka",
"id": "1715cf4d3e0dd7a5bf0350bec8c78f5ad42ae9c3",
"size": "5715",
"binary": false,
"copies": "2",
"ref": "refs/heads/trunk",
"path": "streams/src/main/java/org/apache/kafka/streams/state/StreamsMetadata.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "26633"
},
{
"name": "Dockerfile",
"bytes": "5117"
},
{
"name": "HTML",
"bytes": "3739"
},
{
"name": "Java",
"bytes": "14966996"
},
{
"name": "Python",
"bytes": "802091"
},
{
"name": "Scala",
"bytes": "5802403"
},
{
"name": "Shell",
"bytes": "94955"
},
{
"name": "XSLT",
"bytes": "7116"
}
],
"symlink_target": ""
} |
<?php namespace Icy\User;
/**
* Created by PhpStorm.
* User: Chad
* Date: 9/20/2014
* Time: 5:18 PM
*/
class AuthToken extends \Eloquent {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'auth_tokens';
protected $guarded = ['id'];
public function user()
{
return $this->belongsTo('Icy\User\User');
}
} | {
"content_hash": "ddfceb264661fc246a07fd89be21501d",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 43,
"avg_line_length": 14.44,
"alnum_prop": 0.6149584487534626,
"repo_name": "Supericy/steam-website",
"id": "fe4544821841b1dea2b313b0bce60ee86a9fbc8a",
"size": "361",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/lib/Icy/User/AuthToken.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "19831"
},
{
"name": "JavaScript",
"bytes": "62526"
},
{
"name": "PHP",
"bytes": "249144"
}
],
"symlink_target": ""
} |
using UnityEngine;
using System.Collections;
public class CheeseDestroyer : MonoBehaviour {
// Use this for initialization
void Start () {
Destroy (gameObject, 3f);
}
// Update is called once per frame
void Update () {
}
}
| {
"content_hash": "5edcd911dacfa59e1f359039d6642ce0",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 46,
"avg_line_length": 15.866666666666667,
"alnum_prop": 0.6932773109243697,
"repo_name": "vsawyer/TeamZodiac",
"id": "abf606bbbcec32a6414ffc8b37770b76da1ae3a7",
"size": "240",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Simple-Track/Assets/Scripts/CheeseDestroyer.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "529136"
},
{
"name": "GLSL",
"bytes": "69043"
},
{
"name": "JavaScript",
"bytes": "478512"
}
],
"symlink_target": ""
} |
namespace data_decoder {
namespace {
class FileDataSource final : public mojom::BundleDataSource {
public:
FileDataSource(mojo::PendingReceiver<mojom::BundleDataSource> receiver,
base::File file)
: receiver_(this, std::move(receiver)), file_(std::move(file)) {
receiver_.set_disconnect_handler(base::BindOnce(
&base::DeletePointer<FileDataSource>, base::Unretained(this)));
}
private:
// Implements mojom::BundleDataSource.
void Read(uint64_t offset, uint64_t length, ReadCallback callback) override {
std::vector<uint8_t> buf(length);
int bytes = file_.Read(offset, reinterpret_cast<char*>(buf.data()), length);
if (bytes > 0) {
buf.resize(bytes);
std::move(callback).Run(std::move(buf));
} else {
std::move(callback).Run(base::nullopt);
}
}
mojo::Receiver<mojom::BundleDataSource> receiver_;
base::File file_;
DISALLOW_COPY_AND_ASSIGN(FileDataSource);
};
} // namespace
WebBundleParserFactory::WebBundleParserFactory() = default;
WebBundleParserFactory::~WebBundleParserFactory() = default;
std::unique_ptr<mojom::BundleDataSource>
WebBundleParserFactory::CreateFileDataSourceForTesting(
mojo::PendingReceiver<mojom::BundleDataSource> receiver,
base::File file) {
return std::make_unique<FileDataSource>(std::move(receiver), std::move(file));
}
void WebBundleParserFactory::GetParserForFile(
mojo::PendingReceiver<mojom::WebBundleParser> receiver,
base::File file) {
mojo::PendingRemote<mojom::BundleDataSource> remote_data_source;
auto data_source = std::make_unique<FileDataSource>(
remote_data_source.InitWithNewPipeAndPassReceiver(), std::move(file));
GetParserForDataSource(std::move(receiver), std::move(remote_data_source));
// |data_source| will be destructed on |remote_data_source| destruction.
data_source.release();
}
void WebBundleParserFactory::GetParserForDataSource(
mojo::PendingReceiver<mojom::WebBundleParser> receiver,
mojo::PendingRemote<mojom::BundleDataSource> data_source) {
auto parser = std::make_unique<WebBundleParser>(std::move(receiver),
std::move(data_source));
// |parser| will be destructed on remote mojo ends' disconnection.
parser.release();
}
} // namespace data_decoder
| {
"content_hash": "db90573f3ef6328d751f2df5465e8b4b",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 80,
"avg_line_length": 34.044117647058826,
"alnum_prop": 0.7071274298056156,
"repo_name": "endlessm/chromium-browser",
"id": "1ead65ea90c00d9eedae17bf606290fab0b53146",
"size": "2705",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "services/data_decoder/web_bundle_parser_factory.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
base_path = ../../..
include ../../Makefile.in
#Path for SunOS
ifeq ($(findstring SunOS, $(UNIXNAME)), SunOS)
EXTLIBS = -liconv
endif
ifeq ($(findstring FreeBSD, $(UNIXNAME)), FreeBSD)
EXTLIBS = -L/usr/local/lib -liconv
endif
ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin)
EXTLIBS += -L/usr/lib -liconv
endif
PROG = mail_builder
| {
"content_hash": "632a9a12508af0d6063d42a6d9122c94",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 50,
"avg_line_length": 25.692307692307693,
"alnum_prop": 0.6796407185628742,
"repo_name": "hankwing/Squirrel",
"id": "990e83f43a6c37531b27662bfaa14693cf38a090",
"size": "334",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "library/acl/lib_acl_cpp/samples/mime/mail_build/Makefile",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "13229278"
},
{
"name": "C++",
"bytes": "9491127"
},
{
"name": "HTML",
"bytes": "3722579"
},
{
"name": "Inno Setup",
"bytes": "2119"
},
{
"name": "Makefile",
"bytes": "759750"
},
{
"name": "Objective-C",
"bytes": "445312"
},
{
"name": "Perl",
"bytes": "2134"
},
{
"name": "Protocol Buffer",
"bytes": "36933"
},
{
"name": "Roff",
"bytes": "46897"
},
{
"name": "Shell",
"bytes": "53138"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>async-test: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.8.1 / async-test - 0.1.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
async-test
<small>
0.1.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-09-18 16:51:43 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-09-18 16:51:43 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.8.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.5 A library manager for OCaml
# opam file:
opam-version: "2.0"
synopsis: "Testing asynchronous system"
description: "From interaction trees to asynchronous tests."
maintainer: "Yishuai Li <yishuai@cis.upenn.edu>"
authors: "Yishuai Li <yishuai@cis.upenn.edu>"
license: "MPL-2.0"
tags: [
"category:Miscellaneous/Extracted Programs/Decision procedures"
"keyword:extraction"
"keyword:reactive systems"
"logpath:AsyncTest"
]
homepage: "https://github.com/liyishuai/coq-async-test"
bug-reports: "https://github.com/liyishuai/coq-async-test/issues"
depends: [
"coq" {>= "8.14~"}
"coq-json" {>= "0.1.1"}
"coq-itree-io" {>= "0.1.0"}
"coq-quickchick" {>= "1.6.3"}
]
build: [make "-j%{jobs}%"]
run-test: [make "-j%{jobs}%" "test"]
install: [make "install"]
dev-repo: "git+https://github.com/liyishuai/coq-async-test.git"
url {
src: "https://github.com/liyishuai/coq-async-test/archive/v0.1.0.tar.gz"
checksum: [
"md5=11edde75a469675be08ab7cf55ccb415"
"sha512=e92a2d160f43050f6a2084de199c537750db3bbe0c7005de7043f528a077f0948c0cfffff712d5f8ccb3573705a4bc77c4de6a534a7cb42292346adb976a3b0e"
]
}</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-async-test.0.1.0 coq.8.8.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.8.1).
The following dependencies couldn't be met:
- coq-async-test -> coq >= 8.14~ -> ocaml >= 4.09.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-async-test.0.1.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| {
"content_hash": "4dadd652b677b95136cc7a444b03e3cd",
"timestamp": "",
"source": "github",
"line_count": 172,
"max_line_length": 159,
"avg_line_length": 41.52325581395349,
"alnum_prop": 0.5478857462895548,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "0e8b2f418f025c3b7d252b161661f1085b7ae7e0",
"size": "7167",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.07.1-2.0.6/released/8.8.1/async-test/0.1.0.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
class AcDbVertexRef;
class AcDbAssocArrayParameters;
/// <summary><para>
/// AcDbAssocArrayActionBody class is an associative action which evaluates
/// to manage or position array items. This class in general manages assoc
/// dependencies on various objects related to associative array entity.
/// </para><para>
/// Array enity is generally represented as block reference enity, which
/// references array block table record (array BTR). Array BTR contains a list
/// of entities to represent items in the array. By default this class
/// represents an array item as an instance of AcDbBlocReference referencing a
/// the source block table record (source BTR) positioned at item transform.
/// </para><para>
/// Derived classes may override array items and may choose to represent them
/// differently.
/// </para></summary>
/// <remarks> Deriving from this class is not supported. </remarks>
///
class ACDB_PORT AcDbAssocArrayActionBody : public AcDbAssocParamBasedActionBody
{
public:
ACRX_DECLARE_MEMBERS(AcDbAssocArrayActionBody);
/// <summary> Default constructor. </summary>
/// <param name="createImpObject"> See AcDbAssocCreateImpObject. </param>
///
explicit AcDbAssocArrayActionBody(AcDbAssocCreateImpObject createImpObject = kAcDbAssocCreateImpObject);
/// <summary> Destructor. </summary>
///
virtual ~AcDbAssocArrayActionBody();
/// <summary> Obtains parameters for read. This object must be opened
/// at least for read. This method will get invoked only if it is called
/// on const AcDbAssocArrayActionBody object. </summary>
/// <returns> Pointer to AcDbAssocArrayParameters. </returns>
///
const AcDbAssocArrayParameters* parameters() const;
/// <summary> Obtains parameters for write. This object must be opened
/// at least for write. </summary>
/// <returns> Pointer to AcDbAssocArrayParameters. </returns>
///
AcDbAssocArrayParameters* parameters();
/// <summary> Marks the item at given index for erase/unerase. The item at
/// given index goes to hidden state, when marked erased. </summary>
/// <param name="index"> The input spatial index. </param>
/// <param name="bErase"> The input flag, whether erase or unerase.</param>
/// <returns> Acad::ErrorStatus </returns>
///
Acad::ErrorStatus deleteItem(const AcDbItemLocator& index, bool bErase = true);
/// <summary> Applies a relative transform to an item at given index and
/// this transform is remembered by the action body. So when this action
/// reconfigures all its items, the effect of this additional transform
/// will be still be present to the item at given index.
/// </summary>
/// <param name="index"> The input spatial index. </param>
/// <param name="xform"> The input transformation. </param>
/// <returns> Acad::ErrorStatus </returns>
///
Acad::ErrorStatus transformItemBy(const AcDbItemLocator& index, const AcGeMatrix3d& xform);
/// <summary> Gets indices of all the items owned by this array.</summary>
/// <param name="indices"> The output list of spatial indices. </param>
/// <param name="skipErased"> The input flag, whether to skip erased items.
/// </param>
void getItems(AcArray<AcDbItemLocator>& indices, bool skipErased = true) const;
/// <summary> Obtains array item at given index as well as subent path of
/// the item. </summary>
/// <param name="index"> The input spatial index. </param>
/// <param name="path"> Returned subent path of item at given index. </param>
/// <returns> Pointer to AcDbAssocArrayItem at given index, NULL if item is
/// not available at given index. </returns>
/// <remarks> Subent type for the returned path is AcDb::kClassSubentType,
/// to represent array item. </remarks>
///
const AcDbAssocArrayItem* getItemAt(const AcDbItemLocator& index, AcDbFullSubentPath& path) const;
inline const AcDbAssocArrayItem* getItemAt(const AcDbItemLocator& index) const
{
AcDbFullSubentPath path = AcDbFullSubentPath();
return getItemAt(index, path);
}
/// <summary> Obtains array item at given subent path of the array.
/// </summary>
/// <param name="path"> The input subent path of the array. </param>
/// <returns> Pointer to AcDbAssocArrayItem at given path, NULL if item is
/// not available at given path. </returns>
/// <remarks> The input subent path must point to an entity to locate the
/// array item properly. </remarks>
///
const AcDbAssocArrayItem* getItemAt(const AcDbFullSubentPath& path) const;
/// <summary> Implements evaluation logic for this action. This method is
/// called by Associative Framework when the owning network is getting
/// evaluated and this action needs to be evaluated. </summary>
///
virtual void evaluateOverride();
/// <summary> Obtains object id of the associative array controlled by this
/// action. </summary>
/// <returns> AcDbObjectId of the array entity. </returns>
///
virtual AcDbObjectId getArrayEntity() const;
/// <summary> <para> An item in an associative array can be controlled
/// either by the action which has created it or by another action which
/// modifies this item. </para><para>
/// This method checks whether the given item is controlled by this
/// action. This method returns false in two condition if the index is out
/// of range or this action is a modification action and doesn't modify
/// the given item. </para></summary>
/// <param name="index"> The input spatial index. </param>
/// <returns> true, if the item is controlled by this action. </returns>
///
virtual bool controlsItem(const AcDbAssocArrayItem& index) const;
/// <summary> Transforms the array group/entity by given transform.
/// </summary>
/// <param name="xform"> The input transform. </param>
/// <returns> Acad::ErrorStatus </returns>
///
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
/// <summary> Returns transformation matrix applied to the array group
/// or entity. </summary>
/// <returns> AcGeMatrix3d. </returns>
///
virtual AcGeMatrix3d getTransform() const;
//Methods related to source entities.
/// <summary> Obtains list of source entities for this action. </summary>
/// <returns> List of source entities used by the action. </returns>
///
AcDbObjectIdArray getSourceEntities() const;
/// <summary> Adds the given entity to the list of source items and updates
/// each item in the array controlled by this action. The added source entity
/// will be sent to hidden locked layer and will be managed by this action.
/// </summary>
/// <param name="entity"> The input entity to add. </param>
/// <param name="basePoint"> The input reference point in WCS. This point
/// will be used as reference to reposition the newly added source entity.
/// </param>
/// <returns> Acad::ErrorStatus. </returns>
///
Acad::ErrorStatus addSourceEntity(AcDbObjectId entity, const AcGePoint3d& basePoint);
/// <summary> Removes the given entity from the list of source items and
/// updates each item in the array controlled by this action. </summary>
/// <param name="entity"> The input entity to remove. </param>
/// <returns> Acad::ErrorStatus. </returns>
///
Acad::ErrorStatus removeSourceEntity(AcDbObjectId entity);
/// <summary> <para>Sets base point for the source objects.
/// Base point is a relative point with respect to source entities using
/// which source entities are transformed in the array pattern.
/// </para><para>
/// Base point can be defined as constant point or a reference point. This
/// point defines grip position on first item (i.e at 0,0,0) in array.
/// This method may change array parameters in order to minimize changes
/// in array object representation.
/// </para><para>
/// </para></summary>
/// <param name="basePoint"> The input base point. </param>
/// <returns> Acad::ErrorStatus. </returns>
///
Acad::ErrorStatus setSourceBasePoint(const AcDbVertexRef& basePoint);
/// <summary> Gets base point definition for the source objects.</summary>
/// <param name="vertexRef"> The output vertex reference point. The point
/// evaluated on vertexRef may not match with the output position of base
/// point, as it is evaluated in the space of source BTR.</param>
/// <param name="position"> The output position for base point. </param>
/// <returns> Acad::ErrorStatus. </returns>
///
Acad::ErrorStatus getSourceBasePoint(AcDbVertexRef& vertexRef, AcGePoint3d& position) const;
//utility methods.
/// <summary> Checks if the given entity is an associative array.
/// </summary>
/// <param name="pEntity"> The input entity. </param>
/// <returns> true, if the input entity is an array. </returns>
///
static bool isAssociativeArray(const AcDbEntity* pEntity);
/// <summary> Obtains creation or modification array action body id
/// controlling the given array item. Passing NULL pItemIndex will return
/// array creation action body. If the given entity is not an associative
/// array, this method will return null object id.
/// </summary>
/// <param name="pEntity"> The input entity. </param>
/// <param name="pItemIndex"> Pointer of array item index. </param>
/// <returns> AcDbObjectId of array action body controlling given array
/// item. </returns>
///
static AcDbObjectId getControllingActionBody(const AcDbEntity* pEntity, const AcDbItemLocator* pItemIndex = NULL);
/// <summary> Extracts array items from the array group as individual items
/// and removes associativity from the arrayed items controlled by
/// array action. It also erases the action. Normally erasing array action
/// will erase all the arrayed items controlled by the action.
/// </summary>
/// <param name="pEntity"> The input entity. </param>
/// <param name="newIds"> The output exploded entity ids. </param>
/// <returns> Acad::ErrorStatus </returns>
///
static Acad::ErrorStatus explode(AcDbEntity* pEntity, AcDbObjectIdArray& newIds);
/// <summary> Removes item override such as position, orientation or
/// object replacement, from the list of given items or all items of an
/// associative array.
/// </summary>
/// <param name="arrayEntityId"> The input object id for array entity.
/// </param>
/// <param name="indices"> The input list of item indices which needs to
/// be reset. This parameter will be ignored if resetAll is true.</param>
/// <param name="resetAll"> The input flag to indicate, whether all items
/// of array needs to be reset.</param>
/// <returns> Acad::ErrorStatus </returns>
///
static Acad::ErrorStatus resetArrayItems(AcDbObjectId arrayEntityId, const AcArray<AcDbItemLocator>& indices, bool resetAll = false);
/// <summary> Obtains list of AcDbItemLocator for given set of subents of
/// an associative array. The subents provided should be subentity of array
/// item.
/// </summary>
/// <param name="subents"> The input list of item subent path. </param>
/// <param name="indices"> The output list of AcDbItemLocator for given
/// list of subents. </param>
/// <returns> Acad::ErrorStatus </returns>
/// <remarks> The input subent path must point to an entity to locate the
/// array item properly. </remarks>
///
static Acad::ErrorStatus getArrayItemLocators(const AcDbFullSubentPathArray& subents, AcArray<AcDbItemLocator>& indices);
/// <summary> <para> Creates associative array action body as well as array
/// entity with given parameters and source entities This method is
/// responsible creating action and attaching appropriate dependencies.
/// </para><para> Caller must evaluate top level network after calling this
/// method. Non-associative array can be created by calling explode method
/// after this action is properly evaluated. </para></summary>
/// <param name="sourceEntites"> The input list of source entities. </param>
/// <param name="basePoint"> The input vertex ref to define base point.
/// Base point is a relative point with respect to source entities using
/// which source entities are transformed in the array pattern.
/// </param>
/// <param name="pParameters"> The input parameters for array. </param>
/// <param name="arrayId"> The returned array object id. </param>
/// <param name="actionBodyId"> The returned array action body id. </param>
/// <returns> Acad::ErrorStatus </returns>
///
static Acad::ErrorStatus createInstance(const AcDbObjectIdArray& sourceEntites, AcDbVertexRef& basePoint, const AcDbAssocArrayParameters* pParameters, AcDbObjectId& arrayId, AcDbObjectId& actionBodyId);
/// <summary> Returns owning block table record for the source items.
/// </summary>
/// <returns> AcDbObjectId of source BTR. </returns>
///
AcDbObjectId getArraySourceBTR() const;
/// <summary>
/// This method is called by associative framework when any of the dependent
/// entity is being cloned. This is override of base class method. See the
/// description of AcDbAssocAction::addMoreObjectsToDeepClone for more info.
/// </summary>
/// <param name="idMap"> The input AcDbIdMapping object.</param>
/// <param name="additionalObjectsToClone"> The input list of AcDbObjectIds
/// to be cloned. </param>
/// <returns> Acad::ErrorStatus </returns>
///
virtual Acad::ErrorStatus addMoreObjectsToDeepCloneOverride(AcDbIdMapping& idMap, AcDbObjectIdArray& additionalObjectsToClone) const;
/// <summary>
/// This method is called by associative framework when any of the dependent
/// entity is being cloned. This is override of base class method. See the
/// description of AcDbAssocAction::postProcessAfterDeepClone for more info.
/// </summary>
/// <param name="idMap"> The input AcDbIdMapping object. </param>
/// <returns> Acad::ErrorStatus </returns>
///
virtual Acad::ErrorStatus postProcessAfterDeepCloneOverride(AcDbIdMapping& idMap);
/// <summary>
/// This function is called to notify the action when a there is a drag
/// operation in progress and some objects the action depends on, either
/// directly or indirectly, are being dragged. This is override of base
/// class method.
/// </summary>
/// <param name="status"> See the AcDb::DragStat enum. </param>
/// <returns> Acad::ErrorStatus </returns>
///
virtual Acad::ErrorStatus dragStatusOverride(const AcDb::DragStat status);
};
| {
"content_hash": "9fa3b0475a077cc3dda9c38c374cb9f4",
"timestamp": "",
"source": "github",
"line_count": 270,
"max_line_length": 204,
"avg_line_length": 55.06666666666667,
"alnum_prop": 0.6916868442292171,
"repo_name": "satya-das/cppparser",
"id": "b31697b3db6cb1e3948c32ddb85ae23a55d44d9c",
"size": "15564",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/e2e/test_master/ObjectArxHeaders/AcDbAssocArrayActionBody.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "3858548"
},
{
"name": "C++",
"bytes": "40366039"
},
{
"name": "CMake",
"bytes": "5653"
},
{
"name": "Lex",
"bytes": "39563"
},
{
"name": "Objective-C",
"bytes": "10345580"
},
{
"name": "Shell",
"bytes": "1365"
},
{
"name": "Yacc",
"bytes": "103019"
}
],
"symlink_target": ""
} |
package org.androidpn.client;
import org.androidpn.demoapp.R;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
/**
* 开机广播
*
* @author lijian
* @date 2016-12-11 下午10:49:59
*/
public class BootCompletedReceiver extends BroadcastReceiver {
private static final String TAG = "BootCompletedReceiver";
@Override
public void onReceive(Context context, Intent intent) {
L.i(TAG, "监听到开机广播");
SharedPreferences pref = context.getSharedPreferences(
Constants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE);
if (pref.getBoolean(Constants.SETTINGS_AUTO_START, true)) {
// 启动服务
ServiceManager serviceManager = new ServiceManager(context);
serviceManager.setNotificationIcon(R.drawable.notification);
serviceManager.startService();
L.i(TAG, "开机自启动推送通知服务");
}
}
}
| {
"content_hash": "bc5d05898c55874f34713acc1477e009",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 63,
"avg_line_length": 27.6875,
"alnum_prop": 0.7629796839729119,
"repo_name": "lijian17/androidpn-client",
"id": "b305d8a4eff0af1088015a4b504a7439672ad9ed",
"size": "942",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "androidpn-client/src/org/androidpn/client/BootCompletedReceiver.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "957"
},
{
"name": "Java",
"bytes": "3790567"
}
],
"symlink_target": ""
} |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.containerservice.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.containerservice.models.OrchestratorVersionProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The list of versions for supported orchestrators. */
@Fluent
public final class OrchestratorVersionProfileListResultInner {
/*
* Id of the orchestrator version profile list result.
*/
@JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
/*
* Name of the orchestrator version profile list result.
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Type of the orchestrator version profile list result.
*/
@JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
/*
* The properties of an orchestrator version profile.
*/
@JsonProperty(value = "properties", required = true)
private OrchestratorVersionProfileProperties innerProperties = new OrchestratorVersionProfileProperties();
/** Creates an instance of OrchestratorVersionProfileListResultInner class. */
public OrchestratorVersionProfileListResultInner() {
}
/**
* Get the id property: Id of the orchestrator version profile list result.
*
* @return the id value.
*/
public String id() {
return this.id;
}
/**
* Get the name property: Name of the orchestrator version profile list result.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Get the type property: Type of the orchestrator version profile list result.
*
* @return the type value.
*/
public String type() {
return this.type;
}
/**
* Get the innerProperties property: The properties of an orchestrator version profile.
*
* @return the innerProperties value.
*/
private OrchestratorVersionProfileProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the orchestrators property: List of orchestrator version profiles.
*
* @return the orchestrators value.
*/
public List<OrchestratorVersionProfile> orchestrators() {
return this.innerProperties() == null ? null : this.innerProperties().orchestrators();
}
/**
* Set the orchestrators property: List of orchestrator version profiles.
*
* @param orchestrators the orchestrators value to set.
* @return the OrchestratorVersionProfileListResultInner object itself.
*/
public OrchestratorVersionProfileListResultInner withOrchestrators(List<OrchestratorVersionProfile> orchestrators) {
if (this.innerProperties() == null) {
this.innerProperties = new OrchestratorVersionProfileProperties();
}
this.innerProperties().withOrchestrators(orchestrators);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (innerProperties() == null) {
throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property innerProperties in model"
+ " OrchestratorVersionProfileListResultInner"));
} else {
innerProperties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(OrchestratorVersionProfileListResultInner.class);
}
| {
"content_hash": "b1ad15372d0426990b43cfa5dc9d53ce",
"timestamp": "",
"source": "github",
"line_count": 121,
"max_line_length": 120,
"avg_line_length": 32.43801652892562,
"alnum_prop": 0.6726114649681528,
"repo_name": "Azure/azure-sdk-for-java",
"id": "a1c64a3fa126d7f6ac8c900ea753bc5ec6941049",
"size": "3925",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OrchestratorVersionProfileListResultInner.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "8762"
},
{
"name": "Bicep",
"bytes": "15055"
},
{
"name": "CSS",
"bytes": "7676"
},
{
"name": "Dockerfile",
"bytes": "2028"
},
{
"name": "Groovy",
"bytes": "3237482"
},
{
"name": "HTML",
"bytes": "42090"
},
{
"name": "Java",
"bytes": "432409546"
},
{
"name": "JavaScript",
"bytes": "36557"
},
{
"name": "Jupyter Notebook",
"bytes": "95868"
},
{
"name": "PowerShell",
"bytes": "737517"
},
{
"name": "Python",
"bytes": "240542"
},
{
"name": "Scala",
"bytes": "1143898"
},
{
"name": "Shell",
"bytes": "18488"
},
{
"name": "XSLT",
"bytes": "755"
}
],
"symlink_target": ""
} |
> *@param* **paths** _{String}_ - field paths
> _@return_ **Object**
Expand a String of field paths into objects
<div class="code-header addGitHubLink" data-file="lib/list/expandPaths.js"><a href="#" class="loadCode">code</a></div><pre class=" language-javascript hideCode api"></pre>
| {
"content_hash": "a3510578bfaee2925cd5f1899221a17e",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 172,
"avg_line_length": 49,
"alnum_prop": 0.6768707482993197,
"repo_name": "snowkeeper/keystonejs-site",
"id": "09db35e4b4d5064c5c05b20ff4ad352b9fcd94e7",
"size": "325",
"binary": false,
"copies": "3",
"ref": "refs/heads/proposal",
"path": "content/en/pages/docs/api/0.4.x/markdown/class/List/expandPaths.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "50719"
},
{
"name": "HTML",
"bytes": "398940"
},
{
"name": "JavaScript",
"bytes": "33392"
}
],
"symlink_target": ""
} |
<?php
namespace app\controllers;
use Yii;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\filters\VerbFilter;
use app\models\ContactForm;
class SiteController extends Controller
{
/**
* @inheritdoc
*/
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'only' => ['logout'],
'rules' => [
[
'actions' => ['logout'],
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
];
}
/**
* @inheritdoc
*/
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
'captcha' => [
'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
],
];
}
/**
* Displays homepage.
*
* @return string
*/
public function actionIndex()
{
return $this->render('index');
}
/**
* Logout action.
*
* @return string
*/
public function actionLogout()
{
Yii::$app->user->logout();
return $this->goHome();
}
/**
* Displays contact page.
*
* @return string
*/
public function actionContact()
{
$model = new ContactForm();
if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {
Yii::$app->session->setFlash('contactFormSubmitted');
return $this->refresh();
}
return $this->render('contact', [
'model' => $model,
]);
}
/**
* Displays about page.
*
* @return string
*/
public function actionAbout()
{
return $this->render('about');
}
public function actionEntry()
{
$model = new \app\models\EntryForm();
if ($model->load(Yii::$app->request->post()) && $model->validate()) {
return $this->render('entry-confirm', ['model' => $model]);
} else {
return $this->render('entry', ['model' => $model]);
}
}
}
| {
"content_hash": "fda61363144ca30a2698cd9e7db54610",
"timestamp": "",
"source": "github",
"line_count": 116,
"max_line_length": 107,
"avg_line_length": 21.75,
"alnum_prop": 0.4276654776060246,
"repo_name": "soniaandrianow/yiitest",
"id": "3b4da3375e5141f0a0ec2f51abec0db8607409fc",
"size": "2523",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "controllers/SiteController.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "200"
},
{
"name": "Batchfile",
"bytes": "1030"
},
{
"name": "CSS",
"bytes": "1842"
},
{
"name": "PHP",
"bytes": "61915"
}
],
"symlink_target": ""
} |
package org.apache.druid.sql.calcite.expression;
import com.google.common.collect.Iterables;
import org.apache.calcite.rex.RexNode;
import org.apache.calcite.sql.SqlOperator;
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.segment.column.RowSignature;
import org.apache.druid.sql.calcite.planner.PlannerContext;
public class UnarySuffixOperatorConversion implements SqlOperatorConversion
{
private final SqlOperator operator;
private final String druidOperator;
public UnarySuffixOperatorConversion(final SqlOperator operator, final String druidOperator)
{
this.operator = operator;
this.druidOperator = druidOperator;
}
@Override
public SqlOperator calciteOperator()
{
return operator;
}
@Override
public DruidExpression toDruidExpression(
final PlannerContext plannerContext,
final RowSignature rowSignature,
final RexNode rexNode
)
{
return OperatorConversions.convertCallBuilder(
plannerContext,
rowSignature,
rexNode,
operands -> StringUtils.format(
"(%s %s)",
Iterables.getOnlyElement(operands).getExpression(),
druidOperator
)
);
}
}
| {
"content_hash": "c085084041a62b9c1862d54df97dec7f",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 94,
"avg_line_length": 25.95744680851064,
"alnum_prop": 0.7327868852459016,
"repo_name": "nishantmonu51/druid",
"id": "8a38fbe9c936532603b54d812bee7860441b40bb",
"size": "2027",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "sql/src/main/java/org/apache/druid/sql/calcite/expression/UnarySuffixOperatorConversion.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "5547"
},
{
"name": "CSS",
"bytes": "3878"
},
{
"name": "Dockerfile",
"bytes": "8937"
},
{
"name": "FreeMarker",
"bytes": "5193"
},
{
"name": "HTML",
"bytes": "2536"
},
{
"name": "Java",
"bytes": "37882426"
},
{
"name": "JavaScript",
"bytes": "61017"
},
{
"name": "Makefile",
"bytes": "659"
},
{
"name": "PostScript",
"bytes": "5"
},
{
"name": "Python",
"bytes": "72969"
},
{
"name": "R",
"bytes": "17002"
},
{
"name": "Roff",
"bytes": "3617"
},
{
"name": "SCSS",
"bytes": "117054"
},
{
"name": "Shell",
"bytes": "87161"
},
{
"name": "Smarty",
"bytes": "3517"
},
{
"name": "Stylus",
"bytes": "7682"
},
{
"name": "TeX",
"bytes": "399468"
},
{
"name": "Thrift",
"bytes": "1003"
},
{
"name": "TypeScript",
"bytes": "1308608"
}
],
"symlink_target": ""
} |
<mat-toolbar color="primary">
<mat-icon (click)="back()" class="arrow-button">arrow_back</mat-icon>
<h1>Add Transaction</h1>
</mat-toolbar>
<form [formGroup]="transaction" (ngSubmit)="addTransaction()">
<mat-list>
<mat-radio-group formControlName="selectedSubcategory">
<div *ngFor="let category of subcategories$ | async">
<mat-list-item>
<mat-radio-button [value]="category" align="end">
<span>{{category}}</span>
</mat-radio-button>
</mat-list-item>
<mat-divider></mat-divider>
</div>
</mat-radio-group>
<mat-form-field>
<input matInput placeholder="Amount" formControlName="transactionAmount">
</mat-form-field>
<div>
<button mat-raised-button color="primary" [disabled]="transaction.invalid" type="submit">Submit</button>
</div>
</mat-list>
</form>
| {
"content_hash": "c6b11696e2a1dced58a298e9edd77577",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 110,
"avg_line_length": 31.071428571428573,
"alnum_prop": 0.6252873563218391,
"repo_name": "seescode/budget",
"id": "f3ad7610d954b2460c7bd0add4860f4d35f8d9b0",
"size": "870",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/pages/add-transaction-page/add-transaction-page.component.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2287"
},
{
"name": "HTML",
"bytes": "7687"
},
{
"name": "JavaScript",
"bytes": "2137"
},
{
"name": "TypeScript",
"bytes": "131256"
}
],
"symlink_target": ""
} |
language("rust")
-- set source file kinds
set_sourcekinds {rc = ".rs"}
-- set source file flags
set_sourceflags {rc = "rcflags"}
-- set target kinds
set_targetkinds {binary = "rcld", static = "rcar", shared = "rcsh"}
-- set target flags
set_targetflags {binary = "ldflags", static = "arflags", shared = "shflags"}
-- set language kinds
set_langkinds {rust = "rc"}
-- set mixing kinds
set_mixingkinds("rc")
-- add rules
add_rules("rust")
-- on load
on_load("load")
-- on check_main
on_check_main("check_main")
-- set name flags
set_nameflags
{
object =
{
"target.symbols"
, "target.warnings"
, "target.optimize:check"
, "target.vectorexts:check"
}
, binary =
{
"config.linkdirs"
, "target.linkdirs"
, "target.rpathdirs"
, "target.strip"
, "target.symbols"
, "option.linkdirs"
, "option.rpathdirs"
, "toolchain.linkdirs"
, "toolchain.rpathdirs"
}
, shared =
{
"config.linkdirs"
, "target.linkdirs"
, "target.strip"
, "target.symbols"
, "option.linkdirs"
, "toolchain.linkdirs"
}
, static =
{
"target.strip"
, "target.symbols"
}
}
-- set menu
set_menu {
config =
{
{category = "Cross Complation Configuration/Compiler Configuration" }
, {nil, "rc", "kv", nil, "The Rust Compiler" }
, {category = "Cross Complation Configuration/Linker Configuration" }
, {nil, "rcld", "kv", nil, "The Rust Linker" }
, {nil, "rcar", "kv", nil, "The Rust Static Library Archiver" }
, {nil, "rcsh", "kv", nil, "The Rust Shared Library Linker" }
, {category = "Cross Complation Configuration/Builtin Flags Configuration" }
, {nil, "linkdirs", "kv", nil, "The Link Search Directories" }
}
}
| {
"content_hash": "034e10b524abb08c8266078c9f17b232",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 96,
"avg_line_length": 27.583333333333332,
"alnum_prop": 0.4570565386275356,
"repo_name": "waruqi/xmake",
"id": "5b4e2f37ec40c12534a4f7c91664bf318fcf6a31",
"size": "3051",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "xmake/languages/rust/xmake.lua",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "1279948"
},
{
"name": "Batchfile",
"bytes": "338"
},
{
"name": "C",
"bytes": "4219785"
},
{
"name": "C++",
"bytes": "789044"
},
{
"name": "Cuda",
"bytes": "20679"
},
{
"name": "D",
"bytes": "1596"
},
{
"name": "Elixir",
"bytes": "1374"
},
{
"name": "Euphoria",
"bytes": "16370"
},
{
"name": "Fortran",
"bytes": "1272"
},
{
"name": "Go",
"bytes": "1425"
},
{
"name": "Lex",
"bytes": "466"
},
{
"name": "Lua",
"bytes": "3187883"
},
{
"name": "Makefile",
"bytes": "74282"
},
{
"name": "NSIS",
"bytes": "10228"
},
{
"name": "Objective-C",
"bytes": "16543"
},
{
"name": "Objective-C++",
"bytes": "588"
},
{
"name": "Perl",
"bytes": "34522"
},
{
"name": "PowerShell",
"bytes": "8674"
},
{
"name": "QML",
"bytes": "1319"
},
{
"name": "Roff",
"bytes": "7111"
},
{
"name": "Rust",
"bytes": "440"
},
{
"name": "Shell",
"bytes": "23413"
},
{
"name": "Swift",
"bytes": "5137"
},
{
"name": "VBScript",
"bytes": "1989"
},
{
"name": "Yacc",
"bytes": "2015"
},
{
"name": "Zig",
"bytes": "1666"
}
],
"symlink_target": ""
} |
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports.
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
| {
"content_hash": "d2db0808fb464827620113d54a802eac",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 85,
"avg_line_length": 35.17391304347826,
"alnum_prop": 0.7435105067985167,
"repo_name": "NotGrm/booking-api",
"id": "4c9c6d36bc22bd66e555c09d33c10e0f1f139c67",
"size": "1618",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "config/environments/development.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "242"
},
{
"name": "Ruby",
"bytes": "51659"
}
],
"symlink_target": ""
} |
require File.expand_path('../boot', __FILE__)
require 'rails/all'
require 'oauth/rack/oauth_filter'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module Todo
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.middleware.use OAuth::Rack::OAuthFilter
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
#config.autoload_paths += Dir["#{config.root}/app/models/**/"]
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
#http://www.simonecarletti.com/blog/2012/02/heroku-and-rails-3-2-assetprecompile-error/
config.assets.initialize_on_precompile = false
# Dropbox
ACCESS_TYPE = :app_folder
DROPBOX_SETTINGS= {
:site => "https://www.dropbox.com",
:request_token_path => "/1/oauth/request_token",
:access_token_path => "/1/oauth/access_token",
:authorize_path => "/1/oauth/authorize"
}
end
end
| {
"content_hash": "fac0a022c4e156b2334593dd4880f2d1",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 99,
"avg_line_length": 40.78125,
"alnum_prop": 0.7011494252873564,
"repo_name": "tarr11/undo.io",
"id": "26f9f88b1c4767cb31124b0fcd3e13b975233caf",
"size": "2610",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "config/application.rb",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "3686"
},
{
"name": "CoffeeScript",
"bytes": "19520"
},
{
"name": "JavaScript",
"bytes": "133342"
},
{
"name": "Ruby",
"bytes": "245059"
},
{
"name": "Shell",
"bytes": "78"
}
],
"symlink_target": ""
} |
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.jboss.security.negotiation" />
</dependencies>
</deployment>
</jboss-deployment-structure>
| {
"content_hash": "72bdec98ac5597d6cc72ee643f2b5d9d",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 52,
"avg_line_length": 27.142857142857142,
"alnum_prop": 0.6789473684210526,
"repo_name": "rareddy/ws-security-examples",
"id": "5a02232da1d061c627d31beb7c2f26f6b0e542ab",
"size": "190",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "jaxrs-kerberos-example/service/src/main/webapp/META-INF/jboss-deployment-structure.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "95958"
}
],
"symlink_target": ""
} |
<?php
namespace Hyperframework\Common;
class EventEmitterEngine {
private $callbacks = [];
/**
* @param string $name
* @param callable $callback
* @return void
*/
public function bind($name, $callback) {
if (isset($this->callbacks[$name]) === false) {
$this->callbacks[$name] = [];
}
$this->callbacks[$name][] = $callback;
}
/**
* @param string $name
* @param callable $callback
* @return void
*/
public function unbind($name, $callback) {
if (isset($this->callbacks[$name])) {
$index = array_search($callback, $this->callbacks[$name], true);
if ($index !== false) {
unset($this->callbacks[$name][$index]);
if (count($this->callbacks[$name]) === 0) {
unset($this->callbacks[$name]);
}
}
}
}
/**
* @param string $name
* @param array $arguments
* @return void
*/
public function emit($name, $arguments = []) {
if (isset($this->callbacks[$name])) {
$callbacks = $this->callbacks[$name];
} else {
$callbacks = [];
}
if (isset($this->callbacks['hyperframework.event_emitting'])) {
$event = [
'name' => $name,
'arguments' => $arguments,
'callbacks' => $callbacks
];
foreach (
$this->callbacks['hyperframework.event_emitting'] as $callback
) {
call_user_func($callback, $event);
}
}
foreach ($callbacks as $callback) {
call_user_func_array($callback, $arguments);
}
if (isset($this->callbacks['hyperframework.event_emitted'])) {
$event = [
'name' => $name,
'arguments' => $arguments,
'callbacks' => $callbacks
];
foreach (
$this->callbacks['hyperframework.event_emitted'] as $callback
) {
call_user_func($callback, $event);
}
}
}
}
| {
"content_hash": "d383967571b8119702df2f37588b7e02",
"timestamp": "",
"source": "github",
"line_count": 75,
"max_line_length": 78,
"avg_line_length": 28.973333333333333,
"alnum_prop": 0.46157386102162906,
"repo_name": "hyperframework/hyperframework",
"id": "3820f2bf0e4b79cd75926d5ece6992242edc7613",
"size": "2173",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/Common/EventEmitterEngine.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Hack",
"bytes": "10"
},
{
"name": "PHP",
"bytes": "583999"
}
],
"symlink_target": ""
} |
namespace Google.Cloud.SecurityCenter.V1.Snippets
{
// [START securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_async_flattened]
using Google.Api.Gax;
using Google.Cloud.SecurityCenter.V1;
using System;
using System.Linq;
using System.Threading.Tasks;
public sealed partial class GeneratedSecurityCenterClientSnippets
{
/// <summary>Snippet for ListMuteConfigsAsync</summary>
/// <remarks>
/// This snippet has been automatically generated for illustrative purposes only.
/// It may require modifications to work in your environment.
/// </remarks>
public async Task ListMuteConfigsAsync()
{
// Create client
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
// Make the request
PagedAsyncEnumerable<ListMuteConfigsResponse, MuteConfig> response = securityCenterClient.ListMuteConfigsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MuteConfig item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListMuteConfigsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (MuteConfig item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<MuteConfig> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (MuteConfig item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
}
}
// [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_async_flattened]
}
| {
"content_hash": "26560dabf7c0661dea4924f8e3d5b208",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 131,
"avg_line_length": 44.083333333333336,
"alnum_prop": 0.6158790170132326,
"repo_name": "jskeet/gcloud-dotnet",
"id": "b232f7c0f2b80b05be65d5837be8087c4647185a",
"size": "3267",
"binary": false,
"copies": "2",
"ref": "refs/heads/bq-migration",
"path": "apis/Google.Cloud.SecurityCenter.V1/Google.Cloud.SecurityCenter.V1.GeneratedSnippets/SecurityCenterClient.ListMuteConfigsAsyncSnippet.g.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1725"
},
{
"name": "C#",
"bytes": "1829733"
}
],
"symlink_target": ""
} |
using System.Collections.Generic;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.WebTools.Languages.Shared.Editor.Completion;
namespace Microsoft.PythonTools.Django.Intellisense {
internal class TemplateCompletionController : CompletionController {
private readonly PythonToolsService _pyService;
public TemplateCompletionController(
PythonToolsService pyService,
ITextView textView,
IList<ITextBuffer> subjectBuffers,
ICompletionBroker completionBroker,
IAsyncQuickInfoBroker quickInfoBroker,
ISignatureHelpBroker signatureBroker) :
base(textView, subjectBuffers, completionBroker, quickInfoBroker, signatureBroker) {
_pyService = pyService;
}
public override bool IsTriggerChar(char typedCharacter) {
const string triggerChars = " |.";
return _pyService.AdvancedOptions.AutoListMembers && !HasActiveCompletionSession && triggerChars.IndexOf(typedCharacter) >= 0;
}
public override bool IsCommitChar(char typedCharacter) {
if (!HasActiveCompletionSession) {
return false;
}
if (typedCharacter == '\n' || typedCharacter == '\t') {
return true;
}
return _pyService.AdvancedOptions.CompletionCommittedBy.IndexOf(typedCharacter) > 0;
}
protected override bool IsRetriggerChar(ICompletionSession session, char typedCharacter) {
if (typedCharacter == ' ') {
return true;
}
return base.IsRetriggerChar(session, typedCharacter);
}
}
}
| {
"content_hash": "378a4505b1a6dcd61b70d58e7d18eb5b",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 138,
"avg_line_length": 37.829787234042556,
"alnum_prop": 0.6614173228346457,
"repo_name": "huguesv/PTVS",
"id": "f859ef5eec9b58397963a65a81b294829a1f21b4",
"size": "2499",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Python/Product/Django/Intellisense/TemplateCompletionController.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "109"
},
{
"name": "Batchfile",
"bytes": "10898"
},
{
"name": "C",
"bytes": "23236"
},
{
"name": "C#",
"bytes": "12464429"
},
{
"name": "C++",
"bytes": "211838"
},
{
"name": "CSS",
"bytes": "7025"
},
{
"name": "HTML",
"bytes": "34251"
},
{
"name": "JavaScript",
"bytes": "87257"
},
{
"name": "PowerShell",
"bytes": "25220"
},
{
"name": "Python",
"bytes": "913395"
},
{
"name": "Rich Text Format",
"bytes": "260880"
},
{
"name": "Smarty",
"bytes": "8156"
},
{
"name": "Tcl",
"bytes": "24968"
}
],
"symlink_target": ""
} |
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <pwd.h>
#include <time.h>
#include <gmetad.h>
#include <cmdline.h>
#include <apr_time.h>
#include "daemon_init.h"
#include "update_pidfile.h"
#include "rrd_helpers.h"
#include "export_helpers.h"
#define METADATA_SLEEP_RANDOMIZE 5.0
#define METADATA_MINIMUM_SLEEP 1
/* Holds our data sources. */
hash_t *sources;
/* The root of our local grid. Replaces the old "xml" hash table. */
Source_t root;
g_tcp_socket *server_socket;
g_tcp_socket *interactive_socket;
pthread_mutex_t server_socket_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t server_interactive_mutex = PTHREAD_MUTEX_INITIALIZER;
extern void *data_thread ( void *arg );
extern void* server_thread(void *);
extern int parse_config_file ( char *config_file );
extern int number_of_datasources ( char *config_file );
extern struct type_tag* in_type_list (char *, unsigned int);
extern g_udp_socket *carbon_udp_socket;
struct gengetopt_args_info args_info;
extern gmetad_config_t gmetad_config;
static int debug_level;
/* In cleanup.c */
extern void *cleanup_thread(void *arg);
static int
print_sources ( datum_t *key, datum_t *val, void *arg )
{
int i;
data_source_list_t *d = *((data_source_list_t **)(val->data));
g_inet_addr *addr;
fprintf(stderr,"Source: [%s, step %d] has %d sources\n",
(char*) key->data, d->step, d->num_sources);
for(i = 0; i < d->num_sources; i++)
{
addr = d->sources[i];
fprintf(stderr, "\t%s\n", addr->name);
}
return 0;
}
static int
spin_off_the_data_threads( datum_t *key, datum_t *val, void *arg )
{
data_source_list_t *d = *((data_source_list_t **)(val->data));
pthread_t pid;
pthread_attr_t attr;
pthread_attr_init( &attr );
pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED );
pthread_create(&pid, &attr, data_thread, (void *)d);
return 0;
}
/* The string fields in Metric_t are actually offsets into the value buffer field.
* This function returns a regular char* pointer. Tricky, but efficient.
*/
char *
getfield(char* buf, short int index)
{
if (index<0) return "unspecified";
return (char*) buf+index;
}
/* A bit slower than doing things by hand, but much safer. Guards
* against memory overflows.
*/
int
addstring(char *strings, int *edge, const char *s)
{
int e = *edge;
int end = e + strlen(s) + 1;
/* I wish C had real exceptions. */
if (e > GMETAD_FRAMESIZE || end > GMETAD_FRAMESIZE)
{
err_msg("Field is too big!!");
return -1;
}
strcpy(strings + e, s);
*edge = end;
return e;
}
/* Zeroes out every metric value in a summary hash table. */
int
zero_out_summary(datum_t *key, datum_t *val, void *arg)
{
Metric_t *metric;
/* Note that we get the actual value bytes here, not a copy. */
metric = (Metric_t*) val->data;
memset(&metric->val, 0, sizeof(metric->val));
metric->num = 0;
return 0;
}
/* Sums the metric summaries from all data sources. */
static int
sum_metrics(datum_t *key, datum_t *val, void *arg)
{
datum_t *hash_datum, *rdatum;
Metric_t *rootmetric, *metric;
char *type;
struct type_tag *tt;
int do_sum = 1;
metric = (Metric_t *) val->data;
type = getfield(metric->strings, metric->type);
hash_datum = hash_lookup(key, root.metric_summary);
if (!hash_datum)
{
hash_datum = datum_new((char*) metric, val->size);
do_sum = 0;
}
rootmetric = (Metric_t*) hash_datum->data;
if (do_sum)
{
tt = in_type_list(type, strlen(type));
if (!tt) {
datum_free(hash_datum);
return 0;
}
/* We sum everything in double to properly combine integer sources
(3.0) with float sources (3.1). This also avoids wraparound
errors: for example memory KB exceeding 4TB. */
switch (tt->type)
{
case INT:
case UINT:
case FLOAT:
rootmetric->val.d += metric->val.d;
break;
default:
break;
}
rootmetric->num += metric->num;
}
rdatum = hash_insert(key, hash_datum, root.metric_summary);
datum_free(hash_datum);
if (!rdatum)
return 1;
else
return 0;
}
/* Sums the metric summaries from all data sources. */
static int
do_root_summary( datum_t *key, datum_t *val, void *arg )
{
Source_t *source = (Source_t*) val->data;
int rc;
llist_entry *le;
/* We skip dead sources. */
if (source->ds->dead)
return 0;
/* We skip metrics not to be summarized. */
if (llist_search(&(gmetad_config.unsummarized_metrics), (void *)key->data, llist_strncmp, &le) == 0)
return 0;
/* Need to be sure the source has a complete sum for its metrics. */
pthread_mutex_lock(source->sum_finished);
/* We know that all these metrics are numeric. */
rc = hash_foreach(source->metric_summary, sum_metrics, arg);
/* Update the top level root source */
root.hosts_up += source->hosts_up;
root.hosts_down += source->hosts_down;
/* summary completed for source */
pthread_mutex_unlock(source->sum_finished);
return rc;
}
static int
write_root_summary(datum_t *key, datum_t *val, void *arg)
{
char *name, *type;
char sum[256];
char num[256];
Metric_t *metric;
int rc;
struct type_tag *tt;
llist_entry *le;
name = (char*) key->data;
metric = (Metric_t*) val->data;
type = getfield(metric->strings, metric->type);
/* Summarize all numeric metrics */
tt = in_type_list(type, strlen(type));
/* Don't write a summary for an unknown or STRING type */
if (!tt || (tt->type == STRING))
return 0;
/* Don't write a summary for metrics not to be summarized */
if (llist_search(&(gmetad_config.unsummarized_metrics), (void *)key->data, llist_strncmp, &le) == 0)
return 0;
/* We log all our sums in double which does not suffer from
wraparound errors: for example memory KB exceeding 4TB. -twitham */
sprintf(sum, "%.5f", metric->val.d);
sprintf(num, "%u", metric->num);
/* err_msg("Writing Overall Summary for metric %s (%s)", name, sum); */
/* Save the data to a rrd file unless write_rrds == off */
if (gmetad_config.write_rrds == 0)
return 0;
debug_msg("Writing Root Summary data for metric %s", name);
rc = write_data_to_rrd( NULL, NULL, name, sum, num, 15, 0, metric->slope);
if (rc)
{
err_msg("Unable to write meta data for metric %s to RRD", name);
}
return 0;
}
#define HOSTNAMESZ 64
int
main ( int argc, char *argv[] )
{
struct stat struct_stat;
pthread_t pid;
pthread_attr_t attr;
int i, num_sources;
uid_t gmetad_uid;
mode_t rrd_umask;
char * gmetad_username;
struct passwd *pw;
char hostname[HOSTNAMESZ];
gmetad_config_t *c = &gmetad_config;
apr_interval_time_t sleep_time;
apr_time_t last_metadata;
double random_sleep_factor;
unsigned int rand_seed;
/* Ignore SIGPIPE */
signal( SIGPIPE, SIG_IGN );
if (cmdline_parser(argc, argv, &args_info) != 0)
err_quit("command-line parser error");
num_sources = number_of_datasources( args_info.conf_arg );
if(!num_sources)
{
err_quit("%s doesn't have any data sources specified", args_info.conf_arg);
}
memset(&root, 0, sizeof(root));
root.id = ROOT_NODE;
/* Get the real number of data sources later */
sources = hash_create( num_sources + 10 );
if (! sources )
{
err_quit("Unable to create sources hash\n");
}
root.authority = hash_create( num_sources + 10 );
if (!root.authority)
{
err_quit("Unable to create root authority (our grids and clusters) hash\n");
}
root.metric_summary = hash_create (DEFAULT_METRICSIZE);
if (!root.metric_summary)
{
err_quit("Unable to create root summary hash");
}
parse_config_file ( args_info.conf_arg );
/* If given, use command line directives over config file ones. */
if (args_info.debug_given)
{
c->debug_level = args_info.debug_arg;
}
debug_level = c->debug_level;
set_debug_msg_level(debug_level);
/* Setup our default authority pointer if the conf file hasnt yet.
* Done in the style of hash node strings. */
if (!root.stringslen)
{
gethostname(hostname, HOSTNAMESZ);
root.authority_ptr = 0;
sprintf(root.strings, "http://%s/ganglia/", hostname);
root.stringslen += strlen(root.strings) + 1;
}
rand_seed = apr_time_now() * (int)pthread_self();
for(i = 0; i < root.stringslen; rand_seed = rand_seed * root.strings[i++]);
/* Debug level 1 is error output only, and no daemonizing. */
if (!debug_level)
{
rrd_umask = c->umask;
daemon_init (argv[0], 0, rrd_umask);
}
if (args_info.pid_file_given)
{
update_pidfile (args_info.pid_file_arg);
}
/* The rrd_rootdir must be writable by the gmetad process */
if( c->should_setuid )
{
if(! (pw = getpwnam(c->setuid_username)))
{
err_sys("Getpwnam error");
}
gmetad_uid = pw->pw_uid;
gmetad_username = c->setuid_username;
}
else
{
gmetad_uid = getuid();
if(! (pw = getpwuid(gmetad_uid)))
{
err_sys("Getpwnam error");
}
gmetad_username = strdup(pw->pw_name);
}
debug_msg("Going to run as user %s", gmetad_username);
if( c->should_setuid )
{
become_a_nobody(c->setuid_username);
}
if( c->write_rrds )
{
if( stat( c->rrd_rootdir, &struct_stat ) )
{
err_sys("Please make sure that %s exists", c->rrd_rootdir);
}
if ( struct_stat.st_uid != gmetad_uid )
{
err_quit("Please make sure that %s is owned by %s", c->rrd_rootdir, gmetad_username);
}
if (! (struct_stat.st_mode & S_IWUSR) )
{
err_quit("Please make sure %s has WRITE permission for %s", gmetad_username, c->rrd_rootdir);
}
}
if(debug_level)
{
fprintf(stderr,"Sources are ...\n");
hash_foreach( sources, print_sources, NULL);
}
#ifdef WITH_MEMCACHED
if (c->memcached_parameters != NULL)
{
memcached_connection_pool = memcached_pool(c->memcached_parameters, strlen(c->memcached_parameters));
}
#endif /* WITH_MEMCACHED */
server_socket = g_tcp_socket_server_new( c->xml_port );
if (server_socket == NULL)
{
err_quit("tcp_listen() on xml_port failed");
}
debug_msg("xml listening on port %d", c->xml_port);
interactive_socket = g_tcp_socket_server_new( c->interactive_port );
if (interactive_socket == NULL)
{
err_quit("tcp_listen() on interactive_port failed");
}
debug_msg("interactive xml listening on port %d", c->interactive_port);
/* Forward metrics to Graphite using carbon protocol */
if (c->carbon_server != NULL)
{
if (!strcmp(c->carbon_protocol, "udp"))
{
carbon_udp_socket = init_carbon_udp_socket (c->carbon_server, c->carbon_port);
if (carbon_udp_socket == NULL)
err_quit("carbon %s socket failed for %s:%d", c->carbon_protocol, c->carbon_server, c->carbon_port);
}
debug_msg("carbon forwarding ready to send via %s to %s:%d", c->carbon_protocol, c->carbon_server, c->carbon_port);
}
/* initialize summary mutex */
root.sum_finished = (pthread_mutex_t *)
malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(root.sum_finished, NULL);
pthread_attr_init( &attr );
pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_DETACHED );
/* Spin off the non-interactive server threads. (Half as many as interactive). */
for (i=0; i < c->server_threads/2; i++)
pthread_create(&pid, &attr, server_thread, (void*) 0);
/* Spin off the interactive server threads. */
for (i=0; i < c->server_threads; i++)
pthread_create(&pid, &attr, server_thread, (void*) 1);
hash_foreach( sources, spin_off_the_data_threads, NULL );
/* A thread to cleanup old metrics and hosts */
pthread_create(&pid, &attr, cleanup_thread, (void *) NULL);
debug_msg("cleanup thread has been started");
/* Meta data */
last_metadata = 0;
for(;;)
{
/* Do at a random interval, between
(shortest_step/2) +/- METADATA_SLEEP_RANDOMIZE percent */
random_sleep_factor = (1 + (METADATA_SLEEP_RANDOMIZE / 50.0) * ((rand_r(&rand_seed) - RAND_MAX/2)/(float)RAND_MAX));
sleep_time = random_sleep_factor * apr_time_from_sec(c->shortest_step) / 2;
/* Make sure the sleep time is at least 1 second */
if(apr_time_sec(apr_time_now() + sleep_time) < (METADATA_MINIMUM_SLEEP + apr_time_sec(apr_time_now())))
sleep_time += apr_time_from_sec(METADATA_MINIMUM_SLEEP);
apr_sleep(sleep_time);
/* Need to be sure root is locked while doing summary */
pthread_mutex_lock(root.sum_finished);
/* Flush the old values */
hash_foreach(root.metric_summary, zero_out_summary, NULL);
root.hosts_up = 0;
root.hosts_down = 0;
/* Sum the new values */
hash_foreach(root.authority, do_root_summary, NULL );
/* summary completed */
pthread_mutex_unlock(root.sum_finished);
/* Save them to RRD */
hash_foreach(root.metric_summary, write_root_summary, NULL);
/* Remember our last run */
last_metadata = apr_time_now();
}
return 0;
}
| {
"content_hash": "0fc776515b24a22e63c4986425d36923",
"timestamp": "",
"source": "github",
"line_count": 497,
"max_line_length": 125,
"avg_line_length": 28.026156941649898,
"alnum_prop": 0.5964534424581808,
"repo_name": "dmourati/monitor-core",
"id": "e9dedb632a0aa4f1112b8a594928ae5bfa95a278",
"size": "13929",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "gmetad/gmetad.c",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "1078589"
},
{
"name": "C++",
"bytes": "22793"
},
{
"name": "Logos",
"bytes": "3485"
},
{
"name": "PHP",
"bytes": "7113"
},
{
"name": "Perl",
"bytes": "78767"
},
{
"name": "Python",
"bytes": "335822"
},
{
"name": "Shell",
"bytes": "24541"
},
{
"name": "Visual Basic",
"bytes": "279"
}
],
"symlink_target": ""
} |
namespace v8 {
class Isolate;
}
namespace blink {
class SecurityOrigin;
class WindowAgent;
// This is a helper class to assign WindowAgent to Document.
// The instance should be created for each group of Documents that are mutually
// reachable via `window.opener`, `window.frames` or others. These Documents
// may have different origins.
//
// The instance is intended to have the same granularity to the group of
// browsing context, that contains auxiliary browsing contexts.
// https://html.spec.whatwg.org/C#tlbc-group
// https://html.spec.whatwg.org/C#auxiliary-browsing-context
class WindowAgentFactory final : public GarbageCollected<WindowAgentFactory> {
public:
WindowAgentFactory();
// Returns an instance of WindowAgent for |origin|.
// This returns the same instance for origin A and origin B if either:
// - |has_potential_universal_access_privilege| is true,
// - both A and B have `file:` scheme,
// - or, they have the same scheme and the same registrable origin.
//
// Set |has_potential_universal_access_privilege| if an agent may be able to
// access all other agents synchronously.
// I.e. pass true to if either:
// * --disable-web-security is set,
// * --run-web-tests is set,
// * or, the Blink instance is running for Android WebView.
WindowAgent* GetAgentForOrigin(bool has_potential_universal_access_privilege,
v8::Isolate* isolate,
const SecurityOrigin* origin);
void Trace(Visitor*);
private:
struct SchemeAndRegistrableDomain {
String scheme;
String registrable_domain;
SchemeAndRegistrableDomain(const String& scheme,
const String& registrable_domain)
: scheme(scheme), registrable_domain(registrable_domain) {}
};
struct SchemeAndRegistrableDomainHash {
STATIC_ONLY(SchemeAndRegistrableDomainHash);
static const bool safe_to_compare_to_empty_or_deleted = false;
static unsigned GetHash(const SchemeAndRegistrableDomain&);
static bool Equal(const SchemeAndRegistrableDomain&,
const SchemeAndRegistrableDomain&);
};
struct SchemeAndRegistrableDomainTraits
: SimpleClassHashTraits<SchemeAndRegistrableDomain> {
STATIC_ONLY(SchemeAndRegistrableDomainTraits);
static const bool kHasIsEmptyValueFunction = true;
static bool IsEmptyValue(const SchemeAndRegistrableDomain&);
static bool IsDeletedValue(const SchemeAndRegistrableDomain& value);
static void ConstructDeletedValue(SchemeAndRegistrableDomain& slot,
bool zero_value);
};
// Use a shared instance of Agent for all frames if a frame may have the
// universal access privilege.
WeakMember<WindowAgent> universal_access_agent_;
// `file:` scheme URLs are hard for tracking the equality. Use a shared
// Agent for them.
WeakMember<WindowAgent> file_url_agent_;
// Use the SecurityOrigin itself as the key for opaque origins.
HeapHashMap<scoped_refptr<const SecurityOrigin>,
WeakMember<WindowAgent>,
SecurityOriginHash>
opaque_origin_agents_;
// Use registerable domain as the key for general tuple origins.
using TupleOriginAgents = HeapHashMap<SchemeAndRegistrableDomain,
WeakMember<WindowAgent>,
SchemeAndRegistrableDomainHash,
SchemeAndRegistrableDomainTraits>;
TupleOriginAgents tuple_origin_agents_;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_EXECUTION_CONTEXT_WINDOW_AGENT_FACTORY_H_
| {
"content_hash": "06da4cf56f52f88e2fd1f2cfa009502f",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 84,
"avg_line_length": 38.54736842105263,
"alnum_prop": 0.6960677225559804,
"repo_name": "endlessm/chromium-browser",
"id": "2e1bfb364501616ba57f5d16607f861b8b7f7ee0",
"size": "4391",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "third_party/blink/renderer/core/execution_context/window_agent_factory.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
'use strict';
const LinkedinLogin = require('./src/LinkedinLogin');
module.exports = LinkedinLogin;
| {
"content_hash": "1c4a3c750bc68e0c87d0536bff510fed",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 53,
"avg_line_length": 20.4,
"alnum_prop": 0.7450980392156863,
"repo_name": "alma-connect/react-native-linkedin-login",
"id": "48586d0d23bb20f61a335b3b3cc32af64f5d8782",
"size": "102",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "index.android.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "3900"
},
{
"name": "Java",
"bytes": "170592"
},
{
"name": "JavaScript",
"bytes": "4663"
},
{
"name": "Objective-C",
"bytes": "40643"
},
{
"name": "Ruby",
"bytes": "832"
}
],
"symlink_target": ""
} |
set(CMAKE_GENERATOR_TOOLSET "Test Toolset")
| {
"content_hash": "7cffcdb95c6c9f7ec55f5586cf70e696",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 43,
"avg_line_length": 44,
"alnum_prop": 0.7954545454545454,
"repo_name": "hlzz/dotfiles",
"id": "bee2ae4bb770c1fc8c499dc8bc0120de2f289f61",
"size": "44",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "dev/cmake-3.5.1/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "AppleScript",
"bytes": "1240"
},
{
"name": "Arc",
"bytes": "38"
},
{
"name": "Assembly",
"bytes": "449468"
},
{
"name": "Batchfile",
"bytes": "16152"
},
{
"name": "C",
"bytes": "102303195"
},
{
"name": "C++",
"bytes": "155056606"
},
{
"name": "CMake",
"bytes": "7200627"
},
{
"name": "CSS",
"bytes": "179330"
},
{
"name": "Cuda",
"bytes": "30026"
},
{
"name": "D",
"bytes": "2152"
},
{
"name": "Emacs Lisp",
"bytes": "14892"
},
{
"name": "FORTRAN",
"bytes": "5276"
},
{
"name": "Forth",
"bytes": "3637"
},
{
"name": "GAP",
"bytes": "14495"
},
{
"name": "GLSL",
"bytes": "438205"
},
{
"name": "Gnuplot",
"bytes": "327"
},
{
"name": "Groff",
"bytes": "518260"
},
{
"name": "HLSL",
"bytes": "965"
},
{
"name": "HTML",
"bytes": "2003175"
},
{
"name": "Haskell",
"bytes": "10370"
},
{
"name": "IDL",
"bytes": "2466"
},
{
"name": "Java",
"bytes": "219109"
},
{
"name": "JavaScript",
"bytes": "1618007"
},
{
"name": "Lex",
"bytes": "119058"
},
{
"name": "Lua",
"bytes": "23167"
},
{
"name": "M",
"bytes": "1080"
},
{
"name": "M4",
"bytes": "292475"
},
{
"name": "Makefile",
"bytes": "7112810"
},
{
"name": "Matlab",
"bytes": "1582"
},
{
"name": "NSIS",
"bytes": "34176"
},
{
"name": "Objective-C",
"bytes": "65312"
},
{
"name": "Objective-C++",
"bytes": "269995"
},
{
"name": "PAWN",
"bytes": "4107117"
},
{
"name": "PHP",
"bytes": "2690"
},
{
"name": "Pascal",
"bytes": "5054"
},
{
"name": "Perl",
"bytes": "485508"
},
{
"name": "Pike",
"bytes": "1338"
},
{
"name": "Prolog",
"bytes": "5284"
},
{
"name": "Python",
"bytes": "16799659"
},
{
"name": "QMake",
"bytes": "89858"
},
{
"name": "Rebol",
"bytes": "291"
},
{
"name": "Ruby",
"bytes": "21590"
},
{
"name": "Scilab",
"bytes": "120244"
},
{
"name": "Shell",
"bytes": "2266191"
},
{
"name": "Slash",
"bytes": "1536"
},
{
"name": "Smarty",
"bytes": "1368"
},
{
"name": "Swift",
"bytes": "331"
},
{
"name": "Tcl",
"bytes": "1911873"
},
{
"name": "TeX",
"bytes": "11981"
},
{
"name": "Verilog",
"bytes": "3893"
},
{
"name": "VimL",
"bytes": "595114"
},
{
"name": "XSLT",
"bytes": "62675"
},
{
"name": "Yacc",
"bytes": "307000"
},
{
"name": "eC",
"bytes": "366863"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tree-diameter: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.14.1 / tree-diameter - 8.7.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
tree-diameter
<small>
8.7.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-05-19 00:53:29 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-05-19 00:53:29 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 4 Virtual package relying on a GMP lib system installation
coq 8.14.1 Formal proof management system
dune 3.1.1 Fast, portable, and opinionated build system
ocaml 4.12.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-config 2 OCaml Switch Configuration
ocaml-options-vanilla 1 Ensure that OCaml is compiled with no special options enabled
ocamlfind 1.9.3 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/tree-diameter"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/TreeDiameter"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: program verification" "keyword: trees" "keyword: paths" "keyword: graphs" "keyword: distance" "keyword: diameter" "category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms" ]
authors: [ "Jean-Christophe Filliâtre" ]
bug-reports: "https://github.com/coq-contribs/tree-diameter/issues"
dev-repo: "git+https://github.com/coq-contribs/tree-diameter.git"
synopsis: "Diameter of a binary tree"
description: """
This contribution contains the verification of a divide-and-conquer
algorithm to compute the diameter of a binary tree (the
maxmimal distance between two nodes in the tree)."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/tree-diameter/archive/v8.7.0.tar.gz"
checksum: "md5=828e673a375124912359a2e5c13d2f86"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-tree-diameter.8.7.0 coq.8.14.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.14.1).
The following dependencies couldn't be met:
- coq-tree-diameter -> coq < 8.8~ -> ocaml < 4.10
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-tree-diameter.8.7.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| {
"content_hash": "45ee776200d9709d48722fc5d87c1d73",
"timestamp": "",
"source": "github",
"line_count": 166,
"max_line_length": 310,
"avg_line_length": 43.69879518072289,
"alnum_prop": 0.5514199062586159,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "2e46d07f72a8676f2c530a05eb0e8720bdd43599",
"size": "7280",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.12.1-2.0.8/released/8.14.1/tree-diameter/8.7.0.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
import React from 'react'
import {render} from '../utils/renderer'
import Streams from './Streams'
describe('Streams', () => {
let tree
beforeEach(() => {
tree = render(
<Streams />
)
})
it('renders', () => {
expect(tree).toMatchSnapshot()
})
})
| {
"content_hash": "761d1bab7d549cb1f2c28cd24b7e90ba",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 40,
"avg_line_length": 16.294117647058822,
"alnum_prop": 0.5631768953068592,
"repo_name": "unindented/twitch-x",
"id": "52b41abc7d4bd9fde09928f38162c3ce1073345d",
"size": "277",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "projects/twitch-web/src/components/Streams.test.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2514"
},
{
"name": "HTML",
"bytes": "3781"
},
{
"name": "JavaScript",
"bytes": "118881"
},
{
"name": "PowerShell",
"bytes": "324"
},
{
"name": "Shell",
"bytes": "726"
}
],
"symlink_target": ""
} |
struct list
{
int data ;
struct list *next ;
};
void display(struct list *head)
{
struct list *ptr = head ;
while(ptr != NULL)
{
printf(" %d \n", ptr -> data );
ptr = ptr -> next ;
}
}
struct list *reverse(struct list *head) // reversing the linked list
{
struct list *nextNode = NULL , *temp = NULL ;
while(head)
{
nextNode = head -> next ;
head -> next = temp ;
temp = head ;
head = nextNode ;
}
return temp ;
}
struct list *recursiveReverse(struct list *head) // reversing the list with recursion
{
if(head == NULL)
return NULL ;
if(head -> next == NULL)
return head ;
struct list *second ;
second = head -> next ;
head -> next = NULL ;
struct list *reverseRest = recursiveReverse(second) ;
second -> next = head ;
return reverseRest ;
}
int main()
{
struct list *head = malloc(sizeof(struct list)) ;
head -> data = 1 ;
head -> next = NULL ;
struct list *ptr ;
ptr = head ;
int i = 0 ;
for(i = 2 ; i < 10 ; i++)
{
if(i == 6)
continue ;
else
{
struct list *newNode = malloc(sizeof(struct list)) ;
newNode -> data = i ;
ptr -> next = newNode ;
newNode -> next = NULL ;
ptr = ptr -> next ;
}
}
// inserting 6 in the linked list
struct list *insrt = malloc(sizeof(struct list)) ;
insrt -> data = 6 ;
ptr = head ;
while(ptr -> next -> data <= insrt -> data)
{
ptr = ptr -> next ;
}
insrt -> next = ptr -> next ;
ptr -> next = insrt ;
display(head) ;
struct list *result = reverse(head) ;
struct list *recRes = recursiveReverse(head) ;
display(recRes);
display(result) ;
} | {
"content_hash": "0c13e20ac89eb08b94228553a62504eb",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 86,
"avg_line_length": 16.673684210526314,
"alnum_prop": 0.5902777777777778,
"repo_name": "puneet222/Data-Structures",
"id": "74a2ff7b78330452e69ddbf78a3c2dcb0caf06f6",
"size": "1622",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "DS/DS/linked-list/insert_sorted.c",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "139040"
},
{
"name": "C++",
"bytes": "44341"
}
],
"symlink_target": ""
} |
<?php
namespace Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Service;
use Chamilo\Application\Plagiarism\Domain\SubmissionStatus;
use Chamilo\Application\Weblcms\Course\Storage\DataClass\Course;
use Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Storage\DataClass\ContentObjectPlagiarismResult;
use Chamilo\Core\Repository\Storage\DataClass\ContentObject;
use Chamilo\Core\User\Storage\DataClass\User;
use Chamilo\Libraries\Storage\FilterParameters\FilterParameters;
/**
* @package Chamilo\Application\Plagiarism\Service
*
* @author Sven Vanpoucke - Hogeschool Gent
*/
class ContentObjectPlagiarismResultService
{
/**
* @var \Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Storage\Repository\ContentObjectPlagiarismResultRepository
*/
protected $contentObjectPlagiarismResultRepository;
/**
* ContentObjectPlagiarismResultService constructor.
*
* @param \Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Storage\Repository\ContentObjectPlagiarismResultRepository $contentObjectPlagiarismResultRepository
*/
public function __construct(
\Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Storage\Repository\ContentObjectPlagiarismResultRepository $contentObjectPlagiarismResultRepository
)
{
$this->contentObjectPlagiarismResultRepository = $contentObjectPlagiarismResultRepository;
}
/**
* @param int $plagiarismResultId
*
* @return ContentObjectPlagiarismResult
*/
public function findPlagiarismResultById(int $plagiarismResultId)
{
return $this->contentObjectPlagiarismResultRepository->findPlagiarismResultById($plagiarismResultId);
}
/**
* @param \Chamilo\Core\Repository\Storage\DataClass\ContentObject $contentObject
* @param \Chamilo\Application\Weblcms\Course\Storage\DataClass\Course $course
*
* @return \Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Storage\DataClass\ContentObjectPlagiarismResult|\Chamilo\Libraries\Storage\DataClass\DataClass
*/
public function findPlagiarismResultByContentObject(Course $course, ContentObject $contentObject)
{
return $this->contentObjectPlagiarismResultRepository->findPlagiarismResultByContentObject(
$course, $contentObject
);
}
/**
* @param string $externalId
*
* @return ContentObjectPlagiarismResult|\Chamilo\Libraries\Storage\DataClass\DataClass
*/
public function findPlagiarismResultByExternalId(string $externalId)
{
return $this->contentObjectPlagiarismResultRepository->findPlagiarismResultByExternalId($externalId);
}
/**
* @param \Chamilo\Application\Weblcms\Course\Storage\DataClass\Course $course
* @param \Chamilo\Libraries\Storage\FilterParameters\FilterParameters $filterParameters
*
* @return int
*/
public function countPlagiarismResults(Course $course, FilterParameters $filterParameters)
{
return $this->contentObjectPlagiarismResultRepository->countPlagiarismResults($course, $filterParameters);
}
/**
* @param \Chamilo\Application\Weblcms\Course\Storage\DataClass\Course $course
* @param \Chamilo\Libraries\Storage\FilterParameters\FilterParameters $filterParameters
*
* @return \Chamilo\Libraries\Storage\Iterator\RecordIterator
*/
public function findPlagiarismResults(Course $course, FilterParameters $filterParameters = null)
{
return $this->contentObjectPlagiarismResultRepository->findPlagiarismResults($course, $filterParameters);
}
/**
* @param \Chamilo\Application\Weblcms\Course\Storage\DataClass\Course $course
* @param \Chamilo\Core\Repository\Storage\DataClass\ContentObject $contentObject
* @param string $externalId
*
* @param \Chamilo\Core\User\Storage\DataClass\User $requestUser
*
* @return ContentObjectPlagiarismResult
*/
public function createContentObjectPlagiarismResult(
Course $course, ContentObject $contentObject, string $externalId, User $requestUser
)
{
$contentObjectPlagiarismResult = new ContentObjectPlagiarismResult();
$contentObjectPlagiarismResult->setContentObjectId($contentObject->getId());
$contentObjectPlagiarismResult->setCourseId($course->getId());
$contentObjectPlagiarismResult->setExternalId($externalId);
$contentObjectPlagiarismResult->setStatus(SubmissionStatus::STATUS_UPLOAD_IN_PROGRESS);
$contentObjectPlagiarismResult->setRequestUserId($requestUser->getId());
$contentObjectPlagiarismResult->setRequestDate(new \DateTime());
if (!$this->contentObjectPlagiarismResultRepository->createPlagiarismResult($contentObjectPlagiarismResult))
{
throw new \InvalidArgumentException(
sprintf(
'The content object plagiarism result for content object %s could not be created',
$contentObject->getId()
)
);
}
return $contentObjectPlagiarismResult;
}
/**
* @param \Chamilo\Application\Weblcms\Tool\Implementation\Plagiarism\Storage\DataClass\ContentObjectPlagiarismResult $contentObjectPlagiarismResult
*
* @return ContentObjectPlagiarismResult
*/
public function updateContentObjectPlagiarismResult(ContentObjectPlagiarismResult $contentObjectPlagiarismResult)
{
if (!$this->contentObjectPlagiarismResultRepository->updatePlagiarismResult($contentObjectPlagiarismResult))
{
throw new \RuntimeException(
sprintf('The entry plagiarism result %s could not be update', $contentObjectPlagiarismResult->getId())
);
}
return $contentObjectPlagiarismResult;
}
}
| {
"content_hash": "060c1757f027efe17d1e7fd3a23830a1",
"timestamp": "",
"source": "github",
"line_count": 143,
"max_line_length": 173,
"avg_line_length": 40.88111888111888,
"alnum_prop": 0.7386247006500171,
"repo_name": "cosnics/cosnics",
"id": "a290fe7044b0ac93204646bd59c97143092b642b",
"size": "5846",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Chamilo/Application/Weblcms/Tool/Implementation/Plagiarism/Service/ContentObjectPlagiarismResultService.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ActionScript",
"bytes": "262730"
},
{
"name": "C",
"bytes": "12354"
},
{
"name": "CSS",
"bytes": "1334431"
},
{
"name": "CoffeeScript",
"bytes": "41023"
},
{
"name": "Gherkin",
"bytes": "24033"
},
{
"name": "HTML",
"bytes": "1016812"
},
{
"name": "Hack",
"bytes": "424"
},
{
"name": "JavaScript",
"bytes": "10768095"
},
{
"name": "Less",
"bytes": "331253"
},
{
"name": "Makefile",
"bytes": "3221"
},
{
"name": "PHP",
"bytes": "23623996"
},
{
"name": "Python",
"bytes": "2408"
},
{
"name": "Ruby",
"bytes": "618"
},
{
"name": "SCSS",
"bytes": "163532"
},
{
"name": "Shell",
"bytes": "7965"
},
{
"name": "Smarty",
"bytes": "15750"
},
{
"name": "Twig",
"bytes": "388197"
},
{
"name": "TypeScript",
"bytes": "123212"
},
{
"name": "Vue",
"bytes": "454138"
},
{
"name": "XSLT",
"bytes": "43009"
}
],
"symlink_target": ""
} |
class FisherFaceRecognizer : public FaceRecognizer {
public:
cv::Ptr<cv::face::FaceRecognizer> faceRecognizer;
void save(std::string path) {
faceRecognizer->save(path);
}
void load(std::string path) {
#if CV_VERSION_GREATER_EQUAL(3, 3, 0)
faceRecognizer = cv::Algorithm::load<cv::face::FisherFaceRecognizer>(path);
#else
faceRecognizer->load(path);
#endif
}
static NAN_MODULE_INIT(Init);
static NAN_METHOD(New);
static Nan::Persistent<v8::FunctionTemplate> constructor;
cv::Ptr<cv::face::FaceRecognizer> getFaceRecognizer() {
return faceRecognizer;
}
};
#endif | {
"content_hash": "eda53d511135518b97d98be591389457",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 77,
"avg_line_length": 22.423076923076923,
"alnum_prop": 0.7307032590051458,
"repo_name": "justadudewhohacks/opencv4nodejs",
"id": "75349e00c248a8c1c7b9bac2772a16cbd9514ca6",
"size": "689",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cc/face/FisherFaceRecognizer.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "2782"
},
{
"name": "C++",
"bytes": "683604"
},
{
"name": "Dockerfile",
"bytes": "770"
},
{
"name": "JavaScript",
"bytes": "391933"
},
{
"name": "Python",
"bytes": "4881"
},
{
"name": "Shell",
"bytes": "1266"
},
{
"name": "TypeScript",
"bytes": "103657"
}
],
"symlink_target": ""
} |
package org.springframework.boot.cli.compiler.dependencies;
import org.springframework.util.StringUtils;
/**
* {@link ArtifactCoordinatesResolver} backed by
* {@link SpringBootDependenciesDependencyManagement}.
*
* @author Phillip Webb
* @author Andy Wilkinson
*/
public class DependencyManagementArtifactCoordinatesResolver
implements ArtifactCoordinatesResolver {
private final DependencyManagement dependencyManagement;
public DependencyManagementArtifactCoordinatesResolver() {
this(new SpringBootDependenciesDependencyManagement());
}
public DependencyManagementArtifactCoordinatesResolver(
DependencyManagement dependencyManagement) {
this.dependencyManagement = dependencyManagement;
}
@Override
public String getGroupId(String artifactId) {
Dependency dependency = find(artifactId);
return (dependency != null ? dependency.getGroupId() : null);
}
@Override
public String getArtifactId(String id) {
Dependency dependency = find(id);
return (dependency != null ? dependency.getArtifactId() : null);
}
private Dependency find(String id) {
if (StringUtils.countOccurrencesOf(id, ":") == 2) {
String[] tokens = id.split(":");
return new Dependency(tokens[0], tokens[1], tokens[2]);
}
if (id != null) {
if (id.startsWith("spring-boot")) {
return new Dependency("org.springframework.boot", id,
this.dependencyManagement.getSpringBootVersion());
}
return this.dependencyManagement.find(id);
}
return null;
}
@Override
public String getVersion(String module) {
Dependency dependency = find(module);
return (dependency != null ? dependency.getVersion() : null);
}
}
| {
"content_hash": "6cb73324d09ab617bf231f7ace59969b",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 66,
"avg_line_length": 27.114754098360656,
"alnum_prop": 0.749093107617896,
"repo_name": "tsachev/spring-boot",
"id": "2bb1a7517c1cdaa3bf0eadd3a69bc14d1a4244cb",
"size": "2274",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/DependencyManagementArtifactCoordinatesResolver.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1948"
},
{
"name": "CSS",
"bytes": "5769"
},
{
"name": "FreeMarker",
"bytes": "3599"
},
{
"name": "Groovy",
"bytes": "51602"
},
{
"name": "HTML",
"bytes": "69601"
},
{
"name": "Java",
"bytes": "13587483"
},
{
"name": "JavaScript",
"bytes": "37789"
},
{
"name": "Kotlin",
"bytes": "25029"
},
{
"name": "Ruby",
"bytes": "1308"
},
{
"name": "Shell",
"bytes": "31455"
},
{
"name": "Smarty",
"bytes": "2885"
},
{
"name": "XSLT",
"bytes": "36394"
}
],
"symlink_target": ""
} |
[](http://badge.fury.io/rb/evernote-thrift)
Evernote SDK for Ruby
=====================
Evernote API version 1.25
Overview
--------
This SDK contains wrapper code used to call the Evernote Cloud API from Ruby.
The SDK also contains two samples. The code in sample/client demonstrates the basic use of the SDK for single-user scripts. The code in sample/oauth demonstrates the basic use of the SDK for web applications that authenticate using OAuth.
Install the gem
---------------
gem install evernote-thrift
Prerequisites
-------------
In order to use the code in this SDK, you need to obtain an API key from http://dev.evernote.com/documentation/cloud. You'll also find full API documentation on that page.
In order to run the sample code, you need a user account on the sandbox service where you will do your development. Sign up for an account at https://sandbox.evernote.com/Registration.action
In order to run the client client sample code, you need a developer token. Get one at https://sandbox.evernote.com/api/DeveloperToken.action
Getting Started - Client
------------------------
The code in sample/client/EDAMTest.rb demonstrates the basics of using the Evernote API, using developer tokens to simplify the authentication process while you're learning.
1. Open sample/client/EDAMTest.rb
2. Scroll down and fill in your Evernote developer token.
3. On the command line, run the following command to execute the script:
ruby EDAMTest.rb
Getting Started - OAuth
-----------------------
Web applications must use OAuth to authenticate to the Evernote service. The code in sample/oauth contains 2 simple web apps that demonstrate the OAuth authentication process. The applications use the [Sinatra framework](http://www.sinatrarb.com/). You don't need to use Sinatra for your application, but you'll need it to run the sample code. The applications also use the [OAuth RubyGem](http://rubygems.org/gems/oauth) to provide the underlying OAuth functionality.
There are two pages in the sample. evernote_oauth.rb demonstrates each step of the OAuth process in detail. This is useful for developers, but not what an end user would see. evernote_oauth_simple demonstrates the simplified process, which is similar to what you would implement in your production app.
1. Install Sinatra: gem install sinatra
2. Install OAuth: gem install oauth
3. Open the file sample/oauth/evernote_config.rb
4. Fill in your Evernote API consumer key and secret.
5. On the command line, run the following command to start the datailed sample app:
ruby -rubygems evernote_oauth.rb
6. Open the sample app in your browser: http://localhost:4567
7. Repeat steps 5 and 6 with the file evernote_oauth_simple.rb to run the simple sample app.
Getting Started - evernote_oauth gem
------------------------------------
We also provide a high level wrapper for the Thrift API client. You can install it with:
gem install evernote_oauth
For more detail, see: https://github.com/evernote/evernote-oauth-ruby
| {
"content_hash": "760546e3ffa1068969f465b2047721d0",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 468,
"avg_line_length": 53.80701754385965,
"alnum_prop": 0.7541571568307792,
"repo_name": "evernote/evernote-sdk-ruby",
"id": "730950f28f29d8d190debd3ddbdb5990af956c85",
"size": "3067",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Ruby",
"bytes": "155639"
}
],
"symlink_target": ""
} |
// Copyright 2007-2011 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// 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.
namespace MassTransit.SubscriptionConfigurators
{
using System.Collections.Generic;
using Configurators;
using SubscriptionBuilders;
public class SubscriptionBusServiceBuilderConfiguratorImpl :
SubscriptionBusServiceBuilderConfigurator
{
readonly SubscriptionBuilderConfigurator _configurator;
public SubscriptionBusServiceBuilderConfiguratorImpl(SubscriptionBuilderConfigurator configurator)
{
_configurator = configurator;
}
public IEnumerable<ValidationResult> Validate()
{
return _configurator.Validate();
}
public SubscriptionBusServiceBuilder Configure(SubscriptionBusServiceBuilder builder)
{
SubscriptionBuilder subscriptionBuilder = _configurator.Configure();
builder.AddSubscriptionBuilder(subscriptionBuilder);
return builder;
}
}
} | {
"content_hash": "0b82ebe95612a75f7b07660f9f06cc4c",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 100,
"avg_line_length": 34.325581395348834,
"alnum_prop": 0.7601626016260162,
"repo_name": "petedavis/MassTransit",
"id": "e9cba46063510777b037b2834796a820d2681a89",
"size": "1478",
"binary": false,
"copies": "5",
"ref": "refs/heads/autofacextensions",
"path": "src/MassTransit/Configuration/SubscriptionConfigurators/SubscriptionBusServiceBuilderConfiguratorImpl.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2073"
},
{
"name": "C#",
"bytes": "3447221"
},
{
"name": "PowerShell",
"bytes": "1631"
},
{
"name": "Ruby",
"bytes": "41686"
}
],
"symlink_target": ""
} |
include(Platform/Windows-MSVC)
set(CMAKE_CUDA_COMPILE_PTX_COMPILATION
"<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -x cu -ptx <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
"<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -x cu -dc <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
"<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -x cu -c <SOURCE> -o <OBJECT> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
set(__IMPLICT_LINKS )
foreach(dir ${CMAKE_CUDA_HOST_IMPLICIT_LINK_DIRECTORIES})
string(APPEND __IMPLICT_LINKS " -LIBPATH:\"${dir}\"")
endforeach()
foreach(lib ${CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES})
string(APPEND __IMPLICT_LINKS " \"${lib}\"")
endforeach()
set(CMAKE_CUDA_LINK_EXECUTABLE
"<CMAKE_CUDA_HOST_LINK_LAUNCHER> <CMAKE_CUDA_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
set(_CMAKE_VS_LINK_DLL "<CMAKE_COMMAND> -E vs_link_dll --intdir=<OBJECT_DIR> --manifests <MANIFESTS> -- ")
set(_CMAKE_VS_LINK_EXE "<CMAKE_COMMAND> -E vs_link_exe --intdir=<OBJECT_DIR> --manifests <MANIFESTS> -- ")
set(CMAKE_CUDA_CREATE_SHARED_LIBRARY
"${_CMAKE_VS_LINK_DLL}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <LINK_FLAGS> <LINK_LIBRARIES>${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}")
set(CMAKE_CUDA_CREATE_SHARED_MODULE ${CMAKE_CUDA_CREATE_SHARED_LIBRARY})
set(CMAKE_CUDA_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
set(CMAKE_CUDA_LINKER_SUPPORTS_PDB ON)
set(CMAKE_CUDA_LINK_EXECUTABLE
"${_CMAKE_VS_LINK_EXE}<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>${_PLATFORM_LINK_FLAGS} <CMAKE_CUDA_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${__IMPLICT_LINKS} ${CMAKE_END_TEMP_FILE}")
unset(_CMAKE_VS_LINK_EXE)
unset(_CMAKE_VS_LINK_EXE)
set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
"<CMAKE_CUDA_COMPILER> <CMAKE_CUDA_LINK_FLAGS> <LANGUAGE_COMPILE_FLAGS> -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
"<CMAKE_CUDA_COMPILER> <FLAGS> <CMAKE_CUDA_LINK_FLAGS> -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
string(REPLACE "/D" "-D" _PLATFORM_DEFINES_CUDA "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_CXX}")
string(APPEND CMAKE_CUDA_FLAGS_INIT " ${PLATFORM_DEFINES_CUDA} -D_WINDOWS -Xcompiler=\"/W3${_FLAGS_CXX}\"")
string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -Xcompiler=\"-MDd -Zi -Ob0 -Od ${_RTC1}\"")
string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -Xcompiler=\"-MD -O2 -Ob2\" -DNDEBUG")
string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -Xcompiler=\"-MD -Zi -O2 -Ob1\" -DNDEBUG")
string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Xcompiler=\"-MD -O1 -Ob1\" -DNDEBUG")
set(CMAKE_CUDA_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
| {
"content_hash": "b768de921abcadff75222879d24593ad",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 323,
"avg_line_length": 73.23913043478261,
"alnum_prop": 0.7171267438409024,
"repo_name": "pipou/rae",
"id": "845fa4b6ffc630ac2b950213c0d7774b73660534",
"size": "3369",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "builder/cmake/macos/share/cmake-3.8/Modules/Platform/Windows-NVIDIA-CUDA.cmake",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "2544"
},
{
"name": "C",
"bytes": "48544"
},
{
"name": "C++",
"bytes": "6334"
},
{
"name": "CMake",
"bytes": "8152333"
},
{
"name": "CSS",
"bytes": "56991"
},
{
"name": "Cuda",
"bytes": "901"
},
{
"name": "Emacs Lisp",
"bytes": "44259"
},
{
"name": "Fortran",
"bytes": "6400"
},
{
"name": "HTML",
"bytes": "36295522"
},
{
"name": "JavaScript",
"bytes": "296574"
},
{
"name": "M4",
"bytes": "4433"
},
{
"name": "Roff",
"bytes": "4627932"
},
{
"name": "Shell",
"bytes": "59955"
},
{
"name": "Vim script",
"bytes": "140497"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Tue Feb 06 09:38:18 MST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.jgroups.stack.transport.TimerThreadPoolSupplier (BOM: * : All 2017.10.2 API)</title>
<meta name="date" content="2018-02-06">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface org.wildfly.swarm.config.jgroups.stack.transport.TimerThreadPoolSupplier (BOM: * : All 2017.10.2 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/transport/TimerThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack.transport">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.10.2</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/wildfly/swarm/config/jgroups/stack/transport/class-use/TimerThreadPoolSupplier.html" target="_top">Frames</a></li>
<li><a href="TimerThreadPoolSupplier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Interface org.wildfly.swarm.config.jgroups.stack.transport.TimerThreadPoolSupplier" class="title">Uses of Interface<br>org.wildfly.swarm.config.jgroups.stack.transport.TimerThreadPoolSupplier</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/transport/TimerThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack.transport">TimerThreadPoolSupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.jgroups.stack">org.wildfly.swarm.config.jgroups.stack</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.jgroups.stack">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/transport/TimerThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack.transport">TimerThreadPoolSupplier</a> in <a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/package-summary.html">org.wildfly.swarm.config.jgroups.stack</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/package-summary.html">org.wildfly.swarm.config.jgroups.stack</a> with parameters of type <a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/transport/TimerThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack.transport">TimerThreadPoolSupplier</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html" title="type parameter in Transport">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Transport.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/Transport.html#timerThreadPool-org.wildfly.swarm.config.jgroups.stack.transport.TimerThreadPoolSupplier-">timerThreadPool</a></span>(<a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/transport/TimerThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack.transport">TimerThreadPoolSupplier</a> supplier)</code>
<div class="block">A thread pool executor</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/wildfly/swarm/config/jgroups/stack/transport/TimerThreadPoolSupplier.html" title="interface in org.wildfly.swarm.config.jgroups.stack.transport">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.10.2</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/wildfly/swarm/config/jgroups/stack/transport/class-use/TimerThreadPoolSupplier.html" target="_top">Frames</a></li>
<li><a href="TimerThreadPoolSupplier.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2018 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
</body>
</html>
| {
"content_hash": "4f9b988452837532cce23af01f4bd1d4",
"timestamp": "",
"source": "github",
"line_count": 170,
"max_line_length": 536,
"avg_line_length": 47.62352941176471,
"alnum_prop": 0.6455039525691699,
"repo_name": "wildfly-swarm/wildfly-swarm-javadocs",
"id": "2af5a4863b573f1ea8554ba7be89d7ab4c96cdeb",
"size": "8096",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "2017.10.2/apidocs/org/wildfly/swarm/config/jgroups/stack/transport/class-use/TimerThreadPoolSupplier.html",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>high-school-geometry: 8 m 16 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.12.1 / high-school-geometry - 8.13.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
high-school-geometry
<small>
8.13.0
<span class="label label-success">8 m 16 s 🏆</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-11-02 04:17:47 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-11-02 04:17:47 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.12.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.5 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "palmskog@gmail.com"
homepage: "https://github.com/coq-community/HighSchoolGeometry"
dev-repo: "git+https://github.com/coq-community/HighSchoolGeometry.git"
bug-reports: "https://github.com/coq-community/HighSchoolGeometry/issues"
license: "LGPL-2.1-or-later"
synopsis: "Geometry in Coq for French high school"
description: """
This Coq library is dedicated to high-shool geometry teaching. The
axiomatisation for affine Euclidean space is in a non analytic setting.
Includes a proof of Ptolemy's theorem."""
build: [make "-j%{jobs}%"]
install: [make "install"]
depends: [
"coq" {>= "8.12" & < "8.15~"}
]
tags: [
"category:Mathematics/Geometry/General"
"keyword:geometry"
"keyword:teaching"
"keyword:high school"
"keyword:Ptolemy's theorem"
"logpath:HighSchoolGeometry"
"date:2021-08-06"
]
authors: [
"Frédérique Guilhot"
"Tuan-Minh Pham"
]
url {
src: "https://github.com/coq-community/HighSchoolGeometry/archive/v8.13.tar.gz"
checksum: "sha512=47dba843c3541c628725224b6f9d353b5e5d224cd16ae52d6980a6aec9d698855477934609364dfaaa91271818f530d7af6d344c2ee7c38f8c0e0a3e226a655e"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-high-school-geometry.8.13.0 coq.8.12.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-high-school-geometry.8.13.0 coq.8.12.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>11 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-high-school-geometry.8.13.0 coq.8.12.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>8 m 16 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 12 M</p>
<ul>
<li>243 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/exercice_morley.glob</code></li>
<li>220 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/metrique_triangle.glob</code></li>
<li>168 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/contact.glob</code></li>
<li>166 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orientation.glob</code></li>
<li>154 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/equations_droites.glob</code></li>
<li>154 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/barycentre.glob</code></li>
<li>149 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/angles_vecteurs.glob</code></li>
<li>143 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/operations_complexes.glob</code></li>
<li>139 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orientation.vo</code></li>
<li>137 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/barycentre.vo</code></li>
<li>132 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/contact.vo</code></li>
<li>128 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/reflexion_plane.glob</code></li>
<li>127 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/angles_droites.glob</code></li>
<li>127 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/cocyclicite.glob</code></li>
<li>125 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/triangles_semblables.glob</code></li>
<li>124 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_inversion.glob</code></li>
<li>122 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/trigo.glob</code></li>
<li>122 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/aire_signee.glob</code></li>
<li>120 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/exercice_morley.vo</code></li>
<li>119 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/parallelisme_concours.glob</code></li>
<li>119 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/inversion.vo</code></li>
<li>117 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Plans_paralleles.vo</code></li>
<li>117 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/exercice_espace.vo</code></li>
<li>113 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/parallelisme_concours.vo</code></li>
<li>113 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/affine_classiques.vo</code></li>
<li>113 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/reflexion_plane.vo</code></li>
<li>112 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/aire_signee.vo</code></li>
<li>111 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/applications_cocyclicite.glob</code></li>
<li>107 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/dilatations.vo</code></li>
<li>107 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/inversion.glob</code></li>
<li>106 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/dilatations.glob</code></li>
<li>105 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/triangles_semblables.vo</code></li>
<li>105 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_transformations.glob</code></li>
<li>105 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/metrique_triangle.vo</code></li>
<li>104 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/trigo.vo</code></li>
<li>104 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/operations_complexes.vo</code></li>
<li>99 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Droite_plan_espace.vo</code></li>
<li>99 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/angles_vecteurs.vo</code></li>
<li>97 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/cocyclicite.vo</code></li>
<li>96 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/affine_classiques.glob</code></li>
<li>95 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Ptolemee.vo</code></li>
<li>94 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_reflexions.vo</code></li>
<li>93 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/formes_complexes.vo</code></li>
<li>93 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/milieu.vo</code></li>
<li>93 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/coplanarite.vo</code></li>
<li>92 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/transformations_contact.glob</code></li>
<li>90 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_transformations.vo</code></li>
<li>88 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/homoth_Euler.vo</code></li>
<li>88 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_dilatations.glob</code></li>
<li>87 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/alignement.vo</code></li>
<li>87 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/representant_unitaire.vo</code></li>
<li>87 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/angles_droites.vo</code></li>
<li>86 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/applications_cocyclicite.vo</code></li>
<li>86 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/equations_droites.vo</code></li>
<li>85 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/vecteur.vo</code></li>
<li>84 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/formes_complexes.glob</code></li>
<li>83 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_inversion.vo</code></li>
<li>82 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Plans_paralleles.glob</code></li>
<li>82 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/exercice_espace.glob</code></li>
<li>82 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_translation_rotation.vo</code></li>
<li>81 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/mediatrice.vo</code></li>
<li>80 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthogonalite.vo</code></li>
<li>79 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthocentre.vo</code></li>
<li>79 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/rotation_plane.vo</code></li>
<li>78 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Plan_espace.vo</code></li>
<li>78 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/euclidien_classiques.vo</code></li>
<li>77 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/equations_cercles.glob</code></li>
<li>75 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/transformations_contact.vo</code></li>
<li>74 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Field_affine.vo</code></li>
<li>74 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Droite_plan_espace.glob</code></li>
<li>74 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_dilatations.vo</code></li>
<li>74 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_conjugaison.vo</code></li>
<li>74 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/homothetie_plane.vo</code></li>
<li>74 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/distance_euclidienne.vo</code></li>
<li>72 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_similitudes.glob</code></li>
<li>71 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_dilatations.vo</code></li>
<li>70 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/mesure_algebrique.vo</code></li>
<li>70 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complements_cercle.vo</code></li>
<li>70 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_reflexions.glob</code></li>
<li>69 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/similitudes_directes.vo</code></li>
<li>68 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/repere_plan.vo</code></li>
<li>68 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/puissance_cercle.vo</code></li>
<li>68 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/cercle.vo</code></li>
<li>68 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_translation_rotation.glob</code></li>
<li>68 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_dilatations.glob</code></li>
<li>66 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Droite_espace.vo</code></li>
<li>66 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/rotation_plane.glob</code></li>
<li>66 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_similitudes.vo</code></li>
<li>66 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Ptolemee.glob</code></li>
<li>65 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/repere_ortho_plan.vo</code></li>
<li>65 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Rutile.vo</code></li>
<li>64 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/representant_unitaire.glob</code></li>
<li>63 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/similitudes_directes.glob</code></li>
<li>63 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/isocele.vo</code></li>
<li>62 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_transformations.vo</code></li>
<li>62 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/droite_Euler.vo</code></li>
<li>62 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/determinant.vo</code></li>
<li>62 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes.vo</code></li>
<li>62 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Plan_espace.glob</code></li>
<li>61 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_analytique.vo</code></li>
<li>60 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/produit_scalaire.vo</code></li>
<li>60 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/homoth_Euler.glob</code></li>
<li>59 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_conjugaison.glob</code></li>
<li>59 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/equations_cercles.vo</code></li>
<li>59 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthogonalite_espace.vo</code></li>
<li>56 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/projection_orthogonale.vo</code></li>
<li>55 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthogonalite.glob</code></li>
<li>54 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_transformations.glob</code></li>
<li>54 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_exercice.vo</code></li>
<li>53 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/homothetie_plane.glob</code></li>
<li>52 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_analytique.glob</code></li>
<li>50 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/mediatrice.glob</code></li>
<li>50 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/euclidien_classiques.glob</code></li>
<li>47 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/milieu.glob</code></li>
<li>45 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthocentre.glob</code></li>
<li>41 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/determinant.glob</code></li>
<li>40 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/isocele.glob</code></li>
<li>40 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/alignement.glob</code></li>
<li>38 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/distance_euclidienne.glob</code></li>
<li>37 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/vecteur.glob</code></li>
<li>37 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthogonalite_espace.glob</code></li>
<li>37 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/repere_plan.glob</code></li>
<li>36 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/produit_scalaire.glob</code></li>
<li>35 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/coplanarite.glob</code></li>
<li>34 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes.glob</code></li>
<li>34 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/mesure_algebrique.glob</code></li>
<li>34 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complements_cercle.glob</code></li>
<li>33 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Field_affine.glob</code></li>
<li>32 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_exercice.glob</code></li>
<li>32 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orientation.v</code></li>
<li>32 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/cercle.glob</code></li>
<li>31 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Rutile.glob</code></li>
<li>30 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/repere_ortho_plan.glob</code></li>
<li>30 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/puissance_cercle.glob</code></li>
<li>28 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/metrique_triangle.v</code></li>
<li>27 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Droite_espace.glob</code></li>
<li>26 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/exercice_morley.v</code></li>
<li>26 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/reflexion_plane.v</code></li>
<li>23 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/contact.v</code></li>
<li>23 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/trigo.v</code></li>
<li>23 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/angles_vecteurs.v</code></li>
<li>22 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/operations_complexes.v</code></li>
<li>21 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/triangles_semblables.v</code></li>
<li>21 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/cocyclicite.v</code></li>
<li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/equations_droites.v</code></li>
<li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/projection_orthogonale.glob</code></li>
<li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/angles_droites.v</code></li>
<li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/aire_signee.v</code></li>
<li>19 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/applications_cocyclicite.v</code></li>
<li>19 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/inversion.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/formes_complexes.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/dilatations.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Plans_paralleles.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_transformations.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/barycentre.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/transformations_contact.v</code></li>
<li>17 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/parallelisme_concours.v</code></li>
<li>17 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_translation_rotation.v</code></li>
<li>16 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_inversion.v</code></li>
<li>16 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/droite_Euler.glob</code></li>
<li>16 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/affine_classiques.v</code></li>
<li>15 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/rotation_plane.v</code></li>
<li>15 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_dilatations.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/representant_unitaire.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/exercice_espace.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_reflexions.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Ptolemee.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Plan_espace.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/similitudes_directes.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/homoth_Euler.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Droite_plan_espace.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_similitudes.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/mediatrice.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_conjugaison.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthocentre.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_transformations.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthogonalite.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/milieu.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/alignement.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/composee_dilatations.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/homothetie_plane.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/puissance_cercle.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/euclidien_classiques.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complements_cercle.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/determinant.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/cercle.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/vecteur.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/distance_euclidienne.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/isocele.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/equations_cercles.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/repere_ortho_plan.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/orthogonalite_espace.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_analytique.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/coplanarite.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/produit_scalaire.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Rutile.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Field_affine.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/repere_plan.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/complexes_exercice.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/mesure_algebrique.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/Droite_espace.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/droite_Euler.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/HighSchoolGeometry/projection_orthogonale.v</code></li>
</ul>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-high-school-geometry.8.13.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| {
"content_hash": "bb278c51e232b51f5b638df7da93492f",
"timestamp": "",
"source": "github",
"line_count": 370,
"max_line_length": 159,
"avg_line_length": 90.54864864864865,
"alnum_prop": 0.6478225830522639,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "825acacc3e28b8c9908368637b720bb9328c137b",
"size": "33530",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.07.1-2.0.6/released/8.12.1/high-school-geometry/8.13.0.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.rengamobile439669" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>rengaMobile</name>
<description>
An Ionic Framework and Cordova project.
</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">
Ionic Framework Team
</author>
<content src="index.html"/>
<access origin="*"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true"/>
</feature>
</widget> | {
"content_hash": "bf364c288735dfcb59fb402c0838787b",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 148,
"avg_line_length": 43.3,
"alnum_prop": 0.6974595842956121,
"repo_name": "danihegglin/renga",
"id": "c48534cee198f8185b889e94805a521b4cd80a43",
"size": "866",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "mobile/config.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "514853"
},
{
"name": "CoffeeScript",
"bytes": "5908"
},
{
"name": "HTML",
"bytes": "12269"
},
{
"name": "JavaScript",
"bytes": "2650363"
},
{
"name": "Scala",
"bytes": "13336"
}
],
"symlink_target": ""
} |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE404_Improper_Resource_Shutdown__open_fclose_72b.cpp
Label Definition File: CWE404_Improper_Resource_Shutdown__open.label.xml
Template File: source-sinks-72b.tmpl.cpp
*/
/*
* @description
* CWE: 404 Improper Resource Shutdown or Release
* BadSource: Open a file using open()
* Sinks: fclose
* GoodSink: Close the file using close()
* BadSink : Close the file using fclose()
* Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files
*
* */
#include "std_testcase.h"
#include <vector>
#ifdef _WIN32
#define OPEN _open
#define CLOSE _close
#else
#include <unistd.h>
#define OPEN open
#define CLOSE close
#endif
using namespace std;
namespace CWE404_Improper_Resource_Shutdown__open_fclose_72
{
#ifndef OMITBAD
void badSink(vector<int> dataVector)
{
/* copy data out of dataVector */
int data = dataVector[2];
if (data != -1)
{
/* FLAW: Attempt to close the file using fclose() instead of close() */
fclose((FILE *)data);
}
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodB2G uses the BadSource with the GoodSink */
void goodB2GSink(vector<int> dataVector)
{
int data = dataVector[2];
if (data != -1)
{
/* FIX: Close the file using close() */
CLOSE(data);
}
}
#endif /* OMITGOOD */
} /* close namespace */
| {
"content_hash": "89eec1d94dc6636989346e7782fe5dbf",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 109,
"avg_line_length": 22.796875,
"alnum_prop": 0.6463331048663468,
"repo_name": "JianpingZeng/xcc",
"id": "93539d2c8f3d91adb300053300bc4a539ed570f9",
"size": "1459",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "xcc/test/juliet/testcases/CWE404_Improper_Resource_Shutdown/CWE404_Improper_Resource_Shutdown__open_fclose_72b.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
import java.util.ArrayList;
/**
* Created by netout on 31.12.2016.
*/
public class Option {
private String flavorText;
private ArrayList<Action> actions;
public Option(String flavorText){
this.flavorText = flavorText;
actions = new ArrayList<>();
}
public String getFlavorText() {
return this.flavorText;
}
public void action(Core core){
for (Action action: actions
) {
action.execute(core);
}
}
public String toXml(){
String result = "";
return result;
}
} | {
"content_hash": "8d527587948c87b15c417c8e09866bb7",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 38,
"avg_line_length": 19.5,
"alnum_prop": 0.576068376068376,
"repo_name": "Niozz/TextDungeon",
"id": "7c314b6e286a5957c14ca0c8a1e3649db3cc1cd7",
"size": "585",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Option.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "7171"
}
],
"symlink_target": ""
} |
{% assign url = page.url | remove: 'index.html' %}
<h2 class="h2__promote h2__outreach"><a href="{{ site.baseurl }}/in-the-workplace/">In the workplace</a></h2>
<ul class="nav__secondary">
{% for link in site.data.nav %}
{% if link.title == "In the workplace" %}
{% for subcategory in link.subcategories %}
<li><a href="{{ subcategory.href | prepend: site.baseurl }}" class="outreach{% if url contains subcategory.href %} active{% endif %}">{{ subcategory.subtitle }}</a>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
<div class="widget widget__centred">
<a href="{{ site.baseurl }}/in-the-workplace/"><img src="{{ site.baseurl }}/assets/outreach-icon.png" alt="Shell icon" title="outreach icon" class=""></a>
</div>
| {
"content_hash": "8518f939df6592910ba14753a23ecb04",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 168,
"avg_line_length": 42.94117647058823,
"alnum_prop": 0.636986301369863,
"repo_name": "eye-division/sussex-mindfulness",
"id": "9be545a3579b5c89c6bf5a2d19ff46ea97a8d812",
"size": "730",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_includes/outreach-sidebar.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "282366"
},
{
"name": "JavaScript",
"bytes": "2065"
},
{
"name": "Ruby",
"bytes": "279"
},
{
"name": "SCSS",
"bytes": "68199"
}
],
"symlink_target": ""
} |
<?php
/* GCNAFNAFBundle:Default:index.html.twig */
class __TwigTemplate_3fb3b8ad9c19d9db1236c6ccb6b7b1cab79b409fca0fa21037f74b886e782ae9 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("GCNAFNAFBundle::layoutlogin.html.twig");
$this->blocks = array(
'content' => array($this, 'block_content'),
);
}
protected function doGetParent(array $context)
{
return "GCNAFNAFBundle::layoutlogin.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 2
public function block_content($context, array $blocks = array())
{
echo "\t
<div align=\"center\">\t
";
// line 4
if ($this->getContext($context, "message")) {
echo "\t\t\t\t
<p id=\"msg\">";
// line 5
echo twig_escape_filter($this->env, $this->getContext($context, "message"), "html", null, true);
echo "</p>
";
}
// line 6
echo "\t\t\t\t
<br/>
<form method=\"post\" ";
// line 8
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getContext($context, "form"), 'enctype');
echo ">\t\t\t\t\t
";
// line 9
echo $this->env->getExtension('form')->renderer->renderBlock($this->getContext($context, "form"), 'form_start');
echo "
";
// line 10
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getContext($context, "form"), 'errors');
echo "
<div >
<p class=\"double\">";
// line 12
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "login"), 'label');
echo " ";
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "login"), 'widget');
echo "</p>
";
// line 13
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "login"), 'errors');
echo "\t\t\t\t\t\t\t\t
</div>
<br/>
<div >
<p class=\"double\">";
// line 17
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "pwd"), 'label');
echo " ";
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "pwd"), 'widget');
echo "</p>
";
// line 18
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "pwd"), 'errors');
echo "\t\t\t\t\t\t\t\t
</div>
<br/>
<div >
<table border=\"0\" align=\"center\">
<tr>
<td width=\"100px\">";
// line 24
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "btnConnect"), 'label');
echo " ";
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($this->getContext($context, "form"), "btnConnect"), 'widget');
echo "</td>
<td></td>
</tr>
</table>
</div>
<br/>
";
// line 30
echo $this->env->getExtension('form')->renderer->renderBlock($this->getContext($context, "form"), 'form_end');
echo "\t\t\t\t\t
</form>\t
</div>\t\t\t\t\t\t\t\t
";
}
public function getTemplateName()
{
return "GCNAFNAFBundle:Default:index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 99 => 30, 88 => 24, 79 => 18, 73 => 17, 66 => 13, 60 => 12, 55 => 10, 51 => 9, 47 => 8, 43 => 6, 38 => 5, 34 => 4, 28 => 2,);
}
}
| {
"content_hash": "2ce8cf80ed64fa3c32463ac9dad66986",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 161,
"avg_line_length": 37.6,
"alnum_prop": 0.5166223404255319,
"repo_name": "baitouchente/GCnaf",
"id": "3ab2505978c0bc8db293cfe8505d082d621413af",
"size": "4512",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/cache/dev/twig/3f/b3/b8ad9c19d9db1236c6ccb6b7b1cab79b409fca0fa21037f74b886e782ae9.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "40192"
},
{
"name": "PHP",
"bytes": "246263"
}
],
"symlink_target": ""
} |
All Notable changes to `laravel-url-signer` will be documented in this file
## 1.0.0 - 2015-08-15
### Added
- Everything, initial release
| {
"content_hash": "fecc5d58d20af854221af823fa396959",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 75,
"avg_line_length": 23.333333333333332,
"alnum_prop": 0.7214285714285714,
"repo_name": "payssion/laravel-url-signer",
"id": "d329d26464ddfbbe7bdd0beebccdad32ecd691ec",
"size": "153",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "CHANGELOG.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "6743"
}
],
"symlink_target": ""
} |
--TEST--
Test ctype_upper() function : basic functionality
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
/* Prototype : bool ctype_upper(mixed $c)
* Description: Checks for uppercase character(s)
* Source code: ext/ctype/ctype.c
*/
echo "*** Testing ctype_upper() : basic functionality ***\n";
$orig = setlocale(LC_CTYPE, "C");
$c1 = 'HELLOWORLD';
$c2 = "Hello, World!\n";
var_dump(ctype_upper($c1));
var_dump(ctype_upper($c2));
setlocale(LC_CTYPE, $orig);
?>
===DONE===
--EXPECTF--
*** Testing ctype_upper() : basic functionality ***
bool(true)
bool(false)
===DONE===
| {
"content_hash": "e5d677aa9cb877c3bef88dc29f15d756",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 61,
"avg_line_length": 20.586206896551722,
"alnum_prop": 0.6415410385259631,
"repo_name": "lunaczp/learning",
"id": "635e4818dc5e6906d09817049e16693c019459c0",
"size": "597",
"binary": false,
"copies": "11",
"ref": "refs/heads/master",
"path": "language/c/testPhpSrc/php-5.6.17/ext/ctype/tests/ctype_upper_basic.phpt",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "4526"
},
{
"name": "Assembly",
"bytes": "14500403"
},
{
"name": "Awk",
"bytes": "21252"
},
{
"name": "Batchfile",
"bytes": "2526"
},
{
"name": "C",
"bytes": "381839655"
},
{
"name": "C++",
"bytes": "10162228"
},
{
"name": "CMake",
"bytes": "68196"
},
{
"name": "CSS",
"bytes": "3943"
},
{
"name": "D",
"bytes": "1022"
},
{
"name": "DTrace",
"bytes": "4528"
},
{
"name": "Fortran",
"bytes": "1834"
},
{
"name": "GAP",
"bytes": "4344"
},
{
"name": "GDB",
"bytes": "31864"
},
{
"name": "Gnuplot",
"bytes": "148"
},
{
"name": "Go",
"bytes": "732"
},
{
"name": "HTML",
"bytes": "86756"
},
{
"name": "Java",
"bytes": "8286"
},
{
"name": "JavaScript",
"bytes": "238365"
},
{
"name": "Lex",
"bytes": "121233"
},
{
"name": "Limbo",
"bytes": "1609"
},
{
"name": "Lua",
"bytes": "96"
},
{
"name": "M4",
"bytes": "483288"
},
{
"name": "Makefile",
"bytes": "1915601"
},
{
"name": "Nix",
"bytes": "180099"
},
{
"name": "Objective-C",
"bytes": "1742504"
},
{
"name": "OpenEdge ABL",
"bytes": "4238"
},
{
"name": "PHP",
"bytes": "27984629"
},
{
"name": "Pascal",
"bytes": "74868"
},
{
"name": "Perl",
"bytes": "317465"
},
{
"name": "Perl 6",
"bytes": "6916"
},
{
"name": "Python",
"bytes": "21547"
},
{
"name": "R",
"bytes": "1112"
},
{
"name": "Roff",
"bytes": "435717"
},
{
"name": "Scilab",
"bytes": "22980"
},
{
"name": "Shell",
"bytes": "468206"
},
{
"name": "UnrealScript",
"bytes": "20840"
},
{
"name": "Vue",
"bytes": "563"
},
{
"name": "XSLT",
"bytes": "7946"
},
{
"name": "Yacc",
"bytes": "172805"
},
{
"name": "sed",
"bytes": "2073"
}
],
"symlink_target": ""
} |
package com.sun.tools.attach;
import com.sun.tools.attach.spi.AttachProvider;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.io.IOException;
/**
* A Java virtual machine.
*
* <p> A <code>VirtualMachine</code> represents a Java virtual machine to which this
* Java virtual machine has attached. The Java virtual machine to which it is
* attached is sometimes called the <i>target virtual machine</i>, or <i>target VM</i>.
* An application (typically a tool such as a managemet console or profiler) uses a
* VirtualMachine to load an agent into the target VM. For example, a profiler tool
* written in the Java Language might attach to a running application and load its
* profiler agent to profile the running application. </p>
*
* <p> A VirtualMachine is obtained by invoking the {@link #attach(String) attach} method
* with an identifier that identifies the target virtual machine. The identifier is
* implementation-dependent but is typically the process identifier (or pid) in
* environments where each Java virtual machine runs in its own operating system process.
* Alternatively, a <code>VirtualMachine</code> instance is obtained by invoking the
* {@link #attach(VirtualMachineDescriptor) attach} method with a {@link
* com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor} obtained
* from the list of virtual machine descriptors returned by the {@link #list list} method.
* Once a reference to a virtual machine is obtained, the {@link #loadAgent loadAgent},
* {@link #loadAgentLibrary loadAgentLibrary}, and {@link #loadAgentPath loadAgentPath}
* methods are used to load agents into target virtual machine. The {@link
* #loadAgent loadAgent} method is used to load agents that are written in the Java
* Language and deployed in a {@link java.util.jar.JarFile JAR file}. (See
* {@link java.lang.instrument} for a detailed description on how these agents
* are loaded and started). The {@link #loadAgentLibrary loadAgentLibrary} and
* {@link #loadAgentPath loadAgentPath} methods are used to load agents that
* are deployed in a dynamic library and make use of the <a
* href="../../../../../../../../technotes/guides/jvmti/index.html">JVM Tools
* Interface</a>. </p>
*
* <p> In addition to loading agents a VirtualMachine provides read access to the
* {@link java.lang.System#getProperties() system properties} in the target VM.
* This can be useful in some environments where properties such as
* <code>java.home</code>, <code>os.name</code>, or <code>os.arch</code> are
* used to construct the path to agent that will be loaded into the target VM.
*
* <p> The following example demonstrates how VirtualMachine may be used:</p>
*
* <pre>
*
* // attach to target VM
* VirtualMachine vm = VirtualMachine.attach("2177");
*
* // get system properties in target VM
* Properties props = vm.getSystemProperties();
*
* // construct path to management agent
* String home = props.getProperty("java.home");
* String agent = home + File.separator + "lib" + File.separator
* + "management-agent.jar";
*
* // load agent into target VM
* vm.loadAgent(agent, "com.sun.management.jmxremote.port=5000");
*
* // detach
* vm.detach();
*
* </pre>
*
* <p> In this example we attach to a Java virtual machine that is identified by
* the process identifier <code>2177</code>. The system properties from the target
* VM are then used to construct the path to a <i>management agent</i> which is then
* loaded into the target VM. Once loaded the client detaches from the target VM. </p>
*
* <p> A VirtualMachine is safe for use by multiple concurrent threads. </p>
*
* @since 1.6
*/
public abstract class VirtualMachine {
private AttachProvider provider;
private String id;
private volatile int hash; // 0 => not computed
/**
* Initializes a new instance of this class.
*
* @param provider
* The attach provider creating this class.
* @param id
* The abstract identifier that identifies the Java virtual machine.
*
* @throws NullPointerException
* If <code>provider</code> or <code>id</code> is <code>null</code>.
*/
protected VirtualMachine(AttachProvider provider, String id) {
if (provider == null) {
throw new NullPointerException("provider cannot be null");
}
if (id == null) {
throw new NullPointerException("id cannot be null");
}
this.provider = provider;
this.id = id;
}
/**
* Return a list of Java virtual machines.
*
* <p> This method returns a list of Java {@link
* com.sun.tools.attach.VirtualMachineDescriptor} elements.
* The list is an aggregation of the virtual machine
* descriptor lists obtained by invoking the {@link
* com.sun.tools.attach.spi.AttachProvider#listVirtualMachines
* listVirtualMachines} method of all installed
* {@link com.sun.tools.attach.spi.AttachProvider attach providers}.
* If there are no Java virtual machines known to any provider
* then an empty list is returned.
*
* @return The list of virtual machine descriptors.
*/
public static List<VirtualMachineDescriptor> list() {
ArrayList<VirtualMachineDescriptor> l =
new ArrayList<VirtualMachineDescriptor>();
List<AttachProvider> providers = AttachProvider.providers();
for (AttachProvider provider: providers) {
l.addAll(provider.listVirtualMachines());
}
return l;
}
/**
* Attaches to a Java virtual machine.
*
* <p> This method obtains the list of attach providers by invoking the
* {@link com.sun.tools.attach.spi.AttachProvider#providers()
* AttachProvider.providers()} method. It then iterates overs the list
* and invokes each provider's {@link
* com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(java.lang.String)
* attachVirtualMachine} method in turn. If a provider successfully
* attaches then the iteration terminates, and the VirtualMachine created
* by the provider that successfully attached is returned by this method.
* If the <code>attachVirtualMachine</code> method of all providers throws
* {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
* then this method also throws <code>AttachNotSupportedException</code>.
* This means that <code>AttachNotSupportedException</code> is thrown when
* the identifier provided to this method is invalid, or the identifier
* corresponds to a Java virtual machine that does not exist, or none
* of the providers can attach to it. This exception is also thrown if
* {@link com.sun.tools.attach.spi.AttachProvider#providers()
* AttachProvider.providers()} returns an empty list. </p>
*
* @param id
* The abstract identifier that identifies the Java virtual machine.
*
* @return A VirtualMachine representing the target VM.
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link com.sun.tools.attach.AttachPermission AttachPermission}
* <tt>("attachVirtualMachine")</tt>, or another permission
* required by the implementation.
*
* @throws AttachNotSupportedException
* If the <code>attachVirtualmachine</code> method of all installed
* providers throws <code>AttachNotSupportedException</code>, or
* there aren't any providers installed.
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>id</code> is <code>null</code>.
*/
public static VirtualMachine attach(String id)
throws AttachNotSupportedException, IOException
{
if (id == null) {
throw new NullPointerException("id cannot be null");
}
List<AttachProvider> providers = AttachProvider.providers();
if (providers.size() == 0) {
throw new AttachNotSupportedException("no providers installed");
}
AttachNotSupportedException lastExc = null;
for (AttachProvider provider: providers) {
try {
return provider.attachVirtualMachine(id);
} catch (AttachNotSupportedException x) {
lastExc = x;
}
}
throw lastExc;
}
/**
* Attaches to a Java virtual machine.
*
* <p> This method first invokes the {@link
* com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method
* of the given virtual machine descriptor to obtain the attach provider. It
* then invokes the attach provider's {@link
* com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(VirtualMachineDescriptor)
* attachVirtualMachine} to attach to the target VM.
*
* @param vmd
* The virtual machine descriptor.
*
* @return A VirtualMachine representing the target VM.
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link com.sun.tools.attach.AttachPermission AttachPermission}
* <tt>("attachVirtualMachine")</tt>, or another permission
* required by the implementation.
*
* @throws AttachNotSupportedException
* If the attach provider's <code>attachVirtualmachine</code>
* throws <code>AttachNotSupportedException</code>.
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>vmd</code> is <code>null</code>.
*/
public static VirtualMachine attach(VirtualMachineDescriptor vmd)
throws AttachNotSupportedException, IOException
{
return vmd.provider().attachVirtualMachine(vmd);
}
/**
* Detach from the virtual machine.
*
* <p> After detaching from the virtual machine, any further attempt to invoke
* operations on that virtual machine will cause an {@link java.io.IOException
* IOException} to be thrown. If an operation (such as {@link #loadAgent
* loadAgent} for example) is in progress when this method is invoked then
* the behaviour is implementation dependent. In other words, it is
* implementation specific if the operation completes or throws
* <tt>IOException</tt>.
*
* <p> If already detached from the virtual machine then invoking this
* method has no effect. </p>
*
* @throws IOException
* If an I/O error occurs
*/
public abstract void detach() throws IOException;
/**
* Returns the provider that created this virtual machine.
*
* @return The provider that created this virtual machine.
*/
public final AttachProvider provider() {
return provider;
}
/**
* Returns the identifier for this Java virtual machine.
*
* @return The identifier for this Java virtual machine.
*/
public final String id() {
return id;
}
/**
* Loads an agent library.
*
* <p> A <a href="../../../../../../../../technotes/guides/jvmti/index.html">JVM
* TI</a> client is called an <i>agent</i>. It is developed in a native language.
* A JVM TI agent is deployed in a platform specific manner but it is typically the
* platform equivalent of a dynamic library. This method causes the given agent
* library to be loaded into the target VM (if not already loaded).
* It then causes the target VM to invoke the <code>Agent_OnAttach</code> function
* as specified in the
* <a href="../../../../../../../../technotes/guides/jvmti/index.html"> JVM Tools
* Interface</a> specification. Note that the <code>Agent_OnAttach</code>
* function is invoked even if the agent library was loaded prior to invoking
* this method.
*
* <p> The agent library provided is the name of the agent library. It is interpreted
* in the target virtual machine in an implementation-dependent manner. Typically an
* implementation will expand the library name into an operating system specific file
* name. For example, on UNIX systems, the name <tt>foo</tt> might be expanded to
* <tt>libfoo.so</tt>, and located using the search path specified by the
* <tt>LD_LIBRARY_PATH</tt> environment variable.</p>
*
* <p> If the <code>Agent_OnAttach</code> function in the agent library returns
* an error then an {@link com.sun.tools.attach.AgentInitializationException} is
* thrown. The return value from the <code>Agent_OnAttach</code> can then be
* obtained by invoking the {@link
* com.sun.tools.attach.AgentInitializationException#returnValue() returnValue}
* method on the exception. </p>
*
* @param agentLibrary
* The name of the agent library.
*
* @param options
* The options to provide to the <code>Agent_OnAttach</code>
* function (can be <code>null</code>).
*
* @throws AgentLoadException
* If the agent library does not exist, or cannot be loaded for
* another reason.
*
* @throws AgentInitializationException
* If the <code>Agent_OnAttach</code> function returns an error
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>agentLibrary</code> is <code>null</code>.
*
* @see com.sun.tools.attach.AgentInitializationException#returnValue()
*/
public abstract void loadAgentLibrary(String agentLibrary, String options)
throws AgentLoadException, AgentInitializationException, IOException;
/**
* Loads an agent library.
*
* <p> This convenience method works as if by invoking:
*
* <blockquote><tt>
* {@link #loadAgentLibrary(String, String) loadAgentLibrary}(agentLibrary, null);
* </tt></blockquote>
*
* @param agentLibrary
* The name of the agent library.
*
* @throws AgentLoadException
* If the agent library does not exist, or cannot be loaded for
* another reason.
*
* @throws AgentInitializationException
* If the <code>Agent_OnAttach</code> function returns an error
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>agentLibrary</code> is <code>null</code>.
*/
public void loadAgentLibrary(String agentLibrary)
throws AgentLoadException, AgentInitializationException, IOException
{
loadAgentLibrary(agentLibrary, null);
}
/**
* Load a native agent library by full pathname.
*
* <p> A <a href="../../../../../../../../technotes/guides/jvmti/index.html">JVM
* TI</a> client is called an <i>agent</i>. It is developed in a native language.
* A JVM TI agent is deployed in a platform specific manner but it is typically the
* platform equivalent of a dynamic library. This method causes the given agent
* library to be loaded into the target VM (if not already loaded).
* It then causes the target VM to invoke the <code>Agent_OnAttach</code> function
* as specified in the
* <a href="../../../../../../../../technotes/guides/jvmti/index.html"> JVM Tools
* Interface</a> specification. Note that the <code>Agent_OnAttach</code>
* function is invoked even if the agent library was loaded prior to invoking
* this method.
*
* <p> The agent library provided is the absolute path from which to load the
* agent library. Unlike {@link #loadAgentLibrary loadAgentLibrary}, the library name
* is not expanded in the target virtual machine. </p>
*
* <p> If the <code>Agent_OnAttach</code> function in the agent library returns
* an error then an {@link com.sun.tools.attach.AgentInitializationException} is
* thrown. The return value from the <code>Agent_OnAttach</code> can then be
* obtained by invoking the {@link
* com.sun.tools.attach.AgentInitializationException#returnValue() returnValue}
* method on the exception. </p>
*
* @param agentPath
* The full path of the agent library.
*
* @param options
* The options to provide to the <code>Agent_OnAttach</code>
* function (can be <code>null</code>).
*
* @throws AgentLoadException
* If the agent library does not exist, or cannot be loaded for
* another reason.
*
* @throws AgentInitializationException
* If the <code>Agent_OnAttach</code> function returns an error
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>agentPath</code> is <code>null</code>.
*
* @see com.sun.tools.attach.AgentInitializationException#returnValue()
*/
public abstract void loadAgentPath(String agentPath, String options)
throws AgentLoadException, AgentInitializationException, IOException;
/**
* Load a native agent library by full pathname.
*
* <p> This convenience method works as if by invoking:
*
* <blockquote><tt>
* {@link #loadAgentPath(String, String) loadAgentPath}(agentLibrary, null);
* </tt></blockquote>
*
* @param agentPath
* The full path to the agent library.
*
* @throws AgentLoadException
* If the agent library does not exist, or cannot be loaded for
* another reason.
*
* @throws AgentInitializationException
* If the <code>Agent_OnAttach</code> function returns an error
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>agentPath</code> is <code>null</code>.
*/
public void loadAgentPath(String agentPath)
throws AgentLoadException, AgentInitializationException, IOException
{
loadAgentPath(agentPath, null);
}
/**
* Loads an agent.
*
* <p> The agent provided to this method is a path name to a JAR file on the file
* system of the target virtual machine. This path is passed to the target virtual
* machine where it is interpreted. The target virtual machine attempts to start
* the agent as specified by the {@link java.lang.instrument} specification.
* That is, the specified JAR file is added to the system class path (of the target
* virtual machine), and the <code>agentmain</code> method of the agent class, specified
* by the <code>Agent-Class</code> attribute in the JAR manifest, is invoked. This
* method completes when the <code>agentmain</code> method completes.
*
* @param agent
* Path to the JAR file containing the agent.
*
* @param options
* The options to provide to the agent's <code>agentmain</code>
* method (can be <code>null</code>).
*
* @throws AgentLoadException
* If the agent does not exist, or cannot be started in the manner
* specified in the {@link java.lang.instrument} specification.
*
* @throws AgentInitializationException
* If the <code>agentmain</code> throws an exception
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>agent</code> is <code>null</code>.
*/
public abstract void loadAgent(String agent, String options)
throws AgentLoadException, AgentInitializationException, IOException;
/**
* Loads an agent.
*
* <p> This convenience method works as if by invoking:
*
* <blockquote><tt>
* {@link #loadAgent(String, String) loadAgent}(agent, null);
* </tt></blockquote>
*
* @param agent
* Path to the JAR file containing the agent.
*
* @throws AgentLoadException
* If the agent does not exist, or cannot be started in the manner
* specified in the {@link java.lang.instrument} specification.
*
* @throws AgentInitializationException
* If the <code>agentmain</code> throws an exception
*
* @throws IOException
* If an I/O error occurs
*
* @throws NullPointerException
* If <code>agent</code> is <code>null</code>.
*/
public void loadAgent(String agent)
throws AgentLoadException, AgentInitializationException, IOException
{
loadAgent(agent, null);
}
/**
* Returns the current system properties in the target virtual machine.
*
* <p> This method returns the system properties in the target virtual
* machine. Properties whose key or value is not a <tt>String</tt> are
* omitted. The method is approximately equivalent to the invocation of the
* method {@link java.lang.System#getProperties System.getProperties}
* in the target virtual machine except that properties with a key or
* value that is not a <tt>String</tt> are not included.
*
* <p> This method is typically used to decide which agent to load into
* the target virtual machine with {@link #loadAgent loadAgent}, or
* {@link #loadAgentLibrary loadAgentLibrary}. For example, the
* <code>java.home</code> or <code>user.dir</code> properties might be
* use to create the path to the agent library or JAR file.
*
* @return The system properties
*
* @throws IOException
* If an I/O error occurs
*
* @see java.lang.System#getProperties
* @see #loadAgentLibrary
* @see #loadAgent
*/
public abstract Properties getSystemProperties() throws IOException;
/**
* Returns the current <i>agent properties</i> in the target virtual
* machine.
*
* <p> The target virtual machine can maintain a list of properties on
* behalf of agents. The manner in which this is done, the names of the
* properties, and the types of values that are allowed, is implementation
* specific. Agent properties are typically used to store communication
* end-points and other agent configuration details. For example, a debugger
* agent might create an agent property for its transport address.
*
* <p> This method returns the agent properties whose key and value is a
* <tt>String</tt>. Properties whose key or value is not a <tt>String</tt>
* are omitted. If there are no agent properties maintained in the target
* virtual machine then an empty property list is returned.
*
* @return The agent properties
*
* @throws IOException
* If an I/O error occurs
*/
public abstract Properties getAgentProperties() throws IOException;
/**
* Returns a hash-code value for this VirtualMachine. The hash
* code is based upon the VirtualMachine's components, and satifies
* the general contract of the {@link java.lang.Object#hashCode()
* Object.hashCode} method.
*
* @return A hash-code value for this virtual machine
*/
public int hashCode() {
if (hash != 0) {
return hash;
}
hash = provider.hashCode() * 127 + id.hashCode();
return hash;
}
/**
* Tests this VirtualMachine for equality with another object.
*
* <p> If the given object is not a VirtualMachine then this
* method returns <tt>false</tt>. For two VirtualMachines to
* be considered equal requires that they both reference the same
* provider, and their {@link VirtualMachineDescriptor#id() identifiers} are equal. </p>
*
* <p> This method satisfies the general contract of the {@link
* java.lang.Object#equals(Object) Object.equals} method. </p>
*
* @param ob The object to which this object is to be compared
*
* @return <tt>true</tt> if, and only if, the given object is
* a VirtualMachine that is equal to this
* VirtualMachine.
*/
public boolean equals(Object ob) {
if (ob == this)
return true;
if (!(ob instanceof VirtualMachine))
return false;
VirtualMachine other = (VirtualMachine)ob;
if (other.provider() != this.provider()) {
return false;
}
if (!other.id().equals(this.id())) {
return false;
}
return true;
}
/**
* Returns the string representation of the <code>VirtualMachine</code>.
*/
public String toString() {
return provider.toString() + ": " + id;
}
}
| {
"content_hash": "2f7aaeffcaada47148e3ba17300565e2",
"timestamp": "",
"source": "github",
"line_count": 610,
"max_line_length": 93,
"avg_line_length": 41.488524590163934,
"alnum_prop": 0.6456456456456456,
"repo_name": "rokn/Count_Words_2015",
"id": "aad0be2cfc9ec46bbe83b11422aa677a127d7a6c",
"size": "26520",
"binary": false,
"copies": "43",
"ref": "refs/heads/master",
"path": "testing/openjdk/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "61802"
},
{
"name": "Ruby",
"bytes": "18888605"
}
],
"symlink_target": ""
} |
FROM debian:sid
MAINTAINER Jessie Frazelle <jess@linux.com>
RUN apt-get update && apt-get install -y \
ca-certificates \
s3cmd \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Setup s3cmd config
RUN { \
echo '[default]'; \
echo 'access_key=$AWS_ACCESS_KEY'; \
echo 'secret_key=$AWS_SECRET_KEY'; \
} > ~/.s3cfg
ENV HOME /root
WORKDIR $HOME/s3cmd-workspace
ENTRYPOINT [ "s3cmd" ]
| {
"content_hash": "43e8cca73873b2267b288a62af0af56e",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 43,
"avg_line_length": 20.25,
"alnum_prop": 0.6666666666666666,
"repo_name": "saneax/dockerfiles",
"id": "a6afc107983dddd1c2467ec715cdb843e8645129",
"size": "564",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "s3cmd/Dockerfile",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "323"
},
{
"name": "Nginx",
"bytes": "3121"
},
{
"name": "Python",
"bytes": "7607"
},
{
"name": "Shell",
"bytes": "24323"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.