repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
UBessle/wekan | packages/wekan-cfs-data-man/client/data-man-api.js | /**
* @method DataMan
* @public
* @constructor
* @param {File|Blob|ArrayBuffer|Uint8Array|String} data The data that you want to manipulate.
* @param {String} [type] The data content (MIME) type, if known. Required if the first argument is an ArrayBuffer, Uint8Array, or URL
*/
DataMan = function DataMan(data, typ... |
discourse/discourse-ember-source | dist/es/ember-template-compiler/tests/plugins/assert-reserved-named-arguments-test.js | import { compile } from '../../index';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
moduleFor('ember-template-compiler: assert-reserved-named-arguments', class extends AbstractTestCase {
[`@test '@arguments' is reserved`]() {
expectAssertion(() => {
compile(`{{@arguments}}`, {
... |
General-ITer/Flask-Introduction | day04/app/__init__.py | from flask import Flask
from .views import init_blue
from .ext import init_ext
from .settings import *
def create_app(enev):
app = Flask(__name__,template_folder=template_folder,static_folder=static_folder)
app.config.from_object(conf.get(enev))
init_ext(app)
init_blue(app)
return app |
PareshGupta-WAL/mapbox-gl-native | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java | package com.mapbox.mapboxsdk.maps.widgets;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Camera;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PointF;
import android... |
eikmadsen/rankdb | blobstore/maxsize_test.go | package blobstore_test
// Copyright 2019 Vivino. All rights reserved
//
// See LICENSE file for license details
import (
"bytes"
"context"
"crypto/rand"
"fmt"
"testing"
"time"
"github.com/Vivino/rankdb/blobstore"
"github.com/Vivino/rankdb/blobstore/bstest"
"github.com/Vivino/rankdb/blobstore/memstore"
"git... |
bauman/clips-rules-rebuild | clipspy-1.0.0/clips/clips_build.py | <gh_stars>0
# Copyright (c) 2016-2021, <NAME>
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions ... |
smagill/opensphere-desktop | open-sphere-plugins/my-places/src/main/java/io/opensphere/myplaces/importer/DataElementPointExporter.java | package io.opensphere.myplaces.importer;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.function.Supplier;
import java.util.stream.C... |
miniworld-project/miniworld_core | miniworld/model/network/backends/EmulationNodeNetworkBackend.py | from io import StringIO
from miniworld import config
from miniworld.Scenario import scenario_config
from miniworld.log import get_node_logger
from miniworld.model.network.backends.NetworkMixin import NetworkMixin
from miniworld.model.network.interface import Interfaces, Interface
from miniworld.util import NetUtil
__... |
veg/flea-web-app | tests/unit/utils/utils-test.js | <gh_stars>1-10
import { test } from 'ember-qunit';
import { refToAlnCoords, alignmentTicks, zeroIndex } from 'flea-web-app/utils/utils';
test("it computes alignmentTicks", function(assert){
var data = [2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13];
var a2r = data.map(c => zeroIndex(c));
var stop = 14;
var r2a = refToAl... |
Richard-Cao226/java | src/com/codefortomorrow/advanced/chapter14/practice/account/PasswordMismatchException.java | package com.codefortomorrow.advanced.chapter14.practice.account;
public class PasswordMismatchException {}
|
davidraditya/OAI-Powder | cmake_targets/lte_build_oai/build/CMakeFiles/Rel14/MeasResultCSI-RS-List-r12.c | /*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "fixed_grammar.asn"
* `asn1c -gen-PER`
*/
#include "MeasResultCSI-RS-List-r12.h"
static asn_per_constraints_t asn_PER_type_MeasResultCSI_RS_List_r12_constr_1 GCC_NOTUSED = {
{ APC_UNCONSTRAINED, -1... |
xuwaters/cp-algorithms | 09-graphs/08-flows/01-max-flow/max_flow.go | package max_flow
//
//
// for each edge: used / capacity
//
// adj[i][j] = capacity
// adj[j][i] = used
//
// loop: find augment path from S to T
//
// if used < capacity: can walk in direction of edge
// if used > 0 : can walk in reverse direction of edge
//
//
// int n;
// vector<vector<int>> capaci... |
johngmyers/jmxutils | src/test/java/org/weakref/jmx/TestInheritanceBase.java | /**
* Copyright 2009 <NAME>
*
* 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 t... |
ranarango/fuegos-orinoquia | src/04_exploration/02_compute_fire_return_interval.py | # -----------------------------------------------------------------------
# Author: <NAME>
#
# Purpose: Computes the return interval pixel-wise for each window. The
# return interval is computed following the equation: RI = (n + 1) / m,
# where n corresponds to the number of years on record and m corresponds
# to the n... |
smith-30/algos | atcoder/contest/20190908/c/main.go | package main
import (
"bufio"
"fmt"
"math"
"os"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func init() {
sc.Split(bufio.ScanWords)
}
func nextInt() int {
sc.Scan()
i, e := strconv.ParseInt(sc.Text(), 10, 64)
if e != nil {
panic(e)
}
return int(i)
}
func main() {
n := nextInt()
a := make([]int, ... |
pjshea/bluebox-ng | example/mapPing.js | #!/usr/bin/env node
/*
Copyright <NAME> <<EMAIL>>
This code may only be used under the MIT license found at
https://opensource.org/licenses/MIT.
*/
'use strict';
const Bluebox = require('../');
const bBox = new Bluebox();
bBox.events.on('info', (info) => {
/* eslint-disable no-console */
console.log('... |
ktotheoz/pixellight | Base/PLRenderer/include/PLRenderer/Renderer/SamplerStates.h | /*********************************************************\
* File: SamplerStates.h *
*
* Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/)
*
* This file is part of PixelLight.
*
* Permission is hereby granted, free of charge, to any person obtaining a co... |
carlosmaniero/ascii-engine | ascii_engine/fragments/utils.py | <filename>ascii_engine/fragments/utils.py
def get_max_line_width(fragment):
if not fragment:
return 0
bigger_line = max(fragment, key=len)
return len(bigger_line)
def calculate_fragments_length_sum(fragments):
return sum(map(len, fragments))
|
AnthonyNg404/61A | lab/lab08/tests/shuffle.py | test = {
'name': 'shuffle',
'points': 0,
'suites': [
{
'cases': [
{
'code': r"""
>>> shuffle(range(6))
[0, 3, 1, 4, 2, 5]
>>> suits = ['♡', '♢', '♤', '♧']
>>> cards = [card(n) + suit for n in range(1,14) for suit in suits]
>>> cards[:12... |
dreedyman/apache-river | qa/src/main/java/org/apache/river/test/impl/start/SerializedServiceDescriptors.java | <gh_stars>0
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "Lice... |
RyanLiu0808/GdeiAssistant | src/main/java/edu/gdei/gdeiassistant/Repository/Mysql/GdeiAssistant/Mapper/Profile/ProfileMapper.java | <filename>src/main/java/edu/gdei/gdeiassistant/Repository/Mysql/GdeiAssistant/Mapper/Profile/ProfileMapper.java
package edu.gdei.gdeiassistant.Repository.Mysql.GdeiAssistant.Mapper.Profile;
import edu.gdei.gdeiassistant.Pojo.Entity.Introduction;
import edu.gdei.gdeiassistant.Pojo.Entity.Profile;
import org.apache.ibat... |
StrayDoki/math | stan/math/prim/mat/fun/inverse.hpp | <filename>stan/math/prim/mat/fun/inverse.hpp<gh_stars>0
#ifndef STAN_MATH_PRIM_MAT_FUN_INVERSE_HPP
#define STAN_MATH_PRIM_MAT_FUN_INVERSE_HPP
#include <stan/math/prim/mat/fun/Eigen.hpp>
#include <stan/math/prim/mat/err/check_nonempty.hpp>
#include <stan/math/prim/mat/err/check_square.hpp>
namespace stan {
namespace m... |
ITIJavaTeam6/ChatApp | Chat App Client/src/chat/client/view/JHyperlinkLabel.java | <filename>Chat App Client/src/chat/client/view/JHyperlinkLabel.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package chat.client.view;
/**
*
* @author AmoOOOnA
*/
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Graphics;
import java.awt.Inset... |
YourName0729/competitive-programming | Kattis/reverserot.cpp | //
// https://open.kattis.com/problems/reverserot
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <cmath>
#include <queue>
#include <algorithm>
#include <stack>
#include <deque>
#include <numeric>
#include <iomanip>
#define forcase int __t;cin>>__t;getchar();for(int _... |
hekailiang/actor-server | actor-api/src/main/scala/com/secretapp/backend/data/message/rpc/file/UploadConfig.scala | <gh_stars>1-10
package com.secretapp.backend.data.message.rpc.file
import com.secretapp.backend.data.message.ProtobufMessage
import com.secretapp.backend.protocol.codecs.utils.protobuf._
import im.actor.messenger.{ api => protobuf }
import scodec.bits.BitVector
@SerialVersionUID(1L)
case class UploadConfig(serverData... |
gummybuns/dorm | cerami/datatype/number.py | from .base_number import BaseNumber
class Number(BaseNumber):
"""An alias for BaseNumber"""
pass
|
SebastianNiama/DataStructrures-CodeTraining | DataSructures/src/main/java/PriorityQueues1/ColaPrioridad1.java | //Se podria decir que es un array estatico de colas.:
//La clase que representa la tabla, a su vez, utiliza la clase ColaLista
package PriorityQueues1;
import Queues.ColaLista;//Xq vamos a usar colas
public class ColaPrioridad1 {
protected ColaLista []tabla;//Un arrays de Colas
protected int maxPrioridad... |
meodaiduoi/onos | apps/packet-throttle/app/src/main/java/org/onosproject/packetthrottle/PacketThrottleManager.java | <reponame>meodaiduoi/onos
/*
* Copyright 2019-present Open Networking Foundation
*
* 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
*
... |
AI39/cskaoyan14th-project4 | guns-common-api/src/main/java/com/stylefeng/guns/rest/modular/film/service/FilmIndexService.java | <filename>guns-common-api/src/main/java/com/stylefeng/guns/rest/modular/film/service/FilmIndexService.java
package com.stylefeng.guns.rest.modular.film.service;
import com.stylefeng.guns.rest.modular.film.vo.FilmConditionVO;
import com.stylefeng.guns.rest.modular.film.vo.FilmIndexVO;
public interface FilmIndexSe... |
ReddogStone/jabaku-c | Jabaku/math/matrix.h | <reponame>ReddogStone/jabaku-c
#ifndef JBK_MATH_MATRIX_H
#define JBK_MATH_MATRIX_H
//============================================
// All math functions assume right hand
// coordinate system.
//============================================
#include "math/scalar.h"
#include "math/vector.h"
#ifdef JBK_MATH_DEFAULT
#in... |
sandeepraju/plivo-java | src/main/java/com/plivo/helper/xml/elements/PreAnswer.java | <filename>src/main/java/com/plivo/helper/xml/elements/PreAnswer.java
package com.plivo.helper.xml.elements;
import java.util.ArrayList;
public class PreAnswer extends PlivoElement {
public PreAnswer() {
super(E_PREANSWER, null);
this.nestableElements = new ArrayList<String>();
this.nestableE... |
hoehnp/SpaceDesignTool | sta-src/Astro-Core/perturbations.h | <filename>sta-src/Astro-Core/perturbations.h
/*
This program is free software; you can redistribute it and/or modify it under
the terms of the European Union Public Licence - EUPL v.1.1 as published by
the European Commission.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY W... |
alexNeto/previsao-tempo | src/test/java/com/ts/previsao/tempo/utils/UrlBuilderTest.java | package com.ts.previsao.tempo.utils;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class UrlBuilderTest {
private UrlBuilder urlBuilder;
@Before
public void setUp() {
this.urlBuilder = new UrlBuilder();
}
@Test
public void testa_acao_de_procura_cidade(... |
CiscoDevNet/ydk-cpp | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_ncs5500_coherent_portmode_cfg.hpp | #ifndef _CISCO_IOS_XR_NCS5500_COHERENT_PORTMODE_CFG_
#define _CISCO_IOS_XR_NCS5500_COHERENT_PORTMODE_CFG_
#include <memory>
#include <vector>
#include <string>
#include <ydk/types.hpp>
#include <ydk/errors.hpp>
namespace cisco_ios_xr {
namespace Cisco_IOS_XR_ncs5500_coherent_portmode_cfg {
class DiffSel : public ydk... |
atorber/easy-chatbot-manager-mp | miniprogram/page/weui/example/msg/msg.js | import CustomPage from '../../base/CustomPage'
CustomPage({
onShareAppMessage() {
return {
title: 'msg',
path: 'page/weui/example/msg/msg'
}
},
openSuccess() {
wx.navigateTo({
url: 'msg_success'
})
},
openText() {
wx.navigateTo({
url: 'msg_text'
})
},
openT... |
manggoguy/parsec-modified | pkgs/libs/mesa/src/src/mesa/drivers/dri/mga/mgavb.c | <filename>pkgs/libs/mesa/src/src/mesa/drivers/dri/mga/mgavb.c
/*
* Copyright 2000-2001 VA Linux Systems, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software wi... |
shaylinj/Web_Project | PhotoApplicationRepo/src/test/java/za/ac/nwu/repo/persistence/imageTest.java | package za.ac.nwu.repo.persistence;
import za.ac.nwu.domain.persistence.Photo;
import za.ac.nwu.repo.config.RepositoryTestConfiguration;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupit... |
plimkilde/DHMQC | qc/contours.py | # -*- coding: utf-8 -*-
import os,sys
import shutil
from argparse import ArgumentParser
import subprocess
import tempfile
import time
import datetime
import random
from osgeo import gdal
from osgeo import ogr
from osgeo import osr
import numpy as np
from scipy.signal import convolve2d
from . import dhmqc_constants a... |
minhtrung2606/remitano_funny_videos | model/GeneralFailureResp.js | const Response = require('./Response');
class GeneralFailureResponse extends Response {
constructor(detail) {
super(false, `Requested operation Failed. ${detail}`);
}
}
const HTML_CODE = 500;
GeneralFailureResponse.handle = (res, detail = '') => {
const respose = new GeneralFailureResponse(detail... |
eperret/omakase | src/test/java/com/salesforce/omakase/test/util/TemplatesHelper.java | <filename>src/test/java/com/salesforce/omakase/test/util/TemplatesHelper.java
/*
* Copyright (c) 2015, salesforce.com, inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* Redistribu... |
dlasalle/domlib | tests/hashtable_all_test.c | #include "test.h"
#define N 1000000
#define M ((N)/2)
#define K 33
sint_t test(void)
{
sint_t i, j;
ss_ht_t * map = ss_ht_create(N,M);
for (i=0;i<M;++i) {
j = i*K;
ss_ht_put(j,j+10,map);
}
ss_ht_put(2*N,3,map);
ss_ht_put(3*N,4,map);
ss_ht_put(4*N,5,map);
for (i=0;i<M;++i) {
j = i*K;
... |
laohubuzaijia/fbthrift | thrift/compiler/mustache/template_type.cpp | <reponame>laohubuzaijia/fbthrift
/*
The source code contained in this file is based on the original code by
<NAME> (https://github.com/no1msd/mstch). The original license by Daniel
Sipka can be read below:
The MIT License (MIT)
Copyright (c) 2015 <NAME>
Permission is hereby granted, free of charge, to any person ob... |
stigger/AppleScript-IDEA | src/main/java/com/intellij/plugin/applescript/lang/ide/highlighting/AppleScriptSyntaxHighlighterFactory.java | /*
* Copyright (C) 2014, Cast & Crew (R) Software, LLC
* All rights reserved. Unauthorized disclosure or distribution is prohibited.
*/
package com.intellij.plugin.applescript.lang.ide.highlighting;
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
import com.intellij.openapi.fileTypes.SyntaxHighlighterFact... |
HeyLey/catboost | catboost/libs/helpers/wx_test.h | <filename>catboost/libs/helpers/wx_test.h
#pragma once
#include <util/generic/vector.h>
#include <util/generic/ymath.h>
#include <util/generic/algorithm.h>
/*
* Inspired by vpdelta@ FML implementation
*/
struct TWxTestResult {
double WPlus = 0;
double WMinus = 0;
double PValue = 0;
};
TWxTestResult WxT... |
gaurav46/heroic | discovery/simple/src/main/java/com/spotify/heroic/cluster/discovery/simple/SrvRecordDiscovery.java | /*
* Copyright (c) 2015 Spotify AB.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License,... |
chihlee/phantomjs | src/qt/qtbase/src/tools/qdoc/codemarker.h | /****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the tools applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Li... |
J-VOL/mage | Mage.Sets/src/mage/cards/c/ChaosDragon.java | <filename>Mage.Sets/src/mage/cards/c/ChaosDragon.java
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksEachCombatStaticAbility;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities... |
jmthompson2015/gamefinder | converter/MechanicGenerator.js | const R = require("ramda");
const CharacterConverter = require("./CharacterConverter.js");
const FileLoader = require("./FileLoader.js");
const FileWriter = require("./FileWriter.js");
const MechanicGenerator = {};
const INPUT_FILE = "GameDetail.json";
const PROPERTY = "mechanics";
const OUTPUT_FILE = "../artifact/M... |
Justis-Lamanna/Fracktail_3 | src/main/java/com/github/milomarten/fracktail3/modules/moon/MoonPhase.java | package com.github.milomarten.fracktail3.modules.moon;
import lombok.Data;
@Data
public class MoonPhase {
private final double angle;
public boolean isFull() {
return getCoverage() > 99.5;
}
public boolean isNew() {
return getCoverage() < 0.5;
}
public boolean isWaning() {
... |
phatblat/macOSPrivateFrameworks | PrivateFrameworks/FinderKit/FI_TSearchScopeSliceController.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import <FinderKit/FI_TViewController.h>
@class NSObject<TSearchScopeSliceControllerDelegate>;
__attribute__((visibility("hidden")))
@interface FI_TSearchScopeSliceController : FI_TView... |
uc43/TTQP | library/imports/b7/b7908bd0-d96a-43fb-bf8e-86a3c7beee1c.js | <filename>library/imports/b7/b7908bd0-d96a-43fb-bf8e-86a3c7beee1c.js<gh_stars>0
"use strict";
cc._RF.push(module, 'b7908vQ2WpD+7+OhqPHvu4c', 'HomeBottomView');
// Script/HomeScript/HomeBottomView/HomeBottomView.js
"use strict";
var socket = require("websocketScript");
cc.Class({
extends: cc.Component,
prope... |
TheAwesomeGem/BlockDropsTweaker | src/main/java/net/theawesomegem/blockdropstweaker/common/event/EventHandlerCommon.java | <reponame>TheAwesomeGem/BlockDropsTweaker<gh_stars>1-10
package net.theawesomegem.blockdropstweaker.common.event;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity... |
hjc851/Dataset2-HowToDetectAdvancedSourceCodePlagiarism | Variant Programs/1-5/13/ontogenetic/AmountRearing.java | <filename>Variant Programs/1-5/13/ontogenetic/AmountRearing.java
package ontogenetic;
public class AmountRearing {
public static synchronized void placedWhen(double prey) {
bringCommonMeterGoalkeeper().soarTcs(prey);
}
private synchronized double letAfootHours() {
return this.liveDays;
}
private A... |
paper/LeetCodeV2 | Algorithms/561. Array Partition I.js | /**
* Given an array of 2n integers, your task is to group these integers into n pairs of integer,
* say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible.
*
* Example 1:
* Input: [1,4,3,2]
*
* Output: 4
* Explanation: n is 2, and the maximum sum of pai... |
t-mochizuki/cpp-study | AtCoder/ABC122/abc122C.cpp | #include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define REP(a, i, n) for (int i = a; i < n; ++i)
int main() {
int N, Q;
cin >> N >> Q;
string S;
cin >> S;
int cnt = 0;
vector<int> v;
v.push_back(cnt);
REP(1, i, S.length()) {
if... |
13824125580/higan | higan/fc/cartridge/chip/vrc1.cpp | <reponame>13824125580/higan
struct VRC1 : Chip {
VRC1(Board& board) : Chip(board) {
}
auto addrPRG(uint addr) const -> uint {
uint bank = 0x0f;
if((addr & 0xe000) == 0x8000) bank = prgBank[0];
if((addr & 0xe000) == 0xa000) bank = prgBank[1];
if((addr & 0xe000) == 0xc000) bank = prgBank[2];
re... |
ivan-sysoi/django-photoslib | photoslib/__init__.py | <reponame>ivan-sysoi/django-photoslib
default_app_config = 'photoslib.apps.PhotosLibConfig'
|
anderslatif/dev_env_2019 | 3._Bike_Shop/src/components/ProductViews.js | import React, { Component } from 'react'
import Loader from 'react-loader-spinner'
import Slider from "react-slick";
import { DateRangePicker } from 'react-dates';
import 'react-dates/lib/css/_datepicker.css';
// import Carousel from 'nuka-carousel';
class ProductViews extends Component {
constructor(props) {
s... |
Shaika-Dzari/bluekarbon-node | app/utils/htmlutils.js | <filename>app/utils/htmlutils.js
let config = require('../config/config');
let Remarkable = require('remarkable');
const remarkable = new Remarkable();
const sanitizeUrl = (str) => {
let oneStr = str || '';
oneStr = oneStr.replace(/[!$?*&#\\]/, '');
oneStr = oneStr.replace(/[^a-z0-9_\-]/gi, '_');
re... |
hys9958/tajo | tajo-client/src/main/java/org/apache/tajo/cli/tsql/commands/HelpCommand.java | <filename>tajo-client/src/main/java/org/apache/tajo/cli/tsql/commands/HelpCommand.java
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF lic... |
Bewalticus/gocd | server/src/main/webapp/WEB-INF/rails/spec/models/stage_history_api_model_spec.rb | <filename>server/src/main/webapp/WEB-INF/rails/spec/models/stage_history_api_model_spec.rb<gh_stars>1-10
#
# Copyright 2019 ThoughtWorks, 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
... |
kclinden/microsoft-iis-8.5-site-stig-baseline | controls/V-76855.rb | <reponame>kclinden/microsoft-iis-8.5-site-stig-baseline
control 'V-76855' do
title 'IIS 8.5 website session IDs must be sent to the client using TLS.'
desc "The HTTP protocol is a stateless protocol. To maintain a session, a
session identifier is used. The session identifier is a piece of data that is
used to ... |
cryst-al/novoline | src/net/ax5.java | package net;
import java.util.List;
import net.aMN;
import net.aTi;
import net.aXe;
import net.cq;
import net.rX;
import viaversion.viaversion.api.PacketWrapper;
import viaversion.viaversion.api.Via;
import viaversion.viaversion.api.remapper.PacketHandler;
import viaversion.viaversion.api.type.Type;
class ax5 impleme... |
dsm-fudan/KV-match | src/main/java/cn/edu/fudan/dsm/kvmatch/operator/file/TimeSeriesNodeIterator.java | <filename>src/main/java/cn/edu/fudan/dsm/kvmatch/operator/file/TimeSeriesNodeIterator.java
/*
* Copyright 2017 <NAME>
*
* 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.a... |
JayeshB92/ishapi | app/controllers/ishapi/reports_controller.rb | require_dependency "ishapi/application_controller"
module Ishapi
class ReportsController < ApplicationController
def show
@report = Report.unscoped.find_by :name_seo => params[:name_seo]
authorize! :show, @report
end
def index
authorize! :index, Report
@reports = Report.all
... |
embedthis/ejscript | src/core/src/ejsString.c | <reponame>embedthis/ejscript
/**
ejsString.c - Ejscript string class
Copyright (c) All Rights Reserved. See details at the end of the file.
*/
/********************************** Includes **********************************/
#include "ejs.h"
#include "pcre.h"
/*********************************** Locals... |
chimple/fiji | app/components/games/RectangularGrid.js | import React, { PureComponent, Component } from 'react';
import { View, StyleSheet } from 'react-native';
import PropTypes from 'prop-types'
export default class RectangularGrid extends PureComponent {
_renderChild = (Child, style) => (
<Child />
)
render() {
console.log('RectangularGrid.render')
co... |
geo-bl-ch/pyramid_oereb | pyramid_oereb/standard/hook_methods.py | # -*- coding: utf-8 -*-
import datetime
import logging
from mako import exceptions
from mako.template import Template
from pyramid.httpexceptions import HTTPNotFound
from pyramid.path import AssetResolver, DottedNameResolver
from pyramid.response import Response
from sqlalchemy import cast, Text
from pyramid_oereb im... |
jhutchings1/zitadel | internal/project/repository/eventsourcing/model/project_test.go | <reponame>jhutchings1/zitadel
package model
import (
"encoding/json"
es_models "github.com/caos/zitadel/internal/eventstore/models"
"github.com/caos/zitadel/internal/project/model"
"testing"
)
func TestProjectChanges(t *testing.T) {
type args struct {
existing *Project
new *Project
}
type res struct {... |
yangziwen/quick-dao | quick-dao-core/src/main/java/io/github/yangziwen/quickdao/core/FunctionCriterion.java | package io.github.yangziwen.quickdao.core;
import io.github.yangziwen.quickdao.core.util.InvokedMethodExtractor;
import io.github.yangziwen.quickdao.core.util.StringWrapper;
import lombok.Getter;
@Getter
public class FunctionCriterion<E> extends TypedCriterion<E, Object> {
private final InvokedMethodExtractor<E>... |
acidicMercury8/xray-1.0 | src/xr_3da/xrGame/EffectorShotX.h | <gh_stars>1-10
#pragma once
#include "EffectorShot.h"
class CCameraShotEffectorX : public CCameraShotEffector
{
typedef CCameraShotEffector inherited;
public:
CCameraShotEffectorX(float max_angle, float relax_time, float max_angle_horz, float step_angle_horz, float angle_frac = 0.7f);
virtual ~CC... |
hsouidi/oanda-robot | robot-engine/src/main/java/com/trading/forex/entity/Role.java | <filename>robot-engine/src/main/java/com/trading/forex/entity/Role.java
package com.trading.forex.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import ... |
dworthen/arquero | test/format/json-test.js | <gh_stars>0
import tape from 'tape';
import tableEqual from '../table-equal';
import ColumnTable from '../../src/table/column-table';
import fromJSON from '../../src/format/from-json';
import toJSON from '../../src/format/to-json';
function data() {
return {
str: ['a', 'b', 'c'],
int: [1, 2, 3],
num: [12... |
dtgit/lftwb | app/models/shared_upload.rb | <filename>app/models/shared_upload.rb
# == Schema Information
# Schema version: 20090213002439
#
# Table name: shared_uploads
#
# id :integer(4) not null, primary key
# shared_uploadable_id :integer(4)
# shared_uploadable_type :string(255)
# upload_id :integer(4)
# ... |
mediciland/bpanel | webapp/store/constants/wallets.js | <reponame>mediciland/bpanel
export const ADD_ACCOUNTS = 'ADD_ACCOUNTS';
export const ADD_WALLET = 'ADD_WALLET';
export const REMOVE_WALLET = 'REMOVE_WALLET';
|
seveirbian/unis | unisctl/cmd/images.go | package cmd
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var imagesUsage = `Usage: unisctl images [OPTIONS]
Options:
-p, --public Show public images (default private images)
-h, --help help for images
`
var allImagesFlag bool
var i... |
smoe/nydax | frontend/src/components/VerifyAccountModal/UploadVerificationFiles/constants.js | <filename>frontend/src/components/VerifyAccountModal/UploadVerificationFiles/constants.js<gh_stars>1-10
const text = {
TITLE: 'Upload Images',
DESCRIPTION: documentName =>
`Upload pictures of your ${documentName} ( JPEG or PNG )`,
SAVE: 'Save',
GO_BACK: 'Go Back',
};
export default text;
|
SecretAgent-YT/JDA | src/main/java/net/dv8tion/jda/api/entities/NewsChannel.java | <filename>src/main/java/net/dv8tion/jda/api/entities/NewsChannel.java<gh_stars>1-10
package net.dv8tion.jda.api.entities;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.exceptions.InsufficientPermissionException;
import net.dv8tion.jda.api.exceptions.MissingAccessException;
import net.dv8tion.j... |
Grk0/MapsEvolved | pymaplib_cpp/src/map_dhm_advanced.cpp | #include "map_dhm_advanced.h"
#define _USE_MATH_DEFINES
#include <memory>
#include <cassert>
#include <math.h>
#include "util.h"
#include "bezier.h"
GradientMap::GradientMap(const std::shared_ptr<RasterMap> &orig_map)
: m_orig_map(orig_map)
{
assert(orig_map->GetType() == RasterMap::TYPE_DHM);
}
GeoDrawable... |
gsteri1/OG-Platform | projects/OG-Analytics/tests/unit/com/opengamma/financial/model/finitedifference/ForwardPDETest.java | <gh_stars>1-10
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.model.finitedifference;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.Test;
import com.opengamma... |
coderZsq/coderZsq.practice.server | study-notes/j2ee-collection/java-web/01-Java基础加强/src/com/coderZsq/_01_review/MotherBoard.java | <filename>study-notes/j2ee-collection/java-web/01-Java基础加强/src/com/coderZsq/_01_review/MotherBoard.java
package com.coderZsq._01_review;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
// 主板
public class MotherBoard {
// 存储安装的USB设备对象
... |
PolarizedIons/JamesBot | src/test/java/mocks/MockUser.java | <filename>src/test/java/mocks/MockUser.java
package mocks;
import org.pircbotx.User;
public class MockUser extends User {
public MockUser(String nick, String ident, String host) {
super(new MockUserHostmask(nick, ident, host));
}
}
|
matrixzz/InterviewPractice | src/LongestSubstringKDistinct.java | <reponame>matrixzz/InterviewPractice
import java.util.HashMap;
public class LongestSubstringKDistinct {
public int lengthOfLongestSubstringKDistinct(String s, int k) {
if (s == null || s.isEmpty() || k == 0) {
return 0;
} else if (s.length() <= k) {
return s.length();
... |
troels/compute-runtime | shared/source/gen9/hw_info_gen9.cpp | <filename>shared/source/gen9/hw_info_gen9.cpp<gh_stars>100-1000
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen9/hw_info_gen9.h"
namespace NEO {
const char *GfxFamilyMapper<IGFX_GEN9_CORE>::name = "Gen9";
} // namespace NEO
|
nances/INNBook | app/src/main/java/com/kaqi/niuniu/ireader/ui/adapter/view/BillBookHolder.java | package com.kaqi.niuniu.ireader.ui.adapter.view;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.kaqi.niuniu.ireader.App;
import com.kaqi.niuniu.ireader.R;
import com.kaqi.niuniu.ireader.model.bean.BillBookBean;
import com.kaqi.niuniu.ireader.ui.base.adapte... |
sravani-m/Web-Application-Security-Framework | venv/lib/python2.7/site-packages/lz4/version.py | # coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = u'1.1.0'
|
rofl0r/chaos-pp | chaos/preprocessor/array/size.h | # /* ********************************************************************
# * *
# * (C) Copyright <NAME> 2003-2005. *
# * *
# * Distributed under the Boo... |
onmyway133/Runtime-Headers | macOS/10.13/CoreFoundation.framework/_CFXNotificationTokenRegistration.h | <gh_stars>10-100
/* Generated by RuntimeBrowser
Image: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
*/
@interface _CFXNotificationTokenRegistration : _CFXNotificationRegistrationBase {
id _handler;
unsigned long long _options;
BOOL _registered;
unsigned long long... |
sighttviewliu/hashgard | x/record/params/record_query_params.go | package params
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// Param for query record
type RecordQueryParams struct {
StartRecordId string `json:"start_record_id"`
Sender sdk.AccAddress `json:"sender"`
Limit int `json:"limit"`
}
|
RedRock-2017-Summer/freshmanspecial | app/src/main/java/com/mredrock/freshmanspecial/CQUPTElegant/View/ExcellenceTechFragment.java | <reponame>RedRock-2017-Summer/freshmanspecial<gh_stars>0
package com.mredrock.freshmanspecial.CQUPTElegant.View;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerVie... |
aks010/ClusterDuck-Protocol | docs/html/search/all_f.js | var searchData=
[
['togglereceiveflag_148',['toggleReceiveFlag',['../class_duck.html#a6c165684af138d33424ecb32cf70f53f',1,'Duck']]],
['topic_149',['topic',['../struct_packet.html#a6141794b7f5f88ff6063f9c668e25840',1,'Packet']]],
['topic_5fb_150',['topic_B',['../_duck_lora_8h.html#a1b6b80f65a5bb8817aa1eb5a272567bf... |
MarginC/kame | netbsd/sys/arch/x68k/stand/boot_ufs/readufs.h | /* from Id: readufs.h,v 1.7 2002/01/26 15:55:51 itohy Exp */
/*
* Written by ITOH, Yasufumi (<EMAIL>)
* Public domain.
*/
#include <ufs/ufs/dir.h>
/*
* filesystem information
*/
struct ufs_info {
enum ufs_fstype {
UFSTYPE_UNKNOWN
#ifdef USE_FFS
, UFSTYPE_FFS
#endif
#ifdef USE_LFS
, UFSTYPE_LFS
#endif
}... |
mishazharov/caffeine | include/caffeine/IR/Transforms.h | #pragma once
/**
* This header is meant to contain a number of transforms which can be used as
* needed.
*
* Most of the time they will probably be used by various types of solvers but
* since they're common functionality it is useful to have them all in one
* place.
*
* To avoid polluting the caffeine namespa... |
gr3gdev/jmonkey-intellij-integration | src/main/java/com/jmonkeystore/ide/editor/component/ColorRGBAComponent.java | package com.jmonkeystore.ide.editor.component;
import com.jme3.math.ColorRGBA;
import com.jmonkeystore.ide.jme.ColorUtils;
import javax.swing.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Col... |
thewizardplusplus/wizard-diary | scripts/achievements_selects.js | <filename>scripts/achievements_selects.js
var AchievementsSelects = {};
$(document).ready(
function() {
var UPDATE_DELAY = 500;
var levels_picker = $('#achievements_levels_select').selectpicker();
var texts_picker = $('#achievements_texts_select').selectpicker();
var detector = new MobileDetect(navigator.use... |
thinline72/cayenne | cayenne-server/src/main/java/org/apache/cayenne/BaseContext.java | <filename>cayenne-server/src/main/java/org/apache/cayenne/BaseContext.java
/*****************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional inf... |
unconed/NFSpace | Platform/OSX/Frameworks/CEGUI.framework/Versions/A/Headers/CEGUIPixmapFont.h | /***********************************************************************
filename: CEGUIPixmapFont.h
created: 14/6/2006
author: <NAME>
purpose: Implementation of the Font class via static imagesets
*************************************************************************/
/****************************... |
xiayefeng/net-easy-learn | 2.1.4-组件通信/src/demo2.js | import React,{Component} from 'react';
import './App.css';
class List extends Component{
constructor(props) {
super(props);
this.state = {
data: [
{name: 'a',id:0},
{name: 'b',id:1},
{name: 'c',id:2}
],
}
}
render() {
return (
<div>
{this.state.data.map(item => <p key={item.id}>{i... |
technoman72/BlocklyArduino_electrified | arduino/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/lwip2/builder/glue-lwip/lwip-git.h |
#ifndef LWIP_GIT_H
#define LWIP_GIT_H
#include "lwipopts.h"
#include "lwip/netif.h"
#include "user_interface.h"
#define netif_sta (&netif_git[STATION_IF])
#define netif_ap (&netif_git[SOFTAP_IF])
extern struct netif netif_git[2];
#endif // LWIP_GIT_H
|
CypHelp/TestNewWorldDemo | AndroidProject/dc/app/src/main/java/com/example/ershou/Util/Url.java | <reponame>CypHelp/TestNewWorldDemo<filename>AndroidProject/dc/app/src/main/java/com/example/ershou/Util/Url.java
package com.example.ershou.Util;
public class Url {
public static String url(){
return "http://127.0.0.1:8080/diancan/";
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.