text stringlengths 4 6.14k |
|---|
/*
* Copyright (c) 2010-2014 OTClient <https://github.com/edubart/otclient>
*
* 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... |
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
// Adapted from DescriptorHeap.h in Microsoft's Miniengi... |
//----------------------------------------------------------------------------
// error.h
//
// error reporting for pathed
//
// Copyright (C) 2011 Neil Butterworth
//----------------------------------------------------------------------------
#ifndef INC_PATHED_ERROR_H
#define INC_PATHED_ERROR_H
#include ... |
//
// GRJson.h
// Pods
//
// Created by Grant Robinson on 4/17/17.
//
//
#import <Foundation/Foundation.h>
@protocol GRJsonDelegate <NSObject>
@required
- (void) json_null;
- (void) json_bool:(BOOL)boolVal;
- (void) json_number:(const unsigned char *)numberVal length:(unsigned long)len;
- (void) json_string:(NSS... |
/****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2011 Zynga Inc.
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... |
#pragma once
#include <vector>
#include <iostream>
//#include <limits>
//#include <complex>
#include <Eigen/Dense>
#include <Eigen/StdVector>
namespace bezier {
/** Specifies the coordinate dimension */
enum Dimension {
/** 2d coordinates \f$(x, y)\f$ */
k2d = 2,
/** 3d coordinates \f$(x, y, z)\f$ */
k3d
};
usi... |
/*BHEADER**********************************************************************
* (c) 1997 The Regents of the University of California
*
* See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
* notice, contact person, and disclaimer.
*
* $Revision: 21217 $
********************************************... |
/*
* This file is part of the µOS++ distribution.
* (https://github.com/micro-os-plus)
* Copyright (c) 2015 Liviu Ionescu.
*
* 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
... |
#ifndef _framesetting_h_
#define _framesetting_h_
#include <string>
#include <vector>
using namespace std;
#include "absxmlsetting.h"
class FrameSetting : public BasXmlSetting
{
public:
FrameSetting();
~FrameSetting();
bool loadFrame(int &start,int &end,std::string &prefix,std::string &postfix,float ... |
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkGpuBlurUtils_DEFINED
# define SkGpuBlurUtils_DEFINED
# if SK_SUPPORT_GPU
# include "src/gpu/GrRenderTargetContext.h"
# include "src/gpu/effects/GrTextureDoma... |
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
FOUNDATION_EXPORT double Pods_DTImageScrollViewDemoVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_DTImageScrollViewDemoVersionString[];
|
//
// MainExamplesViewController.h
// MercadoPagoSDKExamplesObjectiveC
//
// Created by Maria cristina rodriguez on 1/7/16.
// Copyright © 2016 MercadoPago. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MainExamplesViewController : UITableViewController <PXLazyInitProtocol, PXLifeCycleProtocol, PXTra... |
int reqAuthenticate(const dict &req, int reqid);
int reqUserLogin(const dict &req, int reqid);
int reqUserLogout(const dict &req, int reqid);
int reqUserPasswordUpdate(const dict &req, int reqid);
int reqTradingAccountPasswordUpdate(const dict &req, int reqid);
int reqUserLogin2(const dict &req, int reqid);
int r... |
/* Copyright (c) 2020-2022 hors<horsicq@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, mod... |
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
// compile by gcc -o syc_m syc_m.c -pthread
// ./syc_m
int MAX = 10;
int count = 1;
pthread_mutex_t mutex;
void print_star(int i)
{
int j;
pthread_mutex_lock(&mutex);
for (j = 1; j <= i; j++)
{
printf("*");
}
// printf(" %d"... |
//=================================================================================================
/*!
// \file blaze/math/expressions/MultExpr.h
// \brief Header file for the MultExpr base class
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
//
// This file is part of the Blaze library. You c... |
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#pragma once
#include <vector>
#include <map>
#include <sstream>
#include <string>
#include "ifcpp/model/GlobalDefines.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingObject.h"
#include "IfcFeatureElementAddition.h"
clas... |
#ifndef GPU_DEF
#define GPU_DEF
#define SHORT_NAN 32767
#define SHORT_MAX 32766
#define GL_INTEROP // Caution!! Need to clear ComputeCache if uncommented
struct TsdfParams
{
float resolution[3];
float volume[3];
float mu;
};
#ifdef _GPU_
#define NUM_BANKS 16
#define LOG_NUM_BANKS 4
#define CONFLICT_... |
#pragma once
#include "unittest.h"
#include <iostream>
#include <vector>
class PairSum : public UnitTest
{
public:
typedef std::vector<int> IntVec;
/*!
* \brief hasPairSum Checks to see if there are any two integers that sum to the given value.
* Assumes input vector is sorted.
* \param vec T... |
/**
* Example implementation of the dialog choice UI pattern.
*/
#include "dialog_choice_window.h"
#include "xadow.h"
static Window *s_diag_window;
static TextLayer *s_label_layer;
static BitmapLayer *s_icon_layer;
static ActionBarLayer *s_action_bar_layer;
static uint8_t resp_buffer[3];
static SmartstrapAttribute ... |
/*===
buffer: ptr-is-NULL=0, sz=1024
buffer
buffer: ptr-is-NULL=-1, sz=0
buffer
buffer: ptr-is-NULL=0, sz=1024
buffer
buffer: ptr-is-NULL=-1, sz=0
buffer
rc=0, result=undefined
rc=1, result=TypeError: not buffer
rc=1, result=TypeError: not buffer
rc=1, result=TypeError: not buffer
===*/
int test_1(duk_context *ctx) {
... |
#include "common.h"
#define BUFFSIZE 4096
int main(void) {
int n;
char buf[BUFFSIZE];
while ((n = read(STDIN_FILENO, buf, BUFFSIZE)) > 0) {
if (write(STDOUT_FILENO, buf, n) != n) {
err_sys("write error");
}
}
if (n < 0) {
err_sys("read error");
}
exit(0);
}
|
#include "../Internal.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <Lumino/Base/ElapsedTimer.h>
#include <Lumino/IO/Process.h>
#if defined(LN_OS_MAC)
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
LN_NAMESPACE_BEGIN
namespace detail {
//================... |
//
// FMKImageMarkerLayer.h
// FMMapKit
//
// Created by FengMap on 15/6/2.
// Copyright (c) 2015年 FengMap. All rights reserved.
//
#import "FMKLayer.h"
@class FMKImageMarker;
/**
自定义图层
地图图片标注层节点,用于添加地图的图片标注
同一楼层可添加多个图片层 使用"addLayer:"
获取方式 FMKMap getImageLayerByGroupID:
*/
@interface FMKImageLayer : FMKLaye... |
//
// FORGestureTrack.h
// FORGestureTrackDisplayDemo
//
// Created by Daniel on 31/05/2017.
// Copyright © 2017 Daniel. All rights reserved.
//
#import "FORTrackGesture.h"
@interface UIWindow (tracking)
- (void)startTracking;
- (void)endTracking;
@end
|
/*
Copyright (c) 2016-2019 Xavier Leclercq and the wxCharts contributors
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 r... |
//
// GPKGPropertiesExtensionTest.h
// geopackage-iosTests
//
// Created by Brian Osborn on 7/24/18.
// Copyright © 2018 NGA. All rights reserved.
//
#import "GPKGCreateGeoPackageTestCase.h"
@interface GPKGPropertiesExtensionTest : GPKGCreateGeoPackageTestCase
@end
|
#pragma once
#include <iostream>
#include "Hypodermic/ILoggerSink.h"
namespace Hypodermic
{
class ConsoleLoggerSink : public ILoggerSink
{
public:
void append(LogLevels::LogLevel logLevel, const std::string& message) override
{
if (logLevel == LogLevels::Off)
... |
#if !defined(LIQUID_BLOCK_H)
#define LIQUID_BLOCK_H
#include "document_body.h"
#include "vm_assembler_pool.h"
typedef struct block_body {
bool compiled;
VALUE obj;
union {
struct {
document_body_entry_t document_body_entry;
VALUE nodelist;
} compiled;
struc... |
/*
==============================================================================
Copyright (C) 2016 Jacob Sologub
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 restricti... |
#pragma once
#include <anax/Component.hpp>
#include <anax/Entity.hpp>
struct BulletComponent :anax::Component
{
float lifeRemaining = 5.f;
int dmg;
anax::Entity owner;
}; |
#ifndef BATCHEXTENSION_H
#define BATCHEXTENSION_H
namespace batchextension {
void initBatch(const char *key);
}
#endif |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef __cplusplus
#error This header can only be compiled as C++.
#endif
#ifnde... |
/**
* @file PrintableButton.h
* @brief Contains PrintableButton class declaration
* @author Khalin Yevhen
* @version 0.0.1
* @date 07.09.17
*/
#pragma once
#include "..\khalin03\Button.h"
#include <StorageInterface.h>
#include "..\khalin01\Printable.h"
#include <string>
/**
* @brief It's just a print... |
#pragma once
#include "RenderInfo.h"
class MeshObject;
class DefaultObjcetRenderInfo final : public RenderInfo
{
public:
float m_specularPower = 100.0f;
int m_celShaded = 0;
void updatePerObjectBuffers(const DrawData&, const MeshObject&) override;
void updatePerFrameBuffers(const DrawData&) override;
~DefaultObj... |
//===------ polly/SCEVAffinator.h - Create isl expressions from SCEVs -----===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//------------------------------------------------------------------------------
// <copyright project="BEmu_cpp" file="headers/ReferenceDataRequest/ReferenceElementErrorInfo.h" company="Jordan Robinson">
// Copyright (c) 2013 Jordan Robinson. All rights reserved.
//
// The use of this software is governed by ... |
#pragma once
namespace PhysX
{
namespace Apex
{
ref class ApexSdk;
public ref class Interface : IDisposable
{
public:
/// <summary>Raised before any disposing is performed.</summary>
virtual event EventHandler^ OnDisposing;
/// <summary>Raised once all disposing is performed.</summary>
virt... |
//
// ModeTwo.h
// Haydn_NWS_2014_FINAL
//
// Created by Bernardo Santos Schorr on 3/8/14.
//
//
#pragma once
#include "ofMain.h"
#include "fft.h"
#include "FFTOctaveAnalyzer.h"
#include "ParticleOrbit.h"
#include "movingBackground.h"
class ModeTwo {
public:
void setup( vector<MovingBackground> &bkgListT... |
//=====================================================================
// Copyright 2012-2016 (c), Advanced Micro Devices, Inc. All rights reserved.
//
/// \author AMD Developer Tools Team
/// \file
///
//=====================================================================
#ifndef _ACL_API_TYPES_0_8_H_
#define _ACL... |
//
// BNRItem.h
// C2_RandomItems
//
// Created by user on 15/5/19.
// Copyright (c) 2015年 Potter. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface BNRItem : NSObject
//{
// NSString *_itemName;
// NSString *_serialNumber;
// int _valueInDollars;
// NSDate *_dateCreated;
//}
+(... |
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004-2016 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of ... |
#ifndef __MSA_rules_ye_WORLD2D__
#define __MSA_rules_ye_WORLD2D__
#include "..\_MSA_DDraw\MSA_DDraw.h"
#include "MSA_sprite.h"
#define MAX_SPRITE_COUNT 512
class MSA_WORLD2D // SPRITE LINKED LIST MANAGMENT
{
private:
friend class MSA_SPRITE;
MSA_DDRAW *TheDDraw;
MSA_SPRITE *spr;
short SpriteCount... |
#ifndef FULL_DICT_UTIL_H_GUARD
#define FULL_DICT_UTIL_H_GUARD
#include <stddef.h>
typedef struct MemoryMap {
int file_descriptor;
size_t length;
char *buffer;
} MemoryMap;
size_t ceil_div(size_t x, size_t y);
char* file_to_buffer(char *filename);
#endif
|
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... |
/* myrootkit.c:
fill in the blanks to write your first rootkit!
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/unistd.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Your name here");
// syscall_table perm addr in the kernel
unsigne... |
//
// NAppDelegate.h
// NEvent
//
// Created by CocoaPods on 04/18/2015.
// Copyright (c) 2014 Naithar. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
// Copyright Hansol Park (anav96@naver.com, mooming.go@gmail.com). All rights reserved.
#ifndef __ComponentSystem_h__
#define __ComponentSystem_h__
#include "ComponentState.h"
#include "Debug.h"
#include "Vector.h"
#include "String.h"
#include <algorithm>
namespace HE
{
template <typename Component>
class C... |
// This file was generated based on 'C:\ProgramData\Uno\Packages\UnoCore\0.13.2\Source\Uno\Collections\$.uno'.
// WARNING: Changes might be lost if you edit this file directly.
#ifndef __APP_UNO_COLLECTIONS_DICTIONARY2_VALUE_COLLECTION__FUSE_NAVIGATION_NA_14A77DCE_H__
#define __APP_UNO_COLLECTIONS_DICTIONARY2_VALUE_CO... |
//
// defines.h
//
//
// Created by Samuco on 19/04/2015.
//
//
#ifndef _defines_h
#define _defines_h
// Rendering flags
#define SHADOW_MAP_SIZE 1024
#define RENDER_SWAT_REFLECTION
#define RENDER_SENV_REFLECTION
// Force hardware acceleration
#define RENDER_PIPELINE
#define RENDER_GPU
#ifdef RENDER_PIPELINE
... |
#ifndef CUSTOMWINDOW_H
#define CUSTOMWINDOW_H
#include "DWindow.h"
#include <TextControl.h>
class CustomWindow : public DWindow
{
public:
CustomWindow(void);
void MessageReceived(BMessage *msg);
private:
void MakeNumberBox(BTextControl *box);
void CheckValues(void);
BTextControl *fWidth,
*fHeight,
... |
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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, includ... |
//
// UIDevice+WTRequestCenter.h
// WTRequestCenter
//
// Created by songwt on 14-8-12.
// Copyright (c) Mike song(mailto:275712575@qq.com). All rights reserved.
// site:https://github.com/swtlovewtt/WTRequestCenter
// install
// git clone https://github.com/swtlovewtt/WTRequestCenter
@import UIKit;
@interface ... |
#include <stdio.h>
#include "engine/game.c"
int main(int argc, char** argv) {
printf("hello world\n");
return 0;
}
|
//
// SJCheckButton.h
// vesta
//
// Created by Florent Segouin on 15/12/14.
// Copyright (c) 2014 utt. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SJCheckButton : UIButton
@property (nonatomic, getter = isEmphasized) BOOL emphasized;
@end
|
//*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: David Burken
//
// Description:
//
// Contains class definition for JpegWriter.
//
//*******************************************************************
// $Id: ossimJpegWriter.h 16597 2... |
//
// AppDelegate.h
// storyboard-plus-xib
//
// Created by Ian Donaldson on 25/08/2014.
//
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
#ifndef AI
#define AI
#include <stdlib.h>
#include <time.h>
int generateDecision() {
/*
A random number generator to pick the opponents moves
*/
int randomDigit;
randomDigit = (rand() % 5);
return randomDigit;
}
#endif |
extern
int merge_min(
int32_t *X, /* [nX] */
uint32_t nX,
int32_t *Y, /* [nY] */
uint32_t nY,
int32_t *Z, /* [nZ] */
uint32_t nZ,
uint32_t *ptr_num_in_Z
);
|
// Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
#ifndef GMSH_FACE_H
#define GMSH_FACE_H
#include "GFace.h"
class Surface;
class gmshFace : public GFace {
protected:
Su... |
#pragma once
#include <glm/glm.hpp>
/**
* \brief Represents a 3d plane.
*/
class CPlane
{
public:
CPlane();
CPlane(const glm::vec3& v1, const glm::vec3& v2, const glm::vec3& v3);
~CPlane();
// Ordering of points defines normal vector
// Clockwise/Counterclockwise ordering rule is used to calculate normal vecto... |
#ifndef PARAMLISTSELEC_H
#define PARAMLISTSELEC_H
#include "paramcombobox.h"
class ParamListSelec : public ParamComboBox
{
public:
ParamListSelec(QWidget* parent);
virtual ~ParamListSelec();
};
#endif // PARAMLISTSELEC_H
|
#pragma once
#include "xi/ext/configure.h"
#include "xi/core/sleep_queue.h"
#include "xi/core/worker_queue.h"
namespace xi {
namespace core {
namespace v2 {
class netpoller;
class shared_queue;
class scheduler;
class execution_budget;
class worker final {
public:
struct config {
... |
//
// AppDelegate.h
// TableViewDemo
//
// Created by Doncho Minkov on 1/22/16.
// Copyright © 2016 Doncho Minkov. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
#ifndef DECAFPARSER_BPARSER_H
#define DECAFPARSER_BPARSER_H
#include "parser.h"
#include "parser_decaf.hpp"
#include "ast.h"
class BParser : public Parser {
public:
BParser( FILE* file, bool debug_lexer, bool debug_parser )
: Parser(file, debug_lexer, debug_parser)
{
extern FILE* yyin;
... |
#ifdef BOARD_BUTTON_PIN
volatile bool g_buttonPressed = false;
volatile uint32_t g_buttonPressTime = -1;
void button_action(void)
{
BlynkState::set(MODE_RESET_CONFIG);
}
ICACHE_RAM_ATTR
void button_change(void)
{
#if BOARD_BUTTON_ACTIVE_LOW
bool buttonState = !digitalRead(BOARD_BUTTON_PIN);
#else
bool but... |
//
// UIColor+RandomColor.h
// general-code
//
// Created by John Bender on 1/23/13.
//
//
#import <UIKit/UIKit.h>
@interface UIColor (RandomColor)
+(UIColor*) randomColor;
+(UIColor*) randomColorWithAlpha:(CGFloat)alpha;
@end
|
#include "platform_file_utils.h"
FileData get_asset_data(const char* relative_path);
void release_asset_data(const FileData* file_data);
|
// Generated by xsd compiler for ios/objective-c
// DO NOT CHANGE!
#import <Foundation/Foundation.h>
extern NSString *const CheckSumMethod_NONE;
extern NSString *const CheckSumMethod_MODULO_10;
|
//
// UIView+printSubviews.h
// RYTSketchView
//
// Created by Ryan on 21/6/15.
//
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface UIView (PrintSubviews)
- (void)printSubviewsWithIndentation:(int)indentation;
@end
|
// This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_GL_BVH_OUTLINE_RENDERER_H
#define VSNRAY_GL_BVH_OUTLINE_RENDERER_H 1
#include <memory>
#include <vector>
#include <visionaray/math/matrix.h>
#include <visionaray/bvh.h>
namespace visionaray
{
namespa... |
/** @file SystemInterface.h
@author Philip Abbet
Declaration of the class 'Athena::GUI::SystemInterface'
*/
#ifndef _ATHENA_GUI_SYSTEMINTERFACE_H_
#define _ATHENA_GUI_SYSTEMINTERFACE_H_
#include <Athena-GUI/Prerequisites.h>
#include <Athena-Core/Utils/Timer.h>
#include <Rocket/Core/SystemInterface.h>
nam... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <SimulatorKit/FoundationXPCProtocolProxyable-Protocol.h>
@protocol SimDisplayResizeableRenderable <FoundationXPCProtocolP... |
#include <errno.h>
#include <grp.h>
#include <string.h>
#include "user.h"
int cm_user_get_group(struct passwd *pw, char **group) {
errno = 0;
struct group *g = getgrgid(pw->pw_gid);
if(g == NULL) {
return CM_ERR_NOGRP;
}
strncpy(*group, g->gr_name, strlen(g->gr_name));
return 0;
}
|
//
// UIButton+CZAddition.h
//
// Created by 刘凡 on 16/5/17.
// Copyright © 2016年 itcast. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIButton (CZAddition)
/**
创建文本按钮
@param title 标题文字
@param fontSize 字体大小
@param normalColor 默认颜色
@param highlightedColor 高亮颜色
@return U... |
/**
* DeepDetect
* Copyright (c) 2014-2016 Emmanuel Benazera
* Author: Emmanuel Benazera <beniz@droidnik.fr>
*
* This file is part of deepdetect.
*
* deepdetect is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Softw... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_rand_square_09.c
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-09.tmpl.c
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: rand Set data to result of rand(), which may be zero
... |
//
// EnemiesTableViewController.h
// UIRPGController
//
// Created by Sean on 10/11/14.
// Copyright (c) 2014 Sean Herman. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface EnemiesTableViewController : UITableViewController
@end
|
#include "sphia-test.h"
// See #51
static void
test_clear_similar_keys() {
sphia_set(sphia, "key-1", "hello world");
sphia_set(sphia, "key-10", "hello world");
sphia_set(sphia, "00000000", "hello world");
sphia_set(sphia, "000000000", "hello world");
assert(4 == sphia_count(sphia));
assert(0 == sphia_clea... |
#pragma once
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
int maxProfit(vector<int>& prices) {
int states[2][4] = { INT_MIN, 0, INT_MIN, 0 }; // 0: 1 buy, 1: one buy/sell, 2: 2 buys/1 sell, 3, 2 buys/sells
int cur = 0, next = 1;
for (int i = 0; i < prices.size(); i++)
... |
//*******************************************************************************
// COPYRIGHT NOTES
// ---------------
// This is a part of the BCGControlBar Library
// Copyright (C) 1998-2000 BCGSoft Ltd.
// All rights reserved.
//
// This source code can be used, distributed or modified
// only under terms a... |
#include "q_constants.h"
#include "macros.h"
#include "qtypes.h"
#include "s_to_f_const_F4.h"
void
s_to_f_const_F4(
float *X,
uint64_t nX,
float val
)
{
for ( uint64_t i = 0; i < nX; i++ ) {
X[i] = val;
}
}
|
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2018-2020 The Ion Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_NETBASE_H
#define BITCOIN_NETBASE_H
#if defined(HAVE_CONF... |
//
// NSDate+Helper.h
// YMDPickerVIewDemo
//
// Created by ronaldo on 7/24/14.
// Copyright (c) 2014 ronaldo. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (YMDExtensions)
+ (NSDate *)dateWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day;
- (NSInteger)year;
- (NSI... |
#import <Foundation/Foundation.h>
#import "ERNResourceFactory.h"
@interface ERNNullResourceFactory : NSObject <ERNResourceFactory>
+(instancetype)create;
@end
|
/**
* This file was generated by cmake, do NOT modify.
*/
#ifndef DUI_UIBUILDCONFIG_H_
#define DUI_UIBUILDCONFIG_H_
/* #undef HAVE_STRICMP */
#define HAVE_STRCASECMP
#endif // !DUI_UIBUILDCONFIG_H_
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE416_Use_After_Free__malloc_free_char_11.c
Label Definition File: CWE416_Use_After_Free__malloc_free.label.xml
Template File: sources-sinks-11.tmpl.c
*/
/*
* @description
* CWE: 416 Use After Free
* BadSource: Allocate data using malloc(), initialize memory bl... |
/*===========================================================*
| icom.h
| Copyright (c) 1987-1995 Applied Logic Systems, Inc.
|
| -- ICode command numbers
|
| Author: Kevin A. Buettner
| Created: 2/12/87
| 10/26/94, C. Houpt -- Ifdefed out makeobp with OBP.
*=============================================... |
/* RamseyScript
* Written in 2012 by
* Andrew Poelstra <apoelstra@wpsoftware.net>
*
* To the extent possible under law, the author(s) have dedicated all
* copyright and related and neighboring rights to this software to
* the public domain worldwide. This software is distributed without
* any warranty.
*
* Y... |
#include "rims.h"
/* This is a sample program. You can save/compile/run it,
modify it first, or just load a different program. */
/* Sets B0 to 1 as quickly as possible when A0==1 and A1==0*/
/* Note that A0 - A7 can be set by clicking the switches to
the left, and B0 - B7 can be viewed as LEDs to the ... |
/* CoreAnimation - CAEmitterBehavior.h
Copyright (c) 2013-2015, Apple Inc.
All rights reserved. */
#import <QuartzCore/CALayer.h>
@interface CAEmitterBehavior : NSObject <NSCoding>
{
@private
unsigned int _type;
NSString *_name;
void *_attr;
void *_cache;
uint32_t _flags;
}
+ (NSArray *)behaviorType... |
#include <mpi.h>
#include <stdio.h>
int main (int argc, char* argv[]){
int rank, size;
int sum;
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Allreduce(&rank, &sum, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
/* Display the result on all ranks, alo... |
#include <stdio.h>
#include <net/ethernet.h>
#include <arpa/inet.h>
#include "ethernet.h"
void ethernet_print_mac (const uint8_t ether_dhost[ETH_ALEN]) {
for (int i = 0; i < (ETH_ALEN - 1); i ++) {
fprintf(stdout, "%x:", ether_dhost[i]);
}
fprintf(stdout, "%x", ether_dhost[ETH_ALEN - 1]);
}
void... |
/*
Copyright (C) 1996-1997 Id Software, Inc.
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 option) any later version.
This program is distributed in th... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
/* BOSCH GYROSCOPE Sensor Driver Header File
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be usef... |
int get(int a, int b);
|
/*
*
* Mon Jun 15 02:38:17 BRT 2015
* author: Joao Gustavo Cabral de Marins
* e-mail: jgcmarins@gmail.com
*
*/
#include "headers/InputReader.h"
char *inputReader() {
char *buffer = NULL;
int c, i = 0;
do {
c = fgetc(stdin);
buffer = (char *) realloc(buffer, sizeof(char)*(i+1));
buffer[i++] = c;
} while(... |
/***************************************************************************
* qgsgeometrysnapperplugin.h *
* ------------------- *
* copyright : (C) 2014 by Sandro Mani / Sourcepole AG *
* email ... |
// Copyright (c) 2014 Jiho Choi. All rights reserved.
// To use this source, see LICENSE file.
#pragma once
namespace dg {
class EngineConfig : public Config {
public:
EngineConfig();
~EngineConfig();
String global_effect_path_;
String default_effect_path_;
String sprite_effect_path_;
String line_effect... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.