repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
mehrdad-shokri/cartodb | lib/assets/javascripts/builder/public_editor.js | <filename>lib/assets/javascripts/builder/public_editor.js<gh_stars>1000+
require('whatwg-fetch');
require('promise-polyfill');
var FastClick = require('fastclick');
FastClick.attach(document.body);
var $ = require('jquery');
var _ = require('underscore');
var ConfigModel = require('builder/data/config-model');
var La... |
gminchev1982/softuni-android | Tabs/app/src/main/java/com/example/gminchev/tabs/dataModel/helper_models/Temperatures.java | <gh_stars>0
package com.example.gminchev.tabs.dataModel.helper_models;
public class Temperatures {
public double day;
public double min;
public double max;
public double night;
public double eve;
public double morn;
} |
JinlongLiao/easy-tools | commons/commons-common/src/main/java/io/github/jinlonghliao/common/core/util/IdUtil.java | <gh_stars>0
/**
* Copyright 2020-2021 JinlongLiao
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by ap... |
phmdacosta/exchangelog | src/main/java/com/pedrocosta/exchangelog/services/CoreService.java | package com.pedrocosta.exchangelog.services;
public interface CoreService {
}
|
monitron/jarvis-ha | lib/web/scripts/capabilities/control-browser/ControlBrowserCapabilityView.js | <gh_stars>1-10
const Marionette = require('backbone.marionette');
const ControlContainersView = require('./ControlContainersView.js');
const SensorsView = require('./SensorsView.js');
const ScenesView = require('./ScenesView.js');
module.exports = class ControlBrowserCapabilityView extends Marionette.View {
templat... |
matrixsmaster/MILLA | milla-view/facedetector.cpp | #include <QDebug>
#include <QApplication>
#include <QMessageBox>
#include "facedetector.h"
using namespace cv;
using namespace std;
CascadeClassifier* FaceDetector::face_cascade = nullptr;
int FaceDetector::face_inst_cnt = 0;
FaceDetector::FaceDetector()
{
face_inst_cnt++;
if (!face_cascade) {
face_c... |
remz1337/ecj | ecj/src/main/java/ec/display/ControlPanel.java | <filename>ecj/src/main/java/ec/display/ControlPanel.java
/*
Copyright 2006 by <NAME>
Licensed under the Academic Free License version 3.0
See the file "LICENSE" for more information
*/
/*
* Created on Mar 6, 2005 12:48:58 PM
*
* By: spaus
*/
package ec.display;
import java.awt.Component;
import java.awt.D... |
cihankarluk/TvFY | itests/base.py | <filename>itests/base.py
import requests
from bs4 import BeautifulSoup
from django.test import TestCase
from TvFY.collector.base import Scrapper
from TvFY.collector.google import GoogleScrapper
from TvFY.collector.imdb import IMDBBase
from TvFY.collector.tomatoes import TomatoesBase
class BaseTestCase(TestCase):
... |
1040128600/OfficeAssitant | src/pages/components/hr/academy-statistic-study/item.js | <filename>src/pages/components/hr/academy-statistic-study/item.js
import { Tooltip } from "iview";
import { getParseUrl, getHashUrl, setItem, getItem } from '@utils/utils';
import { StudentDetail } from './popup/student-detail';
export default {
data() {
return {
columns: [
{
title: '姓名',
key: 'sta... |
mislav/twitter | spec/twitter/client/accounts_spec.rb | require 'helper'
describe Twitter::Client do
before do
@client = Twitter::Client.new
end
describe "#rate_limit_status" do
before do
stub_get("/1/account/rate_limit_status.json").
to_return(:body => fixture("rate_limit_status.json"), :headers => {:content_type => "application/json; charset... |
swp-song/SwpTransitions | SwpTransitions/Class/Main/SwpCustomAnimations/SwpCustomAnimations.h | //
// SwpCustomAnimations.h
// swp_song
//
// Created by swp_song on 2018/4/29.
// Copyright © 2018年 swp_song. All rights reserved.
//
#import "SwpTransitions.h"
NS_ASSUME_NONNULL_BEGIN
/**
* @author swp_song
*
* @brief SwpCustomAnimationsBlock ( SwpCustomAnimations 转场回调参数 )
*
* @param transitionContex... |
DATX02-87/DecentralizedVoting | transaction-processor/model/src/main/java/se/chalmers/datx02/model/Example.java | package se.chalmers.datx02.model;
import com.fasterxml.jackson.databind.ObjectMapper;
import sawtooth.sdk.protobuf.TpProcessRequest;
import se.chalmers.datx02.model.action.AddCandidateAction;
import se.chalmers.datx02.model.action.AddElectionAction;
import se.chalmers.datx02.model.action.CastVoteAction;
import se.chal... |
OpenMPDK/SMDK | lib/linux-5.18-rc3-smdk/drivers/net/wireless/ath/ath11k/rx_desc.h | /* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
*/
#ifndef ATH11K_RX_DESC_H
#define ATH11K_RX_DESC_H
enum rx_desc_rxpcu_filter {
RX_DESC_RXPCU_FILTER_PASS,
RX_DESC_RXPCU_FILTER_MONITOR_CLIENT,
RX_DESC_RXPCU_FILTER_MONITOR_OTHER,
};
/* rxpc... |
zxqfl/flix | main/test/ca/uwaterloo/flix/library/TestResult.scala | /*
* Copyright 2016 <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 to in writ... |
DougRogers-DigitalFish/USD | pxr/usd/usdGeom/wrapMesh.cpp | //
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... |
redclock/lufylegend.js | examples/demo/RunningGirl/js/share.js | function share(sType){
var sName = "<NAME>";
var title='lufy\' legend',
_wset = 800,
_hset = 480,
_w = 800,
_h = 480,
_strGamePic="http://lufylegend.com/demo/RunningGirl/images/logo.png";
var en=encodeURIComponent;
var l=document.location.href;
l = l.replace(/_\d{1,}\.htm/,... |
2947721120/foam | js/foam/demos/graphics/DragonHeart.js | /**
* @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
flumebase/flumebase | src/main/java/com/odiago/flumebase/flume/SourceContext.java | <filename>src/main/java/com/odiago/flumebase/flume/SourceContext.java
/**
* Licensed to Odiago, Inc. under one or more contributor license
* agreements. See the NOTICE.txt file distributed with this work for
* additional information regarding copyright ownership. Odiago, Inc.
* licenses this file to you under the... |
Gerryflap/master_thesis | trainloops/listeners/loss_plotter.py | import json
import os
from collections import defaultdict
from trainloops.listeners.listener import Listener
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
class LossPlotter(Listener):
def __init__(self, output_path, every_n_epochs=1):
super().__init__()
self.path = os.pa... |
coco673/TrustyBrowser | trustybrowser/__main__.py | <reponame>coco673/TrustyBrowser
#!/usr/bin/env python
# encoding: utf-8
import argparse
import configparser
import sys
import logging
from .SSLTester import SSLTester
if __name__ == "__main__":
# Options en ligne de commande
parser = argparse.ArgumentParser(description="Trusty Browser - Audit\
... |
spegustavo/VaadinProject | node_modules/@vaadin/vaadin-virtual-list/src/virtualizer.js | <filename>node_modules/@vaadin/vaadin-virtual-list/src/virtualizer.js
import { IronListAdapter } from './virtualizer-iron-list-adapter.js';
export class Virtualizer {
/**
* @typedef {Object} VirtualizerConfig
* @property {Function} createElements Function that returns the given number of new elements
* @pro... |
the4thamigo-uk/ingestor | pkg/server/options.go | <gh_stars>1-10
package server
import (
"github.com/the4thamigo-uk/ingestor/pkg/log"
)
// Option defines the interface to use to set options on the Server instance
type Option func(*server) error
// WithLogger sets which logger instance the server should use
func WithLogger(l log.Logger) Option {
return func(s *ser... |
alex-free/sm64ex-creator | sm64ex-nightly/levels/bob/areas/1/collision.inc.c | // 0x0700E958 - 0x0701104C
const Collision bob_seg7_collision_level[] = {
COL_INIT(),
COL_VERTEX_INIT(0x23A),
COL_VERTEX(-3538, 944, -4176),
COL_VERTEX(-3460, 944, -4212),
COL_VERTEX(-3477, 941, -4251),
COL_VERTEX(-3556, 942, -4215),
COL_VERTEX(-3536, 825, -4169),
COL_VERTEX(-3538, 945, ... |
gourmetjs/gourmet-ssr | utils/plugin-sort/gmsrc/index.js | <reponame>gourmetjs/gourmet-ssr
"use strict";
const PluginSorter = require("./PluginSorter");
module.exports = function sortPlugins(items, options) {
const sorter = new PluginSorter(options);
return sorter.run(items);
};
|
ezmaxinc/eZmax-SDK-c | unit-test/test_franchisereferalincome_create_object_v2_response_all_of.c | <reponame>ezmaxinc/eZmax-SDK-c
#ifndef franchisereferalincome_create_object_v2_response_all_of_TEST
#define franchisereferalincome_create_object_v2_response_all_of_TEST
// the following is to include only the main from the first c file
#ifndef TEST_MAIN
#define TEST_MAIN
#define franchisereferalincome_create_object_v2... |
1372501851/qukuailian | src/main/java/com/saiyun/service/UserWalletService.java | <filename>src/main/java/com/saiyun/service/UserWalletService.java
package com.saiyun.service;
import com.saiyun.mapper.UserWalletMapper;
import com.saiyun.model.UserWallet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserWalletSer... |
vusec/revanc | include/paging.h | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <macros.h>
struct page_level {
size_t entry_size... |
pdony/test | node_modules/jscodeshift/dist/jsx/ensure.js | function ensure({ test, value }, data, message) {
const result = test(data);
if (!result) {
throw new Error(message || data);
}
}
function Length(value) {
return {
value: value.length,
test: (length) => {
return value.length === length;
},
};
}
function Exists(value) {
return {
... |
BigNuoLi/jenkins-library | integration/integration_jenkins_test.go | // can be execute with go test -tags=integration ./integration/...
package main
import (
"context"
"net/http"
"os"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/SAP/jenkins-library/pkg/jenkins"
)
func TestTriggerJob(t *testing.T) {
t.Skip("no Jenkins insta... |
kassonlab/gmxapi | src/gromacs/fileio/writeps.h | <reponame>kassonlab/gmxapi
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2010,2014,2015,2019, by the GROMACS development team, led by
* <NAME>, <NAM... |
IRONKAGE/DetoxInstruments | DetoxInstruments/DetoxInstruments/Views/Plots/DTXPlotHeightSynchronization.h | //
// DTXPlotHeightSynchronization.h
// DetoxInstruments
//
// Created by <NAME> (Wix) on 1/22/20.
// Copyright © 2017-2021 Wix. All rights reserved.
//
@protocol DTXPlotHeightSynchronization <NSObject>
@property (nonatomic) double maximumPlotHeight;
@end
|
rjsicko/rtg-tools | src/com/rtg/util/diagnostic/SlimException.java | <gh_stars>100-1000
/*
* Copyright (c) 2014. Real Time Genomics Limited.
*
* 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 cop... |
suhasv1995/md-react-icons | icons/SkipNextLined.js | import React from 'react';
import createSvg from './utils/createSvg';
export default createSvg(<path d="M6 18l8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z" />, 'SkipNextLined', '0 0 24 24'); |
ruijiefang/duet-IW | bench/tasks/bitprecise/Urban-WST2013-Fig2-modified1000.c | extern int __VERIFIER_nondet_int();
extern void __VERIFIER_assume(int);
int nondet_signed_int() {
int r = __VERIFIER_nondet_int();
__VERIFIER_assume ((-0x7fffffff - 1) <= r && r <= 0x7fffffff);
return r;
}
signed int main()
{
signed int x1;
signed int x2;
x1 = nondet_signed_int();
x2 = nondet_signed_int()... |
JessenPan/leetcode-java | algorithms/java/src/test/java/org/jessenpan/leetcode/dp/S300LongestIncreasingSubsequenceTest.java | <gh_stars>1-10
package org.jessenpan.leetcode.dp;
import org.junit.Assert;
import org.junit.Test;
/**
* @author jessenpan
*/
public class S300LongestIncreasingSubsequenceTest {
private S300LongestIncreasingSubsequence longestIncreasingSubsequence = new S300LongestIncreasingSubsequence();
@Test
public ... |
vjmadrid/enmilocalfunciona-kafka | demo-kafka-spring-boot-rest-producer/src/main/java/com/acme/kafka/producer/constant/SpringConfigConstant.java | <gh_stars>0
package com.acme.kafka.producer.constant;
public class SpringConfigConstant {
private SpringConfigConstant() {
}
public static final String GENERIC_PACKAGE = "com.acme";
public static final String BASE_PACKAGE = GENERIC_PACKAGE + ".kafka.producer";
public static final String CONTROLLER_PACKAGE = BA... |
lijunru-hub/esp-iot-solution | components/sensors/humiture/hdc2010/test/hdc2010_test.c | <gh_stars>1000+
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// 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... |
cloudinary/cloudinary_sap_commerce | ext-cloudinary/cloudinary/cloudinarymediacore/src/uk/ptr/cloudinary/strategies/impl/DefaultCloudinaryMediaConversionStrategy.java | package uk.ptr.cloudinary.strategies.impl;
import de.hybris.platform.core.model.media.MediaFormatModel;
import de.hybris.platform.core.model.media.MediaModel;
import de.hybris.platform.mediaconversion.MediaConversionService;
import de.hybris.platform.mediaconversion.conversion.ConvertedMediaCreationStrategy;
import de... |
gaoht/house | java/classes4/org/ksoap2/serialization/MarshalDate.java | <reponame>gaoht/house
package org.ksoap2.serialization;
import java.io.IOException;
import java.util.Date;
import org.kobjects.isodate.IsoDate;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
public class MarshalDate
implements Marshal
{
publ... |
ISI-apex/hpsc-baremetal | lib/panic.h | <gh_stars>0
#ifndef PANIC_H
#define PANIC_H
#include <stdint.h>
#include "console.h"
/* Note: printing via "%s" to allow '%' in conditions */
#define ASSERT(cond) \
if (!(cond)) { \
printf("ASSERT: %s:%u: %s\r\n", __FILE__, __LINE__, #cond); \
panic("ASSERT"); \
}
#def... |
cs8minty/Roots | src/main/java/epicsquid/roots/block/runes/BlockWildwoodRune.java | <reponame>cs8minty/Roots
package epicsquid.roots.block.runes;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import epicsquid.mysticallib.block.BlockTEBase;
import epicsquid.roots.init.ModBlocks;
import epicsquid.roots.tileentity.TileEntityWildrootRune;
import net.minecraft.block.SoundType... |
Czarek93/fastjson | src/test/java/com/alibaba/json/bvt/parser/deser/BooleanFieldDeserializerTest.java | <reponame>Czarek93/fastjson<filename>src/test/java/com/alibaba/json/bvt/parser/deser/BooleanFieldDeserializerTest.java
package com.alibaba.json.bvt.parser.deser;
import org.junit.Assert;
import junit.framework.TestCase;
import com.alibaba.fastjson.JSON;
public class BooleanFieldDeserializerTest extends TestCase {
... |
venkateshprasad123/wb | Java_GUI/src/com/ibm/safr/we/ui/views/metadatatable/MainTableContentProvider.java | package com.ibm.safr.we.ui.views.metadatatable;
/*
* Copyright Contributors to the GenevaERS Project. SPDX-License-Identifier: Apache-2.0 (c) Copyright IBM Corporation 2008.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... |
elegantJava/iptv_sas | src/main/java/com/hgys/iptv/model/bean/OrderProductDimensionListDTO.java | <filename>src/main/java/com/hgys/iptv/model/bean/OrderProductDimensionListDTO.java
package com.hgys.iptv.model.bean;
import com.xuxueli.poi.excel.annotation.ExcelField;
import com.xuxueli.poi.excel.annotation.ExcelSheet;
import lombok.Data;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.... |
live-wire/plynx | ui/src/components/3rd_party/react-alert/dev/components/AlertMessage.js | <filename>ui/src/components/3rd_party/react-alert/dev/components/AlertMessage.js
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import classnames from 'classnames';
class AlertMessage extends React.Component {
constructor(props) {
super(props);
this.state = {... |
nikolay-radkov/ebudgie-server | src/bot/messengerProfile.js | export const setGreetingText = async (bot) => {
try {
const data = await bot.setGreetingText('Welcome to EBudgie\'s assistant');
console.log(`Setting GreetingText result ${JSON.stringify(data)}`);
} catch (e) {
console.log('Error during setGreetingText', e);
}
};
export const setPersistentMenu = asyn... |
taoyuc3/CS225 | mp_intro/cs225/HSLAPixel.cpp | /**
* @file HSLAPixel.cpp
* Implementation of the HSLAPixel class for use in with the PNG library.
*
* @author CS 225: Data Structures
* @version 2018r1-lab1
*/
#include "HSLAPixel.h"
#include <cmath>
#include <iostream>
using namespace std;
namespace cs225 {
HSLAPixel::HSLAPixel()
{
h=0.0;
s=0.... |
biscuide/x-definition-e | src/main/java/org/xdef/impl/parsers/XSAbstractParser.java | package org.xdef.impl.parsers;
import org.xdef.msg.XDEF;
import org.xdef.sys.ArrayReporter;
import org.xdef.sys.SException;
import org.xdef.sys.SRuntimeException;
import org.xdef.sys.SThrowable;
import org.xdef.XDParseResult;
import org.xdef.XDParser;
import org.xdef.XDParserAbstract;
import org.xdef.XDValue;
import o... |
lynnchurch/MVPDemo | app/src/main/java/me/lynnchurch/mvpdemo/mvp/model/UserModel.java | <reponame>lynnchurch/MVPDemo
package me.lynnchurch.mvpdemo.mvp.model;
import java.util.List;
import javax.inject.Inject;
import io.rx_cache.DynamicKey;
import io.rx_cache.EvictDynamicKey;
import io.rx_cache.Reply;
import me.lynnchurch.base.di.scope.ActivityScope;
import me.lynnchurch.mvpdemo.mvp.contract.UserContract;... |
pombreda/pydee | pydeelib/widgets/externalshell/sitecustomize.py | # -*- coding: utf-8 -*-
# Pydee's ExternalPythonShell sitecustomize
# Set standard outputs encoding:
# (otherwise, for example, print u"é" will fail)
import sys, os
import os.path as osp
encoding = None
try:
import locale
except ImportError:
pass
else:
loc = locale.getdefaultlocale()
if... |
zcemycl/algoTest | py/tests/testTreeNode/test_TreeNode.py | from solns.treeNode.treeNode import *
import unittest
from parameterized import parameterized as p
class UnitTest_TreeNode(unittest.TestCase):
@p.expand([
[[1,2,3,4,5]],[[5,4,8,11,None,13,4,7,2,None,None,None,1]]
])
def test_fromList2(self,nums):
t = TreeNode.treeNode_fromList2(nums)
... |
shijiansu/core-java | java-6-by-tarena/src/main/java/tarena/day17_swing/TestJOptionPane.java | <reponame>shijiansu/core-java
package tarena.day17_swing;
import javax.swing.JOptionPane;
public class TestJOptionPane {
public static void main(String[] args) {
int result = JOptionPane.showConfirmDialog(null, "你确定吗?");
if(result==JOptionPane.YES_OPTION){
JOptionPane.showMessageDialog(null, "用户选择了YES");
}e... |
appheap/social-media-analyzer | backend/pyrogram/types/messages_and_media/message_entity.py | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... |
jMonkeyEngine-mirrors/jme-vehicles-jayfella-github | src/main/java/com/jayfella/jme/vehicle/gui/AnimatedMenuState.java | package com.jayfella.jme.vehicle.gui;
import com.jayfella.easing.Easings;
import com.jme3.app.Application;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.BaseAppState;
import com.jme3.math.FastMath;
import com.jme3.math.Vector3f;
import com.jme3.scene.Node;
import com.simsilica.lemur.Button;
import c... |
mellowCS/cwe_checker_juliet_suite | testcases/CWE253_Incorrect_Check_of_Function_Return_Value/main.cpp | /* NOTE - eventually this file will be automatically updated using a Perl script that understand
* the naming of test case files, functions, and namespaces.
*/
#include <time.h> /* for time() */
#include <stdlib.h> /* for srand() */
#include "std_testcase.h"
#include "testcases.h"
int main(int argc, char * argv[... |
DevIbrahimHussein/Audio-Library | src/middleware/trim-request.middleware.js | // Created by Ibrahim on Saturday
/*
trim-request is very simple to use, just import the package and use one of its methods:
trimRequest.all trim body, params and query objects
trimRequest.body trim only the body object
trimRequest.param trim the params object
trimRequest.query trim the query string object
for ... |
W-Carlos/CodeClub | modulo10/this/index.js | // Importando com o this no escopo global
const peaple1 = {
name: "Carlos",
age: 25
}
this.peaple1 = peaple1 |
leomauro/handsonscala | examples/14.1 - Mock/app/src/MinimalApplication.scala | <filename>examples/14.1 - Mock/app/src/MinimalApplication.scala
package app
import scalatags.Text.all._
object MinimalApplication extends cask.MainRoutes {
val bootstrap = "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.css"
@cask.get("/")
def hello() = doctype("html")(
html(
head(lin... |
rdok/the-modern-graphql-bootcamp | src/services/user.js | const getFirstName = (fullname) => {
return fullname.split(' ')[0]
}
export {getFirstName}
|
AltaPay/sdk-js | lib/ReservationResponse.js | <gh_stars>1-10
/**
* @extends InitiatePaymentResponse
* @param responseObject
* @constructor
*/
function ReservationResponse(responseObject) {
this.responseObject = responseObject;
ObjectHelper.extend(this, new InitiatePaymentResponse());
}
|
Rouzip/qiniu-go-sdk | syncdata/operation/util.go | package operation
import (
"net"
"net/http"
"time"
"github.com/qiniupd/qiniu-go-sdk/x/httputil.v1"
)
func shouldRetry(err error) bool {
if err == nil {
return false
}
code := httputil.DetectCode(err)
return code/100 == 5
}
func NewTransport(dialTimeoutMs int) http.RoundTripper {
t := &http.Transport{
P... |
squirrelcom/dennix | libc/src/search/twalk.c | /* Copyright (c) 2021 <NAME>
*
* Permission to use, copy, modify, and/or 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 W... |
summerclouds/common-core-spring-boot-starter | src/main/java/org/summerclouds/common/core/operation/TaskContext.java | /**
* Copyright (C) 2002 <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 at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
V-Tom/vue-blog | src/dev.t-tom.me/src/api/index.js | 'use strict';
import {AuthResource,ArticleResource} from './resources'
export const AuthApi = {
login: function (data) {
return AuthResource.save({
type: "login"
}, data)
},
logout: function () {
return AuthResource.get({
type: "logout"
})
}
};
export const ArticleApi = {
getArti... |
tanhaichao/leopard | topnb/topnb-web/src/test/java/io/leopard/topnb/web/data/BaseDataTest.java | package io.leopard.topnb.web.data;
import org.junit.Assert;
import org.junit.Test;
public class BaseDataTest {
private final BaseData data = new BaseData();
@Test
public void add() {
Assert.assertTrue(data.add("service.methodName", 1, 1));
Assert.assertTrue(data.add("service.methodName", 1, 1));
Assert.as... |
Purva-Chaudhari/cmssw | IORawData/CSCCommissioning/test/readFile.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("reader")
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cout.placeholder = cms.untracked.bool(False)
process.MessageLogger.cout.threshold = cms.untra... |
NgLoader/Discord-Bot-Wuffy-v1 | wuffy-network/src/main/java/net/wuffy/network/bot/server/SPacketBotStatsUpdate.java | <reponame>NgLoader/Discord-Bot-Wuffy-v1
package net.wuffy.network.bot.server;
import java.io.IOException;
import net.wuffy.network.Packet;
import net.wuffy.network.PacketBuffer;
import net.wuffy.network.bot.INetHandlerBotServer;
public class SPacketBotStatsUpdate implements Packet<INetHandlerBotServer> {
private i... |
xizi/mmdeploy | tests/test_codebase/test_mmdet/test_mmdet_utils.py | <filename>tests/test_codebase/test_mmdet/test_mmdet_utils.py<gh_stars>100-1000
# Copyright (c) OpenMMLab. All rights reserved.
import mmcv
import numpy as np
import torch
from mmdeploy.codebase import import_codebase
from mmdeploy.codebase.mmdet import (clip_bboxes, get_post_processing_params,
... |
Quicksilver-Project/quicksilveruml | src/uml/action_input_pin.c | /**~action~
* ActionInputPin [Class]
*
* Description
*
* An ActionInputPin is a kind of InputPin that executes an Action to determine the values to input to another Action.
*
* Diagrams
*
* Actions
*
* Generalizations
*
* InputPin
*
* Association Ends
*
* ♦ fromAction : Action [1..1]{subsets ... |
zephyrtronium/ardent | examples/keyboard/main.go | <gh_stars>0
package main
import (
"log"
"github.com/split-cube-studios/ardent"
"github.com/split-cube-studios/ardent/engine"
)
var (
game engine.Game
animation engine.Animation
x float64
)
// tick function.
func tick() {
if game.IsKeyPressed(engine.KeyA) {
// walk left
animation.SetState("sw... |
rexming1999/ASP-Portel | app/controllers/addEventButton.js | <filename>app/controllers/addEventButton.js
var args = arguments[0] || {};
$.view.addEventListener("click", function(e) {
Ti.App.fireEvent(args);
}); |
DigiArea/closurefx-builder | src/com/digiarea/closure/model/controller/JSHelperSectionController.java | <reponame>DigiArea/closurefx-builder
package com.digiarea.closure.model.controller;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Insets;
import javafx.geometry.... |
yvenshane/PenBook | PenBook/PenBook/Login&Register/FindPassword/Controller/VENFindPasswordViewController.h | <reponame>yvenshane/PenBook
//
// VENFindPasswordViewController.h
// PenBook
//
// Created by YVEN on 2019/1/9.
// Copyright © 2019年 Hefei Haiba Network Technology Co., Ltd. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface VENFindPasswordViewController : UIViewController
@end
... |
rovedit/Fort-Candle | extern/polymesh/src/polymesh/algorithms/properties.hh | #pragma once
#pragma message("this header is deprecated, please use #include <polymesh/properties.hh> instead")
#include <polymesh/properties.hh>
|
konexios/moonstone | selene-device-zigbee/src/main/java/moonstone/selene/device/xbee/zcl/domain/general/groups/commands/AddGroup.java | <reponame>konexios/moonstone<filename>selene-device-zigbee/src/main/java/moonstone/selene/device/xbee/zcl/domain/general/groups/commands/AddGroup.java
package moonstone.selene.device.xbee.zcl.domain.general.groups.commands;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets... |
uk-gov-mirror/ministryofjustice.offender-management-allocation-manager | db/migrate/20201208130833_change_early_allocation_column_outcome_null.rb | class ChangeEarlyAllocationColumnOutcomeNull < ActiveRecord::Migration[6.0]
def change
change_column_null :early_allocations, :outcome, false
end
end
|
Verizon/hlx | include/hlx/proxy_h.h | //: ----------------------------------------------------------------------------
//: Copyright (C) 2016 Verizon. All Rights Reserved.
//: All Rights Reserved
//:
//: \file: stat_h.h
//: \details: TODO
//: \author: <NAME>
//: \date: 12/12/2015
//:
//: Licensed under the Apache License, Version 2.0 (the "Licens... |
cabralsilva/Supervisorio | Supervisorio/src/Testes/TesteMeshs.java | package Testes;
import AGVS.Data.ConfigProcess;
import AGVS.Serial.Serial;
import AGVS.Util.Log;
import WebService.http.Servidor;
public class TesteMeshs {
public static void main(String[] args) {
try {
Serial serial = new Serial();
serial.conectar();
serial.enviar("<xml>5N2</xml>", "F176... |
upowerman/spring-boot-learning | spring-boot-data-jpa/src/main/java/com/yunus/controller/UserController.java | <reponame>upowerman/spring-boot-learning
package com.yunus.controller;
import com.yunus.transaction.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springfram... |
wangli1426/my-storm | storm-core/src/jvm/backtype/storm/elasticity/message/taksmessage/RemoteState.java | <reponame>wangli1426/my-storm
package backtype.storm.elasticity.message.taksmessage;
import backtype.storm.elasticity.message.taksmessage.ITaskMessage;
import backtype.storm.elasticity.state.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by Robe... |
VgTajdd/jumping_jack | Univer/src/univer/core/EntryPoint.h | // ========================================================================= //
// Copyright (c) 2021 <NAME>. //
// This code is licensed under the Apache License 2.0. //
// EntryPoint.h //
// ================... |
ykechan/jacobi | src/main/java/jacobi/core/decomp/qr/step/PureQR.java | /*
* The MIT License
*
* Copyright 2017 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, ... |
ztcaoll222/gecco | src/main/java/com/geccocrawler/gecco/request/HttpPostRequest.java | <reponame>ztcaoll222/gecco<gh_stars>0
package com.geccocrawler.gecco.request;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.geccocrawler.gecco.emuns.MethodEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Map;
@EqualsAndHashCode... |
diogocs1/comps | web/addons/payment_adyen/tests/__init__.py | <reponame>diogocs1/comps
# -*- coding: utf-8 -*-
# from . import test_adyen
checks = [
# test_adyen,
]
|
FDA/Healthy-Citizen-Code | adp-frontend-web-v3/app/adp-forms/directives/adp-form-fields/adp-form-field-location/adp-form-field-location.directive.js | <gh_stars>1-10
(function () {
'use strict';
angular
.module('app.adpForms')
.directive('adpFormFieldLocation', adpFormFieldLocation);
function adpFormFieldLocation(
AdpGeoLocationService,
NgMap,
$q
) {
return {
restrict: 'E',
scope: {
adpField: '=',
adpFormD... |
fredhamster/feisty_meow | documentation/headers/uva_header.java |
/**
* {one-line description}
* {extended information...}
* @author <NAME>
* @copyright Copyright (c) 2012-$now By University of Virginia
* @license Apache License v2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
|
14ms/Minecraft-Disclosed-Source-Modifications | Astomero/net/minecraft/item/ItemFirework.java | package net.minecraft.item;
import net.minecraft.entity.player.*;
import net.minecraft.world.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.*;
import net.minecraft.util.*;
import com.google.common.collect.*;
import java.util.*;
import net.minecraft.nbt.*;
public class ItemFirework extends Item
{
... |
Li-YangZhong/professional-javascript-for-web-developers | Chapter3LanguageBasics/DataTypes/TheStringType/TemplateLiteralTagFunctions/TemplateLiteralTagFunctionsExample01.js | <reponame>Li-YangZhong/professional-javascript-for-web-developers
let a = 6;
let b = 9;
function simpleTag(strings, aValExpression, bValExpression, sumExpression) {
console.log(strings);
console.log(aValExpression);
console.log(bValExpression);
console.log(sumExpression);
return 'foobar';
}
let untaggedRes... |
aclisp/goim | libs/define/option.go | package define
// 这里定义所有上行消息 RPCInput 的可选项。内建的名称,只允许小写(a-z)和连字符(-)
const (
// 长连接鉴权时使用
UID = "uid"
Token = "token"
AppID = "appid"
ConnID = "connid" // 同一uid下connid唯一
// 长连接鉴权时使用,切换房间时使用
SubscribeRoom = "subscribe-room-push"
IsAnonymousUser = "is-anonymous-user"
HeartbeatThreshold = "heartbeat-th... |
erezrokah/appsmith | app/server/appsmith-server/src/main/java/com/appsmith/server/events/CommentNotificationEvent.java | package com.appsmith.server.events;
public enum CommentNotificationEvent {
CREATED, UPDATED, RESOLVED, TAGGED, DELETED
}
|
hakandilek/play2-crud | project-code/app/play/utils/dao/PageAdapter.java | package play.utils.dao;
import com.avaje.ebean.Page;
public abstract class PageAdapter<S, T> implements Page<T> {
protected Page<S> delegate;
public PageAdapter(Page<S> delegate) {
this.delegate = delegate;
}
/**
* created a new page adapter. used to create prev/next pages
* @param delegate page delegate... |
nnadams/mage | Mage.Sets/src/mage/cards/r/RedDragon.java | package mage.cards.r;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.consta... |
k18n/vertexium | core/src/main/java/org/vertexium/ExtendedDataRow.java | package org.vertexium;
public interface ExtendedDataRow extends VertexiumObject {
/**
* Meta property name used for sorting
*/
String ELEMENT_ID = "__extendedDataElementId";
/**
* Meta property name used for sorting
*/
String ELEMENT_TYPE = "__extendedDataElementType";
/**
... |
ivartanian/JVx.javafx | src/com/sibvisions/rad/ui/javafx/ext/StyleContainer.java | <reponame>ivartanian/JVx.javafx
/*
* Copyright 2015 SIB Visions GmbH
*
* 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 requ... |
salaozen/enotas_api | spec/enotas_api/v1/consultar_nfs_spec.rb | <reponame>salaozen/enotas_api<filename>spec/enotas_api/v1/consultar_nfs_spec.rb<gh_stars>1-10
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe EnotasApi::V1::ConsultarNfs do
let(:empresa_id) { 123 }
let(:nfe_id) { 456 }
let(:instance) { described_class.new(empresa_id, nfe_id) }
it 'implemen... |
infinitiessoft/skyport-hazelcast | src/test/java/com/infinities/skyport/distributed/impl/hazelcast/hazeltask/executor/SimpleDistributedFutureTest.java | /*******************************************************************************
* Copyright 2015 InfinitiesSoft Solutions 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
*
* ... |
FernandaLVItau/bootcamp-01-template-proposta | src/main/java/br/com/zup/cartaoproposta/entities/cartao/aviso/AvisoCartao.java | package br.com.zup.cartaoproposta.entities.cartao.aviso;
import br.com.zup.cartaoproposta.entities.cartao.Cartao;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
im... |
AndrewGuthua/JournalSystem | base/src/main/java/org/ambraproject/service/migration/SchemaMigration.java | /*
* Copyright (c) 2006-2013 by Public Library of Science
*
* http://plos.org
* http://ambraproject.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.apach... |
kyokan/fnd | testutil/testflags/flags.go | package testflags
import (
"os"
"testing"
)
func IntegrationTest(t *testing.T) {
_, ok := os.LookupEnv("Footnote_ENABLE_INTEGRATION_TESTS")
if !ok {
t.SkipNow()
}
t.Parallel()
}
func HandshakeTest(t *testing.T) {
_, ok := os.LookupEnv("Footnote_ENABLE_HANDSHAKE_TESTS")
if !ok {
t.SkipNow()
}
t.Parallel... |
globalmiles/ecommerce-java-sdk | src/main/java/com/globalmiles/api/ecommerce/models/ListMilePaymentResponseBuilder.java | /*
* GlobalMilesECommerceAPILib
*
* This file was automatically generated for Global Miles by APIMATIC v2.0 ( https://apimatic.io ).
*/
package com.globalmiles.api.ecommerce.models;
import java.util.*;
public class ListMilePaymentResponseBuilder
extends ResponseBuilder {
//the instance to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.