The document describes the Ring documentation for version 1.8 and provides examples of using various math, date, file, system, and data type classes in the Ring standard library. Some key classes and methods described include the Math class for trigonometric, logarithmic, exponential and other math functions, the DateTime class for getting dates, times and performing date calculations, the File class for reading, writing, renaming and deleting files, and the System class for checking operating system properties and executing system commands. Examples demonstrate using the classes and methods to perform calculations, manipulate dates, read/write files, and get system information.
The Ring programming language version 1.5.1 book - Part 35 of 180Mahmoud Samir Fayed
The document provides documentation on classes in the Ring programming language standard library, including the Math, DateTime, File, System, Debug, DataType, Conversion, and ODBC classes. It lists the main methods of each class and provides short examples and sample outputs of using each method.
The Ring programming language version 1.3 book - Part 16 of 88Mahmoud Samir Fayed
The document provides documentation on file handling functions in Ring programming language. It describes functions for reading and writing files, getting directory listings, renaming and deleting files, opening, closing and manipulating file streams. Examples are given showing how to use functions like Read(), Write(), Dir(), Rename(), Remove(), Fopen(), Fclose(), Freopen() etc. to perform common file operations in Ring.
The Ring programming language version 1.6 book - Part 39 of 189Mahmoud Samir Fayed
This document provides documentation on classes in the Ring standard library related to date and time (DateTime), files (File), systems (System), debugging (Debug), data types (DataType), conversions (Conversion), ODBC, MySQL, SQLite, and security (Security). It includes descriptions of methods in each class and examples of using the methods.
The Ring programming language version 1.2 book - Part 14 of 84Mahmoud Samir Fayed
This document provides documentation on mathematical and file handling functions in the Ring programming language. It describes functions for trigonometric, exponential, logarithmic, power and other common mathematical operations. It also covers functions for reading, writing, opening, closing and manipulating files, including reading/writing specific characters, lines, and binary data. Examples are provided to demonstrate the usage of many of these functions.
The Ring programming language version 1.6 book - Part 27 of 189Mahmoud Samir Fayed
The document describes various file handling functions in Ring programming language. It explains functions to read and write files, get directory listings, rename and delete files, open/close files, seek to positions in files, generate temporary files and names, check for end of file and errors, and more. Examples are provided to demonstrate the usage of each file function.
The Ring programming language version 1.8 book - Part 30 of 202Mahmoud Samir Fayed
The document describes various functions for working with files in Ring programming language. Some of the key functions covered include Read() and Write() for reading from and writing to files, Dir() for getting directory listings, Rename() and Remove() for renaming and deleting files, Fopen() and Fclose() for opening and closing file handles, and Fseek(), Ftell(), Rewind() for manipulating the file position indicator. Functions for error handling like Feof(), Ferror(), Clearerr() and temporary files management are also discussed.
The Ring programming language version 1.5.4 book - Part 25 of 185Mahmoud Samir Fayed
This document describes various file handling functions in Ring programming language including Read(), Write(), Dir(), Rename(), Remove(), Fopen(), Fclose(), Fflush(), Freopen(), Tempfile(), Tempname(), Fseek(), Ftell(), and provides examples of how to use each function to read, write, modify and get information about files. It also covers opening and closing files, seeking to different positions in a file, generating temporary file names and more.
The Ring programming language version 1.9 book - Part 32 of 210Mahmoud Samir Fayed
The document describes various file handling functions in Ring including Read(), Write(), Dir(), Rename(), Remove(), fopen(), fclose(), fflush(), freopen(), tempfile(), tempname(), fseek(), ftell(), rewind(), fgetpos(), fsetpos(), clearerr(), feof(), ferror(), perror(), fgetc(), fgets(), fputc(), fputs(), ungetc(), fread(), fwrite(), fexists(), and how to use numbers and bytes. It provides examples of using these functions to read and write files, get directory listings, open/close files, seek within files, and more.
The Ring programming language version 1.5.1 book - Part 35 of 180Mahmoud Samir Fayed
The document provides documentation on classes in the Ring programming language standard library, including the Math, DateTime, File, System, Debug, DataType, Conversion, and ODBC classes. It lists the main methods of each class and provides short examples and sample outputs of using each method.
The Ring programming language version 1.3 book - Part 16 of 88Mahmoud Samir Fayed
The document provides documentation on file handling functions in Ring programming language. It describes functions for reading and writing files, getting directory listings, renaming and deleting files, opening, closing and manipulating file streams. Examples are given showing how to use functions like Read(), Write(), Dir(), Rename(), Remove(), Fopen(), Fclose(), Freopen() etc. to perform common file operations in Ring.
The Ring programming language version 1.6 book - Part 39 of 189Mahmoud Samir Fayed
This document provides documentation on classes in the Ring standard library related to date and time (DateTime), files (File), systems (System), debugging (Debug), data types (DataType), conversions (Conversion), ODBC, MySQL, SQLite, and security (Security). It includes descriptions of methods in each class and examples of using the methods.
The Ring programming language version 1.2 book - Part 14 of 84Mahmoud Samir Fayed
This document provides documentation on mathematical and file handling functions in the Ring programming language. It describes functions for trigonometric, exponential, logarithmic, power and other common mathematical operations. It also covers functions for reading, writing, opening, closing and manipulating files, including reading/writing specific characters, lines, and binary data. Examples are provided to demonstrate the usage of many of these functions.
The Ring programming language version 1.6 book - Part 27 of 189Mahmoud Samir Fayed
The document describes various file handling functions in Ring programming language. It explains functions to read and write files, get directory listings, rename and delete files, open/close files, seek to positions in files, generate temporary files and names, check for end of file and errors, and more. Examples are provided to demonstrate the usage of each file function.
The Ring programming language version 1.8 book - Part 30 of 202Mahmoud Samir Fayed
The document describes various functions for working with files in Ring programming language. Some of the key functions covered include Read() and Write() for reading from and writing to files, Dir() for getting directory listings, Rename() and Remove() for renaming and deleting files, Fopen() and Fclose() for opening and closing file handles, and Fseek(), Ftell(), Rewind() for manipulating the file position indicator. Functions for error handling like Feof(), Ferror(), Clearerr() and temporary files management are also discussed.
The Ring programming language version 1.5.4 book - Part 25 of 185Mahmoud Samir Fayed
This document describes various file handling functions in Ring programming language including Read(), Write(), Dir(), Rename(), Remove(), Fopen(), Fclose(), Fflush(), Freopen(), Tempfile(), Tempname(), Fseek(), Ftell(), and provides examples of how to use each function to read, write, modify and get information about files. It also covers opening and closing files, seeking to different positions in a file, generating temporary file names and more.
The Ring programming language version 1.9 book - Part 32 of 210Mahmoud Samir Fayed
The document describes various file handling functions in Ring including Read(), Write(), Dir(), Rename(), Remove(), fopen(), fclose(), fflush(), freopen(), tempfile(), tempname(), fseek(), ftell(), rewind(), fgetpos(), fsetpos(), clearerr(), feof(), ferror(), perror(), fgetc(), fgets(), fputc(), fputs(), ungetc(), fread(), fwrite(), fexists(), and how to use numbers and bytes. It provides examples of using these functions to read and write files, get directory listings, open/close files, seek within files, and more.
The Ring programming language version 1.10 book - Part 46 of 212Mahmoud Samir Fayed
This document provides summaries of various classes in the Ring programming language including the Queue, HashTable, Tree, Math, DateTime, File, and System classes. For each class, it lists key methods and provides examples of how to use the methods by creating objects of the classes and calling their methods. It demonstrates adding, removing, and printing items from queues; adding, retrieving, and checking items in hashtables; setting values and adding children to tree nodes; and using math, date/time, file I/O, and system methods.
The Ring programming language version 1.3 book - Part 50 of 88Mahmoud Samir Fayed
This document describes a simple notepad application created using RingQt. The application contains buttons for common editing functions like new, open, save, cut, copy, paste. It allows setting the font, text color, and background color. The application initializes default values for the active file name, text/background colors, font, and contains a search feature to find and replace text.
The Ring programming language version 1.5.3 book - Part 77 of 184Mahmoud Samir Fayed
The document describes a simple notepad application developed using RingQt. It initializes variables to store the active file name, text and background colors, font, and other settings. It creates a main window with buttons to handle common file operations like new, open, save, cut, copy, paste. It also includes buttons to change the font and text color. The application executes a Qt event loop to handle user interface events.
The Ring programming language version 1.4 book - Part 18 of 30Mahmoud Samir Fayed
This document provides code for a simple notepad application created using the Ring programming language and Qt GUI library. The application allows users to open, edit, save, print, find/replace, and run Ring code files. It includes menus, toolbars, and buttons for common editing functions and uses classes like QTextEdit, QFile, and QPrinter. The application stores settings for the active file name, text colors, font, and handles events for opening, saving, printing and running files.
The Ring programming language version 1.10 book - Part 54 of 212Mahmoud Samir Fayed
This document describes code related to user registration and login functionality in Ring. It includes code for a registration form, login form, user registration logic, login validation, and checking if a user is logged in. Database and model classes are also shown that handle connecting to the database, querying for users, and managing user data.
The Ring programming language version 1.5.3 book - Part 44 of 184Mahmoud Samir Fayed
This document provides code examples for classes used in a web application framework in Ring. It includes the Database, ModelBase, and ControllerBase classes which handle database connectivity and operations. It also includes an overview of the WebLib API which provides functions and classes for generating HTML pages and elements. Some key classes described are Page, Form, Table, and classes to generate specific HTML elements like Div, Link, Image etc.
The document contains code snippets from a C++ program. It includes functions and methods that process services, create new rules, set IDs, and notify CRM systems. Conditionals like if/else statements and exceptions are used for validation and error handling.
The Ring programming language version 1.7 book - Part 38 of 196Mahmoud Samir Fayed
This document summarizes Ring programming language functions for various tasks like checking characters, reading/writing files, math operations, date functions and more. It provides the syntax and examples for 44 functions, including functions to check if a character is special, find the factorial of a number, multiply matrices, read lines from a file, and make directories.
The Ring programming language version 1.6 book - Part 26 of 189Mahmoud Samir Fayed
This document provides documentation on mathematical functions available in the Ring programming language. It lists functions for trigonometric, hyperbolic, exponential, logarithmic, rounding and random number generation. Examples are given showing how to use functions like sin(), cos(), tan(), exp(), log(), ceil(), floor(), sqrt(), and random(). Conversions between radians and degrees are demonstrated for trigonometric functions.
Crushing the Head of the Snake by Robert Brewer PyData SV 2014PyData
Big Data brings with it particular challenges in any language, mostly in performance. This talk will explain how to get immediate speedups in your Python code by exploiting both timeless programming techniques and fixes specific to Python. We will cover: I. Amongst Our Weaponry 1. How to Time and Profile Python 2. Extracting Loop invariants: constants, lookup tables, even methods! 3. Caching: memoization and heavier things II Gunfight at the O.K. Corral in Morse Code 1. Python functions vs C functions 2. Vector operations: NumPy 3. Reducing calls: loops, generators, recursion III. The Semaphore Version of Wuthering Heights 1. Using select instead of Queue 2. Serialization overhead 3. Parallelizing work
The Ring programming language version 1.5 book - Part 8 of 31Mahmoud Samir Fayed
This document summarizes key classes and methods from the Ring web library (weblib.ring).
The Application class contains methods for encoding, decoding, cookies, and more. The Page class contains methods for generating common HTML elements and structures. Model classes like UsersModel manage data access and object relational mapping. Controller classes handle requests and coordinate the view and model.
Помните легендарные Java Puzzlers? Да-да, те самые, с Джошом Блохом и Нилом Гафтером? Ну, по которым ещё книжку написали? Так вот, в Groovy всё ещё веселее.
В смысле — задачки ещё более странные, и ответы ещё более поразительные. Этот доклад для вас, Groovy-разработчики, мы покажем вам настоящие, большие и красивые подводные камни! И для вас, Java-разработчики, потому что таких вещей на Java-подобном синтакисе вы точно никогда не видели! И для вас, PHP-разработчики… хотя, нет, не для вас :)
Всем точно будет весело — ваши ведущие Женя и Барух будут зажигать, шутить, спорить, бросаться футболками в публику, и самое главное — заставят вас офигевать от Groovy.
The document describes functions to create and manipulate a binary search tree data structure in C. It includes functions to create the tree by adding nodes, insert new nodes, delete nodes, and display the tree. The create function allocates memory for new nodes, initializes left and right pointers to NULL, gets input for the node data, and adds it to the tree recursively. It also asks the user if they want to add another node to build the tree.
This document discusses channels in Go and provides examples of how to use them. Channels allow goroutines to communicate by sending and receiving values. They synchronize execution by blocking if the receive operation has no sender or the send operation has no receiver. The document covers unbuffered and buffered channels, signaling with channels, coordinating goroutines, terminating workers, and using select statements. It also provides examples like a network multiplexer, dispatching requests, and an HTTP load balancer that demonstrate how to apply channels in practice.
The Ring programming language version 1.7 book - Part 48 of 196Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web library (weblib.ring). It describes classes and methods for generating HTML pages, forms, tables and other elements. This includes the Page class for adding common elements like text, headings, paragraphs etc., the Application class for handling requests, cookies and encoding, and classes representing various HTML elements like forms, inputs, images etc. It also provides an overview of how to create pages dynamically using View and Controller classes along with Model classes for database access.
This is the presentation from my talk at the Vienna Scala Usergroup on June 8th, 2017. It is about various approaches for error and failure handling in Scala.
Numerical Methods with Computer ProgrammingUtsav Patel
This document contains summaries of 9 numerical methods programs written in C++ including: Bisection Method, Regula-Falsi Method, Secant Method, Newton-Raphson Method, Gauss-Jordan Method, Gauss Elimination Method, Method of Least Squares, Euler's Method, and Runge-Kutta Method. For each method, the document provides the program code, sample output, and a brief 1-2 sentence description.
The Ring programming language version 1.5.3 book - Part 24 of 184Mahmoud Samir Fayed
The chapter discusses mathematical functions in Ring including trigonometric functions like sin, cos, and tan, logarithmic functions like log and log10, exponential functions like exp, and other functions like sqrt, ceil, floor, and random. Examples are provided to demonstrate how to use functions like sin, cos, tan, log, sqrt, and others in Ring.
2 BytesC++ course_2014_c3_ function basics¶meters and overloadingkinan keshkeh
The document discusses functions in C++. It explains that functions can be defined in two ways: with declaration/calling/definition or with just declaration and definition. It provides examples of declaring a function that calculates the average of two numbers, calling that function, and defining the function. It also discusses local and global variables and their scopes. Finally, it lists some common predefined functions in C++ like sqrt, pow, abs, and rand.
The Ring programming language version 1.7 book - Part 40 of 196Mahmoud Samir Fayed
This document summarizes Ring documentation for built-in classes including Tree, Math, DateTime, File, System, Debug, and DataType. It provides examples of using methods from each class, such as setting and printing tree nodes, calculating trigonometric functions with Math, getting date/time with DateTime, reading and writing files with File, and executing system commands with System. Descriptions of each class's methods are included to explain their functions.
The Ring programming language version 1.3 book - Part 27 of 88Mahmoud Samir Fayed
This document summarizes classes for data structures and mathematical/time functions in the Ring programming language. It describes the methods and usage of classes for stacks, queues, hash tables, trees, math, and date/time. Examples are provided to demonstrate initializing and using instances of these classes to perform operations like adding/removing elements, retrieving values, and calculating values.
The Ring programming language version 1.5.3 book - Part 36 of 184Mahmoud Samir Fayed
This document summarizes the File Class in Ring, which provides methods for reading, writing, modifying, and checking files. The File Class allows you to read and write file contents, get directory listings, rename and delete files, open/close files, seek to positions in files, and check if files exist. Example code is provided to demonstrate using methods like read(), write(), dir(), rename(), remove(), open(), close(), seek(), tell(), and exists().
The Ring programming language version 1.10 book - Part 46 of 212Mahmoud Samir Fayed
This document provides summaries of various classes in the Ring programming language including the Queue, HashTable, Tree, Math, DateTime, File, and System classes. For each class, it lists key methods and provides examples of how to use the methods by creating objects of the classes and calling their methods. It demonstrates adding, removing, and printing items from queues; adding, retrieving, and checking items in hashtables; setting values and adding children to tree nodes; and using math, date/time, file I/O, and system methods.
The Ring programming language version 1.3 book - Part 50 of 88Mahmoud Samir Fayed
This document describes a simple notepad application created using RingQt. The application contains buttons for common editing functions like new, open, save, cut, copy, paste. It allows setting the font, text color, and background color. The application initializes default values for the active file name, text/background colors, font, and contains a search feature to find and replace text.
The Ring programming language version 1.5.3 book - Part 77 of 184Mahmoud Samir Fayed
The document describes a simple notepad application developed using RingQt. It initializes variables to store the active file name, text and background colors, font, and other settings. It creates a main window with buttons to handle common file operations like new, open, save, cut, copy, paste. It also includes buttons to change the font and text color. The application executes a Qt event loop to handle user interface events.
The Ring programming language version 1.4 book - Part 18 of 30Mahmoud Samir Fayed
This document provides code for a simple notepad application created using the Ring programming language and Qt GUI library. The application allows users to open, edit, save, print, find/replace, and run Ring code files. It includes menus, toolbars, and buttons for common editing functions and uses classes like QTextEdit, QFile, and QPrinter. The application stores settings for the active file name, text colors, font, and handles events for opening, saving, printing and running files.
The Ring programming language version 1.10 book - Part 54 of 212Mahmoud Samir Fayed
This document describes code related to user registration and login functionality in Ring. It includes code for a registration form, login form, user registration logic, login validation, and checking if a user is logged in. Database and model classes are also shown that handle connecting to the database, querying for users, and managing user data.
The Ring programming language version 1.5.3 book - Part 44 of 184Mahmoud Samir Fayed
This document provides code examples for classes used in a web application framework in Ring. It includes the Database, ModelBase, and ControllerBase classes which handle database connectivity and operations. It also includes an overview of the WebLib API which provides functions and classes for generating HTML pages and elements. Some key classes described are Page, Form, Table, and classes to generate specific HTML elements like Div, Link, Image etc.
The document contains code snippets from a C++ program. It includes functions and methods that process services, create new rules, set IDs, and notify CRM systems. Conditionals like if/else statements and exceptions are used for validation and error handling.
The Ring programming language version 1.7 book - Part 38 of 196Mahmoud Samir Fayed
This document summarizes Ring programming language functions for various tasks like checking characters, reading/writing files, math operations, date functions and more. It provides the syntax and examples for 44 functions, including functions to check if a character is special, find the factorial of a number, multiply matrices, read lines from a file, and make directories.
The Ring programming language version 1.6 book - Part 26 of 189Mahmoud Samir Fayed
This document provides documentation on mathematical functions available in the Ring programming language. It lists functions for trigonometric, hyperbolic, exponential, logarithmic, rounding and random number generation. Examples are given showing how to use functions like sin(), cos(), tan(), exp(), log(), ceil(), floor(), sqrt(), and random(). Conversions between radians and degrees are demonstrated for trigonometric functions.
Crushing the Head of the Snake by Robert Brewer PyData SV 2014PyData
Big Data brings with it particular challenges in any language, mostly in performance. This talk will explain how to get immediate speedups in your Python code by exploiting both timeless programming techniques and fixes specific to Python. We will cover: I. Amongst Our Weaponry 1. How to Time and Profile Python 2. Extracting Loop invariants: constants, lookup tables, even methods! 3. Caching: memoization and heavier things II Gunfight at the O.K. Corral in Morse Code 1. Python functions vs C functions 2. Vector operations: NumPy 3. Reducing calls: loops, generators, recursion III. The Semaphore Version of Wuthering Heights 1. Using select instead of Queue 2. Serialization overhead 3. Parallelizing work
The Ring programming language version 1.5 book - Part 8 of 31Mahmoud Samir Fayed
This document summarizes key classes and methods from the Ring web library (weblib.ring).
The Application class contains methods for encoding, decoding, cookies, and more. The Page class contains methods for generating common HTML elements and structures. Model classes like UsersModel manage data access and object relational mapping. Controller classes handle requests and coordinate the view and model.
Помните легендарные Java Puzzlers? Да-да, те самые, с Джошом Блохом и Нилом Гафтером? Ну, по которым ещё книжку написали? Так вот, в Groovy всё ещё веселее.
В смысле — задачки ещё более странные, и ответы ещё более поразительные. Этот доклад для вас, Groovy-разработчики, мы покажем вам настоящие, большие и красивые подводные камни! И для вас, Java-разработчики, потому что таких вещей на Java-подобном синтакисе вы точно никогда не видели! И для вас, PHP-разработчики… хотя, нет, не для вас :)
Всем точно будет весело — ваши ведущие Женя и Барух будут зажигать, шутить, спорить, бросаться футболками в публику, и самое главное — заставят вас офигевать от Groovy.
The document describes functions to create and manipulate a binary search tree data structure in C. It includes functions to create the tree by adding nodes, insert new nodes, delete nodes, and display the tree. The create function allocates memory for new nodes, initializes left and right pointers to NULL, gets input for the node data, and adds it to the tree recursively. It also asks the user if they want to add another node to build the tree.
This document discusses channels in Go and provides examples of how to use them. Channels allow goroutines to communicate by sending and receiving values. They synchronize execution by blocking if the receive operation has no sender or the send operation has no receiver. The document covers unbuffered and buffered channels, signaling with channels, coordinating goroutines, terminating workers, and using select statements. It also provides examples like a network multiplexer, dispatching requests, and an HTTP load balancer that demonstrate how to apply channels in practice.
The Ring programming language version 1.7 book - Part 48 of 196Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web library (weblib.ring). It describes classes and methods for generating HTML pages, forms, tables and other elements. This includes the Page class for adding common elements like text, headings, paragraphs etc., the Application class for handling requests, cookies and encoding, and classes representing various HTML elements like forms, inputs, images etc. It also provides an overview of how to create pages dynamically using View and Controller classes along with Model classes for database access.
This is the presentation from my talk at the Vienna Scala Usergroup on June 8th, 2017. It is about various approaches for error and failure handling in Scala.
Numerical Methods with Computer ProgrammingUtsav Patel
This document contains summaries of 9 numerical methods programs written in C++ including: Bisection Method, Regula-Falsi Method, Secant Method, Newton-Raphson Method, Gauss-Jordan Method, Gauss Elimination Method, Method of Least Squares, Euler's Method, and Runge-Kutta Method. For each method, the document provides the program code, sample output, and a brief 1-2 sentence description.
The Ring programming language version 1.5.3 book - Part 24 of 184Mahmoud Samir Fayed
The chapter discusses mathematical functions in Ring including trigonometric functions like sin, cos, and tan, logarithmic functions like log and log10, exponential functions like exp, and other functions like sqrt, ceil, floor, and random. Examples are provided to demonstrate how to use functions like sin, cos, tan, log, sqrt, and others in Ring.
2 BytesC++ course_2014_c3_ function basics¶meters and overloadingkinan keshkeh
The document discusses functions in C++. It explains that functions can be defined in two ways: with declaration/calling/definition or with just declaration and definition. It provides examples of declaring a function that calculates the average of two numbers, calling that function, and defining the function. It also discusses local and global variables and their scopes. Finally, it lists some common predefined functions in C++ like sqrt, pow, abs, and rand.
The Ring programming language version 1.7 book - Part 40 of 196Mahmoud Samir Fayed
This document summarizes Ring documentation for built-in classes including Tree, Math, DateTime, File, System, Debug, and DataType. It provides examples of using methods from each class, such as setting and printing tree nodes, calculating trigonometric functions with Math, getting date/time with DateTime, reading and writing files with File, and executing system commands with System. Descriptions of each class's methods are included to explain their functions.
The Ring programming language version 1.3 book - Part 27 of 88Mahmoud Samir Fayed
This document summarizes classes for data structures and mathematical/time functions in the Ring programming language. It describes the methods and usage of classes for stacks, queues, hash tables, trees, math, and date/time. Examples are provided to demonstrate initializing and using instances of these classes to perform operations like adding/removing elements, retrieving values, and calculating values.
The Ring programming language version 1.5.3 book - Part 36 of 184Mahmoud Samir Fayed
This document summarizes the File Class in Ring, which provides methods for reading, writing, modifying, and checking files. The File Class allows you to read and write file contents, get directory listings, rename and delete files, open/close files, seek to positions in files, and check if files exist. Example code is provided to demonstrate using methods like read(), write(), dir(), rename(), remove(), open(), close(), seek(), tell(), and exists().
The Ring programming language version 1.10 book - Part 33 of 212Mahmoud Samir Fayed
This document provides documentation on file handling functions in the Ring programming language. It describes functions for reading and writing files, such as Read(), Write(), Dir(), Rename(), Remove(), fopen(), fclose(), as well as functions for file positioning and input/output such as fseek(), ftell(), rewind(). Examples are provided to demonstrate usage of these functions for reading file contents, writing strings to files, getting directory listings, and copying files. Mathematical functions are also briefly covered, along with functions for random number generation and working with unsigned numbers.
The Ring programming language version 1.2 book - Part 26 of 84Mahmoud Samir Fayed
This document describes how to create objects inside lists in Ring and manipulate them. Some key points:
- Objects can be created directly inside a list during list definition. Lists can also be appended to with the + operator or Add() function.
- Objects inside lists can be accessed and modified using typical list indexing and object property syntax.
- Custom classes like 'point' are used to define the structure of objects created inside lists.
- Examples demonstrate creating a list of point objects, adding more objects to the list, and accessing/modifying properties of specific objects in the list.
This allows Ring programs to use nested data structures like lists of objects to enable a more declarative programming style on top
The Ring programming language version 1.2 book - Part 25 of 84Mahmoud Samir Fayed
This document provides summaries of various Ring classes including List, Stack, Queue, HashTable, Tree, Math, and DateTime. It includes documentation on their methods and example usages. For each class, it gives the class name, parent class if applicable, describes key methods, and provides sample code and output. This serves as a reference for how to use Ring's main data structures and utility classes.
The Ring programming language version 1.5.4 book - Part 36 of 185Mahmoud Samir Fayed
This document provides documentation on Ring programming language classes and methods, including List, Stack, Queue, HashTable, Tree, Math, and DateTime classes. It describes the purpose and usage of each class and its methods, and provides examples of how to use the classes and methods.
The Ring programming language version 1.5.2 book - Part 24 of 181Mahmoud Samir Fayed
This document provides information and examples on file handling functions in the Ring programming language. It discusses functions for reading and writing files, getting directory listings, renaming and deleting files, opening and closing files, seeking within files, checking for errors, reading/writing parts of files, and determining file sizes in numbers and bytes. Examples are provided for many of the functions to demonstrate their usage.
The Ring programming language version 1.5.1 book - Part 23 of 180Mahmoud Samir Fayed
This document provides an overview of mathematical and file handling functions available in the Ring programming language. In the mathematical functions section, it lists common functions like sin(), cos(), tan(), log(), sqrt(), and random(). Examples are provided to demonstrate their usage. The files section describes functions for reading, writing, getting directory listings, renaming, deleting files as well as lower level file handling functions. Specific functions covered include Read(), Write(), Dir(), fopen(), fclose(), fseek(), ftell(), and others.
The Ring programming language version 1.4 book - Part 10 of 30Mahmoud Samir Fayed
This document provides documentation on Ring programming language classes and methods. It summarizes key data structures like List, Stack, Queue, HashTable and Tree. It also covers numeric and date/time utility classes like Math and DateTime. Example code is provided to demonstrate the usage of each class and method.
The Ring programming language version 1.5.1 book - Part 34 of 180Mahmoud Samir Fayed
The document describes various classes in the Ring standard library (stdlib) including the StdBase, String, List, Stack, Queue, HashTable, Tree, and Math classes. It provides details on their attributes and methods, and includes examples of using each class.
The Ring programming language version 1.5.2 book - Part 35 of 181Mahmoud Samir Fayed
This document summarizes the key classes and methods in the Ring programming language documentation. It describes classes for strings, lists, stacks, queues, hash tables, trees and math functions. For each class it lists parent classes and example methods with brief descriptions of functionality. An example usage section demonstrates the methods on various classes.
The Ring programming language version 1.6 book - Part 38 of 189Mahmoud Samir Fayed
This document summarizes the key classes in the Ring programming language including the String, List, Stack, Queue, HashTable, Tree, and Math classes. For each class, it provides an overview of the parent class and core methods, followed by examples of using each method on instances of the classes. It demonstrates initializing class instances, accessing and modifying values, and performing common operations like adding/removing items, sorting, and mathematical functions.
The Ring programming language version 1.5.2 book - Part 36 of 181Mahmoud Samir Fayed
This document provides documentation on Ring's standard library classes including Math, DateTime, File, System, Debug, DataType, Conversion, ODBC, MySQL, and SQLite classes. It lists the key methods of each class and provides examples of their usage and output. Various mathematical, date/time, file handling, system information, debugging, data type checking, conversion, and database related functions are demonstrated.
The Ring programming language version 1.5.4 book - Part 37 of 185Mahmoud Samir Fayed
This document provides documentation on Ring classes for file handling, system functions, debugging, data types, conversions, ODBC, MySQL, and SQLite. For each class, it lists relevant methods and provides a brief description and example code demonstrating usage. It describes methods for reading, writing, renaming, and deleting files, executing system commands, raising exceptions, testing data types, converting between data types, connecting to and querying databases, and more. Examples show how to use each class and its methods to perform common tasks for file, system, and database operations in Ring.
The Ring programming language version 1.7 book - Part 28 of 196Mahmoud Samir Fayed
This document provides information about file handling functions in Ring programming language. It describes functions for reading and writing files, like Read(), Write(), as well as functions for getting directory listings (Dir()), renaming files (Rename()), deleting files (Remove()), opening/closing files (fopen(), fclose()), seeking within files (fseek(), ftell()), and reading/writing from file streams (fread(), fwrite()). Examples are given to demonstrate the basic usage of these functions for common file operations like copying files, getting directory listings, and reading/writing data from files.
The Ring programming language version 1.3 book - Part 28 of 88Mahmoud Samir Fayed
This document provides documentation for various classes and methods in the Ring programming language. It describes classes for system operations, debugging, data types, conversions, databases, security, and internet access. For each class, it lists the available methods and provides examples of how to use the methods.
The Ring programming language version 1.10 book - Part 47 of 212Mahmoud Samir Fayed
This document summarizes the methods available in various Ring classes for data types, conversions, databases, security, and internet functions. It provides examples of using each class and the output. The DataType class allows checking value types and properties. The Conversion class converts between data types. Database classes like ODBC, MySQL, SQLite and PostgreSQL provide methods for connecting to databases and executing queries. The Security class implements hashing and encryption algorithms. The Internet class allows downloading files and sending emails.
The Ring programming language version 1.2 book - Part 24 of 84Mahmoud Samir Fayed
The document describes various functions available in the Ring standard library (stdlib.ring). It provides 37 functions organized into categories like math functions, string functions, date functions, etc. Each function includes its syntax, description and an example of its usage. Some key functions described are: evenorodd() to check if a number is even or odd, factors() to compute factors of a number, matrixmulti() to multiply matrices, and dayofweek() to get the day of the week from a date.
The Ring programming language version 1.9 book - Part 31 of 210Mahmoud Samir Fayed
This document provides documentation on mathematical functions available in the Ring programming language. It lists common trigonometric, logarithmic, exponential and other mathematical functions along with examples of their usage syntax and output. Key functions covered include sin(), cos(), tan(), log(), exp(), sqrt(), random(), ceil(), floor(), and others. Examples are provided to demonstrate calculating trigonometric functions with radians and degrees as well as functions returning random numbers, absolute values, powers and more.
Similar to The Ring programming language version 1.8 book - Part 42 of 202 (20)
The Ring programming language version 1.10 book - Part 212 of 212Mahmoud Samir Fayed
This document summarizes new features and changes in different versions of the Ring programming language and library. It discusses various topics including using different syntax styles and code editors, developing graphical desktop and mobile applications using RingQt, and using Ring for 3D graphics and games development. The document also provides overviews of the core Ring libraries and language features.
The Ring programming language version 1.10 book - Part 211 of 212Mahmoud Samir Fayed
This document provides documentation for the Ring programming language and various Ring extensions and libraries. It includes sections on Ring mode for Emacs editor, the Ring Notepad IDE, the Ring Package Manager (RingPM), embedding Ring code in C/C++ programs, and references for the functions and classes of various Ring extensions for areas like 2D/3D graphics, networking, multimedia and more.
The Ring programming language version 1.10 book - Part 210 of 212Mahmoud Samir Fayed
This document contains summaries of various Ring classes, functions and concepts:
- It describes Ring classes like the Map, Math, MySQL, and PostgreSQL classes.
- It lists and briefly explains Ring standard library functions such as map(), random(), newlist(), and print().
- It covers Ring concepts and features like object oriented programming, operators, files and I/O, GUI programming, and web development.
The Ring programming language version 1.10 book - Part 208 of 212Mahmoud Samir Fayed
This document provides a summary of functions in the Ring documentation for Release 1.10. It lists functions for drawing quadrics, normals, orientation, and textures. It also lists functions for scaling images, drawing spheres, starting and ending contours and polygons for tessellation, setting tessellation normals and properties, adding tessellation vertices, and unprojecting coordinates. The document also provides resources for the Ring language like the website, source code repository, contact information, and lists Arabic language resources.
The Ring programming language version 1.10 book - Part 207 of 212Mahmoud Samir Fayed
This document contains listings of over 100 OpenGL functions related to lighting, materials, textures, and rendering. The functions listed specify parameters for lights, materials, texture coordinates, and rendering operations like clearing buffers and drawing primitives.
The Ring programming language version 1.10 book - Part 205 of 212Mahmoud Samir Fayed
This document lists numerous OpenGL constants and enumerations related to textures, blending, shaders, buffers, and other graphics features. It includes constants for texture types and formats, shader variable types, buffer bindings and usages, and more. The listing contains over 200 individual constants and enumerations without descriptions.
The Ring programming language version 1.10 book - Part 206 of 212Mahmoud Samir Fayed
The document lists OpenGL functions and constants added in version 1.10 of the OpenGL specification. It includes over 100 functions and constants for features such as unsigned integer textures, texture buffers, geometry shaders, transform feedback, and more robust context handling.
The Ring programming language version 1.10 book - Part 203 of 212Mahmoud Samir Fayed
The document contains a list of functions and constants related to OpenGL graphics functionality. It includes functions for vertex specification, texture mapping, tessellation, nurbs modeling, quadric surfaces, and more. It also includes constants for OpenGL states, modes, and error codes.
The Ring programming language version 1.10 book - Part 202 of 212Mahmoud Samir Fayed
The document lists over 100 OpenGL functions for querying and retrieving information about OpenGL objects, state, and errors. Some of the functions listed include glGetError() to retrieve OpenGL error codes, glGetUniformLocation() to retrieve the location of a uniform variable in a program, and glGetString() to retrieve version and extension information.
The Ring programming language version 1.10 book - Part 201 of 212Mahmoud Samir Fayed
The document lists various OpenGL constants and functions related to OpenGL graphics functionality. It includes constants for texture and color formats, clipping planes, buffer objects, shader operations, and more. It also lists over 100 OpenGL function declarations for operations like drawing, clearing, texture handling, blending, and shader manipulation.
The Ring programming language version 1.10 book - Part 200 of 212Mahmoud Samir Fayed
This document lists numerous OpenGL constants related to graphics hardware capabilities, state variables, and functions. It includes constants for vertex arrays, texture mapping, blending, multisampling, shader types, and more. The constants are used to query and set the state and capabilities of the OpenGL graphics processing context.
The Ring programming language version 1.10 book - Part 199 of 212Mahmoud Samir Fayed
The document lists over 200 OpenGL constants related to graphics rendering features such as fog, depth testing, blending, textures, and more. It provides the names of constants for configuring various graphics pipeline states and settings in OpenGL.
The Ring programming language version 1.10 book - Part 198 of 212Mahmoud Samir Fayed
The document contains listings of over 100 OpenGL and GLU function declarations related to texture coordinates, uniforms, vertex specification, and tessellation. It provides the function name, return type if any, and parameters for each function for specifying texture coordinates, uniforms, vertices and performing tessellation in OpenGL and GLU.
The Ring programming language version 1.10 book - Part 197 of 212Mahmoud Samir Fayed
The document contains documentation for over 100 OpenGL functions related to rendering, textures, shaders, and more. It lists each function name and its parameters. The functions allow specifying colors, textures, shader programs, and various rendering states and operations in OpenGL.
The Ring programming language version 1.10 book - Part 196 of 212Mahmoud Samir Fayed
This document lists OpenGL constants and functions related to graphics rendering. It includes constants for buffer types, shader data types, texture types, and more. It also lists function prototypes for common OpenGL operations like drawing, clearing, binding textures and buffers, and setting shader uniforms.
The Ring programming language version 1.10 book - Part 195 of 212Mahmoud Samir Fayed
The document lists over 200 OpenGL constants related to textures, vertex arrays, blending, and buffer objects. It provides reference documentation for OpenGL version 1.10 including constants for texture formats and parameters, vertex attribute types, blending functions, and buffer usage flags.
The Ring programming language version 1.10 book - Part 194 of 212Mahmoud Samir Fayed
The document lists various constants used in OpenGL such as GL_FOG_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM, and others related to OpenGL rendering, blending, textures, lighting, and more. It provides definitions for OpenGL enums and related values.
The Ring programming language version 1.10 book - Part 193 of 212Mahmoud Samir Fayed
This document lists over 100 OpenGL functions for specifying textures, lighting, shaders, and other graphics operations. The functions include glMultiTexCoord2iv() for specifying texture coordinates, glNormal3f() for specifying normals, and glUniform1f() for specifying shader uniforms.
The Ring programming language version 1.10 book - Part 192 of 212Mahmoud Samir Fayed
This document lists OpenGL functions and constants that were added or changed in OpenGL version 1.10. It includes over 150 new OpenGL constants for features such as geometry shaders, transform feedback, cube map arrays, and more. It also lists over 80 OpenGL functions, providing their parameters and types.
Boost Your Savings with These Money Management AppsJhone kinadey
A money management app can transform your financial life by tracking expenses, creating budgets, and setting financial goals. These apps offer features like real-time expense tracking, bill reminders, and personalized insights to help you save and manage money effectively. With a user-friendly interface, they simplify financial planning, making it easier to stay on top of your finances and achieve long-term financial stability.
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio, Inc.
Alluxio Webinar
June. 18, 2024
For more Alluxio Events: https://www.alluxio.io/events/
Speaker:
- Jianjian Xie (Staff Software Engineer, Alluxio)
As Trino users increasingly rely on cloud object storage for retrieving data, speed and cloud cost have become major challenges. The separation of compute and storage creates latency challenges when querying datasets; scanning data between storage and compute tiers becomes I/O bound. On the other hand, cloud API costs related to GET/LIST operations and cross-region data transfer add up quickly.
The newly introduced Trino file system cache by Alluxio aims to overcome the above challenges. In this session, Jianjian will dive into Trino data caching strategies, the latest test results, and discuss the multi-level caching architecture. This architecture makes Trino 10x faster for data lakes of any scale, from GB to EB.
What you will learn:
- Challenges relating to the speed and costs of running Trino in the cloud
- The new Trino file system cache feature overview, including the latest development status and test results
- A multi-level cache framework for maximized speed, including Trino file system cache and Alluxio distributed cache
- Real-world cases, including a large online payment firm and a top ridesharing company
- The future roadmap of Trino file system cache and Trino-Alluxio integration
Superpower Your Apache Kafka Applications Development with Complementary Open...Paul Brebner
Kafka Summit talk (Bangalore, India, May 2, 2024, https://events.bizzabo.com/573863/agenda/session/1300469 )
Many Apache Kafka use cases take advantage of Kafka’s ability to integrate multiple heterogeneous systems for stream processing and real-time machine learning scenarios. But Kafka also exists in a rich ecosystem of related but complementary stream processing technologies and tools, particularly from the open-source community. In this talk, we’ll take you on a tour of a selection of complementary tools that can make Kafka even more powerful. We’ll focus on tools for stream processing and querying, streaming machine learning, stream visibility and observation, stream meta-data, stream visualisation, stream development including testing and the use of Generative AI and LLMs, and stream performance and scalability. By the end you will have a good idea of the types of Kafka “superhero” tools that exist, which are my favourites (and what superpowers they have), and how they combine to save your Kafka applications development universe from swamploads of data stagnation monsters!
The Rising Future of CPaaS in the Middle East 2024Yara Milbes
Explore "The Rising Future of CPaaS in the Middle East in 2024" with this comprehensive PPT presentation. Discover how Communication Platforms as a Service (CPaaS) is transforming communication across various sectors in the Middle East.
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
How GenAI Can Improve Supplier Performance Management.pdfZycus
Data Collection and Analysis with GenAI enables organizations to gather, analyze, and visualize vast amounts of supplier data, identifying key performance indicators and trends. Predictive analytics forecast future supplier performance, mitigating risks and seizing opportunities. Supplier segmentation allows for tailored management strategies, optimizing resource allocation. Automated scorecards and reporting provide real-time insights, enhancing transparency and tracking progress. Collaboration is fostered through GenAI-powered platforms, driving continuous improvement. NLP analyzes unstructured feedback, uncovering deeper insights into supplier relationships. Simulation and scenario planning tools anticipate supply chain disruptions, supporting informed decision-making. Integration with existing systems enhances data accuracy and consistency. McKinsey estimates GenAI could deliver $2.6 trillion to $4.4 trillion in economic benefits annually across industries, revolutionizing procurement processes and delivering significant ROI.
The Role of DevOps in Digital Transformation.pdfmohitd6
DevOps plays a crucial role in driving digital transformation by fostering a collaborative culture between development and operations teams. This approach enhances the speed and efficiency of software delivery, ensuring quicker deployment of new features and updates. DevOps practices like continuous integration and continuous delivery (CI/CD) streamline workflows, reduce manual errors, and increase the overall reliability of software systems. By leveraging automation and monitoring tools, organizations can improve system stability, enhance customer experiences, and maintain a competitive edge. Ultimately, DevOps is pivotal in enabling businesses to innovate rapidly, respond to market changes, and achieve their digital transformation goals.
Nashik's top web development company, Upturn India Technologies, crafts innovative digital solutions for your success. Partner with us and achieve your goals
Enhanced Screen Flows UI/UX using SLDS with Tom KittPeter Caitens
Join us for an engaging session led by Flow Champion, Tom Kitt. This session will dive into a technique of enhancing the user interfaces and user experiences within Screen Flows using the Salesforce Lightning Design System (SLDS). This technique uses Native functionality, with No Apex Code, No Custom Components and No Managed Packages required.
Building API data products on top of your real-time data infrastructureconfluent
This talk and live demonstration will examine how Confluent and Gravitee.io integrate to unlock value from streaming data through API products.
You will learn how data owners and API providers can document, secure data products on top of Confluent brokers, including schema validation, topic routing and message filtering.
You will also see how data and API consumers can discover and subscribe to products in a developer portal, as well as how they can integrate with Confluent topics through protocols like REST, Websockets, Server-sent Events and Webhooks.
Whether you want to monetize your real-time data, enable new integrations with partners, or provide self-service access to topics through various protocols, this webinar is for you!
Penify - Let AI do the Documentation, you write the Code.KrishnaveniMohan1
Penify automates the software documentation process for Git repositories. Every time a code modification is merged into "main", Penify uses a Large Language Model to generate documentation for the updated code. This automation covers multiple documentation layers, including InCode Documentation, API Documentation, Architectural Documentation, and PR documentation, each designed to improve different aspects of the development process. By taking over the entire documentation process, Penify tackles the common problem of documentation becoming outdated as the code evolves.
https://www.penify.dev/
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid
IBM watsonx Code Assistant for Z, our latest Generative AI-assisted mainframe application modernization solution. Mainframe (IBM Z) application modernization is a topic that every mainframe client is addressing to various degrees today, driven largely from digital transformation. With generative AI comes the opportunity to reimagine the mainframe application modernization experience. Infusing generative AI will enable speed and trust, help de-risk, and lower total costs associated with heavy-lifting application modernization initiatives. This document provides an overview of the IBM watsonx Code Assistant for Z which uses the power of generative AI to make it easier for developers to selectively modernize COBOL business services while maintaining mainframe qualities of service.
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
Going AOT: Everything you need to know about GraalVM for Java applications
The Ring programming language version 1.8 book - Part 42 of 202
1. Ring Documentation, Release 1.8
Method Description
sin(x) Returns the sine of an angle of x radians
cos(x) Returns the cosine of an angle of x radians
tan(x) Returns the tangent of an angle of x radians
asin(x) Returns the principal value of the arc sine of x, expressed in radians
acos(x) Returns the principal value of the arc cosine of x, expressed in radians
atan(x) Returns the principal value of the arc tangent of x, expressed in radians
atan2(y,x) Returns the principal arc tangent of y/x, in the interval [-pi,+pi] radians
sinh(x) Returns the hyperbolic sine of x radians
cosh(x) Returns the hyperbolic cosine of x radians
tanh(x) Returns the hyperbolic tangent of x radians
exp(x) Returns the value of e raised to the xth power
log(x) Returns the natural logarithm of x
log10(x) Returns the common logarithm (base-10 logarithm) of x
ceil(x) Returns the smallest integer value greater than or equal to x
floor(x) Returns the largest integer value less than or equal to x
fabs(x) Returns the absolute value of x.
pow(x,y) Returns x raised to the power of y
sqrt(x) Returns the square root of x
random(x) Returns a random number in the range [0,x]
unsigned(n,n,c) Perform operation using unsigned numbers
decimals(n) Determine the decimals digits after the point in float/double numbers
example:
Load "stdlib.ring"
oMath = new Math
See "Test the Math Class Methods" + nl
See "Sin(0) = " + oMath.sin(0) + nl
See "Sin(90) radians = " + oMath.sin(90) + nl
See "Sin(90) degree = " + oMath.sin(90*3.14/180) + nl
See "Cos(0) = " + oMath.cos(0) + nl
See "Cos(90) radians = " + oMath.cos(90) + nl
See "Cos(90) degree = " +oMath. cos(90*3.14/180) + nl
See "Tan(0) = " + oMath.tan(0) + nl
See "Tan(90) radians = " + oMath.tan(90) + nl
See "Tan(90) degree = " + oMath.tan(90*3.14/180) + nl
See "asin(0) = " + oMath.asin(0) + nl
See "acos(0) = " + oMath.acos(0) + nl
See "atan(0) = " + oMath.atan(0) + nl
See "atan2(1,1) = " +oMath. atan2(1,1) + nl
See "sinh(0) = " + oMath.sinh(0) + nl
See "sinh(1) = " + oMath.sinh(1) + nl
See "cosh(0) = " + oMath.cosh(0) + nl
See "cosh(1) = " + oMath.cosh(1) + nl
See "tanh(0) = " + oMath.tanh(0) + nl
See "tanh(1) = " + oMath.tanh(1) + nl
See "exp(0) = " + oMath.exp(0) + nl
See "exp(1) = " + oMath.exp(1) + nl
See "log(1) = " + oMath.log(1) + nl
46.8. Math Class 381
2. Ring Documentation, Release 1.8
See "log(2) = " + oMath.log(2) + nl
See "log10(1) = " + oMath.log10(1) + nl
See "log10(2) = " + oMath.log10(2) + nl
See "log10(10) = " + oMath.log10(10) + nl
See "Ceil(1.12) = " + oMath.Ceil(1.12) + nl
See "Ceil(1.72) = " + oMath.Ceil(1.72) + nl
See "Floor(1.12) = " + oMath.floor(1.12) + nl
See "Floor(1.72) = " + oMath.floor(1.72) + nl
See "fabs(1.12) = " + oMath.fabs(1.12) + nl
See "fabs(1.72) = " + oMath.fabs(1.72) + nl
See "pow(2,3) = " + oMath.pow(2,3) + nl
see "sqrt(16) = " + oMath.sqrt(16) + nl
for x = 1 to 20
see "Random number Max (100) : " + oMath.random(100) + nl
next
x = 1.1234567890123
for d = 0 to 14
oMath.decimals(d)
see x + nl
next
cKey = "hello"
h = 0
for x in cKey
h = oMath.unsigned(h,ascii(x),"+")
h = oMath.unsigned(h,oMath.unsigned(h,10,"<<"),"+")
r = oMath.unsigned(h,6,">>")
h = oMath.unsigned(h, r,"^")
next
h = oMath.unsigned(h,oMath.unsigned(h,3,"<<"),"+")
h = oMath.unsigned(h,oMath.unsigned(h,11,">>"),"^")
h = oMath.unsigned(h,oMath.unsigned(h,15,"<<"),"+")
see "Hash : " + h
output:
Test the Math Class Methods
Sin(0) = 0
Sin(90) radians = 0.89
Sin(90) degree = 1.00
Cos(0) = 1
Cos(90) radians = -0.45
Cos(90) degree = 0.00
Tan(0) = 0
Tan(90) radians = -2.00
Tan(90) degree = 1255.77
asin(0) = 0
acos(0) = 1.57
atan(0) = 0
atan2(1,1) = 0.79
46.8. Math Class 382
3. Ring Documentation, Release 1.8
sinh(0) = 0
sinh(1) = 1.18
cosh(0) = 1
cosh(1) = 1.54
tanh(0) = 0
tanh(1) = 0.76
exp(0) = 1
exp(1) = 2.72
log(1) = 0
log(2) = 0.69
log10(1) = 0
log10(2) = 0.30
log10(10) = 1
Ceil(1.12) = 2
Ceil(1.72) = 2
Floor(1.12) = 1
Floor(1.72) = 1
fabs(1.12) = 1.12
fabs(1.72) = 1.72
pow(2,3) = 8
sqrt(16) = 4
Random number Max (100) : 87
Random number Max (100) : 49
Random number Max (100) : 99
Random number Max (100) : 58
Random number Max (100) : 15
Random number Max (100) : 46
Random number Max (100) : 37
Random number Max (100) : 64
Random number Max (100) : 73
Random number Max (100) : 35
Random number Max (100) : 89
Random number Max (100) : 80
Random number Max (100) : 20
Random number Max (100) : 33
Random number Max (100) : 44
Random number Max (100) : 89
Random number Max (100) : 82
Random number Max (100) : 94
Random number Max (100) : 83
Random number Max (100) : 68
1
1.1
1.12
1.123
1.1235
1.12346
1.123457
1.1234568
1.12345679
1.123456789
1.1234567890
1.12345678901
1.123456789012
1.1234567890123
1.12345678901230
Hash : 3372029979.00000000000000
46.8. Math Class 383
4. Ring Documentation, Release 1.8
46.9 DateTime Class
Methods:
Method Description/Output
clock() The number of clock ticks from program start.
time() Get the system time.
date() Get the date.
timelist() List contains the date and the time information.
adddays(cDate,nDays) Return Date from cDate and after nDays
diffdays(cDate1,cDate2) Return the Number of days (cDate1 - cDate2)
example:
Load "stdlib.ring"
oDateTime = new datetime
See "Test the datetime Class Methods" + nl
See "Calculate performance" + nl
t1 = oDateTime.clock()
for x = 1 to 1000000 next
see oDateTime.clock() - t1 + nl
See "Time : " + oDateTime.time() + nl
See "Date : " + oDateTime.date() + nl
See oDateTime.TimeList()
See "Month Name : " + oDateTime.TimeList()[4]
cDate = oDateTime.date()
see cDate + nl
cDate = oDateTime.adddays(cDate,10)
see cDate + nl
cDate1 = oDateTime.date()
see cDate1 + nl
cDate2 = oDateTime.adddays(cDate1,10)
see cDate2 + nl
see "DiffDays = " + oDateTime.diffdays(cDate1,cDate2) + nl
see "DiffDays = " + oDateTime.diffdays(cDate2,cDate1) + nl
output:
Test the datetime Class Methods
Calculate performance
85
Time : 02:53:35
Date : 31/08/2016
Wed
Wednesday
Aug
August
08/31/16 02:53:35
31
46.9. DateTime Class 384
5. Ring Documentation, Release 1.8
02
02
244
08
53
AM
35
35
3
08/31/16
02:53:35
16
2016
Arab Standard Time
%
Month Name : August31/08/2016
10/09/2016
31/08/2016
10/09/2016
DiffDays = -10
DiffDays = 10
46.10 File Class
Methods:
46.10. File Class 385
6. Ring Documentation, Release 1.8
Method Description/Output
read(cFileName) Read the file content
write(cFileName,cStr) Write string to file
dir(cFolderPath) Get the folder contents (files & sub folders)
rename(cOld,cNew) Rename files using the Rename() function
remove(cFileName) Delete a file using the Remove() function
open(cFileName,cMode) Open a file using the Fopen() function
close() Close file
flush() Flushes the output buffer of a stream
reopen(cFileName,cMode) Open another file using the same file handle
tempfile() Creates a temp. file (binary).
seek(noffset,nwhence) Set the file position of the stream
tell() Know the current file position of a stream
rewind() Set the file position to the beginning of the file
getpos() Get handle to the current file position
setpos(poshandle) Set the current file position
clearerr() Clear the EOF error and the error indicators of a stream
eof() Test the end-of-file indicator
error() Test the error indicator
perror(cErrorMessage) Print error message to the stderr
getc() Get the next character from the stream
gets(nsize) Read new line from the stream
putc(cchar) Write a character to the stream
puts(cStr) Write a string to the stream
ungetc(cchar) Push a character to the stream
fread(nsize) Read data from a stream
fwrite(cString) Write data to a stream
exists(cFileName) Check if a file exists
example:
Load "stdlib.ring"
ofile = new file
See "Test the file Class Methods" + nl
see ofile.read(filename())
see nl
ofile.open(filename(),"r")
see ofile.gets(100) + nl
ofile.close()
46.11 System Class
Methods:
46.11. System Class 386
7. Ring Documentation, Release 1.8
Method Description/Output
system() Execute system commands
sysget() Get environment variables
ismsdos() Check if the operating system is MSDOS or not
iswindows() Check if the operating system is Windows or not
iswindows64() Check if the operating system is Windows 64bit or not
isunix() Check if the operating system is Unix or not
ismacosx() Check if the operating system is macOS or not
islinux() Check if the operating system is Linux or not
isfreebsd() Check if the operating system is FreeBSD or not
isandroid() Check if the operating system is Android or not
windowsnl() Get the windows new line string
sysargv() Get the command line arguments passed to the ring script
filename() Get the active source file
example:
Load "stdlib.ring"
oSystem = new System
See "Test the System Class Methods" + nl
oSystem.system("dir")
see oSystem.sysget("path") + nl
see oSystem.ismsdos() + nl
see oSystem.iswindows() + nl
see oSystem.iswindows64() + nl
see oSystem.isunix() + nl
see oSystem.ismacosx() + nl
see oSystem.islinux() + nl
see oSystem.isfreebsd() + nl
see oSystem.isandroid() + nl
see oSystem.windowsnl() + nl
see oSystem.sysargv() + nl
see oSystem.filename() + nl
46.12 Debug Class
Methods:
Method Description/Output
eval(cCode) Execute code during the runtime from string.
raise(cError) Raise an exception.
assert(cCondition) Test condition before executing the code.
example:
Load "stdlib.ring"
oDebug = new Debug
See "Test the Debug Class Methods" + nl
oDebug.eval("see 'Hello'+nl")
try
x = 10
oDebug.assert(x=11)
46.12. Debug Class 387
8. Ring Documentation, Release 1.8
catch see "assert" + nl done
raise("Error!")
46.13 DataType Class
Methods:
Method Description/Output
isstring(vValue) We can know if the value is a string or not.
isnumber(vValue) We can know if the value is a number or not.
islist(vValue) We can know if the value is a list or not.
type(vValue) Know the type of a value
isnull(vValue) Check the value to know if it’s null or not.
isalnum(vValue) 1 if the value is digit/letter or 0 if not
isalpha(vValue) 1 if the value is a letter or 0 if not
iscntrl(vValue) 1 if the value is a control character (no printing position)
isdigit(vValue) 1 if the value is a digit or 0 if not
isgraph(vValue) 1 if the value can be printed (Except space) or 0 if not
islower(vValue) 1 if the value is lowercase letter or 0 if not
isprint(vValue) 1 if the value occupies a printing position or 0 if not
ispunct(vValue) 1 if the value is a punctuation character or 0 if not
isspace(vValue) 1 if the value is a white-space or 0 if not
isupper(vValue) 1 if the value is an uppercase alphabetic letter or 0 if not
isxdigit(vValue) 1 if the value is a hexdecimal digit character or 0 if not
example:
Load "stdlib.ring"
oDataType = new DataType
See "Test the DataType Class Methods" + nl
see oDataType.isstring("test") + nl
see oDataType.isnumber(1) + nl
see oDataType.islist(1:3) + nl
see oDataType.type("test") + nl
see oDataType.isnull(null) + nl
see oDataType.isalnum("Hello") + nl + # print 1
oDataType.isalnum("123456") + nl + # print 1
oDataType.isalnum("ABCabc123") + nl + # print 1
oDataType.isalnum("How are you") + nl # print 0 because of spaces
see oDataType.isalpha("Hello") + nl + # print 1
oDataType.isalpha("123456") + nl + # print 0
oDataType.isalpha("ABCabc123") + nl + # print 0
oDataType.isalpha("How are you") + nl # print 0
See oDataType.iscntrl("hello") + nl + # print 0
oDataType.iscntrl(nl) # print 1
see oDataType.isdigit("0123456789") + nl + # print 1
oDataType.isdigit("0123a") + nl
see oDataType.isgraph("abcdef") + nl + # print 1
oDataType.isgraph("abc def") + nl # print 0
see oDataType.islower("abcDEF") + nl + # print 0
oDataType.islower("ghi") + nl # print 1
see oDataType.isprint("Hello") + nl + # print 1
oDataType.isprint("Nice to see you") + nl + # print 1
oDataType.isprint(nl) + nl # print 0
46.13. DataType Class 388
9. Ring Documentation, Release 1.8
see oDataType.isprint("Hello") + nl # print 1
see oDataType.isupper("welcome") + nl + # print 0
oDataType.isupper("WELCOME") + nl # print 1
see oDataType.isxdigit("0123456789abcdef") + nl + # print 1
oDataType.isxdigit("123z") # print 0
Output:
Test the DataType Class Methods
1
1
1
STRING
1
1
1
1
0
1
0
0
0
0
11
0
1
0
0
1
1
1
0
1
0
1
1
0
46.14 Conversion Class
Methods:
Method Description/Output
number(vValue) Convert strings to numbers.
string(vValue) Convert numbers to strings.
ascii(vValue) Get the ASCII code for a letter.
char(vValue) Convert the ASCII code to character.
hex(vValue) Convert decimal to hexadecimal.
dec(vValue) Convert hexadecimal to decimal.
str2hex(vValue) Convert string characters to hexadecimal characters.
hex2str(vValue) Convert hexadecimal characters to string.
example:
Load "stdlib.ring"
46.14. Conversion Class 389
10. Ring Documentation, Release 1.8
oConversion = new conversion
See "Test the conversion Class Methods" + nl
See oConversion.number("3") + 5 + nl
See oConversion.string(3) + "5" + nl
See oConversion.Ascii("m") + nl
See oConversion.char(77) + nl
see oConversion.hex(162) + nl
see oConversion.dec("a2") + nl
cHex = oConversion.str2hex("Hello")
see cHex + nl
see oConversion.hex2str(cHex) + nl
Output:
Test the conversion Class Methods
8
35
109
M
a2
162
48656c6c6f
Hello
46.15 ODBC Class
Methods:
Method Description/Output
drivers() Get a list of ODBC drivers.
datasources() Get a list of ODBC data sources.
close() Free resources.
connect(cConString) Connect to the database.
disconnect() Close the connection.
execute(cSQL) Execute SQL Statements
colcount() Get columns count in the query result
fetch() Fetch a row from the query result
getdata(nCol) Get column value from the fetched row
tables() Get a list of tables inside the database
columns(cTableName) Get a list of columns inside the table
autocommit(lStatus) Enable or disable the auto commit feature
commit() Commit updates to the database
rollback() Rollback updates to the database
example:
Load "stdlib.ring"
oodbc = new odbc
See "Test the odbc Class Methods" + nl
oODBC {
see drivers()
see datasources()
See "Connect to database" + nl
see connect("DBQ=test.mdb;Driver={Microsoft Access Driver (*.mdb)}") + nl
See "Select data" + nl
46.15. ODBC Class 390