OpenLLM-France/wikimedia huggingface dataset:
# Ruby Programming/GUI Toolkit Modules/Tk

Of Ruby GUI bindings, the Tk binding is the oldest; it is widely available and still more or less the default toolkit for GUI programming with Ruby. Nevertheless, currently there exists no comprehensive manual for Ruby/Tk; the Ruby book recommends inferring Ruby/Tk usage from the Perl/Tk documentation.
The current Ruby "PickAxe book" has a chapter on Ruby/Tk.

## Documentation

* There’s a pretty good tutorial www.tutorialspoint.com/ruby/ruby_tk_guide.htm .
* There are some pleasantly looking tutorials at tkdocs.com (it’s not really Tk’s official site).
* After having introducted yourself to the concepts of Tk you should also be able to read TclTk’s official reference (this is also available as man pages on Unix or a CHM file on Windows).
You may also be able to comfortably read PerlTk’s documentation as the Ruby bindings are said to be modeled after Perl’s.

## Look and Feel

The “look and feel” of your Tk application depends on the version of the Tk library your Ruby interpreter is linked against:
* Tk 8.4 and below is notorious for its “ugly” look. The widgets have the outdated Motif look and feel, and, on Unix-based systems, bitmap fonts are used.
* Tk 8.5 and above look more modern. It is shipped with the Tile theming engine, and widgets now look native to the hosting platform. On Unix-based systems outline fonts are now used.

## Availability

If the Tk toolkit isn’t already installed on your system, you’ll have to install it. You may use your system’s “package manager” for this.
If you built Ruby before having installed the Tk dev package, it’s likely that it was built without Tk built in. For 1.9 versions you might be able to get away with installing it as a gem but your best bet is to install the tk dev package and reinstall Ruby so that it builds with the Tk bindings.

#### Windows

By default the “old” one click installer has the Tk binaries, however you’ll still need to install the Tk toolkit from ActiveState .
If you’re using the new “rubyinstaller” then for 1.8.6 this might help or for 1.9 this might help
There’s a precompiled gem which should work out-of-the-box: tk-win. It includes sources and libraries directly from Hidetoshi NAGAI. It’s Ruby 1.9 only.
You could also try the ffi-tk gem, or download this for 1.9 mingw users.
The hope is that future versions of rubyinstaller will come with the binaries built in, then the above work-arounds won’t be necessary.
* ↑ The ActiveState package for Windows, mentioned above, contains the documentation as a CHM file.
* ↑ “on X-Window systems”, to be exact.
* ↑ The Tile theming engine can be installed on older Tk 8.x libraries as well.
* ↑ Though you may have to “turn on” this feature (?).
# Ruby Programming/Classes and objects

← Writing methods | Exceptions →

## Ruby Classes

As stated before, everything in Ruby is an object. Every object has a class. To find the class of an object, simply call that object's class method. For example, try this:
Anyhow, you should already know this. What you don't know however, is how to make your own classes and extend Ruby's classes.

## Creating Instances of a Class

An instance of a class is an object that belongs to that class. For example, "chocolate" is an instance of the String class. You already know that you can create strings, arrays, hashes, numbers, and other built-in types by simply using quotes, brackets, curly braces, etc., but you can also create them via the new method. For example, my_string = "" is the same as my_string = String.new. Almost every class has a new method: arrays, hashes, whatever. (Some classes like Integers and Numerics do not have the new method. These classes do not allow duplicates to exist among instantiated objects.) When you create your own classes, you'll use the new method to create instances.

## Creating Classes

Classes represent a type of an object, such as a book, a whale, a grape, or chocolate. Everybody likes chocolate (may not be true), so let's make a chocolate class:
Let's take a look at this. Classes are created via the class keyword. After that comes the name of the class. All class names must start with a Capital Letter. By convention, we use CamelCase for class name. So we would create classes like PieceOfChocolate, but not like Piece_of_Chocolate.
The next section defines a class method. A class method is a method that is defined for a particular class. For example, the String class has the length method:
To call the eat method of an instance of the Chocolate class, we would use this code:
You can also call a method by using send
However, using send is rare unless you need to create a dynamic behavior, as we do not need to specify the name of the method as a literal - it can be a variable.
Note that the typical definition of a method in Ruby starts with the keyword def.
You can, however, also use define_method instead, and combine this with .send, to call arbitrary methods:

## Self

Inside a method of a class, the pseudo-variable self (a pseudo-variable is one that cannot be changed) refers to the current instance. For example:

## Class Methods

