Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fakeImages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
fakeImages
Commits
9e45522d
Commit
9e45522d
authored
7 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
"NUM2CHAR" (universeller)
parent
a5d34772
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
UNKNOWN/createImages
+13
-4
13 additions, 4 deletions
UNKNOWN/createImages
with
13 additions
and
4 deletions
UNKNOWN/createImages
+
13
−
4
View file @
9e45522d
...
@@ -56,14 +56,23 @@ dotPos[3]=${digitPos[3]}
...
@@ -56,14 +56,23 @@ dotPos[3]=${digitPos[3]}
dotPos[2]
=
${
digitPos
[2]
}
dotPos[2]
=
${
digitPos
[2]
}
dotPos[1]
=
${
digitPos
[1]
}
dotPos[1]
=
${
digitPos
[1]
}
NUM2CHAR[0]
=
'0'
NUM2CHAR[1]
=
'1'
NUM2CHAR[2]
=
'2'
NUM2CHAR[3]
=
'3'
NUM2CHAR[4]
=
'4'
NUM2CHAR[5]
=
'5'
NUM2CHAR[6]
=
'6'
NUM2CHAR[7]
=
'7'
NUM2CHAR[8]
=
'8'
NUM2CHAR[9]
=
'9'
NUM2CHAR[10]
=
'E'
for
((
FNb
=
1
;
FNb<
=
MAX_FILES
;
FNb++
))
;
do
for
((
FNb
=
1
;
FNb<
=
MAX_FILES
;
FNb++
))
;
do
DPR
=
$((
RANDOM
%
$NUMBER_OF_DIGITS
+
1
))
# random dot position (1..$NUMBER_OF_DIGITS)
DPR
=
$((
RANDOM
%
$NUMBER_OF_DIGITS
+
1
))
# random dot position (1..$NUMBER_OF_DIGITS)
for
((
i
=
1
;
i<
=
$MAX_DIGITS
;
i++
))
;
do
for
((
i
=
1
;
i<
=
$MAX_DIGITS
;
i++
))
;
do
DNR[
$i
]=
$((
RANDOM
%
10
+
1
))
# random digit number (0..10)
DNR[
$i
]=
${
NUM2CHAR
[
$((
RANDOM
%
10
+
1
))
]
}
# random digit number (0..10)
if
[
${
DNR
[i]
}
==
10
]
;
then
DNR[
$i
]=
"E"
fi
if
[
$DPR
==
$i
]
;
then
if
[
$DPR
==
$i
]
;
then
dotFile[
$i
]=
"
$dotFile
"
dotFile[
$i
]=
"
$dotFile
"
DOT[
$i
]=
"."
# dot character
DOT[
$i
]=
"."
# dot character
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment