This document discusses PostgreSQL functions in Ring and provides examples of how to connect to a PostgreSQL database and execute queries using the RingPostgreSQL library. It introduces functions for hashing, encryption, decryption, and making requests over the internet using the OpenSSL and internet libraries.
The Ring programming language version 1.10 book - Part 38 of 212Mahmoud Samir Fayed
The document provides information about SQLite and PostgreSQL database functions in Ring programming language. It describes functions for initializing and connecting to databases, executing SQL statements, and retrieving and manipulating result sets. Examples are given showing how to create, insert, and select data from database tables using these functions.
The Ring programming language version 1.5.4 book - Part 69 of 185Mahmoud Samir Fayed
This document describes a simple cards game application developed using RingQt. Each player is dealt 5 cards face down. Players take turns clicking cards to reveal them. If a card matches another visible card or is a 5, the player earns points and "eats" the matching cards. The first player to earn more points than their opponent wins. The application initializes card data, displays buttons for each card, and handles click events to reveal cards and check for matches and winners. Functions are used to delay actions, update scores and buttons, and start a new game once all cards are revealed.
The Ring programming language version 1.5.1 book - Part 65 of 180Mahmoud Samir Fayed
This document describes a cards game application developed using the Ring programming language and Qt GUI library. The application deals 5 cards to each of two players. When a player clicks on a card, it is revealed. If the card matches another revealed card, the player scores a point for each matching card. If the card is a "5", the player scores for all revealed cards. The application tracks each player's score, handles clicking cards to reveal them, and checks for matches or a "5" to score points. It also includes functionality to start a new game and close the application.
The Ring programming language version 1.6 book - Part 71 of 189Mahmoud Samir Fayed
This document describes a cards game developed using the Ring programming language and Qt GUI library. The game has two players who take turns flipping over cards from a deck to try and match cards or get a "5" card to earn points. The application initializes a deck of cards, displays the cards face down for each player, and includes functions for players to click cards to flip them over. It tracks the game state, scores, and allows starting a new game. Key aspects include initializing the deck randomly, checking for matches or "5" cards when clicked, and updating the game state and scores accordingly.
This document contains AutoLISP functions for analyzing and extracting data from 2D and 3D objects in AutoCAD. It includes functions to calculate distances between 2D points, extract coordinate data and write it to a file, analyze spline curves on polylines and write curve data like radii, angles and lengths to a file. The functions prompt the user for input like selecting objects or points and allow controlling snapping options.
The Ring programming language version 1.6 book - Part 28 of 189Mahmoud Samir Fayed
The document describes various functions for working with files, streams, and system operations in Ring including: Perror(), Fgetc(), Fgets(), Fputc(), Fputs(), Ungetc(), Fread(), Fwrite(), Fexists(), Int2Bytes(), Float2Bytes(), Double2Bytes(), Bytes2Int(), Bytes2Float(), Bytes2Double(), System(), SysGet(), IsMSDOS(), IsWindows(), IsWindows64(), IsUnix(), IsMacOSX(), IsLinux(), IsFreeBSD(), IsAndroid(), Windowsnl(), getting command line arguments, getting the active source file name, PrevFileName(), CurrentDir(), ExeFileName(), ChDir(), ExeFolder(), and Version(). An example at
The Ring programming language version 1.10 book - Part 94 of 212Mahmoud Samir Fayed
The document describes the Trace Library in Ring and how it can be used to trace program execution, debug code, and step through a program line by line. It provides examples of loading the Trace Library, tracing all events, tracing control flow between functions, and using the pass error functionality to continue execution after an error. Key functions and capabilities of the Trace Library discussed include tracing specific events, setting breakpoints, accessing trace data, and redefining see and give behavior.
The Ring programming language version 1.5.3 book - Part 93 of 184Mahmoud Samir Fayed
CURL provides functions for transferring data with URLs using various protocols like HTTP, FTP, and more. It supports options like setting URLs, headers, authentication, proxies, SSL certificates, callbacks, and more. Common functions include curl_easy_setopt to set options, curl_easy_perform to perform a request, and curl_easy_getinfo to retrieve result info.
The Ring programming language version 1.10 book - Part 38 of 212Mahmoud Samir Fayed
The document provides information about SQLite and PostgreSQL database functions in Ring programming language. It describes functions for initializing and connecting to databases, executing SQL statements, and retrieving and manipulating result sets. Examples are given showing how to create, insert, and select data from database tables using these functions.
The Ring programming language version 1.5.4 book - Part 69 of 185Mahmoud Samir Fayed
This document describes a simple cards game application developed using RingQt. Each player is dealt 5 cards face down. Players take turns clicking cards to reveal them. If a card matches another visible card or is a 5, the player earns points and "eats" the matching cards. The first player to earn more points than their opponent wins. The application initializes card data, displays buttons for each card, and handles click events to reveal cards and check for matches and winners. Functions are used to delay actions, update scores and buttons, and start a new game once all cards are revealed.
The Ring programming language version 1.5.1 book - Part 65 of 180Mahmoud Samir Fayed
This document describes a cards game application developed using the Ring programming language and Qt GUI library. The application deals 5 cards to each of two players. When a player clicks on a card, it is revealed. If the card matches another revealed card, the player scores a point for each matching card. If the card is a "5", the player scores for all revealed cards. The application tracks each player's score, handles clicking cards to reveal them, and checks for matches or a "5" to score points. It also includes functionality to start a new game and close the application.
The Ring programming language version 1.6 book - Part 71 of 189Mahmoud Samir Fayed
This document describes a cards game developed using the Ring programming language and Qt GUI library. The game has two players who take turns flipping over cards from a deck to try and match cards or get a "5" card to earn points. The application initializes a deck of cards, displays the cards face down for each player, and includes functions for players to click cards to flip them over. It tracks the game state, scores, and allows starting a new game. Key aspects include initializing the deck randomly, checking for matches or "5" cards when clicked, and updating the game state and scores accordingly.
This document contains AutoLISP functions for analyzing and extracting data from 2D and 3D objects in AutoCAD. It includes functions to calculate distances between 2D points, extract coordinate data and write it to a file, analyze spline curves on polylines and write curve data like radii, angles and lengths to a file. The functions prompt the user for input like selecting objects or points and allow controlling snapping options.
The Ring programming language version 1.6 book - Part 28 of 189Mahmoud Samir Fayed
The document describes various functions for working with files, streams, and system operations in Ring including: Perror(), Fgetc(), Fgets(), Fputc(), Fputs(), Ungetc(), Fread(), Fwrite(), Fexists(), Int2Bytes(), Float2Bytes(), Double2Bytes(), Bytes2Int(), Bytes2Float(), Bytes2Double(), System(), SysGet(), IsMSDOS(), IsWindows(), IsWindows64(), IsUnix(), IsMacOSX(), IsLinux(), IsFreeBSD(), IsAndroid(), Windowsnl(), getting command line arguments, getting the active source file name, PrevFileName(), CurrentDir(), ExeFileName(), ChDir(), ExeFolder(), and Version(). An example at
The Ring programming language version 1.10 book - Part 94 of 212Mahmoud Samir Fayed
The document describes the Trace Library in Ring and how it can be used to trace program execution, debug code, and step through a program line by line. It provides examples of loading the Trace Library, tracing all events, tracing control flow between functions, and using the pass error functionality to continue execution after an error. Key functions and capabilities of the Trace Library discussed include tracing specific events, setting breakpoints, accessing trace data, and redefining see and give behavior.
The Ring programming language version 1.5.3 book - Part 93 of 184Mahmoud Samir Fayed
CURL provides functions for transferring data with URLs using various protocols like HTTP, FTP, and more. It supports options like setting URLs, headers, authentication, proxies, SSL certificates, callbacks, and more. Common functions include curl_easy_setopt to set options, curl_easy_perform to perform a request, and curl_easy_getinfo to retrieve result info.
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.
Closures for Java and other thoughts on language evolution
The document discusses goals for language changes including simplifying programs, reducing bugs, and adapting to changing requirements like multicore processors and concurrency. It proposes adding closures to Java to help meet these goals by allowing for more concise code, avoiding repetition, and making programming with concurrency easier. Specific examples are given of how closures could help implement common patterns like try-with-resources and iteration in a more readable way while also enabling flexibility for programmers to extend the language.
The Ring programming language version 1.3 book - Part 17 of 88Mahmoud Samir Fayed
This document discusses various file handling functions in Ring including:
- Tempfile() which creates a temporary file that is deleted when closed
- Tempname() which generates a unique temporary file name
- Fseek(), Ftell(), Rewind() which set/get the file position indicator
- Fgetpos(), Fsetpos() which get/set the file position handle
- Clearerr(), Feof(), Ferror() which clear errors or check end-of-file or errors
- Perror() which prints error messages
- Functions for reading/writing characters and strings to files
- Ungetc() which pushes a character back into the stream
- Fread(), Fwrite() which read/write
The Ring programming language version 1.8 book - Part 31 of 202Mahmoud Samir Fayed
The document describes various functions for working with files, streams, and the operating system in Ring including: Perror(), Fgetc(), Fgets(), Fputc(), Fputs(), Ungetc(), Fread(), Fwrite(), Fexists(), System(), SysGet(), functions to check the operating system like IsWindows(), and functions to get file/path information like ExeFileName(). It provides syntax and examples of using each function.
This document provides examples of Python code snippets covering various topics like Python basics (print, variables, data types), conditional statements (if-else), loops (for, while), functions, object oriented programming (classes, inheritance), file handling, modules, database connectivity (MySQL, Redis), XML/HTML parsing and web scraping. It also shows code for installing and importing various third party Python libraries and modules.
The Ring programming language version 1.5.2 book - Part 25 of 181Mahmoud Samir Fayed
This document summarizes Ring documentation for system functions. It describes functions to execute system commands like System() and SystemCmd(), check the operating system with functions like IsWindows() and IsLinux(), and get environment variables and file/folder paths with SysGet(), ExeFileName(), and CurrentDir(). Examples are provided to demonstrate usage of many of these functions.
The document discusses good code practices and principles. It begins with an agenda that covers why code quality matters, object oriented principles like SOLID, code smells and heuristics for good code, and concludes with questions. Some key principles discussed include the single responsibility principle, open/closed principle, Liskov substitution principle, and interface segregation principle. Examples are given to illustrate how to apply these principles and improve code quality.
Tackling Asynchrony with Kotlin CoroutinesTech Triveni
Reactive Programming is an approach to asynchronous programming. Like every other tool, reactive programming tools like RxJava or Reactor come with their own challenges. Kotlin Coroutines alleviates many of these challenges. Kotlin Coroutines, when being designed, had the advantage of being able to explore existing code that uses reactive stream.
This talk will highlight some of these practical challenges and show how Kotlin Coroutines tackle them. The challenges that will be covered are changes in interface design, programming paradigm shift, reactive type selection, exception handling, cancellation, resource leakage, and sequential vs concurrent.
This document provides information about Jarosław Ratajski, including that he is a developer who lives in Luzern and works at CSS Insurance. It also discusses an alien pizza delivery domain model called Galakpizza that was developed using two different approaches - one using plain Java objects ("Normal") and the other using a relational database and JPA ("Other"). The domain model includes concepts like Orders, Variants, Sizes and Planets. The services implemented allow placing orders and retrieving the orders from the best planet.
The document discusses coroutines in Python. It describes how coroutines can have multiple entry points using the await keyword, and how the Python interpreter suspends and resumes coroutine execution. It also provides an example coroutine program that defines two coroutines that print messages before and after sleeping for different durations. The document then analyzes the coroutine execution using the inspect module and disassembler to illustrate how coroutine frames and the execution stack work.
This document describes an alien development of a pizza ordering and delivery system in two parallel universes. In the normal universe, the system uses plain Java objects and data structures, while in the other universe it uses a relational database with JPA annotations. Both implementations provide the same core functionality of placing orders, retrieving the best planet for orders, and counting total orders. The document includes code examples showing how the domain model, services, and implementations differ between the two parallel universes.
This document provides step-by-step instructions for cloning and building a Flappy Bird clone using Swift. It begins with setting up the project structure and basic gameplay elements like the background, ground and bird. It then adds parallax scrolling, bird animation and physics. Pipes and collision detection are implemented along with scoring. The document details many Swift concepts like classes, protocols and physics bodies to recreate the classic mobile game.
T.Yamamoto gave a presentation on July 24, 2009 in Nagoya about using Grails for web development. He mentioned that around 90% of his work involves Grails and that he is a member of JGGUG, a Japanese user group for Groovy and Grails. In the presentation, he discussed using the Acegi Plugin with Grails.
D-Talk: What's awesome about Ruby 2.x and Rails 4Jan Berdajs
The document discusses Ruby version 2.x and provides information on its features such as:
- Robustness
- Surface simplicity
- Being a fully object-oriented language
- Supporting functional programming and metaprogramming
- Having an ecosystem including RubyGems
- Potential issues around metaprogramming and speed compared to languages like Scala, Java and C
It also provides examples of Ruby code alongside similar code snippets in PHP and Python.
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.
tensorflow/keras model coding tutorial 勉強会RyoyaKatafuchi
1) The document discusses different types of deep learning models including multilayer perceptron (MLP), convolutional neural network (CNN), and recurrent neural network (RNN) models.
2) It provides code examples for building a Keras model using a functional API for an MLP model with Dense and Input layers, and a sequential API example.
3) It also shows code for building a CNN model in Keras with convolutional and max pooling layers, flatten, dense layers and model compilation details.
The Ring programming language version 1.5.4 book - Part 26 of 185Mahmoud Samir Fayed
This document discusses various file and system functions in Ring including:
- Rewind(), Fgetpos(), Fsetpos(), Clearerr(), Feof(), Ferror(), Perror(), Fgetc(), Fgets(), Fputc(), Fputs(), Ungetc(), Fread(), Fwrite(), and Fexists() functions for file handling
- System(), SystemCmd(), SysGet(), IsMSDOS(), IsWindows(), IsWindows64(), IsUnix(), IsMacOSX(), IsLinux(), IsFreeBSD(), IsAndroid(), and Windowsnl() functions for system/OS information and commands
- Examples of getting command line arguments, active source file name, and previous source file name
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 document shows an example Java class called HelloWorld that contains a greeting method to return the string "Hello" plus a name. It then demonstrates initializing an instance of the class, setting the name, and calling the greet method to print the greeting. The document also shows how this example is translated to use Groovy instead of Java.
The Ring programming language version 1.7 book - Part 7 of 196Mahmoud Samir Fayed
The Ring 1.7 release includes several new features and improvements:
1. A new "Load Package" command allows loading Ring libraries into separate namespaces to avoid conflicts.
2. New ringvm_see() and ringvm_give() functions allow redefining the behavior of the See and Give commands.
3. New ring_state_new() and ring_state_mainfile() functions enable running Ring programs from other Ring programs while controlling state deletion.
4. The Trace library debugger now includes a "callstack" command, and Ring Notepad, RingQt, and other tools received updates and enhancements.
This document provides an introduction to the Go programming language. It discusses why Go was created, its key features like performance, concurrency and productivity. It provides examples of basic Go programs and explains basic language concepts like types, functions, interfaces and methods. The document also discusses the history and creators of the Go language.
PostgreSQL provides several data types for storing different kinds of data. It supports standard SQL data types like integers, floats, characters, and timestamps. It also provides range, network, geometric, and JSON data types. PostgreSQL allows arrays, composite types, and domains to define constraints on columns. Additional types like hstore and XML are provided by extensions. Indexes can be created on columns and expressions to improve query performance. Tables can be partitioned using table inheritance.
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.
Closures for Java and other thoughts on language evolution
The document discusses goals for language changes including simplifying programs, reducing bugs, and adapting to changing requirements like multicore processors and concurrency. It proposes adding closures to Java to help meet these goals by allowing for more concise code, avoiding repetition, and making programming with concurrency easier. Specific examples are given of how closures could help implement common patterns like try-with-resources and iteration in a more readable way while also enabling flexibility for programmers to extend the language.
The Ring programming language version 1.3 book - Part 17 of 88Mahmoud Samir Fayed
This document discusses various file handling functions in Ring including:
- Tempfile() which creates a temporary file that is deleted when closed
- Tempname() which generates a unique temporary file name
- Fseek(), Ftell(), Rewind() which set/get the file position indicator
- Fgetpos(), Fsetpos() which get/set the file position handle
- Clearerr(), Feof(), Ferror() which clear errors or check end-of-file or errors
- Perror() which prints error messages
- Functions for reading/writing characters and strings to files
- Ungetc() which pushes a character back into the stream
- Fread(), Fwrite() which read/write
The Ring programming language version 1.8 book - Part 31 of 202Mahmoud Samir Fayed
The document describes various functions for working with files, streams, and the operating system in Ring including: Perror(), Fgetc(), Fgets(), Fputc(), Fputs(), Ungetc(), Fread(), Fwrite(), Fexists(), System(), SysGet(), functions to check the operating system like IsWindows(), and functions to get file/path information like ExeFileName(). It provides syntax and examples of using each function.
This document provides examples of Python code snippets covering various topics like Python basics (print, variables, data types), conditional statements (if-else), loops (for, while), functions, object oriented programming (classes, inheritance), file handling, modules, database connectivity (MySQL, Redis), XML/HTML parsing and web scraping. It also shows code for installing and importing various third party Python libraries and modules.
The Ring programming language version 1.5.2 book - Part 25 of 181Mahmoud Samir Fayed
This document summarizes Ring documentation for system functions. It describes functions to execute system commands like System() and SystemCmd(), check the operating system with functions like IsWindows() and IsLinux(), and get environment variables and file/folder paths with SysGet(), ExeFileName(), and CurrentDir(). Examples are provided to demonstrate usage of many of these functions.
The document discusses good code practices and principles. It begins with an agenda that covers why code quality matters, object oriented principles like SOLID, code smells and heuristics for good code, and concludes with questions. Some key principles discussed include the single responsibility principle, open/closed principle, Liskov substitution principle, and interface segregation principle. Examples are given to illustrate how to apply these principles and improve code quality.
Tackling Asynchrony with Kotlin CoroutinesTech Triveni
Reactive Programming is an approach to asynchronous programming. Like every other tool, reactive programming tools like RxJava or Reactor come with their own challenges. Kotlin Coroutines alleviates many of these challenges. Kotlin Coroutines, when being designed, had the advantage of being able to explore existing code that uses reactive stream.
This talk will highlight some of these practical challenges and show how Kotlin Coroutines tackle them. The challenges that will be covered are changes in interface design, programming paradigm shift, reactive type selection, exception handling, cancellation, resource leakage, and sequential vs concurrent.
This document provides information about Jarosław Ratajski, including that he is a developer who lives in Luzern and works at CSS Insurance. It also discusses an alien pizza delivery domain model called Galakpizza that was developed using two different approaches - one using plain Java objects ("Normal") and the other using a relational database and JPA ("Other"). The domain model includes concepts like Orders, Variants, Sizes and Planets. The services implemented allow placing orders and retrieving the orders from the best planet.
The document discusses coroutines in Python. It describes how coroutines can have multiple entry points using the await keyword, and how the Python interpreter suspends and resumes coroutine execution. It also provides an example coroutine program that defines two coroutines that print messages before and after sleeping for different durations. The document then analyzes the coroutine execution using the inspect module and disassembler to illustrate how coroutine frames and the execution stack work.
This document describes an alien development of a pizza ordering and delivery system in two parallel universes. In the normal universe, the system uses plain Java objects and data structures, while in the other universe it uses a relational database with JPA annotations. Both implementations provide the same core functionality of placing orders, retrieving the best planet for orders, and counting total orders. The document includes code examples showing how the domain model, services, and implementations differ between the two parallel universes.
This document provides step-by-step instructions for cloning and building a Flappy Bird clone using Swift. It begins with setting up the project structure and basic gameplay elements like the background, ground and bird. It then adds parallax scrolling, bird animation and physics. Pipes and collision detection are implemented along with scoring. The document details many Swift concepts like classes, protocols and physics bodies to recreate the classic mobile game.
T.Yamamoto gave a presentation on July 24, 2009 in Nagoya about using Grails for web development. He mentioned that around 90% of his work involves Grails and that he is a member of JGGUG, a Japanese user group for Groovy and Grails. In the presentation, he discussed using the Acegi Plugin with Grails.
D-Talk: What's awesome about Ruby 2.x and Rails 4Jan Berdajs
The document discusses Ruby version 2.x and provides information on its features such as:
- Robustness
- Surface simplicity
- Being a fully object-oriented language
- Supporting functional programming and metaprogramming
- Having an ecosystem including RubyGems
- Potential issues around metaprogramming and speed compared to languages like Scala, Java and C
It also provides examples of Ruby code alongside similar code snippets in PHP and Python.
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.
tensorflow/keras model coding tutorial 勉強会RyoyaKatafuchi
1) The document discusses different types of deep learning models including multilayer perceptron (MLP), convolutional neural network (CNN), and recurrent neural network (RNN) models.
2) It provides code examples for building a Keras model using a functional API for an MLP model with Dense and Input layers, and a sequential API example.
3) It also shows code for building a CNN model in Keras with convolutional and max pooling layers, flatten, dense layers and model compilation details.
The Ring programming language version 1.5.4 book - Part 26 of 185Mahmoud Samir Fayed
This document discusses various file and system functions in Ring including:
- Rewind(), Fgetpos(), Fsetpos(), Clearerr(), Feof(), Ferror(), Perror(), Fgetc(), Fgets(), Fputc(), Fputs(), Ungetc(), Fread(), Fwrite(), and Fexists() functions for file handling
- System(), SystemCmd(), SysGet(), IsMSDOS(), IsWindows(), IsWindows64(), IsUnix(), IsMacOSX(), IsLinux(), IsFreeBSD(), IsAndroid(), and Windowsnl() functions for system/OS information and commands
- Examples of getting command line arguments, active source file name, and previous source file name
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 document shows an example Java class called HelloWorld that contains a greeting method to return the string "Hello" plus a name. It then demonstrates initializing an instance of the class, setting the name, and calling the greet method to print the greeting. The document also shows how this example is translated to use Groovy instead of Java.
The Ring programming language version 1.7 book - Part 7 of 196Mahmoud Samir Fayed
The Ring 1.7 release includes several new features and improvements:
1. A new "Load Package" command allows loading Ring libraries into separate namespaces to avoid conflicts.
2. New ringvm_see() and ringvm_give() functions allow redefining the behavior of the See and Give commands.
3. New ring_state_new() and ring_state_mainfile() functions enable running Ring programs from other Ring programs while controlling state deletion.
4. The Trace library debugger now includes a "callstack" command, and Ring Notepad, RingQt, and other tools received updates and enhancements.
This document provides an introduction to the Go programming language. It discusses why Go was created, its key features like performance, concurrency and productivity. It provides examples of basic Go programs and explains basic language concepts like types, functions, interfaces and methods. The document also discusses the history and creators of the Go language.
PostgreSQL provides several data types for storing different kinds of data. It supports standard SQL data types like integers, floats, characters, and timestamps. It also provides range, network, geometric, and JSON data types. PostgreSQL allows arrays, composite types, and domains to define constraints on columns. Additional types like hstore and XML are provided by extensions. Indexes can be created on columns and expressions to improve query performance. Tables can be partitioned using table inheritance.
Why we are submitting this talk? Because Go is cool and we would like to hear more about this language ;-). In this talk we would like to tell you about our experience with development of microservices with Go. Go enables devs to create readable, fast and concise code, this - beyond any doubt is important. Apart from this we would like to leverage our test driven habbits to create bulletproof software. We will also explore other aspects important for adoption of a new language.
Working with Databases and Groovy
This document discusses how to work with databases using Groovy. It covers:
- Connecting to databases and using groovy.sql.Sql to execute queries and statements
- Performing reads and writes like inserting, updating, deleting rows
- Calling stored procedures
- Advanced techniques like transactions, batching, pagination
- Using groovy.sql.DataSet to treat tables as collections
It also briefly introduces using MongoDB and Neo4j with Groovy.
The document appears to be code or data that is not easily summarized due to its unstructured nature. It contains various symbols, brackets, and other characters with no clear meaning or context provided.
Les tests unitaires se sont pas limités au code des applications, des tests peuvent également être effectués sur les données et les schémas des bases de données.
Conférence donnée lors du meetup PostgreSQL le 22 juin 2016 à Nantes
This document summarizes Swift protocols including defining protocols, conforming to protocols with classes, structures and enums, protocol requirements for properties and methods, protocol inheritance, checking for protocol conformance, optional protocol requirements, and using protocols as types. Protocols allow defining a common behavior that multiple types can conform to, enabling polymorphism.
This document describes functions for a doubly linked list data structure in C including:
1) Functions for inserting nodes at the beginning, end, and at a specified position before or after a node.
2) Functions for deleting nodes from the beginning, end, and at a specified position.
3) A display function to print out the elements of the linked list.
4) Additional functions like creating new nodes, checking for invalid positions, and calculating the length.
The Ring programming language version 1.5.3 book - Part 35 of 184Mahmoud Samir Fayed
The document provides documentation on various functions available in the Ring programming language standard library (stdlib). It describes functions for generating permutations, reading lines from a file, finding substrings, changing substrings, sleeping, checking if a file is the main source file, checking if a directory exists, making directories, getting file sizes, trimming strings, getting the epoch time, executing system commands, listing all files in a folder, and more. It also provides details on classes in the stdlib like the String, List, Stack, Queue, HashTable, Tree, Math, DateTime, File, and other classes along with their methods.
The Ring programming language version 1.10 book - Part 81 of 212Mahmoud Samir Fayed
This document describes a cards game application developed using RingQt. The application deals 5 cards to each of two players. Players take turns clicking cards to reveal them. If a card matches another visible card or is a "5", the player earns points and may eat additional matching cards. The game ends when all cards are revealed, and the player with the most points wins. The application displays the cards, scores, and gameplay logic through a graphical user interface built with RingQt widgets.
Golang became a very popular platform for rapid application development because it is fast and easy to understand. On the other hand automated software testing is a must in the modern age, so in this presentation we will iterate on built-in tool and demonstrate some advanced techniques. Of course, all spiced up with real-life engineering experience.
The Ring programming language version 1.6 book - Part 86 of 189Mahmoud Samir Fayed
Here are the main cURL functions used in RingLibCurl:
- curl_easy_setopt - Sets options for the cURL easy handle. This is used to set options like the URL, headers, write callback etc.
- curl_easy_perform - Performs a cURL session. This initiates the transfer based on the options previously set.
- curl_easy_cleanup - Cleans up and free resources used by a cURL easy handle.
Some commonly used options include:
- CURLOPT_URL - Set the URL to transfer.
- CURLOPT_WRITEFUNCTION - Set a callback to write received data.
- CURLOPT_WRITED
This document provides examples of Go language concepts like variables, functions, methods, structs, interfaces, concurrency, error handling and more. It demonstrates variable declaration, multiple return values, named return parameters, arrays, slices, maps, structs with methods, interfaces, embedding interfaces, goroutines, channels, recovery from panics, and passing values vs references.
Implementing Software Machines in Go and CEleanor McHugh
Early draft of a tutorial on techniques for implementing virtual machines and language interpreters. Contains example programs for functional stacks and despatch loops.
The document discusses various built-in functions in Python including numeric, string, and container data types. It provides examples of using list comprehensions, dictionary comprehensions, lambda functions, enumerate, zip, filter, any, all, map and reduce to manipulate data in Python. It also includes references to online resources for further reading.
The Ring programming language version 1.5.1 book - Part 79 of 180Mahmoud Samir Fayed
Here are the main cURL options functions available in the RingLibCurl library:
- CURLOPT_VERBOSE - Set verbose mode
- CURLOPT_HEADER - Include header in output
- CURLOPT_NOPROGRESS - Disable progress meter
- CURLOPT_NOSIGNAL - Disable signal handling
- CURLOPT_WILDCARDMATCH - Enable wildcard matching
- CURLOPT_WRITEFUNCTION - Set write callback
- CURLOPT_WRITEDATA - Pass pointer to write callback
- CURLOPT_READFUNCTION - Set read callback
- CURLOPT_READDATA - Pass pointer to read callback
- CURLOPT_IOCTLFUNCTION - Set
This document discusses Go programming concepts including concurrency, reflection, interfaces, and generics. It provides examples of using channels for concurrency, reflecting over types, implementing interfaces, and defining generic functions. The examples demonstrate capabilities like mapping and reducing over collections, duplicating values, and applying transformations.
The document describes various probability distributions that can arise from combining Bernoulli random variables. It shows how a binomial distribution emerges from summing Bernoulli random variables, and how Poisson, normal, chi-squared, exponential, gamma, and inverse gamma distributions can approximate the binomial as the number of Bernoulli trials increases. Code examples in R are provided to simulate sampling from these distributions and compare the simulated distributions to their theoretical probability density functions.
-- Task 2- Debugging a program with stacks- queues- and doubly-linked.docxAdamq0DJonese
/* Task 2: Debugging a program with stacks, queues, and doubly-linked lists There are a number of errors in the following program. All errors are located in main() and structure definitions. Function declarations and definitions are correct! Locate all errors, fix them (as shown below), run the program and save its output as a comment at the end of the source file. Example: int num = 10; int *ptr; num = &ptr; // <== Error: Comment the line and write the correct line below // Write a short justification where appropriate // num = &ptr; // Error #1 ptr = # Name: */ #include #include #include #include #define DUMMY_TRAILER '\177' // octal ASCII code of the // last character in the ASCII table #define NUM_CITIES 10 typedef struct { char name[12]; int temperature[5]; } CITY; // Stack and Queue Node typedef struct node NODE; struct node { CITY city; node *next; }; // Doubly Linked List Node typedef struct d_node D_NODE; struct d_node { CITY city; NODE *forw; NODE *back; }; // Stack Functions NODE *push(NODE *stack, const CITY *pStu); NODE *pop(NODE **stack); // Queue Functions void enqueue(NODE **queue, NODE **rear, const CITY *pStu); NODE *dequeue(NODE **queue, NODE **rear); // Doubly Linked List Functions D_NODE *init_list(void); int insert(D_NODE *list, const CITY *pStu); void traverse_forw(D_NODE *list); void traverse_back(D_NODE *list); // Other Functions void printCity(const CITY *pCity); int main (void) { CITY cList[NUM_CITIES] = { {"Cupertino", {88, 89, 87, 85, 89}}, {"Flagstaff", {81, 80, 88, 89, 89}}, {"Los Angeles", {87, 88, 89, 89, 90}}, {"Philadelphia", {96, 99, 99, 90, 95}}, {"Phoenix", {106, 109, 109, 100, 105}}, {"Portland", {89, 90, 85, 89, 90}}, {"Reno", {108, 105, 109, 100, 108}}, {"Salem", {85, 90, 85, 89, 90}}, {"Tucson", {107, 100, 109, 100, 108}}, {"Yreka", {101, 109, 100, 108, 109}} }; NODE *stack = NULL; NODE *top = NULL; NODE *queue = NULL, *rear = NULL; NODE *front; D_NODE *list; list = init_list(); // build stack and queue with data from an array of CITY structures srand((unsigned int)time(NULL)); int count = rand() % 10; for ( int n = 0; n < count; n++) { int i = rand() % NUM_CITIES; int duplicate = insert(list, &cList[i]); if(duplicate) { // already in the list! push(stack, &cList[i]); enqueue(&queue, &rear, cList[i]); } } // display list printf("\nLIST contents (forwards):\n"); traverse_forw(list); printf("\nLIST contents (backwards):\n"); traverse_back(list); // display stack if (top) { printf("\nSTACK contents from top to bottom:\n"); while ((top = pop(stack))) { printCity(top->city); } } else printf ("Empty Stack!\n"); // display queue if (front) { printf("\nQUEUE contents from front to rear:\n"); while ((front = dequeue( queue, rear))) { printCity(front->city); } } else printf ("Empty Queue!\n"); return 0; } /*************************************************** Displays the fileds of a CIS_CLASS structure Pre pCls - a pointer to a CIS_CLASS structure Post */ void printCity(const CITY *pCity) { printf("%-20s %3d\n",.
Similar to The Ring programming language version 1.9 book - Part 37 of 210 (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.
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfkalichargn70th171
Moving to a more digitally focused era, the importance of software is rapidly increasing. Software tools are crucial for upgrading life standards, enhancing business prospects, and making a smart world. The smooth and fail-proof functioning of the software is very critical, as a large number of people are dependent on them.
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...kalichargn70th171
Visual testing plays a vital role in ensuring that software products meet the aesthetic requirements specified by clients in functional and non-functional specifications. In today's highly competitive digital landscape, users expect a seamless and visually appealing online experience. Visual testing, also known as automated UI testing or visual regression testing, verifies the accuracy of the visual elements that users interact with.
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Paul Brebner
Closing talk for the Performance Engineering track at Community Over Code EU (Bratislava, Slovakia, June 5 2024) https://eu.communityovercode.org/sessions/2024/why-apache-kafka-clusters-are-like-galaxies-and-other-cosmic-kafka-quandaries-explored/ Instaclustr (now part of NetApp) manages 100s of Apache Kafka clusters of many different sizes, for a variety of use cases and customers. For the last 7 years I’ve been focused outwardly on exploring Kafka application development challenges, but recently I decided to look inward and see what I could discover about the performance, scalability and resource characteristics of the Kafka clusters themselves. Using a suite of Performance Engineering techniques, I will reveal some surprising discoveries about cosmic Kafka mysteries in our data centres, related to: cluster sizes and distribution (using Zipf’s Law), horizontal vs. vertical scalability, and predicting Kafka performance using metrics, modelling and regression techniques. These insights are relevant to Kafka developers and operators.
Flutter vs. React Native: A Detailed Comparison for App Development in 2024dhavalvaghelanectarb
Choosing the right framework for your cross-platform mobile app can be a tough decision. Both Flutter and React Native offer compelling features and have earned their place in the development world. Here is a detailed comparison to help you weigh their strengths and weaknesses. Here are the pros and cons of developing mobile apps in React Native vs Flutter.
🏎️Tech Transformation: DevOps Insights from the Experts 👩💻campbellclarkson
Connect with fellow Trailblazers, learn from industry experts Glenda Thomson (Salesforce, Principal Technical Architect) and Will Dinn (Judo Bank, Salesforce Development Lead), and discover how to harness DevOps tools with Salesforce.
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceICS
This webinar explores the “secure-by-design” approach to medical device software development. During this important session, we will outline which security measures should be considered for compliance, identify technical solutions available on various hardware platforms, summarize hardware protection methods you should consider when building in security and review security software such as Trusted Execution Environments for secure storage of keys and data, and Intrusion Detection Protection Systems to monitor for threats.
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISTier1 app
Are you ready to unlock the secrets hidden within Java thread dumps? Join us for a hands-on session where we'll delve into effective troubleshooting patterns to swiftly identify the root causes of production problems. Discover the right tools, techniques, and best practices while exploring *real-world case studies of major outages* in Fortune 500 enterprises. Engage in interactive lab exercises where you'll have the opportunity to troubleshoot thread dumps and uncover performance issues firsthand. Join us and become a master of Java thread dump analysis!
Nashik's top web development company, Upturn India Technologies, crafts innovative digital solutions for your success. Partner with us and achieve your goals
Streamlining End-to-End Testing Automation with Azure DevOps Build & Release Pipelines
Automating end-to-end (e2e) test for Android and iOS native apps, and web apps, within Azure build and release pipelines, poses several challenges. This session dives into the key challenges and the repeatable solutions implemented across multiple teams at a leading Indian telecom disruptor, renowned for its affordable 4G/5G services, digital platforms, and broadband connectivity.
Challenge #1. Ensuring Test Environment Consistency: Establishing a standardized test execution environment across hundreds of Azure DevOps agents is crucial for achieving dependable testing results. This uniformity must seamlessly span from Build pipelines to various stages of the Release pipeline.
Challenge #2. Coordinated Test Execution Across Environments: Executing distinct subsets of tests using the same automation framework across diverse environments, such as the build pipeline and specific stages of the Release Pipeline, demands flexible and cohesive approaches.
Challenge #3. Testing on Linux-based Azure DevOps Agents: Conducting tests, particularly for web and native apps, on Azure DevOps Linux agents lacking browser or device connectivity presents specific challenges in attaining thorough testing coverage.
This session delves into how these challenges were addressed through:
1. Automate the setup of essential dependencies to ensure a consistent testing environment.
2. Create standardized templates for executing API tests, API workflow tests, and end-to-end tests in the Build pipeline, streamlining the testing process.
3. Implement task groups in Release pipeline stages to facilitate the execution of tests, ensuring consistency and efficiency across deployment phases.
4. Deploy browsers within Docker containers for web application testing, enhancing portability and scalability of testing environments.
5. Leverage diverse device farms dedicated to Android, iOS, and browser testing to cover a wide range of platforms and devices.
6. Integrate AI technology, such as Applitools Visual AI and Ultrafast Grid, to automate test execution and validation, improving accuracy and efficiency.
7. Utilize AI/ML-powered central test automation reporting server through platforms like reportportal.io, providing consolidated and real-time insights into test performance and issues.
These solutions not only facilitate comprehensive testing across platforms but also promote the principles of shift-left testing, enabling early feedback, implementing quality gates, and ensuring repeatability. By adopting these techniques, teams can effectively automate and execute tests, accelerating software delivery while upholding high-quality standards across Android, iOS, and web applications.
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...The Third Creative Media
"Navigating Invideo: A Comprehensive Guide" is an essential resource for anyone looking to master Invideo, an AI-powered video creation tool. This guide provides step-by-step instructions, helpful tips, and comparisons with other AI video creators. Whether you're a beginner or an experienced video editor, you'll find valuable insights to enhance your video projects and bring your creative ideas to life.
Photoshop Tutorial for Beginners (2024 Edition)alowpalsadig
Photoshop Tutorial for Beginners (2024 Edition)
Explore the evolution of programming and software development and design in 2024. Discover emerging trends shaping the future of coding in our insightful analysis."
Here's an overview:Introduction: The Evolution of Programming and Software DevelopmentThe Rise of Artificial Intelligence and Machine Learning in CodingAdopting Low-Code and No-Code PlatformsQuantum Computing: Entering the Software Development MainstreamIntegration of DevOps with Machine Learning: MLOpsAdvancements in Cybersecurity PracticesThe Growth of Edge ComputingEmerging Programming Languages and FrameworksSoftware Development Ethics and AI RegulationSustainability in Software EngineeringThe Future Workforce: Remote and Distributed TeamsConclusion: Adapting to the Changing Software Development LandscapeIntroduction: The Evolution of Programming and Software Development
Photoshop Tutorial for Beginners (2024 Edition)Explore the evolution of programming and software development and design in 2024. Discover emerging trends shaping the future of coding in our insightful analysis."Here's an overview:Introduction: The Evolution of Programming and Software DevelopmentThe Rise of Artificial Intelligence and Machine Learning in CodingAdopting Low-Code and No-Code PlatformsQuantum Computing: Entering the Software Development MainstreamIntegration of DevOps with Machine Learning: MLOpsAdvancements in Cybersecurity PracticesThe Growth of Edge ComputingEmerging Programming Languages and FrameworksSoftware Development Ethics and AI RegulationSustainability in Software EngineeringThe Future Workforce: Remote and Distributed TeamsConclusion: Adapting to the Changing Software Development LandscapeIntroduction: The Evolution of Programming and Software Development
The importance of developing and designing programming in 2024
Programming design and development represents a vital step in keeping pace with technological advancements and meeting ever-changing market needs. This course is intended for anyone who wants to understand the fundamental importance of software development and design, whether you are a beginner or a professional seeking to update your knowledge.
Course objectives:
1. **Learn about the basics of software development:
- Understanding software development processes and tools.
- Identify the role of programmers and designers in software projects.
2. Understanding the software design process:
- Learn about the principles of good software design.
- Discussing common design patterns such as Object-Oriented Design.
3. The importance of user experience (UX) in modern software:
- Explore how user experience can improve software acceptance and usability.
- Tools and techniques to analyze and improve user experience.
4. Increase efficiency and productivity through modern development tools:
- Access to the latest programming tools and languages used in the industry.
- Study live examples of applications
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!
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/
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...Luigi Fugaro
Vector databases are transforming how we handle data, allowing us to search through text, images, and audio by converting them into vectors. Today, we'll dive into the basics of this exciting technology and discuss its potential to revolutionize our next-generation AI applications. We'll examine typical uses for these databases and the essential tools
developers need. Plus, we'll zoom in on the advanced capabilities of vector search and semantic caching in Java, showcasing these through a live demo with Redis libraries. Get ready to see how these powerful tools can change the game!
The Ring programming language version 1.9 book - Part 37 of 210
1. CHAPTER
FORTYTWO
POSTGRESQL FUNCTIONS
In this chapter we will learn about using the PostgreSQL database in the Ring programming language.
42.1 Loading the library
Before using the next function load the postgresqllib.ring library
load "postgresqllib.ring"
# Use PostgreSQL functions
42.2 Examples
Example (1):
load "postgresqllib.ring"
conninfo = "user=postgres password=sa dbname = postgres"
exit_nicely = func conn {
PQfinish(conn)
shutdown(1)
}
conn = PQconnectdb(conninfo)
if (PQstatus(conn) != CONNECTION_OK)
fputs(stderr, "Connection to database failed: "+PQerrorMessage(conn))
call exit_nicely(conn)
ok
res = PQexec(conn, "select * from pg_database")
if PQresultStatus(res) != PGRES_TUPLES_OK
fputs(stderr, "Select failed: " + PQerrorMessage(conn))
PQclear(res)
exit_nicely(conn)
ok
nFields = PQnfields(res)
for i = 1 to nFields
? PQfname(res, i-1)
next
329
2. Ring Documentation, Release 1.9
? copy("*",60)
for i = 1 to PQntuples(res)
for j=1 to nFields
see PQgetvalue(res, i-1, j-1) + " "
next
see nl
next
PQclear(res)
PQfinish(conn)
Output:
datname
datdba
encoding
datcollate
datctype
datistemplate
datallowconn
datconnlimit
datlastsysoid
datfrozenxid
datminmxid
dattablespace
datacl
************************************************************
postgres 10 6 English_United States.1252
English_United States.1252 f t -1 12937 549 1 1663
template1 10 6 English_United States.1252 English_United States.1252
t t -1 12937 549 1 1663 {=c/postgres,postgres=CTc/postgres}
template0 10 6 English_United States.1252 English_United States.1252
t f -1 12937 549 1 1663 {=c/postgres,postgres=CTc/postgres}
mahdb 10 6 English_United States.1252 English_United States.1252
f t -1 12937 549 1 1663
Example(2):
load "postgresqllib.ring"
conninfo = "user=postgres password=sa dbname = mahdb"
exit_nicely = func conn {
PQfinish(conn)
shutdown(1)
}
conn = PQconnectdb(conninfo)
if (PQstatus(conn) != CONNECTION_OK)
fputs(stderr, "Connection to database failed: "+PQerrorMessage(conn))
call exit_nicely(conn)
ok
res = PQexec(conn, "
DROP DATABASE mahdb;
42.2. Examples 330
3. Ring Documentation, Release 1.9
")
if PQresultStatus(res) != PGRES_TUPLES_OK
fputs(stderr, "Remove failed: " + PQerrorMessage(conn))
PQclear(res)
ok
PQclear(res)
res = PQexec(conn, "CREATE DATABASE mahdb;")
if PQresultStatus(res) != PGRES_TUPLES_OK
fputs(stderr, "Create database failed: " + PQerrorMessage(conn))
PQclear(res)
ok
res = PQexec(conn, "
CREATE TABLE COMPANY (
ID INT PRIMARY KEY NOT NULL,
NAME TEXT NOT NULL,
AGE INT NOT NULL,
ADDRESS CHAR(50),
SALARY REAL );
")
if PQresultStatus(res) != PGRES_TUPLES_OK
fputs(stderr, "Create Table failed: " + PQerrorMessage(conn))
PQclear(res)
ok
PQclear(res)
res = PQexec(conn, "
INSERT INTO COMPANY (ID,NAME,AGE,ADDRESS,SALARY)
VALUES (1, 'Mahmoud' , 31, 'Jeddah', 10.00 ),
(2, 'Ahmed' , 27, 'Jeddah', 20.00 ),
(3, 'Mohammed', 33, 'Egypt' , 30.00 ),
(4, 'Ibrahim' , 24, 'Egypt ', 40.00 );
")
if PQresultStatus(res) != PGRES_TUPLES_OK
fputs(stderr, "Insert Table failed: " + PQerrorMessage(conn))
PQclear(res)
ok
PQclear(res)
res = PQexec(conn, "
select * from COMPANY
")
if PQresultStatus(res) != PGRES_TUPLES_OK
fputs(stderr, "Select failed: " + PQerrorMessage(conn))
PQclear(res)
call exit_nicely(conn)
ok
nFields = PQnfields(res)
for i = 1 to nFields
? PQfname(res, i-1)
next
? copy("*",60)
42.2. Examples 331
4. Ring Documentation, Release 1.9
for i = 1 to PQntuples(res)
for j=1 to nFields
see PQgetvalue(res, i-1, j-1) + " "
next
see nl
next
PQclear(res)
PQfinish(conn)
Output:
id
name
age
address
salary
************************************************************
1 Mahmoud 31 Jeddah 10
2 Ahmed 27 Jeddah 20
3 Mohammed 31 Egypt 30
4 Ibrahim 24 Egypt 40
42.3 RingPostgreSQL Constants
The next constants are define by the RingPostgreSQL Library
CONNECTION_STARTED
CONNECTION_MADE
CONNECTION_AWAITING_RESPONSE
CONNECTION_AUTH_OK
CONNECTION_SSL_STARTUP
CONNECTION_SETENV
CONNECTION_OK
PQPING_OK
PQPING_REJECT
PQPING_NO_RESPONSE
PQPING_NO_ATTEMPT
PGRES_EMPTY_QUERY
PGRES_COMMAND_OK
PGRES_TUPLES_OK
PGRES_COPY_OUT
PGRES_COPY_IN
PGRES_BAD_RESPONSE
PGRES_NONFATAL_ERROR
PGRES_FATAL_ERROR
PGRES_COPY_BOTH
PGRES_SINGLE_TUPLE
PG_DIAG_SEVERITY
PG_DIAG_SQLSTATE
PG_DIAG_MESSAGE_PRIMARY
PG_DIAG_MESSAGE_DETAIL
42.3. RingPostgreSQL Constants 332
6. Ring Documentation, Release 1.9
int PQbackendPID(const PGconn *conn)
int PQconnectionNeedsPassword(const PGconn *conn)
int PQconnectionUsedPassword(const PGconn *conn)
int PQsslInUse(const PGconn *conn)
const char *PQsslAttribute(const PGconn *conn, const char *attribute_name)
const char **PQsslAttributeNames(const PGconn *conn)
void *PQsslStruct(const PGconn *conn, const char *struct_name)
void *PQgetssl(const PGconn *conn)
PGresult *PQexec(PGconn *conn, const char *command);
PGresult *PQexecParams(PGconn *conn,const char *command,int nParams,
const Oid *paramTypes,const char **paramValues,
const int *paramLengths,const int *paramFormats,int resultFormat)
PGresult *PQprepare(PGconn *conn,const char *stmtName,
const char *query,int nParams,const Oid *paramTypes)
PGresult *PQexecPrepared(PGconn *conn,const char *stmtName,
int nParams,const char **paramValues,
const int *paramLengths,const int *paramFormats,int resultFormat)
PGresult *PQdescribePrepared(PGconn *conn, const char *stmtName)
PGresult *PQdescribePortal(PGconn *conn, const char *portalName)
ExecStatusType PQresultStatus(const PGresult *res)
char *PQresStatus(ExecStatusType status)
char *PQresultErrorMessage(const PGresult *res)
char *PQresultErrorField(const PGresult *res, int fieldcode)
void PQclear(PGresult *res)
int PQntuples(const PGresult *res)
int PQnfields(const PGresult *res)
char *PQfname(const PGresult *res,int column_number)
int PQfnumber(const PGresult *res,const char *column_name)
Oid PQftable(const PGresult *res,int column_number)
int PQftablecol(const PGresult *res,int column_number)
int PQfformat(const PGresult *res,int column_number)
Oid PQftype(const PGresult *res,int column_number)
int PQfmod(const PGresult *res,int column_number)
int PQfsize(const PGresult *res,int column_number)
int PQbinaryTuples(const PGresult *res)
char *PQgetvalue(const PGresult *res,int row_number,int column_number)
int PQgetisnull(const PGresult *res,int row_number,int column_number)
int PQgetlength(const PGresult *res,int row_number,int column_number)
int PQnparams(const PGresult *res)
Oid PQparamtype(const PGresult *res, int param_number)
void PQprint(FILE *fout,const PGresult *res,const PQprintOpt *po)
char *PQcmdStatus(PGresult *res)
char *PQcmdTuples(PGresult *res)
Oid PQoidValue(const PGresult *res)
char *PQoidStatus(const PGresult *res)
char *PQescapeLiteral(PGconn *conn, const char *str, size_t length)
char *PQescapeIdentifier(PGconn *conn, const char *str, size_t length)
size_t PQescapeStringConn(PGconn *conn,char *to,
const char *from, size_t length,int *error)
size_t PQescapeString(char *to, const char *from, size_t length)
unsigned char *PQescapeByteaConn(PGconn *conn,
const unsigned char *from,size_t from_length,size_t *to_length)
unsigned char *PQescapeBytea(const unsigned char *from,
size_t from_length,size_t *to_length)
unsigned char *PQunescapeBytea(const unsigned char *from, size_t *to_length)
int PQsendQuery(PGconn *conn, const char *command)
int PQsendQueryParams(PGconn *conn,const char *command,
int nParams,const Oid *paramTypes,const char **paramValues,
42.4. RingPostgreSQL Functions 334
7. Ring Documentation, Release 1.9
const int *paramLengths,const int *paramFormats,int resultFormat)
int PQsendPrepare(PGconn *conn,const char *stmtName,
const char *query,int nParams,const Oid *paramTypes)
int PQsendQueryPrepared(PGconn *conn,const char *stmtName,
int nParams,const char **paramValues,
const int *paramLengths,const int *paramFormats,int resultFormat)
int PQsendDescribePrepared(PGconn *conn, const char *stmtName)
int PQsendDescribePortal(PGconn *conn, const char *portalName)
PGresult *PQgetResult(PGconn *conn)
int PQconsumeInput(PGconn *conn)
int PQisBusy(PGconn *conn)
int PQsetnonblocking(PGconn *conn, int arg)
int PQisnonblocking(const PGconn *conn)
int PQflush(PGconn *conn)
int PQsetSingleRowMode(PGconn *conn)
PGcancel *PQgetCancel(PGconn *conn)
void PQfreeCancel(PGcancel *cancel)
int PQcancel(PGcancel *cancel, char *errbuf, int errbufsize)
int PQrequestCancel(PGconn *conn)
PGresult *PQfn(PGconn *conn,int fnid,int *result_buf,
int *result_len,int result_is_int,const PQArgBlock *args,int nargs)
PGnotify *PQnotifies(PGconn *conn)
int PQputCopyData(PGconn *conn,const char *buffer,int nbytes)
int PQputCopyEnd(PGconn *conn,const char *errormsg)
int PQgetCopyData(PGconn *conn,char **buffer,int async)
int PQgetline(PGconn *conn,char *buffer,int length)
int PQgetlineAsync(PGconn *conn,char *buffer,int bufsize)
int PQputline(PGconn *conn,const char *string)
int PQputnbytes(PGconn *conn,const char *buffer,int nbytes)
int PQendcopy(PGconn *conn)
int PQclientEncoding(const PGconn *conn)
char *pg_encoding_to_char(int encoding_id)
int PQsetClientEncoding(PGconn *conn, const char *encoding)
void PQtrace(PGconn *conn, FILE *stream)
void PQuntrace(PGconn *conn)
void PQfreemem(void *ptr)
void PQconninfoFree(PQconninfoOption *connOptions)
char *PQencryptPasswordConn(PGconn *conn, const char *passwd,
const char *user, const char *algorithm)
char *PQencryptPassword(const char *passwd, const char *user)
PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status)
int PQfireResultCreateEvents(PGconn *conn, PGresult *res)
PGresult *PQcopyResult(const PGresult *src, int flags)
int PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs)
int PQsetvalue(PGresult *res, int tup_num, int field_num,
char *value, int len)
void *PQresultAlloc(PGresult *res, size_t nBytes)
int PQlibVersion(void)
PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn,
PQnoticeReceiver proc,void *arg)
PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
PQnoticeProcessor proc,void *arg)
void PQinitOpenSSL(int do_ssl, int do_crypto)
void PQinitSSL(int do_ssl)
int PQisthreadsafe(void)
42.4. RingPostgreSQL Functions 335
8. CHAPTER
FORTYTHREE
SECURITY AND INTERNET FUNCTIONS
This chapter contains the security and internet functions provided by the Ring programming language for Hashing,
Encryption & Decryption.
Before using the next function load the openssllib.ring library
load "openssllib.ring"
# Use OpenSSL functions
• MD5()
• SHA1()
• SHA256()
• SHA512()
• SHA384()
• SHA224()
• Encrypt()
• Decrypt()
• Randbytes()
Before using the next function load the internetlib.ring library
load "internetlib.ring"
# Use the Internet functions
• Download()
• SendEmail()
43.1 MD5() Function
We can calculate the MD5 hash using the MD5() Function
Syntax:
MD5(cString) ---> String contains the MD5 hash of the string cString
Example:
see "md5('happy') = " + md5("happy") + nl +
"md5('Hello') = " + md5("Hello") + nl
336
9. Ring Documentation, Release 1.9
Output:
md5('happy') = 56ab24c15b72a457069c5ea42fcfc640
md5('Hello') = 8b1a9953c4611296a827abf8c47804d7
43.2 SHA1() Function
We can calculate the SHA1 hash using the SHA1() Function
Syntax:
SHA1(cString) ---> String contains the SHA1 hash of the string cString
Example:
see "sha1('hello') : " + sha1("hello") + nl +
"sha1('apple') : " + sha1("apple") + nl
Output:
sha1('hello') : aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
sha1('apple') : d0be2dc421be4fcd0172e5afceea3970e2f3d940
43.3 SHA256() Function
We can calculate the SHA256 hash using the SHA256() Function
Syntax:
SHA256(cString) ---> String contains the SHA256 hash of the string cString
Example:
see "sha256('hello') : " + sha256("hello") + nl +
"sha256('apple') : " + sha256("apple") + nl
Output:
sha256('hello') : 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
sha256('apple') : 3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b
43.4 SHA512() Function
We can calculate the SHA512 hash using the SHA512() Function
Syntax:
SHA512(cString) ---> String contains the SHA512 hash of the string cString
Example:
see "sha512('hello') : " + sha512("hello") + nl +
"sha512('apple') : " + sha512("apple") + nl +
"sha512('hello world') : " + sha512("hello world") + nl
43.2. SHA1() Function 337
10. Ring Documentation, Release 1.9
Output:
sha512('hello') : 9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673c
a72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043
sha512('apple') : 844d8779103b94c18f4aa4cc0c3b4474058580a991fba85d3ca698a0bc9e52
c5940feb7a65a3a290e17e6b23ee943ecc4f73e7490327245b4fe5d5efb590feb2
sha512('hello world') : 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca8
6d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f
43.5 SHA384() Function
We can calculate the SHA384 hash using the SHA384() Function
Syntax:
SHA384(cString) ---> String contains the SHA384 hash of the string cString
Example:
see "sha384('hello') : " + sha384("hello") + nl +
"sha384('apple') : " + sha384("apple") + nl +
"sha384('hello world') : " + sha384("hello world") + nl
Output:
sha384('hello') : 59e1748777448c69de6b800d7a33bbfb9ff1b463e44354c3553bcdb9c666fa
90125a3c79f90397bdf5f6a13de828684f
sha384('apple') : 3d8786fcb588c93348756c6429717dc6c374a14f7029362281a3b21dc10250
ddf0d0578052749822eb08bc0dc1e68b0f
sha384('hello world') : fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcb
b83578b3e417cb71ce646efd0819dd8c088de1bd
43.6 SHA224() Function
We can calculate the SHA224 hash using the SHA224() Function
Syntax:
SHA224(cString) ---> String contains the SHA224 hash of the string cString
Example:
see "sha224('hello') : " + sha224("hello") + nl +
"sha224('apple') : " + sha224("apple") + nl +
"sha224('hello world') : " + sha224("hello world") + nl
Output:
sha224('hello') : ea09ae9cc6768c50fcee903ed054556e5bfc8347907f12598aa24193
sha224('apple') : b7bbfdf1a1012999b3c466fdeb906a629caa5e3e022428d1eb702281
sha224('hello world') : 2f05477fc24bb4faefd86517156dafdecec45b8ad3cf2522a563582b
43.7 Encrypt() Function
We can use the Encrypt() function to encrypts the data using the Blowfish algorithm.
43.5. SHA384() Function 338