repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/DistanceControlHelper.h | #ifndef HELPER_H
#define HELPER_H
int find_pulse_duration_ms(int width, int dist_mm);
#endif
|
josephlewis42/personal_codebase | xc/HW02-HotPotato/.build_Debug/XK-1A.h | <filename>xc/HW02-HotPotato/.build_Debug/XK-1A.h
#ifndef HAVE_PLATFORM_H
#define HAVE_PLATFORM_H
#include <xs1.h>
/*
* Platform description header file.
* Automatically generated from ".././XK-1A.xn".
*/
#ifdef __XC__
/* Core array declaration. */
extern core stdcore[1];
#endif
#ifdef __XC__
/* Service prototype... |
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/common_cmds.h | <filename>xc/HW09-FinalVehicle/src/common_cmds.h
/*
* common_cmds.h - Useful commands that are used everywhere.
*
* Created on: May 28, 2012
* Author: joseph
*/
#ifndef COMMON_CMDS_H_
#define COMMON_CMDS_H_
#include <xs1.h>
#define TICKS_PER_SEC XS1_TIMER_HZ
#define TICKS_PER_MS (XS1_TIMER_HZ/1000)
#defin... |
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/director.h | <filename>xc/HW09-FinalVehicle/src/director.h
/*
* director.h - There are no small roles.
*
* Created on: May 28, 2012
* Author: <NAME> <<EMAIL>>
*/
#ifndef DIRECTOR_H_
#define DIRECTOR_H_
#define GO_FORWARD 0
#define TURN_NINETY_LEFT 1
#define TURN_NINETY_RIGHT 2
#define STOP 3
enum driving_commands{
fo... |
josephlewis42/personal_codebase | cpp/tinybasic/io.h | /**
A TinyBASIC derivative originally built for the Arduino.
Copyright 2012-04-07 <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the abo... |
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/bumper.h | <gh_stars>1-10
/*
* buttons.h - Don't push mine.
*
* Created on: May 28, 2012
* Author: <NAME> <<EMAIL>>
*/
#ifndef BUMPER_H
#define BUMPER_H
void wait_left_bumper_press();
void wait_right_bumper_press();
void wait_either_bumper_press();
void wait_left_bumper_release();
void wait_right_bumper_release();
vo... |
josephlewis42/personal_codebase | xc/HW03-Ping/src/utility.c | <reponame>josephlewis42/personal_codebase<gh_stars>1-10
/*
* utility.c
*
* Created on: Apr 12, 2012
* Author: joseph
*/
#include "utility.h"
int ticks_to_mm(unsigned int ticks, unsigned int mm_per_sec, unsigned int ticks_per_sec)
{
double tks = ticks;
//double seconds = ticks;
// How many seconds did t... |
josephlewis42/personal_codebase | c/monty_hall.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define true 1
#define false 0
#define SWITCH_DOORS 1
#define ROUNDS 1000000000
//#define PRINTOUT = 1 //Define for printout of text
/* Seed the random with a random value the clock doesn't work because
* it only gets updated once per seco... |
josephlewis42/personal_codebase | xc/Lab07-Rotate90/src/uart.h | #ifndef uart_h
#define uart_h
void debug(const char values[], unsigned int n);
#endif
|
josephlewis42/personal_codebase | cpp/lib/Configuration.h | /*
* Configuration.h
*
* A simple configuration manager that looks up arbitrary key:value pairs.
*
* Copyright (c) 2013 <NAME> <<EMAIL>> | <<EMAIL>>
* Licensed under the GPL 3
*
*/
#ifndef CONFIGURATION_H_
#define CONFIGURATION_H_
#include <string>
#include <mutex>
#include <boost/property_tree/ptree_fwd.hpp>... |
josephlewis42/personal_codebase | xc/Lab09-DrivingStraight/src/servo.h | <gh_stars>1-10
#ifndef SERVO_H_
#define SERVO_H_
// constants
#define MIN_SERVO_PULSE_US 1000
#define MID_SERVO_PULSE_US 1500
#define MAX_SERVO_PULSE_US 2000
#define MAX_NUM_SERVOS 8
// types
typedef struct {
unsigned int pulse_width_us[MAX_NUM_SERVOS];
} servo_cmd_t;
// prototypes
servo_cmd_t default_servo_cmd();
... |
josephlewis42/personal_codebase | cpp/tinybasic/tokenizer.h | <gh_stars>1-10
/**
A TinyBASIC derivative originally built for the Arduino.
Copyright 2012-04-07 <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must... |
josephlewis42/personal_codebase | cpp/lib/Path.h | /**
* Copyright 2014 <NAME> <<EMAIL>>
*
* This file is part of University of Denver Autopilot.
* Dual licensed under the GPL v 3 and the Apache 2.0 License
*
**/
#ifndef PATH_H_
#define PATH_H_
#include <string>
/** This class handles filesystem paths.
**/
class Path
{
private:
std::string _path;
i... |
josephlewis42/personal_codebase | cpp/tinybasic/basic.h | /**
A TinyBASIC derivative originally built for the Arduino.
Copyright 2012-04-07 <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the abo... |
josephlewis42/personal_codebase | xc/Lab08-LinkedList/src/bfs.c | <reponame>josephlewis42/personal_codebase
/*
* bfs.c
*
* A breadth first search algorithm
*
* Created on: May 17, 2012
* Author: <NAME> <<EMAIL>>
*/
#include <stdlib.h>
#include "bfs.h"
#include <assert.h>
// definitions
#define NORTH 0
#define EAST 1
#define SOUTH 2
#define WEST 3
// declarations
struc... |
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/bfs.h | /*
* bfs.h - Not to be confused with BFF
*
* Created on: May 17, 2012
* Author: <NAME> <<EMAIL>>
*/
#ifndef BFS_H_
#define BFS_H_
#include <xs1.h>
#include "platform.h"
#define MAZE_WIDTH 6
# define ELEMENT_COUNT (MAZE_WIDTH * MAZE_WIDTH)
# define RANK(row, col) ((row) * MAZE_WIDTH + (col))
# define ROW(r... |
josephlewis42/personal_codebase | xc/HW03-Ping/src/utility.h | /*
* utility.h
*
* Created on: Apr 12, 2012
* Author: joseph
*/
#ifndef UTILITY_H_
#define UTILITY_H_
int ticks_to_mm(unsigned int ticks, unsigned int mm_per_sec, unsigned int ticks_per_sec);
#endif /* UTILITY_H_ */
|
josephlewis42/personal_codebase | cpp/tinybasic/program_reader.h | <reponame>josephlewis42/personal_codebase<gh_stars>1-10
/**
A TinyBASIC derivative originally built for the Arduino.
Copyright 2012-04-07 <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:... |
josephlewis42/personal_codebase | xc/HW05-HMC6352/src/servos.h | #ifndef SERVOS_H_FILE
#define SERVOS_H_FILE
void servo_task(unsigned int timeout_ticks); // launches the servo task, timeout turns it off timeout=0 for continueous.
void left_forward(int pct);
void left_reverse(int pct);
void right_forward(int pct);
void right_reverse(int pct);
void right_stop();
void left_stop();
... |
josephlewis42/personal_codebase | cpp/tinybasic/stringutils.h | <gh_stars>1-10
/**
A TinyBASIC derivative originally built for the Arduino.
Copyright 2012-04-07 <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must... |
josephlewis42/personal_codebase | cpp/lib/RateLimiter.h | <reponame>josephlewis42/personal_codebase
/*
* RateLimiter.h
*
* Created on: Sep 27, 2013
* Author: <NAME> <<EMAIL>>
*/
#ifndef RATELIMITER_H_
#define RATELIMITER_H_
#include <thread>
#include <chrono>
class RateLimiter
{
private:
std::chrono::milliseconds _msToWait;
std::chrono::time_point<std::c... |
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/lights.h | <reponame>josephlewis42/personal_codebase
/*
* lights.h - Pretty Lights
*
* Created on: May 28, 2012
* Author: <NAME> <<EMAIL>>
*/
#ifndef LIGHTS_H_
#define LIGHTS_H_
// chanend c takes an int as the number of hz to flash at, 0 is off, < 0 is full on
void lights_thread(chanend c);
// Blinks at 0 hz for 1 ... |
josephlewis42/personal_codebase | xc/Lab05-BasicCompass/src/i2c.h | #ifndef I2C_H_INCLUDED
#define I2C_H_INCLUDED
#include <xs1.h>
typedef struct
{
port scl; // clock port
port sda; // data port
unsigned t; // timestamp
timer tmr; // timer
unsigned delay; // delay on clock edges (in ticks)
} i2c_p;
void i2c_delay(i2c_p &i2c); // delays by i2c_p.delay ticks
void i... |
josephlewis42/personal_codebase | xc/Lab02-SimSetup/utility.h | <filename>xc/Lab02-SimSetup/utility.h
/*
* utility.h
*
* Created on: Apr 5, 2012
* Author: joseph
*/
#ifndef UTILITY_H_
#define UTILITY_H_
void format_message(char buffer[], unsigned int t0, unsigned int t1);
#endif /* UTILITY_H_ */
|
josephlewis42/personal_codebase | xc/Lab02-SimSetup/utility.c | <reponame>josephlewis42/personal_codebase
/*
* utility.c
*
* Created on: Apr 5, 2012
* Author: joseph
*/
#include <xs1.h>
#include "utility.h"
#include <stdio.h>
float timer_diff(unsigned int t0, unsigned int t1)
{
if(t1 < t0)
{
return ((float)((XS1_TIMER_HZ - t0) + t1)) / XS1_TIMER_HZ;
}
return ((f... |
josephlewis42/personal_codebase | xc/HW06-DistanceControl/src/DistanceControlHelper.h | <filename>xc/HW06-DistanceControl/src/DistanceControlHelper.h
#ifndef HELPER_H
#define HELPER_H
int find_pulse_duration_ms(int width, int dist_mm);
#endif
|
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/americus.h | <filename>xc/HW09-FinalVehicle/src/americus.h
/*
* americus.h - The head of the navigator.
*
* Created on: May 29, 2012
* Author: joseph
*/
#ifndef AMERICUS_H_
#define AMERICUS_H_
void navigate_maze(chanend lightschan, chanend directions, chanend out_servo_cmd_chan, i2c_p& i2c);
void test_navigation(chanen... |
josephlewis42/personal_codebase | xc/HW09-FinalVehicle/src/buttons.h | <reponame>josephlewis42/personal_codebase<gh_stars>1-10
/*
* buttons.h - Don't push mine.
*
* Created on: May 28, 2012
* Author: <NAME> <<EMAIL>>
*/
#ifndef BUTTONS_H_
#define BUTTONS_H_
void wait_left_button_press();
void wait_right_button_press();
void wait_either_button_press();
void wait_left_button_re... |
imaroger/walking_human_trajectory_models | include/OptimalControlModel.h | #ifndef OPTIMALCONTROLMODEL_H
#define OPTIMALCONTROLMODEL_H
#include "crocoddyl/core/actions/human.hpp"
#include "crocoddyl/core/optctrl/shooting.hpp"
#include "crocoddyl/core/solvers/ddp.hpp"
#include <iostream>
#include <cmath>
using namespace std;
using namespace crocoddyl;
class OptimalControlModel
{
private :... |
imaroger/walking_human_trajectory_models | include/GeneralizedFresnel.h | #ifndef GENERALIZEDFRESNEL_H
#define GENERALIZEDFRESNEL_H
#include <iostream>
#include <boost/array.hpp>
#include <boost/numeric/odeint.hpp>
class GeneralizedFresnel
{
private:
double k0;
double k1;
double init_theta;
int n;
int i;
double S_i;
double C_i;
typedef boost::array< double , 3 > state_type;
... |
imaroger/walking_human_trajectory_models | include/Clothoid.h | <filename>include/Clothoid.h
#ifndef CLOTHOID_H
#define CLOTHOID_H
#include <iostream>
#include <boost/array.hpp>
#include <cmath>
#include <boost/numeric/odeint.hpp>
#include <stdlib.h>
#include "GeneralizedFresnel.h"
class Clothoid
{
private:
double dt;
double epsilon = 1e-12;
double alpha;
typedef boost... |
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/Timer1.h | /*
* Timer_1.h
*
* Created: 10/14/2019 11:34:27 PM
* Author: Mohamed_Hassanin
*/
#ifndef TIMER1_H_
#define TIMER1_H_
#include <avr/io.h>
#include <avr/interrupt.h>
#include "USART.h"
/*
*Function Name: send_RPM
* Purpose : Sending RPM with precision xxx (0 -> 999)
* Input : RPM
* Output ... |
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/main.c | <gh_stars>0
/*
* main.h
*
* Created: 10/15/2019 6:01:05 PM
* Author: Mohamed_Hassanin
*
*Description:
*This code measure the RPM and KMPH of a BLDC motor and the current consumed by it.
*the current sensor used to measure the current is ACS712
*/
#include <avr/io.h>
#include <avr/interrupt.h>
#include <int... |
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/Timer3.h | /*
* Timer0.h
*
* Created: 10/15/2019 6:01:05 PM
* Author: Mohamed_Hassanin
*/
#ifndef TIMER3_H_
#define TIMER3_H_
#include <avr/io.h>
void Timer3_Init(void);
#endif /* TIMER3_H_ */ |
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/Timer1.c | <reponame>mohamedpop871/Telemetry-System
/*
* Timer1.c
*
* Created: 10/14/2019 11:34:16 PM
* Author: Mohamed_Hassanin
*/
#include "Timer1.h"
void
Timer1_Init(void)
{
TIMSK1 |= 1 << OCIE1A; //interrupt enable at overflow
TCCR1B |= 1 << WGM12;
OCR1A = 2000;
TCCR1B |= 1 << CS10 | 1 << CS12;
}
ISR
(TIM... |
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/Timer3.c | /*
* Timer0.c
*
* Created: 10/15/2019 6:00:53 PM
* Author: Mohamed_Hassanin
*/
#include "Timer3.h"
//for speed
void
Timer3_Init(void)
{
TCCR3B |= 1 << CS30 | 1 << CS32;
}
|
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/USART.c | <reponame>mohamedpop871/Telemetry-System<gh_stars>0
#include "USART.h"
void
INIT_UART(void)
{
UBRR0 = (F_CPU/16UL/BAUD)-1;
UCSR0B |= 1 << TXEN0 | 1 << RXCIE0 | 1 << RXEN0;
UCSR0B &= ~(1 << UCSZ02);
UCSR0C |= 1 << UCSZ00 | 1 << UCSZ01;
Send = 0;
}
void
USART_TX(uint8_t data )
{
/* Wait for empty transmit bu... |
mohamedpop871/Telemetry-System | Embedded/Telemetry System/Telemetry System/USART.h | <reponame>mohamedpop871/Telemetry-System<filename>Embedded/Telemetry System/Telemetry System/USART.h
#ifndef _USART_H
#define _USART_H
#include <inttypes.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#define F_CPU 16000000ul
#define BAUD 9600
volatile uint8_t data_rx;
void INIT_UART(void);
void USART_TX(uint8_t... |
juanpablofernandez/SwiftyFeedback | SwiftyFeedback/SwiftyFeedback.h | //
// SwiftyFeedback.h
// SwiftyFeedback
//
// Created by <NAME> on 6/29/18.
// Copyright © 2018 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for SwiftyFeedback.
FOUNDATION_EXPORT double SwiftyFeedbackVersionNumber;
//! Project version string for SwiftyFeedback.
FOUNDATION_E... |
jfbastien/pnacl-compiler-rt | lib/builtins/compilerrt_logbf.c | /*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.... |
jfbastien/pnacl-compiler-rt | lib/builtins/int_types.h | /* ===-- int_lib.h - configuration header for compiler-rt -----------------===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------... |
jfbastien/pnacl-compiler-rt | lib/builtins/fdlibm_nacl.h | /*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
... |
jfbastien/pnacl-compiler-rt | lib/builtins/atomic64.c | <filename>lib/builtins/atomic64.c
/*===----- atomic64.c - Support functions for 64-bit atomic operations.-----===
*
* The LLVM Compiler Infrastructure
*
* This file is dual licensed under the MIT and the University of Illinois Open
* Source Licenses. See LICENSE.TXT for details.
*
*===-------... |
jfbastien/pnacl-compiler-rt | lib/builtins/compilerrt_logb.c | /*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
... |
jfbastien/pnacl-compiler-rt | lib/builtins/compilerrt_fmaxf.c | /*
* Copyright (c) 2015 The Native Client 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 "int_math.h"
float __compilerrt_fmaxf(float x, float y)
{
if (crt_isnan(x))
return y;
if (crt_isnan(y))
return x;
... |
tanvir002700/kmp | ext/kmp/kmp.c | #include<ruby.h>
#include<kmp_string.h>
void Init_kmp()
{
VALUE mKmp = rb_define_module("Kmp");
Init_kmp_string(mKmp);
}
|
tanvir002700/kmp | ext/kmp/kmp_string.c | #include<ruby.h>
#include<string.h>
struct Str
{
char * ptr;
};
static void deallocate(struct Str *str)
{
if(str->ptr) free(str->ptr);
free(str);
}
static VALUE allocate(VALUE klass)
{
struct Str * str = (struct Str *)malloc(sizeof(struct Str));
VALUE obj = Data_Make_Struct(klass, struct Str, NU... |
tanvir002700/kmp | ext/kmp/kmp_string.h | <reponame>tanvir002700/kmp<filename>ext/kmp/kmp_string.h
#ifndef KMP_STRING
#define KMP_STRING
#include<ruby.h>
void Init_kmp_string(VALUE mKmp);
#endif
|
HorexC/CXExtension | CXExtension/CXExtension/CXType.h | <filename>CXExtension/CXExtension/CXType.h
//
// CXType.h
// CXExtension
//
// Created by Horex on 15/9/1.
// Copyright (c) 2015年 Horex. All rights reserved.
//
// 包装一种类型
#import <Foundation/Foundation.h>
@interface CXType : NSObject
/** 类型标识符 */
@property (nonatomic, strong) NSString *code;
/** 对... |
HorexC/CXExtension | CXExtension/CXExtension/NSObject+CXCoding.h | <reponame>HorexC/CXExtension<filename>CXExtension/CXExtension/NSObject+CXCoding.h
//
// NSObject+CXCoding.h
// CXExtension
//
// Created by Horex on 15/9/2.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSObject (CXCoding)
/** 解码 */
- (void)decode:(NSC... |
HorexC/CXExtension | CXExtension/CXExtension/JustTest.h | //
// JustTest.h
// CXExtension
//
// Created by Horex on 16/3/28.
// Copyright © 2016年 Horex. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JustTest : NSObject
@end
|
HorexC/CXExtension | CXExtension/CXExtension/NSObject+CXIvar.h | <gh_stars>0
//
// NSObject+CXIvar.h
// CXExtension
//
// Created by Horex on 15/9/2.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CXIvar.h"
/**
* 遍历所有类的block(父类)
*/
typedef void (^CXClassesBlock)(Class c, BOOL *stop);
@interface NSObject (CXIvar)
/**
* 遍历... |
HorexC/CXExtension | CXExtension/CXExtension/CXIvar.h | //
// CXIvar.h
// CXExtension
//
// Created by Horex on 15/9/1.
// Copyright (c) 2015年 Horex. All rights reserved.
// 包装一个成员变量
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import "CXType.h"
@interface CXIvar : NSObject
/** 成员变量 */
@property (nonatomic, assign) Ivar ivar;
/** 成员属性名 ... |
HorexC/CXExtension | CXExtension/CXExtension/CXExtension.h | //
// CXExtension.h
// CXExtension
//
// Created by Horex on 15/9/1.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#import "CXTypeEncoding.h"
#import "NSObject+CXKeyValue.h"
#import "NSObject+CXCoding.h"
#import "NSObject+CXIvar.h"
#define CXLogAllIvars \
- (NSString *)description \
{\
return [NSStrin... |
HorexC/CXExtension | CXExtension/CXExtension/CXConst.h | <reponame>HorexC/CXExtension
//
// CXConst.h
// CXExtension
//
// Created by Horex on 15/9/2.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#ifdef DEBUG // 调试状态
// 打开LOG功能
#define CXLog(...) NSLog(__VA_ARGS__)
// 打开断言功能
#define CXAssert(condition, desc) NSAssert(condition, @"\n报错文件:%@\n报错行数:第%d行\n报错... |
HorexC/CXExtension | CXExtension/CXExtension/NSObject+CXKeyValue.h | //
// NSObject+CXKeyValue.h
// CXExtension
//
// Created by Horex on 15/9/2.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#import <Foundation/Foundation.h>
/** KeyValue协议 */
@protocol CXKeyValue <NSObject>
@optional
/**
* 将属性名换为其他key去字典中取值
*
* @return 字典中的key是属性名,value是从字典中取值用的key
*/
- (NS... |
HorexC/CXExtension | CXExtension/CXExtension/CXFoundation.h | //
// CXFoundation.h
// CXExtension
//
// Created by Horex on 15/9/2.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CXFoundation : NSObject
+ (BOOL)isClassFromFoundation:(Class)c;
@end
|
HorexC/CXExtension | CXExtension/CXExtension/CXTypeEncoding.h | //
// CXTypeEncoding.h
// CXExtension
//
// Created by Horex on 15/9/1.
// Copyright (c) 2015年 Horex. All rights reserved.
//
#import <Foundation/Foundation.h>
/** 属性类型 */
extern NSString *const CXTypeInt;
extern NSString *const CXTypeFloat;
extern NSString *const CXTypeDouble;
extern NSString *const CXTy... |
Wilgnne/Pseudo-Kernel | src/kernel/kernel.c | #include <stdio.h>
#include <kernel/kstdio.h>
void main()
{
char command[100];
char args[50];
while (1)
{
printf("$ ");
scanf("%s", command);
scanf("%[^\n]", args);
flush_in();
printf("\t\tRUN %s with %s args\n", command, args);
}
} |
Wilgnne/Pseudo-Kernel | include/kernel/kstdio.h | void flush_in(); |
Wilgnne/Pseudo-Kernel | include/kernel/process.h | <filename>include/kernel/process.h
// Estrutura de um processo
typedef struct
{
// exec=1; ready=0; blocked=-1;
int state;
} process; |
Wilgnne/Pseudo-Kernel | src/kernel/kstdio.c | <reponame>Wilgnne/Pseudo-Kernel
#include <stdio.h>
#include <kernel/kstdio.h>
//Limpa o buffer do teclado
void flush_in()
{
int ch;
while ((ch = fgetc(stdin)) != EOF && ch != '\n')
{
}
} |
JamesOrson/KomodoCPP | src/include/komodo/core/game.h | #pragma once
#include <memory>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <string>
namespace komodo::core
{
class Game
{
public:
#pragma region Constructors
Game();
#pragma endregion
~Game();
... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/PhysicsObjects/BoxClass.h | #pragma once
#include "RigidBody.h"
class BoxClass : public RigidBody
{
public:
BoxClass(vec3 pos, vec3 bounds, vec3 vel, quat rot, float mass);
~BoxClass();
void MakeGizmo();
vec3 min, max;
vec3 centreOfGravity;
};
|
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/Physics.h | <reponame>Randyninja/PhysXEngine<gh_stars>0
#ifndef SOUND_PROGRAMMING_H_
#define SOUND_PROGRAMMING_H_
#include "Application.h"
#include "Camera.h"
#include "Render.h"
#include "DIYPhysicsEngine/DIYPhysicScene.h"
#include "DIYPhysicsEngine\PhysicsObjects\Plane.h"
#include "DIYPhysicsEngine\PhysicsObjects\SpringJoint.h"... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/PhysicsObjects/SpringJoint.h | #pragma once
#include "PhysicsObject.h"
#include "RigidBody.h"
class SpringJoint : public PhysicsObject
{
public:
SpringJoint(RigidBody* connection1, RigidBody* connection2, float springCoefficient, float damping);
private:
void virtual Update(vec3 gravity, float timeStep);
void virtual Debug();
void virtual Make... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/PhysicsObjects/PhysicsObject.h | <reponame>Randyninja/PhysXEngine
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// <NAME>
// 5/02/16
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#pragma once
#include "../Gizmos.h"
#include <../glm/glm.hpp>
#include <../glm/ex... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/PhysicsObjects/SphereClass.h | <gh_stars>1-10
#pragma once
#include "RigidBody.h"
class SphereClass : public RigidBody
{
public:
SphereClass(vec3 position, vec3 velocity, float mass, float radius, vec4 colour);
void virtual MakeGizmo();
float m_radius;
};
|
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/PhysicsObjects/RigidBody.h | <gh_stars>1-10
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// <NAME>
// 02/05/16
// Use Unity RigidBody as reference http://docs.unity3d.com/ScriptReference/Rigidbody.html
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#pragma ... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/PhysicsObjects/Plane.h | <reponame>Randyninja/PhysXEngine
#pragma once
#include "PhysicsObject.h"
class Plane : public PhysicsObject
{
public:
Plane(vec3 normal, float distance);
void virtual Update(vec3 gravity, float timeStep) {};
void virtual Debug() {};
void virtual MakeGizmo();
vec3 m_normal;
float m_distance;
};
|
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/Application.h | #ifndef _APPLICATION_H_
#define _APPLICATION_H_
struct GLFWwindow;
class Application
{
public:
Application();
virtual ~Application();
virtual bool startup();
virtual void shutdown();
virtual bool update();
virtual void draw();
int window_width;
int window_height;
GLFWwindow* m_window;
};
#endif //... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/Gizmos.h | #pragma once
#include "glm/fwd.hpp"
class Gizmos
{
public:
static void create(unsigned int a_maxLines = 0xffff, unsigned int a_maxTris = 0xffff,
unsigned int a_max2DLines = 0xff, unsigned int a_max2DTris = 0xff);
static void destroy();
// removes all Gizmos
static void clear();
// draws current Gi... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/DIYPhysicsEngine/DIYPhysicScene.h | #pragma once
#include "PhysicsObjects\SphereClass.h"
#include "PhysicsObjects\Plane.h"
#include "PhysicsObjects\BoxClass.h"
#include "PhysicsObjects\SpringJoint.h"
#include <vector>
class DIYPhysicScene
{
public:
DIYPhysicScene();
~DIYPhysicScene();
void AddActor(PhysicsObject* actorToAdd);
void RemoveActor(P... |
Randyninja/PhysXEngine | PhysicsForGamesvs2015_Start/PhysicsForGames/Render.h | #ifndef _RENDER_H_
#define _RENDER_H_
#define GLM_SWIZZLE
#include "glm/glm.hpp"
#include <vector>
using glm::vec2;
using glm::vec3;
using glm::vec4;
using glm::mat4;
struct Material
{
int diffuse_texture;
int normal_texture;
int specular_texture;
vec3 diffuse_color;
vec3 specular_color;
};
st... |
dev5tec/FBProgressView | FBProgressView/FBProgressViewAppDelegate.h | <filename>FBProgressView/FBProgressViewAppDelegate.h<gh_stars>1-10
//
// FBProgressViewAppDelegate.h
// FBProgressView
//
// Created by <NAME> on 11/03/30.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
@class FBProgressView;
@interface FBProgressViewAppDelegate : NSObject <U... |
dev5tec/FBProgressView | FBProgressViewTests/FBProgressViewTests.h | //
// FBProgressViewTests.h
// FBProgressViewTests
//
// Created by <NAME> on 11/03/30.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
@interface FBProgressViewTests : SenTestCase {
@private
}
@end
|
hamzahamidi/v8 | src/objects/lookup-inl.h | // Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_OBJECTS_LOOKUP_INL_H_
#define V8_OBJECTS_LOOKUP_INL_H_
#include "src/objects/lookup.h"
#include "src/handles/handles-inl.h"
#include "src/h... |
hamzahamidi/v8 | src/objects/js-weak-refs-inl.h | <gh_stars>1000+
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_OBJECTS_JS_WEAK_REFS_INL_H_
#define V8_OBJECTS_JS_WEAK_REFS_INL_H_
#include "src/objects/js-weak-refs.h"
#include "src/api/... |
hamzahamidi/v8 | src/wasm/baseline/ppc/liftoff-assembler-ppc.h | <gh_stars>1000+
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_WASM_BASELINE_PPC_LIFTOFF_ASSEMBLER_PPC_H_
#define V8_WASM_BASELINE_PPC_LIFTOFF_ASSEMBLER_PPC_H_
#include "src/wasm/baseline... |
hamzahamidi/v8 | src/heap/store-buffer-inl.h | <filename>src/heap/store-buffer-inl.h
// Copyright 2011 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_HEAP_STORE_BUFFER_INL_H_
#define V8_HEAP_STORE_BUFFER_INL_H_
#include "src/heap/store-buffer.h"
#incl... |
hamzahamidi/v8 | src/heap/basic-memory-chunk.h | // Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_HEAP_BASIC_MEMORY_CHUNK_H_
#define V8_HEAP_BASIC_MEMORY_CHUNK_H_
#include <type_traits>
#include "src/base/atomic-utils.h"
#include "src/co... |
hamzahamidi/v8 | src/codegen/arm64/assembler-arm64.h | // Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CODEGEN_ARM64_ASSEMBLER_ARM64_H_
#define V8_CODEGEN_ARM64_ASSEMBLER_ARM64_H_
#include <deque>
#include <list>
#include <map>
#include <memor... |
hamzahamidi/v8 | src/objects/synthetic-module.h | <reponame>hamzahamidi/v8
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_OBJECTS_SYNTHETIC_MODULE_H_
#define V8_OBJECTS_SYNTHETIC_MODULE_H_
#include "src/objects/module.h"
// Has to be th... |
hamzahamidi/v8 | src/objects/js-number-format.h | // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif // V8_INTL_SUPPORT
#ifndef V8_OBJECTS_JS_NUMBER_FORMAT_H_
#defin... |
hamzahamidi/v8 | src/heap/invalidated-slots-inl.h | <gh_stars>1-10
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_HEAP_INVALIDATED_SLOTS_INL_H_
#define V8_HEAP_INVALIDATED_SLOTS_INL_H_
#include <map>
#include "src/heap/invalidated-slots.h... |
hamzahamidi/v8 | src/objects/feedback-cell.h | <gh_stars>1000+
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_OBJECTS_FEEDBACK_CELL_H_
#define V8_OBJECTS_FEEDBACK_CELL_H_
#include "src/objects/struct.h"
// Has to be the last include ... |
hamzahamidi/v8 | src/torque/earley-parser.h | // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_TORQUE_EARLEY_PARSER_H_
#define V8_TORQUE_EARLEY_PARSER_H_
#include <map>
#include <memory>
#include <vector>
#include "src/base/optional.h... |
hamzahamidi/v8 | src/common/ptr-compr.h | // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_COMMON_PTR_COMPR_H_
#define V8_COMMON_PTR_COMPR_H_
#include "src/common/globals.h"
#if V8_TARGET_ARCH_64_BIT
namespace v8 {
namespace inte... |
hamzahamidi/v8 | src/torque/ast.h | <reponame>hamzahamidi/v8<gh_stars>1000+
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_TORQUE_AST_H_
#define V8_TORQUE_AST_H_
#include <iostream>
#include <map>
#include <memory>
#include... |
hamzahamidi/v8 | src/strings/string-hasher-inl.h | <reponame>hamzahamidi/v8
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_STRINGS_STRING_HASHER_INL_H_
#define V8_STRINGS_STRING_HASHER_INL_H_
#include "src/strings/string-hasher.h"
#inclu... |
chuffa/ITensor | itensor/mps/sites/fermion.h | //
// Copyright 2018 The Simons Foundation, 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 re... |
chuffa/ITensor | itensor/util/cplx_literal.h | <filename>itensor/util/cplx_literal.h
//
// Copyright 2018 The Simons Foundation, 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.or... |
chuffa/ITensor | itensor/mps/TEvolObserver.h | //
// Copyright 2018 The Simons Foundation, 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 re... |
chuffa/ITensor | itensor/util/vector_no_init.h | <gh_stars>100-1000
//
// Copyright 2018 The Simons Foundation, 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-... |
chuffa/ITensor | sample/src/hubbard.h | #include <itensor/all.h>
using namespace itensor;
AutoMPO
hubbard_2d_ky(SiteSet const& sites, Args const& args)
{
auto Nx = args.getInt("Nx");
auto Ny = args.getInt("Ny");
auto U = args.getReal("U", 0.0);
auto t = args.getReal("t", 1.0);
auto ampo = AutoMPO(sites);
for(auto x : range(Nx))
for(auto k... |
chuffa/ITensor | itensor/util/infarray.h | <filename>itensor/util/infarray.h
//
// Copyright 2018 The Simons Foundation, 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/li... |
chuffa/ITensor | itensor/mps/tevol.h | <reponame>chuffa/ITensor<filename>itensor/mps/tevol.h
//
// Copyright 2018 The Simons Foundation, 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... |
chuffa/ITensor | itensor/itdata/qcombiner.h | //
// Copyright 2018 The Simons Foundation, 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 re... |
chuffa/ITensor | itensor/tensor/contract_impl.h | //
// Copyright 2018 The Simons Foundation, 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 re... |
chuffa/ITensor | itensor/tagset.h | //
// Copyright 2018 The Simons Foundation, 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 re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.