Commits

Muhammed DEMİRBAŞ committed 714a68f

.idea settings

Comments (0)

Files changed (4)

ruby/trivial/.idea/codeStyleSettings.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectCodeStyleSettingsManager">
+    <option name="PER_PROJECT_SETTINGS">
+      <value />
+    </option>
+  </component>
+</project>
+

ruby/trivial/.idea/misc.xml

 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ProjectRootManager" version="2" project-jdk-name="ruby-1.9.2-p290" project-jdk-type="RUBY_SDK" />
+  <component name="ProjectRootManager" version="2" project-jdk-name="ruby-1.9.3-p125" project-jdk-type="RUBY_SDK" />
 </project>
 

ruby/trivial/.idea/workspace.xml

       <file leaf-file-name="main.rb" pinned="false" current="true" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/main.rb">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="13" column="0" selection-start="318" selection-end="318" vertical-scroll-proportion="0.3090909">
+            <state line="19" column="9" selection-start="492" selection-end="492" vertical-scroll-proportion="0.6857749">
               <folding />
             </state>
           </provider>
       <profile-state>
         <expanded-state>
           <State>
-            <id />
+            <id>Ruby</id>
           </State>
           <State>
-            <id>Gems</id>
+            <id>XML</id>
           </State>
         </expanded-state>
-        <selected-state>
-          <State>
-            <id>CSS</id>
-          </State>
-        </selected-state>
       </profile-state>
     </entry>
   </component>
       <sortByType />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <PATH>
           </PATH>
         </subPane>
       </pane>
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
     <property name="options.splitter.main.proportions" value="0.3" />
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="options.lastSelected" value="preferences.editor" />
+    <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
     <property name="recentsLimit" value="5" />
+    <property name="last_opened_file_path" value="C:/bin/RailsInstaller/Ruby1.9.3/bin/ruby.exe" />
     <property name="options.searchVisible" value="true" />
     <property name="options.splitter.details.proportions" value="0.2" />
   </component>
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26040173" sideWeight="0.67027026" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22022955" sideWeight="0.67027026" order="0" side_tool="false" content_ui="combo" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
   <component name="editorHistoryManager">
     <entry file="file://$PROJECT_DIR$/main.rb">
       <provider selected="true" editor-type-id="text-editor">
+        <state line="13" column="0" selection-start="318" selection-end="318" vertical-scroll-proportion="0.0">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/main.rb">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="13" column="0" selection-start="318" selection-end="318" vertical-scroll-proportion="0.0">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/main.rb">
+      <provider selected="true" editor-type-id="text-editor">
         <state line="12" column="22" selection-start="296" selection-end="296" vertical-scroll-proportion="0.0">
           <folding />
         </state>
     </entry>
     <entry file="file://$PROJECT_DIR$/main.rb">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="13" column="0" selection-start="318" selection-end="318" vertical-scroll-proportion="0.3090909">
+        <state line="19" column="9" selection-start="492" selection-end="492" vertical-scroll-proportion="0.6857749">
           <folding />
         </state>
       </provider>

ruby/trivial/main.rb

-testing_string = "111x222b333"
+def gen_sequence(seed, range, len)
+	srand seed
+	(1..len).map { rand range }
+end
 
-regexp = %r{
-                (?<width> [0-9]{3} ) {0}
-                (?<height> [0-9]{3} ) {0}
-                (?<depth> [0-9]+ ) {0}
+def find_srand_seed(target, range, seeds=nil)
+	puts target
+	puts range
+	@@srand_seed ||= []
+	len          = target.size
+	(seeds || 0...255).each do |s|
+		current = @@srand_seed[s]
+		@@srand_seed[s] = gen_sequence(s, range, len) if current == nil || current.size < len
+	end
+	puts @@srand_seed.to_s
+	@@srand_seed.index { |x| x != nil && x[0...len] == target }
+end
 
-                \g<width>x\g<height>b\g<depth>
-            }x
-
-dimensions = regexp.match(testing_string)
-
-dimensions.captures.each { |k, v|  puts k }
+seed = find_srand_seed("AB", 'A'..'Z')
+puts seed