-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMagicTouch
More file actions
156 lines (103 loc) · 3 KB
/
MagicTouch
File metadata and controls
156 lines (103 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/usr/bin/env ruby
=begin
ARGV.length.times do |i|
if ARGV[i] == "--pattern" or ARGV[i] == "-p"
pattern = ARGV[i+1]
elsif ARGV[i] == "--charset" or ARGV[i] == "-c"
charset = ARGV[i+1]
elsif ARGV[i] == "--fileName" or ARGV[i] == "-o"
fileName = ARGV[i+1]
elsif ARGV[i] == "--help" or ARGV[i] == "-h"
DictionaryProcesses.helpMenu
end
end
=end
#puts "tamamdır" if "5" =~ /\A[0-9]\z/
#puts "tamamdır" if "*" =~ /\A[0-9]\z/
excepting = []
specificIndex = []
asteriskIndex = []
count = 0
arr = "*18*3".split('')
=begin
"1*8**3".chars do |c|
if c =~ /[0-9]/
excepting.push(c) # Tekrarlanmayı önlemek için depolanır.
specificIndex.push(count)
else
asteriskIndex.push(count) # Yıldızlar tespit edilir.
end
count += 1
end
=end
file = File.open("deneme.txt", "w")
if arr[0] == '*' and arr[1] == '*' and arr[2] == '*' and arr[3] == '*' and arr[4] == '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] == '*' and arr[3] == '*' and arr[4] != '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] == '*' and arr[3] != '*' and arr[4] == '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] == '*' and arr[3] != '*' and arr[4] != '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] != '*' and arr[3] == '*' and arr[4] == '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] != '*' and arr[3] == '*' and arr[4] != '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] != '*' and arr[3] != '*' and arr[4] == '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] != '*' and arr[3] != '*' and arr[4] == '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] != '*' and arr[3] != '*' and arr[4] != '*'
elsif arr[0] == '*' and arr[1] != '*' and arr[2] == '*' and arr[3] == '*' and arr[4] == '*'
elsif arr[0] == '*' and arr[1] == '*' and arr[2] == '*' and arr[3] == '*' and arr[4] != '*'
if arr[0] == '*' and arr[1] != '*'
(0..9).each do |i|
(0..9).each do |j|
file.puts i.to_s + arr[1].to_s + arr[2].to_s + j.to_s + arr[5].to_s
end
end
elsif arr[1] == '*'
(0..9).each do |i|
(0..9).each do |j|
(0..9).each do |z|
file.puts i.to_s + arr[specificIndex[0]].to_s + arr[specificIndex[1]].to_s + j.to_s + z.to_s + arr[specificIndex[2]].to_s
end
end
end
elsif arr[2] == '*'
(0..9).each do |i|
(0..9).each do |j|
(0..9).each do |z|
file.puts i.to_s + arr[specificIndex[0]].to_s + arr[specificIndex[1]].to_s + j.to_s + z.to_s + arr[specificIndex[2]].to_s
end
end
end
end
=begin
elsif "*18**3".
(0..9).each do |i|
(0..9).each do |j|
(0..9).each do |z|
file.puts arr[specificIndex[0]].to_s + i.to_s + arr[specificIndex[1]].to_s + j.to_s + z.to_s + arr[specificIndex[2]].to_s
end
end
end
end
file.close
=begin
#asteriskIndex.each do |i|
(0..9).select |num| do
if excepting.include? num
next
else
if
specificIndex.
file.puts + + + + arr[asteriskIndex[i]] = num
end
}
end
end
mode
A)
B) basamaklarda bilinen değerler varsa giriniz = 1*33** || ******
C) **
0)
******
1)
data
1*8**3 // TEKRARLANMAYAN
2)
1*8**3 // TEKRARLANAN
=end