repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
patil215/v8
src/objects/slots-inl.h
<reponame>patil215/v8 // 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_SLOTS_INL_H_ #define V8_OBJECTS_SLOTS_INL_H_ #include "src/objects/slots.h" #include "src/base/atomic-utils.h...
patil215/v8
src/ptr-compr-inl.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_PTR_COMPR_INL_H_ #define V8_PTR_COMPR_INL_H_ #if V8_TARGET_ARCH_64_BIT #include "src/objects/heap-object-inl.h" #include "src/ptr-compr.h" ...
patil215/v8
src/objects/builtin-function-id.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_OBJECTS_BUILTIN_FUNCTION_ID_H_ #define V8_OBJECTS_BUILTIN_FUNCTION_ID_H_ #include <stdint.h> namespace v8 { namespace internal { // List o...
patil215/v8
src/torque/declaration-visitor.h
// 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_TORQUE_DECLARATION_VISITOR_H_ #define V8_TORQUE_DECLARATION_VISITOR_H_ #include <set> #include <string> #include "src/base/macros.h" #inclu...
patil215/v8
src/builtins/builtins-typed-array-gen.h
<reponame>patil215/v8 // 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_BUILTINS_BUILTINS_TYPED_ARRAY_GEN_H_ #define V8_BUILTINS_BUILTINS_TYPED_ARRAY_GEN_H_ #include "src/code-stub-assembler...
patil215/v8
src/typer-happy.h
#include <vector> #include <string> #include "src/conversions-inl.h" #include "src/compiler/types.h" #include "src/date.h" #include "src/globals.h" #ifndef V8_TYPER_HAPPY_H_ #define V8_TYPER_HAPPY_H_ namespace v8 { namespace internal { template <typename T> class Check { public: int id; const char * module;...
patil215/v8
src/parsing/preparse-data.h
// 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_PARSING_PREPARSE_DATA_H_ #define V8_PARSING_PREPARSE_DATA_H_ #include "src/globals.h" #include "src/handles.h" #include "src/maybe-handles.h...
patil215/v8
src/objects/js-generator.h
<gh_stars>1-10 // 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_GENERATOR_H_ #define V8_OBJECTS_JS_GENERATOR_H_ #include "src/objects/js-objects.h" #include "src/objects/struct.h...
patil215/v8
src/hash-seed-inl.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_HASH_SEED_INL_H_ #define V8_HASH_SEED_INL_H_ #include <stdint.h> // The #includes below currently lead to cyclic transitive includes, so //...
patil215/v8
src/cov.h
<gh_stars>0 #ifndef V8_COV_H_ #define V8_COV_H_ void __sanitizer_cov_reset_edgeguards(); #endif
patil215/v8
src/objects/oddball.h
<filename>src/objects/oddball.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_OBJECTS_ODDBALL_H_ #define V8_OBJECTS_ODDBALL_H_ #include "src/objects/heap-object.h" // Has to be the last...
patil215/v8
test/cctest/heap/heap-utils.h
// Copyright 2016 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 HEAP_HEAP_UTILS_H_ #define HEAP_HEAP_UTILS_H_ #include "src/api-inl.h" #include "src/heap/heap.h" namespace v8 { namespace internal { namespac...
patil215/v8
src/snapshot/deserializer.h
<gh_stars>0 // Copyright 2016 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_SNAPSHOT_DESERIALIZER_H_ #define V8_SNAPSHOT_DESERIALIZER_H_ #include <vector> #include "src/objects/allocation-site.h" #includ...
patil215/v8
src/thread-id.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_THREAD_ID_H_ #define V8_THREAD_ID_H_ #include "src/base/atomicops.h" namespace v8 { namespace internal { // Platform-independent, reliable...
patil215/v8
src/objects/embedder-data-array-inl.h
<reponame>patil215/v8<filename>src/objects/embedder-data-array-inl.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_OBJECTS_EMBEDDER_DATA_ARRAY_INL_H_ #define V8_OBJECTS_EMBEDDER_DATA_ARRA...
stephengaito/cGoTestGenerator
cGoTestGenerator/templates/cGoTests.h
<reponame>stephengaito/cGoTestGenerator // +build cGoTests /// \file /// \brief This ANSI-C Header file provides the ANSI-C based cGoTest testing /// framework. /// /// Package description: /// {{ .BriefDesc }} /// /// This file is automatically (re)generated changes made to this file will /// be lost. #ifndef ...
stephengaito/cGoTestGenerator
tests/SimpleCGoTest.c
// +build cGoTests // A simple cGoTest #include "_cgo_export.h" #include "testsCGoTests.h" #include "cGoTests.h" /// \testFixture testFixture A test fixture /// \brief Setup the testFixture /// \inFixture testFixture /// void *testFixtureCGoTestSetup(void) { return NULL; } /// \brief Tear down the testFixture //...
stephengaito/cGoTestGenerator
cGoTestGenerator/templates/packageCGoTests.h
// +build cGoTests /// \file /// \brief This ANSI-C Header file provides the ANSI-C based cTest testing /// framework for the {{ .Name }} GoLang Package. /// /// Package description: /// {{ .BriefDesc }} /// /// This file is automatically (re)generated changes made to this file will /// be lost. #ifndef {{ .Nam...
stephengaito/cGoTestGenerator
cGoTestGenerator/templates/cGoTestsUtils.c
<reponame>stephengaito/cGoTestGenerator // +build cGoTests /// \file /// \brief This ANSI-C Header file provides the ANSI-C based cGoTest testing /// framework. /// /// Package description: /// {{ .BriefDesc }} /// /// This file is automatically (re)generated changes made to this file will /// be lost. #include...
webispy/ocf_mylight
ocf_mylight_configuration.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include "ocf_mylight.h" struct conf_data { char *name; double loc[2]; char *locn; char *currency; char *region; }; static struct conf_data _cd; static OCResourceHandle _confhandle; static size_t _loc_dimensions[MA...
webispy/ocf_mylight
ocf_mylight_light.c
#ifdef __TIZENRT__ #include <tinyara/config.h> #include <tinyara/gpio.h> #endif #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include "ocf_mylight.h" struct light_resource { OCResourceHandle handle; bool value; char *uri; int gpio; }; static struct light_reso...
webispy/ocf_mylight
ocf_mylight_device.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include "ocf_mylight.h" static OCDeviceInfo _di = { .specVersion = "ocf.1.1.0" }; static OCEntityHandlerResult on_get(OCEntityHandlerFlag flag _UNUSED_, OCEntityHandlerRequest *req _UNUSED_, char *uri _UNUSED_, void *user_data _UNUS...
webispy/ocf_mylight
ocf_mylight.h
#ifndef __MYOCF_H__ #define __MYOCF_H__ #include <iotivity_config.h> #include <platform_features.h> #include <ocstack.h> #include <logger.h> #include <ocpayload.h> #define _UNUSED_ __attribute__((unused)) #define DBG(fmt,args...) fprintf(stdout, "\e[1;32m<%s:%d> " fmt "\e[0m\n", __FILE__, __LINE__, ##args) #define M...
webispy/ocf_mylight
ocf_mylight_userinput.c
<filename>ocf_mylight_userinput.c<gh_stars>1-10 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <sys/types.h> #include "ocf_mylight.h" static void on_signal_1(int signo) { bool status; MSG("SIGUSR1(%d) - toggle /a/light/0", signo); if...
webispy/ocf_mylight
ocf_mylight_notify.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <errno.h> #include "ocf_mylight.h" #define MAX_SLOT 8 struct notify_slot { bool active; OCObservationId id; }; static struct notify_slot slots[2][MAX_SLOT]; static pthread_t _notify_tid; static pthread_mu...
webispy/ocf_mylight
ocf_mylight_security.c
<reponame>webispy/ocf_mylight #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include "ocf_mylight.h" #include <pinoxmcommon.h> static FILE* on_open(const char *path, const char *mode) { DBG("open: path=%s, mode=%s", path, mode); return fopen(path, mode); } stati...
webispy/ocf_mylight
ocf_mylight_maintenance.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include "ocf_mylight.h" static OCResourceHandle _mnthandle; static bool _fr; static bool _rb; static OCEntityHandlerResult on_get(OCEntityHandlerFlag flag _UNUSED_, OCEntityHandlerRequest *req, void *user_data _UNUS...
webispy/ocf_mylight
ocf_mylight_verbose.c
<reponame>webispy/ocf_mylight #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include "ocf_mylight.h" struct num_str { int number; char *str; }; /** * CoAP Option Numbers * http://www.iana.org/assignments/core-parameters/core-parameters.xhtml */ static struct num_str _coap_option...
webispy/ocf_mylight
ocf_mylight_main.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include "ocf_mylight.h" static int gQuitFlag = 0; static int server_cb(int argc _UNUSED_, char *argv[] _UNUSED_) { MSG("IoTivity Demo - IOTIVITY version is %s", IOTIVITY_VERSION); MSG("OCF My Light Server is starting....
webispy/ocf_mylight
ocf_mylight_platform.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include "ocf_mylight.h" static OCPlatformInfo platformInfo = { .platformID = "C0FFEE00-BAB0-FACE-B00C-00BA5EBA1100", .manufacturerName = "GeekRedLed", .manufacturerUrl = "http://geekredled.com", .modelNumber = "A053LIGHT0", .dateOfMa...
miklhh/Othello
othello/othello-ai.h
<reponame>miklhh/Othello /* * Class AI. * This is the othello ai. For the record it only has one important method, * alphabeta. This is going to be wider later on. * * Good settings for the AI: (Updated 2016-06-16) * Good settings for the AI: (Updated 2019-04-13) * 1. Let the search depth be around 7 in alpha...
miklhh/Othello
othello/othello-game.h
<gh_stars>1-10 /* * This class represents a game of othello. It contains all the data and * functionallity requiered to play a game of othello. It has some extra methods * to ease the work for the AI. * * Public Methods: * -- bool makeMove(x,y,color) Use this method to make a move. * -- bool testLegitMove(...
miklhh/Othello
othello/othello-board.h
/* * This header file holds all the 'low-level' physical data that the othello/ * reversi game uses. The class board and neighbourBoard is used for storing the * moves and neighbours in. */ #ifndef _OTHELLO_BOARD_H #define _OTHELLO_BOARD_H enum class piece { EMPTY, // EMPTY WHITE, // WHITE BLACK, ...
miklhh/Othello
frontend/frontend.h
<reponame>miklhh/Othello /* * Frontend for othello game. */ #include "../othello/othello-board.h" #include <SFML/Graphics.hpp> #include <utility> #include "../othello/moves.h" class frontend { public: frontend(); ~frontend() = default; // Methods: void drawBoard(const board &b); void drawUI(pie...
miklhh/Othello
othello/moves.h
/* * Data structure to help store a set of moves throughtout the game. Is was some * sort of homemade jumbo-mombo in the original game, but the deque does its job * (and more) better, so now it's just an alias for the std::deque. */ #ifndef _MOVES_H #define _MOVES_H #include <utility> #include <deque> using Game...
groomsy/custom-font-loading-demo
FontTest/PreviewViewController.h
// // PreviewViewController.h // FontTest // // Created by <NAME> on 10/30/14. // Copyright (c) 2014 GroomsyDev. All rights reserved. // @import UIKit; @interface PreviewViewController : UIViewController @property (nonatomic, assign, getter=shouldLoadWithFontDescriptor) BOOL loadWithFontDescriptor; @property (n...
groomsy/custom-font-loading-demo
FontTest/HomeViewController.h
// // HomeViewController.h // FontTest // // Created by <NAME> on 10/30/14. // Copyright (c) 2014 GroomsyDev. All rights reserved. // @import UIKit; @interface HomeViewController : UIViewController @end
groomsy/custom-font-loading-demo
FontTest/AppDelegate.h
<reponame>groomsy/custom-font-loading-demo // // AppDelegate.h // FontTest // // Created by <NAME> on 10/30/14. // Copyright (c) 2014 GroomsyDev. All rights reserved. // @import UIKit; @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
raduMMR/HE_Bioinformatics
HE_Image.h
#pragma once #include <iostream> #include <vector> #include "seal.h" using namespace std; using namespace seal; class HE_Image { EncryptionParameters parms; mutable PolyCRTBuilder crtbuilder; /* @brief dimensiunea kernelului */ int kernel_size; public: HE_Image(EncryptionParameters &parms, int kernel_size); ...
raduMMR/HE_Bioinformatics
basic_examples.h
#pragma once #include <iostream> #include <string> #include <seal.h> using namespace std; using namespace seal; /* SEAL original examples*/ void example_basics(); void example_weighted_average(); void example_parameter_selection(); void example_batching(); void print_example_banner(string title); /* MMR's helper func...
raduMMR/HE_Bioinformatics
Hom_Conv.h
#pragma once #include <iostream> #include <vector> #include <fstream> #include "seal.h" using namespace std; using namespace seal; class Hom_Conv { EncryptionParameters parms; BigPoly public_key; BigPoly secret_key; EvaluationKeys evaluation_keys; vector<BigPoly> filter; public: Hom_Conv(vector<string> key_f...
raduMMR/HE_Bioinformatics
HE_Signal.h
<gh_stars>0 #pragma once #include <iostream> #include <vector> #include "seal.h" using namespace std; using namespace seal; class HE_Signal { protected: EncryptionParameters parms; BigPoly *secret_key; BigPoly *public_key; EvaluationKeys *evaluation_keys; public: HE_Signal(const char* poly_modulus = "1x^2048 +...
raduMMR/HE_Bioinformatics
HE_Batch_Signal.h
<gh_stars>0 #pragma once #include "HE_Signal.h" class HE_Batch_Signal : public HE_Signal { size_t slot_count; mutable int window_size; PolyCRTBuilder *crtbuilder; /* @brief coeficientii filtrului criptati intr-un ctxt se afla impachetat un coeficient al filtrului de slots ori _____________________...
raduMMR/HE_Bioinformatics
MyTimer.h
<reponame>raduMMR/HE_Bioinformatics<gh_stars>0 #pragma once #include <Windows.h> class MyTimer { LARGE_INTEGER frequency; LARGE_INTEGER start; LARGE_INTEGER end; public: void start_timer(); double stop_timer(); };
kasoki/pebble-fancywatch
src/main.c
#include <pebble.h> #include "weather.h" #define EVENT_TYPE 0 #define IMAGE_SIZE 55 #define NUMBER_OF_IMAGES 9 #define TIME_POS_Y 25 #define DATE_POS_Y TIME_POS_Y + 52 #define WEATHER_POS_Y DATE_POS_Y + 33 // 28 (old value) const int WEATHER_IMAGE_RESOURCE_IDS[NUMBER_OF_IMAGES] = { RESOURCE_ID_CLEAR_DAY, RESOURCE...
kasoki/pebble-fancywatch
src/weather.h
#ifndef __FW_WEATHER_H__ #define __FW_WEATHER_H__ enum { WEATHER_MESSAGE_ICON_ID = 1, WEATHER_MESSAGE_TEMP_KELVIN = 2, WEATHER_MESSAGE_TEMP_CELSIUS = 3, WEATHER_MESSAGE_TEMP_FAHRENHEIT = 4 }; enum { WEATHER_CONFIGURATION_IDENT_CELSIUS = 0, WEATHER_CONFIGURATION_IDENT_FAHRENHEIT = 1, WEATHER_CONFIGURATION_IDENT...
lanserxt/AGToggleFieldSet
AGToggleFieldSetView/AGToggleFieldSetView.h
// // AGToggleFieldSetView.h // ToggleFieldSets // // Created by <NAME> on 05.03.15. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> typedef enum { AGToggleTablesVertical = 0, AGToggleTablesHorizontal = 1 }AGToggleTablesOrientation; typedef enum { AGToggleButtonsPosition...
RIKEN-LQCD/qws
get_tofu_coord_openY.c
<reponame>RIKEN-LQCD/qws<gh_stars>1-10 //**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <...
RIKEN-LQCD/qws
get_tofu_coord_common.h
//**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // // // All rights reserved....
RIKEN-LQCD/qws
timing.c
//**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // // // All rights reserved....
RIKEN-LQCD/qws
ddd_out_h.h
//**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // // // All rights reserved....
RIKEN-LQCD/qws
timing.h
//**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // // // All rights reserved....
RIKEN-LQCD/qws
rdma_comlib_2buf.h
<reponame>RIKEN-LQCD/qws //**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // //...
RIKEN-LQCD/qws
get_tofu_coord_common.c
//**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // // // All rights reserved....
RIKEN-LQCD/qws
rankmap_lib_utofu.c
<gh_stars>1-10 //**************************************************************************************** // // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2015-2020, <NAME> <<EMAIL>> // Copyright (c) 2018-2020, <NAME> <<EMAIL>> // Copyright (c) 2019-2020, <NAME> <<EMAIL>> // // // All r...
caiomcg/OS-SchedulingSimulation
include/FCFS.h
<filename>include/FCFS.h /** * @class FCFS * * @brief First-Come, First-Served algorithm simulation class * * This Class is responsible for receiving a std::vector of Processes * and run the FCFS algorithm over the input. The user can request the * average response time, the average return time and the average w...
caiomcg/OS-SchedulingSimulation
include/Utils.h
<filename>include/Utils.h /** * @brief The utils namespace implements useful functions for debugging * * The utils namespace is composed of functions used for extracting * data from files or printing the processes allocated in a std::vector. * * @note Utils function may not be used on the algorithms implementati...
caiomcg/OS-SchedulingSimulation
include/Process.h
/** * @class Process * * @brief Process simulation class * * This Class is responsible for simulating a process. The * process concists of an arrival time, the process time span * and the program counter for the process. * * @author <NAME> <<EMAIL>> */ #ifndef PROCESS_H_ #define PROCESS_H_ class Process { p...
caiomcg/OS-SchedulingSimulation
include/RR.h
/** * @class RR * * @brief Round Robin algorithm simulation class * * This Class is responsible for receiving a std::vector of Processes * and run the RR algorithm over the input. The user can request the * average response time, the average return time and the average wait * time using getters or the toString ...
davidcostadev/ufrn-itp
src/aula_10_exercice_03.c
<filename>src/aula_10_exercice_03.c #include <stdio.h> int main() { float celsius; printf("Celsius: "); scanf("%f", &celsius); float kelvin = celsius + 273.15; printf("Kelvin: %f\n", kelvin); return 0; }
davidcostadev/ufrn-itp
src/aula_09_exercice_05.c
#include <stdio.h> int main() { int number; printf("Digite um número: "); scanf("%d", &number); int dividers = 0; int i = 1; while (i <= number) { if (number % i == 0) { printf("- %d é divisor;\n", i); dividers++; } i++; } if (dividers) { printf("%d\n", dividers)...
davidcostadev/ufrn-itp
src/uri_1017.c
// https://www.urionlinejudge.com.br/judge/en/runs/add/1017 #include <stdio.h> int main() { int hours, average_speed; scanf("%d", &hours); scanf("%d", &average_speed); float liters_per_km = 12; float liters = (hours * average_speed) / liters_per_km; printf("%.3f\n", liters); return 0; }
davidcostadev/ufrn-itp
src/uri_1014.c
// https://www.urionlinejudge.com.br/judge/en/problems/view/1014 #include <stdio.h> int main() { int distance; float liters; scanf("%d", &distance); scanf("%f", &liters); float liters_per_km = distance / liters; printf("%.3f km/l\n", liters_per_km); return 0; }
davidcostadev/ufrn-itp
src/aula_09_exercice_03.c
<reponame>davidcostadev/ufrn-itp<gh_stars>1-10 #include <stdio.h> int main() { int A, B; printf("A: "); scanf("%d", &A); printf("B: "); scanf("%d", &B); int w = A; int sum = 0; while(w <= B) { sum += w; w++; } printf("SUM=%d\n", sum); return 0; }
davidcostadev/ufrn-itp
src/aula_08_exercice_01.c
#include <stdio.h> int main() { double a, b; printf("Enter with a 1ª number:\n"); scanf("%lf", &a); printf("Enter with a 2ª number:\n"); scanf("%lf", &b); printf("%lf\n", a + b); return 0; }
davidcostadev/ufrn-itp
src/aula_07_exercice_01.c
#include <stdio.h> int main() { int number; scanf("%d", &number); printf("sucessor: %d\n", number - 1); printf("antecessor: %d\n", number + 1); return 0; }
davidcostadev/ufrn-itp
src/aula_08_exercice_05.c
<reponame>davidcostadev/ufrn-itp<gh_stars>1-10 #include <stdio.h> int main() { float aline = 9; float mario = 10; float sergio = 4.5; float paulo = 7; printf("|NOME\t| NOTA|\n"); printf("+=======+=====|\n"); printf("|ALINE\t|% 5.1f|\n", aline); printf("|MARIO\t|% 5.1f|\n", mario); printf("|SERGIO\t...
davidcostadev/ufrn-itp
src/uri_1016.c
<reponame>davidcostadev/ufrn-itp // https://www.urionlinejudge.com.br/judge/en/problems/view/1016 #include <stdio.h> int main() { int km; scanf("%d", &km); int minutes_distance = km * 2; printf("%d minutos\n", minutes_distance); return 0; }
davidcostadev/ufrn-itp
src/uri_1010.c
// https://www.urionlinejudge.com.br/judge/en/problems/view/1010 #include <stdio.h> int main() { int id, unit; float price; float total = 0; scanf("%d %d %f", &id, &unit, &price); total += unit * price; scanf("%d %d %f", &id, &unit, &price); total += unit * price; printf("VALOR A PAGAR: R$ %.2f\n", ...
davidcostadev/ufrn-itp
src/aula_08_exercice_04.c
<filename>src/aula_08_exercice_04.c #include <stdio.h> int main() { char option = 'p'; printf("Enter 'P' to show a pine and 'S' to show a squade. [P/S]\n"); scanf("%c", &option); if (option == 'P' || option == 'p') { printf(" X\n"); printf(" XXX\n"); printf(" XXXXX\n"); prin...
davidcostadev/ufrn-itp
src/uri_1015.c
// https://www.urionlinejudge.com.br/judge/en/problems/view/1015 #include <stdio.h> #include <math.h> double distance(double x1, double x2, double y1, double y2) { return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)); } int main() { double x1, x2, y1, y2; scanf("%lf %lf", &x1, &y1); scanf("%lf %lf", &x2, &y2); ...
davidcostadev/ufrn-itp
src/aula_12.c
<gh_stars>1-10 #include <stdio.h> int main() { int const MED = 10; int vet[MED]; for (int i = 0; i < MED; i++) vet[i] = 0; for (int i = 0; i < MED; ++i) { printf("%i\n", vet[i]); } vet[15] = 333; char letras[5] = {'d', 'a', 'v', 'i', 'd'}; for (int i = 0; i < 5; i++) { printf("%c"...
davidcostadev/ufrn-itp
src/aula_09_exercice_01.c
#include <stdio.h> int main() { int numbers; printf("N: "); scanf("%d", &numbers); printf("--- WHILE ---\n"); int w = numbers; while (w <= 0) { printf("W = %d\n", w); w++; } printf("--- FOR ---\n"); for (int i = numbers; i < 0; i++) { printf("F = %d\n", i); } return 0; }
davidcostadev/ufrn-itp
src/uri_1011.c
<gh_stars>1-10 // https://www.urionlinejudge.com.br/judge/en/problems/view/1011 #include <stdio.h> #include <math.h> int main() { double radius; scanf("%lf", &radius); double PI = 3.14159; double calc = (4 / 3.0) * PI * pow(radius, 3); printf("VOLUME = %.3lf\n", calc); return 0; }
davidcostadev/ufrn-itp
src/aula_09_exercice_04.c
#include <stdio.h> int main() { int number = 0; while (number < 1 || number > 5) { printf("Digite um número de 1 à 5: "); scanf("%d", &number); if (number < 1 || number > 5) { printf("Error: número inválido.\n"); } } printf("N = %d\n", number); return 0; }
davidcostadev/ufrn-itp
src/aula_10_exercice_02.c
#include <stdio.h> int main() { float fahrenheit; printf("Fahrenheit: "); scanf("%f", &fahrenheit); float celsius = (fahrenheit - 32) * 5.0 / 9.0; printf("Celsius: %f\n", celsius); return 0; }
davidcostadev/ufrn-itp
src/aula_08_exercice_02.c
#include <stdio.h> int main() { double a, b, c; printf("Enter with a 1ª number:\n"); scanf("%lf", &a); printf("Enter with a 2ª number:\n"); scanf("%lf", &b); printf("Enter with a 3ª number:\n"); scanf("%lf", &c); printf("%lf\n", a * c); if (a == 0) { printf("Error: You can't divide %lg by Ze...
davidcostadev/ufrn-itp
src/uri_1013.c
<reponame>davidcostadev/ufrn-itp // https://www.urionlinejudge.com.br/judge/en/problems/view/1013 #include <stdio.h> #include <stdlib.h> int diff_numbers(int x, int y) { return (x + y + abs(x - y)) / 2; } int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); int a_b = diff_numbers(a, b); int a_c = diff...
davidcostadev/ufrn-itp
src/aula_10_exercice_05.c
<reponame>davidcostadev/ufrn-itp<gh_stars>1-10 #include <stdio.h> float fahrenheitToCelsius(float fahrenheit) { return (fahrenheit - 32) * 5.0 / 9.0; } float celsiusToFahrenheit(float celsius) { return celsius * (9.0 / 5.0) + 32.0; } float kelvinToCelsius(float kelvin) { return kelvin - 273.15; } float celsiu...
davidcostadev/ufrn-itp
src/aula_08.c
<reponame>davidcostadev/ufrn-itp<filename>src/aula_08.c #include <stdio.h> int main() { int a = 1; int b = 4; while (a < b) { printf("%i\n", a); a++; } return 0; }
davidcostadev/ufrn-itp
src/exercise_03.c
<filename>src/exercise_03.c #include <stdio.h> void exercise_03() { printf("Exercício 03\n"); float fahrenheit; printf("Fahrenheit: "); scanf("%f", &fahrenheit); float celsius = (fahrenheit - 32) * 5 / 9; printf("CELSIUS= %f\n", celsius); } int main() { exercise_03(); return 0; }
davidcostadev/ufrn-itp
src/exercise_02.c
#include <stdio.h> void exercise_02() { printf("Exercício 02\n"); float distance; float liters; printf("Distância em KM: "); scanf("%f", &distance); printf("Litros: "); scanf("%f", &liters); float liter_per_km = distance / liters; printf("CONSUMO_MEDIO=%f km/l\n", liter_per_km); } int main() { ...
davidcostadev/ufrn-itp
src/uri_1009.c
// https://www.urionlinejudge.com.br/judge/en/problems/view/1009 #include <stdio.h> int main() { char name[100]; float salary, sold_products; scanf("%s", &name); scanf("%f", &salary); scanf("%f", &sold_products); float commission = (15 * sold_products) / 100; float total = salary + commission; print...
davidcostadev/ufrn-itp
src/uri_1008.c
<reponame>davidcostadev/ufrn-itp<filename>src/uri_1008.c // https://www.urionlinejudge.com.br/judge/en/problems/view/1008 #include <stdio.h> int main() { int number, hours; float amount; scanf("%d", &number); scanf("%d", &hours); scanf("%f", &amount); float salary = hours * amount; printf("NUMBER = %d...
davidcostadev/ufrn-itp
src/aula_09_exercice_02.c
#include <stdio.h> int main() { int numbers; printf("N: "); scanf("%d", &numbers); printf("--- WHILE ---\n"); int w = 1; int sum = 0; while (w <= numbers) { int number; printf("N%dº = ", w); scanf("%d", &number); sum += number; w++; } float averange = sum / numbers; ...
davidcostadev/ufrn-itp
src/uri_1012.c
#include <stdio.h> #include <math.h> int main() { float a, b, c; scanf("%f %f %f", &a, &b, &c); float triangulo, circulo, trapezio, quadrado, retangulo; double pi = 3.14159; triangulo = (a * c) / 2; circulo = pow(c, 2) * pi; trapezio = ((a + b) * c) / 2; quadrado = pow(b, 2); retangulo = a ...
davidcostadev/ufrn-itp
src/aula_01.c
#include <stdio.h> int main() { printf("Olá\n"); int value1 = 10; int value2 = 5; int value3 = value1 + value2; printf("Digite um número:\n"); scanf("%i", &value1); printf("v1: %d, v2: %d, v3: %d\n", value1, value2, value3); return 0; }
davidcostadev/ufrn-itp
src/aula_07_exercice_02.c
#include <stdio.h> int main() { double a, b; scanf("%lf", &a); scanf("%lf", &b); if (a == b) { printf("%lf\n", a * b); } else if (a < b) { printf("%lf\n", b - a); } else { printf("%lf\n", a - b); } return 0; }
davidcostadev/ufrn-itp
src/aula_08_exercice_03.c
<gh_stars>1-10 #include <stdio.h> int main() { int a, b, c; printf("Enter with a A value:\n"); scanf("%d", &a); printf("Enter with a B value:\n"); scanf("%d", &b); printf("Enter with a C value:\n"); scanf("%d", &c); if (a && b) { printf("VERDADEIRO: A and B\n"); } else { printf("FALSO...
davidcostadev/ufrn-itp
src/exercise_01.c
#include <stdio.h> void exercise_01() { printf("Exercício 01\n"); float one; float two; printf("Digite a 1ª nota: "); scanf("%f", &one); printf("Digite a 2ª nota: "); scanf("%f", &two); double media = (one + two) / 2; printf("MEDIA=%f\n", media); } int main() { exercise_01(); return 0; }
davidcostadev/ufrn-itp
src/aula_07_exercice_03.c
<reponame>davidcostadev/ufrn-itp<gh_stars>1-10 #include <stdio.h> int main() { double x, y; char operation; int exit = 0; printf("Enter with your expression\nEx.: 1+3 and ENTER.\nYou can use +, -, * and /.\n"); scanf("%lf %c %lf", &x, &operation, &y); switch (operation) { case '+': printf("> %lf\...
davidcostadev/ufrn-itp
src/aula_10_exercice_01.c
<filename>src/aula_10_exercice_01.c #include <stdio.h> int main() { float celsius; printf("Celsius: "); scanf("%f", &celsius); float fahrenheit = celsius * (9.0 / 5.0) + 32.0; printf("fahrenheit: %f\n", fahrenheit); return 0; }
davidcostadev/ufrn-itp
src/aula_13.c
<reponame>davidcostadev/ufrn-itp #include <stdio.h> #include <string.h> int main() { char nome_david[] = {'d', 'a', 'v', 'i', 'd', '\0', ' ', 's'}; char nome_juliana[] = "juliana"; char nome_completo[10]; nome_david[7] = '-'; nome_david[8] = '-'; nome_david[10] = '?'; nome_david[11] = '?'; printf("...
davidcostadev/ufrn-itp
src/aula_02.c
<filename>src/aula_02.c #include <stdio.h> int main() { int n1 = 12; int n2 = 10; // tipos de ifs if (n1 > n2) { printf("n1 maior\n"); printf("n1 segunda linha\n"); } if (n2 > n2) printf("n2 maior\n"); if (n1 == n2) printf("iguais\n"); // par e impar if (n1 % 2 == 0) printf(...
ericaguthan/yugabyte-db
src/yb/util/priority_thread_pool.h
// Copyright (c) YugaByte, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
ericaguthan/yugabyte-db
src/postgres/src/include/common/pg_yb_common.h
/* ---------- * pg_yb_utils.h * * Common utilities for YugaByte/PostgreSQL integration that are reused between * PostgreSQL server code and other PostgreSQL programs such as initdb. * * Copyright (c) YugaByte, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file ...
ericaguthan/yugabyte-db
src/yb/tserver/remote_bootstrap_session-test.h
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
HipsterJazzbo/PodTest
Example/PodTest/PTAppDelegate.h
// // PTAppDelegate.h // PodTest // // Created by CocoaPods on 04/28/2015. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface PTAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
HipsterJazzbo/PodTest
Example/PodTest/PTViewController.h
<filename>Example/PodTest/PTViewController.h // // PTViewController.h // PodTest // // Created by <NAME> on 04/28/2015. // Copyright (c) 2014 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface PTViewController : UIViewController @end
lbovolini/ordena-comprime-enad
ordenacao/sort.c
<filename>ordenacao/sort.c<gh_stars>0 #include <stdio.h> #include <stdlib.h> #include <string.h> #include "sort.h" #include "string_aux.h" void insertionsort (char **arquivo_memoria, int *indice_linhas, int **indice_separadores, int coluna1, int num_linhas) { if (!arquivo_memoria) { printf ("Erro ins...