blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
357
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
58
license_type
stringclasses
2 values
repo_name
stringlengths
4
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-14 21:31:45
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2023-09-05 23:26:37
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2023-09-05 23:26:37
github_id
int64
966
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-02-03 21:17:16
2023-08-24 19:49:39
gha_language
stringclasses
180 values
src_encoding
stringclasses
35 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
6
10.4M
extension
stringclasses
121 values
filename
stringlengths
1
148
content
stringlengths
6
10.4M
8c19e1cbc0c3e7d5d261b4f5ce4cab3e9b0a12e8
868c96df91734ef5e8dd9d56113a3ce1b05908b5
/mediatek/kernel/include/linux/mu3d/drv/musb_comm.h
5e3c1b46f70a848ed4a6360ff09a4b3805d6fcfe
[]
no_license
bq/aquaris-E5
6bd5b9a1e41398d0fb6f5ff928901ee8e5dc9115
9cab53cb4a4aba4e1c697e2f5940c401ed92e7cb
refs/heads/aquaris-E5
2021-06-24T20:35:38.281230
2015-05-11T08:06:58
2015-05-11T08:06:58
22,873,241
27
24
null
2017-04-02T04:36:59
2014-08-12T10:16:42
C
UTF-8
C
false
false
118
h
musb_comm.h
#ifndef __MUSB_COMM_H__ #define __MUSB_COMM_H__ #define U3D_SPACE_SIZE 0x2000 #endif /*__MUSB_COMM_H__*/
ab48d058aac842fa19b45d89e551d6954b62b7da
c72ebbb48f75f9ad60272911374cd2b6bb97980b
/getcputime.c
86eac1f8406879746daeb5545cd8e1407179e2a3
[]
no_license
mmm7/cryptica-solver-cpp
8ed65b42b5d2a2494760d6710f99c472bf80288c
d666fa62853876a79145f77a3f76fc7c135d6c23
refs/heads/master
2016-09-06T08:54:39.987876
2014-09-24T22:32:39
2014-09-24T22:32:39
null
0
0
null
null
null
null
UTF-8
C
false
false
61
c
getcputime.c
#include <time.h> double getCPUTime( ) { return clock(); }
dce5cb704d47f9b118d3f26fd53dcef94aa8b4bb
b5729836cdd0d026b9c56ff3757bc0d2c29c1044
/TaxCal.c
21a1039303b2cc5db4aecae063ba42ddf2149548
[]
no_license
OmerWaraich/simpleCtaxCal
37a755e7cd12a1ec6661d7cc7794337712adc36c
48ec2944ba77b460e5aa040e6c6997ce4a8f0e3c
refs/heads/master
2021-01-10T15:00:34.650074
2016-02-18T00:12:32
2016-02-18T00:12:32
51,965,169
0
0
null
null
null
null
UTF-8
C
false
false
310
c
TaxCal.c
#include <stdio.h> int main() { double subtotal; double tax; double grandtotal; double taxrate; taxrate = 0.175; subtotal = 200; tax = subtotal * taxrate; grandtotal = subtotal + tax ; printf(" Tax on a product of %.2f is %.2f, grandtotal will be %.2f \n", subtotal, tax, grandtotal ); return 0; }
34eee18ac1f0e4c1b4982f1acefd8a556bc33020
3965e5c3231c720938cc10202d2baf5443352ffd
/software engineering/libmousehook/hook.h
09c4157010b307d71833972edc1c501a6fd9fe1d
[]
no_license
smi13/semester06
4224f691677cea6769d7d06acbb8cacbe60f37d8
10cd78eb98ca26b46d133b805be5bef06a8ee136
refs/heads/master
2021-03-12T21:33:59.363142
2010-08-25T22:52:55
2010-08-25T22:52:55
862,620
1
0
null
null
null
null
UTF-8
C
false
false
1,416
h
hook.h
/** @file * This file declares functions for hooking mouse messages.\n * Hooking mouse is used for comfortable moving borders in CRuler */ #pragma once #include <windows.h> #include <tchar.h> #ifndef _DEFINED_44E531B1_14D3_11d5_A025_006067718D04 #define _DEFINED_44E531B1_14D3_11d5_A025_006067718D04 #ifdef __cplusplus extern "C" { #endif // __cplusplus #ifdef _COMPILING_44E531B1_14D3_11d5_A025_006067718D04 #define LIBSPEC __declspec(dllexport) #else #define LIBSPEC __declspec(dllimport) #endif // _COMPILING_44E531B1_14D3_11d5_A025_006067718D04 /** * Function, which hooks @e WM_MOUSEMOVE and @e WM_LBUTTONUP messages. * @param hWnd window to forward hooked messages * @return true if success, false otherwise */ LIBSPEC bool setMouseHook( HWND hWnd ); /** * Unhook mouse function * @param hWnd window, where mouse was hooked * @return true if success, false otherwise * @see setMouseHook */ LIBSPEC bool clearMouseHook( HWND hWnd ); #undef LIBSPEC #ifdef __cplusplus } #endif // __cplusplus /** * Macro for hooked @e WM_MOUSEMOVE message */ #define UWM_MOUSEMOVE_MSG _T("UWM_MOUSEMOVE_MSG-44E531B1_14D3_11d5_A025_006067718D04") /** * Macro for hooked @e WM_LBUTTONUP message */ #define UWM_LBUTTONUP_MSG _T("UWM_LBUTTONUP_MSG-44E531B1_14D3_11d5_A025_006067718D05") #endif // _DEFINED_44E531B1_14D3_11d5_A025_006067718D04
6b8a88abfbefdcd3b1f2fc6d047adf1458b4ebc3
1f59063bc9a041114cf5b0ec27c250234181e9a8
/ICPC2021-main/4. sorting&binary_search/kinds_sorting/quick_sort.c
d1cd7e9bf73f425ba2f4ad59b4a09a460e0b7f1d
[]
no_license
JiWon0502/Edoc_2021
53053a9cc811dd819c34fa0289b44acb5c8ab80f
3f4b649c86beecaf306e8a1aa26acf2c88354551
refs/heads/main
2023-04-23T02:56:36.537951
2021-05-04T16:54:22
2021-05-04T16:54:22
333,847,325
0
0
null
null
null
null
UTF-8
C
false
false
805
c
quick_sort.c
#include <stdio.h> typedef int type_arr; int arr[1001]; void q_sort(int low, int high){ if(low >= high) return; type_arr pivot = arr[low]; int left = low +1; int right = high; int temp; while(left<=high){ if(arr[left]<= pivot){ left++; continue; } if(arr[right]>= pivot){ right--; continue; } temp = arr[left]; arr[left] = arr[right]; arr[right] = temp; } temp = arr[right]; arr[right] = pivot; arr[low] = temp; q_sort(low, right-1); q_sort(right+1, high); return; } int main(){ int N; scanf("%d", &N); for(int i =0; i<N; i++) scanf("%d", &arr[i]); q_sort(0, N); for(int j = 0; j<N; j++) printf(" %d", arr[j]); return 0; }
80aa582fc08e82d6ef21892e3f244c93f811dea7
35bb67a92c47a4ae68742bd56a49a99086ebb759
/util/photopeaks.C
14f5fb2d67d09ca57ccbe9c5d6b0a1fc351611da
[]
no_license
jarvis1776/GRUTinizer
25c68e1d6cd6f0c27fac36d98059f00c91631f68
66ea166592c08e18f976fd5c965173c51372842c
refs/heads/master
2021-01-18T03:45:58.081524
2016-06-24T14:49:26
2016-06-24T14:49:26
61,842,669
0
0
null
2016-06-23T23:11:21
2016-06-23T23:11:20
null
UTF-8
C
false
false
4,759
c
photopeaks.C
// Gaussian + low-energy step Double_t fitf(Double_t *v, Double_t *par){ static Float_t sqrt2pi = TMath::Sqrt(2*TMath::Pi()), sqrt2 = TMath::Sqrt(2.); Double_t arg; Double_t norm = par[0]; Double_t energy = par[1]; Double_t sigma = par[2]; Double_t step = par[3]; arg = (v[0]-energy)/(sqrt2*sigma); Double_t result; result = 1/(sqrt2pi*sigma) * norm * exp(-arg*arg); result += step/pow(1+exp(sqrt2*arg),2); return result; } TF1 *fitpeak(TString fileName, Double_t energy){ //Printing the graph TFile *f = new TFile(fileName); TH1 *spectrum; TH2 *overview; f->GetObject("energy/overview_gaus", overview); spectrum = overview->ProjectionX(); //spectrum->Draw(); GPeak *g = new GPeak (energy,energy-10,energy+5); g->Fit(spectrum,"Q"); return g; // Fit function TF1 *g = new TF1("peak", "gausn", energy-10., energy+10.); spectrum->Fit("peak", "RNQ"); Double_t sigma = g->GetParameter(2); //Printing the simple sum to the shell window Double_t sum = spectrum->Integral( spectrum->FindBin(energy-3.75*sigma), spectrum->FindBin(energy+3.75*sigma) ); cout << "Simple sum = " << sum << " +/- " << sqrt(sum) << endl; //Another fit TF1 *bg = new TF1("bg", "pol1", energy-10.*sigma, energy-4.*sigma); spectrum->Fit("bg", "RNQ"); // Fit the simulation to the measured spectrum const Int_t nPar = 4; Double_t par[1000]; // Set starting parameter values par[0] = sum; par[1] = energy; par[2] = sigma; par[3] = bg->Eval(energy-4.*sigma); TF1 *fit = new TF1("fit", fitf, energy-8.*sigma, energy+5.*sigma, nPar); fit->SetParameters(par); spectrum->Fit("fit", "RNQ"); return fit; // Fit to measured efficiencies (Dirk Weisshaar) TGraph *fg1 = new TGraph(); Double_t dE = 3700./100.; Double_t E = 0.; for(Int_t i=0; i<100; i++){ fg1->SetPoint(i,E, 706.1*exp(-0.678095*log(E + 160)) ); E += dE; } fg1->SetLineColor(kBlue); fg1->Draw("C"); } void photopeaksNew(){ const Int_t npeaks = 29; Double_t energies [npeaks] = {244.7, 344.3, 411.1, 444.0, 778.9, 867.4, 898.0, 964.0, 1085.8, 1089.7, 1112.1, 1173.2, 1212.9, 1299.1, 1332.5, 1408.0, 1836.0, 846.8, 1037.9, 1238.3, 1360.2, 1771.4, 2015.2, 2034.8, 2598.5, 3253.8, 3273.0, 3451.2, 3548.3}; Double_t denergies [npeaks] = {0}; Double_t effic [npeaks]; Double_t deffic [npeaks]; for(Int_t i = 0; i < npeaks; i++){ TString fileName; fileName.Form("e%.0f_histos.root", energies[i]); GPeak *fit = (GPeak *)fitpeak(fileName, energies[i]); effic[i] = fit->GetSum()/1.0e6*100; deffic[i] = fit->GetSumErr()/1.0e6*100; cout << fit->GetSum() << endl; } TGraphErrors *g1 = new TGraphErrors(npeaks, energies, effic, denergies, deffic); g1->SetTitle("GRETINA Standard 8 Quads"); g1->GetXaxis()->SetTitle("Energy [keV]"); g1->GetYaxis()->SetTitle("Efficiency [%]"); g1->SetMarkerStyle(24); g1->SetMarkerColor(kBlue); g1->Draw("AP"); gPad->SetCrosshair(); // Measured efficiencies (Dirk Weisshaar) //Double_t menergies[29] = { 244.7, 344.3, 411.1, 444.0, 778.9, // 867.4, 898.0, 964.0, 1085.8, 1089.7, //1112.1, 1173.2, 1212.9, 1299.1, //1332.5, 1408.0, 1836.0, 846.8, //1037.9, 1238.3, 1360.2, 1771.4, //2015.2, 2034.8, 2598.5, 3253.8, //3273.0, 3451.2, 3548.3}; //Double_t dmenergies[29] = {0.}; Double_t meffic[29] = { 12.30, 10.36, 9.24, 8.87, 6.59, 6.15, 6.07, 5.88, 5.59, 5.43, 5.55, 5.49, 5.10, 4.93, 5.07, 4.80, 4.09, 6.504, 5.780, 5.326, 5.128, 4.185, 3.891, 3.937, 3.314, 2.829, 2.826, 2.724, 2.789}; Double_t dmeffic[29] = { 0.19, 0.15, 0.15, 0.14, 0.10, 0.10, 0.05, 0.09, 0.09, 0.10, 0.08, 0.05, 0.09, 0.08, 0.05, 0.07, 0.03, 0.065, 0.063, 0.056, 0.060, 0.045, 0.050, 0.045, 0.036, 0.094, 0.103, 0.125, 0.168}; TGraphErrors* mg1 = new TGraphErrors(npeaks, energies, meffic, denergies, dmeffic); mg1->SetTitle("GRETINA Standard 8 Quads"); mg1->GetXaxis()->SetTitle("Energy [keV]"); mg1->GetYaxis()->SetTitle("Efficiency [%]"); mg1->SetMarkerStyle(20); mg1->SetMarkerColor(kBlack); mg1->Draw("P"); }
71412c0f0fe817bb4afb894619b381be8ac55867
b9347da5923d952c0be3e7b0512e96102b12c4fc
/dev/include/console.h
d31fe77c6ccaf875b89b597af109a315de21f79d
[]
no_license
wDCat/osdev
44fb745da223149effb45d814726e08b1b4264b0
bb04ce174452f54f1beeda9943b22447992a1095
refs/heads/master
2021-12-10T23:42:53.382762
2018-03-02T06:42:17
2018-03-02T06:42:17
106,379,372
2
1
null
null
null
null
UTF-8
C
false
false
594
h
console.h
// // Created by dcat on 9/8/17. // #ifndef W2_CONSOLE_H #define W2_CONSOLE_H #define CONSOLE_MAX_COUNT 5 typedef struct { bool present; uint32_t start_addr; uint32_t x; uint32_t y; uint32_t escape; struct { bool on; uint8_t color; } control_mode; } console_t; void console_install(); console_t *console_alloc(); void console_putc(console_t *con, uchar_t c); void console_puts(console_t *con, const uchar_t *str); void console_putns(console_t *con, const uchar_t *str, int32_t len); void console_switch(console_t *con); #endif //W2_CONSOLE_H
29e77e2ae77196855929a78e4095e3bf3ce49d2f
6a8359969cb4aed0ecac9eced031a902122ddc09
/include/test.h
6bccde036966d87347cf302b63817f6df83fc029
[]
no_license
tzuyichiu/IP-over-DNS-Client
d548050f500abffd9e5db26d05c6f61c9023e241
fe701c3f2eb63c8f53763ba0ddd1958024059849
refs/heads/master
2023-06-26T10:35:59.090270
2023-06-12T18:43:47
2023-06-14T06:50:35
203,034,547
2
0
null
null
null
null
UTF-8
C
false
false
50
h
test.h
#pragma once #ifndef TEST_H #define TEST_H #endif
2468968e7e8cc70d5d7879fe99a527a4ad9754d5
6a2a0f3ce4d7cd9d2f03b084b1481007762c86cb
/CS50.c
5f14f6610133f77ea0c01d4c70596fa069d39b2e
[]
no_license
crispinamuriel/reactos-data-structures-algorithms
4f32f40d30a33544d6e393bf862ef31279dfbb24
da0ffc44d9e137a81a77a56922fd1eaa7222a033
refs/heads/master
2021-10-07T22:16:22.142743
2021-09-26T14:20:23
2021-09-26T14:20:23
235,409,894
0
0
null
null
null
null
UTF-8
C
false
false
222
c
CS50.c
#include <cs50.h> #include <stdio.h> int main(void) { int age = get_int("What's your age?\n"); if(age > 30) { printf("Whatever you say, Boomer!\n"); } else { printf("Okay, Zoomer.\n"); } }
7b8aca2bdbccc991592f0f3285c2e883d3c0525f
8524994a2c32cee6c133c08b9bd902f2006a20e5
/examples/dreamcast/parallax/delay_cube/delay_cube.c
2acb919a7bb9e3fad8f277045a7f19c9cb13e7fa
[]
no_license
losinggeneration/kos
34895d010b519fd3d1255b7518a43c68165dda32
7c19668b7bef90c06d9419dca3abae86ac542feb
refs/heads/master
2016-09-05T10:34:31.240458
2008-05-05T22:51:41
2008-05-11T07:08:49
7,083
8
3
null
null
null
null
UTF-8
C
false
false
5,632
c
delay_cube.c
/* KallistiOS ##version## delay_cube.c Copyright (C)2003 Dan Potter */ #include <kos.h> #include <math.h> #include <plx/texture.h> #include <plx/context.h> #include <plx/prim.h> KOS_INIT_FLAGS(INIT_DEFAULT | INIT_MALLOCSTATS); /* The third demo effect in my series of Parallax demo effects. This one might actually be of practical interest to people still. This effect generates a cube out of a 3D grid of dots and then does something that looks somewhat like motion blurring on it. The trick here is that we're using alpha blended copies of the object instead of doing raster effects, so it becomes feasible on the PVR. This works by saving the last N modelview matrices and then restoring each one for each "delay" cube. Each "delay" cube has a successively lower alpha value as well. This is very rendering stage intensive due to the alpha blending. It might be made faster by switching entirely to opaque polys, but I'll leave the working out of that as an exercise to the reader ;) Another exercise for the reader... it is possible (and not too difficult) to modify this code so that you have many geometric objects and morph between them. The key is to have the same number of points in each object and then have a "delta" array to tell you how much to move each point each frame. */ // Generate a cube object for our usage. This could really be anything, I // just like cubes. :) vector_t cube[6*6*6]; int cubepnts = 6*6*6; void makecube() { int x, y, z; for (x=-3; x<3; x++) { for (y=-3; y<3; y++) { for (z=-3; z<3; z++) { cube[(x+3)*36+(y+3)*6+(z+3)].x = x; cube[(x+3)*36+(y+3)*6+(z+3)].y = y; cube[(x+3)*36+(y+3)*6+(z+3)].z = z; } } } } // Draw a single point in 3D space. Uses the currently loaded matrix. void drawpnt(float x, float y, float z, float a, float r, float g, float b) { uint32 col = plx_pack_color(a, r, g, b); // Transform the point, clip the Z plane to avoid artifacts. plx_mat_tfip_3d(x, y, z); if (z <= 0.00001f) z = 0.00001f; // Draw it. plx_vert_inp(PLX_VERT, x, y+1.0f, z, col); plx_vert_inp(PLX_VERT, x, y, z, col); plx_vert_inp(PLX_VERT, x+1.0f, y+1.0f, z, col); plx_vert_inp(PLX_VERT_EOS, x+1.0f, y, z, col); } // Draws the full cube at the current position. void drawcube(float b) { int i; for (i=0; i<cubepnts; i++) drawpnt(cube[i].x, cube[i].y, cube[i].z, b, 1.0f, 1.0f, 1.0f); } // Temporary matrix so we don't have to keep recalculating our // screenview and projection matrices. This has to be declared out // here or GCC will ignore your aligned(32) request (potentially // causing crashage). static matrix_t tmpmat __attribute__((aligned(32))); int main(int argc, char **argv) { int done, i; int theta; pvr_stats_t stats; int delays = 8; matrix_t oldmats[delays]; memset(&oldmats, 0, sizeof(oldmats)); // Init PVR pvr_init_defaults(); pvr_set_bg_color(0.0f, 1.0f*0x49/0xff, 1.0f*0x6b/0xff); // Setup the context plx_cxt_init(); plx_cxt_texture(NULL); plx_cxt_culling(PLX_CULL_NONE); // Init 3D stuff. mat3d is like KGL. plx_mat3d_init(); plx_mat3d_mode(PLX_MAT_PROJECTION); plx_mat3d_identity(); plx_mat3d_perspective(45.0f, 640.0f / 480.0f, 0.1f, 100.0f); plx_mat3d_mode(PLX_MAT_MODELVIEW); // Create our model makecube(); // Until the user hits start... for (done = 0, theta = 0; !done; ) { // Check for start MAPLE_FOREACH_BEGIN(MAPLE_FUNC_CONTROLLER, cont_state_t, st) if (st->buttons & CONT_START) done = 1; MAPLE_FOREACH_END() // Setup the frame pvr_wait_ready(); pvr_scene_begin(); pvr_list_begin(PVR_LIST_OP_POLY); // Submit the context plx_cxt_send(PVR_LIST_OP_POLY); // Setup some rotations/translations. These are "executed" from // bottom to top. So we rotate the cube in place on all three // axes a bit, then translate it to the left by 10, and rotate // the whole deal (so it zooms around the screen a bit). Finally // we translate the whole mess back by 30 so it's visible. plx_mat3d_identity(); plx_mat3d_translate(0.0f, 0.0f, -30.0f); plx_mat3d_rotate(theta*0.3f, 1.0f, 0.0f, 0.0f); plx_mat3d_rotate(theta*1.5f, 0.0f, 1.0f, 0.0f); plx_mat3d_translate(10.0f, 0.0f, 0.0f); plx_mat3d_rotate(theta, 1.0f, 0.0f, 0.0f); plx_mat3d_rotate(theta*0.5f, 0.0f, 0.1f, 0.0f); plx_mat3d_rotate(theta*0.3f, 0.0f, 0.0f, 0.1f); // Save this latest modelview matrix for (i=0; i<delays-1; i++) memcpy(&oldmats[i], &oldmats[i+1], sizeof(matrix_t)); plx_mat3d_store(&oldmats[delays-1]); // Draw a cube at our current position/rotation. We make a snapshot // of the full translation matrix after projection so that we can // just apply new modelview matrices for the delay cubes. plx_mat_identity(); plx_mat3d_apply(PLX_MAT_SCREENVIEW); plx_mat3d_apply(PLX_MAT_PROJECTION); plx_mat_store(&tmpmat); plx_mat3d_apply(PLX_MAT_MODELVIEW); drawcube(1.0f); // Translucent list for delay cubes plx_list_begin(PVR_LIST_TR_POLY); plx_cxt_send(PVR_LIST_TR_POLY); // Now go back and draw the delay cubes for (i=0; i<delays-1; i++) { // Load the old matrix plx_mat3d_load(&oldmats[(delays-2)-i]); // Apply it and draw the cube plx_mat_load(&tmpmat); plx_mat3d_apply(PLX_MAT_MODELVIEW); drawcube(1.0f - (i+2)*(0.8f / delays)); } pvr_scene_finish(); // Move our counters theta++; } // You have to keep a watch on these, especially the vertex used // for really poly intensive effects. pvr_get_stats(&stats); dbglog(DBG_DEBUG, "3D Stats: %ld vblanks, frame rate ~%f fps, max vertex used %d bytes\n", stats.vbl_count, (double)stats.frame_rate, stats.vtx_buffer_used_max); return 0; }
a44d0dc61a07343345d61d9d49bce3e6ffebb7b4
4909203ed7ecde0131a38bf37efa03cd3244c304
/0x0D-preprocessor/2-main.c
697c1b9a1655458709bfdd24aa02ec0de1a4ce9c
[]
no_license
not-notAlex/holbertonschool-low_level_programming
fe9c4ed4c855add91c64ec74df52c869e2d09602
946ca20d0a3f1d229fe48c3d351b34c89d302b78
refs/heads/master
2023-03-30T01:20:38.329798
2021-04-20T18:30:19
2021-04-20T18:30:19
271,299,430
0
4
null
null
null
null
UTF-8
C
false
false
167
c
2-main.c
#include <stdlib.h> #include <stdio.h> /** * main - The code * * Return: End all mains with 0 */ int main(void) { printf("%s\n", __BASE_FILE__); return (0); }
d9fe64605e6ac2ba1c5650c5e4af4fcc010029e3
b5852cf0000fa4edd96033af054e7b3b31b9e526
/udp_server/myserver.c
de4a0c7959407181c0db26a6ad9360d63521facd
[]
no_license
learning-lte/adrv9361-netlink-test
bc34bd89833548bdf29d9bbc6af24e09d988e394
fedd2423b646d7930ee7284b881d08be7ce81f02
refs/heads/master
2022-04-08T12:34:45.911878
2020-02-20T10:16:04
2020-02-20T10:16:04
null
0
0
null
null
null
null
UTF-8
C
false
false
4,274
c
myserver.c
#include <stdio.h> /* for printf() and fprintf() */ #include <sys/socket.h> /* for socket() and bind() */ #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ #include <stdlib.h> /* for atoi() and exit() */ #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #include <pthread.h> #include <errno.h> #include <string.h> #include <fcntl.h> #include <sys/wait.h> #include <sys/resource.h> #include <sys/mman.h> #include <signal.h> #define TX_BUFF_SIZE 32*1024 // Number of samples #define RX_BUFF_SIZE 32*1024 // Number of samples #define TX_BUFF_SIZE_BYTE TX_BUFF_SIZE*4 // Number of bytes #define RX_BUFF_SIZE_BYTE RX_BUFF_SIZE*4 // Number of bytes #define SERV_PORT 50707 struct timeval tv; time_t sec_begin, sec_end, sec_elapsed; typedef struct { int sock; int stream_active; long long sent_count; long long recv_count; struct sockaddr_in ServAddr; struct sockaddr_in ClntAddr; } handler; static handler* phandler; void DieWithError(char *errorMessage) { perror(errorMessage); exit(1); } void* stream_to_client(void* arg) { char Buffer[TX_BUFF_SIZE_BYTE]; /* Buffer for echo string */ memset(&Buffer,0,sizeof(Buffer) ); printf("Streaming to the client, TX buffer size: %d bytes\n", TX_BUFF_SIZE_BYTE); while(phandler->stream_active) { int sendMsgSize = sendto(phandler->sock,Buffer, TX_BUFF_SIZE_BYTE, 0,(struct sockaddr*) &(phandler->ClntAddr), sizeof(phandler->ClntAddr)); if (sendMsgSize<0) DieWithError("Send msg failed"); phandler->sent_count+=sendMsgSize; } printf("Sent %lld MB\n",phandler->sent_count/1024/1024); return NULL; } int main(int argc, char *argv[]) { char Buffer[RX_BUFF_SIZE_BYTE]; /* Buffer for echo string */ int recvMsgSize; /* Size of received message */ struct sockaddr_in ServAddr; memset(&ServAddr, 0, sizeof(ServAddr)); ServAddr.sin_family = AF_INET; /* Internet address family */ ServAddr.sin_addr.s_addr = htonl(INADDR_ANY); /* Any incoming interface */ ServAddr.sin_port = htons(SERV_PORT); /* Local port */ phandler = malloc(sizeof(handler)); phandler->stream_active = 1; phandler->recv_count = 0; phandler->sent_count = 0; memset(&(phandler->ClntAddr), 0, sizeof(phandler->ClntAddr)); printf("Waiting for udp messages...\n"); /* Create socket for receiving datagrams */ if ((phandler->sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) DieWithError("socket() failed"); /* Set the socket as reusable */ int true_v = 1; if (setsockopt(phandler->sock, SOL_SOCKET, SO_REUSEADDR, &true_v, sizeof (int))!=0) DieWithError("Error"); /* Bind to the local address */ if (bind(phandler->sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)) < 0) DieWithError("bind() failed"); /* Block until receive message from a client */ unsigned int cliAddrLen = sizeof(phandler->ClntAddr); if ((recvMsgSize = recvfrom(phandler->sock, Buffer, RX_BUFF_SIZE_BYTE, 0,(struct sockaddr *) &(phandler->ClntAddr), &cliAddrLen)) < 0) DieWithError("recvfrom() failed"); phandler->recv_count += recvMsgSize; printf("Handling client %s, RX message size: %d bytes\n", inet_ntoa(phandler->ClntAddr.sin_addr),recvMsgSize); /* Set waiting limit */ tv.tv_sec = 1; /* Set the timeout for recv/recvfrom*/ if (setsockopt(phandler->sock, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) < 0) DieWithError("Error"); /* Start streaming */ pthread_t stream_thread; if(pthread_create(&stream_thread, NULL, &stream_to_client,NULL)) DieWithError("starting thread failed"); /*Reciving*/ while(1) { recvMsgSize = recv(phandler->sock, Buffer, RX_BUFF_SIZE_BYTE, 0); if(errno==EAGAIN) { setsockopt(phandler->sock, SOL_SOCKET, 0,&tv,sizeof(tv)); printf("Receive timeout is reached\n"); phandler->stream_active = 0; break; } if(recvMsgSize<0) DieWithError("Reciving failed\n"); phandler->recv_count += recvMsgSize; } pthread_join(stream_thread, NULL); printf("UDP bytes received %lld MB in total\n",phandler->recv_count/1024/1024); printf("UDP bytes sent %lld MB in total\n",phandler->sent_count/1024/1024); close(phandler->sock); free(phandler); return 0; }
fb8ec123eace1e33e89754ae3d87d53eb0cf0297
5a17a3d150c4773318d397a46878d2fd74c0671f
/nitan/kungfu/skill/shaolin-shenfa.c
26f547817da532310a82765a692ca3a7c6784a10
[ "MIT" ]
permissive
cantona/NT6
e9adc7308619b614990fa64456c294fad5f07d61
073f4d491b3cfe6bfbe02fbad12db8983c1b9201
refs/heads/master
2020-04-15T21:16:28.817947
2019-03-01T05:16:46
2019-03-01T05:16:46
163,173,406
0
0
MIT
2018-12-26T11:38:10
2018-12-26T11:38:10
null
UTF-8
C
false
false
4,148
c
shaolin-shenfa.c
// shaolin-shenfa.c 少林身法 #include <ansi.h>; inherit SKILL; string type() { return "martial"; } string martialtype() { return "dodge"; } string *dodge_msg = ({ "$n一式"HIW"「一葦渡江」"NOR",前後腳腳尖腳跟相靠,身體如行雲流水般滑出丈餘。\n", "$n一式"BLU"「雨燕掠波」"NOR",雙臂前伸,全身貼地平飛,頓時閃過了$N的凌厲攻勢。\n", "$n一式"HIC"「移步換形」"NOR",足不動,手不抬,一轉眼間便繞到了$N的身後。\n", "$n一式"HIG"「分身化影」"NOR",一轉身間,四面八方飄動着無數個$n的身影,令$N手無足措。\n", "$n一式"HIY"「孤騖落日」"NOR",全身筆直,拔地而起,在半空中一轉,已落到幾丈遠的地方。\n", "$n一式"HIB"「鴻雁雙飛」"NOR",兩臂鵬舉如翼,在剌剌風聲中,從$N頭頂橫躍而過。\n", "$n一式"HIY"「蒼龍出水」"NOR",雙腳點地,全身化為一道白影,急速繞着$N打了幾轉。\n", "$n一式"GRN"「稚鳳歸巢」"NOR",身體如陀螺般急轉,氣流形成一個個漩渦,令$N陷身其間,動彈不得。\n", }); int valid_enable(string usage) { return (usage=="dodge") || (usage=="move"); } int valid_learn(object me) { return 1; } int practice_skill(object me) { if( query("qi", me)<30 || query("neili", me)<6 ) return notify_fail("你的體力太差了,無法能練習少林身法。\n"); me->receive_damage("qi", 30); addn("neili", -6, me); return 1; } string query_dodge_msg(string limb) { return dodge_msg[random(sizeof(dodge_msg))]; } int learn_bonus() { return 15; } int practice_bonus() { return 15; } int success() { return 15; } int power_point(object me) { return 1.3; } int river_point() {return 2;} // 過河比普通容易 越高越好 string river_go_msg() { return HIW"$N撿起一段蘆葦拋入水中,緊跟着飛身躍上蘆葦,長袖飄飄,渡過了水面。\n"NOR;} string river_come_msg() { return HIW"只見$N踩着一段蘆葦從對岸過來,姿態瀟灑地落在岸邊。\n"NOR;} /* mixed valid_damage(object ob, object me, int damage, object weapon) { mixed result; int ap, dp, mp; if ((int)me->query_skill("shaolin-shenfa", 1) < 100 || ! living(me)) return; mp = ob->query_skill("martial-cognize", 1); ap = ob->query_skill("force") + mp; dp = me->query_skill("dodge", 1) / 2 + me->query_skill("shailin-shengfa", 1); // 一個經典的算法 if (ap / 2 + random(ap) < dp) { result = ([ "damage": -damage ]); // 去掉所有的傷害寫法 switch (random(3)) { case 0: result += (["msg" : HIC "$n" HIC "一式「稚鳳歸巢」,身體如陀螺般急轉,氣流形成一個個漩渦,令$N陷身其間,動彈不得。\n" NOR]); if (! ob->is_busy()) ob->start_busy(random(3)); break; case 1: result += (["msg" : HIC "$n" HIC "一式「一葦渡江」,前後腳腳尖腳跟相靠,身體如行雲流水般滑出丈餘。\n" NOR]); if (! ob->is_busy()) ob->start_busy(random(1)); break; default: result += (["msg" : HIC "$n" HIC "一式「分身化影」,一轉身間,四面八方飄動着無數個$n的身影,令$N手無足措。\n" NOR]); break; } return result; } } */ string perform_action_file(string action) { return __DIR__"shaolin-shenfa/" + action; } int help(object me) { write(HIC"\n少林身法:"NOR"\n"); write(@HELP 少林身法為少林本門輕功身法。少林輕功名冠天下。 學習要求: 混元一氣功10級 HELP ); return 1; }
7b20bb8d987c327c1f990741268fd37801af58b5
8832e679f394520f4094c4e8caecc387004f851a
/program60.c
5e7a5c9bf8c6e89f284b0cb5d7d25be099854010
[]
no_license
KunalKudale19/C-Program
ba79b5e27b5bcdb0470aa326c49f0d03d1b70749
8e0e0f9619aa146d1743260cbe171677d0743686
refs/heads/main
2023-08-23T08:49:01.826421
2021-11-01T16:09:25
2021-11-01T16:09:25
423,521,701
0
0
null
null
null
null
UTF-8
C
false
false
239
c
program60.c
//input : //output: #include<stdio.h> void Display() { int iRow=3,iCol=4,i=0,j=0; for(i=1;i<=iRow;i++) { for(j=1;j<=iCol;j++) { printf("*\t"); } printf("\n"); } } int main() { Display(); return 0; }
bfe9f1e5a2bd3693f38ff79309e8896b2473b0a7
bccf9dc5c1df5c0b3233995f42f9a267033b4ea4
/main.c
7c9822864992b78e8d8fa2b9fd05fbcd71d2874e
[]
no_license
Lemonlcy/51-follow-lines-car
d71f8eedb1d054defeb3a690c0d00cbec0754011
03db9346b46dc3cdc87f32dfd640d2f61c293559
refs/heads/main
2023-08-31T19:09:53.950127
2021-11-07T09:30:07
2021-11-07T09:30:07
425,444,019
0
0
null
null
null
null
GB18030
C
false
false
5,867
c
main.c
#include <REGX52.H> #include <string.h> #include <intrins.h> /*头文件*/ /*宏常量*/ #define uchar unsigned char #define uint unsigned int #define LOW 30 #define MID 40 #define NOM 20 #define HIGH 40 #define FULL 60 sbit L=P3^5; //红外探头左 sbit R=P3^7; //红外探头右 sbit M=P3^6; //红外探头中 sbit L1=P1^5; //红外探头左边 sbit R1=P1^6; //红外探头右边 sbit M1=P1^1; sbit M2=P1^0; sbit M3=P1^3; sbit M4=P1^2; /*全局变量区*/ uint PWM_L=50,PWM_R=50,PWM_LB=0,PWM_RB=0,t=0;//左轮,右轮,左轮反转,右轮反转,时间(左轮和右轮都是小于100的数,越大转速越高) uchar mode=1,sign=1,begin=1;//状态指示:遥控/循迹,干簧管,发车指示 uchar XJ=0; uchar crL=0;crR=0;crl0=0;crr0=0; /*函数声明区*/ void stop(void); void Timer0Init(void); void Uart_Init(void); void delay1ms(int num); int XunJi(void); /*检测函数*/ /*开车函数*/ /*主函数*/ void main() { Timer0Init(); Uart_Init(); while(1) { // if(mode==0) // { // _nop_(); // } if(mode==1) { // while(begin!=1)//重复检测出发信号 // { // if(sign==1) // { // delay1ms(20); // if(sign==1) begin=1; // } // } if(begin==1) { /*检测函数*/ /*开车函数*/ XJ=XunJi(); switch(XJ) { case 1:PWM_L=NOM;PWM_R=NOM;PWM_LB=0;PWM_RB=0;break;//直走 case 2:PWM_L=0;PWM_R=HIGH-crl0;PWM_LB=HIGH-crl0;PWM_RB=0;crl0+=5;break;//小左转 case 3:PWM_L=HIGH-crr0;PWM_R=0;PWM_LB=0;PWM_RB=HIGH-crr0;crr0+=5;break;//小右转 case 4: { XJ=XunJi(); while(XJ!=2) { PWM_L=0;PWM_R=FULL-crL;PWM_LB=FULL-crL;PWM_RB=0;crL++; XJ=XunJi(); if(XJ==2)break; } crl0=0;crr0=0; break;//大左转 } case 5: { XJ=XunJi(); while(XJ!=3) { PWM_L=FULL-crR;PWM_R=0;PWM_LB=0;PWM_RB=FULL-crR;crR++; XJ=XunJi(); if(XJ==3)break; } crl0=0;crr0=0; break;//大右转 } } // if(sign==1) // { // delay1ms(20); // if(sign==1) // { // begin=0; // mode=0; // } // } } } } } /* ********************************************************************** * 延时1ms ********************************************************************** */ void delay1ms(int num)//@11.0592MHz { unsigned char i, j, n; for(n=0;n<num;n++) { _nop_(); i = 2; j = 199; do { while (--j); } while (--i); } } /* ********************************************************************** * 循迹模块 * 输出为1时,led不亮,无红外线反射,黑色胶带或是拿起悬空 * 输出为0时,led亮, 有红外线反射,白纸 ************************************************************************************************/ int XunJi() { if(L==1 && R==1) return 1;//前进 else if( (L==1 ||M==1) && R==0) return 2;//轻微向左修正 else if( L==0 && (M==1 || R==1)) return 3;//轻微向右修正 else if( L==0 && M==0 && R==0 && R1==1 ) return 4;//大幅度向左修正 else if( L==0 && M==0 && R==0 && L1==1 ) return 5;//大幅度向右修正 else return 1;//直走 } /*定时器0*/ void Timer0Init()//初始化 { TMOD|=0X01;//选择为定时器0模式,工作方式1,仅用TR0打开启动。 TH0=(65536-100)/256; //F=f/12=11.0592M/12=0.9216MHZ T=1/F=1.085us TL0=(65536-100)%256; //定时108.5us=0.1ms ET0=1;//打开定时器0中断允许 TR0=1;//打开定时器 EA=1; } void Timer0() interrupt 1 { TH0=(65536-100)/256; //重新赋初值 TL0=(65536-100)%256; if(t<PWM_L) { M3=1; M4=0; //左轮正转 } else if(t<PWM_LB) { M3=0; M4=1; //左轮反转 } else { M3=0; M4=0; //左轮不转 } if(t<PWM_R) { M1=1; M2=0; //右轮正转 } else if(t<PWM_RB) { M1=0; M2=1; //右轮反转 } else { M1=0; M2=0; //右轮不转 } t++; if(t>=100)//100*0.1ms=10ms PWM周期10ms 用PWM_L/R控制高电平占空比 t=0; } /*蓝牙定时器*/ void UART_Routine() interrupt 4 { if(RI==1) { P0 =SBUF; //发送的数据SBUF,赋给P0 if(P0==0X01) //0x01这个值可以通过蓝牙调试器编辑模式设置 { PWM_L=NOM;PWM_R=NOM; } if(P0==0X02) //0x02这个值可以通过蓝牙调试器编辑模式设置 { PWM_L=LOW;PWM_R=NOM;//大左转 } if(P0==0X03) //0x03这个值可以通过蓝牙调试器编辑模式设置 { PWM_L=MID;PWM_R=NOM;//小左转 } if(P0==0X04) //0x03这个值可以通过蓝牙调试器编辑模式设置 { PWM_L=NOM;PWM_R=LOW;//大右转 } if(P0==0X05) //0x03这个值可以通过蓝牙调试器编辑模式设置 { PWM_L=NOM;PWM_R=MID;//小右转 } // if(P0==0X06) //0x03这个值可以通过蓝牙调试器编辑模式设置 // { // PWM_count=5; // } // if(P0==0X07) //0x03这个值可以通过蓝牙调试器编辑模式设置 // { // PWM_count=6; // } if(P0==0Xff) //0xff这个值可以通过蓝牙调试器编辑模式设置 { mode=1; } if(P0==0X00) //0x00这个值可以通过蓝牙调试器编辑模式设置 { PWM_L=0;PWM_R=0; } RI=0; } } void Uart_Init() //[email protected] { PCON |= 0x80; //使能波特率加倍 SCON = 0x50; //8位数据 TMOD &= 0x0F; //清除定时器1模式 TMOD |= 0x20; //设定定时器8为自动 TL1 = 0xFA; //设定初始值 TH1 = 0xFA; //设定初始值 ET1 = 0; TR1 = 1; EA = 1; ES =1 ; }
abba022ed07e247f90e696e85f3f3accd9014b4f
252759ed6d1c05dd642c6638d904eb7ce20fac0f
/93.c
b6a9627e41a4f4387bd1fda1d0ae606f892534c1
[]
no_license
mareddysravani/teja
3a294e2c8d1cc600baf199ae48dbd825098aabb1
cba8c323ec4d1563e348ec38e4c0f981ce8a4532
refs/heads/master
2020-04-10T08:42:49.235969
2019-02-23T17:14:27
2019-02-23T17:14:27
160,912,402
0
0
null
2018-12-08T06:48:05
2018-12-08T06:48:04
null
UTF-8
C
false
false
117
c
93.c
#include <stdio.h> int main(void) { int s,i; scanf("%d",&s); k=s+273; printf("%d",i); return 0; }
2a6f9598dfa897fa0ac2064d48db9b8b3a09baa6
0a3e6743d5b527dd2ca0b84d8bc4b3acb345b558
/src/fs/f2fs/f2fsprogs/fsck/node.h
cbf7ed708bb26f3cf0b264f5d2cf1f285570961b
[ "LGPL-2.1-only", "GPL-2.0-only", "MIT" ]
permissive
fengjixuchui/hydra
76ed698c2f85bd3d105e585662009b6b96336687
d49e652018a007bae9d22cb59dfa086deff7ad2f
refs/heads/master
2023-09-05T12:44:15.852192
2021-11-04T02:51:10
2021-11-04T02:51:10
375,939,086
0
0
MIT
2021-11-04T02:51:10
2021-06-11T07:20:31
null
UTF-8
C
false
false
2,477
h
node.h
/** * node.h * * Many parts of codes are copied from Linux kernel/fs/f2fs. * * Copyright (C) 2015 Huawei Ltd. * Witten by: * Hou Pengyang <[email protected]> * Liu Shuoran <[email protected]> * Jaegeuk Kim <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef _NODE_H_ #define _NODE_H_ #include "fsck.h" #define ADDRS_PER_PAGE(page) \ (IS_INODE(page) ? ADDRS_PER_INODE(&page->i) : ADDRS_PER_BLOCK) static inline int IS_INODE(struct f2fs_node *node) { return ((node)->footer.nid == (node)->footer.ino); } static inline __le32 *blkaddr_in_inode(struct f2fs_node *node) { return node->i.i_addr + get_extra_isize(node); } static inline __le32 *blkaddr_in_node(struct f2fs_node *node) { return IS_INODE(node) ? blkaddr_in_inode(node) : node->dn.addr; } static inline block_t datablock_addr(struct f2fs_node *node_page, unsigned int offset) { __le32 *addr_array; ASSERT(node_page); addr_array = blkaddr_in_node(node_page); return le32_to_cpu(addr_array[offset]); } static inline void set_nid(struct f2fs_node * rn, int off, nid_t nid, int i) { if (i) rn->i.i_nid[off - NODE_DIR1_BLOCK] = cpu_to_le32(nid); else rn->in.nid[off] = cpu_to_le32(nid); } static inline nid_t get_nid(struct f2fs_node * rn, int off, int i) { if (i) return le32_to_cpu(rn->i.i_nid[off - NODE_DIR1_BLOCK]); else return le32_to_cpu(rn->in.nid[off]); } enum { ALLOC_NODE, /* allocate a new node page if needed */ LOOKUP_NODE, /* lookup up a node without readahead */ LOOKUP_NODE_RA, }; static inline void set_new_dnode(struct dnode_of_data *dn, struct f2fs_node *iblk, struct f2fs_node *nblk, nid_t nid) { memset(dn, 0, sizeof(*dn)); dn->inode_blk = iblk; dn->node_blk = nblk; dn->nid = nid; dn->idirty = 0; dn->ndirty = 0; } static inline void inc_inode_blocks(struct dnode_of_data *dn) { u64 blocks = le64_to_cpu(dn->inode_blk->i.i_blocks); dn->inode_blk->i.i_blocks = cpu_to_le64(blocks + 1); dn->idirty = 1; } static inline int IS_DNODE(struct f2fs_node *node_page) { unsigned int ofs = ofs_of_node(node_page); if (ofs == 3 || ofs == 4 + NIDS_PER_BLOCK || ofs == 5 + 2 * NIDS_PER_BLOCK) return 0; if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { ofs -= 6 + 2 * NIDS_PER_BLOCK; if (!((long int)ofs % (NIDS_PER_BLOCK + 1))) return 0; } return 1; } #endif
950f8de1361a74525d97138b2f4b74b4726d9a8e
acdced27985705760bd8a81b67a60e6ba55d588c
/0x15-file_io/0-read_textfile.c
854c3dc341cbb78d946c712b3a0a05b10860f69d
[]
no_license
FouedDadi/holbertonschool-low_level_programming
1c9fd22f97b5c69620706d6a262b8dea6c1aae77
e2de84b9fab5ffbd6f9807871fdb9bdcdc01a9f0
refs/heads/master
2020-12-28T17:42:30.584866
2020-08-28T10:38:36
2020-08-28T10:38:36
238,426,170
0
2
null
null
null
null
UTF-8
C
false
false
572
c
0-read_textfile.c
#include "holberton.h" /** *read_textfile- function that reads a text file and print it to POSIX *@filename: filename *@letters: number of letters *Return: return 0 or w */ ssize_t read_textfile(const char *filename, size_t letters) { int o, r, w; char *file; file = malloc(sizeof(char) * letters); if (file == NULL) return (0); if (filename == NULL) return (0); o = open(filename, O_RDONLY); if (o == -1) return (0); r = read(o, file, letters); if (r == -1) return (0); w = write(STDOUT_FILENO, file, r); if (w == -1) return (0); close(o); free(file); return (w); }
802b47045919d8121bc79ba3fdbbf1eb4ae47bf3
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/fastsocket/kernel/drivers/net/extr_davinci_emac.c_emac_net_tx_complete.c
e907c993563c0c62807cea4b3427c3f6bc40358d
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,351
c
extr_davinci_emac.c_emac_net_tx_complete.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ typedef struct TYPE_2__ TYPE_1__ ; /* Type definitions */ typedef int u32 ; struct sk_buff {scalar_t__ len; } ; struct TYPE_2__ {int /*<<< orphan*/ tx_bytes; int /*<<< orphan*/ tx_packets; } ; struct emac_priv {TYPE_1__ net_dev_stats; int /*<<< orphan*/ ndev; } ; /* Variables and functions */ int /*<<< orphan*/ dev_kfree_skb_any (struct sk_buff*) ; scalar_t__ netif_queue_stopped (int /*<<< orphan*/ ) ; int /*<<< orphan*/ netif_start_queue (int /*<<< orphan*/ ) ; scalar_t__ unlikely (int) ; __attribute__((used)) static int emac_net_tx_complete(struct emac_priv *priv, void **net_data_tokens, int num_tokens, u32 ch) { u32 cnt; if (unlikely(num_tokens && netif_queue_stopped(priv->ndev))) netif_start_queue(priv->ndev); for (cnt = 0; cnt < num_tokens; cnt++) { struct sk_buff *skb = (struct sk_buff *)net_data_tokens[cnt]; if (skb == NULL) continue; priv->net_dev_stats.tx_packets++; priv->net_dev_stats.tx_bytes += skb->len; dev_kfree_skb_any(skb); } return 0; }
333fb5b0391347fba7d29ce18757dae85dcdad0e
7896516fb7bcb7724785b9affed657b9677e1281
/Getter_than.c
339c5b961a351a79e541f89dd2cadf46e2d18b1e
[]
no_license
Kawsher/C_Programms
bbe5bad2925fecddd31b83b2714152ad25fc76e4
d191ef3bafe8ad2556873150da775f61890598b6
refs/heads/master
2021-01-18T23:07:16.239419
2019-12-15T15:27:05
2019-12-15T15:27:05
87,090,633
0
0
null
null
null
null
UTF-8
C
false
false
298
c
Getter_than.c
#include<stdio.h> main() { int a,b; printf("please enter number A:"); scanf("%d",&a); printf("please enter number B:"); scanf("%d",&b); if(a>b) { printf("your number is getter than B:"); } else { printf("your number is getter than A:\n\n"); } }
23f697a3e8da9fb8f71cd02ce43f14125c3c6e2a
b31499a322513ce8fe51cc8f2974afddb1751971
/Library/Common.h
fbc3d33c46a12d95fb5310f5db2d295cff8beca2
[]
no_license
PublicTsukun/Miraisozoten
a6beffc8ce5b31a803276734f9e3c2c492d0eee2
34c7ddcf7ca754d170bbd804237566f6b0a49dcf
refs/heads/master
2022-12-11T06:22:45.840744
2019-02-12T07:00:09
2019-02-12T07:00:09
null
0
0
null
null
null
null
SHIFT_JIS
C
false
false
1,136
h
Common.h
#ifndef __COMMON_H_INCLUDE__ #define __COMMON_H_INCLUDE__ #define _CRT_SECURE_NO_WARNINGS // warning防止 //================================================================ // 画面サイズ関係 //================================================================ /* 画面サイズ */ #define SCREEN_SCALE (1.0f) #define SCREEN_WIDTH (1280*SCREEN_SCALE) #define SCREEN_HEIGHT (720*SCREEN_SCALE) #define SCREEN_CENTER_X (SCREEN_WIDTH / 2) // 画面中央座標 #define SCREEN_CENTER_Y (SCREEN_HEIGHT / 2) // 画面中央座標 /* 画面座標計算 */ #define RelativeSX(m) (SCREEN_WIDTH * m) // ウインドウ割合位置X #define RelativeSY(m) (SCREEN_HEIGHT * m) // ウインドウ割合位置Y #define RS_X(m) RelativeSX(m) // <略記> #define RS_Y(m) RelativeSY(m) // <略記> #define RS_IX(m) (int)RelativeSX(m) // <略記>int型出力 #define RS_IY(m) (int)RelativeSY(m) // <略記>int型出力 //================================================================ // マクロ関数 //================================================================ #endif // !__COMMON_H_INCLUDE__
1a01f392c43d81c9c324892ab5559e922c6f2f7a
41d6193de7f38713dbe5089e8da7ce96afa16ac5
/kernel/generic/include/mach/sa/sys/time.h
ab96678e3846cda2d7d089e4ef9c03070357a156
[ "BSD-3-Clause" ]
permissive
neozeed/xMach
2be67bfdcb329b8952d0a384bfc76e6ce025a3e9
2283fb558392a5412f06007bb1d55fb5c670bc0a
refs/heads/main
2023-07-25T07:38:59.593412
2022-11-12T23:10:10
2022-11-12T23:10:10
374,872,648
11
5
BSD-3-Clause
2021-07-14T02:58:10
2021-06-08T03:46:04
C
UTF-8
C
false
false
1,688
h
time.h
/* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or [email protected] * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie Mellon rights * to redistribute these changes. */ /* * Time-keeper for kernel IO devices. * * May or may not have any relation to wall-clock time. */ #ifndef _MACH_SA_SYS_TIME_H_ #define _MACH_SA_SYS_TIME_H_ #include <mach/time_value.h> extern time_value_t time; /* * Definitions to keep old code happy. */ #define timeval_t time_value_t #define timeval time_value #define tv_sec seconds #define tv_usec microseconds #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ ((tvp)->tv_sec cmp (uvp)->tv_sec || \ (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #endif _MACH_SA_SYS_TIME_H_
a8d8f3321fb24a96eefe83f4eaac33f200b76675
34d0bad8a2849447925fef0c752406122baae3f2
/ti_tools/hdvpss_01_00_01_37/packages/ti/psp/examples/common/vps/chains/links/system/system_main.c
ba9e916c056cc3ae5b5e7d40959bfe3aa2f33dc6
[]
no_license
pamsimochen/hardwork
5e05154fac35a0aacc0f8b64c21b2ca767fd4a3d
1e0a4cafdd1722eb58c4261bad68e602352f2079
refs/heads/master
2021-09-07T22:44:16.620515
2018-03-02T09:48:40
2018-03-02T09:48:40
103,899,662
1
0
null
null
null
null
UTF-8
C
false
false
6,748
c
system_main.c
/******************************************************************************* * * * Copyright (c) 2009 Texas Instruments Incorporated - http://www.ti.com/ * * ALL RIGHTS RESERVED * * * ******************************************************************************/ #include <ti/psp/examples/common/vps/chains/links/system/system_priv.h> #include <ti/psp/examples/common/vps/chains/links/capture/captureLink_priv.h> #include <ti/psp/examples/common/vps/chains/links/scalarSwMs/scalarSwMsLink_priv.h> #include <ti/psp/examples/common/vps/chains/links/display/displayLink_priv.h> #pragma DATA_ALIGN(gSystem_tskStack, 32) #pragma DATA_SECTION(gSystem_tskStack, ".bss:taskStackSection") UInt8 gSystem_tskStack[SYSTEM_TSK_STACK_SIZE]; System_Obj gSystem_obj; Void System_main(UArg arg0, UArg arg1) { System_init(); GT_assert( GT_DEFAULT_MASK, gSystem_obj.chainsMainFunc!=NULL); gSystem_obj.chainsMainFunc(NULL, NULL); System_deInit(); } /* Create test task */ Int32 System_start(Task_FuncPtr chainsMainFunc) { Task_Params tskParams; memset(&gSystem_obj, 0, sizeof(gSystem_obj)); gSystem_obj.chainsMainFunc = chainsMainFunc; /* * Create test task */ Task_Params_init ( &tskParams ); tskParams.priority = SYSTEM_TSK_PRI; tskParams.stack = gSystem_tskStack; tskParams.stackSize = sizeof ( gSystem_tskStack ); gSystem_obj.tsk = Task_create ( System_main, &tskParams, NULL ); GT_assert( GT_DEFAULT_MASK, gSystem_obj.tsk != NULL ); return FVID2_SOK; } Int32 System_init() { Int32 status; #ifdef SYSTEM_DEBUG const Char *versionStr; #endif Vps_PlatformDeviceInitParams deviceInitPrms; Vps_PlatformInitParams platformInitPrms; Semaphore_Params semParams; #ifdef SYSTEM_DEBUG Vps_printf ( " %d: SYSTEM : System Init in progress !!!\n", Clock_getTicks()); #endif VpsUtils_prfInit(); VpsUtils_mbxInit(); /* * Init memory allocator */ VpsUtils_memInit_largeHeap ( ); #ifndef PLATFORM_ZEBU VpsUtils_memClearOnAlloc(TRUE); #endif #ifdef SYSTEM_USE_TILER #ifdef TI_816X_BUILD VpsUtils_tilerInit ( ); #endif /* TI_814X_BUILD */ #endif #ifdef SYSTEM_DEBUG_TILER_ALLOC VpsUtils_tilerDebugLogEnable ( TRUE ); #endif platformInitPrms.isPinMuxSettingReq = TRUE; status = Vps_platformInit(&platformInitPrms); GT_assert( GT_DEFAULT_MASK, status == 0 ); #ifdef SYSTEM_DEBUG /* * Get the version string */ versionStr = FVID2_getVersionString(); Vps_printf(" %d: SYSTEM : HDVPSS Drivers Version: %s\n", Clock_getTicks(), versionStr ); #endif /* * FVID2 system init */ status = FVID2_init ( NULL ); GT_assert( GT_DEFAULT_MASK, status == 0 ); deviceInitPrms.isI2cInitReq = TRUE; deviceInitPrms.isI2cProbingReq = TRUE; status = Vps_platformDeviceInit(&deviceInitPrms); GT_assert( GT_DEFAULT_MASK, status == 0 ); status = VpsUtils_appInit(); GT_assert( GT_DEFAULT_MASK, status == 0 ); #ifdef SYSTEM_DEBUG_VIP_RES_ALLOC /* * enable logs from VIP resource allocator */ Vcore_vipResDebugLogEnable ( TRUE ); #endif status = VpsUtils_mbxCreate(&gSystem_obj.mbx); GT_assert( GT_DEFAULT_MASK, status==FVID2_SOK); Semaphore_Params_init ( &semParams ); semParams.mode = Semaphore_Mode_BINARY; gSystem_obj.vipLock[SYSTEM_VIP_0] = Semaphore_create ( 1u, &semParams, NULL ); Semaphore_Params_init ( &semParams ); semParams.mode = Semaphore_Mode_BINARY; gSystem_obj.vipLock[SYSTEM_VIP_1] = Semaphore_create ( 1u, &semParams, NULL ); System_clearVipResetFlag(SYSTEM_VIP_0); System_clearVipResetFlag(SYSTEM_VIP_1); VpsUtils_prfLoadRegister(gSystem_obj.tsk, "SYSTEM "); #ifdef SYSTEM_DEBUG Vps_printf ( " %d: SYSTEM : System Init Done !!!\n", Clock_getTicks()); #endif return status; } Int32 System_deInit() { #ifdef SYSTEM_DEBUG Vps_printf ( " %d: SYSTEM : System De-Init in progress !!!\n", Clock_getTicks()); #endif Semaphore_delete ( &gSystem_obj.vipLock[SYSTEM_VIP_0] ); Semaphore_delete ( &gSystem_obj.vipLock[SYSTEM_VIP_1] ); VpsUtils_prfLoadUnRegister(gSystem_obj.tsk); VpsUtils_mbxDelete(&gSystem_obj.mbx); VpsUtils_appDeInit(); Vps_platformDeviceDeInit(); /* * FVID2 system de-init */ FVID2_deInit ( NULL ); Vps_platformDeInit(); #ifdef SYSTEM_USE_TILER VpsUtils_tilerDeInit ( ); #endif /* * De-init memory allocator */ VpsUtils_memDeInit ( ); VpsUtils_mbxDeInit(); VpsUtils_prfDeInit(); #ifdef SYSTEM_DEBUG Vps_printf ( " %d: SYSTEM : System De-Init Done !!!\n", Clock_getTicks()); #endif return FVID2_SOK; } void System_memPrintHeapStatus() { #ifdef SYSTEM_DEBUG Vps_printf(" %d: SYSTEM : Descriptor Heap Free Space (Current = %d bytes, Minimum = %d bytes) \r\n", Clock_getTicks(), VpsUtils_getDescMemHeapFreeSpace(), VpsUtils_getDescMemHeapMinFreeSpace() ); Vps_printf(" %d: SYSTEM : Heap Free Space (System = %d bytes, Buffer = %d bytes, Mbx = %d msgs) \r\n", Clock_getTicks(), VpsUtils_memGetSystemHeapFreeSpace(), VpsUtils_memGetBufferHeapFreeSpace(), VpsUtils_mbxGetFreeMsgCount() ); #endif return; } Int32 System_lockVip(UInt32 vipInst) { if(vipInst<SYSTEM_VIP_MAX) { Semaphore_pend ( gSystem_obj.vipLock[vipInst], BIOS_WAIT_FOREVER ); } return FVID2_SOK; } Int32 System_unlockVip(UInt32 vipInst) { if(vipInst<SYSTEM_VIP_MAX) { Semaphore_post ( gSystem_obj.vipLock[vipInst] ); } return FVID2_SOK; } Int32 System_setVipResetFlag(UInt32 vipInst) { if(vipInst<SYSTEM_VIP_MAX) { gSystem_obj.vipResetFlag[vipInst] = TRUE; } return FVID2_SOK; } Bool System_clearVipResetFlag(UInt32 vipInst) { Bool isReset = FALSE; if(vipInst<SYSTEM_VIP_MAX) { isReset = gSystem_obj.vipResetFlag[vipInst]; gSystem_obj.vipResetFlag[vipInst] = FALSE; } return isReset; } int System_resumeExecution() { gSystem_obj.haltExecution = FALSE; return 0; } int System_haltExecution() { gSystem_obj.haltExecution = TRUE; Vps_rprintf(" %d: SYSTEM: Executing Halted !!!\n", Clock_getTicks()); while(gSystem_obj.haltExecution) { Task_sleep(100); } return 0; }
05511b965e5c8cd8347630a22efe91fbd5237c80
b1d500a451cd9852089bf3d97e829df069daa9c8
/Images/MC/dMu/Alignment/0mm/MomBinnedAna/S0_Ag2_vs_p_thetaY_trackReco_WORLD_500MeV_BQ_1.C
761d31c19835b623d3eebe92d61e7f74f06d2dc8
[]
no_license
sam-grant/EDM
486ea029bf766c968a3c7b41198ffcf9bc3c9b8a
525e41de5f675c39014488c79144f47562910736
refs/heads/master
2022-10-30T22:35:42.979799
2022-10-19T18:44:54
2022-10-19T18:44:54
296,421,806
0
1
null
null
null
null
UTF-8
C
false
false
2,863
c
S0_Ag2_vs_p_thetaY_trackReco_WORLD_500MeV_BQ_1.C
void S0_Ag2_vs_p_thetaY_trackReco_WORLD_500MeV_BQ_1() { //=========Macro generated from canvas: c/c //========= (Mon Feb 7 14:58:27 2022) by ROOT version 6.24/06 TCanvas *c = new TCanvas("c", "c",0,0,800,600); c->SetHighLightColor(2); c->Range(-128.0953,-0.1439058,3216.756,0.3748925); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); Double_t Graph0_fx1049[6] = { 451.4261, 805.2435, 1239.499, 1727.357, 2211.937, 2637.085}; Double_t Graph0_fy1049[6] = { 0.03793321, -0.1104424, 0.0001472995, 0.01153007, 0.004758431, -0.04576308}; Double_t Graph0_fex1049[6] = { 0.1844619, 0.1667879, 0.1619127, 0.1953639, 0.2788157, 0.3336196}; Double_t Graph0_fey1049[6] = { 0.2499668, 0.04242209, 0.02704582, 0.02454479, 0.02623662, 0.03618594}; TGraphErrors *gre = new TGraphErrors(6,Graph0_fx1049,Graph0_fy1049,Graph0_fex1049,Graph0_fey1049); gre->SetName("Graph0"); gre->SetTitle("S0_"); gre->SetFillStyle(1000); gre->SetMarkerStyle(20); TH1F *Graph_Graph01049 = new TH1F("Graph_Graph01049","S0_",100,232.6239,2856.036); Graph_Graph01049->SetMinimum(-0.09202597); Graph_Graph01049->SetMaximum(0.3230127); Graph_Graph01049->SetDirectory(0); Graph_Graph01049->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); Graph_Graph01049->SetLineColor(ci); Graph_Graph01049->GetXaxis()->SetTitle("Decay vertex momentum [MeV]"); Graph_Graph01049->GetXaxis()->SetRange(0,101); Graph_Graph01049->GetXaxis()->CenterTitle(true); Graph_Graph01049->GetXaxis()->SetLabelFont(42); Graph_Graph01049->GetXaxis()->SetTitleSize(0.04); Graph_Graph01049->GetXaxis()->SetTitleOffset(1.1); Graph_Graph01049->GetXaxis()->SetTitleFont(42); Graph_Graph01049->GetYaxis()->SetTitle("A_{g#minus2} [mrad] / 500 MeV"); Graph_Graph01049->GetYaxis()->CenterTitle(true); Graph_Graph01049->GetYaxis()->SetNdivisions(4000510); Graph_Graph01049->GetYaxis()->SetLabelFont(42); Graph_Graph01049->GetYaxis()->SetTitleSize(0.04); Graph_Graph01049->GetYaxis()->SetTitleOffset(1.2); Graph_Graph01049->GetYaxis()->SetTitleFont(42); Graph_Graph01049->GetZaxis()->SetLabelFont(42); Graph_Graph01049->GetZaxis()->SetTitleOffset(1); Graph_Graph01049->GetZaxis()->SetTitleFont(42); gre->SetHistogram(Graph_Graph01049); gre->Draw("alp"); TPaveText *pt = new TPaveText(0.4567085,0.9362587,0.5432915,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *pt_LaTex = pt->AddText("S0_"); pt->Draw(); c->Modified(); c->cd(); c->SetSelected(c); }
2f434a6c42b02a0ea3738ec61666447d34f4225f
ff60ee6360103765d42fdc1d60b1cae7970731ff
/tut sheet week 7 -functions pointers/globalprac.c
3b49c987a7bb84fbba4908a38ea66e9aff9a470f
[]
no_license
purnasrivatsa96/C-programming
c872408d724bde79b1aededbb0da134e0c89f38e
b3367a5882cc6f8842dbf923bfd4da72969ab367
refs/heads/master
2020-03-17T19:52:05.823196
2018-05-31T04:37:35
2018-05-31T04:37:35
133,881,542
0
0
null
null
null
null
UTF-8
C
false
false
529
c
globalprac.c
#include<stdio.h> int a,b,c; int main(){ scanf("%d %d %d",&a,&b,&c); int func(int a1, int b1,int c1){ int min; if(a<b&&b<c) min = a; if(b<a&&b<c) min = b; if(c<a&&c<b) min = c; if(min==a){ a--; b++; c++; return a; } if(min==b){ b--; a++; c++; return b; } if(min==c){ c--; a++; b++; return c; } } int min = func(a,b,c); printf("%d %d %d",a,b,c); }
108f1cace4356c11ffc393b8a48be552a3e8373a
d7a6eebfcfbe25734889fe7b0ec597386800160b
/MapServer/dbcomm/dbcontainer.h
ca07b747fb921b1e510b1d4a77b62132f4d7d493
[]
no_license
naturalleo/coh-score
09f3a9137ab845739f3cc4be026c014af99ed81e
ccb216f07c25457991b86d3b41ec98ff858ed187
refs/heads/master
2020-11-24T19:45:13.700022
2019-07-28T14:36:02
2019-07-28T14:36:02
null
0
0
null
null
null
null
UTF-8
C
false
false
4,398
h
dbcontainer.h
#ifndef _DBCONTAINER_H #define _DBCONTAINER_H #include <stdlib.h> #include "stdtypes.h" #include "net_typedefs.h" typedef struct NetLink NetLink; typedef struct Packet Packet; typedef struct ContainerReflectInfo ContainerReflectInfo; typedef enum ContainerCmd ContainerCmd; #define MAX_CONTAINER_MEMBERS ( 4000 ) typedef struct ContainerInfo { char *data; int id; int is_map_xfer; int got_lock; int valid; int error_code; int members[MAX_CONTAINER_MEMBERS]; int member_count; int delete_me; int is_static_map; int demand_loaded; } ContainerInfo; typedef struct { U32 ready : 1; U32 valid : 1; int map_id; int id; char mission_info[1024]; } ContainerStatus; enum { FULL_UNPACK_AND_TREATMENT, JUST_UNPACK, }; typedef struct { char name[MAX_PATH]; U32 valid : 1; U32 is_static : 1; } MapNameEntry; extern int last_db_error_code; extern char last_db_error[256]; // Generated by mkproto int dbReadContainerUncached(Packet *pak,ContainerInfo *ci,int list_id); int dbReadContainer(Packet *pak,ContainerInfo *ci,int list_id); void dbReceiveEnts(int count,Packet *pak,NetLink *link); void dbReceiveMaps(int count,Packet *pak); int dbReceiveGroups(int count,Packet *pak,int list_id); int dbReceiveContainers(Packet *pak,NetLink *link); void dbReceiveContainerStatus(Packet *pak); int dbSyncContainerStatusRequest(int list_id,ContainerStatus *c_list,int count); void netlatency(); void handleLostMembership(Packet *pak); void handleBroadcastMsg(Packet *pak); int dbSyncContainerUpdate(int list_id,int container_id,int cmd,char *data); void dbBroadcastMsg(int list_id,int *ids, int msg_type,int senderID,int count,char *msg); void dbAsyncContainerCreate(int list_id,int *container_id); void dbAsyncContainerRequest(int list_id,int container_id,int cmd,NetPacketCallback *cb_func); void dbAsyncContainersRequest(int list_id,int *eaContainer_ids,int cmd,NetPacketCallback *cb_func); int dbSyncContainerRequest(int list_id,int container_id,int cmd, int no_process); int dbSyncContainerRequestCustom(int list_id,int container_id,int cmd, NetPacketCallback *cb_func); int dbSyncContainerCreate(int list_id,int *container_id); int dbContainerAddDelMembers(int list_id,int add,int autolock,int group_id,int count,int *members,char* data); void dbAsyncContainerUpdate(int list_id,int container_id,int cmd,const char *data,int callback_id); void dbWaitContainersAcked(); void handleContainerID(Packet *pak); void handleMissionPlayerCountResponse(Packet *pak); int dbSyncContainerFindByElement(int list_id,char *element,char *value,int *curr_map,int online_only); int dbSyncContainerFindByElementEx(int list_id,char *element,char *value,int *curr_map,int online_only,int search_offline_ents); int dbSyncMissionPlayerCount(char* missioninfo); void dbWriteTemplate(char *dir,char *fname,char *data); void dbWriteSchema(char *dir,char *fname,char *data); //void dbLoadAttributes(); //bool dbAttributeId(char *name,int *idx); void dbWriteAttributes(char *fname,char *data); char *dbGetMapName(int idx); int dbGetMapId(const char *mapname); void dbHandleContainerAck(Packet *pak); void dbContainerSendList(int list_id,char **data,int *ids,int count, ContainerCmd cmd); int dbSyncPlayerRename(int db_id, char* newname); int dbSyncPlayerUnlock(int db_id); int dbSyncAccountAdjustServerSlots(U32 auth_id, int delta); int dbSyncPlayerChangeType(int db_id, int type); int dbSyncPlayerChangeSubType(int db_id, int type); int dbSyncPlayerChangePraetorianProgress(int db_id, int progress); int dbSyncPlayerChangeInfluenceType(int db_id, int type); void dbClearContainerIDCache(void); void dbRequestShutdown(void); // container relays - delivery of command to container, with receipt to sender Packet* dbContainerRelayCreate(U32 cmd, U32 listid, U32 cid, U32 user_cmd, U32 user_data); void handleContainerRelay(Packet* pak); void dbContainerSendReceipt(U32 err, char* str); // standard response to a relay Packet* dbContainerCreateReceipt(U32 err, char* str); // if you need to send additional info with relay response void handleContainerReceipt(Packet* pak); U32 dbRelayLockId(void); // only valid if you just received a relay // container reflection - more flexible container update mechanism void dbContainerSendReflection(ContainerReflectInfo*** reflectlist, int list_id, char** data, int* ids, int count, int cmd); void handleDbContainerReflect(Packet* pak); // End mkproto #endif
08f432e0ff821a1115357e3123e3e797df7a65e2
0fad34977a5180e29db57495652af995ef484105
/Console_2_1_52/CalcResults/Offsets.h
72085028645ca380ed34a59c335b1f219403b1db
[]
no_license
Wenguangliu/Hello
5759c237c37ffaf7f9d2cdc18ba6f2895557dda9
3801697e51eddb4b03c05924cb5e776ec46e18ae
refs/heads/master
2020-12-11T20:56:05.865805
2020-01-30T22:24:33
2020-01-30T22:24:33
233,956,105
0
0
null
2020-01-14T23:41:25
2020-01-14T23:26:41
null
UTF-8
C
false
false
206
h
Offsets.h
#ifndef __OFFSETS_H #define __OFFSETS_H #if defined(__cplusplus) extern "C" { #endif unsigned short SetWavelengthOffsets(void); #if defined(__cplusplus) } #endif #endif // __OFFSETS_H
75ce02c0bb8611d0749b57071ebca816cd76325e
66d773d6ca92e27d446686d5d7fb17c8a343f1eb
/public/freetds-1.00.23/src/odbc/unittests/connect.c
f5c964720b17b9433381da3137669c8b9a91db05
[ "Unlicense", "LGPL-2.0-only", "LGPL-2.0-or-later", "GPL-2.0-only", "FSFAP" ]
permissive
thepriyakadam/hrms
5af415fd0ac3debc672f45b794df6db04d921940
af7f44ac10691850487e2c412a666694680a0672
refs/heads/master
2021-10-21T17:09:31.736267
2019-03-02T07:07:22
2019-03-02T07:07:22
171,734,186
0
0
Unlicense
2019-03-02T07:07:23
2019-02-20T19:16:25
HTML
UTF-8
C
false
false
3,624
c
connect.c
#include "common.h" static void init_connect(void); static void init_connect(void) { CHKAllocEnv(&odbc_env, "S"); CHKAllocConnect(&odbc_conn, "S"); } #ifdef _WIN32 #include <odbcinst.h> static char *entry = NULL; static char * get_entry(const char *key) { static char buf[256]; entry = NULL; if (SQLGetPrivateProfileString(odbc_server, key, "", buf, sizeof(buf), "odbc.ini") > 0) entry = buf; return entry; } #endif int main(int argc, char *argv[]) { char tmp[2048]; SQLSMALLINT len; int succeeded = 0; int is_freetds = 1; SQLRETURN rc; if (odbc_read_login_info()) exit(1); /* * prepare our odbcinst.ini * is better to do it before connect cause uniODBC cache INIs * the name must be odbcinst.ini cause unixODBC accept only this name */ if (odbc_driver[0]) { FILE *f = fopen("odbcinst.ini", "w"); if (f) { fprintf(f, "[FreeTDS]\nDriver = %s\n", odbc_driver); fclose(f); /* force iODBC */ setenv("ODBCINSTINI", "./odbcinst.ini", 1); setenv("SYSODBCINSTINI", "./odbcinst.ini", 1); /* force unixODBC (only directory) */ setenv("ODBCSYSINI", ".", 1); } } printf("SQLConnect connect..\n"); odbc_connect(); if (!odbc_driver_is_freetds()) is_freetds = 0; odbc_disconnect(); ++succeeded; if (!is_freetds) { printf("Driver is not FreeTDS, exiting\n"); return 0; } /* try connect string with using DSN */ printf("connect string DSN connect..\n"); init_connect(); sprintf(tmp, "DSN=%s;UID=%s;PWD=%s;DATABASE=%s;", odbc_server, odbc_user, odbc_password, odbc_database); CHKDriverConnect(NULL, T(tmp), SQL_NTS, (SQLTCHAR *) tmp, sizeof(tmp)/sizeof(SQLTCHAR), &len, SQL_DRIVER_NOPROMPT, "SI"); odbc_disconnect(); ++succeeded; /* try connect string using old SERVERNAME specification */ printf("connect string SERVERNAME connect..\n"); printf("odbcinst.ini must be configured with FreeTDS driver..\n"); /* this is expected to work with unixODBC */ init_connect(); sprintf(tmp, "DRIVER=FreeTDS;SERVERNAME=%s;UID=%s;PWD=%s;DATABASE=%s;", odbc_server, odbc_user, odbc_password, odbc_database); rc = CHKDriverConnect(NULL, T(tmp), SQL_NTS, (SQLTCHAR *) tmp, sizeof(tmp)/sizeof(SQLTCHAR), &len, SQL_DRIVER_NOPROMPT, "SIE"); if (rc == SQL_ERROR) { printf("Unable to open data source (ret=%d)\n", rc); } else { ++succeeded; } odbc_disconnect(); /* this is expected to work with iODBC * (passing shared object name as driver) */ if (odbc_driver[0]) { init_connect(); sprintf(tmp, "DRIVER=%s;SERVERNAME=%s;UID=%s;PWD=%s;DATABASE=%s;", odbc_driver, odbc_server, odbc_user, odbc_password, odbc_database); rc = CHKDriverConnect(NULL, T(tmp), SQL_NTS, (SQLTCHAR *) tmp, sizeof(tmp)/sizeof(SQLTCHAR), &len, SQL_DRIVER_NOPROMPT, "SIE"); if (rc == SQL_ERROR) { printf("Unable to open data source (ret=%d)\n", rc); } else { ++succeeded; } odbc_disconnect(); } #ifdef _WIN32 if (get_entry("SERVER")) { init_connect(); sprintf(tmp, "DRIVER=FreeTDS;SERVER=%s;UID=%s;PWD=%s;DATABASE=%s;", entry, odbc_user, odbc_password, odbc_database); if (get_entry("TDS_Version")) sprintf(strchr(tmp, 0), "TDS_Version=%s;", entry); if (get_entry("Port")) sprintf(strchr(tmp, 0), "Port=%s;", entry); rc = CHKDriverConnect(NULL, T(tmp), SQL_NTS, (SQLTCHAR *) tmp, sizeof(tmp)/sizeof(SQLTCHAR), &len, SQL_DRIVER_NOPROMPT, "SIE"); if (rc == SQL_ERROR) { printf("Unable to open data source (ret=%d)\n", rc); } else { ++succeeded; } odbc_disconnect(); } #endif /* at least one should success.. */ if (succeeded < 3) { ODBC_REPORT_ERROR("Too few successes"); exit(1); } printf("Done.\n"); return 0; }
69a7ce9881f81a2d655aa7ec1574acbe23c90878
3dbe17454145b02a9697748cb2c8fd6563c03786
/createLog/fwrite4.c
80a6faf2f28f8039dd3847cf029716d1ee161cc2
[]
no_license
dujue/SVO_Socket
25f4f47f0c35fe1c26cdaf4407c37f5edf035448
98a79c3fd435dce8de56e79ef9677b51518e6bb7
refs/heads/master
2021-01-20T22:51:36.135927
2017-08-30T02:17:43
2017-08-30T02:17:43
101,823,153
0
0
null
null
null
null
UTF-8
C
false
false
464
c
fwrite4.c
 #include <fcntl.h>   #include <string.h>   #include <sys/stat.h>   #include <sys/types.h>   #include <unistd.h>   const char* journal_filename = "/Users/maocong90/Desktop/mysocket/createLog/log";   void write_journal_entry (char* entry)   {   int fd = open (journal_filename, O_WRONLY | O_CREAT | O_APPEND, 0660);   write (fd, entry, strlen (entry));   write (fd, “\n”, 1);   fsync (fd);   close (fd);   }
c66dd7d093047ac34b2e7e467a025b8629e47b4f
c17052504addc245c0a49e1faf89dff035c46723
/01struct.c
f9be2d0fc1e14699d81e5fa5f71728d1f149c771
[]
no_license
ImbaZzy/Test01
de1493bfa6464457cc357b942263aea3a18219c1
da75a67cf21a43766fa4358ee363b823d0fac0ce
refs/heads/master
2020-04-04T10:47:48.541960
2018-11-03T01:38:35
2018-11-03T01:38:35
155,866,626
0
0
null
null
null
null
UTF-8
C
false
false
176
c
01struct.c
#include <stdio.h> typedef struct { int age; float height; char name[20]; } per; int main() { per person1 = {10,1.36f,"abc"}; printf("年龄是%d\n",person1.age); return 0; };
f6a1cb7ae4a8b16751b475333ea9574c486559b3
abecd90ee33fe434cb6751f4dd780f90f69b74c0
/User/main.c
c7036400a57c095a538d966bb035cf41b09591d9
[]
no_license
Cristina0616/STM32Proj
59fdec212ffa988d374ce24a47473e48e1a1f025
211c4c58a67d1a0687a8a433b04c37afaf03233f
refs/heads/master
2021-06-19T08:47:23.853166
2017-06-12T06:53:56
2017-06-12T06:53:56
null
0
0
null
null
null
null
GB18030
C
false
false
26,922
c
main.c
#include "common.h" #include "stm_sys.h" #include "stm_usart.h" #include "stm_pc.h" #include "stm_valve.h" #include "stm_gc.h" #include "stm_led.h" #include "stm_mfc.h" #include "stm_timer.h" #include "stm_ds18b20.h" #include "stm_tc.h" #include "stm_pump.h" TIME_PARAMETER time_parameter; SAMPLE_INLET sample_inlet; void Initial(void); //最初的函数 u8 EquipSelfCheck(void);//设备自我检查 u8 PipelineWash(void); //管道清理 u8 SampleInletWash(void);//进样口清理 u8 End(void); //结束 void Emergency(void);//突发情况 int main(void) { short set_ring_temp, set_pipeline_temp; //定义变量:设置温度,设置管道温度 u16 inlet_wash_delay_count = 0, sample_delay_count = 0, set_flow, set_flow_data; //入口清理延迟计数 进样口延迟计数 设置流量 设置流量数据 //(全部数据都是无符号16位二进种的数据类型) u8 i, vp, delay, sample_step = 0, sample_count = 0, get_ring_temp_delay_count = 0; // 无符号8位二进制数据:延时,样品的步骤,获取温度的延迟计数 RCC_Config(); //配置系统时钟 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //设置中断优先级分组 PC_USART_Init(9600); //设置与上位机通讯的串口波特率为9600 RS485_USART_Init(9600); //设置与485总线通讯的串口波特率为9600 RS485_GPIO_Init(); //设置485总线与通用输入输出口的初始化 GC_GPIO_Init(); //气相色谱中输入输出口的初始化 LED_GPIO_Init(); //LED端口初始化,该函数在led.c的文件中 MFC_ADC_Init(); MFC_DAC_Init(); Timer_Init(); //定时器初始化 DS18B20_GPIO_Init(); //ds_18b20端口初始化 TC_GPIO_Init(); Pump_GPIO_Init(); //真空泵的端口初始化 Initial(); f_status.fs_data = 0xFF; //0xFF对于状态报告帧来说是一个无效的数据,故以此来作为设备启动的状态值 for(i=1;i<4;i++) { SendStatusFrame(); //发送状态框,该函数在pc.c中 Delay_ms(100); } f_status.fs_data = 0x00; i = 0; while(1) { if(PC_USART_RX_STA&0x8000) //判断上位机是否有数据过来 { if(BCC(&pc_usart_rx_buf[1],pc_usart_rx_buf[0]-1) == pc_usart_rx_buf[pc_usart_rx_buf[0]]) //判断数据是否有效 { switch(pc_usart_rx_buf[1]) { case CMD_ACK: //应答帧,应答指令设为0,宏定义在stm_pc.h中 switch(pc_usart_rx_buf[2]) { case CMD_STATUS: //状态报告指令 6 FLAGS |= 0x0001; //置状态帧发送成功标志 break; case CMD_ERROR: //错误报告指令 7 FLAGS |= 0x0010; //置错误帧发送成功标志 break; } break; case CMD_PARAM_SET: //参数设置帧 1 f_ack.fa_data = CMD_PARAM_SET; SendAckFrame(); time_parameter = *((P_TIME_PARAMETER)&pc_usart_rx_buf[2]); //获取时间参数 break; case CMD_SAMPLE_INLET_SET: //进样口设置帧 f_ack.fa_data = CMD_SAMPLE_INLET_SET; SendAckFrame(); sample_inlet = *((P_SAMPLE_INLET)&pc_usart_rx_buf[2]); //获取进样口数据 break; case CMD_SAMPLE_INLET_WASH: //进样口冲洗帧 f_ack.fa_data = CMD_SAMPLE_INLET_WASH; SendAckFrame(); LEDGreen(); if(ValveGOn(VT_VALVE3,2,14,TRUE)==SUCCESS) //三通阀执行GO指令从位置1转到2 { i = 0; FLAGS |= 0x0100; //置进样口冲洗标志 } else Emergency(); //突发状况 break; case CMD_START_SAMPLE: //开始进样帧 f_ack.fa_data = CMD_START_SAMPLE; SendAckFrame(); i = 0; FLAGS |= 0x0002; //置进样开始标志 LEDGreen(); PUMP_START; break; case CMD_FLOW_SET: //流量设置帧 f_ack.fa_data = CMD_FLOW_SET; SendAckFrame(); set_flow = *((u16*)&pc_usart_rx_buf[2]); //获取要设置的流量值 set_flow_data = (u16)((5.0*4095/(0.1*3.3))*(set_flow/1000.0)); FLAGS |= 0x0020; //置MFC有无标志 if(sample_step==3) { DAC_SetChannel1Data(DAC_Align_12b_R,set_flow_data); //设置MFC到指定的流量 send_ff_frq = 5; //5s上传一次流量帧 } else send_ff_frq = 5; //5s上传一次流量帧 break; case CMD_RING_TEMP_SET: //定量环温度设置帧 f_ack.fa_data = CMD_RING_TEMP_SET; SendAckFrame(); set_ring_temp = *((short*)&pc_usart_rx_buf[2]); //获取要设置的温度值 FLAGS |= 0x0040; //置TCRing有无标志 get_ring_temp_delay_count = 3*TIME_BASE; break; case CMD_PIPELINE_TEMP_SET: //管路温度设置帧 f_ack.fa_data = CMD_PIPELINE_TEMP_SET; SendAckFrame(); set_pipeline_temp = *((short*)&pc_usart_rx_buf[2]); //获取要设置的温度值 FLAGS |= 0x0400; //置TCPipeline有无标志 break; case CMD_SELF_CHECK: //设备自检帧 f_ack.fa_data = CMD_SELF_CHECK; SendAckFrame(); LEDGreen(); PUMP_START; if(EquipSelfCheck()==SUCCESS) { f_error.fe_data = E_OK; SendErrorFrame(); resend_ef_times = 2; i = 0; inlet_wash_delay_count = 0; sample_step = 0; sample_count = 0; sample_delay_count = 0; resend_sf_times = 0; resend_sf_delay_count = 0; resend_ef_times = 0; resend_ef_delay_count = 0; FLAGS &= 0x06E0; f_status.fs_data = 0x00; LEDBlue(); PUMP_STOP; } break; case CMD_PIPELINE_WASH: //管路冲洗帧 f_ack.fa_data = CMD_PIPELINE_WASH; SendAckFrame(); LEDGreen(); if(PipelineWash()==SUCCESS) { f_status.fs_data = 0x00; SendStatusFrame(); resend_sf_times = 2; LEDBlue(); } break; case CMD_PAUSE_SAMPLE: //暂停进样帧 f_ack.fa_data = CMD_PAUSE_SAMPLE; SendAckFrame(); if(End()==SUCCESS) { f_status.fs_data &= 0x10; //置三通阀和十六通阀状态位为大气,置十通阀状态位为B SendStatusFrame(); resend_sf_times = 2; sample_step = 0; sample_delay_count = 0; LEDBlue(); PUMP_STOP; } DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; case CMD_RESUME_SAMPLE: //继续进样帧 f_ack.fa_data = CMD_RESUME_SAMPLE; SendAckFrame(); FLAGS |= 0x0002; //置进样开始标志 LEDGreen(); PUMP_START; break; case CMD_STOP_SAMPLE: //终止进样帧 f_ack.fa_data = CMD_STOP_SAMPLE; SendAckFrame(); if(End()==SUCCESS) { f_status.fs_data &= 0x10; //置三通阀和十六通阀状态位为大气,置十通阀状态位为B SendStatusFrame(); resend_sf_times = 2; i = 0; sample_step = 0; sample_count = 0; sample_delay_count = 0; LEDBlue(); PUMP_STOP; } DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; case CMD_STOP_INLET_WASH: //终止进样口冲洗帧 f_ack.fa_data = CMD_STOP_INLET_WASH; SendAckFrame(); /***** 阀回到初始位置 *****/ if(ValveGOn(VT_VALVE3,1,14,TRUE)==FAILURE) //三通阀执行GO指令从位置2转到1 { FLAGS &= 0xFEFF; //清进样口冲洗标志 break; } if(ValveGOn(VT_VALVE16,1,24,TRUE)==FAILURE) //十六通阀执行GO指令转到位置1 { FLAGS &= 0xFEFF; //清进样口冲洗标志 break; } if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A { FLAGS &= 0xFEFF; //清进样口冲洗标志 break; } f_status.fs_data = 0x00; SendStatusFrame(); resend_sf_times = 2; i = 0; inlet_wash_delay_count = 0; FLAGS &= 0xFEFF; //清进样口冲洗标志 LEDBlue(); break; default: break; } } PC_USART_RX_STA = 0; } if(FLAGS&0x0100) //判断是否开始进样口冲洗 { if(inlet_wash_delay_count==0) //判断时间是否到 { for(;i<SAMPLE_INLET_NUM;i++) { if(sample_inlet.si_inlet&(1<<i)) //检查需要冲洗的进样口 { vp = i/2+2; //计算进样口所在的阀位置 if(ValveGOn(VT_VALVE16,vp,24,TRUE)==FAILURE) { Emergency(); FLAGS &= 0xFEFF; //清进样口冲洗标志 break; } if((i+1)%2) //判断进样口的位置:如果是奇数,则位于下圈;如果是偶数,则位于上圈 { if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A { Emergency(); FLAGS &= 0xFEFF; //清进样口冲洗标志 break; } } else { if(ValveGOn(VT_VALVE2,'B',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置B { Emergency(); FLAGS &= 0xFEFF; //清进样口冲洗标志 break; } } inlet_wash_delay_count = time_parameter.tp_sample_inlet_wash_time*TIME_BASE; break; } } if(i==SAMPLE_INLET_NUM) //判断所有进样口是否冲洗完成 { /***** 阀回到初始位置 *****/ if(ValveGOn(VT_VALVE3,1,14,TRUE)==FAILURE) //三通阀执行GO指令从位置2转到1 { FLAGS &= 0xFEFF; //清进样口冲洗标志 continue; } if(ValveGOn(VT_VALVE16,1,24,TRUE)==FAILURE) //十六通阀执行GO指令转到位置1 { FLAGS &= 0xFEFF; //清进样口冲洗标志 continue; } if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A { FLAGS &= 0xFEFF; //清进样口冲洗标志 continue; } f_status.fs_data = 0x00; SendStatusFrame(); resend_sf_times = 2; i = 0; inlet_wash_delay_count = 0; FLAGS &= 0xFEFF; //清进样口冲洗标志 LEDBlue(); } } } if(FLAGS&0x0002) //判断是否开始进样 { if(sample_delay_count==0) //判断时间是否到 { if(sample_count==0) //判断一个进样口的进样是否结束 { for(;i<SAMPLE_INLET_NUM;i++) { if(sample_inlet.si_inlet&(1<<i)) //检查下一个需要进样的进样口 { sample_count = (sample_inlet.si_sample_times[i/2]>>(i%2)*4)&0x0F; //获取进样口的进样次数 FLAGS |= 0x0004; //置选择进样口标志 break; } } } if(i==SAMPLE_INLET_NUM) //判断所有进样口是否进样完成 { if(!(FLAGS&0x0008)) //判断是否有进行过GC分析后期时间补偿 { sample_delay_count = (time_parameter.tp_pipeline_wash_time/2)*TIME_BASE; //设置GC分析后期时间补偿 FLAGS |= 0x0008; //置GC分析后期时间补偿标志 } else { if(ValveGOn(VT_VALVE4,'A',5,TRUE)==FAILURE) //四通阀执行GO指令切换到位置A Emergency(); else if(ValveGOn(VT_VALVE10,'B',5,TRUE)==SUCCESS) //十通阀执行GO指令切换到位置B { f_status.fs_data &= 0xDF; //置十通阀状态位为B SendStatusFrame(); resend_sf_times = 2; i = 0; LEDBlue(); PUMP_STOP; } FLAGS &= 0xFFF5; //清进样开始标志,清GC分析后期时间补偿标志 } } else { sample_step++; switch(sample_step) { case 1: //开始管路冲洗,此时GC可能还在继续分析中 if(ValveGOn(VT_VALVE3,2,14,TRUE)==SUCCESS) //三通阀执行GO指令从位置1转到2 { f_status.fs_data &= 0x3F; //置三通阀状态位为氮气 f_status.fs_data |= 0x40; SendStatusFrame(); resend_sf_times = 2; sample_delay_count = (time_parameter.tp_pipeline_wash_time/2)*TIME_BASE; //设置管路冲洗时间 } else { Emergency(); FLAGS &= 0xFFFD; //清进样开始标志 } break; case 2: //开始管路后冲洗,GC分析结束 if(ValveGOn(VT_VALVE4,'A',5,TRUE)==FAILURE) //四通阀执行GO指令切换到位置A { Emergency(); FLAGS &= 0xFFFD; //清进样开始标志 } else if(ValveGOn(VT_VALVE10,'B',5,TRUE)==SUCCESS) //十通阀执行GO指令切换到位置B { f_status.fs_data &= 0xDF; //置十通阀状态位为B SendStatusFrame(); resend_sf_times = 2; sample_delay_count = (time_parameter.tp_pipeline_wash_time/2)*TIME_BASE; //设置管路后冲洗时间 if(FLAGS&0x0200) //判断MFC是否OK DAC_SetChannel1Data(DAC_Align_12b_R,set_flow_data); //开启MFC } else { Emergency(); FLAGS &= 0xFFFD; //清进样开始标志 } break; case 3: //开始定量环进样 if(ValveGOn(VT_VALVE3,1,14,TRUE)==FAILURE) //三通阀执行GO指令从位置2转到1 { DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; } vp = i/2+2; //计算进样口所在的阀位置 if(vp>9) delay = (412+(vp-(vp%10+1)*2-1-1)*251+240)/100; //vp在后半圈 else delay = (412+(vp-1-1)*251+240)/100; //vp在前半圈 if(ValveGOn(VT_VALVE16,vp,delay,TRUE)==FAILURE) { DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; } f_status.fs_data |= i/2+1; //置十六通阀状态位为相应的进样口组 if(FLAGS&0x0004) //判断是否要选择一个进样口 { if((i+1)%2) //判断进样口的位置:如果是奇数,则位于下圈;如果是偶数,则位于上圈 { if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A { DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; } f_status.fs_data &= 0xEF; //置二通阀状态位为下圈 } else { if(ValveGOn(VT_VALVE2,'B',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置B { DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; } f_status.fs_data |= 0x10; //置二通阀状态位为上圈 } FLAGS &= 0xFFFB; //清选择进样口标志 } if(ValveGOn(VT_VALVE3,4,14,TRUE)==FAILURE) //三通阀执行GO指令从位置1转到4 { Emergency(); DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC FLAGS &= 0xFFFD; //清进样开始标志 break; } f_status.fs_data &= 0x3F; //置三通阀状态位为真空泵 f_status.fs_data |= 0x80; SendStatusFrame(); resend_sf_times = 2; sample_delay_count = time_parameter.tp_ring_sample_time*TIME_BASE; //设置定量环进样时间 if(FLAGS&0x0200) //判断MFC是否OK send_ff_frq = 5; //5s上传一次流量帧 break; case 4: //开始压力平衡 if(FLAGS&0x0020) //判断有无配备MFC { if(cfd_avrg==0) //判断管路上是否有流量 { f_error.fe_data = E_PIPELINE_EQUIP_FAULT; SendErrorFrame(); resend_ef_times = 2; LEDRed(); Emergency(); FLAGS &= 0xFFFD; //清进样开始标志 break; } } if(V3V16Go1Together()==SUCCESS) //三通阀和十六通阀同时转向位置1 { f_status.fs_data &= 0x30; //置三通阀和十六通阀状态位为大气 SendStatusFrame(); resend_sf_times = 2; sample_delay_count = time_parameter.tp_pressure_balance_time*TIME_BASE; //设置压力平衡时间 } else FLAGS &= 0xFFFD; //清进样开始标志 if(FLAGS&0x0200) //判断MFC是否OK { DAC_SetChannel1Data(DAC_Align_12b_R,0); send_ff_frq = 5; //5s上传一次流量帧 } break; case 5: //开始GC分析,先分析一个定量环中的样品气 if(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_12)==0) //判断GC是否准备就绪 { f_error.fe_data = E_GC_NOT_READY; SendErrorFrame(); resend_ef_times = 2; LEDRed(); FLAGS &= 0xFFFD; //清进样开始标志 break; } if(ValveGOn(VT_VALVE10,'A',5,TRUE)==SUCCESS) //十通阀执行GO指令切换到位置A { f_status.fs_data |= 0x20; //置十通阀状态位为A SendStatusFrame(); resend_sf_times = 2; sample_delay_count = time_parameter.tp_gc_analysis_time*TIME_BASE; //设置GC分析时间 GCStart(); //向GC发开始进样分析信号 } else { Emergency(); FLAGS &= 0xFFFD; //清进样开始标志 } break; case 6: //继续分析下一个定量环中的样品气 if(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_12)==0) //判断GC是否准备就绪 { f_error.fe_data = E_GC_NOT_READY; SendErrorFrame(); resend_ef_times = 2; LEDRed(); FLAGS &= 0xFFFD; //清进样开始标志 break; } if(ValveGOn(VT_VALVE4,'B',5,TRUE)==SUCCESS) //四通阀执行GO指令切换到位置B { sample_delay_count = (time_parameter.tp_gc_analysis_time-time_parameter.tp_pipeline_wash_time/2)*TIME_BASE; //设置GC分析前期时间 GCStart(); //向GC发开始进样分析信号 } else { Emergency(); FLAGS &= 0xFFFD; //清进样开始标志 } break; default: break; } } } } if(!(FLAGS&0x0001) && resend_sf_delay_count==0 && resend_sf_times!=0) //判断状态帧发送是否成功 { SendStatusFrame(); resend_sf_times--; } if(!(FLAGS&0x0010) && resend_ef_delay_count==0 && resend_ef_times!=0) //判断错误帧发送是否成功 { SendErrorFrame(); resend_ef_times--; } Delay_ms(500); if(resend_sf_delay_count>0) resend_sf_delay_count--; if(resend_ef_delay_count>0) resend_ef_delay_count--; if(inlet_wash_delay_count>0) { inlet_wash_delay_count--; if(inlet_wash_delay_count==0) i++; } if(sample_delay_count>0) { sample_delay_count--; if(sample_delay_count==0 && sample_step==6) { sample_step = 0; //准备新一轮进样 sample_count--; if(sample_count==0) //判断一个进样口的进样是否结束 i++; } } if(FLAGS&0x0080) //判断DS18B20是否OK { if(get_ring_temp_delay_count>0) { get_ring_temp_delay_count--; if(get_ring_temp_delay_count==0) { current_ring_temp = DS18B20_GetTemperature(); if(current_ring_temp<set_ring_temp) TCRingHeat(); else if(current_ring_temp>set_ring_temp) TCRingStop(); get_ring_temp_delay_count = 1*TIME_BASE; //每秒检测一次温度 } } } } } void Initial(void) { u8 i; PC_USART_RX_STA = 0; for(i=0;i<PC_USART_REC_LEN;i++) pc_usart_rx_buf[i] = 0; pc_usart_tx_buf = NULL; pc_usart_tx_count = 0; rs485_usart_rx_buf = 0; rs485_usart_tx_buf = NULL; rs485_usart_tx_count = 0; resend_sf_times = 0; resend_sf_delay_count = 0; resend_ef_times = 0; resend_ef_delay_count = 0; for(i=0;i<CURRENT_FLOW_DATA_LEN;i++) current_flow_data[i] = 0; cfd_avrg = 0; current_ring_temp = 0; current_pipeline_temp = 0; FLAGS = 0; /***** 应答帧初始化 *****/ f_ack.fa_start = STX; f_ack.fa_len = 3; f_ack.fa_cmd = CMD_ACK; f_ack.fa_end = ETX; /***** 状态报告帧初始化 *****/ f_status.fs_start = STX; f_status.fs_len = 3; f_status.fs_cmd = CMD_STATUS; f_status.fs_end = ETX; /***** 错误报告帧初始化 *****/ f_error.fe_start = STX; f_error.fe_len = 3; f_error.fe_cmd = CMD_ERROR; f_error.fe_end = ETX; /***** 流量报告帧初始化 *****/ f_flow.ff_start = STX; f_flow.ff_len = 4; f_flow.ff_cmd = CMD_FLOW; f_flow.ff_end = ETX; /***** 定量环温度报告帧初始化 *****/ f_ring_temp.frt_start = STX; f_ring_temp.frt_len = 4; f_ring_temp.frt_cmd = CMD_RING_TEMP; f_ring_temp.frt_end = ETX; /***** 管路温度报告帧初始化 *****/ f_pipeline_temp.fpt_start = STX; f_pipeline_temp.fpt_len = 4; f_pipeline_temp.fpt_cmd = CMD_PIPELINE_TEMP; f_pipeline_temp.fpt_end = ETX; } u8 EquipSelfCheck(void) { FLAGS &= 0xFD7F; //清MFC OK标志,清DS18B20 OK标志 /***** 阀先回到初始位置 *****/ if(ValveGOn(VT_VALVE3,1,24,TRUE)==FAILURE) //三通阀执行GO指令转到位置1 return FAILURE; if(ValveGOn(VT_VALVE16,1,24,TRUE)==FAILURE) //十六通阀执行GO指令转到位置1 return FAILURE; if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A return FAILURE; if(ValveGOn(VT_VALVE10,'B',5,TRUE)==FAILURE) //十通阀执行GO指令切换到位置B return FAILURE; if(ValveGOn(VT_VALVE4,'A',5,TRUE)==FAILURE) //四通阀执行GO指令切换到位置A return FAILURE; /***** 开始阀的检查 *****/ if(ValveCXn(VT_VALVE16,VCT_CW,16,42)==FAILURE) //十六通阀执行CW指令从位置1转到16 return FAILURE; if(ValveCXn(VT_VALVE16,VCT_CW,1,7)==FAILURE) //十六通阀执行CW指令从位置16转到1 return FAILURE; if(ValveCXn(VT_VALVE16,VCT_CC,2,42)==FAILURE) //十六通阀执行CC指令从位置1转到2 return FAILURE; if(ValveCXn(VT_VALVE16,VCT_CC,1,7)==FAILURE) //十六通阀执行CC指令从位置2转到1 return FAILURE; if(ValveGOn(VT_VALVE2,'B',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置B return FAILURE; if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A return FAILURE; if(ValveGOn(VT_VALVE10,'A',5,TRUE)==FAILURE) //十通阀执行GO指令切换到位置A { Emergency(); return FAILURE; } if(ValveGOn(VT_VALVE10,'B',5,TRUE)==FAILURE) //十通阀执行GO指令切换到位置B return FAILURE; if(ValveGOn(VT_VALVE4,'B',5,TRUE)==FAILURE) //四通阀执行GO指令切换到位置B return FAILURE; Delay_s(5); if(ValveGOn(VT_VALVE4,'A',5,TRUE)==FAILURE) //四通阀执行GO指令切换到位置A return FAILURE; if(ValveCXn(VT_VALVE3,VCT_CW,4,34)==FAILURE) //三通阀执行CW指令从位置1转到4 return FAILURE; if(ValveCXn(VT_VALVE3,VCT_CW,1,14)==FAILURE) //三通阀执行CW指令从位置4转到1 return FAILURE; if(ValveCXn(VT_VALVE3,VCT_CC,2,34)==FAILURE) //三通阀执行CC指令从位置1转到2 { Emergency(); return FAILURE; } Delay_s(5); if(ValveCXn(VT_VALVE3,VCT_CC,1,14)==FAILURE) //三通阀执行CC指令从位置2转到1 return FAILURE; if(FLAGS&0x0020) //判断有无配备MFC { /***** 开始管路设备的检查 *****/ DAC_SetChannel1Data(DAC_Align_12b_R,4095); //开启MFC if(ValveGOn(VT_VALVE3,4,14,TRUE)==FAILURE) //三通阀执行GO指令从位置1转到4 return FAILURE; Delay_s(5); DAC_SetChannel1Data(DAC_Align_12b_R,0); //关闭MFC if(ValveGOn(VT_VALVE3,1,14,TRUE)==FAILURE) //三通阀执行GO指令从位置4转到1 return FAILURE; if(cfd_avrg==0) //判断管路上是否有流量 { f_error.fe_data = E_PIPELINE_EQUIP_FAULT; SendErrorFrame(); resend_ef_times = 2; LEDRed(); return FAILURE; } FLAGS |= 0x0200; //置MFC OK标志 } if(FLAGS&0x0040) //判断有无配备TCRing { /***** 开始DS18B20的检查 *****/ if(DS18B20_GetTemperature() == -128) { f_error.fe_data = E_DS18B20_ERROR; SendErrorFrame(); resend_ef_times = 2; LEDRed(); return FAILURE; } FLAGS |= 0x0080; //置DS18B20 OK标志 } return SUCCESS; } u8 PipelineWash(void) { /***** 管路冲洗 *****/ if(ValveGOn(VT_VALVE2,'B',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置B return FAILURE; if(ValveGOn(VT_VALVE3,2,14,TRUE)==FAILURE) //三通阀执行GO指令从位置1转到2 { Emergency(); return FAILURE; } Delay_s(time_parameter.tp_pipeline_wash_time); if(ValveGOn(VT_VALVE2,'A',5,TRUE)==FAILURE) //二通阀执行GO指令切换到位置A { Emergency(); return FAILURE; } Delay_s(time_parameter.tp_pipeline_wash_time); /***** 阀回到初始位置 *****/ if(ValveGOn(VT_VALVE3,1,14,TRUE)==FAILURE) //三通阀执行GO指令从位置2转到1 return FAILURE; return SUCCESS; } u8 End(void) { if(ValveGOn(VT_VALVE3,1,14,TRUE)==FAILURE) //三通阀执行GO指令转到位置1 { Emergency(); return FAILURE; } if(ValveGOn(VT_VALVE16,1,24,TRUE)==FAILURE) //十六通阀执行GO指令转到位置1 { Emergency(); return FAILURE; } if(ValveGOn(VT_VALVE10,'B',5,TRUE)==FAILURE) //十通阀执行GO指令切换到位置B return FAILURE; if(ValveGOn(VT_VALVE4,'A',5,TRUE)==FAILURE) //四通阀执行GO指令切换到位置A return FAILURE; return SUCCESS; } void Emergency(void) { ValveGOn(VT_VALVE3,1,14,FALSE); //三通阀执行GO指令转到位置1 ValveGOn(VT_VALVE10,'B',5,FALSE); //十通阀执行GO指令切换到位置B }
d9165387d6b2006d35912358bb90709224aae6c7
e984b3e90acf1cb0c459f4fbdf9503b202b2a24e
/src/get_map.c
b47f041e3b8b156ade302c7b923715c146df6943
[]
no_license
Hamzaelkhatri/CUB3D
8186ab9865f68ab4163ce71a2ffc4b755416498b
49c2b4c36f08b4e08f0a9e437d9dc9495cbf5576
refs/heads/master
2022-05-05T08:37:41.253075
2022-03-16T11:05:56
2022-03-16T11:05:56
234,201,186
2
1
null
2022-03-16T11:05:57
2020-01-16T00:33:01
C
UTF-8
C
false
false
2,691
c
get_map.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* get_map.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: helkhatr <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/24 22:20:55 by helkhatr #+# #+# */ /* Updated: 2020/01/26 02:28:19 by helkhatr ### ########.fr */ /* */ /* ************************************************************************** */ #include "../include/cub3d.h" void check_first_line(char *str) { int i; i = 0; while (str[i] != '\0') { if (str[i] != '1' && str[i] != ' ') returns("Error\n CHECK THE MAP"); i++; } } int do_condition_tw(t_params *params, int j) { if ((params->line[j] == 'N' || params->line[j] == 'S' || params->line[j] == 'E' || params->line[j] == 'W')) return (1); else return (0); } int do_condition(t_params *params, int j) { if ((params->line[j] == '0' || params->line[j] == '1' || params->line[j] == 'N' || params->line[j] == 'S' || params->line[j] == 'E' || params->line[j] == '2' || params->line[j] == 'W')) return (1); else return (0); } void get_mp(t_params *params, int i) { int y; int j; int check; y = 0; j = -1; while (y <= (int)params->info->mapwidth - 1 && params->line[++j]) { if (do_condition(params, j) == 1) { check_map(params->line, params); if (do_condition_tw(params, j) == 1) { params->position = params->line[j]; (check == 1 ? returns("Error\n CHECK THE MAP") : 0); check = 1; params->player->posx = y; params->player->posy = i; params->world_map[i][y] = '0'; } else params->world_map[i][y] = params->line[j]; y++; } } } void get_map(t_params *params) { int i; int y; int j; i = 0; y = 0; j = 0; params->world_map = (char **)malloc(sizeof(char *) * params->info->mapheight + 1); (!params->world_map ? returns("\n") : 0); get_next_line(params->fd, &params->line); while (i < params->info->mapheight && get_next_line(params->fd, &params->line)) { params->world_map[i] = (char *)malloc(sizeof(char) * params->info->mapwidth + 1); (!params->world_map[i] ? returns("\n") : 0); get_mp(params, i); (i == 0 ? check_first_line(params->line) : 0); i++; } }
52423135a526813d65c6c271283a907269742e31
2edb4bbebbe19c79a7851c325178fa17f8287eed
/arprec/tests/tictoc.h
7181687713673211932c2da308437da7f1d8cb29
[ "BSD-3-Clause" ]
permissive
alexerat/HPCMinimizer
21eca6a839f42dc287ba3c903e449f390241b619
bc3b992862eab34db3da3e3d9c3a42ac122aba09
refs/heads/master
2023-03-20T15:22:23.469842
2021-03-14T03:02:24
2021-03-14T03:02:24
347,516,235
0
0
null
2021-03-14T03:02:24
2021-03-14T01:13:49
Roff
UTF-8
C
false
false
698
h
tictoc.h
/* * tests/tictoc.h * * This work was supported by the Director, Office of Science, Division * of Mathematical, Information, and Computational Sciences of the * U.S. Department of Energy under contract number DE-AC03-76SF00098. * * Copyright (c) 2000-2001 * * Contains function used for timing. */ #ifndef _TIMER_H_ #define _TIMER_H_ #include "config.h" #ifdef _WIN32 #include <windows.h> typedef DWORD tictoc_t; #else #ifdef HAVE_SYS_TIME_H #include <sys/time.h> typedef struct timeval tictoc_t; #else #include <ctime> typedef time_t tictoc_t; #endif #endif void tic(tictoc_t *tv); /* start timing. */ double toc(tictoc_t *tv); /* stop timing. */ #endif /* _TIMER_H_ */
384206b9cc8189c5c107e8e90786a8724005d1bb
ff443629c167f318d071f62886581167c51690c4
/src/secp256k1/src/secp256k1.c
4c11e7f0b8b582e213020ebf9e837bb6d6d40ad2
[ "MIT" ]
permissive
bitcoin/bitcoin
a618b2555d9fe5a2b613e5fec0f4b1eca3b4d86f
6f03c45f6bb5a6edaa3051968b6a1ca4f84d2ccb
refs/heads/master
2023-09-05T00:16:48.295861
2023-09-02T17:43:00
2023-09-02T17:46:33
1,181,927
77,104
33,708
MIT
2023-09-14T20:47:31
2010-12-19T15:16:43
C++
UTF-8
C
false
false
29,174
c
secp256k1.c
/*********************************************************************** * Copyright (c) 2013-2015 Pieter Wuille * * Distributed under the MIT software license, see the accompanying * * file COPYING or https://www.opensource.org/licenses/mit-license.php.* ***********************************************************************/ /* This is a C project. It should not be compiled with a C++ compiler, * and we error out if we detect one. * * We still want to be able to test the project with a C++ compiler * because it is still good to know if this will lead to real trouble, so * there is a possibility to override the check. But be warned that * compiling with a C++ compiler is not supported. */ #if defined(__cplusplus) && !defined(SECP256K1_CPLUSPLUS_TEST_OVERRIDE) #error Trying to compile a C project with a C++ compiler. #endif #define SECP256K1_BUILD #include "../include/secp256k1.h" #include "../include/secp256k1_preallocated.h" #include "assumptions.h" #include "checkmem.h" #include "util.h" #include "field_impl.h" #include "scalar_impl.h" #include "group_impl.h" #include "ecmult_impl.h" #include "ecmult_const_impl.h" #include "ecmult_gen_impl.h" #include "ecdsa_impl.h" #include "eckey_impl.h" #include "hash_impl.h" #include "int128_impl.h" #include "scratch_impl.h" #include "selftest.h" #ifdef SECP256K1_NO_BUILD # error "secp256k1.h processed without SECP256K1_BUILD defined while building secp256k1.c" #endif #define ARG_CHECK(cond) do { \ if (EXPECT(!(cond), 0)) { \ secp256k1_callback_call(&ctx->illegal_callback, #cond); \ return 0; \ } \ } while(0) #define ARG_CHECK_VOID(cond) do { \ if (EXPECT(!(cond), 0)) { \ secp256k1_callback_call(&ctx->illegal_callback, #cond); \ return; \ } \ } while(0) /* Note that whenever you change the context struct, you must also change the * context_eq function. */ struct secp256k1_context_struct { secp256k1_ecmult_gen_context ecmult_gen_ctx; secp256k1_callback illegal_callback; secp256k1_callback error_callback; int declassify; }; static const secp256k1_context secp256k1_context_static_ = { { 0 }, { secp256k1_default_illegal_callback_fn, 0 }, { secp256k1_default_error_callback_fn, 0 }, 0 }; const secp256k1_context *secp256k1_context_static = &secp256k1_context_static_; const secp256k1_context *secp256k1_context_no_precomp = &secp256k1_context_static_; /* Helper function that determines if a context is proper, i.e., is not the static context or a copy thereof. * * This is intended for "context" functions such as secp256k1_context_clone. Function which need specific * features of a context should still check for these features directly. For example, a function that needs * ecmult_gen should directly check for the existence of the ecmult_gen context. */ static int secp256k1_context_is_proper(const secp256k1_context* ctx) { return secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx); } void secp256k1_selftest(void) { if (!secp256k1_selftest_passes()) { secp256k1_callback_call(&default_error_callback, "self test failed"); } } size_t secp256k1_context_preallocated_size(unsigned int flags) { size_t ret = sizeof(secp256k1_context); /* A return value of 0 is reserved as an indicator for errors when we call this function internally. */ VERIFY_CHECK(ret != 0); if (EXPECT((flags & SECP256K1_FLAGS_TYPE_MASK) != SECP256K1_FLAGS_TYPE_CONTEXT, 0)) { secp256k1_callback_call(&default_illegal_callback, "Invalid flags"); return 0; } if (EXPECT(!SECP256K1_CHECKMEM_RUNNING() && (flags & SECP256K1_FLAGS_BIT_CONTEXT_DECLASSIFY), 0)) { secp256k1_callback_call(&default_illegal_callback, "Declassify flag requires running with memory checking"); return 0; } return ret; } size_t secp256k1_context_preallocated_clone_size(const secp256k1_context* ctx) { VERIFY_CHECK(ctx != NULL); ARG_CHECK(secp256k1_context_is_proper(ctx)); return sizeof(secp256k1_context); } secp256k1_context* secp256k1_context_preallocated_create(void* prealloc, unsigned int flags) { size_t prealloc_size; secp256k1_context* ret; secp256k1_selftest(); prealloc_size = secp256k1_context_preallocated_size(flags); if (prealloc_size == 0) { return NULL; } VERIFY_CHECK(prealloc != NULL); ret = (secp256k1_context*)prealloc; ret->illegal_callback = default_illegal_callback; ret->error_callback = default_error_callback; /* Flags have been checked by secp256k1_context_preallocated_size. */ VERIFY_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_CONTEXT); secp256k1_ecmult_gen_context_build(&ret->ecmult_gen_ctx); ret->declassify = !!(flags & SECP256K1_FLAGS_BIT_CONTEXT_DECLASSIFY); return ret; } secp256k1_context* secp256k1_context_create(unsigned int flags) { size_t const prealloc_size = secp256k1_context_preallocated_size(flags); secp256k1_context* ctx = (secp256k1_context*)checked_malloc(&default_error_callback, prealloc_size); if (EXPECT(secp256k1_context_preallocated_create(ctx, flags) == NULL, 0)) { free(ctx); return NULL; } return ctx; } secp256k1_context* secp256k1_context_preallocated_clone(const secp256k1_context* ctx, void* prealloc) { secp256k1_context* ret; VERIFY_CHECK(ctx != NULL); ARG_CHECK(prealloc != NULL); ARG_CHECK(secp256k1_context_is_proper(ctx)); ret = (secp256k1_context*)prealloc; *ret = *ctx; return ret; } secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) { secp256k1_context* ret; size_t prealloc_size; VERIFY_CHECK(ctx != NULL); ARG_CHECK(secp256k1_context_is_proper(ctx)); prealloc_size = secp256k1_context_preallocated_clone_size(ctx); ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, prealloc_size); ret = secp256k1_context_preallocated_clone(ctx, ret); return ret; } void secp256k1_context_preallocated_destroy(secp256k1_context* ctx) { ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx)); /* Defined as noop */ if (ctx == NULL) { return; } secp256k1_ecmult_gen_context_clear(&ctx->ecmult_gen_ctx); } void secp256k1_context_destroy(secp256k1_context* ctx) { ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx)); /* Defined as noop */ if (ctx == NULL) { return; } secp256k1_context_preallocated_destroy(ctx); free(ctx); } void secp256k1_context_set_illegal_callback(secp256k1_context* ctx, void (*fun)(const char* message, void* data), const void* data) { /* We compare pointers instead of checking secp256k1_context_is_proper() here because setting callbacks is allowed on *copies* of the static context: it's harmless and makes testing easier. */ ARG_CHECK_VOID(ctx != secp256k1_context_static); if (fun == NULL) { fun = secp256k1_default_illegal_callback_fn; } ctx->illegal_callback.fn = fun; ctx->illegal_callback.data = data; } void secp256k1_context_set_error_callback(secp256k1_context* ctx, void (*fun)(const char* message, void* data), const void* data) { /* We compare pointers instead of checking secp256k1_context_is_proper() here because setting callbacks is allowed on *copies* of the static context: it's harmless and makes testing easier. */ ARG_CHECK_VOID(ctx != secp256k1_context_static); if (fun == NULL) { fun = secp256k1_default_error_callback_fn; } ctx->error_callback.fn = fun; ctx->error_callback.data = data; } secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) { VERIFY_CHECK(ctx != NULL); return secp256k1_scratch_create(&ctx->error_callback, max_size); } void secp256k1_scratch_space_destroy(const secp256k1_context *ctx, secp256k1_scratch_space* scratch) { VERIFY_CHECK(ctx != NULL); secp256k1_scratch_destroy(&ctx->error_callback, scratch); } /* Mark memory as no-longer-secret for the purpose of analysing constant-time behaviour * of the software. */ static SECP256K1_INLINE void secp256k1_declassify(const secp256k1_context* ctx, const void *p, size_t len) { if (EXPECT(ctx->declassify, 0)) SECP256K1_CHECKMEM_DEFINE(p, len); } static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) { if (sizeof(secp256k1_ge_storage) == 64) { /* When the secp256k1_ge_storage type is exactly 64 byte, use its * representation inside secp256k1_pubkey, as conversion is very fast. * Note that secp256k1_pubkey_save must use the same representation. */ secp256k1_ge_storage s; memcpy(&s, &pubkey->data[0], sizeof(s)); secp256k1_ge_from_storage(ge, &s); } else { /* Otherwise, fall back to 32-byte big endian for X and Y. */ secp256k1_fe x, y; ARG_CHECK(secp256k1_fe_set_b32_limit(&x, pubkey->data)); ARG_CHECK(secp256k1_fe_set_b32_limit(&y, pubkey->data + 32)); secp256k1_ge_set_xy(ge, &x, &y); } ARG_CHECK(!secp256k1_fe_is_zero(&ge->x)); return 1; } static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) { if (sizeof(secp256k1_ge_storage) == 64) { secp256k1_ge_storage s; secp256k1_ge_to_storage(&s, ge); memcpy(&pubkey->data[0], &s, sizeof(s)); } else { VERIFY_CHECK(!secp256k1_ge_is_infinity(ge)); secp256k1_fe_normalize_var(&ge->x); secp256k1_fe_normalize_var(&ge->y); secp256k1_fe_get_b32(pubkey->data, &ge->x); secp256k1_fe_get_b32(pubkey->data + 32, &ge->y); } } int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) { secp256k1_ge Q; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubkey != NULL); memset(pubkey, 0, sizeof(*pubkey)); ARG_CHECK(input != NULL); if (!secp256k1_eckey_pubkey_parse(&Q, input, inputlen)) { return 0; } if (!secp256k1_ge_is_in_correct_subgroup(&Q)) { return 0; } secp256k1_pubkey_save(pubkey, &Q); secp256k1_ge_clear(&Q); return 1; } int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_pubkey* pubkey, unsigned int flags) { secp256k1_ge Q; size_t len; int ret = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(outputlen != NULL); ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33u : 65u)); len = *outputlen; *outputlen = 0; ARG_CHECK(output != NULL); memset(output, 0, len); ARG_CHECK(pubkey != NULL); ARG_CHECK((flags & SECP256K1_FLAGS_TYPE_MASK) == SECP256K1_FLAGS_TYPE_COMPRESSION); if (secp256k1_pubkey_load(ctx, &Q, pubkey)) { ret = secp256k1_eckey_pubkey_serialize(&Q, output, &len, flags & SECP256K1_FLAGS_BIT_COMPRESSION); if (ret) { *outputlen = len; } } return ret; } int secp256k1_ec_pubkey_cmp(const secp256k1_context* ctx, const secp256k1_pubkey* pubkey0, const secp256k1_pubkey* pubkey1) { unsigned char out[2][33]; const secp256k1_pubkey* pk[2]; int i; VERIFY_CHECK(ctx != NULL); pk[0] = pubkey0; pk[1] = pubkey1; for (i = 0; i < 2; i++) { size_t out_size = sizeof(out[i]); /* If the public key is NULL or invalid, ec_pubkey_serialize will call * the illegal_callback and return 0. In that case we will serialize the * key as all zeros which is less than any valid public key. This * results in consistent comparisons even if NULL or invalid pubkeys are * involved and prevents edge cases such as sorting algorithms that use * this function and do not terminate as a result. */ if (!secp256k1_ec_pubkey_serialize(ctx, out[i], &out_size, pk[i], SECP256K1_EC_COMPRESSED)) { /* Note that ec_pubkey_serialize should already set the output to * zero in that case, but it's not guaranteed by the API, we can't * test it and writing a VERIFY_CHECK is more complex than * explicitly memsetting (again). */ memset(out[i], 0, sizeof(out[i])); } } return secp256k1_memcmp_var(out[0], out[1], sizeof(out[0])); } static void secp256k1_ecdsa_signature_load(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, const secp256k1_ecdsa_signature* sig) { (void)ctx; if (sizeof(secp256k1_scalar) == 32) { /* When the secp256k1_scalar type is exactly 32 byte, use its * representation inside secp256k1_ecdsa_signature, as conversion is very fast. * Note that secp256k1_ecdsa_signature_save must use the same representation. */ memcpy(r, &sig->data[0], 32); memcpy(s, &sig->data[32], 32); } else { secp256k1_scalar_set_b32(r, &sig->data[0], NULL); secp256k1_scalar_set_b32(s, &sig->data[32], NULL); } } static void secp256k1_ecdsa_signature_save(secp256k1_ecdsa_signature* sig, const secp256k1_scalar* r, const secp256k1_scalar* s) { if (sizeof(secp256k1_scalar) == 32) { memcpy(&sig->data[0], r, 32); memcpy(&sig->data[32], s, 32); } else { secp256k1_scalar_get_b32(&sig->data[0], r); secp256k1_scalar_get_b32(&sig->data[32], s); } } int secp256k1_ecdsa_signature_parse_der(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) { secp256k1_scalar r, s; VERIFY_CHECK(ctx != NULL); ARG_CHECK(sig != NULL); ARG_CHECK(input != NULL); if (secp256k1_ecdsa_sig_parse(&r, &s, input, inputlen)) { secp256k1_ecdsa_signature_save(sig, &r, &s); return 1; } else { memset(sig, 0, sizeof(*sig)); return 0; } } int secp256k1_ecdsa_signature_parse_compact(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input64) { secp256k1_scalar r, s; int ret = 1; int overflow = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(sig != NULL); ARG_CHECK(input64 != NULL); secp256k1_scalar_set_b32(&r, &input64[0], &overflow); ret &= !overflow; secp256k1_scalar_set_b32(&s, &input64[32], &overflow); ret &= !overflow; if (ret) { secp256k1_ecdsa_signature_save(sig, &r, &s); } else { memset(sig, 0, sizeof(*sig)); } return ret; } int secp256k1_ecdsa_signature_serialize_der(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_ecdsa_signature* sig) { secp256k1_scalar r, s; VERIFY_CHECK(ctx != NULL); ARG_CHECK(output != NULL); ARG_CHECK(outputlen != NULL); ARG_CHECK(sig != NULL); secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); return secp256k1_ecdsa_sig_serialize(output, outputlen, &r, &s); } int secp256k1_ecdsa_signature_serialize_compact(const secp256k1_context* ctx, unsigned char *output64, const secp256k1_ecdsa_signature* sig) { secp256k1_scalar r, s; VERIFY_CHECK(ctx != NULL); ARG_CHECK(output64 != NULL); ARG_CHECK(sig != NULL); secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); secp256k1_scalar_get_b32(&output64[0], &r); secp256k1_scalar_get_b32(&output64[32], &s); return 1; } int secp256k1_ecdsa_signature_normalize(const secp256k1_context* ctx, secp256k1_ecdsa_signature *sigout, const secp256k1_ecdsa_signature *sigin) { secp256k1_scalar r, s; int ret = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(sigin != NULL); secp256k1_ecdsa_signature_load(ctx, &r, &s, sigin); ret = secp256k1_scalar_is_high(&s); if (sigout != NULL) { if (ret) { secp256k1_scalar_negate(&s, &s); } secp256k1_ecdsa_signature_save(sigout, &r, &s); } return ret; } int secp256k1_ecdsa_verify(const secp256k1_context* ctx, const secp256k1_ecdsa_signature *sig, const unsigned char *msghash32, const secp256k1_pubkey *pubkey) { secp256k1_ge q; secp256k1_scalar r, s; secp256k1_scalar m; VERIFY_CHECK(ctx != NULL); ARG_CHECK(msghash32 != NULL); ARG_CHECK(sig != NULL); ARG_CHECK(pubkey != NULL); secp256k1_scalar_set_b32(&m, msghash32, NULL); secp256k1_ecdsa_signature_load(ctx, &r, &s, sig); return (!secp256k1_scalar_is_high(&s) && secp256k1_pubkey_load(ctx, &q, pubkey) && secp256k1_ecdsa_sig_verify(&r, &s, &q, &m)); } static SECP256K1_INLINE void buffer_append(unsigned char *buf, unsigned int *offset, const void *data, unsigned int len) { memcpy(buf + *offset, data, len); *offset += len; } static int nonce_function_rfc6979(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int counter) { unsigned char keydata[112]; unsigned int offset = 0; secp256k1_rfc6979_hmac_sha256 rng; unsigned int i; secp256k1_scalar msg; unsigned char msgmod32[32]; secp256k1_scalar_set_b32(&msg, msg32, NULL); secp256k1_scalar_get_b32(msgmod32, &msg); /* We feed a byte array to the PRNG as input, consisting of: * - the private key (32 bytes) and reduced message (32 bytes), see RFC 6979 3.2d. * - optionally 32 extra bytes of data, see RFC 6979 3.6 Additional Data. * - optionally 16 extra bytes with the algorithm name. * Because the arguments have distinct fixed lengths it is not possible for * different argument mixtures to emulate each other and result in the same * nonces. */ buffer_append(keydata, &offset, key32, 32); buffer_append(keydata, &offset, msgmod32, 32); if (data != NULL) { buffer_append(keydata, &offset, data, 32); } if (algo16 != NULL) { buffer_append(keydata, &offset, algo16, 16); } secp256k1_rfc6979_hmac_sha256_initialize(&rng, keydata, offset); memset(keydata, 0, sizeof(keydata)); for (i = 0; i <= counter; i++) { secp256k1_rfc6979_hmac_sha256_generate(&rng, nonce32, 32); } secp256k1_rfc6979_hmac_sha256_finalize(&rng); return 1; } const secp256k1_nonce_function secp256k1_nonce_function_rfc6979 = nonce_function_rfc6979; const secp256k1_nonce_function secp256k1_nonce_function_default = nonce_function_rfc6979; static int secp256k1_ecdsa_sign_inner(const secp256k1_context* ctx, secp256k1_scalar* r, secp256k1_scalar* s, int* recid, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { secp256k1_scalar sec, non, msg; int ret = 0; int is_sec_valid; unsigned char nonce32[32]; unsigned int count = 0; /* Default initialization here is important so we won't pass uninit values to the cmov in the end */ *r = secp256k1_scalar_zero; *s = secp256k1_scalar_zero; if (recid) { *recid = 0; } if (noncefp == NULL) { noncefp = secp256k1_nonce_function_default; } /* Fail if the secret key is invalid. */ is_sec_valid = secp256k1_scalar_set_b32_seckey(&sec, seckey); secp256k1_scalar_cmov(&sec, &secp256k1_scalar_one, !is_sec_valid); secp256k1_scalar_set_b32(&msg, msg32, NULL); while (1) { int is_nonce_valid; ret = !!noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count); if (!ret) { break; } is_nonce_valid = secp256k1_scalar_set_b32_seckey(&non, nonce32); /* The nonce is still secret here, but it being invalid is is less likely than 1:2^255. */ secp256k1_declassify(ctx, &is_nonce_valid, sizeof(is_nonce_valid)); if (is_nonce_valid) { ret = secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, r, s, &sec, &msg, &non, recid); /* The final signature is no longer a secret, nor is the fact that we were successful or not. */ secp256k1_declassify(ctx, &ret, sizeof(ret)); if (ret) { break; } } count++; } /* We don't want to declassify is_sec_valid and therefore the range of * seckey. As a result is_sec_valid is included in ret only after ret was * used as a branching variable. */ ret &= is_sec_valid; memset(nonce32, 0, 32); secp256k1_scalar_clear(&msg); secp256k1_scalar_clear(&non); secp256k1_scalar_clear(&sec); secp256k1_scalar_cmov(r, &secp256k1_scalar_zero, !ret); secp256k1_scalar_cmov(s, &secp256k1_scalar_zero, !ret); if (recid) { const int zero = 0; secp256k1_int_cmov(recid, &zero, !ret); } return ret; } int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature *signature, const unsigned char *msghash32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { secp256k1_scalar r, s; int ret; VERIFY_CHECK(ctx != NULL); ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); ARG_CHECK(msghash32 != NULL); ARG_CHECK(signature != NULL); ARG_CHECK(seckey != NULL); ret = secp256k1_ecdsa_sign_inner(ctx, &r, &s, NULL, msghash32, seckey, noncefp, noncedata); secp256k1_ecdsa_signature_save(signature, &r, &s); return ret; } int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char *seckey) { secp256k1_scalar sec; int ret; VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); ret = secp256k1_scalar_set_b32_seckey(&sec, seckey); secp256k1_scalar_clear(&sec); return ret; } static int secp256k1_ec_pubkey_create_helper(const secp256k1_ecmult_gen_context *ecmult_gen_ctx, secp256k1_scalar *seckey_scalar, secp256k1_ge *p, const unsigned char *seckey) { secp256k1_gej pj; int ret; ret = secp256k1_scalar_set_b32_seckey(seckey_scalar, seckey); secp256k1_scalar_cmov(seckey_scalar, &secp256k1_scalar_one, !ret); secp256k1_ecmult_gen(ecmult_gen_ctx, &pj, seckey_scalar); secp256k1_ge_set_gej(p, &pj); return ret; } int secp256k1_ec_pubkey_create(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *seckey) { secp256k1_ge p; secp256k1_scalar seckey_scalar; int ret = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubkey != NULL); memset(pubkey, 0, sizeof(*pubkey)); ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); ARG_CHECK(seckey != NULL); ret = secp256k1_ec_pubkey_create_helper(&ctx->ecmult_gen_ctx, &seckey_scalar, &p, seckey); secp256k1_pubkey_save(pubkey, &p); secp256k1_memczero(pubkey, sizeof(*pubkey), !ret); secp256k1_scalar_clear(&seckey_scalar); return ret; } int secp256k1_ec_seckey_negate(const secp256k1_context* ctx, unsigned char *seckey) { secp256k1_scalar sec; int ret = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); ret = secp256k1_scalar_set_b32_seckey(&sec, seckey); secp256k1_scalar_cmov(&sec, &secp256k1_scalar_zero, !ret); secp256k1_scalar_negate(&sec, &sec); secp256k1_scalar_get_b32(seckey, &sec); secp256k1_scalar_clear(&sec); return ret; } int secp256k1_ec_privkey_negate(const secp256k1_context* ctx, unsigned char *seckey) { return secp256k1_ec_seckey_negate(ctx, seckey); } int secp256k1_ec_pubkey_negate(const secp256k1_context* ctx, secp256k1_pubkey *pubkey) { int ret = 0; secp256k1_ge p; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubkey != NULL); ret = secp256k1_pubkey_load(ctx, &p, pubkey); memset(pubkey, 0, sizeof(*pubkey)); if (ret) { secp256k1_ge_neg(&p, &p); secp256k1_pubkey_save(pubkey, &p); } return ret; } static int secp256k1_ec_seckey_tweak_add_helper(secp256k1_scalar *sec, const unsigned char *tweak32) { secp256k1_scalar term; int overflow = 0; int ret = 0; secp256k1_scalar_set_b32(&term, tweak32, &overflow); ret = (!overflow) & secp256k1_eckey_privkey_tweak_add(sec, &term); secp256k1_scalar_clear(&term); return ret; } int secp256k1_ec_seckey_tweak_add(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak32) { secp256k1_scalar sec; int ret = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); ARG_CHECK(tweak32 != NULL); ret = secp256k1_scalar_set_b32_seckey(&sec, seckey); ret &= secp256k1_ec_seckey_tweak_add_helper(&sec, tweak32); secp256k1_scalar_cmov(&sec, &secp256k1_scalar_zero, !ret); secp256k1_scalar_get_b32(seckey, &sec); secp256k1_scalar_clear(&sec); return ret; } int secp256k1_ec_privkey_tweak_add(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak32) { return secp256k1_ec_seckey_tweak_add(ctx, seckey, tweak32); } static int secp256k1_ec_pubkey_tweak_add_helper(secp256k1_ge *p, const unsigned char *tweak32) { secp256k1_scalar term; int overflow = 0; secp256k1_scalar_set_b32(&term, tweak32, &overflow); return !overflow && secp256k1_eckey_pubkey_tweak_add(p, &term); } int secp256k1_ec_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak32) { secp256k1_ge p; int ret = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubkey != NULL); ARG_CHECK(tweak32 != NULL); ret = secp256k1_pubkey_load(ctx, &p, pubkey); memset(pubkey, 0, sizeof(*pubkey)); ret = ret && secp256k1_ec_pubkey_tweak_add_helper(&p, tweak32); if (ret) { secp256k1_pubkey_save(pubkey, &p); } return ret; } int secp256k1_ec_seckey_tweak_mul(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak32) { secp256k1_scalar factor; secp256k1_scalar sec; int ret = 0; int overflow = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); ARG_CHECK(tweak32 != NULL); secp256k1_scalar_set_b32(&factor, tweak32, &overflow); ret = secp256k1_scalar_set_b32_seckey(&sec, seckey); ret &= (!overflow) & secp256k1_eckey_privkey_tweak_mul(&sec, &factor); secp256k1_scalar_cmov(&sec, &secp256k1_scalar_zero, !ret); secp256k1_scalar_get_b32(seckey, &sec); secp256k1_scalar_clear(&sec); secp256k1_scalar_clear(&factor); return ret; } int secp256k1_ec_privkey_tweak_mul(const secp256k1_context* ctx, unsigned char *seckey, const unsigned char *tweak32) { return secp256k1_ec_seckey_tweak_mul(ctx, seckey, tweak32); } int secp256k1_ec_pubkey_tweak_mul(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *tweak32) { secp256k1_ge p; secp256k1_scalar factor; int ret = 0; int overflow = 0; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubkey != NULL); ARG_CHECK(tweak32 != NULL); secp256k1_scalar_set_b32(&factor, tweak32, &overflow); ret = !overflow && secp256k1_pubkey_load(ctx, &p, pubkey); memset(pubkey, 0, sizeof(*pubkey)); if (ret) { if (secp256k1_eckey_pubkey_tweak_mul(&p, &factor)) { secp256k1_pubkey_save(pubkey, &p); } else { ret = 0; } } return ret; } int secp256k1_context_randomize(secp256k1_context* ctx, const unsigned char *seed32) { VERIFY_CHECK(ctx != NULL); ARG_CHECK(secp256k1_context_is_proper(ctx)); if (secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)) { secp256k1_ecmult_gen_blind(&ctx->ecmult_gen_ctx, seed32); } return 1; } int secp256k1_ec_pubkey_combine(const secp256k1_context* ctx, secp256k1_pubkey *pubnonce, const secp256k1_pubkey * const *pubnonces, size_t n) { size_t i; secp256k1_gej Qj; secp256k1_ge Q; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubnonce != NULL); memset(pubnonce, 0, sizeof(*pubnonce)); ARG_CHECK(n >= 1); ARG_CHECK(pubnonces != NULL); secp256k1_gej_set_infinity(&Qj); for (i = 0; i < n; i++) { ARG_CHECK(pubnonces[i] != NULL); secp256k1_pubkey_load(ctx, &Q, pubnonces[i]); secp256k1_gej_add_ge(&Qj, &Qj, &Q); } if (secp256k1_gej_is_infinity(&Qj)) { return 0; } secp256k1_ge_set_gej(&Q, &Qj); secp256k1_pubkey_save(pubnonce, &Q); return 1; } int secp256k1_tagged_sha256(const secp256k1_context* ctx, unsigned char *hash32, const unsigned char *tag, size_t taglen, const unsigned char *msg, size_t msglen) { secp256k1_sha256 sha; VERIFY_CHECK(ctx != NULL); ARG_CHECK(hash32 != NULL); ARG_CHECK(tag != NULL); ARG_CHECK(msg != NULL); secp256k1_sha256_initialize_tagged(&sha, tag, taglen); secp256k1_sha256_write(&sha, msg, msglen); secp256k1_sha256_finalize(&sha, hash32); return 1; } #ifdef ENABLE_MODULE_ECDH # include "modules/ecdh/main_impl.h" #endif #ifdef ENABLE_MODULE_RECOVERY # include "modules/recovery/main_impl.h" #endif #ifdef ENABLE_MODULE_EXTRAKEYS # include "modules/extrakeys/main_impl.h" #endif #ifdef ENABLE_MODULE_SCHNORRSIG # include "modules/schnorrsig/main_impl.h" #endif #ifdef ENABLE_MODULE_ELLSWIFT # include "modules/ellswift/main_impl.h" #endif
536651934affe228c7bf89aabd9c534ff926bb38
d8dfa2ffc3d77ff70b02f0d782ed2529c533d5c5
/src/Elevator/etrice.runtime.c/src/common/messaging/etMessageQueue.c
96a86b0467f885d714c1d9413cb28634503400f6
[]
no_license
protossoftware/de.protos.demos
5d6069df1a0b7f6beb3c4ac8c822fd9a9fc67943
7ea0a166944c5b3877bdaa252563557023bbb4f9
refs/heads/master
2022-11-21T01:15:27.100411
2020-07-10T14:44:02
2020-07-10T14:44:02
25,356,522
0
0
null
null
null
null
UTF-8
C
false
false
3,222
c
etMessageQueue.c
/******************************************************************************* * Copyright (c) 2011 protos software gmbh (http://www.protos.de). * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * CONTRIBUTORS: * Thomas Schuetz (initial contribution) * *******************************************************************************/ #include "messaging/etMessageQueue.h" #include "debugging/etMSCLogger.h" void etMessageQueue_init(etMessageQueue* self){ ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "init") self->first = NULL; self->last = NULL; self->highWaterMark = 0; self->lowWaterMark = 0; self->size = 0; ET_MSC_LOGGER_SYNC_EXIT } void etMessageQueue_push(etMessageQueue* self, etMessage* msg){ /* TODO: optimize queue for concurrent push / pop */ ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "push") if (self->first == NULL) { /*no message in queue*/ self->first = self->last = msg; } else { /*at least one message in queue*/ self->last->next = msg; self->last = msg; } msg->next = NULL; /*TODO: optimization: this line could be removed if we assume that all messages are initialized*/ if (++self->size > self->highWaterMark) self->highWaterMark++; ET_MSC_LOGGER_SYNC_EXIT } etMessage* etMessageQueue_pop(etMessageQueue* self){ ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "pop") etMessage* pop_msg = self->first; if(self->first == NULL){ /*no message in queue*/ ET_MSC_LOGGER_SYNC_EXIT return NULL; } if (self->first->next==NULL){ /*only one message in queue*/ self->first = self->last = NULL; } else { /*more than one message in queue -> set first to nex message*/ self->first = self->first->next; } pop_msg->next=NULL; self->size--; if (self->size < self->lowWaterMark) self->lowWaterMark--; ET_MSC_LOGGER_SYNC_EXIT return pop_msg; } etInt16 etMessageQueue_getSize(etMessageQueue* self) { ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "getSize") ET_MSC_LOGGER_SYNC_EXIT return self->size; } etMessage* etMessageQueue_getFirst(etMessageQueue* self){ ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "getFirst") ET_MSC_LOGGER_SYNC_EXIT return self->first; } etMessage* etMessageQueue_getLast(etMessageQueue* self){ ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "getLast") ET_MSC_LOGGER_SYNC_EXIT return self->last; } etBool etMessageQueue_isNotEmpty(etMessageQueue* self){ ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "isNotEmpty") ET_MSC_LOGGER_SYNC_EXIT return self->last != NULL; } etInt16 etMessageQueue_getHighWaterMark(etMessageQueue* self) { ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "getHighWaterMark") ET_MSC_LOGGER_SYNC_EXIT return self->highWaterMark; } etInt16 etMessageQueue_getLowWaterMark(etMessageQueue* self) { ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "getLowWaterMark") ET_MSC_LOGGER_SYNC_EXIT return self->lowWaterMark; } void etMessageQueue_resetLowWaterMark(etMessageQueue* self) { ET_MSC_LOGGER_SYNC_ENTRY("etMessageQueue", "resetLowWaterMark") self->lowWaterMark = self->size; ET_MSC_LOGGER_SYNC_EXIT }
76ffe831acb2ad516e8b1ec3b2eaa6cdc7b57408
479196119fe622a36752ff1c10063139964d6990
/开发板配套例程/F407霸天虎_V1_V2开发板/2.HC05透传控制LED灯(4.5寸屏)/User/main.c
863e1e83405625dd36cb41370549afefb6208ee9
[]
no_license
Embedfire-wireless/ebf_bluetooth_hc05
b8e60b3d480646613c1727edf287428981d481e7
9cff1547e2179583fffedee282328d58b9e21471
refs/heads/master
2023-06-21T18:40:02.090247
2021-07-19T04:03:09
2021-07-19T04:03:09
230,385,484
0
1
null
null
null
null
GB18030
C
false
false
8,035
c
main.c
/** ****************************************************************************** * @file main.c * @author fire * @version V1.0 * @date 2015-xx-xx * @brief HC05蓝牙模块测试程序 ****************************************************************************** * @attention * * 实验平台:野火 STM32 F407 开发板 * 论坛 :http://www.firebbs.cn * 淘宝 :https://fire-stm32.taobao.com * ****************************************************************************** */ #include "stm32f4xx.h" #include "./led/bsp_led.h" #include "./usart/bsp_blt_usart.h" #include "./usart/bsp_debug_usart.h" #include "./systick/bsp_SysTick.h" #include "./hc05/bsp_hc05.h" #include "./key/bsp_key.h" #include "./lcd/bsp_ili9806g_lcd.h" #include <string.h> #include <stdlib.h> #include "./dwt_delay/core_delay.h" #include "./i2c/i2c.h" #include "./mpu6050/mpu6050.h" extern ReceiveData DEBUG_USART_ReceiveData; extern ReceiveData BLT_USART_ReceiveData; extern int hc05_inquery_connect; //函数声明 void TransData_CtrlLED_Test(void); /** * @brief 主函数 * @param 无 * @retval 无 */ int main(void) { char hc05_name[30]="HC05_SLAVE"; char hc05_nameCMD[40]; unsigned char mpu_reg = 0; //保存读取MPU6050寄存器的值 /* 延时函数初始化 */ CPU_TS_TmrInit(); /* LCD初始化 */ #ifdef ENABLE_LCD_DISPLAY ILI9806G_Init(); ILI9806G_GramScan( 6 ); LCD_SetFont(&Font16x32); LCD_SetColors(RED,BLACK); ILI9806G_Clear(0,0,LCD_X_LENGTH,LCD_Y_LENGTH); /* 清屏,显示全黑 */ #endif /* 调试串口初始化 USART1 配置模式为 115200 8-N-1 接收中断 */ Debug_USART_Config(); LED_GPIO_Config(); Key_GPIO_Config(); /* HC05蓝牙模块初始化:GPIO 和 USART3 配置模式为 38400 8-N-1 接收中断 */ if(HC05_Init() == 0) { HC05_INFO("HC05模块检测正常。"); #ifdef ENABLE_LCD_DISPLAY ILI9806G_DispString_EN ( 40, 60, "HC05 module detected!" ); #endif } else { HC05_ERROR("HC05模块检测不正常,请检查模块与开发板的连接,然后复位开发板重新测试。"); #ifdef ENABLE_LCD_DISPLAY ILI9806G_DispString_EN ( 20, 60, "No HC05 module detected!" ); ILI9806G_DispString_EN ( 5, 100, "Please check the hardware connection and reset the system." ); #endif while(1); } HC05_INFO("**********HC05模块实验************"); #ifdef ENABLE_LCD_DISPLAY ILI9806G_DispString_EN ( 40, 20, "HC05 BlueTooth Demo" ); #endif /*复位、恢复默认状态*/ HC05_Send_CMD("AT+RESET\r\n",1); //复位指令发送完成之后,需要一定时间HC05才会接受下一条指令 HC05_Send_CMD("AT+ORGL\r\n",1); /*各种命令测试演示,默认不显示。 *在bsp_hc05.h文件把HC05_DEBUG_ON 宏设置为1, *即可通过串口调试助手接收调试信息*/ HC05_Send_CMD("AT+VERSION?\r\n",1); HC05_Send_CMD("AT+ADDR?\r\n",1); HC05_Send_CMD("AT+UART?\r\n",1); HC05_Send_CMD("AT+CMODE?\r\n",1); HC05_Send_CMD("AT+STATE?\r\n",1); HC05_Send_CMD("AT+ROLE=0\r\n",1); /*初始化SPP规范*/ HC05_Send_CMD("AT+INIT\r\n",1); HC05_Send_CMD("AT+CLASS=0\r\n",1); HC05_Send_CMD("AT+INQM=1,9,48\r\n",1); /*设置模块名字*/ sprintf(hc05_nameCMD,"AT+NAME=%s\r\n",hc05_name); HC05_Send_CMD(hc05_nameCMD,1); HC05_INFO("本模块名字为:%s ,模块已准备就绪。",hc05_name); #ifdef ENABLE_LCD_DISPLAY ILI9806G_DispStringLine_EN ( (LINE(4)), "ReceiveData USART1" ); ILI9806G_DispStringLine_EN ( (LINE(12)), "ReceiveData HC-05" ); #endif /* 这部分是额外的代码 目的是为了防止板载 MPU6050 的INT引脚干扰STM32 PF10引脚的电平变化 使用霸天虎开发板这部分不可去掉,否则影响HC05的连接状态的检测 */ I2cMaster_Init(); //初始化 I2C if( ! MPU6050ReadID() ) {printf("无法读取MPU6050\r\n"); while(1);} MPU6050_WriteReg(MPU6050_RA_INT_PIN_CFG, (mpu_reg |((1<<MPU6050_INTCFG_INT_LEVEL_BIT) | (1<<MPU6050_INTCFG_INT_OPEN_BIT) | (1<<MPU6050_INTCFG_LATCH_INT_EN_BIT)) ) ); /* SysTick 10ms中断初始化 */ SysTick_Init(); while(1) { //每 5s 检查一次蓝牙连接 if( 1 == hc05_inquery_connect ) { hc05_inquery_connect = 0; //清零标志位 if( ! IS_HC05_CONNECTED() ) { HC05_Send_CMD("AT+INQ\r\n",1);//模块在查询状态,才能容易被其它设备搜索到 Usart_SendString( DEBUG_USART, "蓝牙尚未连接。请用手机打开蓝牙调试助手搜索连接蓝牙\r\n" ); } else { Usart_SendString( DEBUG_USART, "蓝牙已连接。发送“RED_LED”可控制翻转LED灯\r\n" ); } } TransData_CtrlLED_Test(); //处理数据 } } /** * @brief 处理串口数据控制LED灯 * @param 无 * @retval 无 */ void TransData_CtrlLED_Test(void) { /* 处理调试串口接收到的串口助手数据 */ if(DEBUG_USART_ReceiveData.receive_data_flag == 1) { DEBUG_USART_ReceiveData.uart_buff[DEBUG_USART_ReceiveData.datanum] = 0; //在这里可以自己定义想要接收的字符串然后处理 //这里接收到串口调试助手发来的 “RED_LED”就会把板子上面的红灯取反一次 if( strstr((char *)DEBUG_USART_ReceiveData.uart_buff,"RED_LED") ) { LED1_TOGGLE; } //如果手机蓝牙连接了模块,则发送到手机端显示数据 if( IS_HC05_CONNECTED() ) { BLT_KEY_LOW; Usart_SendStr_length(BLT_USARTx, DEBUG_USART_ReceiveData.uart_buff, DEBUG_USART_ReceiveData.datanum); } //如果蓝牙没有被连接,如果数据是以AT开头的,就把KEY置高,设置蓝牙模块 else if( strstr((char *)DEBUG_USART_ReceiveData.uart_buff,"AT") == (char *)DEBUG_USART_ReceiveData.uart_buff ) { BLT_KEY_HIGHT; Usart_SendStr_length(BLT_USARTx, DEBUG_USART_ReceiveData.uart_buff, DEBUG_USART_ReceiveData.datanum); Usart_SendStr_length(BLT_USARTx,"\r\n",2); BLT_KEY_LOW; } //串口助手显示接收到的数据 Usart_SendString( DEBUG_USART, "\r\nrecv USART1 data:\r\n" ); Usart_SendString( DEBUG_USART, DEBUG_USART_ReceiveData.uart_buff ); Usart_SendString( DEBUG_USART, "\r\n" ); //LCD显示接收到的数据 #ifdef ENABLE_LCD_DISPLAY LCD_ClearLine(LINE(5)); LCD_ClearLine(LINE(6)); LCD_ClearLine(LINE(7)); LCD_ClearLine(LINE(8)); ILI9806G_DispStringLine_EN ( (LINE(5)), (char *)DEBUG_USART_ReceiveData.uart_buff ); #endif //清零调试串口数据缓存 DEBUG_USART_ReceiveData.receive_data_flag = 0; //接收数据标志清零 DEBUG_USART_ReceiveData.datanum = 0; } /* 处理蓝牙串口接收到的蓝牙数据 */ if(BLT_USART_ReceiveData.receive_data_flag == 1) { BLT_USART_ReceiveData.uart_buff[BLT_USART_ReceiveData.datanum] = 0; //在这里可以自己定义想要接收的字符串然后处理 //这里接收到手机蓝牙发来的 “RED_LED”就会把板子上面的红灯取反一次 if(strstr((char *)BLT_USART_ReceiveData.uart_buff,"RED_LED")) { LED1_TOGGLE; } //串口助手显示接收到的数据 Usart_SendString( DEBUG_USART, "\r\nrecv HC-05 data:\r\n" ); Usart_SendString( DEBUG_USART, BLT_USART_ReceiveData.uart_buff ); Usart_SendString( DEBUG_USART, "\r\n" ); //LCD显示接收到的数据 #ifdef ENABLE_LCD_DISPLAY LCD_ClearLine(LINE(13)); LCD_ClearLine(LINE(14)); LCD_ClearLine(LINE(15)); LCD_ClearLine(LINE(16)); ILI9806G_DispStringLine_EN ( (LINE(13)), (char *)BLT_USART_ReceiveData.uart_buff ); #endif //清零蓝牙串口数据缓存 BLT_USART_ReceiveData.receive_data_flag = 0; //接收数据标志清零 BLT_USART_ReceiveData.datanum = 0; } } /*********************************************END OF FILE**********************/
e3aa39a533c5c31bf3f5b327e07312100f642ead
8838eb997879add5759b6dfb23f9a646464e53ca
/src/include/hal/mem_barriers.h
499e1dde347ced37c3ea32171610701fa278b823
[ "BSD-2-Clause" ]
permissive
embox/embox
d6aacec876978522f01cdc4b8de37a668c6f4c80
98e3c06e33f3fdac10a29c069c20775568e0a6d1
refs/heads/master
2023-09-04T03:02:20.165042
2023-09-02T14:55:31
2023-09-02T14:55:31
33,078,138
1,087
325
BSD-2-Clause
2023-09-14T16:58:34
2015-03-29T15:27:48
C
UTF-8
C
false
false
353
h
mem_barriers.h
/** * @file mem_barriers.h * @brief Header file for memory barriers * * @author Michele Di Giorgio * @date 23.11.2015 */ #ifndef HAL_MEM_BARRIERS_H_ #define HAL_MEM_BARRIERS_H_ #include <module/embox/arch/mem_barriers.h> #ifndef __ASSEMBLER__ extern void data_mem_barrier(void); #endif /* __ASSEMBLER__ */ #endif /* HAL_MEM_BARRIERS_H_ */
77cd4772cf872170c3b86b6c66977275522edfcc
fc86c733caeba5275a6f9c5723f7dabde4b7ff5e
/C/19_rmNthNode.c
1291e4ff3d3f5a873c87685711a90f769d917537
[]
no_license
HwHgoo/LeetCode-Solution
f86390dc2bdcdb2b8f18519aba1c42f946f6dfd3
48d3ee51629539f3e942f233ed650f7e24050b37
refs/heads/master
2021-06-09T21:15:17.970238
2021-06-02T06:55:21
2021-06-02T06:55:21
181,022,147
1
0
null
null
null
null
UTF-8
C
false
false
927
c
19_rmNthNode.c
#include<stdio.h> #include<stdlib.h> struct ListNode{ int val; struct ListNode *next; }; struct ListNode* removeNthFromEnd(struct ListNode*, int); int main(){ struct ListNode* head = (struct ListNode*)malloc(sizeof(struct ListNode)); head->val = 1; head->next = NULL; head = removeNthFromEnd(head,1); if (head != NULL) printf("!!!!!!!!!!"); else{ printf("************"); } getchar(); return 0; } int len(struct ListNode* head){ int result = 0; struct ListNode* ptr = head; while(ptr){ ptr = ptr->next; result++; } return result; } struct ListNode* removeNthFromEnd(struct ListNode* head, int n) { int length = len(head); if(n == length) return head->next; struct ListNode* ptr = head; for(int i = 0; i < length - n - 1; i++) ptr = ptr->next; ptr->next = ptr->next->next; return head; }
e2997fb88f1d22fa1547a7181ceba13a2e09447f
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/mpv/demux/extr_demux.c_demux_start_thread.c
43238aa673824d6e20e05537276db773f48df456
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,018
c
extr_demux.c_demux_start_thread.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ struct demuxer {struct demux_internal* in; } ; struct demux_internal {int threading; int /*<<< orphan*/ thread; struct demuxer* d_user; } ; /* Variables and functions */ int /*<<< orphan*/ assert (int) ; int /*<<< orphan*/ demux_thread ; scalar_t__ pthread_create (int /*<<< orphan*/ *,int /*<<< orphan*/ *,int /*<<< orphan*/ ,struct demux_internal*) ; void demux_start_thread(struct demuxer *demuxer) { struct demux_internal *in = demuxer->in; assert(demuxer == in->d_user); if (!in->threading) { in->threading = true; if (pthread_create(&in->thread, NULL, demux_thread, in)) in->threading = false; } }
7357432838b10e26907653295c49dbdc9130d2ba
65e705948ade0d991549b01a997b33e029d59092
/src/multiplayer_snake/commands.h
d95990f661a3193296fb5314499e10d5b4fd936f
[]
no_license
turok-m-a/multiplayer_snake
99d438584507fa9194bd94b504d9a32cef508331
b4423189db5d1d487dfa8814804c60bb674a4576
refs/heads/master
2020-04-09T16:03:56.542162
2016-12-08T11:55:36
2016-12-08T11:55:36
68,273,733
0
1
null
2016-12-08T11:55:36
2016-09-15T07:11:16
C++
UTF-8
C
false
false
185
h
commands.h
#ifndef COMMANDS_H #define COMMANDS_H enum commands {MOVEUP, MOVEDOWN, MOVELEFT, MOVERIGHT,WALLS0,WALLS1,WALLS2,SPEED0,SPEED1,START,STOP,RESET,NO_CMD,COORDINATES}; #endif // COMMANDS_H
375ab6e56f322c3fcaedb4c1760237929e19ce9b
0c89bc52925856b578f1571ffebdc8c97256a240
/proj/server.c
863df98dd74ab0d9e3cd754f3a687144eef545f7
[]
no_license
zmmoo/Linux-program-notes
0791c21e1120b8b46c51bbc86ca0a33e87e8ec88
fb399ddd1cbf61e34bb5f19f0fe0717d5e5a27a2
refs/heads/master
2020-09-07T08:47:15.997249
2019-11-25T14:18:16
2019-11-25T14:18:16
220,727,635
0
0
null
null
null
null
UTF-8
C
false
false
5,700
c
server.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <arpa/inet.h> #include <netinet/in.h> #include <signal.h> #include <sqlite3.h> #include <string.h> #include <time.h> #define N 32 #define R 1 // user register #define L 2 //user login #define Q 3 //user query #define H 4 //user history #define DATABASE "my.db" typedef struct{ int type; char name[N]; char data[2048]; }MSG; int do_client(int acceptfd, sqlite3 *db); void do_register(int acceptfd, MSG *msg, sqlite3 *db); void do_login(int acceptfd, MSG *msg, sqlite3 *db); void do_query(int acceptfd, MSG *msg, sqlite3 *db); void do_history(int acceptfd, MSG *msg, sqlite3 *db); int main(int argc, char *argv[]) { int sockfd; int acceptfd; pid_t pid; struct sockaddr_in serveraddr; MSG msg; sqlite3 *db; if(argc != 3) { printf("Usage:%s <server_ip> <port>\n", argv[0]); exit(-1); } signal(SIGCHLD,SIG_IGN); if(sqlite3_open(DATABASE, &db) != SQLITE_OK) { printf("%s\n", sqlite3_errmsg(db)); exit(-1); } if((sockfd=socket(AF_INET,SOCK_STREAM,0)) < 0) { perror("sockfd"); exit(-1); } bzero(&serveraddr, sizeof(struct sockaddr_in)); serveraddr.sin_family = AF_INET; serveraddr.sin_addr.s_addr = inet_addr(argv[1]); serveraddr.sin_port = htons(atoi(argv[2])); if(bind(sockfd, (struct sockaddr*)&serveraddr, sizeof(struct sockaddr)) < 0) { perror("bind"); exit(-1); } if(listen(sockfd, 5) < 0) { perror("listen"); exit(-1); } while(1) { if((acceptfd=accept(sockfd, NULL, NULL)) < 0) { perror("accept"); exit(-1); } if((pid = fork()) < 0) { perror("fork"); exit(-1); } else if(pid == 0) { //处理客户端 printf("this is child\n"); do_client(acceptfd, db); } else { //父进程 close(acceptfd); } } return 0; } int do_client(int acceptfd, sqlite3 *db) { MSG msg; printf("recving\n"); while(read(acceptfd, &msg, sizeof(MSG)) > 0) { printf("recved\n"); printf("%d\n",msg.type); switch(msg.type) { case R: do_register(acceptfd, &msg, db); break; case L: do_login(acceptfd, &msg, db); break; case Q: do_query(acceptfd, &msg, db); break; case H: do_history(acceptfd, &msg, db); break; defalut: printf("error cmd\n"); break; } } printf("client sign out\n"); close(acceptfd); return 0; } void do_register(int acceptfd, MSG *msg, sqlite3 *db) { char sql[128]; char *errmsg; sprintf(sql, "insert into usr values('%s', '%s');", msg->name, msg->data); if(sqlite3_exec(db,sql,NULL,NULL,&errmsg) != SQLITE_OK) { printf("%s\n", errmsg); strcpy(msg->data, "usr name already exist"); } else { printf("client register OK\n"); strcpy(msg->data, "OK"); } if(send(acceptfd, msg, sizeof(MSG) ,0) < 0) { perror("send"); exit(-1); } return ; } void do_login(int acceptfd, MSG *msg, sqlite3 *db) { char sql[128] = {}; char *errmsg; char **result; int nrow, ncloumn; sprintf(sql, "select * from usr where name='%s' and pass = '%s';",msg->name, msg->data); printf("%s\n", sql); if(sqlite3_get_table(db, sql, &result, &nrow, &ncloumn, &errmsg) != SQLITE_OK) { printf("%s\n", errmsg); } else { printf("get table success\n"); } if(nrow == 1) // 查询成功 { strcpy(msg->data, "OK"); send(acceptfd, msg, sizeof(MSG), 0); } else // 密码或用户名错误 { strcpy(msg->data, "usr/passwd wrong"); send(acceptfd, msg, sizeof(MSG), 0); return ; } } int do_searchword(int acceptfd, MSG *msg, char word[]) { FILE *fp; char buf[512]; int result; char *p; if((fp=fopen("./dict.txt", "r")) == NULL) { perror("fopen"); strcpy(msg->data,"failed to open dict.txt"); send(acceptfd, msg, sizeof(MSG), 0); exit(-1); } printf("%s, len = %d\n", word, strlen(word)); while(fgets(buf, 512, fp) != NULL) { if((result=strncmp(buf, word, strlen(word))) > 0) { break; } else if(result < 0 || ((result == 0) && *(buf+strlen(word)) != ' ')) { continue; } p = buf+strlen(word); while(*p == ' ') // 找到注释部分 p++; strcpy(msg->data, p); fclose(fp); return 1; } fclose(fp); return 0; } int get_date(char *date) { time_t t; time(&t); strcpy(date, ctime(&t)); return 0; } void do_query(int acceptfd, MSG *msg, sqlite3 *db) { char word[64]; int found = 0; char date[128]; char sql[128]; char *errmsg; strcpy(word, msg->data); if((found = do_searchword(acceptfd, msg, word)) == 1) { // 获取系统时间 get_date(date); printf("%s\n", date); sprintf(sql, "insert into record values('%s' ,'%s', '%s');", msg->name, date, word); printf("%s\n",sql); if(sqlite3_exec(db , sql, NULL, NULL, &errmsg) != SQLITE_OK ) { printf("%s\n", errmsg); exit(-1); } } else { strcpy(msg->data, "Not found"); } send(acceptfd, msg, sizeof(MSG), 0); } void do_history(int acceptfd, MSG *msg, sqlite3 *db) { char sql[128]; int nrow, ncloumn; char **result; char *errmsg; char *p; int index, n; int i,j; sprintf(sql, "select * from record where name='%s';", msg->name); printf("%s\n", sql); if(sqlite3_get_table(db, sql, &result, &nrow, &ncloumn, &errmsg) != SQLITE_OK) { printf("%s\n", errmsg); exit(-1); } if(nrow > 0) { printf("row:%d cloumn:%d\n", nrow, ncloumn); index = ncloumn; p = msg->data; for(i=0; i<nrow; i++) { for(j=0; j<ncloumn; j++) { n = index; sprintf(p, "%s", result[index++]); p = p + strlen(result[n]); } *p = '\n'; p++; } *p = '\0'; printf("%s\n",msg->data); if(send(acceptfd, msg, sizeof(MSG), 0) < 0) { printf("send"); exit(-1); } sqlite3_free_table(result); } else { printf("have no history\n"); } }
5ddf3fd1675d4e76c81138baafd9d24a60100fff
02ffeb53481362a4ac2c90f4c76460a27a448e4d
/A8107/projects/tag/sources/init.h
f4fbc8c2729d2aa8ff81d1581d20ff058b0b4cfc
[]
no_license
yicheng55/scanner_mss
9b28ed3ba71c4fbff3fe84d8f5efc4a164c5d23d
319ee0d6f6a52f84420748038fa7eba9d5e673de
refs/heads/main
2023-04-10T15:02:58.548885
2021-04-06T06:48:45
2021-04-06T06:48:45
354,554,486
0
0
null
null
null
null
UTF-8
C
false
false
341
h
init.h
/********************************************** * init.h * **********************************************/ #ifndef _INIT_H_ #define _INIT_H_ void SetOneshotTimer0(TIMER_Type *timer, uint32_t msec); void SetOneshotTimer1(TIMER_Type *timer, uint32_t msec); void startTimer(TIMER_Type *timer, uint32_t msec); void RTC_SETTING(void); #endif
9dce0d437e01ad718b0ae3ae2a90042d2e10ed59
99bdb3251fecee538e0630f15f6574054dfc1468
/components/net/lwip/lwip-2.1.2/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c
04d47ae51c77f2b992cf603153af133ddaea2146
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
6,720
c
altcp_tls_mbedtls_mem.c
/** * @file * Application layered TCP connection API (to be used from TCPIP thread) * * This file contains memory management functions for a TLS layer using mbedTLS. * * ATTENTION: For production usage, you might want to override this file with * your own implementation since this implementation simply uses the * lwIP heap without caring for fragmentation or leaving heap for * other parts of lwIP! */ /* * Copyright (c) 2017 Simon Goldschmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Simon Goldschmidt <[email protected]> * * Missing things / @todo: * - RX data is acknowledged after receiving (tcp_recved is called when enqueueing * the pbuf for mbedTLS receive, not when processed by mbedTLS or the inner * connection; altcp_recved() from inner connection does nothing) * - TX data is marked as 'sent' (i.e. acknowledged; sent callback is called) right * after enqueueing for transmission, not when actually ACKed be the remote host. */ #include "lwip/opt.h" #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ #include "lwip/apps/altcp_tls_mbedtls_opts.h" #if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS #include "altcp_tls_mbedtls_mem.h" #include "altcp_tls_mbedtls_structs.h" #include "lwip/mem.h" #include "mbedtls/platform.h" #include <string.h> #ifndef ALTCP_MBEDTLS_MEM_DEBUG #define ALTCP_MBEDTLS_MEM_DEBUG LWIP_DBG_OFF #endif #if defined(MBEDTLS_PLATFORM_MEMORY) && \ (!defined(MBEDTLS_PLATFORM_FREE_MACRO) || \ defined(MBEDTLS_PLATFORM_CALLOC_MACRO)) #define ALTCP_MBEDTLS_PLATFORM_ALLOC 1 #else #define ALTCP_MBEDTLS_PLATFORM_ALLOC 0 #endif #if ALTCP_MBEDTLS_PLATFORM_ALLOC #ifndef ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS #define ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS 0 #endif /* This is an example/debug implementation of alloc/free functions only */ typedef struct altcp_mbedtls_malloc_helper_s { size_t c; size_t len; } altcp_mbedtls_malloc_helper_t; #if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS typedef struct altcp_mbedtls_malloc_stats_s { size_t allocedBytes; size_t allocCnt; size_t maxBytes; size_t totalBytes; } altcp_mbedtls_malloc_stats_t; altcp_mbedtls_malloc_stats_t altcp_mbedtls_malloc_stats; volatile int altcp_mbedtls_malloc_clear_stats; #endif static void * tls_malloc(size_t c, size_t len) { altcp_mbedtls_malloc_helper_t *hlpr; void *ret; size_t alloc_size; #if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS if (altcp_mbedtls_malloc_clear_stats) { altcp_mbedtls_malloc_clear_stats = 0; memset(&altcp_mbedtls_malloc_stats, 0, sizeof(altcp_mbedtls_malloc_stats)); } #endif alloc_size = sizeof(altcp_mbedtls_malloc_helper_t) + (c * len); /* check for maximum allocation size, mainly to prevent mem_size_t overflow */ if (alloc_size > MEM_SIZE) { LWIP_DEBUGF(ALTCP_MBEDTLS_MEM_DEBUG, ("mbedtls allocation too big: %c * %d bytes vs MEM_SIZE=%d", (int)c, (int)len, (int)MEM_SIZE)); return NULL; } hlpr = (altcp_mbedtls_malloc_helper_t *)mem_malloc((mem_size_t)alloc_size); if (hlpr == NULL) { LWIP_DEBUGF(ALTCP_MBEDTLS_MEM_DEBUG, ("mbedtls alloc callback failed for %c * %d bytes", (int)c, (int)len)); return NULL; } #if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS altcp_mbedtls_malloc_stats.allocCnt++; altcp_mbedtls_malloc_stats.allocedBytes += c * len; if (altcp_mbedtls_malloc_stats.allocedBytes > altcp_mbedtls_malloc_stats.maxBytes) { altcp_mbedtls_malloc_stats.maxBytes = altcp_mbedtls_malloc_stats.allocedBytes; } altcp_mbedtls_malloc_stats.totalBytes += c * len; #endif hlpr->c = c; hlpr->len = len; ret = hlpr + 1; /* zeroing the allocated chunk is required by mbedTLS! */ memset(ret, 0, c * len); return ret; } static void tls_free(void *ptr) { altcp_mbedtls_malloc_helper_t *hlpr; if (ptr == NULL) { /* this obviously happened in mbedtls... */ return; } hlpr = ((altcp_mbedtls_malloc_helper_t *)ptr) - 1; #if ALTCP_MBEDTLS_PLATFORM_ALLOC_STATS if (!altcp_mbedtls_malloc_clear_stats) { altcp_mbedtls_malloc_stats.allocedBytes -= hlpr->c * hlpr->len; } #endif mem_free(hlpr); } #endif /* ALTCP_MBEDTLS_PLATFORM_ALLOC*/ void altcp_mbedtls_mem_init(void) { /* not much to do here when using the heap */ #if ALTCP_MBEDTLS_PLATFORM_ALLOC /* set mbedtls allocation methods */ mbedtls_platform_set_calloc_free(&tls_malloc, &tls_free); #endif } altcp_mbedtls_state_t * altcp_mbedtls_alloc(void *conf) { altcp_mbedtls_state_t *ret = (altcp_mbedtls_state_t *)mem_calloc(1, sizeof(altcp_mbedtls_state_t)); if (ret != NULL) { ret->conf = conf; } return ret; } void altcp_mbedtls_free(void *conf, altcp_mbedtls_state_t *state) { LWIP_UNUSED_ARG(conf); LWIP_ASSERT("state != NULL", state != NULL); mem_free(state); } void * altcp_mbedtls_alloc_config(size_t size) { void *ret; size_t checked_size = (mem_size_t)size; if (size != checked_size) { /* allocation too big (mem_size_t overflow) */ return NULL; } ret = (altcp_mbedtls_state_t *)mem_calloc(1, (mem_size_t)size); return ret; } void altcp_mbedtls_free_config(void *item) { LWIP_ASSERT("item != NULL", item != NULL); mem_free(item); } #endif /* LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS */ #endif /* LWIP_ALTCP */
affd0b454dd517f001559c84c4467d6f7372d767
5d0e60a98c6f3acef3c9b78544f598d7dccff60d
/과제 4/main.c
2f26bb934c9f7f0d362d6aa072464e40b16ca3b4
[]
no_license
yerimstar/FileSturcture
a1b0310ff15302f52e0700fa56ad3e51857417f9
5c15a141cb32279543eae52b993ca59b9cea6e9b
refs/heads/master
2021-05-20T00:02:51.708685
2020-06-20T04:26:58
2020-06-20T04:26:58
252,097,299
0
0
null
null
null
null
UTF-8
C
false
false
1,905
c
main.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include "sectormap.h" extern FILE *flashfp; void ftl_open(); void ftl_read(int lsn, char *sectorbuf); void ftl_write(int lsn, char *sectorbuf); void ftl_print(); void initialize_flash_memory(); int main(int argc, char *argv[]) { // 아래 세 개의 변수는 테스트할 때 필요하면 사용하기 바람 FILE *workloadfp; char sectorbuf[SECTOR_SIZE]; int lpn; // 가상 flash memory의 파일명은 'flashmemory'을 가정함 flashfp = fopen("flashmemory", "w+"); if(flashfp == NULL) { printf("file open error\n"); exit(1); } initialize_flash_memory(); // ftl_write() 및 ftl_read() 테스트를 위한 코드를 자유자재로 만드세요 ftl_open(); ftl_write(1, "abcde"); ftl_write(2, "nct127"); ftl_write(2, "nctdream"); ftl_write(5, "ridin"); ftl_read(3,sectorbuf); ftl_write(7, "hello"); ftl_write(4, "jeno smile"); ftl_write(0, "I love jisung"); ftl_write(6, "fullsun"); /* ftl_write(8, "chewing gum"); ftl_write(9, "my first and last"); ftl_write(10, "we young"); ftl_write(11,"go"); ftl_write(12,"we go up"); ftl_write(13,"boom"); ftl_write(14,"ridin"); ftl_write(15,"quiet down"); */ ftl_write(7, "renjun"); ftl_write(3, "music star chenle"); ftl_write(1, "nana the rabit"); ftl_print(); // for(int i = 0; i < DATAPAGES_PER_DEVICE; i++){ // ftl_read(i,sectorbuf); // printf("%s\n",sectorbuf); // } fclose(flashfp); return 0; } // // initialize flash memory where each byte are set to 'OxFF' // void initialize_flash_memory() { char *blockbuf; int i; blockbuf = (char *)malloc(BLOCK_SIZE); memset(blockbuf, 0xFF, BLOCK_SIZE); for(i = 0; i < BLOCKS_PER_DEVICE; i++) { fwrite(blockbuf, BLOCK_SIZE, 1, flashfp); } free(blockbuf); return; }
71c60697c9c1cd042564f6d617860f39d26b92a8
fbf817264baf0a5c1c119d364b1145966504124e
/R5_2/branches/dvuong/modules/r5.c
fef6a784a3ce2e92d0608ebe2539bff341437630
[]
no_license
Zargontapel/MPX-OS
a87621027809f6cdbb0635b5909c77d40866664c
8796423e0e6f3e476c6697ac5989123414900d19
refs/heads/master
2021-01-18T22:40:41.821478
2016-06-11T02:11:10
2016-06-11T02:11:10
39,805,509
0
0
null
null
null
null
UTF-8
C
false
false
6,096
c
r5.c
#include "r5.h" #include <mem/heap.h> #include <core/serial.h> #include "string.h" MemoryBlockList freeList; MemoryBlockList allocList; int init_heap(int size) { CompleteMCB* heap = (CompleteMCB*)kmalloc(sizeof(CompleteMCB) + size + sizeof(LimitedMCB)); heap->type = 0; heap->beginningAddress = (u32int)&heap; heap->size = size; heap->ownerName = "HEAP"; heap->next = NULL; heap->previous = NULL; freeList.head = heap; allocList.head = NULL; LimitedMCB* heapEnd = (LimitedMCB*)heap->beginningAddress + sizeof(CompleteMCB) + size; heapEnd->type = 0; heapEnd->size = size; if(heap != NULL && heapEnd != NULL) { return size; } else { return -1; } } u32int my_alloc(u32int size) { u32int modSize = size + sizeof(CompleteMCB) + sizeof(LimitedMCB); //Round up to next word size u32int wordSizeFactor = (modSize + 31) / 32; modSize = wordSizeFactor * 32; u32int curSize; u32int allocSize; CompleteMCB* pointer = freeList.head; LimitedMCB* allocatedBlockEnd; u32int threshold = sizeof(CompleteMCB) + sizeof(LimitedMCB) + 50; unsigned char success = 0; do { curSize = pointer->size + sizeof(CompleteMCB) + sizeof(LimitedMCB); if (curSize >= modSize) { //Temporarily Unlink from free list if (pointer->previous != NULL) pointer->previous->next = pointer->next; if (pointer->next != NULL) pointer->next->previous = pointer->previous; pointer->next = NULL; pointer->previous = NULL; //Determine if we are dividing if (curSize - modSize < threshold) allocSize = curSize; else allocSize = size; //Set the block to allocated pointer->type = 1; pointer->size = allocSize - sizeof(CompleteMCB) - sizeof(LimitedMCB); pointer->ownerName = "NAME"; //Insert the allocated block into the list insertMCB(allocList, pointer); //Create the allocated block end allocatedBlockEnd = (LimitedMCB*)(pointer->beginningAddress + sizeof(CompleteMCB) + allocSize); allocatedBlockEnd->type = 1; allocatedBlockEnd->size = allocSize; //The threshold is large enough to divide into another Free MCB if (allocSize != curSize) { CompleteMCB* remainder = (CompleteMCB*)(pointer->beginningAddress + modSize); serial_println("No page fault yet"); remainder->type = 0; remainder->beginningAddress = pointer->beginningAddress + modSize; remainder->size = curSize - modSize - sizeof(CompleteMCB) - sizeof(LimitedMCB); remainder->ownerName = "FREE"; remainder->next = NULL; remainder->previous = NULL; serial_println("remainder members have been set"); insertMCB(freeList, remainder); serial_println("insertMCB worked correctly"); LimitedMCB* remainderEnd = (LimitedMCB*)(pointer->beginningAddress + sizeof(CompleteMCB) + pointer->size); remainderEnd->type = 0; serial_println("type has been set"); remainderEnd->size = modSize - sizeof(CompleteMCB) - sizeof(LimitedMCB); serial_println("if statemement complete"); } success = 1; break; } pointer = pointer->next; } while (pointer != NULL); if (success == 1) return (u32int)pointer; else return NULL; } void insertMCB(MemoryBlockList list, CompleteMCB* block) { if (list.head == NULL) { list.head = block; } else if (list.head->beginningAddress > block->beginningAddress) { block->next = list.head; list.head->previous = block; list.head = block; } else { CompleteMCB* pointer = list.head->next; CompleteMCB* oldPointer; do { oldPointer = pointer; pointer = pointer->next; } while (pointer->beginningAddress < block->beginningAddress); pointer = oldPointer; block->next = pointer->next; block->previous = pointer; pointer->next->previous = block; pointer->next = block; } } int my_free(void *p) { CompleteMCB* pointer = allocList.head; CompleteMCB* freePointer = freeList.head; LimitedMCB* freeEnd; int success = -1; do { if (pointer->beginningAddress == (u32int)p) { if (pointer->previous != NULL) pointer->previous->next = pointer->next; if (pointer->next != NULL) pointer->next->previous = pointer->previous; pointer->next = NULL; pointer->previous = NULL; //Set the MCB pointer to Free pointer->type = 0; do { freePointer = freePointer->next; } while (freePointer != NULL && freePointer->beginningAddress < pointer->beginningAddress); //Merge Free blocks if (freePointer->beginningAddress - pointer->beginningAddress == 1) { if (freePointer->previous != NULL) freePointer->previous->next = freePointer->next; if (freePointer->next != NULL) freePointer->next->previous = freePointer->previous; freePointer->next = NULL; freePointer->previous = NULL; pointer->size = pointer->size + sizeof(CompleteMCB) + freePointer->size; } insertMCB(freeList, pointer); //Modify the ending MCB if necessary freeEnd = (LimitedMCB*)(pointer->beginningAddress + sizeof(CompleteMCB) + pointer->size); freeEnd->type = 0; freeEnd->size = pointer->size; success = 1; break; } pointer = pointer->next; } while (pointer != NULL); return success; } int is_empty(void) { return (freeList.head != NULL && freeList.head->next == NULL); } void print_alloc(void) { CompleteMCB* currMCB = allocList.head; int i = 0; while(currMCB != NULL) { serial_print("Block "); serial_println(itoa(i)); serial_print(" Offset: "); serial_println(itoa(currMCB->beginningAddress - allocList.head->beginningAddress)); serial_print(" Size: "); serial_println(itoa(currMCB->size)); currMCB = currMCB->next; i++; } } void print_free(void) { CompleteMCB* currMCB = freeList.head; int i = 0; while(currMCB != NULL) { serial_print("Block "); serial_println(itoa(i)); serial_print(" Offset: "); serial_println(itoa(currMCB->beginningAddress - allocList.head->beginningAddress)); serial_print(" Size: "); serial_println(itoa(currMCB->size)); currMCB = currMCB->next; i++; } }
14af56ebe3f085beb98fdcff12187224673046c8
dd222dc970d3e181c317d3e12351968fdc490121
/libs/intel/phis/0.12/guk/sort_gukscf.c
c5c9eac76c056ef3d2dc0988f006ebcf847edf37
[]
no_license
cxlsmiles/theADCcode
7cb04e77a91fd2c2bd4a8f9f140bcab8a933fe98
e7136e9c3a70d3fd52be6f79674426e814c12e8f
refs/heads/master
2021-01-21T09:42:49.176412
2017-05-18T07:50:15
2017-05-18T07:50:15
91,664,330
0
0
null
null
null
null
UTF-8
C
false
false
2,826
c
sort_gukscf.c
#include "./guk.h" /*#include "typedefs.h"*/ /* sort_gukscf.c: * * The scf-vectors of GUK are sorted in a strange way. Here they are * reordered. * * $Log: sort_gukscf.c,v $ * Revision 1.4 2003/04/24 14:05:49 joergb * * guk_aux.c (guk_getpara): New function, determines GUK parameters * from actual dfile * (guk_sizeof_subsection): New function, likewise * * configure.ac: Likewise (getpara.pl call removed) * * guk.h: Likewise * * guk_init.c: Likewise * * phis_guk_ao.c: Likewise * * phis_guk_geometry.c: Likewise * * typeinits.c: New file, initializes the GUK typdefs using the * determined GUK parameters * * typedefs.h: Likewise * * Makefile.in: Likewise * * * guk_init.c: now detects dfile generated with GUK5 (needed for * information in section type 2 * * guk5_read_type2.c: New file, reads several matrices in section * type 2 from GUK5 dfiles: S,T,H,x,y,z * * phis_guk_overlap.c: Likewise * * Revision 1.3 2002/11/15 20:02:22 alext * * guk.h (phis_guk_geometry): New function. * (nAtoms): New global variable. * * guk_init.c: Determines nAtoms. * * phis_guk_info.c: Likewise. * * phis_guk_geometry.c: New file. * * Makefile.in: Likewise. * * phis_guk_overlap.c: Error return changed: -nBas*nBas -> -nBas * * * phis_guk_ao.c: fixed another bug considering * f-functions in lists "l_tab" and "f_tab". * * sort_gukscf.c: bug in sorting with n>1 fixed. * * Revision 1.2 2002/04/10 22:25:58 alext * Latest patches from Joerg * * Revision 1.1 2002/03/24 22:20:03 alext * * guk_aux.c (guk_get_section): Hardcoded length of section type 3, * needs to be fixed. * * phis_guk_info.c: Now returns the correct number of atoms. * * * sort_gukscf.c: New file. * * Makefile.in: New files added. * * phis_get_scfvec.c: Call sort_gukscf() to fix AO ordering in SCF * vectors. * * Revision 1.2 2002/02/06 15:03:28 u85 * comments added/corrected * * Revision 1.1 2002/02/01 14:04:46 u85 * C files added * */ void sort_gukscf(double *gukscf,Type_3 *gukvec) { int i,j,k,l; double *vector; /* allocating temporary vector */ vector=(double*)malloc(gukvec->n_gtos*sizeof(double)); if(vector==NULL){ fprintf(stderr,"malloc: Error allocating %d B\n",gukvec->n_gtos*sizeof(double)); perror("malloc:"); exit(1); } for(i=0;i<gukvec->n_gtos;i++) { for(j=0;j<gukvec->n_gtos;j++) vector[j]=0; /* transformation for symmetry equivalent orbitals */ for(k=0,j=0;j<gukvec->n_gtos;j++) { for(l=0;l<gukvec->ntran[j];l++,k++) { vector[gukvec->itran[k]-1]+= gukvec->ctran[k]*gukscf[i*gukvec->n_gtos + j]; } } /* The sorted vector is copied to the pos. of the orig. vector */ for(j=0;j<gukvec->n_gtos;j++) gukscf[i*gukvec->n_gtos+j]=vector[j]; } free(vector); }
d9b8d411132f1d30bd91860099f314883751b43b
12381c8534715335959b0d67a3afff9f26ea470d
/ZUIMEIDemo/ZUIMEIDemo/Config.h
5d3a82e8dea0716121e1c0a1dbbd181bcf75db4e
[]
no_license
Rakutou/ZUIMEIDemo
c4e262fe37a11b41dc0bb94ae64040d25dc14d31
1ff1e9d789e08fda5c77e83e4e2c683b3b577a81
refs/heads/master
2021-05-30T11:01:16.276678
2016-01-12T18:18:27
2016-01-12T18:18:27
null
0
0
null
null
null
null
UTF-8
C
false
false
913
h
Config.h
// // Config.h // ZUIMEIDemo // // Created by zhangle on 16/1/12. // Copyright © 2016年 zhangle. All rights reserved. // #ifndef Config_h #define Config_h static NSString * const kServerHost = @"http://zuimeia.com/"; static NSString * const kConfigUrl = @"http://zuimeia.com/api/config/?appVersion=2.2.4&openUDID=231de28191cd26cf2882f360602bc144bbb3914f&platform=1&resolution=%7B640%2C%201136%7D&systemVersion=9.2"; static NSString * const kDailyUrl = @"http://zuimeia.com/api/apps/app/daily/?&appVersion=2.2.4&openUDID=231de28191cd26cf2882f360602bc144bbb3914f&page=1&page_size=20&platform=1&resolution=%7B640%2C%201136%7D&systemVersion=9.2"; static NSString * const kCommentUrl = @"http://zuimeia.com/api/apps/comment/?&app=3704&appVersion=2.2.4&openUDID=231de28191cd26cf2882f360602bc144bbb3914f&page=1&page_size=5&platform=1&resolution=%7B640%2C%201136%7D&systemVersion=9.2"; #endif /* Config_h */
0a687867c6af46d31d9089256362e77430c237cf
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/RetroArch/audio/drivers/extr_xenon360_audio.c_xenon360_audio_init.c
346fcb32a715b0eb2eb4b31454fa1fa747cab521
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
895
c
extr_xenon360_audio.c_xenon360_audio_init.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ typedef int /*<<< orphan*/ xenon_audio_t ; /* Variables and functions */ unsigned int SOUND_FREQUENCY ; void* calloc (int,int) ; int /*<<< orphan*/ xenon_sound_init () ; __attribute__((used)) static void *xenon360_audio_init(const char *device, unsigned rate, unsigned latency, unsigned block_frames, unsigned *new_rate) { static bool inited = false; if (!inited) { xenon_sound_init(); inited = true; } *new_rate = SOUND_FREQUENCY; return calloc(1, sizeof(xenon_audio_t)); }
bd8a38e6a274b71dfad28081f61b7a099076f7dc
36183993b144b873d4d53e7b0f0dfebedcb77730
/GameDevelopment/Game Programming Gems 3/Source Code/04 Graphics/08 Weber/CoralTree/osd/xtype.c
a0040e28685c1fbb6b9a2009fb15e231b38ce064
[ "Artistic-2.0", "Intel", "LicenseRef-scancode-unknown-license-reference" ]
permissive
alecnunn/bookresources
b95bf62dda3eb9b0ba0fb4e56025c5c7b6d605c0
4562f6430af5afffde790c42d0f3a33176d8003b
refs/heads/master
2020-04-12T22:28:54.275703
2018-12-22T09:00:31
2018-12-22T09:00:31
162,790,540
20
14
null
null
null
null
UTF-8
C
false
false
1,582
c
xtype.c
#include<osd/osd.h> main() { printf("char8 %d\n",8*sizeof(char8)); printf("int8 %d\n",8*sizeof(int8)); printf("uint8 %d\n",8*sizeof(uint8)); printf("int16 %d\n",8*sizeof(int16)); printf("uint16 %d\n",8*sizeof(uint16)); printf("int32 %d\n",8*sizeof(int32)); printf("uint32 %d\n",8*sizeof(uint32)); printf("int64 %d\n",8*sizeof(int64)); printf("uint64 %d\n",8*sizeof(uint64)); printf("real32 %d\n",8*sizeof(real32)); printf("real64 %d\n",8*sizeof(real64)); printf("word %d\n",8*sizeof(word)); printf("uword %d\n",8*sizeof(uword)); printf("\n"); printf("char %d\n",8*sizeof(char)); printf("short %d\n",8*sizeof(short)); printf("int %d\n",8*sizeof(int)); printf("long %d\n",8*sizeof(long)); printf("long long %d\n",8*sizeof(long long)); printf("\n"); if(sizeof(char8) != 1){ printf("ERROR: char8 is wrong size\n");} if(sizeof(int8) != 1){ printf("ERROR: int8 is wrong size\n");} if(sizeof(uint8) != 1){ printf("ERROR: uint8 is wrong size\n");} if(sizeof(int16) != 2){ printf("ERROR: int16 is wrong size\n");} if(sizeof(uint16) != 2){ printf("ERROR: uint16 is wrong size\n");} if(sizeof(int32) != 4){ printf("ERROR: int32 is wrong size\n");} if(sizeof(uint32) != 4){ printf("ERROR: uint32 is wrong size\n");} if(sizeof(int64) != 8){ printf("ERROR: int64 is wrong size\n");} if(sizeof(uint64) != 8){ printf("ERROR: uint64 is wrong size\n");} if(sizeof(real32) != 4){ printf("ERROR: real32 is wrong size\n");} if(sizeof(real64) != 8){ printf("ERROR: real64 is wrong size\n");} }
7b4cfb929091d4d75f5df4fe3714db80b0e10709
abe1e6a8fbdeb8a9fa18e9793d72f71964ea480d
/Lista10/Lista10_ex2.c
2c91dfe2077d88037cc2285e19f0d8490873df5d
[]
no_license
oarthurcarvalho/comp-dig-2
084c3ab94cae7474d7625ac6f028536cb362edf7
a491ce316551b04fda6cd793e5f2f1acc164aa09
refs/heads/master
2020-07-03T05:47:45.726747
2019-12-03T01:40:45
2019-12-03T01:40:45
201,807,462
0
0
null
null
null
null
UTF-8
C
false
false
740
c
Lista10_ex2.c
#include <stdio.h> #include <stdlib.h> typedef struct lista { int info; struct lista* prox; }Lista; Lista* lst_insere(Lista* lst, int i); int maiores(Lista *l, int x); int main(void) { Lista *lst = NULL; lst = lst_insere(lst,23); lst = lst_insere(lst,45); lst = lst_insere(lst,25); lst = lst_insere(lst,28); int x = 27; printf("O numero de itens de valor maior que %d é %d\n", x, maiores(lst,x)); return 0; } Lista* lst_insere(Lista* lst, int i) { Lista* novo = (Lista*) malloc(sizeof(Lista)); novo->info = i; novo->prox = lst; return novo; } int maiores(Lista *l, int x) { Lista* p = l; int i; int count = 0; for (i=0; p != NULL; i++) { if (p->info > x) { count++; } p = p->prox; } return count; }
bba6baf5b3ea1d4a71f74130ef5cd621876854d2
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/fastsocket/kernel/drivers/net/extr_ll_temac_main.c_temac_set_mac_address.c
0e34e4c3f94e065be8e957a16138ac6801fa225a
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
1,856
c
extr_ll_temac_main.c_temac_set_mac_address.c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ struct temac_local {int /*<<< orphan*/ indirect_mutex; } ; struct net_device {int* dev_addr; } ; /* Variables and functions */ int /*<<< orphan*/ ETH_ALEN ; int /*<<< orphan*/ XTE_UAW0_OFFSET ; int /*<<< orphan*/ XTE_UAW1_OFFSET ; int /*<<< orphan*/ is_valid_ether_addr (int*) ; int /*<<< orphan*/ memcpy (int*,void*,int /*<<< orphan*/ ) ; int /*<<< orphan*/ mutex_lock (int /*<<< orphan*/ *) ; int /*<<< orphan*/ mutex_unlock (int /*<<< orphan*/ *) ; struct temac_local* netdev_priv (struct net_device*) ; int /*<<< orphan*/ random_ether_addr (int*) ; int /*<<< orphan*/ temac_indirect_out32 (struct temac_local*,int /*<<< orphan*/ ,int) ; __attribute__((used)) static int temac_set_mac_address(struct net_device *ndev, void *address) { struct temac_local *lp = netdev_priv(ndev); if (address) memcpy(ndev->dev_addr, address, ETH_ALEN); if (!is_valid_ether_addr(ndev->dev_addr)) random_ether_addr(ndev->dev_addr); /* set up unicast MAC address filter set its mac address */ mutex_lock(&lp->indirect_mutex); temac_indirect_out32(lp, XTE_UAW0_OFFSET, (ndev->dev_addr[0]) | (ndev->dev_addr[1] << 8) | (ndev->dev_addr[2] << 16) | (ndev->dev_addr[3] << 24)); /* There are reserved bits in EUAW1 * so don't affect them Set MAC bits [47:32] in EUAW1 */ temac_indirect_out32(lp, XTE_UAW1_OFFSET, (ndev->dev_addr[4] & 0x000000ff) | (ndev->dev_addr[5] << 8)); mutex_unlock(&lp->indirect_mutex); return 0; }
2b4b49e9c7a0f1e3be7c49854793dbfa3457d049
8aa67e71f2303870064c3b06793dc63c786e8b13
/checker.c
5c5ae4e89e1579a56716846b76f76b23cb02bc6d
[]
no_license
jeanyvesbrisset/push_swap
cc1670b9f1bb007386d22d57af7cf281f92a8b59
e2d5f5db8006cea34e2ba43a11c9f595d7e9461a
refs/heads/master
2020-05-16T11:23:59.915573
2019-11-18T11:46:08
2019-11-18T11:46:08
183,015,120
0
0
null
null
null
null
UTF-8
C
false
false
2,074
c
checker.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* checker.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jbrisset <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/04/02 10:55:05 by jbrisset #+# #+# */ /* Updated: 2019/04/02 10:55:10 by jbrisset ### ########.fr */ /* */ /* ************************************************************************** */ #include "push_swap.h" static int is_operator(char *op) { if (!ft_strcmp("pa", op) || !ft_strcmp("pb", op) || !ft_strcmp("sa", op) || !ft_strcmp("sb", op) || !ft_strcmp("ss", op) || !ft_strcmp("ra", op) || !ft_strcmp("rb", op) || !ft_strcmp("rr", op) || !ft_strcmp("rra", op) || !ft_strcmp("rrb", op) || !ft_strcmp("rr", op)) return (1); else return (0); } int checker(t_stack **a, t_stack **b) { char *op; op = ft_strdup(""); while (get_next_line(0, &op)) { if (is_operator(op)) operate(a, b, op, 0); else if (!op[0]) break ; else { free(op); return (write(2, "Error\n", 6)); } } free(op); if (is_sorted(*a)) return (ft_printf("OK\n")); else return (ft_printf("KO\n")); } int main(int argc, char **argv) { t_stack *a; t_stack *b; long long arg; a = NULL; b = NULL; if (argc < 2) return (0); while (argc > 1) { arg = ft_atoi(argv[argc - 1]); if (!ft_is_nb(argv[argc - 1]) || arg < INT32_MIN || arg > INT32_MAX || find_dup(a, arg)) { free_stacks(&a, &b); return (write(2, "Error\n", 6)); } b = new_elem(arg); push(&b, &a); argc--; } checker(&a, &b); free_stacks(&a, &b); return (0); }
1e245668fe3ccfb2d1588b8a7e64cb43c84a32e8
b8583718e121f4d52a1aafe54554e85cbef2511e
/chromium/patches/patch-base_trace__event_process__memory__dump.h
fbeb7af2488eba443483a072cb7ef4ee1dbe18d9
[]
no_license
akulpillai/pkgsrc-wip-gsoc2019
104c048b6e894bdc1ffa6e3397507ff3298d12f1
3eb20dd9fe1b75ad836a49a517c9c040f2b04e13
refs/heads/master
2020-07-07T16:32:43.983630
2019-08-26T15:33:52
2019-08-26T15:33:52
203,386,868
2
0
null
null
null
null
UTF-8
C
false
false
457
h
patch-base_trace__event_process__memory__dump.h
$NetBSD$ --- base/trace_event/process_memory_dump.h.orig 2017-02-02 02:02:47.000000000 +0000 +++ base/trace_event/process_memory_dump.h @@ -24,7 +24,7 @@ // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the // resident memory. -#if (defined(OS_POSIX) && !defined(OS_NACL)) || defined(OS_WIN) +#if (defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_BSD)) || defined(OS_WIN) #define COUNT_RESIDENT_BYTES_SUPPORTED #endif
b2826b8450b5d8abf1d3365e0937f2f098c457d8
553b7f0d61476c07d1bdf6527284f1c836effe96
/src/alive_blinking.c
9502564b9401eed8aaf5f6e57cd1d74f172cc822
[]
no_license
muhkuh-sys/org.muhkuh.tools-flasher_standalone
4b9870afa34636ff6b18ae296d686d3de9f0cccb
d083377a252056ff0801291ce5f32bad440e840c
refs/heads/master
2021-08-28T08:25:18.985412
2017-12-11T18:02:58
2017-12-11T18:02:58
113,317,870
0
0
null
null
null
null
UTF-8
C
false
false
974
c
alive_blinking.c
#include "alive_blinking.h" #include "systime.h" #include "rdy_run.h" /* Produce a more or less constant green blinking. */ static unsigned long ulAliveBlinking; static unsigned long ulAliveBlinkingDuration; static RDYRUN_T tAliveBlinkingState; void alive_blinking_init(unsigned long ulBlinkDuration) { ulAliveBlinking = systime_get_ms(); ulAliveBlinkingDuration = ulBlinkDuration; tAliveBlinkingState = RDYRUN_GREEN; rdy_run_setLEDs(RDYRUN_GREEN); } void alive_blinking(void) { int iIsElapsed; iIsElapsed = systime_elapsed(ulAliveBlinking, ulAliveBlinkingDuration); if( iIsElapsed!=0 ) { if( tAliveBlinkingState==RDYRUN_GREEN ) { /* The SYS LED is currently green. Turn it off now. */ tAliveBlinkingState = RDYRUN_OFF; rdy_run_setLEDs(RDYRUN_OFF); } else { /* The SYS LED is currently off. Switch to green now. */ tAliveBlinkingState = RDYRUN_GREEN; rdy_run_setLEDs(RDYRUN_GREEN); } ulAliveBlinking = systime_get_ms(); } }
212b49793eb09e3050f2b86d9dccdfdad6e1d465
a4e8b18aebee5acf80acadb127f25deb0abdb8f1
/src/finoa_xtz_config.h
be11dcc122a984360ca25ad39e846ee44e471357
[ "MIT" ]
permissive
daniel-zullo/finoa_xtz
cc9b2e0c1c065b44d305df20a9d635302cb67c63
6ac622d78d4f3b95222abee4c8c4886f0ab734ca
refs/heads/master
2023-03-15T22:06:02.780100
2020-06-09T15:34:09
2020-06-09T15:34:09
null
0
0
null
null
null
null
UTF-8
C
false
false
2,150
h
finoa_xtz_config.h
#ifndef FINOA_XTZ_FINOA_XTZ_CONFIG_H #define FINOA_XTZ_FINOA_XTZ_CONFIG_H #define FIN_XTZ_MAGIC_ED25519_KEY "\x06\xA1\x9F" #define FIN_XTZ_MAGIC_SIG "\x09\xF5\xCD\x86\x12" #define FIN_XTZ_SIZE_ADDRESS 36 #define FIN_XTZ_SIZE_BRANCH 32 #define FIN_XTZ_SIZE_ED25519_PUBKEY 32 #define FIN_XTZ_SIZE_ED25519_SIGNATURE 64 #define FIN_XTZ_SIZE_BLAKE2B_HASH_PUBKEY 20 #define FIN_XTZ_SIZE_BLAKE2B_HASH 32 #define FIN_XTZ_SIZE_TAG_TXN 1 #define FIN_XTZ_SIZE_TAG_ED25519_PUBKEY 1 #define FIN_XTZ_SIZE_TAG_CONTRACT_ID 1 #define FIN_XTZ_TAG_TXN 0x6C #define FIN_XTZ_TAG_ED25519_PUBKEY 0x00 #define FIN_XTZ_TAG_CONTRACT_ID 0x00 #define FIN_XTZ_TXN_HASH_PREFIX 0x03 #ifdef DEFAULT_CONFIG #include <stdint.h> #include <stdlib.h> #include <string.h> #include <BLAKE2/sse/blake2.h> #include <sha-2/sha-256.h> #include <libbase58/libbase58.h> #include <openssl/ecdsa.h> #include <openssl/pem.h> int openssl_sign_oneshot( uint8_t **signature, size_t *len_signature, const uint8_t *msg, size_t len_msg, const uint8_t *private_key, size_t len_private_key ); void zarith_encode_number( uint8_t *number, uint8_t **result, size_t *size ); #define FIN_XTZ_MALLOC(x) malloc(x) #define FIN_XTZ_FREE(x) free(x) #define FIN_XTZ_MEMCPY(dst, src, len) memcpy(dst, src, len) #define FIN_XTZ_SIGN( sig, lsig, msg, lmsg, pk, lpk ) openssl_sign_oneshot( sig, lsig, msg, lmsg, pk, lpk ) #define FIN_XTZ_BLAKE2B( a, b, c, d, e, f ) blake2b( a, b, c, d, e, f ) #define FIN_XTZ_BASE58( a, b, c, d ) b58enc( a, b, c, d ) #define FIN_XTZ_SHA256( h, i, il ) calc_sha_256( h, i, il ) #define FIN_XTZ_ZARITH_NUMBER( in, out, lout ) zarith_encode_number( in, out, lout ) #else #define FIN_XTZ_MALLOC(x) malloc(x) #define FIN_XTZ_FREE(x) free(x) #define FIN_XTZ_MEMCPY(dst, src, len) memcpy(dst, src, len) #define FIN_XTZ_SIGN( sig, lsig, msg, lmsg, pk ) #define FIN_XTZ_BLAKE2B( a, b, c, d, e, f ) #define FIN_XTZ_BASE58( a, b, c, d ) #define FIN_XTZ_SHA256( h, i, il ) #endif // DEFAULT_CONFIG #endif //FINOA_XTZ_FINOA_XTZ_CONFIG_H
e4143b645050f31e9a6e0346bb041e4acf6d8d3b
5146d829d7ec6bf6383a8fb096cccc1a309205bd
/俄罗斯方块.c
e29a435b03700f56fc593500fb0c307109cc5f8d
[]
no_license
Wadekiny/Tetris
76e4c1871a11302dc9c2234752aa490a339fca6b
6e4fe71311e8fc6e9d0d89275ef056ca63af1d51
refs/heads/master
2022-08-18T12:18:06.771761
2022-07-19T13:01:11
2022-07-19T13:01:11
215,301,603
1
0
null
null
null
null
GB18030
C
false
false
15,537
c
俄罗斯方块.c
#include<stdio.h> #include<windows.h> #include<conio.h> #include<time.h> #include<stdlib.h> #include<stdint.h> #include<stdbool.h> #include<string.h> #define BEGIN 4 #define END 23 //打印函数 隐藏光标函数 #define Print() PrintPool(); PrintFrame() #define HideCursor() CONSOLE_CURSOR_INFO cursor_info = {1, 0};SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info) struct GAME_MESSAGE { int score; int coordX; int coordY; int kind[2]; int direction[2]; uint16_t pool[END+2]; uint16_t now; uint16_t next; int time; int rank; int color[20][10]; } message; struct CONTROL_MESSAGE { bool pause; bool left; bool right; bool rotate; bool gogogo; } control; uint16_t teris[7][4] = { // kind O 0 {0x0660,0x0660,0x0660,0x0660}, // kind S 1 {0x006C,0x0462,0x006C,0x0462}, // kind Z 2 {0x0063,0x0264,0x0063,0x0264}, // kind L 3 {0x0223,0x0074,0x0622,0x0170}, // kind J 4 {0x0226,0x0470,0x0322,0x0071}, // kind I 5 {0x00F0,0x2222,0x00F0,0x2222}, // kind T 6 {0x0072,0x0262,0x0270,0x0232}, }; int terisColor[7] = {8,9,10,11,12,13,14}; bool waigua = false; void SetColor(unsigned short, unsigned short); //设置颜色 void GotoXy(int,int); //坐标定位 void GetNext(); //得到下一个方块 int GetBit(uint16_t, int); //得到位 void Delay(); //定时下落 void Deliver();//传递 bool DetectCrash();//检测碰撞 void DetectKey(); //检测键盘 void DetectClean();//检测消行 void Dead();//死掉了 void Init(); //初始化 void PrintNext(); //打印下一个方块 void PrintPool(); //打印游戏池 void PrintFrame();//打印边框 void PrintNumber(); void RotateTeris(); //旋转 void SlipTeris(); //水平移动 void RemoveTeris();//移除方块 void AddTeris(); //添加方块 void ChangeMessage(); //改变游戏数据 void Restart(); //重新开始游戏 int main() { const char masterAccount[] = "tuanzhishu"; const char sbAccount[] = "shenyaodi"; char account[100]; int i, j; int x,y; SetConsoleTitleA("一堆bug的俄罗斯方块"); printf("please input the account\n"); printf("account: "); gets(account); if (!strcmp(account, sbAccount)) { printf("\n你太傻比了 游戏崩溃了\n"); getch(); exit(0); } if (!strcmp(account, masterAccount)) { waigua = true; } system("mode con cols=50"); system("mode con lines=23"); HideCursor(); Restart(); return 0; } void GotoXy(int startX,int startY) //左上角00 左下角y0 右上角x0 右下角xy { HANDLE handle; COORD pos; pos.X = startX; pos.Y = startY; handle = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(handle,pos); } void SetColor(unsigned short ForeColor,unsigned short BackGroundColor) { HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(handle,ForeColor+BackGroundColor*0x10); } int GetBit(uint16_t line,int i) //得到line的第i位 最右边为第0位 { int flag = 1; flag &= line >> i; return flag; } void GetNext() //得到下一个 { int randKind; int randDirection; randKind = (int)rand()%7; randDirection = (int)rand()%4; message.kind[1] = randKind; message.direction[1] = randDirection; message.next = teris[randKind][randDirection]; } void Deliver() //传递 { message.now = message.next; message.kind[0] = message.kind[1]; message.direction[0] = message.direction[1]; GetNext(); } void PrintNext() //在屏幕上打印下一个方块 { int i,flag=3; GotoXy(29,2); //定位 //对于16位 得到位后打印小方块 for (i=15; i>=0; i--) { if (GetBit(message.next,i)) { printf("■"); } else { printf("%2s",""); } if (i%4 == 0) { GotoXy(29,flag++); } } } void PrintPool() //打印游戏池内部情况 { int i,j; int line=0; GotoXy(2,line++); SetColor(14,0); for (i=BEGIN; i<=END; i++) { for (j=12; j>=3; j--) { if (GetBit(message.pool[i],j)) { SetColor(message.color[i-BEGIN][12-j],0); printf("■"); } else { printf("%2s",""); } if (j == 3) { GotoXy(2,line++); } } } } void PrintFrame() //打印框架 { //打印游戏池边界 SetColor(15,0); int i; GotoXy(0,0); for(i=0; i<21; i++) { printf("■\n"); } GotoXy(0,20); for(i=0; i<12; i++) { printf("■"); } for(i=0; i<21; i++) { GotoXy(22,i); printf("■"); } //打印下一个方块 SetColor(14,0); PrintNext(); //打印辅助信息 GotoXy(24,0); SetColor(10,0); printf("%4s----NEXT----",""); GotoXy(24,10); printf("%4sSCORE: %d ","",message.score); GotoXy(24,12); printf(" ● 当前等级: %d ",message.rank); GotoXy(24,13); printf(" ● W 旋转"); GotoXy(24,14); printf(" ● S 下落"); GotoXy(24,15); printf(" ● A 向左平移"); GotoXy(24,16); printf(" ● D 向右平移"); GotoXy(24,17); printf(" ● P 暂停"); GotoXy(24,18); printf(" ● + 或 - 控制速度"); GotoXy(24,20); SetColor(9,0); printf("%3s注意切换输入法",""); GotoXy(24,22); SetColor(8,0); printf(" Design by Whosecube"); } void Init() //初始化 { int i,j; srand((int)time(NULL)); message.score = 0; //初始化分数 message.time = 35; message.rank = 0; for (i=0; i<=END; i++) //初始化游戏池 { message.pool[i] = 0xE007; } message.pool[END+1] = 0xFFFF; //初始化成白色 for (i=0; i<20; i++) { for (j=0; j<10; j++) { message.color[i][j] = 7; } } //初始化now 和 next GetNext(); Deliver(); //坐标定到缓冲区 message.coordX = 3; message.coordY = -4; AddTeris(); //放到缓冲区 //初始化control control.pause = false; control.left = false; control.right = false; control.rotate = false; control.gogogo = false; } void DetectKey() //检测键盘 { char key; if (kbhit()) { key = getch(); if (!control.pause) { switch(key) { case 'w': case 'W': control.rotate = true; break; case 'a': case 'A': control.left = true; break; case 'd': case 'D': control.right = true; break; case 'p': case 'P': control.pause = true; break; case 's': case 'S': control.gogogo = true; break; case '-': case '_': message.time += 5; message.rank--; break; case '=': case '+': if (message.time >= 5) { message.time -= 5; message.rank++; break; } } } } } void DetectClean() //检测消行 { int temp[END+2]; int cnt = 0; int i, j, k; int line = 0; //temp临时存储message.pool for (i=END; i>=BEGIN; i--) { temp[i] = message.pool[i]; } //寻找满足消行的,当前行以上全部向下移动 for (i=END; i>=BEGIN; i--) { if (message.pool[i] == 0xFFFF) { cnt++; message.pool[i] = 0xE007; for (j=i; j>BEGIN; j--) { message.pool[j] = message.pool[j-1]; } message.pool[BEGIN] = 0xE007; //BEGIN行重置为E007 //重新配置颜色 for (j=i-BEGIN; j>0; j--) { for (k=0; k<10; k++) { message.color[j][k] = message.color[j-1][k]; } } i++; } } //打印消行效果 if (cnt) { GotoXy(2,line++); for (i=BEGIN; i<=END; i++) { if (temp[i] == 0xFFFF) { SetColor(15,0); } else { SetColor(7,0); } for (j=12; j>=3; j--) { if (GetBit(temp[i],j)) { printf("■"); } else { printf("%2s",""); } if (j == 3) { GotoXy(2,line++); } } } Sleep(400); } //加分 switch(cnt) { case 1: message.score += 100; break; case 2: message.score += 200; break; case 3: message.score += 400; break; case 4: message.score += 800; break; } } bool DetectCrash() //检测'此时(xy)'是否重叠! ture碰撞 { int line, column; int x = message.coordX; int y = message.coordY; uint16_t NOW = message.now; if(x+3<0 || x>9 || y>END) { return true; } //和游戏池中的数据按位与 结果为1说明碰撞 for (line=0; line<4; line++) { for (column=0; column<4; column++) { if (GetBit(message.pool[y+4+line],12-x-column) & GetBit(NOW,15-(line*4+column)) ) { return true; } } } return false; } void Dead() //死掉了 { char key; SetColor(14,0); GotoXy(9,10); printf("你GG了"); GotoXy(0,22); printf("是否重新开始游戏Y/N"); while (key = getch()) { if (key == 'Y' || key == 'y') { GotoXy(0,22); printf(" "); Restart(); } else if (key == 'N' || key == 'n') { exit(0); } } } void ChangeMessage() //根据control 改变 message { if (control.pause) { SetColor(14,0); GotoXy(0,22); printf("按任意键继续"); getch(); control.pause = false; GotoXy(0,22); printf(" "); } if (control.gogogo) { while (1) { RemoveTeris(); message.coordY++; if (DetectCrash()) { message.coordY--; AddTeris(); break; } else { AddTeris(); } } } SlipTeris(); if (control.rotate) { RotateTeris(); } control.left = false; control.right = false; control.rotate = false; control.gogogo = false; } void Delay() { int i,j; if (!waigua) { if (message.rank >=0 && message.score / (1000 * (message.rank+1)) && message.time >= 0) { message.rank++; message.time -= 5; } } for (i=0; i<message.time; i++) { DetectKey(); ChangeMessage(); Print(); // PrintNumber(); } } void AddTeris() //根据坐标 添加(临时锁定)到游戏池 { uint16_t temp = message.now; int x = message.coordX; int y = message.coordY; int i,j; //通过 按位或 锁定到游戏池 //第一行 message.pool[y+4] |= (((temp >> 12) & 0x000f) << (9-x)); //第二行 message.pool[y+5] |= (((temp >> 8) & 0x000f) << (9-x)); //第三行 message.pool[y+6] |= (((temp >> 4) & 0x000f) << (9-x)); //第四行 message.pool[y+7] |= (((temp >> 0) & 0x000f) << (9-x)); for (i=0; i<4; i++) { for (j=0; j<4; j++) { if (GetBit(temp << i*4 >> 12, 3-j)) { if (y+i >= 0 && x+j >= 0) { message.color[y+i][x+j] = terisColor[message.kind[0]]; } } } } } void RemoveTeris() //根据坐标 移除游戏池 { uint16_t temp = message.now; int x = message.coordX; int y = message.coordY; message.pool[y + 4] &= ~(((temp >> 12) & 0x000f) << (9-x)); message.pool[y + 5] &= ~(((temp >> 8) & 0x000f) << (9-x)); message.pool[y + 6] &= ~(((temp >> 4) & 0x000f) << (9-x)); message.pool[y + 7] &= ~(((temp >> 0) & 0x000f) << (9-x)); } void SlipTeris() //平移 更新‘方块的左上角’xy坐标 add { RemoveTeris(); //已经remove掉 可根据xy直接检测碰撞 if(control.right && !control.left) { message.coordX++; if (DetectCrash()) { message.coordX--; } } else if (control.left && !control.right) { message.coordX--; if (DetectCrash()) { message.coordX++; } } AddTeris(); } void RotateTeris() //旋转 更新当前方向数组 add { uint16_t temp = message.direction[0]; //得到当前角度 RemoveTeris(); if (message.direction[0] == 3) { message.direction[0] = 0; } else { message.direction[0]++; } message.now = teris[message.kind[0]][message.direction[0]]; if (DetectCrash()) //旋转后碰撞 复原 { message.direction[0] = temp; } //给now赋值16进制 更新now message.now = teris[message.kind[0]][message.direction[0]]; AddTeris(); } void PrintNumber() { GotoXy(0,0); int i,j; printf("\n"); for (i=0; i<=END+1; i++) { for (j=15; j>=0; j--) printf("%d ",GetBit(message.pool[i],j)); printf("\n"); } } void Restart() //重新开始游戏 { int i; Init(); if (waigua) { message.score = 10000; } Print(); while (1) { Delay(); RemoveTeris(); message.coordY++; if (DetectCrash()) { message.coordY--; AddTeris(); DetectClean(); for (i=3; i>=0; i--) { if (message.pool[i] != 0xE007) { Dead(); } } Deliver(); message.coordX = 3; message.coordY = -4; message.score += 10; Print(); } else { AddTeris(); Print(); } } }
4981dc83d375aae5c2995735241e2c165a189669
04a1c00f4a666a10b49fbe6594e6c957a078edbc
/submitted labs/Lab2/task3/menu_map.c
435e0f0b158879b61de0eb8326bc80b06d5d4fe3
[]
no_license
shirasegev/Archi-labs
104f74dd33174282a5e9f95edc9ae3a4cf6ef93b
40c807a430a7a9d77334d188ab1a18d46c6eb8e7
refs/heads/main
2023-02-02T20:57:09.357072
2020-12-25T11:43:20
2020-12-25T11:43:20
324,346,588
0
0
null
null
null
null
UTF-8
C
false
false
2,502
c
menu_map.c
#include <stdlib.h> #include <stdio.h> #include <string.h> char censor(char c) { if(c == '!') return '.'; else return c; } void map(char *array, int array_length, char (*f) (char)){ /* TODO: Complete during task 2.a */ for (int i=0; i< array_length; i++){ array[i] = f(array[i]); } } /* Gets a char c and returns its encrypted form by adding 3 to its value. If c is not between 0x20 and 0x7E it is returned unchanged */ char encrypt(char c){ if (c >= 0x20 && c<= 0x7E){ return c + 3; } return c; } /* Gets a char c and returns its decrypted form by reducing 3 to its value. If c is not between 0x20 and 0x7E it is returned unchanged */ char decrypt(char c){ if (c >= 0x20 && c<= 0x7E){ return c-3; } return c; } /* dprt prints the value of c in a decimal representation followed by a new line, and returns c unchanged. */ char dprt(char c){ printf("%d\n", c); return c; } /* If c is a number between 0x20 and 0x7E, cprt prints the character of ASCII value c followed by a new line. Otherwise, cprt prints the dot ('.') character. After printing, cprt returns the value of c unchanged. */ char cprt(char c){ if (c >= 0x20 && c<= 0x7E){ printf("%c\n", c); } else { printf(".\n"); } return c; } /* Ignores c, reads and returns a character from stdin using fgetc. */ char my_get(char c){ return (char)fgetc(stdin); } /* Gets a char c, and if the char is 'q' , ends the program with exit code 0. Otherwise returns c. */ char quit(char c){ if (c == 'q'){ exit(0); } return c; } struct fun_desc { char *name; char (*fun)(char); }; int main(int argc, char **argv){ char* carray = (char*)calloc(5, sizeof(char)); // char* carray = (char*)(malloc(5 * sizeof(char))); struct fun_desc menu[] = { {"Censor", censor}, {"Encrypt", encrypt}, {"Decrypt", decrypt}, {"Print dec", dprt}, {"Print string", cprt}, {"Get string", my_get}, {"Quit", quit}, {NULL, NULL} }; int length = 0; while (menu[length].name != NULL){ length++; } while (1) { printf("Please choose a function:\n"); for (int j = 0; j < length; j++){ printf("%d) %s\n", j, menu[j].name); } printf("Opthion: "); int choice; char tmp; scanf("%d%c", &choice, &tmp); if (choice >= 0 && choice < length) { printf("Within bounds\n"); map(carray, 5, menu[choice].fun); printf("DONE.\n\n"); } else { printf("Not within bounds\n"); exit(0); } } return 0; }
4b98ff8f6ee6cdc6967d66e2c3df7c5dd431cdf3
48c08c2c0310160504926f8422b4aef3096de1c1
/CleverSnake/Archiver.c
a5794dbd5abb6bec01ad2cf6026cf75b42589329
[]
no_license
LeeG4ng/CleverSnake
5ff32885a2c1f31b0887eb1154ce66099f0fdce6
0b49e94636e9573fe745dc2110ef69fd0e4bd577
refs/heads/master
2021-09-03T19:24:50.950834
2018-01-11T11:42:31
2018-01-11T11:42:31
115,062,522
0
0
null
null
null
null
UTF-8
C
false
false
2,158
c
Archiver.c
// // Archiver.c // CleverSnake // // Created by Gary Lee on 2018/1/8. // Copyright © 2018年 UniqueStudio. All rights reserved. // #include "Archiver.h" #include <stdlib.h> static char * path = "./archives.json"; void archive(Status * end) { FILE * file = fopen(path, "wb"); Archive new; Snake * snake = end->snake; new.length = end->snake->length; new.dir = end->snake->direction; new.level = end->level; new.poisoned = end->snake->poisoned; new.weedExist = end->exist; for(int row = 0; row < 24-TEXT_HEIGHT; row++) { for(int col = 0; col < 80; col++) { // if(end->map[row][col] >= 0 && end->map[row][col] < 5) { // new.map[row][col] = end->map[row][col]; // } else { // new.map[row][col] = 0; // } new.map[row][col] = end->map[row][col]; } } Node * temp = snake->head; for(int i = 0; i < new.length; i++) { new.snake[i] = temp->position; temp = temp->next; } fwrite(&new, sizeof(Archive), 1, file); fclose(file); } Status * unarchive(void) { FILE * file = fopen(path, "rb+"); Archive old; fread(&old, sizeof(Archive), 1, file); Status * initial = (Status *)malloc(sizeof(Status)); Snake * snake = initSnake(); initial->alive = true; initial->level = old.level; initial->snake = snake; initial->exist = old.weedExist; snake->direction = old.dir; snake->tempDirection = old.dir; snake->poisoned = old.poisoned; MapElement ** map = (MapElement **)malloc(sizeof(MapElement *) * (24-TEXT_HEIGHT)); for(int row = 0; row < 24 - TEXT_HEIGHT; row++) { map[row] = (MapElement *)malloc(sizeof(MapElement) * 80); } initial->map = map; snake->head->position = old.snake[0]; for(int i = 1; i < old.length; i++) { insertNodeAtIndex(snake, i, old.snake[i]); } for(int row = 0; row < 24-TEXT_HEIGHT; row++) { for(int col = 0; col < 80; col++) { initial->map[row][col] = old.map[row][col]; } } fclose(file); return initial; }
aa04fefce43db739400cd4213a4d64a350741066
f2e20cedbcbda369839e1911092c61e61e45434c
/laboratorio_pro_est/practica_06_01_01.c
e3826c51147fae3f1dd35fafa616d06934a50fe7
[]
no_license
AbrahamHRomo/SAMCRO
e23fcf51d28369278cd26ae2282438839063e4a8
e65ee71619c62f721bfc3c89ad564e1f313b13fa
refs/heads/master
2023-01-30T23:16:54.296477
2020-12-17T06:09:33
2020-12-17T06:09:33
291,919,967
0
0
null
null
null
null
UTF-8
C
false
false
553
c
practica_06_01_01.c
#include<stdio.h> #include<stdlib.h> int main() { int num_piramide, indicador; printf("Ingrese cantidad POSITIVA ENTERA: "); scanf("%d", &num_piramide); system("cls"); printf("\n"); do{ printf("%d",num_piramide); if(num_piramide > 1) { indicador = num_piramide; do{ printf(", %d", num_piramide); indicador = indicador - 1; } while(indicador > 1); } printf("\n"); num_piramide = num_piramide - 1; } while(num_piramide >= 1); return 0;}
0c570b6abf2d52b86883db8b40083faf9a6eecd1
61da6274995cf914291af51bd02e60f408fdfedd
/src/misc/debug.h
aa59fb8de60703120c9d859d639f4704ca32dd3f
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
mrirecon/bart
360d518b4c79836d506803aa4a77e8e252ab820b
a3c9dc313f79c4c52f1ba3e617d5831ef088ddf7
refs/heads/master
2023-08-31T11:01:08.932824
2023-08-30T12:15:35
2023-08-30T13:51:18
23,212,230
264
185
BSD-3-Clause
2023-08-03T18:43:36
2014-08-22T03:57:09
C
UTF-8
C
false
false
2,334
h
debug.h
/* Copyright 2013. The Regents of the University of California. * Copyright 2016. Martin Uecker. * Copyright 2018. Damien Nguyen. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. */ #ifndef __DEBUG_H #define __DEBUG_H 1 #include <stdarg.h> #include <stddef.h> #include "misc/cppwrap.h" extern void dump_cfl(const char* name, int D, const long dimensions[__VLA(D)], const _Complex float* x); extern void dump_multi_cfl(const char* name, int N, int D[__VLA(N)], const long* dimensions[__VLA(N)], const _Complex float* x[__VLA(N)]); extern double timestamp(void); extern int debug_level; extern _Bool debug_logging; enum debug_levels { DP_ERROR, DP_WARN, DP_INFO, DP_DEBUG1, DP_DEBUG2, DP_DEBUG3, DP_DEBUG4, DP_TRACE, DP_ALL }; extern void debug_printf(int level, const char* fmt, ...); extern void debug_vprintf(int level, const char* fmt, va_list ap); #ifdef REDEFINE_PRINTF_FOR_TRACE #define debug_printf(level, ...) \ debug_printf_trace(__FUNCTION__, __FILE__, __LINE__, level, __VA_ARGS__) #define debug_vprintf(level, fmt, ap) \ debug_vprintf_trace(__FUNCTION__, __FILE__, __LINE__, level, fmt, ap) #endif extern void debug_printf_trace(const char* func_name, const char* file, int line, int level, const char* fmt, ...); extern void debug_vprintf_trace(const char* func_name, const char* file, int line, int level, const char* fmt, va_list ap); #define BART_OUT(...) debug_printf_trace(__FUNCTION__, __FILE__, __LINE__, DP_INFO, __VA_ARGS__) #define BART_ERR(...) debug_printf_trace(__FUNCTION__, __FILE__, __LINE__, DP_ERROR, __VA_ARGS__) #define BART_WARN(...) debug_printf_trace(__FUNCTION__, __FILE__, __LINE__, DP_WARN, __VA_ARGS__) extern void debug_backtrace(size_t n); #ifdef USE_DWARF extern void debug_good_backtrace(int skip); const char* debug_good_backtrace_string(int skip); #endif // USE_DWARF extern void debug_trace(const char* fmt, ...); #define TRACE() debug_trace("%s:%d %s\n", __FILE__, __LINE__, __func__) #ifdef USE_LOG_BACKEND // this function must be provided by a vendor backend extern void vendor_log(int level, const char* func_name, const char* file, unsigned int line, const char* message); #endif #include "misc/cppwrap.h" #endif // __DEBUG_H
7a062448c556c7f9b9ea96162d6e0b19b7eae027
acd4aea6cac449f1382b75b7e59afa25af78bb1c
/Tracker_AI_DC_IAP_2.00/HAL/RTC.c
69c7fb3fcc73b48cf65017ab90b28ab21c88fc91
[]
no_license
tangtao13579/AI-2-L5-Control-Project
a1e8768a695f1c660efab36bd4d4596ea935eba6
c10e28b5264c4a4013bb8f2cf7699b0b4f9a0a80
refs/heads/master
2022-11-22T14:36:25.706156
2020-07-27T08:27:30
2020-07-27T08:27:30
271,431,256
0
1
null
null
null
null
UTF-8
C
false
false
5,301
c
RTC.c
#include "stm32f10x_rcc.h" #include "stm32f10x_gpio.h" #include "RTC.h" #define RTC_PORT_CLK RCC_APB2Periph_GPIOC #define RTC_PORT GPIOC #define RTC_DA_Pin GPIO_Pin_6 #define RTC_CLK_Pin GPIO_Pin_8 #define RTC_CE_Pin GPIO_Pin_9 #define RTC_WR_Pin GPIO_Pin_7 #define RTC_CLK_IsSet() GPIO_SetBits(RTC_PORT, RTC_CLK_Pin) #define RTC_CLK_IsReset() GPIO_ResetBits(RTC_PORT, RTC_CLK_Pin) #define RTC_CE_IsSet() GPIO_SetBits(RTC_PORT, RTC_CE_Pin) #define RTC_CE_IsReset() GPIO_ResetBits(RTC_PORT, RTC_CE_Pin) #define RTC_WR_IsSet() GPIO_SetBits(RTC_PORT, RTC_WR_Pin) #define RTC_WR_IsReset() GPIO_ResetBits(RTC_PORT, RTC_WR_Pin) #define RTC_DATA_IsSet() GPIO_SetBits(RTC_PORT, RTC_DA_Pin) #define RTC_DATA_IsReset() GPIO_ResetBits(RTC_PORT, RTC_DA_Pin) static void DelayUs(unsigned int nus) { unsigned int temp = 12; while(nus--) { temp = 12; while(temp--); } } void RTCInit() { GPIO_InitTypeDef GPIO_InitStructure; RCC_APB2PeriphClockCmd(RTC_PORT_CLK, ENABLE); GPIO_InitStructure.GPIO_Pin = RTC_CLK_Pin | RTC_CE_Pin | RTC_WR_Pin; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(RTC_PORT, &GPIO_InitStructure); /*DATA in*/ GPIO_InitStructure.GPIO_Pin = RTC_DA_Pin; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init(RTC_PORT, &GPIO_InitStructure); } void GetTime(unsigned short *second, unsigned short *minute, unsigned short *hour, unsigned short *day, unsigned short *month, unsigned short *year) { unsigned char i = 0; unsigned char temp[7] = {0}; RTC_CLK_IsReset(); RTC_CE_IsSet(); RTC_WR_IsReset(); DelayUs(10); for(i=0;i<52;i++) { RTC_CLK_IsSet(); DelayUs(10); if(i<24) { if(GPIO_ReadInputDataBit(RTC_PORT, RTC_DA_Pin)==1) { temp[i>>3] |= 1<<(i%8); } } else if(i<28) { if(GPIO_ReadInputDataBit(RTC_PORT, RTC_DA_Pin)==1) { temp[3] |= 1<<(i-24); } } else if(i<52) { if(GPIO_ReadInputDataBit(RTC_PORT, RTC_DA_Pin)==1) { temp[(i+4)>>3] |= 1<<((i+4)%8); } } RTC_CLK_IsReset(); DelayUs(10); } RTC_CE_IsReset(); /* s */ *second = (temp[0]&0x0F) + ((temp[0]>>4)&0x07)*10; /* m */ *minute = (temp[1]&0x0F) + ((temp[1]>>4)&0x07)*10; /* h */ *hour = (temp[2]&0x0F) + ((temp[2]>>4)&0x03)*10; /* day */ *day = (temp[4]&0x0F) + ((temp[4]>>4)&0x03)*10; /* month */ *month = (temp[5]&0x0F) + ((temp[5]>>4)&0x01)*10; /* year */ *year = (temp[6]&0x0F) + ((temp[6]>>4)&0x0F)*10 + 2010; } void SetTime(unsigned short second, unsigned short minute, unsigned short hour, unsigned short day, unsigned short month, unsigned short year) { GPIO_InitTypeDef GPIO_InitStructure; unsigned char i = 0; unsigned char j = 0; unsigned char time[7]; time[0] = second & 0xFF; time[1] = minute & 0xFF; time[2] = hour & 0xFF; time[3] = 1; time[4] = day & 0xFF; time[5] = month & 0xFF; time[6] = (year - 2010) & 0xFF; // DATA配置为输出 GPIO_InitStructure.GPIO_Pin = RTC_DA_Pin; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(RTC_PORT, &GPIO_InitStructure); RTC_CLK_IsReset(); RTC_CE_IsSet(); RTC_WR_IsSet(); DelayUs(10); for(i=0;i<7;i++) { j= time[i]; time[i] = (j/10)*16 + (j%10); } // s,m,h for(j=0;j<3;j++) { for(i=0;i<8;i++) { if(time[j]&(1<<i)) { RTC_DATA_IsSet(); } else { RTC_DATA_IsReset(); } DelayUs(10); RTC_CLK_IsSet(); DelayUs(10); RTC_CLK_IsReset(); } } // week for(i=0;i<4;i++) { if(time[3]&(1<<i)) { RTC_DATA_IsSet(); } else { RTC_DATA_IsReset(); } DelayUs(10); RTC_CLK_IsSet(); DelayUs(10); RTC_CLK_IsReset(); } // day,month,year for(j=4;j<7;j++) { for(i=0;i<8;i++) { if(time[j]&(1<<i)) { RTC_DATA_IsSet(); } else { RTC_DATA_IsReset(); } DelayUs(10); RTC_CLK_IsSet(); DelayUs(10); RTC_CLK_IsReset(); } } RTC_CE_IsReset(); // DATA配置为输入 GPIO_InitStructure.GPIO_Pin = RTC_DA_Pin; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init(RTC_PORT, &GPIO_InitStructure); }
b889d27543a15a25a5404ec0e6eef59faf8b73f9
bdc4e2aba96bba9eac674c066510ead3f0bb9c21
/source_graphe/file.c
f01589b9eefbeeccdee25b01f8c889912495a88b
[]
no_license
EmericBre/ALGO_TP3
6544759e80265e0cc385384a75e93ead0f7681c9
eff587bf40a0161f72e96ef6068715cc0a2125dc
refs/heads/main
2023-04-15T12:20:11.148013
2021-05-03T17:26:51
2021-05-03T17:26:51
355,448,007
0
0
null
null
null
null
UTF-8
C
false
false
792
c
file.c
#include <stdlib.h> #include "graphe.h" #include "file.h" pfile_t creer_file () { pfile_t file = malloc(sizeof(file_t)); file->tete = 0; file->queue = 0; return file; } int detruire_file (pfile_t f) { free(f); return 1; } int file_vide (pfile_t f) { if (f->tete == f->queue) { return 1; } return 0; } int file_pleine (pfile_t f) { if (f->queue - f->tete == MAX_FILE_SIZE) { return 1; } return 0; } psommet_t defiler (pfile_t f) { if (file_vide(f) == 1) { return NULL; } f->tete = f->tete+1; psommet_t retour = f->Tab[(f->tete)%(MAX_FILE_SIZE)]; return retour; } int enfiler (pfile_t f, psommet_t p) { if (file_pleine(f) != 1) { f->queue += 1; f->Tab[(f->queue)%(MAX_FILE_SIZE)] = p; return f->queue; } return 0; }
5e23c8eb1099386fd2a54e9bf09b9ef66b2b36fd
4b782f259b190bec7265f4d1045d8af9eb9be932
/src/window.c
b31e9121cb8a34d4e0820100ef41d0a71af9d7fe
[ "BSD-2-Clause" ]
permissive
DeforaOS/Notes
1654bff13f7ac3c29039033747814380b4fb4f3e
66ce87851e3ac790d92bb278e222e46e768fe543
refs/heads/master
2021-01-18T22:08:40.883602
2020-11-19T02:16:08
2020-11-19T02:16:08
41,649,652
0
0
null
null
null
null
UTF-8
C
false
false
8,448
c
window.c
/* $Id$ */ /* Copyright (c) 2015 Pierre Pronchery <[email protected]> */ /* This file is part of DeforaOS Desktop Notes */ /* All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <stdlib.h> #include <libintl.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include <Desktop.h> #include "notes.h" #include "window.h" #include "../config.h" #define _(string) gettext(string) #define N_(string) (string) #ifndef PROGNAME # define PROGNAME "notes" #endif /* NotesWindow */ /* private */ /* types */ struct _NotesWindow { Notes * notes; /* widgets */ GtkWidget * window; GtkWidget * statusbar; }; /* prototypes */ /* callbacks */ static void _noteswindow_on_close(gpointer data); static gboolean _noteswindow_on_closex(gpointer data); static void _noteswindow_on_edit(gpointer data); static void _noteswindow_on_new(gpointer data); static void _noteswindow_on_preferences(gpointer data); #ifndef EMBEDDED /* menus */ /* file menu */ static void _noteswindow_on_file_new(gpointer data); static void _noteswindow_on_file_edit(gpointer data); static void _noteswindow_on_file_close(gpointer data); /* edit menu */ static void _noteswindow_on_edit_select_all(gpointer data); static void _noteswindow_on_edit_delete(gpointer data); static void _noteswindow_on_edit_preferences(gpointer data); /* help menu */ static void _noteswindow_on_help_about(gpointer data); static void _noteswindow_on_help_contents(gpointer data); #endif /* constants */ /* accelerators */ static const DesktopAccel _notes_accel[] = { #ifdef EMBEDDED { G_CALLBACK(_noteswindow_on_close), GDK_CONTROL_MASK, GDK_KEY_W }, { G_CALLBACK(_noteswindow_on_edit), GDK_CONTROL_MASK, GDK_KEY_E }, { G_CALLBACK(_noteswindow_on_new), GDK_CONTROL_MASK, GDK_KEY_N }, { G_CALLBACK(_noteswindow_on_preferences), GDK_CONTROL_MASK, GDK_KEY_P }, #endif { NULL, 0, 0 } }; #ifndef EMBEDDED /* menubar */ static const DesktopMenu _file_menu[] = { { N_("_New"), G_CALLBACK(_noteswindow_on_file_new), GTK_STOCK_NEW, GDK_CONTROL_MASK, GDK_KEY_N }, { N_("_Edit"), G_CALLBACK(_noteswindow_on_file_edit), GTK_STOCK_EDIT, GDK_CONTROL_MASK, GDK_KEY_E }, { "", NULL, NULL, 0, 0 }, { N_("_Close"), G_CALLBACK(_noteswindow_on_file_close), GTK_STOCK_CLOSE, GDK_CONTROL_MASK, GDK_KEY_W }, { NULL, NULL, NULL, 0, 0 } }; static const DesktopMenu _edit_menu[] = { { N_("Select _All"), G_CALLBACK(_noteswindow_on_edit_select_all), #if GTK_CHECK_VERSION(2, 10, 0) GTK_STOCK_SELECT_ALL, #else "edit-select-all", #endif GDK_CONTROL_MASK, GDK_KEY_A }, { "", NULL, NULL, 0, 0 }, { N_("_Delete"), G_CALLBACK(_noteswindow_on_edit_delete), GTK_STOCK_DELETE, 0, 0 }, { "", NULL, NULL, 0, 0 }, { N_("_Preferences"), G_CALLBACK(_noteswindow_on_edit_preferences), GTK_STOCK_PREFERENCES, GDK_CONTROL_MASK, GDK_KEY_P }, { NULL, NULL, NULL, 0, 0 } }; static const DesktopMenu _help_menu[] = { { N_("_Contents"), G_CALLBACK(_noteswindow_on_help_contents), "help-contents", 0, GDK_KEY_F1 }, { N_("_About"), G_CALLBACK(_noteswindow_on_help_about), #if GTK_CHECK_VERSION(2, 6, 0) GTK_STOCK_ABOUT, 0, 0 }, #else NULL, 0, 0 }, #endif { NULL, NULL, NULL, 0, 0 } }; static const DesktopMenubar _menubar[] = { { N_("_File"), _file_menu }, { N_("_Edit"), _edit_menu }, { N_("_Help"), _help_menu }, { NULL, NULL }, }; #endif /* public */ /* functions */ /* noteswindow_new */ NotesWindow * noteswindow_new(void) { NotesWindow * notes; GtkAccelGroup * group; GtkWidget * vbox; GtkWidget * widget; if((notes = malloc(sizeof(*notes))) == NULL) return NULL; notes->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); group = gtk_accel_group_new(); notes->notes = notes_new(notes->window, group); /* check for errors */ if(notes->notes == NULL) { noteswindow_delete(notes); g_object_unref(group); return NULL; } desktop_accel_create(_notes_accel, notes, group); gtk_window_add_accel_group(GTK_WINDOW(notes->window), group); g_object_unref(group); gtk_window_set_default_size(GTK_WINDOW(notes->window), 640, 480); #if GTK_CHECK_VERSION(2, 6, 0) gtk_window_set_icon_name(GTK_WINDOW(notes->window), "notes"); #endif gtk_window_set_title(GTK_WINDOW(notes->window), _("Notes")); g_signal_connect_swapped(notes->window, "delete-event", G_CALLBACK( _noteswindow_on_closex), notes); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); #ifndef EMBEDDED /* menubar */ widget = desktop_menubar_create(_menubar, notes, group); gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, TRUE, 0); #endif widget = notes_get_widget(notes->notes); gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0); /* statusbar */ notes->statusbar = gtk_statusbar_new(); gtk_box_pack_start(GTK_BOX(vbox), notes->statusbar, FALSE, TRUE, 0); gtk_container_add(GTK_CONTAINER(notes->window), vbox); gtk_widget_show_all(notes->window); return notes; } /* noteswindow_delete */ void noteswindow_delete(NotesWindow * notes) { if(notes->notes != NULL) notes_delete(notes->notes); gtk_widget_destroy(notes->window); free(notes); } /* private */ /* functions */ /* callbacks */ /* noteswindow_on_close */ static void _noteswindow_on_close(gpointer data) { NotesWindow * notes = data; _noteswindow_on_closex(notes); } /* noteswindow_on_closex */ static gboolean _noteswindow_on_closex(gpointer data) { NotesWindow * notes = data; gtk_widget_hide(notes->window); gtk_main_quit(); return TRUE; } /* noteswindow_on_edit */ static void _noteswindow_on_edit(gpointer data) { NotesWindow * notes = data; notes_note_edit(notes->notes); } /* noteswindow_on_new */ static void _noteswindow_on_new(gpointer data) { NotesWindow * notes = data; notes_note_add(notes->notes, NULL); } /* noteswindow_on_preferences */ static void _noteswindow_on_preferences(gpointer data) { NotesWindow * notes = data; notes_show_preferences(notes->notes, TRUE); } #ifndef EMBEDDED /* file menu */ /* noteswindow_on_file_close */ static void _noteswindow_on_file_close(gpointer data) { NotesWindow * notes = data; _noteswindow_on_close(notes); } /* noteswindow_on_file_edit */ static void _noteswindow_on_file_edit(gpointer data) { NotesWindow * notes = data; _noteswindow_on_edit(notes); } /* noteswindow_on_file_new */ static void _noteswindow_on_file_new(gpointer data) { NotesWindow * notes = data; _noteswindow_on_new(notes); } /* edit menu */ /* noteswindow_on_edit_delete */ static void _noteswindow_on_edit_delete(gpointer data) { NotesWindow * notes = data; notes_note_delete_selected(notes->notes); } /* noteswindow_on_edit_preferences */ static void _noteswindow_on_edit_preferences(gpointer data) { NotesWindow * notes = data; _noteswindow_on_preferences(notes); } /* noteswindow_on_edit_select_all */ static void _noteswindow_on_edit_select_all(gpointer data) { NotesWindow * notes = data; notes_note_select_all(notes->notes); } /* help menu */ /* noteswindow_on_help_about */ static void _noteswindow_on_help_about(gpointer data) { NotesWindow * notes = data; notes_about(notes->notes); } /* noteswindow_on_help_contents */ static void _noteswindow_on_help_contents(gpointer data) { (void) data; desktop_help_contents(PACKAGE, PROGNAME); } #endif
f358f50005a58838efd619ee48b64944193834f3
3191404a4f70349b20fcb06b868f018afc1e7ee4
/client/list.h
06275de2563aafcb39d4c51f0beb2dc4886f0d60
[]
no_license
blakearnold/rfidentify
2bd53268906bff1fe536f15e0919bf5f046e92f0
35de35cdc1a7b7ea62ced59209ad4390a89238c2
refs/heads/master
2020-06-04T06:19:30.711213
2010-05-13T18:21:31
2010-05-13T18:21:31
null
0
0
null
null
null
null
UTF-8
C
false
false
2,320
h
list.h
#ifndef _LIST_H_ #define _LIST_H_ /** * @author Willi Ballenthin * @file list.h * * This file contains the declaration of a * singly-linked list data structure. */ /** * standardization: a list ends with a cell that looks like: \code +---+---+ ---> | v | 0 | +---+---+ \endcode and empty list then looks like: \code +---+---+ | 0 | 0 | +---+---+ \endcode it should look like this: \code 0 \endcode but this doesnt work, because we would need to be able to modify the pointers but of course they are passed by value... so this implementation needs to be careful on edge cases, checking when there are fewer than 2 elements and whatnot */ typedef struct list { void *car; void *cdr; } list; typedef list list_t; list *list_create(); void list_atom_destroy(list *l); void list_destroy(list *l); void list_destroy_deep(list *l); void *list_car(list *l); void *list_cdr(list *l); void list_set_car(list *l, void *v); void list_set_cdr(list *l, void *v); int list_is_empty(list *l); int list_size(list *l); list *list_cons(void *v, list *l); /* * Higher order functions */ list *list_map(list *l, void *(*fn)(void *)); list *list_filter(list *l, int (*fn)(void *, void *), void *args); list *list_copy(list *l); /** * @param l list *, the list to enumerate * @param t list *, a temporary list */ #define list_foreach(l, t) \ for (t = l; ! list_is_empty(t); t = list_cdr(t)) /** * @param l list *l - the list to enumerate * @param t list *t - a temporary list * @param type the type of the entry * @param e - entry of type TYPE */ #define list_foreach_entry(l, t, type, e) \ for (t = l, e = (type)list_car(t); \ ! list_is_empty(t); \ t = list_cdr(t), e = (type)list_car(t)) /* * Some destructive functions */ list *list_reverse(list *l); list *list_append(list *l, void *v); void *list_remove(list *l, int index); /* * Utilities */ void *list_simple_free_fn(void *v); void *list_str_print_fn(void *); void *list_int_print_fn(void *); list *null_list(); list *list_push(list *l, void *v); void *list_pop(list *l); void *list_nth(list *l, int i); void **list_array(list *l); #define ENOTFND -1 int list_index_of_int(list *haystack, int needle); int list_index_of_str(list *haystack, const char *needle); #endif
5b1f7c4f102bc4348c2eb7cf0541d64b7352c1fe
bd8aa247f2c414d2a77017911fe8273ecf341578
/more.c
8aeb8ed1ef4d4f981a3279afea5afdb594865065
[]
no_license
Nashspinaice/branches-basics
e35ad15750fd74c3dae2e533cfce8237f74c2d98
89e7cd4861c21b1db2ac68cae39ab94e591c8013
refs/heads/master
2021-03-31T00:54:13.922182
2018-03-13T07:06:34
2018-03-13T07:06:34
124,983,707
0
0
null
null
null
null
UTF-8
C
false
false
59
c
more.c
#include <stdio.h> void output() { printf("new file"); }
0913a2a007aad7d3dbd3a1815911b83ac4d559f1
a67032bb052e4442be305e68c973bc318ea342cd
/Labs/LINKEDLI.C
836f57ecc876558a45fcc86282a3b3ca9da9c304
[]
no_license
MostafaNader96/DataStructures_And_Algorithms
2bd8206ee9c5264d6a5c332de0280df9f346bee5
64d7064d545b6198959bd79b290507f09601951e
refs/heads/master
2022-09-17T09:47:58.935195
2020-05-31T16:52:24
2020-05-31T16:52:24
268,322,259
0
0
null
null
null
null
UTF-8
C
false
false
4,539
c
LINKEDLI.C
#include <stdio.h> #include <conio.h> #define up 72 #define down 80 #define enter 13 #define esc 27 typedef struct node { char name[20]; int id; struct node *next; struct node *prev; }node; typedef struct linkedlist { node *start; node *end; }linkedlist; node* createnode(void); void datanode(node *nodee); void addnode(linkedlist *l, node *newnode); void insertnode(linkedlist *l,node *newnode); node * searchnode(linkedlist *l, int flag); int deletenode(linkedlist *l, int flag); void main() { int col=20,row=3; int i,pos=0; int flag,x; char key; char menu[6][10]={"ADD","Insert","Delete","Search","Display","Exit"}; linkedlist *ll; node *temp; ll->start=NULL; ll->end=NULL; while(1) { //start while(1) clrscr(); textcolor(CYAN); gotoxy(col,row); printf("%c%c",45,62); textcolor(CYAN); cprintf("ADD"); gotoxy(col,row+1); textcolor(BLUE); cprintf("%c%c",45,62); cprintf("Insert"); gotoxy(col,row+2); textcolor(RED); cprintf("%c%c",45,62); cprintf("Delete"); gotoxy(col,row+3); textcolor(WHITE); cprintf("%c%c",45,62); cprintf("Search"); gotoxy(col,row+4); textcolor(CYAN); cprintf("%c%c",45,62); cprintf("Display"); gotoxy(col,row+5); textcolor(BLUE); cprintf("%c%c",45,62); cprintf("Exit"); row=3; for(i=0;i<6;i++) { if(i==pos) { gotoxy(col,row+i); textattr(0x70); cprintf("%c%c",45,62); cprintf("%s",menu[i]); textattr(0x07); } } flushall(); key=getch(); switch(key) { //start of switch on first key case NULL: key=getch(); switch(key) { //start of swicth on 2nd key case up: pos--; if(pos<0) pos=5; break; case down: pos++; if(pos>5) pos=0; break; } //end of switch on 2nd key break; case enter: switch(pos) { case 0: clrscr(); temp=createnode(); datanode(temp); addnode(ll,temp); printf("\nNode added succsessfully!\n"); getch(); break; case 1: clrscr(); temp=createnode(); datanode(temp); insertnode(ll,temp); printf("\nNode inserted succesfully!!\n"); getch(); break; case 2: clrscr(); printf("Enter the id of the node you want to delete: "); scanf("%d",&flag); x=deletenode(ll,flag); if(x==1) printf("\n\nSuccesfully deleted!!"); if(x==0) printf("\n\nDeletion Failure!!"); getch(); break; case 3: clrscr(); printf("Enter the id you want to search for: "); scanf("%d",&flag); temp=searchnode(ll,flag); printf("\nThe following data refers to the id you searched for\nName: %s\nID: %d",temp->name,temp->id); getch(); break; case 4: clrscr(); temp=ll->start; while(temp!=NULL) { printf("Name: %s\nID: %d\n",temp->name,temp->id); temp=temp->next; } getch(); break; case 5: clrscr(); printf("Exit mode! Press any key to terminate "); getch(); exit(); break; } break; case esc: exit(); break; } //end of switch on first key } // end while(1) } node* createnode(void) { return (node*)malloc(sizeof(node)); } void datanode(node *nodee) { printf("Enter the name: "); scanf("%s",nodee->name); printf("Enter the id : "); scanf("%d",&(nodee->id)); } void addnode(linkedlist *l, node *newnode) { if(l->start==NULL) { l->start=newnode; l->end=newnode; newnode->next=NULL; newnode->prev=NULL; } else { newnode->prev=l->end; newnode->next=NULL; l->end->next=newnode; l->end=newnode; } } void insertnode(linkedlist *l,node *newnode) { node *temp; temp=l->start; if(l->start==NULL) addnode(l,newnode); while(temp && temp->id<newnode->id) temp=temp->next; if(!temp) addnode(l,newnode); else if(temp==l->start) { newnode->next=l->start; l->start->prev=newnode; l->start=newnode; newnode->prev=NULL; } else { temp->prev->next=newnode; newnode->prev=temp->prev; newnode->next=temp; temp->prev=newnode; } } node * searchnode(linkedlist *l, int flag) { node *temp; temp=l->start; if(l->start==NULL) { return NULL; } while(temp!=NULL && flag!=temp->id) { temp=temp->next; } return temp; } int deletenode(linkedlist *l, int flag) { node *temp; temp=searchnode(l,flag); if(temp==NULL) return 0; else { if((temp==l->start) && (temp==l->end)) { l->start=NULL; l->end=NULL; free(temp); } else if(temp==l->start) { l->start=l->start->next; l->start->prev=NULL; free(temp); } else if(temp==l->end) { l->end=l->end->prev; l->end->next=NULL; free(temp); } else { temp->prev->next=temp->next; temp->next->prev=temp->prev; free(temp); } return 1; } }
2c74e191300dc379f7780d397135e86fcf6291cd
8518460961ce7b8f8b3353d253167511da408ab5
/rpn/rpn.c
b7688071fcbb8163ea010467fde69b90e7fce718
[]
no_license
emilwihlander/edaa25
c05447792a64cac1b962ed12f0cfba0e08dad470
7b13386b1ee707868ed73ccdd5a3e707d4e9f036
refs/heads/master
2020-12-01T14:56:38.134947
2019-12-28T21:44:29
2019-12-28T21:44:29
230,671,291
0
0
null
null
null
null
UTF-8
C
false
false
2,367
c
rpn.c
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <limits.h> #define N (10) struct stack { int top; int *array; }; struct stack *create_stack() { struct stack *s = (struct stack *)malloc(sizeof(struct stack)); s->top = -1; s->array = (int *)malloc(N * sizeof(int)); return s; } void free_stack(struct stack *s) { free(s->array); free(s); } int is_full(struct stack *s) { return s->top == N - 1; } int is_empty(struct stack *s) { return s->top == -1; } void push(struct stack *s, int item) { s->array[++s->top] = item; } int pop(struct stack *s) { return s->array[s->top--]; } int to_number(struct stack *s) { int factor = 1; int result = 0; while (!is_empty(s)) { result += pop(s) * factor; factor *= 10; } return result; } void reset_stack(struct stack *s) { while (!is_empty(s)) { pop(s); } } void print_line(int counter) { printf("line %d: ", counter); } void print_error(int counter) { print_line(counter); printf("error at "); } void print_result(int counter, int result) { print_line(counter); printf("%d\n", result); } int main(void) { struct stack *s = create_stack(); struct stack *intarr = create_stack(); int counter = 1; int failed = 0; int c; while ((c = getchar()) != EOF) { if (!isdigit(c) && !is_empty(intarr)) { int number = to_number(intarr); if (is_full(s)) { print_error(counter); printf("%d\n", number); failed = 1; } else { push(s, number); } } if (c == '\n') { if (!failed) { if (s->top != 0) { print_error(counter); printf("%s\n", "\\n"); failed = 1; } else { print_result(counter, pop(s)); } } counter++; failed = 0; reset_stack(s); } else if (!failed) { if (isdigit(c)) { c -= '0'; push(intarr, c); } else if ((c == '+' || c == '-' || c == '*' || c == '/') && s->top >= 1) { int a = pop(s); int b = pop(s); if (c == '+') push(s, b + a); else if (c == '-') push(s, b - a); else if (c == '*') push(s, b * a); else if (a != 0) push(s, b / a); else { print_error(counter); printf("%c\n", c); failed = 1; } } else if (c != ' ') { print_error(counter); printf("%c\n", c); failed = 1; } } } free_stack(s); free_stack(intarr); return 0; }
bde669b189c3a42bc354830a44d7fa0a65512010
e37d85dabdc94e25e49c08270502badf6c709582
/package/json/kjson/kmap-inline.h
ba2e5e7eec74c53d541c1e0a9ef2c5426ec09ba0
[ "BSD-2-Clause" ]
permissive
shinpei/minikonoha
1e6a4595a70d447b0c82ceb528aeb8c898cb0be8
0462e2db2069ef2f24127d6be743072d42384f98
refs/heads/master
2021-01-16T21:51:21.965676
2012-10-17T07:31:57
2012-10-17T07:31:57
null
0
0
null
null
null
null
UTF-8
C
false
false
2,562
h
kmap-inline.h
/**************************************************************************** * Copyright (c) 2012, Masahiro Ide <[email protected]> * 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 above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ #ifndef KMAP_INLINE_H #define KMAP_INLINE_H #ifdef __cplusplus extern "C" { #endif /* [kmap inline] */ static inline void kmap_dispose(kmap_t *m) { m->h.base.api->_dispose(m); } static inline map_record_t *kmap_get(kmap_t *m, struct JSONString *key) { return m->h.base.api->_get(m, key); } static inline map_status_t kmap_set(kmap_t *m, struct JSONString *key, uint64_t val) { return m->h.base.api->_set(m, key, val); } static inline void kmap_remove(kmap_t *m, struct JSONString *key) { return m->h.base.api->_remove(m, key); } static inline map_record_t *kmap_next(kmap_t *m, kmap_iterator *itr) { return m->h.base.api->_next(m, itr); } static inline unsigned kmap_size(kmap_t *m) { return m->h.used_size; } extern const kmap_api_t DICT; extern const kmap_api_t HASH; static inline void kmap_init(kmap_t *m, unsigned init) { const kmap_api_t *api = (init > DICTMAP_THRESHOLD) ? &HASH:&DICT; m->h.base.api = api; api->_init(m, init); } #ifdef __cplusplus } #endif #endif /* end of include guard */
e22755cd939cbebe967b2e5d65cc71ff35e7b77b
2a44ac0c4ea4d00838ffa3d5d050eaa24b074675
/adv-tests/033_R4_.c
11f89de5ec33df99dcdd5bf6eb22e3e7fe20f34c
[]
no_license
jvitasek/VUT-FIT-IFJ-Proj
49cd300d1d214cc0b24034fa0dbbeabb4df7e3c6
e07575300bd9b1b9fa8f31a313a9e25acd83d438
refs/heads/master
2021-01-10T09:35:03.397951
2015-12-13T22:19:43
2015-12-13T22:19:43
51,268,069
1
0
null
null
null
null
UTF-8
C
false
false
118
c
033_R4_.c
string func( string p1, int p2, bool p3, double p4 ) { return concat( p1, "asd" ); } int main() { int x = func(); }
9194afbd6bcf960e791b27b30661076c8e90f70d
c76ebb334001f9eeaa153955758a6708101838f1
/main.c
b3326c20620f70c5d2a3a2f218da36fd2c40be31
[]
no_license
Jonathana1106/Servidor_DK
b0255476bcbd51c0957cf724dc17d7284b6be534
30079c8c3ece1b4d68714d1f3fd9464e06a7436a
refs/heads/master
2022-01-06T14:12:31.595676
2019-06-15T02:40:37
2019-06-15T02:40:37
null
0
0
null
null
null
null
UTF-8
C
false
false
449
c
main.c
#include <stdio.h> #import "host.h" #include <pthread.h> int main() { pthread_t thread_id; pthread_create(&thread_id, NULL, &open_console, NULL); pthread_t thread_id2; pthread_create(&thread_id2, NULL, &config, NULL); pthread_t thread_id3; pthread_create(&thread_id3, NULL, &escuchar_Host, NULL); pthread_join(thread_id, NULL); pthread_join(thread_id2, NULL); pthread_join(thread_id3, NULL); return 0; }
e620b030c92021501bc301e244ef627f1dbfcac1
8ad63cd3314821128e1e08942ef5d0d89da326ba
/common.h
3f5c85f86431a8e1cf33bab082ee7a0c6673a29e
[]
no_license
lcl22hope/PoiCollectionView
373894820a04e2c367cbb7172eff3f481fcb287d
b890a23465e025e4aa9a522c0f2fc5ca4796a009
refs/heads/master
2021-01-10T09:16:32.504214
2015-12-11T13:30:55
2015-12-11T13:30:55
47,746,645
0
0
null
null
null
null
UTF-8
C
false
false
1,514
h
common.h
// // utility.h // RewriteCollectionView // // Created by lcl on 15/12/10. // Copyright © 2015年 lcl. All rights reserved. // #ifndef utility_h #define utility_h #ifndef MAS_SHORTHAND #define MAS_SHORTHAND #endif #define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width) #define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height) #define SCREEN_BOUNDS ([[UIScreen mainScreen] bounds]) #define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT)) #define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT)) #define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) #define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0) #define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0) #define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0) #define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0) #define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0) #define LSCOLOR_RGB(r,g,b) [UIColor colorWithRed: (r)/255.0f green: (g)/255.0f blue: (b)/255.0f alpha: 1.0] #define LSCOLOR_RGBA(r,g,b,a) [UIColor colorWithRed: (r)/255.0f green: (g)/255.0f blue: (b)/255.0f alpha: (a)] #define LSCOLOR_HEX(hexColor) [UIColor colorWithRed: (((hexColor >> 16) & 0xFF))/255.0f \ green: (((hexColor >> 8) & 0xFF))/255.0f \ blue: ((hexColor & 0xFF))/255.0f alpha:1.0] #endif /* utility_h */
d96d99d58cda38aeeaa4cf2457e7d1a57099cc21
8e4325235c4e2e97172720dc2de8d79ca30b88e8
/src/divide_stacks.c
bf511a89f884645ce4d778b6184b6fbc7ec052b8
[]
no_license
wtandoor/push_swap
f5260e12571b841f86cbc794583d60b85683231e
fd1868e85f985b071dd8e59bd6735326e6f5bf94
refs/heads/master
2023-08-14T16:24:04.185581
2021-09-20T13:37:50
2021-09-20T13:37:50
406,365,106
0
0
null
null
null
null
UTF-8
C
false
false
1,969
c
divide_stacks.c
#include "push_swap.h" int div_stack_a(t_stack **stack_a, t_stack **stack_b, t_com **final, int len) { int rot; int mid; t_stack *tmp; int part; part = len / 2; tmp = *stack_a; rot = 0; mid = find_mid(*stack_a, len); while (tmp && part >= 0) { if (((*stack_a)->dif == 1 && tmp->n < mid) || ((*stack_a)->dif == 2 && tmp->n <= mid)) { while ((*stack_a)->n != tmp->n) rot = stack_rotation(stack_a, final, rot); tmp = tmp->next; part = stack_push(stack_a, stack_b, final, part); } else tmp = tmp->next; } return (rot); } int div_stack_b(t_stack **stack_a, t_stack **stack_b, t_com **final, int len) { int rot; int mid; t_stack *tmp; int part; part = len - len / 2; tmp = *stack_a; rot = 0; mid = find_mid(*stack_a, len); while (tmp && part > 0) { if (((*stack_a)->dif == 1 && tmp->n > mid) || ((*stack_a)->dif == 2 && tmp->n >= mid)) { while ((*stack_a)->n != tmp->n) rot = stack_rotation(stack_a, final, rot); tmp = tmp->next; part = stack_push(stack_a, stack_b, final, part); } else tmp = tmp->next; } return (rot); } int stack_rotation(t_stack **stack, t_com **final, int rot) { rab(stack); if ((*stack)->dif == 1) (*final)->result = add_to_string((*final)->result, "ra\n"); else (*final)->result = add_to_string((*final)->result, "rb\n"); rot++; return (rot); } int stack_push(t_stack **stack_a, t_stack **stack_b, t_com **final, int part) { if ((*stack_a)->dif == 1) (*stack_a)->dif = 2; else (*stack_a)->dif = 1; pab(stack_b, stack_a); if ((*stack_a)->dif == 1) (*final)->result = add_to_string((*final)->result, "pb\n"); else (*final)->result = add_to_string((*final)->result, "pa\n"); part--; return (part); } int find_mid(t_stack *stack, int len) { int *array; int mid; if (stack_len(stack) < len) len = stack_len(stack); array = create_array(stack, len); sort_quick(array, 0, len - 1); mid = array[len / 2]; free(array); return (mid); }
e3cada4cd079f268cb604e5f7f72870f04a4ff79
02ca2bb446b36c88275bb3cfe246eaf0dd188faf
/editor/srcs/ft_save_as.c
eb1747692cf2e34a748e95672f0760bbf9b39109
[]
no_license
nevanna/doom
4e5c272f755aec45d07930f50f3d2054431acaec
00176692144bda237a3f60a4650ec9a0ff4ebc4a
refs/heads/master
2022-07-09T11:36:31.287310
2020-05-17T14:03:44
2020-05-17T14:03:44
264,680,784
0
0
null
null
null
null
UTF-8
C
false
false
526
c
ft_save_as.c
#include "doom.h" void ft_save_as(t_doom *d) { int xmin; int ymin; t_line *tmp; xmin = 2147483647; ymin = 2147483647; tmp = d->lines; ft_putendl("save as"); /* there will be function*/ while (tmp) { if (xmin > tmp->x_e) xmin = tmp->x_e; if (xmin > tmp->x_s) xmin = tmp->x_s; if (ymin > tmp->y_e) ymin = tmp->y_e; if (ymin > tmp->y_s) ymin = tmp->y_s; tmp = tmp->next; } ft_change_lst_coordinates(d, -xmin, -ymin); ft_change_sec_coordinates(d->sect_head, -xmin, -ymin); ft_redraw(d); }
65e4123b30d27551fb7d2126ab5d3e894859b57b
f15ba67850dceb5df5250deffa95cde64ec9d1aa
/CS118/hex2dec.c
283df8d56df68ebb631c21dafe042c85dce293f4
[]
no_license
Syilun/SlopBukkit
f0b48af0ecc17c670653f1147065a84876248f8d
6faac40f00915cfb9499ec59228bf8eb259a34ab
refs/heads/master
2023-03-18T23:02:56.965863
2014-05-21T21:10:09
2014-05-21T21:10:09
null
0
0
null
null
null
null
UTF-8
C
false
false
1,346
c
hex2dec.c
#include "vector.h" #include <stdio.h> #include <math.h> #include <string.h> VECTOR_PROTOTYPE(char, char); void hex2dec(unsigned int*, char_vector*); int main(int argc, char ** args) { char_vector in = char_vector_create(4); char_vector_insert_range(&in, 0, args[1], args[1]+strlen(args[1])); unsigned int out; hex2dec(&out, &in); printf("%d\r\n", out); char_vector_free_stack(&in); return 0; } void hex2dec(unsigned int * out, char_vector* in) { /* drop the leading 0x if it exists */ if(in->data[0]=='0'&&in->data[1]=='x') char_vector_remove_range(in, 0, 2); /* put null character at the end of the string to prevent stdc routines from f'ing up the output */ in->data[in->length] = '\0'; /* can do because length is 1-past the end of the vector, and because of remove calls the vector is guaranteed to have excess */ *out = 0; register short int i, order; unsigned int tmp; char * sztmp = (char*)calloc(2, sizeof(char)); sztmp[1]='\0'; for(i=in->length-1,order=0; i>=0; --i,++order) { sztmp[0]=in->data[i]; sscanf(sztmp,"%x",&tmp); /* same story, I could write a custom switch statement or something, but that's a lot of typing and besides the point */ *out+=tmp*(unsigned int)pow(16.0, order); } }
20c8dadc10b3fad405894e11937ec17142696a0b
d8a7b215452ea9dfa0ed9c6bb47cb7d0d0b826e8
/Programs No (94).C
249e76f58d9a694e0281c264e64a0f38fa3b070c
[]
no_license
shubhamjanhere/C-Programs
f4d742c007d9c81b8bdaabed925b22eb26ca14b7
8025358eb506cbb45a14f8d8246fa10149cf632a
refs/heads/master
2021-06-03T18:36:59.623607
2016-09-19T04:23:57
2016-09-19T04:23:57
null
0
0
null
null
null
null
UTF-8
C
false
false
1,403
c
Programs No (94).C
/* Write a C program to find the value of cos(x) using the series * * up to the given accuracy (without using user defined function) * * Also print cos(x) using library function. */ #include <stdio.h> #include <conio.h> #include <math.h> #include <stdlib.h> void main() { int n, x1; float acc, term, den, x, cosx=0, cosval; clrscr(); printf("Enter the value of x (in degrees)\n"); scanf("%f",&x); x1 = x; /* Converting degrees to radians*/ x = x*(3.142/180.0); cosval = cos(x); printf("Enter the accuary for the result\n"); scanf("%f", &acc); term = 1; cosx = term; n = 1; do { den = 2*n*(2*n-1); term = -term * x * x / den; cosx = cosx + term; n = n + 1; } while(acc <= fabs(cosval - cosx)); printf("Sum of the cosine series = %f\n", cosx); printf("Using Library function cos(%d) = %f\n", x1,cos(x)); } /*End of main() */ /*------------------------------ Output Enter the value of x (in degrees) 30 Enter the accuary for the result 0.000001 Sum of the cosine series = 0.865991 Using Library function cos(30) = 0.865991 RUN 2 Enter the value of x (in degrees) 45 Enter the accuary for the result 0.0001 Sum of the cosine series = 0.707031 Using Library function cos(45) = 0.707035 ---------------------------------------------*/
5b89b9011f1c519b6922d5b92938ed051e2ea98e
8bd9437b9bbfb8313859825cfadc8e96577691d8
/src/resources.c
9bd35bf9fbfe5c018ebf2c4468c088b39829af6c
[]
no_license
Open-App-Library/MiniBoard
cce9054cd4fbfce1fcaef2b1b56aeea1e726ebe5
192c8b1ea176a401ea15ff5f738c09dd7dc0014f
refs/heads/master
2020-05-19T08:04:30.190684
2018-09-08T19:46:02
2018-09-08T19:46:02
184,913,083
4
0
null
null
null
null
UTF-8
C
false
false
123,004
c
resources.c
#include <gio/gio.h> #if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)) # define SECTION __attribute__ ((section (".gresource.miniboard"), aligned (8))) #else # define SECTION #endif static const SECTION union { const guint8 data[18448]; const double alignment; void * const ptr;} miniboard_resource_data = { { 0x47, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xea, 0xc6, 0xcb, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x11, 0x00, 0x76, 0x00, 0x18, 0x01, 0x00, 0x00, 0x42, 0x1c, 0x00, 0x00, 0xf0, 0xaf, 0xb2, 0xff, 0x04, 0x00, 0x00, 0x00, 0x42, 0x1c, 0x00, 0x00, 0x0c, 0x00, 0x76, 0x00, 0x50, 0x1c, 0x00, 0x00, 0x15, 0x35, 0x00, 0x00, 0x9b, 0x99, 0xba, 0x2d, 0x06, 0x00, 0x00, 0x00, 0x15, 0x35, 0x00, 0x00, 0x14, 0x00, 0x76, 0x00, 0x30, 0x35, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0x7b, 0xa2, 0x78, 0x7c, 0x05, 0x00, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0x03, 0x00, 0x4c, 0x00, 0xd4, 0x47, 0x00, 0x00, 0xd8, 0x47, 0x00, 0x00, 0x8b, 0x32, 0x7b, 0x5d, 0x07, 0x00, 0x00, 0x00, 0xd8, 0x47, 0x00, 0x00, 0x0a, 0x00, 0x4c, 0x00, 0xe4, 0x47, 0x00, 0x00, 0xec, 0x47, 0x00, 0x00, 0xd4, 0xb5, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff, 0xec, 0x47, 0x00, 0x00, 0x01, 0x00, 0x4c, 0x00, 0xf0, 0x47, 0x00, 0x00, 0xf4, 0x47, 0x00, 0x00, 0xb6, 0x93, 0xa3, 0xf5, 0x04, 0x00, 0x00, 0x00, 0xf4, 0x47, 0x00, 0x00, 0x06, 0x00, 0x4c, 0x00, 0xfc, 0x47, 0x00, 0x00, 0x04, 0x48, 0x00, 0x00, 0x27, 0x7d, 0xfb, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x04, 0x48, 0x00, 0x00, 0x07, 0x00, 0x4c, 0x00, 0x0c, 0x48, 0x00, 0x00, 0x10, 0x48, 0x00, 0x00, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x70, 0x61, 0x6e, 0x2e, 0x73, 0x76, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x3d, 0x22, 0x6e, 0x6f, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x49, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x29, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x73, 0x76, 0x67, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x64, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x31, 0x2e, 0x31, 0x2f, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x63, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6e, 0x73, 0x23, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x76, 0x67, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x73, 0x76, 0x67, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x73, 0x76, 0x67, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x78, 0x6c, 0x69, 0x6e, 0x6b, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x78, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x44, 0x54, 0x44, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x2d, 0x30, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x36, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x31, 0x36, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x76, 0x67, 0x32, 0x22, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x30, 0x2e, 0x39, 0x31, 0x2b, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x72, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x64, 0x6f, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x6d, 0x6f, 0x76, 0x65, 0x62, 0x2e, 0x73, 0x76, 0x67, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x2f, 0x61, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x63, 0x63, 0x2f, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x73, 0x2f, 0x62, 0x61, 0x72, 0x61, 0x6b, 0x69, 0x74, 0x6b, 0x2f, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x43, 0x61, 0x67, 0x65, 0x5f, 0x31, 0x36, 0x5f, 0x42, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x78, 0x64, 0x70, 0x69, 0x3d, 0x22, 0x39, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x79, 0x64, 0x70, 0x69, 0x3d, 0x22, 0x39, 0x30, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x30, 0x2e, 0x33, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x6f, 0x72, 0x67, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x73, 0x76, 0x67, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x22, 0x20, 0x76, 0x69, 0x65, 0x77, 0x42, 0x6f, 0x78, 0x3d, 0x22, 0x30, 0x20, 0x30, 0x20, 0x31, 0x36, 0x20, 0x31, 0x36, 0x22, 0x3e, 0x3c, 0x64, 0x65, 0x66, 0x73, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x64, 0x65, 0x66, 0x73, 0x34, 0x22, 0x3e, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3d, 0x22, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x22, 0x20, 0x78, 0x6c, 0x69, 0x6e, 0x6b, 0x3a, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x33, 0x32, 0x30, 0x34, 0x2d, 0x31, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x38, 0x33, 0x31, 0x33, 0x22, 0x20, 0x78, 0x31, 0x3d, 0x22, 0x31, 0x39, 0x31, 0x2e, 0x30, 0x32, 0x36, 0x37, 0x33, 0x22, 0x20, 0x79, 0x31, 0x3d, 0x22, 0x33, 0x32, 0x30, 0x2e, 0x32, 0x32, 0x38, 0x33, 0x39, 0x22, 0x20, 0x78, 0x32, 0x3d, 0x22, 0x31, 0x37, 0x33, 0x2e, 0x38, 0x33, 0x37, 0x36, 0x36, 0x22, 0x20, 0x79, 0x32, 0x3d, 0x22, 0x33, 0x33, 0x37, 0x2e, 0x32, 0x39, 0x34, 0x34, 0x39, 0x22, 0x20, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x73, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x6e, 0x55, 0x73, 0x65, 0x22, 0x20, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x28, 0x31, 0x2e, 0x30, 0x32, 0x39, 0x32, 0x36, 0x36, 0x36, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x31, 0x2e, 0x30, 0x32, 0x39, 0x32, 0x36, 0x36, 0x36, 0x2c, 0x2d, 0x31, 0x38, 0x34, 0x2e, 0x36, 0x34, 0x34, 0x37, 0x31, 0x2c, 0x37, 0x31, 0x31, 0x2e, 0x37, 0x34, 0x30, 0x30, 0x36, 0x29, 0x22, 0x2f, 0x3e, 0x3c, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x3d, 0x22, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x33, 0x32, 0x30, 0x34, 0x2d, 0x31, 0x22, 0x3e, 0x3c, 0x73, 0x74, 0x6f, 0x70, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x74, 0x6f, 0x70, 0x33, 0x32, 0x30, 0x36, 0x22, 0x2f, 0x3e, 0x3c, 0x73, 0x74, 0x6f, 0x70, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x74, 0x6f, 0x70, 0x33, 0x32, 0x30, 0x38, 0x22, 0x20, 0x73, 0x74, 0x6f, 0x70, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x64, 0x65, 0x66, 0x73, 0x3e, 0x3c, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x61, 0x73, 0x65, 0x22, 0x20, 0x70, 0x61, 0x67, 0x65, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x64, 0x61, 0x64, 0x61, 0x64, 0x61, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, 0x22, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x7a, 0x6f, 0x6f, 0x6d, 0x3d, 0x22, 0x32, 0x35, 0x2e, 0x34, 0x39, 0x37, 0x36, 0x33, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x38, 0x2e, 0x38, 0x34, 0x32, 0x36, 0x36, 0x34, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x39, 0x2e, 0x35, 0x39, 0x35, 0x39, 0x32, 0x30, 0x37, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x3d, 0x22, 0x70, 0x78, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x67, 0x72, 0x69, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x22, 0x32, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x6e, 0x61, 0x70, 0x2d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x6e, 0x61, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x6e, 0x61, 0x70, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x39, 0x32, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x31, 0x30, 0x31, 0x36, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x78, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x79, 0x3d, 0x22, 0x32, 0x37, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x68, 0x6f, 0x77, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x6e, 0x61, 0x70, 0x2d, 0x62, 0x62, 0x6f, 0x78, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x67, 0x75, 0x69, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x3e, 0x3c, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x67, 0x72, 0x69, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x78, 0x79, 0x67, 0x72, 0x69, 0x64, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x72, 0x69, 0x64, 0x34, 0x31, 0x34, 0x30, 0x22, 0x20, 0x65, 0x6d, 0x70, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x35, 0x22, 0x20, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x73, 0x6e, 0x61, 0x70, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x67, 0x72, 0x69, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x6f, 0x6e, 0x6c, 0x79, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x37, 0x22, 0x3e, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x76, 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x64, 0x63, 0x6d, 0x69, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x2f, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x42, 0x61, 0x72, 0x61, 0x6b, 0x20, 0x49, 0x74, 0x6b, 0x69, 0x6e, 0x20, 0x26, 0x6c, 0x74, 0x3b, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x69, 0x73, 0x6d, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x40, 0x67, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x26, 0x67, 0x74, 0x3b, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x42, 0x61, 0x72, 0x61, 0x6b, 0x20, 0x49, 0x74, 0x6b, 0x69, 0x6e, 0x20, 0x26, 0x6c, 0x74, 0x3b, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x69, 0x73, 0x6d, 0x79, 0x6e, 0x61, 0x6d, 0x65, 0x40, 0x67, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x26, 0x67, 0x74, 0x3b, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x4a, 0x75, 0x6c, 0x79, 0x20, 0x32, 0x30, 0x31, 0x30, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x64, 0x61, 0x74, 0x65, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x57, 0x6f, 0x72, 0x6b, 0x3e, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3e, 0x3c, 0x67, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x3d, 0x22, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x20, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x6d, 0x6f, 0x64, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x28, 0x30, 0x2c, 0x2d, 0x31, 0x30, 0x33, 0x36, 0x2e, 0x33, 0x36, 0x32, 0x32, 0x29, 0x22, 0x3e, 0x3c, 0x67, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x33, 0x39, 0x36, 0x30, 0x22, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x79, 0x64, 0x70, 0x69, 0x3d, 0x22, 0x31, 0x32, 0x33, 0x2e, 0x37, 0x35, 0x30, 0x31, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x78, 0x64, 0x70, 0x69, 0x3d, 0x22, 0x31, 0x32, 0x33, 0x2e, 0x37, 0x35, 0x30, 0x31, 0x31, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x33, 0x34, 0x36, 0x35, 0x61, 0x34, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x72, 0x75, 0x6c, 0x65, 0x3a, 0x65, 0x76, 0x65, 0x6e, 0x6f, 0x64, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x75, 0x72, 0x6c, 0x28, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x38, 0x33, 0x31, 0x33, 0x29, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x30, 0x2e, 0x35, 0x30, 0x30, 0x34, 0x34, 0x33, 0x35, 0x32, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x31, 0x30, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x22, 0x20, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3d, 0x22, 0x31, 0x30, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3d, 0x22, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x38, 0x2c, 0x31, 0x30, 0x33, 0x36, 0x2e, 0x36, 0x31, 0x32, 0x34, 0x20, 0x2d, 0x33, 0x2e, 0x35, 0x2c, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x38, 0x20, 0x48, 0x20, 0x37, 0x20, 0x76, 0x20, 0x34, 0x20, 0x48, 0x20, 0x33, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x36, 0x30, 0x31, 0x20, 0x6c, 0x20, 0x2d, 0x31, 0x2e, 0x32, 0x30, 0x31, 0x65, 0x2d, 0x34, 0x2c, 0x2d, 0x32, 0x2e, 0x35, 0x20, 0x2d, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x37, 0x32, 0x38, 0x36, 0x2c, 0x33, 0x2e, 0x35, 0x20, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x37, 0x32, 0x38, 0x36, 0x2c, 0x33, 0x2e, 0x33, 0x36, 0x38, 0x20, 0x76, 0x20, 0x2d, 0x32, 0x2e, 0x33, 0x36, 0x38, 0x20, 0x48, 0x20, 0x37, 0x20, 0x76, 0x20, 0x34, 0x20, 0x48, 0x20, 0x34, 0x2e, 0x35, 0x20, 0x6c, 0x20, 0x33, 0x2e, 0x35, 0x2c, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x38, 0x20, 0x33, 0x2e, 0x35, 0x2c, 0x2d, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x38, 0x20, 0x48, 0x20, 0x39, 0x20, 0x76, 0x20, 0x2d, 0x34, 0x20, 0x68, 0x20, 0x34, 0x20, 0x76, 0x20, 0x32, 0x2e, 0x36, 0x33, 0x32, 0x20, 0x6c, 0x20, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x37, 0x38, 0x39, 0x2c, 0x2d, 0x33, 0x2e, 0x36, 0x33, 0x32, 0x20, 0x2d, 0x32, 0x2e, 0x37, 0x34, 0x39, 0x37, 0x38, 0x39, 0x2c, 0x2d, 0x33, 0x2e, 0x35, 0x20, 0x76, 0x20, 0x32, 0x2e, 0x35, 0x20, 0x48, 0x20, 0x39, 0x20, 0x76, 0x20, 0x2d, 0x34, 0x20, 0x68, 0x20, 0x32, 0x2e, 0x35, 0x20, 0x7a, 0x22, 0x2f, 0x3e, 0x3c, 0x72, 0x65, 0x63, 0x74, 0x20, 0x79, 0x3d, 0x22, 0x31, 0x30, 0x34, 0x34, 0x2e, 0x31, 0x31, 0x32, 0x32, 0x22, 0x20, 0x78, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x30, 0x2e, 0x35, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x34, 0x2e, 0x30, 0x30, 0x30, 0x31, 0x38, 0x36, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x74, 0x33, 0x39, 0x34, 0x37, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x33, 0x64, 0x37, 0x63, 0x66, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x31, 0x2e, 0x32, 0x31, 0x31, 0x30, 0x38, 0x37, 0x31, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x34, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x2f, 0x3e, 0x3c, 0x72, 0x65, 0x63, 0x74, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x28, 0x39, 0x30, 0x29, 0x22, 0x20, 0x79, 0x3d, 0x22, 0x2d, 0x38, 0x2e, 0x32, 0x35, 0x22, 0x20, 0x78, 0x3d, 0x22, 0x31, 0x30, 0x33, 0x37, 0x2e, 0x33, 0x36, 0x32, 0x31, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x30, 0x2e, 0x35, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x34, 0x2e, 0x30, 0x30, 0x30, 0x31, 0x38, 0x36, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x74, 0x33, 0x39, 0x34, 0x37, 0x2d, 0x30, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x33, 0x64, 0x37, 0x63, 0x66, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x31, 0x2e, 0x32, 0x31, 0x31, 0x30, 0x38, 0x37, 0x31, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x34, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x28, 0x30, 0x2e, 0x38, 0x36, 0x35, 0x33, 0x31, 0x31, 0x34, 0x38, 0x2c, 0x2d, 0x30, 0x2e, 0x33, 0x32, 0x34, 0x31, 0x30, 0x39, 0x39, 0x31, 0x2c, 0x30, 0x2e, 0x37, 0x30, 0x39, 0x35, 0x37, 0x34, 0x33, 0x2c, 0x30, 0x2e, 0x33, 0x39, 0x35, 0x32, 0x34, 0x35, 0x34, 0x37, 0x2c, 0x2d, 0x37, 0x31, 0x36, 0x2e, 0x36, 0x33, 0x35, 0x35, 0x33, 0x2c, 0x36, 0x32, 0x37, 0x2e, 0x37, 0x35, 0x32, 0x39, 0x31, 0x29, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x79, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x35, 0x39, 0x33, 0x30, 0x30, 0x36, 0x37, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x78, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x31, 0x33, 0x39, 0x35, 0x37, 0x32, 0x37, 0x36, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x2d, 0x37, 0x2e, 0x36, 0x32, 0x31, 0x30, 0x31, 0x33, 0x37, 0x2c, 0x31, 0x30, 0x33, 0x32, 0x2e, 0x31, 0x37, 0x39, 0x35, 0x20, 0x2d, 0x31, 0x2e, 0x37, 0x30, 0x30, 0x30, 0x33, 0x32, 0x2c, 0x2d, 0x31, 0x2e, 0x34, 0x35, 0x20, 0x32, 0x2e, 0x31, 0x30, 0x35, 0x38, 0x32, 0x36, 0x31, 0x2c, 0x2d, 0x30, 0x2e, 0x37, 0x34, 0x37, 0x33, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x74, 0x73, 0x69, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x32, 0x3d, 0x22, 0x32, 0x2e, 0x32, 0x37, 0x37, 0x30, 0x31, 0x34, 0x39, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x32, 0x39, 0x38, 0x31, 0x37, 0x34, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x32, 0x3d, 0x22, 0x30, 0x2e, 0x36, 0x34, 0x35, 0x30, 0x33, 0x35, 0x38, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x39, 0x30, 0x30, 0x37, 0x31, 0x36, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x31, 0x30, 0x33, 0x30, 0x2e, 0x39, 0x36, 0x33, 0x37, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x2d, 0x38, 0x2e, 0x30, 0x35, 0x32, 0x34, 0x32, 0x36, 0x33, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x73, 0x69, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x33, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x39, 0x36, 0x34, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x35, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x33, 0x64, 0x37, 0x63, 0x66, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x32, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x34, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x72, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x28, 0x30, 0x2e, 0x38, 0x36, 0x35, 0x33, 0x31, 0x31, 0x34, 0x38, 0x2c, 0x30, 0x2e, 0x33, 0x32, 0x34, 0x31, 0x30, 0x39, 0x39, 0x31, 0x2c, 0x30, 0x2e, 0x37, 0x30, 0x39, 0x35, 0x37, 0x34, 0x33, 0x2c, 0x2d, 0x30, 0x2e, 0x33, 0x39, 0x35, 0x32, 0x34, 0x35, 0x34, 0x37, 0x2c, 0x2d, 0x37, 0x31, 0x36, 0x2e, 0x36, 0x32, 0x31, 0x36, 0x39, 0x2c, 0x31, 0x34, 0x36, 0x30, 0x2e, 0x39, 0x38, 0x34, 0x29, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x31, 0x35, 0x39, 0x33, 0x32, 0x30, 0x32, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x78, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x31, 0x33, 0x39, 0x35, 0x37, 0x32, 0x37, 0x36, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x2d, 0x37, 0x2e, 0x36, 0x32, 0x31, 0x30, 0x31, 0x33, 0x37, 0x2c, 0x31, 0x30, 0x33, 0x32, 0x2e, 0x31, 0x37, 0x39, 0x35, 0x20, 0x2d, 0x31, 0x2e, 0x37, 0x30, 0x30, 0x30, 0x33, 0x32, 0x2c, 0x2d, 0x31, 0x2e, 0x34, 0x35, 0x20, 0x32, 0x2e, 0x31, 0x30, 0x35, 0x38, 0x32, 0x36, 0x31, 0x2c, 0x2d, 0x30, 0x2e, 0x37, 0x34, 0x37, 0x33, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x74, 0x73, 0x69, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x32, 0x3d, 0x22, 0x32, 0x2e, 0x32, 0x37, 0x37, 0x30, 0x31, 0x34, 0x39, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x32, 0x39, 0x38, 0x31, 0x37, 0x34, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x32, 0x3d, 0x22, 0x30, 0x2e, 0x36, 0x34, 0x35, 0x30, 0x33, 0x35, 0x38, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x39, 0x30, 0x30, 0x37, 0x31, 0x36, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x31, 0x30, 0x33, 0x30, 0x2e, 0x39, 0x36, 0x33, 0x37, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x2d, 0x38, 0x2e, 0x30, 0x35, 0x32, 0x34, 0x32, 0x36, 0x33, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x73, 0x69, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x33, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x39, 0x36, 0x34, 0x2d, 0x33, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x35, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x33, 0x64, 0x37, 0x63, 0x66, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x32, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x34, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x72, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x28, 0x30, 0x2e, 0x33, 0x32, 0x34, 0x31, 0x30, 0x39, 0x39, 0x31, 0x2c, 0x2d, 0x30, 0x2e, 0x38, 0x36, 0x35, 0x33, 0x31, 0x31, 0x34, 0x38, 0x2c, 0x2d, 0x30, 0x2e, 0x33, 0x39, 0x35, 0x32, 0x34, 0x35, 0x34, 0x37, 0x2c, 0x2d, 0x30, 0x2e, 0x37, 0x30, 0x39, 0x35, 0x37, 0x34, 0x33, 0x2c, 0x34, 0x32, 0x34, 0x2e, 0x36, 0x34, 0x31, 0x31, 0x35, 0x2c, 0x31, 0x37, 0x36, 0x39, 0x2e, 0x30, 0x30, 0x36, 0x35, 0x29, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x31, 0x33, 0x39, 0x32, 0x38, 0x34, 0x31, 0x33, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x78, 0x3d, 0x22, 0x2d, 0x30, 0x2e, 0x31, 0x35, 0x39, 0x33, 0x32, 0x30, 0x34, 0x37, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x2d, 0x37, 0x2e, 0x36, 0x32, 0x31, 0x30, 0x31, 0x33, 0x37, 0x2c, 0x31, 0x30, 0x33, 0x32, 0x2e, 0x31, 0x37, 0x39, 0x35, 0x20, 0x2d, 0x31, 0x2e, 0x37, 0x30, 0x30, 0x30, 0x33, 0x32, 0x2c, 0x2d, 0x31, 0x2e, 0x34, 0x35, 0x20, 0x32, 0x2e, 0x31, 0x30, 0x35, 0x38, 0x32, 0x36, 0x31, 0x2c, 0x2d, 0x30, 0x2e, 0x37, 0x34, 0x37, 0x33, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x74, 0x73, 0x69, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x32, 0x3d, 0x22, 0x32, 0x2e, 0x32, 0x37, 0x37, 0x30, 0x31, 0x34, 0x39, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x32, 0x39, 0x38, 0x31, 0x37, 0x34, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x32, 0x3d, 0x22, 0x30, 0x2e, 0x36, 0x34, 0x35, 0x30, 0x33, 0x35, 0x38, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x39, 0x30, 0x30, 0x37, 0x31, 0x36, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x31, 0x30, 0x33, 0x30, 0x2e, 0x39, 0x36, 0x33, 0x37, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x2d, 0x38, 0x2e, 0x30, 0x35, 0x32, 0x34, 0x32, 0x36, 0x33, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x73, 0x69, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x33, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x39, 0x36, 0x34, 0x2d, 0x33, 0x2d, 0x32, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x35, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x33, 0x64, 0x37, 0x63, 0x66, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x32, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x34, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x72, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x28, 0x2d, 0x30, 0x2e, 0x33, 0x32, 0x34, 0x31, 0x30, 0x39, 0x39, 0x31, 0x2c, 0x2d, 0x30, 0x2e, 0x38, 0x36, 0x35, 0x33, 0x31, 0x31, 0x34, 0x38, 0x2c, 0x30, 0x2e, 0x33, 0x39, 0x35, 0x32, 0x34, 0x35, 0x34, 0x37, 0x2c, 0x2d, 0x30, 0x2e, 0x37, 0x30, 0x39, 0x35, 0x37, 0x34, 0x33, 0x2c, 0x2d, 0x34, 0x30, 0x38, 0x2e, 0x36, 0x33, 0x31, 0x39, 0x37, 0x2c, 0x31, 0x37, 0x36, 0x38, 0x2e, 0x39, 0x33, 0x31, 0x33, 0x29, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x31, 0x33, 0x39, 0x32, 0x38, 0x34, 0x31, 0x33, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2d, 0x78, 0x3d, 0x22, 0x30, 0x2e, 0x31, 0x35, 0x39, 0x33, 0x32, 0x30, 0x30, 0x32, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x2d, 0x37, 0x2e, 0x36, 0x32, 0x31, 0x30, 0x31, 0x33, 0x37, 0x2c, 0x31, 0x30, 0x33, 0x32, 0x2e, 0x31, 0x37, 0x39, 0x35, 0x20, 0x2d, 0x31, 0x2e, 0x37, 0x30, 0x30, 0x30, 0x33, 0x32, 0x2c, 0x2d, 0x31, 0x2e, 0x34, 0x35, 0x20, 0x32, 0x2e, 0x31, 0x30, 0x35, 0x38, 0x32, 0x36, 0x31, 0x2c, 0x2d, 0x30, 0x2e, 0x37, 0x34, 0x37, 0x33, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x66, 0x6c, 0x61, 0x74, 0x73, 0x69, 0x64, 0x65, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x32, 0x3d, 0x22, 0x32, 0x2e, 0x32, 0x37, 0x37, 0x30, 0x31, 0x34, 0x39, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x61, 0x72, 0x67, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x32, 0x39, 0x38, 0x31, 0x37, 0x34, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x32, 0x3d, 0x22, 0x30, 0x2e, 0x36, 0x34, 0x35, 0x30, 0x33, 0x35, 0x38, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x31, 0x3d, 0x22, 0x31, 0x2e, 0x32, 0x39, 0x30, 0x30, 0x37, 0x31, 0x36, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x31, 0x30, 0x33, 0x30, 0x2e, 0x39, 0x36, 0x33, 0x37, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x2d, 0x38, 0x2e, 0x30, 0x35, 0x32, 0x34, 0x32, 0x36, 0x33, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x73, 0x69, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x33, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x39, 0x36, 0x34, 0x2d, 0x33, 0x2d, 0x32, 0x2d, 0x38, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x35, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x33, 0x64, 0x37, 0x63, 0x66, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x32, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x34, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x64, 0x61, 0x73, 0x68, 0x61, 0x72, 0x72, 0x61, 0x79, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x3b, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x2d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x61, 0x72, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x2f, 0x73, 0x76, 0x67, 0x3e, 0x0a, 0x00, 0x00, 0x28, 0x75, 0x75, 0x61, 0x79, 0x29, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x67, 0x6c, 0x61, 0x64, 0x65, 0x00, 0x00, 0xb5, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x67, 0x6c, 0x61, 0x64, 0x65, 0x20, 0x33, 0x2e, 0x32, 0x32, 0x2e, 0x31, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x3c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x20, 0x6c, 0x69, 0x62, 0x3d, 0x22, 0x67, 0x74, 0x6b, 0x2b, 0x22, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x33, 0x2e, 0x32, 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x50, 0x6f, 0x70, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6d, 0x6f, 0x64, 0x61, 0x6c, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x6f, 0x78, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x22, 0x3e, 0x35, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x6e, 0x65, 0x77, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x61, 0x73, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x3e, 0x67, 0x74, 0x6b, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x2d, 0x61, 0x73, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x33, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x41, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x72, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x70, 0x70, 0x65, 0x72, 0x22, 0x3e, 0x31, 0x30, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3e, 0x35, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x31, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x65, 0x72, 0x61, 0x73, 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3e, 0x2f, 0x69, 0x6f, 0x2f, 0x64, 0x6f, 0x75, 0x67, 0x69, 0x65, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x69, 0x63, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x65, 0x72, 0x61, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x76, 0x67, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3e, 0x2f, 0x69, 0x6f, 0x2f, 0x64, 0x6f, 0x75, 0x67, 0x69, 0x65, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x69, 0x63, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x70, 0x61, 0x6e, 0x2e, 0x73, 0x76, 0x67, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x61, 0x70, 0x70, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x3e, 0x38, 0x30, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0x36, 0x30, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x68, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x72, 0x69, 0x70, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x62, 0x61, 0x72, 0x22, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x61, 0x72, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x4d, 0x69, 0x6e, 0x69, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x75, 0x62, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x55, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x64, 0x20, 0x44, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x47, 0x72, 0x69, 0x64, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x22, 0x3e, 0x31, 0x35, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x72, 0x75, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x50, 0x69, 0x63, 0x6b, 0x20, 0x61, 0x20, 0x62, 0x72, 0x75, 0x73, 0x68, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x22, 0x3e, 0x23, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x31, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x53, 0x70, 0x69, 0x6e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x72, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x42, 0x72, 0x75, 0x73, 0x68, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x62, 0x72, 0x75, 0x73, 0x68, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x61, 0x64, 0x6a, 0x75, 0x73, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3e, 0x31, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x34, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x4d, 0x65, 0x6e, 0x75, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x6e, 0x75, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x22, 0x3e, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x4d, 0x65, 0x6e, 0x75, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x70, 0x6f, 0x70, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x3e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6d, 0x65, 0x6e, 0x75, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x2f, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x65, 0x72, 0x61, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x6f, 0x6c, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x22, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x22, 0x79, 0x65, 0x73, 0x22, 0x3e, 0x45, 0x72, 0x61, 0x73, 0x65, 0x72, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x65, 0x72, 0x61, 0x73, 0x65, 0x72, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x32, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x6e, 0x5f, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3e, 0x70, 0x61, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x33, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x22, 0x3e, 0x30, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x47, 0x74, 0x6b, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x64, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x63, 0x61, 0x6e, 0x5f, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x22, 0x3e, 0x54, 0x72, 0x75, 0x65, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3e, 0x69, 0x6e, 0x3c, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x3e, 0x3c, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x2f, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3e, 0x3c, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3e, 0x3c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x3e, 0x0a, 0x00, 0x00, 0x28, 0x75, 0x75, 0x61, 0x79, 0x29, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x65, 0x72, 0x61, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x76, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x3d, 0x22, 0x6e, 0x6f, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x49, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x29, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x73, 0x76, 0x67, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x64, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x31, 0x2e, 0x31, 0x2f, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x63, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6e, 0x73, 0x23, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x76, 0x67, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x73, 0x76, 0x67, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x73, 0x76, 0x67, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x2f, 0x44, 0x54, 0x44, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x2d, 0x30, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x79, 0x64, 0x70, 0x69, 0x3d, 0x22, 0x39, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x78, 0x64, 0x70, 0x69, 0x3d, 0x22, 0x39, 0x30, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x6a, 0x69, 0x6d, 0x6d, 0x61, 0x63, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x76, 0x73, 0x2f, 0x67, 0x6e, 0x6f, 0x6d, 0x65, 0x2f, 0x67, 0x69, 0x6d, 0x70, 0x2f, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x2f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x63, 0x6b, 0x2d, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x2d, 0x31, 0x36, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x36, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x31, 0x36, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x76, 0x67, 0x31, 0x31, 0x33, 0x30, 0x30, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x30, 0x2e, 0x33, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x30, 0x2e, 0x39, 0x31, 0x2b, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x72, 0x22, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x64, 0x6f, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x67, 0x69, 0x6d, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x2d, 0x65, 0x72, 0x61, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x76, 0x67, 0x22, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x30, 0x22, 0x20, 0x76, 0x69, 0x65, 0x77, 0x42, 0x6f, 0x78, 0x3d, 0x22, 0x30, 0x20, 0x30, 0x20, 0x31, 0x36, 0x20, 0x31, 0x36, 0x22, 0x3e, 0x3c, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x38, 0x2e, 0x36, 0x33, 0x33, 0x35, 0x36, 0x32, 0x38, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x2d, 0x31, 0x2e, 0x39, 0x33, 0x30, 0x36, 0x35, 0x32, 0x34, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x7a, 0x6f, 0x6f, 0x6d, 0x3d, 0x22, 0x32, 0x37, 0x2e, 0x35, 0x35, 0x38, 0x33, 0x38, 0x39, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x37, 0x35, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x34, 0x34, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, 0x22, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x31, 0x37, 0x32, 0x35, 0x34, 0x39, 0x30, 0x32, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x36, 0x36, 0x36, 0x22, 0x20, 0x70, 0x61, 0x67, 0x65, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x62, 0x61, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x68, 0x6f, 0x77, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x78, 0x3d, 0x22, 0x32, 0x34, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x79, 0x3d, 0x22, 0x31, 0x31, 0x34, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x36, 0x70, 0x78, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x31, 0x36, 0x70, 0x78, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x67, 0x72, 0x69, 0x64, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x3d, 0x22, 0x70, 0x78, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x6e, 0x61, 0x70, 0x2d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x67, 0x75, 0x69, 0x64, 0x65, 0x73, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x3e, 0x3c, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x67, 0x72, 0x69, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x78, 0x79, 0x67, 0x72, 0x69, 0x64, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x72, 0x69, 0x64, 0x34, 0x33, 0x37, 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x3e, 0x3c, 0x64, 0x65, 0x66, 0x73, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x64, 0x65, 0x66, 0x73, 0x33, 0x22, 0x2f, 0x3e, 0x3c, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x20, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3d, 0x22, 0x23, 0x65, 0x66, 0x32, 0x39, 0x32, 0x39, 0x22, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x3d, 0x22, 0x23, 0x65, 0x65, 0x65, 0x65, 0x65, 0x63, 0x22, 0x20, 0x70, 0x61, 0x67, 0x65, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x32, 0x35, 0x34, 0x39, 0x30, 0x31, 0x39, 0x36, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x30, 0x2e, 0x30, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, 0x22, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x7a, 0x6f, 0x6f, 0x6d, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x2d, 0x31, 0x34, 0x2e, 0x31, 0x39, 0x38, 0x36, 0x35, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x79, 0x3d, 0x22, 0x2d, 0x35, 0x2e, 0x31, 0x36, 0x36, 0x33, 0x34, 0x35, 0x37, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x22, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x67, 0x72, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x67, 0x72, 0x69, 0x64, 0x2d, 0x62, 0x62, 0x6f, 0x78, 0x3d, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x3d, 0x22, 0x70, 0x78, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x73, 0x68, 0x6f, 0x77, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x38, 0x37, 0x32, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x36, 0x35, 0x39, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x78, 0x3d, 0x22, 0x34, 0x30, 0x33, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x79, 0x3d, 0x22, 0x32, 0x39, 0x36, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x33, 0x32, 0x70, 0x78, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x33, 0x32, 0x70, 0x78, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x37, 0x33, 0x22, 0x2f, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x34, 0x22, 0x3e, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x57, 0x6f, 0x72, 0x6b, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x76, 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x64, 0x63, 0x6d, 0x69, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x4a, 0x61, 0x6b, 0x75, 0x62, 0x20, 0x53, 0x74, 0x65, 0x69, 0x6e, 0x65, 0x72, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3e, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3e, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x6a, 0x69, 0x6d, 0x6d, 0x61, 0x63, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x2e, 0x63, 0x7a, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x62, 0x79, 0x2d, 0x73, 0x61, 0x2f, 0x32, 0x2e, 0x30, 0x2f, 0x22, 0x2f, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x2f, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x57, 0x6f, 0x72, 0x6b, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x62, 0x79, 0x2d, 0x73, 0x61, 0x2f, 0x32, 0x2e, 0x30, 0x2f, 0x22, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x73, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x65, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x63, 0x2f, 0x52, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x73, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x65, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x63, 0x2f, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x65, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x63, 0x2f, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x65, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x63, 0x2f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x73, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x65, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x63, 0x2f, 0x44, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x22, 0x2f, 0x3e, 0x3c, 0x63, 0x63, 0x3a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x65, 0x62, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x63, 0x2f, 0x53, 0x68, 0x61, 0x72, 0x65, 0x41, 0x6c, 0x69, 0x6b, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x3e, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x3c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3e, 0x3c, 0x67, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x3d, 0x22, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x20, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x6d, 0x6f, 0x64, 0x65, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, 0x3e, 0x3c, 0x67, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x34, 0x33, 0x39, 0x36, 0x22, 0x3e, 0x3c, 0x67, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x28, 0x30, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x2c, 0x30, 0x2c, 0x30, 0x2c, 0x30, 0x2e, 0x33, 0x32, 0x2c, 0x30, 0x2e, 0x31, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x2c, 0x2d, 0x33, 0x31, 0x38, 0x2e, 0x32, 0x30, 0x38, 0x29, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x31, 0x2d, 0x37, 0x22, 0x3e, 0x3c, 0x67, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x33, 0x36, 0x38, 0x36, 0x22, 0x3e, 0x3c, 0x67, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x33, 0x36, 0x34, 0x33, 0x22, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3d, 0x22, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x36, 0x35, 0x39, 0x35, 0x62, 0x39, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x33, 0x34, 0x2e, 0x37, 0x37, 0x33, 0x37, 0x36, 0x37, 0x2c, 0x31, 0x30, 0x32, 0x35, 0x2e, 0x35, 0x34, 0x39, 0x32, 0x20, 0x2d, 0x36, 0x2e, 0x33, 0x38, 0x30, 0x32, 0x36, 0x35, 0x2c, 0x2d, 0x39, 0x2e, 0x36, 0x39, 0x31, 0x39, 0x20, 0x2d, 0x31, 0x2e, 0x39, 0x32, 0x35, 0x33, 0x39, 0x31, 0x2c, 0x2d, 0x36, 0x2e, 0x31, 0x35, 0x35, 0x33, 0x20, 0x4c, 0x20, 0x34, 0x31, 0x2c, 0x39, 0x39, 0x34, 0x2e, 0x34, 0x20, 0x6c, 0x20, 0x31, 0x30, 0x2c, 0x31, 0x30, 0x20, 0x2d, 0x35, 0x2c, 0x31, 0x30, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x32, 0x33, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3d, 0x22, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x61, 0x37, 0x38, 0x36, 0x63, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x36, 0x2c, 0x31, 0x30, 0x33, 0x34, 0x2e, 0x34, 0x20, 0x31, 0x30, 0x2c, 0x31, 0x30, 0x20, 0x32, 0x30, 0x2e, 0x34, 0x38, 0x38, 0x35, 0x36, 0x38, 0x2c, 0x2d, 0x32, 0x30, 0x2e, 0x35, 0x33, 0x35, 0x35, 0x20, 0x30, 0x2e, 0x30, 0x33, 0x34, 0x39, 0x2c, 0x2d, 0x32, 0x2e, 0x37, 0x31, 0x33, 0x36, 0x20, 0x4c, 0x20, 0x32, 0x31, 0x2c, 0x31, 0x30, 0x31, 0x34, 0x2e, 0x34, 0x20, 0x6c, 0x20, 0x2d, 0x31, 0x30, 0x2c, 0x31, 0x30, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x31, 0x37, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x65, 0x33, 0x64, 0x62, 0x63, 0x38, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x39, 0x2c, 0x31, 0x30, 0x32, 0x38, 0x2e, 0x34, 0x20, 0x2d, 0x31, 0x2c, 0x32, 0x20, 0x31, 0x30, 0x2c, 0x31, 0x30, 0x20, 0x33, 0x30, 0x2c, 0x2d, 0x33, 0x30, 0x20, 0x31, 0x2c, 0x2d, 0x32, 0x20, 0x2d, 0x31, 0x31, 0x2c, 0x2d, 0x31, 0x31, 0x20, 0x2d, 0x32, 0x37, 0x2c, 0x32, 0x37, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x31, 0x35, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3d, 0x22, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x36, 0x35, 0x39, 0x35, 0x62, 0x39, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x32, 0x39, 0x2e, 0x38, 0x35, 0x36, 0x39, 0x39, 0x32, 0x2c, 0x31, 0x30, 0x32, 0x30, 0x2e, 0x32, 0x35, 0x39, 0x36, 0x20, 0x33, 0x2e, 0x38, 0x33, 0x38, 0x35, 0x35, 0x36, 0x2c, 0x33, 0x2e, 0x35, 0x39, 0x38, 0x39, 0x20, 0x4c, 0x20, 0x34, 0x39, 0x2c, 0x31, 0x30, 0x30, 0x38, 0x2e, 0x34, 0x20, 0x6c, 0x20, 0x32, 0x2c, 0x2d, 0x34, 0x20, 0x2d, 0x31, 0x30, 0x2c, 0x2d, 0x31, 0x30, 0x20, 0x63, 0x20, 0x2d, 0x36, 0x2e, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x2c, 0x36, 0x2e, 0x36, 0x36, 0x36, 0x37, 0x20, 0x2d, 0x31, 0x39, 0x2e, 0x30, 0x32, 0x36, 0x33, 0x35, 0x37, 0x2c, 0x31, 0x38, 0x2e, 0x38, 0x36, 0x34, 0x34, 0x20, 0x2d, 0x31, 0x38, 0x2e, 0x36, 0x30, 0x33, 0x30, 0x33, 0x39, 0x2c, 0x31, 0x38, 0x2e, 0x34, 0x34, 0x31, 0x31, 0x20, 0x37, 0x2e, 0x34, 0x36, 0x30, 0x30, 0x33, 0x31, 0x2c, 0x37, 0x2e, 0x34, 0x31, 0x38, 0x35, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x37, 0x2e, 0x34, 0x36, 0x30, 0x30, 0x33, 0x31, 0x2c, 0x37, 0x2e, 0x34, 0x31, 0x38, 0x35, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x31, 0x31, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x6f, 0x64, 0x65, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3d, 0x22, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x64, 0x61, 0x37, 0x38, 0x36, 0x63, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x39, 0x2c, 0x31, 0x30, 0x32, 0x38, 0x2e, 0x34, 0x20, 0x31, 0x30, 0x2c, 0x31, 0x30, 0x20, 0x31, 0x37, 0x2e, 0x35, 0x32, 0x33, 0x34, 0x36, 0x36, 0x2c, 0x2d, 0x31, 0x37, 0x2e, 0x32, 0x34, 0x39, 0x31, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x35, 0x38, 0x2c, 0x2d, 0x32, 0x2e, 0x32, 0x30, 0x35, 0x39, 0x20, 0x4c, 0x20, 0x32, 0x36, 0x2e, 0x31, 0x36, 0x37, 0x32, 0x36, 0x39, 0x2c, 0x31, 0x30, 0x30, 0x38, 0x2e, 0x39, 0x38, 0x20, 0x31, 0x31, 0x2c, 0x31, 0x30, 0x32, 0x34, 0x2e, 0x34, 0x20, 0x5a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x31, 0x33, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x30, 0x37, 0x38, 0x34, 0x33, 0x31, 0x30, 0x31, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x36, 0x2c, 0x31, 0x30, 0x33, 0x34, 0x2e, 0x34, 0x20, 0x35, 0x2c, 0x2d, 0x31, 0x30, 0x20, 0x31, 0x30, 0x2c, 0x31, 0x30, 0x20, 0x2d, 0x35, 0x2c, 0x31, 0x30, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x31, 0x39, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x30, 0x2e, 0x32, 0x33, 0x35, 0x32, 0x38, 0x39, 0x39, 0x39, 0x22, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x31, 0x36, 0x2c, 0x31, 0x30, 0x34, 0x34, 0x2e, 0x34, 0x20, 0x33, 0x30, 0x2c, 0x2d, 0x33, 0x30, 0x20, 0x35, 0x2c, 0x2d, 0x31, 0x30, 0x20, 0x2d, 0x33, 0x30, 0x2c, 0x33, 0x30, 0x20, 0x7a, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x33, 0x36, 0x32, 0x31, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x34, 0x33, 0x32, 0x36, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x33, 0x35, 0x38, 0x32, 0x32, 0x35, 0x2c, 0x31, 0x35, 0x2e, 0x35, 0x30, 0x34, 0x39, 0x33, 0x33, 0x20, 0x32, 0x2e, 0x39, 0x39, 0x32, 0x38, 0x33, 0x36, 0x39, 0x35, 0x2c, 0x2d, 0x30, 0x2e, 0x30, 0x30, 0x39, 0x39, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x35, 0x35, 0x35, 0x37, 0x35, 0x33, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x72, 0x75, 0x6c, 0x65, 0x3a, 0x65, 0x76, 0x65, 0x6e, 0x6f, 0x64, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x23, 0x35, 0x35, 0x35, 0x37, 0x35, 0x33, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x30, 0x2e, 0x39, 0x39, 0x30, 0x31, 0x32, 0x38, 0x38, 0x32, 0x70, 0x78, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x22, 0x2f, 0x3e, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x34, 0x33, 0x32, 0x38, 0x22, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x37, 0x2e, 0x30, 0x30, 0x31, 0x31, 0x38, 0x35, 0x37, 0x2c, 0x31, 0x35, 0x2e, 0x35, 0x30, 0x39, 0x36, 0x35, 0x31, 0x20, 0x37, 0x2e, 0x39, 0x39, 0x37, 0x36, 0x32, 0x38, 0x33, 0x2c, 0x2d, 0x30, 0x2e, 0x30, 0x31, 0x39, 0x33, 0x32, 0x22, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x66, 0x69, 0x6c, 0x6c, 0x2d, 0x72, 0x75, 0x6c, 0x65, 0x3a, 0x65, 0x76, 0x65, 0x6e, 0x6f, 0x64, 0x64, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x3a, 0x23, 0x35, 0x35, 0x35, 0x37, 0x35, 0x33, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x30, 0x2e, 0x39, 0x38, 0x30, 0x36, 0x39, 0x35, 0x30, 0x31, 0x70, 0x78, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x63, 0x61, 0x70, 0x3a, 0x62, 0x75, 0x74, 0x74, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x6a, 0x6f, 0x69, 0x6e, 0x3a, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x3b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x2d, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a, 0x31, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x2f, 0x67, 0x3e, 0x3c, 0x2f, 0x73, 0x76, 0x67, 0x3e, 0x0a, 0x00, 0x00, 0x28, 0x75, 0x75, 0x61, 0x79, 0x29, 0x69, 0x6f, 0x2f, 0x07, 0x00, 0x00, 0x00, 0x6d, 0x69, 0x6e, 0x69, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x69, 0x63, 0x6f, 0x6e, 0x73, 0x2f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x6f, 0x75, 0x67, 0x69, 0x65, 0x2f, 0x00, 0x04, 0x00, 0x00, 0x00 } }; static GStaticResource static_resource = { miniboard_resource_data.data, sizeof (miniboard_resource_data.data), NULL, NULL, NULL }; extern GResource *miniboard_get_resource (void); GResource *miniboard_get_resource (void) { return g_static_resource_get_resource (&static_resource); } /* If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and destructors, in a sane way, including e.g. on library unload. If not you're on your own. Some compilers need #pragma to handle this, which does not work with macros, so the way you need to use this is (for constructors): #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor) #endif G_DEFINE_CONSTRUCTOR(my_constructor) static void my_constructor(void) { ... } */ #ifndef __GTK_DOC_IGNORE__ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) #define G_HAS_CONSTRUCTORS 1 #define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void); #define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void); #elif defined (_MSC_VER) && (_MSC_VER >= 1500) /* Visual studio 2008 and later has _Pragma */ #define G_HAS_CONSTRUCTORS 1 /* We do some weird things to avoid the constructors being optimized * away on VS2015 if WholeProgramOptimization is enabled. First we * make a reference to the array from the wrapper to make sure its * references. Then we use a pragma to make sure the wrapper function * symbol is always included at the link stage. Also, the symbols * need to be extern (but not dllexport), even though they are not * really used from another object file. */ /* We need to account for differences between the mangling of symbols * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed * with an underscore but symbols on x64 are not. */ #ifdef _WIN64 #define G_MSVC_SYMBOL_PREFIX "" #else #define G_MSVC_SYMBOL_PREFIX "_" #endif #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) #define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX) #define G_MSVC_CTOR(_func,_sym_prefix) \ static void _func(void); \ extern int (* _array ## _func)(void); \ int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \ __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \ __pragma(section(".CRT$XCU",read)) \ __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper; #define G_MSVC_DTOR(_func,_sym_prefix) \ static void _func(void); \ extern int (* _array ## _func)(void); \ int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \ __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \ __pragma(section(".CRT$XCU",read)) \ __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor; #elif defined (_MSC_VER) #define G_HAS_CONSTRUCTORS 1 /* Pre Visual studio 2008 must use #pragma section */ #define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1 #define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1 #define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \ section(".CRT$XCU",read) #define G_DEFINE_CONSTRUCTOR(_func) \ static void _func(void); \ static int _func ## _wrapper(void) { _func(); return 0; } \ __declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper; #define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \ section(".CRT$XCU",read) #define G_DEFINE_DESTRUCTOR(_func) \ static void _func(void); \ static int _func ## _constructor(void) { atexit (_func); return 0; } \ __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor; #elif defined(__SUNPRO_C) /* This is not tested, but i believe it should work, based on: * http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c */ #define G_HAS_CONSTRUCTORS 1 #define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1 #define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1 #define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \ init(_func) #define G_DEFINE_CONSTRUCTOR(_func) \ static void _func(void); #define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \ fini(_func) #define G_DEFINE_DESTRUCTOR(_func) \ static void _func(void); #else /* constructors not supported for this compiler */ #endif #endif /* __GTK_DOC_IGNORE__ */ #ifdef G_HAS_CONSTRUCTORS #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(resource_constructor) #endif G_DEFINE_CONSTRUCTOR(resource_constructor) #ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA #pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(resource_destructor) #endif G_DEFINE_DESTRUCTOR(resource_destructor) #else #warning "Constructor not supported on this compiler, linking in resources will not work" #endif static void resource_constructor (void) { g_static_resource_init (&static_resource); } static void resource_destructor (void) { g_static_resource_fini (&static_resource); }
8f3ebea72909482c1c5ea8beea89881645a5657e
a87e440b16a86f88195d64d4be20c9ee415e188b
/src/bfs/bfs_ls.h
c604192455e639e6126c27d60dcad7c17adbf974
[ "MIT" ]
permissive
chenxuhao/lonestaromp
e91b53f4282787d72a86d8e3692aa1c8292c6d6b
755881ca10df4d64d2782832c04f5fad634adc42
refs/heads/master
2022-04-29T20:42:27.416264
2022-04-03T14:31:48
2022-04-03T14:31:48
67,013,333
6
2
null
null
null
null
UTF-8
C
false
false
1,620
h
bfs_ls.h
#define BFS_VARIANT "topology-base" void initialize(foru *dist, unsigned int nv) { for (int i = 0; i < nv; i++) dist[i] = MYINFINITY; } bool processedge(foru *dist, Graph &graph, unsigned src, unsigned ii, unsigned &dst) { dst = graph.getDestination(src, ii); if (dst >= graph.nnodes) return 0; foru wt = 1; foru altdist = dist[src] + wt; if (altdist < dist[dst]) { #ifndef ENABLE_OPENMP dist[dst] = altdist; return true; #else foru olddist = atomicMin(&dist[dst], altdist); if (altdist < olddist) { return true; } // someone else updated distance to a lower value. #endif } return false; } bool processnode(foru *dist, Graph &graph, unsigned work) { bool changed = false; unsigned neighborsize = graph.getOutDegree(work); for (unsigned i = 0; i < neighborsize; ++ i) { unsigned dst = graph.nnodes; if (processedge(dist, graph, work, i, dst)) changed = true; } return changed; } void drelax(foru *dist, Graph graph, bool *changed) { #pragma omp parallel for for (unsigned i = 0; i < graph.nnodes; ++i) { if (processnode(dist, graph, i)) { *changed = true; } } } void bfs(Graph &graph, foru *dist) { double starttime, endtime; bool changed; int iteration = 0; printf("initializing.\n"); initialize(dist, graph.nnodes); dist[0] = 0; printf("solving.\n"); starttime = rtclock(); do { ++iteration; //printf("Iteration %d\n", iteration); changed = false; drelax(dist, graph, &changed); } while (changed); endtime = rtclock(); printf("\titerations = %d.\n", iteration); printf("\truntime [%s] = %f ms.\n", BFS_VARIANT, 1000 * (endtime - starttime)); }
3789ce5b3315aac444af92ccc571a117cbb818fb
5aecf1b573aed71fc5a2c028b3e02b32fab31d38
/stm8_code/inc/sx_1278.h
2a91bc871906d34cb462481a5eed83d2c705d4e1
[]
no_license
quanhengwen/LOT_light
0943ea6da9ed9efb7709fa841af6761dc43b75e1
14d18d80b16106948489b83180db261f833d1efe
refs/heads/master
2022-04-08T22:17:46.322662
2020-03-24T03:05:20
2020-03-24T03:05:20
null
0
0
null
null
null
null
GB18030
C
false
false
16,578
h
sx_1278.h
#ifndef __SX_1278_H #define __SX_1278_H /* Includes ------------------------------------------------------------------*/ #include "stm8l15x.h" #include "sx_board.h" #define SX_RESET_0 GPIO_WriteBit(GPIOD , GPIO_Pin_4, RESET) #define SX_RESET_1 GPIO_WriteBit(GPIOD , GPIO_Pin_4, SET) #define RF_BUFFER_SIZE 64 #define TX_PACKET_SIZE 64 /*! * SX1278 Internal registers Address */ #define REG_LR_FIFO 0x00 // Common settings #define REG_LR_OPMODE 0x01 #define REG_LR_BANDSETTING 0x04 #define REG_LR_FRFMSB 0x06 #define REG_LR_FRFMID 0x07 #define REG_LR_FRFLSB 0x08 // Tx settings #define REG_LR_PACONFIG 0x09 #define REG_LR_PARAMP 0x0A #define REG_LR_OCP 0x0B // Rx settings #define REG_LR_LNA 0x0C // LoRa registers #define REG_LR_FIFOADDRPTR 0x0D #define REG_LR_FIFOTXBASEADDR 0x0E #define REG_LR_FIFORXBASEADDR 0x0F #define REG_LR_FIFORXCURRENTADDR 0x10 #define REG_LR_IRQFLAGSMASK 0x11 #define REG_LR_IRQFLAGS 0x12 #define REG_LR_NBRXBYTES 0x13 #define REG_LR_RXHEADERCNTVALUEMSB 0x14 #define REG_LR_RXHEADERCNTVALUELSB 0x15 #define REG_LR_RXPACKETCNTVALUEMSB 0x16 #define REG_LR_RXPACKETCNTVALUELSB 0x17 #define REG_LR_MODEMSTAT 0x18 #define REG_LR_PKTSNRVALUE 0x19 #define REG_LR_PKTRSSIVALUE 0x1A #define REG_LR_RSSIVALUE 0x1B #define REG_LR_HOPCHANNEL 0x1C #define REG_LR_MODEMCONFIG1 0x1D #define REG_LR_MODEMCONFIG2 0x1E #define REG_LR_SYMBTIMEOUTLSB 0x1F #define REG_LR_PREAMBLEMSB 0x20 #define REG_LR_PREAMBLELSB 0x21 #define REG_LR_PAYLOADLENGTH 0x22 #define REG_LR_PAYLOADMAXLENGTH 0x23 #define REG_LR_HOPPERIOD 0x24 #define REG_LR_FIFORXBYTEADDR 0x25 #define REG_LR_MODEMCONFIG3 0x26 // end of documented register in datasheet // I/O settings #define REG_LR_DIOMAPPING1 0x40 #define REG_LR_DIOMAPPING2 0x41 // Version #define REG_LR_VERSION 0x42 // Additional settings #define REG_LR_PLLHOP 0x44 #define REG_LR_TCXO 0x4B #define REG_LR_PADAC 0x4D #define REG_LR_FORMERTEMP 0x5B #define REG_LR_BITRATEFRAC 0x5D #define REG_LR_AGCREF 0x61 #define REG_LR_AGCTHRESH1 0x62 #define REG_LR_AGCTHRESH2 0x63 #define REG_LR_AGCTHRESH3 0x64 /*! * SX1278 LoRa bit control definition */ /*! * SX1278 LoRa bit control definition */ /*! * RegFifo */ /*! * RegOpMode */ #define RFLR_OPMODE_LONGRANGEMODE_MASK 0x7F #define RFLR_OPMODE_LONGRANGEMODE_OFF 0x00 // Default #define RFLR_OPMODE_LONGRANGEMODE_ON 0x80 #define RFLR_OPMODE_ACCESSSHAREDREG_MASK 0xBF #define RFLR_OPMODE_ACCESSSHAREDREG_ENABLE 0x40 #define RFLR_OPMODE_ACCESSSHAREDREG_DISABLE 0x00 // Default #define RFLR_OPMODE_FREQMODE_ACCESS_MASK 0xF7 #define RFLR_OPMODE_FREQMODE_ACCESS_LF 0x08 // Default #define RFLR_OPMODE_FREQMODE_ACCESS_HF 0x00 #define RFLR_OPMODE_MASK 0xF8 #define RFLR_OPMODE_SLEEP 0x00 #define RFLR_OPMODE_STANDBY 0x01 // Default #define RFLR_OPMODE_SYNTHESIZER_TX 0x02 #define RFLR_OPMODE_TRANSMITTER 0x03 #define RFLR_OPMODE_SYNTHESIZER_RX 0x04 #define RFLR_OPMODE_RECEIVER 0x05 // LoRa specific modes #define RFLR_OPMODE_RECEIVER_SINGLE 0x06 #define RFLR_OPMODE_CAD 0x07 /*! * RegBandSetting */ #define RFLR_BANDSETTING_MASK 0x3F #define RFLR_BANDSETTING_AUTO 0x00 // Default #define RFLR_BANDSETTING_DIV_BY_1 0x40 #define RFLR_BANDSETTING_DIV_BY_2 0x80 #define RFLR_BANDSETTING_DIV_BY_6 0xC0 /*! * RegFrf (MHz) SX1278 频率只能在137MHz-525MHz 本次应用模块在 415-525MHz 计算方式, 应用的频率 = (32*10^6)*0X(MSB-MID-LSB)/(2^19) python: print('{0:X}'.format(int((435/32)*(2**19)))) */ #define RFLR_FRFMSB_434_MHZ 0x6C // Default #define RFLR_FRFMID_434_MHZ 0x80 // Default #define RFLR_FRFLSB_434_MHZ 0x00 // Default #define RFLR_FRFMSB_435_MHZ 0x6C // Default #define RFLR_FRFMID_435_MHZ 0xC0 // Default #define RFLR_FRFLSB_435_MHZ 0x00 // Default /*! * RegPaConfig */ #define RFLR_PACONFIG_PASELECT_MASK 0x7F #define RFLR_PACONFIG_PASELECT_PABOOST 0x80 #define RFLR_PACONFIG_PASELECT_RFO 0x00 // Default #define RFLR_PACONFIG_MAX_POWER_MASK 0x8F #define RFLR_HOPCHANNEL_PAYLOAD_CRC16_ON 0x40 #define RFLR_PACONFIG_OUTPUTPOWER_MASK 0xF0 /*! * RegPaRamp */ #define RFLR_PARAMP_TXBANDFORCE_MASK 0xEF #define RFLR_PARAMP_TXBANDFORCE_BAND_SEL 0x10 #define RFLR_PARAMP_TXBANDFORCE_AUTO 0x00 // Default #define RFLR_PARAMP_MASK 0xF0 #define RFLR_PARAMP_3400_US 0x00 #define RFLR_PARAMP_2000_US 0x01 #define RFLR_PARAMP_1000_US 0x02 #define RFLR_PARAMP_0500_US 0x03 #define RFLR_PARAMP_0250_US 0x04 #define RFLR_PARAMP_0125_US 0x05 #define RFLR_PARAMP_0100_US 0x06 #define RFLR_PARAMP_0062_US 0x07 #define RFLR_PARAMP_0050_US 0x08 #define RFLR_PARAMP_0040_US 0x09 // Default #define RFLR_PARAMP_0031_US 0x0A #define RFLR_PARAMP_0025_US 0x0B #define RFLR_PARAMP_0020_US 0x0C #define RFLR_PARAMP_0015_US 0x0D #define RFLR_PARAMP_0012_US 0x0E #define RFLR_PARAMP_0010_US 0x0F /*! * RegOcp */ #define RFLR_OCP_MASK 0xDF #define RFLR_OCP_ON 0x20 // Default #define RFLR_OCP_OFF 0x00 #define RFLR_OCP_TRIM_MASK 0xE0 #define RFLR_OCP_TRIM_045_MA 0x00 #define RFLR_OCP_TRIM_050_MA 0x01 #define RFLR_OCP_TRIM_055_MA 0x02 #define RFLR_OCP_TRIM_060_MA 0x03 #define RFLR_OCP_TRIM_065_MA 0x04 #define RFLR_OCP_TRIM_070_MA 0x05 #define RFLR_OCP_TRIM_075_MA 0x06 #define RFLR_OCP_TRIM_080_MA 0x07 #define RFLR_OCP_TRIM_085_MA 0x08 #define RFLR_OCP_TRIM_090_MA 0x09 #define RFLR_OCP_TRIM_095_MA 0x0A #define RFLR_OCP_TRIM_100_MA 0x0B // Default #define RFLR_OCP_TRIM_105_MA 0x0C #define RFLR_OCP_TRIM_110_MA 0x0D #define RFLR_OCP_TRIM_115_MA 0x0E #define RFLR_OCP_TRIM_120_MA 0x0F #define RFLR_OCP_TRIM_130_MA 0x10 #define RFLR_OCP_TRIM_140_MA 0x11 #define RFLR_OCP_TRIM_150_MA 0x12 #define RFLR_OCP_TRIM_160_MA 0x13 #define RFLR_OCP_TRIM_170_MA 0x14 #define RFLR_OCP_TRIM_180_MA 0x15 #define RFLR_OCP_TRIM_190_MA 0x16 #define RFLR_OCP_TRIM_200_MA 0x17 #define RFLR_OCP_TRIM_210_MA 0x18 #define RFLR_OCP_TRIM_220_MA 0x19 #define RFLR_OCP_TRIM_230_MA 0x1A #define RFLR_OCP_TRIM_240_MA 0x1B /*! * RegLna */ #define RFLR_LNA_GAIN_MASK 0x1F #define RFLR_LNA_GAIN_G1 0x20 // Default #define RFLR_LNA_GAIN_G2 0x40 #define RFLR_LNA_GAIN_G3 0x60 #define RFLR_LNA_GAIN_G4 0x80 #define RFLR_LNA_GAIN_G5 0xA0 #define RFLR_LNA_GAIN_G6 0xC0 #define RFLR_LNA_BOOST_LF_MASK 0xE7 #define RFLR_LNA_BOOST_LF_DEFAULT 0x00 // Default #define RFLR_LNA_BOOST_LF_GAIN 0x08 #define RFLR_LNA_BOOST_LF_IP3 0x10 #define RFLR_LNA_BOOST_LF_BOOST 0x18 #define RFLR_LNA_RXBANDFORCE_MASK 0xFB #define RFLR_LNA_RXBANDFORCE_BAND_SEL 0x04 #define RFLR_LNA_RXBANDFORCE_AUTO 0x00 // Default #define RFLR_LNA_BOOST_HF_MASK 0xFC #define RFLR_LNA_BOOST_HF_OFF 0x00 // Default #define RFLR_LNA_BOOST_HF_ON 0x03 /*! * RegFifoAddrPtr */ #define RFLR_FIFOADDRPTR 0x00 // Default /*! * RegFifoTxBaseAddr */ #define RFLR_FIFOTXBASEADDR 0x80 // Default /*! * RegFifoTxBaseAddr */ #define RFLR_FIFORXBASEADDR 0x00 // Default /*! * RegFifoRxCurrentAddr (Read Only) */ /*! * RegIrqFlagsMask */ #define RFLR_IRQFLAGS_RXTIMEOUT_MASK 0x80 #define RFLR_IRQFLAGS_RXDONE_MASK 0x40 #define RFLR_IRQFLAGS_PAYLOADCRCERROR_MASK 0x20 #define RFLR_IRQFLAGS_VALIDHEADER_MASK 0x10 #define RFLR_IRQFLAGS_TXDONE_MASK 0x08 #define RFLR_IRQFLAGS_CADDONE_MASK 0x04 #define RFLR_IRQFLAGS_FHSSCHANGEDCHANNEL_MASK 0x02 #define RFLR_IRQFLAGS_CADDETECTED_MASK 0x01 /*! * RFLR_MODECONFIG_Mask */ #define RFLR_MODEMCONFIG2_SF_MASK 0x0F #define RFLR_MODEMCONFIG1_CODINGRATE_MASK 0xF1 #define RFLR_MODEMCONFIG2_RXPAYLOADCRC_MASK 0xFB #define RFLR_MODEMCONFIG1_BW_MASK 0x0F #define RFLR_MODEMCONFIG1_IMPLICITHEADER_MASK 0xFE #define RFLR_MODEMCONFIG2_SYMBTIMEOUTMSB_MASK 0xFC #define RFLR_MODEMCONFIG3_MOBILE_NODE_MASK 0xF7 /*! * RegIrqFlags */ #define RFLR_IRQFLAGS_RXTIMEOUT 0x80 #define RFLR_IRQFLAGS_RXDONE 0x40 #define RFLR_IRQFLAGS_PAYLOADCRCERROR 0x20 #define RFLR_IRQFLAGS_VALIDHEADER 0x10 #define RFLR_IRQFLAGS_TXDONE 0x08 #define RFLR_IRQFLAGS_CADDONE 0x04 #define RFLR_IRQFLAGS_FHSSCHANGEDCHANNEL 0x02 #define RFLR_IRQFLAGS_CADDETECTED 0x01 /*! * RF state machine */ #define RF_IDLE 0 #define RF_BUSY 1 #define RF_RX_DONE 2 #define RF_RX_TIMEOUT 3 #define RF_RX_ID_ERROR 4 #define RF_TX_DONE 5 #define RF_TX_TIMEOUT 6 #define RF_LEN_ERROR 7 #define RF_CHANNEL_EMPTY 8 #define RF_CHANNEL_ACTIVITY_DETECTED 9 //LoRa //#define RFLR_STATE_IDLE 0 //#define RFLR_STATE_RX_INIT 1 //#define RFLR_STATE_RX_RUNNING 2 //#define RFLR_STATE_RX_DONE 3 //#define RFLR_STATE_RX_TIMEOUT 4 //#define RFLR_STATE_TX_INIT 5 //#define RFLR_STATE_TX_RUNNING 6 //#define RFLR_STATE_TX_DONE 7 //#define RFLR_STATE_TX_TIMEOUT 8 //#define RFLR_STATE_CAD_INIT 9 //#define RFLR_STATE_CAD_RUNNING 10 // typedef struct{ //RFFrequency 没有定义,原因是计算复杂,可在函数中查询计算方式 uint8_t lastRxPacketSize; //表示上一次接收的数据长度 uint8_t Power; uint8_t SignalBw; // LORA [0: 7.8 kHz, 1: 10.4 kHz, 2: 15.6 kHz, 3: 20.8 kHz, 4: 31.2 kHz, // 5: 41.6 kHz, 6: 62.5 kHz, 7: 125 kHz, 8: 250 kHz, 9: 500 kHz, other: Reserved] uint8_t SpreadingFactor; // LORA [6: 64, 7: 128, 8: 256, 9: 512, 10: 1024, 11: 2048, 12: 4096 chips] uint8_t ErrorCoding; // LORA [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8] _Bool CrcOn; // [0: OFF, 1: ON] _Bool ImplicitHeaderOn; // [0: OFF, 1: ON] _Bool RxSingleOn; // [0: Continuous, 1 Single] _Bool FreqHopOn; // [0: OFF, 1: ON] uint8_t HopPeriod; // Hops every frequency hopping period symbols uint32_t TxPacketTimeout; uint32_t RxPacketTimeout; uint8_t PayloadLength; }STRU_LoRaSettings; typedef union{ _Bool LoRaOn: 1; _Bool LoRaOnStete: 1; _Bool bit2: 1; _Bool bit3: 1; _Bool bit4:1; _Bool bit5:1; _Bool bit6:1; _Bool bit7:1; }U_BIT_sxb; typedef struct{ uint8_t RegOpMode; // 0x01 uint8_t RegPaRamp; // 0x0A uint8_t RegLna; // 0x0C uint8_t RegFifoAddrPtr; // 0x0D uint8_t RegFifoTxBaseAddr; // 0x0E uint8_t RegFifoRxBaseAddr; // 0x0F uint8_t RegFifoRxCurrentAddr; // 0x10 uint8_t RegIrqFlagsMask; // 0x11 uint8_t RegIrqFlags; // 0x12 uint8_t RegNbRxBytes; // 0x13 uint8_t RegHopChannel; // 0x1C uint8_t RegModemConfig1; // 0x1D uint8_t RegModemConfig2; // 0x1E uint8_t RegPayloadLength; // 0x22 }STRU_SX1278LR; typedef enum { RFLR_STATE_IDLE, RFLR_STATE_RX_INIT, RFLR_STATE_RX_RUNNING, RFLR_STATE_RX_DONE, RFLR_STATE_RX_TIMEOUT, RFLR_STATE_TX_INIT, RFLR_STATE_TX_RUNNING, RFLR_STATE_TX_DONE, RFLR_STATE_TX_TIMEOUT, RFLR_STATE_CAD_INIT, RFLR_STATE_CAD_RUNNING }tRFLRStates; extern STRU_LoRaSettings LoRaSettings; extern uint8_t temp_RFLRState; void SX1278Reset( void ); _Bool SX1278Init( void ); void SX1278LoRaSetOpMode( uint8_t opMode ); void SX1278GetNeedReg(void); void SX1278SetLoRaOn(void); uint8_t SX1278LoRaGetOpMode( void ); uint8_t SX1278LoRaReadRxGain( void ); void SX1278LoRaStartRx( void ); void SX1278LoRaSetTxPacket( const void *buffer, uint8_t size ); void SX1278LoRaGetRxPacket( void *buffer, uint8_t *size ); void SX1278LoRaSetErrorCoding( uint8_t value ); void SX1278LoRaSetSignalBandwidth( uint8_t bw ); void SX1278LoRaSetRFPower( uint8_t power ); void SX1278LoRaSetNbTrigPeaks( uint8_t value ); void SX1278LoRaSetSpreadingFactor( uint8_t factor ); void SX1278LoRaProcess( void ); #endif /************************end **************************************************/
a7e3fed6bdfdc995a16cd8b4a63077a238722f3a
51f229cfeb1bdd067f59cc58d9e2258bf329d265
/moara/moara.c
541066ebdc440aa015ed6cad3eb38c83cf721df5
[]
no_license
rocksipintican/Mill-3D-OpenGl
501ffc2288627a90774837567cf21fdff7ea3e84
9550a80bd13ed912652ee12fc1d74af8c7da1ae3
refs/heads/master
2020-04-18T00:27:46.402019
2019-01-22T23:17:28
2019-01-22T23:17:28
167,078,450
0
0
null
null
null
null
WINDOWS-1250
C
false
false
12,357
c
moara.c
/* Programul afiseaza un patrat pe care il translateaza pe axa x la apasarea sagetilor stanga, dreapta */ #include "glos.h" #include <GL/gl.h> #include <GL/glu.h> #include <GL/glaux.h> #include <math.h> void myinit(void); void CALLBACK display(void); void CALLBACK myReshape(GLsizei w, GLsizei h); void CALLBACK MutaStanga(void); void CALLBACK RotireDreapta(AUX_EVENTREC *event); void CALLBACK RotireStanga(AUX_EVENTREC *event); static GLUquadricObj *q; static GLfloat x=0; static GLfloat y = 0,z=0,alfa = 0; static int beta=0 ,gama=0; static GLfloat pozSursa[] = { 60.0, 200.0, -50.0, 1.0 }; void calcCoeficientiPlan(float P[3][3], float coef[4]) { float v1[3], v2[3]; float length; static const int x = 0; static const int y = 1; static const int z = 2; //calculeaza doi vectori din trei puncte v1[x] = P[0][x] - P[1][x]; v1[y] = P[0][y] - P[1][y]; v1[z] = P[0][z] - P[1][z]; v2[x] = P[1][x] - P[2][x]; v2[y] = P[1][y] - P[2][y]; v2[z] = P[1][z] - P[2][z]; /*se calculeaza produsul vectorial al celor doi vectori care reprezinta un al treilea vector perpendicular pe plan ale carui componente sunt chiar coeficienti A, B, C din ecuatia planului */ coef[x] = v1[y] * v2[z] - v1[z] * v2[y]; coef[y] = v1[z] * v2[x] - v1[x] * v2[z]; coef[z] = v1[x] * v2[y] - v1[y] * v2[x]; //normalizeaza vectorul length = (float)sqrt((coef[x] * coef[x]) + (coef[y] * coef[y]) + (coef[z] * coef[z])); coef[x] /= length; coef[y] /= length; coef[z] /= length; } void MatriceUmbra(GLfloat puncte[3][3], GLfloat pozSursa[4], GLfloat mat[4][4]) { GLfloat coefPlan[4]; GLfloat temp; //determina coeficientii planului calcCoeficientiPlan(puncte, coefPlan); //determina si pe D coefPlan[3] = -((coefPlan[0] * puncte[2][0]) + (coefPlan[1] * puncte[2][1]) + (coefPlan[2] * puncte[2][2])); //temp=A*xL+B*yL+C*zL+D*w temp = coefPlan[0] * pozSursa[0] + coefPlan[1] * pozSursa[1] + coefPlan[2] * pozSursa[2] + coefPlan[3] * pozSursa[3]; //prima coloana mat[0][0] = temp - pozSursa[0] * coefPlan[0]; mat[1][0] = 0.0f - pozSursa[0] * coefPlan[1]; mat[2][0] = 0.0f - pozSursa[0] * coefPlan[2]; mat[3][0] = 0.0f - pozSursa[0] * coefPlan[3]; //a doua coloana mat[0][1] = 0.0f - pozSursa[1] * coefPlan[0]; mat[1][1] = temp - pozSursa[1] * coefPlan[1]; mat[2][1] = 0.0f - pozSursa[1] * coefPlan[2]; mat[3][1] = 0.0f - pozSursa[1] * coefPlan[3]; //a treia coloana mat[0][2] = 0.0f - pozSursa[2] * coefPlan[0]; mat[1][2] = 0.0f - pozSursa[2] * coefPlan[1]; mat[2][2] = temp - pozSursa[2] * coefPlan[2]; mat[3][2] = 0.0f - pozSursa[2] * coefPlan[3]; //a patra coloana mat[0][3] = 0.0f - pozSursa[3] * coefPlan[0]; mat[1][3] = 0.0f - pozSursa[3] * coefPlan[1]; mat[2][3] = 0.0f - pozSursa[3] * coefPlan[2]; mat[3][3] = temp - pozSursa[3] * coefPlan[3]; } void myinit (void) { glClearColor(0.0f, 0.4f, 1.0f, 1.0f); glEnable(GL_MAP2_VERTEX_3); //se valideaza un anumit tip de evaluare //glShadeModel(GL_SMOOTH); //umbrire constanta pe poligoane glLineStipple(1, 0x0F0F); GLfloat light_position[] = { 10.0f, 10.0f, 0.0f, 0.1f}; glLightfv(GL_LIGHT0, GL_POSITION, pozSursa); //glLightModelfv(GL_LIGHT_MODEL_AMBIENT, global_ambient); //GLfloat light_diffuse[] = { 0.75, 0.75, 0.75, 10.0 }; // GLfloat ambient[] = { 0.4f, 0.4f, 0.4f, 1.0f }; GLfloat mat_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; GLfloat mat_shininess[] = { 128.0f }; //glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); // glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); glLightfv(GL_LIGHT0, GL_POSITION, pozSursa); //seteaza materialul //glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); glFrontFace(GL_CW);//orientarea implicit[ a vârfurilor în sensul rotirii acelor glEnable(GL_LIGHTING); //activare iluminare glEnable(GL_LIGHT0); //activare sursa 0 glEnable(GL_AUTO_NORMAL); //activare calculare normale daca vârfurile //s-au determinat cu GL_MAP2_VERTEX_3 sau GL_MAP2_VERTEX_4 glEnable(GL_NORMALIZE); //activare normalizare (vectori unitari) vectori glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); //activare test adâncime //glEnable(GL_CULL_FACE); //glCullFace(GL_FRONT); glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT, GL_DIFFUSE); glMapGrid2f(20, 0.0, 1.0, 20, 0.0, 1.0); } void CALLBACK MutaStanga(void) { x=x-10; } void CALLBACK MutaDreapta(void) { x=x+10; } void CALLBACK RotireStanga(AUX_EVENTREC *event) { alfa = alfa + 10; } void CALLBACK RotireDreapta(AUX_EVENTREC *event) { alfa = alfa - 10; } void CALLBACK RotireInFata(void) { gama = gama - 15; } void CALLBACK RotireInSpate(void) { gama = gama + 15; } void CALLBACK plan() { glTranslatef(x, y-30, z); glColor3f(0.0f, 0.7f, 0.0f); glRotatef(gama, 1, 0, 0); glBegin(GL_QUAD_STRIP); glVertex3f(-300.0f, -150.0f, 200.0f); glVertex3f(-300.0f, -160.0f, 200.0f); glVertex3f(300.0f, -150.0f, 200.0f); glVertex3f(300.0f, -160.0f, 200.0f); glVertex3f(300.0f, -150.0f, -200.0f); glVertex3f(300.0f, -160.0f, -200.0f); glVertex3f(-300.0f, -150.0f, -200.0f); glVertex3f(-300.0f, -160.0f, -200.0f); glVertex3f(-300.0f, -150.0f, 200.0f); glVertex3f(-300.0f, -160.0f, 200.0f); glEnd(); glColor3f(0.0f, 1.0f, 0.0f); glBegin(GL_QUADS); glVertex3f(-300.0f, -150.0f, 200.0f); glVertex3f(300.0f, -150.0f, 200.0f); glVertex3f(300.0f, -150.0f, -200.0f); glVertex3f(-300.0f, -150.0f, -200.0f); glEnd(); glColor3f(0.0f, 1.0f, 0.0f); glBegin(GL_QUADS); glVertex3f(-300.0f, -160.0f, -200.0f); glVertex3f(300.0f, -160.0f, -200.0f); glVertex3f(300.0f, -160.0f, 200.0f); glVertex3f(-300.0f, -160.0f, 200.0f); glEnd(); /*glBegin(GL_QUADS); glVertex3f(500.0f, -165.0f, -500.0f); glVertex3f(-500.0f, -165.0f, -500.0f); glVertex3f(-500.0f, -165.0f, 500.0f); glVertex3f(500.0f, -165.0f, 500.0f); glEnd();*/ } void CALLBACK all(void) { GLfloat matUmbra[4][4]; //oricare trei puncte din plan in sens CCW GLfloat puncte[3][3] = { { -50.0f,-164.0f,-50.0f }, { -50.0f,-164.0f,50.0f },{ 50.0f,-164.0f,50.0f } }; //sterge bufferul de culoare si de adancime glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //determina matricea pentru calcularea umbrei MatriceUmbra(puncte, pozSursa, matUmbra); //salveaza starea matricei de modelare-vizualizare si se reprezinta cubul rotit glPushMatrix(); glLightfv(GL_LIGHT0, GL_POSITION, pozSursa); //corp moara q = gluNewQuadric(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluQuadricDrawStyle(q, GLU_FILL); glRotatef(alfa, 0, 1, 0); glRotatef(gama, 1, 0, 0); //glPushMatrix(); //corpul moarei glPushMatrix(); glColor3f(0.8f, 0.8f, 0.8f); glTranslatef(x + 10, y + 10, z + 50); glRotatef(90, 1, 0, 0); // axa x pe orizontala, axa z pe verticala si axa y spre mine gluCylinder(q, 35, 60, 190, 8, 10); glPopMatrix(); glPushMatrix(); //acoperisul moarei glColor3f(0.5f, 0.5f, 0.0f); glTranslatef(x + 10, y + 60, z + 50); glRotatef(90, 1, 0, 0); //glRotatef(alfa, 0, 0, 1); gluCylinder(q, 3, 50, 50, 100, 10); glColor3f(0.0f, 0.0f, 0.0f); glTranslatef(x, y + 55, z + 20); glRotatef(90, 1, 0, 0); glRotatef((beta % 360) + 40, 0, 0, 1); gluDisk(q, 5, 8, 200, 3); glPushMatrix(); glColor3f(0.3f, 0.0f, 0.0f); glTranslatef(x, y, z - 5); //glRotatef(alfa, 0, 0, 1 ); gluCylinder(q, 5, 5, 50, 1000, 50); glPopMatrix(); //palete glPushMatrix(); glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(x + 5, y, z); glRotatef(90, 0, 1, 0); glRotatef(15, 0, 0, 1); //glRotatef(alfa, 0, 0, 1 ); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); glPushMatrix(); glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(x - 5, y, z); glRotatef(-90, 0, 1, 0); glRotatef(15, 0, 0, 1); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); glPushMatrix(); glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(x, y - 5, z); glRotatef(90, 1, 0, 0); glRotatef(105, 0, 0, 1); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); glPushMatrix(); glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(x, y + 5, z); glRotatef(-90, 1, 0, 0); glRotatef(105, 0, 0, 1); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); //glPopMatrix(); glPopMatrix();//reface matricea //deseneaza umbra //mai intai de dezactiveaza iluminarea si se salveaza starea matricei de proiectie glPushAttrib(GL_LIGHTING_BIT); glDisable(GL_LIGHTING); glPushMatrix(); //se inmulteste matricea curenta de modelare-vizualizare cu maricea de umbrire glMultMatrixf((GLfloat*)matUmbra); //se deseneaza cubul proiectat pe plan-adica umbra cubului cu gri glColor3f(0.7f, 0.7f, 0.7f); //------------//umbra moara//--------------// //corpul moarei glPushMatrix(); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x + 10, y + 10, z + 50); glRotatef(90, 1, 0, 0); // axa x pe orizontala, axa z pe verticala si axa y spre mine gluCylinder(q, 35, 60, 190, 8, 10); glPopMatrix(); glPushMatrix(); //acoperisul moarei glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x + 10, y + 60, z + 50); glRotatef(90, 1, 0, 0); //glRotatef(alfa, 0, 0, 1); gluCylinder(q, 3, 50, 50, 100, 10); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x, y + 55, z + 20); glRotatef(90, 1, 0, 0); glRotatef((beta % 360) + 40, 0, 0, 1); gluDisk(q, 5, 8, 200, 3); glPushMatrix(); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x, y, z - 5); //glRotatef(alfa, 0, 0, 1 ); gluCylinder(q, 5, 5, 50, 1000, 50); glPopMatrix(); //palete glPushMatrix(); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x + 5, y, z); glRotatef(90, 0, 1, 0); glRotatef(15, 0, 0, 1); glRotatef(alfa, 0, 0, 1 ); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); glPushMatrix(); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x - 5, y, z); glRotatef(-90, 0, 1, 0); glRotatef(15, 0, 0, 1); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); glPushMatrix(); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x, y - 5, z); glRotatef(90, 1, 0, 0); glRotatef(105, 0, 0, 1); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); glPushMatrix(); glColor3f(0.2f, 0.2f, 0.2f); glTranslatef(x, y + 5, z); glRotatef(-90, 1, 0, 0); glRotatef(105, 0, 0, 1); gluCylinder(q, 5, 30, 100, 2, 5); glPopMatrix(); gluDeleteQuadric(q); glPopMatrix(); glPopMatrix();//reface matricea de proiectie //deseneaza sursa de lumina ca o sfera mica galbena in pozitia reala glPushMatrix(); glTranslatef(pozSursa[0], pozSursa[1], pozSursa[2]); glColor3f(1.0f, 1.0f, 0.0f); auxSolidSphere(10); glPopMatrix(); //restaureaza starea variabilelor de iluminare glPopAttrib(); glFlush(); } void CALLBACK display (void) { q = gluNewQuadric(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluQuadricDrawStyle(q, GLU_LINE); glRotatef(alfa, 0, 1, 0); GLfloat more_ambient[] = { 0.4f, 0.4f, 0.4f, 1.0f }; all(); glPushMatrix(); glColor3f(0.0f, 1.0f, 0.0f); plan(); glPopMatrix(); glMaterialfv(GL_FRONT, GL_AMBIENT, more_ambient); glFlush(); } void CALLBACK IdleFunction(void) { beta += 5; display(); Sleep(100); } /*void CALLBACK myReshape(GLsizei w, GLsizei h) { if (!h) return; //transformare anizotropica, forma se modifica functie de forma(dimens) viewportului glViewport(0, 0, w, h); //daca w>h stabilim ca baza inaltime, si stab unit logica de dimens in fct de h(h/320, 320 lungime lat patrat) glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho (-160.0, 160.0, -160.0, 160.0, -10.0, 10.0); glMatrixMode(GL_MODELVIEW); }*/ void CALLBACK myReshape(GLsizei w, GLsizei h) { if (!h) return; glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); if (w <= h) glOrtho (-250.0, 250.0, 250.0*(GLfloat)h/(GLfloat)w, -250.0*(GLfloat)h/(GLfloat)w, -350.0, 350.0); else glOrtho (-250.0*(GLfloat)w/(GLfloat)h, 250.0*(GLfloat)w/(GLfloat)h, -250.0, 250.0, -350.0, 350.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glRotatef(-30.0,-1.0,1.0,1.0); } int main(int argc, char** argv) { auxInitDisplayMode(AUX_SINGLE | AUX_RGB | AUX_DEPTH16); auxInitPosition (0, 0, 1200, 700); auxInitWindow ("Moara ce-si invarte paletele"); myinit (); auxKeyFunc (AUX_DOWN, RotireInFata); auxKeyFunc (AUX_UP, RotireInSpate); auxMouseFunc(AUX_LEFTBUTTON, AUX_MOUSEDOWN, RotireStanga); auxMouseFunc(AUX_RIGHTBUTTON, AUX_MOUSEDOWN, RotireDreapta); auxIdleFunc(IdleFunction); auxReshapeFunc (myReshape); auxMainLoop(display); return(0); }
98c78bbbf4ad5fe59560ee58b7dbc1850e602b39
7b5b4df807c0baa2efab59200038a981274b7e48
/src/main.c
d64bcfdc52b18276e12426d0023148fa65dcdc11
[]
no_license
blakelockley/glfw-template
978991f92a2d169bc8fb6d5859b64c53f53d72f1
41ff31e115e8b05782d6902a6f02248b56ec5fbd
refs/heads/master
2023-07-28T19:12:10.577284
2021-09-16T11:53:27
2021-09-16T11:53:27
185,585,247
0
0
null
2019-05-11T06:41:03
2019-05-08T10:34:22
C
UTF-8
C
false
false
2,844
c
main.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "glfw.h" #include "linmath.h" #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #define ENGINE_INCLUDES #include "shader.h" GLFWwindow *window; void init(); void deinit(); int main() { init(); char title[16]; double time_elapsed = 0, last_second = 0; int frames = 0; int shader = load_shader("shaders/vertex.glsl", "shaders/fragment.glsl"); glUseProgram(shader); while (!glfwWindowShouldClose(window)) { double current_time = glfwGetTime(); double delta = current_time - time_elapsed; time_elapsed = current_time; frames++; if (current_time - last_second > 1.0) { double fps = frames / (current_time - last_second); sprintf(title, "FPS: %.2f", fps); glfwSetWindowTitle(window, title); frames = 0; last_second = current_time; } int width, height; glfwGetFramebufferSize(window, &width, &height); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); mat4x4 view, projection; mat4x4_look_at(view, (vec3){0, 2, 5}, (vec3){0, 0, 0}, (vec3){0, 1, 0}); mat4x4_perspective(projection, 45.0f, (float)width / (float)height, 0.1f, 100.0f); GLint view_loc = glGetUniformLocation(shader, "view"); glUniformMatrix4fv(view_loc, 1, GL_FALSE, (float *)view); GLint projection_loc = glGetUniformLocation(shader, "projection"); glUniformMatrix4fv(projection_loc, 1, GL_FALSE, (float *)projection); // Render... glfwSwapBuffers(window); glfwPollEvents(); } deinit(); return EXIT_SUCCESS; } void error_callback(int error, const char *description) { fprintf(stderr, "Error: %s\n", description); } void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GLFW_TRUE); } void init() { glfwSetErrorCallback(error_callback); if (!glfwInit()) exit(EXIT_FAILURE); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); window = glfwCreateWindow(800, 600, "GLFW Window", NULL, NULL); if (!window) { glfwTerminate(); exit(EXIT_FAILURE); } glfwMakeContextCurrent(window); glfwSwapInterval(1); glfwSetKeyCallback(window, key_callback); // OpenGL setup glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } void deinit() { glfwDestroyWindow(window); glfwTerminate(); }
9575ea27e0037ab1de1ca76700f6e25b79073773
8d99644eb5b0b6b51e1c8f66448bbaa9f846445e
/coder/SystemYPL.h
fce36ccba5a49d841748e9574492dbf2c380038f
[]
no_license
Paulliam/visualSTATE_learningTest
7432babb095ccea1dbceceba09c633df3f018d95
2c225ae177226f75e2cc62082d5aeaf12c511bda
refs/heads/master
2022-06-30T14:47:13.532516
2020-05-11T06:08:55
2020-05-11T06:08:55
262,954,028
0
0
null
null
null
null
UTF-8
C
false
false
1,725
h
SystemYPL.h
/***************************************************************************** * IAR Visual State Coder Generated Header File * Generated by IAR Visual State 9.1.1.3863 * IAR Visual State Project File: <E:\work_ypl\1_WirelessSwitchboard\3sourcecode\visualSTATE\WorkspaceYPL.vsp> * IAR Visual State Signature Generator: "81" * Project Signature: "530ebf83d602e055941637a4b7ff4aa8" *****************************************************************************/ #ifndef SYSTEMYPL_H #define SYSTEMYPL_H /** @file System header file. Contains macros and declarations for a system. */ /* *** include directives *** */ #include "WorkspaceYPL.h" /* *** type definitions *** */ /* External variable compound types */ typedef struct VSExtVarType_SystemYPL { VS_UCHAR _x; } VSExtVarType_SystemYPL; /* *** macros *** */ /* External variable macros */ #define x vsextVar_SystemYPL._x /* *** constants *** */ /* Events */ #define button1 2 #define button2 3 #define button3 4 #define DOOR 5 #define ON 6 #define ROTATION 7 #define STOP 8 #define WASH 9 #define E1 10 #define E2 11 #define E3 12 #define EMERGENCY 13 #define NORMAL 14 #define ON_EW 15 #define ON_NS 16 #define TIMEOUT 17 #define Event2 18 #define Event3 19 #define E_DECREMENT 20 #define E_INCREMENT 21 #define E_MODE 22 /* Constants */ #define val_0 ((VS_UCHAR) 0) #define MAX ((VS_INT) 10) #define MIN ((VS_INT) 1) /* *** variable declarations *** */ /* External variable declarations */ extern VSExtVarType_SystemYPL vsextVar_SystemYPL; /* Action function declarations */ extern void BLUE_ON (void); extern void LED_OFF (void); extern void RED_ON (void); extern void Light (void); extern VS_UCHAR AcReturnX (void); #endif
f841378ec99bbde64bc68cc879f506d2001b228a
e88683c6a8f7ae1e76ecf051c8c700544635affa
/Software/main_pum_10_3.c
54427a81807248a152ea110e7f6a14ff7cad9b73
[ "Apache-2.0" ]
permissive
imatlopez/emg-sensor
7195f4af3a133adc4ce9d71bf2a56ee28d2521ee
f579ac75a1a6042efbeeac3ce2867490fae220fd
refs/heads/master
2021-06-09T15:50:28.713565
2016-12-11T21:47:24
2016-12-11T21:47:24
null
0
0
null
null
null
null
UTF-8
C
false
false
4,312
c
main_pum_10_3.c
/* * BME 464 - EMG Decoder * * Decodes signals from two EMG leads and sends result to an external interface * */ #include "Lcd.h" #include <delays.h> //delay header #include <p18f46k22.h> //chip header #include <stdio.h> #pragma config FOSC = INTIO67 // Internal OSC block, Port Function on RA6/7 #pragma config WDTEN = OFF // Watch Dog Timer disabled. SWDTEN no effect #pragma config XINST = OFF // Instruction set Extension and indexed Addressing mode disabled //Define statements #define Running 0 //Variable definitions unsigned int V1; // signal from lead 1 unsigned int V2; // signal from lead 2 unsigned int PV1; // processed signal from lead 1 unsigned int PV2; // processed signal from lead 2 unsigned int oldPV1; // processed signal from lead 1 unsigned int oldPV2; // processed signal from lead 2 int Thresh; // threshold for voltage classification int Hyst; // hysteresis range int EMG; // decoded result //Function definitions void SysInit(void); void GetData(void); unsigned int Process(unsigned int value, unsigned int old); int Decode(unsigned int voltage1, unsigned int voltage2); void Transmit(int info); void main(void) { // Local variables char str[4]; //Initialize SysInit(); LCDClear(); // EMG Decoder Loop while(1) { GetData(); // Acquire voltages EMG=Decode(PV1,PV2); // Decode Transmit(EMG); // Print value to screen or communication // For now, display the two voltage results LCDGoto(0,0); sprintf(str,"%04u",V1); LCDPutChar(str[0]); LCDPutChar(str[1]); LCDPutChar(str[2]); LCDPutChar(str[3]); LCDGoto(0,1); sprintf(str,"%04u",V2); LCDPutChar(str[0]); LCDPutChar(str[1]); LCDPutChar(str[2]); LCDPutChar(str[3]); //Display command output LCDGoto(8,1); LCDPutByte(EMG); Delay10KTCYx(50); // Delay .5 seconds }; } //Initialize necessary systems void SysInit(void) { OSCCON=0b01010110; //4 MHz internal oscillator //Set up buttons ANSELBbits.ANSB0=0; //Digital TRISAbits.RA4=1; //Input TRISBbits.RB0=1; //Input //Set up ADC channel on AN0 ANSELAbits.ANSA0 = 1; TRISAbits.RA0 = 1; //Analog in //Set up ADC channel on AN1 ANSELAbits.ANSA1 = 1; TRISAbits.RA1 = 1; //Analog in //Set up ADC parameters ADCON2bits.ACQT=001; //2 TAD ADCON2bits.ADCS=010; //FOSC/32 ADCON2bits.ADFM=1; //Right justified*** ADCON0bits.ADON=1; //Turn on A/D //Set up LCD ANSELD = 0x00; TRISD = 0x00; //Digital out LCDInit(); //Start LCD LCDWriteStr("Starting device..."); //Reset variables V1=0; V2=0; EMG=0; PV1=0; PV2=0; oldPV1=0; oldPV2=0; //Set threshold & hysteresis Thresh=512; Hyst=100; } // ADC sampling of EMG leads void GetData(void) { //Channel1 ADCON0bits.CHS=0000; //Select RA0 ADCON0bits.GO=1; //Start conversion while(ADCON0bits.GO==1){}; //Wait for finish V1=ADRESH; V1=(V1<<8) | ADRESL; //Covert output to 10-bit // add iteration here if want to do averaging //Process voltage from channel 1 PV1=Process(V1,oldPV1); oldPV1=PV1; //Channel2 ADCON0bits.CHS=0001; //Select RA1 ADCON0bits.GO=1; //Start conversion while(ADCON0bits.GO==1){}; //Wait for finish V2=ADRESH; V2=(V2<<8) | ADRESL; ///Covert output to 10-bit PV2=Process(V2,oldPV2); oldPV2=PV2; } unsigned int Process(unsigned int value, unsigned int old){ // If the level was low before, raise the threshold if (old==0){ //process if voltage is lower or higher than threshold if (value>=Thresh+Hyst){ return 1; } else{ return 0; } } // If the level was high before, lower the threshold else{ if (value>=Thresh-Hyst){ return 1; } else{ return 0; } } } // Decode the two digital signals int Decode(unsigned int voltage1, unsigned int voltage2) { if (voltage1==1){ if(voltage2==1){ return 3; //11 } else { return 2; //10 } } else { if(voltage2==1){ return 1; //01 } else { return 0; //00 } } } // Transmit the result to external interface void Transmit(int info){ ; }
dd265f547a01df5b3054cbb1e430c8e8dceebfa4
f026cb616ef14bae15a1d251ca6dbe0f55016d9c
/linux/12921.c
f473b803fadd11c64a47f444451b77edac060c15
[]
no_license
jajajasalu2/cocci-lkmp-c-files
3eb7d451929dca5cb6beb56aabd69fe3f7fc176c
5da943aabe1589e393a131121dbf8e7a84b3cf2a
refs/heads/master
2020-12-02T17:30:14.411816
2020-01-29T08:36:30
2020-01-29T08:36:30
231,053,574
1
0
null
null
null
null
UTF-8
C
false
false
1,333
c
12921.c
cocci_test_suite() { struct idt77105_stats *cocci_id/* drivers/atm/idt77105.c 88 */; u16 cocci_id/* drivers/atm/idt77105.c 62 */; struct idt77105_priv *cocci_id/* drivers/atm/idt77105.c 56 */; void cocci_id/* drivers/atm/idt77105.c 50 */(struct timer_list *); void __exit cocci_id/* drivers/atm/idt77105.c 366 */; void cocci_id/* drivers/atm/idt77105.c 366 */; const struct atmphy_ops cocci_id/* drivers/atm/idt77105.c 350 */; struct idt77105_priv { struct idt77105_stats stats; struct atm_dev *dev; struct idt77105_priv *next; int loop_mode; unsigned char old_mcr; } cocci_id/* drivers/atm/idt77105.c 34 */; struct idt77105_priv cocci_id/* drivers/atm/idt77105.c 265 */; unsigned cocci_id/* drivers/atm/idt77105.c 219 */; unsigned char cocci_id/* drivers/atm/idt77105.c 215 */; int __user *cocci_id/* drivers/atm/idt77105.c 201 */; void __user *cocci_id/* drivers/atm/idt77105.c 189 */; unsigned int cocci_id/* drivers/atm/idt77105.c 189 */; struct idt77105_stats cocci_id/* drivers/atm/idt77105.c 145 */; unsigned long cocci_id/* drivers/atm/idt77105.c 144 */; struct idt77105_stats __user *cocci_id/* drivers/atm/idt77105.c 142 */; struct atm_dev *cocci_id/* drivers/atm/idt77105.c 142 */; int cocci_id/* drivers/atm/idt77105.c 142 */; struct timer_list *cocci_id/* drivers/atm/idt77105.c 113 */; }
b97b5d04a2316c6d33ac5742a91dfa3a419a47c9
eb95d7298f8737c2fdc6459d713da2f114dc6e1e
/orte/mca/rml/ofi/rml_ofi_component.c
6c3a7d5d0dc1c5b4bc7ff3256a1d48e11ced43fe
[ "BSD-3-Clause-Open-MPI" ]
permissive
annu13/ompi
23a20ddc675c9e62e9322ee60d437f2a9a78f5f8
2d94845f907179bec697778b59b7855e0c3cf34c
refs/heads/master
2021-01-18T07:52:47.338447
2016-10-20T17:04:38
2016-10-20T17:04:38
26,343,790
0
0
null
null
null
null
UTF-8
C
false
false
52,985
c
rml_ofi_component.c
/* * Copyright (c) 2015 Intel, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ */ #include "orte_config.h" #include "orte/constants.h" #include "opal/mca/base/base.h" #include "opal/util/output.h" #include "opal/mca/backtrace/backtrace.h" #include "opal/mca/event/event.h" #if OPAL_ENABLE_FT_CR == 1 #include "orte/mca/rml/rml.h" #include "orte/mca/state/state.h" #endif #include "orte/mca/rml/base/base.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/routed/routed.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/util/name_fns.h" #include "orte/runtime/orte_globals.h" #include "rml_ofi.h" static int rml_ofi_component_open(void); static int rml_ofi_component_close(void); static orte_rml_base_module_t* open_conduit(opal_list_t *attributes); static orte_rml_pathway_t* query_transports(void); static char* get_contact_info(void); static void set_contact_info(const char *uri); static void close_conduit(orte_rml_base_module_t *mod); /** * component definition */ orte_rml_component_t mca_rml_ofi_component = { /* First, the mca_base_component_t struct containing meta information about the component itself */ .base = { ORTE_RML_BASE_VERSION_3_0_0, .mca_component_name = "ofi", MCA_BASE_MAKE_VERSION(component, ORTE_MAJOR_VERSION, ORTE_MINOR_VERSION, ORTE_RELEASE_VERSION), .mca_open_component = rml_ofi_component_open, .mca_close_component = rml_ofi_component_close, }, .data = { /* The component is checkpoint ready */ MCA_BASE_METADATA_PARAM_CHECKPOINT }, .priority = 10, .open_conduit = open_conduit, .query_transports = query_transports, .get_contact_info = get_contact_info, .set_contact_info = set_contact_info, .close_conduit = close_conduit }; /* Local variables */ static orte_rml_base_module_t base_module = { .component = (struct orte_rml_component_t*)&mca_rml_ofi_component, .ping = NULL, .send_nb = orte_rml_ofi_send_nb, .send_buffer_nb = orte_rml_ofi_send_buffer_nb, .purge = NULL }; static int rml_ofi_component_open(void) { /* Initialise endpoint and all queues */ orte_rml_ofi.fi_info_list = NULL; orte_rml_ofi.min_ofi_recv_buf_sz = MIN_MULTI_BUF_SIZE; orte_rml_ofi.cur_msgid = 1; orte_rml_ofi.cur_transport_id = RML_OFI_CONDUIT_ID_INVALID; for( uint8_t conduit_id=0; conduit_id < MAX_CONDUIT ; conduit_id++) { orte_rml_ofi.ofi_conduits[conduit_id].fabric = NULL; orte_rml_ofi.ofi_conduits[conduit_id].domain = NULL; orte_rml_ofi.ofi_conduits[conduit_id].av = NULL; orte_rml_ofi.ofi_conduits[conduit_id].cq = NULL; orte_rml_ofi.ofi_conduits[conduit_id].ep = NULL; orte_rml_ofi.ofi_conduits[conduit_id].ep_name[0] = 0; orte_rml_ofi.ofi_conduits[conduit_id].epnamelen = 0; orte_rml_ofi.ofi_conduits[conduit_id].mr_multi_recv = NULL; orte_rml_ofi.ofi_conduits[conduit_id].rxbuf = NULL; orte_rml_ofi.ofi_conduits[conduit_id].rxbuf_size = 0; orte_rml_ofi.ofi_conduits[conduit_id].progress_ev_active = false; orte_rml_ofi.ofi_conduits[conduit_id].conduit_id = RML_OFI_CONDUIT_ID_INVALID; orte_rml_ofi.ofi_conduits[conduit_id].ofi_module = NULL; } opal_output_verbose(1,orte_rml_base_framework.framework_output," from %s:%d rml_ofi_component_open()",__FILE__,__LINE__); return ORTE_SUCCESS; } void free_conduit_resources( int conduit_id) { int ret=0; opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - free_conduit_resources() begin. OFI conduit_id- %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),conduit_id); if (orte_rml_ofi.ofi_conduits[conduit_id].ep) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - close ep",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); CLOSE_FID(orte_rml_ofi.ofi_conduits[conduit_id].ep); if (ret) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - fi_close(ep) failed with error- %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),ret); } } if (orte_rml_ofi.ofi_conduits[conduit_id].mr_multi_recv) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - close mr_multi_recv",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); CLOSE_FID(orte_rml_ofi.ofi_conduits[conduit_id].mr_multi_recv); } if (orte_rml_ofi.ofi_conduits[conduit_id].cq) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - close cq",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); CLOSE_FID(orte_rml_ofi.ofi_conduits[conduit_id].cq); } if (orte_rml_ofi.ofi_conduits[conduit_id].av) { CLOSE_FID(orte_rml_ofi.ofi_conduits[conduit_id].av); } if (orte_rml_ofi.ofi_conduits[conduit_id].domain) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - close domain",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); CLOSE_FID(orte_rml_ofi.ofi_conduits[conduit_id].domain); } if (orte_rml_ofi.ofi_conduits[conduit_id].fabric) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - close fabric",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); fi_close((fid_t)orte_rml_ofi.ofi_conduits[conduit_id].fabric); } if (orte_rml_ofi.ofi_conduits[conduit_id].rxbuf) { free(orte_rml_ofi.ofi_conduits[conduit_id].rxbuf); } if (orte_rml_ofi.ofi_conduits[conduit_id].ofi_module) { free(orte_rml_ofi.ofi_conduits[conduit_id].ofi_module); orte_rml_ofi.ofi_conduits[conduit_id].ofi_module = NULL; } orte_rml_ofi.ofi_conduits[conduit_id].fabric = NULL; orte_rml_ofi.ofi_conduits[conduit_id].domain = NULL; orte_rml_ofi.ofi_conduits[conduit_id].av = NULL; orte_rml_ofi.ofi_conduits[conduit_id].cq = NULL; orte_rml_ofi.ofi_conduits[conduit_id].ep = NULL; orte_rml_ofi.ofi_conduits[conduit_id].ep_name[0] = 0; orte_rml_ofi.ofi_conduits[conduit_id].epnamelen = 0; orte_rml_ofi.ofi_conduits[conduit_id].rxbuf = NULL; orte_rml_ofi.ofi_conduits[conduit_id].rxbuf_size = 0; orte_rml_ofi.ofi_conduits[conduit_id].fabric_info = NULL; orte_rml_ofi.ofi_conduits[conduit_id].mr_multi_recv = NULL; orte_rml_ofi.ofi_conduits[conduit_id].conduit_id = RML_OFI_CONDUIT_ID_INVALID; orte_rml_ofi.ofi_conduits[conduit_id].ofi_module = NULL; OPAL_LIST_DESTRUCT(&orte_rml_ofi.recv_msg_queue_list); if( orte_rml_ofi.ofi_conduits[conduit_id].progress_ev_active) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - deleting progress event", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); opal_event_del( &orte_rml_ofi.ofi_conduits[conduit_id].progress_event); } return; } static int rml_ofi_component_close(void) { opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - rml_ofi_component_close() -begin, total open OFI conduits = %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),orte_rml_ofi.conduit_open_num); if(orte_rml_ofi.fi_info_list) { (void) fi_freeinfo(orte_rml_ofi.fi_info_list); } /* Close endpoint and all queues */ for( uint8_t conduit_id=0;conduit_id<orte_rml_ofi.conduit_open_num;conduit_id++) { free_conduit_resources(conduit_id); } opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s - rml_ofi_component_close() end",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); return ORTE_SUCCESS; } void print_provider_list_info (struct fi_info *fi ) { struct fi_info *cur_fi = fi; int fi_count = 0; //Display all the details in the fi_info structure opal_output_verbose(1,orte_rml_base_framework.framework_output, " %s - Print_provider_list_info() ", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); while(cur_fi != NULL) { fi_count++; opal_output_verbose(10,orte_rml_base_framework.framework_output, " %d.\n",fi_count); opal_output_verbose(10,orte_rml_base_framework.framework_output, " fi_info[]->caps : 0x%x \n",cur_fi->caps); opal_output_verbose(10,orte_rml_base_framework.framework_output, " fi_info[]->mode : 0x%x \n",cur_fi->mode); opal_output_verbose(10,orte_rml_base_framework.framework_output, " fi_info[]->address_format : 0x%x \n",cur_fi->addr_format); opal_output_verbose(10,orte_rml_base_framework.framework_output, " fi_info[]->fabric_attr->provname : %s \n",cur_fi->fabric_attr->prov_name); opal_output_verbose(10,orte_rml_base_framework.framework_output, " fi_info[]->src_address : 0x%x \n",cur_fi->src_addr); opal_output_verbose(10,orte_rml_base_framework.framework_output, " fi_info[]->dest_address : 0x%x \n",cur_fi->dest_addr); opal_output_verbose(10,orte_rml_base_framework.framework_output, " EndPoint Attributes (ep_attr) :"); switch( cur_fi->ep_attr->type) { case FI_EP_UNSPEC: opal_output_verbose(10,orte_rml_base_framework.framework_output," FI_EP_UNSPEC \n"); break; case FI_EP_MSG: opal_output_verbose(10,orte_rml_base_framework.framework_output," FI_EP_MSG \n"); break; case FI_EP_DGRAM: opal_output_verbose(10,orte_rml_base_framework.framework_output," FI_EP_DGRAM \n"); break; case FI_EP_RDM: opal_output_verbose(10,orte_rml_base_framework.framework_output," FI_EP_RDM \n"); break; default: opal_output_verbose(10,orte_rml_base_framework.framework_output," %d",cur_fi->ep_attr->type); } opal_output_verbose(10,orte_rml_base_framework.framework_output, " Protocol : 0x%x \n", cur_fi->ep_attr->protocol); cur_fi = cur_fi->next; } opal_output_verbose(10,orte_rml_base_framework.framework_output, "Total # of providers supported is %d\n",fi_count); } /* * This returns all the supported transports in the system that support endpoint type RDM (reliable datagram) * The providers returned is a list of type opal_valut_t holding opal_list_t */ static int orte_rml_ofi_query_transports(opal_value_t **providers) { opal_list_t *ofi_prov = NULL; opal_value_t *providers_list, *prev_provider=NULL, *next_provider=NULL; struct fi_info *cur_fi = NULL; int ret = 0, prov_num = 0; opal_output_verbose(10,orte_rml_base_framework.framework_output, " %s -Begin of query_transports()",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME) ); if ( NULL == *providers) { *providers = OBJ_NEW(opal_value_t); } providers_list = *providers; //Create the opal_value_t list in which each item is an opal_list_t that holds the provider details opal_output_verbose(10,orte_rml_base_framework.framework_output, "Starting to add the providers in a loop from orte_rml_ofi.ofi_conduits[] %s:%d",__FILE__,__LINE__); for ( prov_num = 0; prov_num < orte_rml_ofi.conduit_open_num ; prov_num++ ) { cur_fi = orte_rml_ofi.ofi_conduits[prov_num].fabric_info; if( NULL != prev_provider) { //if there is another provider in the array, then add another item to the providers_list next_provider = OBJ_NEW(opal_value_t); providers_list->super.opal_list_next = &next_provider->super; providers_list->super.opal_list_prev = &prev_provider->super; providers_list = (opal_value_t *)providers_list->super.opal_list_next; } /* populate the opal_list_t *ofi_prov with provider details from the * orte_rml_ofi.fi_info_list array populated in the rml_ofi_component_init() fn.*/ ofi_prov = OBJ_NEW(opal_list_t); opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n loading the attribute ORTE_CONDUIT_ID"); if( ORTE_SUCCESS != (ret = orte_set_attribute( ofi_prov, ORTE_CONDUIT_ID, ORTE_ATTR_GLOBAL, (void *)&orte_rml_ofi.ofi_conduits[prov_num].conduit_id ,OPAL_UINT8))) { opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d Not able to add provider conduit_id ",__FILE__,__LINE__); return ORTE_ERROR; } opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n provider conduit_id : %d",orte_rml_ofi.ofi_conduits[prov_num].conduit_id); opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n loading the attribute ORTE_PROV_NAME"); if( ORTE_SUCCESS == (ret = orte_set_attribute( ofi_prov, ORTE_PROV_NAME, ORTE_ATTR_GLOBAL,cur_fi->fabric_attr->prov_name ,OPAL_STRING))) { opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n loading the attribute ORTE_PROTOCOL %s",fi_tostr(&cur_fi->ep_attr->protocol,FI_TYPE_PROTOCOL)); if( ORTE_SUCCESS == (ret = orte_set_attribute( ofi_prov, ORTE_PROTOCOL, ORTE_ATTR_GLOBAL,(void *)&cur_fi->ep_attr->protocol ,OPAL_UINT32))) { // insert the opal_list_t into opal_value_t list opal_value_load(providers_list,ofi_prov,OPAL_PTR); opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n loading the provider opal_list_t* prov=%x into opal_value_t list successful", ofi_prov); } else { opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d Not able to add provider name ",__FILE__,__LINE__); return ORTE_ERROR; } } else { opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d Not able to add provider name ",__FILE__,__LINE__); return ORTE_ERROR; } prev_provider = providers_list; cur_fi = cur_fi->next; } opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n%s:%d Completed Query Interface",__FILE__,__LINE__); return ORTE_SUCCESS; } /*debug routine to print the opal_value_t returned by query interface */ void print_transports_query() { opal_value_t *providers=NULL; char* prov_name = NULL; int ret; int32_t *protocol_ptr, protocol; int8_t* prov_num; protocol_ptr = &protocol; opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n print_transports_query() Begin- %s:%d",__FILE__,__LINE__); opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n calling the orte_rml_ofi_query_transports() "); if( ORTE_SUCCESS == orte_rml_ofi_query_transports(&providers)) { opal_output_verbose(20,orte_rml_base_framework.framework_output, "\n query_transports() completed, printing details\n"); while (providers) { //get the first opal_list_t; opal_list_t *prov; ret = opal_value_unload(providers,(void **)&prov,OPAL_PTR); if (ret == OPAL_SUCCESS) { if( orte_get_attribute( prov, ORTE_CONDUIT_ID, (void **)&prov_num,OPAL_UINT8)) { opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n OFI Provider conduit_id : %d",*prov_num); } if( orte_get_attribute( prov, ORTE_PROTOCOL, (void **)&protocol_ptr,OPAL_UINT32)) { opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n Protocol : %d", *protocol_ptr); } if( orte_get_attribute( prov, ORTE_PROV_NAME, (void **)&prov_name ,OPAL_STRING)) { opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n Provider name : %s",prov_name); } else { opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n Error in getting Provider name"); } } else { opal_output_verbose(1,orte_rml_base_framework.framework_output, "\n %s:%d opal_value_unload() failed, opal_list* prov = %x", __FILE__,__LINE__,prov); } providers = (opal_value_t *)providers->super.opal_list_next; } } else { opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n query_transports() returned Error "); } opal_output_verbose(10,orte_rml_base_framework.framework_output, "\n End of print_transports_query() \n"); } /** conduit [in]: the ofi conduit_id that triggered the progress fn **/ __opal_attribute_always_inline__ static inline int orte_rml_ofi_progress(ofi_transport_conduit_t* conduit) { ssize_t ret; int count=0; /* number of messages read and processed */ struct fi_cq_data_entry wc = { 0 }; struct fi_cq_err_entry error = { 0 }; orte_rml_ofi_request_t *ofi_req; opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s orte_rml_ofi_progress called for OFI conduitid %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id); /** * Read the work completions from the CQ. * From the completion's op_context, we get the associated OFI request. * Call the request's callback. */ while (true) { /* Read the cq - that triggered the libevent to call this progress fn. */ ret = fi_cq_read(conduit->cq, (void *)&wc, 1); if (0 < ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s cq read for OFI conduitid %d - wc.flags = %x", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id, wc.flags); count++; // check the flags to see if this is a send-completion or receive if ( wc.flags & FI_SEND ) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s Send completion received on OFI conduitid %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id); if (NULL != wc.op_context) { /* get the context from the wc and call the message handler */ ofi_req = TO_OFI_REQ(wc.op_context); assert(ofi_req); ret = orte_rml_ofi_send_callback(&wc, ofi_req); if (ORTE_SUCCESS != ret) { opal_output(orte_rml_base_framework.framework_output, "Error returned by OFI send callback handler when a send completion was received on OFI conduit: %zd", ret); } } } else if ( (wc.flags & FI_RECV) && (wc.flags & FI_MULTI_RECV) ) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s Received message on OFI conduitid %d - but buffer is consumed, need to repost", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id); // reposting buffer ret = fi_recv(orte_rml_ofi.ofi_conduits[conduit->conduit_id].ep, orte_rml_ofi.ofi_conduits[conduit->conduit_id].rxbuf, orte_rml_ofi.ofi_conduits[conduit->conduit_id].rxbuf_size, fi_mr_desc(orte_rml_ofi.ofi_conduits[conduit->conduit_id].mr_multi_recv), 0,&(conduit->rx_ctx1)); // call the receive message handler that will call the rml_base ret = orte_rml_ofi_recv_handler(&wc, conduit->conduit_id); if (ORTE_SUCCESS != ret) { opal_output(orte_rml_base_framework.framework_output, "Error returned by OFI Recv handler when handling the received message on the conduit: %zd", ret); } } else if ( wc.flags & FI_RECV ) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s Received message on OFI conduitid %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id); // call the receive message handler that will call the rml_base ret = orte_rml_ofi_recv_handler(&wc, conduit->conduit_id); if (ORTE_SUCCESS != ret) { opal_output(orte_rml_base_framework.framework_output, "Error returned by OFI Recv handler when handling the received message on the OFI conduit: %zd", ret); } } else if ( wc.flags & FI_MULTI_RECV ) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s Received buffer overrun message on OFI conduitid %d - need to repost", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id); // reposting buffer ret = fi_recv(orte_rml_ofi.ofi_conduits[conduit->conduit_id].ep, orte_rml_ofi.ofi_conduits[conduit->conduit_id].rxbuf, orte_rml_ofi.ofi_conduits[conduit->conduit_id].rxbuf_size, fi_mr_desc(orte_rml_ofi.ofi_conduits[conduit->conduit_id].mr_multi_recv), 0,&(conduit->rx_ctx1)); if (ORTE_SUCCESS != ret) { opal_output(orte_rml_base_framework.framework_output, "Error returned by OFI when reposting buffer on the OFI conduit: %zd", ret); } }else { opal_output_verbose(1,orte_rml_base_framework.framework_output, "CQ has unhandled completion event with FLAG wc.flags = 0x%x", wc.flags); } } else if (ret == -FI_EAVAIL) { /** * An error occured and is being reported via the CQ. * Read the error and forward it to the upper layer. */ opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s cq_read for OFI conduitid %d returned error 0x%x <%s>", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id, ret, fi_strerror((int) -ret) ); ret = fi_cq_readerr(conduit->cq, &error, 0); if (0 > ret) { opal_output_verbose(1,orte_rml_base_framework.framework_output, "Error returned from fi_cq_readerr: %zd", ret); } assert(error.op_context); /* get the context from wc and call the error handler */ ofi_req = TO_OFI_REQ(error.op_context); assert(ofi_req); ret = orte_rml_ofi_error_callback(&error, ofi_req); if (ORTE_SUCCESS != ret) { opal_output_verbose(1,orte_rml_base_framework.framework_output, "Error returned by request error callback: %zd", ret); } break; } else if (ret == -FI_EAGAIN){ /** * The CQ is empty. Return. */ opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s Empty cq for OFI conduitid %d,exiting from ofi_progress()", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id ); break; } else { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s cq_read for OFI conduitid %d returned error 0x%x <%s>", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id, ret, fi_strerror((int) -ret) ); break; } } return count; } /* * call the ofi_progress() fn to read the cq * */ int cq_progress_handler(int sd, short flags, void *cbdata) { ofi_transport_conduit_t* conduit = (ofi_transport_conduit_t*)cbdata; int count; opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s cq_progress_handler called for OFI conduitid %d", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), conduit->conduit_id); /* call the progress fn to read the cq and process the message * for the conduit */ count = orte_rml_ofi_progress(conduit); return count; } static orte_rml_base_module_t* rml_ofi_component_init(int* priority) { int ret, fi_version; struct fi_info *hints, *fabric_info; struct fi_cq_attr cq_attr = {0}; struct fi_av_attr av_attr = {0}; size_t namelen; char ep_name[FI_NAME_MAX]= {0}; uint8_t fabric_id = 0, cur_conduit; opal_output_verbose(20,orte_rml_base_framework.framework_output, "%s - Entering rml_ofi_component_init()",ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); /*[TODO] Limiting current implementation to APP PROCs. The PMIX component does not get initialised for * ORTE_DAEMON_PROC so the OPAL_MODEX_SEND_STRING (opal_pmix.put) fails during initialisation, * this needs to be fixed to support DAEMON PROC to use ofi */ if (!ORTE_PROC_IS_APP) { *priority = 0; return NULL; } if (init_done) { *priority = 2; return &orte_rml_ofi.api; } *priority = 2; /** * Hints to filter providers * See man fi_getinfo for a list of all filters * mode: Select capabilities MTL is prepared to support. * In this case, MTL will pass in context into communication calls * ep_type: reliable datagram operation * caps: Capabilities required from the provider. * Tag matching is specified to implement MPI semantics. * msg_order: Guarantee that messages with same tag are ordered. */ hints = fi_allocinfo(); if (!hints) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: Could not allocate fi_info\n", __FILE__, __LINE__); return NULL; } /** * Refine filter for additional capabilities * endpoint type : Reliable datagram * threading: Disable locking * control_progress: enable async progress */ hints->mode = FI_CONTEXT; hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */ hints->domain_attr->threading = FI_THREAD_UNSPEC; hints->domain_attr->control_progress = FI_PROGRESS_AUTO; hints->domain_attr->data_progress = FI_PROGRESS_AUTO; hints->domain_attr->av_type = FI_AV_MAP; /** * FI_VERSION provides binary backward and forward compatibility support * Specify the version of OFI is coded to, the provider will select struct * layouts that are compatible with this version. */ fi_version = FI_VERSION(1, 1); /** * fi_getinfo: returns information about fabric services for reaching a * remote node or service. this does not necessarily allocate resources. * Pass NULL for name/service because we want a list of providers supported. */ ret = fi_getinfo(fi_version, /* OFI version requested */ NULL, /* Optional name or fabric to resolve */ NULL, /* Optional service name or port to request */ 0ULL, /* Optional flag */ hints, /* In: Hints to filter providers */ &orte_rml_ofi.fi_info_list); /* Out: List of matching providers */ if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_getinfo failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); } else { /* added for debug purpose - Print the provider info print_transports_query(); print_provider_list_info(orte_rml_ofi.fi_info_list); */ /** create the OFI objects for each transport in the system * (fi_info_list) and store it in the ofi_conduits array **/ orte_rml_ofi.conduit_open_num = 0; // start the conduit_id from 0 for( fabric_info = orte_rml_ofi.fi_info_list ; NULL != fabric_info && orte_rml_ofi.conduit_open_num < MAX_CONDUIT ; fabric_info = fabric_info->next) { opal_output_verbose(100,orte_rml_base_framework.framework_output, "%s:%d beginning to add endpoint for OFIconduit_id=%d ",__FILE__,__LINE__,orte_rml_ofi.conduit_open_num); cur_conduit = orte_rml_ofi.conduit_open_num; orte_rml_ofi.ofi_conduits[cur_conduit].conduit_id = orte_rml_ofi.conduit_open_num ; orte_rml_ofi.ofi_conduits[cur_conduit].fabric_info = fabric_info; // set FI_MULTI_RECV flag for all recv operations fabric_info->rx_attr->op_flags = FI_MULTI_RECV; /** * Open fabric * The getinfo struct returns a fabric attribute struct that can be used to * instantiate the virtual or physical network. This opens a "fabric * provider". See man fi_fabric for details. */ ret = fi_fabric(fabric_info->fabric_attr, /* In: Fabric attributes */ &orte_rml_ofi.ofi_conduits[cur_conduit].fabric, /* Out: Fabric handle */ NULL); /* Optional context for fabric events */ if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_fabric failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); orte_rml_ofi.ofi_conduits[cur_conduit].fabric = NULL; /* abort this current transport, but check if next transport can be opened */ continue; } /** * Create the access domain, which is the physical or virtual network or * hardware port/collection of ports. Returns a domain object that can be * used to create endpoints. See man fi_domain for details. */ ret = fi_domain(orte_rml_ofi.ofi_conduits[cur_conduit].fabric, /* In: Fabric object */ fabric_info, /* In: Provider */ &orte_rml_ofi.ofi_conduits[cur_conduit].domain, /* Out: Domain oject */ NULL); /* Optional context for domain events */ if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_domain failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); orte_rml_ofi.ofi_conduits[cur_conduit].domain = NULL; free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /** * Create a transport level communication endpoint. To use the endpoint, * it must be bound to completion counters or event queues and enabled, * and the resources consumed by it, such as address vectors, counters, * completion queues, etc. * see man fi_endpoint for more details. */ ret = fi_endpoint(orte_rml_ofi.ofi_conduits[cur_conduit].domain, /* In: Domain object */ fabric_info, /* In: Provider */ &orte_rml_ofi.ofi_conduits[cur_conduit].ep, /* Out: Endpoint object */ NULL); /* Optional context */ if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_endpoint failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /** * Save the maximum inject size. */ //orte_rml_ofi.max_inject_size = prov->tx_attr->inject_size; /** * Create the objects that will be bound to the endpoint. * The objects include: * - completion queue for events * - address vector of other endpoint addresses * - dynamic memory-spanning memory region */ cq_attr.format = FI_CQ_FORMAT_DATA; cq_attr.wait_obj = FI_WAIT_FD; cq_attr.wait_cond = FI_CQ_COND_NONE; ret = fi_cq_open(orte_rml_ofi.ofi_conduits[cur_conduit].domain, &cq_attr, &orte_rml_ofi.ofi_conduits[cur_conduit].cq, NULL); if (ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_cq_open failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /** * The remote fi_addr will be stored in the ofi_endpoint struct. * So, we use the AV in "map" mode. */ av_attr.type = FI_AV_MAP; ret = fi_av_open(orte_rml_ofi.ofi_conduits[cur_conduit].domain, &av_attr, &orte_rml_ofi.ofi_conduits[cur_conduit].av, NULL); if (ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_av_open failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /** * Bind the CQ and AV to the endpoint object. */ ret = fi_ep_bind(orte_rml_ofi.ofi_conduits[cur_conduit].ep, (fid_t)orte_rml_ofi.ofi_conduits[cur_conduit].cq, FI_SEND | FI_RECV); if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_bind CQ-EP failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } ret = fi_ep_bind(orte_rml_ofi.ofi_conduits[cur_conduit].ep, (fid_t)orte_rml_ofi.ofi_conduits[cur_conduit].av, 0); if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_bind AV-EP failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /** * Enable the endpoint for communication * This commits the bind operations. */ ret = fi_enable(orte_rml_ofi.ofi_conduits[cur_conduit].ep); if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_enable failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } opal_output_verbose(10,orte_rml_base_framework.framework_output, "%s:%d ep enabled for conduit_id - %d ",__FILE__,__LINE__,orte_rml_ofi.ofi_conduits[cur_conduit].conduit_id); /** * Get our address and publish it with modex. **/ orte_rml_ofi.ofi_conduits[cur_conduit].epnamelen = sizeof (orte_rml_ofi.ofi_conduits[cur_conduit].ep_name); ret = fi_getname((fid_t)orte_rml_ofi.ofi_conduits[cur_conduit].ep, &orte_rml_ofi.ofi_conduits[cur_conduit].ep_name[0], &orte_rml_ofi.ofi_conduits[cur_conduit].epnamelen); if (ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_getname failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } switch ( orte_rml_ofi.ofi_conduits[cur_conduit].fabric_info->addr_format) { case FI_SOCKADDR_IN : opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d In FI_SOCKADDR_IN. ",__FILE__,__LINE__); /* Address is of type sockaddr_in (IPv4) */ opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s sending Opal modex string for conduit_it %d, epnamelen = %d ", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),cur_conduit,orte_rml_ofi.ofi_conduits[cur_conduit].epnamelen); /*[debug] - print the sockaddr - port and s_addr */ struct sockaddr_in* ep_sockaddr = (struct sockaddr_in*)orte_rml_ofi.ofi_conduits[cur_conduit].ep_name; opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s port = 0x%x, InternetAddr = %s ", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),ntohs(ep_sockaddr->sin_port),inet_ntoa(ep_sockaddr->sin_addr)); /*[end debug]*/ OPAL_MODEX_SEND_STRING( ret, OPAL_PMIX_GLOBAL, OPAL_RML_OFI_FI_SOCKADDR_IN, orte_rml_ofi.ofi_conduits[cur_conduit].ep_name, orte_rml_ofi.ofi_conduits[cur_conduit].epnamelen); if (ORTE_SUCCESS != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: OPAL_MODEX_SEND failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /*abort this current transport, but check if next transport can be opened*/ continue; } break; case FI_ADDR_PSMX : opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d In FI_ADDR_PSMX. ",__FILE__,__LINE__); /* Address is of type Intel proprietery PSMX */ OPAL_MODEX_SEND_STRING( ret, OPAL_PMIX_GLOBAL, OPAL_RML_OFI_FI_ADDR_PSMX,orte_rml_ofi.ofi_conduits[cur_conduit].ep_name, orte_rml_ofi.ofi_conduits[cur_conduit].epnamelen); opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d Opal modex send completed for FI_ADDR_PSMX. ",__FILE__,__LINE__); if (ORTE_SUCCESS != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: OPAL_MODEX_SEND failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /*abort this current transport, but check if next transport can be opened*/ continue; } break; default: opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d ERROR: Cannot register address, Unhandled addr_format - %d, ep_name - %s ", __FILE__,__LINE__,orte_rml_ofi.ofi_conduits[cur_conduit].fabric_info->addr_format, orte_rml_ofi.ofi_conduits[cur_conduit].ep_name); free_conduit_resources(cur_conduit); /*abort this current transport, but check if next transport can be opened*/ continue; } /** * Set the ANY_SRC address. */ orte_rml_ofi.any_addr = FI_ADDR_UNSPEC; /** * Allocate tx,rx buffers and Post a multi-RECV buffer for each endpoint **/ //[TODO later] For now not considering ep_attr prefix_size (add this later) orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf_size = MIN_MULTI_BUF_SIZE * MULTI_BUF_SIZE_FACTOR; orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf = malloc(orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf_size); ret = fi_mr_reg(orte_rml_ofi.ofi_conduits[cur_conduit].domain, orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf, orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf_size, FI_RECV, 0, 0, 0, &orte_rml_ofi.ofi_conduits[cur_conduit].mr_multi_recv, &orte_rml_ofi.ofi_conduits[cur_conduit].rx_ctx1); if (ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_mr_reg failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } ret = fi_setopt(&orte_rml_ofi.ofi_conduits[cur_conduit].ep->fid, FI_OPT_ENDPOINT, FI_OPT_MIN_MULTI_RECV, &orte_rml_ofi.min_ofi_recv_buf_sz, sizeof(orte_rml_ofi.min_ofi_recv_buf_sz) ); if (ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_setopt failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } ret = fi_recv(orte_rml_ofi.ofi_conduits[cur_conduit].ep, orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf, orte_rml_ofi.ofi_conduits[cur_conduit].rxbuf_size, fi_mr_desc(orte_rml_ofi.ofi_conduits[cur_conduit].mr_multi_recv), 0,&orte_rml_ofi.ofi_conduits[cur_conduit].rx_ctx1); if (ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_recv failed: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /** * get the fd and register the progress fn **/ ret = fi_control(&orte_rml_ofi.ofi_conduits[cur_conduit].cq->fid, FI_GETWAIT, (void *) &orte_rml_ofi.ofi_conduits[cur_conduit].fd); if (0 != ret) { opal_output_verbose(1, orte_rml_base_framework.framework_output, "%s:%d: fi_control failed to get fd: %s\n", __FILE__, __LINE__, fi_strerror(-ret)); free_conduit_resources(cur_conduit); /* abort this current transport, but check if next transport can be opened */ continue; } /* - create the event that will wait on the fd*/ /* use the opal_event_set to do a libevent set on the fd * so when something is available to read, the cq_porgress_handler * will be called */ opal_event_set(orte_event_base, &orte_rml_ofi.ofi_conduits[cur_conduit].progress_event, orte_rml_ofi.ofi_conduits[cur_conduit].fd, OPAL_EV_READ|OPAL_EV_PERSIST, cq_progress_handler, &orte_rml_ofi.ofi_conduits[cur_conduit]); opal_event_add(&orte_rml_ofi.ofi_conduits[cur_conduit].progress_event, 0); orte_rml_ofi.ofi_conduits[cur_conduit].progress_ev_active = true; /** allocate space for module to be returned if this ofi_conduit transport is requested by rml */ orte_rml_ofi.ofi_conduits[cur_conduit].ofi_module = (orte_rml_ofi_module_t*)calloc(1, sizeof(orte_rml_ofi_module_t)); /* copy the function pointers across */ memcpy(orte_rml_ofi.ofi_conduits[cur_conduit].ofi_module, &orte_rml_ofi, sizeof(orte_rml_ofi_module_t)); /** update the number of conduits in the ofi_conduits[] array **/ opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d Conduit id - %d created ",__FILE__,__LINE__,orte_rml_ofi.conduit_open_num); orte_rml_ofi.conduit_open_num++; } if (fabric_info != NULL && orte_rml_ofi.conduit_open_num >= MAX_CONDUIT ) { opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d fi_getinfo list not fully parsed as MAX_CONDUIT - %d reached ",__FILE__,__LINE__,orte_rml_ofi.conduit_open_num); } } /** * Free providers info since it's not needed anymore. */ fi_freeinfo(hints); hints = NULL; /* only if atleast one conduit was successfully opened then return the module */ if (0 < orte_rml_ofi.conduit_open_num ) { opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d OFIconduits openened=%d returning orte_rml_ofi.api", __FILE__,__LINE__,orte_rml_ofi.conduit_open_num); OBJ_CONSTRUCT(&orte_rml_ofi.recv_msg_queue_list,opal_list_t); init_done = true; orte_rml_ofi.api.tot_num_transports = orte_rml_ofi.conduit_open_num; return &orte_rml_ofi.api; } else { opal_output_verbose(1,orte_rml_base_framework.framework_output, "%s:%d Failed to open any OFIconduits",__FILE__,__LINE__); return NULL; } } /* return : the ofi_conduit that corresponds to the transport requested by the attributes if transport is not found RML_OFI_CONDUIT_ID_INVALID is returned. @[in]attributes : the attributes passed in to open_conduit reg the transport requested */ int get_ofi_conduit_id( opal_list_t *attributes) { int ofi_conduit_id = RML_OFI_CONDUIT_ID_INVALID, prov_num=0; char *provider = NULL, *transport = NULL; char *ethernet="sockets", *fabric="fabric"; /*[TODO] - replace the string for fabric with right value for OPA*/ struct fi_info *cur_fi; /* check the list of attributes to see if we should respond * Attribute should have ORTE_RML_TRANSPORT_ATTRIB key * with values "ethernet" or "fabric" * (or) ORTE_RML_OFI_PROV_NAME key with values "socket" or "OPA" * if both above attributes are missing return failure */ if (orte_get_attribute(attributes, ORTE_RML_TRANSPORT_ATTRIB, (void**)&transport, OPAL_STRING) ) { if( 0 == strcmp( transport, "ethernet") ) { provider = ethernet; } else if ( 0 == strcmp( transport, "fabric") ) { provider = fabric; } } /* if from the transport we don't know which provider we want, then check for the ORTE_RML_OFI_PROV_NAME_ATTRIB */ if ( NULL == provider) { orte_get_attribute(attributes, ORTE_RML_OFI_PROV_NAME_ATTRIB, (void**)&provider, OPAL_STRING); } if (provider != NULL) { // loop the orte_rml_ofi.conduits[] and find the provider name that matches for ( prov_num = 0; prov_num < orte_rml_ofi.conduit_open_num && ofi_conduit_id == RML_OFI_CONDUIT_ID_INVALID ; prov_num++ ) { cur_fi = orte_rml_ofi.ofi_conduits[prov_num].fabric_info; if ( strcmp(provider,cur_fi->fabric_attr->prov_name) == 0) { ofi_conduit_id = prov_num; } } } return ofi_conduit_id; } static orte_rml_base_module_t* open_conduit(opal_list_t *attributes) { orte_rml_ofi_module_t *mod = NULL; int ofi_conduit_id = RML_OFI_CONDUIT_ID_INVALID; ofi_conduit_id = get_ofi_conduit_id(attributes); if ( ofi_conduit_id == RML_OFI_CONDUIT_ID_INVALID) { return mod; } /* we will provide this module - to make sure we don't open multiple modules we return * * the one allocated at init associated with this ofi_conduit(transport) */ mod = orte_rml_ofi.ofi_conduits[ofi_conduit_id].ofi_module; /* setup the remaining data locations in mod to reflect the current conduit*/ mod->cur_transport_id = ofi_conduit_id; return mod; } static void orte_rml_ofi_fini(void *mod) { opal_list_item_t *item; uint8_t conduit_id; orte_rml_ofi_module_t* ofi_mod = (orte_rml_ofi_module_t *)mod; opal_output_verbose(1,orte_rml_base_framework.framework_output, " %s - orte_rml_ofi_fini() begin ", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); //freeing module* created by open_conduit() is done in rml_ofi_component_close() opal_output_verbose(1,orte_rml_base_framework.framework_output, " %s - orte_rml_ofi_fini() completed ", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); }
e84380bbf22030e7a663bfc509d1572e01fc6497
7ce94b52b4238e4ee14e7e321cca8b89bd291479
/examples/loop1.c
146a389d3906b3ac88b066c7ee0eec01b09c9592
[ "MIT" ]
permissive
linyingwen/korn
2f8a39e4db8d4adda5fec1dab209d247e2bd96a6
8fc1fb4d820cca52872e2b40a552be6a1d28472d
refs/heads/master
2023-01-01T12:56:04.687348
2020-10-24T14:19:26
2020-10-24T14:19:26
null
0
0
null
null
null
null
UTF-8
C
false
false
133
c
loop1.c
int main() { int i=0,n; assume(0 <= n); while(i < n) i++; assert(i == n); while(i > 0) i--; assert(i == 0); }
aba5db378172bb22bec93f5e15588da73a98ac75
b93b5f495a2fa02ef08ba5e39263e2bfecb17dc9
/c-noob/mca/pointer.c
5df956d55911674396ec3f2b02a491816a19a089
[]
no_license
naveenpanwar/Experiments
d9c4a35badfc3346045df728ee9416d45f6e3ff9
4762b1809a91a473d2a77518fb612327f874bff8
refs/heads/master
2023-01-24T14:01:09.544256
2023-01-13T11:20:12
2023-01-13T11:20:12
8,360,597
0
0
null
2023-01-12T04:26:31
2013-02-22T16:02:08
Liquid
UTF-8
C
false
false
123
c
pointer.c
#include<stdio.h> void main() { int var; var = 10; int *ptr; ptr = &var; printf("%d\n",var); printf("%d\n",*ptr); }
a34d1aaa0a3144a6a5cc7d6fa3b6d8e6737c777c
69f6d7dc4c749a9d077716c2531de54cc18fcd28
/openssl/providers/implementations/ciphers/cipher_sm4_ccm_hw.c
426ebe963df135b8a81533d8b2b9d66770a11587
[ "Apache-2.0", "OpenSSL", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
jens-maus/amissl
b8a78739ceb88c6983c7b82473ca1b3f6efeab6f
bd3ddc2a8cecec3f0421e7ca918d2d972099722f
refs/heads/master
2023-08-08T04:33:46.832295
2023-08-01T17:45:25
2023-08-01T17:45:25
43,135,925
78
13
BSD-3-Clause
2021-04-01T13:56:50
2015-09-25T11:27:37
C
UTF-8
C
false
false
1,099
c
cipher_sm4_ccm_hw.c
/* * Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ /*- * Generic support for SM4 CCM. */ #include "cipher_sm4_ccm.h" static int ccm_sm4_initkey(PROV_CCM_CTX *ctx, const unsigned char *key, size_t keylen) { PROV_SM4_CCM_CTX *actx = (PROV_SM4_CCM_CTX *)ctx; ossl_sm4_set_key(key, &actx->ks.ks); CRYPTO_ccm128_init(&ctx->ccm_ctx, ctx->m, ctx->l, &actx->ks.ks, (block128_f)ossl_sm4_encrypt); ctx->str = NULL; ctx->key_set = 1; return 1; } static const PROV_CCM_HW ccm_sm4 = { ccm_sm4_initkey, ossl_ccm_generic_setiv, ossl_ccm_generic_setaad, ossl_ccm_generic_auth_encrypt, ossl_ccm_generic_auth_decrypt, ossl_ccm_generic_gettag }; const PROV_CCM_HW *ossl_prov_sm4_hw_ccm(size_t keybits) { return &ccm_sm4; }
ff1ae7a492c976568f819349b1365cce08649c28
542dad03920a13b80a9f36bc4a66b50f795ba65a
/mandelmovie.c
b5a13065adb952b3c74cbc17372e3f23510c7e36
[]
no_license
Asif-EWU/CSE325-Operating-system--MandelBrot
ed62e40bef7d3f6d7653b6364e43b058445597e0
9de28a2508a9622744dc83fd009ad80cd5417a87
refs/heads/master
2023-01-03T05:43:09.949956
2020-10-25T02:46:01
2020-10-25T02:46:01
307,011,254
0
0
null
null
null
null
UTF-8
C
false
false
2,641
c
mandelmovie.c
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/wait.h> #include <math.h> #include <pthread.h> #define MAX_ITERATION 100 #define M 20 int running_process = 0; float zoom[MAX_ITERATION + 5]; char s_x[] = "0.28790"; char s_y[] = "0.0152"; char s_m[] = "600"; char s_h[] = "1000"; char s_w[] = "1000"; char s_s[M]; char s_n[M]; void make_zoom_array() { int i; float initial_zoom = 2.0, final_zoom = 0.00005, multiply; multiply = exp(log(final_zoom / initial_zoom) / 101.0); // pre-calculate and save all the -s values in an array zoom[1] = initial_zoom; for(i=2; i<=MAX_ITERATION; i++) zoom[i] = zoom[i-1] * multiply; } int main(int argc, char* argv[]) { // Check if the number of arguments is valid int _p = MAX_ITERATION, _n = 1; if(argc != 1 && argc != 3 && argc != 5) { fprintf(stderr,"mandelmovie.c : ERROR! Invalid number of arguments.\n"); exit(0); } if(argc > 1) { if(argv[1][1] == 'n') { _n = atoi(argv[2]); if(argc == 5) _p = atoi(argv[4]); } else { _p = atoi(argv[2]); if(argc == 5) _n = atoi(argv[4]); } } sprintf(s_n, "%d", _n); // convert (int) _n to (string) s_n char c; int i, limit = _p; pid_t pid; make_zoom_array(); for(i=1; i<=MAX_ITERATION; i++) { if(running_process == limit) // if number of running processes reach the limit value, wait for a process to end { wait(NULL); running_process--; } if(running_process < limit) // if number of running process is less than limit value, create another process { running_process++; pid = fork(); } if(pid == -1) { printf("Error! Failed to create %dth child.\n", i); exit(1); } else if(pid == 0) // child process { char s_name[M], s_zoom[M]; sprintf(s_name, "m%d.bmp", i); // make the bmp file name sprintf(s_zoom, "%f", zoom[i]); // convert (float) into (string) execlp("./mandel", "./mandel", "-x", s_x, "-y", s_y, "-s", s_zoom, "-W", s_w, "-H", s_h, "-m", s_m, "-n", s_n, "-o", s_name, NULL); } } while(running_process--) wait(NULL); // wait for all the child process to terminate before terminating main process system("ffmpeg -i m%d.bmp mandel.mpg"); // make a video with all the images created through the program printf("Done.\n"); return 0; }
f64a18ea511bc6c51e73838beaf7f498917ac6e4
73c84b2c092462e95dcfd56275020235029d1801
/大救援比赛代码/CO2&LED/User/can.h
4dc67edf7b6651320095b6922d85cc518200e8ff
[]
no_license
rty813/Rescue_Electronic
86d9bb621bab1c2b02417aa3a1db58978631d013
759d819b88fabebeb4b57a4592e09b9630e5d101
refs/heads/master
2021-01-01T15:20:35.887297
2017-08-12T02:40:07
2017-08-12T02:40:07
97,593,861
1
0
null
2017-08-09T11:11:24
2017-07-18T12:12:10
C
GB18030
C
false
false
746
h
can.h
#ifndef __CAN_H #define __CAN_H #include "stm32f10x.h" #define CAN_ID CAN_Id_Standard //CAN_Id_Extended, Standard Id or Extended Id #define Set_ID 0x02//(uint32_t)0x002//标准ID要小于11位,拓展ID小于29位 #define Main_Track Set_ID | 0x000 #define Side_Track Set_ID | 0x001 #define LEFT 1 //左对齐是否开启 typedef enum { CAN_TX_READY , CAN_TX_RTR , CAN_TX_ID , CAN_TX_DATA , CAN_TX_CHECK} TEST_CAN_STA; typedef enum { CAN_START , CAN_DATAEXT , CAN_REMOTEEXT , CAN_DATASTD , CAN_REMOTESTD} SER_CAN_STA; uint8_t SER_CAN_SetMsg(CanTxMsg TxMessage); uint8_t TEST_CAN_SetMsg(CanTxMsg *TxMessage); void CAN_Config(void); void TaskCanCommadDeal(void); extern CanTxMsg TxMessage; extern CanRxMsg RxMessage; #endif /* __CAN_H */
0e29820bb9ed4eb88eb38cb16028f4eb458414e5
4b427235dcd30d4a5187f23d7d9ae4d507127ac4
/timesub.c
0d7f0b63c5637b332d267cc25bbb4fbd0666a98b
[]
no_license
i-nielesh/guvisample
9f223763edd23933b2529b58b10d85418270f18a
f1bf18116b273f83241f9c922b4282149fc952fb
refs/heads/master
2021-09-22T10:25:29.967741
2018-09-08T09:53:08
2018-09-08T09:53:08
null
0
0
null
null
null
null
UTF-8
C
false
false
256
c
timesub.c
#include <stdio.h> int main() { int h1,m1,h2,m2,h3,m3; scanf("%d %d",&h1,&m1); scanf("%d %d",&h2,&m2); m3=m1-m2; h3=h1-h2; if(m3<0){ printf("%d %d",h3-1,m3+60); } else printf("%d %d",h3,m3); return 0; }
eb981565ce50c1f206c05425c27b9b1b13cb21ef
b2d48aac47dc3a3050f9cb562808f0e6f19a36e4
/prasad/circular_queue.c
c33262a60e5601fa3ff47416a98b29ddb0118231
[]
no_license
bhagavansprasad/students
7f7df2f4c2350025d58406794a7d94d9c8a9d7be
2822fb81cfb6714d48dea1e4957d6011ffa6198b
refs/heads/master
2023-08-04T04:44:11.346963
2023-07-24T06:09:00
2023-07-24T06:09:00
193,177,404
0
0
null
2022-11-30T23:33:00
2019-06-22T01:21:59
C
UTF-8
C
false
false
1,387
c
circular_queue.c
#include"stdio.h" #include"stdlib.h" #define ARRAY_SIZE 5 int arr[ARRAY_SIZE] ,r=-1,f=0,c=0; display_circular() { int i; if(r==-1) { printf("THERE ARE NO ELEMENTS IN THE CIRCULAR QUE TO DISPLAY"); return; } for(i=0;i<c;i++) printf("%d \t",arr[i]); c--; } int delete_atfront() { int rdele; if(f>r) return -1; else rdele=arr[f++]; return rdele; } int insert_atrear(int item) { if(c==ARRAY_SIZE) { printf("QUEUE IS FULL"); return; } else if(r!=ARRAY_SIZE-1) { arr[++r]=item; c++; return; } else if(r==ARRAY_SIZE-1) { arr[r-ARRAY_SIZE-1]=item; c++; return; } } main() { int i,rval,value,choice; // static int c=0; printf("ENTER CHOICE\n"); printf("1:INSERT_ATREAR()\n"); printf("2:DELETE_FRONT()\n"); printf("5:DISPLAY()\n"); while(1) { printf("ENTER THE CHOICE:"); scanf("%d",&choice); switch(choice) { case 1: printf("ENETR THE ELEMENT FOR INSERTION AT REAREND:"); scanf("%d",&value); insert_atrear(value); break; case 2: rval=delete_atfront(); printf("REMOVED ELEMENT FROM QUEUE AT FRONT END=%d\n",rval); if(rval==-1&&f>r) { printf("NO ELEMENTS IN QUEUE TO DELETE\n"); exit(1); } break; case 3: display_circular(); break; default: exit(2); } } }
eec752bfa35038599d03d7a26a70b5f1e9646fa8
fbe68d84e97262d6d26dd65c704a7b50af2b3943
/third_party/virtualbox/src/VBox/GuestHost/OpenGL/packer/pack_bounds.c
191383bd49b8f8c852847c38c7fdafe509d73fc2
[ "GPL-2.0-only", "LicenseRef-scancode-unknown-license-reference", "CDDL-1.0", "LicenseRef-scancode-warranty-disclaimer", "GPL-1.0-or-later", "LGPL-2.1-or-later", "GPL-2.0-or-later", "MPL-1.0", "LicenseRef-scancode-generic-exception", "Apache-2.0", "OpenSSL", "MIT" ]
permissive
thalium/icebox
c4e6573f2b4f0973b6c7bb0bf068fe9e795fdcfb
6f78952d58da52ea4f0e55b2ab297f28e80c1160
refs/heads/master
2022-08-14T00:19:36.984579
2022-02-22T13:10:31
2022-02-22T13:10:31
190,019,914
585
109
MIT
2022-01-13T20:58:15
2019-06-03T14:18:12
C++
UTF-8
C
false
false
1,458
c
pack_bounds.c
/* Copyright (c) 2001, Stanford University * All rights reserved * * See the file LICENSE.txt for information on redistributing this software. */ #include "packer.h" #include "cr_opcodes.h" #include "cr_mem.h" void PACK_APIENTRY crPackBoundsInfoCR( CR_PACKER_CONTEXT_ARGDECL const CRrecti *bounds, const GLbyte *payload, GLint len, GLint num_opcodes ) { CR_GET_PACKER_CONTEXT(pc); /* Don't get the buffered_ptr here because we've already * verified that there's enough space for everything. */ unsigned char *data_ptr; int len_aligned, total_len; CR_LOCK_PACKER_CONTEXT(pc); data_ptr = pc->buffer.data_current; len_aligned = ( len + 0x3 ) & ~0x3; total_len = 24 + len_aligned; WRITE_DATA( 0, int, total_len ); WRITE_DATA( 4, int, bounds->x1 ); WRITE_DATA( 8, int, bounds->y1 ); WRITE_DATA( 12, int, bounds->x2 ); WRITE_DATA( 16, int, bounds->y2 ); WRITE_DATA( 20, int, num_opcodes ); /* skip the BOUNDSINFO */ data_ptr += 24; /* put in padding opcodes (deliberately bogus) */ switch ( len_aligned - len ) { case 3: *data_ptr++ = 0xff; RT_FALL_THRU(); case 2: *data_ptr++ = 0xff; RT_FALL_THRU(); case 1: *data_ptr++ = 0xff; RT_FALL_THRU(); default: break; } crMemcpy( data_ptr, payload, len ); WRITE_OPCODE( pc, CR_BOUNDSINFOCR_OPCODE ); pc->buffer.data_current += 24 + len_aligned; CR_UNLOCK_PACKER_CONTEXT(pc); }
0d4798e59478229400618e264975073042ea20c6
bd1d6acf25d13ede554869a290f33e4a7ba81f6a
/libobs-for-HQ-Windows/libobs-opengl/gl-shaderparser.c
61f19dc4cd105ef5b0a5c59329f0ee6d8bcbd5ca
[ "MIT", "GPL-1.0-or-later", "GPL-2.0-only" ]
permissive
estrellaouyang/HQ
59defad372165dd3d4420a45b561063d80c8c96a
53f60929d2e6bdcc04b5eeaf4d775bde23f5660e
refs/heads/master
2020-04-01T19:36:30.353151
2018-10-16T00:35:30
2018-10-16T00:35:30
153,562,633
0
0
MIT
2018-10-18T04:15:40
2018-10-18T04:15:40
null
UTF-8
C
false
false
19,024
c
gl-shaderparser.c
/****************************************************************************** Copyright (C) 2013 by Hugh Bailey <[email protected]> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ #include "gl-subsystem.h" #include "gl-shaderparser.h" static void gl_write_function_contents(struct gl_shader_parser *glsp, struct cf_token **p_token, const char *end); static inline struct shader_var *sp_getparam(struct gl_shader_parser *glsp, struct cf_token *token) { size_t i; for (i = 0; i < glsp->parser.params.num; i++) { struct shader_var *param = glsp->parser.params.array+i; if (strref_cmp(&token->str, param->name) == 0) return param; } return NULL; } static inline size_t sp_getsampler(struct gl_shader_parser *glsp, struct cf_token *token) { size_t i; for (i = 0; i < glsp->parser.samplers.num; i++) { struct shader_sampler *sampler = glsp->parser.samplers.array+i; if (strref_cmp(&token->str, sampler->name) == 0) return i; } return -1; } static inline int cmp_type(const char *name, const size_t name_len, const char *type, const size_t type_len) { size_t min_len = (name_len < type_len) ? type_len : name_len; return astrcmp_n(name, type, min_len); } static bool gl_write_type_n(struct gl_shader_parser *glsp, const char *type, size_t len) { if (cmp_type(type, len, "float2", 6) == 0) dstr_cat(&glsp->gl_string, "vec2"); else if (cmp_type(type, len, "float3", 6) == 0) dstr_cat(&glsp->gl_string, "vec3"); else if (cmp_type(type, len, "float4", 6) == 0) dstr_cat(&glsp->gl_string, "vec4"); else if (cmp_type(type, len, "int2", 4) == 0) dstr_cat(&glsp->gl_string, "ivec2"); else if (cmp_type(type, len, "int3", 4) == 0) dstr_cat(&glsp->gl_string, "ivec3"); else if (cmp_type(type, len, "int4", 4) == 0) dstr_cat(&glsp->gl_string, "ivec4"); else if (cmp_type(type, len, "float3x3", 8) == 0) dstr_cat(&glsp->gl_string, "mat3x3"); else if (cmp_type(type, len, "float3x4", 8) == 0) dstr_cat(&glsp->gl_string, "mat3x4"); else if (cmp_type(type, len, "float4x4", 8) == 0) dstr_cat(&glsp->gl_string, "mat4x4"); else if (cmp_type(type, len, "texture2d", 9) == 0) dstr_cat(&glsp->gl_string, "sampler2D"); else if (cmp_type(type, len, "texture3d", 9) == 0) dstr_cat(&glsp->gl_string, "sampler3D"); else if (cmp_type(type, len, "texture_cube", 12) == 0) dstr_cat(&glsp->gl_string, "samplerCube"); else if (cmp_type(type, len, "texture_rect", 12) == 0) dstr_cat(&glsp->gl_string, "sampler2DRect"); else return false; return true; } static inline void gl_write_type(struct gl_shader_parser *glsp, const char *type) { if (!gl_write_type_n(glsp, type, strlen(type))) dstr_cat(&glsp->gl_string, type); } static inline bool gl_write_type_token(struct gl_shader_parser *glsp, struct cf_token *token) { return gl_write_type_n(glsp, token->str.array, token->str.len); } static void gl_write_var(struct gl_shader_parser *glsp, struct shader_var *var) { if (var->var_type == SHADER_VAR_UNIFORM) dstr_cat(&glsp->gl_string, "uniform "); else if (var->var_type == SHADER_VAR_CONST) dstr_cat(&glsp->gl_string, "const "); gl_write_type(glsp, var->type); dstr_cat(&glsp->gl_string, " "); dstr_cat(&glsp->gl_string, var->name); } static inline void gl_write_params(struct gl_shader_parser *glsp) { size_t i; for (i = 0; i < glsp->parser.params.num; i++) { struct shader_var *var = glsp->parser.params.array+i; gl_write_var(glsp, var); dstr_cat(&glsp->gl_string, ";\n"); } dstr_cat(&glsp->gl_string, "\n"); } static void gl_write_storage_var(struct gl_shader_parser *glsp, struct shader_var *var, bool input, const char *prefix); /* unwraps a structure that's used for input/output */ static void gl_unwrap_storage_struct(struct gl_shader_parser *glsp, struct shader_struct *st, const char *name, bool input, const char *prefix) { struct dstr prefix_str; size_t i; dstr_init(&prefix_str); if (prefix) dstr_copy(&prefix_str, prefix); dstr_cat(&prefix_str, name); dstr_cat(&prefix_str, "_"); for (i = 0; i < st->vars.num; i++) { struct shader_var *st_var = st->vars.array+i; gl_write_storage_var(glsp, st_var, input, prefix_str.array); } dstr_free(&prefix_str); } static void gl_write_storage_var(struct gl_shader_parser *glsp, struct shader_var *var, bool input, const char *prefix) { struct shader_struct *st = shader_parser_getstruct(&glsp->parser, var->type); if (st) { gl_unwrap_storage_struct(glsp, st, var->name, input, prefix); } else { struct gl_parser_attrib attrib; gl_parser_attrib_init(&attrib); dstr_cat(&glsp->gl_string, input ? "in " : "out "); if (prefix) dstr_cat(&attrib.name, prefix); dstr_cat(&attrib.name, var->name); gl_write_type(glsp, var->type); dstr_cat(&glsp->gl_string, " "); dstr_cat_dstr(&glsp->gl_string, &attrib.name); dstr_cat(&glsp->gl_string, ";\n"); attrib.input = input; attrib.mapping = var->mapping; da_push_back(glsp->attribs, &attrib); } } static inline void gl_write_inputs(struct gl_shader_parser *glsp, struct shader_func *main) { size_t i; for (i = 0; i < main->params.num; i++) gl_write_storage_var(glsp, main->params.array+i, true, "inputval_"); dstr_cat(&glsp->gl_string, "\n"); } static void gl_write_outputs(struct gl_shader_parser *glsp, struct shader_func *main) { struct shader_var var = {0}; var.type = main->return_type; var.name = "outputval"; if (main->mapping) var.mapping = main->mapping; gl_write_storage_var(glsp, &var, false, NULL); dstr_cat(&glsp->gl_string, "\n"); } static void gl_write_struct(struct gl_shader_parser *glsp, struct shader_struct *st) { size_t i; dstr_cat(&glsp->gl_string, "struct "); dstr_cat(&glsp->gl_string, st->name); dstr_cat(&glsp->gl_string, " {\n"); for (i = 0; i < st->vars.num; i++) { struct shader_var *var = st->vars.array+i; dstr_cat(&glsp->gl_string, "\t"); gl_write_var(glsp, var); dstr_cat(&glsp->gl_string, ";\n"); } dstr_cat(&glsp->gl_string, "};\n\n"); } static void gl_write_interface_block(struct gl_shader_parser *glsp) { if (glsp->type == GS_SHADER_VERTEX) { dstr_cat(&glsp->gl_string, "out gl_PerVertex {\n" "\tvec4 gl_Position;\n};\n\n"); } } static inline void gl_write_structs(struct gl_shader_parser *glsp) { size_t i; for (i = 0; i < glsp->parser.structs.num; i++) { struct shader_struct *st = glsp->parser.structs.array+i; gl_write_struct(glsp, st); } } /* * NOTE: HLSL-> GLSL intrinsic conversions * atan2 -> atan * clip -> (unsupported) * ddx -> dFdx * ddy -> dFdy * fmod -> mod (XXX: these are different if sign is negative) * frac -> fract * lerp -> mix * lit -> (unsupported) * log10 -> (unsupported) * mul -> (change to operator) * rsqrt -> inversesqrt * saturate -> (use clamp) * tex* -> texture * tex*grad -> textureGrad * tex*lod -> textureLod * tex*bias -> (use optional 'bias' value) * tex*proj -> textureProj * * All else can be left as-is */ static bool gl_write_mul(struct gl_shader_parser *glsp, struct cf_token **p_token) { struct cf_parser *cfp = &glsp->parser.cfp; cfp->cur_token = *p_token; if (!cf_next_token(cfp)) return false; if (!cf_token_is(cfp, "(")) return false; dstr_cat(&glsp->gl_string, "("); gl_write_function_contents(glsp, &cfp->cur_token, ","); dstr_cat(&glsp->gl_string, ") * ("); cf_next_token(cfp); gl_write_function_contents(glsp, &cfp->cur_token, ")"); dstr_cat(&glsp->gl_string, "))"); *p_token = cfp->cur_token; return true; } static bool gl_write_saturate(struct gl_shader_parser *glsp, struct cf_token **p_token) { struct cf_parser *cfp = &glsp->parser.cfp; cfp->cur_token = *p_token; if (!cf_next_token(cfp)) return false; if (!cf_token_is(cfp, "(")) return false; dstr_cat(&glsp->gl_string, "clamp"); gl_write_function_contents(glsp, &cfp->cur_token, ")"); dstr_cat(&glsp->gl_string, ", 0.0, 1.0)"); *p_token = cfp->cur_token; return true; } static inline bool gl_write_texture_call(struct gl_shader_parser *glsp, struct shader_var *var, const char *call, bool sampler) { struct cf_parser *cfp = &glsp->parser.cfp; size_t sampler_id = (size_t)-1; if (!cf_next_token(cfp)) return false; if (!cf_token_is(cfp, "(")) return false; if (sampler) { if (!cf_next_token(cfp)) return false; sampler_id = sp_getsampler(glsp, cfp->cur_token); if (sampler_id == (size_t) -1) return false; if (!cf_next_token(cfp)) return false; if (!cf_token_is(cfp, ",")) return false; } var->gl_sampler_id = sampler_id; dstr_cat(&glsp->gl_string, call); dstr_cat(&glsp->gl_string, "("); dstr_cat(&glsp->gl_string, var->name); dstr_cat(&glsp->gl_string, ", "); return true; } /* processes texture.Sample(sampler, texcoord) */ static bool gl_write_texture_code(struct gl_shader_parser *glsp, struct cf_token **p_token, struct shader_var *var) { struct cf_parser *cfp = &glsp->parser.cfp; bool written = false; cfp->cur_token = *p_token; if (!cf_next_token(cfp)) return false; if (!cf_token_is(cfp, ".")) return false; if (!cf_next_token(cfp)) return false; const char *function_end = ")"; if (cf_token_is(cfp, "Sample")) written = gl_write_texture_call(glsp, var, "texture", true); else if (cf_token_is(cfp, "SampleBias")) written = gl_write_texture_call(glsp, var, "texture", true); else if (cf_token_is(cfp, "SampleGrad")) written = gl_write_texture_call(glsp, var, "textureGrad", true); else if (cf_token_is(cfp, "SampleLevel")) written = gl_write_texture_call(glsp, var, "textureLod", true); else if (cf_token_is(cfp, "Load")) { written = gl_write_texture_call(glsp, var, "texelFetch", false); dstr_cat(&glsp->gl_string, "("); function_end = ").xy, 0)"; } if (!written) return false; if (!cf_next_token(cfp)) return false; gl_write_function_contents(glsp, &cfp->cur_token, ")"); dstr_cat(&glsp->gl_string, function_end); *p_token = cfp->cur_token; return true; } static bool gl_write_intrinsic(struct gl_shader_parser *glsp, struct cf_token **p_token) { struct cf_token *token = *p_token; bool written = true; if (strref_cmp(&token->str, "atan2") == 0) { dstr_cat(&glsp->gl_string, "atan2"); } else if (strref_cmp(&token->str, "ddx") == 0) { dstr_cat(&glsp->gl_string, "dFdx"); } else if (strref_cmp(&token->str, "ddy") == 0) { dstr_cat(&glsp->gl_string, "dFdy"); } else if (strref_cmp(&token->str, "frac") == 0) { dstr_cat(&glsp->gl_string, "fract"); } else if (strref_cmp(&token->str, "lerp") == 0) { dstr_cat(&glsp->gl_string, "mix"); } else if (strref_cmp(&token->str, "fmod") == 0) { dstr_cat(&glsp->gl_string, "mod"); } else if (strref_cmp(&token->str, "rsqrt") == 0) { dstr_cat(&glsp->gl_string, "inversesqrt"); } else if (strref_cmp(&token->str, "saturate") == 0) { written = gl_write_saturate(glsp, &token); } else if (strref_cmp(&token->str, "mul") == 0) { written = gl_write_mul(glsp, &token); } else { struct shader_var *var = sp_getparam(glsp, token); if (var && astrcmp_n(var->type, "texture", 7) == 0) written = gl_write_texture_code(glsp, &token, var); else written = false; } if (written) *p_token = token; return written; } static void gl_write_function_contents(struct gl_shader_parser *glsp, struct cf_token **p_token, const char *end) { struct cf_token *token = *p_token; if (token->type != CFTOKEN_NAME || ( !gl_write_type_token(glsp, token) && !gl_write_intrinsic(glsp, &token))) dstr_cat_strref(&glsp->gl_string, &token->str); while (token->type != CFTOKEN_NONE) { token++; if (end && strref_cmp(&token->str, end) == 0) break; if (token->type == CFTOKEN_NAME) { if (!gl_write_type_token(glsp, token) && !gl_write_intrinsic(glsp, &token)) dstr_cat_strref(&glsp->gl_string, &token->str); } else if (token->type == CFTOKEN_OTHER) { if (*token->str.array == '{') gl_write_function_contents(glsp, &token, "}"); else if (*token->str.array == '(') gl_write_function_contents(glsp, &token, ")"); dstr_cat_strref(&glsp->gl_string, &token->str); } else { dstr_cat_strref(&glsp->gl_string, &token->str); } } *p_token = token; } static void gl_write_function(struct gl_shader_parser *glsp, struct shader_func *func) { size_t i; struct cf_token *token; gl_write_type(glsp, func->return_type); dstr_cat(&glsp->gl_string, " "); if (strcmp(func->name, "main") == 0) dstr_cat(&glsp->gl_string, "_main_wrap"); else dstr_cat(&glsp->gl_string, func->name); dstr_cat(&glsp->gl_string, "("); for (i = 0; i < func->params.num; i++) { struct shader_var *param = func->params.array+i; if (i > 0) dstr_cat(&glsp->gl_string, ", "); gl_write_var(glsp, param); } dstr_cat(&glsp->gl_string, ")\n"); token = func->start; gl_write_function_contents(glsp, &token, "}"); dstr_cat(&glsp->gl_string, "}\n\n"); } static inline void gl_write_functions(struct gl_shader_parser *glsp) { size_t i; for (i = 0; i < glsp->parser.funcs.num; i++) { struct shader_func *func = glsp->parser.funcs.array+i; gl_write_function(glsp, func); } } static inline void gl_write_main_interface_assign( struct gl_shader_parser *glsp, struct shader_var *var, const char *src) { /* vertex shaders: write gl_Position */ if (glsp->type == GS_SHADER_VERTEX && strcmp(var->mapping, "POSITION") == 0) { dstr_cat(&glsp->gl_string, "\tgl_Position = "); dstr_cat(&glsp->gl_string, src); dstr_cat(&glsp->gl_string, var->name); dstr_cat(&glsp->gl_string, ";\n"); } } static void gl_write_main_storage_assign(struct gl_shader_parser *glsp, struct shader_var *var, const char *dst, const char *src, bool input) { struct shader_struct *st; struct dstr dst_copy = {0}; char ch_left = input ? '.' : '_'; char ch_right = input ? '_' : '.'; if (dst) { dstr_copy(&dst_copy, dst); dstr_cat_ch(&dst_copy, ch_left); } else { dstr_copy(&dst_copy, "\t"); } dstr_cat(&dst_copy, var->name); st = shader_parser_getstruct(&glsp->parser, var->type); if (st) { struct dstr src_copy = {0}; size_t i; if (src) dstr_copy(&src_copy, src); dstr_cat(&src_copy, var->name); dstr_cat_ch(&src_copy, ch_right); for (i = 0; i < st->vars.num; i++) { struct shader_var *st_var = st->vars.array+i; gl_write_main_storage_assign(glsp, st_var, dst_copy.array, src_copy.array, input); } dstr_free(&src_copy); } else { if (!dstr_is_empty(&dst_copy)) dstr_cat_dstr(&glsp->gl_string, &dst_copy); dstr_cat(&glsp->gl_string, " = "); if (src) dstr_cat(&glsp->gl_string, src); dstr_cat(&glsp->gl_string, var->name); dstr_cat(&glsp->gl_string, ";\n"); if (!input) gl_write_main_interface_assign(glsp, var, src); } dstr_free(&dst_copy); } static inline void gl_write_main_storage_inputs(struct gl_shader_parser *glsp, struct shader_func *main) { gl_write_main_storage_assign(glsp, main->params.array, NULL, "inputval_", true); } static inline void gl_write_main_storage_outputs(struct gl_shader_parser *glsp, struct shader_func *main) { /* we only do this *if* we're writing a struct, because otherwise * the call to 'main' already does the assignment for us */ if (!main->mapping) { struct shader_var var = {0}; var.name = "outputval"; var.type = (char*)main->return_type; dstr_cat(&glsp->gl_string, "\n"); gl_write_main_storage_assign(glsp, &var, NULL, NULL, false); } } static inline void gl_write_main_vars(struct gl_shader_parser *glsp, struct shader_func *main_func) { size_t i; for (i = 0; i < main_func->params.num; i++) { dstr_cat(&glsp->gl_string, "\t"); dstr_cat(&glsp->gl_string, main_func->params.array[i].type); dstr_cat(&glsp->gl_string, " "); dstr_cat(&glsp->gl_string, main_func->params.array[i].name); dstr_cat(&glsp->gl_string, ";\n"); } if (!main_func->mapping) { dstr_cat(&glsp->gl_string, "\t"); dstr_cat(&glsp->gl_string, main_func->return_type); dstr_cat(&glsp->gl_string, " outputval;\n\n"); } } static inline void gl_write_main_func_call(struct gl_shader_parser *glsp, struct shader_func *main_func) { size_t i; dstr_cat(&glsp->gl_string, "\n\toutputval = _main_wrap("); for (i = 0; i < main_func->params.num; i++) { if (i) dstr_cat(&glsp->gl_string, ", "); dstr_cat(&glsp->gl_string, main_func->params.array[i].name); } dstr_cat(&glsp->gl_string, ");\n"); } static void gl_write_main(struct gl_shader_parser *glsp, struct shader_func *main) { dstr_cat(&glsp->gl_string, "void main(void)\n{\n"); gl_write_main_vars(glsp, main); gl_write_main_storage_inputs(glsp, main); gl_write_main_func_call(glsp, main); gl_write_main_storage_outputs(glsp, main); dstr_cat(&glsp->gl_string, "}\n"); } /* ugh, don't ask. I'll probably get rid of the need for this function later */ static void gl_rename_attributes(struct gl_shader_parser *glsp) { size_t i = 0, input_idx = 0, output_idx = 0; for (i = 0; i < glsp->attribs.num; i++) { struct gl_parser_attrib *attrib = glsp->attribs.array+i; struct dstr new_name = {0}; const char *prefix; size_t val; if (attrib->input) { prefix = glsp->input_prefix; val = input_idx++; } else { prefix = glsp->output_prefix; val = output_idx++; } dstr_printf(&new_name, "%s%u", prefix, (unsigned int)val); dstr_replace(&glsp->gl_string, attrib->name.array, new_name.array); dstr_move(&attrib->name, &new_name); } } static bool gl_shader_buildstring(struct gl_shader_parser *glsp) { struct shader_func *main_func; main_func = shader_parser_getfunc(&glsp->parser, "main"); if (!main_func) { blog(LOG_ERROR, "function 'main' not found"); return false; } dstr_copy(&glsp->gl_string, "#version 150\n\n"); gl_write_params(glsp); gl_write_inputs(glsp, main_func); gl_write_outputs(glsp, main_func); gl_write_interface_block(glsp); gl_write_structs(glsp); gl_write_functions(glsp); gl_write_main(glsp, main_func); gl_rename_attributes(glsp); return true; } bool gl_shader_parse(struct gl_shader_parser *glsp, const char *shader_str, const char *file) { bool success = shader_parse(&glsp->parser, shader_str, file); char *str = shader_parser_geterrors(&glsp->parser); if (str) { blog(LOG_WARNING, "Shader parser errors/warnings:\n%s\n", str); bfree(str); } if (success) success = gl_shader_buildstring(glsp); return success; }
969b8fc9567a047a9f86a30e9c758a9c0529b4e2
d239d37e2c3646ed51b7402bd92da18666af5d79
/src/jscore-value-private.h
c914bf91eb64cdb0fdf37d1deee7bf75f521aff0
[]
no_license
amazari/javascriptcore-gobject
7b5c3dc34a5dbf345a29e99d613a9fd368216cb9
f5c1173942f41f0443b7b96806b095731859238e
refs/heads/master
2021-01-19T00:47:08.122096
2011-04-13T16:23:14
2011-04-13T16:23:14
1,610,128
0
0
null
null
null
null
UTF-8
C
false
false
78
h
jscore-value-private.h
gchar *jscore_value_get_string_real (JSContextRef context, JSValueRef value);
2adba37b50d992ec1b5513670ec8cde743fd813c
b945b2fac11f237a49de33af1b8fa02ba3ed1814
/legacy/pdm/tools/PDMctools.c
e30584875cdf26de1cce4b45e78be80309a0098c
[]
no_license
ahundiak/isdp
b94f56f7a7b02b806209ff06da8e22497f6e1386
07572eb18f07cbf762505ef34e471fa47c102df4
refs/heads/master
2021-03-12T20:02:34.067237
2011-12-16T20:03:20
2011-12-16T20:03:20
37,136,442
0
0
null
null
null
null
UTF-8
C
false
false
16,286
c
PDMctools.c
#include <stdio.h> #include "SQLerrordef.h" #include "MEMerrordef.h" #include "NFMerrordef.h" #include "PDMdbs_err.h" #include "MEMstruct.h" #include "PDMproto.h" #include "PDUerror.h" #include "SQLstruct.h" static long status; static char s[1024]; extern int PDMdebug_on; extern char PDM_DEBUG_FILE[]; /* this decl added to support query of db error message MaC 051593 */ extern struct SQLglobal_st SQLglobal; int PDMquery_cit_members(user_id,catalog,part,rev, level,attr_bufr,ret_bufr) long user_id; char *catalog; char *part; char *rev; int level; MEMptr *attr_bufr; MEMptr *ret_bufr; { long n_pcatalogno; long n_pitemno; char temp_table[30]; char sql_str[1024]; char n_catalogname[20]; char n_itemname[30]; char n_itemrev[30]; char **data; int i,nxi; MEMptr temp_bufr = NULL; PDMdebug("ENTER:PDMquery_cit_members\n"); /* APOGEE START */ sprintf (s, "Added for ACC: user_id = %d and level = %d\n", user_id, level); PDMdebug (s); /* APOGEE END */ status = PDMquery_catalog_partnos(catalog,part,rev, &n_pcatalogno,&n_pitemno); if(status != PDM_S_SUCCESS) { return(status); } sprintf(sql_str,"%s %s %d %s %d ", "SELECT n_ccatalogno,n_citemno,n_citno FROM nfmsetcit ", "WHERE n_pcatalogno = ",n_pcatalogno, "AND n_pitemno = ",n_pitemno); status = SQLquery(sql_str,&temp_bufr,1024); if(status != SQL_S_SUCCESS) { if(status == SQL_I_NO_ROWS_FOUND) { status = PDMopen_set_buffer(ret_bufr); MEMopen(attr_bufr,512); return(PDM_S_SUCCESS); } status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(temp_bufr); if(status != MEM_S_SUCCESS) { MEMclose(&temp_bufr); return(PDM_E_BUILD_ARRAY); } data = (char **) temp_bufr->data_ptr; PDMgen_bomtable_name(temp_table); sprintf(sql_str,"%s %s %s %s %s", "CREATE TABLE ",temp_table, "(n_catalogno integer,n_itemno integer ,", "n_catalogname char(20), n_itemname char(30),", "n_itemrev char(30),n_citno integer)"); status = SQLstmt(sql_str); if(status != SQL_S_SUCCESS) { MEMclose(&temp_bufr); return(PDM_E_SQL_QUERY); } for(i=0;i<temp_bufr->rows;i++) { nxi = i * temp_bufr->columns; sprintf(s,"VALUES(%s,%s,'','','',%d)",data[nxi+0], data[nxi+1],atol(data[nxi+2])); sprintf(sql_str,"%s %s %s %s %s ", "INSERT INTO ",temp_table, "(n_catalogno,n_itemno,n_catalogname,", "n_itemname,n_itemrev,n_citno)", s); status = SQLstmt(sql_str); if(status != SQL_S_SUCCESS) { MEMclose(&temp_bufr); sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); return(PDM_E_SQL_STMT); } } MEMclose(&temp_bufr); sprintf(sql_str,"SELECT DISTINCT n_catalogno FROM %s", temp_table); status = SQLquery(sql_str,&temp_bufr,1024); if(status != SQL_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(temp_bufr); if(status != MEM_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); MEMclose(&temp_bufr); return(PDM_E_BUILD_ARRAY); } data = (char **) temp_bufr->data_ptr; for(i=0;i<temp_bufr->rows;i++) { PDMget_catalog_name(atol(data[i]),n_catalogname); sprintf(sql_str,"%s %s %s '%s' %s %d", "UPDATE ", temp_table,"SET n_catalogname = ", n_catalogname, "WHERE n_catalogno = ",atol(data[i])); status = SQLstmt(sql_str); if(status != SQL_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); MEMclose(&temp_bufr); return(PDM_E_SQL_STMT); } } MEMclose(&temp_bufr); sprintf(sql_str,"SELECT DISTINCT n_itemno,n_catalogname FROM %s", temp_table); status = SQLquery(sql_str,&temp_bufr,1024); if(status != SQL_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(temp_bufr); if(status != MEM_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); MEMclose(&temp_bufr); return(PDM_E_BUILD_ARRAY); } data = (char **) temp_bufr->data_ptr; for(i=0;i<temp_bufr->rows;i++) { nxi = i * temp_bufr->columns; PDMget_itemname(atol(data[nxi+0]),data[nxi+1], n_itemname,n_itemrev); sprintf(sql_str,"%s %s %s '%s' %s '%s' %s %d %s '%s'", "UPDATE ", temp_table, "SET n_itemname = ",n_itemname, ",n_itemrev = ",n_itemrev, "WHERE n_itemno= ",atol(data[nxi+0]), " AND n_catalogname = ",data[nxi+1]); status = SQLstmt(sql_str); if(status != SQL_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); MEMclose(&temp_bufr); return(PDM_E_SQL_STMT); } } MEMclose(&temp_bufr); status = PDMopen_set_buffer(ret_bufr); if(status != PDM_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); return(status); } sprintf(sql_str,"%s %s ", "SELECT n_catalogname,n_itemname,n_itemrev,n_citno FROM ", temp_table); status = SQLquery(sql_str,&temp_bufr,1024); if(status != SQL_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(temp_bufr); if(status != MEM_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); return(PDM_E_BUILD_ARRAY); } data = (char **) temp_bufr->data_ptr; for(i=0;i<temp_bufr->rows;i++) { nxi = i * temp_bufr->columns; sprintf(s,"\1%s\1%s\1%s\1%s\1\1\1\1\1\1", data[nxi+3],data[nxi+0],data[nxi+1],data[nxi+2]); status = MEMwrite(*ret_bufr,s); if(status != MEM_S_SUCCESS) { sprintf(sql_str,"DROP TABLE %s ",temp_table); SQLstmt(sql_str); return(PDM_E_WRITE_ROW); } } MEMopen(attr_bufr,512); sprintf(sql_str,"DROP TABLE %s",temp_table); SQLstmt(sql_str); if(PDMdebug_on) { MEMprint_buffer("set bufr in PDMquery_cit_members", *ret_bufr,PDM_DEBUG_FILE); } PDMdebug("EXIT:PDMquery_cit_members\n"); return(PDM_S_SUCCESS); } int PDMget_catalog_name(no,name) long no; char *name; { char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str,"%s %s %d", "SELECT n_catalogname FROM nfmcatalogs ", "WHERE n_catalogno = ",no); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; strcpy(name,data[0]); MEMclose (&bufr); return(PDM_S_SUCCESS); } int PDMget_itemname(no,catalog,itemnum,itemrev) long no; char *catalog; char *itemnum; char *itemrev; { char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str,"%s %s %s %d", "SELECT n_itemname,n_itemrev FROM ",catalog, "WHERE n_itemno = ",no); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; strcpy(itemnum,data[0]); strcpy(itemrev,data[1]); MEMclose(&bufr); return(PDM_S_SUCCESS); } int PDMopen_set_buffer(ret_bufr) MEMptr *ret_bufr; { MEMptr data_bufr = NULL; MEMopen(&data_bufr,1024); MEMwrite_format(data_bufr,"n_level","integer"); MEMwrite_format(data_bufr,"n_citno","integer"); MEMwrite_format(data_bufr,"n_catalogname","char(20)"); MEMwrite_format(data_bufr,"n_itemname","char(30)"); MEMwrite_format(data_bufr,"n_itemrev","char(30)"); MEMwrite_format(data_bufr,"n_type","char(1)"); MEMwrite_format(data_bufr,"n_archiveno","integer"); MEMwrite_format(data_bufr,"n_archiveflag","char(1)"); MEMwrite_format(data_bufr,"n_setindicator","char(1)"); MEMwrite_format(data_bufr,"n_status","char(2)"); MEMwrite_format(data_bufr,"n_status","char(10)"); *ret_bufr = data_bufr; return(PDM_S_SUCCESS); } int PDMcount_cit_attachments(p_citno,count) int p_citno; int *count; { char sql_str[1024]; /* APOGEE START */ /* char **data; */ /* APOGEE END */ MEMptr temp_bufr = NULL; PDMdebug("ENTER:PDMcount_cit_attachments\n"); sql_str[0] = '\0'; sprintf(sql_str,"%s %s %d %s '%s' ", "SELECT p_citno , p_attached FROM pdmcit ", "WHERE p_citno = ",p_citno, "AND p_attached = ","Y"); status = SQLquery(sql_str,&temp_bufr,512); if(status != SQL_S_SUCCESS) { if(status == SQL_I_NO_ROWS_FOUND) { *count = 0; return(PDM_S_SUCCESS); } status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(temp_bufr); if(status != MEM_S_SUCCESS) { MEMclose(&temp_bufr); return(PDM_E_BUILD_ARRAY); } *count = temp_bufr->rows; MEMclose(&temp_bufr); PDMdebug("EXIT:PDMcount_cit_attachments\n"); return(PDM_S_SUCCESS); } int PDMcount_bom_attachments(p_type,bom_name,n_catalogname, n_itemname,n_itemrev,p_level,count) char *bom_name; char *n_catalogname ; char *n_itemname; char *n_itemrev; int p_level; int *count; int p_type; { char sql_str[1024]; /* APOGEE START */ /* char **data; */ /* APOGEE END */ MEMptr temp_bufr = NULL; PDMdebug("ENTER:PDMcount_bom_attachments\n"); if(p_type == 7) { sql_str[0] = '\0'; sprintf(sql_str,"%s %s %s '%s' %s '%s' %s '%s' %s '%s' %s %d", "SELECT n_itemname FROM ",bom_name, "WHERE n_catalogname = ",n_catalogname, "AND n_itemname = ",n_itemname, "AND n_itemrev = ",n_itemrev, "AND p_attached = ","Y", "AND p_level = ",p_level); } else { sprintf(sql_str,"%s %s %s '%s' %s '%s' %s '%s' %s '%s'", "SELECT n_itemname FROM ",bom_name, "WHERE n_catalogname = ",n_catalogname, "AND n_itemname = ",n_itemname, "AND n_itemrev = ",n_itemrev, "AND p_attached = ","Y"); } status = SQLquery(sql_str,&temp_bufr,512); if(status != SQL_S_SUCCESS) { if(status == SQL_I_NO_ROWS_FOUND) { *count = 0; return(PDM_S_SUCCESS); } status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(temp_bufr); if(status != MEM_S_SUCCESS) { MEMclose(&temp_bufr); return(PDM_E_BUILD_ARRAY); } *count = temp_bufr->rows; MEMclose(&temp_bufr); PDMdebug("EXIT:PDMcount_bom_attachments\n"); return(PDM_S_SUCCESS); } int PDMget_itemname_filever (no, catalog, itemnum, itemrev, filenum, filever) long no; char *catalog; char *itemnum; char *itemrev; int *filenum; int *filever; { char *fn = "PDMget_itemname_filever"; char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str, "SELECT %s.n_itemname, %s.n_itemrev, f_%s.n_filenum, f_%s.n_fileversion \ FROM %s, f_%s\ WHERE %s.n_itemno = f_%s.n_itemnum\ AND %s.n_itemno = %d", catalog, catalog, catalog, catalog, catalog, catalog, catalog, catalog, catalog, no); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; _PDMdebug (fn, "itemnum[%s] itemrev[%s] filenum[%s] and filever[%s]\n", data[0], data[1], data[2], data[3]); strcpy(itemnum,data[0]); strcpy(itemrev,data[1]); *filenum = atol (data[2]); *filever = atol (data[3]); MEMclose(&bufr); return(PDM_S_SUCCESS); } int PDMget_max_filever (no, catalog, filever) long no; char *catalog; int *filever; { char *fn = "PDMget_max_filever"; char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str, "SELECT MAX ( n_fileversion) FROM f_%s WHERE n_itemnum = %d", catalog, no); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; _PDMdebug (fn, "filever[%s]\n", data[0]); /* *filenum = atol (data[2]); */ *filever = atol (data[0]); MEMclose(&bufr); return(PDM_S_SUCCESS); } int PDMget_filenum (no, catalog, filename, filenum) long no; char *catalog, *filename; int *filenum; { char *fn = "PDMget_itemname_filever"; char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str, "SELECT n_filenum FROM f_%s WHERE n_itemnum = %d AND n_cofilename = '%s'", catalog, no, filename); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; _PDMdebug (fn, "filenum[%s]\n", data[0]); *filenum = atol (data[0]); /* *filever = atol (data[0]); */ MEMclose(&bufr); return(PDM_S_SUCCESS); } int PDMget_projectno (project_name, project_no) int *project_no; char *project_name; { char *fn = "PDMget_projectno"; char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str, "SELECT n_projectno FROM NFMPROJECTS WHERE n_projectname = '%s'", project_name); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { _PDMdebug (fn, "MEMbuild_array failed %d\n", status); return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; _PDMdebug (fn, "project_no [%s] \n", data [0]); *project_no = atol ( data[0]); MEMclose(&bufr); return(PDM_S_SUCCESS); } int PDMget_max_filever_fname (no, catalog, filenum, filever) int no, filenum; char *catalog; int *filever; { char *fn = "PDMget_max_filever_fname"; char sql_str[512]; MEMptr bufr = NULL; char **data; sql_str[0] = '\0'; sprintf(sql_str, "SELECT MAX ( n_fileversion) FROM f_%s WHERE n_itemnum = %d AND n_filenum = %d", catalog, no, filenum); status = SQLquery(sql_str,&bufr,512); if(status != SQL_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); status = _PDMget_db_error (status); return(status); } status = MEMbuild_array(bufr); if(status != MEM_S_SUCCESS) { _PDMdebug (fn, "SQLquery failed %d\n", status); return(PDM_E_BUILD_ARRAY); } data = (char **) bufr->data_ptr; _PDMdebug (fn, "filever[%s]\n", data[0]); /* *filenum = atol (data[2]); */ *filever = atol (data[0]); MEMclose(&bufr); return(PDM_S_SUCCESS); } /* Commented out as this func was called in PDMpart_f.c which is included making PDMinit image. This function is added to tools/PDMpart_f.c. MaC 052493... int _PDMget_db_error (status2) int status2; { char *fn = "_PDMget_db_error"; int errorno = 0; int errorno1 = 0; int status1 = 0; errorno = (SQLglobal.DBerror_no >> 16); errorno1 = SQLglobal.DBerror_no; _PDMdebug (fn, "sql_global_error = %d \n", SQLglobal.DBerror_no); _PDMdebug ("Printing SQLglobal struct", "\nris_print_format[%s]\n", SQLglobal.ris_print_format); _PDMdebug ("Printing SQLglobal struct", "\nDBerrorno[%d]\n", SQLglobal.DBerror_no); _PDMdebug ("Printing SQLglobal struct", "\nDBerror_msg[%s]\n", SQLglobal.DBerror_msg); _PDMdebug ("Printing SQLglobal struct", "\ndb_type[%c]\n", SQLglobal.db_type); _PDMdebug (fn, "errorno [%d]\n", errorno); _PDMdebug (fn, "errorno1 [%d]\n", errorno1); if ( (errorno == 107) || (errorno == 113) || (errorno == 233) || (errorno == 271) ) { status1 = PDM_I_TABLE_LOCKED; } else { if (status2 == SQL_E_MESSAGE) status1 = PDM_E_SQL_QUERY; else status1 = status2; } return(status1); } */
f6f73346277308ed2f7919e27b584065544aa7be
c2cedcf36667730f558ab354bea4505b616c90d2
/players/pestilence/Cahara/room/whut.c
dfbb9f9ebc1a05dc8e30b16e7265323cfff4c631
[]
no_license
wugouzi/Nirvlp312mudlib
965ed876c7080ab00e28c5d8cd5ea9fc9e46258f
616cad7472279cc97c9693f893940f5336916ff8
refs/heads/master
2023-03-16T03:45:05.510851
2017-09-21T17:05:00
2017-09-21T17:05:00
null
0
0
null
null
null
null
UTF-8
C
false
false
837
c
whut.c
#include "/players/pestilence/ansi.h" #define TP this_player() inherit "room/room"; reset(arg) { if(arg) return; if (!present("cannibal")) { move_object(clone_object("/players/pestilence/Cahara/mob/cannibal.c"), this_object()); } short_desc = ""+YEL+"Cahara Island Hut"+NORM+""; long_desc = " This is a normal mud hut. The walls are made entirely of mud, with\n"+ "no windows. The floor is a dirt floor, the roof is made from plants\n"+ "and other shrubbery. It consists of one large room. There is a small\n"+ "stone table near the north wall, with a fireplace built into the north wall.\n"+ "On the west side of the room, there is an area that is made up for three people.\n"+ "to sleep\n"; set_light(1); items = ({ }); dest_dir = ({ "/players/pestilence/Cahara/room/nwvillage.c","east", }); }
e38d8630f2deb0f6edb804040a3338002adf35f8
50e0ea0f3e84d00a326fb55cc646d7ef78a56243
/test/test_ft_strlen.c
82a3fee0c69fa7069a3fe7e9024daae40bb6d2f3
[]
no_license
Sherchryst/libasm
49b8d2bee3b749f4192b2446a3307cc27d82725e
92c32ee0bd11f5dacd59620f2beef7827cb6eb9d
refs/heads/master
2023-04-28T09:05:03.124874
2021-05-15T19:35:28
2021-05-15T19:35:28
247,191,341
0
0
null
null
null
null
UTF-8
C
false
false
2,297
c
test_ft_strlen.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* test_ft_strlen.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: sgah <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/03/14 04:06:46 by sgah #+# #+# */ /* Updated: 2020/11/28 07:27:48 by user42 ### ########.fr */ /* */ /* ************************************************************************** */ #include "test.h" #define FT_STRLEN_EXPECT(str) do { \ actual = ft_strlen(str); \ expected = strlen(str); \ if (actual != expected) \ printf("KO: [COMPARE]: %s: expected: %d got: %d \nwith: "#str"\n", \ test_name, expected, actual); \ else \ printf("OK: [COMPARE]: %s: expected: %d got: %d \nwith: "#str"\n", \ test_name, expected, actual); \ } while (0); void test_ft_strlen() { char *test_name = "ft_strlen.s"; int expected; int actual; FT_STRLEN_EXPECT(""); FT_STRLEN_EXPECT("bon"); FT_STRLEN_EXPECT("bonjour"); FT_STRLEN_EXPECT("asdfasdf''///##!!@"); FT_STRLEN_EXPECT("the\0hidden"); FT_STRLEN_EXPECT("Lorem ipsum dolor sit amet, consectetur adipiscing\ elit. Sed in malesuada purus. Etiam a scelerisque massa. Ut non euismod elit. Aliquam\ bibendum dolor mi, id fringilla tellus pulvinar eu. Fusce vel fermentum sem. Cras\ volutpat, eros eget rhoncus rhoncus, diam augue egestas dolor, vitae rutrum nisi\ felis sed purus. Mauris magna ex, mollis non suscipit eu, lacinia ac turpis. Phasellus\ ac tortor et lectus fermentum lobortis eu at mauris. Vestibulum sit amet posuere\ tortor, sit amet consequat amet."); }
bcd9d4a8f439e6a4d41cd7e3a527119f65a7b45b
c1de0781b6bbe1f2717fe79199e3910ac9421e99
/str.c
d7d85e906f135a8454950cf5c35ebd0a8ca7fe64
[]
no_license
VinneyJ/simple_shell
a01835ccfcaa73b0fefca55dc974a606a7b786c8
b6f245ab094ebe384938ac84982fc3c452938e22
refs/heads/main
2023-04-22T21:51:41.634768
2021-04-29T06:34:46
2021-04-29T06:34:46
356,224,563
0
1
null
null
null
null
UTF-8
C
false
false
1,875
c
str.c
#include "holberton.h" #include <stdlib.h> /** * _strlen - measure the length of a string. * * @s: the string to be measured. * * Return: the length of the string. */ int _strlen(const char *s) { int l; for (l = 0; s[l]; l++) ; return (l); } /** * _strcpy - copy a string from source to destination. * * @dest: the destination of the string to be copied to. * @src: the source of the string to be copied. * * Return: the pointer to the destination. */ char *_strcpy(char *dest, char *src) { int i; char *buff = dest; for (i = 0; src[i] != '\0'; i++) dest[i] = src[i]; dest[i] = src[i]; return (buff); } /** * _strcmp - compares two strings. * * @s1: the first string. * @s2: the second string. * * Return: 0 if they are equal, positive if s1 is greater and negative if less. */ int _strcmp(char *s1, char *s2) { int i, j; for (i = 0, j = 0; (s1[i] != '\0') && (s2[i] != '\0'); i++) { j = s1[i] - s2[i]; if (j != 0) break; } return (j); } /** * _strncmp - Compare two strings. * @s1: Pointer to first string. * @s2: Pointer to second string. * @n: The first n bytes of the strings to compare. * * Return: negative number if s1 is shorter than s2, 0 if they * match, positive number if s1 is longer than s2. */ int _strncmp(const char *s1, const char *s2, size_t n) { size_t i; for (i = 0; s1[i] && s2[i] && i < n; i++) { if (s1[i] > s2[i]) return (s1[i] - s2[i]); else if (s1[i] < s2[i]) return (s1[i] - s2[i]); } if (i == n) return (0); else return (-1); } /** * _strdup - duplicates a string in memory. * * @s: string to be duplicated. * * Return: duplicated string. */ char *_strdup(char *s) { char *buff; unsigned int len; len = _strlen(s); buff = malloc(sizeof(char) * (len + 1)); if (buff == NULL) return (NULL); _memcpy(buff, s, len + 1); return (buff); }
ce7afb348110a16109787828f7804afd7d95bcd6
b0a203476e709e103aa2f7a3b9d01ab774ccda5b
/C5/4T/5.4.c
bacd37f72b417e6096bd0761b69986f73cda2126
[]
no_license
20191864205/G19
5cc7bcf15f00b24485800af46323d4cafc77162a
e5624b154b90e84852858ebfcbb071945daa29d9
refs/heads/master
2020-08-19T15:37:19.411019
2019-12-19T07:32:00
2019-12-19T07:32:00
215,931,300
1
0
null
null
null
null
GB18030
C
false
false
344
c
5.4.c
#include <stdio.h> int main() { char c; int i = 0, j = 0, k = 0, l = 0; while ((c = getchar()) != '\n') { if (c >= 65 && c <= 90 || c > 97 && c <= 122) i++; else if (c >= 48 && c <= 57) j++; else if (c == 32) k++; else l++; } printf("字母%d个\t数字%d个\t空格%d个\t其他字符%d个\n",i,j,k,l); return 0; }
fc93e835386f20bbf03ba8cf16b217d25e08b66d
3b0486ae1d55745b3a2af73899a388170d8f388d
/Assets/_Packs/LibMmd/Plugins/BulletUnity/Native/iOS/btMultiBodyPoint2Point_wrap.h
8b75ea51bfcc2b4941c1853c6f42d5df6923364d
[ "Zlib", "BSD-3-Clause", "MIT", "Apache-2.0" ]
permissive
ttoyou/MikuMikuXR
05da1d77216a728587d1d5603b63d019c4c91116
b2c7a1b303a60b4348ce5e36f55c8b3e1059ed99
refs/heads/master
2020-08-03T17:42:38.112353
2019-09-30T12:18:43
2019-09-30T12:18:43
211,831,094
1
1
BSD-3-Clause
2019-09-30T10:06:28
2019-09-30T10:06:26
null
UTF-8
C
false
false
572
h
btMultiBodyPoint2Point_wrap.h
#include "main.h" extern "C" { EXPORT btMultiBodyPoint2Point* btMultiBodyPoint2Point_new(btMultiBody* body, int link, btRigidBody* bodyB, const btScalar* pivotInA, const btScalar* pivotInB); EXPORT btMultiBodyPoint2Point* btMultiBodyPoint2Point_new2(btMultiBody* bodyA, int linkA, btMultiBody* bodyB, int linkB, const btScalar* pivotInA, const btScalar* pivotInB); EXPORT void btMultiBodyPoint2Point_getPivotInB(btMultiBodyPoint2Point* obj, btScalar* pivotInB); EXPORT void btMultiBodyPoint2Point_setPivotInB(btMultiBodyPoint2Point* obj, const btScalar* pivotInB); }