blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 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-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
0c0f3e19b7cf62cce217c81a05ce9c674a970a82
b3216223376513a0bf645d381973491994ef71f1
/testCase/inletOutletFlow/0.05/f
e53d07aeda70f42e6f8b2a87449222d64ae09f5c
[]
no_license
pramilasneh/immersedBodyMethod-functionObject
2cab78713695c646b944eefe6c0e6033923e3f49
46aa0396d152a20482453d14ef75109e9769ea15
refs/heads/master
2020-03-31T18:56:21.934866
2018-10-10T19:45:51
2018-10-10T19:45:51
152,479,104
0
0
null
2018-10-10T19:34:47
2018-10-10T19:34:47
null
UTF-8
C++
false
false
49,231
f
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0.05"; object f; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -2 0 0 0 0]; internalField nonuniform List<vector> 5400 ( (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (-0.0122644 0.219488 0) (-0.718513 6.22671 0) (-4.51722 30.0128 0) (-11.7185 57.6057 0) (-18.1494 59.0409 0) (-17.959 36.7134 0) (-10.2133 13.5119 0) (-2.67792 2.34454 0) (-0.180944 0.10058 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0414803 0.0933081 0) (4.70226 13.6374 0) (33.0029 112.731 0) (83.0391 307.765 0) (114.811 459.199 0) (103.478 499.208 0) (43.9101 474.922 0) (-40.8226 390.839 0) (-85.0947 237.431 0) (-61.0898 89.9096 0) (-19.3967 18.2866 0) (-2.04039 1.37013 0) (-0.00111239 0.000824774 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.327857 0.508355 0) (20.8445 34.6137 0) (140.342 249.787 0) (352.353 596.875 0) (514.84 730.449 0) (552.51 642.175 0) (482.797 611.643 0) (337.877 709.074 0) (116.799 787.928 0) (-124.114 673.142 0) (-219.622 390.735 0) (-138.232 139.625 0) (-37.1512 26.2384 0) (-2.8555 1.79853 0) (-0.01306 0.00966237 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.424349 0.511339 0) (29.6627 37.1898 0) (226.073 284.928 0) (583.597 656.877 0) (794.352 664.023 0) (727.626 334.325 0) (514.531 124.734 0) (310.364 174.665 0) (221.355 389.528 0) (132.006 624.252 0) (-120.601 742.959 0) (-404.265 629.03 0) (-414.746 341.526 0) (-189.341 109.269 0) (-32.6644 17.9394 0) (-0.915932 0.6092 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.274494 0.275326 0) (26.8934 28.5068 0) (242.373 256.868 0) (666.233 629.879 0) (850.404 544.807 0) (576.075 40.602 0) (88.1181 -226.217 0) (-366.44 -264.4 0) (-554.51 -342.579 0) (-361.057 -451.444 0) (-23.1269 -338.884 0) (-4.95968 108.17 0) (-397.782 446.31 0) (-673.237 384.345 0) (-456.055 179.461 0) (-122.298 49.0764 0) (-8.41974 4.5417 0) (-0.00362015 0.00274931 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0969296 0.0844452 0) (24.8404 23.2746 0) (249.683 245.399 0) (696.506 655.315 0) (834.633 578.583 0) (417.401 -0.24855 0) (-173.948 -269.361 0) (-656.404 -268.27 0) (-892.524 -402.322 0) (-816.934 -642.947 0) (-452.009 -860.273 0) (106.749 -794.043 0) (374.741 -282.847 0) (-56.2974 200.741 0) (-695.776 236.844 0) (-695.123 109.386 0) (-253.171 47.9206 0) (-28.9494 10.7651 0) (-0.0908945 0.0661448 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0229655 0.014747 0) (24.6414 17.5541 0) (294.452 247.203 0) (813.516 752.54 0) (895.744 788.43 0) (355.691 108.915 0) (-231.577 -314.409 0) (-585.891 -254.197 0) (-673.393 -232.366 0) (-545.719 -310.524 0) (-351.521 -356.358 0) (-144.793 -343.463 0) (315.356 -250.332 0) (744.615 62.6228 0) (256.902 274.21 0) (-660.17 50.3141 0) (-800.665 -107.993 0) (-349.583 -26.4284 0) (-53.6552 9.31805 0) (-0.382903 0.241206 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (3.3565e-06 1.60818e-06 0) (8.70351 3.73195 0) (247.002 145.428 0) (866.732 686.049 0) (992.274 1017.32 0) (308.757 396.101 0) (-287.646 -345.776 0) (-502.017 -424.105 0) (-454.889 -227.95 0) (-265.32 -126.64 0) (-105.428 -92.9248 0) (-32.1227 -62.3951 0) (36.7212 -21.2894 0) (480.384 159.775 0) (783.274 512.146 0) (128.886 409.832 0) (-667.505 -179.378 0) (-744.677 -362.721 0) (-356.283 -127.882 0) (-62.8551 0.253362 0) (-0.527302 0.316073 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.297387 0.0980879 0) (99.2352 31.261 0) (682.751 373.022 0) (1021.26 941.907 0) (292.67 760.659 0) (-442.673 -139.715 0) (-579.107 -633.568 0) (-438.204 -469.189 0) (-199.173 -165.747 0) (-46.1138 -36.307 0) (-4.26631 -7.80345 0) (3.41261 0.161972 0) (149.499 68.0707 0) (580.537 437.078 0) (542.104 775.324 0) (-74.0148 322.084 0) (-522.875 -435.434 0) (-584.115 -515.134 0) (-294.231 -166.115 0) (-51.5957 -3.4875 0) (-0.282227 0.167829 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (9.11485 0.917417 0) (324.766 76.5815 0) (897.938 535.1 0) (496.497 886.676 0) (-470.404 326.086 0) (-756.427 -563.009 0) (-596.514 -789.111 0) (-298.718 -409.857 0) (-81.1178 -89.4863 0) (-7.46922 -6.76946 0) (0.257431 0.0724233 0) (35.3823 19.6592 0) (292.919 206.881 0) (521.471 653.005 0) (320.157 740.094 0) (-35.7458 25.2579 0) (-366.627 -637.32 0) (-465.117 -512.665 0) (-221.4 -125.488 0) (-30.3274 -0.897833 0) (-0.0507302 0.0296669 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (46.102 -2.78509 0) (538.574 99.1367 0) (772.584 607.146 0) (19.0719 753.595 0) (-654.752 -77.8324 0) (-714.583 -834.373 0) (-465.296 -744.078 0) (-181.933 -270.835 0) (-38.2242 -35.7872 0) (-1.49749 -0.802631 0) (9.62056 7.27436 0) (121.979 94.9503 0) (345.889 373.764 0) (355.108 651.987 0) (185.66 400.829 0) (-89.2757 -352.016 0) (-433.722 -718.964 0) (-415.745 -396.079 0) (-146.249 -63.5633 0) (-10.9387 0.502367 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.00140837 -0.000513445 0) (96.8598 -20.9959 0) (610.012 82.3552 0) (655.016 631.187 0) (-36.856 629.634 0) (-487.83 -340.223 0) (-520.626 -871.001 0) (-297.046 -554.87 0) (-100.792 -134.69 0) (-15.1761 -8.62828 0) (4.07838 4.70561 0) (66.9396 65.4538 0) (233.769 234.645 0) (300.331 420.61 0) (191.644 395.036 0) (-31.5689 -67.5693 0) (-403.334 -632.221 0) (-557.765 -622.46 0) (-309.863 -227.524 0) (-62.943 -21.2266 0) (-1.5823 0.155396 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.00412002 -0.00150202 0) (117.949 -47.6834 0) (594.683 9.18414 0) (678.501 555.127 0) (115.55 524.739 0) (-385.356 -402.594 0) (-488.795 -731.556 0) (-238.724 -350.849 0) (-52.3531 -49.5507 0) (-0.899085 4.59071 0) (60.3911 73.9403 0) (257.501 229.869 0) (421.464 321.241 0) (339.058 268.427 0) (47.1711 17.1496 0) (-400.599 -444.326 0) (-648.647 -646.333 0) (-440.388 -371.862 0) (-133.853 -82.1147 0) (-11.5999 -3.62524 0) (-0.00892495 0.000335684 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0028276 -0.00103085 0) (93.7246 -58.7528 0) (520.621 -128.375 0) (734.888 327.763 0) (305.779 466.048 0) (-375.826 -233.262 0) (-616.916 -482.33 0) (-267.578 -193.524 0) (-22.4656 -7.43995 0) (64.6359 83.8993 0) (340.772 258.761 0) (707.418 316.698 0) (742.323 221.761 0) (334.152 67.6537 0) (-343.115 -283.873 0) (-742.907 -557.293 0) (-526.164 -402.928 0) (-169.116 -124.19 0) (-21.886 -13.0202 0) (-0.334314 -0.124201 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.000120005 -4.375e-05 0) (46.7801 -40.3907 0) (372.765 -251.243 0) (711.364 -36.3974 0) (543.777 311.159 0) (-178.965 31.1559 0) (-650.561 -115.6 0) (-326.665 28.7166 0) (76.3494 158.128 0) (451.354 348.69 0) (974.98 323.526 0) (1199.6 119.433 0) (772.266 128.688 0) (-187.906 17.8357 0) (-947.978 -368.18 0) (-786.056 -413.537 0) (-234.589 -145.511 0) (-22.3656 -14.9963 0) (-0.428121 -0.272752 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (12.837 -13.6782 0) (195.245 -232.977 0) (554.531 -376.615 0) (686.523 -82.9495 0) (258.008 66.0401 0) (-296.87 157.158 0) (-177.713 495.253 0) (490.839 782.105 0) (1119.8 590.737 0) (1342.04 -9.52199 0) (993.609 -101.819 0) (63.5236 187.449 0) (-997.748 39.9961 0) (-1197.68 -303.254 0) (-543.989 -240.078 0) (-65.1142 -38.2145 0) (-0.318869 -0.18042 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (1.41889 -1.76478 0) (61.1483 -100.247 0) (291.953 -398.798 0) (542.992 -465.38 0) (490.94 -255.786 0) (148.305 -48.5746 0) (81.4335 333.497 0) (576.656 578.304 0) (906.122 59.5349 0) (598.203 -451.27 0) (-100.493 -165.006 0) (-916.781 98.5821 0) (-1291.94 -97.2659 0) (-868.442 -271.778 0) (-252.79 -148.213 0) (-15.5738 -13.5785 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0193157 -0.0273471 0) (7.17326 -13.4147 0) (80.3681 -162.837 0) (254.917 -419.294 0) (390.626 -521.164 0) (307.339 -484.16 0) (109.404 -398.609 0) (9.06709 -413.787 0) (-167.975 -651.87 0) (-573.875 -657.846 0) (-1004.79 -369.692 0) (-1146.99 -255.675 0) (-833.761 -303.756 0) (-346.663 -234.368 0) (-65.0772 -73.9665 0) (-2.16508 -3.37883 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.102906 -0.184802 0) (8.16616 -17.6241 0) (63.6728 -129.777 0) (177.416 -323.686 0) (239.928 -477.039 0) (133.801 -590.716 0) (-115.855 -712.565 0) (-411.515 -779.031 0) (-655.906 -704.797 0) (-715.039 -537.764 0) (-519.139 -385.842 0) (-227.792 -252.158 0) (-52.6342 -107.534 0) (-4.90254 -17.0246 0) (-0.0521965 -0.189318 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0108864 -0.020673 0) (2.81181 -5.59143 0) (25.731 -47.9573 0) (79.5224 -148.144 0) (112.475 -273.462 0) (61.201 -380.854 0) (-45.0458 -433.123 0) (-116.43 -393.887 0) (-100.749 -279.812 0) (-40.333 -156.804 0) (-4.66695 -64.0518 0) (1.07707 -13.7696 0) (0.0916399 -0.623378 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0.0106783 -0.0186267 0) (1.20674 -1.81748 0) (8.59203 -12.8696 0) (19.3591 -32.7645 0) (23.1729 -45.2035 0) (18.8334 -39.6367 0) (11.5742 -23.0433 0) (4.66095 -8.01835 0) (0.720959 -1.12591 0) (0.0133128 -0.0228669 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) ) ; boundaryField { top { type zeroGradient; } bottom { type zeroGradient; } inlet { type zeroGradient; } outlet { type zeroGradient; } frontAndBack { type empty; } } // ************************************************************************* //
62dd51e5cc8ca66fff30773ff09effe2d1e9c6c1
59dc938d387e0fbd1970391f27d26a4adc0423a6
/Engine/Source/Core/SurfaceHit.cpp
9bf6c8fab2aac88d569a775ea9029f4113f984d4
[ "MIT" ]
permissive
VovoWang/Photon-v2
35d06bcc279a887c1e4a301744fa97cb77210216
82687ba650e98a2bfb73d897f673aa9a856245af
refs/heads/master
2021-04-26T22:19:04.520190
2018-03-06T11:44:13
2018-03-06T11:44:13
124,069,900
0
0
null
2018-03-06T11:40:25
2018-03-06T11:40:25
null
UTF-8
C++
false
false
69
cpp
SurfaceHit.cpp
#include "Core/SurfaceHit.h" namespace ph { }// end namespace ph
f9e29ea5e27be1050080441ff20c4f1cb277c626
eeff654d4540ce7e885fe3988dda29b792cbe3cc
/Classes/MainMenuScene.h
74cde63189c8ddb5736d9bf581800459b5c7d271
[]
no_license
sapphireHL/cocos2dx-FlappyBird
87a257c144b6c52e5e105256754e25ff3a155c32
f924259fb7c8b55a212d6335072861fa46805c29
refs/heads/master
2021-08-15T20:44:14.719255
2017-11-18T08:06:10
2017-11-18T08:06:10
111,186,363
1
0
null
null
null
null
UTF-8
C++
false
false
462
h
MainMenuScene.h
#ifndef __MAIN_MENU_SCENE_H__ #define __MAIN_MENU_SCENE_H__ #include "cocos2d.h" #include "SimpleAudioEngine.h" USING_NS_CC; using namespace CocosDenshion; class MainMenu : public cocos2d::Scene { public: static cocos2d::Scene* createScene(); virtual bool init(); // implement the "static create()" method manually CREATE_FUNC(MainMenu); void scrollLand(float); void startCallBack(Ref* pSender); private: Sprite* land1; Sprite* land2; }; #endif
0aeaa1fcbc68e036c246f621f0112ab36d39bdb7
b326b8164beadc42e8f35b8c89977c7814938dd3
/wk2/lab02/q3.cpp
1f39f325768dc08a4208958f34316f1c09b4d9ec
[]
no_license
FraserGreen/APT
2e8f296f83033a55bfcc89bd6c42cfc99acc49e7
e55e338f4b3340e29146e2f21d3c2603da4bb15a
refs/heads/main
2023-04-15T05:59:01.882875
2021-04-24T07:38:18
2021-04-24T07:38:18
354,027,635
0
0
null
null
null
null
UTF-8
C++
false
false
349
cpp
q3.cpp
#include <iostream> using std::cin; using std::cout; using std::endl; int main(void) { cout << "The purpose of a function prototype is to let the compiler know that there exists a method that will be called from the main" << endl; cout << "It also reveals the number and type of parameter(s), and the return value of the method." << endl; }
a1856f8cb57cb10cc750358a9403d5ccbf7506d3
39adfee7b03a59c40f0b2cca7a3b5d2381936207
/codeforces/638/B.cpp
61395ad3b89fd3d78a6ab9e3dfd42ce263e68889
[]
no_license
ngthanhtrung23/CompetitiveProgramming
c4dee269c320c972482d5f56d3808a43356821ca
642346c18569df76024bfb0678142e513d48d514
refs/heads/master
2023-07-06T05:46:25.038205
2023-06-24T14:18:48
2023-06-24T14:18:48
179,512,787
78
22
null
null
null
null
UTF-8
C++
false
false
1,678
cpp
B.cpp
#include <bits/stdc++.h> #define int long long #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; ++i) #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; --i) #define REP(i,a) for(int i=0,_a=(a); i < _a; ++i) #define DEBUG(X) { cout << #X << " = " << (X) << endl; } #define PR(A,n) { cout << #A << " = "; FOR(_,1,n) cout << A[_] << ' '; cout << endl; } #define PR0(A,n) { cout << #A << " = "; REP(_,n) cout << A[_] << ' '; cout << endl; } #define sqr(x) ((x) * (x)) #define ll long long #define __builtin_popcount __builtin_popcountll #define SZ(x) ((int) (x).size()) using namespace std; int ke[333][333]; int vao[333], appear[333]; #undef int int main() { #define int long long ios :: sync_with_stdio(0); cin.tie(0); cout << (fixed) << setprecision(9); int n; while (cin >> n) { memset(ke, 0, sizeof ke); memset(vao, 0, sizeof vao); memset(appear, 0, sizeof appear); FOR(i,1,n) { string s; cin >> s; for(char c : s) appear[c] = 1; REP(u,SZ(s)) FOR(v,u+1,SZ(s)-1) { if (ke[s[u]][s[v]]) continue; ke[s[u]][s[v]] = 1; vao[s[v]]++; } } stack<int> st; string res = ""; FOR(c,'a','z') { if (appear[c] && vao[c] == 0) { st.push(c); } } while (!st.empty()) { int c = st.top(); st.pop(); res += c; FOR(x,'a','z') if (ke[c][x]) { --vao[x]; if (!vao[x]) st.push(x); } } cout << res << endl; } }
3b3e47fd2dc31749ef25e60b5d12116a7458d771
d347554c4bc24b7e159551007f5683cac8fa97d0
/arincmerge/src/arinc/structures/Ndb.cpp
5235e4dc415882a66f3d5326c11e9ae0b8586a64
[]
no_license
ansartnl/ALPHA
892065b1476ec9c35e834a3158592332cda4c5f5
138ddd981ed5bac882c29f28a065171e51d680cf
refs/heads/main
2022-12-27T16:15:28.721053
2020-10-16T08:58:41
2020-10-16T08:58:41
304,633,537
2
0
null
null
null
null
UTF-8
C++
false
false
17
cpp
Ndb.cpp
#include "Ndb.h"
0b734462af19d174f5c932bcdf5506b9c54c1918
1c9b4c164245e6f01b893badd7dee958324f4bcd
/src/entity/entity.cpp
bcb7b2d697338ae5114c8f4ea91ae3be21be32ef
[]
no_license
Minichota/Deranged-Farmer
4b74cd410fa4022a91615a43286e0a4c0f25fccb
ddc160bb59e99c7d30e7aec79512f222129a1441
refs/heads/master
2020-04-29T13:41:34.701851
2020-01-25T05:37:58
2020-01-25T05:37:58
176,175,718
2
0
null
null
null
null
UTF-8
C++
false
false
2,921
cpp
entity.cpp
#include <cassert> #include <cmath> #include "entity.hpp" #include "error.hpp" Entity::Entity(SDL_Renderer* renderer, Fvec pos, Fvec size, int type, int rotation) : Renderable(renderer), Sized(pos, size, Fvec(1.0f, 1.0f), rotation) { this->type = type; } Entity::Entity(SDL_Renderer* renderer, Fvec pos, Fvec size, Fvec scale, int type, int rotation) : Renderable(renderer), Sized(pos, size, scale, rotation) { this->type = type; } Entity::~Entity() { if(texture != nullptr) { SDL_DestroyTexture(texture); } } void Entity::handle_event(const SDL_Event& e) { } void Entity::accelerate(Fvec vel) { this->vel += vel; if(this->vel.x > max_vel.x) { this->vel.x = max_vel.x; } else if(this->vel.x < -max_vel.x) { this->vel.x = -max_vel.x; } if(this->vel.y > max_vel.y) { this->vel.y = max_vel.y; } else if(this->vel.y < -max_vel.y) { this->vel.y = -max_vel.y; } } void Entity::handle_physics() { Fvec final_application; if(this->vel.x > 0) { final_application.x = -0.2f; if(vel.x + final_application.x < 0) { final_application.x = -vel.x; } } else if(this->vel.x < 0) { final_application.x = 0.2f; if(vel.x + final_application.x > 0) { final_application.x = -vel.x; } } if(this->vel.y > 0) { final_application.y = -0.2f; if(vel.y + final_application.y < 0) { final_application.y = -vel.y; } } else if(this->vel.y < 0) { final_application.y = 0.2f; if(vel.y + final_application.y > 0) { final_application.y = -vel.y; } } accelerate(final_application); } void Entity::move() { this->pos.x = std::round(this->pos.x + this->vel.x); this->pos.y = std::round(this->pos.y + this->vel.y); // handing rotation if(vel.x > 0.0f) { this->rotation = 180; } else if(vel.x < 0.0f) { this->rotation = 0; } if(vel.y > 0.0f) { this->rotation = 270; } else if(vel.y < 0.0f) { this->rotation = 90; } } void Entity::set_health(int health) { this->health = health; if(this->health < 0) { this->health = 0; } } void Entity::heal(int health) { this->health += health; if(this->health > max_health) { this->health = max_health; } } void Entity::damage(int health) { this->health -= health; if(this->health < 0) { this->health = 0; } } int& Entity::get_health() { return this->health; } int& Entity::get_max_health() { return this->max_health; } void Entity::load_texture(std::string texture_path) { this->texture = IMG_LoadTexture(renderer, texture_path.c_str()); Error(!texture, { "failed to load texture from: ", texture_path.c_str() }); } void Entity::set_texture(SDL_Texture* texture) { Error(!texture, { "failed to copy texture, it is null: " }); this->texture = texture; } SDL_Texture* Entity::get_texture() { return this->texture; } void Entity::set_vel(Fvec vel) { this->vel = vel; } Fvec& Entity::get_vel() { return this->vel; } int Entity::get_type() { return this->type; }
c72b46ce4e1375d585f7715988dff44c26db016b
3890e5e51aa23d4d42ea2a9c45e30b1e83cb6570
/src/point_impl.hpp
198554e44ab1fe39785be854e76fc17eea254067
[]
no_license
delta2323/algorithm_library
2e6f512fed1a48b0c535c4ccd516ac0f0e042e8f
04850d7cb9218c6c1e976212bf53124a5623110a
refs/heads/master
2021-01-21T12:43:30.097973
2012-05-10T10:38:48
2012-05-10T10:38:48
3,145,699
0
0
null
null
null
null
UTF-8
C++
false
false
1,685
hpp
point_impl.hpp
#ifndef POINT_IMPL_HPP__ #define POINT_IMPL_HPP__ template <typename T> Point2<T>::Point2(const Point2<T>& p) : id_(p.id_), x_(p.x_), y_(p.y_){} template <typename T> Point2<T> Point2<T>::operator+=(const Point2<T>& p) { { Point2<T> tmp(id_, x_+p.x_, y_+p.y_); swap(tmp, *this); } return *this; } template <typename T> Point2<T> Point2<T>::operator+(const Point2<T>& p) const { Point2<T> tmp(*this); tmp += p; return tmp; } template <typename T> Point2<T> Point2<T>::operator-=(const Point2<T>& p) { { Point2<T> tmp(id_, x_-p.x_, y_-p.y_); swap(tmp, *this); } return *this; } template <typename T> Point2<T> Point2<T>::operator-(const Point2<T>& p) const { Point2<T> tmp(*this); tmp -= p; return tmp; } template <typename T> Point2<T> Point2<T>::operator*=(T k) { { Point2<T> tmp(id_, k*x_, k*y_); swap(tmp, *this); } return *this; } template <typename T> Point2<T> Point2<T>::operator*(T k) const { Point2<T> tmp(*this); tmp *= k; return tmp; } template <typename T> T Point2<T>::dot(const Point2<T>& p) const { return x_*p.x_+y_*p.y_; } template <typename T> T Point2<T>::det(const Point2<T>& p) const { return x_*p.y_-y_*p.x_; } template <typename T> T Point2<T>::dist2() const { return x_*x_+y_*y_; } template <typename T> bool comp_by_id(const Point2<T>& p, const Point2<T>& q) { return p.id_ < q.id_; } template <typename T> bool comp_by_coord(const Point2<T>& p, const Point2<T>& q) { if(p.x_ != q.x_) { return p.x_ < q.x_; }else { return p.y_ < q.y_; } } template <typename T> T dist2(const Point2<T>& p, const Point2<T>& q) { return (p-q).dist2(); } #endif // POINT_IMPL_HPP__
a88b5d8b1eabee9fad861b01acaaf638054cb236
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5640146288377856_1/C++/viivalerio/A.cpp
b4e9a222819a1e58572e574ff3aea60820890e3d
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
1,098
cpp
A.cpp
#include<cstdio> #include<cstring> #include<iostream> #include<cstdlib> #include<string> #include<algorithm> #include<limits.h> #include<iomanip> #include<cmath> #include<cassert> #include<map> #include<set> #include<stack> #include<queue> #include<deque> #include<list> #include<vector> #include<sstream> #include<bitset> using namespace std; #define INF 0x7fffffff typedef pair<int,int> ii; typedef pair<int, ii> iii; typedef priority_queue<ii> pqii; typedef priority_queue<iii> pqiii; typedef set<int> si; typedef map<string, int> msi; typedef vector<int> vi; typedef vector<ii> vii; typedef queue<ii> qii; typedef unsigned long long ull; typedef long long ll; typedef pair<ull, ull> pull; typedef pair<ll,ll> pll; int main() { int cases = 1; int T; int R, C , W; while(scanf("%d", &T)!= EOF) { while(T--) { scanf("%d %d %d", &R, &C, &W); printf("Case #%d: ", cases++); printf("%d\n", R*(C/W)+ (C%W == 0 ? W-1 : W)); } } return 0; }
7b8e0692fe64e14ec1a1cabaaebd0348288cd902
d8cb3dbdd287d58abd14f4d4f941716cc28d0865
/codegenerator.h
630eb61c47de9c1f211ee9a598b8e4ab0fe33d62
[]
no_license
itwasntme-mk/serialize3
81a4b0f0a676e7ad6b4fdb440b5b2fa84b446329
2aa396ff9c6d167dc956ffd05ae285652244f7fc
refs/heads/master
2021-09-03T22:21:08.918502
2018-01-12T13:13:43
2018-01-12T13:13:43
114,878,897
0
0
null
null
null
null
UTF-8
C++
false
false
1,194
h
codegenerator.h
///\file codegenerator.h #include "logger.h" #include <fstream> #include <vector> #include <string> /// Helper class for generate serialization code. class TCodeGenerator { public: explicit TCodeGenerator(TLogger& logger, const std::string& indent) : Logger(logger), Indent(indent) {} //file creation bool Open(const char* fileName, const char* fileDescription = 0); void Close(); //preprocessor directives void AddDefine(const char* macro, const char* value); void AddSystemInclude(const char* includePath); void AddInclude(const char* includePath); void StartHeaderSentinel(); void EndHeaderSentinel(); //misc void DoInlineInclude(const char* fileName); void AddComment(const char* comment); //declarations void WriteClassDeclaration(const char* className); //statements void AddLogCall(const char* logMsg,const char* logger); void AddLogMacro(const char* logMsg, const char* macroName); public: std::ofstream Out; private: TLogger& Logger; const std::string& Indent; const char* OutputFileName = nullptr; bool AddLogging = true; };
13d0725032ff92f79e874daf601b0edf656c5b66
0536fc42ef43a8721b0ee156cad1b18140ebdfea
/Algorithms/Megacity.cpp
1df8f317f8e0ebe45659355f9fda47ec07a8d860
[]
no_license
DuyHuynhMinh/Project
b056961db818a8e8178572bc3a672c919d817bd2
146f8e2b8a6028437a14caad52fd0f48a95d7a79
refs/heads/master
2022-12-06T03:55:28.283333
2021-12-06T02:55:25
2021-12-06T02:55:25
133,676,929
1
0
null
2022-11-24T09:56:18
2018-05-16T14:20:21
Java
UTF-8
C++
false
false
684
cpp
Megacity.cpp
#include<iostream> #include<vector> #include<iterator> #include<algorithm> #include <map> #include<string> #include <cmath> using namespace std; int main() { int n, s; int x, y; int p; cin >> n; cin >> s; int value = 1000000 - s; map<long long, int> m; for (int i = 0; i < n; ++i) { cin >> x; cin >> y; cin >> p; long long r = (x*x + y*y); if (m[r] != 0) { int tmp = m[r]+p; m[r] = tmp; } else { m[r] = p; } } int sum = 0; for (const auto &x : m) { sum += x.second; if (sum >= value) { printf("%.6f", sqrt(x.first)); break; } } if (sum < value) { cout << -1; } //system("pause"); return 0; }
ddebdecd2ea306e8f7765bf8bb3b6c851a8d7a1b
e475fe74817800258bd400a7decdd58d8c4b602c
/c_sources/graph.cc
39ad97b94126afcdf56e2fc9bcf4cc1ef277f1d1
[ "Apache-2.0" ]
permissive
kobeHub/C-implementation-of-Introduction-to-Algorithms
78636612f49b51b01624b104120d60acc599ad46
90e3e2c0e0cdfa6237f27340d25ee836d1b325da
refs/heads/master
2020-03-26T13:43:22.765316
2019-01-10T13:56:08
2019-01-10T13:56:08
144,953,421
2
0
null
2018-08-16T07:58:05
2018-08-16T07:33:45
C
UTF-8
C++
false
false
3,837
cc
graph.cc
#include "graph.h" //---------------------------------------------------------- // Graph::Graph // Initialize the basic Graph structure // "vertexs": the list of vertexes // "edges": the list of edges //---------------------------------------------------------- Graph::Graph(Vertex* vertexs, Edge* edges, int v_num, int e_num) { this->vertexs = vertexs; this->edges = edges; num_vertexs = v_num; num_edges = e_num; adjacency_list = (char**)malloc(sizeof(char*)*num_vertexs); int *count_vertex =new int[num_vertexs](); int i, j; for(i = 0; i < num_vertexs; i++) { for(j = 0; j < num_edges; j++) { if(vertexs[i].name == edges[j].a || vertexs[i].name == edges[j].b) count_vertex[i]++; } } for(i = 0; i < num_vertexs; i++) { adjacency_list[i] = (char*)malloc(sizeof(char)*count_vertex[i]); // printf("%c:%d\n", vertexs[i].name, count_vertex[i]); } delete [] count_vertex; for(i = 0; i < num_vertexs; i++) { int index = 0; for(j = 0; j < num_edges; j++) { if(vertexs[i].name == edges[j].a) { adjacency_list[i][index] = edges[j].b; index++; }else if(vertexs[i].name == edges[j].b) { adjacency_list[i][index] = edges[j].a; index++; } } } } //--------------------------------------------------------- // Release all the space //--------------------------------------------------------- Graph::~Graph(){ for(int i = 0; i < num_vertexs; i++) { free(adjacency_list[i]); adjacency_list[i] = NULL; } free(adjacency_list); adjacency_list = NULL; free(vertexs); free(edges); } //--------------------------------------------------------- // Get a adjacency list of a Vertex //--------------------------------------------------------- char* Graph::get_adjacency_list(Vertex a) { int index = get_vertex_index(a.name); return adjacency_list[index]; } //--------------------------------------------------------- // Get a Vertex's index in the vertexes list by its name //--------------------------------------------------------- int Graph::get_vertex_index(char a) { for(int i = 0; i < num_vertexs; i++) { if(a == vertexs[i].name) return i; } return -1; } //--------------------------------------------------------- // Get a vertex by its name //--------------------------------------------------------- Vertex Graph::get_vertex(char name) { return vertexs[get_vertex_index(name)]; } //---------------------------------------------------------- // Provide an interface to edit vertexes //---------------------------------------------------------- void Graph::setVertex(Vertex v, int index) { vertexs[index] = v; } //---------------------------------------------------------- // Reset the vertexes' //---------------------------------------------------------- void Graph::reset() { for(int i = 0; i < num_vertexs; i++) { vertexs[i].color = white; vertexs[i].d = INT_MAX - 1000; vertexs[i].pre = '*'; } } //---------------------------------------------------------- // Reset vertexes and edges //---------------------------------------------------------- void Graph::reset(int* weights) { this->reset(); for(int i = 0; i < num_edges; i++) { edges[i].weight = weights[i]; } } //--------------------------------------------------------- // sort edges //--------------------------------------------------------- void Graph::sortEdges() { for(int i = num_edges-1; i > 0; i--) { for(int j = 0; j < i; j++) { if(edges[j].weight > edges[j+1].weight) { std::swap(edges[j], edges[j+1]); } } } } int Graph::get_weights(char a, char b) { for(int i = 0; i < num_edges; i++) { Edge cur = edges[i]; if((cur.a==a&&cur.b==b) || (cur.a==b&&cur.b==a)) return cur.weight; } return INT_MAX; }
81f635938517922abd6b96b36c8d67229cfd8104
717c5c4e11fc2d407c41753ec33488ed4f2f0834
/Software/RGBcontrol/RGBcontrol.h
f88bc8d3f09478e710870a7346d317fa868594c4
[]
no_license
LieBtrau/ledstripes
96bb756ee9de9d253a0b324a4920beaf23328edd
208ff9cf27e3c749b4f5fa6c5a1ed6b2461f4ce2
refs/heads/master
2021-01-22T23:10:55.521987
2013-11-16T12:10:34
2013-11-16T12:10:34
32,350,441
0
0
null
null
null
null
UTF-8
C++
false
false
636
h
RGBcontrol.h
/* */ #ifndef RGBcontrol_h #define RGBcontrol_h typedef unsigned char byte; typedef enum{ RANDOM_SET_NEW_VAL, RANDOM_GO_TO_VAL, FADE_LIGHT, RANDOM_WAIT }RANDOM_STATE; class RGBcontrol { public: RGBcontrol(byte Rpin, byte Gpin, byte Bpin); void updateLEDs(); void increaseHue(); void decreaseHue(); void increaseIntensity(); void decreaseIntensity(); void increaseSaturation(); void decreaseSaturation(); void lightsOut(); void lightsOn(); private: void getRGB(int hue, int sat, int val, int colors[3]); int _hue; int _saturation; int _lightness; byte _pinNrs[3]; }; #endif
19fb865fd8c30257785c54b991d9a93789eef389
3ab6ea927dc4f5fdb3d04265a2a21090d3529189
/LV3_Z4.cpp
98f115f64be9a962a493c38a080948148f02d05b
[]
no_license
momerovic4/US
6a5aa8a940b431452eb2ba7318c02f0fd11594bf
db179b6ce07b15160861df26a644d7f74c72c8e9
refs/heads/master
2023-04-01T21:28:57.568913
2021-04-14T22:11:10
2021-04-14T22:11:10
350,832,942
0
0
null
null
null
null
UTF-8
C++
false
false
604
cpp
LV3_Z4.cpp
#include "mbed.h" #include "stm32f413h_discovery_lcd.h" PwmOut led(LED1); double oldX=10,oldY=230,newX=10,newY=230; int brojac = 0; int main() { BSP_LCD_Init(); BSP_LCD_DrawVLine(10,10,220); BSP_LCD_DrawHLine(10,230,210); for(int i=0;i<10;++i) BSP_LCD_DrawHLine(5,i*22+10,10); while(1) { brojac == 25 ? led=0 : led=led+0.04; oldX=newX; oldY=newY; newX+=4; newY=230-(led)*220; BSP_LCD_DrawLine(oldX,oldY,newX,oldY); BSP_LCD_DrawLine(newX,oldY,newX,newY); wait(0.0002); if(brojac == 50) break; brojac++; } }
9fcbe58f5433bcdab78902d3f41962b3e07e785c
dd89ed95b3eff2f4aa338847788206d15fd18884
/C-plus-plus/cpp_exercise/Chapter14/Exercise3/queuetp.h
44bd506790d98ef07e03fbfa05c6f08dc52dd9f6
[ "MIT" ]
permissive
dqhplhzz2008/Study-notes
998294dda3c8ffe885fe03148b1b70b73ac520a8
0df739d22add100e0f5976226abce34242fae57b
refs/heads/master
2021-06-25T06:35:34.517716
2019-06-12T14:18:23
2019-06-12T14:18:23
152,032,682
14
7
null
2018-10-08T07:18:31
2018-10-08T06:58:45
null
GB18030
C++
false
false
1,811
h
queuetp.h
#ifndef QUEUETP_H_ #define QUEUETP_H_ #include <iostream> #include<string> using namespace std; //Worker类 class Worker { private: string fullname; long id; public: Worker() :fullname("no one"), id(0L) {} Worker(const string & s, long n) :fullname(s), id(n) {} ~Worker() {} void Set(); void Show() const; }; //队列模板 template<class T> class Queuetp { private: struct Node { T item; struct Node * next; }; Node * front; Node * rear; int items; const int qsize; Queuetp(const Queuetp & q) :qsize(0) {}; Queuetp & operator=(const Queuetp & q) { return *this; }; public: Queuetp(int qs = 10); ~Queuetp(); bool isempty()const; bool isfull()const; int queuecount()const; bool enqueue(const T & item); bool dequeue(T & item); }; //接下来写Queuetp模板的函数 template<class T> Queuetp<T>::Queuetp(int qs):qsize(qs) { front = rear = NULL; items = 0; } template<class T> Queuetp<T>::~Queuetp() { Node *temp; while (front != NULL) { temp = front; front = front->next; delete temp; } } template<class T> bool Queuetp<T>::isempty() const { return items == 0; } template<class T> bool Queuetp<T>::isfull() const { return items == qsize; } template<class T> int Queuetp<T>::queuecount()const { return items; } template<class T> inline bool Queuetp<T>::enqueue(const T & item) { if(isfull()) return false; Node *add = new Node; if (add == NULL) return false; add->item = item; add->next = NULL; items++; if (front == NULL) fornt = add; else rear->next = add; rear = add; return true; } template<class T> inline bool Queuetp<T>::dequeue(T & item) { if(isempty()) return false; item = front->item; items--; Node * temp; temp = front; front = front->next; delete temp; if (items == 0) rear = NULL; return true; } #endif // !QUEUETP_H_
b62fb02e06479496075afa26d9ddb1d3dbdc082f
e5730a6c82d5f7193ab83740ac1bdc475b17f565
/LeetCode/SearchinRotatedSortedArrayII.h
f511773c0303261089be40e2a0bd0b0b0e6cccff
[]
no_license
SamanthaChen/LeetCode
fc808089660ba67975dccdfca5d59e05576261b5
1da45a1edb2f2fb07adf37a4d31664eab5c8fe62
refs/heads/master
2020-04-06T05:11:36.454110
2017-02-20T13:58:06
2017-02-20T13:58:06
53,720,495
0
1
null
null
null
null
GB18030
C++
false
false
1,548
h
SearchinRotatedSortedArrayII.h
/* Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the array. */ #pragma once #include "LeetCode.h" class SearchinRotatedSortedArrayII { public: SearchinRotatedSortedArrayII(); ~SearchinRotatedSortedArrayII(); /* 我的结论是不影响,直接拿过来用 原来还是会影响的!!!!!!!!! 因为可能把相同的给切开了! 比如2,2,2,2,2,0,0,1,1,2,2,2 用了新的方法,强行遍历!! 一遍过,8ms perfect */ bool search(vector<int>& nums, int target) { int f = 0, b = nums.size() - 1, mid; if (nums[f] == nums[b] && target == nums[f]) return true; while (f < b) { mid = (f + b) / 2; if (nums[mid] == target || nums[f] == target || nums[b] == target) return true;//防止与任何一个相等 if (nums[mid]>nums[f]) {//target可能处于nums[f] nums[mid] nums[b]切成的四个区间内,要把每种情况都覆盖到 if (target > nums[f] && target < nums[mid]) b = mid; else if (target > nums[mid] || target < nums[f]) f = mid+1; }else if (nums[mid] < nums[f]) {//target可能处于nums[f] nums[mid] nums[b]切成的四个区间内,要把每种情况都覆盖到 if (target < nums[mid]||target>nums[f]) b = mid; else if (target>nums[mid] && target < nums[f]) f = mid+1; } else if (nums[mid] == nums[f]) { f++;//这种情况时间复杂度是O(n) } } return nums[f] == target ? true:false; } };
af3ebc04a4b7068af66194781fc9551c2a2fe759
d4422ebd1b82f5024038537de68d2af5d27de34c
/AeroDrawTest/AeroDrawTestDlg.cpp
31c4b8fa2f050a9d5d580f540cc66366ddae1c0d
[]
no_license
LeeJaeBin/All-Application-Screencapture
a182ad29be3833a33707726d817c9adf861abc68
722903845175cf41e78ee6a408f407becd852872
refs/heads/master
2020-04-09T07:38:39.811001
2019-02-07T05:51:48
2019-02-07T05:51:48
160,164,296
2
0
null
null
null
null
UHC
C++
false
false
28,805
cpp
AeroDrawTestDlg.cpp
// AeroDrawTestDlg.cpp : 구현 파일 // #include "stdafx.h" #include "AeroDrawTest.h" #include "AeroDrawTestDlg.h" #include "CxImage/ximage.h" #include <Dwmapi.h> #include "SystemInfo.h" #pragma comment(lib, "Dwmapi.lib") #ifdef _DEBUG #define new DEBUG_NEW #endif HWND SetFromPidtoHnd(DWORD dwPid, int nType); int CheckRunProcess(char* filename); // 응용 프로그램 정보에 사용되는 CAboutDlg 대화 상자입니다. class CAboutDlg : public CDialog { public: CAboutDlg(); // 대화 상자 데이터입니다. enum { IDD = IDD_ABOUTBOX }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다. // 구현입니다. protected: DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) END_MESSAGE_MAP() // CAeroDrawTestDlg 대화 상자 CAeroDrawTestDlg::CAeroDrawTestDlg(CWnd* pParent /*=NULL*/) : CDialog(CAeroDrawTestDlg::IDD, pParent) , m_strValue(_T("")) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CAeroDrawTestDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDIT1, m_strValue); DDX_Control(pDX, IDC_COMBO2, m_ProcessCombo); } BEGIN_MESSAGE_MAP(CAeroDrawTestDlg, CDialog) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() //}}AFX_MSG_MAP ON_BN_CLICKED(IDC_BUTTON3, &CAeroDrawTestDlg::OnBnClickedButton3) ON_BN_CLICKED(IDC_BUTTON1, &CAeroDrawTestDlg::OnBnClickedButton1) ON_BN_CLICKED(IDC_BUTTON2, &CAeroDrawTestDlg::OnBnClickedButton2) ON_BN_CLICKED(IDC_GETPROCESSAPP, &CAeroDrawTestDlg::OnBnClickedGetprocessapp) ON_BN_CLICKED(IDC_GETHWND, &CAeroDrawTestDlg::OnBnClickedGethwnd) ON_BN_CLICKED(IDC_GETDLG, &CAeroDrawTestDlg::OnBnClickedGetdlg) ON_CBN_SELCHANGE(IDC_COMBO2, &CAeroDrawTestDlg::OnCbnSelchangeCombo2) ON_CBN_DROPDOWN(IDC_COMBO2, &CAeroDrawTestDlg::OnCbnDropdownCombo2) ON_BN_CLICKED(IDC_ALL, &CAeroDrawTestDlg::OnBnClickedAll) END_MESSAGE_MAP() // CAeroDrawTestDlg 메시지 처리기 void SetFromPidtoHnd(DWORD dwPid); BOOL CAeroDrawTestDlg::OnInitDialog() { CDialog::OnInitDialog(); // 시스템 메뉴에 "정보..." 메뉴 항목을 추가합니다. // IDM_ABOUTBOX는 시스템 명령 범위에 있어야 합니다. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { BOOL bNameValid; CString strAboutMenu; bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); ASSERT(bNameValid); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } // 이 대화 상자의 아이콘을 설정합니다. 응용 프로그램의 주 창이 대화 상자가 아닐 경우에는 // 프레임워크가 이 작업을 자동으로 수행합니다. SetIcon(m_hIcon, TRUE); // 큰 아이콘을 설정합니다. SetIcon(m_hIcon, FALSE); // 작은 아이콘을 설정합니다. // TODO: 여기에 추가 초기화 작업을 추가합니다. BOOL fForceIconic = TRUE; BOOL fHasIconicBitmap = TRUE; //HWND hParent = ::GetParent(this->GetSafeHwnd()); //DwmSetWindowAttribute(hParent, 7, &fForceIconic, sizeof(fForceIconic)); // DWMWA_FORCE_ICONIC_REPRESENTATION //DwmSetWindowAttribute(hParent, 10, &fHasIconicBitmap, sizeof(fHasIconicBitmap)); // DWMWA_HAS_ICONIC_BITMAP //DwmSetWindowAttribute(this->GetSafeHwnd(), 7, &fForceIconic, sizeof(fForceIconic)); // DWMWA_FORCE_ICONIC_REPRESENTATION //DwmSetWindowAttribute(this->GetSafeHwnd(), 10, &fHasIconicBitmap, sizeof(fHasIconicBitmap)); // DWMWA_HAS_ICONIC_BITMAP // hParent = ::GetParent(myHwnd); return TRUE; // 포커스를 컨트롤에 설정하지 않으면 TRUE를 반환합니다. } void CAeroDrawTestDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout; dlgAbout.DoModal(); } else { CDialog::OnSysCommand(nID, lParam); } } // 대화 상자에 최소화 단추를 추가할 경우 아이콘을 그리려면 // 아래 코드가 필요합니다. 문서/뷰 모델을 사용하는 MFC 응용 프로그램의 경우에는 // 프레임워크에서 이 작업을 자동으로 수행합니다. void CAeroDrawTestDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // 그리기를 위한 디바이스 컨텍스트 SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); // 클라이언트 사각형에서 아이콘을 가운데에 맞춥니다. int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // 아이콘을 그립니다. dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } } // 사용자가 최소화된 창을 끄는 동안에 커서가 표시되도록 시스템에서 // 이 함수를 호출합니다. HCURSOR CAeroDrawTestDlg::OnQueryDragIcon() { return static_cast<HCURSOR>(m_hIcon); } HBITMAP CAeroDrawTestDlg::PreviewBitmapMain(HWND hWnd, int nWidth, int nHeight, TCHAR *pszPath) { BITMAPINFO bi; memset(&bi, 0x00, sizeof(BITMAPINFO)); // 비트맵 헤더 값 설정 bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi.bmiHeader.biWidth = nWidth; bi.bmiHeader.biHeight = nHeight; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = (nWidth * 3 + 3) / 4 * 4 * nHeight; bi.bmiHeader.biXPelsPerMeter = 11811; bi.bmiHeader.biYPelsPerMeter = 11811; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; HDC hDC = ::GetDC(NULL); // DIB 형식으로 비트맵 만들기 HDC hMemTarget = CreateCompatibleDC(hDC); HBITMAP hBitmap = CreateDIBSection(hDC, &bi, DIB_RGB_COLORS, NULL, NULL, NULL); HBITMAP hOldBitmap = (HBITMAP)::SelectObject(hMemTarget, hBitmap); HDC hWndDCSource = ::GetDC(hWnd); CRect rt; ::GetClientRect(hWnd, &rt); //::StretchBlt(hMemTarget, 0, 0, nWidth, nHeight, hWndDCSource, 0, 0, rt.Width(), rt.Height(), SRCCOPY); HDC hMemDCTemp = ::CreateCompatibleDC(hDC); HBITMAP hMemBitmap = CreateCompatibleBitmap(hDC, nWidth, nHeight); HBITMAP hOldMemBitmap = (HBITMAP)::SelectObject(hMemDCTemp, hMemBitmap); CxImage xImage; xImage.Load(pszPath, CXIMAGE_SUPPORT_BMP); // 이미지 로딩 xImage.Resample(nWidth, nHeight, CxImage::IM_LANCZOS); // 이미지 리사이징 xImage.Blt(hMemDCTemp, 0, 0); BLENDFUNCTION blend; blend.BlendOp = AC_SRC_OVER; blend.BlendFlags = 0; blend.SourceConstantAlpha = 150; // blend.SourceConstantAlpha = 0; blend.AlphaFormat = 0; ::AlphaBlend(hMemTarget, 0, 0, nWidth, nHeight, hMemDCTemp, 0, 0, nWidth, nHeight, blend); ::SelectObject(hMemDCTemp, hOldMemBitmap); ::DeleteObject(hMemBitmap); ::DeleteDC(hMemDCTemp); ::SelectObject(hMemTarget, hOldBitmap); ::DeleteDC(hMemTarget); ::ReleaseDC(NULL, hDC); ::ReleaseDC(hWnd, hWndDCSource); return hBitmap; } HBITMAP CAeroDrawTestDlg::CreateAeroBitmapMain(HWND hWnd, int nWidth, int nHeight) { BITMAPINFO bi; memset(&bi, 0x00, sizeof(BITMAPINFO)); // 비트맵 헤더 값 설정 bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi.bmiHeader.biWidth = nWidth; bi.bmiHeader.biHeight = nHeight; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = (nWidth * 3 + 3) / 4 * 4 * nHeight; bi.bmiHeader.biXPelsPerMeter = 11811; bi.bmiHeader.biYPelsPerMeter = 11811; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; HDC hDC = ::GetDC(NULL); // DIB 형식으로 비트맵 만들기 HDC hMemDC = CreateCompatibleDC(hDC); HBITMAP hBitmap = CreateDIBSection(hDC, &bi, DIB_RGB_COLORS, NULL, NULL, NULL); HBITMAP hOldBitmap = (HBITMAP)::SelectObject(hMemDC, hBitmap); // HWND hnd = ::FindWindow(NULL, "MultiMornitor"); // HWND hnd = ::FindWindow("Afx:00007FF7EC1E0000:3", NULL); // hnd = (HWND)0x001A1DAC; // hnd = (HWND)0x00032864; HDC hWndDC = ::GetDC(hWnd); HDC hWndDC2 = ::GetDC(hWnd); CRect rt; ::GetClientRect(hWnd, &rt); ::StretchBlt(hMemDC, 0, 0, nWidth, nHeight, hWndDC2, 0, 0, rt.Width(), rt.Height(), SRCCOPY); //::StretchBlt(hMemDC, 0, 0, rt.Width(), rt.Height(), hWndDC2, 0, 0, rt.Width(), rt.Height(), SRCCOPY); HDC hMemDCTemp = ::CreateCompatibleDC(hDC); HBITMAP hMemBitmap = CreateCompatibleBitmap(hDC, nWidth, nHeight); HBITMAP hOldMemBitmap = (HBITMAP)::SelectObject(hMemDCTemp, hMemBitmap); CxImage xImage; xImage.Load("c:\\temp\\test.bmp", CXIMAGE_SUPPORT_BMP); // 이미지 로딩 xImage.Resample(nWidth, nHeight, CxImage::IM_LANCZOS); // 이미지 리사이징 xImage.Blt(hMemDCTemp, 0, 0); BLENDFUNCTION blend; blend.BlendOp = AC_SRC_OVER; blend.BlendFlags = 0; blend.SourceConstantAlpha = 50; blend.AlphaFormat = 0; ::AlphaBlend(hMemDC, 0, 0, nWidth, nHeight, hMemDCTemp, 0, 0, nWidth, nHeight, blend); ::SelectObject(hMemDCTemp, hOldMemBitmap); ::DeleteObject(hMemBitmap); ::DeleteDC(hMemDCTemp); RECT DrawTextrt; DrawTextrt.left = 0; DrawTextrt.top = 0; DrawTextrt.right = nWidth; DrawTextrt.bottom = nHeight; ::DrawText(hMemDC, "Main 워터마크 텍스트 출력", 20, &DrawTextrt, DT_VCENTER); ::SelectObject(hMemDC, hOldBitmap); ::DeleteDC(hMemDC); ::ReleaseDC(NULL, hDC); ::ReleaseDC(hWnd, hWndDC); return hBitmap; } HBITMAP CAeroDrawTestDlg::CreateAeroBitmap(HWND hWnd, int nWidth, int nHeight) { BITMAPINFO bi; memset(&bi, 0x00, sizeof(BITMAPINFO)); // 비트맵 헤더 값 설정 bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi.bmiHeader.biWidth = nWidth; bi.bmiHeader.biHeight = nHeight; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = (nWidth * 3 + 3) / 4 * 4 * nHeight; bi.bmiHeader.biXPelsPerMeter = 11811; bi.bmiHeader.biYPelsPerMeter = 11811; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; HDC hDC = ::GetDC(NULL); // DIB 형식으로 비트맵 만들기 HDC hMemDC = CreateCompatibleDC(hDC); HBITMAP hBitmap = CreateDIBSection(hDC, &bi, DIB_RGB_COLORS, NULL, NULL, NULL); HBITMAP hOldBitmap = (HBITMAP)::SelectObject(hMemDC, hBitmap); HDC hWndDC = ::GetDC(hWnd); CRect rt; ::GetClientRect(hWnd, &rt); ::StretchBlt(hMemDC, 0, 0, nWidth, nHeight, hWndDC, 0, 0, rt.Width(), rt.Height(), SRCCOPY); //RECT DrawTextrt; //DrawTextrt.left = 0; //DrawTextrt.top = 0; //DrawTextrt.right = nWidth; //DrawTextrt.bottom = nHeight; //::DrawText(hMemDC, "워터마크 텍스트 출력", 20, &DrawTextrt, DT_VCENTER); ::SelectObject(hMemDC, hOldBitmap); ::DeleteDC(hMemDC); ::ReleaseDC(NULL, hDC); ::ReleaseDC(hWnd, hWndDC); return hBitmap; } // //BOOL(__stdcall *Real_TranslateMessage)(CONST MSG *lpMsg) = TranslateMessage; //#define TranslateMessage(__name__) BOOL WINAPI __name__(CONST MSG *lpMsg) typedef HRESULT(WINAPI *t_DwmSetIconicThumbnail)(HWND hwnd, HBITMAP hbmp, DWORD dwSITFlags); typedef HRESULT(WINAPI *t_DwmSetIconicLivePreviewBitmap)(HWND hwnd, HBITMAP hbmp, POINT *pptClient, DWORD dwSITFlags); t_DwmSetIconicThumbnail set_iconic_thumbnail = NULL; t_DwmSetIconicLivePreviewBitmap set_live_preview = NULL; HMODULE g_shell = NULL; #define WM_DWMSENDICONICTHUMBNAIL 0x0323 #define WM_DWMSENDICONICLIVEPREVIEWBITMAP 0x0326 #if 1 BOOL CAeroDrawTestDlg::PreTranslateMessage(MSG* pMsg) { // TODO: 여기에 특수화된 코드를 추가 및/또는 기본 클래스를 호출합니다. if (g_shell == NULL) { g_shell = LoadLibrary("dwmapi.dll"); set_iconic_thumbnail = (t_DwmSetIconicThumbnail)GetProcAddress(g_shell, "DwmSetIconicThumbnail"); set_live_preview = (t_DwmSetIconicLivePreviewBitmap)GetProcAddress(g_shell, "DwmSetIconicLivePreviewBitmap"); } // TODO: Add your specialized code here and/or call the base class // if (pMsg->message == WM_DWMSENDICONICLIVEPREVIEWBITMAP) if(0) { // CRect rt; // ::GetClientRect(pMsg->hwnd, &rt); // //// CreateAeroBitmapMain(this->GetSafeHwnd(), rt.Width(), rt.Height()); // // HBITMAP hBitmap = PreviewBitmapMain(this->GetSafeHwnd(), rt.Width(), rt.Height(), "c:\\temp\\test.bmp"); // _hwnd=pMsg->hwnd; // set_live_preview(pMsg->hwnd, hBitmap, NULL, 1); // DeleteObject(hBitmap); _SendLivePreviewBitmap(); } else if (pMsg->message == WM_DWMSENDICONICTHUMBNAIL) { CRect rt; ::GetClientRect(pMsg->hwnd, &rt); HBITMAP hBitmap = PreviewBitmapMain(this->GetSafeHwnd(), HIWORD(pMsg->lParam), LOWORD(pMsg->lParam), "c:\\temp\\test.bmp"); // HBITMAP hBitmap = CreateAeroBitmap(this->GetSafeHwnd(), HIWORD(pMsg->lParam), LOWORD(pMsg->lParam)); set_iconic_thumbnail(pMsg->hwnd, hBitmap, 0); DeleteObject(hBitmap); } return CDialog::PreTranslateMessage(pMsg); } #endif HBITMAP CAeroDrawTestDlg::CreateAeroBitmapView(HWND hWnd, int nWidth, int nHeight) { //BITMAPINFO bi; //memset(&bi, 0x00, sizeof(BITMAPINFO)); //// 비트맵 헤더 값 설정 //bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); //bi.bmiHeader.biWidth = nWidth; //bi.bmiHeader.biHeight = nHeight; //bi.bmiHeader.biPlanes = 1; //bi.bmiHeader.biBitCount = 32; //bi.bmiHeader.biCompression = BI_RGB; //bi.bmiHeader.biSizeImage = (nWidth * 3 + 3) / 4 * 4 * nHeight; //bi.bmiHeader.biXPelsPerMeter = 11811; //bi.bmiHeader.biYPelsPerMeter = 11811; //bi.bmiHeader.biClrUsed = 0; //bi.bmiHeader.biClrImportant = 0; //HDC hDC = ::GetDC(NULL); //// DIB 형식으로 비트맵 만들기 //HDC hMemDC = CreateCompatibleDC(hDC); //HBITMAP hBitmap = CreateDIBSection(hDC, &bi, DIB_RGB_COLORS, NULL, NULL, NULL); CRect rt; ::GetClientRect(hWnd, &rt); // HWND hnd = ::FindWindow(NULL, "MultiMornitor"); //HWND hnd = ::FindWindow("Afx:00007FF7EC1E0000:3", NULL); // hnd = (HWND)0x HDC hDC = ::GetDC(NULL); HDC hWndDC = ::GetDC(hWnd); // 판때기 HDC hMemDC = ::CreateCompatibleDC(hDC); HBITMAP hMemBitmap = CreateCompatibleBitmap(hDC, rt.Width(), rt.Height()); HBITMAP hOldMemBitmap = (HBITMAP)::SelectObject(hMemDC, hMemBitmap); ::BitBlt(hMemDC, 0, 0, rt.Width(), rt.Height(), hWndDC, 0, 0, SRCCOPY); BLENDFUNCTION blend; blend.BlendOp = AC_SRC_OVER; blend.BlendFlags = 0; blend.SourceConstantAlpha = 50; blend.AlphaFormat = 0; //Sleep(4000); //::BitBlt(hMemDC, 0, 0, rt.Width(), rt.Height(), hDC, 0, 0, SRCAND); ::AlphaBlend(hMemDC, 0, 0, rt.Width(), rt.Height(), hDC, 0, 0, rt.Width(), rt.Height(), blend); ::BitBlt(hWndDC, 0, 0, rt.Width(), rt.Height(), hMemDC, 0, 0, SRCCOPY); ::SelectObject(hMemDC, hOldMemBitmap); ::DeleteObject(hMemBitmap); ::DeleteDC(hMemDC); ::ReleaseDC(NULL, hDC); ::ReleaseDC(hWnd, hWndDC); // HGDIOBJ h_bitmap = GetCurrentObject(h_mem_dc, OBJ_BITMAP); //출력 소스 /* HBITMAP hOldBitmap = (HBITMAP)::SelectObject(hMemDC, hBitmap); HWND hnd = ::FindWindow(NULL, "MultiMornitor"); //HWND hnd = ::FindWindow("Afx:00007FF7EC1E0000:3", NULL); hnd = (HWND)0x0003176A; //hnd = (HWND)0x00032864; CRect rt; ::GetClientRect(hnd, &rt); HDC hWndDC2 = ::GetDC(hnd); HDC hWndDC = ::GetDC(hWnd); ::StretchBlt(hWndDC, 0, 0, nWidth, nHeight, hWndDC2, 0, 0, rt.Width(), rt.Height(), SRCCOPY); */ //::StretchBlt(hMemDC, 0, 0, rt.Width(), rt.Height(), hWndDC2, 0, 0, rt.Width(), rt.Height(), SRCCOPY); //RECT DrawTextrt; //DrawTextrt.left = 0; //DrawTextrt.top = 0; //DrawTextrt.right = nWidth; //DrawTextrt.bottom = nHeight; //::DrawText(hMemDC, "Main 워터마크 텍스트 출력", 20, &DrawTextrt, DT_VCENTER); //::SelectObject(hMemDC, hOldBitmap); //::DeleteDC(hMemDC); //::ReleaseDC(NULL, hDC); //::ReleaseDC(hWnd, hWndDC); return NULL; } void CAeroDrawTestDlg::OnBnClickedButton3() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. CRect rt; HWND hnd = NULL; hnd = this->GetSafeHwnd(); ::GetClientRect(hnd, &rt); HBITMAP hBitmap = CreateAeroBitmapView(hnd, rt.Width(), rt.Height()); } RECT m_rcFull; BOOL CAeroDrawTestDlg::MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) { std::vector< RECT >* pvRect = (std::vector< RECT >*)dwData; MONITORINFOEX mi; mi.cbSize = sizeof(MONITORINFOEX); GetMonitorInfo(hMonitor, &mi); RECT rt; rt.top = lprcMonitor->top + 2; rt.bottom = lprcMonitor->bottom - 2; rt.left = lprcMonitor->left + 2; rt.right = lprcMonitor->right - 2; pvRect->push_back(rt); if(m_rcFull.top > lprcMonitor->top) m_rcFull.top = lprcMonitor->top + 2; if(m_rcFull.left > lprcMonitor->left) m_rcFull.left = lprcMonitor->left + 2; if(m_rcFull.bottom < lprcMonitor->bottom) m_rcFull.bottom = lprcMonitor->bottom - 2; if(m_rcFull.right < lprcMonitor->right) m_rcFull.right = lprcMonitor->right - 2; return TRUE; } void CAeroDrawTestDlg::OnBnClickedButton1() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. m_vRect.clear(); m_rcFull.top = 0; m_rcFull.bottom = 0; m_rcFull.left = 0; m_rcFull.right = 0; //memset(m_rcFull, 0, sizeof(m_rcFull)); ::EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (LPARAM)&m_vRect); CString strTemp; int ni = 0; //strTemp.Format(_T("%d번째 워터마크 rect(%d, %d, %d, %d)"), i, m_vRect[i].top, m_vRect[i].bottom, m_vRect[i].left, m_vRect[i].right); //strTemp.Format(_T("%d번째 워터마크 rect(%d, %d, %d, %d)"), i, m_vRect[i].top, m_vRect[i].bottom, m_vRect[i].left, m_vRect[i].right); m_nHeight = m_vRect[0].bottom - m_vRect[0].top; m_nWidth = m_vRect[0].right - m_vRect[0].left; HWND hwnd = (HWND)0x0006152A;; HDC hTmwDC = ::GetDC(hwnd); HDC hDC = ::GetDC(NULL); HDC hMemDC = ::CreateCompatibleDC(hDC); HBITMAP hMemBitmap = CreateCompatibleBitmap(hDC, m_nWidth, m_nHeight); HBITMAP hOldMemBitmap = (HBITMAP)::SelectObject(hMemDC, hMemBitmap); ::BitBlt(hMemDC, 0, 0, m_nWidth, m_nHeight, hTmwDC, 0, 0, SRCCOPY); CxImage xImage; xImage.CreateFromHBITMAP(hMemBitmap); xImage.Save("c:\\temp\\test.bmp", CXIMAGE_SUPPORT_BMP); //BITMAP Bitmap; //int error = GetObject( &Bitmap, sizeof( BITMAP ), &m_hMemBitmap ); ::SelectObject(hMemDC, hOldMemBitmap); ::DeleteObject(hMemBitmap); ::DeleteDC(hMemDC); ::ReleaseDC(NULL, hDC); ::ReleaseDC(hwnd, hTmwDC); } void CAeroDrawTestDlg::OnBnClickedButton2() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. m_vRect.clear(); m_rcFull.top = 0; m_rcFull.bottom = 0; m_rcFull.left = 0; m_rcFull.right = 0; //memset(m_rcFull, 0, sizeof(m_rcFull)); ::EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (LPARAM)&m_vRect); CString strTemp; int ni = 0; //strTemp.Format(_T("%d번째 워터마크 rect(%d, %d, %d, %d)"), i, m_vRect[i].top, m_vRect[i].bottom, m_vRect[i].left, m_vRect[i].right); //strTemp.Format(_T("%d번째 워터마크 rect(%d, %d, %d, %d)"), i, m_vRect[i].top, m_vRect[i].bottom, m_vRect[i].left, m_vRect[i].right); m_nHeight = m_vRect[0].bottom - m_vRect[0].top; m_nWidth = m_vRect[0].right - m_vRect[0].left; HDC hDC = ::GetDC(NULL); // HDC hDC = NULL; m_nWidth = m_nWidth / 2; m_nHeight = m_nHeight / 2; CxImage xImage; xImage.Load("c:\\temp\\test.bmp", CXIMAGE_SUPPORT_BMP); // 이미지 로딩 xImage.Resample(m_nWidth, m_nHeight, CxImage::IM_LANCZOS); // 이미지 리사이징 HDC hMemDC = ::CreateCompatibleDC(hDC); HBITMAP hMemBitmap = CreateCompatibleBitmap(hDC, xImage.GetWidth(), xImage.GetHeight()); HBITMAP hOldMemBitmap = (HBITMAP)::SelectObject(hMemDC, hMemBitmap); xImage.Blt(hMemDC, 0, 0); //::BitBlt(hDC, 0, 0, m_nWidth, m_nHeight, hMemDC, 0, 0, SRCCOPY); BLENDFUNCTION blend; blend.BlendOp = AC_SRC_OVER; blend.BlendFlags = 0; blend.SourceConstantAlpha = 50; blend.AlphaFormat = 0; ::AlphaBlend(hDC, 0, 0, m_nWidth, m_nHeight, hMemDC, 0, 0, m_nWidth, m_nHeight, blend); ::SelectObject(hMemDC, hOldMemBitmap); ::DeleteObject(hMemBitmap); ::DeleteDC(hMemDC); ::ReleaseDC(NULL, hDC); } void CAeroDrawTestDlg::OnBnClickedGetprocessapp() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. UpdateData(TRUE); DWORD dwPid = 0; char szBuffer[MAX_PATH] = ""; HWND hParent=NULL; HWND myHwnd = NULL; // TODO: 여기에 추가 초기화 작업을 추가합니다. BOOL fForceIconic = TRUE; BOOL fHasIconicBitmap = TRUE; if(m_strValue.IsEmpty()) m_strValue = "notepad.exe"; //(LPSTR)(LPCSTR) strcpy(szBuffer, m_strValue.GetBuffer()); dwPid = CheckRunProcess(szBuffer); if(dwPid) { SystemWindowInformation wi( dwPid, TRUE ); if ( wi.m_WindowInfos.GetHeadPosition() == NULL ) { return ; } for ( POSITION pos = wi.m_WindowInfos.GetHeadPosition(); pos != NULL; ) { SystemWindowInformation::WINDOW_INFO& w = wi.m_WindowInfos.GetNext(pos); //TRACE("caption %s \n", w.Caption); if(dwPid == wi.m_processId) { myHwnd = w.hWnd; if(myHwnd == NULL) continue; if(IsWindow(myHwnd) == FALSE || ::IsWindowVisible(myHwnd ) == FALSE) continue; hParent = ::GetParent(myHwnd); if(hParent == NULL) hParent = myHwnd; // Aero 가 나타날때 해당 윈도우의 이벤트 전달 요청 등록 DwmSetWindowAttribute(hParent, 7, &fForceIconic, sizeof(fForceIconic)); // DWMWA_FORCE_ICONIC_REPRESENTATION DwmSetWindowAttribute(hParent, 10, &fHasIconicBitmap, sizeof(fHasIconicBitmap)); // DWMWA_HAS_ICONIC_BITMAP break; } } } dwPid = dwPid ; } //for ( POSITION pos = wi.m_WindowInfos.GetHeadPosition(); pos != NULL; ) //{ // SystemWindowInformation::WINDOW_INFO& w = wi.m_WindowInfos.GetNext(pos); // // //TRACE("caption %s \n", w.Caption); // if(dwPid == wi.m_processId) // { // myHwnd = w.hWnd; // if(myHwnd == NULL) // continue; // // // if(IsWindow(myHwnd) == FALSE || IsWindowVisible(myHwnd ) == FALSE) // continue; // // hParent = ::GetParent(myHwnd); // // if(hParent == NULL) // hParent = myHwnd; void CAeroDrawTestDlg::OnBnClickedGethwnd() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. // Aero 가 나타날때 해당 윈도우의 이벤트 전달 요청 등록 DWORD dwPid = GetCurrentProcessId(); HWND CurHwnd = NULL; CurHwnd = this->m_hWnd; SetFromPidtoHnd(dwPid, 1); // dwPid = CheckRunProcess("notepad.exe"); // SetFromPidtoHnd(dwPid); } HRESULT CAeroDrawTestDlg::_SendLivePreviewBitmap() { HRESULT hr = S_OK; HWND hwndTabFrame = this->m_hWnd; DWORD dwStyle = GetWindowLong(hwndTabFrame, GWL_STYLE); DWORD dwStyleEx = GetWindowLong(hwndTabFrame, GWL_EXSTYLE); // Compute the actual size the thumbnail will occupy on-screen in order to // render the live preview bitmap. We use the tab window outer frame window // to compute this. In case that window is minimized, we use GetWindowPlacement // to give the correct information. RECT rcClient = {}; RECT rcNCA = {}; WINDOWPLACEMENT wp; if (AdjustWindowRectEx(&rcNCA, dwStyle, FALSE, dwStyleEx) != 0 && ::GetWindowPlacement(hwndTabFrame, &wp) != 0) { if (wp.flags & WPF_RESTORETOMAXIMIZED) { HMONITOR hmon = MonitorFromRect(&wp.rcNormalPosition, MONITOR_DEFAULTTONULL); if (hmon) { MONITORINFO monitorInfo; monitorInfo.cbSize = sizeof(MONITORINFO); if (GetMonitorInfo(hmon, &monitorInfo)) { rcClient = monitorInfo.rcWork; } } } else { CopyRect(&rcClient, &wp.rcNormalPosition); } rcClient.right -= (-rcNCA.left + rcNCA.right); rcClient.bottom -= (-rcNCA.top + rcNCA.bottom); } if ((rcClient.right - rcClient.left) > 0 && (rcClient.bottom - rcClient.top) > 0) { POINT ptOffset; ptOffset.x = ptOffset.y = 10; HBITMAP hbm = _CreateDIB(rcClient.right - rcClient.left - 2*ptOffset.x, rcClient.bottom - rcClient.top - 2*ptOffset.y); if (hbm) { hr = set_live_preview(_hwnd, hbm, &ptOffset, 0); DeleteObject(hbm); } } return hr; } #define RINGWIDTH 10 #define MAXRING 5 #define MAXTABS 20 // This is a helper method to render the tab window contents at a specified // width and height. HBITMAP CAeroDrawTestDlg::_CreateDIB(int nWidth, int nHeight) { HBITMAP hbm = NULL; HDC hdcMem = CreateCompatibleDC(NULL); _iTab = 3; if (hdcMem != NULL) { BITMAPINFO bmi; ZeroMemory(&bmi.bmiHeader, sizeof(BITMAPINFOHEADER)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = nWidth; bmi.bmiHeader.biHeight = -nHeight; // Use a top-down DIB bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biBitCount = 32; PBYTE pbDS = NULL; hbm = CreateDIBSection(hdcMem, &bmi, DIB_RGB_COLORS, (VOID**)&pbDS, NULL, NULL); if (hbm != NULL) { int nRed = 0, nBlue = 0, nGreen = 0; // Compute tab color: red, orange, yellow, green, blue, indigo, violet switch (_iTab % 7) { case 1: nRed = 255; break; case 2: nRed = 255; nGreen = 155; break; case 3: nRed = 255; nGreen = 255; break; case 4: nGreen = 255; break; case 5: nBlue = 255; break; case 6: nRed = 155; nBlue = 255; break; case 0: nRed = 255; nBlue = 255; break; } // Fill in the pixels of the bitmap for (int y = 0; y < nHeight; y++) { for (int x = 0; x < nWidth; x++) { int edgeDistance = min(min(y, nHeight - y), min(x, nWidth - x)); int ring = min((edgeDistance / RINGWIDTH) + 1, MAXRING); int nAlpha = ring * (255 / MAXRING); pbDS[0] = (BYTE)(nBlue * nAlpha / 255); pbDS[1] = (BYTE)(nGreen * nAlpha / 255); pbDS[2] = (BYTE)(nRed * nAlpha / 255); pbDS[3] = (BYTE)(nAlpha); pbDS += 4; } } } DeleteDC(hdcMem); } return hbm; } void CAeroDrawTestDlg::OnBnClickedGetdlg() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. DWORD dwPid = 0; char szBuffer[MAX_PATH] = "", szTemp[MAX_PATH] = ""; HWND hParent=NULL; HWND myHwnd = NULL; // TODO: 여기에 추가 초기화 작업을 추가합니다. UpdateData(TRUE); if(m_strValue.IsEmpty()) m_strValue = "notepad.exe"; //(LPSTR)(LPCSTR) strcpy(szTemp, m_strValue.GetBuffer()); strcpy(szBuffer, strlwr(szTemp)); dwPid = CheckRunProcess(szBuffer); m_vRect.clear(); m_rcFull.top = 0; m_rcFull.bottom = 0; m_rcFull.left = 0; m_rcFull.right = 0; //memset(m_rcFull, 0, sizeof(m_rcFull)); ::EnumDisplayMonitors(NULL, NULL, MonitorEnumProc, (LPARAM)&m_vRect); CString strTemp; int ni = 0; //strTemp.Format(_T("%d번째 워터마크 rect(%d, %d, %d, %d)"), i, m_vRect[i].top, m_vRect[i].bottom, m_vRect[i].left, m_vRect[i].right); //strTemp.Format(_T("%d번째 워터마크 rect(%d, %d, %d, %d)"), i, m_vRect[i].top, m_vRect[i].bottom, m_vRect[i].left, m_vRect[i].right); m_nHeight = m_vRect[0].bottom - m_vRect[0].top; m_nWidth = m_vRect[0].right - m_vRect[0].left; HWND CurHwnd = NULL; // CurHwnd = this->m_hWnd; CurHwnd = SetFromPidtoHnd(dwPid, 0); // HWND hwnd = CurHwnd;; HDC hTmwDC = ::GetDC(CurHwnd); HDC hDC = ::GetDC(NULL); HDC hMemDC = ::CreateCompatibleDC(hDC); HBITMAP hMemBitmap = CreateCompatibleBitmap(hDC, m_nWidth, m_nHeight); HBITMAP hOldMemBitmap = (HBITMAP)::SelectObject(hMemDC, hMemBitmap); ::BitBlt(hMemDC, 0, 0, m_nWidth, m_nHeight, hTmwDC, 0, 0, SRCCOPY); CxImage xImage; xImage.CreateFromHBITMAP(hMemBitmap); xImage.Save("c:\\temp\\Test.bmp", CXIMAGE_SUPPORT_BMP); //BITMAP Bitmap; //int error = GetObject( &Bitmap, sizeof( BITMAP ), &m_hMemBitmap ); ::SelectObject(hMemDC, hOldMemBitmap); ::DeleteObject(hMemBitmap); ::DeleteDC(hMemDC); ::ReleaseDC(NULL, hDC); ::ReleaseDC(CurHwnd, hTmwDC); } void CAeroDrawTestDlg::OnCbnSelchangeCombo2() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. int nIndex = m_ProcessCombo.GetCurSel(); if (nIndex < 0) { return; } SaveDlgImage(nIndex, m_arrProcessInfo.GetAt(nIndex)->nPid); } void CAeroDrawTestDlg::OnCbnDropdownCombo2() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. HWND hnd= NULL; hnd = (HWND)0x00010F12; SaveImageIE(hnd); hnd = (HWND)0x00020EF6; SaveImageIE(hnd); hnd = (HWND)0x00010EF2; SaveImageIE(hnd); hnd = (HWND)0x00010EE8; SaveImageIE(hnd); SetProcess(); int nIndex = m_ProcessCombo.GetCurSel(); if (nIndex < 0) { return; } SaveDlgImage(nIndex, m_arrProcessInfo.GetAt(nIndex)->nPid); } void CAeroDrawTestDlg::OnBnClickedAll() { // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다. // HWND hnd = ::FindWindow(NULL, "Internet Explorer_Server"); SetProcess(); int nTotal = m_ProcessCombo.GetCount(); if (nTotal < 0) { return; } // CArray HDC or HBitmap for(int i= 0 ;i < nTotal ; i++) { SaveDlgImage(i, m_arrProcessInfo.GetAt(i)->nPid); } //CString strPID; //strPID.Format(_T("%d"), m_arrProcessInfo.GetAt(nIndex)->nPid); }
761a6b92099d43ea687db13037b61590f5d7e76e
8d08d12e7a06ab4832d070646bf69c5614210599
/02_integral_sin.cpp
0991348665da324f6ed0264b10210278388c550c
[]
no_license
f-fathurrahman/ffr-learns-madness
7012d0b2dc2f1a6b02a736bd86b48138bb91dc3b
1659654503d7ca7052e7620b62b49b9052dd6384
refs/heads/master
2020-05-26T11:17:58.815990
2019-05-23T10:25:40
2019-05-23T10:25:40
188,213,327
0
0
null
null
null
null
UTF-8
C++
false
false
699
cpp
02_integral_sin.cpp
#include <cstdio> #include <cmath> #include <madness/mra/mra.h> using namespace madness; // define a function double my_func(const coord_1d& r) { return std::sin(r[0]); } int main(int argc, char** argv) { initialize(argc, argv); World world(SafeMPI::COMM_WORLD); startup(world, argc, argv); if(world.rank() == 0) print(""); FunctionDefaults<1>::set_cubic_cell(0.0, M_PI); real_function_1d f = real_factory_1d(world).f(my_func); // integral of the function over the whole domain can be calculated using trace. double integral = f.trace(); if(world.rank() == 0) printf("Integral is %18.10f\n", integral); finalize(); return 0; }
699f8d3b572e42b29a875f5ae40df69d8afbce2d
781b703672fee74cb943188f5aee9d7af1929587
/src/TControl/TControl.cpp
8fddf0fdc61c116bb92e470756410c8171c763b5
[]
no_license
tomwillow/SagittariusIII
098ac436aba4ef2067c1f2855900058df3a4d3a8
28bbd17a44323654294ed063655ec52fc2df2af5
refs/heads/master
2023-05-21T21:43:12.887588
2021-06-11T03:52:34
2021-06-11T03:52:34
322,238,947
2
0
null
null
null
null
WINDOWS-1252
C++
false
false
1,093
cpp
TControl.cpp
#include "TControl.h" LRESULT CALLBACK TControl::SubControlProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { TWindow* pControl = nullptr; #ifdef _WIN64 pControl = (TControl*)GetWindowLongPtr(hWnd, GWLP_USERDATA); #else pControl = (TWindow*)GetWindowLong(hWnd, GWL_USERDATA); #endif WNDPROC oldProc = (WNDPROC)GetProp(hWnd, TEXT("OldProc")); if (pControl) { //if (uMsg == WM_DROPFILES) //{ // vector<tstring> dropFiles = pControl->PreDrop(wParam); // return pControl->DropProc(dropFiles); //} //else return pControl->WndProc(oldProc, hWnd, uMsg, wParam, lParam); } else return CallWindowProc(oldProc, hWnd, uMsg, wParam, lParam); } void TControl::RegisterProc()//´´½¨´°¿Úºó×¢²á { #ifdef _WIN64 SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR)this); WNDPROC oldProc = (WNDPROC)::SetWindowLongPtr(m_hWnd, GWLP_WNDPROC, SubControlProc); #else SetWindowLong(m_hWnd, GWL_USERDATA, (LONG)this); WNDPROC oldProc = (WNDPROC)::SetWindowLongPtr(m_hWnd, GWL_WNDPROC, (LONG_PTR)SubControlProc); #endif SetProp(m_hWnd, TEXT("OldProc"), oldProc); }
c3e27a94d8f52fdc7a43c8b66e5d21efb122854a
c3fde291428d78e38e56c202ef77da92000e528a
/task 74.cpp
a36acf80bd7362772b89b9e0d5af2added4950d2
[]
no_license
Dimash1905/d_cs-1905
5dd293c8f1f5905c52c9a9e6f1b7b95647f4d6d0
071bdc1c6798ed810e87ffc8fa905072f7d082a4
refs/heads/master
2020-09-14T02:45:51.031613
2019-11-23T09:42:54
2019-11-23T09:42:54
222,990,619
0
1
null
null
null
null
UTF-8
C++
false
false
237
cpp
task 74.cpp
#include<iostream> using namespace std; int main() { int a; cin >> a; if (a > 1 && a < 180) { int b = (a - 1) / 20 + 1; int c = ((a - 1) % 20) / 2; cout << (a % 2) * b + ((a + 1) % 2) * c; } else { cout << "does not exist"; } }
435edc8718b6acc90292975509531f9d01d57296
ec32f571f38fd293b64e4ca880e92f4c5e804af5
/run/tutorials/heatTransfer/buoyantBoussinesqSuperFluidPimpleFoam/wycinekRury/bezQ/wycinekRuryBlockMeshBezQ_Pawel/constant/transportProperties
fba57527fce4e028828a4f5129174235c092db9a
[]
no_license
Zhouwenyuan801/of1612
e53fbdf0b3a8c82206751ff5fe7d9c92b330f362
524e696526485023194da23e07ae3ac41267bb3d
refs/heads/master
2021-10-08T12:55:57.506426
2018-12-12T14:50:04
2018-12-12T14:50:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,444
transportProperties
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1606+ | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // transportModel HeliumConstRho; HeliumConstCoeffs { // Mean helium density //rhoHe rhoHe [1 -3 0 0 0 0 0] 147.0; TMean [0 0 0 1 0 0 0] 1.675; } HeliumConstRhoCoeffs { // Mean helium density // rhoHe rhoHe [1 -3 0 0 0 0 0] 147.0; } superFluidWallCoeffs { // Mean helium density // rhoHe rhoHe [1 -3 0 0 0 0 0] 147.0; } //rho 147.0; // for turbulentWallHeatFluxTemperature simplifiedSuperFluid Pietrowicz; KitamuraCoeffs { } PietrowiczCoeffs { GM on; } // hel w temp. 1.95 K //nu [0 2 -1 0 0 0 0] 0.00000000984449; // Needed for turbulentHeatFluxTemperature BC //rhoCp0 667642.820509542; // [1 -1 -2 -1 0 0 0] // Laminar Prandtl number //Pr [0 0 0 0 0 0 0] 1;// solver crashes if it is 0 // Turbulent Prandtl number Prt [0 0 0 0 0 0 0] 0.7; // Thermal expansion coefficient //beta [0 0 0 -1 0 0 0] -0.005283; // hel w temp. 1.8 K // Reference temperature TRef [0 0 0 1 0 0 0] 1.95; // parametr Goerter-Mellink dla helu w 1.95 K //AGM [-1 1 1 0 0 0 0] 1172.3688458133; // entropia dla helu w 1.95 K //s [0 2 -2 -1 0 0 0] 842.4003528199; // cp dla helu w 1.95 K //cp [0 2 -2 -1 0 0 0] 4528.9717746579; // rho dla helu w 1.95 K //rho [1 -3 0 0 0 0 0] 147.4159817567; // 1/f dla helu w 1.95 K //onebyf [3 1 -9 -1 0 0 0] 16975710249321.5; // temperatura lambda dla helu w 1.95 K //Tlambda [0 0 0 1 0 0 0] 2.1711132461; // ************************************************************************* //
b5c0f2668a33f9c31bc40aea97aee8f13a760dcc
88a88bbc9acf2c73319a71c6d94e96b09f13a6b1
/练习/习题/5714.cpp
6186fe20357df3a467e233520e1c41ab458d9638
[ "MIT" ]
permissive
XingChenHaiYi/XingChenHaiYi.github.io
5a87586e71a8009de1e49fd31ead25ea9caac7d8
5c006e5365742fb3bcf74695d08dbed5ca001ab7
refs/heads/master
2023-08-23T08:40:37.891467
2021-10-22T11:36:41
2021-10-22T11:36:41
419,147,950
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
338
cpp
5714.cpp
#include <stdio.h> int main() { int m,h; scanf("%d %d",&m,&h); double BMI = m/(h*h); if(BMI<18.5){ printf("Underweight"); } if(BMI>=18.5 && BMI<24){ printf("Normal"); } if(BMI>24){ printf("%lf\n",BMI); printf("Overweight"); } return 0; } // ´ËΪ40·Ö´ð°¸
e6fb9eeb252002cf801e07dae2bb5837bdc7c109
b93bd9183ce0064735651b8bca1f700ef02826e7
/1018 Public Bike Management (30分)/1018 Public Bike Management (30分)/1018 Public Bike Management (30分).cpp
0a69d0fea3c8bdade76103663e59ba64090b939a
[]
no_license
qianguangyuan/PAT-
4d404fa7fa887b6658da37ff3a63482bb34379cc
1eda7de7c039a5eb17d9e6e082d022e5e8ced1df
refs/heads/master
2023-01-12T06:51:16.755672
2020-11-08T13:10:00
2020-11-08T13:10:00
311,057,689
0
0
null
null
null
null
UTF-8
C++
false
false
1,289
cpp
1018 Public Bike Management (30分).cpp
#include <iostream> #include<vector> using namespace std; int m, n, nroad, pnode, lasttake= 0x3f3f3f3f,lastsend= 0x3f3f3f3f; vector<int> v[501],path,lastp; int a[501],b[501], dis[501][501]; int mindis[501] = { 0x3f3f3f3f }; void dfs(int cur, int dist,int send,int take) { if (dist > mindis[cur])return; path.push_back(cur); if (cur == pnode) { if (dist< mindis[cur]||(dist==mindis[cur]&&send<lastsend)||(dist==mindis[cur]&&take<lasttake)) { lastp=path; lasttake=take; lastsend=send; mindis[cur]=dist; } } else { mindis[cur] = dist; for (int i = 0; i < v[cur].size(); i++) { int j = v[cur][i]; if (take + a[j] < m / 2) dfs(j, dist + dis[cur][j], send+m / 2 - take - a[j], 0); else dfs(j, dist + dis[cur][j], send, take + a[j] - m / 2); } } path.pop_back(); } int main() { cin >> m >> n >> pnode >> nroad; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 0; i < nroad; i++) { int j, k, dist; cin >> j >> k >> dist; v[j].push_back(k); v[k].push_back(j); dis[j][k] = dist; dis[k][j] = dist; } for (int i = 0; i <= n; i++) mindis[i] = 0x3f3f3f3f; dfs(0, 0,0,0); cout << lastsend << ' '; cout << 0; for (int i = 1; i < lastp.size(); i++) cout << "->"<<lastp[i] ; cout << ' ' << lasttake; return 0; }
b1c0cc2a117f1a892ee86cc5589d76e9335d165f
4fe5eaa7bbd8c906ed58ee094d18f8590c2318b9
/event.cc
448084fe17d047d50bbbca56ea8c72e62ff3ff5f
[]
no_license
twoflies/mc
18c5ff6fbd4295672fc081f1b60bd0dfe8645e04
f76d5a85a6049f485013e12cdede14dad582f7fa
refs/heads/master
2021-01-11T22:25:42.424866
2017-04-21T18:44:08
2017-04-21T18:44:08
78,960,892
0
0
null
2017-04-21T18:44:08
2017-01-14T19:11:26
C++
UTF-8
C++
false
false
29
cc
event.cc
// Event #include "event.h"
8755f9942990dfdc886ee655b04da351b07b6bee
e39cd1188e2b400a2b7451fba8fee5fe0a7fef1a
/src/main.cpp
3c40c6c0f30af44bc2baaf64acd3725ea8fa3256
[]
no_license
ATM006/web
c7b9c91ca343a57f1f1db36f300d708ae7bce149
667e52552e176941094d2e974413c922795cbd50
refs/heads/master
2021-01-19T13:03:31.589246
2017-03-13T15:21:27
2017-03-13T15:21:27
82,361,158
0
1
null
null
null
null
UTF-8
C++
false
false
2,320
cpp
main.cpp
#include <stdio.h> #include <stdlib.h> #include <strings.h> #include <sys/types.h> /* See NOTES */ #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <vector> #include "http_response.h" #include "http_request.h" #include <string> #define IP "127.0.0.1" /* */ #define PORT 8080 /* */ //socket server // socket() // bind // listen(socket, 5) //状态, 主动,被动 // accept(socket, int main() { int listenFd = socket(AF_INET, SOCK_STREAM, 0); if (listenFd == -1) { perror("socket failed"); exit(1); } struct sockaddr_in listenAddr; bzero(&listenAddr, sizeof(listenAddr)); listenAddr.sin_family = AF_INET; //ip inet_pton(AF_INET, IP, &(listenAddr.sin_addr.s_addr)); //port listenAddr.sin_port = htons(PORT); //支持可扩展类型 int ret = bind(listenFd, (struct sockaddr *) &listenAddr, sizeof(listenAddr)); if (ret == -1) { perror("bind failed"); exit(1); } printf("bind successed %s:%d\n", IP, PORT); ret = listen(listenFd, 5); if (ret == -1) { perror("listen failed"); exit(1); } printf("listen successed %s:%d\n", IP, PORT); //char buff[1024]={0}; int clientFd = -1; while (1) { clientFd = accept(listenFd, NULL, 0); printf("a new connect is establishing\n"); //请求 /* int ret = recv(clientFd,buff,sizeof(buff),0); if(ret == -1) //-1 是否整整发生错误 { perror("recv"); close(clientFd); } */ //读取数据,判读数据是否完整 HttpRequest req(clientFd); req.read(); req.start(); HttpResponse rep(200); rep.header_add("Accept-Ranges","bytes") .header_add("Accept-Ranges", "bytes") .header_add("Last-Modified", "Fri, 13 Jan 2017 03:13:14 GMT") .header_add("Content-Type", "text/html; charset=UTF-8") .header_add("Content-Length", "5") .header_add("Date", "Fri, 10 Feb 2017 03:55:49 GMT"); rep.Body_add("hello"); std::string package = rep.getPackage(); //printf("%s\n",buff); // do HTTP // //printf("%s\n",package.c_str()); // send(clientFd,package.data(),package.length(),0); close(clientFd); clientFd = -1; } }
446d3ddaa46ee702fe8f4b4f749cc7013656c122
bdba9da6e6a9fd0abc116df6a8c004f27ae08dd2
/Problem 03 - Largest prime factor.cpp
fa5d436ec6785dc4b6e51d48a0ec8076959e4c6d
[]
no_license
AndreyPaiva/Project-euler
0d99216ce143e594c3f31bcd59ff10d8700842a3
cc26bca20d413d6bc9336afbfd2817076ebe996a
refs/heads/main
2023-09-04T11:52:39.774265
2021-10-28T04:12:05
2021-10-28T04:12:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,069
cpp
Problem 03 - Largest prime factor.cpp
/*Project Euler - Problem 3: Largest prime factor The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? Author: Andrey Paiva October 27th of 2021*/ #include <iostream> #include <cstdlib> using namespace std; int main(void){ long long int number = 600851475143; //starting number in question long long int factor = 1; //prime factors, starting in 2 because 2 is the smallest prime number while(number != 1){ //looping until the number is completely factored factor++; //when the number is no longer divisible by the previous factor, increase the factor while(number % factor == 0){ //if the number is still divisible for the factor, divide it again. Only prime factors will appear, because the nonprime factors are multiples of the prime factors as well number /= factor; } } cout << "The largest prime factor of 600851475143 is " << factor << "." << endl; //show the largest prime factor system("pause"); return 0; }
2c01681cc7b08ccb6e5821de2ee63cedbee1476a
7cc08e2de5f8f2d3e2623af978150bfc719ed2c7
/DOSCenter/NewFilenameDlg.h
3e68617e9bac13e6ce8fcf3790c7cacbdcc079e8
[]
no_license
lowercasehargle/DOSCenter
f875eefc87f59db8830c370c37cc965df706a45d
dae074da49b2cae3561943031ae5dc7f572db972
refs/heads/master
2020-07-28T14:09:30.796807
2020-05-11T16:47:24
2020-05-11T16:47:24
209,434,409
0
0
null
null
null
null
UTF-8
C++
false
false
558
h
NewFilenameDlg.h
#pragma once #include "afxwin.h" // CNewFilenameDlg dialog class CNewFilenameDlg : public CDialog { DECLARE_DYNAMIC(CNewFilenameDlg) public: CNewFilenameDlg(CWnd* pParent = NULL); // standard constructor virtual ~CNewFilenameDlg(); virtual BOOL OnInitDialog(); // Dialog Data enum { IDD = IDD_NEWFILENAMEDLG }; afx_msg void OnBnClickedOk(); CString m_txt; int m_ok; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() public: CEdit m_newFilenameTxt; };
10af7d0493f3c6f5eee50074abf3e9de4a8cd61c
a27902d38a9a474ebb3d8563463fd88cca7e4685
/DeviceDetect/EnumDevices.cpp
81771304df9e4d28423054f7fa188e860bfcfa65
[]
no_license
axax002/DeviceControl
f69b1308fdd5df1bec0c73bef2f1243810f47554
953537539000bbf0f7821fb7c4a2564877c571c7
refs/heads/master
2023-05-30T02:56:32.141702
2017-09-28T02:06:47
2017-09-28T02:06:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,570
cpp
EnumDevices.cpp
#include "StdAfx.h" #include "EnumDevices.h" #include <setupapi.h> using namespace DeviceDetectLibrary; static DeviceType GetDeviceType(const wchar_t* sPath); static std::wstring GetDeviceRegistryProperty(HDEVINFO & hDevInfo, PSP_DEVINFO_DATA pdevInfoData, DWORD dwProperty); DeviceType GetDeviceType(const wchar_t* sPath) { COMMPROP comProp; DeviceType type = TypeUnknown; HANDLE hFile = ::CreateFile( sPath, FILE_GENERIC_READ | FILE_GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if(INVALID_HANDLE_VALUE != hFile && TRUE == ::GetCommProperties(hFile, &comProp)) { switch(comProp.dwProvSubType) { case PST_MODEM: { type = TypeUsb; } break; case PST_RS232: { type = TypeSerial; } break; default: { type= TypeUnknown; } break; } } ::CloseHandle(hFile); return type; } std::wstring GetDeviceRegistryProperty(HDEVINFO & hDevInfo, PSP_DEVINFO_DATA pdevInfoData, DWORD dwProperty) { DWORD dwSize = 0; DWORD dwDataType = 0; if(NULL == pdevInfoData) { // Wrong PSP_DEVINFO_DATA parameter"); throw std::runtime_error("Wrong PSP_DEVINFO_DATA parameter"); } if(FALSE == ::SetupDiGetDeviceRegistryProperty(hDevInfo, pdevInfoData, dwProperty, &dwDataType, NULL, 0, &dwSize)) { DWORD error = ::GetLastError(); if(ERROR_INVALID_DATA == error) { return std::wstring(); } if(ERROR_INSUFFICIENT_BUFFER != error) { // Can't get Device Registry Property"); throw std::runtime_error("Can't get Device Registry Property"); } } std::vector<TCHAR> sResult(dwSize, 0x00); if(sResult.empty()) { // Can't get Device Registry Property is empty"); throw std::runtime_error("Can't get Device Registry Property is empty"); } if(FALSE == ::SetupDiGetDeviceRegistryProperty(hDevInfo, pdevInfoData, dwProperty, &dwDataType, (PBYTE) &sResult.front(), (DWORD)sResult.size(), &dwSize)) { // Can't get Device Registry Property"); throw std::runtime_error("Can't get Device Registry Property"); } sResult.resize(dwSize); if(sResult.empty()) { // Device Registry Property is empty"); throw std::runtime_error("Device Registry Property is empty"); } return std::wstring(&sResult.front()); } /* template <class TYPECHECKER> ConnectionInfo_vt GetDevicesByGuidCheck(GUID* guid, const std::wstring & sPattern, TYPECHECKER checker) { ConnectionInfo_vt result; HDEVINFO hDevInfo = ::SetupDiGetClassDevs(guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); if(INVALID_HANDLE_VALUE == hDevInfo) { // Can't Find Class Devises"); return result; } SP_DEVICE_INTERFACE_DATA devInterfaceData; ZeroMemory(&devInterfaceData, sizeof(SP_DEVICE_INTERFACE_DATA)); devInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); for(DWORD dwCount = 0; ::SetupDiEnumDeviceInterfaces(hDevInfo, NULL, guid, dwCount, &devInterfaceData); ++dwCount) { try { ConnectionInfo info = checker(hDevInfo, &devInterfaceData, sPattern); result.push_back(info); } catch(const std::exception & ex) { ex.what(); } } ::SetupDiDestroyDeviceInfoList(hDevInfo); return result; } */ //ConnectionInfo PureChecker(HDEVINFO hDevInfo, SP_DEVICE_INTERFACE_DATA* devInterfaceData, const std::wstring & sPattern) bool PureChecker(HDEVINFO hDevInfo, SP_DEVICE_INTERFACE_DATA* devInterfaceData, const std::wstring & sPattern, CConnectionInfo::Pointer &pConnectionInfo) { pConnectionInfo->Clear(); TCHAR tcBuffer[0x400] = {0x00}; PSP_DEVICE_INTERFACE_DETAIL_DATA pDevInfoDetail = (PSP_DEVICE_INTERFACE_DETAIL_DATA) tcBuffer; pDevInfoDetail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA); SP_DEVINFO_DATA devInfoData; ZeroMemory(&devInfoData, sizeof(SP_DEVINFO_DATA)); devInfoData.cbSize = sizeof(SP_DEVINFO_DATA); DWORD dwReqSize = 0; if(TRUE == ::SetupDiGetDeviceInterfaceDetail(hDevInfo, devInterfaceData, pDevInfoDetail, sizeof(tcBuffer)/sizeof(TCHAR), &dwReqSize, &devInfoData)) { pConnectionInfo->Type = TypeUsb; pConnectionInfo->FriendlyName = GetDeviceRegistryProperty(hDevInfo, &devInfoData, SPDRP_FRIENDLYNAME); pConnectionInfo->DeviceDescription = GetDeviceRegistryProperty(hDevInfo, &devInfoData, SPDRP_DEVICEDESC); pConnectionInfo->HardwareID = GetDeviceRegistryProperty(hDevInfo, &devInfoData, SPDRP_HARDWAREID); pConnectionInfo->ServiceName = GetDeviceRegistryProperty(hDevInfo, &devInfoData, SPDRP_SERVICE); pConnectionInfo->DevicePath = pDevInfoDetail->DevicePath; return true; } throw std::runtime_error("Can't SetupDiGetInterfaceDeviceDetail"); } //ConnectionInfo_vt DeviceDetectLibrary::GetDevicesByGuid(GUID guid) bool DeviceDetectLibrary::GetDevicesByGuid(GUID guid, ConnectionInfo_vt &vctResult) { //return GetDevicesByGuidCheck(&guid, L"", &PureChecker); vctResult.clear(); //ConnectionInfo_vt result; HDEVINFO hDevInfo = ::SetupDiGetClassDevs(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); if(INVALID_HANDLE_VALUE == hDevInfo) { // Can't Find Class Devises"); //return result; return false; } SP_DEVICE_INTERFACE_DATA devInterfaceData; ZeroMemory(&devInterfaceData, sizeof(SP_DEVICE_INTERFACE_DATA)); devInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA); for(DWORD dwCount = 0; ::SetupDiEnumDeviceInterfaces(hDevInfo, NULL, &guid, dwCount, &devInterfaceData); ++dwCount) { try { //ConnectionInfo info = PureChecker(hDevInfo, &devInterfaceData, L""); CConnectionInfo::Pointer pConnectionInfo = CConnectionInfo::Create(); if(PureChecker(hDevInfo, &devInterfaceData, L"", pConnectionInfo)) { vctResult.push_back(pConnectionInfo); } //result.push_back(info); } catch(const std::exception & ex) { ex.what(); } } ::SetupDiDestroyDeviceInfoList(hDevInfo); return true; } HDEVNOTIFY DeviceDetectLibrary::RegisterUSBNotify(const GUID& guid, HANDLE hWnd) { DEV_BROADCAST_DEVICEINTERFACE notificationFilter; ZeroMemory(&notificationFilter, sizeof(notificationFilter)); notificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE); notificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; notificationFilter.dbcc_classguid = guid; HDEVNOTIFY hDevNotify = ::RegisterDeviceNotification(hWnd, &notificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE ); if(hDevNotify == NULL) { int error = GetLastError(); throw std::runtime_error("Can not register device notify"); } return hDevNotify; } void DeviceDetectLibrary::UnRegisterUSBNotify(HDEVNOTIFY hNotyfy) { if(FALSE == ::UnregisterDeviceNotification(hNotyfy)) { throw std::runtime_error("Can not unregister device notify"); } }
404585ad268e3183acc12a2b035cf8409a942d6c
9755db4052843b40c1487991d6e3db4838761c70
/520B.cpp
8a7c2d99f7776caa396ce49302d2e1faefaf6882
[]
no_license
Leonid369/Codeforces-solutions
93c0ec2f8ee79a24dc630d39072074c12cb6382e
a2eea77157cec95397459de3be3d3d0759e20b73
refs/heads/master
2021-07-03T23:32:45.505799
2020-12-10T01:02:08
2020-12-10T01:02:08
207,666,030
1
0
null
2020-08-06T15:29:47
2019-09-10T21:25:45
C++
UTF-8
C++
false
false
973
cpp
520B.cpp
// // main.cpp // codeforces // // Created by Sachu Leonid on 9/22/19. // Copyright © 2019 Sachu Leonid. All rights reserved. // #include <iostream> #include <queue> using namespace std; int k; bool visited[10020]; struct node{ int p, t; node(int a,int b){ p=a; t=b; } }; int bfs(int x, int y){ queue<node> q; q.push(node(x,0)); while(!q.empty()){ node z= q.front(); q.pop(); int xx=z.p; int t=z.t; if(xx == y) return t; else{ if(xx*2==y)return t+1; else{ if((xx*2<y+11) && (visited[xx-1]==false))q.push(node(xx*2,t+1)); if(xx-1==y)return t+1; else if((xx-1>=0) && (visited[xx-1]==false))q.push(node(xx-1,t+1)); } }} return 0; } int main(){ int n,m; cin>>n>>m; k=bfs(n,m); cout<<k<<"\n"; return 0; }
0e6db4b8580f4c2f50cbf96717a7e779a960e236
a672dea4d4e83c1763fe506900ea93234d10811e
/C/submissions/accepted/c.cpp
efeb11054e3f72f75119569de9cae687ac8a3c1f
[]
no_license
mzshieh/2020-topc
ed1160c2eef25a67a81ba021d59647ff41a73427
ea598061ddff1c0048fdb1421d62031ebd84d182
refs/heads/master
2022-12-26T21:46:07.025827
2020-10-08T12:42:20
2020-10-08T12:42:20
290,397,347
1
1
null
null
null
null
UTF-8
C++
false
false
2,037
cpp
c.cpp
#include<bits/stdc++.h> #define mp make_pair #define pb push_back #define pll pair<LL,LL> #define pii pair<int,int> #define y second #define x first #define LL long long #define sqr(x) ((x)*(x)) #define pi acosl(-1) #define MEM(x) memset(x,0,sizeof(x)) using namespace std; double getdis(pii &p,pii &q){ return sqrt(sqr(p.x-q.x*1ll)+sqr(p.y-q.y*1ll)); } void solve(){ int n; scanf("%d",&n); pii p[2005]; for(int i = 0;i<n;i++){ int x,y; scanf("%d %d",&x,&y); p[i]=mp(x,y); } priority_queue<pair<double,pii>,vector<pair<double,pii>>,greater<pair<double,pii> > > pq; int vis[2005]; double ans[2005]; for(int i = 0;i<n;i++){ for(int j=i+1;j<n;j++){ pq.push(mp(getdis(p[i],p[j])/2,mp(i,j))); } } fill(vis,vis+n,0); while(!pq.empty()){ auto pp=pq.top(); pq.pop(); double dis=pp.x; int a,b; tie(a,b)=pp.y; if(vis[a]&&vis[b])continue; if(!vis[a]&&!vis[b]){ vis[a]=1; vis[b]=1; ans[a]=ans[b]=dis; for(int i = 0;i<n;i++){ if(!vis[i]){ pq.push(mp(getdis(p[a],p[i])-ans[a],mp(i,a))); pq.push(mp(getdis(p[b],p[i])-ans[b],mp(i,b))); } } } else{ if(vis[b])swap(a,b); if(abs(ans[a]+dis-getdis(p[a],p[b]))<1e-8){ ans[b]=dis; vis[b]=1; for(int i = 0;i<n;i++){ if(!vis[i]){ pq.push(mp(getdis(p[b],p[i])-ans[b],mp(i,b))); } } } } } double res=0; for(int i = 0;i<n;i++)res+=ans[i]*ans[i]*pi;//,printf("%lf\n",ans[i]); printf("%.15f\n",res); } int main(){ int t=1; // scanf("%d",&t); while(t--){ solve(); } } /* 100 5 5 4 4 2 4 2 3 5 4 2 3 1 */
16536bef89fc853ba816711dd8edd8e5ba741e96
c90a56e7d7752b041fc5eb38257c5573cef346c6
/src-linux/TPrsStd.cpp
9a2328fe085258f2438e25fa6cfe7bda924b6ac7
[]
no_license
random-builder/design_cadquery_ocp
a4c572a72699bad52ca5f43f30bb7c15d89072ff
2af799a9f1b2d81fd39e519b2f73e12b34a14c0a
refs/heads/master
2021-05-21T23:10:23.833461
2020-03-29T15:34:46
2020-03-29T15:34:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
50,322
cpp
TPrsStd.cpp
// std lib related includes #include <tuple> // pybind 11 related includes #include <pybind11/pybind11.h> #include <pybind11/stl.h> namespace py = pybind11; // Standard Handle #include <Standard_Handle.hxx> // includes to resolve forward declarations #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> #include <AIS_InteractiveContext.hxx> #include <Standard_GUID.hxx> #include <TDF_Label.hxx> #include <V3d_Viewer.hxx> #include <TDF_RelocationTable.hxx> #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> #include <TDF_Label.hxx> #include <TDF_RelocationTable.hxx> #include <TDF_AttributeDelta.hxx> #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> #include <TDataXtd_Constraint.hxx> #include <AIS_InteractiveObject.hxx> #include <TCollection_ExtendedString.hxx> #include <TopoDS_Shape.hxx> #include <Geom_Geometry.hxx> #include <TDF_Label.hxx> #include <AIS_InteractiveObject.hxx> // module includes #include <TPrsStd_AISPresentation.hxx> #include <TPrsStd_AISViewer.hxx> #include <TPrsStd_AxisDriver.hxx> #include <TPrsStd_ConstraintDriver.hxx> #include <TPrsStd_ConstraintTools.hxx> #include <TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx> #include <TPrsStd_DataMapOfGUIDDriver.hxx> #include <TPrsStd_Driver.hxx> #include <TPrsStd_DriverTable.hxx> #include <TPrsStd_GeometryDriver.hxx> #include <TPrsStd_NamedShapeDriver.hxx> #include <TPrsStd_PlaneDriver.hxx> #include <TPrsStd_PointDriver.hxx> // template related includes // ./opencascade/TPrsStd_DataMapOfGUIDDriver.hxx #include "NCollection_tmpl.hxx" // user-defined pre #include "OCP_specific.inc" // user-defined inclusion per module // Module definiiton void register_TPrsStd(py::module &main_module) { py::module m = static_cast<py::module>(main_module.attr("TPrsStd")); //Python trampoline classes class Py_TPrsStd_Driver : public TPrsStd_Driver{ public: using TPrsStd_Driver::TPrsStd_Driver; // public pure virtual Standard_Boolean Update(const TDF_Label & L,opencascade::handle<AIS_InteractiveObject> & ais) override { PYBIND11_OVERLOAD_PURE(Standard_Boolean,TPrsStd_Driver,Update,L,ais) }; // protected pure virtual // private pure virtual }; // classes static_cast<py::class_<TPrsStd_AISPresentation ,opencascade::handle<TPrsStd_AISPresentation> , TDF_Attribute>>(m.attr("TPrsStd_AISPresentation")) // constructors .def(py::init< >() ) // custom constructors // methods .def("SetDisplayed", (void (TPrsStd_AISPresentation::*)( const Standard_Boolean ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Boolean ) >(&TPrsStd_AISPresentation::SetDisplayed), R"#(None)#" , py::arg("B")) .def("Display", (void (TPrsStd_AISPresentation::*)( const Standard_Boolean ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Boolean ) >(&TPrsStd_AISPresentation::Display), R"#(Display presentation of object in AIS viewer. If <update> = True then AISObject is recomputed and all the visualization settings are applied)#" , py::arg("update")=static_cast<const Standard_Boolean>(Standard_False)) .def("Erase", (void (TPrsStd_AISPresentation::*)( const Standard_Boolean ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Boolean ) >(&TPrsStd_AISPresentation::Erase), R"#(Removes the presentation of this AIS presentation attribute from the TPrsStd_AISViewer. If remove is true, this AIS presentation attribute is removed from the interactive context.)#" , py::arg("remove")=static_cast<const Standard_Boolean>(Standard_False)) .def("Update", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::Update), R"#(Recompute presentation of object and apply the visualization settings)#" ) .def("GetDriverGUID", (Standard_GUID (TPrsStd_AISPresentation::*)() const) static_cast<Standard_GUID (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::GetDriverGUID), R"#(None)#" ) .def("SetDriverGUID", (void (TPrsStd_AISPresentation::*)( const Standard_GUID & ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_GUID & ) >(&TPrsStd_AISPresentation::SetDriverGUID), R"#(None)#" , py::arg("guid")) .def("IsDisplayed", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::IsDisplayed), R"#(Returns true if this AIS presentation attribute is displayed.)#" ) .def("GetAIS", (opencascade::handle<AIS_InteractiveObject> (TPrsStd_AISPresentation::*)() const) static_cast<opencascade::handle<AIS_InteractiveObject> (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::GetAIS), R"#(Returns AIS_InteractiveObject stored in the presentation attribute)#" ) .def("Material", (Graphic3d_NameOfMaterial (TPrsStd_AISPresentation::*)() const) static_cast<Graphic3d_NameOfMaterial (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::Material), R"#(Returns the material setting for this presentation attribute.)#" ) .def("SetMaterial", (void (TPrsStd_AISPresentation::*)( const Graphic3d_NameOfMaterial ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Graphic3d_NameOfMaterial ) >(&TPrsStd_AISPresentation::SetMaterial), R"#(Sets the material aName for this presentation attribute.)#" , py::arg("aName")) .def("HasOwnMaterial", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::HasOwnMaterial), R"#(Returns true if this presentation attribute already has a material setting.)#" ) .def("UnsetMaterial", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::UnsetMaterial), R"#(Removes the material setting from this presentation attribute.)#" ) .def("SetTransparency", (void (TPrsStd_AISPresentation::*)( const Standard_Real ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Real ) >(&TPrsStd_AISPresentation::SetTransparency), R"#(Sets the transparency value aValue for this presentation attribute. This value is 0.6 by default.)#" , py::arg("aValue")=static_cast<const Standard_Real>(0.6)) .def("Transparency", (Standard_Real (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Real (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::Transparency), R"#(None)#" ) .def("HasOwnTransparency", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::HasOwnTransparency), R"#(Returns true if this presentation attribute already has a transparency setting.)#" ) .def("UnsetTransparency", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::UnsetTransparency), R"#(Removes the transparency setting from this presentation attribute.)#" ) .def("Color", (Quantity_NameOfColor (TPrsStd_AISPresentation::*)() const) static_cast<Quantity_NameOfColor (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::Color), R"#(None)#" ) .def("SetColor", (void (TPrsStd_AISPresentation::*)( const Quantity_NameOfColor ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Quantity_NameOfColor ) >(&TPrsStd_AISPresentation::SetColor), R"#(Sets the color aColor for this presentation attribute.)#" , py::arg("aColor")) .def("HasOwnColor", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::HasOwnColor), R"#(Returns true if this presentation attribute already has a color setting.)#" ) .def("UnsetColor", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::UnsetColor), R"#(Removes the color setting from this presentation attribute.)#" ) .def("Width", (Standard_Real (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Real (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::Width), R"#(None)#" ) .def("SetWidth", (void (TPrsStd_AISPresentation::*)( const Standard_Real ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Real ) >(&TPrsStd_AISPresentation::SetWidth), R"#(Sets the width aWidth for this presentation attribute.)#" , py::arg("aWidth")) .def("HasOwnWidth", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::HasOwnWidth), R"#(Returns true if this presentation attribute already has a width setting.)#" ) .def("UnsetWidth", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::UnsetWidth), R"#(Removes the width setting from this presentation attribute.)#" ) .def("Mode", (Standard_Integer (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Integer (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::Mode), R"#(None)#" ) .def("SetMode", (void (TPrsStd_AISPresentation::*)( const Standard_Integer ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Integer ) >(&TPrsStd_AISPresentation::SetMode), R"#(None)#" , py::arg("theMode")) .def("HasOwnMode", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::HasOwnMode), R"#(None)#" ) .def("UnsetMode", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::UnsetMode), R"#(None)#" ) .def("GetNbSelectionModes", (Standard_Integer (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Integer (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::GetNbSelectionModes), R"#(Returns selection mode(s) of the attribute. It starts with 1 .. GetNbSelectionModes().)#" ) .def("SelectionMode", (Standard_Integer (TPrsStd_AISPresentation::*)( const int ) const) static_cast<Standard_Integer (TPrsStd_AISPresentation::*)( const int ) const>(&TPrsStd_AISPresentation::SelectionMode), R"#(None)#" , py::arg("index")=static_cast<const int>(1)) .def("SetSelectionMode", (void (TPrsStd_AISPresentation::*)( const Standard_Integer , const Standard_Boolean ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Integer , const Standard_Boolean ) >(&TPrsStd_AISPresentation::SetSelectionMode), R"#(Sets selection mode. If "theTransaction" flag is OFF, modification of the attribute doesn't influence the transaction mechanism (the attribute doesn't participate in undo/redo because of this modification). Certainly, if any other data of the attribute is modified (display mode, color, ...), the attribute will be included into undo/redo.)#" , py::arg("theSelectionMode"), py::arg("theTransaction")=static_cast<const Standard_Boolean>(Standard_True)) .def("AddSelectionMode", (void (TPrsStd_AISPresentation::*)( const Standard_Integer , const Standard_Boolean ) ) static_cast<void (TPrsStd_AISPresentation::*)( const Standard_Integer , const Standard_Boolean ) >(&TPrsStd_AISPresentation::AddSelectionMode), R"#(None)#" , py::arg("theSelectionMode"), py::arg("theTransaction")=static_cast<const Standard_Boolean>(Standard_True)) .def("HasOwnSelectionMode", (Standard_Boolean (TPrsStd_AISPresentation::*)() const) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::HasOwnSelectionMode), R"#(None)#" ) .def("UnsetSelectionMode", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::UnsetSelectionMode), R"#(Clears all selection modes of the attribute.)#" ) .def("ID", (const Standard_GUID & (TPrsStd_AISPresentation::*)() const) static_cast<const Standard_GUID & (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::ID), R"#(None)#" ) .def("NewEmpty", (opencascade::handle<TDF_Attribute> (TPrsStd_AISPresentation::*)() const) static_cast<opencascade::handle<TDF_Attribute> (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::NewEmpty), R"#(None)#" ) .def("Restore", (void (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_Attribute> & ) ) static_cast<void (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_Attribute> & ) >(&TPrsStd_AISPresentation::Restore), R"#(None)#" , py::arg("with")) .def("Paste", (void (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_Attribute> & , const opencascade::handle<TDF_RelocationTable> & ) const) static_cast<void (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_Attribute> & , const opencascade::handle<TDF_RelocationTable> & ) const>(&TPrsStd_AISPresentation::Paste), R"#(None)#" , py::arg("into"), py::arg("RT")) .def("BackupCopy", (opencascade::handle<TDF_Attribute> (TPrsStd_AISPresentation::*)() const) static_cast<opencascade::handle<TDF_Attribute> (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::BackupCopy), R"#(None)#" ) .def("AfterAddition", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::AfterAddition), R"#(None)#" ) .def("BeforeRemoval", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::BeforeRemoval), R"#(None)#" ) .def("BeforeForget", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::BeforeForget), R"#(None)#" ) .def("AfterResume", (void (TPrsStd_AISPresentation::*)() ) static_cast<void (TPrsStd_AISPresentation::*)() >(&TPrsStd_AISPresentation::AfterResume), R"#(None)#" ) .def("BeforeUndo", (Standard_Boolean (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_AttributeDelta> & , const Standard_Boolean ) ) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_AttributeDelta> & , const Standard_Boolean ) >(&TPrsStd_AISPresentation::BeforeUndo), R"#(None)#" , py::arg("anAttDelta"), py::arg("forceIt")=static_cast<const Standard_Boolean>(Standard_False)) .def("AfterUndo", (Standard_Boolean (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_AttributeDelta> & , const Standard_Boolean ) ) static_cast<Standard_Boolean (TPrsStd_AISPresentation::*)( const opencascade::handle<TDF_AttributeDelta> & , const Standard_Boolean ) >(&TPrsStd_AISPresentation::AfterUndo), R"#(update AIS viewer according to delta)#" , py::arg("anAttDelta"), py::arg("forceIt")=static_cast<const Standard_Boolean>(Standard_False)) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_AISPresentation::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_AISPresentation::*)() const>(&TPrsStd_AISPresentation::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("GetID_s", (const Standard_GUID & (*)() ) static_cast<const Standard_GUID & (*)() >(&TPrsStd_AISPresentation::GetID), R"#(Returns the GUID for TPrsStd_AISPresentation attributes.)#" ) .def_static("Set_s", (opencascade::handle<TPrsStd_AISPresentation> (*)( const TDF_Label & , const Standard_GUID & ) ) static_cast<opencascade::handle<TPrsStd_AISPresentation> (*)( const TDF_Label & , const Standard_GUID & ) >(&TPrsStd_AISPresentation::Set), R"#(Creates or retrieves the presentation attribute on the label L, and sets the GUID driver.)#" , py::arg("L"), py::arg("driver")) .def_static("Unset_s", (void (*)( const TDF_Label & ) ) static_cast<void (*)( const TDF_Label & ) >(&TPrsStd_AISPresentation::Unset), R"#(Delete (if exist) the presentation attribute associated to the label <L>.)#" , py::arg("L")) .def_static("Set_s", (opencascade::handle<TPrsStd_AISPresentation> (*)( const opencascade::handle<TDF_Attribute> & ) ) static_cast<opencascade::handle<TPrsStd_AISPresentation> (*)( const opencascade::handle<TDF_Attribute> & ) >(&TPrsStd_AISPresentation::Set), R"#(Creates or retrieves the AISPresentation attribute attached to master. The GUID of the driver will be the GUID of master. master is the attribute you want to display.)#" , py::arg("master")) .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_AISPresentation::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_AISPresentation::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_AISViewer ,opencascade::handle<TPrsStd_AISViewer> , TDF_Attribute>>(m.attr("TPrsStd_AISViewer")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (void (TPrsStd_AISViewer::*)() const) static_cast<void (TPrsStd_AISViewer::*)() const>(&TPrsStd_AISViewer::Update), R"#(Updates the viewer at the label access. access is the root of the data framework.)#" ) .def("SetInteractiveContext", (void (TPrsStd_AISViewer::*)( const opencascade::handle<AIS_InteractiveContext> & ) ) static_cast<void (TPrsStd_AISViewer::*)( const opencascade::handle<AIS_InteractiveContext> & ) >(&TPrsStd_AISViewer::SetInteractiveContext), R"#(Sets the interactive context ctx for this attribute.)#" , py::arg("ctx")) .def("GetInteractiveContext", (opencascade::handle<AIS_InteractiveContext> (TPrsStd_AISViewer::*)() const) static_cast<opencascade::handle<AIS_InteractiveContext> (TPrsStd_AISViewer::*)() const>(&TPrsStd_AISViewer::GetInteractiveContext), R"#(Returns the interactive context in this attribute.)#" ) .def("ID", (const Standard_GUID & (TPrsStd_AISViewer::*)() const) static_cast<const Standard_GUID & (TPrsStd_AISViewer::*)() const>(&TPrsStd_AISViewer::ID), R"#(None)#" ) .def("Restore", (void (TPrsStd_AISViewer::*)( const opencascade::handle<TDF_Attribute> & ) ) static_cast<void (TPrsStd_AISViewer::*)( const opencascade::handle<TDF_Attribute> & ) >(&TPrsStd_AISViewer::Restore), R"#(None)#" , py::arg("with")) .def("NewEmpty", (opencascade::handle<TDF_Attribute> (TPrsStd_AISViewer::*)() const) static_cast<opencascade::handle<TDF_Attribute> (TPrsStd_AISViewer::*)() const>(&TPrsStd_AISViewer::NewEmpty), R"#(None)#" ) .def("Paste", (void (TPrsStd_AISViewer::*)( const opencascade::handle<TDF_Attribute> & , const opencascade::handle<TDF_RelocationTable> & ) const) static_cast<void (TPrsStd_AISViewer::*)( const opencascade::handle<TDF_Attribute> & , const opencascade::handle<TDF_RelocationTable> & ) const>(&TPrsStd_AISViewer::Paste), R"#(None)#" , py::arg("into"), py::arg("RT")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_AISViewer::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_AISViewer::*)() const>(&TPrsStd_AISViewer::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("GetID_s", (const Standard_GUID & (*)() ) static_cast<const Standard_GUID & (*)() >(&TPrsStd_AISViewer::GetID), R"#(class methods =============)#" ) .def_static("Has_s", (Standard_Boolean (*)( const TDF_Label & ) ) static_cast<Standard_Boolean (*)( const TDF_Label & ) >(&TPrsStd_AISViewer::Has), R"#(returns True if there is an AISViewer attribute in <acces> Data Framework.)#" , py::arg("acces")) .def_static("New_s", (opencascade::handle<TPrsStd_AISViewer> (*)( const TDF_Label & , const opencascade::handle<AIS_InteractiveContext> & ) ) static_cast<opencascade::handle<TPrsStd_AISViewer> (*)( const TDF_Label & , const opencascade::handle<AIS_InteractiveContext> & ) >(&TPrsStd_AISViewer::New), R"#(create and set an AISViewer at. Raise an exception if Has.)#" , py::arg("access"), py::arg("selector")) .def_static("New_s", (opencascade::handle<TPrsStd_AISViewer> (*)( const TDF_Label & , const opencascade::handle<V3d_Viewer> & ) ) static_cast<opencascade::handle<TPrsStd_AISViewer> (*)( const TDF_Label & , const opencascade::handle<V3d_Viewer> & ) >(&TPrsStd_AISViewer::New), R"#(create and set an AISAttribute at root label. The interactive context is build. Raise an exception if Has.)#" , py::arg("acces"), py::arg("viewer")) .def_static("Find_s", (Standard_Boolean (*)( const TDF_Label & , opencascade::handle<TPrsStd_AISViewer> & ) ) static_cast<Standard_Boolean (*)( const TDF_Label & , opencascade::handle<TPrsStd_AISViewer> & ) >(&TPrsStd_AISViewer::Find), R"#(Finds the viewer attribute at the label access, the root of the data framework. Calling this function can be used to initialize an AIS viewer)#" , py::arg("acces"), py::arg("A")) .def_static("Find_s", (Standard_Boolean (*)( const TDF_Label & , opencascade::handle<AIS_InteractiveContext> & ) ) static_cast<Standard_Boolean (*)( const TDF_Label & , opencascade::handle<AIS_InteractiveContext> & ) >(&TPrsStd_AISViewer::Find), R"#(None)#" , py::arg("acces"), py::arg("IC")) .def_static("Find_s", (Standard_Boolean (*)( const TDF_Label & , opencascade::handle<V3d_Viewer> & ) ) static_cast<Standard_Boolean (*)( const TDF_Label & , opencascade::handle<V3d_Viewer> & ) >(&TPrsStd_AISViewer::Find), R"#(None)#" , py::arg("acces"), py::arg("V")) .def_static("Update_s", (void (*)( const TDF_Label & ) ) static_cast<void (*)( const TDF_Label & ) >(&TPrsStd_AISViewer::Update), R"#(AISViewer methods =================)#" , py::arg("acces")) .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_AISViewer::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_AISViewer::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; // default constructor register_default_constructor<TPrsStd_ConstraintTools , shared_ptr<TPrsStd_ConstraintTools>>(m,"TPrsStd_ConstraintTools"); static_cast<py::class_<TPrsStd_ConstraintTools , shared_ptr<TPrsStd_ConstraintTools> >>(m.attr("TPrsStd_ConstraintTools")) // constructors // custom constructors // methods // methods using call by reference i.s.o. return // static methods .def_static("UpdateOnlyValue_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , const opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , const opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::UpdateOnlyValue), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeDistance_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeDistance), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeParallel_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeParallel), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeTangent_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeTangent), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputePerpendicular_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputePerpendicular), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeConcentric_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeConcentric), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeSymmetry_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeSymmetry), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeMidPoint_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeMidPoint), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeAngle_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeAngle), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeRadius_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeRadius), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeMinRadius_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeMinRadius), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeMaxRadius_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeMaxRadius), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeEqualDistance_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeEqualDistance), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeEqualRadius_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeEqualRadius), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeFix_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeFix), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeDiameter_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeDiameter), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeOffset_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeOffset), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputePlacement_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputePlacement), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeCoincident_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeCoincident), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeRound_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeRound), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeOthers_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeOthers), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) .def_static("ComputeAngleForOneFace_s", (void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<void (*)( const opencascade::handle<TDataXtd_Constraint> & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintTools::ComputeAngleForOneFace), R"#(None)#" , py::arg("aConst"), py::arg("anAIS")) // static methods using call by reference i.s.o. return .def_static("ComputeTextAndValue_s", []( const opencascade::handle<TDataXtd_Constraint> & aConst,TCollection_ExtendedString & aText,const Standard_Boolean anIsAngle ){ Standard_Real aValue; TPrsStd_ConstraintTools::ComputeTextAndValue(aConst,aValue,aText,anIsAngle); return std::make_tuple(aValue); }, R"#(None)#" , py::arg("aConst"), py::arg("aText"), py::arg("anIsAngle")) // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_Driver ,opencascade::handle<TPrsStd_Driver>,Py_TPrsStd_Driver , Standard_Transient>>(m.attr("TPrsStd_Driver")) // constructors // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_Driver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_Driver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_Driver::Update), R"#(Updates the interactive object ais with information found on the attributes associated with the label L.)#" , py::arg("L"), py::arg("ais")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_Driver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_Driver::*)() const>(&TPrsStd_Driver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_Driver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_Driver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_DriverTable ,opencascade::handle<TPrsStd_DriverTable> , Standard_Transient>>(m.attr("TPrsStd_DriverTable")) // constructors .def(py::init< >() ) // custom constructors // methods .def("InitStandardDrivers", (void (TPrsStd_DriverTable::*)() ) static_cast<void (TPrsStd_DriverTable::*)() >(&TPrsStd_DriverTable::InitStandardDrivers), R"#(Fills the table with standard drivers)#" ) .def("AddDriver", (Standard_Boolean (TPrsStd_DriverTable::*)( const Standard_GUID & , const opencascade::handle<TPrsStd_Driver> & ) ) static_cast<Standard_Boolean (TPrsStd_DriverTable::*)( const Standard_GUID & , const opencascade::handle<TPrsStd_Driver> & ) >(&TPrsStd_DriverTable::AddDriver), R"#(Returns true if the driver has been added successfully to the driver table.)#" , py::arg("guid"), py::arg("driver")) .def("FindDriver", (Standard_Boolean (TPrsStd_DriverTable::*)( const Standard_GUID & , opencascade::handle<TPrsStd_Driver> & ) const) static_cast<Standard_Boolean (TPrsStd_DriverTable::*)( const Standard_GUID & , opencascade::handle<TPrsStd_Driver> & ) const>(&TPrsStd_DriverTable::FindDriver), R"#(Returns true if the driver was found.)#" , py::arg("guid"), py::arg("driver")) .def("RemoveDriver", (Standard_Boolean (TPrsStd_DriverTable::*)( const Standard_GUID & ) ) static_cast<Standard_Boolean (TPrsStd_DriverTable::*)( const Standard_GUID & ) >(&TPrsStd_DriverTable::RemoveDriver), R"#(Removes a driver with the given GUID. Returns true if the driver has been removed successfully.)#" , py::arg("guid")) .def("Clear", (void (TPrsStd_DriverTable::*)() ) static_cast<void (TPrsStd_DriverTable::*)() >(&TPrsStd_DriverTable::Clear), R"#(Removes all drivers. Returns true if the driver has been removed successfully. If this method is used, the InitStandardDrivers method should be called to fill the table with standard drivers.)#" ) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_DriverTable::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_DriverTable::*)() const>(&TPrsStd_DriverTable::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("Get_s", (opencascade::handle<TPrsStd_DriverTable> (*)() ) static_cast<opencascade::handle<TPrsStd_DriverTable> (*)() >(&TPrsStd_DriverTable::Get), R"#(Returns the static table. If it does not exist, creates it and fills it with standard drivers.)#" ) .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_DriverTable::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_DriverTable::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_AxisDriver ,opencascade::handle<TPrsStd_AxisDriver> , TPrsStd_Driver>>(m.attr("TPrsStd_AxisDriver")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_AxisDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_AxisDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_AxisDriver::Update), R"#(Build the AISObject (if null) or update it. No compute is done. Returns <True> if informations was found and AISObject updated.)#" , py::arg("aLabel"), py::arg("anAISObject")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_AxisDriver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_AxisDriver::*)() const>(&TPrsStd_AxisDriver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_AxisDriver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_AxisDriver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_ConstraintDriver ,opencascade::handle<TPrsStd_ConstraintDriver> , TPrsStd_Driver>>(m.attr("TPrsStd_ConstraintDriver")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_ConstraintDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_ConstraintDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_ConstraintDriver::Update), R"#(Build the AISObject (if null) or update it. No compute is done. Returns <True> if informations was found and AISObject updated.)#" , py::arg("aLabel"), py::arg("anAISObject")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_ConstraintDriver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_ConstraintDriver::*)() const>(&TPrsStd_ConstraintDriver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_ConstraintDriver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_ConstraintDriver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_GeometryDriver ,opencascade::handle<TPrsStd_GeometryDriver> , TPrsStd_Driver>>(m.attr("TPrsStd_GeometryDriver")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_GeometryDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_GeometryDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_GeometryDriver::Update), R"#(Build the AISObject (if null) or update it. No compute is done. Returns <True> if informations was found and AISObject updated.)#" , py::arg("aLabel"), py::arg("anAISObject")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_GeometryDriver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_GeometryDriver::*)() const>(&TPrsStd_GeometryDriver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_GeometryDriver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_GeometryDriver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_NamedShapeDriver ,opencascade::handle<TPrsStd_NamedShapeDriver> , TPrsStd_Driver>>(m.attr("TPrsStd_NamedShapeDriver")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_NamedShapeDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_NamedShapeDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_NamedShapeDriver::Update), R"#(Build the AISObject (if null) or update it. No compute is done. Returns <True> if informations was found and AISObject updated.)#" , py::arg("aLabel"), py::arg("anAISObject")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_NamedShapeDriver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_NamedShapeDriver::*)() const>(&TPrsStd_NamedShapeDriver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_NamedShapeDriver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_NamedShapeDriver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_PlaneDriver ,opencascade::handle<TPrsStd_PlaneDriver> , TPrsStd_Driver>>(m.attr("TPrsStd_PlaneDriver")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_PlaneDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_PlaneDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_PlaneDriver::Update), R"#(Build the AISObject (if null) or update it. No compute is done. Returns <True> if informations was found and AISObject updated.)#" , py::arg("aLabel"), py::arg("anAISObject")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_PlaneDriver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_PlaneDriver::*)() const>(&TPrsStd_PlaneDriver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_PlaneDriver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_PlaneDriver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; static_cast<py::class_<TPrsStd_PointDriver ,opencascade::handle<TPrsStd_PointDriver> , TPrsStd_Driver>>(m.attr("TPrsStd_PointDriver")) // constructors .def(py::init< >() ) // custom constructors // methods .def("Update", (Standard_Boolean (TPrsStd_PointDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) ) static_cast<Standard_Boolean (TPrsStd_PointDriver::*)( const TDF_Label & , opencascade::handle<AIS_InteractiveObject> & ) >(&TPrsStd_PointDriver::Update), R"#(Build the AISObject (if null) or update it. No compute is done. Returns <True> if informations was found and AISObject updated.)#" , py::arg("aLabel"), py::arg("anAISObject")) .def("DynamicType", (const opencascade::handle<Standard_Type> & (TPrsStd_PointDriver::*)() const) static_cast<const opencascade::handle<Standard_Type> & (TPrsStd_PointDriver::*)() const>(&TPrsStd_PointDriver::DynamicType), R"#(None)#" ) // methods using call by reference i.s.o. return // static methods .def_static("get_type_name_s", (const char * (*)() ) static_cast<const char * (*)() >(&TPrsStd_PointDriver::get_type_name), R"#(None)#" ) .def_static("get_type_descriptor_s", (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&TPrsStd_PointDriver::get_type_descriptor), R"#(None)#" ) // static methods using call by reference i.s.o. return // operators // additional methods and static methods ; // functions // ./opencascade/TPrsStd_DriverTable.hxx // ./opencascade/TPrsStd_PlaneDriver.hxx // ./opencascade/TPrsStd_PointDriver.hxx // ./opencascade/TPrsStd_AISViewer.hxx // ./opencascade/TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx // ./opencascade/TPrsStd_GeometryDriver.hxx // ./opencascade/TPrsStd_Driver.hxx // ./opencascade/TPrsStd_AISPresentation.hxx // ./opencascade/TPrsStd_AxisDriver.hxx // ./opencascade/TPrsStd_NamedShapeDriver.hxx // ./opencascade/TPrsStd_ConstraintTools.hxx // ./opencascade/TPrsStd_DataMapOfGUIDDriver.hxx // ./opencascade/TPrsStd_ConstraintDriver.hxx // Additional functions // operators // register typdefs // exceptions // user-defined post-inclusion per module in the body }; // user-defined post-inclusion per module // user-defined post
87d970b764be13ffbb240fa8c9c50ed4ec076bc8
a0ed4c90b79c715bd6226301e2176f8f4b3d2b8e
/URI/URI1003==Soma Simples.cpp
2667259996dc30b3dda68bdf136183df6e5441ac
[]
no_license
marlonwc3/cp-codes
501fdab9a173bad3c2b34dbbd188b693e1c8fc2c
dafd83e66f8ee223fae7d09cadc616952be1e799
refs/heads/master
2020-07-02T06:30:11.554661
2015-10-06T00:53:14
2015-10-06T00:53:14
28,721,298
7
2
null
null
null
null
UTF-8
C++
false
false
247
cpp
URI1003==Soma Simples.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> using namespace std; int a,b; int main (int argc, char const* argv[]) { scanf("%d", &a); scanf("%d", &b); printf("SOMA = %d\n", (a+b)); return 0; }
861f438d35d84c0a17a4550f96104412aee47f7e
b5644b08f5294d855bbbe49bf42be0f5eeb50db7
/asv_wave_sim_gazebo_plugins/include/asv_wave_sim_gazebo_plugins/TriangulatedGrid.hh
6eab32b04a2d975b06634c9220543375edf8b718
[]
no_license
LASER-Robotics/Drone_Trial_League
b2a9686fec600c0a3c0ad9f3823a7b2c9ede428e
d13046cd5e33cd61bf2965515fcfc329c0f4fea8
refs/heads/master
2023-08-28T04:25:33.180005
2021-10-11T23:25:17
2021-10-11T23:25:17
386,699,039
7
1
null
null
null
null
UTF-8
C++
false
false
2,497
hh
TriangulatedGrid.hh
// Copyright (C) 2019 Rhys Mainwaring // // 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 3 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 <https://www.gnu.org/licenses/>. /// \file TriangulatedGrid.hh #ifndef _ASV_WAVE_SIM_GAZEBO_PLUGINS_TRIANGULATED_GRID_HH_ #define _ASV_WAVE_SIM_GAZEBO_PLUGINS_TRIANGULATED_GRID_HH_ #include "asv_wave_sim_gazebo_plugins/CGALTypes.hh" #include <gazebo/rendering/ogre_gazebo.h> #include <ignition/math/Pose3.hh> #include <memory> #include <vector> namespace asv { /////////////////////////////////////////////////////////////////////////////// // TriangulatedGrid typedef std::array<int64_t, 3> Index3; typedef std::vector<Point3> Point3Range; typedef std::vector<Index3> Index3Range; class TriangulatedGrid { public: virtual ~TriangulatedGrid(); TriangulatedGrid(int num_segments, double length); void CreateMesh(); void CreateTriangulation(); static std::unique_ptr<TriangulatedGrid> Create(int num_segments, double length); bool Locate(const Point3& query, int64_t& faceIndex) const; bool Height(const Point3& query, double& height) const; bool Height(const std::vector<Point3>& queries, std::vector<double>& heights) const; bool Interpolate(TriangulatedGrid& patch) const; const Point3Range& Points() const; const Index3Range& Indices() const; const Point3& Origin() const; void ApplyPose(const ignition::math::Pose3d& pose); bool IsValid(bool verbose=false) const; void DebugPrintMesh() const; void DebugPrintTriangulation() const; void UpdatePoints(const std::vector<Point3>& from); void UpdatePoints(const std::vector<Ogre::Vector3>& from); void UpdatePoints(const Mesh& from); private: class Private; std::unique_ptr<Private> impl_; }; /////////////////////////////////////////////////////////////////////////////// } // namespace asv #endif // _ASV_WAVE_SIM_GAZEBO_PLUGINS_TRIANGULATED_GRID_HH_
4d9905869b2f144061de24a36c40ba0ad866145a
7d354b34fcd838e05681118d4e4edbd29fcf77ab
/Implode/PluginRegistration.cpp
346d8721199a7a8bd6fe1faee393e93b90784e64
[]
no_license
rcspam/openfx-arena
42df167d3dc42f33ca17bbd923a5740d1ee618ad
7b3ac429c8d565bde6d074d36cdcce4ea29287af
refs/heads/master
2021-01-15T20:18:55.749007
2015-06-21T18:56:08
2015-06-21T18:56:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
195
cpp
PluginRegistration.cpp
#include "ofxsImageEffect.h" #include "Implode.h" namespace OFX { namespace Plugin { void getPluginIDs(OFX::PluginFactoryArray &ids) { getImplodePluginID(ids); } } }
7540e3484b665756ba7d597a2006970da9a088bd
02c0e8723e1b16429ae7b3f3d12a492a8a69ad27
/SQLComponents/ConvertWideString.h
0d9f16f6f9f6a547f95877b981fa339b237bc2bf
[ "MIT" ]
permissive
radtek/QLLanguage
4d63701dea3ec74a18a376bc5153a0410ee193ec
8a2453ce7c5eb7392eeffaffd19b27d6fadb890d
refs/heads/master
2020-07-16T19:32:42.891709
2018-11-08T13:57:47
2018-11-08T13:57:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,732
h
ConvertWideString.h
///////////////////////////////////////////////////////////////////////////////// // // SourceFile: ConvertWideString.h // // From the project: Marlin Server: Internet server/client // See: https://github.com/edwig/Marlin // // Copyright (c) 2016-2017 ir. W.E. Huisman // All rights reserved // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions : // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // // Last Revision: 08-01-2017 // Version number: 1.4.0 // #pragma once #include "SQLComponents.h" namespace SQLComponents { using uchar = unsigned char; // Init the code page system void InitCodePageNames(); // Convert strings from/to Unicode bool TryConvertWideString(const uchar* p_buffer ,int p_length ,CString p_charset ,CString& p_string ,bool& p_foundBOM); bool TryCreateWideString(const CString& p_string ,const CString p_charset ,const bool p_doBom ,uchar** p_buffer ,int& p_length); // Getting the codepage number from the charset int CharsetToCodepage(CString p_charset); // Getting the name of the codepage CString CodepageToCharset(int p_codepage); // Getting the description of the codepage CString CharsetToCodePageInfo(CString p_charset); // Find the charset in the content-type header CString FindCharsetInContentType(CString p_contentType); // Find the mimetype in the content-type header CString FindMimeTypeInContentType(CString p_contentType); // Construct an UTF-8 Byte-Order-Mark CString ConstructBOM(); }
c8fe642e3fd2580700996487a366978a9d110d6b
81856c4a00d4538af05e1566afcd5eb25ec231da
/debug.hpp
10f242823ee116ca2cf7279c692bf2daf16b51aa
[]
no_license
ntibi/ntibux
6064fc3b9ec56d6948211b5a43f2693e62b5c482
cd2ff8f4e9b63ed0b4e1b59d0f73050077c21d13
refs/heads/master
2021-01-23T09:45:02.268815
2017-10-10T13:57:07
2017-10-10T13:57:07
102,595,331
1
0
null
null
null
null
UTF-8
C++
false
false
265
hpp
debug.hpp
#ifndef DEBUG_HPP # define DEBUG_HPP #include "multiboot.h" #include "header.hpp" #include "kernel.hpp" class debug { public: debug(); void init(struct multiboot_info *mboot); void trace(); private: elf_section_header_table_t *elf_sec; }; #endif
3c0450b13e8d3d293ffc9b8ce996658730cfe982
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/cpdp/src/v20190820/model/PayDataResult.cpp
70247e377be1876b90d912f770abde2d59dd2436
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp
9f5df8220eaaf72f7eaee07b2ede94f89313651f
42a76b812b81d1b52ec6a217fafc8faa135e06ca
refs/heads/master
2023-08-30T03:22:45.269556
2023-08-30T00:45:39
2023-08-30T00:45:39
188,991,963
55
37
Apache-2.0
2023-08-17T03:13:20
2019-05-28T08:56:08
C++
UTF-8
C++
false
false
21,214
cpp
PayDataResult.cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <tencentcloud/cpdp/v20190820/model/PayDataResult.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Cpdp::V20190820::Model; using namespace std; PayDataResult::PayDataResult() : m_paymentTagHasBeenSet(false), m_paymentOptionHideHasBeenSet(false), m_paymentIconHasBeenSet(false), m_paymentOptionSixHasBeenSet(false), m_paymentNameHasBeenSet(false), m_paymentOptionSevenHasBeenSet(false), m_paymentOptionOtherHasBeenSet(false), m_paymentOptionTwoHasBeenSet(false), m_paymentOptionOneHasBeenSet(false), m_paymentDiscountFeeHasBeenSet(false), m_paymentTypeHasBeenSet(false), m_paymentOptionFiveHasBeenSet(false), m_paymentOptionNineHasBeenSet(false), m_paymentIdHasBeenSet(false), m_paymentOptionThreeHasBeenSet(false), m_paymentInternalNameHasBeenSet(false), m_paymentOptionFourHasBeenSet(false), m_paymentOptionTenHasBeenSet(false) { } CoreInternalOutcome PayDataResult::Deserialize(const rapidjson::Value &value) { string requestId = ""; if (value.HasMember("PaymentTag") && !value["PaymentTag"].IsNull()) { if (!value["PaymentTag"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentTag` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentTag = string(value["PaymentTag"].GetString()); m_paymentTagHasBeenSet = true; } if (value.HasMember("PaymentOptionHide") && !value["PaymentOptionHide"].IsNull()) { if (!value["PaymentOptionHide"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionHide` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionHide = string(value["PaymentOptionHide"].GetString()); m_paymentOptionHideHasBeenSet = true; } if (value.HasMember("PaymentIcon") && !value["PaymentIcon"].IsNull()) { if (!value["PaymentIcon"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentIcon` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentIcon = string(value["PaymentIcon"].GetString()); m_paymentIconHasBeenSet = true; } if (value.HasMember("PaymentOptionSix") && !value["PaymentOptionSix"].IsNull()) { if (!value["PaymentOptionSix"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionSix` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionSix = string(value["PaymentOptionSix"].GetString()); m_paymentOptionSixHasBeenSet = true; } if (value.HasMember("PaymentName") && !value["PaymentName"].IsNull()) { if (!value["PaymentName"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentName` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentName = string(value["PaymentName"].GetString()); m_paymentNameHasBeenSet = true; } if (value.HasMember("PaymentOptionSeven") && !value["PaymentOptionSeven"].IsNull()) { if (!value["PaymentOptionSeven"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionSeven` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionSeven = string(value["PaymentOptionSeven"].GetString()); m_paymentOptionSevenHasBeenSet = true; } if (value.HasMember("PaymentOptionOther") && !value["PaymentOptionOther"].IsNull()) { if (!value["PaymentOptionOther"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionOther` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionOther = string(value["PaymentOptionOther"].GetString()); m_paymentOptionOtherHasBeenSet = true; } if (value.HasMember("PaymentOptionTwo") && !value["PaymentOptionTwo"].IsNull()) { if (!value["PaymentOptionTwo"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionTwo` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionTwo = string(value["PaymentOptionTwo"].GetString()); m_paymentOptionTwoHasBeenSet = true; } if (value.HasMember("PaymentOptionOne") && !value["PaymentOptionOne"].IsNull()) { if (!value["PaymentOptionOne"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionOne` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionOne = string(value["PaymentOptionOne"].GetString()); m_paymentOptionOneHasBeenSet = true; } if (value.HasMember("PaymentDiscountFee") && !value["PaymentDiscountFee"].IsNull()) { if (!value["PaymentDiscountFee"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentDiscountFee` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentDiscountFee = string(value["PaymentDiscountFee"].GetString()); m_paymentDiscountFeeHasBeenSet = true; } if (value.HasMember("PaymentType") && !value["PaymentType"].IsNull()) { if (!value["PaymentType"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentType` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentType = string(value["PaymentType"].GetString()); m_paymentTypeHasBeenSet = true; } if (value.HasMember("PaymentOptionFive") && !value["PaymentOptionFive"].IsNull()) { if (!value["PaymentOptionFive"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionFive` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionFive = string(value["PaymentOptionFive"].GetString()); m_paymentOptionFiveHasBeenSet = true; } if (value.HasMember("PaymentOptionNine") && !value["PaymentOptionNine"].IsNull()) { if (!value["PaymentOptionNine"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionNine` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionNine = string(value["PaymentOptionNine"].GetString()); m_paymentOptionNineHasBeenSet = true; } if (value.HasMember("PaymentId") && !value["PaymentId"].IsNull()) { if (!value["PaymentId"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentId` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentId = string(value["PaymentId"].GetString()); m_paymentIdHasBeenSet = true; } if (value.HasMember("PaymentOptionThree") && !value["PaymentOptionThree"].IsNull()) { if (!value["PaymentOptionThree"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionThree` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionThree = string(value["PaymentOptionThree"].GetString()); m_paymentOptionThreeHasBeenSet = true; } if (value.HasMember("PaymentInternalName") && !value["PaymentInternalName"].IsNull()) { if (!value["PaymentInternalName"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentInternalName` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentInternalName = string(value["PaymentInternalName"].GetString()); m_paymentInternalNameHasBeenSet = true; } if (value.HasMember("PaymentOptionFour") && !value["PaymentOptionFour"].IsNull()) { if (!value["PaymentOptionFour"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionFour` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionFour = string(value["PaymentOptionFour"].GetString()); m_paymentOptionFourHasBeenSet = true; } if (value.HasMember("PaymentOptionTen") && !value["PaymentOptionTen"].IsNull()) { if (!value["PaymentOptionTen"].IsString()) { return CoreInternalOutcome(Core::Error("response `PayDataResult.PaymentOptionTen` IsString=false incorrectly").SetRequestId(requestId)); } m_paymentOptionTen = string(value["PaymentOptionTen"].GetString()); m_paymentOptionTenHasBeenSet = true; } return CoreInternalOutcome(true); } void PayDataResult::ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const { if (m_paymentTagHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentTag"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentTag.c_str(), allocator).Move(), allocator); } if (m_paymentOptionHideHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionHide"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionHide.c_str(), allocator).Move(), allocator); } if (m_paymentIconHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentIcon"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentIcon.c_str(), allocator).Move(), allocator); } if (m_paymentOptionSixHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionSix"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionSix.c_str(), allocator).Move(), allocator); } if (m_paymentNameHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentName"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentName.c_str(), allocator).Move(), allocator); } if (m_paymentOptionSevenHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionSeven"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionSeven.c_str(), allocator).Move(), allocator); } if (m_paymentOptionOtherHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionOther"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionOther.c_str(), allocator).Move(), allocator); } if (m_paymentOptionTwoHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionTwo"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionTwo.c_str(), allocator).Move(), allocator); } if (m_paymentOptionOneHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionOne"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionOne.c_str(), allocator).Move(), allocator); } if (m_paymentDiscountFeeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentDiscountFee"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentDiscountFee.c_str(), allocator).Move(), allocator); } if (m_paymentTypeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentType"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentType.c_str(), allocator).Move(), allocator); } if (m_paymentOptionFiveHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionFive"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionFive.c_str(), allocator).Move(), allocator); } if (m_paymentOptionNineHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionNine"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionNine.c_str(), allocator).Move(), allocator); } if (m_paymentIdHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentId"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentId.c_str(), allocator).Move(), allocator); } if (m_paymentOptionThreeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionThree"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionThree.c_str(), allocator).Move(), allocator); } if (m_paymentInternalNameHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentInternalName"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentInternalName.c_str(), allocator).Move(), allocator); } if (m_paymentOptionFourHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionFour"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionFour.c_str(), allocator).Move(), allocator); } if (m_paymentOptionTenHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PaymentOptionTen"; iKey.SetString(key.c_str(), allocator); value.AddMember(iKey, rapidjson::Value(m_paymentOptionTen.c_str(), allocator).Move(), allocator); } } string PayDataResult::GetPaymentTag() const { return m_paymentTag; } void PayDataResult::SetPaymentTag(const string& _paymentTag) { m_paymentTag = _paymentTag; m_paymentTagHasBeenSet = true; } bool PayDataResult::PaymentTagHasBeenSet() const { return m_paymentTagHasBeenSet; } string PayDataResult::GetPaymentOptionHide() const { return m_paymentOptionHide; } void PayDataResult::SetPaymentOptionHide(const string& _paymentOptionHide) { m_paymentOptionHide = _paymentOptionHide; m_paymentOptionHideHasBeenSet = true; } bool PayDataResult::PaymentOptionHideHasBeenSet() const { return m_paymentOptionHideHasBeenSet; } string PayDataResult::GetPaymentIcon() const { return m_paymentIcon; } void PayDataResult::SetPaymentIcon(const string& _paymentIcon) { m_paymentIcon = _paymentIcon; m_paymentIconHasBeenSet = true; } bool PayDataResult::PaymentIconHasBeenSet() const { return m_paymentIconHasBeenSet; } string PayDataResult::GetPaymentOptionSix() const { return m_paymentOptionSix; } void PayDataResult::SetPaymentOptionSix(const string& _paymentOptionSix) { m_paymentOptionSix = _paymentOptionSix; m_paymentOptionSixHasBeenSet = true; } bool PayDataResult::PaymentOptionSixHasBeenSet() const { return m_paymentOptionSixHasBeenSet; } string PayDataResult::GetPaymentName() const { return m_paymentName; } void PayDataResult::SetPaymentName(const string& _paymentName) { m_paymentName = _paymentName; m_paymentNameHasBeenSet = true; } bool PayDataResult::PaymentNameHasBeenSet() const { return m_paymentNameHasBeenSet; } string PayDataResult::GetPaymentOptionSeven() const { return m_paymentOptionSeven; } void PayDataResult::SetPaymentOptionSeven(const string& _paymentOptionSeven) { m_paymentOptionSeven = _paymentOptionSeven; m_paymentOptionSevenHasBeenSet = true; } bool PayDataResult::PaymentOptionSevenHasBeenSet() const { return m_paymentOptionSevenHasBeenSet; } string PayDataResult::GetPaymentOptionOther() const { return m_paymentOptionOther; } void PayDataResult::SetPaymentOptionOther(const string& _paymentOptionOther) { m_paymentOptionOther = _paymentOptionOther; m_paymentOptionOtherHasBeenSet = true; } bool PayDataResult::PaymentOptionOtherHasBeenSet() const { return m_paymentOptionOtherHasBeenSet; } string PayDataResult::GetPaymentOptionTwo() const { return m_paymentOptionTwo; } void PayDataResult::SetPaymentOptionTwo(const string& _paymentOptionTwo) { m_paymentOptionTwo = _paymentOptionTwo; m_paymentOptionTwoHasBeenSet = true; } bool PayDataResult::PaymentOptionTwoHasBeenSet() const { return m_paymentOptionTwoHasBeenSet; } string PayDataResult::GetPaymentOptionOne() const { return m_paymentOptionOne; } void PayDataResult::SetPaymentOptionOne(const string& _paymentOptionOne) { m_paymentOptionOne = _paymentOptionOne; m_paymentOptionOneHasBeenSet = true; } bool PayDataResult::PaymentOptionOneHasBeenSet() const { return m_paymentOptionOneHasBeenSet; } string PayDataResult::GetPaymentDiscountFee() const { return m_paymentDiscountFee; } void PayDataResult::SetPaymentDiscountFee(const string& _paymentDiscountFee) { m_paymentDiscountFee = _paymentDiscountFee; m_paymentDiscountFeeHasBeenSet = true; } bool PayDataResult::PaymentDiscountFeeHasBeenSet() const { return m_paymentDiscountFeeHasBeenSet; } string PayDataResult::GetPaymentType() const { return m_paymentType; } void PayDataResult::SetPaymentType(const string& _paymentType) { m_paymentType = _paymentType; m_paymentTypeHasBeenSet = true; } bool PayDataResult::PaymentTypeHasBeenSet() const { return m_paymentTypeHasBeenSet; } string PayDataResult::GetPaymentOptionFive() const { return m_paymentOptionFive; } void PayDataResult::SetPaymentOptionFive(const string& _paymentOptionFive) { m_paymentOptionFive = _paymentOptionFive; m_paymentOptionFiveHasBeenSet = true; } bool PayDataResult::PaymentOptionFiveHasBeenSet() const { return m_paymentOptionFiveHasBeenSet; } string PayDataResult::GetPaymentOptionNine() const { return m_paymentOptionNine; } void PayDataResult::SetPaymentOptionNine(const string& _paymentOptionNine) { m_paymentOptionNine = _paymentOptionNine; m_paymentOptionNineHasBeenSet = true; } bool PayDataResult::PaymentOptionNineHasBeenSet() const { return m_paymentOptionNineHasBeenSet; } string PayDataResult::GetPaymentId() const { return m_paymentId; } void PayDataResult::SetPaymentId(const string& _paymentId) { m_paymentId = _paymentId; m_paymentIdHasBeenSet = true; } bool PayDataResult::PaymentIdHasBeenSet() const { return m_paymentIdHasBeenSet; } string PayDataResult::GetPaymentOptionThree() const { return m_paymentOptionThree; } void PayDataResult::SetPaymentOptionThree(const string& _paymentOptionThree) { m_paymentOptionThree = _paymentOptionThree; m_paymentOptionThreeHasBeenSet = true; } bool PayDataResult::PaymentOptionThreeHasBeenSet() const { return m_paymentOptionThreeHasBeenSet; } string PayDataResult::GetPaymentInternalName() const { return m_paymentInternalName; } void PayDataResult::SetPaymentInternalName(const string& _paymentInternalName) { m_paymentInternalName = _paymentInternalName; m_paymentInternalNameHasBeenSet = true; } bool PayDataResult::PaymentInternalNameHasBeenSet() const { return m_paymentInternalNameHasBeenSet; } string PayDataResult::GetPaymentOptionFour() const { return m_paymentOptionFour; } void PayDataResult::SetPaymentOptionFour(const string& _paymentOptionFour) { m_paymentOptionFour = _paymentOptionFour; m_paymentOptionFourHasBeenSet = true; } bool PayDataResult::PaymentOptionFourHasBeenSet() const { return m_paymentOptionFourHasBeenSet; } string PayDataResult::GetPaymentOptionTen() const { return m_paymentOptionTen; } void PayDataResult::SetPaymentOptionTen(const string& _paymentOptionTen) { m_paymentOptionTen = _paymentOptionTen; m_paymentOptionTenHasBeenSet = true; } bool PayDataResult::PaymentOptionTenHasBeenSet() const { return m_paymentOptionTenHasBeenSet; }
58d1232855b11982d9b08df13f70da7f536199c3
9ba0255bc414c35aa1792f5fc1827b655ae549f8
/Library/Photogrammetry/src/ImageLines.cc
5d8cfa31efdb1964c2b403701eb9aad8a2e12bc9
[]
no_license
Geodan/3D4EM-LoD2buildingmodels
526353e190cd0e985a461a9e2fcad355baad559e
4ce4d87af56303d58ce0295634c5ca1d727ce5b3
refs/heads/master
2021-01-20T12:41:54.687549
2017-02-20T08:10:15
2017-02-20T08:10:15
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,611
cc
ImageLines.cc
/* Copyright 2010 University of Twente and Delft University of Technology This file is part of the Mapping libraries and tools, developed for research, education and projects in photogrammetry and laser scanning. The Mapping libraries and tools are 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 3 of the License, or (at your option) any later version. The Mapping libraries and tools are 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 the Mapping libraries and tools. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------------*/ /* -------------------------------------------------------------------------------- Collection of functions for class ImageLines void ImageLines::Cpp2C(ImgLines ** Conversion of C++ to C object void ImageLines::C2Cpp(ImgLines *) Conversion of C to C++ object int ImageLines::Read(char *) Read lines from a database int ImageLines::Write(char *) Write lines points to a database void ImageLines::Print() Print lines points to stdout Initial creation Author : Ildi Suveg Date : 01-12-1998 Update #1 Author : Date : Changes: -------------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------------- Include files -------------------------------------------------------------------------------- */ #include <string.h> #include "ImageLines.h" #include "LineTopologies.h" #include "ImagePoints.h" /* -------------------------------------------------------------------------------- Conversion of C++ to C object -------------------------------------------------------------------------------- */ void ImageLines::Cpp2C(ImgLines **linesptr) const { ImgLines *lines; // Allocate space if this has not been done yet lines = *linesptr; if (lines == NULL) { lines = (ImgLines *) malloc(sizeof(ImgLines)); lines->lines = (ImgLine*) malloc(size() * sizeof(ImgLine)); *linesptr = lines; } strcpy(lines->img_name, name); // Copy the data lines->num_lines = size(); ImageLines::const_iterator i; ImgLine *ln; int l = 0; for(i = begin(); i != end(); i++, l++) { lines->lines[l].pts = (ImgPt*) malloc(i->size() * sizeof(ImgPt)); if (lines->lines[l].pts == NULL) printf("points allocation error\n"); ln = &lines->lines[l]; i->Cpp2C(&ln); } } /* -------------------------------------------------------------------------------- Conversion of C to C++ object -------------------------------------------------------------------------------- */ void ImageLines::C2Cpp(ImgLines *lines) { if (!empty()) erase(begin(), end()); reserve(lines->num_lines); //delete [] name; name = new char[strlen(lines->img_name) + 1]; strcpy(name, lines->img_name); int l = 0; for(int i = 0 ; i < lines->num_lines; i++, l++) { ImageLine line(&lines->lines[l]); push_back(line); } } /* -------------------------------------------------------------------------------- Read lines from a database -------------------------------------------------------------------------------- */ int ImageLines::Read(char *filename) { ImgLines *lines; lines = Get_ImgLines(filename); // Read the database into C structure if (lines == NULL) return(0); // name = NULL; C2Cpp(lines); // Convert to C++ object Free_ImgLines(lines); return(1); } /* -------------------------------------------------------------------------------- Write lines to a database -------------------------------------------------------------------------------- */ int ImageLines::Write(char *filename) const { int error; ImgLines *lines; lines = NULL; Cpp2C(&lines); error = Put_ImgLines(lines, filename); Free_ImgLines(lines); return(error); } /* -------------------------------------------------------------------------------- Print lines to stdout -------------------------------------------------------------------------------- */ void ImageLines::Print() const { ImgLines *lines; lines = NULL; Cpp2C(&lines); Print_ImgLines(lines); Free_ImgLines(lines); } /* -------------------------------------------------------------------------------- Convert to line topologies -------------------------------------------------------------------------------- */ void ImageLines::Convert2LineTops(ImagePoints *imgpts, LineTopologies *lines) const { ImageLines::const_iterator i; LineTopology line; for(i = begin(); i != end(); i++) { line.Number() = i->Number(); i->Convert2LineTop(imgpts, &line); lines->push_back(line); line.erase(line.begin(), line.end()); } }
19bd5dde225515ad232b4d55edae24eb8162e7dc
5145d166dbb699a8f75c4b9d9614002607ae0597
/algos_assignment/2nd_grade/김채연_chaeyeon20/week1/4358.cpp
071ee56ba603bd49861fe8cfbe92b653615cd6db
[]
no_license
Sookmyung-Algos/2021algos
8cedfb92d8efaf4f6241dece5bc9b820fc5dc277
be152912517558f0fc8685574064090e6c175065
refs/heads/master
2022-07-21T03:47:38.926142
2021-12-02T01:35:13
2021-12-02T01:35:13
341,102,594
11
46
null
2021-12-02T01:35:14
2021-02-22T06:32:53
C++
UTF-8
C++
false
false
545
cpp
4358.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <map> #include <stack> using namespace std; void init() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); } int main() { float cnt = 0; init(); map<string, int> arr; string tree; while (getline(cin, tree)) { arr[tree]++; cnt++; } cout << fixed; cout.precision(4); for (auto i = arr.begin(); i != arr.end(); ++i) { float a = (i->second / cnt) * 100; cout << i->first << " " << a << "\n"; } return 0; }
b19e41f7b122b43cacabdef293627d7c1f1a4ef8
fdecb4cfcf13c8113fd741b2976b2daf208a9e26
/src/translate.h
627ad4dc0e55dd684a0bb69727553532ca310b0b
[ "MIT" ]
permissive
zionlang/zion
cb1a3a50ff51775e042c89933571fe1d19017f15
5b4df370766e342fd4efffff34cd8966990f9ac4
refs/heads/master
2023-01-04T21:56:43.501770
2023-01-02T17:07:56
2023-01-02T22:48:50
184,154,262
49
2
NOASSERTION
2020-08-27T04:35:04
2019-04-29T22:42:36
C++
UTF-8
C++
false
false
1,402
h
translate.h
#pragma once #include <list> #include <unordered_set> #include "ast_decls.h" #include "data_ctors_map.h" #include "defn_id.h" #include "tracked_types.h" #include "types.h" namespace zion { struct Translation { typedef std::shared_ptr<Translation> ref; Translation(const ast::Expr *expr, const TrackedTypes &typing); const ast::Expr *expr; TrackedTypes const typing; std::string str() const; Location get_location() const; }; Translation::ref translate_expr( const types::DefnId &for_defn_id, const ast::Expr *expr, const DataCtorsMap &data_ctors_map, const std::unordered_set<std::string> &bound_vars, const TrackedTypes &tracked_types, const types::TypeEnv &type_env, types::NeededDefns &needed_defns, bool &returns); const ast::Expr *texpr(const types::DefnId &for_defn_id, const ast::Expr *expr, const DataCtorsMap &data_ctors_map, const std::unordered_set<std::string> &bound_vars, const TrackedTypes &tracked_types, types::Ref type, const types::TypeEnv &type_env, TrackedTypes &typing, types::NeededDefns &needed_defns, // TODO: pass in overloads in order to perform resolution bool &returns); } // namespace zion
3502a697f1b72a246d9e3de832c5fa17789f300d
022ddbfd08623b855f50331861309d5429753d99
/分类/语言入门/小学生算术/main.cpp
7b122158d260f85ae1cafe5daf4b249201af1177
[]
no_license
xluos/ACM
06d6881dac8c12e6e0ded66fc5da43974e3520e7
e90707178cc203e0e36092dc73bdc807c7daa246
refs/heads/master
2020-06-21T07:20:14.584736
2018-03-20T13:26:53
2018-03-20T13:26:53
94,203,765
4
0
null
null
null
null
UTF-8
C++
false
false
545
cpp
main.cpp
#include <iostream> #include <stdio.h> using namespace std; void itoa(int a,char *s) { int i,j; for(i=0;a;i++) { s[i]=a%10; a/=10; } s[i]='\0'; } int main() { int n,m; while(scanf("%d %d",&n,&m),n+m) { char a[5],b[5],c[6]; int count=0; itoa(n,a); itoa(m,b); itoa(n+m,c); for(int i=0;i<3;i++) { if(c[i]<a[i]+b[i]) count++; } cout<<count<<endl; } return 0; }
29bf275a3dcb0c81a90ba9abb62580500152abcf
c611b35a08d0abbce62c8a3e80ab747967460e4a
/tags/open64-1.0/osprey1.0/ipa/main/analyze/ipa_summary.h
f72426aa6764f5741e6973c871ee64362a610641
[]
no_license
svn2github/open64
301f132bdcb602d4e677fc23881ce602f3961969
88431de7e6860ed692c0c160724620e798de428a
refs/heads/master
2021-01-20T06:59:43.507059
2014-12-31T18:38:48
2014-12-31T18:38:48
24,089,237
3
1
null
null
null
null
UTF-8
C++
false
false
7,988
h
ipa_summary.h
/* Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it would be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, this software is distributed without any warranty that it is free of the rightful claim of any third person regarding infringement or the like. Any license provided herein, whether implied or otherwise, applies only to this software file. Patent licenses, if any, provided herein do not apply to combinations of this program with other software, or any other product whatsoever. You should have received a copy of the GNU General Public License along with this program; if not, write the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, Mountain View, CA 94043, or: http://www.sgi.com For further information regarding this notice, see: http://oss.sgi.com/projects/GenInfo/NoticeExplan */ /* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */ // ------------------------------------------------------------------- // These functions provide interface for accessing summary information // from the inliner and IPA. Since we want to be able to regenerate // summary arrays for a specific PU during IPA, it is safer to access // them via IPA_NODE instead of IP_FILE_HDR. However, this is not // always possible, since some arrays are read early in IPA, before // the call graph is built. For those, we provide dual interfaces. // ------------------------------------------------------------------- #ifndef cxx_ipa_summary_INCLUDED #define cxx_ipa_summary_INCLUDED class IPA_NODE; class IP_FILE_HDR; class SUMMARY_FILE_HEADER; class SUMMARY_PROCEDURE; class SUMMARY_SYMBOL; class SUMMARY_GLOBAL; class SUMMARY_CALLSITE; class SUMMARY_VALUE; class SUMMARY_FORMAL; class SUMMARY_ACTUAL; class SUMMARY_COMMON; class SUMMARY_COMMON_SHAPE; class SUMMARY_CONTROL_DEPENDENCE; class SUMMARY_STMT; class SUMMARY_STID; class SUMMARY_EXPR; class SUMMARY_PHI; class SUMMARY_CHI; class SUMMARY_FEEDBACK; class CFG_NODE_INFO; class REGION_ARRAYS; class PROJECTED_REGION; class PROJECTED_NODE; class LOOPINFO; class TERM; class IVAR; class SCALAR_INFO; class SUMMARY_STRUCT_ACCESS; class IPL_SUMMARY_PTRS { private: void* _summary; void* _array_summary; public: IPL_SUMMARY_PTRS (void* summary, void* array_summary) : _summary (summary), _array_summary (array_summary) {} void* Summary() const { return _summary; } void* Array_Summary() const { return _array_summary; } }; inline SUMMARY_FILE_HEADER* IPA_get_file_header (char* summary_base) { Elf64_Word offset = *((Elf64_Word *) summary_base); return (SUMMARY_FILE_HEADER *) (summary_base + offset); } extern SUMMARY_VALUE* IPA_get_value_file_array (const IP_FILE_HDR& hdr, INT32& size); extern SUMMARY_FORMAL* IPA_get_formal_file_array (const IP_FILE_HDR& hdr, INT32& size); extern SUMMARY_ACTUAL* IPA_get_actual_file_array (const IP_FILE_HDR& hdr, INT32& size); extern IVAR* IPA_get_ivar_file_array (const IP_FILE_HDR& hdr, INT32& size); #ifdef _STANDALONE_INLINER /*ARGSUSED*/ // -------------------------------------------------------------- // Functions that take IP_FILE_HDR parameter also return the size // of the summary array from the file. // -------------------------------------------------------------- SUMMARY_PROCEDURE* IPA_get_procedure_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_SYMBOL* IPA_get_symbol_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_GLOBAL* IPA_get_global_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_STRUCT_ACCESS* IPA_get_struct_access_file_array (const IP_FILE_HDR& hdr, INT32& size); // --------------------------------------------------------------- // Access to the SUMMARY arrays in the inliner always goes through // the file header. These access functions are provided for // convinience and completeness. // --------------------------------------------------------------- SUMMARY_PROCEDURE* IPA_get_procedure_array (const IPA_NODE* node); SUMMARY_SYMBOL* IPA_get_symbol_array (const IPA_NODE* node); SUMMARY_GLOBAL* IPA_get_global_array (const IPA_NODE* node); SUMMARY_CALLSITE* IPA_get_callsite_array (const IPA_NODE* node); SUMMARY_FORMAL* IPA_get_formal_array (const IPA_NODE* node); SUMMARY_ACTUAL* IPA_get_actual_array (const IPA_NODE* node); SUMMARY_FEEDBACK* IPA_get_feedback_array (const IPA_NODE* node); #else // _STANDALONE_INLINER // -------------------------------------------------------------- // Functions that take IP_FILE_HDR parameter also return the size // of the summary array from the file. // ----------------------------------------------------------------- SUMMARY_PROCEDURE* IPA_get_procedure_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_SYMBOL* IPA_get_symbol_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_COMMON* IPA_get_common_file_array (const IP_FILE_HDR& hdr, INT32& size); IVAR* IPA_get_ivar_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_GLOBAL* IPA_get_global_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_VALUE* IPA_get_value_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_FORMAL* IPA_get_formal_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_ACTUAL* IPA_get_actual_file_array (const IP_FILE_HDR& hdr, INT32& size); SUMMARY_STRUCT_ACCESS* IPA_get_struct_access_file_array (const IP_FILE_HDR& hdr, INT32& size); // ---------------------------------------------------------------- // Access to the following SUMMARY arrays will go through the file // header, even if the IPA_NODE has been preoptimized. These access // functions are provided for convinience and completeness. // ---------------------------------------------------------------- SUMMARY_PROCEDURE* IPA_get_procedure_array (const IPA_NODE* node); SUMMARY_SYMBOL* IPA_get_symbol_array (const IPA_NODE* node); IVAR* IPA_get_ivar_array (const IPA_NODE* node, INT32& size); // ----------------------------------------------------------------------- // The following SUMMARY arrays will change when IPA_NODE is preoptimized, // and they shouldn't be accessed directly through the file header. // ----------------------------------------------------------------------- SUMMARY_CALLSITE* IPA_get_callsite_array (const IPA_NODE* node); SUMMARY_FORMAL* IPA_get_formal_array (const IPA_NODE* node); SUMMARY_ACTUAL* IPA_get_actual_array (const IPA_NODE* node); SUMMARY_VALUE* IPA_get_value_array (const IPA_NODE* node); SUMMARY_GLOBAL* IPA_get_global_array (const IPA_NODE* node); SUMMARY_COMMON* IPA_get_common_array (const IPA_NODE* node); SUMMARY_COMMON_SHAPE* IPA_get_common_shape_array (const IPA_NODE* node); SUMMARY_CONTROL_DEPENDENCE* IPA_get_ctrl_dep_array(const IPA_NODE* node); SUMMARY_STMT* IPA_get_stmt_array (const IPA_NODE* node); SUMMARY_STID* IPA_get_stid_array (const IPA_NODE* node); SUMMARY_EXPR* IPA_get_expr_array (const IPA_NODE* node); SUMMARY_PHI* IPA_get_phi_array (const IPA_NODE* node); SUMMARY_CHI* IPA_get_chi_array (const IPA_NODE* node); CFG_NODE_INFO* IPA_get_cfg_node_array (const IPA_NODE* node); REGION_ARRAYS* IPA_get_region_array (const IPA_NODE* node); PROJECTED_REGION* IPA_get_proj_region_array (const IPA_NODE* node); PROJECTED_NODE* IPA_get_projected_node_array (const IPA_NODE* node); LOOPINFO* IPA_get_loopinfo_array (const IPA_NODE* node); TERM* IPA_get_term_array (const IPA_NODE* node); SCALAR_INFO* IPA_get_scalar_array (const IPA_NODE* node); SUMMARY_FEEDBACK* IPA_get_feedback_array (const IPA_NODE* node); #endif // _STANDALONE_INLINER #endif // cxx_ipa_summary_INCLUDED
0979bf36b7066618c7d623a4f3bb2f7d2af9a87e
0df7458db376ed518c1da36e79c98682147c13c4
/src/math/includes/math/Size2u.hpp
02610cc2a6d2f84de4bdd5954e1d7108ae83319f
[]
no_license
NadzwyczajnaGrupaRobocza/bomberman
d73fd04d6621c4e238e16cf68a758d0bc9aae1df
5ccec6ec93bcf306f145fdbb0537e51752c5fa7f
refs/heads/master
2021-01-22T19:41:14.458578
2019-11-07T07:42:14
2019-11-07T07:42:14
85,224,906
10
4
null
2020-02-06T08:02:20
2017-03-16T17:40:10
C++
UTF-8
C++
false
false
92
hpp
Size2u.hpp
#pragma once #include "math/Size2.hpp" namespace math { using Size2u = Size2<unsigned>; }
79c142035db74d2d99340da0c9daf9217e0cbdad
349fe789ab1e4e46aae6812cf60ada9423c0b632
/Interface/IREM_DMZayavka.h
2c4766a585190b607762c5c6a55c5a8c07906d81
[]
no_license
presscad/ERP
a6acdaeb97b3a53f776677c3a585ca860d4de980
18ecc6c8664ed7fc3f01397d587cce91fc3ac78b
refs/heads/master
2020-08-22T05:24:15.449666
2019-07-12T12:59:13
2019-07-12T12:59:13
216,326,440
1
0
null
2019-10-20T07:52:26
2019-10-20T07:52:26
null
UTF-8
C++
false
false
71,050
h
IREM_DMZayavka.h
#ifndef UIREM_DMZayavkaH #define UIREM_DMZayavkaH #include "IMainInterface.h" #include "UGlobalConstant.h" #include "FIBDatabase.hpp" #include "FIBDataSet.hpp" #include "FIBQuery.hpp" #include "pFIBDatabase.hpp" #include "pFIBDataSet.hpp" #include "pFIBQuery.hpp" #include <Classes.hpp> class __declspec(uuid(Global_IID_IREM_DMZayavka)) IREM_DMZayavka : public IMainInterface { public: __property TDataSource * DataSourceGurZKompl = {read = get_DataSourceGurZKompl , write = set_DataSourceGurZKompl}; virtual TDataSource * get_DataSourceGurZKompl(void)=0; virtual void set_DataSourceGurZKompl(TDataSource * DataSourceGurZKompl)=0; __property TDataSource * DataSourceGurZNeispr = {read = get_DataSourceGurZNeispr , write = set_DataSourceGurZNeispr}; virtual TDataSource * get_DataSourceGurZNeispr(void)=0; virtual void set_DataSourceGurZNeispr(TDataSource * DataSourceGurZNeispr)=0; __property TDataSource * DataSourceGurZ = {read = get_DataSourceGurZ , write = set_DataSourceGurZ}; virtual TDataSource * get_DataSourceGurZ(void)=0; virtual void set_DataSourceGurZ(TDataSource * DataSourceGurZ)=0; __property TpFIBDataSet * GurZ = {read = get_GurZ , write = set_GurZ}; virtual TpFIBDataSet * get_GurZ(void)=0; virtual void set_GurZ(TpFIBDataSet * GurZ)=0; __property TpFIBDataSet * GurZKompl = {read = get_GurZKompl , write = set_GurZKompl}; virtual TpFIBDataSet * get_GurZKompl(void)=0; virtual void set_GurZKompl(TpFIBDataSet * GurZKompl)=0; __property TpFIBDataSet * GurZNeispr = {read = get_GurZNeispr , write = set_GurZNeispr}; virtual TpFIBDataSet * get_GurZNeispr(void)=0; virtual void set_GurZNeispr(TpFIBDataSet * GurZNeispr)=0; __property TpFIBTransaction * IBTr = {read = get_IBTr , write = set_IBTr}; virtual TpFIBTransaction * get_IBTr(void)=0; virtual void set_IBTr(TpFIBTransaction * IBTr)=0; __property TpFIBTransaction * IBTrUpdate = {read = get_IBTrUpdate , write = set_IBTrUpdate}; virtual TpFIBTransaction * get_IBTrUpdate(void)=0; virtual void set_IBTrUpdate(TpFIBTransaction * IBTrUpdate)=0; __property TpFIBDataSet * NumDoc = {read = get_NumDoc , write = set_NumDoc}; virtual TpFIBDataSet * get_NumDoc(void)=0; virtual void set_NumDoc(TpFIBDataSet * NumDoc)=0; __property TIntegerField * GurZKomplRECNO = {read = get_GurZKomplRECNO , write = set_GurZKomplRECNO}; virtual TIntegerField * get_GurZKomplRECNO(void)=0; virtual void set_GurZKomplRECNO(TIntegerField * GurZKomplRECNO)=0; __property TIntegerField * GurZNeisprRECNO = {read = get_GurZNeisprRECNO , write = set_GurZNeisprRECNO}; virtual TIntegerField * get_GurZNeisprRECNO(void)=0; virtual void set_GurZNeisprRECNO(TIntegerField * GurZNeisprRECNO)=0; __property TFIBLargeIntField * GurZID_REM_Z = {read = get_GurZID_REM_Z , write = set_GurZID_REM_Z}; virtual TFIBLargeIntField * get_GurZID_REM_Z(void)=0; virtual void set_GurZID_REM_Z(TFIBLargeIntField * GurZID_REM_Z)=0; __property TFIBWideStringField * GurZGID_REM_Z = {read = get_GurZGID_REM_Z , write = set_GurZGID_REM_Z}; virtual TFIBWideStringField * get_GurZGID_REM_Z(void)=0; virtual void set_GurZGID_REM_Z(TFIBWideStringField * GurZGID_REM_Z)=0; __property TFIBWideStringField * GurZPREFIKS_REM_Z = {read = get_GurZPREFIKS_REM_Z , write = set_GurZPREFIKS_REM_Z}; virtual TFIBWideStringField * get_GurZPREFIKS_REM_Z(void)=0; virtual void set_GurZPREFIKS_REM_Z(TFIBWideStringField * GurZPREFIKS_REM_Z)=0; __property TFIBIntegerField * GurZNUM_REM_Z = {read = get_GurZNUM_REM_Z , write = set_GurZNUM_REM_Z}; virtual TFIBIntegerField * get_GurZNUM_REM_Z(void)=0; virtual void set_GurZNUM_REM_Z(TFIBIntegerField * GurZNUM_REM_Z)=0; __property TFIBDateTimeField * GurZPOS_REM_Z = {read = get_GurZPOS_REM_Z , write = set_GurZPOS_REM_Z}; virtual TFIBDateTimeField * get_GurZPOS_REM_Z(void)=0; virtual void set_GurZPOS_REM_Z(TFIBDateTimeField * GurZPOS_REM_Z)=0; __property TFIBLargeIntField * GurZIDBASE_REM_Z = {read = get_GurZIDBASE_REM_Z , write = set_GurZIDBASE_REM_Z}; virtual TFIBLargeIntField * get_GurZIDBASE_REM_Z(void)=0; virtual void set_GurZIDBASE_REM_Z(TFIBLargeIntField * GurZIDBASE_REM_Z)=0; __property TFIBLargeIntField * GurZIDMODEL_REM_Z = {read = get_GurZIDMODEL_REM_Z , write = set_GurZIDMODEL_REM_Z}; virtual TFIBLargeIntField * get_GurZIDMODEL_REM_Z(void)=0; virtual void set_GurZIDMODEL_REM_Z(TFIBLargeIntField * GurZIDMODEL_REM_Z)=0; __property TFIBLargeIntField * GurZIDSKLPR_REM_Z = {read = get_GurZIDSKLPR_REM_Z , write = set_GurZIDSKLPR_REM_Z}; virtual TFIBLargeIntField * get_GurZIDSKLPR_REM_Z(void)=0; virtual void set_GurZIDSKLPR_REM_Z(TFIBLargeIntField * GurZIDSKLPR_REM_Z)=0; __property TFIBLargeIntField * GurZIDKLIENT_REM_Z = {read = get_GurZIDKLIENT_REM_Z , write = set_GurZIDKLIENT_REM_Z}; virtual TFIBLargeIntField * get_GurZIDKLIENT_REM_Z(void)=0; virtual void set_GurZIDKLIENT_REM_Z(TFIBLargeIntField * GurZIDKLIENT_REM_Z)=0; __property TFIBLargeIntField * GurZIDDILER_REM_Z = {read = get_GurZIDDILER_REM_Z , write = set_GurZIDDILER_REM_Z}; virtual TFIBLargeIntField * get_GurZIDDILER_REM_Z(void)=0; virtual void set_GurZIDDILER_REM_Z(TFIBLargeIntField * GurZIDDILER_REM_Z)=0; __property TFIBWideStringField * GurZNAME_REM_Z = {read = get_GurZNAME_REM_Z , write = set_GurZNAME_REM_Z}; virtual TFIBWideStringField * get_GurZNAME_REM_Z(void)=0; virtual void set_GurZNAME_REM_Z(TFIBWideStringField * GurZNAME_REM_Z)=0; __property TFIBWideStringField * GurZDESCR_REM_Z = {read = get_GurZDESCR_REM_Z , write = set_GurZDESCR_REM_Z}; virtual TFIBWideStringField * get_GurZDESCR_REM_Z(void)=0; virtual void set_GurZDESCR_REM_Z(TFIBWideStringField * GurZDESCR_REM_Z)=0; __property TFIBLargeIntField * GurZIDTYPEREM_REM_Z = {read = get_GurZIDTYPEREM_REM_Z , write = set_GurZIDTYPEREM_REM_Z}; virtual TFIBLargeIntField * get_GurZIDTYPEREM_REM_Z(void)=0; virtual void set_GurZIDTYPEREM_REM_Z(TFIBLargeIntField * GurZIDTYPEREM_REM_Z)=0; __property TFIBLargeIntField * GurZIDSOST_REM_Z = {read = get_GurZIDSOST_REM_Z , write = set_GurZIDSOST_REM_Z}; virtual TFIBLargeIntField * get_GurZIDSOST_REM_Z(void)=0; virtual void set_GurZIDSOST_REM_Z(TFIBLargeIntField * GurZIDSOST_REM_Z)=0; __property TFIBLargeIntField * GurZIDTECSKL_REM_Z = {read = get_GurZIDTECSKL_REM_Z , write = set_GurZIDTECSKL_REM_Z}; virtual TFIBLargeIntField * get_GurZIDTECSKL_REM_Z(void)=0; virtual void set_GurZIDTECSKL_REM_Z(TFIBLargeIntField * GurZIDTECSKL_REM_Z)=0; __property TFIBLargeIntField * GurZIDUSER_REM_Z = {read = get_GurZIDUSER_REM_Z , write = set_GurZIDUSER_REM_Z}; virtual TFIBLargeIntField * get_GurZIDUSER_REM_Z(void)=0; virtual void set_GurZIDUSER_REM_Z(TFIBLargeIntField * GurZIDUSER_REM_Z)=0; __property TFIBIntegerField * GurZOPER_REM_Z = {read = get_GurZOPER_REM_Z , write = set_GurZOPER_REM_Z}; virtual TFIBIntegerField * get_GurZOPER_REM_Z(void)=0; virtual void set_GurZOPER_REM_Z(TFIBIntegerField * GurZOPER_REM_Z)=0; __property TFIBBCDField * GurZSUM_REM_Z = {read = get_GurZSUM_REM_Z , write = set_GurZSUM_REM_Z}; virtual TFIBBCDField * get_GurZSUM_REM_Z(void)=0; virtual void set_GurZSUM_REM_Z(TFIBBCDField * GurZSUM_REM_Z)=0; __property TFIBDateField * GurZSROK_REM_Z = {read = get_GurZSROK_REM_Z , write = set_GurZSROK_REM_Z}; virtual TFIBDateField * get_GurZSROK_REM_Z(void)=0; virtual void set_GurZSROK_REM_Z(TFIBDateField * GurZSROK_REM_Z)=0; __property TFIBSmallIntField * GurZOUT_REM_Z = {read = get_GurZOUT_REM_Z , write = set_GurZOUT_REM_Z}; virtual TFIBSmallIntField * get_GurZOUT_REM_Z(void)=0; virtual void set_GurZOUT_REM_Z(TFIBSmallIntField * GurZOUT_REM_Z)=0; __property TFIBLargeIntField * GurZIDFIRM_REM_Z = {read = get_GurZIDFIRM_REM_Z , write = set_GurZIDFIRM_REM_Z}; virtual TFIBLargeIntField * get_GurZIDFIRM_REM_Z(void)=0; virtual void set_GurZIDFIRM_REM_Z(TFIBLargeIntField * GurZIDFIRM_REM_Z)=0; __property TFIBWideStringField * GurZNAMEFIRM = {read = get_GurZNAMEFIRM , write = set_GurZNAMEFIRM}; virtual TFIBWideStringField * get_GurZNAMEFIRM(void)=0; virtual void set_GurZNAMEFIRM(TFIBWideStringField * GurZNAMEFIRM)=0; __property TFIBWideStringField * GurZNAME_SINFBASE_OBMEN = {read = get_GurZNAME_SINFBASE_OBMEN , write = set_GurZNAME_SINFBASE_OBMEN}; virtual TFIBWideStringField * get_GurZNAME_SINFBASE_OBMEN(void)=0; virtual void set_GurZNAME_SINFBASE_OBMEN(TFIBWideStringField * GurZNAME_SINFBASE_OBMEN)=0; __property TFIBWideStringField * GurZNAME_REM_SMODEL = {read = get_GurZNAME_REM_SMODEL , write = set_GurZNAME_REM_SMODEL}; virtual TFIBWideStringField * get_GurZNAME_REM_SMODEL(void)=0; virtual void set_GurZNAME_REM_SMODEL(TFIBWideStringField * GurZNAME_REM_SMODEL)=0; __property TFIBWideStringField * GurZNAME_SKLAD_PR = {read = get_GurZNAME_SKLAD_PR , write = set_GurZNAME_SKLAD_PR}; virtual TFIBWideStringField * get_GurZNAME_SKLAD_PR(void)=0; virtual void set_GurZNAME_SKLAD_PR(TFIBWideStringField * GurZNAME_SKLAD_PR)=0; __property TFIBWideStringField * GurZNAMEKLIENT = {read = get_GurZNAMEKLIENT , write = set_GurZNAMEKLIENT}; virtual TFIBWideStringField * get_GurZNAMEKLIENT(void)=0; virtual void set_GurZNAMEKLIENT(TFIBWideStringField * GurZNAMEKLIENT)=0; __property TFIBWideStringField * GurZNAMEDILER = {read = get_GurZNAMEDILER , write = set_GurZNAMEDILER}; virtual TFIBWideStringField * get_GurZNAMEDILER(void)=0; virtual void set_GurZNAMEDILER(TFIBWideStringField * GurZNAMEDILER)=0; __property TFIBWideStringField * GurZNAME_STREMONT = {read = get_GurZNAME_STREMONT , write = set_GurZNAME_STREMONT}; virtual TFIBWideStringField * get_GurZNAME_STREMONT(void)=0; virtual void set_GurZNAME_STREMONT(TFIBWideStringField * GurZNAME_STREMONT)=0; __property TFIBWideStringField * GurZNAME_REMSSOST = {read = get_GurZNAME_REMSSOST , write = set_GurZNAME_REMSSOST}; virtual TFIBWideStringField * get_GurZNAME_REMSSOST(void)=0; virtual void set_GurZNAME_REMSSOST(TFIBWideStringField * GurZNAME_REMSSOST)=0; __property TFIBWideStringField * GurZNAME_SKLAD_TEC = {read = get_GurZNAME_SKLAD_TEC , write = set_GurZNAME_SKLAD_TEC}; virtual TFIBWideStringField * get_GurZNAME_SKLAD_TEC(void)=0; virtual void set_GurZNAME_SKLAD_TEC(TFIBWideStringField * GurZNAME_SKLAD_TEC)=0; __property TFIBWideStringField * GurZNAME_USER = {read = get_GurZNAME_USER , write = set_GurZNAME_USER}; virtual TFIBWideStringField * get_GurZNAME_USER(void)=0; virtual void set_GurZNAME_USER(TFIBWideStringField * GurZNAME_USER)=0; __property TFIBLargeIntField * GurZKomplID_REM_ZKOMPL = {read = get_GurZKomplID_REM_ZKOMPL , write = set_GurZKomplID_REM_ZKOMPL}; virtual TFIBLargeIntField * get_GurZKomplID_REM_ZKOMPL(void)=0; virtual void set_GurZKomplID_REM_ZKOMPL(TFIBLargeIntField * GurZKomplID_REM_ZKOMPL)=0; __property TFIBWideStringField * GurZKomplGID_REM_ZKOMPL = {read = get_GurZKomplGID_REM_ZKOMPL , write = set_GurZKomplGID_REM_ZKOMPL}; virtual TFIBWideStringField * get_GurZKomplGID_REM_ZKOMPL(void)=0; virtual void set_GurZKomplGID_REM_ZKOMPL(TFIBWideStringField * GurZKomplGID_REM_ZKOMPL)=0; __property TFIBWideStringField * GurZKomplPREFIKS_REM_ZKOMPL = {read = get_GurZKomplPREFIKS_REM_ZKOMPL , write = set_GurZKomplPREFIKS_REM_ZKOMPL}; virtual TFIBWideStringField * get_GurZKomplPREFIKS_REM_ZKOMPL(void)=0; virtual void set_GurZKomplPREFIKS_REM_ZKOMPL(TFIBWideStringField * GurZKomplPREFIKS_REM_ZKOMPL)=0; __property TFIBLargeIntField * GurZKomplIDZ_REM_ZKOMPL = {read = get_GurZKomplIDZ_REM_ZKOMPL , write = set_GurZKomplIDZ_REM_ZKOMPL}; virtual TFIBLargeIntField * get_GurZKomplIDZ_REM_ZKOMPL(void)=0; virtual void set_GurZKomplIDZ_REM_ZKOMPL(TFIBLargeIntField * GurZKomplIDZ_REM_ZKOMPL)=0; __property TFIBLargeIntField * GurZKomplIDKOMPL_REM_ZKOMPL = {read = get_GurZKomplIDKOMPL_REM_ZKOMPL , write = set_GurZKomplIDKOMPL_REM_ZKOMPL}; virtual TFIBLargeIntField * get_GurZKomplIDKOMPL_REM_ZKOMPL(void)=0; virtual void set_GurZKomplIDKOMPL_REM_ZKOMPL(TFIBLargeIntField * GurZKomplIDKOMPL_REM_ZKOMPL)=0; __property TFIBBCDField * GurZKomplKOL_REM_ZKOMPL = {read = get_GurZKomplKOL_REM_ZKOMPL , write = set_GurZKomplKOL_REM_ZKOMPL}; virtual TFIBBCDField * get_GurZKomplKOL_REM_ZKOMPL(void)=0; virtual void set_GurZKomplKOL_REM_ZKOMPL(TFIBBCDField * GurZKomplKOL_REM_ZKOMPL)=0; __property TFIBLargeIntField * GurZKomplIDBASE_REM_ZKOMPL = {read = get_GurZKomplIDBASE_REM_ZKOMPL , write = set_GurZKomplIDBASE_REM_ZKOMPL}; virtual TFIBLargeIntField * get_GurZKomplIDBASE_REM_ZKOMPL(void)=0; virtual void set_GurZKomplIDBASE_REM_ZKOMPL(TFIBLargeIntField * GurZKomplIDBASE_REM_ZKOMPL)=0; __property TFIBWideStringField * GurZKomplNAME_REM_SKOMPLMODEL = {read = get_GurZKomplNAME_REM_SKOMPLMODEL , write = set_GurZKomplNAME_REM_SKOMPLMODEL}; virtual TFIBWideStringField * get_GurZKomplNAME_REM_SKOMPLMODEL(void)=0; virtual void set_GurZKomplNAME_REM_SKOMPLMODEL(TFIBWideStringField * GurZKomplNAME_REM_SKOMPLMODEL)=0; __property TFIBLargeIntField * GurZNeisprID_REM_ZNEISPR = {read = get_GurZNeisprID_REM_ZNEISPR , write = set_GurZNeisprID_REM_ZNEISPR}; virtual TFIBLargeIntField * get_GurZNeisprID_REM_ZNEISPR(void)=0; virtual void set_GurZNeisprID_REM_ZNEISPR(TFIBLargeIntField * GurZNeisprID_REM_ZNEISPR)=0; __property TFIBWideStringField * GurZNeisprGID_REM_ZNEISPR = {read = get_GurZNeisprGID_REM_ZNEISPR , write = set_GurZNeisprGID_REM_ZNEISPR}; virtual TFIBWideStringField * get_GurZNeisprGID_REM_ZNEISPR(void)=0; virtual void set_GurZNeisprGID_REM_ZNEISPR(TFIBWideStringField * GurZNeisprGID_REM_ZNEISPR)=0; __property TFIBWideStringField * GurZNeisprPREFIKS_REM_ZNEISPR = {read = get_GurZNeisprPREFIKS_REM_ZNEISPR , write = set_GurZNeisprPREFIKS_REM_ZNEISPR}; virtual TFIBWideStringField * get_GurZNeisprPREFIKS_REM_ZNEISPR(void)=0; virtual void set_GurZNeisprPREFIKS_REM_ZNEISPR(TFIBWideStringField * GurZNeisprPREFIKS_REM_ZNEISPR)=0; __property TFIBLargeIntField * GurZNeisprIDZ_REM_ZNEISPR = {read = get_GurZNeisprIDZ_REM_ZNEISPR , write = set_GurZNeisprIDZ_REM_ZNEISPR}; virtual TFIBLargeIntField * get_GurZNeisprIDZ_REM_ZNEISPR(void)=0; virtual void set_GurZNeisprIDZ_REM_ZNEISPR(TFIBLargeIntField * GurZNeisprIDZ_REM_ZNEISPR)=0; __property TFIBLargeIntField * GurZNeisprIDNEISPR_REM_ZNEISPR = {read = get_GurZNeisprIDNEISPR_REM_ZNEISPR , write = set_GurZNeisprIDNEISPR_REM_ZNEISPR}; virtual TFIBLargeIntField * get_GurZNeisprIDNEISPR_REM_ZNEISPR(void)=0; virtual void set_GurZNeisprIDNEISPR_REM_ZNEISPR(TFIBLargeIntField * GurZNeisprIDNEISPR_REM_ZNEISPR)=0; __property TFIBLargeIntField * GurZNeisprIDBASE_REM_ZNEISPR = {read = get_GurZNeisprIDBASE_REM_ZNEISPR , write = set_GurZNeisprIDBASE_REM_ZNEISPR}; virtual TFIBLargeIntField * get_GurZNeisprIDBASE_REM_ZNEISPR(void)=0; virtual void set_GurZNeisprIDBASE_REM_ZNEISPR(TFIBLargeIntField * GurZNeisprIDBASE_REM_ZNEISPR)=0; __property TFIBWideStringField * GurZNeisprNAME_REM_SNEISPR = {read = get_GurZNeisprNAME_REM_SNEISPR , write = set_GurZNeisprNAME_REM_SNEISPR}; virtual TFIBWideStringField * get_GurZNeisprNAME_REM_SNEISPR(void)=0; virtual void set_GurZNeisprNAME_REM_SNEISPR(TFIBWideStringField * GurZNeisprNAME_REM_SNEISPR)=0; __property TFIBWideStringField * GurZNEISPR_REM_Z = {read = get_GurZNEISPR_REM_Z , write = set_GurZNEISPR_REM_Z}; virtual TFIBWideStringField * get_GurZNEISPR_REM_Z(void)=0; virtual void set_GurZNEISPR_REM_Z(TFIBWideStringField * GurZNEISPR_REM_Z)=0; __property TFIBWideStringField * GurZKLIENT_NAME_REM_Z = {read = get_GurZKLIENT_NAME_REM_Z , write = set_GurZKLIENT_NAME_REM_Z}; virtual TFIBWideStringField * get_GurZKLIENT_NAME_REM_Z(void)=0; virtual void set_GurZKLIENT_NAME_REM_Z(TFIBWideStringField * GurZKLIENT_NAME_REM_Z)=0; __property TFIBWideStringField * GurZKLIENT_ADR_REM_Z = {read = get_GurZKLIENT_ADR_REM_Z , write = set_GurZKLIENT_ADR_REM_Z}; virtual TFIBWideStringField * get_GurZKLIENT_ADR_REM_Z(void)=0; virtual void set_GurZKLIENT_ADR_REM_Z(TFIBWideStringField * GurZKLIENT_ADR_REM_Z)=0; __property TFIBWideStringField * GurZKLIENT_PHONE_REM_Z = {read = get_GurZKLIENT_PHONE_REM_Z , write = set_GurZKLIENT_PHONE_REM_Z}; virtual TFIBWideStringField * get_GurZKLIENT_PHONE_REM_Z(void)=0; virtual void set_GurZKLIENT_PHONE_REM_Z(TFIBWideStringField * GurZKLIENT_PHONE_REM_Z)=0; __property TFIBWideStringField * GurZKOMPLECT_REM_Z = {read = get_GurZKOMPLECT_REM_Z , write = set_GurZKOMPLECT_REM_Z}; virtual TFIBWideStringField * get_GurZKOMPLECT_REM_Z(void)=0; virtual void set_GurZKOMPLECT_REM_Z(TFIBWideStringField * GurZKOMPLECT_REM_Z)=0; __property TFIBWideStringField * GurZMODEL_REM_Z = {read = get_GurZMODEL_REM_Z , write = set_GurZMODEL_REM_Z}; virtual TFIBWideStringField * get_GurZMODEL_REM_Z(void)=0; virtual void set_GurZMODEL_REM_Z(TFIBWideStringField * GurZMODEL_REM_Z)=0; __property TFIBWideStringField * GurZSOST_REM_Z = {read = get_GurZSOST_REM_Z , write = set_GurZSOST_REM_Z}; virtual TFIBWideStringField * get_GurZSOST_REM_Z(void)=0; virtual void set_GurZSOST_REM_Z(TFIBWideStringField * GurZSOST_REM_Z)=0; __property TFIBWideStringField * GurZSERNUM2_REM_Z = {read = get_GurZSERNUM2_REM_Z , write = set_GurZSERNUM2_REM_Z}; virtual TFIBWideStringField * get_GurZSERNUM2_REM_Z(void)=0; virtual void set_GurZSERNUM2_REM_Z(TFIBWideStringField * GurZSERNUM2_REM_Z)=0; __property TFIBWideStringField * GurZSERNUM_REM_Z = {read = get_GurZSERNUM_REM_Z , write = set_GurZSERNUM_REM_Z}; virtual TFIBWideStringField * get_GurZSERNUM_REM_Z(void)=0; virtual void set_GurZSERNUM_REM_Z(TFIBWideStringField * GurZSERNUM_REM_Z)=0; __property TFIBWideStringField * GurZCOMENTS_REM_Z = {read = get_GurZCOMENTS_REM_Z , write = set_GurZCOMENTS_REM_Z}; virtual TFIBWideStringField * get_GurZCOMENTS_REM_Z(void)=0; virtual void set_GurZCOMENTS_REM_Z(TFIBWideStringField * GurZCOMENTS_REM_Z)=0; __property TFIBDateTimeField * GurZPOSOUT_REM_Z = {read = get_GurZPOSOUT_REM_Z , write = set_GurZPOSOUT_REM_Z}; virtual TFIBDateTimeField * get_GurZPOSOUT_REM_Z(void)=0; virtual void set_GurZPOSOUT_REM_Z(TFIBDateTimeField * GurZPOSOUT_REM_Z)=0; __property TFIBDateTimeField * GurZPOSREMONT_REM_Z = {read = get_GurZPOSREMONT_REM_Z , write = set_GurZPOSREMONT_REM_Z}; virtual TFIBDateTimeField * get_GurZPOSREMONT_REM_Z(void)=0; virtual void set_GurZPOSREMONT_REM_Z(TFIBDateTimeField * GurZPOSREMONT_REM_Z)=0; __property TFIBIntegerField * GurZWARRANTY_REM_Z = {read = get_GurZWARRANTY_REM_Z , write = set_GurZWARRANTY_REM_Z}; virtual TFIBIntegerField * get_GurZWARRANTY_REM_Z(void)=0; virtual void set_GurZWARRANTY_REM_Z(TFIBIntegerField * GurZWARRANTY_REM_Z)=0; __property TpFIBDataSet * DopUsl = {read = get_DopUsl , write = set_DopUsl}; virtual TpFIBDataSet * get_DopUsl(void)=0; virtual void set_DopUsl(TpFIBDataSet * DopUsl)=0; __property TDataSource * DataSourceDopUsl = {read = get_DataSourceDopUsl , write = set_DataSourceDopUsl}; virtual TDataSource * get_DataSourceDopUsl(void)=0; virtual void set_DataSourceDopUsl(TDataSource * DataSourceDopUsl)=0; __property TFIBLargeIntField * DopUslID_REM_ZDOPUSL = {read = get_DopUslID_REM_ZDOPUSL , write = set_DopUslID_REM_ZDOPUSL}; virtual TFIBLargeIntField * get_DopUslID_REM_ZDOPUSL(void)=0; virtual void set_DopUslID_REM_ZDOPUSL(TFIBLargeIntField * DopUslID_REM_ZDOPUSL)=0; __property TFIBWideStringField * DopUslGID_REM_ZDOPUSL = {read = get_DopUslGID_REM_ZDOPUSL , write = set_DopUslGID_REM_ZDOPUSL}; virtual TFIBWideStringField * get_DopUslGID_REM_ZDOPUSL(void)=0; virtual void set_DopUslGID_REM_ZDOPUSL(TFIBWideStringField * DopUslGID_REM_ZDOPUSL)=0; __property TFIBLargeIntField * DopUslIDBASE_REM_ZDOPUSL = {read = get_DopUslIDBASE_REM_ZDOPUSL , write = set_DopUslIDBASE_REM_ZDOPUSL}; virtual TFIBLargeIntField * get_DopUslIDBASE_REM_ZDOPUSL(void)=0; virtual void set_DopUslIDBASE_REM_ZDOPUSL(TFIBLargeIntField * DopUslIDBASE_REM_ZDOPUSL)=0; __property TFIBLargeIntField * DopUslIDZ_REM_ZDOPUSL = {read = get_DopUslIDZ_REM_ZDOPUSL , write = set_DopUslIDZ_REM_ZDOPUSL}; virtual TFIBLargeIntField * get_DopUslIDZ_REM_ZDOPUSL(void)=0; virtual void set_DopUslIDZ_REM_ZDOPUSL(TFIBLargeIntField * DopUslIDZ_REM_ZDOPUSL)=0; __property TFIBLargeIntField * DopUslIDNOM_REM_ZDOPUSL = {read = get_DopUslIDNOM_REM_ZDOPUSL , write = set_DopUslIDNOM_REM_ZDOPUSL}; virtual TFIBLargeIntField * get_DopUslIDNOM_REM_ZDOPUSL(void)=0; virtual void set_DopUslIDNOM_REM_ZDOPUSL(TFIBLargeIntField * DopUslIDNOM_REM_ZDOPUSL)=0; __property TFIBLargeIntField * DopUslIDED_REM_ZDOPUSL = {read = get_DopUslIDED_REM_ZDOPUSL , write = set_DopUslIDED_REM_ZDOPUSL}; virtual TFIBLargeIntField * get_DopUslIDED_REM_ZDOPUSL(void)=0; virtual void set_DopUslIDED_REM_ZDOPUSL(TFIBLargeIntField * DopUslIDED_REM_ZDOPUSL)=0; __property TFIBBCDField * DopUslKOL_REM_ZDOPUSL = {read = get_DopUslKOL_REM_ZDOPUSL , write = set_DopUslKOL_REM_ZDOPUSL}; virtual TFIBBCDField * get_DopUslKOL_REM_ZDOPUSL(void)=0; virtual void set_DopUslKOL_REM_ZDOPUSL(TFIBBCDField * DopUslKOL_REM_ZDOPUSL)=0; __property TFIBBCDField * DopUslKF_REM_ZDOPUSL = {read = get_DopUslKF_REM_ZDOPUSL , write = set_DopUslKF_REM_ZDOPUSL}; virtual TFIBBCDField * get_DopUslKF_REM_ZDOPUSL(void)=0; virtual void set_DopUslKF_REM_ZDOPUSL(TFIBBCDField * DopUslKF_REM_ZDOPUSL)=0; __property TFIBBCDField * DopUslPRICE_REM_ZDOPUSL = {read = get_DopUslPRICE_REM_ZDOPUSL , write = set_DopUslPRICE_REM_ZDOPUSL}; virtual TFIBBCDField * get_DopUslPRICE_REM_ZDOPUSL(void)=0; virtual void set_DopUslPRICE_REM_ZDOPUSL(TFIBBCDField * DopUslPRICE_REM_ZDOPUSL)=0; __property TFIBBCDField * DopUslSUM_REM_ZDOPUSL = {read = get_DopUslSUM_REM_ZDOPUSL , write = set_DopUslSUM_REM_ZDOPUSL}; virtual TFIBBCDField * get_DopUslSUM_REM_ZDOPUSL(void)=0; virtual void set_DopUslSUM_REM_ZDOPUSL(TFIBBCDField * DopUslSUM_REM_ZDOPUSL)=0; __property TFIBWideStringField * DopUslTEXTNOM_REM_ZDOPUSL = {read = get_DopUslTEXTNOM_REM_ZDOPUSL , write = set_DopUslTEXTNOM_REM_ZDOPUSL}; virtual TFIBWideStringField * get_DopUslTEXTNOM_REM_ZDOPUSL(void)=0; virtual void set_DopUslTEXTNOM_REM_ZDOPUSL(TFIBWideStringField * DopUslTEXTNOM_REM_ZDOPUSL)=0; __property TFIBWideStringField * DopUslNAMENOM = {read = get_DopUslNAMENOM , write = set_DopUslNAMENOM}; virtual TFIBWideStringField * get_DopUslNAMENOM(void)=0; virtual void set_DopUslNAMENOM(TFIBWideStringField * DopUslNAMENOM)=0; __property TFIBWideStringField * DopUslNAMEED = {read = get_DopUslNAMEED , write = set_DopUslNAMEED}; virtual TFIBWideStringField * get_DopUslNAMEED(void)=0; virtual void set_DopUslNAMEED(TFIBWideStringField * DopUslNAMEED)=0; __property TpFIBDataSet * PerformedWork = {read = get_PerformedWork , write = set_PerformedWork}; virtual TpFIBDataSet * get_PerformedWork(void)=0; virtual void set_PerformedWork(TpFIBDataSet * PerformedWork)=0; __property TDataSource * DataSourcePerformedWork = {read = get_DataSourcePerformedWork , write = set_DataSourcePerformedWork}; virtual TDataSource * get_DataSourcePerformedWork(void)=0; virtual void set_DataSourcePerformedWork(TDataSource * DataSourcePerformedWork)=0; __property TFIBLargeIntField * PerformedWorkID_REM_ZPERFWORK = {read = get_PerformedWorkID_REM_ZPERFWORK , write = set_PerformedWorkID_REM_ZPERFWORK}; virtual TFIBLargeIntField * get_PerformedWorkID_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkID_REM_ZPERFWORK(TFIBLargeIntField * PerformedWorkID_REM_ZPERFWORK)=0; __property TFIBWideStringField * PerformedWorkGID_REM_ZPERFWORK = {read = get_PerformedWorkGID_REM_ZPERFWORK , write = set_PerformedWorkGID_REM_ZPERFWORK}; virtual TFIBWideStringField * get_PerformedWorkGID_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkGID_REM_ZPERFWORK(TFIBWideStringField * PerformedWorkGID_REM_ZPERFWORK)=0; __property TFIBLargeIntField * PerformedWorkIDBASE_REM_ZPERFWORK = {read = get_PerformedWorkIDBASE_REM_ZPERFWORK , write = set_PerformedWorkIDBASE_REM_ZPERFWORK}; virtual TFIBLargeIntField * get_PerformedWorkIDBASE_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkIDBASE_REM_ZPERFWORK(TFIBLargeIntField * PerformedWorkIDBASE_REM_ZPERFWORK)=0; __property TFIBLargeIntField * PerformedWorkIDZ_REM_ZPERFWORK = {read = get_PerformedWorkIDZ_REM_ZPERFWORK , write = set_PerformedWorkIDZ_REM_ZPERFWORK}; virtual TFIBLargeIntField * get_PerformedWorkIDZ_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkIDZ_REM_ZPERFWORK(TFIBLargeIntField * PerformedWorkIDZ_REM_ZPERFWORK)=0; __property TFIBLargeIntField * PerformedWorkIDNOM_REM_ZPERFWORK = {read = get_PerformedWorkIDNOM_REM_ZPERFWORK , write = set_PerformedWorkIDNOM_REM_ZPERFWORK}; virtual TFIBLargeIntField * get_PerformedWorkIDNOM_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkIDNOM_REM_ZPERFWORK(TFIBLargeIntField * PerformedWorkIDNOM_REM_ZPERFWORK)=0; __property TFIBLargeIntField * PerformedWorkIDED_REM_ZPERFWORK = {read = get_PerformedWorkIDED_REM_ZPERFWORK , write = set_PerformedWorkIDED_REM_ZPERFWORK}; virtual TFIBLargeIntField * get_PerformedWorkIDED_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkIDED_REM_ZPERFWORK(TFIBLargeIntField * PerformedWorkIDED_REM_ZPERFWORK)=0; __property TFIBBCDField * PerformedWorkKOL_REM_ZPERFWORK = {read = get_PerformedWorkKOL_REM_ZPERFWORK , write = set_PerformedWorkKOL_REM_ZPERFWORK}; virtual TFIBBCDField * get_PerformedWorkKOL_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkKOL_REM_ZPERFWORK(TFIBBCDField * PerformedWorkKOL_REM_ZPERFWORK)=0; __property TFIBBCDField * PerformedWorkKF_REM_ZPERFWORK = {read = get_PerformedWorkKF_REM_ZPERFWORK , write = set_PerformedWorkKF_REM_ZPERFWORK}; virtual TFIBBCDField * get_PerformedWorkKF_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkKF_REM_ZPERFWORK(TFIBBCDField * PerformedWorkKF_REM_ZPERFWORK)=0; __property TFIBBCDField * PerformedWorkPRICE_REM_ZPERFWORK = {read = get_PerformedWorkPRICE_REM_ZPERFWORK , write = set_PerformedWorkPRICE_REM_ZPERFWORK}; virtual TFIBBCDField * get_PerformedWorkPRICE_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkPRICE_REM_ZPERFWORK(TFIBBCDField * PerformedWorkPRICE_REM_ZPERFWORK)=0; __property TFIBBCDField * PerformedWorkSUM_REM_ZPERFWORK = {read = get_PerformedWorkSUM_REM_ZPERFWORK , write = set_PerformedWorkSUM_REM_ZPERFWORK}; virtual TFIBBCDField * get_PerformedWorkSUM_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkSUM_REM_ZPERFWORK(TFIBBCDField * PerformedWorkSUM_REM_ZPERFWORK)=0; __property TFIBWideStringField * PerformedWorkTEXTNOM_REM_ZPERFWORK = {read = get_PerformedWorkTEXTNOM_REM_ZPERFWORK , write = set_PerformedWorkTEXTNOM_REM_ZPERFWORK}; virtual TFIBWideStringField * get_PerformedWorkTEXTNOM_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkTEXTNOM_REM_ZPERFWORK(TFIBWideStringField * PerformedWorkTEXTNOM_REM_ZPERFWORK)=0; __property TFIBDateTimeField * PerformedWorkPOS_REM_ZPERFWORK = {read = get_PerformedWorkPOS_REM_ZPERFWORK , write = set_PerformedWorkPOS_REM_ZPERFWORK}; virtual TFIBDateTimeField * get_PerformedWorkPOS_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkPOS_REM_ZPERFWORK(TFIBDateTimeField * PerformedWorkPOS_REM_ZPERFWORK)=0; __property TFIBSmallIntField * PerformedWorkRESULT_REM_ZPERFWORK = {read = get_PerformedWorkRESULT_REM_ZPERFWORK , write = set_PerformedWorkRESULT_REM_ZPERFWORK}; virtual TFIBSmallIntField * get_PerformedWorkRESULT_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkRESULT_REM_ZPERFWORK(TFIBSmallIntField * PerformedWorkRESULT_REM_ZPERFWORK)=0; __property TFIBSmallIntField * PerformedWorkADDACT_REM_ZPERFWORK = {read = get_PerformedWorkADDACT_REM_ZPERFWORK , write = set_PerformedWorkADDACT_REM_ZPERFWORK}; virtual TFIBSmallIntField * get_PerformedWorkADDACT_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkADDACT_REM_ZPERFWORK(TFIBSmallIntField * PerformedWorkADDACT_REM_ZPERFWORK)=0; __property TFIBSmallIntField * PerformedWorkSHOWFORUSER_REM_ZPERFWORK = {read = get_PerformedWorkSHOWFORUSER_REM_ZPERFWORK , write = set_PerformedWorkSHOWFORUSER_REM_ZPERFWORK}; virtual TFIBSmallIntField * get_PerformedWorkSHOWFORUSER_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkSHOWFORUSER_REM_ZPERFWORK(TFIBSmallIntField * PerformedWorkSHOWFORUSER_REM_ZPERFWORK)=0; __property TFIBWideStringField * PerformedWorkNAMENOM = {read = get_PerformedWorkNAMENOM , write = set_PerformedWorkNAMENOM}; virtual TFIBWideStringField * get_PerformedWorkNAMENOM(void)=0; virtual void set_PerformedWorkNAMENOM(TFIBWideStringField * PerformedWorkNAMENOM)=0; __property TFIBWideStringField * PerformedWorkNAMEED = {read = get_PerformedWorkNAMEED , write = set_PerformedWorkNAMEED}; virtual TFIBWideStringField * get_PerformedWorkNAMEED(void)=0; virtual void set_PerformedWorkNAMEED(TFIBWideStringField * PerformedWorkNAMEED)=0; __property TFIBLargeIntField * PerformedWorkIDUSER_REM_ZPERFWORK = {read = get_PerformedWorkIDUSER_REM_ZPERFWORK , write = set_PerformedWorkIDUSER_REM_ZPERFWORK}; virtual TFIBLargeIntField * get_PerformedWorkIDUSER_REM_ZPERFWORK(void)=0; virtual void set_PerformedWorkIDUSER_REM_ZPERFWORK(TFIBLargeIntField * PerformedWorkIDUSER_REM_ZPERFWORK)=0; __property TFIBWideStringField * PerformedWorkNAME_USER = {read = get_PerformedWorkNAME_USER , write = set_PerformedWorkNAME_USER}; virtual TFIBWideStringField * get_PerformedWorkNAME_USER(void)=0; virtual void set_PerformedWorkNAME_USER(TFIBWideStringField * PerformedWorkNAME_USER)=0; __property TFIBLargeIntField * GurZIDMEXANIK_REM_Z = {read = get_GurZIDMEXANIK_REM_Z , write = set_GurZIDMEXANIK_REM_Z}; virtual TFIBLargeIntField * get_GurZIDMEXANIK_REM_Z(void)=0; virtual void set_GurZIDMEXANIK_REM_Z(TFIBLargeIntField * GurZIDMEXANIK_REM_Z)=0; __property TFIBLargeIntField * GurZIDBRAND_REM_Z = {read = get_GurZIDBRAND_REM_Z , write = set_GurZIDBRAND_REM_Z}; virtual TFIBLargeIntField * get_GurZIDBRAND_REM_Z(void)=0; virtual void set_GurZIDBRAND_REM_Z(TFIBLargeIntField * GurZIDBRAND_REM_Z)=0; __property TFIBLargeIntField * GurZIDACTCAT_REM_Z = {read = get_GurZIDACTCAT_REM_Z , write = set_GurZIDACTCAT_REM_Z}; virtual TFIBLargeIntField * get_GurZIDACTCAT_REM_Z(void)=0; virtual void set_GurZIDACTCAT_REM_Z(TFIBLargeIntField * GurZIDACTCAT_REM_Z)=0; __property TFIBWideStringField * GurZGUID_REM_Z = {read = get_GurZGUID_REM_Z , write = set_GurZGUID_REM_Z}; virtual TFIBWideStringField * get_GurZGUID_REM_Z(void)=0; virtual void set_GurZGUID_REM_Z(TFIBWideStringField * GurZGUID_REM_Z)=0; __property TFIBLargeIntField * GurZIDZOSN_REM_Z = {read = get_GurZIDZOSN_REM_Z , write = set_GurZIDZOSN_REM_Z}; virtual TFIBLargeIntField * get_GurZIDZOSN_REM_Z(void)=0; virtual void set_GurZIDZOSN_REM_Z(TFIBLargeIntField * GurZIDZOSN_REM_Z)=0; __property TFIBSmallIntField * GurZFL_POVTOR_REM_Z = {read = get_GurZFL_POVTOR_REM_Z , write = set_GurZFL_POVTOR_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_POVTOR_REM_Z(void)=0; virtual void set_GurZFL_POVTOR_REM_Z(TFIBSmallIntField * GurZFL_POVTOR_REM_Z)=0; __property TFIBWideStringField * GurZDILER_NUMZ_REM_Z = {read = get_GurZDILER_NUMZ_REM_Z , write = set_GurZDILER_NUMZ_REM_Z}; virtual TFIBWideStringField * get_GurZDILER_NUMZ_REM_Z(void)=0; virtual void set_GurZDILER_NUMZ_REM_Z(TFIBWideStringField * GurZDILER_NUMZ_REM_Z)=0; __property TFIBDateTimeField * GurZDILER_POSZ_REM_Z = {read = get_GurZDILER_POSZ_REM_Z , write = set_GurZDILER_POSZ_REM_Z}; virtual TFIBDateTimeField * get_GurZDILER_POSZ_REM_Z(void)=0; virtual void set_GurZDILER_POSZ_REM_Z(TFIBDateTimeField * GurZDILER_POSZ_REM_Z)=0; __property TFIBWideStringField * GurZDILER_GUIDZ_REM_Z = {read = get_GurZDILER_GUIDZ_REM_Z , write = set_GurZDILER_GUIDZ_REM_Z}; virtual TFIBWideStringField * get_GurZDILER_GUIDZ_REM_Z(void)=0; virtual void set_GurZDILER_GUIDZ_REM_Z(TFIBWideStringField * GurZDILER_GUIDZ_REM_Z)=0; __property TFIBWideStringField * GurZSC_NUMZ_REM_Z = {read = get_GurZSC_NUMZ_REM_Z , write = set_GurZSC_NUMZ_REM_Z}; virtual TFIBWideStringField * get_GurZSC_NUMZ_REM_Z(void)=0; virtual void set_GurZSC_NUMZ_REM_Z(TFIBWideStringField * GurZSC_NUMZ_REM_Z)=0; __property TFIBDateTimeField * GurZSC_POSZ_REM_Z = {read = get_GurZSC_POSZ_REM_Z , write = set_GurZSC_POSZ_REM_Z}; virtual TFIBDateTimeField * get_GurZSC_POSZ_REM_Z(void)=0; virtual void set_GurZSC_POSZ_REM_Z(TFIBDateTimeField * GurZSC_POSZ_REM_Z)=0; __property TFIBWideStringField * GurZSC_GUIDZ_REM_Z = {read = get_GurZSC_GUIDZ_REM_Z , write = set_GurZSC_GUIDZ_REM_Z}; virtual TFIBWideStringField * get_GurZSC_GUIDZ_REM_Z(void)=0; virtual void set_GurZSC_GUIDZ_REM_Z(TFIBWideStringField * GurZSC_GUIDZ_REM_Z)=0; __property TFIBSmallIntField * GurZFL_ADDREPORT_REM_Z = {read = get_GurZFL_ADDREPORT_REM_Z , write = set_GurZFL_ADDREPORT_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_ADDREPORT_REM_Z(void)=0; virtual void set_GurZFL_ADDREPORT_REM_Z(TFIBSmallIntField * GurZFL_ADDREPORT_REM_Z)=0; __property TFIBWideStringField * GurZSERNUM_STR_REM_Z = {read = get_GurZSERNUM_STR_REM_Z , write = set_GurZSERNUM_STR_REM_Z}; virtual TFIBWideStringField * get_GurZSERNUM_STR_REM_Z(void)=0; virtual void set_GurZSERNUM_STR_REM_Z(TFIBWideStringField * GurZSERNUM_STR_REM_Z)=0; __property TFIBWideStringField * GurZNAME_MEXANIK = {read = get_GurZNAME_MEXANIK , write = set_GurZNAME_MEXANIK}; virtual TFIBWideStringField * get_GurZNAME_MEXANIK(void)=0; virtual void set_GurZNAME_MEXANIK(TFIBWideStringField * GurZNAME_MEXANIK)=0; __property TFIBWideStringField * GurZNAME_SBRAND = {read = get_GurZNAME_SBRAND , write = set_GurZNAME_SBRAND}; virtual TFIBWideStringField * get_GurZNAME_SBRAND(void)=0; virtual void set_GurZNAME_SBRAND(TFIBWideStringField * GurZNAME_SBRAND)=0; __property TFIBWideStringField * GurZNAME_REM_SACTCATEGORY = {read = get_GurZNAME_REM_SACTCATEGORY , write = set_GurZNAME_REM_SACTCATEGORY}; virtual TFIBWideStringField * get_GurZNAME_REM_SACTCATEGORY(void)=0; virtual void set_GurZNAME_REM_SACTCATEGORY(TFIBWideStringField * GurZNAME_REM_SACTCATEGORY)=0; __property TFIBLargeIntField * GurZIDHW_REM_Z = {read = get_GurZIDHW_REM_Z , write = set_GurZIDHW_REM_Z}; virtual TFIBLargeIntField * get_GurZIDHW_REM_Z(void)=0; virtual void set_GurZIDHW_REM_Z(TFIBLargeIntField * GurZIDHW_REM_Z)=0; __property TFIBLargeIntField * GurZIDKKT_REM_Z = {read = get_GurZIDKKT_REM_Z , write = set_GurZIDKKT_REM_Z}; virtual TFIBLargeIntField * get_GurZIDKKT_REM_Z(void)=0; virtual void set_GurZIDKKT_REM_Z(TFIBLargeIntField * GurZIDKKT_REM_Z)=0; __property TFIBWideStringField * GurZNAME_REM_SHARDWARE = {read = get_GurZNAME_REM_SHARDWARE , write = set_GurZNAME_REM_SHARDWARE}; virtual TFIBWideStringField * get_GurZNAME_REM_SHARDWARE(void)=0; virtual void set_GurZNAME_REM_SHARDWARE(TFIBWideStringField * GurZNAME_REM_SHARDWARE)=0; __property TFIBWideStringField * GurZSERNUM_REM_SHARDWARE = {read = get_GurZSERNUM_REM_SHARDWARE , write = set_GurZSERNUM_REM_SHARDWARE}; virtual TFIBWideStringField * get_GurZSERNUM_REM_SHARDWARE(void)=0; virtual void set_GurZSERNUM_REM_SHARDWARE(TFIBWideStringField * GurZSERNUM_REM_SHARDWARE)=0; __property TFIBWideStringField * GurZSERNUM2_REM_SHARDWARE = {read = get_GurZSERNUM2_REM_SHARDWARE , write = set_GurZSERNUM2_REM_SHARDWARE}; virtual TFIBWideStringField * get_GurZSERNUM2_REM_SHARDWARE(void)=0; virtual void set_GurZSERNUM2_REM_SHARDWARE(TFIBWideStringField * GurZSERNUM2_REM_SHARDWARE)=0; __property TFIBWideStringField * GurZNAME_REM_SKKT = {read = get_GurZNAME_REM_SKKT , write = set_GurZNAME_REM_SKKT}; virtual TFIBWideStringField * get_GurZNAME_REM_SKKT(void)=0; virtual void set_GurZNAME_REM_SKKT(TFIBWideStringField * GurZNAME_REM_SKKT)=0; __property TFIBWideStringField * GurZSERNUM_REM_SKKT = {read = get_GurZSERNUM_REM_SKKT , write = set_GurZSERNUM_REM_SKKT}; virtual TFIBWideStringField * get_GurZSERNUM_REM_SKKT(void)=0; virtual void set_GurZSERNUM_REM_SKKT(TFIBWideStringField * GurZSERNUM_REM_SKKT)=0; __property TFIBIntegerField * GurZFL_KLIENT_UVEDOML_REM_Z = {read = get_GurZFL_KLIENT_UVEDOML_REM_Z , write = set_GurZFL_KLIENT_UVEDOML_REM_Z}; virtual TFIBIntegerField * get_GurZFL_KLIENT_UVEDOML_REM_Z(void)=0; virtual void set_GurZFL_KLIENT_UVEDOML_REM_Z(TFIBIntegerField * GurZFL_KLIENT_UVEDOML_REM_Z)=0; __property TFIBIntegerField * GurZFL_TREB_KONS_KL_REM_Z = {read = get_GurZFL_TREB_KONS_KL_REM_Z , write = set_GurZFL_TREB_KONS_KL_REM_Z}; virtual TFIBIntegerField * get_GurZFL_TREB_KONS_KL_REM_Z(void)=0; virtual void set_GurZFL_TREB_KONS_KL_REM_Z(TFIBIntegerField * GurZFL_TREB_KONS_KL_REM_Z)=0; __property TFIBIntegerField * GurZFL_KL_OTV_NA_ZAPROS_REM_Z = {read = get_GurZFL_KL_OTV_NA_ZAPROS_REM_Z , write = set_GurZFL_KL_OTV_NA_ZAPROS_REM_Z}; virtual TFIBIntegerField * get_GurZFL_KL_OTV_NA_ZAPROS_REM_Z(void)=0; virtual void set_GurZFL_KL_OTV_NA_ZAPROS_REM_Z(TFIBIntegerField * GurZFL_KL_OTV_NA_ZAPROS_REM_Z)=0; __property TFIBWideStringField * GurZPREFIKS_NUM_REM_Z = {read = get_GurZPREFIKS_NUM_REM_Z , write = set_GurZPREFIKS_NUM_REM_Z}; virtual TFIBWideStringField * get_GurZPREFIKS_NUM_REM_Z(void)=0; virtual void set_GurZPREFIKS_NUM_REM_Z(TFIBWideStringField * GurZPREFIKS_NUM_REM_Z)=0; __property TFIBWideStringField * GurZNUM_GARDOC_REM_Z = {read = get_GurZNUM_GARDOC_REM_Z , write = set_GurZNUM_GARDOC_REM_Z}; virtual TFIBWideStringField * get_GurZNUM_GARDOC_REM_Z(void)=0; virtual void set_GurZNUM_GARDOC_REM_Z(TFIBWideStringField * GurZNUM_GARDOC_REM_Z)=0; __property TFIBIntegerField * GurZFL_FICTIV_REM_Z = {read = get_GurZFL_FICTIV_REM_Z , write = set_GurZFL_FICTIV_REM_Z}; virtual TFIBIntegerField * get_GurZFL_FICTIV_REM_Z(void)=0; virtual void set_GurZFL_FICTIV_REM_Z(TFIBIntegerField * GurZFL_FICTIV_REM_Z)=0; __property TFIBSmallIntField * GurZFL_NE_OTCH_REM_Z = {read = get_GurZFL_NE_OTCH_REM_Z , write = set_GurZFL_NE_OTCH_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_NE_OTCH_REM_Z(void)=0; virtual void set_GurZFL_NE_OTCH_REM_Z(TFIBSmallIntField * GurZFL_NE_OTCH_REM_Z)=0; __property TFIBSmallIntField * GurZFL_NADO_OTCH_REM_Z = {read = get_GurZFL_NADO_OTCH_REM_Z , write = set_GurZFL_NADO_OTCH_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_NADO_OTCH_REM_Z(void)=0; virtual void set_GurZFL_NADO_OTCH_REM_Z(TFIBSmallIntField * GurZFL_NADO_OTCH_REM_Z)=0; __property TFIBSmallIntField * GurZFL_ISM_GARDOC_REM_Z = {read = get_GurZFL_ISM_GARDOC_REM_Z , write = set_GurZFL_ISM_GARDOC_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_ISM_GARDOC_REM_Z(void)=0; virtual void set_GurZFL_ISM_GARDOC_REM_Z(TFIBSmallIntField * GurZFL_ISM_GARDOC_REM_Z)=0; __property TFIBSmallIntField * GurZFL_ISM_SERNUM_REM_Z = {read = get_GurZFL_ISM_SERNUM_REM_Z , write = set_GurZFL_ISM_SERNUM_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_ISM_SERNUM_REM_Z(void)=0; virtual void set_GurZFL_ISM_SERNUM_REM_Z(TFIBSmallIntField * GurZFL_ISM_SERNUM_REM_Z)=0; __property TFIBSmallIntField * GurZFL_ISM_SERNUM2_REM_Z = {read = get_GurZFL_ISM_SERNUM2_REM_Z , write = set_GurZFL_ISM_SERNUM2_REM_Z}; virtual TFIBSmallIntField * get_GurZFL_ISM_SERNUM2_REM_Z(void)=0; virtual void set_GurZFL_ISM_SERNUM2_REM_Z(TFIBSmallIntField * GurZFL_ISM_SERNUM2_REM_Z)=0; __property TFIBWideStringField * GurZNUM_GARDOC_NEW_REM_Z = {read = get_GurZNUM_GARDOC_NEW_REM_Z , write = set_GurZNUM_GARDOC_NEW_REM_Z}; virtual TFIBWideStringField * get_GurZNUM_GARDOC_NEW_REM_Z(void)=0; virtual void set_GurZNUM_GARDOC_NEW_REM_Z(TFIBWideStringField * GurZNUM_GARDOC_NEW_REM_Z)=0; __property TFIBWideStringField * GurZSERNUM_NEW_REM_Z = {read = get_GurZSERNUM_NEW_REM_Z , write = set_GurZSERNUM_NEW_REM_Z}; virtual TFIBWideStringField * get_GurZSERNUM_NEW_REM_Z(void)=0; virtual void set_GurZSERNUM_NEW_REM_Z(TFIBWideStringField * GurZSERNUM_NEW_REM_Z)=0; __property TFIBWideStringField * GurZSERNUM2_NEW_REM_Z = {read = get_GurZSERNUM2_NEW_REM_Z , write = set_GurZSERNUM2_NEW_REM_Z}; virtual TFIBWideStringField * get_GurZSERNUM2_NEW_REM_Z(void)=0; virtual void set_GurZSERNUM2_NEW_REM_Z(TFIBWideStringField * GurZSERNUM2_NEW_REM_Z)=0; __property TFIBSmallIntField * GurZGOTOVO_K_VIDACHE_REM_Z = {read = get_GurZGOTOVO_K_VIDACHE_REM_Z , write = set_GurZGOTOVO_K_VIDACHE_REM_Z}; virtual TFIBSmallIntField * get_GurZGOTOVO_K_VIDACHE_REM_Z(void)=0; virtual void set_GurZGOTOVO_K_VIDACHE_REM_Z(TFIBSmallIntField * GurZGOTOVO_K_VIDACHE_REM_Z)=0; __property TDataSource * DataSourceGurZ_1 = {read = get_DataSourceGurZ_1 , write = set_DataSourceGurZ_1}; virtual TDataSource * get_DataSourceGurZ_1(void)=0; virtual void set_DataSourceGurZ_1(TDataSource * DataSourceGurZ_1)=0; __property TpFIBDataSet * GurZ_1 = {read = get_GurZ_1 , write = set_GurZ_1}; virtual TpFIBDataSet * get_GurZ_1(void)=0; virtual void set_GurZ_1(TpFIBDataSet * GurZ_1)=0; __property TFIBLargeIntField * GurZ_1ID_REM_Z_1 = {read = get_GurZ_1ID_REM_Z_1 , write = set_GurZ_1ID_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1ID_REM_Z_1(void)=0; virtual void set_GurZ_1ID_REM_Z_1(TFIBLargeIntField * GurZ_1ID_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDBASE_REM_Z_1 = {read = get_GurZ_1IDBASE_REM_Z_1 , write = set_GurZ_1IDBASE_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDBASE_REM_Z_1(void)=0; virtual void set_GurZ_1IDBASE_REM_Z_1(TFIBLargeIntField * GurZ_1IDBASE_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDZ_REM_Z_1 = {read = get_GurZ_1IDZ_REM_Z_1 , write = set_GurZ_1IDZ_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDZ_REM_Z_1(void)=0; virtual void set_GurZ_1IDZ_REM_Z_1(TFIBLargeIntField * GurZ_1IDZ_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDPRMODEL_REM_Z_1 = {read = get_GurZ_1IDPRMODEL_REM_Z_1 , write = set_GurZ_1IDPRMODEL_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDPRMODEL_REM_Z_1(void)=0; virtual void set_GurZ_1IDPRMODEL_REM_Z_1(TFIBLargeIntField * GurZ_1IDPRMODEL_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDPRODUCER_REM_Z_1 = {read = get_GurZ_1IDPRODUCER_REM_Z_1 , write = set_GurZ_1IDPRODUCER_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDPRODUCER_REM_Z_1(void)=0; virtual void set_GurZ_1IDPRODUCER_REM_Z_1(TFIBLargeIntField * GurZ_1IDPRODUCER_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1FL_VKL_REM_Z_1 = {read = get_GurZ_1FL_VKL_REM_Z_1 , write = set_GurZ_1FL_VKL_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_VKL_REM_Z_1(void)=0; virtual void set_GurZ_1FL_VKL_REM_Z_1(TFIBIntegerField * GurZ_1FL_VKL_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1FL_ZIP_REM_Z_1 = {read = get_GurZ_1FL_ZIP_REM_Z_1 , write = set_GurZ_1FL_ZIP_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_ZIP_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ZIP_REM_Z_1(TFIBIntegerField * GurZ_1FL_ZIP_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1FL_DEFECT_DEMO_REM_Z_1 = {read = get_GurZ_1FL_DEFECT_DEMO_REM_Z_1 , write = set_GurZ_1FL_DEFECT_DEMO_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_DEFECT_DEMO_REM_Z_1(void)=0; virtual void set_GurZ_1FL_DEFECT_DEMO_REM_Z_1(TFIBIntegerField * GurZ_1FL_DEFECT_DEMO_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1FL_KL_PREDUPR_NO_GARANT_REM_Z_1 = {read = get_GurZ_1FL_KL_PREDUPR_NO_GARANT_REM_Z_1 , write = set_GurZ_1FL_KL_PREDUPR_NO_GARANT_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_KL_PREDUPR_NO_GARANT_REM_Z_1(void)=0; virtual void set_GurZ_1FL_KL_PREDUPR_NO_GARANT_REM_Z_1(TFIBIntegerField * GurZ_1FL_KL_PREDUPR_NO_GARANT_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDSELLER_REM_Z_1 = {read = get_GurZ_1IDSELLER_REM_Z_1 , write = set_GurZ_1IDSELLER_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDSELLER_REM_Z_1(void)=0; virtual void set_GurZ_1IDSELLER_REM_Z_1(TFIBLargeIntField * GurZ_1IDSELLER_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1KLIENT_EMAIL_REM_Z_1 = {read = get_GurZ_1KLIENT_EMAIL_REM_Z_1 , write = set_GurZ_1KLIENT_EMAIL_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1KLIENT_EMAIL_REM_Z_1(void)=0; virtual void set_GurZ_1KLIENT_EMAIL_REM_Z_1(TFIBWideStringField * GurZ_1KLIENT_EMAIL_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1KLIENT_DOP_INFO_REM_Z_1 = {read = get_GurZ_1KLIENT_DOP_INFO_REM_Z_1 , write = set_GurZ_1KLIENT_DOP_INFO_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1KLIENT_DOP_INFO_REM_Z_1(void)=0; virtual void set_GurZ_1KLIENT_DOP_INFO_REM_Z_1(TFIBWideStringField * GurZ_1KLIENT_DOP_INFO_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDADRKV_REM_Z_1 = {read = get_GurZ_1IDADRKV_REM_Z_1 , write = set_GurZ_1IDADRKV_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDADRKV_REM_Z_1(void)=0; virtual void set_GurZ_1IDADRKV_REM_Z_1(TFIBLargeIntField * GurZ_1IDADRKV_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1NAME_SPRODUCER = {read = get_GurZ_1NAME_SPRODUCER , write = set_GurZ_1NAME_SPRODUCER}; virtual TFIBWideStringField * get_GurZ_1NAME_SPRODUCER(void)=0; virtual void set_GurZ_1NAME_SPRODUCER(TFIBWideStringField * GurZ_1NAME_SPRODUCER)=0; __property TFIBWideStringField * GurZ_1NAME_REM_SPRMODEL = {read = get_GurZ_1NAME_REM_SPRMODEL , write = set_GurZ_1NAME_REM_SPRMODEL}; virtual TFIBWideStringField * get_GurZ_1NAME_REM_SPRMODEL(void)=0; virtual void set_GurZ_1NAME_REM_SPRMODEL(TFIBWideStringField * GurZ_1NAME_REM_SPRMODEL)=0; __property TFIBWideStringField * GurZ_1NAME_SSELLER = {read = get_GurZ_1NAME_SSELLER , write = set_GurZ_1NAME_SSELLER}; virtual TFIBWideStringField * get_GurZ_1NAME_SSELLER(void)=0; virtual void set_GurZ_1NAME_SSELLER(TFIBWideStringField * GurZ_1NAME_SSELLER)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_DOM = {read = get_GurZ_1NAME_SADR_DOM , write = set_GurZ_1NAME_SADR_DOM}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_DOM(void)=0; virtual void set_GurZ_1NAME_SADR_DOM(TFIBWideStringField * GurZ_1NAME_SADR_DOM)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_STREET = {read = get_GurZ_1NAME_SADR_STREET , write = set_GurZ_1NAME_SADR_STREET}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_STREET(void)=0; virtual void set_GurZ_1NAME_SADR_STREET(TFIBWideStringField * GurZ_1NAME_SADR_STREET)=0; __property TFIBWideStringField * GurZ_1POSTCODE_SADR_STREET = {read = get_GurZ_1POSTCODE_SADR_STREET , write = set_GurZ_1POSTCODE_SADR_STREET}; virtual TFIBWideStringField * get_GurZ_1POSTCODE_SADR_STREET(void)=0; virtual void set_GurZ_1POSTCODE_SADR_STREET(TFIBWideStringField * GurZ_1POSTCODE_SADR_STREET)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_NASPUNKT = {read = get_GurZ_1NAME_SADR_NASPUNKT , write = set_GurZ_1NAME_SADR_NASPUNKT}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_NASPUNKT(void)=0; virtual void set_GurZ_1NAME_SADR_NASPUNKT(TFIBWideStringField * GurZ_1NAME_SADR_NASPUNKT)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_REGION = {read = get_GurZ_1NAME_SADR_REGION , write = set_GurZ_1NAME_SADR_REGION}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_REGION(void)=0; virtual void set_GurZ_1NAME_SADR_REGION(TFIBWideStringField * GurZ_1NAME_SADR_REGION)=0; __property TFIBWideStringField * GurZ_1CODE_SADR_REGION = {read = get_GurZ_1CODE_SADR_REGION , write = set_GurZ_1CODE_SADR_REGION}; virtual TFIBWideStringField * get_GurZ_1CODE_SADR_REGION(void)=0; virtual void set_GurZ_1CODE_SADR_REGION(TFIBWideStringField * GurZ_1CODE_SADR_REGION)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_KV = {read = get_GurZ_1NAME_SADR_KV , write = set_GurZ_1NAME_SADR_KV}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_KV(void)=0; virtual void set_GurZ_1NAME_SADR_KV(TFIBWideStringField * GurZ_1NAME_SADR_KV)=0; __property TFIBIntegerField * GurZ_1FL_PLOMBA_SET_REM_Z_1 = {read = get_GurZ_1FL_PLOMBA_SET_REM_Z_1 , write = set_GurZ_1FL_PLOMBA_SET_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_PLOMBA_SET_REM_Z_1(void)=0; virtual void set_GurZ_1FL_PLOMBA_SET_REM_Z_1(TFIBIntegerField * GurZ_1FL_PLOMBA_SET_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1TEXT_PLOMBA_REM_Z_1 = {read = get_GurZ_1TEXT_PLOMBA_REM_Z_1 , write = set_GurZ_1TEXT_PLOMBA_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1TEXT_PLOMBA_REM_Z_1(void)=0; virtual void set_GurZ_1TEXT_PLOMBA_REM_Z_1(TFIBWideStringField * GurZ_1TEXT_PLOMBA_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1FL_PROBLEM_DEVICE_REM_Z_1 = {read = get_GurZ_1FL_PROBLEM_DEVICE_REM_Z_1 , write = set_GurZ_1FL_PROBLEM_DEVICE_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_PROBLEM_DEVICE_REM_Z_1(void)=0; virtual void set_GurZ_1FL_PROBLEM_DEVICE_REM_Z_1(TFIBIntegerField * GurZ_1FL_PROBLEM_DEVICE_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1FL_PROBLEM_KLIENT_REM_Z_1 = {read = get_GurZ_1FL_PROBLEM_KLIENT_REM_Z_1 , write = set_GurZ_1FL_PROBLEM_KLIENT_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_PROBLEM_KLIENT_REM_Z_1(void)=0; virtual void set_GurZ_1FL_PROBLEM_KLIENT_REM_Z_1(TFIBIntegerField * GurZ_1FL_PROBLEM_KLIENT_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1NEISPR_ENG_REM_Z_1 = {read = get_GurZ_1NEISPR_ENG_REM_Z_1 , write = set_GurZ_1NEISPR_ENG_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1NEISPR_ENG_REM_Z_1(void)=0; virtual void set_GurZ_1NEISPR_ENG_REM_Z_1(TFIBWideStringField * GurZ_1NEISPR_ENG_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1DEFECT_ENG_REM_Z_1 = {read = get_GurZ_1DEFECT_ENG_REM_Z_1 , write = set_GurZ_1DEFECT_ENG_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1DEFECT_ENG_REM_Z_1(void)=0; virtual void set_GurZ_1DEFECT_ENG_REM_Z_1(TFIBWideStringField * GurZ_1DEFECT_ENG_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SOLUTION_ENG_REM_Z_1 = {read = get_GurZ_1SOLUTION_ENG_REM_Z_1 , write = set_GurZ_1SOLUTION_ENG_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SOLUTION_ENG_REM_Z_1(void)=0; virtual void set_GurZ_1SOLUTION_ENG_REM_Z_1(TFIBWideStringField * GurZ_1SOLUTION_ENG_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1STR_CODE_VIGR_REM_Z_1 = {read = get_GurZ_1STR_CODE_VIGR_REM_Z_1 , write = set_GurZ_1STR_CODE_VIGR_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1STR_CODE_VIGR_REM_Z_1(void)=0; virtual void set_GurZ_1STR_CODE_VIGR_REM_Z_1(TFIBWideStringField * GurZ_1STR_CODE_VIGR_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_STROEN = {read = get_GurZ_1NAME_SADR_STROEN , write = set_GurZ_1NAME_SADR_STROEN}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_STROEN(void)=0; virtual void set_GurZ_1NAME_SADR_STROEN(TFIBWideStringField * GurZ_1NAME_SADR_STROEN)=0; __property TFIBWideStringField * GurZ_1NAME_SADR_RAYON = {read = get_GurZ_1NAME_SADR_RAYON , write = set_GurZ_1NAME_SADR_RAYON}; virtual TFIBWideStringField * get_GurZ_1NAME_SADR_RAYON(void)=0; virtual void set_GurZ_1NAME_SADR_RAYON(TFIBWideStringField * GurZ_1NAME_SADR_RAYON)=0; __property TFIBIntegerField * GurZ_1FL_ONLY_DAGNOSTIC_REM_Z_1 = {read = get_GurZ_1FL_ONLY_DAGNOSTIC_REM_Z_1 , write = set_GurZ_1FL_ONLY_DAGNOSTIC_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1FL_ONLY_DAGNOSTIC_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ONLY_DAGNOSTIC_REM_Z_1(TFIBIntegerField * GurZ_1FL_ONLY_DAGNOSTIC_REM_Z_1)=0; __property TFIBWideStringField * GurZNeisprNAME_ENG_REM_SNEISPR = {read = get_GurZNeisprNAME_ENG_REM_SNEISPR , write = set_GurZNeisprNAME_ENG_REM_SNEISPR}; virtual TFIBWideStringField * get_GurZNeisprNAME_ENG_REM_SNEISPR(void)=0; virtual void set_GurZNeisprNAME_ENG_REM_SNEISPR(TFIBWideStringField * GurZNeisprNAME_ENG_REM_SNEISPR)=0; __property TFIBWideStringField * GurZNeisprNAME_REM_SGRPNEISPR = {read = get_GurZNeisprNAME_REM_SGRPNEISPR , write = set_GurZNeisprNAME_REM_SGRPNEISPR}; virtual TFIBWideStringField * get_GurZNeisprNAME_REM_SGRPNEISPR(void)=0; virtual void set_GurZNeisprNAME_REM_SGRPNEISPR(TFIBWideStringField * GurZNeisprNAME_REM_SGRPNEISPR)=0; __property TFIBWideStringField * GurZNeisprNAME_ENG_REM_SGRPNEISPR = {read = get_GurZNeisprNAME_ENG_REM_SGRPNEISPR , write = set_GurZNeisprNAME_ENG_REM_SGRPNEISPR}; virtual TFIBWideStringField * get_GurZNeisprNAME_ENG_REM_SGRPNEISPR(void)=0; virtual void set_GurZNeisprNAME_ENG_REM_SGRPNEISPR(TFIBWideStringField * GurZNeisprNAME_ENG_REM_SGRPNEISPR)=0; __property TFIBWideStringField * GurZ_1FAMILIYA_REM_Z_1 = {read = get_GurZ_1FAMILIYA_REM_Z_1 , write = set_GurZ_1FAMILIYA_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1FAMILIYA_REM_Z_1(void)=0; virtual void set_GurZ_1FAMILIYA_REM_Z_1(TFIBWideStringField * GurZ_1FAMILIYA_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1IMYA_REM_Z_1 = {read = get_GurZ_1IMYA_REM_Z_1 , write = set_GurZ_1IMYA_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1IMYA_REM_Z_1(void)=0; virtual void set_GurZ_1IMYA_REM_Z_1(TFIBWideStringField * GurZ_1IMYA_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1OTCHESTVO_REM_Z_1 = {read = get_GurZ_1OTCHESTVO_REM_Z_1 , write = set_GurZ_1OTCHESTVO_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1OTCHESTVO_REM_Z_1(void)=0; virtual void set_GurZ_1OTCHESTVO_REM_Z_1(TFIBWideStringField * GurZ_1OTCHESTVO_REM_Z_1)=0; __property TFIBDateField * GurZ_1DATE_VIPUSK_REM_Z_1 = {read = get_GurZ_1DATE_VIPUSK_REM_Z_1 , write = set_GurZ_1DATE_VIPUSK_REM_Z_1}; virtual TFIBDateField * get_GurZ_1DATE_VIPUSK_REM_Z_1(void)=0; virtual void set_GurZ_1DATE_VIPUSK_REM_Z_1(TFIBDateField * GurZ_1DATE_VIPUSK_REM_Z_1)=0; __property TFIBDateField * GurZ_1DATE_PRODAGI_REM_Z_1 = {read = get_GurZ_1DATE_PRODAGI_REM_Z_1 , write = set_GurZ_1DATE_PRODAGI_REM_Z_1}; virtual TFIBDateField * get_GurZ_1DATE_PRODAGI_REM_Z_1(void)=0; virtual void set_GurZ_1DATE_PRODAGI_REM_Z_1(TFIBDateField * GurZ_1DATE_PRODAGI_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1PODO_REM_Z_1 = {read = get_GurZ_1PODO_REM_Z_1 , write = set_GurZ_1PODO_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1PODO_REM_Z_1(void)=0; virtual void set_GurZ_1PODO_REM_Z_1(TFIBWideStringField * GurZ_1PODO_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1POPOSLE_REM_Z_1 = {read = get_GurZ_1POPOSLE_REM_Z_1 , write = set_GurZ_1POPOSLE_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1POPOSLE_REM_Z_1(void)=0; virtual void set_GurZ_1POPOSLE_REM_Z_1(TFIBWideStringField * GurZ_1POPOSLE_REM_Z_1)=0; __property TFIBLargeIntField * GurZ_1IDPRNEISPR_REM_Z_1 = {read = get_GurZ_1IDPRNEISPR_REM_Z_1 , write = set_GurZ_1IDPRNEISPR_REM_Z_1}; virtual TFIBLargeIntField * get_GurZ_1IDPRNEISPR_REM_Z_1(void)=0; virtual void set_GurZ_1IDPRNEISPR_REM_Z_1(TFIBLargeIntField * GurZ_1IDPRNEISPR_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1PARTNUM_REM_Z_1 = {read = get_GurZ_1PARTNUM_REM_Z_1 , write = set_GurZ_1PARTNUM_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1PARTNUM_REM_Z_1(void)=0; virtual void set_GurZ_1PARTNUM_REM_Z_1(TFIBWideStringField * GurZ_1PARTNUM_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1REFERENCE_REM_Z_1 = {read = get_GurZ_1REFERENCE_REM_Z_1 , write = set_GurZ_1REFERENCE_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1REFERENCE_REM_Z_1(void)=0; virtual void set_GurZ_1REFERENCE_REM_Z_1(TFIBWideStringField * GurZ_1REFERENCE_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SWCODE_REM_Z_1 = {read = get_GurZ_1SWCODE_REM_Z_1 , write = set_GurZ_1SWCODE_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SWCODE_REM_Z_1(void)=0; virtual void set_GurZ_1SWCODE_REM_Z_1(TFIBWideStringField * GurZ_1SWCODE_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1HWCODE_REM_Z_1 = {read = get_GurZ_1HWCODE_REM_Z_1 , write = set_GurZ_1HWCODE_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1HWCODE_REM_Z_1(void)=0; virtual void set_GurZ_1HWCODE_REM_Z_1(TFIBWideStringField * GurZ_1HWCODE_REM_Z_1)=0; __property TFIBIntegerField * GurZ_1KEMSDANO_REM_Z_1 = {read = get_GurZ_1KEMSDANO_REM_Z_1 , write = set_GurZ_1KEMSDANO_REM_Z_1}; virtual TFIBIntegerField * get_GurZ_1KEMSDANO_REM_Z_1(void)=0; virtual void set_GurZ_1KEMSDANO_REM_Z_1(TFIBIntegerField * GurZ_1KEMSDANO_REM_Z_1)=0; __property TFIBDateTimeField * GurZ_1POS_ZAPROSA_NA_AKT_REM_Z_1 = {read = get_GurZ_1POS_ZAPROSA_NA_AKT_REM_Z_1 , write = set_GurZ_1POS_ZAPROSA_NA_AKT_REM_Z_1}; virtual TFIBDateTimeField * get_GurZ_1POS_ZAPROSA_NA_AKT_REM_Z_1(void)=0; virtual void set_GurZ_1POS_ZAPROSA_NA_AKT_REM_Z_1(TFIBDateTimeField * GurZ_1POS_ZAPROSA_NA_AKT_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SERNUM3_REM_Z_1 = {read = get_GurZ_1SERNUM3_REM_Z_1 , write = set_GurZ_1SERNUM3_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SERNUM3_REM_Z_1(void)=0; virtual void set_GurZ_1SERNUM3_REM_Z_1(TFIBWideStringField * GurZ_1SERNUM3_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SERNUM4_REM_Z_1 = {read = get_GurZ_1SERNUM4_REM_Z_1 , write = set_GurZ_1SERNUM4_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SERNUM4_REM_Z_1(void)=0; virtual void set_GurZ_1SERNUM4_REM_Z_1(TFIBWideStringField * GurZ_1SERNUM4_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1NUMBAT_REM_Z_1 = {read = get_GurZ_1NUMBAT_REM_Z_1 , write = set_GurZ_1NUMBAT_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1NUMBAT_REM_Z_1(void)=0; virtual void set_GurZ_1NUMBAT_REM_Z_1(TFIBWideStringField * GurZ_1NUMBAT_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1NAME_REM_SPRNEISPR = {read = get_GurZ_1NAME_REM_SPRNEISPR , write = set_GurZ_1NAME_REM_SPRNEISPR}; virtual TFIBWideStringField * get_GurZ_1NAME_REM_SPRNEISPR(void)=0; virtual void set_GurZ_1NAME_REM_SPRNEISPR(TFIBWideStringField * GurZ_1NAME_REM_SPRNEISPR)=0; __property TFIBWideStringField * GurZ_1NAME_ENG_REM_SPRNEISPR = {read = get_GurZ_1NAME_ENG_REM_SPRNEISPR , write = set_GurZ_1NAME_ENG_REM_SPRNEISPR}; virtual TFIBWideStringField * get_GurZ_1NAME_ENG_REM_SPRNEISPR(void)=0; virtual void set_GurZ_1NAME_ENG_REM_SPRNEISPR(TFIBWideStringField * GurZ_1NAME_ENG_REM_SPRNEISPR)=0; __property TFIBWideStringField * GurZ_1CODE_REM_SPRNEISPR = {read = get_GurZ_1CODE_REM_SPRNEISPR , write = set_GurZ_1CODE_REM_SPRNEISPR}; virtual TFIBWideStringField * get_GurZ_1CODE_REM_SPRNEISPR(void)=0; virtual void set_GurZ_1CODE_REM_SPRNEISPR(TFIBWideStringField * GurZ_1CODE_REM_SPRNEISPR)=0; __property TFIBWideStringField * GurZ_1NAME_REM_SPRNEISPR_GRP = {read = get_GurZ_1NAME_REM_SPRNEISPR_GRP , write = set_GurZ_1NAME_REM_SPRNEISPR_GRP}; virtual TFIBWideStringField * get_GurZ_1NAME_REM_SPRNEISPR_GRP(void)=0; virtual void set_GurZ_1NAME_REM_SPRNEISPR_GRP(TFIBWideStringField * GurZ_1NAME_REM_SPRNEISPR_GRP)=0; __property TFIBWideStringField * GurZ_1NAME_ENG_REM_SPRNEISPR_GRP = {read = get_GurZ_1NAME_ENG_REM_SPRNEISPR_GRP , write = set_GurZ_1NAME_ENG_REM_SPRNEISPR_GRP}; virtual TFIBWideStringField * get_GurZ_1NAME_ENG_REM_SPRNEISPR_GRP(void)=0; virtual void set_GurZ_1NAME_ENG_REM_SPRNEISPR_GRP(TFIBWideStringField * GurZ_1NAME_ENG_REM_SPRNEISPR_GRP)=0; __property TFIBSmallIntField * GurZ_1FL_ISM_SERNUM3_REM_Z_1 = {read = get_GurZ_1FL_ISM_SERNUM3_REM_Z_1 , write = set_GurZ_1FL_ISM_SERNUM3_REM_Z_1}; virtual TFIBSmallIntField * get_GurZ_1FL_ISM_SERNUM3_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ISM_SERNUM3_REM_Z_1(TFIBSmallIntField * GurZ_1FL_ISM_SERNUM3_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SERNUM3_NEW_REM_Z_1 = {read = get_GurZ_1SERNUM3_NEW_REM_Z_1 , write = set_GurZ_1SERNUM3_NEW_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SERNUM3_NEW_REM_Z_1(void)=0; virtual void set_GurZ_1SERNUM3_NEW_REM_Z_1(TFIBWideStringField * GurZ_1SERNUM3_NEW_REM_Z_1)=0; __property TFIBSmallIntField * GurZ_1FL_ISM_SERNUM4_REM_Z_1 = {read = get_GurZ_1FL_ISM_SERNUM4_REM_Z_1 , write = set_GurZ_1FL_ISM_SERNUM4_REM_Z_1}; virtual TFIBSmallIntField * get_GurZ_1FL_ISM_SERNUM4_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ISM_SERNUM4_REM_Z_1(TFIBSmallIntField * GurZ_1FL_ISM_SERNUM4_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SERNUM4_NEW_REM_Z_1 = {read = get_GurZ_1SERNUM4_NEW_REM_Z_1 , write = set_GurZ_1SERNUM4_NEW_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SERNUM4_NEW_REM_Z_1(void)=0; virtual void set_GurZ_1SERNUM4_NEW_REM_Z_1(TFIBWideStringField * GurZ_1SERNUM4_NEW_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1FL_ISM_REFERENCE_REM_Z_1 = {read = get_GurZ_1FL_ISM_REFERENCE_REM_Z_1 , write = set_GurZ_1FL_ISM_REFERENCE_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1FL_ISM_REFERENCE_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ISM_REFERENCE_REM_Z_1(TFIBWideStringField * GurZ_1FL_ISM_REFERENCE_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1REFERENCE_NEW_REM_Z_1 = {read = get_GurZ_1REFERENCE_NEW_REM_Z_1 , write = set_GurZ_1REFERENCE_NEW_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1REFERENCE_NEW_REM_Z_1(void)=0; virtual void set_GurZ_1REFERENCE_NEW_REM_Z_1(TFIBWideStringField * GurZ_1REFERENCE_NEW_REM_Z_1)=0; __property TFIBSmallIntField * GurZ_1FL_ISM_HWCODE_REM_Z_1 = {read = get_GurZ_1FL_ISM_HWCODE_REM_Z_1 , write = set_GurZ_1FL_ISM_HWCODE_REM_Z_1}; virtual TFIBSmallIntField * get_GurZ_1FL_ISM_HWCODE_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ISM_HWCODE_REM_Z_1(TFIBSmallIntField * GurZ_1FL_ISM_HWCODE_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1HWCODE_NEW_REM_Z_1 = {read = get_GurZ_1HWCODE_NEW_REM_Z_1 , write = set_GurZ_1HWCODE_NEW_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1HWCODE_NEW_REM_Z_1(void)=0; virtual void set_GurZ_1HWCODE_NEW_REM_Z_1(TFIBWideStringField * GurZ_1HWCODE_NEW_REM_Z_1)=0; __property TFIBSmallIntField * GurZ_1FL_ISM_SWCODE_REM_Z_1 = {read = get_GurZ_1FL_ISM_SWCODE_REM_Z_1 , write = set_GurZ_1FL_ISM_SWCODE_REM_Z_1}; virtual TFIBSmallIntField * get_GurZ_1FL_ISM_SWCODE_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ISM_SWCODE_REM_Z_1(TFIBSmallIntField * GurZ_1FL_ISM_SWCODE_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1SWCODE_NEW_REM_Z_1 = {read = get_GurZ_1SWCODE_NEW_REM_Z_1 , write = set_GurZ_1SWCODE_NEW_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1SWCODE_NEW_REM_Z_1(void)=0; virtual void set_GurZ_1SWCODE_NEW_REM_Z_1(TFIBWideStringField * GurZ_1SWCODE_NEW_REM_Z_1)=0; __property TFIBSmallIntField * GurZ_1FL_ISM_PARTNUM_REM_Z_1 = {read = get_GurZ_1FL_ISM_PARTNUM_REM_Z_1 , write = set_GurZ_1FL_ISM_PARTNUM_REM_Z_1}; virtual TFIBSmallIntField * get_GurZ_1FL_ISM_PARTNUM_REM_Z_1(void)=0; virtual void set_GurZ_1FL_ISM_PARTNUM_REM_Z_1(TFIBSmallIntField * GurZ_1FL_ISM_PARTNUM_REM_Z_1)=0; __property TFIBWideStringField * GurZ_1PARTNUM_NEW_REM_Z_1 = {read = get_GurZ_1PARTNUM_NEW_REM_Z_1 , write = set_GurZ_1PARTNUM_NEW_REM_Z_1}; virtual TFIBWideStringField * get_GurZ_1PARTNUM_NEW_REM_Z_1(void)=0; virtual void set_GurZ_1PARTNUM_NEW_REM_Z_1(TFIBWideStringField * GurZ_1PARTNUM_NEW_REM_Z_1)=0; __property TDataSource * DataSourcePrNeispr = {read = get_DataSourcePrNeispr , write = set_DataSourcePrNeispr}; virtual TDataSource * get_DataSourcePrNeispr(void)=0; virtual void set_DataSourcePrNeispr(TDataSource * DataSourcePrNeispr)=0; __property TpFIBDataSet * GurZPrNeispr = {read = get_GurZPrNeispr , write = set_GurZPrNeispr}; virtual TpFIBDataSet * get_GurZPrNeispr(void)=0; virtual void set_GurZPrNeispr(TpFIBDataSet * GurZPrNeispr)=0; __property TFIBLargeIntField * GurZPrNeisprID_REM_ZPRNEISPR = {read = get_GurZPrNeisprID_REM_ZPRNEISPR , write = set_GurZPrNeisprID_REM_ZPRNEISPR}; virtual TFIBLargeIntField * get_GurZPrNeisprID_REM_ZPRNEISPR(void)=0; virtual void set_GurZPrNeisprID_REM_ZPRNEISPR(TFIBLargeIntField * GurZPrNeisprID_REM_ZPRNEISPR)=0; __property TFIBLargeIntField * GurZPrNeisprIDBASE_REM_ZPRNEISPR = {read = get_GurZPrNeisprIDBASE_REM_ZPRNEISPR , write = set_GurZPrNeisprIDBASE_REM_ZPRNEISPR}; virtual TFIBLargeIntField * get_GurZPrNeisprIDBASE_REM_ZPRNEISPR(void)=0; virtual void set_GurZPrNeisprIDBASE_REM_ZPRNEISPR(TFIBLargeIntField * GurZPrNeisprIDBASE_REM_ZPRNEISPR)=0; __property TFIBWideStringField * GurZPrNeisprGID_REM_ZPRNEISPR = {read = get_GurZPrNeisprGID_REM_ZPRNEISPR , write = set_GurZPrNeisprGID_REM_ZPRNEISPR}; virtual TFIBWideStringField * get_GurZPrNeisprGID_REM_ZPRNEISPR(void)=0; virtual void set_GurZPrNeisprGID_REM_ZPRNEISPR(TFIBWideStringField * GurZPrNeisprGID_REM_ZPRNEISPR)=0; __property TFIBLargeIntField * GurZPrNeisprIDPRCOND_REM_ZPRNEISPR = {read = get_GurZPrNeisprIDPRCOND_REM_ZPRNEISPR , write = set_GurZPrNeisprIDPRCOND_REM_ZPRNEISPR}; virtual TFIBLargeIntField * get_GurZPrNeisprIDPRCOND_REM_ZPRNEISPR(void)=0; virtual void set_GurZPrNeisprIDPRCOND_REM_ZPRNEISPR(TFIBLargeIntField * GurZPrNeisprIDPRCOND_REM_ZPRNEISPR)=0; __property TFIBLargeIntField * GurZPrNeisprIDPRNEISP_REM_ZPRNEISPR = {read = get_GurZPrNeisprIDPRNEISP_REM_ZPRNEISPR , write = set_GurZPrNeisprIDPRNEISP_REM_ZPRNEISPR}; virtual TFIBLargeIntField * get_GurZPrNeisprIDPRNEISP_REM_ZPRNEISPR(void)=0; virtual void set_GurZPrNeisprIDPRNEISP_REM_ZPRNEISPR(TFIBLargeIntField * GurZPrNeisprIDPRNEISP_REM_ZPRNEISPR)=0; __property TFIBLargeIntField * GurZPrNeisprIDZ_REM_ZPRNEISPR = {read = get_GurZPrNeisprIDZ_REM_ZPRNEISPR , write = set_GurZPrNeisprIDZ_REM_ZPRNEISPR}; virtual TFIBLargeIntField * get_GurZPrNeisprIDZ_REM_ZPRNEISPR(void)=0; virtual void set_GurZPrNeisprIDZ_REM_ZPRNEISPR(TFIBLargeIntField * GurZPrNeisprIDZ_REM_ZPRNEISPR)=0; __property TFIBWideStringField * GurZPrNeisprNAME_REM_SPRNEISPR = {read = get_GurZPrNeisprNAME_REM_SPRNEISPR , write = set_GurZPrNeisprNAME_REM_SPRNEISPR}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_REM_SPRNEISPR(void)=0; virtual void set_GurZPrNeisprNAME_REM_SPRNEISPR(TFIBWideStringField * GurZPrNeisprNAME_REM_SPRNEISPR)=0; __property TFIBWideStringField * GurZPrNeisprCODE_REM_SPRNEISPR = {read = get_GurZPrNeisprCODE_REM_SPRNEISPR , write = set_GurZPrNeisprCODE_REM_SPRNEISPR}; virtual TFIBWideStringField * get_GurZPrNeisprCODE_REM_SPRNEISPR(void)=0; virtual void set_GurZPrNeisprCODE_REM_SPRNEISPR(TFIBWideStringField * GurZPrNeisprCODE_REM_SPRNEISPR)=0; __property TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRNEISPR = {read = get_GurZPrNeisprNAME_ENG_REM_SPRNEISPR , write = set_GurZPrNeisprNAME_ENG_REM_SPRNEISPR}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_ENG_REM_SPRNEISPR(void)=0; virtual void set_GurZPrNeisprNAME_ENG_REM_SPRNEISPR(TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRNEISPR)=0; __property TFIBWideStringField * GurZPrNeisprNAME_REM_SPRNEISPR_GRP = {read = get_GurZPrNeisprNAME_REM_SPRNEISPR_GRP , write = set_GurZPrNeisprNAME_REM_SPRNEISPR_GRP}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_REM_SPRNEISPR_GRP(void)=0; virtual void set_GurZPrNeisprNAME_REM_SPRNEISPR_GRP(TFIBWideStringField * GurZPrNeisprNAME_REM_SPRNEISPR_GRP)=0; __property TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRNEISPR_GRP = {read = get_GurZPrNeisprNAME_ENG_REM_SPRNEISPR_GRP , write = set_GurZPrNeisprNAME_ENG_REM_SPRNEISPR_GRP}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_ENG_REM_SPRNEISPR_GRP(void)=0; virtual void set_GurZPrNeisprNAME_ENG_REM_SPRNEISPR_GRP(TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRNEISPR_GRP)=0; __property TFIBWideStringField * GurZPrNeisprCODE_REM_SPRCONDITION = {read = get_GurZPrNeisprCODE_REM_SPRCONDITION , write = set_GurZPrNeisprCODE_REM_SPRCONDITION}; virtual TFIBWideStringField * get_GurZPrNeisprCODE_REM_SPRCONDITION(void)=0; virtual void set_GurZPrNeisprCODE_REM_SPRCONDITION(TFIBWideStringField * GurZPrNeisprCODE_REM_SPRCONDITION)=0; __property TFIBWideStringField * GurZPrNeisprNAME_REM_SPRCONDITION = {read = get_GurZPrNeisprNAME_REM_SPRCONDITION , write = set_GurZPrNeisprNAME_REM_SPRCONDITION}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_REM_SPRCONDITION(void)=0; virtual void set_GurZPrNeisprNAME_REM_SPRCONDITION(TFIBWideStringField * GurZPrNeisprNAME_REM_SPRCONDITION)=0; __property TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRCONDITION = {read = get_GurZPrNeisprNAME_ENG_REM_SPRCONDITION , write = set_GurZPrNeisprNAME_ENG_REM_SPRCONDITION}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_ENG_REM_SPRCONDITION(void)=0; virtual void set_GurZPrNeisprNAME_ENG_REM_SPRCONDITION(TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRCONDITION)=0; __property TFIBWideStringField * GurZPrNeisprCODE_REM_SPRCOND_GRP = {read = get_GurZPrNeisprCODE_REM_SPRCOND_GRP , write = set_GurZPrNeisprCODE_REM_SPRCOND_GRP}; virtual TFIBWideStringField * get_GurZPrNeisprCODE_REM_SPRCOND_GRP(void)=0; virtual void set_GurZPrNeisprCODE_REM_SPRCOND_GRP(TFIBWideStringField * GurZPrNeisprCODE_REM_SPRCOND_GRP)=0; __property TFIBWideStringField * GurZPrNeisprNAME_REM_SPRCOND_GRP = {read = get_GurZPrNeisprNAME_REM_SPRCOND_GRP , write = set_GurZPrNeisprNAME_REM_SPRCOND_GRP}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_REM_SPRCOND_GRP(void)=0; virtual void set_GurZPrNeisprNAME_REM_SPRCOND_GRP(TFIBWideStringField * GurZPrNeisprNAME_REM_SPRCOND_GRP)=0; __property TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRCOND_GRP = {read = get_GurZPrNeisprNAME_ENG_REM_SPRCOND_GRP , write = set_GurZPrNeisprNAME_ENG_REM_SPRCOND_GRP}; virtual TFIBWideStringField * get_GurZPrNeisprNAME_ENG_REM_SPRCOND_GRP(void)=0; virtual void set_GurZPrNeisprNAME_ENG_REM_SPRCOND_GRP(TFIBWideStringField * GurZPrNeisprNAME_ENG_REM_SPRCOND_GRP)=0; __property TIntegerField * GurZPrNeisprRECNO = {read = get_GurZPrNeisprRECNO , write = set_GurZPrNeisprRECNO}; virtual TIntegerField * get_GurZPrNeisprRECNO(void)=0; virtual void set_GurZPrNeisprRECNO(TIntegerField * GurZPrNeisprRECNO)=0; __property TFIBBCDField * GurZ_1PREDOPLATA_REM_Z_1 = {read = get_GurZ_1PREDOPLATA_REM_Z_1 , write = set_GurZ_1PREDOPLATA_REM_Z_1}; virtual TFIBBCDField * get_GurZ_1PREDOPLATA_REM_Z_1(void)=0; virtual void set_GurZ_1PREDOPLATA_REM_Z_1(TFIBBCDField * GurZ_1PREDOPLATA_REM_Z_1)=0; __property bool Prosmotr = {read = get_Prosmotr , write = set_Prosmotr}; virtual bool get_Prosmotr(void)=0; virtual void set_Prosmotr(bool Prosmotr)=0; __property __int64 IdZ = {read = get_IdZ , write = set_IdZ}; virtual __int64 get_IdZ(void)=0; virtual void set_IdZ(__int64 IdZ)=0; __property bool flChangeData = {read = get_flChangeData , write = set_flChangeData}; virtual bool get_flChangeData(void)=0; virtual void set_flChangeData(bool flChangeData)=0; virtual void NewDoc(void)=0; virtual void OpenDoc(__int64 id)=0; virtual bool SaveDoc(void)=0; virtual bool DeleteDoc(__int64 id)=0; virtual void CloseDoc(void)=0; virtual void AddNewRecordDv(void)=0; }; #define IID_IREM_DMZayavka __uuidof(IREM_DMZayavka) #endif
8cdc4f5493882874d43467d7d7db8bd7a3d29212
6f6e378ea2a3e23d3ecefb1f8ff4e847a7dcda68
/libember/Headers/ember/glow/GlowTags.hpp
efc57fff5d3074a186f8c174f9a487a8896cf798
[ "BSL-1.0", "LicenseRef-scancode-dco-1.1" ]
permissive
Lawo/ember-plus
878b772f2dff07821019690ba91a72095bf68081
b42f3143c89f093e01362da69fb39686d0f1bd9e
refs/heads/master
2023-04-02T17:03:47.304757
2023-03-30T12:38:39
2023-03-30T12:38:39
40,001,159
99
54
BSL-1.0
2023-03-06T08:30:53
2015-07-31T10:55:18
C++
UTF-8
C++
false
false
28,613
hpp
GlowTags.hpp
/* libember -- C++ 03 implementation of the Ember+ Protocol Copyright (C) 2012-2016 Lawo GmbH (http://www.lawo.com). Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef __LIBEMBER_GLOW_GLOWTAGS_HPP #define __LIBEMBER_GLOW_GLOWTAGS_HPP #include "../util/Api.hpp" #include "MatrixProperty.hpp" #include "NodeProperty.hpp" #include "ParameterProperty.hpp" namespace libember { namespace glow { /** * Lists all tags that are used by glow to store properties of nodes, parameters and other object types. */ struct LIBEMBER_API GlowTags { struct LIBEMBER_API Command { /** * Returns the context-specific tag identifying a command number. * @return The context-specific tag identifying a command number. */ static ber::Tag Number(); /** * Returns the tag of the dir field mask, which indicates the fields a consumer is interested in. * @return The tag of the dir field mask. */ static ber::Tag DirFieldMask(); /** * Returns the tag of the invocation property, which contains a function that shall be executed * by the provider. * @return The tag of the invocation property. */ static ber::Tag Invocation(); }; struct LIBEMBER_API NodeContents { /** * Returns the context-specific tag identifying an identifier. * @return Returns the context-specific tag identifying an identifier. */ static ber::Tag Identifier(); /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Description(); /** * Returns the context-specific tag identifying the root flag. * @return Returns the context-specific tag identifying the root flag. */ static ber::Tag IsRoot(); /** * Returns the context-specific tag identifying the node's online state. * @return Returns the context-specific tag identifying the node's online state. */ static ber::Tag IsOnline(); /** * Returns the context-specific tag identifying the node's schema identifier. * @return The context-specific tag identifying the node's schema identifier. */ static ber::Tag SchemaIdentifiers(); /** * Returns the context-specific tag identifying the template reference. * @return The context-specific tag identifying the template reference. */ static ber::Tag TemplateReference(); }; struct LIBEMBER_API Node { /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Number(); /** * Returns the context-specific tag identifying the contents of a node. * @return Returns the context-specific tag identifying the node contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the collection containing the child elements. * @return Returns the context-specific tag identifying the collection containing the child elements. */ static ber::Tag Children(); }; struct LIBEMBER_API QualifiedNode { /** * Returns the context-specific tag identifying the path of the node. * @return Returns the context-specific tag identifying the path. */ static ber::Tag Path(); /** * Returns the context-specific tag identifying the contents of a node. * @return Returns the context-specific tag identifying the node contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the collection containing the child elements. * @return Returns the context-specific tag identifying the collection containing the child elements. */ static ber::Tag Children(); }; struct LIBEMBER_API Parameter { /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Number(); /** * Returns the context-specific tag identifying the contents of a parameter. * @return Returns the context-specific tag identifying the parameter contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the child collection of a node or parameter. * @return Returns the context-specific tag identifying the child collection. */ static ber::Tag Children(); }; struct LIBEMBER_API QualifiedParameter { /** * Returns the context-specific tag identifying the path of a parameter. * @return Returns the context-specific tag identifying the path. */ static ber::Tag Path(); /** * Returns the context-specific tag identifying the contents of a parameter. * @return Returns the context-specific tag identifying the parameter contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the child collection of a node or parameter. * @return Returns the context-specific tag identifying the child collection. */ static ber::Tag Children(); }; struct LIBEMBER_API ParameterContents { /** * Returns the context-specific tag identifying an identifier. * @return Returns the context-specific tag identifying an identifier. */ static ber::Tag Identifier(); /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Description(); /** * Returns the context-specific tag identifying a value. * @return Returns the context-specific tag identifying a value. */ static ber::Tag Value(); /** * Returns the context-specific tag identifying a minimum. * @return Returns the context-specific tag identifying a minimum. */ static ber::Tag Minimum(); /** * Returns the context-specific tag identifying a maximum. * @return Returns the context-specific tag identifying a maximum. */ static ber::Tag Maximum(); /** * Returns the context-specific tag identifying the access flag. * @return Returns the context-specific tag identifying the access flag. */ static ber::Tag Access(); /** * Returns the context-specific tag identifying a format string. * @return Returns the context-specific tag identifying a format string. */ static ber::Tag Format(); /** * Returns the context-specific tag identifying an enumeration. * @return Returns the context-specific tag identifying an enumeration. */ static ber::Tag Enumeration(); /** * Returns the context-specific tag identifying a factor. * @return Returns the context-specific tag identifying a factor. */ static ber::Tag Factor(); /** * Returns the context-specific tag identifying the online flag. * @return Returns the context-specific tag identifying the online flag. */ static ber::Tag IsOnline(); /** * Returns the context-specific tag identifying a formula. * @return Returns the context-specific tag identifying a formula. */ static ber::Tag Formula(); /** * Returns the context-specific tag identifying a step. * @return Returns the context-specific tag identifying a step. */ static ber::Tag Step(); /** * Returns the context-specific tag identifying a defalt value. * @return Returns the context-specific tag identifying a default value. */ static ber::Tag Default(); /** * Returns the context-specific tag identifying the value type. * @return Returns the context-specific tag identifying the value type. */ static ber::Tag Type(); /** * Returns the context-specific tag identifying a stream identifier. * @return Returns the context-specific tag identifying the stream identifier. */ static ber::Tag StreamIdentifier(); /** * Returns the context-specific tag identifying an enumeration map. The map has a higher priority * than the enumeration string. It contains a list of pairs, where each pair has an index and a string value. * @return Returns the context-specific tag identifying an enumeration map. */ static ber::Tag EnumMap(); /** * Returns the context-specific tag identifying a StreamDescriptor. A StreamDescriptor is only required when * a stream doesn't use the default format. * @return Returns the context-specific tag identifying a StreamDescriptor. */ static ber::Tag StreamDescriptor(); /** * Returns the context-specific tag identifying the parameter's schema identifier. * @return The context-specific tag identifying the parameter's schema identifier. */ static ber::Tag SchemaIdentifiers(); /** * Returns the context-specific tag identifying the template reference. * @return The context-specific tag identifying the template reference. */ static ber::Tag TemplateReference(); }; struct LIBEMBER_API StreamEntry { /** * Returns the context-specific tag identifying a stream identifier within a stream entry. * @return Returns the context-specific tag of a stream identifier */ static ber::Tag StreamIdentifier(); /** * Returns the context-specific tag identifying a stream value withing a stream entry. * The tag returned is ContextSpecific - 0. * @return Returns the context-specific tag identifying a stream value. */ static ber::Tag StreamValue(); }; struct LIBEMBER_API StringIntegerPair { /** * Returns the context-specific tag identifying a String-Integer pair's name * Returns the context-specific tag identifying a String-Integer pair's name */ static ber::Tag Name(); /** * Returns the context-specific tag identifying a String-Integer pair's value * Returns the context-specific tag identifying a String-Integer pair's value */ static ber::Tag Value(); }; struct LIBEMBER_API StreamDescriptor { /** * Returns the context-specific tag identifying the stream format within a StreamDescriptor. * @return The context-specific tag identifying the stream format within a StreamDescriptor. */ static ber::Tag Format(); /** * Returns the context-specific tag identifying the stream-value offset within a StreamDescriptor. * @return The context-specific tag identifying the stream-value offset within a StreamDescriptor. */ static ber::Tag Offset(); }; /** * Returns the tag identifying a root element collection. * @return Returns the tag identifying a root. */ static ber::Tag Root(); /** * Returns the tag that is used for a glow element when it is listed within * a sequence. The tag returned is ContextSpecific - 0. * @return Returns the tag for listed glow elements. */ static ber::Tag ElementDefault(); struct LIBEMBER_API Matrix { /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Number(); /** * Returns the context-specific tag identifying the contents of a matrix. * @return Returns the context-specific tag identifying the matrix contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the child collection of a matrix. * @return Returns the context-specific tag identifying the child collection. */ static ber::Tag Children(); /** * Returns the context-specific tag identifying the target collection of a matrix. * @return Returns the context-specific tag identifying the target collection. */ static ber::Tag Targets(); /** * Returns the context-specific tag identifying the source collection of a matrix. * @return Returns the context-specific tag identifying the source collection. */ static ber::Tag Sources(); /** * Returns the context-specific tag identifying the connection collection of a matrix. * @return Returns the context-specific tag identifying the connection collection. */ static ber::Tag Connections(); }; struct LIBEMBER_API QualifiedMatrix { /** * Returns the context-specific tag identifying the path of a qualified matrix. * @return Returns the context-specific tag identifying the path of a qualified matrix. */ static ber::Tag Path(); /** * Returns the context-specific tag identifying the contents of a qualified matrix. * @return Returns the context-specific tag identifying the matrix contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the child collection of a qualified matrix. * @return Returns the context-specific tag identifying the child collection. */ static ber::Tag Children(); /** * Returns the context-specific tag identifying the target collection of a qualified matrix. * @return Returns the context-specific tag identifying the target collection. */ static ber::Tag Targets(); /** * Returns the context-specific tag identifying the source collection of a qualified matrix. * @return Returns the context-specific tag identifying the source collection. */ static ber::Tag Sources(); /** * Returns the context-specific tag identifying the connection collection of a qualified matrix. * @return Returns the context-specific tag identifying the connection collection. */ static ber::Tag Connections(); }; struct LIBEMBER_API MatrixContents { /** * Returns the context-specific tag identifying an identifier. * @return Returns the context-specific tag identifying an identifier. */ static ber::Tag Identifier(); /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Description(); /** * Returns the context-specific tag identifying the matrix type. * @return Returns the context-specific tag identifying the matrix type. */ static ber::Tag Type(); /** * Returns the context-specific tag identifying the matrix addressing mode. * @return Returns the context-specific tag identifying the matrix addressing mode. */ static ber::Tag AddressingMode(); /** * Returns the context-specific tag identifying the matrix target count. * @return Returns the context-specific tag identifying the matrix target count. */ static ber::Tag TargetCount(); /** * Returns the context-specific tag identifying the matrix source count. * @return Returns the context-specific tag identifying the matrix source count. */ static ber::Tag SourceCount(); /** * Returns the context-specific tag identifying the total maximum connects of a matrix. * @return Returns the context-specific tag identifying the total maximum connects of a matrix. */ static ber::Tag MaximumTotalConnects(); /** * Returns the context-specific tag identifying the maximum connects per target of a matrix. * @return Returns the context-specific tag identifying the maximum connects per target of a matrix. */ static ber::Tag MaximumConnectsPerTarget(); /** * Returns the context-specific tag identifying the matrix parameters location. * @return Returns the context-specific tag identifying the matrix parameters location. */ static ber::Tag ParametersLocation(); /** * Returns the context-specific tag identifying the matrix gain parameter number. * @return Returns the context-specific tag identifying the matrix gain parameter number. */ static ber::Tag GainParameterNumber(); /** * Returns the context-specific tag identifying the matrix labels. * @return Returns the context-specific tag identifying the matrix labels. */ static ber::Tag Labels(); /** * Returns the context-specific tag identifying the matrix' schema identifier. * @return The context-specific tag identifying the matrix' schema identifier. */ static ber::Tag SchemaIdentifiers(); /** * Returns the context-specific tag identifying the template reference. * @return The context-specific tag identifying the template reference. */ static ber::Tag TemplateReference(); }; struct LIBEMBER_API Signal { /** * Returns the context-specific tag identifying the signal number. * @return Returns the context-specific tag identifying the signal number. */ static ber::Tag Number(); }; struct LIBEMBER_API Connection { /** * Returns the context-specific tag identifying the number of the target the connection refers to. * @return Returns the context-specific tag identifying the number of the target the connection refers to. */ static ber::Tag Target(); /** * Returns the context-specific tag identifying the connected sources. * @return Returns the context-specific tag identifying the connected sources. */ static ber::Tag Sources(); /** * Returns the context-specific tag identifying the connection operation. * @return Returns the context-specific tag identifying the connection operation. */ static ber::Tag Operation(); /** * Returns the context-specific tag identifying the connection disposition. * @return Returns the context-specific tag identifying the connection disposition. */ static ber::Tag Disposition(); }; struct LIBEMBER_API Label { /** * Returns the context-specific tag identifying the label base path. * @return Returns the context-specific tag identifying the label base path. */ static ber::Tag BasePath(); /** * Returns the context-specific tag identifying the label description. * @return Returns the context-specific tag identifying the label description. */ static ber::Tag Description(); }; struct LIBEMBER_API Function { /** * Returns the context-specific tag identifying the function number. * @return The context-specific tag identifying the function number. */ static ber::Tag Number(); /** * Returns the context-specific tag identifying the function contents. * @return The context-specific tag identifying the function contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the function children. * @return The context-specific tag identifying the function children. */ static ber::Tag Children(); }; struct LIBEMBER_API QualifiedFunction { /** * Returns the context-specific tag identifying the function path. * @return The context-specific tag identifying the function path. */ static ber::Tag Path(); /** * Returns the context-specific tag identifying the function contents. * @return The context-specific tag identifying the function contents. */ static ber::Tag Contents(); /** * Returns the context-specific tag identifying the function children. * @return The context-specific tag identifying the function children. */ static ber::Tag Children(); }; struct LIBEMBER_API FunctionContents { /** * Returns the context-specific tag identifying the identifier of a function. * @return The context-specific tag identifying the identifier of a function. */ static ber::Tag Identifier(); /** * Returns the context-specific tag identifying the description of a function. * @return The context-specific tag identifying the description of a function. */ static ber::Tag Description(); /** * Returns the context-specific tag identifying the arguments of a function. * @return The context-specific tag identifying the arguments of a function. */ static ber::Tag Arguments(); /** * Returns the context-specific tag identifying the result of a function. * @return The context-specific tag identifying the result of a function. */ static ber::Tag Result(); /** * Returns the context-specific tag identifying the template reference. * @return The context-specific tag identifying the template reference. */ static ber::Tag TemplateReference(); }; struct LIBEMBER_API TupleItemDescription { /** * Returns the context-specific tag identifying the type of a TupleItemDescription. * @return The context-specific tag identifying the type of a TupleItemDescription. */ static ber::Tag Type(); /** * Returns the context-specific tag identifying the name of a TupleItemDescription. * @return The context-specific tag identifying the name of a TupleItemDescription. */ static ber::Tag Name(); }; struct LIBEMBER_API Invocation { /** * Returns the context-specific tag identifying the identifier of an Invocation. * @return The context-specific tag identifying the identifier of an Invocation. */ static ber::Tag InvocationId(); /** * Returns the context-specific tag identifying the arguments of an Invocation. * @return The context-specific tag identifying the arguments of an Invocation. */ static ber::Tag Arguments(); }; struct LIBEMBER_API InvocationResult { /** * Returns the context-specific tag identifying the identifier of an InvocationResult. * @return The context-specific tag identifying the identifier of an InvocationResult. */ static ber::Tag InvocationId(); /** * Returns the context-specific tag identifying the success field of an InvocationResult. * @return The context-specific tag identifying the success field of an InvocationResult. */ static ber::Tag Success(); /** * Returns the context-specific tag identifying the result value of an InvocationResult. * @return The context-specific tag identifying the result value of an InvocationResult. */ static ber::Tag Result(); }; struct LIBEMBER_API Template { /** * Returns the context-specific tag identifying a number. * @return Returns the context-specific tag identifying a number. */ static ber::Tag Number(); /** * Returns the context-specific tag identifying the description. * @return Returns the context-specific tag identifying the description. */ static ber::Tag Description(); /** * Returns the context-specific tag identifying the element described by the template. * @return Returns the context-specific tag identifying the element described by the template. */ static ber::Tag Element(); }; struct LIBEMBER_API QualifiedTemplate { /** * Returns the context-specific tag identifying the path of the template. * @return Returns the context-specific tag identifying the path. */ static ber::Tag Path(); /** * Returns the context-specific tag identifying the description. * @return Returns the context-specific tag identifying the description. */ static ber::Tag Description(); /** * Returns the context-specific tag identifying the element described by the template. * @return Returns the context-specific tag identifying the element described by the template. */ static ber::Tag Element(); }; }; } } #ifdef LIBEMBER_HEADER_ONLY # include "impl/GlowTags.ipp" #endif #endif // __LIBEMBER_GLOW_GLOWTAGS_HPP
f265c986a9d1dde479b070265e849d1fdd285c43
3391892861a1e1e71af6e414bcdb9fc0df66c62e
/src/jk/cog/semantics/symbol_extension_field_string_visitor.hpp
4f346ed8b38fc10b13a6ade20053d27bca270665
[ "Apache-2.0" ]
permissive
jdmclark/gorc
a21208b1d03a85fc5a99fdd51fdad27446cc4767
a03d6a38ab7684860c418dd3d2e77cbe6a6d9fc8
refs/heads/develop
2021-01-21T05:01:26.609783
2020-12-21T00:26:22
2020-12-21T02:34:31
10,290,074
103
10
Apache-2.0
2020-12-21T02:34:33
2013-05-25T21:27:37
C++
UTF-8
C++
false
false
356
hpp
symbol_extension_field_string_visitor.hpp
#pragma once #include "jk/cog/ast/ast.hpp" namespace gorc { namespace cog { class symbol_extension_field_string_visitor { public: std::string visit(ast::string_fragment_field &) const; std::string visit(ast::integer_field &) const; std::string visit(ast::float_field &) const; }; } }
4672bb234cf090584536e68dd8203563babeb6ca
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/httpd/gumtree/httpd_patch_hunk_2426.cpp
0502ff880efd546bb9cfebdf9d9348964a93dfdb
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,062
cpp
httpd_patch_hunk_2426.cpp
ldc = util_ldap_connection_find(r, sec->host, sec->port, binddn, bindpw, sec->deref, sec->secure); } else { - ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01690) "auth_ldap authenticate: no sec->host - weird...?"); return AUTH_GENERAL_ERROR; } - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01691) "auth_ldap authenticate: using URL %s", sec->url); /* Get the password that the client sent */ if (password == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01692) "auth_ldap authenticate: no password specified"); util_ldap_connection_close(ldc); return AUTH_GENERAL_ERROR; } if (user == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01693) "auth_ldap authenticate: no user specified"); util_ldap_connection_close(ldc); return AUTH_GENERAL_ERROR; } /* build the username filter */ authn_ldap_build_filter(filtbuf, r, user, NULL, sec); + ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, + "auth_ldap authenticate: final authn filter is %s", filtbuf); + /* convert password to utf-8 */ utfpassword = authn_ldap_xlate_password(r, password); /* do the user search */ result = util_ldap_cache_checkuserid(r, ldc, sec->url, sec->basedn, sec->scope, sec->attributes, filtbuf, utfpassword, &dn, &(req->vals)); util_ldap_connection_close(ldc); - /* sanity check - if server is down, retry it up to 5 times */ - if (AP_LDAP_IS_SERVER_DOWN(result)) { - if (failures++ <= 5) { - goto start_over; - } - } - /* handle bind failure */ if (result != LDAP_SUCCESS) { if (!sec->bind_authoritative) { - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01694) "auth_ldap authenticate: user %s authentication failed; " "URI %s [%s][%s] (not authoritative)", user, r->uri, ldc->reason, ldap_err2string(result)); return AUTH_USER_NOT_FOUND; } - ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01695) "auth_ldap authenticate: " "user %s authentication failed; URI %s [%s][%s]", user, r->uri, ldc->reason, ldap_err2string(result)); return (LDAP_NO_SUCH_OBJECT == result) ? AUTH_USER_NOT_FOUND #ifdef LDAP_SECURITY_ERROR
0f5d46fc1ce29d836f20d03ef7ab58534635f9de
b6607ecc11e389cc56ee4966293de9e2e0aca491
/acmp.ru/501...600/576/576.cpp
d1027b460cf9b0c064ceb249ebfaf474cf4edd95
[]
no_license
BekzhanKassenov/olymp
ec31cefee36d2afe40eeead5c2c516f9bf92e66d
e3013095a4f88fb614abb8ac9ba532c5e955a32e
refs/heads/master
2022-09-21T10:07:10.232514
2021-11-01T16:40:24
2021-11-01T16:40:24
39,900,971
5
0
null
null
null
null
UTF-8
C++
false
false
435
cpp
576.cpp
#include <iostream> #include <cstdio> using namespace std; int gcd(int a, int b) { if (a==b) return a; if (a<b) return gcd(b-a,a); if (a>b) return gcd(a-b,b); } int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); int n; cin>>n; int ans=0; for (int i=1;i<n;i++) { if (gcd(n,i)==1) ans++; } cout<<ans; return 0; }
38d7d784613892515fa443796150cabdb91f1f6d
2c811434dd9cc3bb54d64f92733c40ddd3fa0383
/UVa-AC/uva 101 The Blocks Problem.cpp
90f580da6c851702362253011c987003e2522576
[]
no_license
gmtranthanhtu/competitive-programming
457e5cc16ede75d9496ac195de845ebe8d6e5664
d765002704e2a8cf547cbe67f0f9a31db88bfc9b
refs/heads/master
2021-01-23T08:56:52.594506
2014-11-01T09:52:12
2014-11-01T09:52:12
26,047,176
3
3
null
2020-10-01T14:15:30
2014-11-01T09:55:03
C++
UTF-8
C++
false
false
4,618
cpp
uva 101 The Blocks Problem.cpp
/* Name: UVa 101 The Blocks Problem Copyright: Author: 3T Date: 08/11/10 14:07 Description: adhoc, stack */ #include <stdio.h> #include <algorithm> #include <string.h> #include <queue> #include <stack> using namespace std; int a, b, n, IsAt[26]; char line[50], Opa[10], Opb[10]; stack <int> S[26]; stack <int> STemp; // moveOnto void moveOnto(int s, int d){ if(s == d) return; int Sat = IsAt[s]; int Dat = IsAt[d]; if(Sat == Dat) return; //remove top d while(S[Dat].top() != d){ int Tmp = S[Dat].top(); S[Dat].pop(); S[Tmp].push(Tmp); IsAt[Tmp] = Tmp; } while(S[Sat].top() != s){ int Tmp = S[Sat].top(); S[Sat].pop(); S[Tmp].push(Tmp); IsAt[Tmp] = Tmp; } S[Sat].pop(); S[Dat].push(s); IsAt[s] = Dat; } //moveOver void moveOver(int s, int d){ if(s == d) return; int Sat = IsAt[s]; int Dat = IsAt[d]; if(Sat == Dat) return; while(S[Sat].top() != s){ int Tmp = S[Sat].top(); S[Sat].pop(); S[Tmp].push(Tmp); IsAt[Tmp] = Tmp; } S[Sat].pop(); S[Dat].push(s); IsAt[s] = Dat; } //pileOnto void pileOnto(int s, int d){ if(s == d) return; int Sat = IsAt[s]; int Dat = IsAt[d]; if(Sat == Dat) return; //remove top d while(S[Dat].top() != d){ int Tmp = S[Dat].top(); S[Dat].pop(); S[Tmp].push(Tmp); IsAt[Tmp] = Tmp; } //top s? while(S[Sat].top() != s){ int Tmp = S[Sat].top(); S[Sat].pop(); STemp.push(Tmp); IsAt[Tmp] = Dat; } S[Sat].pop(); S[Dat].push(s); IsAt[s] = Dat; //move from Temp to Dat while(!STemp.empty()) { int Tmp = STemp.top(); STemp.pop(); S[Dat].push(Tmp); } } //pile over void pileOver(int s, int d){ if(s == d) return; int Sat = IsAt[s]; int Dat = IsAt[d]; if(Sat == Dat) return; //top s? while(S[Sat].top() != s){ int Tmp = S[Sat].top(); S[Sat].pop(); STemp.push(Tmp); IsAt[Tmp] = Dat; } S[Sat].pop(); S[Dat].push(s); IsAt[s] = Dat; //move from Temp to Dat while(!STemp.empty()) { int Tmp = STemp.top(); STemp.pop(); S[Dat].push(Tmp); } } int main () { //freopen("101.INP", "r", stdin); //freopen("101.OUT", "w", stdout); scanf("%d",&n); scanf(" "); for(int i = 0; i < n; i++){ S[i].push(i); IsAt[i] = i; } while(1){ gets(line); if(strcmp(line, "quit") == 0) break; sscanf(line, "%s %d %s %d", &Opa, &a, &Opb, &b); if(strcmp(Opa, "move") == 0){ if(strcmp(Opb, "onto") == 0) moveOnto(a, b); else moveOver(a, b); } else{ if(strcmp(Opb, "onto") == 0) pileOnto(a, b); else pileOver(a, b); } } //output for(int i = 0; i < n; i++){ printf("%d:", i); while(!S[i].empty()){ int Tmp = S[i].top(); S[i].pop(); STemp.push(Tmp); } while(!STemp.empty()){ int Tmp = STemp.top(); STemp.pop(); printf(" %d",Tmp); } printf("\n"); } return 0; }
4a5e06826b80046345ae194d03c15b286835a598
eee64ef3b384930cc04de645316e8ffea01b1b72
/chapter04/cpp/getRandom.cpp
dc387e81651f8f34f731a57fa8f2cb3765a5d3d4
[]
no_license
XingBin111/LeetCode
17a8b2d764900510989531198f71bfbfbb601803
6bceb5569e45ffc0d83f22467d25380bbc25aa77
refs/heads/master
2023-07-22T05:12:32.092963
2021-09-09T09:37:48
2021-09-09T09:37:48
266,281,037
0
0
null
null
null
null
UTF-8
C++
false
false
870
cpp
getRandom.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include "limits.h" #include <math.h> #include <stdlib.h> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int v=0, ListNode* nxt=nullptr) : val(v), next(nxt) {}; }; int get_random(ListNode* head) { srand((unsigned)time(NULL)); ListNode* node = head->next; int choice = head->val; int k = 2; while(node != nullptr) { int r = rand() % k; cout << r << endl; if(r == 0) choice = node->val; node = node->next; k++; } return choice; } int main() { ListNode* head = new ListNode(1); ListNode* tmp = head; for(int i=2; i<20; i++) { tmp->next = new ListNode(i); tmp = tmp->next; } cout << get_random(head) << endl; return 0; }
61c0d746a21a02a31524b36e0a0091c689196ace
0f2b08b31fab269c77d4b14240b8746a3ba17d5e
/onnxruntime/core/providers/dml/DmlExecutionProvider/src/TensorDesc.h
ff70dec5b887194be0ea76f2d73a04527ab6fab8
[ "MIT" ]
permissive
microsoft/onnxruntime
f75aa499496f4d0a07ab68ffa589d06f83b7db1d
5e747071be882efd6b54d7a7421042e68dcd6aff
refs/heads/main
2023-09-04T03:14:50.888927
2023-09-02T07:16:28
2023-09-02T07:16:28
156,939,672
9,912
2,451
MIT
2023-09-14T21:22:46
2018-11-10T02:22:53
C++
UTF-8
C++
false
false
6,521
h
TensorDesc.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once namespace Dml { class TensorDesc { public: // Constructs an invalid / optional tensor desc. TensorDesc() = default; // Constructs a minimal tensor desc that knows type but lacks size information yet. TensorDesc(MLOperatorTensorDataType dataType); TensorDesc( DML_TENSOR_DATA_TYPE dataType, gsl::span<const uint32_t> sizes, std::optional<gsl::span<const uint32_t>> strides = std::nullopt, uint32_t guaranteedBaseOffsetAlignment = 0 ); TensorDesc( MLOperatorTensorDataType dataType, gsl::span<const uint32_t> dimensions, // Desired dimensions of tensor (after any broadcasting). gsl::span<const uint32_t> nonBroadcastDimensions, // Original dimensions (before any broadcasting). Usually same as 'dimensions'. int32_t coerceAxis, int32_t placement, // Adjustment offset of the passed dimensions within the minDimensionCount. int32_t leftAlignedDimensionCount, // Number of dimensions that remain left aligned when expanded to minimum count (INT32_MAX means all, 0 means all right aligned). uint32_t minDimensionCount, uint32_t guaranteedBaseOffsetAlignment ); DML_TENSOR_DESC GetDmlDesc(); inline DML_TENSOR_DATA_TYPE GetDmlDataType() const { return m_bufferTensorDesc.DataType; } inline MLOperatorTensorDataType GetMlOperatorDataType() const { return m_mlOperatorTensorDataType; } void ForceUnsignedDataType(); inline bool IsValid() const { return m_tensorType != DML_TENSOR_TYPE_INVALID; } inline uint32_t GetDimensionCount() const { return m_bufferTensorDesc.DimensionCount; } void SetDimensionCount(uint32_t newDimensionCount, TensorAxis alignment); gsl::span<const uint32_t> GetSizes() const { return { m_sizes, m_sizes + m_bufferTensorDesc.DimensionCount }; } gsl::span<const uint32_t> GetStrides() const; void SetStrides(gsl::span<const uint32_t> strides); inline uint64_t GetBufferSizeInBytes() const { assert(m_tensorType == DML_TENSOR_TYPE_BUFFER); return m_bufferTensorDesc.TotalTensorSizeInBytes; } static TensorDesc ConstructDefaultTensorDesc( const MLOperatorTensorDataType dataType, gsl::span<const uint32_t> tensorShape) { return TensorDesc( dataType, tensorShape, // desired tensorShape, // actual TensorAxis::DoNotCoerce, TensorAxis::W, TensorAxis::RightAligned, 1, // minDimensionCount 0 ); } static TensorDesc ConstructBroadcastedTensorDesc( const MLOperatorTensorDataType dataType, gsl::span<const uint32_t> desiredTensorShape, gsl::span<const uint32_t> actualTensorShape) { return TensorDesc( dataType, desiredTensorShape, actualTensorShape, TensorAxis::DoNotCoerce, TensorAxis::W, TensorAxis::RightAligned, 1, // minDimensionCount 0 ); } private: DML_TENSOR_TYPE m_tensorType = DML_TENSOR_TYPE_INVALID; MLOperatorTensorDataType m_mlOperatorTensorDataType = MLOperatorTensorDataType::Undefined; uint32_t m_sizes[MaximumDimensionCount] = {}; uint32_t m_strides[MaximumDimensionCount] = {}; DML_BUFFER_TENSOR_DESC m_bufferTensorDesc = {}; }; class TensorDescBuilder { public: inline TensorDescBuilder& SetDataType(MLOperatorTensorDataType dataType) { m_dataType = dataType; return *this; } inline TensorDescBuilder& SetDimensions(gsl::span<const uint32_t> dimensions) { m_dimensions = dimensions; return *this; } inline TensorDescBuilder& SetNonBroadcastDimensions(gsl::span<const uint32_t> nonBroadcastDimensions) { m_nonBroadcastDimensions = nonBroadcastDimensions; return *this; } inline TensorDescBuilder& SetCoerceAxis(TensorAxis coerceAxis) { m_coerceAxis = coerceAxis; return *this; } inline TensorDescBuilder& SetPlacement(TensorAxis placement) { m_placement = placement; return *this; } inline TensorDescBuilder& SetMinDimensionCount(uint32_t minDimensionCount) { m_minDimensionCount = minDimensionCount; return *this; } inline TensorDescBuilder& SetGuaranteedBaseOffsetAlignment(uint32_t guaranteedBaseOffsetAlignment) { m_guaranteedBaseOffsetAlignment = guaranteedBaseOffsetAlignment; return *this; } inline TensorDescBuilder& SetLeftAlignedDimensionCount(uint32_t leftAlignedDimensionCount) { m_leftAlignedDimensionCount = leftAlignedDimensionCount; return *this; } inline TensorDesc Create() { return TensorDesc( m_dataType, m_dimensions, m_nonBroadcastDimensions.size() > 0 ? m_nonBroadcastDimensions : m_dimensions, m_coerceAxis, m_placement, m_leftAlignedDimensionCount, m_minDimensionCount, m_guaranteedBaseOffsetAlignment ); } private: MLOperatorTensorDataType m_dataType = MLOperatorTensorDataType::Undefined; gsl::span<const uint32_t> m_dimensions = {}; gsl::span<const uint32_t> m_nonBroadcastDimensions = {}; TensorAxis m_coerceAxis = TensorAxis::DoNotCoerce; TensorAxis m_placement = TensorAxis::NoPlacementAdjustment; int32_t m_leftAlignedDimensionCount = TensorAxis::RightAligned; uint32_t m_minDimensionCount = NchwDimensionCount; uint32_t m_guaranteedBaseOffsetAlignment = 0; }; using TensorSequenceDesc = std::vector<TensorDesc>; }
642bc30bf0bea8ccfc3b231cbd36151e6efac01a
9cb5d30009472838a9b523cb35cfc85556ca209d
/hwcomposer/OverlayDisplayEngine/IOverlay.cpp
31160ffe36e13cd7baa2b7e774522620ea368b9f
[]
no_license
SamsungGalaxyTab3/android_vendor_marvell_generic
786f418b6bb5418a4b28ddf4d180227336d7e558
cda3d6f6a61148184ceb23c6028be44b3e830c7f
refs/heads/cm-11.0
2020-04-05T13:00:16.652307
2015-01-05T03:04:25
2015-01-05T03:04:25
95,005,215
0
3
null
2017-06-21T13:09:35
2017-06-21T13:09:35
null
UTF-8
C++
false
false
2,945
cpp
IOverlay.cpp
/* * (C) Copyright 2010 Marvell Int32_Ternational Ltd. * All Rights Reserved * * MARVELL CONFIDENTIAL * Copyright 2008 ~ 2010 Marvell International Ltd All Rights Reserved. * The source code contained or described herein and all documents related to * the source code ("Material") are owned by Marvell Int32_Ternational Ltd or its * suppliers or licensors. Title to the Material remains with Marvell Int32_Ternational Ltd * or its suppliers and licensors. The Material contains trade secrets and * proprietary and confidential information of Marvell or its suppliers and * licensors. The Material is protected by worldwide copyright and trade secret * laws and treaty provisions. No part of the Material may be used, copied, * reproduced, modified, published, uploaded, posted, transmitted, distributed, * or disclosed in any way without Marvell's prior express written permission. * * No license under any patent, copyright, trade secret or other int32_tellectual * property right is granted to or conferred upon you by disclosure or delivery * of the Materials, either expressly, by implication, inducement, estoppel or * otherwise. Any license under such int32_tellectual property rights must be * express and approved by Marvell in writing. * */ #include "IDisplayEngine.h" #include "FramebufferOverlay.h" #include "V4L2Overlay.h" #include "FakeOverlay.h" namespace android{ enum OVERLAYDEVICETYPE{ OVERLAY_DEVICE_UNKNOWN = 0, OVERLAY_DEVICE_FB = 1, OVERLAY_DEVICE_V4L2 = 2, OVERLAY_DEVICE_FAKE = 3, }; #if 0 IDisplayEngine* CreateOverlayEngine(uint32_t idx, DMSInternalConfig const * dms_config) { static char const * const *fb_overlay_device_template = dms_config->OVLY.fb_dev_name; static char const * const *v4l2_overlay_device_template = dms_config->OVLY.v4l2_dev_name; // static uint32_t idx = 0; static OVERLAYDEVICETYPE tOvlyType = OVERLAY_DEVICE_UNKNOWN; if(OVERLAY_DEVICE_UNKNOWN == tOvlyType){ int32_t fd = open(fb_overlay_device_template[idx], O_RDWR, 0); if(fd > 0){ tOvlyType = OVERLAY_DEVICE_FB; close(fd); }else{ tOvlyType = OVERLAY_DEVICE_V4L2; } } if(NULL == v4l2_overlay_device_template[idx]){ tOvlyType = OVERLAY_DEVICE_FAKE; } IDisplayEngine* pOverlay = NULL; if(OVERLAY_DEVICE_V4L2 == tOvlyType){ LOGD("create v4l2 overlay! ---------- idx == %d ----------", idx); pOverlay = new V4L2OverlayRef(v4l2_overlay_device_template[idx]); }else if (OVERLAY_DEVICE_FB == tOvlyType){ LOGD("create fb overlay! ---------- idx == %d ----------", idx); pOverlay = new FBOverlayRef(fb_overlay_device_template[idx]); }else if (OVERLAY_DEVICE_FAKE == tOvlyType){ LOGD("create fake overlay! ---------- idx == %d ----------", idx); pOverlay = new FakeOverlayRef(NULL); } return pOverlay; } #endif }
a9661b1c38272790cde0ee0d4ed9d655f595e92f
66d4806433c57f615ac7cf2e71004f74776498ae
/TareaLab/main.cpp
2a27c2508079d60b1300a148123e1b0321dfe81c
[]
no_license
Jarfsoft/TareaLab2
093001419689a6daa060afbb6efd0c3e529554f9
24f591b2d3dfeb9bd5e92ae2732197970b55abab
refs/heads/master
2020-04-26T06:30:16.986648
2019-03-01T20:51:36
2019-03-01T20:51:36
173,366,506
0
0
null
null
null
null
UTF-8
C++
false
false
459
cpp
main.cpp
#include <iostream> #include "Parsing.h" #include <string> using namespace std; int main() { Parsing go; Expression *x=go.Parsing_Function("1"); cout<<x; /*Number x(1); Number y(2); Addition a(&x,&y); cout<<a.getValue()<<endl; Substraction s(&y,&x); cout<<s.getValue()<<endl; Multiplication m(&y,&x); cout<<m.getValue()<<endl; Division d(&y,&x); cout<<d.getValue()<<endl;*/ return 0; }
b53d24dbc9acc490583e0a9640c5bcb5fa3fe134
883a259d229b16241ee9c5f04a7389862332311e
/Link/DotNetInjection.cpp
c9e8ac41689ce5fd4bc9bfc9a90fb0a091f3fdf2
[]
no_license
cacodemonx/BolterV2
b8f596d4c185ed05af5b787b05b2000de22cf27e
f0f2c77e3147b53aab0f31079a21ac9b3bce8d13
refs/heads/master
2021-01-18T00:31:45.058431
2014-02-22T14:01:55
2014-02-22T14:01:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,209
cpp
DotNetInjection.cpp
#include "stdafx.h" #include "DotNetInjection.h" #pragma warning(disable : 4244) using namespace mscorlib; DotNetInjection::DotNetInjection() { } _Assembly *assembly = NULL; VARIANT *launcher = new VARIANT(); ICorRuntimeHost *pHost = NULL; _AppDomain *appDomain = NULL; ICLRMetaHost *pMetaHost = NULL; ICLRRuntimeInfo *pRuntimeInfo = NULL; IUnknown *pUnk = NULL; unsigned int DotNetInjection::Launch(const char * assPath, const char * domainName, const char * classtoInstance, VARIANTARG FAR * args, BOOL raw) { HRESULT hr; //Create instance of the Common Language Runtime if (pHost == NULL) { hr = CLRCreateInstance(CLSID_CLRMetaHost, IID_PPV_ARGS(&pMetaHost)); //Get latest runtime hr = pMetaHost->GetRuntime(L"v4.0.30319", IID_PPV_ARGS(&pRuntimeInfo)); //pRuntimeInfo->BindAsLegacyV2Runtime(); //Get host interface hr = pRuntimeInfo->GetInterface(CLSID_CorRuntimeHost, IID_PPV_ARGS(&pHost)); //Start CLR Host hr = pHost->Start(); } //Create AppDomain, give it a friendly name hr = pHost->CreateDomain(_bstr_t(domainName),NULL,&pUnk); hr = pUnk->QueryInterface(&appDomain); std::vector<char> UserAssembly = ReadAllBytes(assPath); // Set SafeArray bounds. SAFEARRAYBOUND sabdBounds[1] = {UserAssembly.size(), 0}; // Create pointer for the SafeArray's data. unsigned char *arrayData = NULL; // Create SafeArray. SAFEARRAY *UserAssemblySA = SafeArrayCreate(VT_UI1,1,sabdBounds); // Expose the SafeArray's data pointer. SafeArrayAccessData(UserAssemblySA,(void **)&arrayData); // Copy the Bolter assembly, directly into the SafeArray's data. memcpy(arrayData,UserAssembly.data(),UserAssembly.size()); // Close it all up. SafeArrayUnaccessData(UserAssemblySA); // Load raw assembly data into the AppDomain hr = appDomain->Load_3(UserAssemblySA, &assembly); // Destroy SafeArray SafeArrayDestroy(UserAssemblySA); //Instantiate Main Bolter-XIV Class hr = assembly->CreateInstance(_bstr_t(classtoInstance), launcher); IDispatch *disp = NULL; //Setup dispatcher to pass the unmanaged data disp = launcher->pdispVal; DISPID dispid; //Get Id of PassInfo() method. OLECHAR FAR* methodName = L"PassInfo"; hr = disp->GetIDsOfNames(IID_NULL, &methodName, 1, LOCALE_SYSTEM_DEFAULT, &dispid); //Set as dispatcher parameters DISPPARAMS _disArgs = {args, NULL, 1, 0}; //Invoke PassInfo() and pass the unmanaged data, to the managed library. hr = disp->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &_disArgs, NULL, NULL, NULL); disp->Release(); return 0; } unsigned int DotNetInjection::Unload(const char * domainName) { HDOMAINENUM enumHandle = new HDOMAINENUM(); pHost->EnumDomains(&enumHandle); while (true) { IUnknown* dUnk = NULL; _AppDomain *localAppDomain = NULL; pHost->NextDomain(enumHandle,&dUnk); if (dUnk == NULL) break; dUnk->QueryInterface(&localAppDomain); BSTR localDomainName = NULL; localAppDomain->get_FriendlyName(&localDomainName); if (0 == wcscmp(_bstr_t(domainName),localDomainName)) { pHost->UnloadDomain(localAppDomain); pHost->CloseEnum(enumHandle); SysFreeString(localDomainName); return 0; } SysFreeString(localDomainName); } pHost->CloseEnum(enumHandle); return 0; } using namespace std; vector<char> DotNetInjection::ReadAllBytes(char const* filename) { ifstream ifs(filename, ios::binary|ios::ate); ifstream::pos_type pos = ifs.tellg(); vector<char> result(pos); ifs.seekg(0, ios::beg); ifs.read(&result[0], pos); return result; } BOOL DotNetInjection::IsDomainLoaded(const char * domainName) { if (pHost == NULL) return false; HDOMAINENUM enumHandle = new HDOMAINENUM(); pHost->EnumDomains(&enumHandle); while (true) { IUnknown* dUnk = NULL; _AppDomain *localAppDomain = NULL; pHost->NextDomain(enumHandle,&dUnk); if (dUnk == NULL) break; dUnk->QueryInterface(&localAppDomain); BSTR localDomainName = NULL; localAppDomain->get_FriendlyName(&localDomainName); if (0 == wcscmp(_bstr_t(domainName),localDomainName)) { pHost->CloseEnum(enumHandle); SysFreeString(localDomainName); return true; } SysFreeString(localDomainName); } pHost->CloseEnum(enumHandle); return false; }
e1f90acfe4bb30955d32552f9e2437cc45e4717d
6ba143f4f8c237dbba7d99ec2a8ccdb60a431e5b
/arbor/event_binner.hpp
7d12526457dc0365d57f7a93196a376ca4581938
[ "BSD-3-Clause" ]
permissive
thorstenhater/arbor
0073218bbbe6659d87d2db182610dadb3b6ea5e0
29b09f2d752cb1243eddda31ff0b06675b52fc1f
refs/heads/master
2023-08-31T17:52:30.275512
2021-02-04T06:38:14
2021-02-04T06:38:14
251,275,953
0
1
BSD-3-Clause
2023-02-13T09:42:40
2020-03-30T10:46:55
C++
UTF-8
C++
false
false
947
hpp
event_binner.hpp
#pragma once #include <limits> #include <optional> #include <unordered_map> #include <arbor/common_types.hpp> #include <arbor/spike.hpp> namespace arb { class event_binner { public: event_binner(): policy_(binning_kind::none), bin_interval_(0) {} event_binner(binning_kind policy, time_type bin_interval): policy_(policy), bin_interval_(bin_interval) {} void reset(); // Determine binned time for an event based on policy. // If `t_min` is specified, the binned time will be no lower than `t_min`. // Otherwise the returned binned time will be less than or equal to the parameter `t`, // and within `bin_interval_`. time_type bin(time_type t, time_type t_min = std::numeric_limits<time_type>::lowest()); private: binning_kind policy_; // Interval in which event times can be aliased. time_type bin_interval_; std::optional<time_type> last_event_time_; }; } // namespace arb
3d88960236d595872c9d01e027c15d2ffd8efa7c
31a79633943af23f03b0e4923f16a3f579b6458a
/TP6/src/Plane.h
6f3945f3cc7d525e20665eeaa6259b14b7a2d055
[]
no_license
ludwig801/FEUP-CGRA
ff56ec17dbc32eea2d43d6e46797b91cf4037807
19f44ed1bc2c38cf4caf0148928d14139426654c
refs/heads/master
2021-01-10T21:47:07.036866
2015-11-09T14:04:50
2015-11-09T14:04:50
16,984,358
0
0
null
null
null
null
UTF-8
C++
false
false
349
h
Plane.h
#pragma once #include "CGF\CGFobject.h" #include <iostream> class Plane { public: Plane(void); Plane(int); Plane(int n, double si, double ti, double sf, double tf); ~Plane(void); void draw(); private: int _numDivisions; // Number of triangles that constitute rows/columns double si, sf; double ti, tf; double incS, incT; };
aa3e1552271c764d6096c12f0f8a3204f7421174
486fd7b6a7891cb5c674d541db069bbcb9cd4f52
/Alimentadores/comunica.ino
9d29672aef8943f87c266df93644ec8adc8d4ed2
[]
no_license
TalesMauricio/Codigos-Arduino-Raspberry
c9b579b0faad2e79e71a9e1b523083db119a8c48
1eed47cbcca7fc49150ad8d19327baff8c67faae
refs/heads/master
2021-09-09T16:39:24.194496
2018-03-13T16:44:37
2018-03-13T16:44:37
104,351,356
0
2
null
2017-11-19T21:39:55
2017-09-21T13:25:16
Arduino
UTF-8
C++
false
false
4,075
ino
comunica.ino
//Aqui vai tudo relacionado a comunicação sem fio #include "RF24.h" #include "RF24Network.h" #include "RF24Mesh.h" #define nodeID 2 //1-255 #define intervalo 6000 // tempo em milissegundos para enviar os dados /**** Configure the communication ****/ RF24 radio(CEpin, CSpin); RF24Network network(radio); RF24Mesh mesh(radio, network); void initComunic() { SPI.begin(); mesh.setNodeID(nodeID); Serial.println(F("Conectando...")); radio.setPALevel(RF24_PA_MAX); radio.setDataRate(RF24_1MBPS); radio.setCRCLength(RF24_CRC_16); mesh.begin(); // Serial.println(F("Conectado a malha!")); } bool atualizarMalha() { mesh.update(); /* if (!mesh.checkConnection() ) { Serial.println(F("Conexão perdida, renovando endereço")); mesh.renewAddress(); conectado = false; } conectado = true; */ } void enviaPacote() { if (millis() - pastbat >= 60000) { pastbat = millis(); Nivel_bat(); Nivel_ra(); } if (millis() - past >= intervalo) { past = millis(); cod_erro(); pacote_t pacote = { nodeID, hour(), minute(), nivelRacao, nivelBateria, erro, dados.temperatura, dados.ph, dados.turbidez, dados.condutividade, dados.oxigen}; if (!mesh.write(&pacote, 'M', sizeof(pacote))) { Serial.println(F("Falha ao enviar pacote")); if (!mesh.checkConnection() ) { Serial.println("Renovando Endereço"); mesh.renewAddress(); } else { Serial.println("Falha no envio, Teste OK"); } } else { printPacoteEnviado(); } } /* unsigned long now = millis(); bool atualiza = (now - past) >= intervalo; if (atualiza) { bool enviado; past = now; if( !tempoSinc ) // enviado = mesh.write(&pacote, 'T', sizeof(pacote));//0); else enviado = mesh.write(&pacote, 'M', sizeof(pacote)); if (enviado) printPacoteEnviado(); else Serial.println(F("Falha ao enviar pacote")); }*/ } void recebeDiretriz() { if(network.available()){ RF24NetworkHeader header; network.peek(header); uint32_t dat=0; switch(header.type){ case 'D': //diretriz_t diretriz; network.read(header,&diretriz,sizeof(diretriz)); //agendarDespejo(diretriz); printDiretriz(diretriz); break; case 'T': relogio_t relogio; network.read(header,&relogio,sizeof(relogio)); sincTempo(relogio); printTempo(relogio); break; default: network.read(header,0,0); Serial.println(F("Alguma coisa errada recebida...")); } } } //Outros prints em horario void printPacoteEnviado() { Serial.print(" TX:"); Serial.print(" 1-NodeID: "); Serial.print(nodeID); Serial.print(" 2-Hora: "); Serial.print(hour()); Serial.print(" 3-Minuto: "); Serial.print(minute()); Serial.print(" 4-Nivel: "); Serial.print(nivelRacao); Serial.print(" 5-Bateria: "); Serial.print(nivelBateria); Serial.print(" 6-Erro: "); Serial.print(erro); Serial.print(" temperatura:"); Serial.print(dados.temperatura); Serial.print(" ph:"); Serial.print(dados.ph); Serial.print(" turbidez:"); Serial.print(dados.turbidez); Serial.print(" condutividade:"); Serial.print(dados.condutividade); Serial.print(" oxigenio:"); Serial.println(dados.oxigen); } void printDiretriz(diretriz_t diretriz) { Serial.print(" RX:"); Serial.print(" A-ID:"); Serial.print(diretriz.alimentID); for(int cont=0; cont<6; cont++) { Serial.print(" H"); Serial.print(cont); Serial.print(":"); Serial.print(diretriz.horad[cont]); Serial.print(" M"); Serial.print(cont); Serial.print(":"); Serial.print(diretriz.minutod[cont]); Serial.print(" Q"); Serial.print(cont); Serial.print(":"); Serial.print(diretriz.qtdd[cont]); } Serial.println(" "); }
20bb078ad240fad2dc23027d70d131d13e71698e
8da5eb54981193d850a7e35439845a6b54326c65
/VGP336/Engine/GameObjectFactory.cpp
867f2ebc2bd9b0fffc5983db43c5ba615aea10bb
[]
no_license
tstaples/Cat3D
7eb5cf590798e09a6bdb8bed68bd83fe903d43b8
795d3bfce0eb52b36324ffe9de99269bb40a6ec6
refs/heads/master
2021-01-15T20:43:48.676483
2015-08-14T00:53:56
2015-08-14T00:53:56
28,846,705
0
0
null
null
null
null
UTF-8
C++
false
false
11,172
cpp
GameObjectFactory.cpp
#include "Precompiled.h" #include "GameObjectFactory.h" #include "Component.h" #include "GameWorld.h" #include "MemoryPool.h" #include "IO.h" #include "RenderService.h" #include <json/json.h> #include <fstream> #include <exception> namespace { Service* LookUpService(const Services& services, const char* name) { for (Service* service : services) { if (strcmp(service->GetName(), name) == 0) { return service; } } return nullptr; } //bool CheckServiceDependencies(GameObjectHandle& handle, const char* newComponent, const Service* service) //{ // const GameObject* gameObject = handle.Get(); // // Get the service's dependencies from it's metaclass // const char* serviceName = service->GetName(); // const MetaClass* metaClass = MetaDB::GetMetaClass(serviceName); // const u32 numDependencies = metaClass->GetNumDependencies(); // const MetaDependency* dependencies = metaClass->GetDependencyList(); // for (u32 j=0; j < numDependencies; ++j) // { // // Check if the gameObject already has the dependency, or if it's the item being added // const char* depName = dependencies[j].GetName(); // if (!gameObject->HasComponent(depName) && strcmp(newComponent, depName) != 0) // { // throw new Exceptions::MissingDependencyException(handle, depName); // } // } // return true; //} bool LinkDependency(GameObjectHandle& handle, const Services& services, Component* c) { const GameObject* gameObject = handle.Get(); const MetaClass* metaClass = c->GetMetaClass(); const u32 numDependencies = metaClass->GetNumDependencies(); if (numDependencies == 0) { // Nothing to do return true; } for (u32 j=0; j < numDependencies; ++j) { // Check if any of the component's dependencies match the services const MetaDependency* metaDependency = metaClass->GetDependencyAtIndex(j); const char* depName = metaDependency->GetName(); const char* depTag = metaDependency->GetTag(); if (strcmp(depTag, "Service") == 0) { Service* service = LookUpService(services, depName); if (service != nullptr) { // Subscribe the GameObject to that service. // Note: not using Subscribe's return value since multiple component may need to be subcribed // to the same service, resulting in false positives. service->Subscribe(handle); return true; } } else if (strcmp(depTag, "Component") == 0) { // Dependency is a component, so check if the GameObject has it return gameObject->HasComponent(depName); } } return false; } bool LinkDependencies(GameObjectHandle& handle, const Services& services) { GameObject* gameObject = handle.Get(); for (Component* c : gameObject->GetComponents()) { if (!LinkDependency(handle, services, c)) { return false; } } return true; } void UnHookServices(GameObjectHandle& handle, const Services& services, Component* component) { GameObject* gameObject = handle.Get(); const MetaClass* metaClass = component->GetMetaClass(); const u32 numDeps = metaClass->GetNumDependencies(); for (u32 i=0; i < numDeps; ++i) { const MetaDependency* metaDependency = metaClass->GetDependencyAtIndex(i); const char* depTag = metaDependency->GetTag(); if (strcmp(depTag, "Service") == 0) { // Look up the service and unsubscribe the gameObject const char* depName = metaDependency->GetName(); Service* service = LookUpService(services, depName); if (service != nullptr && gameObject->HasService(service->GetID())) { service->UnSubscribe(handle); } } } } } GameObjectFactory::GameObjectFactory(GameObjectPool& gameObjectPool) : mGameObjectPool(gameObjectPool) { } //---------------------------------------------------------------------------------------------------- GameObjectFactory::~GameObjectFactory() { } //---------------------------------------------------------------------------------------------------- void GameObjectFactory::Initialize(Services& services, GameWorld& world) { mpWorld = &world; mServices = services; } //---------------------------------------------------------------------------------------------------- void GameObjectFactory::Terminate() { } //---------------------------------------------------------------------------------------------------- GameObjectHandle GameObjectFactory::Create(const char* templateFile) { GameObjectHandle handle; // Init to invalid // Read the file into a stream std::ifstream data(templateFile); ASSERT(data.good(), "[GameObjectFactory] Error loading template file: %s", templateFile); Json::Value root; Json::Reader reader; if (!reader.parse(data, root)) { data.close(); OutputDebugStringA(reader.getFormattedErrorMessages().c_str()); return handle; } data.close(); // We have data, so allocate space for the object handle = mGameObjectPool.Allocate(); GameObject* gameObject = handle.Get(); gameObject->spWorld = mpWorld; // Load components Json::Value jcomponents = root["Components"]; const u32 numComponents = jcomponents.size(); for (u32 i=0; i < numComponents; ++i) { Json::Value& jcomponent = jcomponents[i]; // Get the meta class by name and create an instance of the component std::string componentName = jcomponent.get("Name", "").asString(); const MetaClass* metaClass = MetaDB::GetMetaClass(componentName.c_str()); ASSERT(metaClass != nullptr, "[GameObjectFactory] Could not get MetaClass for component with name: %s", componentName); void* instance = metaClass->Create(); Json::Value properties = jcomponent.get("Properties", ""); for (Json::Value& p : properties) { std::string fieldName = p.get("Name", "").asString(); const MetaField* metaField = metaClass->FindField(fieldName.c_str()); ASSERT(metaField != nullptr, "[GameObjectFactory] Could not find field with name: %s", fieldName); // Deserialize the data into the field. // To keep this generic, the data for each field is held in an array void* member = (u8*)instance + metaField->GetOffset(); metaField->GetType()->Deserialize(p.get("Data", ""), member); } // Add the component to the gameObject Component* component = static_cast<Component*>(instance); gameObject->AddComponent(component); } // Subscribe to services // This must be done in a second loop because some services may require a component that hasn't been loaded yet. VERIFY(LinkDependencies(handle, mServices), "[GameObjectFactory] Error: Could not create GameObject from file: %s due to missing dependencies", templateFile); return handle; } //---------------------------------------------------------------------------------------------------- GameObjectHandle GameObjectFactory::Create(SerialReader& reader) { GameObjectHandle handle = mGameObjectPool.Allocate(); GameObject* gameObject = handle.Get(); // TODO: if (gameObject->Deserialize(reader)) { gameObject->spWorld = mpWorld; LinkDependencies(handle, mServices); return handle; } return GameObjectHandle(); // invalid } //---------------------------------------------------------------------------------------------------- bool GameObjectFactory::Destroy(GameObjectHandle handle) { if (!handle.IsValid()) return false; if (OnDestroyGameObject(handle)) { GameObject* gameObject = handle.Get(); GameObject::Components::iterator it = gameObject->mComponents.begin(); for (it; it != gameObject->mComponents.end(); ++it) { Component* component = *it; const MetaClass* metaClass = component->GetMetaClass(); // Unsubscribe from any services UnHookServices(handle, mServices, component); // Delete the component metaClass->Destroy(component); } gameObject->mComponents.clear(); mGameObjectPool.Free(handle); return true; } return false; } //---------------------------------------------------------------------------------------------------- bool GameObjectFactory::AddComponent(GameObjectHandle handle, const char* componentMetaName) { const MetaClass* metaClass = MetaDB::GetMetaClass(componentMetaName); if (metaClass != nullptr) { // TODO: specify in metadata whether multiple of a component can exist Component* component = static_cast<Component*>(metaClass->Create()); if (component == nullptr) { return false; } // Add the component to the gameObject GameObject* gameObject = handle.Get(); gameObject->AddComponent(component); // For now it doesn't matter if the service dependencies aren't met as we can just not subscribe. // In the future this may need to change. LinkDependency(handle, mServices, component); return true; } return false; } //---------------------------------------------------------------------------------------------------- bool GameObjectFactory::RemoveComponent(GameObjectHandle handle, const char* componentMetaName) { GameObject* gameObject = handle.Get(); if (gameObject == nullptr) { return false; } GameObject::Components::iterator it = gameObject->mComponents.begin(); for (it; it != gameObject->mComponents.end(); ++it) { Component* component = *it; // Look up component by name const MetaClass* metaClass = component->GetMetaClass(); if (strcmp(componentMetaName, metaClass->GetName()) == 0) { // Unsubscribe UnHookServices(handle, mServices, component); // Remove and Delete the component gameObject->mComponents.erase(it); metaClass->Destroy(component); return true; } } return false; }
dc22167564432024c427d148b38e349b9afe5a97
5cc38217766f8a49a8a339395d3ca4b4b8161a36
/Servaival/LoadScene.cpp
b6ba58740afd04e2929a27f3ad1cdf8bd54fc36c
[]
no_license
NeuroWhAI/Servaival
e74c5ea28fed5fc5fb85c88103f5ffc93a8827e4
58a143843c1d394b4e165da0c81c764c79983202
refs/heads/master
2021-01-19T08:24:03.617338
2017-04-08T10:20:00
2017-04-08T10:20:00
87,625,009
3
0
null
null
null
null
UTF-8
C++
false
false
2,168
cpp
LoadScene.cpp
#include "LoadScene.h" #include "MenuScene.h" LoadScene::LoadScene() : m_loadInfo("Res/Img/info.txt") , m_loadFileName("...") , m_loadStage(0) , m_loadGage(0) { } LoadScene::~LoadScene() { } //######################################################################################################## void LoadScene::onInitialize(caDraw::Window& owner) { auto winSize = owner.getSize(); m_font = m_pool.createFont("default"); m_font->loadFromFile("Res/Font/GN-KillGothic-U-KanaNA.ttf"); m_font->setCharacterSize(32); m_panel = caFactory->createPanel(); m_panel->size = static_cast<caDraw::SizeF>(winSize); m_panel->transform.position = { 0, 0 }; addPanel(m_panel); } void LoadScene::onRelease() { } void LoadScene::onUpdate(caDraw::Window& owner) { if (m_loadGage <= 0) { m_loadGage = 2; if (m_loadInfo.is_open() == false || m_loadInfo.eof() || m_loadInfo.bad()) { if (m_loadStage < 1) { ++m_loadStage; m_loadInfo.close(); m_loadInfo.clear(); if (m_loadStage == 1) { m_loadInfo.open("Res/Sound/info.txt"); } } else { reserveNextScene<MenuScene>(m_pool); } } else { char name[1024], path[1024]; m_loadInfo.getline(name, 1024); m_loadInfo.getline(path, 1024); m_loadFileName = name; if (m_loadFileName.length() > 0) { if (m_loadStage == 0) { auto tex = m_pool.createTexture(name); tex->loadFromFile(path); } else if (m_loadStage == 1) { auto snd = m_pool.createSound(name); snd->loadFromFile(path); } } else { m_loadInfo.close(); m_loadInfo.clear(); } } } else { --m_loadGage; } } void LoadScene::onDrawBack(caDraw::Graphics& g) { caDraw::PointF center = { m_panel->size.width / 2, m_panel->size.height / 2 }; g.textArtist->beginDrawString(*m_font); g.textArtist->drawString("Loading...", center - caDraw::PointF(0, 64), caDraw::Color::White, caDraw::TextAligns::Center); g.textArtist->drawString(m_loadFileName, center, caDraw::Color::White, caDraw::TextAligns::Center); g.textArtist->endDrawString(); } void LoadScene::onDrawFront(caDraw::Graphics& g) { }
98d41e12c6d822efbb92d45272857cce6eb8c719
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5766201229705216_0/C++/csegura/solver.cpp
e7c3174acf9d92b1a6882bfd47e83a4f7fa07d67
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
2,164
cpp
solver.cpp
#include <iostream> #include <sstream> #include <numeric> #include <set> #include <algorithm> #include <map> #include <vector> #include <queue> #include <stack> #include <list> #include <strings.h> #include <math.h> using namespace std; bool isTree(vector < vector < int > > &graph, int n, int &count){ count = 0; int bit = 0; bool isPresent[graph.size()]; bzero(isPresent, sizeof(isPresent)); while(n != 0){ if (n % 2){ isPresent[bit] = true; count++; } n /= 2; bit++; } if (count == 1){ return true; } int counts[2]; int root = -1; for (int i = 0; i < graph.size(); i++){ if (!isPresent[i]){ continue; } int edges = 0; for (int j = 0; j < graph[i].size(); j++){ if (isPresent[graph[i][j]]){ edges++; } } if (edges == 2){ root = i; break; } } if (root == -1){ return false; } //dfs from root bool visited[graph.size()]; bzero(visited, sizeof(visited)); int current = root; queue< pair<int,int> > pending; pending.push(pair<int, int>(root, -1)); int nVisited = 1; visited[root] = true; while(pending.size()){ int next = pending.front().first; int ignore = pending.front().second; pending.pop(); int countInternal = 0; for (int j = 0; j < graph[next].size(); j++){ if ((isPresent[graph[next][j]]) && (graph[next][j] != ignore)){ if (visited[graph[next][j]]){ return false; } else { countInternal++; visited[graph[next][j]] = true; nVisited++; pending.push(pair<int, int>(graph[next][j], next)); } } } if ((countInternal != 0) && (countInternal != 2)){ return false; } } return (nVisited == count); } int main(){ int tests; cin >> tests; for (int i = 0; i < tests; i++){ int N; cin >> N; vector< vector < int > > graph(N, vector<int>()); for (int j = 0; j < N - 1; j++){ int xj, yj; cin >> xj >> yj; xj--; yj--; graph[xj].push_back(yj); graph[yj].push_back(xj); } int result = -1; for (int j = 0; j < (1 << N); j++){ int count; if (isTree(graph, j, count)){ if (count > result){ result = count; } } } cout << "Case #" << (i+1) << ": " << N - result << endl; } }
b73a2593e2c697b881baa66dd1b21781b74e91d0
7f60f2136e67be1c008c0b24375711630e92461b
/red_belt/6week/final1/search_server.h
e72210886f472557d09f130c9c56d849c42e0e2e
[]
no_license
ebriussenex/cplusplus-issue
d4995e002f978b9243d15057f20ea8357d27e68d
2a0488a3d4106a408a74466c4cd6e5072810f405
refs/heads/master
2022-11-06T16:35:28.922698
2020-06-29T05:04:27
2020-06-29T05:04:27
195,709,767
0
0
null
null
null
null
UTF-8
C++
false
false
1,458
h
search_server.h
#pragma once #include "add_duration.h" #include <istream> #include <ostream> #include <set> #include <list> #include <vector> #include <map> #include <string> #include <unordered_map> using namespace std; vector<string_view> SplitIntoWords(string_view line); class InvertedIndex { public: InvertedIndex() { docs.reserve(50000); index.reserve(10010); } void Add(string document); const size_t GetIndexSize() const; const vector<pair<unsigned short int, size_t>>& Lookup(string_view word) const; const string& GetDocument(size_t id) const { return docs[id]; } size_t getDocsSize() { return docs.size(); } private: vector<pair<unsigned short int, size_t>> empty_ = {}; unordered_map<string_view, vector<pair<unsigned short int, size_t>>> index; vector<string> docs; size_t doc_id = 0; }; class SearchServer { public: SearchServer() = default; explicit SearchServer(istream& document_input); void UpdateDocumentBase(istream& document_input); void AddQueriesStream(istream& query_input, ostream& search_results_output); private: TotalDuration reset{ "reset" }; TotalDuration lookup{ "Lookup" }; // TotalDuration split{"AddQueries SplitWords"}; TotalDuration psort{ "AddQueries partial_sort" }; // TotalDuration add{"InvertedIndex add"}; // TotalDuration update{"InvertedIndex update"}; InvertedIndex index; };
35178a79836f624674f22db2e9ebdff9b7574b48
0674e81a160161996251fb4b063c801330ccd1e2
/codechef/SNCK151C/ANKINTER.cpp
a07992a918ae027f17c972d9dbd18614a2c5ae3a
[]
no_license
joshuabezaleel/cp
8a2c9b44605810da4367efeb981f822ae5e1e9a2
57f365458cca38c3c0fb1f5af1c6b44b74f3b53e
refs/heads/master
2022-07-19T00:39:34.395495
2020-05-23T20:37:20
2020-05-23T20:37:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,556
cpp
ANKINTER.cpp
#include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <utility> #include <numeric> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime> #include <cassert> #include <limits> using namespace std; #ifdef DEBUG #define debug(...) printf(__VA_ARGS__) #define GetTime() fprintf(stderr,"Running time: %.3lf second\n",((double)clock())/CLOCKS_PER_SEC) #else #define debug(...) #define GetTime() #endif //type definitions typedef long long ll; typedef double db; typedef pair<int,int> pii; typedef vector<int> vint; //abbreviations #define A first #define B second #define MP make_pair #define PB push_back //macros #define REP(i,n) for (int i = 0; i < (n); ++i) #define REPD(i,n) for (int i = (n)-1; 0 <= i; --i) #define FOR(i,a,b) for (int i = (a); i <= (b); ++i) #define FORD(i,a,b) for (int i = (a); (b) <= i; --i) #define FORIT(it,c) for (__typeof ((c).begin()) it = (c).begin(); it != (c).end(); it++) #define ALL(a) (a).begin(),(a).end() #define SZ(a) ((int)(a).size()) #define RESET(a,x) memset(a,x,sizeof(a)) #define EXIST(a,s) ((s).find(a) != (s).end()) #define MX(a,b) a = max((a),(b)); #define MN(a,b) a = min((a),(b)); inline void OPEN(const string &s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } /* -------------- end of azaky's template -------------- */ int main() { scanf("%d", &ntc); FOR(itc, 1, ntc) { scanf("%d%d", &n, &w); REP(i, n) { scanf("%d", &a[i]); } // init here vector<pii> maxx, minn; ll ans = 0; REP(i, n) { int x = a[i]; int imin = SZ(minn), imax = SZ(maxx); while (imin >= 0 && minn[imin - 1].A > x) { imin--; } while (imax >= 0 && maxx[imax - 1].A < x) { imax--; } // increasing index data.update(1, i, -1); // updating min and max FOR(j, imin, SZ(minn) - 1) { int l = j ? minn[j - 1].B + 1 : 1; int r = minn[j].B; data.update(l, r, minn[j].A - x); } FOR(j, imax, SZ(maxx) - 1) { int l = j ? maxx[j - 1].B + 1 : 1; int r = maxx[j].B; data.update(l, r, x - maxx[j].A); } while (SZ(minn) > imin) minn.pop_back(); while (SZ(maxx) > imax) maxx.pop_back(); minn.PB(MP(x, i + 1)); maxx.PB(MP(x, i + 1)); ans += (ll)data.query(1, i - w + 2); } printf("%lld\n", ans); } return 0; }
3b80e1da689c780bbd5460c6b91f68f811df98b0
23d3335c229be08687909ec5516d40b885a1f7c3
/Geometry2D/src/convex_hull_gl.cpp
82a0b2fb5e2fefd9df7099763f2c60c79b94f70b
[]
no_license
carlosraoni/Geometria-Computacional
58c5ff20e8aec4a5ff154843c0556dd746261d3a
822e8e03d9ddecf3a268bc15aa504c03d09bc12b
refs/heads/master
2016-09-08T11:38:23.366396
2012-12-06T18:48:11
2012-12-06T18:48:11
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
7,362
cpp
convex_hull_gl.cpp
#include <GL/glut.h> // Header File For The GLUT Library #include <GL/gl.h> // Header File For The OpenGL32 Library #include <GL/glu.h> // Header File For The GLu32 Library #include <cstdlib> #include <cstdio> #include <ctime> #include <cmath> #include <iostream> #include "geometry2d.h" /* ASCII code for the escape key. */ #define ESCAPE 27 using namespace std; using namespace geometry2d; typedef enum{GRAHAM_SCAN, DIVIDE_AND_CONQUER} CONVEX_HULL_ALGORITHM; /* The number of our GLUT window */ int window; const int X_SIZE = 640; const int Y_SIZE = 480; /* A general OpenGL initialization function. Sets all of the initial parameters. */ void InitGL(int Width, int Height) // We call this right after our OpenGL window is created. { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // This Will Clear The Background Color To Black glClearDepth(1.0); // Enables Clearing Of The Depth Buffer glDepthFunc(GL_LESS); // The Type Of Depth Test To Do glEnable(GL_DEPTH_TEST); // Enables Depth Testing glShadeModel(GL_SMOOTH); // Enables Smooth Color Shading glEnable( GL_POINT_SMOOTH ); glPointSize( 3.0 ); glBlendFunc(GL_SRC_ALPHA,GL_ONE); glMatrixMode(GL_PROJECTION); glLoadIdentity(); // Reset The Projection Matrix gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f); // Calculate The Aspect Ratio Of The Window glMatrixMode(GL_MODELVIEW); } /* The function called when our window is resized (which shouldn't happen, because we're fullscreen) */ void ReSizeGLScene(int Width, int Height) { if (Height==0) // Prevent A Divide By Zero If The Window Is Too Small Height=1; glViewport(0, 0, Width, Height); // Reset The Current Viewport And Perspective Transformation glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,5000.0f); glMatrixMode(GL_MODELVIEW); } void resetColor(){ glColor3f(1.0, 1.0, 1.0); } // Pontos a serem exibidos vector<Point2D> p; // Convex Hull de p vector<Point2D> ch; void drawPolygon(const vector<Point2D> & poli){ int n = poli.size(); if(n == 0) return; glBegin(GL_LINE_STRIP); // start drawing a polygon for(int i = 0; i < n; i++) glVertex2f( poli[i].getX(), poli[i].getY()); // Top glVertex2f( poli[0].getX(), poli[0].getY()); glEnd(); // we're done with the polygon resetColor(); } void drawPoints(){ int n = p.size(); if(n == 0) return; glBegin(GL_POINTS); glColor3f(1.0, 0.0, 0.0); for(int i=0; i<n; i++) glVertex2f(p[i].getX(), p[i].getY()); glEnd(); resetColor(); } /* The main drawing function. */ void DrawGLScene() { // Setup a 2D projection glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho (0, X_SIZE, Y_SIZE, 0, 0, 1); glDisable(GL_DEPTH_TEST); glMatrixMode (GL_MODELVIEW); glLoadIdentity(); //Displacement trick for exact pixelization glTranslatef(0.375, 0.375, 0); // Draw a scene glClearColor(.3, .3, .3, 0); glClear(GL_COLOR_BUFFER_BIT); drawPoints(); drawPolygon(ch); // swap buffers to display, since we're double buffered. glutSwapBuffers(); } // Algoritmos de convex hull GrahamScanAlgorithm graham; DivideAndConquerConvexHullAlgorithm divideAndConquer; ConvexHullAlgorithm * defaultAlgorithm; void generateRandomPoint(){ double noise = 1.0 / (rand() + 1.0); p.push_back(Point2D((rand() % X_SIZE) - noise, (rand() % Y_SIZE) - noise)); } void addNewPoint(int x, int y){ p.push_back(Point2D(x, y)); } void runGrahamScan(){ if(p.size() < 2) return; ch = p; graham.convexHull(ch); } void runDefaultAlgorithm(){ if(p.size() < 2) return; ch = p; defaultAlgorithm->convexHull(ch); } void runDivideAndConquer(){ if(p.size() < 2) return; ch = p; divideAndConquer.convexHull(ch); } void clearAll(){ p.clear(); ch.clear(); } /* The function called whenever a key is pressed. */ void keyPressed(unsigned char key, int x, int y) { /* avoid thrashing this procedure */ //usleep(100); switch(key){ case 'c': clearAll(); break; case 'p': generateRandomPoint(); break; case 'g': runGrahamScan(); break; case 'd': runDivideAndConquer(); break; } /* If escape is pressed, kill everything. */ if (key == ESCAPE){ /* shut down our window */ glutDestroyWindow(window); /* exit the program...normal termination. */ exit(0); } } void onClick(int button, int state, int x, int y){ //GLUT_DOWN – When mouse button is pressed //GLUT_UP – When mouse button is released if(state == GLUT_UP) return; // GLUT_LEFT_BUTTON – when left mouse button click is detected // GLUT_RIGHT_BUTTON - when right mouse button click is detected // GLUT_MIDDLE_BUTTON – when middle mouse button click is detected switch(button){ case GLUT_LEFT_BUTTON: addNewPoint(x, y); break; case GLUT_RIGHT_BUTTON: runDefaultAlgorithm(); break; case GLUT_MIDDLE_BUTTON: clearAll(); break; } } int main(int argc, char **argv) { srand(time(0)); cout << "--- Convex Hull Tests How to Use ---" << endl << endl; cout << "Mouse Actions: " << endl << endl; cout << "\t Left Click - Generate Point on Click Position" << endl; cout << "\t Right Click - Run default Convex Hull Algorithm" << endl; cout << "\t Middle Click - Clear" << endl << endl; cout << "Keyboard Actions: " << endl << endl; cout << "\t P - Generate Random Point" << endl; cout << "\t G - Run Graham Scan" << endl; cout << "\t D - Run Divide and Conquer" << endl; cout << "\t C - Clear" << endl; cout << "\t ESC - Exit Program" << endl << endl; cout << "Choose the default Convex Hull Algorithm: " << endl; cout << "\t 0 - Graham Scan" << endl; cout << "\t 1 - Divide and Conquer" << endl; int option; cin >> option; if(option == GRAHAM_SCAN){ cout << endl << "Using Graham Scan as default algorithm" << endl; defaultAlgorithm = &graham; } else{ cout << endl << "Using Divide and Conquer as default algorithm" << endl; defaultAlgorithm = &divideAndConquer; } /* Initialize GLUT state - glut will take any command line arguments that pertain to it or X Windows - look at its documentation at http://reality.sgi.com/mjk/spec3/spec3.html */ glutInit(&argc, argv); /* Select type of Display mode: Double buffer RGBA color Alpha components supported Depth buffer */ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH); /* get a 640 x 480 window */ glutInitWindowSize(X_SIZE, Y_SIZE); /* the window starts at the upper left corner of the screen */ glutInitWindowPosition(0, 0); /* Open a window */ window = glutCreateWindow("Convex Hull Algorithm Tests"); /* Register the function to do all our OpenGL drawing. */ glutDisplayFunc(&DrawGLScene); /* Go fullscreen. This is the soonest we could possibly go fullscreen. */ //glutFullScreen(); /* Even if there are no events, redraw our gl scene. */ glutIdleFunc(&DrawGLScene); /* Register the function called when our window is resized. */ glutReshapeFunc(&ReSizeGLScene); /* Register the function called when the keyboard is pressed. */ glutKeyboardFunc(&keyPressed); /* Tratar clique do mouse */ glutMouseFunc(&onClick); /* Initialize our window. */ InitGL(X_SIZE, Y_SIZE); /* Start Event Processing Engine */ glutMainLoop(); return 0; }
374d8674cf1ea0254cd6035eced2e09ddee0b38d
a823aa651f2a2c5f78dc167771b66a20e6236490
/840.cpp
ba720ca32516f705f7188c426a9ccb8286d51824
[]
no_license
maxioul/leetcode_practice
a8ff89d07228098c46d2368eaa81a6ab61ed71ca
f327ea4fe4dd501106cb0c31057dbcb4366022f1
refs/heads/master
2023-03-06T03:01:05.590121
2021-02-04T02:26:39
2021-02-04T02:26:39
266,527,352
0
0
null
null
null
null
UTF-8
C++
false
false
1,258
cpp
840.cpp
class Solution { public: int numMagicSquaresInside(vector<vector<int>>& grid) { int output=0; int i=0,j=0; int max_i = grid.size()-2; int max_j = grid[0].size()-2; while(i<max_i){ j=0; while(j<max_j){ vector<int>temp; for(int a =0;a<3;a++){ for(int b=0;b<3;b++){ temp.push_back(grid[i+a][j+b]); } } output+=Check(temp); j++; } i++; } return output; } int Check(vector<int>a){ int row[3]={0,0,0}; int clo[3]={0,0,0}; vector<int>check(10,1); for(int i=0;i<9;i++){ if(a[i]>9||a[i]<1||check[a[i]]==0){ return 0; } row[i/3]+=a[i]; clo[i%3]+=a[i]; check[a[i]]=0; } for(int i =0;i<3;i++){ if(row[i]!=15||clo[i]!=15){ return 0; } } if(a[0]+a[4]+a[8]!=15){ return 0; } if(a[2]+a[4]+a[6]!=15){ return 0; } return 1; } };
cb50c3cd8950d3ddf4a91d2f7cd8b5f128845745
c0b1f0e7c2a690a1993ee6a7829e58d32f082424
/thor/code/Thor/Framework/Filesystem/ThiFileStream.h
79404843deebe8bfea1b2027b24ae059a14b5c58
[ "MIT" ]
permissive
Soth1985/Thor
2c05189c5af0b8d3ce4fe6640f0b48cd57d2ff15
4e1c939183ce3e7f8ae4150cfe190f8f00d0f0b2
refs/heads/master
2020-12-25T19:03:55.824820
2015-01-01T14:12:43
2015-01-01T14:12:43
28,458,675
0
0
null
null
null
null
UTF-8
C++
false
false
1,626
h
ThiFileStream.h
#ifndef THOR_FS_THIFILESTREAM_H #define THOR_FS_THIFILESTREAM_H #include <Thor/Framework/Filesystem/FSLibConfig.h> #include <Thor/Framework/Filesystem/ThiDataStream.h> #include <iostream> #include <fstream> #include <iterator> #include <string> namespace Thor{ THOR_INLINE ThString FileExtension( const ThString& fileName ) { size_t pos=fileName.find_last_of("."); if( pos!=ThString::npos ) return ThString( &fileName[pos+1], &fileName[fileName.length()] ); else return ThString(); } //---------------------------------------------------------------------------------------- // // ThiFileStream // //---------------------------------------------------------------------------------------- /*! * \brief * A stream for handling file IO, base class for implementation of * streams dealing with FILE*, std::fstream, etc. * */ class THOR_FRAMEWORK_DLL ThiFileStream:public ThiDataStream { public: ThiFileStream(const ThString& filename_,eStreamMode::Val streamMode_=eStreamMode::ReadMode,eFileWriteMode::Val writeMode_=eFileWriteMode::Append); eFileWriteMode::Val GetWriteMode()const; const ThString& GetFileName()const; virtual ThiAsyncResultPtr BeginRead(void* buf, ThSize bufOffset, ThSize size, const ThiAsyncResultCallback& callback); virtual ThiAsyncResultPtr BeginWrite(const void* buf, ThSize bufOffset, ThSize size, const ThiAsyncResultCallback& callback); protected: /*! * \brief * Name of the file. */ ThString m_Filename; /*! * \brief * File write mode. */ eFileWriteMode::Val m_WriteMode; }; }//Thor #endif
04f6cd9460f33c313532521b75e67809636c6157
a9e308c81c27a80c53c899ce806d6d7b4a9bbbf3
/engine/xray/render/engine/effect_deffer_aref.h
0b1fad03171c9b875242019120637a31dc34d13c
[]
no_license
NikitaNikson/xray-2_0
00d8e78112d7b3d5ec1cb790c90f614dc732f633
82b049d2d177aac15e1317cbe281e8c167b8f8d1
refs/heads/master
2023-06-25T16:51:26.243019
2020-09-29T15:49:23
2020-09-29T15:49:23
390,966,305
1
0
null
null
null
null
UTF-8
C++
false
false
1,154
h
effect_deffer_aref.h
//////////////////////////////////////////////////////////////////////////// // Created : 20.02.2009 // Author : Mykhailo Parfeniuk // Copyright (C) GSC Game World - 2009 //////////////////////////////////////////////////////////////////////////// #ifndef BLENDER_DEFFER_AREF_H_INCLUDED #define BLENDER_DEFFER_AREF_H_INCLUDED #include <xray/render/engine/effect_deffer_base.h> namespace xray { namespace render_dx10 { class effect_deffer_aref: public effect_deffer_base, boost::noncopyable { public: effect_deffer_aref(bool is_lmapped); virtual void compile(effect_compiler& compiler, const effect_compilation_options& options); virtual void load(memory::reader& mem_reader); private: void compile_blended(effect_compiler& compiler, const effect_compilation_options& options); private: // These members are temporary. Needed to use constant local binding storage in effect_compiler when implemented. static u32 const m_aref_val = 200; static u32 const m_aref_val220 = 220; bool m_blend; bool m_is_lmapped; }; // class effect_deffer_aref } // namespace render } // namespace xray #endif // #ifndef BLENDER_DEFFER_AREF_H_INCLUDED
b45981ae0d504642963db702821df3e32b31b216
d24f6a1dbd9d68e5662ab248ec400883fbf19c02
/RedWire/src/Interface/Window/HelpWindow.cpp
8d83da2886dfb2ffc98292a00ecb608a186e8140
[]
no_license
GaryHuan9/RedWire
d600534aab9a6fd9ec813b35c13e03d70a3f40a1
fd3f458ae343da2dea472fa7a872eb496b6cc2b0
refs/heads/master
2023-06-24T04:13:44.549257
2021-07-24T20:41:53
2021-07-24T20:41:53
382,692,967
1
0
null
null
null
null
UTF-8
C++
false
false
1,923
cpp
HelpWindow.cpp
#include "imgui.h" #include "HelpWindow.h" #include "../../Application.h" #include "../../Control/InputManager.h" #include "../../Control/Tool.h" #include <string> using namespace RedWire; HelpWindow::HelpWindow(Application& application) : UIWindow(application) {} void HelpWindow::showUI() { bool active = isActive(); if (ImGui::Begin("Help", &active, ImGuiWindowFlags_HorizontalScrollbar)) { auto& inputManager = application.find<InputManager>(); ImGui::Text("RedWire is a 2D logic circuit builder made by MMX3VII and CXRedix"); ImGui::Dummy(ImVec2(0.0f, 20.0f)); ImGui::Text("The [Toolbox] consists of multiple sections that can be used to control and monitor all nessessary parameters and information"); ImGui::Text("To start making a circuit, place down [Wires] by selecting the [WireAdder] in the [Toolbox] and start drawing in the square [Grid]"); if (ImGui::CollapsingHeader("How to basics")) { ImGui::Text("You can navigate around the [Grid] by dragging with the [Middle Mouse Button] or pressing the WASD keys"); ImGui::Text("Note that all navigation and keyboard shortcuts are disabled while you are interacting with the [Toolbox]"); ImGui::Text("The circuit logic is simulated based on [Ticks], which are usually triggered automatically as time passes"); ImGui::Text("You can control the [Ticks] in the [General] section of [Toolbox]"); ImGui::Dummy(ImVec2(0.0f, 10.0f)); ImGui::Text("More information about individual tools can be found below in the Tools section"); } if (ImGui::CollapsingHeader("Tools")) { if (ImGui::BeginTabBar("Tools Tab")) { for (auto& item : inputManager.tools) { if (!ImGui::BeginTabItem(item.second->getName())) continue; ImGui::PushID(&item); item.second->showHelpUI(); ImGui::PopID(); ImGui::EndTabItem(); } ImGui::EndTabBar(); } } } setActive(active); ImGui::End(); }
2e19c1fa560551713f0a789f97d1bf58335928ec
64f108413f9dea7fdd36aa3a10717b89f45396fa
/Array/majorityNumber.cpp
1afe4bb5711f5a55c07b23316dc496baab643e4a
[]
no_license
AlexLai1990/Leetcode_-_-
a0b54441722f82b30ef777fbf7c42b007232e6d5
98eca56b44fb362b9271dfdb25fb2c3c889550bb
refs/heads/master
2021-01-06T20:42:17.043087
2015-03-16T23:24:52
2015-03-16T23:24:52
25,856,040
0
0
null
2014-10-28T07:56:59
2014-10-28T06:25:49
C++
UTF-8
C++
false
false
444
cpp
majorityNumber.cpp
class Solution { public: int majorityElement(vector<int> &num) { int m_majority, count = 0; for (int i = 0; i < num.size(); i++) { if (count == 0) { m_majority = num[i]; count++; } else if (m_majority == num[i]) { count++; } else { count--; } } return m_majority; } };
e8a5d70fcca01005ffbb9e10e65582f8e0b66959
22c8fe57c49a385be90c17a1f72d3d70a89e22ec
/explore/src/meexplore.cpp
2655b70fb814012db31de0981e33df39445b1197
[]
no_license
abmoRobotics/P1
ddf852737d88e6d98281fbcde2927c17642ae943
0dc89af862e6bf8328a97917c1479199322021ec
refs/heads/master
2020-08-10T17:11:26.299873
2020-01-08T15:01:56
2020-01-08T15:01:56
214,382,997
1
0
null
2019-11-26T10:17:57
2019-10-11T08:23:58
CMake
UTF-8
C++
false
false
348
cpp
meexplore.cpp
/* #include <explore/explore.h> #include <std_srvs/Empty.h> class dinmor{ explore::Explore explorer; public: dinmor(){ } void start(){ explorer.start(); } }; int main(int argc, char* argv[]) { ROS_INFO("guten tag"); ros::init(argc, argv, "meexplore"); dinmor e; ros::NodeHandle n; e.start(); ros::spin(); return 0; } */
071fb7849d4d7bd1bcabd87402f4df88c641a8ba
2b04bbdc96af45d1932ee0b5facdec2444ca27e2
/test.cpp
1de53ca84cc41ca433512912da65015e0d1aa4d6
[]
no_license
nc1729/sudoku_solver
4164e8bd76726a8b542e26d014910dfcaeab0d8b
2ea3e5fc3f95a429208546b928e49104ccf6699a
refs/heads/master
2023-03-03T04:53:32.286498
2021-02-02T23:13:32
2021-02-02T23:13:32
335,449,480
0
0
null
null
null
null
UTF-8
C++
false
false
390
cpp
test.cpp
#include <array> #include <cassert> #include "solver.h" void test_is_ok() { std::array<int, 9> test_array = {1,2,3,4,5,6,7,8,9}; std::array<int, 9> test_array2 = {7,0,0,2,6,1,4,0,3}; std::array<int, 9> test_array3 = {0,0,0,1,1,2,3,4,5}; assert(is_ok(test_array)); assert(is_ok(test_array2)); assert(not is_ok(test_array3)); } void run_tests() { test_is_ok(); }
4cc5c1db26bed63b2ae7845d6528fdbbbe377e26
924ae327c5a830cb9dfbbaf97fb60b13d24016a6
/Code/Editor.cpp
1709baaef7b6afc430d8f8dc4c05d0784285f7eb
[]
no_license
AdeptusForge/MAADeditor
11158e38f0298c8cca45036b383b8be98b687e1a
293109f796b096fc6c5d19672920528bd49399ac
refs/heads/master
2021-07-14T16:29:33.326928
2020-04-08T11:07:41
2020-04-08T11:07:41
220,296,313
0
1
null
null
null
null
UTF-8
C++
false
false
4,969
cpp
Editor.cpp
#include "Editor.h" #if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) #include <GL/gl3w.h> // Initialize with gl3wInit() #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) #include <GL/glew.h> // Initialize with glewInit() #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) #include <glad/glad.h> // Initialize with gladLoadGL() //#else //#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM #endif #include <glad/glad.h> #include <GLFW/glfw3.h> #include "imgui/imgui.h" #include "imgui/imgui_impl_glfw.h" #include "imgui/imgui_impl_opengl3.h" #include "imgui/imgui_stdlib.h" #include <stdio.h> #include "Debug.h" #include "Render.h" #include "FileControl.h" bool show_save_window = false; bool show_new_window = false; bool show_creationWindow = false; bool show_selectionWindow = false; bool tex_edit = false; bool color_edit = false; Vertex clear_color = Vertex(glm::vec3(0.45f, 0.55f, 0.60f), glm::vec3(0), glm::vec2(0)); RenderObject* currentModel; std::vector<Vertex*> selectedVerts; void EditorStartup(GLFWwindow* window) { #if __APPLE__ // GL 3.2 + GLSL 150 const char* glsl_version = "#version 150"; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac #else // GL 3.0 + GLSL 130 const char* glsl_version = "#version 130"; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only #endif #if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) bool err = gl3wInit() != 0; #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) bool err = glewInit() != GLEW_OK; #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) bool err = gladLoadGL() == 0; #else bool err = false; // If you use IMGUI_IMPL_OPENGL_LOADER_CUSTOM, your loader is likely to requires some form of initialization. #endif IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO& io = ImGui::GetIO(); (void)io; ImGui::StyleColorsDark(); ImGui_ImplGlfw_InitForOpenGL(window, true); ImGui_ImplOpenGL3_Init(glsl_version); } void ShowMenuBar() { ImGui::BeginMainMenuBar(); if (ImGui::BeginMenu("File")) { if (ImGui::MenuItem("New")) { WriteDebug(std::to_string(show_creationWindow)); show_creationWindow = true; } if (ImGui::MenuItem("Open")) { currentModel = GetRenderObject(1); show_selectionWindow = true; } if (ImGui::BeginMenu("Save", "CTRL+S")) { if (ImGui::MenuItem("Save")) { } if (ImGui::MenuItem("Save As")) { } ImGui::EndMenu(); } ImGui::EndMenu(); } if (ImGui::BeginMenu("OptionsTest")) { static bool enabled = true; ImGui::MenuItem("Enabled", "", &enabled); ImGui::BeginChild("child", ImVec2(0, 60), true); for (int i = 0; i < 10; i++) ImGui::Text("Scrolling Text %d", i); ImGui::EndChild(); static float f = 0.5f; static int n = 0; static bool b = true; ImGui::SliderFloat("Value", &f, 0.0f, 1.0f); ImGui::InputFloat("Input", &f, 0.1f); ImGui::Combo("Combo", &n, "Yes\0No\0Maybe\0\0"); ImGui::Checkbox("Check", &b); ImGui::EndMenu(); } ImGui::EndMainMenuBar(); } void DisplayVertexUI(int i, Vertex* vertex) { std::string vertName1 = "vPosition" + std::to_string(i); std::string vertName2 = "vColor" + std::to_string(i); std::string vertName3 = "vTextureCoords" + std::to_string(i); ImGui::InputFloat3(vertName1.c_str(), (float*)& vertex->position); if(color_edit) ImGui::ColorEdit3(vertName2.c_str(), (float*)& vertex->color); if (tex_edit) ImGui::InputFloat2(vertName3.c_str(), (float*)& vertex->texCoords); } void SelectionWindow() { ImGui::Begin("Selection Window"); ImGui::Checkbox("Edit Colors", &color_edit); ImGui::Checkbox("Edit Texture Coordinates", &tex_edit); for (int i = 0; i < currentModel->objModel.vertices.size(); i++) { DisplayVertexUI(i, &(currentModel->objModel.vertices[i])); } ImGui::End(); } void EditorUpdate(GLFWwindow* window) { ImGui_ImplOpenGL3_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); ShowMenuBar(); if (show_selectionWindow) SelectionWindow(); ImGui::SetNextWindowPos(ImVec2(1, 1), ImGuiCond_FirstUseEver); if (show_creationWindow) { ImGui::Begin("Creation Window"); static std::string fileName; ImGui::InputText("FileName", &fileName); if (ImGui::Button("Create File")) { SaveActiveFile(ObjTextureFile, fileName, "whatever"); show_creationWindow = false; } ImGui::End(); } ImGui::Render(); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); } void EditorShutdown() { ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); }
ac5bc6e5c5d1ec0b31a68fde124d6d26f470f86e
1c2473511307fd304246eecd3881b4781387ed1c
/sword2offer/60.Print.cpp
2b015c9fe851abcbcf5a20e4fccadfeba49a64b3
[]
no_license
git-hub-tig/nowcoder
e2f425d7300738bf4120829bee0e3842d4304ffb
921a7b432aff890aeb27927271487051094795cd
refs/heads/master
2022-09-26T12:37:08.659939
2020-06-05T17:07:58
2020-06-05T17:07:58
267,293,125
0
0
null
2020-05-27T10:47:37
2020-05-27T10:47:36
null
UTF-8
C++
false
false
962
cpp
60.Print.cpp
//把二叉树打印成多行 //https://www.nowcoder.com/practice/445c44d982d04483b04a54f298796288 class Solution { public: vector<vector<int> > Print(TreeNode* pRoot) { queue<TreeNode*> q; vector<vector<int>> result; if(pRoot == NULL) return result; q.push(pRoot); TreeNode* last,*nlast = pRoot; vector<int> line; while(!q.empty()){ TreeNode* pNode = q.front(); q.pop(); line.push_back(pNode->val); if(pNode->left) q.push(pNode->left); if(pNode->right) q.push(pNode->right); if(!q.empty()) last = q.back(); if(pNode == nlast){ result.push_back(line); line.resize(0); nlast = last; } } return result; } };
0b1c38c76476a94b8513040cd3d79f77bf55c44a
4eb58b82b857edde83e8ed99dc10f59e8ea2c71f
/10970/10970.cpp
4bc0df88a9e0caf668fcb1f5ef38edced8a0356b
[]
no_license
RezaMokaram/Solutions-to-UVAonlinejudge-problems
18be6d1d7ca302c233e077546d7ad4bffa9f1448
e4117ed247ff3f707cd71e84df662835affb1077
refs/heads/master
2023-06-11T06:47:05.602555
2023-06-03T01:59:10
2023-06-03T01:59:10
248,146,437
0
0
null
null
null
null
UTF-8
C++
false
false
402
cpp
10970.cpp
#include <iostream> #include <string> #include <cmath> #include <vector> #include <iomanip> #include <algorithm> using namespace std; int main() { int a, b; while (cin >> a >> b) { if (a <= 1 && b <= 1 || a == 0 || b == 0) { cout << 0 << endl; continue; } if (b < a) { int temp = b; b = a; a = temp; } int sum2 = (a - 1) + (a * (b - 1)); cout << sum2 << endl; } }
96ce68988c3e4cb44a6090d179bc1cdaf2cfe53f
63bfb3e7f9b7e6be9f780763ce36202a3b40bfcc
/KOD - verzije/v5 - v4++/TIMER.CPP
b2cdb18851e4391c5aef60eaee0f1125a06a2126
[]
no_license
fishsalad183/ETF-OS1
ac8719737a771f48aa2d6277d01227d2763363c5
d478bce2227c4d6946ad0dc3c2e3d56ae4819bd7
refs/heads/master
2021-07-12T02:02:36.266146
2020-06-08T19:50:36
2020-06-08T19:50:36
150,605,463
0
0
null
null
null
null
UTF-8
C++
false
false
2,865
cpp
TIMER.CPP
#include <dos.h> #include "TIMER.H" #include "DEFS.H" #include "PCB.H" #include "SCHEDULE.H" #include "IDLE.H" #include "KERNSEM.H" #include "thread.h" //#include <iostream.h> // for timer diagnostics extern void tick(); extern IdleThread* idle; extern Thread* starting; volatile unsigned int lockflag = 1; volatile int context_change_requested = 0; // equals 1 when context change could not be executed due to lockflag being set to 0 volatile int explicit_call = 0; // denotes that timer(...) is invoked by dispatch() volatile Time counter = defaultTimeSlice; // what to initialize with? unsigned tsp; unsigned tss; unsigned tbp; void interrupt timer(...) { // this occurs when timer is called "naturally", every 55ms and not by dispatch() if (! explicit_call) { KernelSem::timerInform(); // informs all semaphores of passing time if (counter != infiniteTimeSlice && counter != 0) counter--; tick(); asm int 60h; // calls the old routine } if (explicit_call || context_change_requested || counter == 0) { if (lockflag) { context_change_requested = 0; asm { mov tsp, sp mov tss, ss mov tbp, bp } int runningStatus = PCB::running->status; // TIMER DIAGNOSTICS /* cout << "CONTEXT CHANGE! COUNTER, STATUS, ID = " << counter << ", " << runningStatus << ", " << Thread::getRunningID() << endl; asm cli; // in case cout caused sti */ PCB::running->sp = tsp; PCB::running->ss = tss; PCB::running->bp = tbp; if (runningStatus == RUNNING /*&& PCB::running != idle*/) { // RUNNING != IDLE, BLOCKED, FINISHED PCB::running->status = READY; Scheduler::put((PCB*) PCB::running); } PCB::running = Scheduler::get(); if (PCB::running == 0) { PCB::running = idle->myPCB; } else { PCB::running->status = RUNNING; } counter = PCB::running->timeSlice; tsp = PCB::running->sp; tss = PCB::running->ss; tbp = PCB::running->bp; asm { mov sp, tsp mov ss, tss mov bp, tbp } } else context_change_requested = 1; } explicit_call = 0; } void initialize() { LOCK #ifndef BCC_BLOCK_IGNORE pInterrupt oldRoutine = getvect(0x8); setvect(0x60, oldRoutine); setvect(0x8, timer); #endif starting = new Thread(); // starting thread - represents main function starting->myPCB->status = RUNNING; PCB::running = starting->myPCB; idle = new IdleThread(); idle->start(); UNLOCK } void restore() { if (PCB::running != starting->myPCB) return; // in case some other thread calls this function LOCK #ifndef BCC_BLOCK_IGNORE pInterrupt oldRoutine = getvect(0x60); setvect(0x8, oldRoutine); #endif // no more context-changing periodic interrupts delete idle; delete starting; UNLOCK }
903dc24be1ebdb3aaaa1452dee35da07890db13f
d588b67b3a694318c0ddc1ba99839ee948c53fc9
/CartesianLuajitCore/src/CartesianPluginLoader.cpp
7e57e3e5705a4e4b28334cf2c0888d145175a432
[]
no_license
gearslogy/Cartesian
9f599dcff88347478e89f0a8b51b10009320a406
13e088da181991629c0593154a43692876eeb2bc
refs/heads/master
2023-08-06T23:56:30.372721
2021-09-10T07:17:50
2021-09-10T07:17:50
285,244,846
10
4
null
null
null
null
UTF-8
C++
false
false
3,505
cpp
CartesianPluginLoader.cpp
// // Created by admin on 2020/8/2. // #include "CartesianPluginLoader.h" #include <iostream> #include <cstdlib> #include <direct.h> #include <boost/dll/import.hpp> // for import_alias namespace dll = boost::dll; namespace Cartesian{ std::vector<dllsymbolfunc> PluginLoader::loadPlugins() { // FUNCTION VECTOR POOL std::vector<dllsymbolfunc> dllSignalPools; pathdir program_path(std::filesystem::current_path()); // check parent is document std::filesystem::directory_entry entry(program_path); assert(entry.status().type() == std::filesystem::file_type::directory); //std::cout << "CARTESIAN::Loading plugins: " << program_path << std::endl; // going to the program docment, then find a DIR: dso std::filesystem::directory_iterator files(program_path) ; for(auto &it: files){ if(it.status().type()!= std::filesystem::file_type::directory) continue; // In DSO dir, load the dyn libs *.dll const pathdir& dsoDir= it.path(); std::filesystem::directory_iterator dsoFiles(dsoDir) ; for(auto &dso : dsoFiles){ const pathdir& dsopath = dso.path(); // if not a file if(dso.status().type() == std::filesystem::file_type::directory) continue; // if not a dll if(dsopath.generic_string().find(".dll") == -1) continue; //std::cout << "CARTESIAN::Trying to open lib:" << dsopath << std::endl; auto dllsig = openlib(dsopath); if(dllsig) dllSignalPools.emplace_back(dllsig); } } // Try to find env path if(const char* env_p = std::getenv("CARTESIAN_PLUGINS")) { //std::cout << "CARTESIAN::Loading plugins: " << env_p << std::endl; std::filesystem::directory_iterator customPluginFiles(env_p); for(auto &dso : customPluginFiles){ const pathdir& dsopath = dso.path(); if(dso.status().type() == std::filesystem::file_type::directory) continue; if(dsopath.generic_string().find(".dll") == -1) continue; //std::cout << "CARTESIAN::Trying to open lib:" << dsopath << std::endl; auto dllsig = openlib(dsopath); if(dllsig) dllSignalPools.emplace_back(dllsig); } } return std::move(dllSignalPools); } // end of loading plugins dllsymbolfunc PluginLoader::openlib(const pathdir &libPath) { auto path = libPath.generic_string(); // try to search the function object // OUR SIGNAL IS: // extern "C" CARTESIAN_EXPORT void newOpFunction( void *table); dll::shared_library lib(path); std::string symbol= "newOp"; if(lib.has(symbol)) { //std::cout <<"CARTESIAN::Register function from:" <<libPath << std::endl; std::function<void (void *)> newOpSignal = dll::import<void(void *)>(lib,symbol); //newOpSignal(lua); // we do not eval in here return std::move(newOpSignal); } return nullptr; } void PluginLoader::dispatch(const std::vector<dllsymbolfunc> &signals, sol::state *lua) { for(auto &sym: signals){ sym(lua); } } }
03b8c2af1e583320ed2bb302efba9d5c6f19e833
36c1c4a8502c07c3da9d6fd4f169d0b6a492fab1
/QtWidgetUsageExample/QtWidgetUsageExample/QtWidgetUsageExample.cpp
8f6cfb222898026381e31c73a787d267ff109c45
[ "MIT" ]
permissive
ArchanShaikan/QtVisualStudioCustomWidget
cf0c0bb9efbfb850687ca1119504a2b0056c19d9
077e2096585b71d3a6b2801f57460119b2fc35d1
refs/heads/master
2021-05-25T17:21:47.479375
2020-04-07T16:15:44
2020-04-07T16:15:44
253,840,924
2
0
null
null
null
null
UTF-8
C++
false
false
141
cpp
QtWidgetUsageExample.cpp
#include "QtWidgetUsageExample.h" QtWidgetUsageExample::QtWidgetUsageExample(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); }
9e8e8bdf3b43205b493228273abd6efe2a6a7a61
69c3a9292a8b76696695712329cd68b56a5ba2c8
/Volume 0/0038.cpp
4fd91dff4b44ecdccb97587ff14df954100a6e25
[]
no_license
yuta1024/aoj
ebbf7ccc03d1adf00c2301559a8d835fba5e4003
da24890eaf199f7eb2cb98bfed1bf7e1c533b586
refs/heads/master
2021-01-02T22:37:55.372004
2012-09-18T11:36:43
2012-09-18T11:36:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,221
cpp
0038.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <map> #include <functional> using namespace std; int main() { vector<int> cards(5); while (~scanf("%d,%d,%d,%d,%d", &cards[0], &cards[1], &cards[2], &cards[3], &cards[4])) { sort(cards.begin(), cards.end()); vector<int> cnt(15, 0); for (unsigned int i = 0; i < cards.size(); ++i) ++cnt[cards[i]]; sort(cnt.begin(), cnt.end(), greater<int>()); if (cnt[0] == 4) { cout << "four card" << endl; } else if (cnt[0] == 3 && cnt[1] == 2) { cout << "full house" << endl; } else { bool straight = true; for (unsigned int i = 1; i < cards.size(); ++i) { if (cards[i-1]+1 != cards[i]) straight = false; } if (straight || (cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13)) { cout << "straight" << endl; } else if (cnt[0] == 3) { cout << "three card" << endl; } else if (cnt[0] == 2 && cnt[1] == 2) { cout << "two pair" << endl; } else if (cnt[0] == 2) { cout << "one pair" << endl; } else { cout << "null" << endl; } } } return 0; }
d1349b2a3d02a8a6a49e0ed3272949ac4ed65d4c
a1b9e94281552485a5b032a64d0ca9a1ec99f184
/runMuMuTauETauEAnalyzer.cc
9188fbd6c04f0c24e58efc4ca8078255091b149c
[]
no_license
gracehaza/MuMuTauTauAnalyzer
9a2b6f281e57eca74f570d82ae4ed7d8dd8ce81d
deb0d6f99edf23438bba14f0e97f00a81266709d
refs/heads/master
2022-09-05T20:13:01.956825
2021-10-08T12:43:28
2021-10-08T12:43:28
233,645,307
0
0
null
2020-06-03T14:09:35
2020-01-13T16:49:57
C++
UTF-8
C++
false
false
10,067
cc
runMuMuTauETauEAnalyzer.cc
#include <fstream> #include <TString.h> #include "ArgParser.h" #include "ConfigArg.h" #include "MuMuTauETauEAnalyzer.h" #include "lumiana.h" using namespace std; int main(int argc, char **argv) { //--- Load configuration --- ConfigArg cfg; TString inputFile = cfg.getS("inputFile"); TString outputDir = cfg.getS("outputDir"); TString doWhat = cfg.getS("doWhat", "DYJETS"); Long_t maxEvents = cfg.getL("maxEvents", -1); double lumi = cfg.getD("lumi", 1); bool invertedMu2Iso = cfg.getB("invertedMu2Iso", false); bool invertedEle1Iso = cfg.getB("invertedEle1Iso", false); double Mu2IsoThreshold = cfg.getD("Mu2IsoThreshold", 0.25); double Ele1IsoThresholdBarrel = cfg.getD("Ele1IsoThresholdBarrel", 0.5); double Ele2IsoThresholdBarrel = cfg.getD("Ele2IsoThresholdBarrel", 0.5); double Ele1IsoThresholdEndcap = cfg.getD("Ele1IsoThresholdEndcap", 0.5); double Ele2IsoThresholdEndcap = cfg.getD("Ele2IsoThresholdEndcap", 0.5); double diMuonMassLowThreshold = cfg.getD("diMuonMassLowThreshold", 0); double diMuonMassHighThreshold = cfg.getD("diMuonMassHighThreshold", 25.0); bool tauMVAIsoRawORWP = cfg.getB("tauMVAIsoRawORWP", true); double tauMVAIsoRawThreshold = cfg.getD("tauMVAIsoRawThreshold", -0.5); TString tauMVAIsoWP = cfg.getS("tauMVAIsoWP", "MEDIUM"); TString tauAntiMuDisc = cfg.getS("tauAntiMuDisc", "NULL"); //--- Parse the arguments ----------------------------------------------------- if (argc > 1) { for (int i = 1; i < argc; ++i) { TString currentArg = argv[i]; //--- possible options --- if (currentArg.BeginsWith("inputFile=")) { getArg(currentArg, inputFile); } else if (currentArg.BeginsWith("outputDir=")) { getArg(currentArg, outputDir); } else if (currentArg.BeginsWith("doWhat=")) { getArg(currentArg, doWhat); } else if (currentArg.BeginsWith("maxEvents=")) { getArg(currentArg, maxEvents); } else if (currentArg.BeginsWith("lumi=")) { getArg(currentArg, lumi); } else if (currentArg.BeginsWith("invertedMu2Iso=")) { getArg(currentArg, invertedMu2Iso); } else if (currentArg.BeginsWith("invertedEle1Iso=")) { getArg(currentArg, invertedEle1Iso); } else if (currentArg.BeginsWith("Mu2IsoThreshold=")) { getArg(currentArg, Mu2IsoThreshold); } else if (currentArg.BeginsWith("Ele1IsoThresholdBarrel=")) { getArg(currentArg, Ele1IsoThresholdBarrel); } else if (currentArg.BeginsWith("Ele2IsoThresholdBarrel=")) { getArg(currentArg, Ele2IsoThresholdBarrel); } else if (currentArg.BeginsWith("Ele1IsoThresholdEndcap=")) { getArg(currentArg, Ele1IsoThresholdEndcap); } else if (currentArg.BeginsWith("Ele2IsoThresholdEndcap=")) { getArg(currentArg, Ele2IsoThresholdEndcap); } else if (currentArg.BeginsWith("diMuonMassLowThreshold=")) { getArg(currentArg, diMuonMassLowThreshold); } else if (currentArg.BeginsWith("diMuonMassHighThreshold=")) { getArg(currentArg, diMuonMassHighThreshold); } else if (currentArg.BeginsWith("tauMVAIsoRawORWP=")) { getArg(currentArg, tauMVAIsoRawORWP); } else if (currentArg.BeginsWith("tauMVAIsoRawThreshold=")) { getArg(currentArg, tauMVAIsoRawThreshold); } else if (currentArg.BeginsWith("tauMVAIsoWP=")) { getArg(currentArg, tauMVAIsoWP); } else if (currentArg.BeginsWith("tauAntiMuDisc=")) { getArg(currentArg, tauAntiMuDisc); } } // end for loop in argc } // end if argc > 1 doWhat.ToUpper(); //------------------------- data histograms production ------------------- if (doWhat == "DATA" || doWhat == "ALL") { if (inputFile.EndsWith(".root")) { MuMuTauETauEAnalyzer DataHist(inputFile, outputDir, 1, 1, maxEvents, false, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, diMuonMassLowThreshold, diMuonMassHighThreshold); DataHist.Loop(); } // end if inputFile.EndsWith(".root") else{ ifstream finTree; finTree.open(inputFile); string fileName; while (getline(finTree, fileName)) { MuMuTauETauEAnalyzer DataHist(fileName, outputDir, 1, 1, maxEvents, false, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, diMuonMassLowThreshold, diMuonMassHighThreshold); DataHist.Loop(); } // end while loop on file list } // end else inputFile.EndsWith(".root") } // end if data // ----- This variable is to be used for MC reweighting ----- float summedWeights = 0; // ------------------------ MC histogram production ------------------ if (doWhat == "DYJETS" || doWhat == "ALL") { if (inputFile.EndsWith(".root")) { lumiana DYJetsLumi(inputFile); summedWeights = DYJetsLumi.Loop(); MuMuTauETauEAnalyzer DYJetsHist(inputFile, outputDir, lumi*2075.14*3*1000, summedWeights, maxEvents, true, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, diMuonMassLowThreshold, diMuonMassHighThreshold); DYJetsHist.Loop(); } // end if inputFile.EndsWith(".root") else{ ifstream finLumi; finLumi.open(inputFile); string fileName; while (getline(finLumi, fileName)) { lumiana DYJetsLumi(fileName); summedWeights += DYJetsLumi.Loop(); }// end while loop for weight sum ifstream finTree; finTree.open(inputFile); while (getline(finTree, fileName)) { MuMuTauETauEAnalyzer DYJetsHist(fileName, outputDir, lumi*2075.14*3*1000, summedWeights, maxEvents, true, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, diMuonMassLowThreshold, diMuonMassHighThreshold); DYJetsHist.Loop(); } // end while loop on input file list } // end else } // end if DYJets // --- always need to reinitialize the weight parameter for new sample ----- summedWeights = 0; if (doWhat == "WJETS" || doWhat == "ALL") { if (inputFile.EndsWith(".root")) { lumiana WJetsLumi(inputFile); summedWeights = WJetsLumi.Loop(); MuMuTauETauEAnalyzer WJetsHist(inputFile, outputDir, lumi*61526.7*1000, summedWeights, maxEvents, true, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, diMuonMassLowThreshold, diMuonMassHighThreshold); WJetsHist.Loop(); } // end if inputFile.EndsWith(".root") else{ ifstream finLumi; finLumi.open(inputFile); string fileName; while (getline(finLumi, fileName)) { lumiana WJetsLumi(fileName); summedWeights += WJetsLumi.Loop(); }// end while loop for weight sum ifstream finTree; finTree.open(inputFile); while (getline(finTree, fileName)) { MuMuTauETauEAnalyzer WJetsHist(fileName, outputDir, lumi*61526.7*1000, summedWeights, maxEvents, true, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, diMuonMassLowThreshold, diMuonMassHighThreshold); WJetsHist.Loop(); } // end while loop on input file list } // end else } // end if WJets // --- always need to reinitialize the weight parameter for new sample ----- summedWeights = 0; if (doWhat == "H125AA5" || doWhat == "ALL") { if (inputFile.EndsWith(".root")) { lumiana H125AA5Lumi(inputFile); summedWeights = H125AA5Lumi.Loop(); MuMuTauETauEAnalyzer H125AA5Hist(inputFile, outputDir, 1, 1, maxEvents, true, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, Ele2IsoThresholdBarrel, Ele1IsoThresholdEndcap, Ele2IsoThresholdEndcap, diMuonMassLowThreshold, diMuonMassHighThreshold,tauMVAIsoRawORWP, tauMVAIsoRawThreshold, tauMVAIsoWP, tauAntiMuDisc); H125AA5Hist.Loop(); } // end if inputFile.EndsWith(".root") else{ ifstream finLumi; finLumi.open(inputFile); string fileName; while (getline(finLumi, fileName)) { lumiana H125AA5Lumi(fileName); summedWeights += H125AA5Lumi.Loop(); } // end while loop for weight sum ifstream finTree; finTree.open(inputFile); while (getline(finTree, fileName)) { MuMuTauETauEAnalyzer H125AA5Hist(fileName, outputDir, 1, 1, maxEvents, true, invertedMu2Iso, invertedEle1Iso, Mu2IsoThreshold, Ele1IsoThresholdBarrel, Ele2IsoThresholdBarrel, Ele1IsoThresholdEndcap, Ele2IsoThresholdEndcap, diMuonMassLowThreshold, diMuonMassHighThreshold,tauMVAIsoRawORWP, tauMVAIsoRawThreshold, tauMVAIsoWP, tauAntiMuDisc); H125AA5Hist.Loop(); } // end while loop on input file list } // end else } // end if H125AA5 signal return 0; }
e4a269bcb2fbe65e0be3fdf88b408874f53274cb
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/browser/ui/xr/xr_session_request_consent_dialog_delegate.cc
f8a7bbda1c30aaa53cf35f2a987eae5c97dd1590
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
C++
false
false
2,949
cc
xr_session_request_consent_dialog_delegate.cc
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/xr/xr_session_request_consent_dialog_delegate.h" #include <utility> #include "chrome/browser/ui/tab_modal_confirm_dialog.h" #include "chrome/browser/vr/metrics/consent_flow_metrics_helper.h" #include "chrome/grit/generated_resources.h" #include "content/public/browser/web_contents.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/ui_base_types.h" namespace vr { XrSessionRequestConsentDialogDelegate::XrSessionRequestConsentDialogDelegate( content::WebContents* web_contents, base::OnceCallback<void(bool)> response_callback) : TabModalConfirmDialogDelegate(web_contents), response_callback_(std::move(response_callback)), url_(web_contents->GetLastCommittedURL().GetAsReferrer().spec()), metrics_helper_( ConsentFlowMetricsHelper::InitFromWebContents(web_contents)) {} XrSessionRequestConsentDialogDelegate:: ~XrSessionRequestConsentDialogDelegate() = default; base::string16 XrSessionRequestConsentDialogDelegate::GetTitle() { return l10n_util::GetStringUTF16(IDS_XR_CONSENT_DIALOG_TITLE); } base::string16 XrSessionRequestConsentDialogDelegate::GetDialogMessage() { return l10n_util::GetStringUTF16(IDS_XR_CONSENT_DIALOG_DESCRIPTION); } base::string16 XrSessionRequestConsentDialogDelegate::GetAcceptButtonTitle() { return l10n_util::GetStringUTF16( IDS_XR_CONSENT_DIALOG_BUTTON_ALLOW_AND_ENTER_VR); } base::string16 XrSessionRequestConsentDialogDelegate::GetCancelButtonTitle() { return l10n_util::GetStringUTF16(IDS_XR_CONSENT_DIALOG_BUTTON_DENY_VR); } void XrSessionRequestConsentDialogDelegate::OnAccepted() { OnUserActionTaken(true); metrics_helper_->LogUserAction(ConsentDialogAction::kUserAllowed); metrics_helper_->LogConsentFlowDurationWhenConsentGranted(); } void XrSessionRequestConsentDialogDelegate::OnCanceled() { OnUserActionTaken(false); metrics_helper_->LogUserAction(ConsentDialogAction::kUserDenied); metrics_helper_->LogConsentFlowDurationWhenConsentNotGranted(); } void XrSessionRequestConsentDialogDelegate::OnClosed() { OnUserActionTaken(false); metrics_helper_->LogUserAction(ConsentDialogAction::kUserAbortedConsentFlow); metrics_helper_->LogConsentFlowDurationWhenUserAborted(); } void XrSessionRequestConsentDialogDelegate::OnUserActionTaken(bool allow) { std::move(response_callback_).Run(allow); metrics_helper_->OnDialogClosedWithConsent(url_, allow); } void XrSessionRequestConsentDialogDelegate::OnShowDialog() { metrics_helper_->OnShowDialog(); } base::Optional<int> XrSessionRequestConsentDialogDelegate::GetDefaultDialogButton() { return ui::DIALOG_BUTTON_OK; } base::Optional<int> XrSessionRequestConsentDialogDelegate::GetInitiallyFocusedButton() { return ui::DIALOG_BUTTON_CANCEL; } } // namespace vr
0a92adc082f8f65bd1851e8a163971a32dd7bf08
68cbf53681b14187d34915ab053435103d154e6f
/002_SRM144_DIV2/BinaryCode_550/BinaryCode.cpp
ea80a526353fa1ee785ae2624d848d5ab0188a53
[]
no_license
LoveWX/TopCoder_SRM_mycode
16cecd12f94a6b152edc27b8f3e6aaf77852a7c1
038a4b848cd2f18104bdbf8641a788296a16c794
refs/heads/master
2016-09-06T01:10:20.547855
2015-04-22T16:03:36
2015-04-22T16:03:36
34,399,877
0
0
null
null
null
null
UTF-8
C++
false
false
7,913
cpp
BinaryCode.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> using namespace std; class BinaryCode { public: vector <string> decode(string); }; vector <string> BinaryCode::decode(string message) { int first,second,current,i; char t[2]="0"; vector<string> ans(2); string s0="0"; first=0; second=0; current=0; for(i=1;i<message.size();i++) { current=message[i-1]-'0'-first-second; if(current!=0&&current!=1) break; t[0]=current+'0'; s0+=string(t); first=second; second=current; } if((current==0||current==1)&&current+first==message[message.size()-1]-'0') { ans[0]=s0; } else { ans[0]="NONE"; } string s1="1"; first=0; second=1; current=1; for(i=1;i<message.size();i++) { current=message[i-1]-'0'-first-second; if(current!=0&&current!=1) break; t[0]=current+'0'; s1+=string(t); first=second; second=current; } if((current==0||current==1)&&current+first==message[message.size()-1]-'0') { ans[1]=s1; } else { ans[1]="NONE"; } return ans; } double test0() { string p0 = "123210122"; BinaryCode * obj = new BinaryCode(); clock_t start = clock(); vector <string> my_answer = obj->decode(p0); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string t1[] = { "011100011", "NONE" }; vector <string> p1(t1, t1+sizeof(t1)/sizeof(string)); cout <<"Desired answer: " <<endl; cout <<"\t{ "; if (p1.size() > 0) { cout <<"\""<<p1[0]<<"\""; for (int i=1; i<p1.size(); i++) cout <<", \"" <<p1[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; cout <<endl <<"Your answer: " <<endl; cout <<"\t{ "; if (my_answer.size() > 0) { cout <<"\""<<my_answer[0]<<"\""; for (int i=1; i<my_answer.size(); i++) cout <<", \"" <<my_answer[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; if (my_answer != p1) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } } double test1() { string p0 = "11"; BinaryCode * obj = new BinaryCode(); clock_t start = clock(); vector <string> my_answer = obj->decode(p0); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string t1[] = { "01", "10" }; vector <string> p1(t1, t1+sizeof(t1)/sizeof(string)); cout <<"Desired answer: " <<endl; cout <<"\t{ "; if (p1.size() > 0) { cout <<"\""<<p1[0]<<"\""; for (int i=1; i<p1.size(); i++) cout <<", \"" <<p1[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; cout <<endl <<"Your answer: " <<endl; cout <<"\t{ "; if (my_answer.size() > 0) { cout <<"\""<<my_answer[0]<<"\""; for (int i=1; i<my_answer.size(); i++) cout <<", \"" <<my_answer[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; if (my_answer != p1) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } } double test2() { string p0 = "22111"; BinaryCode * obj = new BinaryCode(); clock_t start = clock(); vector <string> my_answer = obj->decode(p0); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string t1[] = { "NONE", "11001" }; vector <string> p1(t1, t1+sizeof(t1)/sizeof(string)); cout <<"Desired answer: " <<endl; cout <<"\t{ "; if (p1.size() > 0) { cout <<"\""<<p1[0]<<"\""; for (int i=1; i<p1.size(); i++) cout <<", \"" <<p1[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; cout <<endl <<"Your answer: " <<endl; cout <<"\t{ "; if (my_answer.size() > 0) { cout <<"\""<<my_answer[0]<<"\""; for (int i=1; i<my_answer.size(); i++) cout <<", \"" <<my_answer[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; if (my_answer != p1) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } } double test3() { string p0 = "123210120"; BinaryCode * obj = new BinaryCode(); clock_t start = clock(); vector <string> my_answer = obj->decode(p0); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string t1[] = { "NONE", "NONE" }; vector <string> p1(t1, t1+sizeof(t1)/sizeof(string)); cout <<"Desired answer: " <<endl; cout <<"\t{ "; if (p1.size() > 0) { cout <<"\""<<p1[0]<<"\""; for (int i=1; i<p1.size(); i++) cout <<", \"" <<p1[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; cout <<endl <<"Your answer: " <<endl; cout <<"\t{ "; if (my_answer.size() > 0) { cout <<"\""<<my_answer[0]<<"\""; for (int i=1; i<my_answer.size(); i++) cout <<", \"" <<my_answer[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; if (my_answer != p1) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } } double test4() { string p0 = "3"; BinaryCode * obj = new BinaryCode(); clock_t start = clock(); vector <string> my_answer = obj->decode(p0); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string t1[] = { "NONE", "NONE" }; vector <string> p1(t1, t1+sizeof(t1)/sizeof(string)); cout <<"Desired answer: " <<endl; cout <<"\t{ "; if (p1.size() > 0) { cout <<"\""<<p1[0]<<"\""; for (int i=1; i<p1.size(); i++) cout <<", \"" <<p1[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; cout <<endl <<"Your answer: " <<endl; cout <<"\t{ "; if (my_answer.size() > 0) { cout <<"\""<<my_answer[0]<<"\""; for (int i=1; i<my_answer.size(); i++) cout <<", \"" <<my_answer[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; if (my_answer != p1) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } } double test5() { string p0 = "12221112222221112221111111112221111"; BinaryCode * obj = new BinaryCode(); clock_t start = clock(); vector <string> my_answer = obj->decode(p0); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string t1[] = { "01101001101101001101001001001101001", "10110010110110010110010010010110010" }; vector <string> p1(t1, t1+sizeof(t1)/sizeof(string)); cout <<"Desired answer: " <<endl; cout <<"\t{ "; if (p1.size() > 0) { cout <<"\""<<p1[0]<<"\""; for (int i=1; i<p1.size(); i++) cout <<", \"" <<p1[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; cout <<endl <<"Your answer: " <<endl; cout <<"\t{ "; if (my_answer.size() > 0) { cout <<"\""<<my_answer[0]<<"\""; for (int i=1; i<my_answer.size(); i++) cout <<", \"" <<my_answer[i]<<"\""; cout <<" }" <<endl; } else cout <<"}" <<endl; if (my_answer != p1) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } } int main() { int time; bool errors = false; time = test0(); if (time < 0) errors = true; time = test1(); if (time < 0) errors = true; time = test2(); if (time < 0) errors = true; time = test3(); if (time < 0) errors = true; time = test4(); if (time < 0) errors = true; time = test5(); if (time < 0) errors = true; if (!errors) cout <<"You're a stud (at least on the example cases)!" <<endl; else cout <<"Some of the test cases had errors." <<endl; return 0; } //Powered by [KawigiEdit] 2.0!
1af94292210942e1cca42791c87af3b8be86e547
a5392bca8a2728980b7d2c42b846da1508c05634
/samsung/c++/13458.cpp
219d30db31f026e7e595fa74e71b79de72186e71
[]
no_license
shin0park/Algorithm-Problems
7d3a79054d4a10eadf38ef45910720eb14044689
b8d9364e0ef5c8dc8bd197fd272f08e07b375225
refs/heads/master
2022-12-30T12:46:29.701349
2020-10-15T09:34:09
2020-10-15T09:34:09
288,099,317
1
0
null
null
null
null
UHC
C++
false
false
442
cpp
13458.cpp
//시험감독 #include <iostream> using namespace std; const int MAX = 1000001; int arr[MAX]; int b, c, n; long long sum; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i]; } cin >> b >> c; for (int i = 0; i < n; i++) { if (arr[i] - b <= 0) sum++;//총감독 else { sum++;//총감독 sum += ((arr[i] - b) / c);//부감독 if ((arr[i] - b) % c != 0) {//나머지 sum++; } } } cout << sum; }
d302ff0189adbabfd1f8ea12c3eeaab149352d4e
0c141972d779ec44c1f252194514ad9c464aef2e
/mailnews/addrbook/src/nsAbLDIFService.cpp
dbc6f882d3c2437d2546936e7429b859351eed3b
[]
no_license
mozilla/releases-comm-central
6a47ae14f6e24b4ff22998ca957078b7956b04e2
d4838a15a8dbad6d5d9b7e6f486e43bf1511f87a
refs/heads/master
2022-02-12T03:24:52.518381
2022-02-12T00:34:15
2022-02-12T00:34:15
4,578,344
137
101
null
2023-07-25T20:56:40
2012-06-06T21:42:18
JavaScript
UTF-8
C++
false
false
26,011
cpp
nsAbLDIFService.cpp
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsAbBaseCID.h" #include "nsIAbDirectory.h" #include "nsIAbCard.h" #include "nsString.h" #include "nsAbLDIFService.h" #include "nsIFile.h" #include "nsILineInputStream.h" #include "nsIInputStream.h" #include "nsNetUtil.h" #include "nsISeekableStream.h" #include "mdb.h" #include "plstr.h" #include "prmem.h" #include "prprf.h" #include "nsCRTGlue.h" #include "nsTArray.h" #include <ctype.h> NS_IMPL_ISUPPORTS(nsAbLDIFService, nsIAbLDIFService) // If we get a line longer than 32K it's just toooooo bad! #define kTextAddressBufferSz (64 * 1024) nsAbLDIFService::nsAbLDIFService() { mStoreLocAsHome = false; mLFCount = 0; mCRCount = 0; } nsAbLDIFService::~nsAbLDIFService() {} #define RIGHT2 0x03 #define RIGHT4 0x0f #define CONTINUED_LINE_MARKER '\001' // XXX TODO fix me // use the NSPR base64 library. see plbase64.h // see bug #145367 static unsigned char b642nib[0x80] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff}; NS_IMETHODIMP nsAbLDIFService::ImportLDIFFile(nsIAbDirectory* aDirectory, nsIFile* aSrc, bool aStoreLocAsHome, uint32_t* aProgress) { NS_ENSURE_ARG_POINTER(aSrc); NS_ENSURE_ARG_POINTER(aDirectory); mStoreLocAsHome = aStoreLocAsHome; char buf[1024]; char* pBuf = &buf[0]; int32_t startPos = 0; uint32_t len = 0; nsTArray<int32_t> listPosArray; // where each list/group starts in ldif file nsTArray<int32_t> listSizeArray; // size of the list/group info int32_t savedStartPos = 0; int32_t filePos = 0; uint64_t bytesLeft = 0; nsCOMPtr<nsIInputStream> inputStream; nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), aSrc); NS_ENSURE_SUCCESS(rv, rv); // Initialize the parser for a run... mLdifLine.Truncate(); while (NS_SUCCEEDED(inputStream->Available(&bytesLeft)) && bytesLeft > 0) { if (NS_SUCCEEDED(inputStream->Read(pBuf, sizeof(buf), &len)) && len > 0) { startPos = 0; while (NS_SUCCEEDED(GetLdifStringRecord(buf, len, startPos))) { if (mLdifLine.Find("groupOfNames") == -1) AddLdifRowToDatabase(aDirectory, false); else { // keep file position for mailing list listPosArray.AppendElement(savedStartPos); listSizeArray.AppendElement(filePos + startPos - savedStartPos); ClearLdifRecordBuffer(); } savedStartPos = filePos + startPos; } filePos += len; if (aProgress) *aProgress = (uint32_t)filePos; } } // last row if (!mLdifLine.IsEmpty() && mLdifLine.Find("groupOfNames") == -1) AddLdifRowToDatabase(aDirectory, false); // mail Lists int32_t i, pos; uint32_t size; int32_t listTotal = listPosArray.Length(); char* listBuf; ClearLdifRecordBuffer(); // make sure the buffer is clean nsCOMPtr<nsISeekableStream> seekableStream = do_QueryInterface(inputStream, &rv); NS_ENSURE_SUCCESS(rv, rv); for (i = 0; i < listTotal; i++) { pos = listPosArray[i]; size = listSizeArray[i]; if (NS_SUCCEEDED( seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, pos))) { // Allocate enough space for the lists/groups as the size varies. listBuf = (char*)PR_Malloc(size); if (!listBuf) continue; if (NS_SUCCEEDED(inputStream->Read(listBuf, size, &len)) && len > 0) { startPos = 0; while (NS_SUCCEEDED(GetLdifStringRecord(listBuf, len, startPos))) { if (mLdifLine.Find("groupOfNames") != -1) { AddLdifRowToDatabase(aDirectory, true); if (NS_SUCCEEDED( seekableStream->Seek(nsISeekableStream::NS_SEEK_SET, 0))) break; } } } PR_FREEIF(listBuf); } } rv = inputStream->Close(); NS_ENSURE_SUCCESS(rv, rv); return rv; } /* * str_parse_line - takes a line of the form "type:[:] value" and splits it * into components "type" and "value". if a double colon separates type from * value, then value is encoded in base 64, and parse_line un-decodes it * (in place) before returning. * in LDIF, non-ASCII data is treated as base64 encoded UTF-8 */ nsresult nsAbLDIFService::str_parse_line(char* line, char** type, char** value, int* vlen) const { char *p, *s, *d, *byte, *stop; char nib; int i, b64; /* skip any leading space */ while (isspace(*line)) { line++; } *type = line; for (s = line; *s && *s != ':'; s++) ; /* NULL */ if (*s == '\0') { return NS_ERROR_FAILURE; } /* trim any space between type and : */ for (p = s - 1; p > line && isspace(*p); p--) { *p = '\0'; } *s++ = '\0'; /* check for double : - indicates base 64 encoded value */ if (*s == ':') { s++; b64 = 1; /* single : - normally encoded value */ } else { b64 = 0; } /* skip space between : and value */ while (isspace(*s)) { s++; } /* if no value is present, error out */ if (*s == '\0') { return NS_ERROR_FAILURE; } /* check for continued line markers that should be deleted */ for (p = s, d = s; *p; p++) { if (*p != CONTINUED_LINE_MARKER) *d++ = *p; } *d = '\0'; *value = s; if (b64) { stop = PL_strchr(s, '\0'); byte = s; for (p = s, *vlen = 0; p < stop; p += 4, *vlen += 3) { for (i = 0; i < 3; i++) { if (p[i] != '=' && (p[i] & 0x80 || b642nib[p[i] & 0x7f] > 0x3f)) { return NS_ERROR_FAILURE; } } /* first digit */ nib = b642nib[p[0] & 0x7f]; byte[0] = nib << 2; /* second digit */ nib = b642nib[p[1] & 0x7f]; byte[0] |= nib >> 4; byte[1] = (nib & RIGHT4) << 4; /* third digit */ if (p[2] == '=') { *vlen += 1; break; } nib = b642nib[p[2] & 0x7f]; byte[1] |= nib >> 2; byte[2] = (nib & RIGHT2) << 6; /* fourth digit */ if (p[3] == '=') { *vlen += 2; break; } nib = b642nib[p[3] & 0x7f]; byte[2] |= nib; byte += 3; } s[*vlen] = '\0'; } else { *vlen = (int)(d - s); } return NS_OK; } /* * str_getline - return the next "line" (minus newline) of input from a * string buffer of lines separated by newlines, terminated by \n\n * or \0. this routine handles continued lines, bundling them into * a single big line before returning. if a line begins with a white * space character, it is a continuation of the previous line. the white * space character (nb: only one char), and preceding newline are changed * into CONTINUED_LINE_MARKER chars, to be deleted later by the * str_parse_line() routine above. * * it takes a pointer to a pointer to the buffer on the first call, * which it updates and must be supplied on subsequent calls. */ char* nsAbLDIFService::str_getline(char** next) const { char* lineStr; char c; if (*next == nullptr || **next == '\n' || **next == '\0') { return (nullptr); } lineStr = *next; while ((*next = PL_strchr(*next, '\n')) != NULL) { c = *(*next + 1); if (isspace(c) && c != '\n') { **next = CONTINUED_LINE_MARKER; *(*next + 1) = CONTINUED_LINE_MARKER; } else { *(*next)++ = '\0'; break; } } return (lineStr); } nsresult nsAbLDIFService::GetLdifStringRecord(char* buf, int32_t len, int32_t& stopPos) { for (; stopPos < len; stopPos++) { char c = buf[stopPos]; if (c == 0xA) { mLFCount++; } else if (c == 0xD) { mCRCount++; } else { if (mLFCount == 0 && mCRCount == 0) mLdifLine.Append(c); else if ((mLFCount > 1) || (mCRCount > 2 && mLFCount) || (!mLFCount && mCRCount > 1)) { return NS_OK; } else if ((mLFCount == 1 || mCRCount == 1)) { mLdifLine.Append('\n'); mLdifLine.Append(c); mLFCount = 0; mCRCount = 0; } } } if (((stopPos == len) && (mLFCount > 1)) || (mCRCount > 2 && mLFCount) || (!mLFCount && mCRCount > 1)) return NS_OK; return NS_ERROR_FAILURE; } void nsAbLDIFService::AddLdifRowToDatabase(nsIAbDirectory* aDirectory, bool bIsList) { if (!aDirectory) { return; } // If no data to process then reset CR/LF counters and return. if (mLdifLine.IsEmpty()) { mLFCount = 0; mCRCount = 0; return; } nsCOMPtr<nsIAbCard> newCard = do_CreateInstance(NS_ABCARDPROPERTY_CONTRACTID); nsTArray<nsCString> members; char* cursor = ToNewCString(mLdifLine); char* saveCursor = cursor; /* keep for deleting */ char* line = 0; char* typeSlot = 0; char* valueSlot = 0; int length = 0; // the length of an ldif attribute while ((line = str_getline(&cursor)) != nullptr) { if (NS_SUCCEEDED(str_parse_line(line, &typeSlot, &valueSlot, &length))) { nsAutoCString colType(typeSlot); nsAutoCString column(valueSlot); // 4.x exports attributes like "givenname", // mozilla does "givenName" to be compliant with RFC 2798 ToLowerCase(colType); if (colType.EqualsLiteral("member") || colType.EqualsLiteral("uniquemember")) { members.AppendElement(column); } else { AddLdifColToDatabase(aDirectory, newCard, colType, column, bIsList); } } else continue; // parse error: continue with next loop iteration } free(saveCursor); if (bIsList) { nsCOMPtr<nsIAbDirectory> newList = do_CreateInstance(NS_ABDIRPROPERTY_CONTRACTID); newList->SetIsMailList(true); nsAutoString temp; newCard->GetDisplayName(temp); newList->SetDirName(temp); temp.Truncate(); newCard->GetPropertyAsAString(kNicknameProperty, temp); newList->SetListNickName(temp); temp.Truncate(); newCard->GetPropertyAsAString(kNotesProperty, temp); newList->SetDescription(temp); nsIAbDirectory* outList; nsresult rv = aDirectory->AddMailList(newList, &outList); NS_ENSURE_SUCCESS_VOID(rv); int32_t count = members.Length(); for (int32_t i = 0; i < count; ++i) { nsAutoCString email; int32_t emailPos = members[i].Find("mail="); emailPos += strlen("mail="); email = Substring(members[i], emailPos); nsCOMPtr<nsIAbCard> emailCard; aDirectory->CardForEmailAddress(email, getter_AddRefs(emailCard)); if (emailCard) { nsIAbCard* outCard; outList->AddCard(emailCard, &outCard); } } } else { nsIAbCard* outCard; aDirectory->AddCard(newCard, &outCard); } // Clear buffer for next record ClearLdifRecordBuffer(); } void nsAbLDIFService::AddLdifColToDatabase(nsIAbDirectory* aDirectory, nsIAbCard* newCard, nsCString colType, nsCString column, bool bIsList) { nsString value = NS_ConvertUTF8toUTF16(column); char firstByte = colType.get()[0]; switch (firstByte) { case 'b': if (colType.EqualsLiteral("birthyear")) newCard->SetPropertyAsAString(kBirthYearProperty, value); else if (colType.EqualsLiteral("birthmonth")) newCard->SetPropertyAsAString(kBirthMonthProperty, value); else if (colType.EqualsLiteral("birthday")) newCard->SetPropertyAsAString(kBirthDayProperty, value); break; // 'b' case 'c': if (colType.EqualsLiteral("cn") || colType.EqualsLiteral("commonname")) { newCard->SetDisplayName(value); } else if (colType.EqualsLiteral("c") || colType.EqualsLiteral("countryname")) { if (mStoreLocAsHome) newCard->SetPropertyAsAString(kHomeCountryProperty, value); else newCard->SetPropertyAsAString(kWorkCountryProperty, value); } else if (colType.EqualsLiteral("cellphone")) newCard->SetPropertyAsAString(kCellularProperty, value); else if (colType.EqualsLiteral("carphone")) newCard->SetPropertyAsAString(kCellularProperty, value); else if (colType.EqualsLiteral("custom1")) newCard->SetPropertyAsAString(kCustom1Property, value); else if (colType.EqualsLiteral("custom2")) newCard->SetPropertyAsAString(kCustom2Property, value); else if (colType.EqualsLiteral("custom3")) newCard->SetPropertyAsAString(kCustom3Property, value); else if (colType.EqualsLiteral("custom4")) newCard->SetPropertyAsAString(kCustom4Property, value); else if (colType.EqualsLiteral("company")) newCard->SetPropertyAsAString(kCompanyProperty, value); break; // 'c' case 'd': if (colType.EqualsLiteral("description")) newCard->SetPropertyAsAString(kNotesProperty, value); else if (colType.EqualsLiteral("department")) newCard->SetPropertyAsAString(kDepartmentProperty, value); else if (colType.EqualsLiteral("displayname")) newCard->SetDisplayName(value); break; // 'd' case 'f': if (colType.EqualsLiteral("fax") || colType.EqualsLiteral("facsimiletelephonenumber")) newCard->SetPropertyAsAString(kFaxProperty, value); break; // 'f' case 'g': if (colType.EqualsLiteral("givenname")) newCard->SetFirstName(value); break; // 'g' case 'h': if (colType.EqualsLiteral("homephone")) newCard->SetPropertyAsAString(kHomePhoneProperty, value); else if (colType.EqualsLiteral("homestreet")) newCard->SetPropertyAsAString(kHomeAddressProperty, value); else if (colType.EqualsLiteral("homeurl")) newCard->SetPropertyAsAString(kHomeWebPageProperty, value); break; // 'h' case 'l': if (colType.EqualsLiteral("l") || colType.EqualsLiteral("locality")) { if (mStoreLocAsHome) newCard->SetPropertyAsAString(kHomeCityProperty, value); else newCard->SetPropertyAsAString(kWorkCityProperty, value); } // labeledURI contains a URI and, optionally, a label // This will remove the label and place the URI as the work URL else if (colType.EqualsLiteral("labeleduri")) { int32_t index = column.FindChar(' '); if (index != -1) column.SetLength(index); newCard->SetPropertyAsAString(kWorkWebPageProperty, NS_ConvertUTF8toUTF16(column)); } break; // 'l' case 'm': if (colType.EqualsLiteral("mail")) newCard->SetPrimaryEmail(value); else if (colType.EqualsLiteral("mobile")) newCard->SetPropertyAsAString(kCellularProperty, value); else if (colType.EqualsLiteral("mozilla_aimscreenname")) newCard->SetPropertyAsAString(kAIMProperty, value); else if (colType.EqualsLiteral("mozillacustom1")) newCard->SetPropertyAsAString(kCustom1Property, value); else if (colType.EqualsLiteral("mozillacustom2")) newCard->SetPropertyAsAString(kCustom2Property, value); else if (colType.EqualsLiteral("mozillacustom3")) newCard->SetPropertyAsAString(kCustom3Property, value); else if (colType.EqualsLiteral("mozillacustom4")) newCard->SetPropertyAsAString(kCustom4Property, value); else if (colType.EqualsLiteral("mozillahomecountryname")) newCard->SetPropertyAsAString(kHomeCountryProperty, value); else if (colType.EqualsLiteral("mozillahomelocalityname")) newCard->SetPropertyAsAString(kHomeCityProperty, value); else if (colType.EqualsLiteral("mozillahomestate")) newCard->SetPropertyAsAString(kHomeStateProperty, value); else if (colType.EqualsLiteral("mozillahomestreet")) newCard->SetPropertyAsAString(kHomeAddressProperty, value); else if (colType.EqualsLiteral("mozillahomestreet2")) newCard->SetPropertyAsAString(kHomeAddress2Property, value); else if (colType.EqualsLiteral("mozillahomepostalcode")) newCard->SetPropertyAsAString(kHomeZipCodeProperty, value); else if (colType.EqualsLiteral("mozillahomeurl")) newCard->SetPropertyAsAString(kHomeWebPageProperty, value); else if (colType.EqualsLiteral("mozillanickname")) newCard->SetPropertyAsAString(kNicknameProperty, value); else if (colType.EqualsLiteral("mozillasecondemail")) newCard->SetPropertyAsAString(k2ndEmailProperty, value); else if (colType.EqualsLiteral("mozillausehtmlmail")) { ToLowerCase(column); if (-1 != column.Find("true")) newCard->SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::html); else if (-1 != column.Find("false")) newCard->SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::plaintext); else newCard->SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::unknown); } else if (colType.EqualsLiteral("mozillaworkstreet2")) newCard->SetPropertyAsAString(kWorkAddress2Property, value); else if (colType.EqualsLiteral("mozillaworkurl")) newCard->SetPropertyAsAString(kWorkWebPageProperty, value); break; // 'm' case 'n': if (colType.EqualsLiteral("notes")) newCard->SetPropertyAsAString(kNotesProperty, value); else if (colType.EqualsLiteral("nscpaimscreenname") || colType.EqualsLiteral("nsaimid")) newCard->SetPropertyAsAString(kAIMProperty, value); break; // 'n' case 'o': if (colType.EqualsLiteral("objectclass")) break; else if (colType.EqualsLiteral("ou") || colType.EqualsLiteral("orgunit")) newCard->SetPropertyAsAString(kDepartmentProperty, value); else if (colType.EqualsLiteral("o")) // organization newCard->SetPropertyAsAString(kCompanyProperty, value); break; // 'o' case 'p': if (colType.EqualsLiteral("postalcode")) { if (mStoreLocAsHome) newCard->SetPropertyAsAString(kHomeZipCodeProperty, value); else newCard->SetPropertyAsAString(kWorkZipCodeProperty, value); } else if (colType.EqualsLiteral("postofficebox")) { nsAutoCString workAddr1, workAddr2; SplitCRLFAddressField(column, workAddr1, workAddr2); newCard->SetPropertyAsAString(kWorkAddressProperty, NS_ConvertUTF8toUTF16(workAddr1)); newCard->SetPropertyAsAString(kWorkAddress2Property, NS_ConvertUTF8toUTF16(workAddr2)); } else if (colType.EqualsLiteral("pager") || colType.EqualsLiteral("pagerphone")) newCard->SetPropertyAsAString(kPagerProperty, value); break; // 'p' case 'r': if (colType.EqualsLiteral("region")) { newCard->SetPropertyAsAString(kWorkStateProperty, value); } break; // 'r' case 's': if (colType.EqualsLiteral("sn") || colType.EqualsLiteral("surname")) newCard->SetPropertyAsAString(kLastNameProperty, value); else if (colType.EqualsLiteral("street")) newCard->SetPropertyAsAString(kWorkAddressProperty, value); else if (colType.EqualsLiteral("streetaddress")) { nsAutoCString addr1, addr2; SplitCRLFAddressField(column, addr1, addr2); if (mStoreLocAsHome) { newCard->SetPropertyAsAString(kHomeAddressProperty, NS_ConvertUTF8toUTF16(addr1)); newCard->SetPropertyAsAString(kHomeAddress2Property, NS_ConvertUTF8toUTF16(addr2)); } else { newCard->SetPropertyAsAString(kWorkAddressProperty, NS_ConvertUTF8toUTF16(addr1)); newCard->SetPropertyAsAString(kWorkAddress2Property, NS_ConvertUTF8toUTF16(addr2)); } } else if (colType.EqualsLiteral("st")) { if (mStoreLocAsHome) newCard->SetPropertyAsAString(kHomeStateProperty, value); else newCard->SetPropertyAsAString(kWorkStateProperty, value); } break; // 's' case 't': if (colType.EqualsLiteral("title")) newCard->SetPropertyAsAString(kJobTitleProperty, value); else if (colType.EqualsLiteral("telephonenumber")) { newCard->SetPropertyAsAString(kWorkPhoneProperty, value); } break; // 't' case 'w': if (colType.EqualsLiteral("workurl")) newCard->SetPropertyAsAString(kWorkWebPageProperty, value); break; // 'w' case 'x': if (colType.EqualsLiteral("xmozillanickname")) { newCard->SetPropertyAsAString(kNicknameProperty, value); } else if (colType.EqualsLiteral("xmozillausehtmlmail")) { ToLowerCase(column); if (-1 != column.Find("true")) newCard->SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::html); else if (-1 != column.Find("false")) newCard->SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::plaintext); else newCard->SetPropertyAsUint32(kPreferMailFormatProperty, nsIAbPreferMailFormat::unknown); } break; // 'x' case 'z': if (colType.EqualsLiteral("zip")) // alias for postalcode { if (mStoreLocAsHome) newCard->SetPropertyAsAString(kHomeZipCodeProperty, value); else newCard->SetPropertyAsAString(kWorkZipCodeProperty, value); } break; // 'z' default: break; // default } } void nsAbLDIFService::ClearLdifRecordBuffer() { if (!mLdifLine.IsEmpty()) { mLdifLine.Truncate(); mLFCount = 0; mCRCount = 0; } } // Some common ldif fields, it an ldif file has NONE of these entries // then it is most likely NOT an ldif file! static const char* const sLDIFFields[] = {"objectclass", "sn", "dn", "cn", "givenName", "mail", nullptr}; #define kMaxLDIFLen 14 // Count total number of legal ldif fields and records in the first 100 lines of // the file and if the average legal ldif field is 3 or higher than it's a valid // ldif file. NS_IMETHODIMP nsAbLDIFService::IsLDIFFile(nsIFile* pSrc, bool* _retval) { NS_ENSURE_ARG_POINTER(pSrc); NS_ENSURE_ARG_POINTER(_retval); *_retval = false; nsresult rv = NS_OK; nsCOMPtr<nsIInputStream> fileStream; rv = NS_NewLocalFileInputStream(getter_AddRefs(fileStream), pSrc); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr<nsILineInputStream> lineInputStream( do_QueryInterface(fileStream, &rv)); NS_ENSURE_SUCCESS(rv, rv); int32_t lineLen = 0; int32_t lineCount = 0; int32_t ldifFields = 0; // total number of legal ldif fields. char field[kMaxLDIFLen]; int32_t fLen = 0; const char* pChar; int32_t recCount = 0; // total number of records. int32_t i; bool gotLDIF = false; bool more = true; nsCString line; while (more && NS_SUCCEEDED(rv) && (lineCount < 100)) { rv = lineInputStream->ReadLine(line, &more); if (NS_SUCCEEDED(rv) && more) { pChar = line.get(); lineLen = line.Length(); if (!lineLen && gotLDIF) { recCount++; gotLDIF = false; } if (lineLen && (*pChar != ' ') && (*pChar != '\t')) { fLen = 0; while (lineLen && (fLen < (kMaxLDIFLen - 1)) && (*pChar != ':')) { field[fLen] = *pChar; pChar++; fLen++; lineLen--; } field[fLen] = 0; if (lineLen && (*pChar == ':') && (fLen < (kMaxLDIFLen - 1))) { // see if this is an ldif field (case insensitive)? i = 0; while (sLDIFFields[i]) { if (!PL_strcasecmp(sLDIFFields[i], field)) { ldifFields++; gotLDIF = true; break; } i++; } } } } lineCount++; } // If we just saw ldif address, increment recCount. if (gotLDIF) recCount++; rv = fileStream->Close(); if (recCount > 1) ldifFields /= recCount; // If the average field number >= 3 then it's a good ldif file. if (ldifFields >= 3) { *_retval = true; } return rv; } void nsAbLDIFService::SplitCRLFAddressField(nsCString& inputAddress, nsCString& outputLine1, nsCString& outputLine2) const { int32_t crlfPos = inputAddress.Find("\r\n"); if (crlfPos != -1) { outputLine1 = Substring(inputAddress, 0, crlfPos); outputLine2 = Substring(inputAddress, crlfPos + 2); } else outputLine1.Assign(inputAddress); }
c5a7500ed0857de51cb18092943a29b630717d53
4b4d6d9e2f4be42289174eeb79ae6e9e79a8223a
/psets/pset04binsearch/randomN.cpp
8be15197f3148908e169559224af8324f0772ade
[]
no_license
cinxdy/DataStructure
430c61def293dc7ac27c6cd7cea0c7c7c115b489
84d5f624b588d61afc494bda77a78c33f5a44cf8
refs/heads/master
2020-05-07T08:13:40.553126
2019-06-05T15:05:00
2019-06-05T15:05:00
180,316,142
1
0
null
null
null
null
UTF-8
C++
false
false
2,095
cpp
randomN.cpp
/* * randomN.cpp * Generates N random numbers in the range of [0..N) * and prints them at stdout. N is specified as a * command line argument. For example, randomN 100 * will generate 100 numbers among [0..99]. * * Usage: * randomN 100 * * History: * 2018/03/09 YSK Creation * 2019/02/01 C++ conversion */ #include <iostream> #include <ctime> #ifdef DEBUG #define DPRINT(func) func; #else #define DPRINT(func) ; #endif int main(int argc, char *argv[]) { int N = 0; char *end; // The strtol() converts the contents of a string as an integral // number of the specified base and return its value as a long int. // s: specifies the string which has the representation of an int. // end: refers to an already allocated object of type char*. // The value of the end is set by the function to the next // character in s after the last valid character. It can // also be a null pointer, in which case it is not used. // b: specifies to the base of the integral value. // Return Value : The function returns value of two types : // - If a valid conversion occurs, then a long int value is returned, // *end is NULL. If not, then 0 is returned and *end is not NULL. if (argc == 2) N = strtol(argv[1], &end, 10); if (N <= 0 || *end != '\0') { std::cout << "Usage: randomN N\n"; return EXIT_FAILURE; } // rand() returns a random number between 0 and RAND_MAX which is // defined in stdlib.h or cstdlib. // RAND_MAX is surprisingly small (0~32767) and also depends on // its implementation, but guaranteed at least 32767. The // following program will work for random values in the // range[0, (RAND_MAX + 1)*(RAND_MAX + 1)). // Refer to random.pdf to complete the following code. DPRINT(int min = (RAND_MAX + 1)*(RAND_MAX + 1);); DPRINT(int max = -1;); //srand(time(NULL)); for (int i = 0; i < N; i++) { int r = (rand() * (RAND_MAX + 1) + rand()) % N; std::cout << r << std::endl; DPRINT(if (r > max) max = r; else if (r < min) min = r;); } DPRINT(std::cout << min << "~" << max << std::endl;); return EXIT_SUCCESS; }
a88137faf430f85451eb9a3a22c02917e96788ec
f675ac6f567a306d4124d9c0360c1a492bf3546d
/Project1/scalability_study.cxx
27a26999a1b7937edf2692b12fca8d4707449fd4
[]
no_license
joelrorseth/Big-Data-Analytics
be898000811033488f8fd2aacb63f605cb8e6055
5dc6a7026b920b7eb091f6f4a15a16e203fc5296
refs/heads/master
2021-03-27T10:01:30.423572
2018-02-13T18:25:46
2018-02-13T18:25:46
121,200,452
0
0
null
null
null
null
UTF-8
C++
false
false
5,604
cxx
scalability_study.cxx
// // Scalability Study // // Joel Rorseth 104407927 // February 11, 2018 // #include <iostream> #include <fstream> #include <sstream> #include <utility> #include <vector> #include <algorithm> #include <cstdio> #include <chrono> #include "gnuplot-iostream/gnuplot-iostream.h" // Get string filename for chunk percentage size std::string chunk_filename(const std::string & filename, const int size) { //return "temp_" + std::to_string(size) + ".txt"; return "percent" + std::to_string(size) + '_' + filename; } // Create a temporary file for each chunk size void create_temp_chunk_files(const std::string & filename, std::vector<int> & chunk_sizes) { // First obtain number of baskets (lines) in entire, original input file std::ifstream in_file(filename); std::string line; std::vector<std::string> lines; int baskets; while (std::getline(in_file, line)) { ++baskets; lines.push_back(line); } in_file.close(); // Now for each chunk_size, create a file which contains the first // <chunk_size>% of the lines out of line_count std::cout << "Total baskets: " << baskets << '\n'; std::ofstream out_file; for (const auto size: chunk_sizes) { out_file.open(chunk_filename(filename, size)); // The number of lines in this chunk size of the original file int chunk_lines = baskets * ((double) size / 100.0); // Write the first chunk_lines lines to its own file for (int i = 0; i < chunk_lines; ++i) out_file << lines[i] << '\n'; out_file.close(); } } // Delete all the temporary chunk files from the directory void delete_temp_chunk_files(const std::string & filename, const std::vector<int> & chunk_sizes) { for (const auto size: chunk_sizes) std::remove(chunk_filename(filename, size).c_str()); } // Main line graph generation algorithm int main(int argc, char ** argv) { if (argc != 5) { std::cout << "Usage: " << argv[0] << " <input.txt> <a_priori.cxx> <pcy.cxx> <multistage.cxx>\n"; return 1; } const std::string input_filename{argv[1]}; const std::string a_priori_file{argv[2]}; const std::string pcy_file{argv[3]}; const std::string multistage_file{argv[4]}; const std::vector<std::string> algorithms{a_priori_file, pcy_file, multistage_file}; std::vector<int> thresholds{1,5,10}; std::vector<int> chunk_sizes{1,5,10,20,30,40,50,60,70,80,90,100}; // Generate chunked files to pass to algorithm create_temp_chunk_files(input_filename, chunk_sizes); // For each tested support threshold, derive a performance line chart for (const auto thresh: thresholds) { // Initialize new line chart for Support Threshold: <thresh>% Gnuplot gp; const std::string title = "Support Threshold: " + std::to_string(thresh) + "%"; const std::string pic_filename = "./study_threshold_" + std::to_string(thresh) + ".png"; gp << "set title \"" << title << "\"\nset xrange[0:100]\n"; gp << "set xlabel \"Dataset Size\"\nset ylabel \"Runtime (ms)\"\n"; gp << "set terminal png\nset output \"study_threshold_" << std::to_string(thresh) << ".png\"\n"; std::vector<std::pair<int,int>> points_ap; std::vector<std::pair<int,int>> points_pcy; std::vector<std::pair<int,int>> points_multistage; // Compare runtime for A-Priori algorithm vs PCY for (auto i = 0; i < algorithms.size(); ++i) { const auto algorithm = algorithms[i]; // For each chunk size.. for (const auto size: chunk_sizes) { // Pass entire chunk to frequent itemset miner const auto cmd = "g++-7 -std=c++17 -o miner " + algorithm + " && ./miner " + chunk_filename(input_filename, size) + ' ' + std::to_string(thresh); // Start timer const auto start = std::chrono::high_resolution_clock::now(); // Execute 'cmd' system(cmd.c_str()); // End timer upon return const auto finish = std::chrono::high_resolution_clock::now(); // Obtain time difference (runtime taken to perform mining) const std::chrono::milliseconds dif = std::chrono::duration_cast<std::chrono::milliseconds>(finish - start); const double dif_mseconds = dif.count(); // Put {size, dif} into points vector if (i == 0) points_ap.push_back( std::make_pair(size, dif_mseconds) ); else if (i == 1) points_pcy.push_back( std::make_pair(size, dif_mseconds) ); else points_multistage.push_back( std::make_pair(size, dif_mseconds) ); } } // Plot chunk_size, runtime pair on current line chart gp << "plot" << gp.file1d(points_ap) << " title \"A-Priori\" with lines, " << gp.file1d(points_pcy) << " title \"PCY\" with lines, " << gp.file1d(points_multistage) << " title \"Multistage\" with lines\n"; } // Remove files now, they were only temporary delete_temp_chunk_files(input_filename, chunk_sizes); }
8525a34a9c858a46888ed5012f6f7348ad299f33
c5d3212b288e704caeec1f91387750f1508b6821
/XEngine/include/core/graphics/XGLBuffer.h
1a6decf75820ba73c74932b19346d0281f9435e7
[]
no_license
aarontt20/sea-plus-plus
39f6ef7985e72bfb8366b80a22a60af97cc42390
88d81db00a329fa1db01372b282dc5be6c46fe46
refs/heads/main
2023-03-08T15:16:15.012042
2021-02-10T04:48:42
2021-02-10T04:48:42
337,615,878
0
0
null
null
null
null
IBM852
C++
false
false
1,078
h
XGLBuffer.h
//==================================================================================\\ //FILE NAME: XGLVBuffer.h \\ //PROJECT: XEngine \\ //CREATED BY: Aaron Toms \\ //DATE CREATED: 05/09/2017 \\ //LAST MODIIFED: 05/09/2017 \\ // ęCopyright 2017, Aaron Toms & Peter Stein. All Rights Reserved. \\ //==================================================================================\\ #ifndef X_GL_BUFFER_H #define X_GL_BUFFER_H #define GLEW_STATIC #include "GL\glew.h" #include <vector> namespace X { namespace Graphics { struct GLBuffer { private: GLuint buffer; GLenum targetBinding; GLenum usage; public: GLBuffer(); GLBuffer(GLenum targetBinding, const void *data, const int &byteSize, GLenum usage); template <typename T> GLBuffer(GLenum targetBinding, const std::vector<T> &data, GLenum usage); void generate(); void destroy(); void bind() const; void unbind() const; }; }} #include "../src/core/graphics/XGLBuffer.inl" #endif // !X_GL_BUFFER_H
e166a18a82115cc24cc6871102e111987e786cd5
8991e8cac63924e8c16ad0be0b3d6e809311f007
/src/functions.cxx
8c5f1761fe35005ad24c6fec66fadabac221c574
[]
no_license
sPHENIX-Collaboration/eic-smear
b8dbb9bcebd25ff1161f5f698e4061231363525c
0233d8e9730c042519f7b7e8267302ac454caae2
refs/heads/master
2021-09-13T06:02:02.012253
2021-09-08T15:40:37
2021-09-08T15:40:37
259,756,735
0
2
null
2020-04-28T21:35:24
2020-04-28T21:35:23
null
UTF-8
C++
false
false
4,993
cxx
functions.cxx
/** \file Global function implementations. \author Thomas Burton \date 2011-07-07 \copyright 2011 Brookhaven National Lab */ #include "eicsmear/functions.h" #include <cmath> #include <fstream> #include <set> #include <sstream> #include <string> #include <TLorentzVector.h> #include <TMath.h> #include <TParticlePDG.h> #include <TVector2.h> #include <TVector3.h> #include "eicsmear/erhic/EventMC.h" #include "eicsmear/erhic/ParticleMC.h" /** Returns the first non-blank character in a line. Returns \0 if there are no non-blank characters in the line. */ char getFirstNonBlank(const std::string& line) { char first('\0'); // NULL character by default // Find the index first non-blank character. size_t index = line.find_first_not_of(" \t"); if (index != std::string::npos) { first = line.at(index); } // if return first; } /** Calculate the hadron azimuthal angle around the virtual photon direction with respect to the lepton scattering plane in the proton rest frame. We use the HERMES convention, returning an angle in the range [0,2pi]. The vectors passed as arguments should already be boosted to the proton rest frame. Incident and scattered leptons, incident protons and virtual photons all return -999. */ double computeHermesPhiH(const TLorentzVector& hadronInPrf, const TLorentzVector& leptonInPrf, const TLorentzVector& photonInPrf) { const TVector3& q = photonInPrf.Vect(); const TVector3& k = leptonInPrf.Vect(); const TVector3& Ph = hadronInPrf.Vect(); const TVector3& qCrossK = q.Cross(k); const TVector3& qCrossPh = q.Cross(Ph); // Used to determine spin direction: double qCrossKDotPh = qCrossK.Dot(Ph); if (::fabs(qCrossKDotPh) < 1.0e-5) return -999.0; // First get phi in the range [0,pi]: double phi = TMath::ACos(qCrossK.Dot(qCrossPh) / qCrossK.Mag() / qCrossPh.Mag()); // Handle spin direction to get result in range [-pi,pi] by // scaling by [-1,+1], depending on hemisphere. phi *= qCrossKDotPh / ::fabs(qCrossKDotPh); return TVector2::Phi_0_2pi(phi); } // // class EventToDot. // struct Pair { int a; int b; Pair(int x, int y) : a(x), b(y) { } // Less-than operator required for entry in sorted container. bool operator<(const Pair& other) const { if (other.a == a) return b < other.b; return a < other.a; } }; void EventToDot::Generate(const erhic::EventMC& event, const std::string& name) const { std::ofstream file(name.c_str()); std::ostringstream oss; file << "digraph G {" << std::endl; oss << " label = \"Event " << event.GetN() << "\"';"; file << oss.str() << std::endl; std::set<Pair> pairs; // Keep track of which particles we use in the diagram // so we can set node attributes at the end. // Use a set to avoid worrying about adding duplicates. std::set<const erhic::ParticleMC*> used; // Loop over all tracks in the event and accumulate indices giving // parent/child relationships. // We look from parent->child and child->parent because they // aren't always fully indexed both ways. for (unsigned i(0); i < event.GetNTracks(); ++i) { // Check parent of particle const erhic::ParticleMC* parent = event.GetTrack(i)->GetParent(); if (parent) { pairs.insert(Pair(parent->GetIndex(), event.GetTrack(i)->GetIndex())); used.insert(parent); used.insert(event.GetTrack(i)); } // if // Check children of particle for (unsigned j(0); j < event.GetTrack(i)->GetNChildren(); ++j) { pairs.insert(Pair(event.GetTrack(i)->GetIndex(), event.GetTrack(i)->GetChild(j)->GetIndex())); used.insert(event.GetTrack(i)); used.insert(event.GetTrack(i)->GetChild(j)); } // for } // for // Insert relationships between particles. for (std::set<Pair>::const_iterator i = pairs.begin(); i != pairs.end(); ++i) { const erhic::ParticleMC* a = event.GetTrack(i->a - 1); const erhic::ParticleMC* b = event.GetTrack(i->b - 1); oss.str(""); oss << " " << a->GetIndex() << " -> " << b->GetIndex(); file << oss.str() << std::endl; } // for file << "# Node attributes" << std::endl; // Apply labels, formatting to used particles. for (std::set<const erhic::ParticleMC*>::const_iterator i = used.begin(); i != used.end(); ++i) { std::string shape("ellipse"); if ((*i)->GetStatus() == 1) { shape = "box"; } // if if ((*i)->GetIndex() < 3) { shape = "diamond"; } // if oss.str(""); oss << " " << (*i)->GetIndex() << " [label=\"" << (*i)->GetIndex() << " "; if ((*i)->Id().Info()) { oss << (*i)->Id().Info()->GetName(); } else { oss << "unknown PDG " << (*i)->Id().Code(); } // if oss << "\", shape=" << shape << "];"; file << oss.str() << std::endl; } // for file << "}"; }
2a260c3a46228766b4bf27193a1e25c32da52d48
2b183d0e864c901ce937892cf089c8b66ac2cca1
/src/main.cpp
85a1e33bde986c795a3e53469406a749209cd93f
[]
no_license
abstrakct/nessy
ddf7156c8d089ac34fc26c6fff8a063836e263cc
41d2a978e50949e244ab70456b77530cdc65f97d
refs/heads/master
2021-07-20T06:00:23.876676
2021-01-18T20:25:11
2021-01-18T20:25:11
233,913,780
0
0
null
null
null
null
UTF-8
C++
false
false
35,916
cpp
main.cpp
/* * NESSY - an NES emulator/disassembler/debugger * * Yeah, that ambitious. * */ #include <bitset> #include <chrono> #include <cstdint> #include <fstream> #include <iostream> #include <memory> #include <sstream> #include <string> #include <thread> #include <vector> #include "imgui/imgui-SFML.h" #include "imgui/imgui.h" #include "imgui/imgui_memory_editor.h" #include <SFML/Graphics.hpp> #include <SFML/Window.hpp> #include "logger.h" #include "machine.h" #include "version.h" using namespace std; // Configuration // TODO: structure better! // TODO: config file bool cfgDisplayRam = false; bool cfgDisplayDisasm = false; bool cfgDisplayCpu = false; bool cfgDisplayHelp = false; bool cfgDisplayPPU = false; bool cfgDisplayPPUPatternTables = false; bool cfgDisplayPPUOAM = false; bool cfgDisplayMapper = false; bool cfgDisplayNES = true; bool cfgDisplayNESWindowDecorations = true; bool cfgDisplayMemoryMap = true; bool cfgDisassemblyFollowPC = true; // this is silly? move into Nessy class?! std::shared_ptr<Machine> TheNES; Logger l; MemoryEditor memoryEditor; // from OLC std::string hex(uint32_t n, uint8_t d) { std::string s(d, '0'); for (int i = d - 1; i >= 0; i--, n >>= 4) s[i] = "0123456789ABCDEF"[n & 0xF]; return s; }; // u8 -> binary string std::string bin(uint8_t n) { std::bitset<8> b = n; return b.to_string(); } class NessyApplication { private: sf::RenderWindow window; //sf::RenderTexture renderTex; sf::Texture nesTex, ppuNTTex1, ppuNTTex2, ppuOAMTex; sf::Sprite nesScreen, ppuSprite; sf::Font sfmlFont; sf::Text t; sf::RectangleShape rect; sf::Event event; sf::Joystick joystick; int windowWidth, windowHeight; float scaleX, scaleY; float NESScale = 2.0, PPUNTScale = 1.0, PPUOAMScale = 2.0; int cSize = 18; bool running = false, emuRunning = false; bool breakpoint = false; int breakpointAddress; public: std::shared_ptr<Machine> nes; std::string appName, nesFilename; uint16_t ram2start = 0x8000; bool debugmode, runmode = false; int execspeed = 100; float targetFPS = 60.0f; char log[100]; uint8_t selectedPalette = 0; std::shared_ptr<Cartridge> cart; DisassemblyType disasm; Disassembler disassembler; std::vector<DisassemblyLine> disassemblyData; NessyApplication(std::shared_ptr<Machine> m, std::string filename, bool _breakpoint, int _breakpointAddress, bool d = false) { appName = "Nessy"; nes = m; nesFilename = filename; debugmode = d; breakpoint = _breakpoint; breakpointAddress = _breakpointAddress; } ~NessyApplication() {} bool construct(int width, int height, float sX, float sY) { windowWidth = width; windowHeight = height; scaleX = sX; scaleY = sY; window.create(sf::VideoMode(width, height), appName); window.setVerticalSyncEnabled(true); ImGui::SFML::Init(window); // TODO: NES color scheme? light/dark grey, black, red window.clear(sf::Color::Blue); nesTex.create(width, height); nesScreen.setTexture(nesTex); nesScreen.setTextureRect(sf::Rect(0, 0, 256, 240)); // nesScreen.setPosition((width / 2) - 256, cSize); nesScreen.scale(scaleX, scaleY); ppuNTTex1.create(128, 128); ppuNTTex2.create(128, 128); ppuOAMTex.create(512, 128); // ppuSprite.setTexture(ppuTex); // ppuSprite.scale(2.0, 2.0); t.setFillColor(sf::Color::White); t.setFont(sfmlFont); t.setCharacterSize(cSize); t.setStyle(sf::Text::Bold); //rect.setSize(sf::Vector2f(pixelWidth, pixelHeight)); if (!sfmlFont.loadFromFile("Courier Prime Code.ttf")) { printf("ERROR: couldn't load font file!\n"); return false; } // TODO: more checking if (joystick.isConnected(0)) { std::cout << " Found controller: " << std::string(joystick.getIdentification(0).name) << std::endl; printf("\tController has %d buttons\n", joystick.getButtonCount(0)); if (joystick.hasAxis(0, sf::Joystick::Axis::X)) { printf("\tController has X axis\n"); } if (joystick.hasAxis(0, sf::Joystick::Axis::Y)) { printf("\tController has Y axis\n"); } } disassembler.ConnectMachine(nes); running = true; return true; }; void drawString(float x, float y, std::string text) { t.setPosition(x, y); t.setString(text); window.draw(t); } void drawString(float x, float y, std::string text, sf::Color color) { t.setFillColor(color); t.setPosition(x, y); t.setString(text); window.draw(t); } void drawRAM(int x, int y, uint16_t addr, int rows, int cols) { // TODO: highlight current PC (and read/writes????!!!!) !!! int ramx = x, ramy = y; for (int row = 0; row < rows; row++) { std::string s = "$" + hex(addr, 4) + ":"; for (int col = 0; col < cols; col++) { s += " " + hex(nes->cpuRead(addr, true), 2); addr++; } drawString(ramx, ramy, s); ramy += cSize; } } ImU8 testRamRead(const ImU8 *data, size_t offset) { return nes->cpuRead(offset); } void showMemoryEditor() { uint8_t data[0xFFFF]; // for (int i = 0; i < 0xFFFF; i++) { // data[i] = nes->cpuRead(i); // } memoryEditor.DrawWindow("Memory Editor", data, 0x10000); } void drawCPU() { ImGui::Begin("CPU"); // begin window ImGui::Text("Flags: "); ImGui::TextColored(nes->cpu.flags & nes->cpu.N ? sf::Color::Green : sf::Color::Red, "N"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.V ? sf::Color::Green : sf::Color::Red, "V"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.U ? sf::Color::Green : sf::Color::Red, "-"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.B ? sf::Color::Green : sf::Color::Red, "B"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.D ? sf::Color::Green : sf::Color::Red, "D"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.I ? sf::Color::Green : sf::Color::Red, "I"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.Z ? sf::Color::Green : sf::Color::Red, "Z"); ImGui::SameLine(); ImGui::TextColored(nes->cpu.flags & nes->cpu.C ? sf::Color::Green : sf::Color::Red, "C"); ImGui::Text("PC: %04X", nes->cpu.pc); ImGui::Text("SP: %04X", nes->cpu.sp); ImGui::Text(" A: %02X [%s]", nes->cpu.a, bin(nes->cpu.a).c_str()); ImGui::Text(" X: %02X [%s]", nes->cpu.x, bin(nes->cpu.x).c_str()); ImGui::Text(" Y: %02X [%s]", nes->cpu.y, bin(nes->cpu.y).c_str()); ImGui::End(); } void drawMapper(int x, int y) { std::vector<std::string> mapperInfo = nes->cart->getMapperInfo(); ImGui::Begin("Mapper"); for (auto it : mapperInfo) { ImGui::Text("%s", it.c_str()); } ImGui::End(); } void drawDisasm() { // int lines = 31; // auto it = disasm.find(nes->cpu.pc); // auto next = nes->cpu.disassemble(nes->cpu.pc, nes->cpu.pc); // int liney = (lines >> 1) * cSize + y; // TODO: disassembles everything on each frame -- FIX! // auto disasm = disassembler.get(0x8000, 0xFFFF); // TODO: disassemble current/next instruction // TODO: filter? ImGui::Begin("Disassembly", NULL, ImGuiWindowFlags_HorizontalScrollbar); for (auto it : disassemblyData) { if (it.address == nes->cpu.pc) { // ImGui::TextColored(sf::Color::Cyan, "%s", next.begin()->begin()->second.c_str()); ImGui::TextColored(sf::Color::Yellow, "%04X - %s - %s", it.address, it.hexValue.c_str(), it.instruction.c_str()); if (cfgDisassemblyFollowPC) { ImGui::SetScrollHereY(0.5f); // 0.0f:top, 0.5f:center, 1.0f:bottom } } else { ImGui::Text("%04X - %s - %s", it.address, it.hexValue.c_str(), it.instruction.c_str()); } } ImGui::End(); // auto newdisasm = disassembler.get(nes->cpu.pc, nes->cpu.pc + 16); // auto it = disasm.find(nes->cpu.pc); // auto it = newdisasm.begin(); // while ((*it).begin()->first != nes->cpu.pc) // it++; // it -= lines / 2; // if (it != newdisasm.end()) { // for (int i = 0; i < lines; i++) { // if (++it != newdisasm.end()) { // if (it->address == nes->cpu.pc) { // ImGui::TextColored(sf::Color::Cyan, "%s", next.begin()->begin()->second.c_str()); // } else { // ImGui::Text("%s", (*it).begin()->second.c_str()); // } // } // } // } // Draw "live" disassembly of next instruction // drawString(x, liney, next[nes->cpu.pc], sf::Color::Cyan); // it = disasm.find(nes->cpu.pc); // if (it != disasm.end()) { // while (liney < (lines * cSize) + y) { // liney += cSize; // if (++it != disasm.end()) { // drawString(x, liney, (*it).second, sf::Color::White); // } // } // } // it = disasm.find(nes->cpu.pc); // liney = (lines >> 1) * cSize + y; // if (it != disasm.end()) { // while (liney > y) { // liney -= cSize; // if (--it != disasm.end()) { // drawString(x, liney, (*it).second); // } // } // } } void drawPPU() { nes->ppu.UpdatePPUInfo(); ImGui::Begin("PPU Info"); ImGui::Text("Base nametable address: %04X", nes->ppu.info.nametableBaseAddress); ImGui::Text("VRAM increment: %d", nes->ppu.info.vramInc); ImGui::Text("Sprite PT address (8x8 mode): %04X", nes->ppu.info.spritePatternTableAddress8x8); ImGui::Text("Background PT address: %04X", nes->ppu.info.bgPatternTableAddress); ImGui::Text("Sprite size: %s", nes->ppu.info.spriteSize ? "8x16" : "8x8"); ImGui::Text("NMI enabled: %s", nes->ppu.info.nmi ? "yes" : "no"); ImGui::Text("OAM address: %04X", nes->ppu.info.oamAddress); ImGui::End(); } void drawPPUPatternTables(int x, int y) { // TODO: add palette selector ImVec2 size = ImVec2(128 * PPUNTScale, 128 * PPUNTScale); ImGui::Begin("PPU Pattern Tables"); // ImGui::SliderFloat("Scale", &PPUNTScale, 0.00f, 8.0f); ImGui::DragFloat("Scale", &PPUNTScale, 0.05f, 0.0f, 8.0f); ppuNTTex1.update(nes->ppu.GetPatterntable(0, selectedPalette)); ImGui::Image(ppuNTTex1, size); ppuNTTex2.update(nes->ppu.GetPatterntable(1, selectedPalette)); ImGui::SameLine(); ImGui::Image(ppuNTTex2, size); ImGui::End(); } void drawPPUOAM() { // ImVec2 size = ImVec2(128 * PPUNTScale, 128 * PPUNTScale); ImVec2 size = ImVec2(512 * PPUOAMScale, 128 * PPUOAMScale); ImGui::Begin("PPU OAM"); // ImGui::SliderFloat("Scale", &PPUNTScale, 0.00f, 8.0f); ImGui::DragFloat("Scale", &PPUOAMScale, 0.05f, 0.0f, 8.0f); ppuOAMTex.update(nes->ppu.GetOAM(selectedPalette)); ImGui::Image(ppuOAMTex, size); ImGui::End(); } void drawMemoryMap() { // std::map<uint16_t, std::pair<uint32_t, uint32_t>> prgBanks = nes->cart->getPrgROM()->getBankInfo(); // std::map<uint16_t, std::pair<uint32_t, uint32_t>> chrBanks = nes->cart->getChrROM()->getBankInfo(); struct BankInfo prg = nes->cart->getPrgROM()->getBankInfo(); struct BankInfo chr = nes->cart->getChrROM()->getBankInfo(); ImGui::Begin("Memory Map"); ImGui::Text("PRG ROM"); for (int i = 0; i < prg.mappable; i++) { // if (prg.banks[i].mapped) ImGui::Text("%04X - Bank %02X", prg.banks[i].startAddress, prg.banks[i].num); } ImGui::Text(""); ImGui::Text("CHR ROM"); for (int i = 0; i < chr.mappable; i++) { // if (chr.banks[i].mapped) ImGui::Text("%04X - Bank %02X", chr.banks[i].startAddress, chr.banks[i].num); } // for (uint32_t i = 0x8000; i < (prg.bankNum * prg.bankSize); i += prg.bankSize) { // for (auto it = prg.banks.begin(); it != prg.banks.end(); ++it) { // if (it->second.first == i) { // ImGui::Text("%04X: %d", it->second.first, it->first); // } // } // } // ImGui::Text(""); // ImGui::Text("CHR ROM"); // for (uint32_t i = 0x0000; i < (chr.bankNum * chr.bankSize); i += chr.bankSize) { // for (auto it = chr.banks.begin(); it != chr.banks.end(); ++it) { // if (it->second.first == i) { // ImGui::Text("%04X: %02X", it->second.first, it->first); // } else { // // ImGui::Text("Unmapped: %d", it->first); // } // } // } // uint16_t bank = it.first; // uint32_t startAddress = it.second.first; // if (startAddress != 0xFFFFFFFF) { // ImGui::Text("%04X: %d", startAddress, bank); // } ImGui::End(); } void stepCPU() { do { nes->clock(); } while (!nes->cpu.complete()); do { nes->clock(); } while (nes->cpu.complete()); if (cfgDisplayDisasm) disasm = nes->cpu.disassemble(nes->cpu.pc - 0x20, nes->cpu.pc + 0x20); } void stepFrame() { do { nes->clock(); } while (!nes->ppu.frame_complete); do { nes->clock(); } while (!nes->cpu.complete()); nes->ppu.frame_complete = false; if (cfgDisplayDisasm) disasm = nes->cpu.disassemble(nes->cpu.pc - 0x20, nes->cpu.pc + 0x20); } void mainLoop() { auto time1 = std::chrono::system_clock::now(); auto time2 = std::chrono::system_clock::now(); float residualTime = 0.0f, elapsed = 0.0f; float color[3] = {0.f, 0.f, 0.f}; sf::Clock deltaClock; sf::Color bgColor; // window.resetGLStates(); while (window.isOpen() && running) { time2 = std::chrono::system_clock::now(); std::chrono::duration<float> elapsedTime = time2 - time1; elapsed = elapsedTime.count(); time1 = time2; if (emuRunning) { if (residualTime > 0.0f) { residualTime -= elapsed; } else { residualTime += (1.0f / targetFPS) - elapsed; do { nes->clock(); if (breakpoint && (nes->cpu.pc == breakpointAddress)) { emuRunning = false; break; } } while (!nes->ppu.frame_complete); nes->ppu.frame_complete = false; if (cfgDisplayDisasm) { //disasm = nes->cpu.disassemble(0x8000, 0xFFFF); disasm = nes->cpu.disassemble(nes->cpu.pc - 0x20, nes->cpu.pc + 0x20); } } } while (window.pollEvent(event)) { ImGui::SFML::ProcessEvent(event); if (event.type == sf::Event::Closed) running = false; if (event.type == sf::Event::KeyPressed && event.key.control && event.key.code == sf::Keyboard::Q) running = false; if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape) running = false; if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Space) emuRunning = !emuRunning; if (!emuRunning) { if (event.type == sf::Event::KeyPressed) { if (event.key.code == sf::Keyboard::S) { stepCPU(); } if (event.key.code == sf::Keyboard::F) { stepFrame(); } } } Controller::Button b = Controller::Button::Down; if (event.type == sf::Event::JoystickMoved) { // TODO: FIX THIS! // maybe getAxisPosition is better? /* switch(event.joystickMove.axis) { case sf::Joystick::Axis::Z: printf("Z axis\n"); break; case sf::Joystick::Axis::R: printf("R axis\n"); break; case sf::Joystick::Axis::U: printf("U axis\n"); break; case sf::Joystick::Axis::V: printf("V axis\n"); break; default: printf("Axis ??? --- %d\n", event.joystickMove.axis); break; } */ // LR axis 6, UD axis 7 //printf("Joystick moved: %f\n", event.joystickMove.position); //if (event.joystickMove.axis == sf::Joystick::Axis::X) { if (event.joystickMove.axis == 6) { //printf("Joystick X axis moved: %f\n", event.joystickMove.position); if (event.joystickMove.position < 0) { nes->controller[0].pressButton(Controller::Button::Left); nes->controller[0].releaseButton(Controller::Button::Right); //nes->controller[0].releaseButton(Controller::Button::Up); //nes->controller[0].releaseButton(Controller::Button::Down); b = Controller::Button::Left; } if (event.joystickMove.position > 0) { nes->controller[0].pressButton(Controller::Button::Right); nes->controller[0].releaseButton(Controller::Button::Left); //nes->controller[0].releaseButton(Controller::Button::Up); //nes->controller[0].releaseButton(Controller::Button::Down); b = Controller::Button::Right; } if (event.joystickMove.position == 0) { nes->controller[0].releaseButton(Controller::Button::Left); nes->controller[0].releaseButton(Controller::Button::Right); } } //if (event.joystickMove.axis == sf::Joystick::Axis::Y) { if (event.joystickMove.axis == 7) { //printf("Joystick Y axis moved: %f\n", event.joystickMove.position); if (event.joystickMove.position < 0) { nes->controller[0].pressButton(Controller::Button::Up); //nes->controller[0].releaseButton(Controller::Button::Left); //nes->controller[0].releaseButton(Controller::Button::Right); nes->controller[0].releaseButton(Controller::Button::Down); b = Controller::Button::Up; } if (event.joystickMove.position > 0) { nes->controller[0].pressButton(Controller::Button::Down); //nes->controller[0].releaseButton(Controller::Button::Left); //nes->controller[0].releaseButton(Controller::Button::Right); nes->controller[0].releaseButton(Controller::Button::Up); b = Controller::Button::Down; } if (event.joystickMove.position == 0) { nes->controller[0].releaseButton(Controller::Button::Up); nes->controller[0].releaseButton(Controller::Button::Down); } } //if (event.joystickMove.position == 0) { //nes->controller[0].releaseButton(b); // nes->controller[0].releaseButton(Controller::Button::Left); // nes->controller[0].releaseButton(Controller::Button::Right); // nes->controller[0].releaseButton(Controller::Button::Up); // nes->controller[0].releaseButton(Controller::Button::Down); //} } if (event.type == sf::Event::JoystickButtonReleased) { //printf("Joystick button %d pressed\n", event.joystickButton.button); switch (event.joystickButton.button) { case 2: // B nes->controller[0].releaseButton(Controller::Button::B); break; case 0: // A nes->controller[0].releaseButton(Controller::Button::A); break; case 6: // Select nes->controller[0].releaseButton(Controller::Button::Select); break; case 7: // Start nes->controller[0].releaseButton(Controller::Button::Start); break; } } if (event.type == sf::Event::JoystickButtonPressed) { //printf("Joystick button %d pressed\n", event.joystickButton.button); switch (event.joystickButton.button) { case 2: // B nes->controller[0].pressButton(Controller::Button::B); break; case 0: // A nes->controller[0].pressButton(Controller::Button::A); break; case 6: // Select nes->controller[0].pressButton(Controller::Button::Select); break; case 7: // Start nes->controller[0].pressButton(Controller::Button::Start); break; } } if (event.type == sf::Event::KeyReleased) { switch (event.key.code) { case sf::Keyboard::Enter: nes->controller[0].releaseButton(Controller::Button::Start); break; case sf::Keyboard::Tab: nes->controller[0].releaseButton(Controller::Button::Select); break; case sf::Keyboard::W: nes->controller[0].releaseButton(Controller::Button::Up); break; case sf::Keyboard::A: nes->controller[0].releaseButton(Controller::Button::Left); break; case sf::Keyboard::S: nes->controller[0].releaseButton(Controller::Button::Down); break; case sf::Keyboard::D: nes->controller[0].releaseButton(Controller::Button::Right); break; case sf::Keyboard::K: nes->controller[0].releaseButton(Controller::Button::B); break; case sf::Keyboard::L: nes->controller[0].releaseButton(Controller::Button::A); break; default: break; } } if (event.type == sf::Event::KeyPressed) { switch (event.key.code) { // Controller 1 case sf::Keyboard::Enter: nes->controller[0].pressButton(Controller::Button::Start); break; case sf::Keyboard::Tab: nes->controller[0].pressButton(Controller::Button::Select); break; case sf::Keyboard::W: nes->controller[0].pressButton(Controller::Button::Up); break; case sf::Keyboard::A: nes->controller[0].pressButton(Controller::Button::Left); break; case sf::Keyboard::S: nes->controller[0].pressButton(Controller::Button::Down); break; case sf::Keyboard::D: nes->controller[0].pressButton(Controller::Button::Right); break; case sf::Keyboard::K: nes->controller[0].pressButton(Controller::Button::B); break; case sf::Keyboard::L: nes->controller[0].pressButton(Controller::Button::A); break; // UI case sf::Keyboard::F10: cfgDisplayHelp = !cfgDisplayHelp; break; case sf::Keyboard::F1: cfgDisplayCpu = !cfgDisplayCpu; break; case sf::Keyboard::F2: cfgDisplayRam = !cfgDisplayRam; break; case sf::Keyboard::F3: cfgDisplayDisasm = !cfgDisplayDisasm; break; case sf::Keyboard::F4: cfgDisplayMapper = !cfgDisplayMapper; break; case sf::Keyboard::F5: cfgDisplayPPU = !cfgDisplayPPU; break; case sf::Keyboard::F7: cfgDisplayNES = !cfgDisplayNES; break; case sf::Keyboard::F8: targetFPS -= 5; break; case sf::Keyboard::F9: targetFPS += 5; break; case sf::Keyboard::P: (++selectedPalette) &= 0x07; break; case sf::Keyboard::Up: ram2start += 0x100; break; case sf::Keyboard::PageDown: ram2start += 0x1000; break; case sf::Keyboard::Down: ram2start -= 0x100; break; case sf::Keyboard::PageUp: ram2start -= 0x1000; break; case sf::Keyboard::R: nes->reset(); break; case sf::Keyboard::I: nes->cpu.irq(); break; case sf::Keyboard::N: nes->cpu.nmi(); break; default: break; } } } ImGui::SFML::Update(window, deltaClock.restart()); // Update and draw NES Screen if (cfgDisplayNES) { ImVec2 size = ImVec2(256 * NESScale, 240 * NESScale); ImGuiWindowFlags flags = cfgDisplayNESWindowDecorations ? ImGuiWindowFlags_None : ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize; ImGui::Begin("NES", NULL, flags); nesTex.update(nes->ppu.GetNesScreen()); ImGui::Image(nesScreen, size); ImGui::End(); } // ImGui::ShowDemoWindow(); // Menu if (ImGui::BeginMainMenuBar()) { if (ImGui::BeginMenu("Menu")) { if (ImGui::MenuItem("Open ROM", "Ctrl+O")) { } ImGui::Separator(); if (ImGui::MenuItem("Quit", "Ctrl+Q")) { running = false; } ImGui::EndMenu(); } ImGui::EndMainMenuBar(); } //////// Options window // TODO: hotkey to toggle showing or not ImGui::Begin("Options"); // begin window ImGui::DragFloat("Scale NES Screen", &NESScale, 0.05f); ImGui::Checkbox("Show window decorations on NES screen", &cfgDisplayNESWindowDecorations); ImGui::Checkbox("Show CPU info", &cfgDisplayCpu); ImGui::Checkbox("Show memory editor", &cfgDisplayRam); ImGui::Checkbox("Show disassembler", &cfgDisplayDisasm); ImGui::Checkbox("Show mapper info", &cfgDisplayMapper); ImGui::Checkbox("Show PPU info", &cfgDisplayPPU); ImGui::Checkbox("Show PPU Pattern Tables", &cfgDisplayPPUPatternTables); ImGui::Checkbox("Show PPU OAM", &cfgDisplayPPUOAM); ImGui::Checkbox("Show Memory Map", &cfgDisplayMemoryMap); ImGui::Checkbox("Disassembler: follow PC", &cfgDisassemblyFollowPC); // TODO: show controller state if (ImGui::ColorEdit3("Background color", color)) { bgColor.r = static_cast<sf::Uint8>(color[0] * 255.f); bgColor.g = static_cast<sf::Uint8>(color[1] * 255.f); bgColor.b = static_cast<sf::Uint8>(color[2] * 255.f); } ImGui::End(); //////// END options window //////// Emulator control window ImGui::Begin("Emulator Controls"); // TODO Status label if (emuRunning) { if (ImGui::Button("Pause emulation")) { emuRunning = !emuRunning; } } else { if (ImGui::Button("Run")) { emuRunning = !emuRunning; } ImGui::SameLine(); if (ImGui::Button("Step CPU")) { stepCPU(); } ImGui::SameLine(); if (ImGui::Button("Step frame")) { stepFrame(); } } ImGui::End(); window.clear(bgColor); int x = 10; // Draw help text // TODO: update! if (cfgDisplayHelp) { ImGui::Begin("Help"); // drawString(x, 580, "s = step r = reset i = irq n = nmi up/down/pgup/pgdn = change ram view"); // drawString(x, 600, "f = frame spc = run 9/0 = +/- fps (" + std::to_string((int)targetFPS) + " fps) ESC = quit"); // drawString(x, 620, "residualTime: " + std::to_string(residualTime) + " elapsed: " + std::to_string(elapsed)); ImGui::Text("space - start/stop emulation"); ImGui::Text("i - irq"); ImGui::Text("n - nmi"); ImGui::Text("r - reset"); ImGui::Text("F1 - show cpu status"); ImGui::Text("F2 - show memory editor"); ImGui::Text("F3 - show disassembly"); ImGui::Text("F4 - show mapper status"); ImGui::Text("F5 - show ppu status"); ImGui::Text("F8 - decrease fps"); ImGui::Text("F9 - increase fps"); ImGui::Text("F10 - show this help"); ImGui::Text("esc - quit"); ImGui::Text(" "); ImGui::Text("controller 1:"); ImGui::Text("wasd - up/down/left/right"); ImGui::Text("k/l - b/a"); ImGui::Text(" "); ImGui::Text("when emulation is stopped:"); ImGui::Text("f - advance one frame"); ImGui::Text("s - step cpu"); ImGui::End(); } // Draw RAM if (cfgDisplayRam) { // drawRAM(x + 10, 12, 0x0000, 16, 16); // drawRAM(x + 10, 320, ram2start, 16, 16); showMemoryEditor(); } x += 264; // Draw CPU status if (cfgDisplayCpu) drawCPU(/*x + 1200, 12*/); // Draw mapper info if (cfgDisplayMapper) drawMapper(x + 1200, cSize * 8); // Draw disassembly if (cfgDisplayDisasm) drawDisasm(); // Draw PPU status if (cfgDisplayPPU) drawPPU(); // Draw PPU Pattern Tables if (cfgDisplayPPUPatternTables) drawPPUPatternTables(20, 650); // Draw PPU OAM if (cfgDisplayPPUOAM) drawPPUOAM(); // Display Memory Map if (cfgDisplayMemoryMap) drawMemoryMap(); ImGui::SFML::Render(window); // Display the window window.display(); //sf::sleep(sf::microseconds(10)); } }; void start() { printf("[ Loading Cartridge ]\n"); cart = std::make_shared<Cartridge>(nesFilename); printf("[ Inserting Cartridge ]\n"); nes->insertCartridge(cart); if (!cart->isValid()) { printf("Invalid or unusable NES file!\n"); exit(1); } // printf("[ Disassembling code ]\n"); // disasm = nes->cpu.disassemble(0x8000, 0xFFFF); printf("[ Preparing Disassembly ]\n"); disassembler.disassemble(0x8000, 0xFFFF); disassemblyData = disassembler.get(0x8000, 0xFFFF); printf("[ Resetting NES ]\n"); nes->reset(); } }; int main(int argc, char *argv[]) { bool breakpoint = false; int breakpointAddress = 0; printf("\nNESSY v%s\n\n", VERSION_STRING); if (argc < 2) { printf("Provide ROM filename.\n"); exit(0); } if (argc > 3) { std::string s = string(argv[2]); if (s == "-b") { breakpoint = true; breakpointAddress = std::stoi(string(argv[3]), nullptr, 16); } } printf("[ Constructing Machine ]\n"); TheNES = make_shared<Machine>(); printf("[ Constructing Interface ]\n"); // SFML NessyApplication nessy(TheNES, argv[1], breakpoint, breakpointAddress); memoryEditor.AttachMachine(TheNES); if (nessy.construct(1900, 960, 3, 3)) { printf("[ Starting Emulation ]\n"); nessy.start(); nessy.mainLoop(); } else { printf("ERROR during application initialization!\n"); exit(1); } ImGui::SFML::Shutdown(); printf("\n"); return 0; }
b5aed390ec213fa87b1fd85bcbedabb2f0075109
a3af266d326124d8ba3f256a51a999f64c2040d1
/Module8/code/pointers/ex2.cpp
d41550cad08ebd42828e57809207fe6ab5517dcb
[]
no_license
wjshku/COMP2113
e0c64ed1b67c4b19a0aa494a91edb16e8f04c2d5
73af2ce5e25fe1922ed6fc15d49f64f9d79b4daa
refs/heads/master
2023-01-24T10:41:57.429562
2020-11-30T10:02:28
2020-11-30T10:02:28
296,045,333
0
0
null
null
null
null
UTF-8
C++
false
false
213
cpp
ex2.cpp
#include<iostream> using namespace std; void addOneref(int &num){ num++; } void addOnepoi(int *p){ (*p)++; } int main(){ int num = 0; addOneref(num); cout<<num<<endl; addOnepoi(&num); cout<<num<<endl; }
1f550a2c1c49fc12f8535aa56f41e21c5a485d3e
73a52d0a1325c9865896a9197730875cb6d46c61
/Framework/Geometry/test/ReferenceFrameTest.h
f203819da2d9f77200d5c7ae6c7e8db1d8142632
[]
no_license
dezed/mantid
47b3c9f57f9adf2b6ac642ae407d26f06a0889c5
9095776c26e868a00d8126ad275626f910d66f62
refs/heads/master
2021-01-15T13:51:57.852879
2016-03-08T10:49:43
2016-03-08T10:49:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,180
h
ReferenceFrameTest.h
#ifndef MANTID_GEOMETRY_REFERENCEFRAMETEST_H_ #define MANTID_GEOMETRY_REFERENCEFRAMETEST_H_ #include <cxxtest/TestSuite.h> #include "MantidKernel/Timer.h" #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" #include "MantidGeometry/Instrument/ReferenceFrame.h" using namespace Mantid; using namespace Mantid::Kernel; using namespace Mantid::Geometry; class ReferenceFrameTest : public CxxTest::TestSuite { public: // This pair of boilerplate methods prevent the suite being created statically // This means the constructor isn't called when running other tests static ReferenceFrameTest *createSuite() { return new ReferenceFrameTest(); } static void destroySuite(ReferenceFrameTest *suite) { delete suite; } void testDefaultSettings() { ReferenceFrame defaultInstance; TSM_ASSERT_EQUALS("Anticipated default from default constructor.", Y, defaultInstance.pointingUp()); TSM_ASSERT_EQUALS("Anticipated default from default constructor.", Z, defaultInstance.pointingAlongBeam()); TSM_ASSERT_EQUALS("Anticipated default from default constructor.", Right, defaultInstance.getHandedness()); TSM_ASSERT_EQUALS("Anticipated default from default constructor.", "source", defaultInstance.origin()); } void testGetUp() { ReferenceFrame frame1(X, Y, Right, "source"); ReferenceFrame frame2(Z, Y, Right, "source"); TS_ASSERT_EQUALS(X, frame1.pointingUp()); TS_ASSERT_EQUALS(Z, frame2.pointingUp()); } void testGetAlongBeam() { ReferenceFrame frame1(X, Y, Right, "source"); ReferenceFrame frame2(Z, X, Right, "source"); TS_ASSERT_EQUALS(Y, frame1.pointingAlongBeam()); TS_ASSERT_EQUALS(X, frame2.pointingAlongBeam()); } void testGetHorizontal() { doGetHorizontalTest(Right); doGetHorizontalTest(Left); } void doGetHorizontalTest(Mantid::Geometry::Handedness handed) { ReferenceFrame frame1(X, Y, handed, "source"); // X up, Y along beam TS_ASSERT_EQUALS(Z, frame1.pointingHorizontal()); ReferenceFrame frame2(X, Z, handed, "source"); // X up, Z along beam TS_ASSERT_EQUALS(Y, frame2.pointingHorizontal()); ReferenceFrame frame3(Y, Z, handed, "source"); // Y up, Z along beam TS_ASSERT_EQUALS(X, frame3.pointingHorizontal()); ReferenceFrame frame4(Y, X, handed, "source"); // Y up, X along beam TS_ASSERT_EQUALS(Z, frame4.pointingHorizontal()); ReferenceFrame frame5(Z, X, handed, "source"); // Z up, X along beam TS_ASSERT_EQUALS(Y, frame5.pointingHorizontal()); ReferenceFrame frame6(Z, Y, handed, "source"); // Z up, Y along beam TS_ASSERT_EQUALS(X, frame6.pointingHorizontal()); } void testGetHandedNess() { ReferenceFrame frameRight(X, Y, Right, "source"); ReferenceFrame frameLeft(X, Y, Left, "source"); TS_ASSERT_EQUALS(Right, frameRight.getHandedness()); TS_ASSERT_EQUALS(Left, frameLeft.getHandedness()); } void testGetOrigin() { ReferenceFrame frame(X, Y, Right, "source"); TS_ASSERT_EQUALS("source", frame.origin()); } void testIdenticalUpAndBeamDirectionsThrow() { TS_ASSERT_THROWS(ReferenceFrame(X, X, Right, "source"), std::invalid_argument); } void testGetUpDirectionVector() { ReferenceFrame x(X, Y, Right, "source"); V3D x_vec = x.vecPointingUp(); TS_ASSERT_EQUALS(1, x_vec[0]); TS_ASSERT_EQUALS(0, x_vec[1]); TS_ASSERT_EQUALS(0, x_vec[2]); ReferenceFrame y(Y, X, Right, "source"); V3D y_vec = y.vecPointingUp(); TS_ASSERT_EQUALS(0, y_vec[0]); TS_ASSERT_EQUALS(1, y_vec[1]); TS_ASSERT_EQUALS(0, y_vec[2]); ReferenceFrame z(Z, Y, Right, "source"); V3D z_vec = z.vecPointingUp(); TS_ASSERT_EQUALS(0, z_vec[0]); TS_ASSERT_EQUALS(0, z_vec[1]); TS_ASSERT_EQUALS(1, z_vec[2]); } void testGetAlongBeamDirectionVector() { ReferenceFrame x(Y, X, Right, "source"); V3D x_vec = x.vecPointingAlongBeam(); TS_ASSERT_EQUALS(1, x_vec[0]); TS_ASSERT_EQUALS(0, x_vec[1]); TS_ASSERT_EQUALS(0, x_vec[2]); ReferenceFrame y(X, Y, Right, "source"); V3D y_vec = y.vecPointingAlongBeam(); TS_ASSERT_EQUALS(0, y_vec[0]); TS_ASSERT_EQUALS(1, y_vec[1]); TS_ASSERT_EQUALS(0, y_vec[2]); ReferenceFrame z(X, Z, Right, "source"); V3D z_vec = z.vecPointingAlongBeam(); TS_ASSERT_EQUALS(0, z_vec[0]); TS_ASSERT_EQUALS(0, z_vec[1]); TS_ASSERT_EQUALS(1, z_vec[2]); } void testAxisLabelReturns() { ReferenceFrame x(Y, X, Right, "source"); TS_ASSERT_EQUALS("Y", x.pointingUpAxis()); TS_ASSERT_EQUALS("X", x.pointingAlongBeamAxis()); TS_ASSERT_EQUALS("Z", x.pointingHorizontalAxis()); ReferenceFrame y(X, Y, Right, "source"); TS_ASSERT_EQUALS("X", y.pointingUpAxis()); TS_ASSERT_EQUALS("Y", y.pointingAlongBeamAxis()); TS_ASSERT_EQUALS("Z", y.pointingHorizontalAxis()); ReferenceFrame z(X, Z, Right, "source"); TS_ASSERT_EQUALS("X", z.pointingUpAxis()); TS_ASSERT_EQUALS("Z", z.pointingAlongBeamAxis()); TS_ASSERT_EQUALS("Y", z.pointingHorizontalAxis()); } }; #endif /* MANTID_GEOMETRY_REFERENCEFRAMETEST_H_ */
2cd67eb0967633ad2d81459dc0102b24ed1386df
640c857f4fb58ebee674274353d2c35a2ce5391d
/my_fuwuqi/my_fuwuqi/fightServerConfig.hpp
dfadf2ad039eeadd308949ce169525554c069956
[]
no_license
wuxuewulinux/win_fuwuqi
c28db662057d106ae624dadaa6a6fde40e02e8a4
e8714f0bfa0908fed1897c2521f8ff1d205a6ecf
refs/heads/master
2020-04-11T06:08:41.743795
2019-02-17T16:18:53
2019-02-17T16:18:53
161,571,911
0
0
null
null
null
null
GB18030
C++
false
false
952
hpp
fightServerConfig.hpp
#ifndef _FIGHTSERVERCONFIG_HPP_ #define _FIGHTSERVERCONFIG_HPP_ #include"xmlnodeconfig.hpp" #include <map> struct FightServerInfo { int FightServerId; int FightServerPort; std::string FightServerIp; uint32_t UserCount; //用户连接人数,多少个人正在连接该战斗服务器 }; class FightServerConfig { public: FightServerConfig(); ~FightServerConfig(); bool Init(std::string configname); int InitFightServerConfig(TiXmlElement *RootElement); FightServerInfo* GetFightServerById(int iFightServerId); //按战斗服务器ID获取该战斗服务器信息 int GetEmptyFightServerID(); //获取一个空闲的战斗服务器ID给战斗房间的玩家. void AddFightServerUserCount(int iId,uint32_t iCount); //某个战斗服务器增加人数 void DownFightServerUserCount(int iId,uint32_t iCount); //某个战斗服务器减少人数 private: std::map<int,FightServerInfo> FightServerMap; }; #endif
a2274094586b11c2098d044a2bdbdc92ca1c661e
b014d2bd592c5556e5fbd179e2ccc99df7b8bccd
/card/MFRC522Hack.h
c6010e46f47c81115424cec6224d3efb6a2d024a
[]
no_license
lizeyan/Card
67f07fdc018ba44629142a832c2f753616f66132
9d2016f44737b802b36fa4a01815f7647f951f00
refs/heads/master
2020-12-02T22:47:19.884327
2017-07-29T09:51:01
2017-07-29T09:51:01
96,181,986
1
0
null
null
null
null
UTF-8
C++
false
false
496
h
MFRC522Hack.h
#ifndef MFRC522HACK_H #define MFRC522HACK_H #include <Arduino.h> #include "MFRC522.h" #include "MFRC522Debug.h" class MFRC522Hack { private: MFRC522 *const _device; public: MFRC522Hack(MFRC522 *const device) : _device(device) {}; bool MIFARE_OpenUidBackdoor(const bool logErrors) const; bool MIFARE_SetUid(const byte *newUid, const byte uidSize, const bool logErrors) const; bool MIFARE_UnbrickUidSector(const bool logErrors) const; }; #endif //MFRC522HACK_H
2623570d88c824af1fe0bca615087c165c8e2ae1
b14f0dee754164d38904f3e7a5d338e00fc14a3f
/ida_impl_analysis/EnumToString.cpp
37f33fa62052be49b571fa807fe382bdbe1d0d7d
[]
no_license
nihilus/ida_bochs_debugger
8999d21ff1e93ee774416d87e0b30ebc20a16a84
bc8a7e8eedf7019be2b37256eb3f3fbffc3891e6
refs/heads/master
2021-01-15T09:23:20.184315
2015-01-20T14:57:01
2015-01-20T14:57:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
47
cpp
EnumToString.cpp
#include <dbg.hpp> #include "EnumToString.h"
c2a110159b53332d11c9152aeeee35ee6587e657
8465159705a71cede7f2e9970904aeba83e4fc6c
/src_change_the_layout/stdfblib/events/GEN_E_MUX.h
d2cc3e8676060acc4b4f4b3158c5667318116d09
[]
no_license
TuojianLYU/forte_IO_OPCUA_Integration
051591b61f902258e3d0d6608bf68e2302f67ac1
4a3aed7b89f8a7d5f9554ac5937cf0a93607a4c6
refs/heads/main
2023-08-20T16:17:58.147635
2021-10-27T05:34:43
2021-10-27T05:34:43
419,704,624
1
0
null
null
null
null
UTF-8
C++
false
false
1,560
h
GEN_E_MUX.h
/******************************************************************************* * Copyright (c) 2011 ACIN * 2018 Johannes Kepler University * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Alois Zoitl * - initial API and implementation and/or initial documentation * Alois Zoitl - introduced new CGenFB class for better handling generic FBs *******************************************************************************/ #ifndef _GEN_E_MUX_H_ #define _GEN_E_MUX_H_ #include <genfb.h> class GEN_E_MUX : public CGenFunctionBlock<CFunctionBlock>{ DECLARE_GENERIC_FIRMWARE_FB(GEN_E_MUX) private: static const CStringDictionary::TStringId scm_anDataOutputNames[], scm_aunDODataTypeIds[]; static const TEventID scm_nEventEOID = 0; static const TForteInt16 scm_anEOWithIndexes[]; static const TDataIOID scm_anEOWith[]; static const CStringDictionary::TStringId scm_anEventOutputNames[]; CStringDictionary::TStringId *m_anEventInputNames; virtual void executeEvent(int paEIID); virtual bool createInterfaceSpec(const char *paConfigString, SFBInterfaceSpec &paInterfaceSpec); CIEC_UINT& K(){ return *static_cast<CIEC_UINT*>(getDO(0)); } GEN_E_MUX(const CStringDictionary::TStringId paInstanceNameId, CResource *paSrcRes); virtual ~GEN_E_MUX(); }; #endif //_GEN_E_MUX_H_
b4b11e3f69463e03ad5ff7f07ee04d7ae9d636cf
92d997e19d3d85d69f8c432a12367671960c8c6e
/C . C++/C++ (variado)/C++ Codes/Old Stuff/Nuevas practicas2/Vectores practica.cpp
de498a2f681613059295c69391d9da826ae0151e
[]
no_license
0aps/Legacy-Code
3aebc22d0d513e95ccf1b9149a80675cc02c04df
be8f336d6d0d3c63d2961c25e4584f9d08404b37
refs/heads/master
2021-01-10T21:38:58.395925
2014-09-24T20:36:16
2014-09-24T20:36:16
24,429,977
11
2
null
null
null
null
UTF-8
C++
false
false
1,080
cpp
Vectores practica.cpp
#include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { int notas[4]; int i,a; printf("@********************************************************@\n"); printf(" @ ***** * * ***** * * * * @\n"); printf(" @ * *-* * * * * * *-* @\n"); printf(" @ * * * * * * * * * * @\n"); printf(" @ ***** * * ***** ***** ****** ****** * * @\n"); printf("@********************************************************@\n"); printf("..................................\nCalcula tu Promedio\n..................................\n\n"); printf("Bienvenido\n\n"); printf("Que deceas hacer?\n\n"); printf("1.Calcular Tu promedio \n2.Salir\n\n"); scanf("%i", &a); switch (a) { case 1: for(i=0; i<4; i++) { printf("Nota %i: ", i+1); scanf("%i", &notas[i]); } printf("Tu promedio es: %i\n\n", notas[i]); system("pause"); break; case 2: system("pause"); system("exit"); break; default: printf("Opcion incorrecta"); printf("\nVuelva a elegir"); system("pause>nul"); } }
0bff01f4d6f8f1a4ae528289a12d756ec693108d
8d4c2ee081394d7f3bf8d4026726501ee587f36f
/2 Code/PCS/XYPCS/PCS.BasisData/DialogCraftStation.h
753142a1cb6815f345495265fa2b11f2bc81476f
[]
no_license
radtek/PCS
9ec9387fe714c0043457cd9f15a89dbdbd3a6c55
235a176fee6c0d886d81ddd17e9851fe6918357b
refs/heads/master
2020-06-21T22:12:28.629058
2018-04-03T11:47:13
2018-04-03T11:47:13
197,563,854
1
0
null
2019-07-18T10:16:19
2019-07-18T10:16:18
null
UTF-8
C++
false
false
391
h
DialogCraftStation.h
#ifndef DIALOGCRAFTSTATION_H #define DIALOGCRAFTSTATION_H #include <QDialog> namespace Ui { class DialogCraftStation; } class DialogCraftStation : public QDialog { Q_OBJECT public: explicit DialogCraftStation(QWidget *parent = 0); ~DialogCraftStation(); private Q_SLOTS: void slotAccept(); private: Ui::DialogCraftStation *ui; }; #endif // DIALOGCRAFTSTATION_H
a5792da7c6ac266c051f4d098b65a410c9c9d117
c63c4fed502fd4cbf82acc7901ba0d72b0338bdb
/Create/GUI/Viewport.cpp
5937736ee9d1185e6867600a5ac9837539800d92
[]
no_license
seeyousystems/core
7436a38fb09ea08f5d29cf8db2490c92f48d9267
baddc89a366ad769a1a9c9a59c14f28291b81971
refs/heads/master
2020-05-17T19:11:57.814200
2011-05-06T04:00:59
2011-05-06T04:00:59
1,517,217
1
4
null
null
null
null
UTF-8
C++
false
false
12,719
cpp
Viewport.cpp
/* * Viewport.cpp * * =========================================================================== * * Copyright 2008-2009 Daniel Kruesi (Dan Krusi) and David Grob * * This file is part of the emms framework. * * The emms framework 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 3 of the License, or * (at your option) any later version. * * The emms framework 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 software. If not, see <http://www.gnu.org/licenses/>. * */ // BUG: When zooming, the focus changes (traverses). The scroll bars need to be adjusted at // the same time... #include "Viewport.h" #include <QPainter> #include <QRect> #include <QPen> #include <QMouseEvent> #include <QKeyEvent> #include <QPushButton> #include <QToolBar> #include <QList> #include <QIcon> #include "../Library/Debug.h" #include "../Library/Util.h" Viewport::Viewport(int scale, int autoUpdateInterval, bool openGL, QWidget *parent) : QWidget(parent) { // Init this->scale = scale; sliderZoom = NULL; maps = new QList<Map*>(); mapMetas = new QList<MapMeta*>(); antiAlias = true; selectedAction = NULL; timerAutoUpdate = new QTimer(); timerAutoUpdate->setInterval(autoUpdateInterval); this->setAttribute(Qt::WA_DeleteOnClose, true); this->setWindowIcon(QIcon(":eye")); this->setWindowTitle("emss Viewport"); maxMapWidth = 0.0; maxMapHeight = 0.0; // Toolbar this->setLayout(new QVBoxLayout()); this->layout()->setContentsMargins(0,0,0,0); toolbar = new QToolBar(); toolbar->setAutoFillBackground(true); this->layout()->addWidget(toolbar); // Add scrollbars... gridLayout = new QGridLayout(); gridLayout->setContentsMargins(0,0,0,0); QWidget *gridHolder = new QWidget(); gridHolder->setLayout(gridLayout); this->layout()->addWidget(gridHolder); scrollHorizontal = new QScrollBar(Qt::Horizontal); scrollHorizontal->setMinimum(0); scrollHorizontal->setMaximum(1000); scrollHorizontal->setSingleStep(10); scrollVertical = new QScrollBar(Qt::Vertical); scrollVertical->setMinimum(0); scrollVertical->setMaximum(1000); scrollVertical->setSingleStep(10); gridLayout->addWidget(scrollHorizontal,3,1); gridLayout->addWidget(scrollVertical,0,2); // Canvas if(openGL) canvas = new DrawCanvasGL(); else canvas = new DrawCanvas(); gridLayout->addWidget(canvas, 0,1); // Zoom if(openGL) { // Only allow zooming if open gl. Software render is just not built for this... sliderZoom = new QSlider(Qt::Horizontal); setNaturalZoom(); gridLayout->addWidget(sliderZoom,2,1); } // Build menu menuMain = new QMenu(this); QAction *actionLabelNativeOrGL = new QAction( (openGL ? "openGL Render" : "Native Render"), menuMain); actionLabelNativeOrGL->setEnabled(false); menuMain->addAction(actionLabelNativeOrGL); actionAntiAlias = new QAction("Anti Alias", menuMain); actionAntiAlias->setCheckable(true); actionAntiAlias->setChecked(antiAlias); menuMain->addAction(actionAntiAlias); actionAutoUpdate = new QAction("Auto Update", menuMain); actionAutoUpdate->setCheckable(true); actionAutoUpdate->setChecked(true); menuMain->addAction(actionAutoUpdate); actionAutoFocus = new QAction("Auto Focus", menuMain); actionAutoFocus->setCheckable(true); actionAutoFocus->setChecked(true); menuMain->addAction(actionAutoFocus); menuMaps = new QMenu("Maps"); menuMain->addMenu(menuMaps); // Register events this->setFocusPolicy(Qt::StrongFocus); this->setMouseTracking(true); // Connections connect(menuMain, SIGNAL(triggered(QAction*)), this, SLOT(menuAction(QAction*))); connect(menuMaps, SIGNAL(triggered(QAction*)), this, SLOT(menuAction(QAction*))); connect(toolbar, SIGNAL(actionTriggered(QAction*)), this, SLOT(toolbarAction(QAction*))); connect(timerAutoUpdate, SIGNAL(timeout()), this, SLOT(paintAndShow())); connect(canvas,SIGNAL(draw(QPainter*)), this, SLOT(drawMaps(QPainter*))); connect(canvas,SIGNAL(mouseClick(QMouseEvent*)), this, SLOT(canvasClicked(QMouseEvent*))); if(sliderZoom) connect(sliderZoom, SIGNAL(valueChanged(int)), this, SLOT(zoomChanged())); // Start timers... resizeScrollbars(); timerAutoUpdate->start(); } Viewport::~Viewport() { timerAutoUpdate->stop(); delete timerAutoUpdate; delete maps; delete mapMetas; } void Viewport::registerMap(Map* map) { lock.lockForWrite(); { maps->append(map); mapMetas->append(new MapMeta(true)); QAction *actionShowHideMap = new QAction(map->name, menuMaps); actionShowHideMap->setData("map"); actionShowHideMap->setCheckable(true); actionShowHideMap->setChecked(true); menuMaps->addAction(actionShowHideMap); // Reload max sizes maxMapWidth = 0.0; maxMapHeight = 0.0; for(int i = 0; i < this->maps->count(); i++) { if(maps->at(i)->width() > maxMapWidth) maxMapWidth = maps->at(i)->width(); if(maps->at(i)->height() > maxMapHeight) maxMapHeight = maps->at(i)->height(); } maxMapWidth = maxMapWidth / scale; // convert back to pixel maxMapHeight = maxMapHeight / scale; // convert back to pixel scrollHorizontal->setMaximum((int)(maxMapWidth)); scrollVertical->setMaximum((int)(maxMapHeight)); } lock.unlock(); } void Viewport::unregisterAllMaps() { lock.lockForWrite(); { maps->clear(); mapMetas->clear(); menuMaps->clear(); } lock.unlock(); } void Viewport::resizeScrollbars() { // Deprecated, currently no longer used } void Viewport::paintAndShow() { canvas->repaint(); } void Viewport::drawMaps(QPainter *painter) { if(!this->isVisible() || !this->isEnabled()) return; // Don't bother drawing if not visible... // Calculate zoom and other commonly used values double zoom = getZoom(); double rzoom = 1.0 / zoom; // the reversed zoom double scrollX = (double)scrollHorizontal->value() / (double)(scrollHorizontal->maximum()); double scrollY = (double)scrollVertical->value() / (double)(scrollVertical->maximum()); // Init painting region this->view.setX((int)( (maxMapWidth-view.width()) * scrollX )); this->view.setY((int)( maxMapHeight-view.height() - ((maxMapHeight-view.height()) * scrollY) )); this->view.setWidth((int)( canvas->width() * rzoom )); this->view.setHeight((int)( canvas->height() * rzoom)); // Init painter and background painter->setRenderHint(QPainter::Antialiasing, antiAlias); painter->fillRect(0, 0, canvas->width(), canvas->height(), Qt::black); // Set the clipping region painter->setClipRect(0,0,canvas->width(),canvas->height()); // Draw all maps :) lock.lockForRead(); { for(int i = 0; i < this->maps->count(); i++) { // Paint the map. Note: Map is responsible for painting it's objects if(mapMetas->at(i)->show == true) { // Reset the painter, so that we have a clean one for each map Util::resetPainter(*painter); // Do transform for zoom, if not 1.0 if(zoom != 1.0) { QTransform t; t.scale(zoom,zoom); painter->setWorldTransform(t); } // Paint the actual map maps->at(i)->paint(*painter, this->view); } } } lock.unlock(); // Make disabled effect if(this->isEnabled() == false) { painter->setOpacity(0.5); painter->fillRect(0, 0, canvas->width(), canvas->height(), Qt::white); } } void Viewport::canvasClicked(QMouseEvent *event) { // Get the actual point clicked double rzoom = 1.0/getZoom(); long x = (long)((double)(event->x()*rzoom)) + view.x(); long y = view.height() - (long)((double)(event->y()*rzoom)) + view.y(); // Go through all actions, checking if we have some pressed so we can // process it on the point clicked... QList<QAction*> actions = toolbar->actions(); for(int i = 0; i < actions.count(); i++) { if(actions.at(i)->isChecked() == true) { // Check if we need to emit a signal or process it now if(actions.at(i)->data().toString().replace("[instant]","") == "focusviewport") { focusOnPoint(x*scale,y*scale); } else { emit toolbarAction(this, actions.at(i)->data().toString().replace("[instant]",""), x, y); } } } } void Viewport::keyPressEvent(QKeyEvent *event) { switch(event->key()) { case Qt::Key_Up: moveMapUp(); break; case Qt::Key_Down: moveMapDown(); break; case Qt::Key_Left: moveMapLeft(); break; case Qt::Key_Right: moveMapRight(); break; default: QWidget::keyPressEvent(event); } } void Viewport::resizeEvent(QResizeEvent *event) { this->resizeScrollbars(); } void Viewport::moveMapUp() { scrollVertical->setValue(scrollVertical->value() - 20); } void Viewport::moveMapDown() { scrollVertical->setValue(scrollVertical->value() + 20); } void Viewport::moveMapLeft() { scrollHorizontal->setValue(scrollHorizontal->value() - 20); } void Viewport::moveMapRight() { scrollHorizontal->setValue(scrollHorizontal->value() + 20); } void Viewport::contextMenuEvent(QContextMenuEvent *event) { menuMain->exec(event->globalPos()); } void Viewport::menuAction(QAction *action) { if(action == actionAntiAlias) { antiAlias = actionAntiAlias->isChecked(); } else if(action == actionAutoUpdate) { if(actionAutoUpdate->isChecked() == true) timerAutoUpdate->start(); else timerAutoUpdate->stop(); } else if(action->data() == "map") { // This is a map show/hide action, find the correct one and show/hide it... lock.lockForRead(); { for(int i = 0; i < this->maps->count(); i++) { if(maps->at(i)->name == action->text()) { mapMetas->at(i)->show = action->isChecked(); } } } lock.unlock(); } } void Viewport::setAntiAlias(bool value) { antiAlias = value; actionAntiAlias->setChecked(antiAlias); } void Viewport::addToolbarAction(QString title, QString value, QIcon icon) { QAction *action; if ( icon.isNull() ){ action = toolbar->addAction(title); } else { action = toolbar->addAction(icon, title); } action->setCheckable(true); action->setData(value); } void Viewport::addToolbarSeparator(){ toolbar->addSeparator(); } void Viewport::toolbarAction(QAction *action) { // Set the correct canvas cursor bool somethingChecked = false; QList<QAction*> actions = toolbar->actions(); for(int i = 0; i < actions.count(); i++) { if(actions.at(i)->isChecked() == true && !action->data().toString().endsWith("[instant]")) { somethingChecked = true; break; } } if(somethingChecked == true) canvas->setCursor(Qt::CrossCursor); else canvas->setCursor(Qt::ArrowCursor); if(action->data().toString().endsWith("[instant]")) { emit toolbarAction(this, action->data().toString().replace("[instant]",""), 0, 0); } } void Viewport::focusOnPoint(long x, long y) { double px = (x/scale) / maxMapWidth; double py = (y/scale) / maxMapHeight; scrollHorizontal->setValue((scrollHorizontal->maximum()+view.width())*px - view.width()/2); scrollVertical->setValue(scrollVertical->maximum() - (scrollVertical->maximum()+view.height())*py + view.height()/2); } void Viewport::resetToolbar() { QList<QAction*> actions = toolbar->actions(); for(int i = 0; i < actions.count(); i++) { if(actions.at(i)->isChecked() == true) { actions.at(i)->setChecked(false); } } this->setCursor(Qt::ArrowCursor); } void Viewport::autoFocus(long x, long y) { if(actionAutoFocus->isChecked() == true && (previousAutoFocusX != x || previousAutoFocusY != y)) { previousAutoFocusX = x; previousAutoFocusY = y; focusOnPoint(x, y); } } void Viewport::closeEvent(QCloseEvent *event) { // Signal the close and accept the event emit closed(this); event->accept(); } double Viewport::getZoom() { if(!sliderZoom) return 1.0; // Target range: 0.3 - 3.0 double p = (double)sliderZoom->value() / (double)sliderZoom->maximum(); double min = 0.3; double max = 3.0; return min + p * (max - min); } void Viewport::setNaturalZoom() { // Target zoom: 1.0 double min = 0.3; double max = 3.0; double p = (1.0 - min) / (max - min); sliderZoom->setValue(p*sliderZoom->maximum()); } void Viewport::zoomChanged() { } void Viewport::setScale(long scale){ this->scale = scale; }
a662dabdda955b2210dcb45a2f7fc873c83547de
6a171e51da9c223f889fe2ef9d243a624ddf1623
/Code/Review/petsc_fem_context.cxx
4e198534d18e268b9f86251b47fdfe95e209da25
[]
no_license
ImageGuidedTherapyLab/ImageGuidedSolvers
9a8eb0d779699163e0ac9ba3ef4a734e451420e6
0789bd78a09b1e607743aef0fdfee45e5e5f0099
refs/heads/master
2020-04-22T23:25:43.323472
2013-05-10T23:41:04
2013-05-10T23:41:04
6,768,767
0
1
null
null
null
null
UTF-8
C++
false
false
21,825
cxx
petsc_fem_context.cxx
// 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 // Lesser General Public License for more details. // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "petsc_fem_context.h" #include "dof_map.h" #include "elem.h" #include "fe_base.h" #include "fe_interface.h" //local #include "optimizationParameter.h" #include "petsc_fem_system.h" namespace libMesh { PetscFEMContext::PetscFEMContext (const System& sys) : FEMContext(sys) { unsigned int n_vars = sys.n_vars(); elem_old_subsolutions.reserve(n_vars); m_theta.resize(n_vars,0.5);// assume crank nicolson for (unsigned int i=0; i != n_vars; ++i) { elem_old_subsolutions.push_back(new DenseSubVector<Number>(elem_old_solution)); } } PetscFEMContext::~PetscFEMContext () { for (unsigned int i=0; i != elem_old_subsolutions.size(); ++i) { delete elem_old_subsolutions[i]; } } Number PetscFEMContext::interior_theta_value(unsigned int var, unsigned int qp) { // Get local-to-global dof index lookup libmesh_assert (dof_indices.size() > var); const unsigned int n_dofs = dof_indices_var[var].size(); // Get current local coefficients libmesh_assert (elem_old_subsolutions.size() > var); libmesh_assert (elem_old_subsolutions[var] != NULL); libmesh_assert (elem_subsolutions.size() > var); libmesh_assert (elem_subsolutions[var] != NULL); DenseSubVector<Number> &coef = *elem_subsolutions[var]; DenseSubVector<Number> &coef_old = *elem_old_subsolutions[var]; // Get shape function values at quadrature point const std::vector<std::vector<Real> > &phi = element_fe_var[var]->get_phi(); // Accumulate solution value libmesh_assert (m_theta.size() > var); Number u_theta = 0.; for (unsigned int l=0; l != n_dofs; l++) u_theta += phi[l][qp] * ( m_theta[var] * coef(l) + ( 1.0 - m_theta[var] ) * coef_old(l) ); return u_theta; } Gradient PetscFEMContext::interior_theta_gradient(unsigned int var, unsigned int qp) { // Get local-to-global dof index lookup libmesh_assert (dof_indices.size() > var); const unsigned int n_dofs = dof_indices_var[var].size(); // Get current local coefficients libmesh_assert (elem_old_subsolutions.size() > var); libmesh_assert (elem_old_subsolutions[var] != NULL); libmesh_assert (elem_subsolutions.size() > var); libmesh_assert (elem_subsolutions[var] != NULL); DenseSubVector<Number> &coef = *elem_subsolutions[var]; DenseSubVector<Number> &coef_old = *elem_old_subsolutions[var]; // Get shape function values at quadrature point const std::vector<std::vector<RealGradient> > &dphi = element_fe_var[var]->get_dphi(); // Accumulate solution derivatives libmesh_assert (m_theta.size() > var); Gradient theta_du; for (unsigned int l=0; l != n_dofs; l++) theta_du.add_scaled(dphi[l][qp], m_theta[var] * coef(l) + ( 1.0 - m_theta[var] ) * coef_old(l) ); return theta_du; } Number PetscFEMContext::side_theta_value(unsigned int var, unsigned int qp) { // Get local-to-global dof index lookup libmesh_assert (dof_indices.size() > var); const unsigned int n_dofs = dof_indices_var[var].size(); // Get current local coefficients libmesh_assert (elem_old_subsolutions.size() > var); libmesh_assert (elem_old_subsolutions[var] != NULL); libmesh_assert (elem_subsolutions.size() > var); libmesh_assert (elem_subsolutions[var] != NULL); DenseSubVector<Number> &coef = *elem_subsolutions[var]; DenseSubVector<Number> &coef_old = *elem_old_subsolutions[var]; // Get shape function values at quadrature point const std::vector<std::vector<Real> > &phi = side_fe_var[var]->get_phi(); // Accumulate solution value libmesh_assert (m_theta.size() > var); Number u_theta = 0.; for (unsigned int l=0; l != n_dofs; l++) u_theta += phi[l][qp] * ( m_theta[var] * coef(l) + ( 1.0 - m_theta[var] ) * coef_old(l) ); return u_theta; } Gradient PetscFEMContext::side_theta_gradient(unsigned int var, unsigned int qp) { // Get local-to-global dof index lookup libmesh_assert (dof_indices.size() > var); const unsigned int n_dofs = dof_indices_var[var].size(); // Get current local coefficients libmesh_assert (elem_old_subsolutions.size() > var); libmesh_assert (elem_old_subsolutions[var] != NULL); libmesh_assert (elem_subsolutions.size() > var); libmesh_assert (elem_subsolutions[var] != NULL); DenseSubVector<Number> &coef = *elem_subsolutions[var]; DenseSubVector<Number> &coef_old = *elem_old_subsolutions[var]; // Get shape function values at quadrature point const std::vector<std::vector<RealGradient> > &dphi = side_fe_var[var]->get_dphi(); // Accumulate solution derivatives libmesh_assert (m_theta.size() > var); Gradient du_theta; for (unsigned int l=0; l != n_dofs; l++) du_theta.add_scaled(dphi[l][qp], m_theta[var] * coef(l) + ( 1.0 - m_theta[var] ) * coef_old(l) ); return du_theta; } Number PetscFEMContext::interior_diff_value(unsigned int var, unsigned int qp) { // Get local-to-global dof index lookup libmesh_assert (dof_indices.size() > var); const unsigned int n_dofs = dof_indices_var[var].size(); // Get current local coefficients libmesh_assert (elem_old_subsolutions.size() > var); libmesh_assert (elem_old_subsolutions[var] != NULL); libmesh_assert (elem_subsolutions.size() > var); libmesh_assert (elem_subsolutions[var] != NULL); DenseSubVector<Number> &coef = *elem_subsolutions[var]; DenseSubVector<Number> &coef_old = *elem_old_subsolutions[var]; // Get shape function values at quadrature point const std::vector<std::vector<Real> > &phi = element_fe_var[var]->get_phi(); // Accumulate solution value libmesh_assert (m_theta.size() > var); Number u_diff = 0.; for (unsigned int l=0; l != n_dofs; l++) u_diff += phi[l][qp] * ( coef(l) - coef_old(l)); return u_diff; } void PetscFEMContext::pre_fe_reinit(const System &sys, Elem *e) { FEMContext::pre_fe_reinit(sys, e); // sys must be a QNTransientRBSystem const PetscFEMSystem& tfem_system = libmesh_cast_ref<const PetscFEMSystem&>(sys); // Initialize the per-element data for elem. unsigned int n_dofs = dof_indices.size(); elem_old_solution.resize(n_dofs); for (unsigned int i=0; i != n_dofs; ++i) elem_old_solution(i) = tfem_system.prev_solution(dof_indices[i]); // Initialize the per-variable data for elem. unsigned int sub_dofs = 0; for (unsigned int i=0; i != tfem_system.n_vars(); ++i) { tfem_system.get_dof_map().dof_indices (elem, dof_indices_var[i], i); elem_old_subsolutions[i]->reposition (sub_dofs, dof_indices_var[i].size()); sub_dofs += dof_indices_var[i].size(); } libmesh_assert(sub_dofs == n_dofs); } ///*----------------------------------------------------------------------*/ //void PDEModelBaseClass::SetupState(EquationSystems &) //{ // PetscFunctionBegin; // // // Values to hold the solution & its gradient at the previous // // timestep and the current "position". // u__current.resize(numSystemVars,0.0); // u_previous.resize(numSystemVars,0.0); // grad_u_mtheta.resize(numSystemVars,0.0); // // // variable dofs // n_u_dofs.resize(numSystemVars,0); // dof_indices_u.resize(numSystemVars); // // // The element shape functions evaluated at the quadrature points. // phi.resize(numSystemVars,NULL); // // // The element shape function gradients evaluated at the quadrature points. // dphi.resize(numSystemVars,NULL); // // // error check // libmesh_assert ( m_NeumannFlux.size() == numSystemVars ); // libmesh_assert ( m_newton_coeff.size() == numSystemVars ); // libmesh_assert ( m_u_infty.size() == numSystemVars ); // // PetscFunctionReturnVoid(); //} // ///*----------------------------------------------------------------------*/ //void PDEModelBaseClass::SetupAdjoint( const unsigned int ) //{ // PetscFunctionBegin; // // // Values to hold the solution & its gradient at the previous // // timestep and the current "position". // u___future.resize(numSystemVars,0.0); // p___future.resize(numSystemVars,0.0); // p__now.resize(numSystemVars,0.0); // s_previous.resize(numSystemVars,0.0); // s__current.resize(numSystemVars,0.0); // s___future.resize(numSystemVars,0.0); // s_zero.resize(numSystemVars,0.0); // s_full.resize(numSystemVars,0.0); // ds_current.resize(numSystemVars,0.0); // grad_u_ptheta.resize(numSystemVars,0.0); // grad_p___future.resize(numSystemVars,0.0); // grad_p__now.resize(numSystemVars,0.0); // du_previous.resize(numSystemVars,0.0); // du__current.resize(numSystemVars,0.0); // grad_du_mtheta.resize(numSystemVars,0.0); // grad_du_previous.resize(numSystemVars,0.0); // // // variable dofs // n_p_dofs.resize(numSystemVars,0); // dof_indices_p.resize(numSystemVars); // // // The element shape functions evaluated at the quadrature points. // psi.resize(numSystemVars,NULL); // // // The element shape function gradients evaluated at the quadrature points. // dpsi.resize(numSystemVars,NULL); // // CHKMEMA; // check for memory corruption use -malloc_debug to enable // // PetscFunctionReturnVoid(); //} // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateSolutionForState(const unsigned int &qp, // PetscFEMSystem &system) // { // PetscFunctionBegin; // // // notice that the current time gradient and solution // // are computed with the "solution" vector // // "vector_solution" has not been updated yet // for( unsigned int i_var = 0 ; i_var < numSystemVars ; i_var++) // { // // re initialize // u__current[i_var]=0.0; // u_previous[i_var]=0.0; // grad_u_mtheta[i_var].zero() ; // for (unsigned int i=0; i<n_u_dofs[i_var]; i++) // { // u__current[i_var]+=(*phi[i_var])[i][qp]*system.current_solution( // dof_indices_u[i_var][i]); // u_previous[i_var]+=(*phi[i_var])[i][qp]* // system.prev_solution( // dof_indices_u[i_var][i]); // grad_u_mtheta[i_var].add_scaled ((*dphi[i_var])[i][qp], // (1.0-m_theta)*system.prev_solution( dof_indices_u[i_var][i]) // + // m_theta *system.current_solution(dof_indices_u[i_var][i]) // ); // } // } // PetscFunctionReturnVoid(); // } // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateSolutionForAdjoint(const unsigned int &qp, // const int istep, // PetscFEMSystem &state_system, // PetscFEMSystem &adjoint_system) // { // PetscFunctionBegin; // // // the state solution computed during the state solve is used // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // u__current[i_var]=0.0; // u_previous[i_var]=0.0; // u___future[i_var]=0.0; // grad_u_mtheta[i_var].zero() ; // grad_u_ptheta[i_var].zero() ; // for (unsigned int i=0; i<n_u_dofs[i_var]; i++) // { // //state // u__current[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep ); // u_previous[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep-1); // u___future[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep+1); // grad_u_mtheta[i_var].add_scaled ((*dphi[i_var])[i][qp], // (1.0- m_theta)*state_system.stored_solution( // dof_indices_u[i_var][i],istep-1) // + // m_theta *state_system.stored_solution( // dof_indices_u[i_var][i],istep ) // ); // grad_u_ptheta[i_var].add_scaled ((*dphi[i_var])[i][qp], // m_theta *state_system.stored_solution( // dof_indices_u[i_var][i],istep+1) // + // (1.0- m_theta)*state_system.stored_solution( // dof_indices_u[i_var][i],istep ) // ); // } // } // // // variables to hold the adjoint and adjoint gradient // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // p___future[i_var]=0.0; // grad_p___future[i_var].zero() ; // for (unsigned int i=0; i<n_p_dofs[i_var]; i++) // { // p___future[i_var]+=(*psi[i_var])[i][qp]* // adjoint_system.prev_solution(dof_indices_p[i_var][i]) ; // grad_p___future[i_var].add_scaled ( (*dpsi[i_var])[i][qp], // adjoint_system.prev_solution(dof_indices_p[i_var][i]) ); // } // } // PetscFunctionReturnVoid(); // } // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateSolutionForAdjoint(const unsigned int &qp, // PetscFEMSystem &adjoint_system) // { // PetscFunctionBegin; // // // variables to hold the adjoint and adjoint gradient // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // p__now[i_var]=0.0; // grad_p__now[i_var].zero() ; // for (unsigned int i=0; i<n_p_dofs[i_var]; i++) // { // p__now[i_var]+=(*psi[i_var])[i][qp]* // adjoint_system.current_solution( dof_indices_p[i_var][i] ); // grad_p__now[i_var].add_scaled ( (*dpsi[i_var])[i][qp], // adjoint_system.current_solution(dof_indices_p[i_var][i] ) ); // } // } // PetscFunctionReturnVoid(); // } // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateIdealSolution(const unsigned int &qp, // const int istep, const int Nstephi, // PetscFEMSystem &state_system, // PetscFEMSystem &ideal_system, // PetscFEMSystem &ideal_uncertainty_system) // { // PetscFunctionBegin; // // the state solution computed during the state solve is used // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // u__current[i_var]=0.0; // u_previous[i_var]=0.0; // s_previous[i_var]=0.0; // s__current[i_var]=0.0; // s___future[i_var]=0.0; // s_zero[i_var]=0.0; // s_full[i_var]=0.0; // ds_current[i_var]=0.0; // for (unsigned int i=0; i<n_u_dofs[i_var]; i++) // { // //state // u__current[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep ); // u_previous[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep-1); // // ideal // s_zero[i_var] += (*phi[i_var])[i][qp]*ideal_system.stored_solution( // dof_indices_u[i_var][i],0 ); // s_previous[i_var] += (*phi[i_var])[i][qp]*ideal_system.stored_solution( // dof_indices_u[i_var][i],istep-1 ); // s__current[i_var] += (*phi[i_var])[i][qp]*ideal_system.stored_solution( // dof_indices_u[i_var][i],istep ); // s___future[i_var] += (*phi[i_var])[i][qp]*ideal_system.stored_solution( // dof_indices_u[i_var][i],istep+1 ); // s_full[i_var] += (*phi[i_var])[i][qp]*ideal_system.stored_solution( // dof_indices_u[i_var][i],Nstephi); // // ideal uncertainty // ds_current[i_var] += (*phi[i_var])[i][qp]* // ideal_uncertainty_system.stored_solution( // dof_indices_u[i_var][i],istep ); // } // } // PetscFunctionReturnVoid(); // } // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateSolutionForGradient(const unsigned int &qp, // const int istep, // PetscFEMSystem &state_system, // PetscFEMSystem &adjoint_system) // { // PetscFunctionBegin; // // // the state solution computed during the state solve is used // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // u__current[i_var]=0.0; // u_previous[i_var]=0.0; // grad_u_mtheta[i_var].zero() ; // for (unsigned int i=0; i<n_u_dofs[i_var]; i++) // { // //state // u__current[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep ); // u_previous[i_var]+=(*phi[i_var])[i][qp]* state_system.stored_solution( // dof_indices_u[i_var][i],istep-1); // grad_u_mtheta[i_var].add_scaled ((*dphi[i_var])[i][qp], // (1.0- m_theta)*state_system.stored_solution( // dof_indices_u[i_var][i],istep-1) // + // m_theta *state_system.stored_solution( // dof_indices_u[i_var][i],istep ) // ); // } // } // // // variables to hold the adjoint and adjoint gradient // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // p__now[i_var]=0.0; // grad_p__now[i_var].zero() ; // for (unsigned int i=0; i<n_p_dofs[i_var]; i++) // { // p__now[i_var]+=(*psi[i_var])[i][qp]* // adjoint_system.stored_solution(dof_indices_p[i_var][i],istep ); // grad_p__now[i_var].add_scaled ( (*dpsi[i_var])[i][qp], // adjoint_system.stored_solution(dof_indices_p[i_var][i],istep )); // } // } // PetscFunctionReturnVoid(); // } // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateSolutionForSensitivity(const unsigned int &qp, // PetscFEMSystem &sensitivity_system) // { // PetscFunctionBegin; // // // the state solution computed during the state solve is used // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // // re initialize // du_previous[ i_var] = 0.0; // grad_du_previous[i_var].zero() ; // for (unsigned int i=0; i<n_u_dofs[i_var]; i++) // { //sensitivities // du_previous[i_var] += (*phi[i_var])[i][qp]* // sensitivity_system.prev_solution(dof_indices_u[i_var][i]) // ; // grad_du_previous[i_var].add_scaled ( (*dphi[i_var])[i][qp], // sensitivity_system.prev_solution(dof_indices_u[i_var][i]) // ); // } // } // // PetscFunctionReturnVoid(); // } // /*----------------------------------------------------------------------*/ // void PDEModelBaseClass::evaluateSolutionForSensitivity(const unsigned int &qp, // const int istep, // PetscFEMSystem &sensitivity_system) // { // PetscFunctionBegin; // // // the state solution computed during the state solve is used // for( unsigned int i_var = 0 ; i_var < numSystemVars; i_var++) // { // du__current[i_var] = 0.0; // du_previous[i_var] = 0.0; // grad_du_mtheta[i_var].zero() ; // for (unsigned int i=0; i<n_u_dofs[i_var]; i++) // { //sensitivities // du_previous[i_var] += (*phi[i_var])[i][qp]*( // sensitivity_system.stored_solution( dof_indices_u[i_var][i],istep-1 )); // du__current[i_var] += (*phi[i_var])[i][qp]*( // sensitivity_system.stored_solution( dof_indices_u[i_var][i],istep )); // grad_du_mtheta[i_var].add_scaled ( (*dphi[i_var])[i][qp], // (1.0- m_theta) * sensitivity_system.stored_solution( // dof_indices_u[i_var][i],istep-1 ) // + // m_theta * sensitivity_system.stored_solution( // dof_indices_u[i_var][i],istep ) // ); // } // } // // PetscFunctionReturnVoid(); // } } // namespace libMesh
f6cfda5c49188d59a8d5bf7f2ceb80b5c5243e97
bcdad145f40b13a5f23f1bd6e191caf20db4df7c
/integration-sample/gui.cxx
26699365cf7df859fe36f253eab5b46933f369ed
[]
no_license
usagi/virtual-keyboard-prototype-1
d7c9f65019897f7949f2f59ebc15aa1782e4e69e
b6156b1bf30fa1dbf6e2ca3792772e121c24547c
refs/heads/master
2016-09-06T09:20:56.639399
2014-01-29T21:45:02
2014-01-29T21:45:02
14,557,877
2
0
null
null
null
null
UTF-8
C++
false
false
14,582
cxx
gui.cxx
#include "gui.hxx" #include "cv_gui_helper.hxx" #include "commandline_helper.hxx" namespace arisin { namespace etupirka { gui_t::gui_t(configuration_t& conf) : conf_(conf) , current_finger_detector_conf_(conf.finger_detector_top) , prev_top_front_switch(0) { DLOG(INFO) << "ctor start"; auto& cv_gui_helper = cv_gui_helper_t::instance(); DLOG(INFO) << "cv_gui_helper address: " << &cv_gui_helper; DLOG(INFO) << "new_windows"; cv_gui_helper.new_windows ( cv_gui_helper.make_new_window_params( window::in_top , "top-cam(input)" , CV_WINDOW_NORMAL | CV_WINDOW_KEEPRATIO | CV_GUI_EXPANDED) , cv_gui_helper.make_new_window_params( window::in_front , "front-cam(input)" , CV_WINDOW_NORMAL | CV_WINDOW_KEEPRATIO | CV_GUI_EXPANDED) , cv_gui_helper.make_new_window_params( window::out_top , "top-cam(output)" , CV_WINDOW_NORMAL | CV_WINDOW_KEEPRATIO | CV_GUI_EXPANDED) , cv_gui_helper.make_new_window_params( window::out_front , "front-cam(output)", CV_WINDOW_NORMAL | CV_WINDOW_KEEPRATIO | CV_GUI_EXPANDED) , cv_gui_helper.make_new_window_params( window::controller_1, "controller 1" , CV_WINDOW_NORMAL | CV_WINDOW_FREERATIO | CV_GUI_EXPANDED) , cv_gui_helper.make_new_window_params( window::controller_2, "controller 2" , CV_WINDOW_NORMAL | CV_WINDOW_FREERATIO | CV_GUI_EXPANDED) ); DLOG(INFO) << "resize in_top"; cv_gui_helper.resize(window::in_top , conf.camera_capture.width, conf.camera_capture.height); DLOG(INFO) << "resize in_front"; cv_gui_helper.resize(window::in_front , conf.camera_capture.width, conf.camera_capture.height); DLOG(INFO) << "resize out_top"; cv_gui_helper.resize(window::out_top , conf.camera_capture.width, conf.camera_capture.height); DLOG(INFO) << "resize out_front"; cv_gui_helper.resize(window::out_front, conf.camera_capture.width, conf.camera_capture.height); DLOG(INFO) << "move in_top"; cv_gui_helper.move(window::in_top , 0, 0); DLOG(INFO) << "move in_front"; cv_gui_helper.move(window::in_front , 0, 480); DLOG(INFO) << "move out_top"; cv_gui_helper.move(window::out_top , 640, 0); DLOG(INFO) << "move out_front"; cv_gui_helper.move(window::out_front , 640, 480); DLOG(INFO) << "move controller_1"; cv_gui_helper.move(window::controller_1, 1280, 0); DLOG(INFO) << "move controller_2"; cv_gui_helper.move(window::controller_2, 1600, 0); DLOG(INFO) << "new_trackbars"; cv_gui_helper.new_trackbars ( cv_gui_helper.make_new_trackbar_params( trackbar::top_front_switch , "0:top/1:front switch" , window::controller_1, 0, 1) , cv_gui_helper.make_new_trackbar_params( trackbar::save , "1:save" , window::controller_1, 0, 1) , cv_gui_helper.make_new_trackbar_params( trackbar::load , "1:load" , window::controller_1, 0, 1) , cv_gui_helper.make_new_trackbar_params( trackbar::diameter , "bilateral diameter (x100)", window::controller_1, current_finger_detector_conf_.pre_bilateral_d, 127, 100) , cv_gui_helper.make_new_trackbar_params( trackbar::sigma_color , "bilateral sigma color (x100)", window::controller_1, current_finger_detector_conf_.pre_bilateral_sc, 127, 100) , cv_gui_helper.make_new_trackbar_params( trackbar::sigma_space , "bilateral sigma space (x100)", window::controller_1, current_finger_detector_conf_.pre_bilateral_ss, 127, 100) , cv_gui_helper.make_new_trackbar_params( trackbar::morphology_repeat , "pre morphology repeat" , window::controller_1, current_finger_detector_conf_.pre_morphology_n, 15) , cv_gui_helper.make_new_trackbar_params( trackbar::h_min , "H min (x100)" , window::controller_2, current_finger_detector_conf_.hsv_h_min, 720, 100) , cv_gui_helper.make_new_trackbar_params( trackbar::h_max , "H max (x100)" , window::controller_2, current_finger_detector_conf_.hsv_h_max, 720, 100) , cv_gui_helper.make_new_trackbar_params( trackbar::s_min , "S min (x10000)" , window::controller_2, current_finger_detector_conf_.hsv_s_min, 1, 10000) , cv_gui_helper.make_new_trackbar_params( trackbar::s_max , "S max (x10000)" , window::controller_2, current_finger_detector_conf_.hsv_s_max, 1, 10000) , cv_gui_helper.make_new_trackbar_params( trackbar::v_min , "V min " , window::controller_2, current_finger_detector_conf_.hsv_v_min, 255) , cv_gui_helper.make_new_trackbar_params( trackbar::v_max , "V max " , window::controller_2, current_finger_detector_conf_.hsv_v_max, 255) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_morphology , "nail morphology repeat " , window::controller_2, current_finger_detector_conf_.nail_morphology_n, 15) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_median_blur , "nail median-blur kernel" , window::controller_2, current_finger_detector_conf_.nail_median_blur_ksize, 35) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_circles_dp , "hough-circle dp" , window::controller_2, current_finger_detector_conf_.circles_dp, 16) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_circles_min_dist , "hough-circle min dist" , window::controller_2, current_finger_detector_conf_.circles_min_dist, 64) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_circles_param_1 , "hough-circle param-1" , window::controller_2, current_finger_detector_conf_.circles_param_1, 200) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_circles_param_2 , "hough-circle param-2" , window::controller_2, current_finger_detector_conf_.circles_param_2, 200) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_circles_min_radius, "hough-circle min radius" , window::controller_2, current_finger_detector_conf_.circles_min_radius, 48) , cv_gui_helper.make_new_trackbar_params( trackbar::nail_circles_max_radius, "hough-circle max radius" , window::controller_2, current_finger_detector_conf_.circles_max_radius, 48) ); DLOG(INFO) << "ctor end"; } void gui_t::operator()(const input_t& input) { auto& cv_gui_helper = cv_gui_helper_t::instance(); auto m_it = input.in_top.clone(); auto m_if = input.in_front.clone(); cv::Mat m_ot; cv::Mat m_of; cv::cvtColor(input.out_top , m_ot, CV_GRAY2BGR); cv::cvtColor(input.out_front, m_of, CV_GRAY2BGR); cv_gui_helper.add_axes(m_it); cv_gui_helper.add_axes(m_if); cv_gui_helper.add_axes(m_ot); cv_gui_helper.add_axes(m_of); const auto add_circles = [](const finger_detector_t::circles_t& cs, cv::Mat& mi, cv::Mat& mo) { for(const auto v : cs) { const cv::Point center(int(std::round(v[0])), int(std::round(v[1]))); const auto radius = int(std::round(v[2])); for(auto frame: {mi, mo}) { cv::circle(frame, center, 2, cv::Scalar(0,0xff,0), -1, 8, 0); cv::circle(frame, center, radius, cv::Scalar(0,0,0xff), 3, 8, 0); } } }; add_circles(input.circles_top , m_it, m_ot); add_circles(input.circles_front, m_if, m_of); cv_gui_helper.show(window::in_top , m_it); cv_gui_helper.show(window::in_front , m_if); cv_gui_helper.show(window::out_top , m_ot); cv_gui_helper.show(window::out_front , m_of); current_finger_detector_conf_.pre_bilateral_d = cv_gui_helper.trackbar<double>(trackbar::diameter, window::controller_1); current_finger_detector_conf_.pre_bilateral_sc = cv_gui_helper.trackbar<double>(trackbar::sigma_color, window::controller_1); current_finger_detector_conf_.pre_bilateral_ss = cv_gui_helper.trackbar<double>(trackbar::sigma_space, window::controller_1); current_finger_detector_conf_.pre_morphology_n = cv_gui_helper.trackbar(trackbar::morphology_repeat, window::controller_1); current_finger_detector_conf_.hsv_h_min = cv_gui_helper.trackbar<double>(trackbar::h_min, window::controller_2); current_finger_detector_conf_.hsv_h_max = cv_gui_helper.trackbar<double>(trackbar::h_max, window::controller_2); current_finger_detector_conf_.hsv_s_min = cv_gui_helper.trackbar<double>(trackbar::s_min, window::controller_2); current_finger_detector_conf_.hsv_s_max = cv_gui_helper.trackbar<double>(trackbar::s_max, window::controller_2); current_finger_detector_conf_.hsv_v_min = cv_gui_helper.trackbar<double>(trackbar::v_min, window::controller_2); current_finger_detector_conf_.hsv_v_max = cv_gui_helper.trackbar<double>(trackbar::v_max, window::controller_2); current_finger_detector_conf_.nail_morphology_n = cv_gui_helper.trackbar(trackbar::nail_morphology, window::controller_2); current_finger_detector_conf_.nail_median_blur_ksize = cv_gui_helper.trackbar(trackbar::nail_median_blur, window::controller_2); current_finger_detector_conf_.circles_dp = cv_gui_helper.trackbar(trackbar::nail_circles_dp, window::controller_2); current_finger_detector_conf_.circles_min_dist = cv_gui_helper.trackbar(trackbar::nail_circles_min_dist, window::controller_2); current_finger_detector_conf_.circles_param_1 = cv_gui_helper.trackbar(trackbar::nail_circles_param_1, window::controller_2); current_finger_detector_conf_.circles_param_2 = cv_gui_helper.trackbar(trackbar::nail_circles_param_2, window::controller_2); current_finger_detector_conf_.circles_min_radius = cv_gui_helper.trackbar(trackbar::nail_circles_min_radius, window::controller_2); current_finger_detector_conf_.circles_max_radius = cv_gui_helper.trackbar(trackbar::nail_circles_max_radius, window::controller_2); if(prev_top_front_switch != cv_gui_helper.trackbar<int>(trackbar::top_front_switch, window::controller_1)) { DLOG(INFO) << "top_front_switch changed"; load_conf(bool(cv_gui_helper.trackbar<int>(trackbar::top_front_switch, window::controller_1) == 0)); } if(cv_gui_helper.trackbar<int>(trackbar::save, window::controller_1)) { save_conf(cv_gui_helper.trackbar<int>(trackbar::top_front_switch, window::controller_1) == 0); cv_gui_helper.trackbar(trackbar::save, window::controller_1, 0); } if(cv_gui_helper.trackbar<int>(trackbar::load, window::controller_1)) { load_conf(cv_gui_helper.trackbar<int>(trackbar::top_front_switch, window::controller_1) == 0); cv_gui_helper.trackbar(trackbar::load, window::controller_1, 0); } prev_top_front_switch = cv_gui_helper.trackbar<int>(trackbar::top_front_switch, window::controller_1); //cv_gui_helper.present(); cv_gui_helper.wait_key_not('\x1b', 1); } void gui_t::save_conf(bool is_top) { DLOG(INFO) << "save_conf: is_top(" << is_top << ")"; if(is_top) conf_.finger_detector_top = current_finger_detector_conf_; else conf_.finger_detector_front = current_finger_detector_conf_; commandline_helper_t::save_conf(conf_); } void gui_t::load_conf(bool is_top) { DLOG(INFO) << "load_conf: is_top(" << is_top << ")"; if(is_top) current_finger_detector_conf_ = conf_.finger_detector_top; else current_finger_detector_conf_ = conf_.finger_detector_front; auto& cv_gui_helper = cv_gui_helper_t::instance(); cv_gui_helper.trackbar(trackbar::diameter, window::controller_1, current_finger_detector_conf_.pre_bilateral_d); cv_gui_helper.trackbar(trackbar::sigma_color, window::controller_1, current_finger_detector_conf_.pre_bilateral_sc); cv_gui_helper.trackbar(trackbar::sigma_space, window::controller_1, current_finger_detector_conf_.pre_bilateral_ss); cv_gui_helper.trackbar(trackbar::morphology_repeat, window::controller_1, current_finger_detector_conf_.pre_morphology_n); cv_gui_helper.trackbar(trackbar::h_min, window::controller_2, current_finger_detector_conf_.hsv_h_min); cv_gui_helper.trackbar(trackbar::h_max, window::controller_2, current_finger_detector_conf_.hsv_h_max); cv_gui_helper.trackbar(trackbar::s_min, window::controller_2, current_finger_detector_conf_.hsv_s_min); cv_gui_helper.trackbar(trackbar::s_max, window::controller_2, current_finger_detector_conf_.hsv_s_max); cv_gui_helper.trackbar(trackbar::v_min, window::controller_2, current_finger_detector_conf_.hsv_v_min); cv_gui_helper.trackbar(trackbar::v_max, window::controller_2, current_finger_detector_conf_.hsv_v_max); cv_gui_helper.trackbar(trackbar::nail_morphology, window::controller_2, current_finger_detector_conf_.nail_morphology_n); cv_gui_helper.trackbar(trackbar::nail_median_blur, window::controller_2, current_finger_detector_conf_.nail_median_blur_ksize); cv_gui_helper.trackbar(trackbar::nail_circles_dp, window::controller_2, current_finger_detector_conf_.circles_dp); cv_gui_helper.trackbar(trackbar::nail_circles_min_dist, window::controller_2, current_finger_detector_conf_.circles_min_dist); cv_gui_helper.trackbar(trackbar::nail_circles_param_1, window::controller_2, current_finger_detector_conf_.circles_param_1); cv_gui_helper.trackbar(trackbar::nail_circles_param_2, window::controller_2, current_finger_detector_conf_.circles_param_2); cv_gui_helper.trackbar(trackbar::nail_circles_min_radius, window::controller_2, current_finger_detector_conf_.circles_min_radius); cv_gui_helper.trackbar(trackbar::nail_circles_max_radius, window::controller_2, current_finger_detector_conf_.circles_max_radius); } const configuration_t::finger_detector_configuration_t& gui_t::current_finger_detector_conf() const { return current_finger_detector_conf_; } const bool gui_t::current_is_top() const { auto& cv_gui_helper = cv_gui_helper_t::instance(); return cv_gui_helper.trackbar<int>(trackbar::top_front_switch, window::controller_1) == 0; } } }
83a7ccb120675bfcc4cf31962b4f84bb4e552f78
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/c++/ClickHouse/2017/4/AggregateFunctionForEach.cpp
51d9018fa78b55029778786795f8b0b759bcfd92
[ "BSL-1.0" ]
permissive
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
C++
false
false
208
cpp
AggregateFunctionForEach.cpp
#include "AggregateFunctionForEach.h" namespace DB { AggregateFunctionPtr createAggregateFunctionForEach(AggregateFunctionPtr & nested) { return std::make_shared<AggregateFunctionForEach>(nested); } }
04f60b6c32fbf37d2615718ac0fedcb8e90081ca
4f9bffdb2d9a9a0b94dbaa761720492ddab79867
/cbu/cbu/common/unit_prefix.h
778363ce3abc4cb49785da38b4f4e81e4efc9ead
[]
no_license
chys87/toolchain
b4775662ffba7ea5d4976c1bfe252fec6a991339
129b522a645b973ffd516302a4d6e66e08637a93
refs/heads/master
2023-08-18T23:06:08.522163
2023-07-31T06:49:10
2023-07-31T06:49:10
150,109,120
0
0
null
null
null
null
UTF-8
C++
false
false
3,927
h
unit_prefix.h
/* * cbu - chys's basic utilities * Copyright (c) 2019-2021, chys <admin@CHYS.INFO> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the 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. * * Neither the name of chys <admin@CHYS.INFO> nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY chys <admin@CHYS.INFO> ''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 chys <admin@CHYS.INFO> 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. */ #pragma once #include <cstddef> #include <cstdint> #include <string_view> #include "cbu/common/bit.h" namespace cbu { inline constexpr char kUnitPrefixes[]{'\0', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'}; inline constexpr char kIecUnitPrefixes[][2]{{}, {'K', 'i'}, {'M', 'i'}, {'G', 'i'}, {'T', 'i'}, {'P', 'i'}, {'E', 'i'}, {'Z', 'i'}, {'Y', 'i'}}; inline constexpr unsigned kUnitPrefixCount = static_cast<unsigned>(sizeof(kUnitPrefixes) / sizeof(kUnitPrefixes[0])); // K, M, G, ... constexpr std::string_view get_si_prefix(unsigned idx) noexcept { return {kUnitPrefixes + idx, std::size_t(idx ? 1 : 0)}; } // Ki, Mi, Gi, ... constexpr std::string_view get_iec_prefix(unsigned idx) noexcept { return {kIecUnitPrefixes[idx], std::size_t(idx ? 2 : 0)}; } // For example, 1026 bytes ==> 1 KiB + 2 bytes ==> {1, 2, 1} // 1050627 bytes ==> 1 MiB + 2 KiB + 3 bytes ==> {1, 2, 2} struct SplitUnitPrefix { unsigned quot; unsigned rem; unsigned prefix_idx; }; constexpr SplitUnitPrefix split_unit_prefix_1000(std::uint64_t value) noexcept { unsigned prefix_idx = 0; unsigned rem = 0; while (value >= 1000) { rem = value % 1000; value /= 1000; ++prefix_idx; } return {static_cast<unsigned>(value), static_cast<unsigned>(rem), prefix_idx}; } constexpr SplitUnitPrefix split_unit_prefix_1024(std::uint64_t value) noexcept { if (value < 1024) return {static_cast<unsigned>(value), 0, 0}; // a / 10 == a * 13 >> 7 for all a < 69. avoid including fastarith.h unsigned prefix_idx = (bsr(value) * 13) >> 7; return {static_cast<unsigned>(value >> (10 * prefix_idx)), static_cast<unsigned>(value >> (10 * prefix_idx - 10)) & 1023, prefix_idx}; } // For example, 1026 bytes ==> {1260.f / 1024, 1} // 1050627 bytes ==> {1050627.f / 1024 / 1024, 2} struct ScaleUnitPrefix { float value; unsigned prefix_idx; }; // Input value should be a non-negative value in range [0, 2**63] // We don't detect out-of-range values for sake of performance. [[gnu::const]] ScaleUnitPrefix scale_unit_prefix_1000(float value) noexcept; [[gnu::const]] ScaleUnitPrefix scale_unit_prefix_1024(float value) noexcept; } // namespace cbu