repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
axodox/Lux | Lux.Shared/Dispatcher.cpp | #include "pch.h"
#include "Dispatcher.h"
using namespace std;
using namespace winrt;
using namespace winrt::Windows::UI::Core;
namespace Lux::Threading
{
simple_dispatcher::simple_dispatcher() :
_thread([&] { run(); }, L"simple dispatcher")
{ }
simple_dispatcher::~simple_dispatcher()
{
_tasks.complet... |
dillonhuff/Chips-2.0 | examples/example_2.py | <gh_stars>100-1000
#!/usr/bin/env python2
import subprocess
import atexit
from math import pi
from chips.api.api import Chip, Stimulus, Response, Wire, Component
try:
from matplotlib import pyplot
except ImportError:
print "You need matplotlib to run this script!"
exit(0)
try:
from numpy import arange... |
reels-research/iOS-Private-Frameworks | PhotosImagingFoundation.framework/IPAAdjustmentVersionInfo.h | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/PhotosImagingFoundation.framework/PhotosImagingFoundation
*/
@interface IPAAdjustmentVersionInfo : NSObject <NSCopying> {
NSString * _appVersion;
NSString * _buildNumber;
NSString * _platform;
long long _schemaRevision;
}
@pr... |
LeDron12/c2eo | project/tests/in_progress/for_main/tests_suite/test094/testsuite_094.c | #include <stdio.h>
struct S {int a; int b;};
struct S s = { .b = 2, .a = 1};
int
test()
{
if(s.a != 1)
return 1;
if(s.b != 2)
return 2;
return 0;
}
int main () {
int x;
x = test();
printf("%d\n", x);
return 0;
} |
dan4ik95dv/famousartists | app/src/main/java/com/github/dan4ik95dv/famousartists/ui/fragment/ArtistTracksFragment.java | package com.github.dan4ik95dv.famousartists.ui.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget... |
ChocolateLoverRaj/dev-react | lib/__mocks__/read-create-dir.test.js | <reponame>ChocolateLoverRaj/dev-react
/* eslint-env jest */
import readDir, { _reset } from './read-create-dir.js'
afterEach(_reset)
test('spies', async () => {
await expect(readDir('dir')).resolves.toStrictEqual([])
expect(readDir.calledOnceWith('dir')).toBe(true)
})
test('_reset', async () => {
await readDi... |
dmzgroup/dmz | frameworks/net/modules/basic/dmzNetModuleIdentityMapBasic.h | <filename>frameworks/net/modules/basic/dmzNetModuleIdentityMapBasic.h
#ifndef DMZ_NET_MODULE_IDENTITY_MAP_BASIC_DOT_H
#define DMZ_NET_MODULE_IDENTITY_MAP_BASIC_DOT_H
#include <dmzNetModuleIdentityMap.h>
#include <dmzRuntimeDataConverterTypesBase.h>
#include <dmzRuntimeHandleAllocator.h>
#include <dmzRuntimeLog.h>
#inc... |
wrldwzrd89/older-java-games | DungeonDiver4/src/com/puttysoftware/dungeondiver4/editor/LevelPreferencesManager.java | /* DungeonDiver4: A Dungeon-Solving Game
Copyright (C) 2008-2012 <NAME>
Any questions should be directed to the author via email at: <EMAIL>
*/
package com.puttysoftware.dungeondiver4.editor;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java... |
freemo/AetherMUD | src/main/java/com/syncleus/aethermud/game/Abilities/Druid/Chant_SummonPlants.java | /**
* Copyright 2017 Syncleus, Inc.
* with portions copyright 2004-2017 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*... |
maded2/68000 | software/doom/r_state.h | <reponame>maded2/68000
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Gener... |
shan-hu/SamsungTizenRT_Sept_2017 | os/drivers/wireless/scsc/misc/scsc_mx_impl.h | /****************************************************************************
*
* Copyright (c) 2014 - 2016 Samsung Electronics Co., Ltd. All rights reserved
*
****************************************************************************/
#ifndef _CORE_H_
#define _CORE_H_
#include "scsc_mif_abs.h"
struct device;
... |
yifazhang/shop | shop-rest/src/main/java/com/zhangyifa/rest/controller/ContentController.java | <filename>shop-rest/src/main/java/com/zhangyifa/rest/controller/ContentController.java
package com.zhangyifa.rest.controller;
import com.zhangyifa.common.pojo.ShopResult;
import com.zhangyifa.common.utils.ExceptionUtil;
import com.zhangyifa.pojo.TbContent;
import com.zhangyifa.rest.service.ContentService;
import org.s... |
petejan/LogIt | src/org/imos/abos/SerialJSSCEventGenerator.java | <gh_stars>0
package org.imos.abos;
import jssc.SerialPort;
import jssc.SerialPortException;
import jssc.SerialPortList;
import jssc.SerialPortEvent;
import jssc.SerialPortEventListener;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io... |
sancar/hazelcast | hazelcast/src/test/java/com/hazelcast/query/impl/TypeConverterTest.java | /*
* Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... |
folio-org/mod-inventory | src/main/java/org/folio/inventory/resources/Instances.java | package org.folio.inventory.resources;
import static io.netty.util.internal.StringUtil.COMMA;
import static java.lang.String.format;
import static java.util.concurrent.CompletableFuture.completedFuture;
import static org.folio.inventory.support.CompletableFutures.failedFuture;
import static org.folio.inventory.support... |
MaxOnNet/scopuli-core-web | Scopuli/WEB/Modules/Catalog/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright [2018] <NAME> [<EMAIL>]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... |
wmg2328/java-smart-parts | src/com/wmg/smartjava/patterns/builder/Employee.java | <reponame>wmg2328/java-smart-parts
package com.wmg.smartjava.patterns.builder;
/**
* Separate the construction of a complex object from its representation. Then the same construction process
* can be reused to generate different objects
*/
public class Employee {
private long id;
private String name;
p... |
huberyHU2018/LightAdapter | component_basic/src/main/java/com/zfy/component/basic/app/AppActivity.java | package com.zfy.component.basic.app;
import android.arch.lifecycle.Lifecycle;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import com.zfy.... |
podsvirov/colm-suite | test/aapl.d/stress_svectsimp.cpp | <filename>test/aapl.d/stress_svectsimp.cpp
/*
* Copyright 2002, 2003 <NAME> <<EMAIL>>
*
* 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 ... |
kuailemy123/gitlab-cn.github.io | lib/banzai/reference_parser/issue_parser.rb | module Banzai
module ReferenceParser
class IssueParser < BaseParser
self.reference_type = :issue
def nodes_visible_to_user(user, nodes)
# It is not possible to check access rights for external issue trackers
return nodes if project && project.external_issue_tracker
issues = i... |
fgalar/Corewar | vm/src/loading/players.c | <reponame>fgalar/Corewar<filename>vm/src/loading/players.c
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* players.c ... |
WoodoLee/TorchCraft | 3rdparty/range-v3/doc/gh-pages/structranges_1_1v3_1_1adl__begin__end__detail_1_1crend__fn.js | var structranges_1_1v3_1_1adl__begin__end__detail_1_1crend__fn =
[
[ "operator()", "structranges_1_1v3_1_1adl__begin__end__detail_1_1crend__fn.html#a30ada025265481f41f074c68c5e58c90", null ]
]; |
gapry/libng | libng/core/src/libng_core/math/Vector/Vec3_SSE.hpp | <reponame>gapry/libng
#pragma once
#include <libng_core/math/Vector/Vec3_Basic.hpp>
#include <libng_core/platform/sse.hpp>
namespace libng {
template<class T, class M>
struct Vec3_SSE_Data {};
} // namespace libng |
17hao/algorithm | src/leetcode/first/Code_113_PathSUm2.java | package leetcode.first;
import leetcode.tool.TreeNode;
import java.util.ArrayList;
import java.util.List;
/**
* 路径总和2
*
* @since 2020-5-24 Sunday 19:59 - 21:00
*/
public class Code_113_PathSUm2 {
static List<List<Integer>> pathSum(TreeNode root, int sum) {
List<List<Integer>> res = new ArrayList<>();... |
VinMannie/BombSquad-Community-Mod-Manager | mods/fightOfFaith.py | <gh_stars>1-10
import bs
import random
def bsGetAPIVersion():
# return the api-version this script expects.
# this prevents it from attempting to run in newer versions of the game
# where changes have been made to the modding APIs
return 4
def bsGetGames():
return [FightOfFaithGame]
def bsGetLeve... |
pratheekk12/hr-resume-template | dist/api/modules/Utility/Services/rentCalc.js | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function calculatePrice(rent, quant, finalPrice) {
if (quant >= 30) {
finalPrice += +rent.monthlyPrice * Math.floor(quant / 30);
quant = quant % 30;
}
else if (quant >= 7) {
finalPrice += +rent.weeklyPrice *... |
KhrapkoVasyl/open-data-manage-system | src/js/db/models/MetaDataKey.js | <filename>src/js/db/models/MetaDataKey.js<gh_stars>1-10
'use strict';
const DataTypes = require('sequelize');
const db = require('../db');
const MetaDataKey = db.define(
'metaDataKey',
{
id: {
type: DataTypes.INTEGER,
autoIncrement: true,
primaryKey: true,
allowNull: false,
},
... |
zhou7rui/litespring | src/test/java/org/litespring/test/v2/CustomNumberEditorTest.java | package org.litespring.test.v2;
import org.junit.Assert;
import org.junit.Test;
import org.litespring.beans.propertyeditors.CustomNumberEditor;
public class CustomNumberEditorTest {
@Test
public void testConvertString(){
CustomNumberEditor editor = new CustomNumberEditor(Integer.class, true);
... |
Apex-Brasil/eoscr-components | src/lib/ArrayTextField/index.js | <filename>src/lib/ArrayTextField/index.js
import React, { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import clsx from 'clsx'
import { makeStyles } from '@material-ui/core/styles'
import Box from '@material-ui/core/Box'
import InputAdornment from '@material-ui/core/InputAdornment'
import TextF... |
best08618/asylo | gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/s390/bswap-1.c | <gh_stars>1-10
/* { dg-do compile } */
/* { dg-options "-O3 -march=z900 -mzarch" } */
#include <stdint.h>
uint64_t u64;
uint32_t u32;
uint16_t u16;
uint64_t
foo64a (uint64_t a)
{
return __builtin_bswap64 (a);
}
/* { dg-final { scan-assembler-times "lrvgr\t%r2,%r2" 1 { target lp64 } } } */
uint64_t
foo64b ()
{
r... |
dgolovin/org.jboss.tools.ssp | runtimes/tests/org.jboss.tools.rsp.server.wildfly.test/src/main/java/org/jboss/tools/rsp/server/wildfly/test/beans/ServerBeanTypeProviderTest.java | /*******************************************************************************
* Copyright (c) 2019 Red Hat, Inc. Distributed under license by Red Hat, Inc.
* All rights reserved. This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is
* avai... |
uk-gov-mirror/hmcts.wa-task-management-api | src/main/java/uk/gov/hmcts/reform/wataskmanagementapi/domain/entities/camunda/TaskState.java | <gh_stars>0
package uk.gov.hmcts.reform.wataskmanagementapi.domain.entities.camunda;
import com.fasterxml.jackson.annotation.JsonValue;
public enum TaskState {
UNCONFIGURED("unconfigured"),
UNASSIGNED("unassigned"),
CONFIGURED("configured"),
ASSIGNED("assigned"),
REFERRED("referred"),
COMPLETE... |
opentext/storyteller | docplatform/distribution/py/pfdesigns/javascript/b.js | 'use strict';
var share = require('share');
share.test += __filename + ': starting\n';
exports.done = false;
var a = require('./a');
share.test += __filename + ': a.done = ' + a.done + '\n';
exports.done = true;
share.test += __filename + ': done\n';
|
homehabit/dsl-json | processor/src/test/java/com/dslplatform/json/models/EnumWithCustomConstantName4.java | <filename>processor/src/test/java/com/dslplatform/json/models/EnumWithCustomConstantName4.java
package com.dslplatform.json.models;
import com.dslplatform.json.CompiledJson;
import com.dslplatform.json.JsonValue;
@CompiledJson
public enum EnumWithCustomConstantName4 {
FIRST(10),
SECOND(20);
private fina... |
uk-gov-mirror/guidance-guarantee-programme.pension_guidance | app/models/telephone_appointment.rb | <reponame>uk-gov-mirror/guidance-guarantee-programme.pension_guidance
class TelephoneAppointment # rubocop:disable ClassLength
include ActiveModel::Model
attr_accessor(
:id,
:step,
:selected_date,
:start_at,
:first_name,
:last_name,
:email,
:phone,
:memorable_word,
:appointm... |
jaylinhong/jdk14-learn | src/jdk14-source/java.desktop/sun/java2d/WindowsSurfaceManagerFactory.java | /*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.java2d;
import java.awt.GraphicsConfiguration;
import sun.awt.image.BufImgVolatileSurfaceM... |
soldierloko/Curso-em-Video | Ex_74.py | #Crie um programa que vai gerar cinco números aleatórios e colocar em um tupla
#Depois, mostra a listagem de números gerados e tambem indique o menor e o maior valor que estão na tupla
from random import randint
n = (randint(1,10),randint(1,10),randint(1,10),randint(1,10),randint(1,10))
print(f'Sorteei os valores ... |
nathejk/status-app | src/actions/MsgActions.js | <reponame>nathejk/status-app<gh_stars>0
import {MSG__USER_CONNECTED, MSG__NEW_MESSAGE_RECEIVED_BULK, MSG__CONNECTED, MSG__DISCONNECTED, MSG__NAVIGATE_TO_CHANNEL, MSG__SEND_MESSAGE, MSG__NEW_MESSAGE_RECEIVED} from '../constants/actionTypes'
export const connected = () => ({
type: MSG__CONNECTED
})
export const disco... |
gylidian4iz7r/exasolq | src/main/java/com/exasol/adapter/document/files/SourceString.java | package com.exasol.adapter.document.files;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.exasol.errorreporting.ExaError;
/**
* This class parses the source string syntax.
*/
class SourceString {
private static final Pattern IMPORT_AS_PATTERN = Pattern.compile("\\(import-as:([^\\)]+... |
streamlesswaveson/multithreadinginjava | src/main/java/com/cutajarjames/multithreading/conditionVariable/StingySpendyCondVar.java | <gh_stars>1-10
package com.cutajarjames.multithreading.conditionVariable;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class StingySpendyCondVar {
int money = 100;
Lock mutex =... |
priit/registry | app/controllers/api/v1/registrant/contacts_controller.rb | <filename>app/controllers/api/v1/registrant/contacts_controller.rb
require 'serializers/registrant_api/contact'
module Api
module V1
module Registrant
class ContactsController < ::Api::V1::Registrant::BaseController
def index
limit = params[:limit] || 200
offset = params[:offset... |
wesley1975/redshark | src/main/java/com/redshark/entity/Session.java | <gh_stars>10-100
package com.redshark.entity;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import com.redshark.core.Constants;
import com.redshark.event.ExecutorEventDispatcher;
import com.redshark.util.DateTimeUtil;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
impo... |
DannyParker0001/Kisak-Strike | game/client/cstrike15/Scaleform/HUD/sfhudwinpanel.cpp | //========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#if defined( INCLUDE_SCALEFORM )
#include "sfhudwinpanel.h"
#include "hud_macros.h"
#includ... |
xingxingso/leetcode | contains-duplicate/main.go | /*
Package contains_duplicate
https://leetcode-cn.com/problems/contains-duplicate/
217. 存在重复元素
给你一个整数数组 nums 。如果任一值在数组中出现 至少两次 ,返回 true ;如果数组中每个元素互不相同,返回 false 。
提示:
1 <= nums.length <= 10^5
-10^9 <= nums[i] <= 10^9
*/
package contains_duplicate
// --- 自己
/*
方法一: 哈希表
时间复杂度:
空间复杂度:
*/
func containsDuplicate(num... |
mge-engine/mge | src/mge/asset/asset_type.hpp | // mge - Modern Game Engine
// Copyright (c) 2021 by <NAME>
// All rights reserved.
#pragma once
#include "boost/boost_operators.hpp"
#include "mge/asset/dllexport.hpp"
#include <iosfwd>
#include <string>
#include <string_view>
namespace mge {
/**
* @brief Asset type.
*
* An asset type helps in ide... |
dios-game/dios-cocos | src/oslibs/cocos/cocos-src/tests/js-tests/src/CocoStudioTest/GUITest/UIRichTextTest/UIRichTextTest.js | /****************************************************************************
Copyright (c) 2008-2010 <NAME>
Copyright (c) 2011-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this softw... |
edotau/goFish | simpleio/roman.go | package simpleio
import (
"log"
)
// ToNumber to covert roman numeral to decimal
func ToNumber(n string) int {
out := 0
ln := len(n)
var c, cnext string
var vc, vcnext int
for i := 0; i < ln; i++ {
c = string(n[i])
vc = num[c]
if i < ln-1 {
cnext = string(n[i+1])
vcnext = LookUpRoman(cnext)
if vc... |
lanSeFangZhou/pythonbase | python100days/Day16-20/example12.py | """
面向对象的三大支柱:封装、继承、多态
面向对象的设计原则:SOLID原则
面向对象的设计模式:GoF设计模式(单例、工厂、代理、策略、迭代器)
月薪结算系统 - 部门经理每月15000 程序员每小时200
销售员1800底薪加销售额5%提成
"""
from abc import ABCMeta, abstractmethod
class Employee(metaclass=ABCMeta):
'''员工(抽象类)'''
def __init__(self, name):
self.name = name
@abstractmethod
def get_salary... |
WcaleNieWolny/FunnyGuilds | plugin/src/main/java/net/dzikoysk/funnyguilds/nms/BlockDataChanger.java | package net.dzikoysk.funnyguilds.nms;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import net.dzikoysk.funnyguilds.FunnyGuilds;
import net.dzikoysk.funnyguilds.shared.bukkit.LocationUtils;
import org.bukkit.block.Block;
public class BlockDataChanger {
private static Class<... |
uuuugi/- | src/2439.c | #include <stdio.h>
int main(void)
{
int line;
scanf("%d", &line);
for (int i = 0; i < line; i++)
{
for (int j = line-1; j > i; j--)
printf(" ");
for (int k = 0; k <=i; k++)
printf("*");
if(i!=line-1)
printf("\n");
}
return 0;
}
|
javrasya/zemberek-nlp | morphology/src/main/java/zemberek/morphology/lexicon/RootSuffix.java | <reponame>javrasya/zemberek-nlp
package zemberek.morphology.lexicon;
import zemberek.core.turkish.PrimaryPos;
public class RootSuffix extends Suffix {
public PrimaryPos pos;
public RootSuffix(String id) {
super(id);
}
public RootSuffix(String id, PrimaryPos pos) {
super(id);
... |
sagarteria/AlexaSkill---Mu-Sigma | node_modules/jovo-framework/lib/integrations/analytics/voiceLabsAnalytics.js | 'use strict';
const _ = require('lodash');
const BaseApp = require('./../../app');
/**
* @deprecated Implementation of Voicelabs' analytics module for alexa
*/
class VoiceLabsAlexa {
/**
* Constructor
* @param {*} config
*/
constructor(config) {
try {
this.voiceLabsAlexa =... |
Samuel-Harden/SimWorldsBoids | Libs/jsoncons/include/jsoncons/json_traits.hpp | // Copyright 2013 <NAME>
// Distributed under the Boost license, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See https://github.com/danielaparker/jsoncons for latest version
#ifndef JSONCONS_JSON_TRAITS_HPP
#define JSONCONS_JSON_TRAITS_HPP
#if defined(__... |
lit-uriy/mtl4-mirror | libs/numeric/mtl/test/sparse_banded_matrix_test.cpp | // Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: <NAME> and <NAME>
//
// ... |
alljoyn/compliance-tests | java/components/validation-ctt/HEAD/ctt_web_server/src/test/java/com/at4wireless/security/TestCASTicketValidator.java | package com.at4wireless.security;
import static org.junit.Assert.assertTrue;
import java.util.Map;
import org.jasig.cas.client.validation.TicketValidationException;
import org.junit.Assert;
import org.junit.Test;
public class TestCASTicketValidator {
private static final String lfCASResponse = "<cas:ser... |
liuyangspace/java-test | src/javase/data/array/ArrayBase.java | <filename>src/javase/data/array/ArrayBase.java<gh_stars>0
package javase.data.array;
/**
* Java array 数组
*
*
*
*/
class ArrayBase {
/**
* 数组是有序数据的集合,数组中的每个元素具有相同的数据类型,数组名和下标可惟一地确定数组中的元素。
* 一维数组:
* 定义方式为:type arrayName=new type[arraySize];
* 数组元素的引用: arrayName[index]
* 多维数组:
* ... |
snaphy/generator-snaphy | generators/app/templates/common/plugins/JqueryValidate/client/scripts/validateServices.js | <reponame>snaphy/generator-snaphy
/**
* Created by robins on 3/12/15.
*/
(function(){'use strict';})();
/*jslint browser: true*/
/*global $, jQuery, angular, $snaphy , redirectOtherWise*/
angular.module($snaphy.getModuleName())
|
strejcik/-MERN-e-commerce | models/cart.model.js | const config = require('../config/locale');
const intlCurrency = require('intl-currency');
class Cart {
constructor() {
this.data = {};
this.data.items = [];
this.data.totals = 0;
this.data.currency = '';
this.data.locale = '';
this.data.formattedTotals = '';
}
getAllItems(reques... |
EsupPortail/esup-ecandidat | src/main/java/fr/univlorraine/ecandidat/controllers/IndividuController.java | /**
* ESUP-Portail eCandidat - Copyright (c) 2016 ESUP-Portail consortium
*
*
* 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-... |
muddessir/framework | machine/qemu/sources/u-boot/cmd/mdio.c | // SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2011 Freescale Semiconductor, Inc
* <NAME>
*/
/*
* MDIO Commands
*/
#include <common.h>
#include <command.h>
#include <dm.h>
#include <miiphy.h>
#include <phy.h>
static char last_op[2];
static uint last_data;
static uint last_addr_lo;
static uint last_addr... |
windystrife/UnrealEngine_NVIDIAGameWork | Engine/Plugins/Runtime/AppleARKit/Source/AppleARKit/Private/AppleARKitModule.h | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ModuleManager.h"
#include "IHeadMountedDisplayModule.h"
#include "Features/IModularFeature.h"
#include "AppleARKitSystem.h"
#include "AppleARKitModule.h"
#include "ARHitTestingSupport.h"
class APPLEARKIT_API FAppleARKitModule : publi... |
danieldkm/sis-unifil | Daniel/Laboratorio/terceiroBim/dia2907/ConsultaDiamante.java | package dia2907;
public class ConsultaDiamante extends Consulta {
public ConsultaDiamante() {
super();
}
@Override
public double getValorConsulta() {
double desconto = super.getValorConsulta() * 0.4;
return super.getValorConsulta() - desconto;
}
}
|
brunolauze/MonoNative | MonoNative/mscorlib/System/Threading/mscorlib_System_Threading_NativeOverlapped.h | #ifndef __MONO_NATIVE_MSCORLIB_SYSTEM_THREADING_NATIVEOVERLAPPED_H
#define __MONO_NATIVE_MSCORLIB_SYSTEM_THREADING_NATIVEOVERLAPPED_H
#include <mscorlib/System/mscorlib_System_ValueType.h>
#include <mscorlib/System/mscorlib_System_Object.h>
namespace mscorlib
{
namespace System
{
class String;
class Type;
... |
dominicSchiller/ScrabbleFactory | Client/core/src/de/thb/paf/scrabblefactory/models/components/physics/PhysicsType.java | <gh_stars>0
package de.thb.paf.scrabblefactory.models.components.physics;
/**
* Enumeration of all applicable physic types.
*
* @author <NAME> - Technische Hochschule Brandenburg
* @version 1.0
* @since 1.0
*/
public enum PhysicsType {
WORLD,
RIGID_BODY
}
|
powernic/bounced | src/reducers/index.js | <gh_stars>0
import {combineReducers} from 'redux'
import {playerReducer} from './player'
import {playgroundReducer} from './playground'
import {boxesReducer} from "./boxes";
export const rootReducer = combineReducers({
player: playerReducer,
playground: playgroundReducer,
boxes: boxesReducer,
}); |
oicr-gsi/vidarr | vidarr-pluginapi/src/main/java/ca/on/oicr/gsi/vidarr/api/WorkflowDeclaration.java | <filename>vidarr-pluginapi/src/main/java/ca/on/oicr/gsi/vidarr/api/WorkflowDeclaration.java
package ca.on.oicr.gsi.vidarr.api;
import ca.on.oicr.gsi.vidarr.BasicType;
import ca.on.oicr.gsi.vidarr.InputType;
import ca.on.oicr.gsi.vidarr.OutputType;
import ca.on.oicr.gsi.vidarr.WorkflowLanguage;
import java.util.Map;
p... |
vadim8kiselev/social-matchmaker | src/main/java/com/kiselev/matchmaker/view/serialize/implementation/csv/CSVSerializeView.java | package com.kiselev.matchmaker.view.serialize.implementation.csv;
import com.google.common.collect.Lists;
import com.kiselev.matchmaker.api.model.Entity;
import com.kiselev.matchmaker.view.serialize.SerializeView;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.csv.CSVFormat;
import o... |
HadleyLab/covidimaging.admin | app/components/MoreInfo/index.js | import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import trans from 'trans'
import Button from '@material-ui/core/Button';
import Close from '../Img/ico-Close.svg'
import colors from '../../style/colors'
import Loading from '../Loading';
import Table from... |
huandrew99/LeetCode | CS-Notes/algorithm/dynamic-programming/House Robber (Medium).py | <reponame>huandrew99/LeetCode
"""
LC 198
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police ... |
wufan8387/smart-orm | src/main/java/org/smart/orm/operations/type/JoinNode.java | <reponame>wufan8387/smart-orm
package org.smart.orm.operations.type;
import org.smart.orm.Model;
import org.smart.orm.data.LogicalType;
import org.smart.orm.data.NodeType;
import org.smart.orm.functions.Func;
import org.smart.orm.functions.PropertyGetter;
import org.smart.orm.operations.AbstractSqlNode;
import org.sma... |
SnaxFoundation/snax-browser-extension | src/components/Alerts/Alert.js | <reponame>SnaxFoundation/snax-browser-extension<gh_stars>1-10
import styled from 'styled-components';
import PropTypes from 'prop-types';
import constants from '../../styles/style-constants';
const propTypes = {
colorScheme: PropTypes.oneOf(['success', 'error', 'default']),
};
const defaultProps = {
colorScheme: ... |
Flickswitch/vpp | vendor/github.com/ligato/cn-infra/utils/once/return_error.go | // Copyright (c) 2018 Cisco 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 applicabl... |
thelvis4/buck | src-gen/com/facebook/buck/remoteexecution/proto/RESessionIDOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/com/facebook/buck/remoteexecution/proto/metadata.proto
package com.facebook.buck.remoteexecution.proto;
@javax.annotation.Generated(value="protoc", comments="annotations:RESessionIDOrBuilder.java.pb.meta")
public interface RESessionIDOrBuilder... |
threefoldtech/threefold-forums | app/assets/javascripts/discourse/models/nav-item.js.es6 | import discourseComputed from "discourse-common/utils/decorators";
import { emojiUnescape } from "discourse/lib/text";
import Category from "discourse/models/category";
import EmberObject from "@ember/object";
import { reads } from "@ember/object/computed";
import deprecated from "discourse-common/lib/deprecated";
impo... |
shivi98g/EpilNet-EpilepsyPredictor | Mobile App/Code/sources/android/support/design/internal/BottomNavigationMenuView.java | package android.support.design.internal;
import android.animation.TimeInterpolator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.support.annotation.Dimension;
import android.support.annotation.... |
markazmierczak/Polonite | Stp/Base/Compiler/Config.h | <reponame>markazmierczak/Polonite
// Copyright 2017 Polonite Authors. All rights reserved.
// Distributed under MIT license that can be found in the LICENSE file.
#ifndef STP_BASE_COMPILER_CONFIG_H_
#define STP_BASE_COMPILER_CONFIG_H_
#define COMPILER(x) ((_STP_COMPILER & _STP_COMPILER_##x) == _STP_COMPILER_##x)
#de... |
cice/wsdl-mapper | lib/wsdl_mapper_testing/fake_operation.rb | <gh_stars>1-10
require 'wsdl_mapper_testing/fake_s8r'
require 'wsdl_mapper_testing/fake_d10r'
module WsdlMapperTesting
class FakeOperation
attr_accessor :input_s8r, :output_d10r, :input_d10r, :output_d8r
def initialize
@inputs = {}
@outputs = {}
@input_s8r = FakeS8r.new
@output_s8r =... |
Jons2k/jfast | src/main/java/org/pp/modules/sys/service/UserLoginService.java | <reponame>Jons2k/jfast
package org.pp.modules.sys.service;
import java.util.Date;
import org.pp.core.BaseService;
import org.pp.modules.sys.model.User;
import org.pp.modules.sys.model.UserLogin;
import com.jfinal.plugin.activerecord.Db;
public class UserLoginService implements BaseService<UserLogin>{
public stati... |
yonghong915/fib | codes/fib-boot/fib-application/fib-upp/src/main/java/com/fib/upp/service/impl/BepsPackServiceImpl.java | package com.fib.upp.service.impl;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction... |
davepkxxx/dai-lang | dai-compiler/src/main/java/dai/compiler/parsing/StructVisitor.java | <filename>dai-compiler/src/main/java/dai/compiler/parsing/StructVisitor.java
package dai.compiler.parsing;
import dai.compiler.antlr.DaiParser.*;
import dai.compiler.ast.AnnotatedNode;
import dai.compiler.ast.ClassTypeNode;
import dai.compiler.ast.StructDeclaration;
import dai.compiler.ast.VariableDeclaration;
import... |
mohamedelkashif/coffee-app | app/transformers/pod.transformer.js | /**
* HATEOAS LINKS
*
* @param {Object} req
* @param {Object} pod
*
* @return {Array}
*/
function getHyperLinks(req, pod) {
const baseUrl = req.protocol + '://' + req.headers.host;
const links = [
{
'rel': `self`,
'href': `${baseUrl}/api/pods/${pod._id}`
},
{
... |
ochafik/rollup | src/ast/nodes/VariableDeclaration.js | import Node from '../Node.js';
import extractNames from '../utils/extractNames.js';
function getSeparator ( code, start ) {
let c = start;
while ( c > 0 && code[ c - 1 ] !== '\n' ) {
c -= 1;
if ( code[c] === ';' || code[c] === '{' ) return '; ';
}
const lineStart = code.slice( c, start ).match( /^\s*/ )[0];
... |
Ron423c/chromium | ui/views/controls/image_view_unittest.cc | // 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 "ui/views/controls/image_view.h"
#include <memory>
#include <string>
#include <utility>
#include "base/i18n/rtl.h"
#include "testing/gtest/incl... |
kuanshi/ductile-fracture | OpenSees/SRC/element/catenaryCable/CatenaryCable.h | <gh_stars>0
/* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... |
JamesCao2048/BlizzardData | Corpus/birt/6929.java |
/*******************************************************************************
* Copyright (c) 2004, 2005 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is a... |
AllSafeCyberSecur1ty/Nuclear-Engineering | pyne/tests/test_origen22.py | <gh_stars>1-10
from __future__ import print_function
import warnings
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import numpy as np
from nose.tools import (
assert_equal,
assert_true,
assert_raises,
assert_in,
assert_is_instance,
)
from numpy.testing impo... |
buseorak/school-assignments | BBM104/assignment2/src/StuntPerformer.java | import java.util.ArrayList;
public class StuntPerformer extends Performer {
// Fields
private final double HEIGHT;
private final ArrayList<Integer> REAL_ACTOR_IDS;
public static ArrayList<StuntPerformer> stuntPerformersArray = new ArrayList<>();
// Constructor
public StuntPerf... |
XSoyOscar/Algorithms | leetcode.com/python/111_Minimum_Depth_of_Binary_Tree.py | <gh_stars>100-1000
import collections
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
# Solution 1: Recursive DFS
# def minDepth(self, root):
# """
... |
vishnudevk/MiBandDecompiled | Original Files/source/src/com/tencent/connect/avatar/a.java | <filename>Original Files/source/src/com/tencent/connect/avatar/a.java
// Decompiled by Jad v1.5.8e. Copyright 2001 <NAME>.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.tencent.connect.avatar;
// Referenced classes of package com.tencent.co... |
antonio-te/teleport | lib/srv/app/listener.go | /*
Copyright 2020 Gravitational, 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 or agreed to in writing, soft... |
vnys/radix-web-console | src/state/deployments/index.js | <gh_stars>1-10
import get from 'lodash/get';
export const getDeployments = (state) => get(state, 'deployments', []);
|
networkmodeling/V2X-Hub | src/tmx/Asn_J2735/src/r63/IntersectionState-addGrpC.c | /*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "AddGrpC"
* found in "../J2735_201603DA.ASN"
* `asn1c -gen-PER -fcompound-names -fincludes-quoted -S/home/gmb/TMX-OAM/Build/asn1c/skeletons`
*/
#include "IntersectionState-addGrpC.h"
static asn_TYPE_member_t asn_MBR_IntersectionState... |
IvarJonsson/Project-Unknown | ScriptControlledPhysics.cpp | <reponame>IvarJonsson/Project-Unknown
// Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
/*************************************************************************
-------------------------------------------------------------------------
$Id$
$DateTime$
-------------------------------------------... |
inket/smartPins | classdump_SafariShared/WBSFeedEntry.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <objc/NSObject.h>
#import <SafariShared/NSSecureCoding-Protocol.h>
@class NSDate, NSString;
@interface WBSFeedEntry : NSObject <NSSecureCoding>
{
NSString *_identifier;
... |
acabra85/bec-techacademy | 007-learn-apache-kafka/producer/src/main/java/dk/bec/gradprogram/kafka/ProducerProperties.java | <reponame>acabra85/bec-techacademy
package dk.bec.gradprogram.kafka;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.serialization.StringSerializer;
import java.util.Properties;
public class ProducerProperties {
public static final String BOOTSTRAP_SERVERS = "127.0.0.1:909... |
zann1x/FrameGraph | tests/offline_compiler/Test_Serializer2.cpp | // Copyright (c) 2018-2019, <NAME>. For more information see 'LICENSE'
#include "Utils.h"
#include "pipeline_compiler/PipelineCppSerializer.h"
extern void Test_Serializer2 (VPipelineCompiler* compiler)
{
ComputePipelineDesc ppln;
ppln.AddShader( EShaderLangFormat::GLSL_450, "main", R"#(
#pragma shader_stage(comp... |
maciejg-git/vue-bootstrap-icons | dist-mdi/mdi/video-switch.js | import { h } from 'vue'
export default {
name: "VideoSwitch",
vendor: "Mdi",
type: "",
tags: ["video","switch"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","class":"v-icon","fill":"currentColor","data-name":"mdi-video-swit... |
MarcoBuster/university | Programmazione_1/2020-11-02/conta-a-continuo.go | package main
import (
"bufio"
"fmt"
"os"
)
func main() {
var s string
b := bufio.NewScanner(os.Stdin)
for b.Scan() {
// Leggo una riga
s = b.Text()
// Conto usando il contatore c i caratteri a nella riga
c := 0
for _, r := range s {
if r == 'a' {
c++
}
}
fmt.Println(c)
}
}
|
xqbase/net | proxy/src/main/java/com/xqbase/tuna/proxy/PeerConnection.java | package com.xqbase.tuna.proxy;
import com.xqbase.tuna.Connection;
import com.xqbase.tuna.ConnectionHandler;
import com.xqbase.tuna.ConnectionSession;
import com.xqbase.util.Log;
abstract class PeerConnection implements Connection {
static final int LOG_DEBUG = ProxyConnection.LOG_DEBUG;
static final int LO... |
nickolasrm/TimelineBubbles | src/components/organisms/bubbles/atoms/horizontal_line/index.js | <reponame>nickolasrm/TimelineBubbles
import { HorizontalLineStyle } from './style.module.css'
/**
* Adds a horizontal line into the middle of a bubble container
* @returns
*/
export default function HorizontalLine()
{
return <div className={HorizontalLineStyle}></div>
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.