repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
HelpGiveThanks/BudgetPlanner | scripts/gotoStore.c | <reponame>HelpGiveThanks/BudgetPlanner<gh_stars>0
gotoStore
Set Error Capture [ On ]
Allow User Abort [ Off ]
Set Field [ budget::outLayoutGlobal; Get (LayoutName) ]
Go to Layout [ “store” (store) ]
Enter Find Mode [ ]
Set Field [ store::kbudget; budget::budgetGlobal ]
Perform Find [ ]
Sort Records [ Specified Sort Ord... |
HelpGiveThanks/BudgetPlanner | scripts/gotoOut.c | <filename>scripts/gotoOut.c
gotoOut
Allow User Abort [ Off ]
Set Error Capture [ On ]
#
If [ Get (LayoutName) = "budget" or
Get (LayoutName) = "store" or
Get (LayoutName) = "source" or
Get (LayoutName) = "people" ]
Else
Set Field [ budget::inLayoutGlobal; Get (LayoutName) ]
End If
#
If [ Get (FoundCount) = 0 & Get (Lay... |
HelpGiveThanks/BudgetPlanner | scripts/gotoNote.c | gotoNote
Go to Layout [ “people” (person) ]
Enter Browse Mode
January 8, 平成26 19:02:46 Budget Research.fp7 - gotoNote -1-
|
HelpGiveThanks/BudgetPlanner | scripts/newSource.c | <filename>scripts/newSource.c
newSource
Allow User Abort [ Off ]
Set Error Capture [ On ]
New Record/Request
Set Field [ source::kbudget; budget::budgetGlobal ]
Go to Field [ source::source ]
January 8, 平成26 18:53:06 Budget Research.fp7 - newSource -1-
|
HelpGiveThanks/BudgetPlanner | scripts/newIn.c | <gh_stars>0
newIn
New Record/Request
Set Field [ in::kbudget; budget::budgetGlobal ]
Go to Layout [ “income2” (in) ]
January 8, 平成26 18:51:10 Budget Research.fp7 - newIn -1-
|
HelpGiveThanks/BudgetPlanner | scripts/deletePurchase.c | deletePurchase
Set Variable [ $delete; Value:out::_Lout ]
Go to Field [ out::Date ]
Scroll Window
[ To Selection ]
Go to Field [ ]
Refresh Window
Show Custom Dialog [ Message: "delete current record?"; Buttons: “cancel”, “delete” ]
If [ Get (LastMessageChoice) = 1 ]
Set Variable [ $delete ]
Refresh Window
Exit Script [... |
HelpGiveThanks/BudgetPlanner | scripts/deletePersonName.c | <gh_stars>0
deletePersonName
Set Error Capture [ On ]
Allow User Abort [ Off ]
Set Variable [ $delete; Value:person::_Lperson ]
New Window [ ]
Go to Layout [ “PurchaseTotals1” (out) ]
Enter Find Mode [ ]
Set Field [ out::kperson; $delete ]
Perform Find [ ]
If [ Get ( LastError ) = 0 ]
Set Variable [ $number; Value:Get ... |
HelpGiveThanks/BudgetPlanner | scripts/deletePortalRow.c | <reponame>HelpGiveThanks/BudgetPlanner
deletePortalRow
Delete Portal Row
[ No dialog ]
Perform Script [ “updatePurchaseHeaderCalc” ]
January 8, 平成26 19:08:54 Budget Research.fp7 - deletePortalRow -1-
|
HelpGiveThanks/BudgetPlanner | scripts/start.c | start
Go to Layout [ “budget” (budget) ]
Set Window Title [ Current Window; New Title: "Budget Planner" ]
Set Zoom Level
[ 100% ]
#
#Report version number to Memory Switch Table.
Set Field [ MemorySwitch::versionBudget; Reference::version ]
#
#Show regular menus if Admin logs in only.
Show/Hide Text Ruler
[ Hide ]
If [... |
HelpGiveThanks/BudgetPlanner | scripts/view.c | <reponame>HelpGiveThanks/BudgetPlanner
view
#
#Reveal more or fewer pictures and links for tag.
#
#from 1 to 2
If [ Right ( Get (LayoutName) ; 1) = 1
and
Left ( out::purchaseLayoutView ; 4 ) = "more" ]
Go to Layout [ “PurchaseTotals2” (out) ]
#from 2 to 3
Else If [ Right ( Get (LayoutName) ; 1) = 2
and
Left ( out::purc... |
HelpGiveThanks/BudgetPlanner | scripts/backToBudget.c | <reponame>HelpGiveThanks/BudgetPlanner<filename>scripts/backToBudget.c
backToBudget
#
If [ Get (LayoutTableName) = "in" ]
Set Field [ budget::inLayoutGlobal; Get (LayoutName) ]
Else If [ Get (LayoutTableName) = "out" ]
Set Field [ budget::outLayoutGlobal; Get (LayoutName) ]
End If
#
Go to Layout [ “budget” (budget) ]
S... |
HelpGiveThanks/BudgetPlanner | scripts/changePerson.c | changePerson
Allow User Abort [ Off ]
Set Error Capture [ On ]
Set Variable [ $record; Value:out::_Lout ]
Set Variable [ $person; Value:out::kperson ]
New Window [ ]
Go to Layout [ “purchases” (Art) ]
Enter Find Mode [ ]
Set Field [ Art::kout; $record ]
Perform Find [ ]
Go to Record/Request/Page
[ First ]
Loop
Set Fiel... |
HelpGiveThanks/BudgetPlanner | scripts/returnToPurchasesFromNote.c | returnToPurchasesFromNote
Go to Layout [ budget::outLayoutGlobal ]
January 8, 平成26 18:59:24 Budget Research.fp7 - returnToPurchasesFromNote -1-
|
HelpGiveThanks/BudgetPlanner | scripts/deleteSource.c | deleteSource
Set Error Capture [ On ]
Allow User Abort [ Off ]
Set Variable [ $delete; Value:source::_Lsource ]
New Window [ ]
Go to Layout [ “income2” (in) ]
Enter Find Mode [ ]
Set Field [ in::ksource; $delete ]
Perform Find [ ]
If [ Get ( LastError ) = 0 ]
Set Variable [ $number; Value:Get (FoundCount) ]
Close Windo... |
HelpGiveThanks/BudgetPlanner | scripts/gotoPerson.c | <reponame>HelpGiveThanks/BudgetPlanner
gotoPerson
Set Error Capture [ On ]
Allow User Abort [ Off ]
Set Variable [ $$outLayout; Value:Get (LayoutName) ]
Set Field [ budget::outLayoutGlobal; Get (LayoutName) ]
Go to Layout [ “people” (person) ]
Enter Find Mode [ ]
Set Field [ person::kbudget; budget::budgetGlobal ]
Perf... |
HelpGiveThanks/BudgetPlanner | scripts/deleteBudget.c | deleteBudget
Allow User Abort [ Off ]
Set Error Capture [ On ]
Go to Field [ ]
If [ Get (LastError) = 509 ]
Set Variable [ $noName; Value:1 ]
End If
Set Variable [ $delete; Value:budget::_Lbudget ]
#
New Window [ ]
Go to Layout [ “PurchaseTotals1” (out) ]
Enter Find Mode [ ]
Set Field [ out::kbudget; $delete ]
Perform ... |
HelpGiveThanks/BudgetPlanner | scripts/chooseBudget.c | chooseBudget
Allow User Abort [ Off ]
Set Error Capture [ On ]
Set Field [ budget::budgetGlobal; budget::_Lbudget ]
Go to Field [ ]
If [ Get (LastError) = 509 ]
Go to Field [ budget::name ]
End If
January 8, 平成26 19:01:54 Budget Research.fp7 - chooseBudget -1-
|
HelpGiveThanks/BudgetPlanner | scripts/newBudget.c | newBudget
Allow User Abort [ Off ]
Set Error Capture [ On ]
Go to Field [ ]
If [ Get (LastError) = 509 ]
Go to Field [ budget::name ]
Exit Script [ ]
End If
New Record/Request
Set Field [ budget::name; "test" ]
Set Variable [ $budget; Value:budget::_Lbudget ]
Go to Layout [ “target” (outTarget) ]
New Record/Request
Set... |
HelpGiveThanks/BudgetPlanner | scripts/gotoHelp.c | <gh_stars>0
gotoHelp
#
#Set back path from help to this solution.
Set Field [ MemorySwitch::backToSolution; "Budget Research" ]
#
If [ Get (LayoutName) = "Budget" ]
Set Field [ MemorySwitch::helpLayoutName; "Users and Budgets" ]
Set Field [ MemorySwitch::helpObjectName; "" ]
#
Else If [ Left ( Get (LayoutName) ; 1 ) = ... |
HelpGiveThanks/BudgetPlanner | scripts/goTo.c | goTo
Go to Layout [ <unknown> ]
Go to Field [ Art::amount ]
Scroll Window
[ To Selection ]
January 8, 平成26 19:07:58 Budget Research.fp7 - goTo -1-
|
HelpGiveThanks/BudgetPlanner | scripts/duplicatePurchase.c | <gh_stars>0
duplicatePurchase
Allow User Abort [ Off ]
Set Error Capture [ On ]
Freeze Window
Set Variable [ $$stopMessage; Value:1 ]
Set Variable [ $record; Value:out::_Lout ]
Set Variable [ $date; Value:out::Date ]
Set Field [ budget::outLayoutGlobal; Get (LayoutName) ]
New Window [ ]
Freeze Window
New Record/Request... |
HelpGiveThanks/BudgetPlanner | scripts/gotoIn.c | gotoIn
Allow User Abort [ Off ]
Set Error Capture [ On ]
#
If [ Get (LayoutName) = "budget" or
Get (LayoutName) = "store" or
Get (LayoutName) = "source" or
Get (LayoutName) = "people" ]
Else
Set Field [ budget::outLayoutGlobal; Get (LayoutName) ]
End If
#
If [ Get (FoundCount) = 0 & Get (LayoutName) = "Budget" ]
Show C... |
HelpGiveThanks/BudgetPlanner | scripts/newOut.c | newOut
New Record/Request
Go to Layout [ “PurchaseTotals4” (out) ]
Set Field [ out::purchaseLayoutView; "less" & Get (LayoutName) ]
Set Field [ out::kbudget; budget::budgetGlobal ]
Sort Records [ Specified Sort Order: out::_Lyear; ascending
out::_Lmonth; ascending
person::person; ascending ]
[ Restore; No dialog ]
Janu... |
HelpGiveThanks/BudgetPlanner | scripts/newPerson.c | <reponame>HelpGiveThanks/BudgetPlanner<filename>scripts/newPerson.c
newPerson
Allow User Abort [ Off ]
Set Error Capture [ On ]
New Record/Request
Set Field [ person::kbudget; budget::budgetGlobal ]
Go to Field [ person::person ]
January 8, 平成26 18:54:00 Budget Research.fp7 - newPerson -1-
|
HelpGiveThanks/BudgetPlanner | scripts/newStore.c | newStore
Allow User Abort [ Off ]
Set Error Capture [ On ]
New Record/Request
Set Field [ store::kbudget; budget::budgetGlobal ]
Go to Field [ store::store ]
January 8, 平成26 18:52:05 Budget Research.fp7 - newStore -1-
|
HelpGiveThanks/BudgetPlanner | scripts/clearDates.c | clearDates
Clear [ Reference::FDateDayFrom ]
[ Select ]
Clear [ Reference::FDateYearFrom ]
[ Select ]
Clear [ Reference::TDateDayTo ]
[ Select ]
Clear [ Reference::TDateMonthTo ]
[ Select ]
Clear [ Reference::TDateYearTo ]
[ Select ]
Clear [ Reference::FDateMonthFrom ]
[ Select ]
January 8, 平成26 18:58:55 Budget Researc... |
HelpGiveThanks/BudgetPlanner | scripts/gotoTimer.c | gotoTimer
Set Field [ MemorySwitch::budgetPath; Get (WindowName) ]
Select Window [ Name: "Tag" ]
Select Window [ Name: "Day" ]
Select Window [ Name: "Specific Action" ]
Select Window [ Name: "Timer" ]
Select Window [ Name: "HelpGiveThanks Solutions" ]
January 8, 平成26 19:13:00 Budget Research.fp7 - gotoTimer -1-
|
HelpGiveThanks/BudgetPlanner | scripts/updatePurchaseHeaderCalc.c | <filename>scripts/updatePurchaseHeaderCalc.c
updatePurchaseHeaderCalc
If [ Get (FoundCount) = 0 ]
Set Variable [ $$stopMessage; Value:1 ]
New Record/Request
Set Variable [ $delete; Value:1 ]
End If
If [ out::UpdateCalcField = "" ]
Set Field [ out::UpdateCalcField; "t" ]
Else
Set Field [ out::UpdateCalcField; "" ]
End I... |
HelpGiveThanks/BudgetPlanner | scripts/return to Purchases from Store.c | return to Purchases from Store
Go to Layout [ “PurchaseTotals4” (out) ]
January 8, 平成26 18:55:46 Budget Research.fp7 - return to Purchases from Store -1-
|
HelpGiveThanks/BudgetPlanner | scripts/insurePersonIsSelected.c | insurePersonIsSelected
If [ out::kperson = "" ]
Go to Field [ ]
If [ $$stopMessage = "" ]
Show Custom Dialog [ Message: "Select a person or group of people doing the spending."; Buttons: “OK” ]
End If
Go to Field [ out::kperson ]
[ Select/perform ]
// Go to Object [ Object Name: "person" ]
End If
January 8, 平成26 19:08:... |
HelpGiveThanks/BudgetPlanner | scripts/exit.c | exit
Go to Field [ ]
January 8, 平成26 19:09:21 Budget Research.fp7 - exit -1-
|
HelpGiveThanks/BudgetPlanner | scripts/changeDate.c | changeDate
Allow User Abort [ Off ]
Set Error Capture [ On ]
Set Variable [ $record; Value:out::_Lout ]
Set Variable [ $month; Value:out::_Lmonth ]
Set Variable [ $year; Value:out::_Lyear ]
New Window [ ]
Go to Layout [ “purchases” (Art) ]
Enter Find Mode [ ]
Set Field [ Art::kout; $record ]
Perform Find [ ]
Go to Reco... |
bricsi0000000000000/Chess | Chess/InputManager.h | #ifndef INPUT_MANAGER_H
#define INPUT_MANAGER_H
#include <iostream>
#include <string>
#include <sstream>
#include <stdlib.h>
#include <time.h>
#include <chrono>
#include <thread>
#include "GameManager.h"
#include "PieceManager.h"
#include "RuleManager.h"
#include "Grid.h"
#include "PieceType.h"
#include "Color.h"
u... |
bricsi0000000000000/Chess | Chess/Grid.h | <reponame>bricsi0000000000000/Chess
#ifndef GRID_H
#define GRID_H
#include<vector>
#include "Field.h"
#include "Position.h"
#include "PieceManager.h"
#ifdef _WIN32
#include <Windows.h>
#endif
class Grid
{
private:
std::vector<std::vector<std::shared_ptr<Field>>> grid;
PieceManager* piece_manager;
#pragma GRID... |
bricsi0000000000000/Chess | linux/Chess/PieceType.h | <filename>linux/Chess/PieceType.h
#ifndef PIECETYPE_H
#define PIECETYPE_H
enum class PieceType
{
Pawn, Rook, Knight, Bishop, Queen, King, Nothing
};
#endif // PIECETYPE_H
|
bricsi0000000000000/Chess | linux/Chess/Player.h | <filename>linux/Chess/Player.h
#ifndef PLAYER_H
#define PLAYER_H
#include <string>
#include <vector>
#include "Color.h"
#include "Piece.h"
class Player
{
private:
std::string name;
int points;
Color color;
std::vector<std::shared_ptr<Piece>> off_pieces;
bool is_bot;
std::string step_from;
std::string s... |
bricsi0000000000000/Chess | Chess/PieceType.h | <reponame>bricsi0000000000000/Chess
#ifndef PIECE_TYPE_H
#define PIECE_TYPE_H
enum class PieceType
{
Pawn, Rook, Knight, Bishop, Queen, King, Nothing
};
#endif PIECE_TYPE_H
|
bricsi0000000000000/Chess | linux/Chess/RuleManager.h | #ifndef RULEMANAGER_H
#define RULEMANAGER_H
#include <iostream>
#include <cmath>
#include "Piece.h"
#include "Position.h"
#include "PieceManager.h"
class RuleManager {
private:
~RuleManager();
RuleManager() {}
static RuleManager* instance;
public:
static RuleManager* Instance();
static bool CanStep(std::sh... |
bricsi0000000000000/Chess | Chess/Position.h | #ifndef POSITION_H
#define POSITION_H
#include<iostream>
class Position {
public:
Position(int x, int y) : x(x), y(y) {}
int x;
int y;
};
#endif POSITION_H |
bricsi0000000000000/Chess | Chess/GameManager.h | #ifndef GAME_MANAGER_H
#define GAME_MANAGER_H
#include <fstream>
#include <sstream>
#include "Player.h"
class GameManager {
private:
~GameManager();
GameManager() {}
static GameManager* instance;
bool game_over = false;
Player* player_one;
Player* player_two;
int act_player = 1;
std::stringstream all_ste... |
bricsi0000000000000/Chess | linux/Chess/PieceManager.h | #ifndef PIECEMANAGER_H
#define PIECEMANAGER_H
#include<vector>
#include<memory>
#include "Piece.h"
#include "PieceType.h"
#include "GameManager.h"
#include "Color.h"
class PieceManager {
private:
std::vector<std::shared_ptr<Piece>> pieces;
~PieceManager();
PieceManager() {}
static PieceManager* instance;
pu... |
bricsi0000000000000/Chess | Chess/Color.h | <filename>Chess/Color.h
#ifndef COLOR_H
#define COLOR_H
enum class Color
{
White, Black, Nothing
};
#endif COLOR_H
|
bricsi0000000000000/Chess | Chess/Field.h | #ifndef FIELD_H
#define FIELD_H
#include<memory>
#include "Position.h"
#include "Piece.h"
class Field
{
private:
std::shared_ptr<Position> position;
std::shared_ptr<Piece> piece;
Color color;
public:
Field(std::shared_ptr<Position> position, std::shared_ptr<Piece> piece, Color color);
std::shared_ptr<Position>... |
bricsi0000000000000/Chess | Chess/Piece.h | <filename>Chess/Piece.h
#ifndef PIECE_H
#define PIECE_H
#include<string>
#include "Position.h"
#include "Color.h"
#include "PieceType.h"
class Piece
{
private:
std::string name;
std::shared_ptr<Position> position;
Color color;
PieceType piece_type;
public:
Piece();
Piece(std::string name, std::shared_ptr<Posit... |
Dont-laugh/DLSoftRender | src/include/DLVector2.h | #pragma once
#include <cmath>
namespace DontLaugh
{
/* 2D Vector implemented by DontLaugh */
struct DLVector2
{
public:
float X;
float Y;
public:
DLVector2();
DLVector2(float InF);
DLVector2(float X, float Y);
static const DLVector2 Zero;
static const DLVector2 One;
static DLVector2 Cross(con... |
Dont-laugh/DLSoftRender | src/include/DLPoint.h | <reponame>Dont-laugh/DLSoftRender<gh_stars>0
#pragma once
namespace DontLaugh
{
/* Point implemented by DontLaugh */
struct DLPoint
{
int X;
int Y;
};
}
|
Dont-laugh/DLSoftRender | src/include/DLRenderer.h | <reponame>Dont-laugh/DLSoftRender
#pragma once
#include <functional>
#include "SDL.h"
#include "DLPoint.h"
namespace DontLaugh
{
/* Soft renderer implemented by DontLaugh */
class DLRenderer
{
public:
DLRenderer();
DLRenderer(int Width, int Height);
~DLRenderer();
void RenderLoop(const std::function<void... |
Dont-laugh/DLSoftRender | src/include/DLRect.h | #pragma once
namespace DontLaugh
{
struct DLRect
{
public:
int X;
int Y;
int Width;
int Height;
public:
DLRect();
DLRect(int X, int Y, int Width, int Height);
};
DLRect::DLRect() : X(0), Y(0), Width(0), Height(0)
{
}
DLRect::DLRect(int X, int Y, int Width, int Height) : X(X), Y(Y), Width(Width... |
Dont-laugh/DLSoftRender | src/include/DLQuat.h | #pragma once
#include "DLVector3.h"
namespace DontLaugh
{
/* Quaternion implemented by DontLaugh */
struct DLQuat
{
public:
float X;
float Y;
float Z;
float W;
public:
DLQuat();
DLQuat(float InX, float InY, float InZ, float InW);
DLQuat(DLVector3 Axis, float AngleRad);
static const DLQuat Iden... |
Dont-laugh/DLSoftRender | src/include/DLVector3.h | #pragma once
#include <cmath>
namespace DontLaugh
{
/* 3D Vector implemented by DontLaugh */
struct DLVector3
{
public:
float X;
float Y;
float Z;
public:
DLVector3();
DLVector3(float InF);
DLVector3(float X, float Y, float Z);
static const DLVector3 Zero;
static const DLVector3 One;
static... |
SNU-Programming-Tools/nballerina | runtime/tests/list_construct.c | <reponame>SNU-Programming-Tools/nballerina
#include "string_utils.h"
#include "list_utils.h"
ListDesc DESC_INT = LIST_DESC_INIT_INT_ARRAY(10);
ListDesc DESC_STRING = LIST_DESC_INIT_GENERIC(120, 1 << TAG_STRING);
HASH_DEFINE_KEY;
void testListConstructEmpty() {
ListPtr lp = _bal_list_construct_8(&DESC_INT, 0);
... |
SNU-Programming-Tools/nballerina | runtime/tests/string_len.c | #include "string_utils.h"
void validateStringSizeInt64(const uint64_t stringSize, const uint64_t headerSize, const uint64_t lengthInBytes) {
uint64_t size = lengthInBytes + headerSize;
uint64_t multiple = size / 8;
if (size % 8 != 0)
multiple++;
uint64_t expectedSize = 8 * multiple;
asse... |
SNU-Programming-Tools/nballerina | runtime/list.c | <filename>runtime/list.c
#include "balrt.h"
#include <string.h>
#define ARRAY_LENGTH_MAX ((int64_t)(INT64_MAX/sizeof(TaggedPtr)))
static inline Fillability arrayCreateFiller(ListDescPtr ldp, TaggedPtr *valuePtr) {
return _bal_structure_create_filler(ldp->restType, ldp->fillerDesc, valuePtr);
}
static inline boo... |
SNU-Programming-Tools/nballerina | runtime/decimal_inline.c | #include "balrt.h"
CompareResult READONLY _bal_opt_decimal_compare(TaggedPtr lhs, TaggedPtr rhs) {
return optDecimalCompare(lhs, rhs);
}
|
SNU-Programming-Tools/nballerina | runtime/tests/inlinert_list.c | #include "string_utils.h"
#include "list_utils.h"
#include "../balrt_inline.h"
#include <stdio.h>
ListDesc DESC_INT = LIST_DESC_INIT_INT_ARRAY(0);
ListDesc DESC_INT_NIL = LIST_DESC_INIT_GENERIC(0, 1 << TAG_INT | 1 << TAG_NIL);
ListDesc DESC_FLOAT = LIST_DESC_INIT_FLOAT_ARRAY(4);
ListDesc DESC_FLOAT_NIL = LIST_DESC_INI... |
SNU-Programming-Tools/nballerina | runtime/balrt.h | #include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <inttypes.h>
#include <stdio.h>
#include "tag.h"
#include "panic.h"
#define TAG_MASK 0xFF
#define UT_MASK 0x1F
#define TAG_SHIFT 56
#define NIL ((TaggedPtr)0)
#define COMPARE_UN -1
#define COMPARE_LT 0
#define COMPARE_EQ 1
#define COMPARE_GT 2
//... |
SNU-Programming-Tools/nballerina | runtime/boolean_inline.c | #include "balrt.h"
int64_t READONLY _bal_opt_boolean_compare(TaggedPtr lhs, TaggedPtr rhs) {
return optBooleanCompare(lhs, rhs);
}
|
SNU-Programming-Tools/nballerina | runtime/float_inline.c | <reponame>SNU-Programming-Tools/nballerina
#include "balrt.h"
TaggedPtr _bal_float_to_tagged(double n) {
return floatToTagged(n);
}
double READONLY _bal_tagged_to_float(TaggedPtr p) {
return taggedToFloat(p);
}
int64_t READONLY _bal_opt_float_compare(TaggedPtr lhs, TaggedPtr rhs) {
return optFloatCompare... |
SNU-Programming-Tools/nballerina | runtime/boolean.c | #include "balrt.h"
bool _bal_true_subtype_contains(UNUSED UniformSubtypePtr stp, TaggedPtr tp) {
return taggedToBoolean(tp) == 1;
}
bool _bal_false_subtype_contains(UNUSED UniformSubtypePtr stp, TaggedPtr tp) {
return taggedToBoolean(tp) == 0;
}
|
SNU-Programming-Tools/nballerina | runtime/decimal.c | #include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "balrt.h"
#include "third-party/decNumber/decQuad.h"
#include "third-party/dtoa/emyg_dtoa.h"
typedef GC decQuad *DecimalPtr;
// Status flags that we should treat as failure
// XXX need to investigate DEC_Underflow
#define DECIMAL_ST... |
SNU-Programming-Tools/nballerina | runtime/balrt_inline.h | <gh_stars>1-10
extern bool _bal_float_exact_eq(double, double);
extern IntWithOverflow _bal_float_to_int(double);
TaggedPtr _bal_float_to_tagged(double n);
TaggedPtr _bal_int_to_tagged(int64_t n);
CompareResult _bal_opt_int_compare(TaggedPtr lhs, TaggedPtr rhs);
CompareResult _bal_opt_float_compare(TaggedPtr lhs, Tag... |
SNU-Programming-Tools/nballerina | runtime/tests/inlinert_int.c | #include "test_utils.h"
#include "../balrt_inline.h"
void testIntNilCmp() {
TaggedPtr a = _bal_int_to_tagged(5);
TaggedPtr b = _bal_int_to_tagged(IMMEDIATE_INT_MAX + 1);
TaggedPtr c = _bal_int_to_tagged(IMMEDIATE_INT_MIN - 1);
TaggedPtr nil = getNil();
assert(_bal_opt_int_compare(a, nil) == COMPARE... |
SNU-Programming-Tools/nballerina | runtime/int_inline.c |
#include "balrt.h"
TaggedPtr _bal_int_to_tagged(int64_t n) {
return intToTagged(n);
}
int64_t READONLY _bal_tagged_to_int(TaggedPtr p) {
return taggedToInt(p);
}
int64_t _bal_opt_int_compare(TaggedPtr lhs, TaggedPtr rhs) {
return optIntCompare(lhs, rhs);
}
|
SNU-Programming-Tools/nballerina | runtime/tests/list_utils.h |
#define LIST_DESC_FUNC(kind,mid,suffix) _bal_list_ ## kind ## mid ## suffix
#define _bal_list_int_array_get_float NULL
#define _bal_list_byte_array_get_float NULL
#define _bal_list_float_array_get_int NULL
#define LIST_DESC_VTABLE(kind, inexact_set) \
LIST_DESC_FUNC(kind, _get_, tagged),\
LIST_DESC_FUNC(kind... |
imChay/Test | LibTest/CYPrint.h | <reponame>imChay/Test
//
// CYPrint.h
// LibTest
//
// Created by cy on 2018/1/14.
// Copyright © 2018年 cy. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CYPrint : NSObject
+ (void)print;
@end
|
imChay/Test | LibTest/LibTest.h | <filename>LibTest/LibTest.h
//
// LibTest.h
// LibTest
//
// Created by cy on 2018/1/14.
// Copyright © 2018年 cy. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for LibTest.
FOUNDATION_EXPORT double LibTestVersionNumber;
//! Project version string for LibTest.
FOUNDATION_EXPORT const ... |
nickolasburr/str | include/mem.h | <filename>include/mem.h
/**
* mem.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#ifndef STR_MEM_H
#define STR_MEM_H
#include "common.h"
#include "assert.h"
#include "except.h"
extern const Except_T Mem_Failed;
extern void *Mem_alloc(long nbytes, const char *file, int line);
extern void *Mem_calloc(long count, lon... |
nickolasburr/str | include/common.h | <filename>include/common.h
/**
* common.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#ifndef STR_COMMON_H
#define STR_COMMON_H
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#ifdef __APP... |
nickolasburr/str | src/argv.c | /**
* argv.c
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#include "argv.h"
static option_t options[] = {
{
"--help",
"-h",
"Show help information.",
},
{
"--version",
"-v",
"Show version number.",
},
{
"--quiet",
"-q",
"Suppress filename output.",
},
{
"--extension",
"-e",
"Set file e... |
nickolasburr/str | src/except.c | <gh_stars>0
/**
* except.c
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#include "common.h"
#include "assert.h"
#include "except.h"
#define T Except_T
Except_Frame *Except_stack = NULL;
void Except_raise (const T *e, const char *file, int line) {
Except_Frame *p = Except_stack;
assert(e);
if (is_null(p)) {
f... |
nickolasburr/str | include/main.h | <reponame>nickolasburr/str
/**
* main.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#ifndef STR_MAIN_H
#define STR_MAIN_H
#include "common.h"
#include "assert.h"
#include "except.h"
#include "argv.h"
#include "mem.h"
#include "rand.h"
#include "utils.h"
#endif /* STR_MAIN_H */
|
nickolasburr/str | include/assert.h | <reponame>nickolasburr/str
/**
* assert.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#undef assert
#ifdef NDEBUG
#define assert(e) ((void)0)
#else
#include "except.h"
extern void assert(int e);
#define assert(e) ((void)((e)||(RAISE(Assert_Failed),0)))
#endif
|
nickolasburr/str | include/rand.h | /**
* rand.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#ifndef STR_RAND_H
#define STR_RAND_H
#include "common.h"
#include "mem.h"
#define RANDSTR_MIN_LEN 8
#define RANDSTR_CHARSET "0123456789abcdefghijklmnopqrstuvwxyz"
char *randstr(size_t);
#endif /* STR_RAND_H */
|
nickolasburr/str | include/error.h | /**
* error.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#ifndef STR_ERROR_H
#define STR_ERROR_H
int is_error(int, int);
#endif /* STR_ERROR_H */
|
nickolasburr/str | src/rand.c | <reponame>nickolasburr/str
/**
* rand.c
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
* Adapted from https://tinyurl.com/vy8ygj2
*/
#include "rand.h"
char *randstr(size_t length) {
size_t index, key;
char *buf = NULL;
if (length < RANDSTR_MIN_LEN) {
length = RANDSTR_MIN_LEN;
}
buf = ALLOC(length + NULL_BYTE);
... |
nickolasburr/str | src/mem.c | <filename>src/mem.c<gh_stars>0
/**
* mem.c
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#include "mem.h"
const Except_T Mem_Failed = {
"Allocation Failed"
};
void *Mem_alloc (long nbytes, const char *file, int line) {
void *ptr;
assert(nbytes > 0);
ptr = malloc(nbytes);
if (is_null(ptr)) {
if (is_null(file... |
nickolasburr/str | src/main.c | <reponame>nickolasburr/str<filename>src/main.c
/**
* main.c
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#include "main.h"
int main (int argc, char **argv) {
int error, index, quiet, value;
size_t length;
ssize_t read;
FILE *file = NULL;
char *extn = NULL,
*line = NULL,
*base = NULL,
*name = NULL;
... |
nickolasburr/str | src/assert.c | /**
* assert.c
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#include "assert.h"
const Except_T Assert_Failed = {
"Assertion failed"
};
void (assert)(int e) {
assert(e);
}
|
nickolasburr/str | include/argv.h | <gh_stars>0
/**
* argv.h
*
* Copyright (C) 2020 <NAME> <<EMAIL>>
*/
#ifndef STR_ARGV_H
#define STR_ARGV_H
#include "common.h"
#include "error.h"
#include "utils.h"
#define NUM_OPTS 4
#define OPT_ARGS "hvqe:"
typedef struct {
char *value;
char *alias;
char *desc;
} option_t;
static option_t options[NUM_OPTS];... |
scheibo/dat | ext/logic/logic.c | <reponame>scheibo/dat
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include "ruby.h"
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define ASCII_A 65
#define ALPHABET_SIZE 26
/* only allow strings up to length of 30 */
#define SIZE_BYTES 32
/* save space by s... |
1Basile/pseudorandom_number_generators | extended_grade_common_devider_alg.h | <reponame>1Basile/pseudorandom_number_generators<gh_stars>0
#ifndef EXTENDED_GRADE_COMMON_DEVIDER_ALG_IMMPORTED
#define EXTENDED_GRADE_COMMON_DEVIDER_ALG_IMMPORTED
// C function for extended Euclidean Algorithm
int ext_gcd(int a, int b, int* x, int* y)
{
// Base Case
if (a == 0) {
*x = 0;
... |
1Basile/pseudorandom_number_generators | ratio_method_generator.h | #ifndef RATIO_METHOD_GENERATOR_IMPORTED
#define RATIO_METHOD_GENERATOR_IMPORTED
#include "linear_congruential_generator.h"
#include <math.h>
// #define rat_rand(...) rat_rand_predef((inner_func_params_t){__VA_ARGS__})
#ifndef inner_func_params_t_defined
#define inner_func_params_t_defined
typedef struct {
unsigned... |
1Basile/pseudorandom_number_generators | quadratic_congruential_generator.h | #ifndef QUADRATIC_CONGRUENTIAL_GENERATOR_IMPORTED
#define QUADRATIC_CONGRUENTIAL_GENERATOR_IMPORTED
double qcg_rand(void) {
static unsigned long int step = 11;
static const unsigned int a = 85;
static const unsigned int c = 139;
static const unsigned int m = 3539;
static const unsigned int d = 252; /* 0, 84... |
1Basile/pseudorandom_number_generators | log_method_for_exponential_distribution_generator.h | #ifndef LOG_METHOD_FOR_EXPONENTIAL_DISTRIBUTION_GENERATOR_IMPORTED
#define LOG_METHOD_FOR_EXPONENTIAL_DISTRIBUTION_GENERATOR_IMPORTED
#include "linear_congruential_generator.h"
#include <math.h>
// #define log_exp_rand(...) log_exp_rand_predef((inner_func_params_t){__VA_ARGS__})
#ifndef inner_func_params_t_defined
#... |
1Basile/pseudorandom_number_generators | arensa_method_for_gamma_distribution_generator.h | <reponame>1Basile/pseudorandom_number_generators
#ifndef ARENSA_METHOD_FOR_GAMMA_DISTRIBUTION_GENERATOR_IMPORTED
#define ARENSA_METHOD_FOR_GAMMA_DISTRIBUTION_GENERATOR_IMPORTED
#include "linear_congruential_generator.h"
#include <math.h>
// #define arensa_gamma_rand(...) arensa_gamma_rand_predef((inner_func_params_t)... |
1Basile/pseudorandom_number_generators | simga_3_normal_distribution_generator.h | <reponame>1Basile/pseudorandom_number_generators<gh_stars>0
#ifndef SIGMA_3_NORMAL_DISTRIBUTION_GENERATOR_IMPORTED
#define SIGMA_3_NORMAL_DISTRIBUTION_GENERATOR_IMPORTED
#include "linear_congruential_generator.h"
#include "./quadratic_congruential_generator.h"
/* #define sig_3_n_rand(...) sig_3_n_rand_predef((inner_f... |
1Basile/pseudorandom_number_generators | fibonacci_number_generator.h | <reponame>1Basile/pseudorandom_number_generators
#ifndef FIBONACCI_NUMBER_GENERATOR_IMPORTED
# define FIBONACCI_NUMBER_GENERATOR_IMPORTED
// #define fib_next_num(...) fib_next_num_predef((inner_func_params_t){__VA_ARGS__})
#ifndef inner_func_params_t_defined
#define inner_func_params_t_defined
typedef struct {
unsi... |
1Basile/pseudorandom_number_generators | polar_coordinates_normal_distribution_generator.h | <reponame>1Basile/pseudorandom_number_generators
#ifndef POLAR_COORDINATES_NORMAL_DISTRIBUTION_GENERATOR_IMPORTED
#define POLAR_COORDINATES_NORMAL_DISTRIBUTION_GENERATOR_IMPORTED
#include "linear_congruential_generator.h"
#include <math.h>
#include <stdio.h>
// #define pol_coord_n_rand(...) pol_coord_n_rand_predef((i... |
1Basile/pseudorandom_number_generators | reverse_congruential_generator.h | <filename>reverse_congruential_generator.h
#ifndef REVERSE_CONGRUENTIAL_GENERATOR_IMPORTED
#define REVERSE_CONGRUENTIAL_GENERATOR_IMPORTED
#include "mod_inverse_alg.h"
double rcg_rand_base(unsigned char to_normalize) {
static unsigned int a = 69;
static unsigned int c = 4358;
static unsigned int p = 91193;
s... |
1Basile/pseudorandom_number_generators | linear_congruential_generator.h | #ifndef LINEAR_CONGRUENTIAL_GENERATOR_IMPORTED
#define LINEAR_CONGRUENTIAL_GENERATOR_IMPORTED
double lcg_rand_base(unsigned char to_normalize) {
static unsigned long int step = 1;
static const unsigned int a = 84589;
static const unsigned int c = 45989;
static const unsigned int m = 217728;
step = (a * step ... |
1Basile/pseudorandom_number_generators | union_method_generator.h | #ifndef UNINON_METHOD_GENERATOR_IMPORTED
#define UNINON_METHOD_GENERATOR_IMPORTED
#include "linear_congruential_generator.h"
#include "quadratic_congruential_generator.h"
/* #define un_rand(...) un_rand_predef((inner_func_params_t){__VA_ARGS__}) */
#ifndef inner_func_params_t_defined
#define inner_func_params_t_defin... |
1Basile/pseudorandom_number_generators | test_algorithms.c | #include<stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "linear_congruential_generator.h"
#include "quadratic_congruential_generator.h"
#include "fibonacci_number_generator.h"
#include "reverse_congruential_generator.h"
#include "union_method_generator.h"
#include "si... |
1Basile/pseudorandom_number_generators | mod_inverse_alg.h | <gh_stars>0
#ifndef MOD_INVERSE_ALG_IMPORTED
#include "extended_grade_common_devider_alg.h"
#define MOD_INVERSE_ALG_IMPORTED
// Function to find modulo inverse of a
int mod_inverse(int a, int m)
{
int x, y;
int g = ext_gcd(a, m, &x, &y);
if (g != 1)
return -1; // Error: it`s impossible to fin... |
IT1050-2022-Feb/tutorial-01-IT21262418 | Tute03.c | <reponame>IT1050-2022-Feb/tutorial-01-IT21262418<gh_stars>0
/*Exercise 3 - Repetition
Write a C program to calculate the sum of the numbers from 1 to n.
Where n is a keyboard input.
e.g.
n -> 100
sum = 1+2+3+....+ 99+100 = 5050
n -> 1-
sum = 1+2+3+...+10 = 55 */
#include <stdio.h>
int main() {
int number;
int... |
TuoniTuoni/git_notes | hello.c | <gh_stars>0
print('nihao')
return
return
return
return
return |
zbigg/sandbox | task_queue.h | <gh_stars>0
#ifndef simple_async_engine_h_included
#define simple_async_engine_h_included
#include <queue>
///
/// Simple async engine
///
/// Single threaded async engine that queues
/// callbacks and calls them in order from main loop.
///
class task_queue {
//
// async impl
//
std::queue<std::funct... |
zbigg/sandbox | lazy_byte_consumer.h | <gh_stars>0
//
// Copyright (C) 2008 <NAME> <<EMAIL>>,
// licensed to the public under the terms of the GNU GPL (>= 2)
// see the file COPYING for details
// I.e., do what you like, but keep copyright and there's NO WARRANTY.
//
#ifndef tinfra_lazy_byte_consumer_h_included__
#define tinfra_lazy_byte_consumer_h_include... |
zbigg/sandbox | tarray.h | <reponame>zbigg/sandbox
#ifndef tinfra_tarray_h_included
#define tinfra_tarray_h_included
#include <stdexcept> // for std::out_of_range
namespace tinfra {
/** Array view - an non-owning STL compatible object array
Access modeled after std::vector and std::array.
Limited to "access" only methods.
Doesn't... |
zbigg/sandbox | atomic_transaction.h | <reponame>zbigg/sandbox
template <typename T, typename Rest...>
class atomic_transaction: public atomic_transaction<Rest...> {
private:
T* rv;
T copy;
atomic_transaction(T& v, Rest... args):
atomic_transaction(Rest...),
rv(v),
copy(
{
}
}; |
zbigg/sandbox | interruptible.h | //
// Copyright (C) 2008 <NAME> <<EMAIL>>,
// licensed to the public under the terms of the GNU GPL (>= 2)
// see the file COPYING for details
// I.e., do what you like, but keep copyright and there's NO WARRANTY.
//
#ifndef tinfra_interruptible_h_included__
#define tinfra_interruptible_h_included__
#includ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.