repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
sinhdev/python-demo | data-structure-algorithms/set/e03-set-operations.py | my_set = {1, 2, 3, 4}
my_set_2 = {3, 4, 5, 6}
print(my_set.union(my_set_2), '----------', my_set | my_set_2)
print(my_set.intersection(my_set_2), '----------', my_set & my_set_2)
print(my_set.difference(my_set_2), '----------', my_set - my_set_2)
print(my_set.symmetric_difference(my_set_2), '----------', my_set ^ my_se... |
bieao-coding/craneWebReact | src/pages/Company/models/company.js | /*eslint-disable*/
import { getCompanies,addCompany, getCompanyById,editCompany} from '../service/companyService';
export default{
namespace: 'company',
state: {
list: [],
total: 0,
workPageNumber:0,
buildPageNumber:0,
supervisionPageNumber:0,
propertyPageNumber:0
},
effects: {
*f... |
ziransun/wpt | workers/interfaces/WorkerGlobalScope/close/incoming-message.js | <filename>workers/interfaces/WorkerGlobalScope/close/incoming-message.js<gh_stars>1000+
onmessage = function(e) {
postMessage(1);
throw new Error();
}
close(); |
rbshadow/Python_URI | Beginner/URI_1050.py | <filename>Beginner/URI_1050.py
def math():
put = int(input())
if put == 61:
print('Brasilia')
elif put == 71:
print('Salvador')
elif put == 11:
print('Sao Paulo')
elif put == 21:
print('Rio de Janeiro')
elif put == 32:
print('Juiz de Fora')
elif put =... |
enfoTek/tomato.linksys.e2000.nvram-mod | tools-src/gnu/glibc/sysdeps/m68k/s_isnanl.c | <reponame>enfoTek/tomato.linksys.e2000.nvram-mod<gh_stars>10-100
/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Licen... |
GarryLau/DesignPatterns | Strategy/Collection .h | <reponame>GarryLau/DesignPatterns<gh_stars>0
#pragma once
#include <iostream>
#include "SortBehavior .h"
#include "SearchBehavior .h"
/* Context */
class Collection
{
public:
Collection() {
m_sort = nullptr;
m_search = nullptr;
}
void setSort(SortBehavior *sort) {
m_... |
codacy-acme/spectrum | src/views/communityMembers/components/communityMembers.js | // @flow
import * as React from 'react';
import compose from 'recompose/compose';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { withApollo } from 'react-apollo';
import { Loading } from 'src/components/loading';
import GetMembers from './getMembers';
import queryString from ... |
bretlowery/snakr | snakr/utilities.py | <gh_stars>1-10
import hashlib
import random
import urllib
import secure.settings as settings
from django.core.validators import URLValidator
import json
import mimetypes
import urllib2
from snakr.ipaddr import IP
_URL_VALIDATOR = URLValidator()
class Utils:
def __init__(self):
return
@staticmethod
... |
hermantai/sorno-py-scripts | scripts/tests/test_sorno_grepchunks.py | <reponame>hermantai/sorno-py-scripts
"""
Tests for sorno_grepchunks
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... |
MarcosWinicyus/oop-cpp-studies | class_08_28/src/empresario.cc | #include "empresario.h"
Empresario::Empresario(Endereco *endereco) : Pessoa(endereco) {}
void Empresario::set_investimento(const double &investimento_inicial){
this->investimento_inicial = investimento_inicial;
}
double Empresario::get_investimento(){
return investimento_inicial;
}
|
ahahn-gbif/checklistbank | checklistbank-cli/src/main/java/org/gbif/checklistbank/cli/common/RabbitDatasetService.java | <reponame>ahahn-gbif/checklistbank<filename>checklistbank-cli/src/main/java/org/gbif/checklistbank/cli/common/RabbitDatasetService.java
package org.gbif.checklistbank.cli.common;
import org.gbif.checklistbank.config.GangliaConfiguration;
import org.gbif.checklistbank.logging.LogContext;
import org.gbif.common.messagin... |
jbrdl/mynewt-dw1000-core | hw/drivers/uwb/uwb_dw1000/src/dw1000_dev.c | <filename>hw/drivers/uwb/uwb_dw1000/src/dw1000_dev.c
/*
* Copyright 2018, Decawave Limited, All Rights Reserved
*
* 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 copyrig... |
willywsm1013/transformers-for-question-generation | question_generation/InferSent/eval.py | import sys
import numpy as np
import os
import re
import json
import logging
from models import InferSent
from tqdm import tqdm
import torch
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--golden', help='golden reference sentences')
parser.add_argument('--generated', help='generte... |
kaustavha/cs_homeschool | Interviews/solid-fee-calculator-master/js-react/src/components/validSubmission.test.js | import validSubmission from './validSubmission';
import moment from 'moment';
describe("Valid Submission", () => {
const validSelections = [0, 1];
it('Can validate fields', () => {
const input = {
userType: 1,
itemType: 0,
price: 10,
endDate: moment().for... |
maikroeder/websauna | websauna/system/http/utils.py | from sqlalchemy.orm import Session
from pyramid.interfaces import IRequest
from pyramid.registry import Registry
from pyramid.request import Request
from transaction import TransactionManager
from websauna.system.model.meta import create_dbsession, create_transaction_manager_aware_dbsession
from websauna.compat.typin... |
WeixiZhu94/intel-opencl-runtime | opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp | /*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/kernel_binary_helper.h"
#include "shared/test/common/helpers/kernel_filename_helper.h"
#include "shared/test/common/libult/g... |
felixWackernagel/sidekick-ui | sample/src/main/java/de/wackernagel/android/example/sidekick/ColorsActivity.java | package de.wackernagel.android.example.sidekick;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class ColorsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView... |
giraffesnn/best-practices-of-c | src/foobar/include/foobar_macros.h | <filename>src/foobar/include/foobar_macros.h
/**
* @file foobar_macros.h
* @author <NAME> (https://github.com/VincentWei)
* @date 2021/09/18
* @brief Some useful macros of FooBar.
*
* Copyright (C) 2021 FMSoft <https://www.fmsoft.cn>
*
* This file is a part of FooBar, which contains the examples of my course:
... |
engines/Ax | packages/src/ax-appkit/extension/lib/text.js | ax.extension.lib.text = {};
|
abhi1625/human-detection-perception-module | docs/html/classcpp_1_1ast_1_1_typedef.js | <reponame>abhi1625/human-detection-perception-module
var classcpp_1_1ast_1_1_typedef =
[
[ "__init__", "classcpp_1_1ast_1_1_typedef_af3275d2390190a074de470c1424e05e0.html#af3275d2390190a074de470c1424e05e0", null ],
[ "__str__", "classcpp_1_1ast_1_1_typedef_a451920900affc5f12e38ab8fbf5e3dea.html#a451920900affc5f... |
jcnaud/snippet | languages/python3/pytest/mymodule.py | #!/usr/bin/env python
# coding: utf-8
import requests
class MyModule(object):
def __init__(self):
pass
def format_message(self, message):
return message+"_format"
def get_url_code(self):
r = requests.get('http://www.example.comdfgfdd/')
return r.status_code |
CGCL-codes/VulDeePecker | CWE-119/source_files/79466/CWE134_Uncontrolled_Format_String__char_console_printf_54c.c | <reponame>CGCL-codes/VulDeePecker<filename>CWE-119/source_files/79466/CWE134_Uncontrolled_Format_String__char_console_printf_54c.c
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__char_console_printf_54c.c
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
Template File: ... |
jjiege/odoo | addons/web/static/src/js/tools/test_menus.js | <filename>addons/web/static/src/js/tools/test_menus.js
(function (exports) {
/**
* The purpose of this test is to click on every installed App and then
* open each view. On each view, click on each filter.
*/
"use strict";
var clientActionCount = 0;
var viewUpdateCount = 0;
var tested... |
CherylFrankenfield/newrelic-diagnostics-cli | config/config.go | <gh_stars>0
package config
import (
"encoding/json"
"flag"
"fmt"
"os"
"path/filepath"
"strings"
)
//Verbosity is the current log level
type Verbosity int
const (
//Info indicates normal logging level
Info Verbosity = iota
//Verbose indicates additional logging (for troubleshooting the app)
Verbose
)
//use... |
fabriziogiudici/thesefoolishthings-src | modules/examples/Data/src/main/java/it/tidalwave/thesefoolishthings/examples/person/Person.java | /*
* *********************************************************************************************************************
*
* TheseFoolishThings: Miscellaneous utilities
* http://tidalwave.it/projects/thesefoolishthings
*
* Copyright (C) 2009 - 2021 by Tidalwave s.a.s. (http://tidalwave.it)
*
* ***************... |
christophe-rannou/ovh-api-services | src/api/me/order/me-order.v7.service.js | <reponame>christophe-rannou/ovh-api-services
angular.module('ovh-api-services').service('OvhApiMeOrderV7', (apiv7) => {
const userOrderEndpoint = apiv7('/me/order/:orderId', {
orderId: '@orderId',
});
return userOrderEndpoint;
});
|
Madrapps/dagger-plugin | src/test/testData/component/InterfaceOrAbstract/ClassComponentWithModuleFullAnnotation.java | <filename>src/test/testData/component/InterfaceOrAbstract/ClassComponentWithModuleFullAnnotation.java
import assets.EmptyModuleOne;
@<error descr="@Component may only be applied to an interface or abstract class">dagger.Component</error>(modules = {EmptyModuleOne.class})
public class ClassComponentWithModuleFullAnnota... |
uporabnik1/VoltaDiscord-Musicbot | VoltaDiscordUkazi/commands/spletisce.js | exports.run = async(client, message) => {
message.channel.send({
embed: {
title: 'Naša spletna stran:',
description: `
https://voltamedia.tk/
`,
color: 'ORANGE'
}
})
} |
daiyi/trustroots | modules/tags/server/models/tag.server.model.js | <gh_stars>0
'use strict';
/**
* Module dependencies.
*/
var path = require('path'),
config = require(path.resolve('./config/config')),
mongoose = require('mongoose'),
mongoosePaginate = require('mongoose-paginate'),
uniqueValidation = require('mongoose-beautiful-unique-validation'),
integerValida... |
strataproject/strata | src/components/animatedMobileMenu/MenuToggle.css.js | <filename>src/components/animatedMobileMenu/MenuToggle.css.js
import styled from 'styled-components'
export const MenuToggleButton = styled.button`
outline: none;
border: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
cursor: pointer;
line-height: 0px;
width: 43px;
he... |
gis-zhang/zgis | Gruntfile.js | <gh_stars>0
/**
* Created by Administrator on 2015/10/23.
*/
module.exports = function(grunt) {
grunt.file.defaultEncoding = 'utf-8';
grunt.initConfig({
concat: {
dist: {
src: ['src/zmap/framework/base/*.js',
'src/zmap/framework/*.js',
... |
nbur4556/issue_reporter | cypress/integration/navigation.spec.js | describe('Url Navigation Authorized', () => {
afterEach(() => cy.logout());
// Should equal root url
it('visit landing url', () => {
cy.visit('/');
cy.url().should('eq', Cypress.config().baseUrl + '/');
})
// Should equal workbench url
it('visit workbench url', () => {
... |
rnpoddor/metadata.js | src/widgets/wnd_obj.js | /**
* Форма абстрактного объекта данных {{#crossLink "DataObj"}}{{/crossLink}}, в том числе, записей регистров
*
* © <NAME> http://www.oknosoft.ru 2014-2016
*
* @module metadata
* @submodule wnd_obj
*/
/**
* ### Форма объекта данных
* По умолчанию, форма строится автоматически по описанию метаданных.<br... |
ch1huizong/learning | lang/py/cookbook/v2/source/cb2_2_23_sol_1.py | try:
from msvcrt import getch
except ImportError:
''' we're not on Windows, so we try the Unix-like approach '''
def getch():
import sys, tty, termios
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(fd)
ch = sys.stdin.read(... |
sawthiriaung/MyLanguage2 | MvvmTestAbank/app/src/main/java/com/nmh/speaktotext/mvvmtestabank/ui/repo/RepoItemViewModel.java | <reponame>sawthiriaung/MyLanguage2
package com.nmh.speaktotext.mvvmtestabank.ui.repo;
import android.databinding.ObservableField;
import com.nmh.speaktotext.mvvmtestabank.model.Repository;
public class RepoItemViewModel {
public final ObservableField<String> name ;
public final ObservableField<String> realn... |
timfel/netbeans | java/maven/src/org/netbeans/modules/maven/actions/OpenPOMAction.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 licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
fermi-lat/pyBurstAnalysisGUI | python/GtBurst/interactivePlots.py | import math
import numpy as np
from GtBurst.my_fits_io import pyfits
import matplotlib.pyplot as plt
plt.ion()
from tkinter import *
import time
import threading
from GtBurst import dataHandling
#This function goes from names like NAI_00 to names like n0
def transformGBMdetname(name):
translations = ... |
gavin2lee/incubator-gl | mnisqm/mnisqm-pc/src/app/common/countTo/count-to.js | <reponame>gavin2lee/incubator-gl
var countTo = angular.module('countTo', [])
.directive('countTo', ['$timeout', function ($timeout) {
return {
replace: false,
scope: true,
link: function (scope, element, attrs) {
var e = element[0];
var nu... |
MirrorYu/eagleeye | eagleeye/common/EagleeyeThreadPool.h | <reponame>MirrorYu/eagleeye
#ifndef _EAGLEEYE_THREADPOOL_H_
#define _EAGLEEYE_THREADPOOL_H_
#include "eagleeye/common/EagleeyeMacro.h"
#include <functional>
#include <condition_variable> // NOLINT(build/c++11)
#include <mutex> // NOLINT(build/c++11)
#include <thread> // NOLINT(build/c++11)
#include <vector>
#include... |
jimmyis/DomenoWallet | src/api/filestorage.js | // file storage
var Promise = require('es6-promise').Promise
var Base64 = require('js-base64').Base64
export const FILE_STORAGE_DIR = 'stellar'
export function initFileStorage(){
return new Promise((resolve,reject) => {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, fs=>{
if (!cordova.file) {
... |
YouCruit/onfido-api | onfido/src/main/java/com/youcruit/onfido/api/report/ReportId.java | <filename>onfido/src/main/java/com/youcruit/onfido/api/report/ReportId.java
package com.youcruit.onfido.api.report;
import com.youcruit.onfido.api.common.OnfidoId;
public class ReportId extends OnfidoId {
public ReportId(String id) {
super(id);
}
}
|
yangjunjiao/NetmfSTM32 | third party/matrixssl-3-3-open/ParseCertsTest/parseCerts.cpp | #include "stdafx.h"
#include "parseCerts.h"
#include <string.h>
static char* delimiterCertificate = "CERTIFICATE-----";
static char* delimiterKey = "KEY-----";
CertStorage certStorage;
/*
char* eliminateSpecialCharacters(char* in)
{
while (*in == '\x0d' || *in == '\x0a' || *in == '\x09'
|| *in == ' ') {
in++;
}
r... |
ZouTrankil/game-server | game-ai/src/main/java/com/jzy/game/ai/nav/node/NodeData.java | package com.jzy.game.ai.nav.node;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSON;
import com.jzy.game.ai.nav.NavMeshData;
import com.jzy.game.engine.math.Vector3;
/**
* navmesh寻路三角形网格数据 <br>
* 依次三个顶点确定一个三角形
... |
vandelay87/akli | src/components/heading/heading.js | import React from 'react'
import PropTypes from 'prop-types'
import styled, { css } from 'styled-components'
import { robotoRegular } from '../../styles/fonts'
import { below } from '../../styles/breakpoints'
const Heading = ({ title, size, align }) => (
<StyledHeading as={`h${size}`} align={align} size={size}>
... |
anightrabbit/learn-react | flux-blog/src/views/traveller/index.js | import React from 'react';
import {
Layout
} from 'antd';
import { Container } from 'flux/utils';
import CardGridList from '../../components/traveller/CardGridList';
import { fetchTravellerListData } from '../../flux/actions';
import { travellerListStore } from '../../flux/stores';
const getStores = () => [travell... |
Hendrikto/jena | jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/SAX2RDFTest.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 licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
lveay2/algorithm-solutions | src/main/java/lintcode/system_design/mini_cassandra/Column.java | <filename>src/main/java/lintcode/system_design/mini_cassandra/Column.java<gh_stars>0
package lintcode.system_design.mini_cassandra;
public class Column {
public int key;
public String value;
public Column(int key, String value) {
this.key = key;
this.value = value;
}
@Override
... |
ivadasz/DragonFlyBSD | contrib/groff/src/devices/grohtml/html.h | // -*- C++ -*-
/* Copyright (C) 2000, 2001, 2002, 2004, 2009
Free Software Foundation, Inc.
Written by <NAME> (<EMAIL>)
This file is part of groff.
groff 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,... |
juseongkr/BOJ | acmicpc/1251.py | s, r = input(), '~'
for i in range(0, len(s)-2):
for j in range(i+1, len(s)-1):
r = min(r, s[i::-1]+s[j:i:-1]+s[:j:-1])
print(r)
|
KakeruMizuno/RDM-waterbutler | tests/providers/googlecloud/fixtures/folders.py | <gh_stars>10-100
import os
import pytest
from waterbutler.core.path import WaterButlerPath
@pytest.fixture()
def folder_wb_path():
return WaterButlerPath('/xml-api/folder-1/')
@pytest.fixture()
def folder_name():
return 'folder-1'
@pytest.fixture()
def folder_obj_name():
return 'xml-api/folder-1/'
... |
nikhilg85/peerhuntr | QuastionMasterDaoImpl.java | package com.infodart.peerhuntr.jpa.dao.impl.basedao;
import java.util.ArrayList;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
public class QuastionMasterDaoImpl {
}
|
tonioshikanlu/tubman-hack | sources/androidx/core/app/ActivityRecreator.java | <gh_stars>1-10
package androidx.core.app;
import android.app.Activity;
import android.app.Application;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.util.Log;
import androidx.an... |
oneybee/datavisual-react-refactor | src/components/Page01/block/Page01/index.js | <gh_stars>0
import React from 'react';
import styled, { css } from 'styled-components';
import Title from './Title';
import Charts from './Charts';
import Pie from './Pie';
import TextLabel from './TextLabel';
import Dot from './Dot';
import CenterWrapper from './CenterWrapper';
const Page01 = styled.div`
padding: 0... |
jonathannewman/pcore-java | src/main/java/com/puppet/pcore/Default.java | package com.puppet.pcore;
/**
* The class that represents a default instance (the Symbol :default in Ruby).
*/
public class Default {
public static final Default SINGLETON = new Default();
private Default() {
}
}
|
anandchouhan/nomo | app/controllers/communities_controller.rb | class CommunitiesController < ApplicationController
def new
@community = Community.new
end
def create
@community = Community.create(community_params)
if @community.save
redirect_back(fallback_location: root_path, notice: "Community was successfully created.")
end
end
private
def co... |
pfeairheller/canis | pkg/framework/context/grpc.go | /*
Copyright Scoir Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package context
import (
"github.com/pkg/errors"
"google.golang.org/grpc"
api "github.com/scoir/canis/pkg/apiserver/api/protogen"
)
func (r *Provider) GetAPIAdminClient() (api.AdminClient, error) {
ep, err := r.conf.Endpoint("a... |
cestlascorpion/Leetcode-Go | solution/1732.LargestAltitude.go | package solution
func LargestAltitude(gain []int) int {
altitude := 0
cursor := 0
for _, delta := range gain {
cursor += delta
if cursor > altitude {
altitude = cursor
}
}
return altitude
}
|
mongodb/dsi | test_lib/fixture_files.py | <gh_stars>1-10
"""
Implementation of FixtureFiles class.
"""
import json
import os
import json_diff
import yaml
from mock import patch
import dsi.common.whereami as whereami
class FixtureFiles:
def repo_root_file_path(self, *args):
"""
Return the absolute path of a file at `file_path` with resp... |
dodo0101/PIPE | pipe-core/src/main/java/uk/ac/imperial/pipe/models/petrinet/name/PetriNetFileName.java | package uk.ac.imperial.pipe.models.petrinet.name;
import org.apache.commons.io.FilenameUtils;
import java.io.File;
/**
* Represents a saved file that a Petri net belongs to
*/
public final class PetriNetFileName implements PetriNetName {
/**
* File that this name should represent
*/
private File... |
Suti1977/MySAM | MyServices/MyTaskedResource.h | <filename>MyServices/MyTaskedResource.h
//------------------------------------------------------------------------------
// Task-al tamogatott eroforras modul (MyRM resze)
//
// File: MyTaskedResource.h
//------------------------------------------------------------------------------
#ifndef MYTASKEDRESOURCE_H_
#def... |
VastoLorde95/Competitive-Programming | Codeforces/149 Division 2/Problem C/C.cc | #include<cstdio>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<map>
#include<set>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define fi first
#define... |
bloxlink/heroicons | packages/vue-heroicons/components/HeroIconCake.js | import Vue from 'vue'
export default Vue.extend({
name: 'HeroIconCake',
functional: true,
props: {
size: { type: Number, default: 0 },
},
render (createElement, context) {
const data = { ...context.data }
if (context.props.size) {
data.attrs.width = context.props.size
data.attrs.heigh... |
smith750/kc | coeus-impl/src/main/java/org/kuali/kra/irb/actions/reviewcomments/ProtocolAddReviewAttachmentEvent.java | <reponame>smith750/kc
/*
* Copyright 2005-2014 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php
* ... |
LinFeng1997/my-leetcode | src/search/451.frequencySort.js | <reponame>LinFeng1997/my-leetcode<filename>src/search/451.frequencySort.js<gh_stars>1-10
/**
* @param {string} s
* @return {string}
*/
var frequencySort = function (s) {
let arr = s.split('');
let map = getMap(s);
let rst = '';
Array.from(map.entries()).sort((a, b) => b[1] - a[1]).forEach(item => {
... |
liorheber/retable | stories/components/number_selector.js | import React, { Fragment } from "react";
import { withStyles } from "material-ui/styles";
import { FormControlLabel } from "material-ui/Form";
import MobileStepper from "material-ui/MobileStepper";
import IconButton from "material-ui/IconButton";
import Remove from "@material-ui/icons/Remove";
import Add from "@materi... |
qwer81526973/Rxjava | src/test/java/rx/schedulers/AbstractSchedulerConcurrencyTests.java | <gh_stars>1-10
/**
* Copyright 2014 Netflix, 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 law... |
johncoleman83/bootcampschool-low_level_programming | 0x1C-binary_trees/8-binary_tree_postorder.c | <reponame>johncoleman83/bootcampschool-low_level_programming
#include "binary_trees.h"
/**
* binary_tree_postorder - traverses binary tree with postorder algorithm
* @tree: root of binary tree to traverse
* @func: pointer to function to use on each integer
*/
void binary_tree_postorder(const binary_tree_t *tree, vo... |
ckamtsikis/cmssw | Validation/RecoMuon/test/muonReleaseValidation_cfg.py | #import FWCore.ParameterSet.Config as cms
process = cms.Process("TkVal")
process.load("FWCore.MessageService.MessageLogger_cfi")
### standard includes
process.load('Configuration/StandardSequences/GeometryPilot2_cff')
process.load("Configuration.StandardSequences.RawToDigi_cff")
process.load("Configuration.EventConte... |
lukeburns/client | src/sidebar/store/create-store.js | /* global process */
import * as redux from 'redux';
import thunk from 'redux-thunk';
import immutable from '../util/immutable';
import { createReducer, bindSelectors } from './util';
/**
* Helper that strips the first argument from a function type.
*
* @template F
* @typedef {F extends (x: any, ...args: infer ... |
pChocz/squash-rest-api | src/main/java/com/pj/squashrestapp/dbinit/jsondto/JsonVerificationToken.java | <gh_stars>1-10
package com.pj.squashrestapp.dbinit.jsondto;
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.pj.squashrestapp.util.GeneralUtil;
import java.time.LocalDateTime... |
antonmedv/year | packages/1994/09/05/index.js | <filename>packages/1994/09/05/index.js
module.exports = new Date(1994, 8, 5)
|
takumiao13/my-manga | lib/start.js | <gh_stars>1-10
const chalk = require('chalk');
const open = require('open');
const os = require('os');
const defaultGateway = require('default-gateway');
const address = require('address');
const { log, error } = require('./logger');
const fs = require('fs-extra');
const pathFn = require('path');
const { createIndex, d... |
Vizir/entria-components | src/components/content/ContentBody.js | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { VIEWPORT } from '../Responsive';
const Wrapper = styled.div`
padding: 20px;
@media(min-width: ${VIEWPORT.MEDIUM}px) {
padding: 40px;
}
`;
const ContentBody = ({ style, children }) =>
<Wrapper ... |
Communote/communote-server | communote/core/src/main/java/com/communote/server/core/mail/messages/user/InviteUserToBlogMailMessage.java | package com.communote.server.core.mail.messages.user;
import java.util.Map;
import com.communote.server.api.ServiceLocator;
import com.communote.server.api.core.application.CommunoteRuntime;
import com.communote.server.api.core.config.type.ClientProperty;
import com.communote.server.core.blog.export.PermalinkG... |
shsmith11/romanceWeb | src/main/java/data/ServerResponces.java | package data;
public enum ServerResponces {
}
|
felipezago/ControleEstoque | Controller/pesquisa_servico.py | <reponame>felipezago/ControleEstoque
from PyQt5.QtWidgets import QMessageBox, QTableWidgetItem, QMainWindow
from PyQt5.QtCore import Qt
from Model.Servicos import Servicos
from PyQt5 import QtGui
from PyQt5 import QtCore
class EventFilter(QtCore.QObject):
def __init__(self, parent=None):
QtCore.QObject._... |
Vladislav-Zolotaryov/L2J_Levelless_Custom | L2J_Server/java/com/l2jserver/gameserver/network/serverpackets/ExFishingStart.java | /*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be us... |
Drew138/v_website | backend/backend/validators.py | <reponame>Drew138/v_website
from django.core.validators import RegexValidator
PHONE_REGEX = r"^\d{7}$"
CELPHONE_REGEX = r"^\d{10}$"
# https://www.regextester.com/108138
NIT_REGEX = r"^[0-9]+-{1}[0-9]{1}$"
# https://www.regextester.com/111017
ADDRESS_REGEX = \
r"^(Autopista|Avenida|Avenida Calle|" \
r"Avenida ... |
jenkinsci/sonar-gerrit-plugin | src/test/java/org/jenkinsci/plugins/sonargerrit/ConfigRoundTripTest.java | package org.jenkinsci.plugins.sonargerrit;
import hudson.model.FreeStyleProject;
import hudson.util.Secret;
import java.util.UUID;
import org.jenkinsci.plugins.sonargerrit.gerrit.GerritAuthenticationConfig;
import org.jenkinsci.plugins.sonargerrit.gerrit.ScoreConfig;
import org.jenkinsci.plugins.sonargerrit.sonar.prev... |
dkvasnicka/twterm | lib/twterm/notification_backend/tmux_backend.rb | require 'shellwords'
require 'twterm/notification_backend/abstract_notification_backend'
module Twterm
module NotificationBackend
class TmuxBackend < AbstractNotificationBackend
# @param [Twterm::Event::Notification::AbstractNotification] notification notification to display in tmux status line
# @r... |
ibtihajbahaa/ibi1 | main/plugins/org.talend.dataprofiler.core/src/org/talend/dataprofiler/core/migration/impl/SoundexIndicatorQueryTask.java | // ============================================================================
//
// Copyright (C) 2006-2016 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have... |
Billybob/tailwindcss-vue | src/utils/plugins.js |
import { extendDefaultTheme, setThemeKey } from './theme.js';
export const setComponentTheme = (Vue, args, themeName) => {
const extend = extendDefaultTheme(args.theme || {}, themeName);
setThemeKey(themeName, extend);
};
export const installComponents = function(Vue, args, components) {
components.forEach(compon... |
ctoesca/turbine-topvision | dist/lib/crudServices/TserviceCommand.js | <filename>dist/lib/crudServices/TserviceCommand.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const turbine = require("turbine");
var TcrudServiceBase = turbine.TcrudServiceBase;
class TserviceCommand extends TcrudServiceBase {
constructor(config) {
super(config);
... |
yimiqidage/study-by-boot | src/main/java/com/test/io/buffer/TestBufferedReader.java | package com.test.io.buffer;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class TestBufferedReader {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
read_better();
... |
SDurand7/AVLIT-Engine | Core/Base/include/SceneBVHNode.hpp | #pragma once
#include <vector>
#include <string>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/AABB.hpp>
namespace AVLIT {
class SceneBVHNode {
public:
SceneBVHNode() = delete;
SceneBVHNode(SceneObject *object);
SceneBVHNode(SceneBVHNode &&node);
AVLIT_API inline const std::... |
bugvm/robovm | Binding/apple/src/main/java/com/bugvm/apple/assetslibrary/ALAsset.java | <gh_stars>10-100
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* 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 app... |
sohero-0406/platform | web/src/main/java/com/jeesite/modules/common/dao/CommonAssessmentStuDao.java | <filename>web/src/main/java/com/jeesite/modules/common/dao/CommonAssessmentStuDao.java
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.modules.common.dao;
import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.mod... |
anji-plus/appsp | java/sp-auth/src/main/java/com/anji/sp/model/po/SpRoleMenuPO.java | <reponame>anji-plus/appsp
package com.anji.sp.model.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data... |
atul-vyshnav/2021_IBM_Code_Challenge_StockIT | src/StockIT-v1-release_source_from_JADX/sources/com/google/android/gms/common/api/internal/DataHolderResult.java | package com.google.android.gms.common.api.internal;
import com.google.android.gms.common.api.Releasable;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.DataHolder;
public class DataHolderResult implements Releasable, Result {... |
linewx/Derecho | database/src/main/java/com/cloudrain/dercho/database/Database.java | package com.cloudrain.dercho.database;
import java.sql.*;
import java.util.Date;
/**
* Created by lugan on 5/17/2016.
*/
public class Database {
public static void main(String... argv) {
System.out.println("-------- PostgreSQL "
+ "JDBC Connection Testing ------------");
try {
... |
Sadikortaoglan/Hrms | HrmsCF/src/main/java/com/sadik/hrmscf/business/config/AppConfig.java | package com.sadik.hrmscf.business.config;
import com.cloudinary.Cloudinary;
import com.cloudinary.utils.ObjectUtils;
import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AppConfig {
@Bean
... |
gupadhyaya/blockatlas | platform/harmony/stake.go | package harmony
import (
"github.com/trustwallet/blockatlas/pkg/blockatlas"
"github.com/trustwallet/blockatlas/pkg/errors"
"github.com/trustwallet/blockatlas/pkg/logger"
services "github.com/trustwallet/blockatlas/services/assets"
)
func (p *Platform) GetValidators() (blockatlas.ValidatorPage, error) {
results :... |
EdwardPrentice/teku | util/src/testFixtures/java/tech/pegasys/teku/util/EventSink.java | <gh_stars>1-10
/*
* Copyright 2020 ConsenSys AG.
*
* 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 ... |
yolo3a525/AiwSM | src/main/java/com/aiw/bdzb/mapper/SenceMapper.java | <filename>src/main/java/com/aiw/bdzb/mapper/SenceMapper.java
package com.aiw.bdzb.mapper;
import com.aiw.base.mapper.BaseMapper;
import com.aiw.bdzb.entity.Sence;
/**
* 说明:bdzb.scene
* 创建人:aiw
* 创建时间:2017-10-23
*/
public interface SenceMapper extends BaseMapper<Sence> {
}
|
ms140569/loki | cmd/import.go | package cmd
import (
"encoding/csv"
"errors"
"fmt"
"io"
"io/ioutil"
"loki/config"
"loki/log"
"loki/record"
pb "loki/storage"
"loki/subcommand"
"loki/utils"
"os"
"strings"
"time"
)
// Import lets you import Keepass CSV export files into the Loki store.
// Example:
// loki import ~/prj/golang/src/loki/dat... |
wkjandroid/Cm | app/src/main/java/com/example/administra/cm/activity/UploadActivity.java | package com.example.administra.cm.activity;
import android.Manifest;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.... |
Mateus-A-Soares/orange-talents-03-template-ecommerce | src/main/java/br/com/zupacademy/mateus/mercadolivre/categoria/CategoriaResponse.java | <reponame>Mateus-A-Soares/orange-talents-03-template-ecommerce<gh_stars>0
package br.com.zupacademy.mateus.mercadolivre.categoria;
/**
*
* Classe modelo que encapsula os dados a serem enviados sobre categorias pela API
*
* @author <NAME>
*/
public class CategoriaResponse {
private Long id;
private Long cat... |
lakodali/osc-core | osc-domain/src/main/java/org/osc/core/broker/model/entities/job/JobRecord.java | /*******************************************************************************
* Copyright (c) Intel Corporation
* Copyright (c) 2017
*
* 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
... |
minisu/cloudrunner-go | cloudzap/level.go | package cloudzap
import "go.uber.org/zap/zapcore"
// LevelToSeverity converts a zapcore.Level to its corresponding Cloud Logging severity level.
// See: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#logseverity.
func LevelToSeverity(l zapcore.Level) string {
switch l {
case zapcore.DebugLevel:... |
FRC4188/2020_InfiniteRecharge | src/main/java/frc/robot/commands/intake/SpinJustIntake.java | package frc.robot.commands.intake;
import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.Intake;
public class SpinJustIntake extends CommandBase {
private final Intake intake;
private final double percent;
/**
* Constructs new SpinJustIntake command to spin just the intake ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.