You can also create methods that are called on a class rather than an instance. For example:
Note the three different constructions: ClassName.method_name and self.method_name are essentially the same - outside of a method definition in a class block, self refers to the class itself. The latter is preferred, as it makes changing the name of the class much easier. The last construction, class << self, puts us in the context of the class's "meta-class" (sometimes called the "eigenclass"). The meta-class is a special class that the class itself belongs to. However, at this point, you don't need to worry about it. All this construct does is allow us to define methods without the self. prefix.
# Ruby Programming/Exceptions

There is no exceptions chapter at present. Instead, here is a link to a chapter about exceptions from Yukihiro Matsumoto's book, Programming Ruby: The Pragmatic Programmer's Guide More detail and simpler examples about exceptions, by Satish Talim, maybe found in a tutorial at RubyLearning.com
# The Computer Revolution/Databases/Transaction Processing System
### Transaction Processing System (TPS)

A Transaction Processing System (TPS) also known as data processing systems are used within many companies to provide support and organization in the processing of large amounts of paperwork. TPS(s) are often used when producing or recording things like pay checks, invoices, student tuition bills and payment reminders. A TPS would most likely be found in a business’s accounting/billing department and is a necessity for many large companies that may produce hundreds if not thousands of transactions every day. The primary function of a TPS or data processing system is to effectively and efficiently process and record any data that is a result of a transaction. Users of transaction processing systems include lower level management, supervisors and operations personnel. What sets a transaction processing system apart from a management information system is that TPS(s) bring the entire transaction process full circle from start to finish and incorporate many divisions within a business. (http://www.basicsofcomputer.com/function_of_transaction_processing_system_tps.htm)
Programs that are called Transaction Processing Systems (TPS) by supporting transaction processing provide three functional areas:
1. System run-time functions:
2. System administration functions:
3. Application development functions
Sources: http://publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=%2Fcom.ibm.cics.te.doc%2Ferziaz0019.htm
# The Computer Revolution/Databases/Types of Files

A file can be defined as a collection of data or information. However, the computer treats every file like a single unit. Therefore each file has a filename. For example a file created in word is different from a file created in a wave editing program. There are two types of files. There are Program files and Data Files. Program files, at heart, can be described as files containing software instructions. Program files are then made up by two files called, source program files and executable files. Source program files contain the original form of instructions from the creator. These are then translated in executable files so the processor can interpret them and carry out the function of the file. The Other type of main file is data files. These are basically to hold data. These are not like program files in which they actually carry out a function on the computer. Rather they contain information that is to be acted on by the program files. There are they types of files that make up data files. These are Graphic Files, Audio files and Animation/Video files. Graphic files can easily be thought of, of the pictures you see. Audio Files are the music files you listen to. Animation/Video files are the movies or clips that you watch on your computer.

### Copying and Moving Files and Folders

Copying and moving files and folders is a very easy and simple task to do. It helps you keep your computer organized and helps to keep you folders readily available. The first step to take in order for you to do this is to find the folder that you want to move. Then you highlight (select) the folder and right click to copy or cut the folder. This copies the file to the clipboard. Then you will go to the location where you want to put the file and right click and paste it there. (This is for windows 7).

### Deleting Files and Folders

This task is very useful to keep your computer clean and organized. You might want to delete these files to keep your computer organized or even to get your computer going faster. The first step to take to delete a file or folder is to go to the drive and folder where your file is located. Then you will select that file and drag it to the recycle icon on your desktop. What you can also do is select and press the delete key. This will delete your folder. If you delete a folder it will delete every file in that folder.
# The Computer Revolution/Databases/Management Information System

What is a Management Information System?
* MIS for short
* it is an information system in which is computer-based.\
* it uses data from a transaction processing system as input to produce reports
Features of the Management Information System
* Input - uses transaction date such as bills, orders, paychecks
* Output - structured reports such as budgets, summaries, production reports
* Users - developed mainly for middle management or "tactical managers" provides them an overview of current business activities
* Capability - is able to use transaction date from all six departments of the company (R&D, Production, Marketing, Accounting and finance, HR, Information Systems )
* Multitude of Output Choices - the management information system is capable of producing several different reports such as: #*Summary Reports
** Exception Reports
** Periodic Reports
** Demand Reports

## Steps required during MIS reporting

* Data Retrieving
* Data Analysis
* Consolidation
* Summarization
* Presentation (Pictorial View)
INVENTORY MANAGEMENT SYSTEMS; Inventory management systems are systems that help companies/businesses control their inventory. They are used to keep companies inventory cost under control and to maximize the capabilities of their order systems. Often times, inventory management systems are set to replenish automatically when products get low. This helps eliminate excess ordering of product and product shortages. By keeping products on the shelf and replenishment sources full, this will help increase profits a company makes. Inventory management systems are often utilized very often in small and large companies. One of the most used, if not the most used, inventory management system is SAP, which was started as a German based inventory system.
PAYROLL SYSTEMS; Payroll systems are systems used to compute individuals’ pay, take out deductions, and remove taxes from employees pay. The systems are also used to dispatch pay checks for employees. These systems are commonly used throughout business to make the process of payroll simpler and more accurate. Payroll systems also create reports that can be used and interpreted by mangers for tax purposes. These reports generated by payroll systems may also be distributed to federal, state, and local government, if needed.
This is a Payroll processing map.
SALES MANAGEMENT INFORMATION SYSTEMS:
Sales management systems are also called sales force automation systems or SFAs. A SFA keeps track of all stages of sales within a company. It tracks the sales process from the first call to either a win or loss in the sale. It is used to do reporting to give to managers to determine how well the company is doing. Since sales is essentially what keeps a company going, SFA systems are very important to have to be able to determine how well the company is doing and predict where it will go in the future.
Here is an example of what can be created from a SFA.
# The Computer Revolution/Databases/Opinion Polls

Many thanks are due to computers when it comes to politics. One major aspect of computers' aid in politics is the opinion polls. Computers along with the Internet enable us to post up specific questions about politics. These questions are entirely open to the public and ask them what they may think of certain issues. Each person who answers, or votes, is counted and the information is then displayed in percentage. This percentages do NOT make the decisions in politics, instead they act as a source of information, they are a statistic. This information can be used many different ways, by many different people. Politicians may use it as information as to where they should focus more into. People who may not be politicians may use it as a aid in their choice of politicians. All in all computers contribute an abundance to opinion polls, but they also contribute in other aspects of politics.
There are also different websites that condense these databases to one place so that the reader can search for a variety of data in one spot. A person could look for related polls, completely unrelated polls or a combination of each on one place. This can be most helpful in a campaign when you are trying to get a feel for certain key issues in that election. In this way, having many databases stored in one place can really help narrow the search and aid in the understanding of what people are thinking.

## Opinion Poll Database

An opinion poll is a way of gathering information about the views and thoughts of people on a particular given topic. Opinion polls are usually given to a sample population to determine their views on an issue. There are a variety of online opinion poll databases, and these opinion poll databases are sometimes used to make decisions. One type of opinion poll database is Polling the Nations. Polling the Nations is an online database of public opinion polls.” Poling the Nations consist of 600,000+ questions and responses from 18,000+ surveys and 1,700+ polling organizations. Polling the Nations has been conducting opinion polls since 1986 to present in the United States and in more than 100 other countries around the world. There is a membership fee for Polling the Nations.
Sources:www.wikianswers.com, http://poll.orspub.com/
# The Computer Revolution/Databases/Indexing

As part of the Information and Identification Services department of the Royal Canadian Mounted Police, CCRIS manages the Central Repository of criminal records information.
CCRIS manages criminal record files consisting of criminal charges and their dispositions, including convictions and discharges and fingerprint information. In addition, CCRIS manages the Missing Children's Registry and assists law enforcement agencies in matters involving missing children.
Shared databases across Canada have made law enforcement much easier than prior to having such databases/directories. Provincial law enforcement agencies can easily assist other provinces with solving crimes, locating people etc...due to the large database containing criminal records.
Family Watch Dog
Family Watch Dog is one example of a criminal database and it is a national sex offender registry. There are laws in our country which make it mandatory for anyone convicted of a crime which falls into the sex offender category to register as a sex offender and they are then entered into this database. Anyone can log onto this website and look up their address, or any address in American they desire, and see all of the registered sex offenders who are living around that area. It is a very useful tool, especially for families with young children, when deciding what area they should move to and just to keep tabs on their neighborhood. For the picture below: After inputting an address, a map will show up with little indicators where all the sex offenders are located. By clicking on those indicators, you can find the picture of the offender along with information about him and his crime.
NSOPW-National Sex Offender Public Website - http://www.nsopw.gov/en-US/Registry
The NSOPW website is a national database which allows public searches for sex offenders. This website searches all jurisdictions in real time, meaning the list of offenders is updated constantly, and when the website is searched, it returns the most up to date information. What makes this website different than other database websites is that it acts like a search engine culling data from other states’ and Native American tribal sex offender websites. The NSOPW website can be used by prospective home buyers to see if there are any sex offenders in the neighborhood they would like to buy a house. The website can also be used by employers to see if job applicants have any history of sex crimes.
# The Computer Revolution/Databases/RDBMS
## Relational Database Management Systems: ORACLE DATABASE 11g

A database management system includes adding new data, updating or altering data on the database. What about Relational Database Management Systems or known as RDBMS?
An RDBMS is a Database Management System that is based on a relational model. In this data model, data is stored in the form of tables. And again, a data model is a way of storing and retrieving data. A good example of an RDBMS is Oracle.
Oracle database is an object RDBMS used as a platform by many mainstream companies to keep track of large amount of data and databases. The reason is for it being the best DBMS tool is that it can backup and restore data efficiently, manage data integrity, data security, tuning and performance of databases and other features as well. Within Oracle, there is a program called SQLPLUS which is used to create tables, input information and alter data in those tables. SQLPLUS is the most important tool in Oracle. It is also used for mounting databases, creating users, granting them different permissions and roles. The different versions of Oracle are 8i, 9i, 10g, 11i and 11g A database consists of three main things:
Oracle has physical and logical form of storage structures. It stores data in the form of logical Table spaces, which is a collection of physical data files stored in the form of physical oracle Data Blocks. An Oracle data block is the lowest allocation unit of data. Now what exactly is a table space?
When a Table Space is assigned to a user, all the schema information related to that user, is stored in that particular Table Space.
An Oracle Instance consists of two main memory structures. The System Global Area known as the “SGA” and the Program Global Area (PGA). It also consists of several other background processes that are responsible for various other tasks. These memory structures and background processes make up an Oracle instance. A database cannot be mounted if the instance isn't started. The SGA and PGA play an important role in database tuning.
One of the crucial things in maintaining a database is back-up and recovery. In case a database crashes, Oracle has an inbuilt tool called the RMAN, Recovery Manager. This tool runs very efficiently and users can back up and restore a database to an earlier stage, manually or program it to take automatic backups and send a log report via email. This makes Oracle Databases an excellent relational database management system.
Reference: Bob Bryla and Kevin Loney. Oracle Database 11g DBA Handbook: Oracle Press, 2007
# The Computer Revolution/Digital Counterfeiting
## Digital Counterfeiting

In definition digital counterfeiting is the use of computers or digital equipment to make counterfeit copies of printed resources. The major example of counterfeits is currency which according to the U.S. Secret Service around 60% of currency made counterfeit is done so digitally. Other counterfeit items also include business checks, collectibles, fake identifications, and credit cards. The practice of counterfeiting is illegal in the United States and offenders could be sentenced to 15 years per offense. The majority of counterfeit currency are produced by gangs, organized crime, and terrorist organizations but has also been seen done so by college students and even high school students. Although easily detectable counterfeit currency has had more ease of creating due to more and more digital technology that allows to do so.
In order to prevent currency counterfeiting, the Government has been implementing measures such as changing the currency design every 7 to 10 years. With each new edition they are incorporating additional security features (watermarks, microprinting)which make it hard to duplicate the bills and can be easily seen when holding the bills up to the light. Also, in order to make it easier to track the source of the counterfeit item, the digital imaging equipment(copiers, scanners)are equipped with technologies such as printing invisible code that make tracking possible.Cannon has revealed to be using such technologies since 1992. Source - Understanding Computers: Today and Tomorrow, 13th Edition

### Digital Watermark

The use of digital watermarks is incredibly popular and most often people have no idea when something actually has a digital watermark. Digital watermarks are used to identify whether or not a document has been tampered with, protect sensitive material from unauthorized editing and to deter things like counterfeiting and piracy. The process of digital watermarking involves embedding digital information or identifiers into audio, video and printed materials. The digital watermark, while undetectable to people can easily be identified and analyzed by computers. http://www.digimarc.com/technology/about-digital-watermarking

### Security Thread

One digital counterfeiting prevention tool is a security thread. A security thread is a plastic strip that is embedded in U.S. currency. This strip can only be seen when it is held up to the light or when placed under an ultraviolet light. When you make the strip visible, it shows the letters USA followed by a number. The number is the value of the bill. For example a one dollar bill will have "USA 1" printed on the security thread. This feature makes currency hard to duplicate but not impossible. Some counterfeits have been known to have a thin grey line printed on the end of the thread or a varnish at the end.
References: Understanding Computers, 13th Edition, Morley and Parker Wikipedia.org
# Topfield 5800/Troubleshooting/Reboot Cycle

If you are stuck in a reboot cycle then the most likely problem is a rogue TAP. Stop TAPs from loading by holding down the '0' button on the remote while the Toppy starts up.
Another possibility is a problem with corrupt Settings. If you are stuck in a reboot cycle then you cannot do a Factory Reset but you can blank the Settings by flashing EmptySettings using the failsafe mechanism. Note that after applying this you must perform a Factory Reset as soon as possible, once the reboot cycle has been fixed.
Finally, an incompatible firmware patch may be causing the Toppy to crash as soon as it starts up. Re-flash a plain firmware using the failsafe mechanism.