repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
zlsun/ProjectEuler | 092.py | #-*- encoding: utf-8 -*-
"""
Square digit chains
A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before.
For example,
44 → 32 → 13 → 10 → 1 → 1
85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89
Therefore any chain that arrives at 1 or 89 w... |
Javitronxo/AdventOfCode | 2015/day_11.py | ALPHABET = 'abcdefghijklmnopqrstuvwxyz'
def is_valid_password(password: str) -> bool:
# Passwords may not contain the letters i, o, or l
invalid_chars = ['i', 'o', 'l']
if True in [char in password for char in invalid_chars]:
return False
# Passwords must contain at least two different, non-o... |
delock/Deep-learning-math-kernel-research | src/eld_conv.cpp | #include <stdlib.h>
#include <assert.h>
#include <float.h>
#include "euler.hpp"
#include "el_def.hpp"
#include "el_isa.hpp"
#include "el_utils.hpp"
#include "elx_conv.hpp"
#include "elx_conv_wino.hpp"
#include "elx_conv_wino_lp.hpp"
#include "elx_conv_direct_1x1.hpp"
#include "elx_conv_direct_1x1_lp.hpp"
#include "elx_... |
AY2122S1-CS2103T-THUNDERCATS/tp | src/test/java/seedu/address/logic/commands/CommandResultTest.java | package seedu.address.logic.commands;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.address.testutil.... |
kupl/starlab-benchmarks | Benchmarks_with_Safety_Bugs/C/inetutils-1.9.4/src/talk/invite.c | <filename>Benchmarks_with_Safety_Bugs/C/inetutils-1.9.4/src/talk/invite.c
/*
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015 Free Software Foundation, Inc.
This file is part of GNU Inetutils.
GNU Inetutils is free sof... |
tarsic99/Python_coursera | Python training/First steps/Exercise_9.py | n = input()
print(int(n[-1])+int(n[-2])+int(n[-3]))
|
rjw57/tiw-computer | emulator/src/mame/video/atari400.cpp | <filename>emulator/src/mame/video/atari400.cpp
// license:GPL-2.0+
// copyright-holders:<NAME>
/******************************************************************************
Atari 400/800
Video handler
<NAME>, June 1998
******************************************************************************/
#inc... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/arm/bics_3.c | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/arm/bics_3.c
/* { dg-do run } */
/* { dg-options "-O2 --save-temps -fno-inline" } */
/* { dg-require-effective-target arm32 } */
extern void abort (void);
int
bics_si_test (int a, int b)
{
if (a & ~b)
return 1;
else
return 0;
}
int
bics_si_test2 (i... |
crazysnailboy/Halloween | src/main/java/net/crazysnailboy/mods/halloween/entity/projectile/fake/EntityFakeArrow.java | <reponame>crazysnailboy/Halloween
package net.crazysnailboy.mods.halloween.entity.projectile.fake;
import net.crazysnailboy.mods.halloween.entity.monster.fake.EntityFakeSkeleton;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.SoundEvents;
imp... |
anthonydelgado/pinocchio | geppetto/code/compiler/src/cpp/EncodingArithQap.cpp | <filename>geppetto/code/compiler/src/cpp/EncodingArithQap.cpp<gh_stars>0
#include <assert.h>
#include "EncodingArithQap.h"
#include <bitset>
#include <intrin.h>
#include "Poly.h"
#include "FieldPrime.h"
#include "EncodingEnigmaBN.h"
#include "ArithQapWrappers.h"
// Protect ourselves from ARITH's #define
#ifd... |
abhinavsri360/Allcodes | cpac/codeforces/1400/freq.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
void countFreq(ll arr[], ll n)
{
vector<bool> visited(n, false);
for (int i = 0; i < n; i++) {
if (visited[i] == true)
continue;
ll count = 1;
for (int j = i + 1; j < n; j++) {
if (arr[i] == arr[j]) {
visited[j] = t... |
kmsiapps/maplestory_dpm_calc | dpmModule/jobs/nightwalker.py | <filename>dpmModule/jobs/nightwalker.py
from ..kernel import core
from ..kernel.core import VSkillModifier as V
from ..character import characterKernel as ck
from functools import partial
from ..status.ability import Ability_tool
from . import globalSkill
from .jobclass import cygnus
from .jobbranch import thieves
#TOD... |
rudneff/ClickHouse | dbms/src/Functions/tests/logical_functions_performance.cpp | <filename>dbms/src/Functions/tests/logical_functions_performance.cpp<gh_stars>1-10
#include <DB/DataTypes/DataTypesNumberFixed.h>
#include <DB/Functions/IFunction.h>
#include <DB/Common/Stopwatch.h>
#include <iomanip>
namespace DB
{
template<typename B>
struct AndImpl
{
static inline UInt8 apply(UInt8 a, B b)
{
... |
zjp693/Learning-diary | 2019年下学期/每日作业/js基础/Js基础-day13-10.10/02.总和.js | <filename>2019年下学期/每日作业/js基础/Js基础-day13-10.10/02.总和.js
//2. 100以内7的倍数的总和(while实现)
var a=1
var b=0
while(a<100){
a%7==0
b+=a
a++
}console.log(b);
|
PatrickShaw/QuixBugs | correct_python_programs/kth.py | <reponame>PatrickShaw/QuixBugs<filename>correct_python_programs/kth.py
def kth(arr, k):
pivot = arr[0]
below = [x for x in arr if x < pivot]
above = [x for x in arr if x > pivot]
num_less = len(below)
num_lessoreq = len(arr) - len(above)
if k < num_less:
return kth(below, k)
elif ... |
ebubekirtrkr/gef | tests/functions/elf_sections.py | """
GDB function test module for ELF section convenience functions
"""
from tests.utils import _target, gdb_run_cmd, gdb_run_silent_cmd, gdb_start_silent_cmd, is_64b
from tests.utils import GefUnitTestGeneric
class ElfSectionGdbFunction(GefUnitTestGeneric):
"""GDB functions test module"""
def test_func_ba... |
agrc/parole-and-probation | src/ClientApp/src/components/Filters/FilterAgent/FilterAgent.stories.js | <gh_stars>0
import * as React from 'react';
import { useImmerReducer } from 'use-immer';
import { agents, supervisors } from '../lookupData';
import FilterAgent from './FilterAgent';
/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */
export default {
title: 'Filters/Agent Filter',
componen... |
JohnsonMauro/rocket-lab | src/components/common/Form/TextArea/TextArea.spec.js | import React from 'react';
import { render } from '@testing-library/react';
import GlobalsContainer from '@test/GlobalsContainer';
import TextArea from './index';
describe('<TextArea />', () => {
it('Renders the TextArea component', () => {
const { container } = render(
<TextArea id="sample" maxLength="20... |
bluebackblue/brownie | source/bsys/opengl/opengl_shaderlayout.cpp | <reponame>bluebackblue/brownie
/**
* Copyright (c) blueback
* Released under the MIT License
* https://github.com/bluebackblue/brownie/blob/master/LICENSE.txt
* http://bbbproject.sakura.ne.jp/wordpress/mitlicense
* @brief OpenGL。
*/
/** include
*/
#include <bsys_pch.h>
/** include
*/
#prag... |
yuanbaojian/OpenOlat | src/main/java/org/olat/resource/references/ReferenceManager.java | /**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unl... |
pjhartout/Apollo | nextjs-app/views/SelectSetsView.js | <filename>nextjs-app/views/SelectSetsView.js
import DragDrop from "../components/DragDrop";
import SetTile from "../components/SetTile";
import styles from "./SelectSetsView.module.scss";
const SelectSetsView = (
<>
<h1 className={styles.pageTitle}>Select Gene Sets</h1>
<h2 className={styles.subTitle}>Group... |
gameblabla/reeee3 | src/core/config.h | <filename>src/core/config.h
#pragma once
// disables (most) stuff that wasn't in original gta3.exe - check section at the bottom of this file
//#define VANILLA_DEFINES
enum Config {
NUMPLAYERS = 1, // 4 on PS2
NUMCDIMAGES = 12, // gta3.img duplicates (not used on PC)
MAX_CDIMAGES = 8, // additional cdimages
MAX_... |
KadonWills/EasyMove | src/main/java/entities/Reservations.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embedd... |
sniperkit/colly | plugins/data/aggregate/api/krakend/extra/config/flexibleconfig/template.go | <gh_stars>0
package flexibleconfig
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"path"
"path/filepath"
"strings"
"text/template"
"github.com/devopsfaith/krakend/config"
)
type Config struct {
Settings string
Partials string
Parser config.Parser
}
func NewTemplateParser(cfg Config) *... |
LambdaCalculus37/little-smalltalk | lst5/iup/include/iupcontrols.h | <filename>lst5/iup/include/iupcontrols.h
/** \file
* \brief initializes iupdial, iupgauge, iuptabs, iupcb, iupgc and iupval controls.
*
* See Copyright Notice in iup.h
* $Id: iupcontrols.h,v 1.17 2005/12/07 17:53:16 scuri Exp $
*/
#ifndef __IUPCONTROLS_H
#define __IUPCONTROLS_H
#include "iupdial.h"
#include "i... |
lvdongww/schoolnewvs | schoolnewvs/src/main/java/com/kgc/pojo/XiaoXi.java | <gh_stars>0
package com.kgc.pojo;
import java.util.Date;
public class XiaoXi {
private Integer xid;
private Integer chid;
private Integer zhu;
private String neirong;
private Date createdate;
private Integer xtype;
public Integer getXid() {
return xid;
... |
tak2004/RadonFramework | include/RadonFramework/Math/MathOfType.hpp | <gh_stars>1-10
#ifndef RF_MATH_MATHOFTYPE_HPP
#define RF_MATH_MATHOFTYPE_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <RadonFramework/Math/Float32.hpp>
#include <RadonFramework/Math/Float64.hpp>
namespace RadonFramework::Math
{
template <class T>
struct MathOfType
{
};
template <>
struct MathOfType<RF_Type::... |
burdettadam/token-plugin | sovtokenfees/sovtokenfees/test/catchup/test_xfer_fees_nym_during_catchup.py | import pytest
from sovtokenfees.test.constants import (
NYM_FEES_ALIAS, XFER_PUBLIC_FEES_ALIAS, alias_to_txn_type
)
from sovtokenfees.test.catchup.helper import scenario_txns_during_catchup
@pytest.fixture(
scope='module',
params=[
{NYM_FEES_ALIAS: 0, XFER_PUBLIC_FEES_ALIAS: 8}, # no fees for N... |
dk-dev/absurd | tests/cases/document/test.spec.js | describe("Test case (Document)", function() {
var Absurd = require('../../../index.js');
it("Document / js", function(done) {
Absurd(__dirname + '/code.js').compile(function(err, css) {
expect(err).toBe(null);
expect(css).toBeDefined();
expect(css).toBe('@-moz-document url-prefix(){.ui-select .ui-btn sel... |
hespinoza01/polporc-coding-challenge | src/components/navbar.component.js | <filename>src/components/navbar.component.js
import { NavLink as Link } from 'react-router-dom'
// Import assets
import { Logo } from 'assets'
export default function Navbar() {
return (
<section className='Navbar'>
<img className='Navbar-logo' src={Logo} alt='app-logo' />
... |
duanhaoling/LdhApps | androidlib/src/main/java/com/ldh/androidlib/utils/AbstractSingleton.java | <reponame>duanhaoling/LdhApps
package com.ldh.androidlib.utils;
import java.util.concurrent.atomic.AtomicReference;
/**
* Created by ldh on 2017/8/16.
*/
public abstract class AbstractSingleton<T> {
private final AtomicReference<T> ref = new AtomicReference<>();
public T get() {
T ret = ref.get();... |
boybin/n4backend | public/node_modules/angular-filter/test/spec/filter/string/latinize.js | <filename>public/node_modules/angular-filter/test/spec/filter/string/latinize.js<gh_stars>1000+
'use strict';
describe('latinizeFilter', function () {
var filter;
beforeEach(module('a8m.latinize'));
beforeEach(inject(function ($filter) {
filter = $filter('latinize');
}));
it('should get a string and ... |
GDGSXY/gdbtu-admin-back | src/main/java/org/springblade/common/tool/PageUtil.java | package org.springblade.common.tool;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springblade.common.entity.PagingQuery;
/**
* @author <NAME>
* @date 2021/10/31
*/
public interface PageUtil {
/**
* 获取 {@link PagingQuery... |
ceekay1991/AliPayForDebug | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/O2OAnimatedImageView.h | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <UIKit/UIImageView.h>
#import "CALayerDelegate-Protocol.h"
@class CADisplayLink, NSMutableDictionary, NSObject, NSOperationQueue, N... |
vva0901/academic | src/components/Test/Filter.test.js | <filename>src/components/Test/Filter.test.js
import React from "react";
import { create } from "react-test-renderer";
import { StudentStatus, AllProgram } from "../Filter";
describe("StudentStatus Component", () => {
it("Test StudentStatus component it work", () => {
const component = create(<StudentStatus />).t... |
EvgeniyKuch/job4j | chapter_005/src/main/java/ru/job4j/bomberman/Start.java | <reponame>EvgeniyKuch/job4j<filename>chapter_005/src/main/java/ru/job4j/bomberman/Start.java
package ru.job4j.bomberman;
import java.util.concurrent.ThreadLocalRandom;
public class Start {
public static void main(String[] args) throws InterruptedException {
long timeStart = System.currentTimeMillis();
... |
jrmarino/ravensource | bucket_8E/gdb/dragonfly/patch-gdb_i386-bsd-nat.c | <reponame>jrmarino/ravensource
--- gdb/i386-bsd-nat.c.orig 2021-04-25 04:06:26 UTC
+++ gdb/i386-bsd-nat.c
@@ -360,6 +360,8 @@ _initialize_i386bsd_nat ()
#define SC_REG_OFFSET i386nbsd_sc_reg_offset
#elif defined (OpenBSD)
#define SC_REG_OFFSET i386obsd_sc_reg_offset
+#elif defined (DragonFly)
+#define SC_REG_OFFSET ... |
nryotaro/at_c | src/abc122/we_like_agc.cc | <gh_stars>0
#include <iostream>
using namespace std;
int a = 0;
int g = 1;
int c = 2;
int t = 3;
long long we_like_agc(int n){
long long mod = 1000000007;
long long ans[100][4][4][4][4] = {{{{{0}}}}};
if(n == 3)
return 61;
for(int j=0;j<4;j++) {
for(int k=0;k<4;k++) {
for(int l=0;l<4;l++) {
fo... |
andtu7/enciclovida | db/migrate/20160813001120_add_auto_increment_to_base32_id_in_comentarios.rb | <reponame>andtu7/enciclovida
class AddAutoIncrementToBase32IdInComentarios < ActiveRecord::Migration[5.1]
def up
change_table(:comentarios) do |t|
t.remove :id
t.integer :idConsecutivo
t.string :id, :limit => 10, :primary_key => true
end
end
def down
change_table(:comentarios) do |t... |
khemlabs/readium-sdk | Platform/WinRT/Readium/Readium/WinErrorHandler.cpp | <gh_stars>100-1000
//
// WinErrorHandler.cpp
// ePub3
//
// Created by <NAME> on 2013-10-04.
// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following co... |
mmjiang2019/ovs | datapath/linux/compat/include/linux/stddef.h | #ifndef __LINUX_STDDEF_WRAPPER_H
#define __LINUX_STDDEF_WRAPPER_H 1
#include_next <linux/stddef.h>
#ifdef __KERNEL__
#ifndef offsetofend
#define offsetofend(TYPE, MEMBER) \
(offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER))
#endif
#endif /* __KERNEL__ */
#endif
|
JSybrandt/SuperSpirograph | src/main/java/geometry/trackshape/package-info.java | /**
* the trackshape package defines a couple geometric classes used by objects in the piece.track package to know shape,
* connection points, and positioning data. Each specific track class inherits from the TrackGeometry abstract class
* which defines logic relating to those male and female connection points.
*
... |
patricksyoussef/patrickyoussef.com | src/components/TableOfContents.js | // Not the best but she'll work for now
import React from "react"
import styled from "styled-components"
const Container = styled.div`
`
const getLinkedText = (title, url) => {
return(<a href={url}>{title}</a>)
}
const TableOfContents = ({toc}) => {
let length = toc.items.length
if (length > 4) {
return(... |
lirizhong97/learning-gtkmm | eventbox/examplewindow.cc | #include "examplewindow.h"
ExampleWindow::ExampleWindow()
: m_Label("Click here to quit, quit, quit, quit, quit")
{
set_title ("EventBox");
set_border_width(10);
add(m_EventBox);
m_EventBox.add(m_Label);
//Clip the label short:
m_Label.set_size_request(110, 20);
//And bind an action to it:
m_EventB... |
andrebq/exp | graphdb/node.go | <gh_stars>1-10
package main
import (
"strings"
)
// keyword is a shared identifier that can be used
// to identify node types, edge types and name properties
//
// All keywords should start with ":" to be considered valid
type Keyword struct {
name string
val uint32
}
// NewKeyword prepare the string to be used ... |
JoseLora/resilience4j | resilience4j-circularbuffer/src/main/java/io/github/resilience4j/circularbuffer/ConcurrentCircularFifoBuffer.java | /*
*
* Copyright 2016 <NAME> and <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... |
Maarc/spring-boot-migrator | applications/spring-shell/src/test/java/org/springframework/sbm/BootifyJpaApplicationIntegrationTest.java | <reponame>Maarc/spring-boot-migrator
/*
* Copyright 2021 - 2022 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
*
* https://www.apache.org/licenses... |
diegoUE8/b-here | src/js/forms/control-asset.component.js | import { getContext, isPlatformBrowser } from 'rxcomp';
import { combineLatest, EMPTY, fromEvent, merge } from 'rxjs';
import { filter, map, switchMap, takeUntil, tap } from 'rxjs/operators';
import EditorService from '../editor/editor.service';
import { Asset } from '../view/view';
import ControlComponent from './cont... |
luckylove/extra | 3.8.1.cpp | #include<bits/stdc++.h>
using namespace std;
int calculategcd(int a, int b)
{
if (a == 0)
return b;
return calculategcd(b%a, a);
}
int main()
{
int test,a,b,c,d,e,f,i,j,k,m,n,q,x,y,l,r,value,countt;
cin>>n;
int arr[n];
for(i=0;i<n;i++)
{
cin>>arr[i];
}
cin>>q;
while(q--)
{
c... |
getrdbc/rdbc | rdbc-implbase/src/main/scala/io/rdbc/implbase/IgnoringSubscriber.scala | <filename>rdbc-implbase/src/main/scala/io/rdbc/implbase/IgnoringSubscriber.scala<gh_stars>10-100
/*
* Copyright 2016 rdbc 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
*
... |
fabricio7p/Ikebana-App-Frontend | src/components/pages/Lessons/Lessons.js | import React, { useEffect, useState } from 'react';
import api from 'services/api';
import { useSelector } from 'react-redux';
import './styles.scss';
import LessonCard from '../../cards/LessonCard/LessonCard';
export default function Lessons() {
const [data, setData] = useState([]);
const [loading, setLoadi... |
bhatti/PlexService | plexsvc-framework/src/test/java/com/plexobject/util/ReflectUtilsTest.java | <gh_stars>1-10
package com.plexobject.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;... |
dgimb89/glannotations | source/glannotations-preprocessor/include/glannotations-preprocessor/GlyphSetGenerator.h | <reponame>dgimb89/glannotations
#pragma once
#include <vector>
#include <string>
#include <globjects/base/ref_ptr.h>
#include <glannotations/Common/PNGImage.h>
#include <glannotations-preprocessor/glannotations-preprocessor_api.h>
namespace glannotations {
namespace preprocessor {
class GLANNOTATIONS_PREPROCESSOR... |
clovadevice/clockplus2 | kernel/msm-4.14/drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_timer.h | <reponame>clovadevice/clockplus2<gh_stars>0
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundati... |
schippada/code-corps-api | spec/policies/project_category_policy_spec.rb | <gh_stars>0
require "rails_helper"
describe ProjectCategoryPolicy do
subject { described_class }
let(:admin_user) { build_stubbed(:user) }
let(:contributor_user) { build_stubbed(:user) }
let(:organization) { create(:organization) }
let(:owner_user) { build_stubbed(:user) }
let(:pending_user) { build_stubb... |
2020SnakeVenom/kafka-0.10.2.0-src | clients/src/main/java/org/apache/kafka/common/security/auth/Login.java | <filename>clients/src/main/java/org/apache/kafka/common/security/auth/Login.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 ... |
sgholamian/log-aware-clone-detection | LACCPlus/Hive/163_1.java | //,temp,SessionHiveMetaStoreClient.java,1795,1804,temp,SessionHiveMetaStoreClient.java,1779,1794
//,3
public class xxx {
private void removePartitionedTempTable(org.apache.hadoop.hive.metastore.api.Table t) {
String qualifiedTableName = Warehouse.
getQualifiedName(t.getDbName().toLowerCase(), t.getTableNa... |
eduardosasso/leter | test/theme_test.rb | <gh_stars>1-10
# frozen_string_literal: true
require 'test_helper'
require 'leter/theme'
require 'leter/color'
class ThemeTest < Minitest::Test
def test_css
theme = Leter::Theme.new
css = ":root {\n" \
" --background_color: #{theme.background_color};\n" \
" --page_align: #{theme.page_... |
evugar/Mcucpp | mcucpp/flash_crc_check.h | #pragma once
unsigned long FlashCrcExpected();
unsigned long FlashCrcComputed();
|
rumenNikodimov/Java-Script-Core | 06.Lab Arrays and Matrices/08. Biggest Element.js | function biggestElement(matrix){
return matrix
.concat.apply([], matrix)
.sort((a, b) => b - a)[0]
}
console.log(biggestElement([[20, 50, 10],
[8, 33, 145]]
)); |
lechium/iOS1351Headers | System/Library/PrivateFrameworks/OfficeImport.framework/TCBackgroundThreadManager.h | <gh_stars>1-10
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, October 27, 2021 at 3:22:40 PM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/PrivateFra... |
Gegel85/minesweeper | lib/configParser/sources/dumper.c | <filename>lib/configParser/sources/dumper.c
#include "configParser.h"
#include <malloc.h>
#include <concatf.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
int isInString(char c, char *str);
char *transformString(char *str, int length, ParserInfos *infos)
{
char *result = strdup("");
char *buffer = NU... |
Pandrex247/patched-src-eclipselink | plugins/javax.transaction/src/javax/transaction/SystemException.java | /*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the license at
* https://glassfish.dev.java.net/public/CDDLv1.0.html or
* glassfish/boots... |
LightSecOps/Triton | src/libtriton/includes/triton/pathConstraint.hpp | <gh_stars>1-10
//! \file
/*
** Copyright (C) - Triton
**
** This program is under the terms of the BSD License.
*/
#ifndef TRITON_PATHCONSTRAINT_H
#define TRITON_PATHCONSTRAINT_H
#include <tuple>
#include <vector>
#include <triton/ast.hpp>
#include <triton/dllexport.hpp>
#include <triton/tritonTypes.hpp>
//! Th... |
VKCOM/nocolor | internal/walkers/block_checker.go | <filename>internal/walkers/block_checker.go
package walkers
import (
"github.com/VKCOM/noverify/src/ir"
"github.com/VKCOM/noverify/src/linter"
)
// BlockIndexer is a dummy walker.
type BlockIndexer struct {
linter.BlockCheckerDefaults
}
// BlockChecker is a walker that handles function calls, method calls,
// cla... |
markiewb/fakereplace | plugins/resteasy/src/main/java/org/fakereplace/integration/resteasy/ResteasyClassChangeAware.java | <filename>plugins/resteasy/src/main/java/org/fakereplace/integration/resteasy/ResteasyClassChangeAware.java
/*
* Copyright 2016, <NAME>, and individual contributors as indicated
* by the @authors tag.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complian... |
yuenov/reader-android | app/src/main/java/com/yuenov/open/activitys/CategoryEndListActivity.java | package com.yuenov.open.activitys;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.yuenov.open.R... |
ThePythonator/SDL2-boilerplate | include/framework/BaseStage.hpp | #pragma once
#include "Graphics.hpp"
namespace Framework {
class BaseStage {
public:
BaseStage();
virtual void update(float dt) = 0;
virtual void render(Framework::Graphics& graphics) = 0;
BaseStage* next();
bool finished();
protected:
void finish(BaseStage* next);
private:
bool _finished = fal... |
LevyForch/SilverKing | src/skfs/OpenDirWriteRequest.c | <reponame>LevyForch/SilverKing<gh_stars>0
// OpenDirWriteRequest.c
/////////////
// includes
#include "OpenDirWriteRequest.h"
#include "Util.h"
#include <string.h>
///////////////////
// implementation
OpenDirWriteRequest *odwr_new(OpenDirWriter *openDirWriter, OpenDir *od) {
OpenDirWriteRequest *odwr;
odwr = ... |
eikeschumann971/kspp | tools/avro2pg/avro2pg.cpp | <filename>tools/avro2pg/avro2pg.cpp
#include <iostream>
#include <csignal>
#include <boost/program_options.hpp>
#include <kspp/topology_builder.h>
#include <kspp/sources/avro_file_source.h>
#include <kspp/processors/flat_map.h>
#include <kspp/utils/env.h>
#include <kspp/connect/postgres/postgres_generic_avro_sink.h>
#i... |
rexlManu/ChromCloud | TestProgram/src/main/java/me/rexlmanu/testprogram/TestProgram.java | package me.rexlmanu.testprogram;
import java.io.IOException;
public final class TestProgram {
public static void main(String[] args) throws IOException {
String rawCommandsList = "docker,run,-d,-it,-v,/home/Subnode/ChromCloud/servers/1/temp:/data,-it,-e,EULA=TRUE,-e,SPIGOT_DOWNLOAD_URL=https://cdn.getbu... |
Nels885/csd_dashboard | dashboard/management/commands/importexcel.py | import logging
from django.core.management.base import BaseCommand
from django.core.management import call_command
logger = logging.getLogger('command')
class Command(BaseCommand):
help = 'Interact with the all tables in the database'
def handle(self, *args, **options):
self.stdout.write("[IMPORT_EX... |
BrittonAlone/main | src/main/java/seedu/address/logic/commands/FindAccountCommand.java | <filename>src/main/java/seedu/address/logic/commands/FindAccountCommand.java
package seedu.address.logic.commands;
import static java.util.Objects.requireNonNull;
import java.util.List;
import seedu.address.commons.core.Messages;
import seedu.address.logic.CommandHistory;
import seedu.address.model.Model;
import see... |
whwang1996/pra | edu/cmu/pra/model/RWRModel.java |
package edu.cmu.pra.model;
import java.io.BufferedWriter;
import edu.cmu.lti.algorithm.container.MapID;
import edu.cmu.lti.algorithm.container.SetI;
import edu.cmu.lti.algorithm.container.VectorD;
import edu.cmu.lti.algorithm.container.VectorI;
import edu.cmu.lti.algorithm.optimization.AModel;
import edu.cmu.lti.alg... |
tsymiar/---- | CommonCPlus/CommonCPlus/ice/Ice/Outgoing.h | // **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// ***************************************************... |
RobotLocomotion/drake-python3.7 | examples/manipulation_station/mock_station_simulation.cc | <filename>examples/manipulation_station/mock_station_simulation.cc
#include <limits>
#include <gflags/gflags.h>
#include "drake/common/eigen_types.h"
#include "drake/common/find_resource.h"
#include "drake/common/is_approx_equal_abstol.h"
#include "drake/examples/manipulation_station/manipulation_station.h"
#include ... |
just-hugo/city-scrapers-det | city_scrapers/spiders/det_city_council.py | <filename>city_scrapers/spiders/det_city_council.py
import re
from city_scrapers_core.constants import CITY_COUNCIL, COMMITTEE, FORUM
from city_scrapers_core.spiders import CityScrapersSpider
from city_scrapers.mixins import DetCityMixin
class DetCityCouncilSpider(DetCityMixin, CityScrapersSpider):
name = "det_... |
bonedaddy/spago | pkg/ml/ag/graph.go | <reponame>bonedaddy/spago
// Copyright 2019 spaGO Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ag
import (
"github.com/nlpodyssey/spago/pkg/mat"
"github.com/nlpodyssey/spago/pkg/mat/rand"
"github.com/nlpodyssey/spago/p... |
wushuaixing/assets-monitor-react | src/views/portrait-inquiry/inquiry-check.js | import React from 'react';
import { Modal, message } from 'antd';
import { navigate } from '@reach/router';
import { inquiryLimit } from 'api/portrait-inquiry';
const contentStr = num => React.createElement('p', { style: { fontSize: 14 } },
React.createElement('span', { style: { marginBottom: 6 } }, '点击确认,将消耗1次查询次数,返... |
oleg-cherednik/json-utils | src/main/java/ru/olegcherednik/jackson/utils/serializers/JacksonUtilsLocalDateTimeSerializer.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 ... |
korenlev/calipso-cvim | front-end/imports/api/migrations/migrations.js | <gh_stars>0
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2017-2018 <NAME> (Cisco Systems), /
// <NAME> (Cisco Systems), <NAME> (Cisco Systems) and others /
// /
//... |
AndyThirtover/wb_gateway | WebBrickLibs/EventHandlers/tests/TestSerial.py | <reponame>AndyThirtover/wb_gateway
# Copyright L.P.Klyne 2013
# Licenced under 3 clause BSD licence
# $Id: TestSerial.py 2610 2008-08-11 20:08:49Z graham.klyne $
#
# Unit testing for Serial Eventhandler (Serial.py)
# See http://pyunit.sourceforge.net/pyunit.html
#
# NOTE: The local serial parts of this unittest re... |
Heasn/ms | src/main/java/im/cave/ms/provider/wz/MapleDataTool.java | package im.cave.ms.provider.wz;
import im.cave.ms.tools.StringUtil;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Map;
public class MapleDataTool {
public static String getString(MapleData data) {
if (data.getData() instanceof Integer) {
r... |
miotech/KUN | kun-security/kun-security-common/src/main/java/com/miotech/kun/security/common/KunRole.java | <reponame>miotech/KUN
package com.miotech.kun.security.common;
import java.util.Set;
public interface KunRole {
Set<UserOperation> getUserOperation();
Integer rank();
String getName();
}
|
doveylovey/alipay-sdk-java | src/main/java/com/alipay/api/domain/KoubeiQualityTestCloudacptCheckresultSubmitModel.java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 云验收检测结果提交
*
* @author auto create
* @since 1.0, 2016-10-26 18:05:16
*/
public class KoubeiQualityTestCloudacptCheckresultSubmitModel extends AlipayObject {
private static final long seri... |
magic-lantern-studio/mle-core-dpp | DigitalPlayprint/runtime/common/include/mle/scenechk.h | <reponame>magic-lantern-studio/mle-core-dpp<filename>DigitalPlayprint/runtime/common/include/mle/scenechk.h
/** @defgroup MleDPPMaster Magic Lantern Digital Playprint Library API - Master */
/**
* @file scenechk.h
* @ingroup MleDPPMaster
*
* Magic Lantern Digital Playprint Library API.
*
* @author <NAME>
* @cre... |
damianosky/Maud-X | src/it/unitn/ing/rista/diffr/cal/D20IntensityCalibration.java | /*
* @(#)D20IntensityCalibration.java created 24/07/1999 Pergine
*
* Copyright (c) 1997-1999 <NAME> All Rights Reserved.
*
* This software is the research result of <NAME> and it is
* provided as it is as confidential and proprietary information.
* You shall not disclose such Confidential Information and shall u... |
tlaukkan/zigbee4java | zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/protocol/command/rssi/location/GetLocationDataCommand.java | package org.bubblecloud.zigbee.v3.zcl.protocol.command.rssi.location;
import org.bubblecloud.zigbee.v3.zcl.ZclCommandMessage;
import org.bubblecloud.zigbee.v3.zcl.ZclCommand;
import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType;
import org.bubblecloud.zigbee.v3.zcl.protocol.ZclFieldType;
/**
* Code generate... |
freddyz/computerscare-vcv-modules | src/waveblob.hpp | <reponame>freddyz/computerscare-vcv-modules
#pragma once
namespace rack {
namespace app {
struct Waveblob {
std::vector<Vec> trigs;
Points points;
int numPoints;
Waveblob(int n = 200) {
numPoints = n;
makeTrigs();
}
void makeTrigs() {
trigs.resize(numPoints);
float omega = 2 * M_PI / numPo... |
nilamjadhav/TypeScript | tests/baselines/reference/overloadOnConstDuplicateOverloads1.js | //// [overloadOnConstDuplicateOverloads1.ts]
function foo(a: 'hi', x: string);
function foo(a: 'hi', x: string);
function foo(a: any, x: any) {
}
function foo2(a: 'hi', x: string);
function foo2(a: 'hi', x: string);
function foo2(a: string, x: string);
function foo2(a: any, x: any) {
}
//// [overloadOnConstDuplica... |
fmjsjx/entrepot | entrepot-server/src/main/java/com/github/fmjsjx/entrepot/server/conf/WharfType.java | package com.github.fmjsjx.entrepot.server.conf;
import lombok.extern.slf4j.Slf4j;
/**
* Enumeration of hangar type.
*/
@Slf4j
public enum WharfType {
RAW, COOK;
public static final WharfType of(String type) {
if (type == null) {
return RAW;
}
switch (type) {
cas... |
margaretkennedy/deephaven-core | DB/src/test/java/io/deephaven/db/v2/utils/RedirectionIndexLockFreeTest.java | <reponame>margaretkennedy/deephaven-core
/*
* Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.db.v2.utils;
import io.deephaven.db.tables.live.LiveTableMonitor;
import io.deephaven.db.v2.LiveTableTestCase;
import io.deephaven.db.v2.sources.LogicalClock;
import gnu.trove.list.ar... |
noirhero/the_madness | client/system/system_movement_anim.js | <filename>client/system/system_movement_anim.js
// Copyright 2018 TAP, Inc. All Rights Reserved.
const SystemMovementAnim = CES.System.extend({
init: function() {
this.player_memory = {
is_first: true,
pos: glMatrix.vec3.create(),
};
this.net_player_memories = [];
},
update: function() {... |
BlockClusterApp/homepage | src/routes/legal/privacy/index.js | <gh_stars>0
import React from 'react';
// import Layout from '../../../components/Layout';
import LegalLayout from '../components/Layout';
import Privacy from './Privacy';
async function action() {
return {
title: 'Privacy policy',
chunks: ['privacy'],
component: (
<LegalLayout>
<Privacy />... |
lesleycl/patternfly-react | packages/patternfly-4/react-core/src/components/Wizard/examples/FinishedStep.js | import React from 'react';
import PropTypes from 'prop-types';
const propTypes = {
onClose: PropTypes.func.isRequired
};
class FinishedStep extends React.Component {
constructor(props) {
super(props);
this.state = { percent: 0 };
}
tick() {
if (this.state.percent < 100) {
this.setState(prev... |
smartchicago/kimball | spec/factories/event_invitations.rb | require 'faker'
FactoryGirl.define do
factory :event_invitation, class: V2::EventInvitation do
title 'event title'
description 'Lorem ipsum for now'
slot_length 15
buffer 0
user
before(:create) do |event_invitation|
invitees = FactoryGirl.create_list(:person, 3)
event_invitation.... |
MateusAraujoBorges/abc | examples/varargs.c |
void printf(char * format, ...);
void main() {
printf("test", 2);
}
|
Testiduk/frontend | static/src/javascripts/projects/common/modules/ui/accessibility-prefs.js | <filename>static/src/javascripts/projects/common/modules/ui/accessibility-prefs.js<gh_stars>1000+
/* We live in a rainbow of chaos. */
// ^ U WOT
import fastdom from 'fastdom';
import userPrefs from 'common/modules/user-prefs';
const FILTERS = [
'sepia',
'grayscale',
'invert',
'contrast',
'saturat... |
pedrohsreis/boulos | src/Core/External/unsw/unsw/utils/basic_maths.hpp | <filename>src/Core/External/unsw/unsw/utils/basic_maths.hpp
#pragma once
#include <cmath>
#include "types/Point.hpp"
#ifndef MAX
template <class T>
inline static T MAX(const T &x, const T &y) {
return (x > y ? x : y);
}
inline static float MAX(const float x, const int y) {
return (x > y ? x : ... |
Diego-Zulu/leetcode_answers | python3/146.lru-cache.329634071.ac.py | #
# @lc app=leetcode id=146 lang=python3
#
# [146] LRU Cache
#
# https://leetcode.com/problems/lru-cache/description/
#
# algorithms
# Medium (31.91%)
# Likes: 5403
# Dislikes: 243
# Total Accepted: 522.3K
# Total Submissions: 1.6M
# Testcase Example: '["LRUCache","put","put","get","put","get","put","get","get",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.