max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
562 | #if LIB_VERSION == 2
#include "coap2/coap.h"
#elif LIB_VERSION == 3
#include "coap3/coap.h"
#else
#error "Version not supported"
#endif
#include <iostream>
int main() {
std::cout << "starting" << std::endl;
coap_startup();
// create CoAP context and a client session
coap_context_t *ctx = coap_new_context(nul... | 171 |
14,668 | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/services/multidevice_setup/host_backend_delegate_impl.h"
#include <memory>
#include "ash/constants/ash_features.h"
#include "base/con... | 10,253 |
2,728 | #ifndef DATE_TIME_DATE_DURATION__
#define DATE_TIME_DATE_DURATION__
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: <NAME>... | 1,848 |
303 | #include "tr.h"
#include "internal.h"
OBJ TrRange_new(VM, OBJ first, OBJ last, int exclusive) {
TrRange *r = TR_INIT_CORE_OBJECT(Range);
r->first = first;
r->last = last;
r->exclusive = exclusive;
return (OBJ)r;
}
static OBJ TrRange_first(VM, OBJ self) { return TR_CRANGE(self)->first; }
static OBJ TrRange_l... | 318 |
766 | <gh_stars>100-1000
/*
* Copyright 2008-2017 <NAME>
*
* See LICENCE for the full copyright terms.
*/
#include <assert.h>
#include <stddef.h>
#include <fsm/fsm.h>
#include <adt/set.h>
#include <adt/dlist.h>
#include <adt/stateset.h>
#include <adt/edgeset.h>
#include "../internal.h"
static int
fsm_reachable(const... | 847 |
841 | /*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* 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... | 1,257 |
841 | /*
* Tencent is pleased to support the open source community by making Pebble available.
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the Lic... | 2,160 |
461 | <reponame>edmund-troche/esp32-ble2mqtt
#include "wifi.h"
#include <esp_err.h>
#include <esp_event.h>
#include <esp_log.h>
#include <esp_wifi.h>
#include <esp_wpa2.h>
#include <arpa/inet.h>
#include <string.h>
static const char *TAG = "WiFi";
static wifi_on_connected_cb_t on_connected_cb = NULL;
static wifi_on_disconn... | 3,168 |
746 | <reponame>VishalS711/protege
package org.protege.editor.owl.ui.deprecation;
import com.google.common.base.Optional;
import org.protege.editor.core.ui.preferences.PreferencesLayoutPanel;
import org.protege.editor.owl.OWLEditorKit;
import org.protege.editor.owl.model.deprecation.DeprecationProfile;
import org.protege.ed... | 1,395 |
14,668 | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/cdm_factory_daemon/mojom/decrypt_config_mojom_traits.h"
#include "media/base/encryption_pattern.h"
#include "testing/gmock/... | 1,065 |
5,169 | <gh_stars>1000+
{
"name": "LPKeyboard",
"version": "1.0",
"summary": "A short description of LPKeyboard.",
"description": "自定义组件:键盘,实现自定义键盘",
"homepage": "https://github.com/l819183457",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"ziqiang.liang": "<EMAIL>"
},
"platform... | 273 |
9,959 | // version 14:
public record Record<T>(T field) implements Cloneable {
} | 22 |
353 | <filename>searchbackend/simhashsearchindex_test.cpp
// Copyright 2017 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/lice... | 1,741 |
1,545 | <reponame>pkumar-singh/bookkeeper
# 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 writin... | 4,018 |
5,169 | {
"name": "IVBaseKit",
"version": "0.1.0",
"summary": "Base class used in iwown iOS developer team",
"license": "MIT",
"authors": {
"xuezou": "<EMAIL>"
},
"homepage": "https://github.com/xuezou/IVBaseKit",
"source": {
"git": "https://github.com/xuezou/IVBaseKit.git",
"tag": "0.1.0"
},
"p... | 202 |
2,360 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAgateDbf(PythonPackage):
"""agate-dbf adds read support for dbf files to agate."""
... | 290 |
2,329 | package annos;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface SimpleAnnotation2 {
String value() default "hello";
int number() default 42;
}
| 73 |
5,169 | {
"name": "SouthgisLogger",
"version": "0.0.3",
"summary": "Southgis Logger Utils.It is monitoring APP crash reason ,and User operation.",
"description": " A longer description of SouthgisLogger in Markdown format.\n\n * Think: Why did you write this? What is the focus? What... | 502 |
309 | <reponame>Mu-L/EFAK
/**
* 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 (th... | 13,732 |
3,426 | <gh_stars>1000+
/*
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
*
* 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
... | 1,846 |
1,543 | <reponame>charllie/hibernate-types
package com.vladmihalcea.hibernate.type.json.internal;
import com.vladmihalcea.hibernate.type.model.BaseEntity;
import org.junit.Test;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;
import static org.junit.Assert.assertTrue;... | 1,293 |
763 | package org.batfish.common.bdd;
import static com.google.common.base.Preconditions.checkArgument;
import java.util.Arrays;
import java.util.stream.Stream;
import net.sf.javabdd.BDD;
import net.sf.javabdd.BDDFactory;
import net.sf.javabdd.BDDPairing;
import net.sf.javabdd.JFactory;
/** Various utility methods for wor... | 807 |
1,043 | <filename>micro-core/src/main/java/com/oath/micro/server/spring/SpringContextFactory.java
package com.oath.micro.server.spring;
import java.util.Arrays;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import com.oath.cyclops.types.persistent.PersistentSet;
import com.oath.cyclops.... | 2,008 |
312 | //-----------------------------------------------------------------------------
// Copyright (c) 2015 <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, includi... | 1,507 |
1,590 | <reponame>DaManDOH/Simd<filename>src/Simd/SimdAvx1Float32.cpp
/*
* Simd Library (http://ermig1979.github.io/Simd).
*
* Copyright (c) 2011-2018 <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... | 2,085 |
636 | #!/usr/bin/env python3
# Provided by The Python Standard Library
import json
import argparse
import asyncio
import time
import urllib.request
import sys
from ctypes import *
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("AGENCY_URL")
parser.add_argument("WALLET_KEY")
parser.a... | 1,581 |
414 | <filename>ios-sealtalk/融云 Demo WatchKit Extension/RCWKExtension/Rows/SentLocationMessageRow.h
//
// SentLocationMessageRow.h
// RongIMWatchKit
//
// Created by litao on 15/4/29.
// Copyright (c) 2015年 RongCloud. All rights reserved.
//
#import "LocationMessageRow.h"
@interface SentLocationMessageRow : LocationMes... | 117 |
3,212 | <gh_stars>1000+
/*
* 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 "Lic... | 1,307 |
325 | <reponame>am11/IL2C<filename>samples/Calculator/Calculator.UEFI/efi_main.c
#include <Calculator.Core.h>
#include <stdint.h>
//////////////////////////////////////////////////////////////////////////
// UEFI interface: code refer from
uintptr_t efi_main(
void* imageHandle,
void* pSystemTable)
{
il2c_init... | 156 |
852 | #########################
#Author: <NAME>
#Purpose: To investigate the AlCaPCCProducer input and output.
#########################
import FWCore.ParameterSet.Config as cms
process = cms.Process("ALCARECO")
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring('file:/eos/cms/store/data/Run20... | 2,645 |
675 | <reponame>blico/intellij
package com.google.idea.sdkcompat.vcs;
import com.intellij.openapi.vcs.changes.VcsIgnoredFilesHolder;
/**
* Compat for {@link VcsManagedFilesHolder}. VcsIgnoredFilesHolder was renamed to
* VcsManagedFilesHolder starting with 2021.2.
*
* <p>#api211
*/
public interface VcsManagedFilesHolde... | 131 |
14,668 | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/common/features/feature_flags.h"
#include <algorithm>
#include <array>
#include "base/check.h"
#include "base/feature_list.h"
name... | 665 |
462 | <gh_stars>100-1000
{
"appDesc": {
"description": "App description.",
"message": "Rýchly e-mail s vyhľadávaním a bez spamu."
},
"appName": {
"description": "App name.",
"message": "Gmail"
}
}
| 111 |
1,144 | /*
* #%L
* de.metas.adempiere.adempiere.base
* %%
* Copyright (C) 2021 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your opt... | 1,324 |
435 | <filename>pybay-2017/videos/al-sweigart-stdio-game-jam-pybay-2017-lightning-talk.json
{
"description": "Oakland's video game museum will host a hackathon to create small, complete game programs that beginners can read. These text-based games only use stdio, so they're easy for beginners to read.",
"language": "eng"... | 325 |
1,235 | #include <iostream>
#include <set>
using namespace std;
int main() {
set<int> myset;
for (int i=1; i<5; ++i)
myset.insert(i*10);
for (int i=1; i<5; ++i)
myset.insert(i*10);
cout << "myset size: " << myset.size() << endl;
cout << endl;
for (set<int>::iterator it=myset.begin(); it!=myset.end(); ++it)
cout ... | 393 |
419 | #pragma once
#include "../_Module/API.h"
#include "System/Resource/ResourceLoader.h"
//-------------------------------------------------------------------------
namespace KRG::Render
{
class MaterialLoader : public Resource::ResourceLoader
{
public:
MaterialLoader();
private:
virtu... | 185 |
1,247 | <gh_stars>1000+
// Copyright 2019 <NAME>. See LICENSE file for terms.
#include "test.hpp"
int main(int argc, char *argv[]) {
path_start();
volatile int ac = argc;
char x = CHAR_RAND;
if (argc == 2 && argv[1][0] == x) {
path_goal();
}
else if (ac == 2 && argv[1][0] == x) {
path_nongoal();
}
}
| 140 |
477 | <gh_stars>100-1000
import copy
import shlex
import toml as hjson
import io
import re
from django import forms
from django.template import Template, Context
from django.db.models import Sum
from django.utils.safestring import mark_safe
from django.utils.timezone import now
from django.contrib import messages
from djang... | 7,653 |
543 | package com.riiablo.map2.random;
import com.badlogic.gdx.math.RandomXS128;
public class Random extends RandomXS128 {
public Seed seed() {
long seed0 = getState(0);
long seed1 = getState(1);
return Seed.from(seed0, seed1);
}
public void seed(Seed seed) {
super.setState(seed.seed0, seed.seed1);
... | 129 |
852 | #include "TopQuarkAnalysis/TopEventProducers/interface/TopInitSubset.h"
TopInitSubset::TopInitSubset(const edm::ParameterSet& cfg)
: srcToken_(consumes<reco::GenParticleCollection>(cfg.getParameter<edm::InputTag>("src"))) {
produces<reco::GenParticleCollection>();
}
TopInitSubset::~TopInitSubset() {}
void TopI... | 921 |
879 | <reponame>luiz158/Hibernate-SpringBoot
package com.bookstore.repository;
import com.bookstore.entity.Author;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data... | 530 |
5,169 | <reponame>Gantios/Specs<gh_stars>1000+
{
"name": "AutoInsetter",
"platforms": {
"ios": "9.0"
},
"requires_arc": true,
"swift_version": "4.2",
"version": "1.7.0",
"summary": "Provide auto insetting capabilities to view controllers.",
"description": "Auto Inset engine that can automatically handle cus... | 271 |
1,038 | package org.dataalgorithms.chap11.statemodel;
import java.util.List;
import java.util.ArrayList;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop... | 1,261 |
619 | package com.enjoyshop.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android... | 6,760 |
394 | package com.xyoye.common_component.utils;
import android.content.Context;
import com.xyoye.common_component.base.app.BaseApplication;
/**
* Created by xyoye on 2021/1/6.
*/
public class SecurityHelper {
private static final String ERROR_RESULT = "error";
private static final int KEY_DANDAN = 0xC1000001;
... | 443 |
407 | package com.elasticsearch.cloud.monitor.metric.common.uti;
import lombok.extern.slf4j.Slf4j;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
@Slf4j
public class PropertiesUtil {
private static Properties props;
static{
loadPro... | 747 |
2,027 | <filename>primitive/src/main/java/io/atomix/primitive/log/LogSession.java
/*
* Copyright 2018-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
*
* htt... | 764 |
575 | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/test/views_test_helper.h"
#include "ui/views/test/test_views_delegate.h"
namespace views {
std::unique_ptr<TestViewsDelegate>
ViewsT... | 256 |
2,151 | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NGBaseFragmentBuilder_h
#define NGBaseFragmentBuilder_h
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/core_exp... | 572 |
779 | <gh_stars>100-1000
package org.everit.json.schema;
import static org.everit.json.schema.JSONMatcher.sameJsonAs;
import static org.hamcrest.MatcherAssert.assertThat;
import org.json.JSONObject;
import org.junit.jupiter.api.Test;
public class ConditionalSchemaTest {
static final StringSchema MAX_LENGTH_STRING_SCH... | 4,058 |
2,661 | /*
* Copyright 2017 Google Inc.
* Copyright 2020 The Open GEE Contributors
*
* 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
*
* U... | 2,143 |
1,253 | <filename>graph/c++/Segment_tree.cpp<gh_stars>1000+
#include <bits/stdc++.h>
using namespace std;
// limit for array size
const int N = 100000;
int n; // array size
// Max size of tree
int tree[2 * N];
// function to build the tree
void build( int arr[])
{
// insert leaf nodes in tree
... | 832 |
405 | // Copyright (c) 2019, QuantStack and Mamba Contributors
//
// Distributed under the terms of the BSD 3-Clause License.
//
// The full license is in the file LICENSE, distributed with this software.
#ifndef MAMBA_CORE_POOL_HPP
#define MAMBA_CORE_POOL_HPP
#include <list>
#include "repo.hpp"
extern "C"
{
#include "sol... | 454 |
4,697 | /*
* 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 ma... | 18,972 |
5,903 | <filename>engine/src/it/java/org/pentaho/di/job/entries/copyfiles/JobEntryCopyFilesIT.java
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by <NAME> : http://www.pentaho.com
*
**********************************************... | 1,384 |
338 | package com.camnter.newlife.bean.ratingrank;
import java.util.List;
/**
* Description:RatingRankResponse
* Created by:CaMnter
*/
public class RatingRankResponse {
private int code;
private String msg;
private DataEntity data;
public int getCode() { return code;}
public void setCode(int co... | 397 |
458 | /* MemManagerGLES.h
* WhirlyGlobeLib
*
* Created by <NAME> on 2/1/11.
* Copyright 2011-2021 mousebird consulting
*
* 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.... | 964 |
14,668 | <gh_stars>1000+
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/webauthn/authenticator_request_scheduler.h"
#include "base/memory/weak_ptr.h"
#include "base/supports_user_data.... | 782 |
409 | package com.bugsnagreactnativeexample;
import android.app.Application;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import com.facebook.react.ReactApplication;
import com.microsoft.codepush.react.CodePush;
import com.bug... | 672 |
317 | /**
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
*
* You may not modify, use, reproduce, or distribute this software except in
* compliance with the terms of the License at:
* https://github.com/javaee/tutorial-examples/LICENSE.txt
*/
package javaeetutorial.web.websocketbot.mess... | 273 |
778 | <filename>kratos/elements/distance_calculation_element_simplex.h
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// M... | 6,600 |
391 | <gh_stars>100-1000
from ..config.config_settings import ConfigSettings, NoteSortingMethods
class NoteSorter:
sorting_definitions = {
# NO_SORTING is a special case which should be ignored by should_sort
# However it's been kept here for edge cases, and for ease of testing
# It returns 1 to... | 723 |
1,043 | <reponame>JeffMuchine/micro-server<filename>micro-error-codes/src/main/java/com/oath/micro/server/errors/FormattedErrorCode.java
package com.oath.micro.server.errors;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor(access = AccessLevel.PACKAGE)
@Getter
public cla... | 129 |
1,543 | <reponame>linh22/Object-Detection-and-Tracking
import os
s1="/home/cai/Desktop/TableCapturer/json/"
s2=".json"
for i in range(99):
s3 = str(i).zfill(6)
os.system("labelme_json_to_dataset"+" "+ s1 + s3 + s2)
i+=1
| 110 |
14,668 | <reponame>chromium/chromium
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/policy/enrollment/device_cloud_policy_initializer.h"
#include <memory>
#include <utility>
#incl... | 4,061 |
356 | <filename>app/src/main/java/com/idrv/coach/bean/Visitor.java
package com.idrv.coach.bean;
/**
* time:2016/5/23
* description:
*
* @author sunjianfei
*/
public class Visitor {
String nickname;
String headimgurl;
public String getNickname() {
return nickname;
}
public void setNickname(... | 224 |
5,938 | <gh_stars>1000+
#!/usr/bin/env python
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 727 |
455 | <reponame>lebrice/RoBO
import logging
import numpy as np
from scipy.stats import norm
from robo.acquisition_functions.base_acquisition import BaseAcquisitionFunction
logger = logging.getLogger(__name__)
class PI(BaseAcquisitionFunction):
def __init__(self, model, par=0.0):
r"""
Probability of ... | 1,044 |
428 | <gh_stars>100-1000
/**
* Copyright 2008 - 2019 The Loon Game Engine Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... | 1,785 |
1,056 | /*
* 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 ... | 1,492 |
2,754 | <filename>CheckTool/feature_detector.h<gh_stars>1000+
/*
* Copyright (c) 2020 Intel Corporation
*
* 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 copyrig... | 909 |
425 | <reponame>jjzhang166/doubanfm-qt<gh_stars>100-1000
#include "controlpanel.h"
#include "ui_controlpanel.h"
#include <QLinearGradient>
#include <QPainter>
#include <QPolygon>
#include <QRegion>
#include <QDebug>
#include <QTime>
#include <QSettings>
#include <QNetworkReply>
#include "mainwidget.h"
#include <QDesktopServi... | 4,238 |
1,641 | import pytest
from eth._utils.numeric import (
get_highest_bit_index,
)
@pytest.mark.parametrize(
'value,expected',
(
(1, 0),
(2, 1),
(3, 1),
(255, 7),
(256, 8),
)
)
def test_get_highest_bit_index(value, expected):
actual = get_highest_bit_index(value)
... | 168 |
322 | <reponame>phenixmzy/apache-eagle-0.5<filename>eagle-core/eagle-query/eagle-client-base/src/main/java/org/apache/eagle/service/client/impl/BatchSender.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for ad... | 1,259 |
399 | <reponame>ytai/ioio<filename>IOIOLibCore/src/main/java/ioio/lib/impl/Board.java
/*
* Copyright 2011 <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 sour... | 5,391 |
364 | <filename>hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/SchemaBaseValidator.java
package ca.uhn.fhir.validation;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2021 Smile CDR, Inc.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in... | 2,765 |
1,293 | <reponame>manifold-systems/manifold<filename>manifold-core-parent/manifold/src/main/java/manifold/internal/javac/ManResolve.java
/*
* Copyright (c) 2018 - Manifold Systems LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... | 3,051 |
304 | <filename>iPhoneOS11.2.sdk/System/Library/Frameworks/ARKit.framework/Headers/ARConfiguration.h<gh_stars>100-1000
//
// ARConfiguration.h
// ARKit
//
// Copyright © 2016-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Enum... | 1,343 |
6,660 | <reponame>jerrykcode/kkFileView
package cn.keking.utils;
import io.mola.galimatias.GalimatiasParseException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
/**
* @author : kl
* crea... | 2,034 |
941 | <gh_stars>100-1000
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Django settings for unit test project."""
import os
DEBUG = True
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3... | 1,581 |
2,757 | <reponame>CEOALT1/RefindPlusUDK
/** @file
Functions declarations to make Xen hypercalls.
Copyright (C) 2014, Citrix Ltd.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of... | 926 |
2,816 | <reponame>leoYY/duckdb
//===----------------------------------------------------------------------===//
// DuckDB
//
// duckdb/function/function.hpp
//
//
//===----------------------------------------------------------------------===//
#pragma once
#include "duckdb/common/types/data_chunk.hpp"... | 2,748 |
1,778 | <filename>include/common/util/error_codes.h<gh_stars>1000+
// Copyright 2013 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.o... | 1,240 |
1,893 | package com.liuguangqiang.swiplebacksample;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
/**
* Created by Eric on 15/3/1.
*/
public class TestFragment extends Fragment {
... | 488 |
356 | #include "renderer.h"
#include <components/camera.h>
#include <components/model.h>
#include <components/light.h>
#include <components/ambient.h>
#include <components/node.h>
#include <components/name.h>
#include <systems/window.h>
#include <systems/render_device.h>
#include <systems/editmode.h>
#include <stdio.h>
#incl... | 18,270 |
4,200 | /*
* Copyright 2009-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unles... | 580 |
1,313 | <gh_stars>1000+
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2017-2019 The WaykiChain Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "logdb.h"
#include "config/chainparams.h"
bool CLogDBCache::Set... | 296 |
2,338 | // RUN: clang-tidy -dump-config %S/Inputs/config-files/- -- | FileCheck %s -check-prefix=CHECK-BASE
// CHECK-BASE: Checks: {{.*}}from-parent
// CHECK-BASE: HeaderFilterRegex: parent
// RUN: clang-tidy -dump-config %S/Inputs/config-files/1/- -- | FileCheck %s -check-prefix=CHECK-CHILD1
// CHECK-CHILD1: Checks: {{.*}}fro... | 1,281 |
5,079 | # Copyright (c) 2018, The Jaeger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 859 |
10,225 | package io.quarkus.vertx.http.deployment.devmode.tests;
public class TestStatus {
private long lastRun;
private long running;
private long testsRun = -1;
private long testsPassed = -1;
private long testsFailed = -1;
private long testsSkipped = -1;
private long totalTestsPassed = -1;
... | 1,357 |
806 | <gh_stars>100-1000
#
# tests/middleware/test_auth.py
#
import growler
import pytest
from unittest import mock
from mock_classes import ( # noqa
mock_protocol,
request_uri,
)
@pytest.fixture
def auth():
return growler.middleware.auth.Auth()
def test_constru... | 333 |
2,690 | <reponame>rasa-silva/Odin
typedef u32 PtrSetIndex;
struct PtrSetFindResult {
PtrSetIndex hash_index;
PtrSetIndex entry_prev;
PtrSetIndex entry_index;
};
enum : PtrSetIndex { PTR_SET_SENTINEL = ~(PtrSetIndex)0 };
template <typename T>
struct PtrSetEntry {
T ptr;
PtrSetIndex next;
};
template <typenam... | 2,592 |
562 | <filename>recipes/icu/all/test_package/test_package.cpp
// This is taken from ICU samples: source/samples/ustring
/*
*******************************************************************************
*
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html#Licen... | 9,673 |
872 | <gh_stars>100-1000
"""
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?
"""
__author__ = 'Daniel'
class Solution(object):
def hIndex(self, A):
"""
Given sorted -> binary search
From linear search into bin search
:ty... | 329 |
1,013 | /*!
@authors <NAME> (<EMAIL>)
@date 2014-2020
@copyright BSD-3-Clause
*/
#include <pyclustering/cluster/clique_block.hpp>
namespace pyclustering {
namespace clst {
clique_spatial_block::clique_spatial_block(const point & p_max_corner, const point & p_min_corner) :
m_max_corner(p_max_corner)... | 1,392 |
2,542 | <gh_stars>1000+
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stda... | 278 |
1,444 |
package mage.server.game;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInput;
import java.util.UUID;
import java.util.zip.GZIPInputStream;
import mage.game.Game;
import mage.game.GameState;
import mage.game.GameStates... | 1,010 |
787 | // OJ: https://leetcode.com/problems/string-matching-in-an-array/
// Author: github.com/lzl124631x
// Time: O(N^2 * D)
// Space: O(1)
class Solution {
public:
vector<string> stringMatching(vector<string>& words) {
vector<string> ans;
int N = words.size();
for (int i = 0; i < N; ++i) {
... | 334 |
2,594 | /*
* Copyright (C) 2018 The Android Open Source Project
*
* 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... | 1,853 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.