[#389624] Good GUI for buisness focused application — Jaxxa <jaxxa90@...>
What would be a good Graphical User interface for use with a buisness
[#389628] how to make interface explicit with Hash stores? — Reginald Tan <redge.tan@...>
I have a class that uses hash as its internal store. What's a good way
[#389643] Ruby and Telnet — "Leo M." <leo.mmcm@...>
Hello!
[#389648] Sort order dilemma — Wayne Brissette <waynefb@...>
I've got a array that I need sorted in a certain way and I'm struggling =
[#389671] Importing Ruby-Lang into Xcode — "Dustin E." <dustyeike@...>
How do i Import an Existing Non-Xcode Project Into Xcode, specifically
On Wed, Nov 2, 2011 at 7:14 PM, Dustin E. <dustyeike@gmail.com> wrote:
In Xcode4, none that i see. There's import files to an existing project
[#389699] Setting systems date and time - Windows — Saul Glass <quati10@...>
Hi Guys,
[#389721] 'require' problem — Kaye Ng <sbstn26@...>
Hi guys!
you need
If you're not on 1.9.2 and don't have require_relative, I believe this
> Sam Rose wrote in post #1030126:
Hi guys! Yes, I'm using 1.9.2 .
[#389732] arcadia editor 0.11.0 released — Antonio Galeone <antonio.galeone@...>
Hi,
[#389733] What happens in dual sorts with nil values? — Wayne Brissette <waynefb@...>
I've put together an array that has a map. I did this so I could do some multi-level sorting of data. For example, if I had a map with:
[#389739] Ruby Challenge — teresa nuagen <unguyen90@...>
Here is a ruby challenge for all you computer science lovers out there,
Totally unrelated to any husker computer science programs right? Like
Jonan S. wrote in post #1030330:
> You mean like the professor for the course? Because that would be me .
On Wed, Nov 9, 2011 at 4:52 AM, aseret nuagen <unguyen90@aim.com> wrote:
Come on. Let's not be so harsh. If truth is being told, then this girl has
On Wed, Nov 9, 2011 at 22:08, Ryan Davis <ryand-ruby@zenspider.com> wrote:
[#389755] Are there two kinds of 'require' ? — Kaye Ng <sbstn26@...>
I'm reading a tutorial and it has an example like this"
[#389760] ANSI v1.4.0 released — transfire@...
ANSI 1.4.0 has been released.
Alternatively you can use isna which has simpler approach.
[#389770] need spome help please :) — "marcin k." <doreklamster@...>
Hello :)
[#389772] ruby instance inside Textmate bundle — Matthew Johnson <musical.matthew@...>
This is probably a pretty unusual request, but I'd like to create a
http://beginrescueend.com/rvm/install/
C. Zona wrote in post #1030343:
[#389792] Tricky DSL, how to do it? — Intransition <transfire@...>
I'd want to write a DSL such that a surface method_missing catches
You are missing a `super` on the method_missing. first you should ask if is
> Any ideas?
Hi Guys=0A=0AI am a little confused and need some help. I am a newbie for R=
[#389803] Good debugging mechanism — Uma Mahesh <umamahesh_nyros@...>
Hi,=0A=0ACan I know the best debugging mechanism that can be used in ruby o=
[#389804] best IDE — Uma Mahesh <umamahesh_nyros@...>
Hi,=A0=0A=0ACan any one suggest me best open source IDE that can be used fo=
I think it is better to use a very easy editor, like bluefish, and
[#389816] scite - F5 command not working for code execution — Piotr Swoboda <piotr.swoboda1@...>
I am learning Ruby from scratch using a beginner's tutorial. I have
[#389817] How to include a function from a different file in a module — "Andreas L." <andreas.lundgren@...>
Hi!
[#389824] Confection v0.0.1 released — transfire@...
Confection 0.0.1 has been released.
On Tue, Nov 08, 2011 at 02:26:31AM +0900, transfire@gmail.com wrote:
[#389826] Ruby OpenSSL: Why valid TLS certs are not detected? — Iñaki Baz Castillo <ibc@...>
Hi, I'm playing with Ruby OpenSSL in order to validate certificates.
One thing to note is that the github.com cert you've provided isn't
2011/11/7 John Downey <jdowney@gmail.com>:
[#389845] minitest-debugger 1.0.0 Released — Ryan Davis <ryand-ruby@...>
minitest-debugger version 1.0.0 has been released!
[#389857] ruby encryption & decryption using rsa — varma potthuri <pothuri_satish@...>
Concept: I want to encrypt a string(hello) should give say xxx(private
[#389858] Compiling Ruby Inline C code - resolving errors — Martin Hansen <mail@...>
I am trying to get this Ruby inline C code http://pastie.org/2825882 to
I was in doubt whether to use:
[#389861] About the main RubyGems application, gem — Kaye Ng <sbstn26@...>
Hi!
[#389868] Understanding the use of double pipes in Ruby — Fily Salas <fs_tigre@...>
Hi,
[#389879] Getting certain characters from a string — Reese Chappuis <c0dege3k@...>
I have a string that I need to get certain characters at a given index.
[#389895] Parsing data with ruby — Ronald Craft <admin@...>
Hiya,
[#389928] Forming a Ruby meetup group... — "Darryl L. Pierce" <mcpierce@...>
Where I work we have a local Ruby group that used to meet up, until the
One thing you can do is take some of the more interesting questions asked
[#389929] Can't get "or" or "||" to work. — james gallagher <lollyproductions@...>
Hi. I have a stupid question.
[#389938] How can I overwrite class variables — Fily Salas <fs_tigre@...>
Hi,
[#389950] The faster way to read files — "Noé Alejandro" <casanejo@...>
Does anybody know which is the fastest way to read a file? Lets say
Sequentially... The point is that I need to process each pair of files,
I mean, the final processing is about compare (preprocessed) content of
2011/11/11 No=E9 Alejandro <casanejo@gmail.com>:
On Fri, Nov 11, 2011 at 10:07 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
[#389964] Strings are not equal — "Mike S." <antsinyourpants128@...>
I am testing two strings to see if they are equal.
[#389966] Argument error --- How to solve? — Ar Ik <arsi.ikonen@...>
I=C2=B4m at the very beginning with Ruby and give again and again this er=
[#389968] Ruby script for creating TLS certificates — Iñaki Baz Castillo <ibc@...>
Hi, I've coded a Ruby script that creates autosigned TLS certificates
You actually send them what is called a certificate signing request (CSR).
2011/11/9 John Downey <jdowney@gmail.com>:
[#389993] Dividing a gem into 2 or 3 gems — Rahul Kumar <sentinel1879@...>
I have a gem that has been growing for a while (e.g. mygem). There's a
[#389994] How to kill an exist tcpserver or tcpsocket? — Fengfeng Li <lifengfeng@...>
Hi everyone,
[#390006] Navigating through the official Ruby documentation — Fily Salas <fs_tigre@...>
Hi,
[#390016] ruby is scripting language — "Harish M." <erharish43.malik@...>
Hello!
[#390021] How Am I to Understand This Class Behavior? — "Nik Z." <esperantoca@...>
Hi, Gurus,
[#390037] Reading CSV File — "Darren H." <dhulem1@...>
Hi all
[#390040] can't find/uninstall installed gems — Neubyr Neubyr <neubyr@...>
I am having some issues while trying to uninstall a gem. I am using Mac
[#390043] Hashery v1.5.0 released — transfire@...
Hashery 1.5.0 has been released.
[#390049] To convert a Ruby tk script to *.exe — "Manju M." <manjuvpm12@...>
Hi,
[#390059] Beginner: how to use gedcom parser — François Boone <francois.boone@...>
Hi,
[#390060] Windows Repository — Mario Ruiz <tcblues@...>
This is my situation. I have one machine called mygemserver and I've
I don't know much about Gem hosting, but don't you need a gem server to do
[#390061] windows pry editor setup — Kevin <darkintent@...>
Does anyone know the correct way to configure Pry's editor variable on
[#390064] referring to version numbers in a gem — Chad Perrin <code@...>
How do I specify and access a gem's version number within the code of the
On 11/11/2011 14:28, Chad Perrin wrote:
On Sat, Nov 12, 2011 at 05:28:15AM +0900, Chad Perrin wrote:
Keep the data where ever you want, Rubygems has tossed the FHS out the
[#390080] calculating the prime factors of a very large number — Ja xv <jeniferjblack@...>
question:
[#390093] Share stories about using Ruby outside of pet projects — Kevin <darkintent@...>
I recently decided to take another stab at Clojure and came across
On 12/11/11 08:21 , Kevin wrote:
[#390104] Using Ruby to install/manage something from source - Features? — Marc Heiler <shevegen@...>
Hi,
[#390105] Advanced Ruby: Eval over multiple Bindings? — Intransition <transfire@...>
This is an extremely advanced Ruby question. Given:
-----BEGIN PGP SIGNED MESSAGE-----
On Saturday, November 12, 2011 4:10:09 PM UTC-5, Quintus wrote:
[#390110] Syntax Error — "Darren H." <dhulem1@...>
Hi All,
[#390121] Using gets and split — Reese Chappuis <c0dege3k@...>
I'm working on a challenge that tells me that the input is given at the
hi Reese,
Ok, that does work- so the problem is with how the data is being inputted,
[#390128] BE — Intransition <transfire@...>
Has anyone else seen this: http://docs.bugseverywhere.org/
[#390140] model "lift-passengers" and concurrent programming — Roman Faceless <ya1krabe@...>
Hi,
[#390143] How to use csv files in ruby — Mrin alini <m.mrinali@...>
I am able to write parts of the code but I am not able to join the code
[#390153] Binding#with — Intransition <transfire@...>
Binding#with
On Sun, Nov 13, 2011 at 8:30 PM, Intransition <transfire@gmail.com> wrote:
[#390162] Noob question regarding custom method — Junayeed Ahnaf Nirjhor <zombiegenerator@...>
Hello,
"setter" methods that have "set" in the name are far more idiomatic of
On Mon, Nov 14, 2011 at 1:29 PM, Sam Rose <samwho@lbak.co.uk> wrote:
[#390163] Exclamation marks in method names — Sylvester Keil <sylvester.keil@...>
Dear all,
[#390173] cant install ruby using rvm on osx lion — "Tomas R." <jtomasrl@...>
% Total % Received % Xferd Average Speed Time Time Time
[#390184] Binding#self — Intransition <transfire@...>
Hi,
[#390187] calculator program help — Trevor Daniels <socomcrazy10@...>
I'm trying to make a simple RPN calculator that reads in regular
[#390193] Ruby for Windows — Jim Wood <info@...>
I'm interested in Ruby for Windows.
[#390196] Autocompletion of commands & arguments — Sophie <itsme213@...>
I want to build a Ruby app with the following broad properties
[#390197] search through a csv file — Aksh Akku <akshathakshu@...>
i have a person details csv file. I am trying to write a code to search
On Tue, Nov 15, 2011 at 05:09:46PM +0900, Aksh Akku wrote:
[#390204] Logical operator || — "Damián M. González" <gonzalezdamianm@...>
Ey guys. Look at this:
[#390209] Regex to divide document into sections? — Intransition <transfire@...>
Any expert regexp wrangler around here. I can't quite find a way to split a
Hi,
The actual content shouldn't really matter. Sorry, I should have been more
[#390219] Certificate ssl and encrypt... — Diego Soreira <diegosoreira@...>
Hi,
[#390220] SSH hangs for 30 sec on AIX — Claus Folke Brobak <cfb@...>
Environment:
[#390222] Literate programming and Ruby — Michael Sokol <mikaa123@...>
Hey there,
[#390238] RVM problem, plz help — Misha Ognev <b1368810@...>
Hi, I have this problem:
[#390241] Ruby, How Do I Love Thee? Let Me Count the Ways... — "Aaron D. Gifford" <astounding@...>
I just have to say that Ruby is very, very convenient.
[#390242] Speedup Ruby 1.9.3 on Windows a lot — Jarmo Pertman <jarmo.p@...>
Hello!
On Thu, Nov 17, 2011 at 12:06 AM, Jarmo Pertman <jarmo.p@gmail.com> wrote:
[#390257] Help a newbie-The page isn't redirecting properly — Linda Fay <lfay@...>
With good intention I was helping someone with a ruby site but now I've
[#390261] Possible to run Ruby on Apache Tomcat server? — Rm Mz <ruthmizzi@...>
This might be a bit of an unusual set up but I'd like to have Java
[#390279] Problem on hash with default value — "Florent G." <florent2@...>
Hi,
[#390295] WIN32OLE return type USERDEFINED — Dominic Sisneros <dsisnero@...>
I am trying to use WIN32OLE to automate Microstation
Hello
Try the following.
Hello,
> Ooops, sorry.
Hello,
2011/11/19 Masaki Suketa <masaki.suketa@nifty.ne.jp>
Hello,
[#390303] Problem with action — pololo pololo <ulybkii@...>
Hi,
[#390308] any command line tools for querying yaml files — Rahul Kumar <sentinel1879@...>
(Sorry, this is not exactly a ruby question).
On Fri, Nov 18, 2011 at 3:58 PM, Dave Baldwin <dave.baldwin@3dlabs.com> wrote:
[#390309] www.ruby-lang.org is back — Shugo Maeda <shugo@...>
Hello,
Thanks, i was trying it to find out which the latest 1.9.3 release is
On Fri, Nov 18, 2011 at 10:48:29PM +0900, R. Kumar wrote:
[#390328] Anyone know of free Ruby on Rails hosting for registered charities? — Mike Bethany <mikbe.tk@...>
I'm doing some volunteer web development for a Florida veteran's
[#390338] Newbie - cmd question — Otto Dydakt <ottodydakt@...>
I've literally JUST downloaded ruby from rubyinstaller.org.
OK thank you, I uninstalled & reinstalled, checking the three boxes at
did you type "irb" first to bring up the ruby command prompt?
Hi all,
Hussain A. wrote in post #1036281:
> There is an option in the installer to make Ruby and other Ruby provided
Hussain A. wrote in post #1036449:
> Are you talking about a fresh command prompt *after* you installed?
Hussain A. wrote in post #1036509:
> So C:\Ruby193\bin *is* in the PATH.
[#390365] How to run a program (Newbie) — Otto Dydakt <ottodydakt@...>
Another newbie question here:
[#390374] Principle of Best Principles — Intransition <transfire@...>
I seem to run into a couple of design issue a lot and I never know what is
On Sun, Nov 20, 2011 at 8:42 PM, Intransition <transfire@gmail.com> wrote:
As it turns out you (and others) are pretty spot on, though I'm not sure
[#390396] how to call Function argument into another ruby script. — hari mahesh <harismahesh@...>
Consider I have a ruby file called library.rb.
On Mon, Nov 21, 2011 at 6:55 PM, hari mahesh <harismahesh@gmail.com> wrote:
[#390425] run an script without waiting to be done — Mario Ruiz <tcblues@...>
Hi, I would like to know if it is possible to run an script without
On 11/22/2011 07:39 AM, Mario Ruiz wrote:
[#390442] Create Excel Sheet(.xls/.xlsx) — Mamba Black <micky.tour@...>
Hi,
[#390446] Newbie: Calling dll functions from Ruby for a customer dll — "Omran N." <omran_nazir@...>
Hello,
An example of calling a method would then be:
[#390449] private and protected — Николай <godsent@...>
Could anybody explain me this, please?
The call 'self.phrase' is a call to a class method but 'def phrase' is
[#390458] need help with gsub a string — skolo pen <skolopen@...>
Lacking in regular expressions knowledge, I am having difficulty
[#390465] url normalization — rubix Rubix <aggouni2002@...>
Hi,
[#390474] NOKIGIRI XPATH — Ruby Mania <prateek123@...>
I have a long XML like below .. I wish to select DATA ("cdef" in this
On Thu, Nov 24, 2011 at 9:43 AM, Ruby Mania <prateek123@gmail.com> wrote:
Thanks a lot for help. But it matched CDEF and all nodes after that even
On Thu, Nov 24, 2011 at 12:30 PM, Ruby Mania <prateek123@gmail.com> wrote:
[#390476] Genric List in Ruby — Sagar Varule <sagar.varule@...>
Hi in newbie to Ruby ...But i have experience in C#...
[#390484] check if a element with a specific value exists in a xml using REXML — "mythpills p." <mithunpillay@...>
i have attached a sample xml. I am currently using REXML ..basically i
[#390492] Understanding Ruby blocks — Fily Salas <fs_tigre@...>
Hi,
[#390496] How to make 1.9.2 my default version using RVM — Fily Salas <fs_tigre@...>
Hi,
Thanks for your help.
ruby-1.9.2-p290:
First of all thank you all for your help!
On 24/11/11 21:59, "Fily Salas" <fs_tigre@hotmail.com> wrote:
[#390528] set logger.progname on a per thread basis — Kassym Dorsel <k.dorsel@...>
I have this :
[#390535] Is high-speed sorting impossible with Ruby? — "Gaurav C." <chande.gaurav@...>
Well, first of all, I'm new to Ruby, and to this forum. So, hello. :)
Hi Matthias,
Here is a port of the fastest solution on that site in Ruby. It of course
This counting sort implementation is a great optimization you can do
Hi,
Joao Pedrosa wrote in post #1033884:
A big gain can be had by disabling the garbage collector. Here is my best
I've thrown various solutions up on github here:
Ryan Davis wrote in post #1034037:
Just playing with the code a little, more education than speed.
2011/11/28 Matthias W=E4chter <matthias@waechter.wiz.at>
On 29.11.2011 02:05, Josh Cheek wrote:
Douglas Seifert wrote in post #1033963:
>
Douglas Seifert wrote in post #1034017:
[#390563] Simplest way for secure, JSON-based client/server solution? — Robert Feldt <robert.feldt@...>
Dear ruby-talk'ers,
[#390566] Does the configure step of compiling work on OS X Snow Leopard? — Andrew Grimm <andrew.j.grimm@...>
I tried compiling the trunk version on OS X Snow Leopard, and it
[#390571] Your best Project — "Mathew S." <onetproductions@...>
What is you personal best app/project you have made.
[#390584] question about overloading — Vitit Kantabutra <vkantabu@...>
Back in 2007, somebody posted a question asking whether or not it is
On Sun, Nov 27, 2011 at 1:38 AM, Vitit Kantabutra <vkantabu@gmail.com>wrote:
[#390590] Creating 2-D array from 1-D array — "J. Marshal" <windbreiz@...>
Hello, I am relatively new to Ruby. I have an existing array:
[#390604] How to call an array from one ruby script to another — hari mahesh <harismahesh@...>
Can we call an array from one ruby script to another and access array
[#390638] Ruby Code help — Tridib Bandopadhyay <tridib04@...>
I am trying to print out the Garbage Collection behavior. I tried the
[#390639] Help Needed urgently — Tridib Bandopadhyay <tridib04@...>
I am able to implement manual memory management in Ruby.I can allocate
[#390650] Loading a faulty ruby file - forcing this — Marc Heiler <shevegen@...>
Hi.
[#390652] Garbage collection and define_finalizer — Garthy D <garthy_lmkltybr@...>
[#390659] What's wrong with this code? — "Kenley T." <kenleytan@...>
I made a program to motivate me for the last day of NaNoWriMo, but it
[#390689] Stupid question — James Gallagher <lollyproductions@...>
Hi everyone.
On Wed, Nov 30, 2011 at 09:10, James Gallagher <lollyproductions@mac.com> wrote:
On Wed, Nov 30, 2011 at 19:23, Dave Aronson
On Wed, Nov 30, 2011 at 14:26, Adam Prescott <adam@aprescott.com> wrote:
[#390706] errors with respond_to? and inject — "Sébastien M." <stkfdt@...>
Hello,
[#390715] DCell 0.0.1: Distributed actors for Ruby — Tony Arcieri <tony.arcieri@...>
DCell is a distributed actor framework for Ruby. Somewhat similar to DRb,
On Thu, Dec 01, 2011 at 05:49:10AM +0900, Tony Arcieri wrote:
Re: need spome help please :)
well.. it was only pice of code as whole one is long :P
but ok here it is:
require 'tk'
`chcp 65001`
root =3D TkRoot.new() {title "Migrator RUCH v1.03 sakej update"}
content =3D Tk::Tile::Frame.new(root) {padding "20 20 125 125"}.grid( =
:sticky =3D> 'nsew')
$content =3D content
TkGrid.columnconfigure root, 0, :weight =3D> 1
TkGrid.rowconfigure root, 0, :weight =3D> 1
# Deklaracja zmiennych globalnych
$psd =3D TkVariable.new
$miejscowosc =3D TkVariable.new
$service_check =3D TkVariable.new
#=C5=9Acie=C5=BCki do plik=C3=B3w
$file_protokol_path =3D TkVariable.new
$file_csq_path =3D TkVariable.new
$file_serwis_1_path =3D TkVariable.new
$file_serwis_2_path =3D TkVariable.new
$file_serwis_3_path =3D TkVariable.new
$file_modem_path =3D TkVariable.new
$file_sprzedaz_path =3D TkVariable.new
$file_plomba_path =3D TkVariable.new
$file_pos_path =3D TkVariable.new
$file_kableprzed_path =3D TkVariable.new
$file_kablepo_path =3D TkVariable.new
$file_posprzed_path =3D TkVariable.new
$file_name =3D TkVariable.new
# Nazwy plik=C3=B3w plus rozszerzenia
$file_protokol_name =3D TkVariable.new
$file_protokol_ext =3D TkVariable.new
$file_csq_name =3D TkVariable.new
$file_csq_ext =3D TkVariable.new
$file_modem_name =3D TkVariable.new
$file_modem_ext =3D TkVariable.new
$file_serwis_1_name =3D TkVariable.new
$file_serwis_1_ext =3D TkVariable.new
$file_serwis_2_name =3D TkVariable.new
$file_serwis_2_ext =3D TkVariable.new
$file_serwis_3_name =3D TkVariable.new
$file_serwis_3_ext =3D TkVariable.new
$file_sprzedaz_name =3D TkVariable.new
$file_sprzedaz_ext =3D TkVariable.new
$file_plomba_name =3D TkVariable.new
$file_plomba_ext =3D TkVariable.new
$file_pos_name =3D TkVariable.new
$file_pos_ext =3D TkVariable.new
$file_kableprzed_name =3D TkVariable.new
$file_kableprzed_ext =3D TkVariable.new
$file_kablepo_name =3D TkVariable.new
$file_kablepo_ext =3D TkVariable.new
$file_posprzed_name =3D TkVariable.new
$file_posprzed_ext =3D TkVariable.new
$miejscowosc =3D TkVariable.new
# Pola na wprowadzenie warto=C5=9Bci PSD i Miejscowo=C5=9Bci
psd =3D Tk::Tile::Entry.new(content) {width 6; textvariable $psd}.grid( =
:column =3D> 2, :row =3D> 1, :sticky =3D> 'we' )
miejscowosc =3D Tk::Tile::Entry.new(content) {width 20; textvariable =
$miejscowosc}.grid(:column =3D> 5, :row =3D> 1, :sticky =3D> 'we')
Tk::Tile::Label.new(content) {text 'PSD'}.grid( :column =3D> 1, :row =3D>=
1, =
:sticky =3D> 'e')
Tk::Tile::Label.new(content) {text 'Miejscowo=C5=9B=C4=87'}.grid( :column=
=3D> 4, =
:row =3D> 1, :sticky =3D> 'e')
# Protok=C3=B3=C5=82 elektroniczny
Tk::Tile::Label.new(content) {text 'Protokol elektroniczny'}.grid( =
:column =3D> 1, :columnspan =3D> 2, :row =3D> 2, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.protokol_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
2, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_protokol_name}.grid( =
:column =3D> 5, :row =3D> 2, :sticky =3D> 'ne', :columnspan =3D> 4)
# Zdj=C4=99cie modemu
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie modemu'}.grid( :column =3D=
> 1, =
:columnspan =3D> 2, :row =3D> 3, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.modem_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D>=
3, =
:sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_modem_name}.grid( =
:column =3D> 5, :row =3D> 3, :sticky =3D> 'ne')
# Zdj=C4=99cie CSQ
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie CSQ'}.grid( :column =3D>=
1, =
:columnspan =3D> 2, :row =3D> 4, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.csq_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D> 4=
, =
:sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_csq_name}.grid( :column =
=3D> 5, :row =3D> 4, :sticky =3D> 'ne')
#Zdj=C4=99cia 3 pierwszych stron ksi=C4=85=C5=BCki serwisowej
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cia ksi=C4=85=C5=BCki serwis=
owej'}.grid( =
:column =3D> 1, :row =3D> 5, :sticky =3D> 'e')
Tk::Tile::Label.new(content) {text '1'}.grid( :column =3D> 2, :row =3D> 5=
, =
:sticky =3D> 'e')
Tk::Tile::Label.new(content) {text '3'}.grid( :column =3D> 2, :row =3D> 6=
, =
:sticky =3D> 'e')
Tk::Tile::Label.new(content) {text '4'}.grid( :column =3D> 2, :row =3D> 7=
, =
:sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.serwis_1_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
5, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.serwis_2_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
6, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.seriws_3_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
7, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_serwis_1_name}.grid( =
:column =3D> 5, :row =3D> 5, :sticky =3D> 'ne')
Tk::Tile::Label.new(content) {textvariable $file_serwis_2_name}.grid( =
:column =3D> 5, :row =3D> 6, :sticky =3D> 'ne')
Tk::Tile::Label.new(content) {textvariable $file_serwis_3_name}.grid( =
:column =3D> 5, :row =3D> 7, :sticky =3D> 'ne')
# Zdj=C4=99cie sprzeda=C5=BC pr=C3=B3bnej
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie sprzeda=C5=BCy pr=C3=B3b=
nej'}.grid( =
:column =3D> 1, :columnspan =3D> 2, :row =3D> 9, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.sprzedaz_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
9, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_sprzedaz_name}.grid( =
:column =3D> 5, :row =3D> 9, :sticky =3D> 'ne')
# Zdj=C4=99cie plomby serwisowej
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie plomby serwisowej'}.grid=
( =
:column =3D> 1, :columnspan =3D> 2, :row =3D> 10, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.plomba_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
10, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_plomba_name}.grid( =
:column =3D> 5, :row =3D> 10, :sticky =3D> 'ne')
# Zdj=C4=99cie stanowiska POS
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie stanowiska POS'}.grid( =
:column =3D> 1, :columnspan =3D> 2, :row =3D> 11, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.pos_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D> 1=
1, =
:sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_pos_name}.grid( :column =
=3D> 5, :row =3D> 11, :sticky =3D> 'ne')
# Zdj=C4=99cie kabli przed migracj=C4=85
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie kabli przed migracj=C4=85=
'}.grid( =
:column =3D> 1, :columnspan =3D> 2, :row =3D> 12, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.kableprzed_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row=
=
=3D> 12, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_kableprzed_name}.grid( =
:column =3D> 5, :row =3D> 12, :sticky =3D> 'ne')
# Zdj=C4=99cie kabli po migracji
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie kabli po migracji'}.grid=
( =
:column =3D> 1, :columnspan =3D> 2, :row =3D> 13, :sticky =3D> 'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.kablepo_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
13, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_kablepo_name}.grid( =
:column =3D> 5, :row =3D> 13, :sticky =3D> 'ne')
# Zdj=C4=99cie stanowiska POS przed migracj=C4=85
Tk::Tile::Label.new(content) {text 'Zdj=C4=99cie stanowiska POS przed =
migracj=C4=85'}.grid( :column =3D> 1, :columnspan =3D> 2, :row =3D> 14, :=
sticky =3D> =
'e')
Tk::Tile::Button.new(content) {text '...'; command =
{Generuj.new.posprzed_name(Tk.getOpenFile)}}.grid( :column =3D> 4, :row =3D=
> =
14, :sticky =3D> 'nw', :padx =3D> 15)
Tk::Tile::Label.new(content) {textvariable $file_posprzed_name}.grid( =
:column =3D> 5, :row =3D> 14, :sticky =3D> 'ne')
# Generowanie
Tk::Tile::Label.new(content) {text ''}.grid(:column =3D> 2, :columnspan =3D=
> =
2, :row =3D> 15, :sticky =3D> 'ne')
Tk::Tile::Button.new(content) {text 'Generuj'; command =
{Generuj.new.execute}}.grid( :column =3D> 4, :columnspan =3D> 1, :row =3D=
> 17, =
:sticky =3D> 's')
# Zamykanie programu
Tk::Tile::Button.new(content) {text 'Zamknij'; command { =
root.destroy}}.grid(:column =3D> 5, :columnspan =3D> 1, :row =3D> 17, :st=
icky =
=3D> 'w' )
# Czy w psd by=C5=82a ksi=C4=85=C5=BCka serwisowa
Tk::Tile::CheckButton.new(content) {text "Brak ksi=C4=85=C5=BCki serwisow=
ej"; =
variable $service_check; onvalue 'brak'; offvalue '1'; command =
{Generuj.new.service_check}}.grid( :column =3D> 3, :columnspan =3D> 2, :r=
ow =
=3D> 8, :sticky =3D> 'e')
# Wyczy=C5=9B=C4=87 wszystkie pola
Tk::Tile::Button.new(content) {text 'Wyczy=C5=9B=C4=87'; command =
{Generuj.new.clear_all}}.grid(:column =3D> 2, :columnspan =3D> 2, :row =3D=
>17, =
:sticky =3D> 'w')
class Generuj
#
def service_check
if $service_check =3D=3D 'brak' then
$file_serwis_1_name.value =3D "brak ksi=C4=85=C5=BCki serwisowej w =
PSD"
$file_serwis_2_name.value =3D "brak ksi=C4=85=C5=BCki serwisowej w =
PSD"
$file_serwis_3_name.value =3D "brak ksi=C4=85=C5=BCki serwisowej w =
PSD"
else
$file_serwis_1_name.value =3D nil
$file_serwis_2_name.value =3D nil
$file_serwis_3_name.value =3D nil
end
end
# Nazwa pliku protoko=C5=82u
def protokol_name(path)
$file_protokol_path.value =3D path
$file_protokol_name.value =3D File.basename(path, ".*")
$file_protokol_ext.value =3D File.extname(path)
end
# Nazwa pliku modemu
def modem_name(path)
$file_modem_path.value =3D path
$file_modem_name.value =3D File.basename(path, ".*")
$file_modem_ext.value =3D File.extname(path)
end
# Nazwa pliku csq
def csq_name(path)
$file_csq_path.value =3D path
$file_csq_name.value =3D File.basename(path, ".*")
$file_csq_ext.value =3D File.extname(path)
end
# Nazwa pliku serwis_1
def serwis_1_name(path)
$file_serwis_1_path.value =3D path
$file_serwis_1_name.value =3D File.basename(path, ".*")
$file_serwis_1_ext.value =3D File.extname(path)
end
# Nazwa pliku serwis_2
def serwis_2_name(path)
$file_serwis_2_path.value =3D path
$file_serwis_2_name.value =3D File.basename(path, ".*")
$file_serwis_2_ext.value =3D File.extname(path)
end
# Nazwa pliku serwis_3
def seriws_3_name(path)
$file_serwis_3_path.value =3D path
$file_serwis_3_name.value =3D File.basename(path, ".*")
$file_serwis_3_ext.value =3D File.extname(path)
end
# Nazwa pliku sprzeda=C5=BCy
def sprzedaz_name(path)
$file_sprzedaz_path.value =3D path
$file_sprzedaz_name.value =3D File.basename(path, ".*")
$file_sprzedaz_ext.value =3D File.extname(path)
end
# Nazwa pliku plomby
def plomba_name(path)
$file_plomba_path.value =3D path
$file_plomba_name.value =3D File.basename(path, ".*")
$file_plomba_ext.value =3D File.extname(path)
end
# Nazwa pliku pos
def pos_name(path)
$file_pos_path.value =3D path
$file_pos_name.value =3D File.basename(path, ".*")
$file_pos_ext.value =3D File.extname(path)
end
# Nazwa pliku kable przed migracj=C4=85
def kableprzed_name(path)
$file_kableprzed_path.value =3D path
$file_kableprzed_name.value =3D File.basename(path, ".*")
$file_kableprzed_ext.value =3D File.extname(path)
end
# Nazwa pliku kable po migracji
def kablepo_name(path)
$file_kablepo_path.value =3D path
$file_kablepo_name.value =3D File.basename(path, ".*")
$file_kablepo_ext.value =3D File.extname(path)
end
# Nazwa pliku pos przed migracj=C4=85
def posprzed_name(path)
$file_posprzed_path.value =3D path
$file_posprzed_name.value =3D File.basename(path, ".*")
$file_posprzed_ext.value =3D File.extname(path)
end
# Zmie=C5=84 nazw=C4=99 pliku
def file_rename(path)
case path
when $file_protokol_path then $file_name.value =3D =
String.new("potwierdzenie migracji w PSD") and file_ext =3D =
$file_protokol_ext and old_file =3D $file_protokol_path
when $file_modem_path then $file_name.value =3D "potwierdzeni=
e =
inslatacji modemu GSM w PSD" and file_ext =3D $file_modem_ext and old_fil=
e =
=3D $file_modem_path
when $file_csq_path then $file_name.value =3D "zasi=C4=99g =
stanowiska GSM w PSD" and file_ext =3D $file_csq_ext and old_file =3D =
$file_csq_path
when $file_serwis_1_path then $file_name.value =3D "zdj=C4=99cie=
=
ksi=C4=85=C5=BCki serwisowej w PSD (1)" and file_ext =3D $file_serwis_1_e=
xt and =
old_file =3D $file_serwis_1_path
when $file_serwis_2_path then $file_name.value =3D "zdj=C4=99cie=
=
ksi=C4=85=C5=BCki serwisowej w PSD (2)" and file_ext =3D $file_serwis_2_e=
xt and =
old_file =3D $file_serwis_2_path
when $file_serwis_3_path then $file_name.value =3D "zdj=C4=99cie=
=
ksi=C4=85=C5=BCki serwisowej w PSD (3)" and file_ext =3D $file_serwis_3_e=
xt and =
old_file =3D $file_serwis_3_path
when $file_sprzedaz_path then $file_name.value =3D "potwierdzeni=
e =
sprzeda=C5=BCy pr=C3=B3bnej w PSD" and file_ext =3D $file_sprzedaz_ext an=
d old_file =
=3D $file_sprzedaz_path
when $file_plomba_path then $file_name.value =3D "zdj=C4=99cie=
=
plomby drukarki w PSD" and file_ext =3D $file_plomba_ext and old_file =3D=
=
$file_plomba_path
when $file_pos_path then $file_name.value =3D "zdj=C4=99cie=
=
stanowiska POS w PSD" and file_ext =3D $file_pos_ext and old_file =3D =
$file_pos_path
when $file_kableprzed_path then $file_name.value =3D "stan =
okablowania POS przed migracj=C4=85 w PSD " and file_ext =3D =
$file_kableprzed_ext and old_file =3D $file_kableprzed_path
when $file_kablepo_path then $file_name.value =3D "stan =
okablowania POS po migracji w PSD " and file_ext =3D $file_kablepo_ext an=
d =
old_file =3D $file_kablepo_path
when $file_posprzed_path then $file_name.value =3D "stan POS po =
migracji w PSD " and file_ext =3D $file_posprzed_ext and old_file =3D =
$file_posprzed_path
end
if path !=3D nil or "#{path}".length !=3D 0 then
File.rename("#{old_file}", "Ruch, #{$file_name} #{$psd} , =
#{$miejscowosc}#{file_ext}")
#else
# name_of_file =3D "Brak pliku Ruch, #{file_name}.txt"
# file =3D File.new(name_of_file, "w")
# file.write "Brak danych dla pliku: Ruch, #{file_name}.txt"
# file.close
end
$file_name.value =3D nil
end
# Zmie=C5=84 nazwy plik=C3=B3w
def execute
if "#{$psd}".length !=3D 6 or "#{$psd}".to_i =3D=3D 0 then
Tk::messageBox :message =3D> "Z=C5=82y kod psd"
else
if not File.directory?("PSD #{$psd}, #{$miejscowosc}") then
Dir.mkdir( "PSD #{$psd}, #{$miejscowosc}" )
end
Dir.chdir( "PSD #{$psd}, #{$miejscowosc}" )
#$win =3D TkToplevel.new($content)
#$win['geometry'] =3D '300x200+500+200'
#Tk::Tile::Button.new($win) {text 'Zamknij'; command =
{$win.destroy}}.grid( :column =3D> 3, :row =3D> 3, :sticky =3D> 'w')
#Tk::Tile::Label.new($win) {textvariable $file_name}.grid( =
:column =3D> 2, :row =3D> 2, :sticky =3D> 'we');
# Zmie=C5=84 nazw=C4=99 protoko=C5=82u
file_rename($file_protokol_path)
file_rename($file_modem_path)
file_rename($file_csq_path)
file_rename($file_serwis_1_path)
file_rename($file_serwis_2_path)
file_rename($file_serwis_3_path)
file_rename($file_sprzedaz_path)
file_rename($file_plomba_path)
file_rename($file_pos_path)
file_rename($file_kableprzed_path)
file_rename($file_kablepo_path)
file_rename($file_posprzed_path)
if $service_check =3D=3D "brak" then
file =3D File.new( "Brak ksi=C4=85=C5=BCki serwisowej w PSD #{$ps=
d}, =
#{$miesjcowosc}")
end
if all_files_correct? then
Tk::messageBox :message =3D> "Wykonano pomy=C5=9Blnie"
else
Tk::messageBox :message =3D> "Brakuje plik=C3=B3w"
end
end
Dir.chdir("..")
end
# Uzupe=C5=82nij braki
def complete_rest
if File.exist?("{$protokol_new}")
puts "isntnieje!"
else
puts "nie ma mnie!"
end
end
# Wyczy=C5=9B=C4=87 wszystkie pola
def clear_all
$miejscowosc.value =3D nil
$psd.value =3D nil
$file_protokol_path.value =3D nil
$file_csq_path.value =3D nil
$file_serwis_1_path.value =3D nil
$file_serwis_2_path.value =3D nil
$file_serwis_3_path.value =3D nil
$file_modem_path.value =3D nil
$file_sprzedaz_path.value =3D nil
$file_plomba_path.value =3D nil
$file_pos_path.value =3D nil
$file_kableprzed_path.value =3D nil
$file_kablepo_path.value =3D nil
$file_posprzed_path.value =3D nil
$file_protokol_name.value =3D nil
$file_protokol_ext.value =3D nil
$file_csq_name.value =3D nil
$file_csq_ext.value =3D nil
$file_modem_name.value =3D nil
$file_modem_ext.value =3D nil
$file_serwis_1_name.value =3D nil
$file_serwis_1_ext.value =3D nil
$file_serwis_2_name.value =3D nil
$file_serwis_2_ext.value =3D nil
$file_serwis_3_name.value =3D nil
$file_serwis_3_ext.value =3D nil
$file_sprzedaz_name.value =3D nil
$file_sprzedaz_ext.value =3D nil
$file_plomba_name.value =3D nil
$file_plomba_ext.value =3D nil
$file_pos_name.value =3D nil
$file_pos_ext.value =3D nil
$file_kableprzed_ext.value =3D nil
$file_kableprzed_name.value =3D nil
$file_kablepo_ext.value =3D nil
$file_kablepo_name.value =3D nil
$file_posprzed_ext.value =3D nil
$file_posprzed_name.value =3D nil
$miejscowosc.value =3D nil
end
# Wszystkich plik=C3=B3w
def all_files_correct?
if $service_check =3D=3D "brak" then
@all_files =3D 6
else
@all_files =3D 9
end
i =3D 0
Dir['*.*'].each do |k|
i =3D i + 1
end
if i =3D=3D @all_files then
return true
else
return false
end
end
end
#end
Tk.mainloop
-- =
Posted via http://www.ruby-forum.com/.=