Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
softlab-thesis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Antonios Angelakis
softlab-thesis
Commits
67ccb534
Commit
67ccb534
authored
Mar 16, 2018
by
Antonios Angelakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish figures and listings
parent
97787d6f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
39 deletions
+71
-39
catsexample.xml
Listings/catsexample.xml
+11
-7
pdoexamples.php
Listings/pdoexamples.php
+12
-11
thesis.tex
thesis.tex
+48
-21
No files found.
Listings/catsexample.xml
View file @
67ccb534
...
...
@@ -4,6 +4,7 @@
author=
"Admin"
inputFile=
"titlos.in"
outputFile=
"titlos.out"
>
<Keyword
code=
"alg.geometry"
/>
<ProblemStatement>
Problem statement and description.
</ProblemStatement>
...
...
@@ -17,15 +18,15 @@
</OutputFormat>
<ProblemConstraints>
$1 \le m \le 100$, $-100 \le x_i \le 100, 0
<
y_i \le 100$
$1 \le m \le 100$, $-100 \le x_i \le 100, 0
<
y_i \le 100$
</ProblemConstraints>
<Sample
rank=
"1"
>
<SampleIn>
3
1 2 3
4 5 6
7 8 9
<SampleIn>
3
1 2 3
4 5 6
7 8 9
</SampleIn>
<SampleOut>
6
...
...
@@ -38,7 +39,10 @@ $1 \le m \le 100$, $-100 \le x_i \le 100, 0 < y_i \le 100$
<Import
guid=
"std.testlib.1.1"
type=
"checker"
/>
<Checker
name=
"ch"
src=
"check.dpr"
style=
"testlib"
/>
<TestRange
from=
"1"
to=
"42"
><In
src=
"tests/%0n"
/><Out
use=
"sol"
/></TestRange>
<TestRange
from=
"1"
to=
"42"
>
<In
src=
"tests/%0n"
/>
<Out
use=
"sol"
/>
</TestRange>
</Problem>
</CATS>
Listings/pdoexamples.php
View file @
67ccb534
<?php
// Connecting to a MySQL database
$user
=
"root"
;
$pass
=
"root"
;
$dsn
=
"mysql:host=localhost;dbname=test"
;
$charset
=
"utf8"
;
$dsn
=
"mysql:host=localhost;dbname=test;charset=
$charset
"
;
$dbh
=
new
PDO
(
'mysql:host=localhost;dbname=test;charset=$charset'
,
$user
,
$pass
);
?>
<?php
$db
=
new
PDO
(
$dsn
,
$user
,
$pass
);
$query
=
"SELECT * FROM foo WHERE bar = "
.
$db
->
quote
(
$zip
);
// Executing a simple query
$val
=
42
;
$query
=
"SELECT * FROM foo WHERE bar = "
.
$db
->
quote
(
$val
);
$result
=
$db
->
query
(
$query
);
while
(
$row
=
$result
->
fetch
(
PDO
::
FETCH_ASSOC
))
{
print_r
(
$row
);
}
?>
<?php
$stmt
=
$dbh
->
prepare
(
"INSERT INTO REGISTRY (name, value) VALUES (:name, :value)"
);
// Sequential executions of a prepared statement
$query
=
"INSERT INTO REGISTRY (name, value)
VALUES (:name, :value)"
;
$stmt
=
$db
->
prepare
(
$query
);
$stmt
->
bindParam
(
':name'
,
$name
);
$stmt
->
bindParam
(
':value'
,
$value
);
//
insert one row
//
First execution
$name
=
'one'
;
$value
=
1
;
$stmt
->
execute
();
//
insert another row
with different values
//
Second execution
with different values
$name
=
'two'
;
$value
=
2
;
$stmt
->
execute
();
...
...
thesis.tex
View file @
67ccb534
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment