repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
fyahfox/NemCommunityClient | nem-client-api/src/main/java/org/nem/ncc/services/WalletMapper.java | <gh_stars>10-100
package org.nem.ncc.services;
import org.nem.core.time.TimeProvider;
import org.nem.ncc.controller.viewmodels.WalletViewModel;
import org.nem.ncc.wallet.Wallet;
import java.util.stream.Collectors;
/**
* Helper class that is able to map a Wallet to a WalletViewModel.
*/
public class WalletMapper {
... |
ramatronics/emodb | sor/src/test/java/com/bazaarvoice/emodb/sor/core/WriteCloseableDatastoreTest.java | <filename>sor/src/test/java/com/bazaarvoice/emodb/sor/core/WriteCloseableDatastoreTest.java
package com.bazaarvoice.emodb.sor.core;
import com.bazaarvoice.emodb.common.api.ServiceUnavailableException;
import com.bazaarvoice.emodb.common.uuid.TimeUUIDs;
import com.bazaarvoice.emodb.sor.api.AuditBuilder;
import com.baza... |
larc/competitive_programming | codeforces/1131F.cpp | <gh_stars>1-10
#include <cstdio>
#include <vector>
#define N 150001
std::vector<int> T[N];
void dfs(const int & u)
{
printf("%d ", u);
for(const int & v: T[u])
dfs(v);
}
int comp[N];
void init(const int & n)
{
for(int i = 1; i <= n; ++i)
comp[i] = i;
}
int find(const int & x)
{
return comp[x] == x ? x : ... |
vsolank2/MaterialUI-master | app/src/main/java/com/dedsec/materialui/activity/progressactivity/ProgressOnScroll.java | package com.dedsec.materialui.activity.progressactivity;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.support.v7.widget.Toolbar;
import and... |
Rockbox-Chinese-Community/Rockbox-RCC | uisimulator/common/sim_icons.c | <gh_stars>10-100
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| ... |
lorenzo-cavazzi/renku-python | renku/core/utils/doi.py | <reponame>lorenzo-cavazzi/renku-python<filename>renku/core/utils/doi.py
# -*- coding: utf-8 -*-
#
# Copyright 2020 - Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, V... |
duanshuyong0/Descart | src/components/MailChimpSignup/index.js | <reponame>duanshuyong0/Descart<filename>src/components/MailChimpSignup/index.js<gh_stars>100-1000
export { default } from './MailChimpSignup'
|
pjsaksa/femc-driver | utils.c | <filename>utils.c
/* Femc Driver
* Copyright (C) 2015-2020 <NAME>
*
* Licensed under The MIT License, see file LICENSE.txt in this source tree.
*/
#include "utils.h"
#include "error_stack.h"
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#i... |
hmcts/wa-monitor-unconfigured-tasks-service | src/integrationTest/java/uk/gov/hmcts/reform/wataskmonitor/controllers/MonitorTaskJobControllerForAdHocJobTest.java | <reponame>hmcts/wa-monitor-unconfigured-tasks-service
package uk.gov.hmcts.reform.wataskmonitor.controllers;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import uk.gov.hmcts.reform.auth... |
davimuri/algorithms | src/main/java/algorithms/gcj2019/r1a/Pylons.java | <reponame>davimuri/algorithms<filename>src/main/java/algorithms/gcj2019/r1a/Pylons.java
package algorithms.gcj2019.r1a;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Pylons {
... |
ApacheJondy/ShortVideo | ShortVideoUIDemo/faceunity/src/main/java/com/faceunity/authpack.java | package com.faceunity;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class authpack {
public static int sha1_32(byte[] buf){int ret=0;try{byte[] digest=MessageDigest.getInstance("SHA1").digest(buf);return ((int)(digest[0]&0xff)<<24)+((int)(digest[1]&0xff)<<16)+((int)(diges... |
domdomegg/tabula | web/src/main/scala/uk/ac/warwick/tabula/web/controllers/mitcircs/MitCircsViewController.scala | package uk.ac.warwick.tabula.web.controllers.mitcircs
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.{ModelAttribute, PathVariable, RequestMapping}
import uk.ac.warwick.tabula.commands.mitcircs.StudentViewMitCircsSubmissionCommand
import uk.ac.warwick.tabula.data.model.... |
ggilchrist-ledger/ledger-live-desktop | src/renderer/screens/exchange/swap/Form/AnimatedArrows.js | // @flow
import React, { useState } from "react";
import Animation from "~/renderer/animations";
import type { ThemedComponent } from "~/renderer/styles/StyleProvider";
import swapAnim from "~/renderer/animations/swap.json";
import styled from "styled-components";
const Container: ThemedComponent<{}> = styled.div`
... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.dg/tree-ssa/pr22026.c | /* PR tree-optimization/22026
VRP used think that ~[0,0] + ~[0,0] = ~[0,0], which is wrong. The
same applies to subtraction and unsigned multiplication. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */
int
plus (int x, int y)
{
if (x != 0)
if (y != 0)
{
int z = x + y;... |
ivenpoker/Python-Projects | Projects/Online Workouts/w3resource/Basic - Part-I/program-138.py | <filename>Projects/Online Workouts/w3resource/Basic - Part-I/program-138.py
#!/usr/bin/env python3
#######################################################################################
# #
# Program purpose: Program to convert... |
segmentio/netx | ip.go | <reponame>segmentio/netx<filename>ip.go
package netx
import "net"
// IsIP checks if s is a valid representation of an IPv4 or IPv6 address.
func IsIP(s string) bool {
return net.ParseIP(s) != nil
}
// IsIPv4 checks if s is a valid representation of an IPv4 address.
func IsIPv4(s string) bool {
ip := net.ParseIP(s)... |
smhc/openapi4j | openapi-operation-validator/src/test/java/org/openapi4j/operation/validator/validation/RequestValidatorTest.java | package org.openapi4j.operation.validator.validation;
import org.junit.Test;
import org.openapi4j.core.exception.ResolutionException;
import org.openapi4j.core.validation.ValidationException;
import org.openapi4j.operation.validator.model.Request;
import org.openapi4j.operation.validator.model.impl.DefaultRequest;
imp... |
opetstudio/mypos | src/Containers/Gallery/api.js | <filename>src/Containers/Gallery/api.js
// a library to wrap and simplify api calls
import AppConfig from '../../Config/AppConfig'
export const create = (api) => ({
postGallery: (data, opt) => {
api.setHeader(AppConfig.authHeader, opt.session.token_type + ' ' + opt.session.access_token)
return api.post('/gal... |
TravisCannon/panamax-api | spec/serializers/job_lite_serializer_spec.rb | require 'spec_helper'
describe JobLiteSerializer do
fixtures :jobs, :job_templates
it 'exposes the attributes to be jsonified' do
serialized = described_class.new(jobs(:cluster_job)).as_json
expected_keys = [:name, :environment, :steps]
expect(serialized.keys).to match_array expected_keys
end
it ... |
lol768/tabula | common/src/main/scala/uk/ac/warwick/tabula/web/controllers/BaseController.scala | package uk.ac.warwick.tabula.web.controllers
import java.net.URI
import javax.annotation.Resource
import org.springframework.beans.factory.annotation.{Autowired, Required}
import org.springframework.context.MessageSource
import org.springframework.stereotype.Controller
import org.springframework.validation.Validator
... |
mohistH/nanogui_from_dalerank | src/python/misc.cpp | #ifdef NANOGUI_PYTHON
#include "python.h"
DECLARE_WIDGET(ColorWheel);
DECLARE_WIDGET(ColorPicker);
DECLARE_WIDGET(Graph);
DECLARE_WIDGET(ImageView);
DECLARE_WIDGET(ImagePanel);
void register_misc(py::module &m) {
py::class_<ColorWheel, Widget, ref<ColorWheel>, PyColorWheel>(m, "ColorWheel", D(ColorWheel))
... |
ViktorIvanoff/SoftUni-Courses | JavaScript/Programming Basics/04. For Loop/Lab/06. Sum of Numbers.js | function sumOfDigits(num) {
let sum = 0;
for (let i = 0; i < num.length; i++) {
sum+= Number(num[i]);
}
console.log(`The sum of the digits is:${sum}`);
} |
dyzmapl/BumpTop | trunk/win/Source/Includes/QtIncludes/src/declarative/util/qdeclarativestate_p.h | <filename>trunk/win/Source/Includes/QtIncludes/src/declarative/util/qdeclarativestate_p.h
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This... |
nowkoai/test | ee/spec/frontend/analytics/merge_request_analytics/components/app_spec.js | import { shallowMount } from '@vue/test-utils';
import MergeRequestAnalyticsApp from 'ee/analytics/merge_request_analytics/components/app.vue';
import FilterBar from 'ee/analytics/merge_request_analytics/components/filter_bar.vue';
import ThroughputChart from 'ee/analytics/merge_request_analytics/components/throughput_... |
Junhua9981/WebProjectFinal | database/database_helper.py | <reponame>Junhua9981/WebProjectFinal
def student_helper(student) -> dict:
return {
"id": str(student['_id']),
"fullname": student['fullname'],
"email": student['email'],
"course_of_study": student['course_of_study'],
"year": student['year'],
"GPA": student['gpa']
... |
rishson/dojoEnterpriseApp | src/js/rishson/widget/_Widget.js | <reponame>rishson/dojoEnterpriseApp<gh_stars>1-10
define([
"dojo/_base/declare", // declare
"dijit/_Widget", //mixin
"rishson/Base", //mixin
"dojo/_base/lang", // hitch
"dojo/topic", // publish/subscribe
"rishson/Globals"
], function (declare, _Widget, Base, lang, topic, Globals) {
/**
* @class
* @name rishs... |
samslow/react-native-tutorial | Examples/StateManagement/SetStateBasicTutorial/containers/CounterContainer.js | <reponame>samslow/react-native-tutorial
import React from 'react';
import Counter from '../components/Counter';
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
class CounterContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
counter: [
{... |
arnozhang/LuaMobileSdk | sources/Android/sdk/src/main/java/com/lua/mobile/sdk/engine/bridge/ReflectPlainDataBridge.java | <reponame>arnozhang/LuaMobileSdk<gh_stars>0
/**
* Android LuaMobileSdk for Android framework project.
*
* Copyright 2016 <NAME> <<EMAIL>>
*
* 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 a... |
JLXIA/esp | tools/src/google/api/backend.pb.go | // Code generated by protoc-gen-go.
// source: google/api/backend.proto
// DO NOT EDIT!
package api
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
//... |
databeast/apicore | apiv2-network/gossip/proto/state/state_not_in_quorum.go | package state
import (
"pkg.autotunego.com/pkg/network/gossip/msgtypes"
)
type notInQuorum struct {
nodeStatus msgtypes.NodeStatus
stateEvent chan msgtypes.StateEvent
quorumProvider Quorum
}
var instanceNotInQuorum *notInQuorum
func GetNotInQuorum(
stateEvent chan msgtypes.StateEvent,
quorumProvider Q... |
karllgiovany/Aion-Lightning-4.9-SRC | AL-Tools/PacketSamurai_4.9/src/com/aionemu/packetsamurai/logreaders/AbstractLogReader.java | <reponame>karllgiovany/Aion-Lightning-4.9-SRC<gh_stars>1-10
/**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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 ver... |
nanomashinX/hsweb-framework | hsweb-authorization/hsweb-authorization-jwt/src/main/java/org/hswebframework/web/authorization/jwt/JwtTokenParser.java | package org.hswebframework.web.authorization.jwt;
import com.alibaba.fastjson.JSON;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.Jwts;
import org.hswebframework.web.authorization.basic.web.ParsedToken;
import org.hswebframework.web.authorization.basic.web.UserTokenP... |
hymer-up/streamlink | tests/streams/test_dash.py | import unittest
from streamlink import PluginError
from streamlink.stream import DASHStream
from streamlink.stream.dash import DASHStreamWorker
from streamlink.stream.dash_manifest import MPD
from tests.mock import MagicMock, patch, ANY, Mock, call
from tests.resources import text, xml
class TestDASHStream(unittest.... |
abrahamfdzg/TibiaAuto12 | Core/GetMapPosition.py | def GetMapPosition(HOOK_OPTION):
MapPositions = [0, 0, 0, 0]
if HOOK_OPTION == 0:
import pyautogui
top_right = pyautogui.locateOnScreen("images/MapSettings/MapSettings.png", confidence=0.8)
map_size = 110 # 110px square
MapPositions[0], MapPositions[1] = top_right[0] - map_size... |
xzrunner/model3 | source/CompTransform.cpp | <reponame>xzrunner/model3<filename>source/CompTransform.cpp
#include "node3/CompTransform.h"
namespace n3
{
const char* const CompTransform::TYPE_NAME = "n3_transform";
CompTransform::CompTransform()
: m_scale(1, 1, 1)
{
}
std::unique_ptr<n0::NodeComp> CompTransform::Clone(const n0::SceneNode& node) const
{
auto ... |
truthiswill/intellij-community | java/java-tests/testData/psi/resolve/var/Qualified3.java | <gh_stars>1-10
public class Test{
static int a = 0;
public int foo(){
return new Test().<ref>a;
}
}
|
nikitabelotelov/coffee | node_modules/sbis3-ws/WS.Core/core/helpers/Object/isEqual.js | define('Core/helpers/Object/isEqual', ['Types/object', 'Env/Env'], function(object, Env) {
/**
*
* Модуль, в котором описана функция <b>isEqual(obj1, obj2)</b>,
*
* Функция рекурсивно сравнивает два объекта или массива.
* Объекты считаются равными тогда, когда они равны по оператору ===, или когд... |
vsawchuk/CPDBv2_frontend | test/components/cr-page/involvement/involvement.js | import React from 'react';
import { shallow } from 'enzyme';
import Involvement from 'components/cr-page/involvement';
import InvolvementItem from 'components/cr-page/involvement/involvement-item';
describe('Involvement component', function () {
const involvements = {
'investigator': [{ id: 1 }],
'police_w... |
MartinWeise/probe-engine | internal/orchestra/update/update.go | // Package update contains code to update the probe state with orchestra
package update
import (
"context"
"errors"
"fmt"
"net/http"
"github.com/ooni/probe-engine/internal/jsonapi"
"github.com/ooni/probe-engine/internal/orchestra/login"
"github.com/ooni/probe-engine/internal/orchestra/metadata"
"github.com/oo... |
ojmakhura/andromda | cartridges/andromda-jsf2/src/main/java/org/andromda/cartridges/jsf2/metafacades/JSFManageableEntityLogicImpl.java | <gh_stars>1-10
package org.andromda.cartridges.jsf2.metafacades;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashSet;
import org.andromda.cartridges.jsf2.JSFGlobals;
import org.andromda.cartridges.jsf... |
ideacrew/intellimesh | spec/intellimesh/messages/message_spec.rb | <gh_stars>0
# frozen_string_literal: true
require "spec_helper"
require 'intellimesh'
class MessageIncluded
include Intellimesh::Messages::Message
# This declaration keeps developer honest about initilizing code in the module
def initialize
end
def load_header_property_set
message(local_header_propert... |
Chaf-Libraries/Ilum | Source/Ilum/Geometry/Mesh/Process/IMeshProcess.cpp | #include "IMeshProcess.hpp"
namespace Ilum::geometry
{
const std::vector<glm::vec3> IMeshProcess::preprocess(const std::vector<Vertex> &vertices)
{
std::vector<glm::vec3> result(vertices.size());
for (size_t i = 0; i < vertices.size(); i++)
{
result[i] = vertices[i].position;
}
return result;
}
const std::vect... |
akifoezkan/Halide-HLS | src/IRMatch.cpp | #include <iostream>
#include <map>
#include "IRVisitor.h"
#include "IRMatch.h"
#include "IREquality.h"
#include "IROperator.h"
namespace Halide {
namespace Internal {
using std::vector;
using std::map;
using std::string;
void expr_match_test() {
vector<Expr> matches;
Expr w = Variable::make(Int(32), "*");
... |
KRE02/magic-search-engine | indexer/lib/patches/patch_reconcile_on_set_priority.rb | <gh_stars>10-100
class PatchReconcileOnSetPriority < Patch
# If something is missing, it will fail validation later on,
# only pass what you'd like to see reconciled automatically
def fields_to_reconcile
[
"name",
"manaCost",
"text",
"types",
"subtypes",
"supertypes",
... |
kevinpeterson/titanium-json-ld | src/main/java/com/apicatalog/jsonld/framing/ValuePatternMatcher.java | package com.apicatalog.jsonld.framing;
import java.util.Arrays;
import javax.json.JsonObject;
import javax.json.JsonString;
import javax.json.JsonValue;
import com.apicatalog.jsonld.json.JsonUtils;
import com.apicatalog.jsonld.lang.Keywords;
/**
*
* @see <a href="https://w3c.github.io/json-ld-framing/#value-matc... |
a0953245782/pig-vue | backend/src/main/java/com/chenym/pig/service/RedisService.java | <reponame>a0953245782/pig-vue<gh_stars>1-10
package com.chenym.pig.service;
import com.chenym.pig.common.exception.RedisConnectException;
import com.chenym.pig.vo.RedisInfoVo;
import java.util.List;
import java.util.Map;
public interface RedisService {
/**
* 获取 redis 的详细信息
*
* @ret... |
MichalCervenansky/sandbox | integration-tests/src/test/java/com/redhat/service/bridge/integration/tests/resources/ResourceUtils.java | <filename>integration-tests/src/test/java/com/redhat/service/bridge/integration/tests/resources/ResourceUtils.java
package com.redhat.service.bridge.integration.tests.resources;
import java.util.Optional;
import io.restassured.http.ContentType;
import io.restassured.specification.RequestSpecification;
import static ... |
pranavsadavarte221b/xv6 | doxygen/html/search/all_15.js | var searchData=
[
['v2p_697',['V2P',['../d8/da9/memlayout_8h.html#a5021188bc7da1304f27e913aee183407',1,'memlayout.h']]],
['v2p_5fwo_698',['V2P_WO',['../d8/da9/memlayout_8h.html#a07c445cd5425fc1d69188d1e6d511e4b',1,'memlayout.h']]],
['vaddr_699',['vaddr',['../de/d4f/structproghdr.html#a6fa1051e19935bbedc5eaf086f53... |
jalynxing/choerodon-starters | choerodon-liquibase/src/main/java/io/choerodon/liquibase/excel/DbAdaptor.java | <gh_stars>0
package io.choerodon.liquibase.excel;
import io.choerodon.liquibase.addition.AdditionDataSource;
import io.choerodon.liquibase.helper.LiquibaseHelper;
import liquibase.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.sql.DataSource;
import java.sql.*;
import java.tex... |
alligatormon/alligator | src/metric/metrictree.h | #pragma once
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <stdlib.h>
#include <ctype.h>
#include "metric/labels.h"
#include "metric/percentile_heap.h"
#include "common/selector.h"
#define RED 1
#define BLACK 0
#define RIGHT 1
#define LEFT 0
typedef struct sort_order_node {
char *name;
tommy... |
vdvorak83/Job4j | SQL_JDBC/6.TestTask/vacancyParser/src/test/java/ru/matevosyan/dataBase/package-info.java | <gh_stars>1-10
/**
* ConnectionDBTest class for testing database connection.
* created on 26.01.2018
* @author <NAME>.
* @version 1.0
*/
package ru.matevosyan.dataBase; |
CNResoy/Spicy | src/minecraft/spicy/gui/click/component/components/sub/Keybind.java | package spicy.gui.click.component.components.sub;
import net.minecraft.client.renderer.GlStateManager;
import org.lwjgl.input.Keyboard;
import spicy.gui.click.component.Component;
import spicy.gui.click.component.components.Button;
import spicy.main.Spicy;
public class Keybind extends Component
{
private boolean... |
adam-rocska/closure-templates-php | java/tests/com/google/template/soy/soytree/AbstractSoyCommandNodeTest.java | <gh_stars>1-10
/*
* Copyright 2008 Google Inc.
*
* 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 la... |
rapidstack/RESTEasyCLI | resteasycli/cmd/main.py | import sys
from cliff.app import App
from cliff.help import HelpCommand
from cliff.commandmanager import CommandManager
from resteasycli.config import Config
from resteasycli.lib.workspace import Workspace
from resteasycli.exceptions import FileNotFoundException
class CLIApp(App):
'''The main CLI app'''
def ... |
kphed/soshen-oss | node-api-server/src/util/constants.js | module.exports = {
errorMessages: {
MISSING_PROPS: 'Missing required properties',
UNNECESSARY_PROPS: 'Contains unnecessary properties',
INVALID_PROP_TYPES: 'Invalid property types',
ACCESS_DENIED: 'Access denied',
INVALID_CREDENTIALS: 'Invalid credentials',
},
};
|
cdalvaro/project-euler | challenges/c0013/challenge.cpp | //
// challenge.cpp
// Challenges
//
// Created by <NAME> on 25/07/2020.
// Copyright © 2020 cdalvaro. All rights reserved.
//
#include <charconv>
#include <sstream>
#include <string>
#include "challenges/c0013/challenge.hpp"
using namespace challenges;
const std::vector<tools::types::BigInt> Challenge13::bigin... |
dthung1602/MangaBookmark | frontend/src/components/EditManga/BasicFields.js | import Proptypes from "prop-types";
import FilterDropdown from "../Filters/FilterDropdown";
import LoopButton from "../Filters/LoopButton";
import { SHELVES } from "../../utils/constants";
import "./BasicFields.less";
const BasicFields = ({ manga, editManga, layout }) => {
const block = layout === "column";
retu... |
RefactoringBotUser/clarity | src/main/java/skadistats/clarity/decoder/unpacker/factory/s1/LongUnpackerFactory.java | package skadistats.clarity.decoder.unpacker.factory.s1;
import skadistats.clarity.decoder.s1.SendProp;
import skadistats.clarity.decoder.unpacker.*;
import skadistats.clarity.model.s1.PropFlag;
public class LongUnpackerFactory implements UnpackerFactory<Long> {
public static Unpacker<Long> createUnpackerStatic(S... |
papahigh/r2dbc-mysql | src/main/java/dev/miku/r2dbc/mysql/codec/ParametrizedCodec.java | /*
* Copyright 2018-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... |
vschiavoni/unine-twine | benchmarks/sqlite/instrumentation-callbacks/src/timing_callbacks.c | <reponame>vschiavoni/unine-twine
#include <stdio.h>
#include "instrumentation_callbacks.h"
void on_initialization_finished() {}
void on_records_inserted(int database_type, int number_of_write,
int number_of_read, long int time)
{
printf("i,%d,%d,%d,%ld\n", database_type, number_of_write,... |
codefollower/Open-Source-Research | HotSpot1.7-JVM-Linux-x86/src/share/vm/memory/compactingPermGenGen.cpp | <filename>HotSpot1.7-JVM-Linux-x86/src/share/vm/memory/compactingPermGenGen.cpp<gh_stars>100-1000
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it... |
jacob-izr/drake | util/MexWrapper.cpp | #include "MexWrapper.h"
#if defined(WIN32) || defined(WIN64)
#else
#include <dlfcn.h>
#endif
MexWrapper::MexWrapper(std::string const & filename) : m_mex_file(filename)
{
m_good = false;
#if defined(WIN32) || defined(WIN64)
#else
//load the mexfile
m_handle = dlopen(m_mex_file.c_str(), RTLD_NOW);
if (!m... |
lananh265/social-network | node_modules/react-icons-kit/ikons/location.js | <reponame>lananh265/social-network<gh_stars>1-10
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.location = void 0;
var location = {
"viewBox": "0 0 64 64",
"children": [{
"name": "g",
"attribs": {
"id": "LOCATION"
},
"children": [{
"name": "g",
... |
showa-yojyo/The-Modern-Cpp-Challenge | Chapter11/problem_89/main.cpp | <filename>Chapter11/problem_89/main.cpp
// #89 ヴィジュネル暗号
//
// C++ 新機能の学習には不向き
#include <iostream>
#include <string>
#include <string_view>
#include <cassert>
// 前項参照
std::string caesar_encrypt(std::string_view text, int shift)
{
std::string str;
str.reserve(text.length());
for (auto const & c : text)
{
... |
yanakievv/OS | GCC/IO_T1.c | #include <unistd.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <err.h>
#include <errno.h>
int main(int argc, char* argv[])
{
if (argc != 3)
{
err(1, "Arguments must be 3: cfile file1 file2\n");
}
int fd_cpyfrom = open(argv[1], O_RDONLY);
in... |
NNKit/NNCore | NNCore/Classes/Category/NS/NSDate+NNExtension.h | //
// NSDate+NNExtension.h
// NNCore
//
// Created by XMFraker on 2017/11/10.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXTERN NSString *const kNNDefaultDateFormat;
FOUNDATION_EXTERN NSString *const kNNShortDateFormat;
FOUNDATION_EXTERN NSString *const kNNShortTimeFormat;
@interface... |
consulo/consulo-dotnet | msil-psi-impl/src/main/java/consulo/msil/lang/psi/impl/MsilGenericParameterImpl.java | /*
* Copyright 2013-2014 must-be.org
*
* 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... |
openforis/rxjs | dist/spec/operators/index-spec.js | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var index = require("rxjs/operators");
var chai_1 = require("chai");
describe('operators/index', function () {
it('should export operators', function () {
chai_1.expect(index.audit).to.exist;
chai_1.expect(index.auditTime).... |
Alekssasho/sge_source | libs/sge_engine/src/sge_engine/TexturedPlaneDraw.h | #pragma once
#include "sge_core/AssetLibrary.h"
#include "sge_engine_api.h"
#include "sge_renderer/renderer/renderer.h"
#include "sge_utils/math/mat4.h"
namespace sge {
struct SGE_ENGINE_API TexturedPlaneDraw {
void draw(const RenderDestination& rdest,
const mat4f& projViewWorld,
Texture* text... |
OpenXIP/xip-libraries | src/database/coregl/SoXipLogGLState.h | /*
Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.... |
keitaronaruse/AtCoderTraining | ABC/ABC221/A/abc221-a.cpp | <gh_stars>0
/**
* @file abc221-a.cpp
* @brief ABC221 Problem A - Seismic magnitude scales
* @author <NAME>
* @date 2022-04-11
* @copyright MIT License
* @details https://atcoder.jp/contests/abc221/tasks/abc221_a
*/
// # Solution
#include <iostream>
int main()
{
// Read A = [ B, 9 ], B = [ 3, A ]
int A, B;
... |
matevans/third-party-application | it/uk/gov/hmrc/apiplatform/modules/questionnaires/repositories/SubmissionsDAOSpec.scala | package uk.gov.hmrc.apiplatform.modules.submissions.repositories
import uk.gov.hmrc.thirdpartyapplication.util.AsyncHmrcSpec
import uk.gov.hmrc.mongo.MongoSpecSupport
import org.scalatest.BeforeAndAfterEach
import org.scalatest.BeforeAndAfterAll
import uk.gov.hmrc.thirdpartyapplication.repository.IndexVerification
imp... |
krattai/AEBL | blades/jabberd2/util/misc.h | <reponame>krattai/AEBL<gh_stars>1-10
/*
* jabberd - Jabber Open Source Server
* Copyright (c) 2002-2004 <NAME>, <NAME>,
* <NAME>, <NAME>
*
* 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 Fr... |
FinalProject-Team4/Server_DaangnMarket | app/notification/migrations/0004_notification_type.py | <filename>app/notification/migrations/0004_notification_type.py<gh_stars>1-10
# Generated by Django 3.0.4 on 2020-04-23 07:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notification', '0003_auto_20200416_1609'),
]
operations = [
mi... |
Testiduk/gitlabhq | lib/gitlab/database/postgresql_adapter/type_map_cache.rb | <reponame>Testiduk/gitlabhq
# frozen_string_literal: true
# Caches loading of additional types from the DB
# https://github.com/rails/rails/blob/v6.0.3.2/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L521-L589
# rubocop:disable Gitlab/ModuleWithInstanceVariables
module Gitlab
module Data... |
kyapp69/streamlink-twitch-gui | src/app/services/streaming/player/substitutions.js | import Substitution from "utils/parameters/Substitution";
import t from "translation-key";
/** @type {Substitution[]} */
export default [
new Substitution(
[ "name", "channel", "channelname" ],
"stream.channel.display_name",
t`settings.player.args.substitutions.channel`
),
new Substitution(
[ "status", "ti... |
tienduy-nguyen/the-hacking-project | week6/day5/bot_discord/lib/error.rb | <reponame>tienduy-nguyen/the-hacking-project<filename>week6/day5/bot_discord/lib/error.rb
class RutherError
def unknown_command(command)
return "Sorry... I didn't understand that command argument: **#{ command }**\n"
end
end |
inka-pallycon/pallycon-drm-token-sample-python | pallycon/config/playready/digital_video_protection.py | DIGITAL_VIDEO_PROTECTION_LEVEL = (100, 250, 270, 300, 301)
LEVEL_100 = DIGITAL_VIDEO_PROTECTION_LEVEL[0] # 'LEVEL_100'
LEVEL_250 = DIGITAL_VIDEO_PROTECTION_LEVEL[1] # 'LEVEL_250'
LEVEL_270 = DIGITAL_VIDEO_PROTECTION_LEVEL[2] # 'LEVEL_270'
LEVEL_300 = DIGITAL_VIDEO_PROTECTION_LEVEL[3] # 'LEVEL_300'
LEVEL_301 = DIGI... |
nmldiegues/jvm-stm | classpath-0.98/gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java | /* GstSourceDataLine.java -- SourceDataLine implementation.
Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath 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; ei... |
codeforamerica/clientcomm-rails | spec/features/user_sends_images_to_client_spec.rb | <filename>spec/features/user_sends_images_to_client_spec.rb
require 'rails_helper'
feature 'user sends images', active_job: true do
let(:message_body) { 'You have an appointment tomorrow at 10am' }
let(:rr) { create :reporting_relationship }
let(:user) { rr.user }
let(:client) { rr.client }
before do
l... |
nageshwarrao19/BUILD | BUILD_Projects/client/tests/history.controller.spec.js | <reponame>nageshwarrao19/BUILD
'use strict';
var expect = chai.expect;
describe('Unit Test: TeamCtrl', function () {
var scope;
var httpBackend;
var mockedActiveProjectService;
var mockedHistoryService;
var mockedUiError, mockedHttpError;
var PROJECT_ID = '548634330dad778c2dcbd9fb';
var er... |
APrioriInvestments/typed_python | typed_python/compiler/type_wrappers/const_dict_wrapper.py | # Copyright 2017-2020 typed_python Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
MyPureCloud/platform-client-sdk-cli | build/gc/models/reportingturn.go | <filename>build/gc/models/reportingturn.go
package models
import (
"time"
"encoding/json"
"strconv"
"strings"
)
var (
ReportingturnMarshalled = false
)
// This struct is here to use the useless readonly properties so that their required imports don't throw an unused error (time, etc.)
type Reporti... |
hjxp/juno-agent | pkg/core/api.go | <filename>pkg/core/api.go
// Copyright 2020 Douyu
//
// 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 ... |
xirc/cp-algorithm | lib/main/tree/lca/main-lca-binary-lifting.cpp | <filename>lib/main/tree/lca/main-lca-binary-lifting.cpp
#include <iostream>
#include "template-solver-interp.hpp"
#include "cpalgo/tree/lca/lca_binary_lifting.hpp"
using namespace std;
using Interp = SolverInterp<LCABinaryLifting>;
Interp* interp = new Interp();
void setup(string& header, map<string,Command>& comman... |
Faiz/mapr2 | matrix_game_experiment.py | from maci.environments import MatrixGame
from agent import Agent
import numpy as np
import matplotlib.pyplot as plt
AGENT_NUM = 2
ACTION_NUM = 2
GAME_NAME = "stag_hunt"
ITERATION = 100
SAMPLE_SIZE = 1
K = 1
opp_style = 'rommeo'
temperature_decay = True
if __name__ == "__main__":
env = MatrixGame(
game=GA... |
a4-data/a4-UI-EXT | api-docs/ux/ajax/DataSimlet.js | /**
* @class Ext.ux.ajax.DataSimlet
* This base class is used to handle data preparation (e.g., sorting, filtering and
* group summary).
*/
|
Ivan1pl/netherite | witchcraft-context/src/main/java/com/ivan1pl/witchcraft/context/WitchCraftContext.java | package com.ivan1pl.witchcraft.context;
import com.google.common.primitives.Primitives;
import com.ivan1pl.witchcraft.context.annotations.ConfigurationValue;
import com.ivan1pl.witchcraft.context.annotations.ConfigurationValues;
import com.ivan1pl.witchcraft.context.annotations.Managed;
import com.ivan1pl.witchcraft.c... |
HarumeJs/Discord-Bot | commands/Guild/poll.js | // Dependencies
const Discord = require('discord.js');
module.exports.run = async (bot, message, args, emojis, settings) => {
if (message.deletable) message.delete();
// Check bot for add reaction permission
if (!message.guild.me.hasPermission('ADD_REACTIONS')) {
message.channel.send({ embed:{ color:15158332, des... |
mirwansyahs/siabanks | assets/ckeditor/tests/plugins/image2/states.js | <gh_stars>1-10
/* bender-tags: editor,widget */
/* bender-ckeditor-plugins: image2,link */
/* global image2TestsTools */
( function() {
'use strict';
var tools = image2TestsTools,
states = {
// Captioned widgets without links.
'caption:true_align:none_link:no': {
hasCaption: true,
align: 'none'
}... |
goplus/libc | x2g__stdio_exit.c.i.go | <reponame>goplus/libc<filename>x2g__stdio_exit.c.i.go
package libc
import unsafe "unsafe"
var dummy_file_cgo764 *struct__IO_FILE = nil
func close_file_cgo765(f *struct__IO_FILE) {
if !(f != nil) {
return
}
func() int32 {
if f.lock >= int32(0) {
return __lockfile(f)
} else {
return int32(0)
}
}()
i... |
xushuhui/mall_go | app/coupon/service/internal/data/model/migrate/schema.go | <reponame>xushuhui/mall_go<gh_stars>1-10
// Code generated by entc, DO NOT EDIT.
package migrate
import (
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/schema/field"
)
var (
// CouponsColumns holds the columns for the "coupons" table.
CouponsColumns = []*schema.Column{
{Name: "... |
vizee/misc | go/livedmc/notify_stub.go | <filename>go/livedmc/notify_stub.go
// +build !linux
package main
type notifier struct {
appName string
delay int
}
func (n *notifier) init() error {
return nil
}
func (n *notifier) show(summary string, body string) error {
return nil
}
func (n *notifier) close() {
}
|
Mozilla-GitHub-Standards/b55f95984015e193bf0af8041de6a30a1841dd9461fffd41c5216d98d645963d | app/scienceapi/users/tests/test_models.py | <reponame>Mozilla-GitHub-Standards/b55f95984015e193bf0af8041de6a30a1841dd9461fffd41c5216d98d645963d
import factory
from faker import Factory as FakerFactory
from scienceapi.users.models import User
faker = FakerFactory.create()
class UserFactory(factory.Factory):
name = factory.LazyAttribute(lambda o: faker.nam... |
wwongkamjan/dipnet_press | diplomacy_research/proto/tensorflow_serving/config/platform_config.pb.h | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_serving/config/platform_config.proto
#ifndef PROTOBUF_INCLUDED_tensorflow_5fserving_2fconfig_2fplatform_5fconfig_2eproto
#define PROTOBUF_INCLUDED_tensorflow_5fserving_2fconfig_2fplatform_5fconfig_2eproto
#include <string>
#include <go... |
lacc97/media-driver | media_driver/agnostic/gen11/codec/hal/codechal_kernel_header_g11.h | <reponame>lacc97/media-driver<filename>media_driver/agnostic/gen11/codec/hal/codechal_kernel_header_g11.h
/*
* Copyright (c) 2017-2019, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in ... |
daviddahl/js-ipfs | packages/ipfs/src/core/components/files/touch.js | <filename>packages/ipfs/src/core/components/files/touch.js
'use strict'
const applyDefaultOptions = require('./utils/apply-default-options')
const toMfsPath = require('./utils/to-mfs-path')
const log = require('debug')('ipfs:mfs:touch')
const errCode = require('err-code')
const UnixFS = require('ipfs-unixfs')
const to... |
fnando/validators | test/validators/validates_datetime/after_option_test.rb | # frozen_string_literal: true
require "test_helper"
class ValidatesDatetimeAfterOptionTest < Minitest::Test
let(:user) { User.new }
test "rejects when date is set to before :after option" do
future_date = 1.week.from_now
User.validates_datetime :registered_at, after: future_date
user.registered_at = ... |
lpj1986/java9 | src/main/java/win/elegentjs/designpattern/strategy/CalcStrategy.java | <reponame>lpj1986/java9
package win.elegentjs.designpattern.strategy;
public interface CalcStrategy {
int calc(int a, int b);
}
|
Tecknowlegy/open-idea-station | spec/presenters/user_presenter_spec.rb | <reponame>Tecknowlegy/open-idea-station<filename>spec/presenters/user_presenter_spec.rb
require "rails_helper"
describe UserPresenter do
let!(:user) { create :user }
let(:user_presenter) { described_class.new(user, ActionView::Helpers::DateHelper) }
describe "#provider" do
it "returns the provider of the us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.