This document contains definitions for several user-defined functions in SQL including functions to iterate through benefit plans, split strings, convert codes for country, marital status, race, suffixes, and dates. The functions take in various data types as parameters and return formatted results like concatenated strings or converted data types.
This document provides instructions for creating a desktop-like web application interface using Ext JS and CodeIgniter. It includes steps to set up the database and models, configure views and controllers, and write JavaScript code to display and interact with phonebook data using grids, forms, and other Ext JS widgets. The application allows getting, inserting, updating and deleting phonebook records by making AJAX calls to CodeIgniter controllers from the Ext JS application.
The document describes creating an Android application with multiple activities and features:
1) The first practical creates a basic "Hello World" application with one activity displaying text.
2) The second practical adds number calculation functionality, taking two numbers as input and allowing the user to select an operation.
3) The third practical demonstrates the Android activity lifecycle by displaying log messages at each stage.
4) Further practicals add widgets, form validation, and a login module to demonstrate additional Android features.
With Extbase - a new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of the framework to understand how it supports your development process to develop clean code cost efficient in less time. Extbase is one cornerstone for a smooth transition to TYPO3 v5, another is reusable business domain knowledge in form of Generic Domain Models available in 4.x and 5.x. The Generic Domain Models will enable you to add a Semantic Web topping.
[Pgday.Seoul 2021] 2. Porting Oracle UDF and OptimizationPgDay.Seoul
The document discusses porting functions from Oracle to PostgreSQL and optimizing performance, including different function types in PostgreSQL like SQL functions and PL/pgSQL functions, as well as volatility categories. It also provides examples of test data created for use in examples and covers strategies for analyzing inefficient Oracle functions and improving them to leverage the PostgreSQL optimizer.
Adding Dependency Injection to Legacy ApplicationsSam Hennessy
Dependency Injection (DI) is a fantastic technique, but what if you what to use dependency injection in your legacy application. Fear not! As someone who as done this very thing, I will show how you can successful and incrementally add DI to any application. I will present a number of recipes and solutions to common problems and give a tour of the various PHP DI projects and how they can help.
ESNext for humans - LvivJS 16 August 2014Jan Jongboom
The document discusses new features in ES.next (ECMAScript 2015) that improve on existing JavaScript capabilities. It describes how proxies can be used to intercept operations on objects, allowing properties to be returned dynamically or exceptions thrown. It also covers other new features like maps, destructuring, arrow functions, and let/const that address issues with older variable scoping and iteration behaviors. Overall it presents ES.next as providing solutions for things that used to require frameworks as well as enabling new functionality not previously possible in JavaScript.
atrium_username is a Drupal feature for managing user name display:
* a lightweight alternative to realname module;
* "works" before theme layer
* uses the node title of the user profile
The document discusses the architecture of a shopping cart system and how to make it easily testable and extensible. It recommends separating the core logic from session and database handling, and making frequently changing features into plugins. It also suggests simplifying the structure for easier testing by using storage instead of sessions, and DAO instead of databases during tests. The storage abstraction layer is implemented to operate on different mediums like arrays or sessions.
This document provides instructions for creating a desktop-like web application interface using Ext JS and CodeIgniter. It includes steps to set up the database and models, configure views and controllers, and write JavaScript code to display and interact with phonebook data using grids, forms, and other Ext JS widgets. The application allows getting, inserting, updating and deleting phonebook records by making AJAX calls to CodeIgniter controllers from the Ext JS application.
The document describes creating an Android application with multiple activities and features:
1) The first practical creates a basic "Hello World" application with one activity displaying text.
2) The second practical adds number calculation functionality, taking two numbers as input and allowing the user to select an operation.
3) The third practical demonstrates the Android activity lifecycle by displaying log messages at each stage.
4) Further practicals add widgets, form validation, and a login module to demonstrate additional Android features.
With Extbase - a new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of the framework to understand how it supports your development process to develop clean code cost efficient in less time. Extbase is one cornerstone for a smooth transition to TYPO3 v5, another is reusable business domain knowledge in form of Generic Domain Models available in 4.x and 5.x. The Generic Domain Models will enable you to add a Semantic Web topping.
[Pgday.Seoul 2021] 2. Porting Oracle UDF and OptimizationPgDay.Seoul
The document discusses porting functions from Oracle to PostgreSQL and optimizing performance, including different function types in PostgreSQL like SQL functions and PL/pgSQL functions, as well as volatility categories. It also provides examples of test data created for use in examples and covers strategies for analyzing inefficient Oracle functions and improving them to leverage the PostgreSQL optimizer.
Adding Dependency Injection to Legacy ApplicationsSam Hennessy
Dependency Injection (DI) is a fantastic technique, but what if you what to use dependency injection in your legacy application. Fear not! As someone who as done this very thing, I will show how you can successful and incrementally add DI to any application. I will present a number of recipes and solutions to common problems and give a tour of the various PHP DI projects and how they can help.
ESNext for humans - LvivJS 16 August 2014Jan Jongboom
The document discusses new features in ES.next (ECMAScript 2015) that improve on existing JavaScript capabilities. It describes how proxies can be used to intercept operations on objects, allowing properties to be returned dynamically or exceptions thrown. It also covers other new features like maps, destructuring, arrow functions, and let/const that address issues with older variable scoping and iteration behaviors. Overall it presents ES.next as providing solutions for things that used to require frameworks as well as enabling new functionality not previously possible in JavaScript.
atrium_username is a Drupal feature for managing user name display:
* a lightweight alternative to realname module;
* "works" before theme layer
* uses the node title of the user profile
The document discusses the architecture of a shopping cart system and how to make it easily testable and extensible. It recommends separating the core logic from session and database handling, and making frequently changing features into plugins. It also suggests simplifying the structure for easier testing by using storage instead of sessions, and DAO instead of databases during tests. The storage abstraction layer is implemented to operate on different mediums like arrays or sessions.
The document defines classes and methods for implementing OAuth authentication in PHP using CodeIgniter. It includes classes for OAuth consumers, tokens, requests, and signatures. Methods are provided for tasks like fetching request/access tokens, building signatures, and checking requests.
The document provides an implementation plan for a database to support the Refugio Web System project. It includes an entity relationship diagram, logical database model, data dictionary defining the database tables and columns, functional dependency graph, and SQL script to create the database along with sample data. The plan was prepared by KMDC2 and contains details needed to set up the backend database for the Refugio Web System.
The document contains code for checking employee leave status. It retrieves the employee's joining date and calculates their total leave based on months worked. It checks how many leaves have been taken and returns true if leave is available, false otherwise.
The document discusses PHP enums introduced in PHP 8.1. It begins by providing examples of why enums are needed, such as for defining valid options for functions like curl_setopt() and representing statuses. It then covers how enums can help by enforcing valid values, allowing stronger typing, and avoiding bugs. The remainder of the document dives into details of enums in PHP 8.1, including the differences between unit enums and backed enums, and semantics like enums being fixed types that cannot contain state.
Bernhard Schussek gave a presentation on leveraging Symfony2 forms at the Symfony Live conference in March 2011. He discussed the evolution of the Symfony form component, its service-oriented architecture, and how forms are decoupled from business logic. He provided an example of an online sausage shop order form to demonstrate how form data is bound to objects and submitted. The presentation covered the form configuration class, form processing, field types, validation, embedding forms, and form themes.
This document contains a summary of jQuery secrets presented by Bastian Feder. It discusses various techniques including saving and removing state from DOM elements using jQuery.data() and jQuery.removeData(), extending jQuery functionality through plugins, and customizing AJAX requests and event handling. The presentation provides code examples for working with jQuery's data storage methods, namespaces, promises/deferreds, global AJAX settings, and extending jQuery.
The PHP code is for a shell called r57shell. It checks for bots, sets variables and configuration options, defines arrays of useful/dangerous commands and files, handles authentication, and generates the HTML interface for the shell.
This document provides instructions on how to create chained (interdependent) combobox selections using Glade and Ruby. It explains how to create a GUI with three comboboxes using Glade where the options in the second and third combobox depend on the selection in the previous combobox. It then provides the Ruby code to populate the comboboxes with data from a database using ActiveRecord and handle the changed signals to update the dependent comboboxes.
Data Binding is an official Google library that allows binding UI components in layouts to data sources in apps. It generates bindings during compilation that match views to variables, and automatically executes changes to UI when data is updated. This avoids manually finding views by ID and setting values, and makes it easier to update UIs when data changes occur.
JavaScript Fundamentals with Angular and LodashBret Little
The purpose of this presentation is also largely to explain some of the fun parts of JavaScript (dynamic function invocation with reflection, dynamic arguments, etc). I don't necessarily encourage putting complex logic throughout your templates with lodash, though there may be times it is appropriate.
Lets talk about lodash and how it can easily be married to Angular. Using a six line filter, I will expose the power of lodash directly within angular templates. This will be an introduction to lodash, angular templates, and we'll talk about scope and reflection within JavaScript.
This document discusses mocking dependencies in PHPUnit tests. It begins by defining dependencies and dependency injection, and why it is important to mock dependencies in unit tests. It then covers defining test doubles like mocks, stubs, and dummies to simulate dependencies. Various examples are provided for mocking different types of dependencies, like APIs, databases, and external data sources. The goal of mocking is to test units of code in isolation without relying on other components, in order to make tests faster and more reliable.
Valeriy Rabievskiy leads a web studio called stfalcon.com and is an active open source developer. Doctrine 2 is separated into common, DBAL, ORM, and migrations libraries. Entities are lightweight PHP classes that store data in object properties without needing to extend a base class. The EntityManager acts as the central access point for ORM functions like updating entities and accessing repositories. ZF2 integrates with Doctrine 2 through autoloading. The console provides commands for tasks like validating the schema, generating proxies, and running migrations to update the database schema.
This document contains code for a C# class called "test" that defines properties and validation attributes for a web form model. It includes properties for email, name, date, and other fields, along with attributes for validation rules like required, data type, length, and regular expressions. It also contains JavaScript code to add client-side validation logic and datepicker functionality to the form fields.
TerrificJS is a nice little JavaScript framework – based on jQuery – that helps you to modularize your JavaScript code in a very natural way.
The slides illustrate the concepts and features of TerrificJS to see how it helps you to reduce frontend complexity.
The Terrific Composer is a Frontend Development Framework – based on Symfony2 – that aims to make your life easier. It takes the modularization approach of Terrific and provides you a project structure that enables you to start right away.
Con la versione 7 di Drupal è stato introdotto il concetto di Entity, poi evoluto con la versione 8, utilizzato come base di buona parte degli elementi core (nodi, tassonomie, utenti, ...), ma - soprattutto - è stata data la possibilità di costruire entity custom. L'utilizzo di queste apre le possibilità di personalizzazione dello strumento ad un livello superiore velocizzando notevolmente lo sviluppo.
Verranno mostrate le potenzialità nell'uso delle Entity custom e le integrazioni possibili.
Be lazy, be ESI: HTTP caching and Symfony2 @ PHPDay 2011 05-13-2011Alessandro Nadalin
In the first part of the presentation we see how Symfony2 implements HTTP cache.
In the second one there's an explanation of why application cache layers suck, why nerly every php application does caching in the less productive way and how you benefit from HTTP cache from this point of view.
This document describes a quiz management system created by Joyita Kundu. It includes details on the database tables, menu design, form design and event coding. The database contains tables for login information, questions and results. The menu system allows users to take IP or GK tests. Forms are used for login, registration, the quiz and results. Event coding handles form interactions and database queries. The system allows users to take timed tests, view results and track performance over time.
This document describes a Javabean that allows displaying a Jslider component in an Oracle Forms application. The Javabean handles displaying the slider, setting properties like background color, and firing events when the slider value changes. It provides methods to initialize the slider, set properties like value, and get the current value. The sample Forms application demonstrates using the bean by initializing slider properties and handling value change events.
The document discusses dependency injection (DI) using Dagger 2 in Java. It begins by showing an example of traditional Java code without DI and the issues it can cause. It then introduces DI and how Dagger 2 implements it using annotations and compile-time validation. Key features of Dagger 2 highlighted include its Android compatibility, JSR-330 support, and generated code for easy debugging. The document provides examples of Dagger 2 annotations and APIs for declaring modules, components, scopes, lazy injection, and qualifiers. Overall it serves as an introduction to dependency injection using Dagger 2 in Java applications.
Este documento habla sobre la importancia de continuar la obra de los pioneros adventistas y terminar la tarea que ellos comenzaron. Resalta que la Universidad Linda Vista se ha comprometido a capacitar a los jóvenes para que continúen el legado espiritual de los primeros adventistas. El 15 y 16 de mayo se llevará a cabo una ceremonia de investidura donde jóvenes que se han preparado serán reconocidos oficialmente como soldados de Cristo, listos para servirle.
The document defines classes and methods for implementing OAuth authentication in PHP using CodeIgniter. It includes classes for OAuth consumers, tokens, requests, and signatures. Methods are provided for tasks like fetching request/access tokens, building signatures, and checking requests.
The document provides an implementation plan for a database to support the Refugio Web System project. It includes an entity relationship diagram, logical database model, data dictionary defining the database tables and columns, functional dependency graph, and SQL script to create the database along with sample data. The plan was prepared by KMDC2 and contains details needed to set up the backend database for the Refugio Web System.
The document contains code for checking employee leave status. It retrieves the employee's joining date and calculates their total leave based on months worked. It checks how many leaves have been taken and returns true if leave is available, false otherwise.
The document discusses PHP enums introduced in PHP 8.1. It begins by providing examples of why enums are needed, such as for defining valid options for functions like curl_setopt() and representing statuses. It then covers how enums can help by enforcing valid values, allowing stronger typing, and avoiding bugs. The remainder of the document dives into details of enums in PHP 8.1, including the differences between unit enums and backed enums, and semantics like enums being fixed types that cannot contain state.
Bernhard Schussek gave a presentation on leveraging Symfony2 forms at the Symfony Live conference in March 2011. He discussed the evolution of the Symfony form component, its service-oriented architecture, and how forms are decoupled from business logic. He provided an example of an online sausage shop order form to demonstrate how form data is bound to objects and submitted. The presentation covered the form configuration class, form processing, field types, validation, embedding forms, and form themes.
This document contains a summary of jQuery secrets presented by Bastian Feder. It discusses various techniques including saving and removing state from DOM elements using jQuery.data() and jQuery.removeData(), extending jQuery functionality through plugins, and customizing AJAX requests and event handling. The presentation provides code examples for working with jQuery's data storage methods, namespaces, promises/deferreds, global AJAX settings, and extending jQuery.
The PHP code is for a shell called r57shell. It checks for bots, sets variables and configuration options, defines arrays of useful/dangerous commands and files, handles authentication, and generates the HTML interface for the shell.
This document provides instructions on how to create chained (interdependent) combobox selections using Glade and Ruby. It explains how to create a GUI with three comboboxes using Glade where the options in the second and third combobox depend on the selection in the previous combobox. It then provides the Ruby code to populate the comboboxes with data from a database using ActiveRecord and handle the changed signals to update the dependent comboboxes.
Data Binding is an official Google library that allows binding UI components in layouts to data sources in apps. It generates bindings during compilation that match views to variables, and automatically executes changes to UI when data is updated. This avoids manually finding views by ID and setting values, and makes it easier to update UIs when data changes occur.
JavaScript Fundamentals with Angular and LodashBret Little
The purpose of this presentation is also largely to explain some of the fun parts of JavaScript (dynamic function invocation with reflection, dynamic arguments, etc). I don't necessarily encourage putting complex logic throughout your templates with lodash, though there may be times it is appropriate.
Lets talk about lodash and how it can easily be married to Angular. Using a six line filter, I will expose the power of lodash directly within angular templates. This will be an introduction to lodash, angular templates, and we'll talk about scope and reflection within JavaScript.
This document discusses mocking dependencies in PHPUnit tests. It begins by defining dependencies and dependency injection, and why it is important to mock dependencies in unit tests. It then covers defining test doubles like mocks, stubs, and dummies to simulate dependencies. Various examples are provided for mocking different types of dependencies, like APIs, databases, and external data sources. The goal of mocking is to test units of code in isolation without relying on other components, in order to make tests faster and more reliable.
Valeriy Rabievskiy leads a web studio called stfalcon.com and is an active open source developer. Doctrine 2 is separated into common, DBAL, ORM, and migrations libraries. Entities are lightweight PHP classes that store data in object properties without needing to extend a base class. The EntityManager acts as the central access point for ORM functions like updating entities and accessing repositories. ZF2 integrates with Doctrine 2 through autoloading. The console provides commands for tasks like validating the schema, generating proxies, and running migrations to update the database schema.
This document contains code for a C# class called "test" that defines properties and validation attributes for a web form model. It includes properties for email, name, date, and other fields, along with attributes for validation rules like required, data type, length, and regular expressions. It also contains JavaScript code to add client-side validation logic and datepicker functionality to the form fields.
TerrificJS is a nice little JavaScript framework – based on jQuery – that helps you to modularize your JavaScript code in a very natural way.
The slides illustrate the concepts and features of TerrificJS to see how it helps you to reduce frontend complexity.
The Terrific Composer is a Frontend Development Framework – based on Symfony2 – that aims to make your life easier. It takes the modularization approach of Terrific and provides you a project structure that enables you to start right away.
Con la versione 7 di Drupal è stato introdotto il concetto di Entity, poi evoluto con la versione 8, utilizzato come base di buona parte degli elementi core (nodi, tassonomie, utenti, ...), ma - soprattutto - è stata data la possibilità di costruire entity custom. L'utilizzo di queste apre le possibilità di personalizzazione dello strumento ad un livello superiore velocizzando notevolmente lo sviluppo.
Verranno mostrate le potenzialità nell'uso delle Entity custom e le integrazioni possibili.
Be lazy, be ESI: HTTP caching and Symfony2 @ PHPDay 2011 05-13-2011Alessandro Nadalin
In the first part of the presentation we see how Symfony2 implements HTTP cache.
In the second one there's an explanation of why application cache layers suck, why nerly every php application does caching in the less productive way and how you benefit from HTTP cache from this point of view.
This document describes a quiz management system created by Joyita Kundu. It includes details on the database tables, menu design, form design and event coding. The database contains tables for login information, questions and results. The menu system allows users to take IP or GK tests. Forms are used for login, registration, the quiz and results. Event coding handles form interactions and database queries. The system allows users to take timed tests, view results and track performance over time.
This document describes a Javabean that allows displaying a Jslider component in an Oracle Forms application. The Javabean handles displaying the slider, setting properties like background color, and firing events when the slider value changes. It provides methods to initialize the slider, set properties like value, and get the current value. The sample Forms application demonstrates using the bean by initializing slider properties and handling value change events.
The document discusses dependency injection (DI) using Dagger 2 in Java. It begins by showing an example of traditional Java code without DI and the issues it can cause. It then introduces DI and how Dagger 2 implements it using annotations and compile-time validation. Key features of Dagger 2 highlighted include its Android compatibility, JSR-330 support, and generated code for easy debugging. The document provides examples of Dagger 2 annotations and APIs for declaring modules, components, scopes, lazy injection, and qualifiers. Overall it serves as an introduction to dependency injection using Dagger 2 in Java applications.
Este documento habla sobre la importancia de continuar la obra de los pioneros adventistas y terminar la tarea que ellos comenzaron. Resalta que la Universidad Linda Vista se ha comprometido a capacitar a los jóvenes para que continúen el legado espiritual de los primeros adventistas. El 15 y 16 de mayo se llevará a cabo una ceremonia de investidura donde jóvenes que se han preparado serán reconocidos oficialmente como soldados de Cristo, listos para servirle.
Los medios didácticos y los recursos educativosLadyUAH
Este documento distingue entre medios didácticos y recursos educativos. Los medios didácticos son materiales elaborados específicamente para facilitar la enseñanza y el aprendizaje, como libros de texto o las TIC. Los recursos educativos son cualquier material que puede usarse en un contexto educativo con fines didácticos. Los medios didácticos se caracterizan por su sistema de símbolos, contenido, plataforma tecnológica y entorno de comunicación. Existen diferentes tipos de medios didácticos que cumplen func
This document lists several IT certifications received between 2014 and 2014 including ICDL Profile Certificate covering concepts of ICT and Microsoft applications, Microsoft Technology Associate certifications in Database Administration Fundamentals and Software Development Fundamentals (C#), TestOut Certified Network Pro covering networking essentials, and IT Specialist certification from Northwest State Community College with training in desktop applications, databases, networking, programming, and communications.
Orthopedic surgery represents more than half of neurosurgical practice and all neurosurgeons are very much prepared in this field. Spinal segment wounds can realize the loss of the run of the mill twists of the spine and might achieve whole deal mischief to the back. A sprain is incredible in an association with a strain in light of the course that with a sprain, the ligament is affected or torn and with a strain, the muscle is harmed, torn. Lower leg Injuries are the most clearly understood joints that are harmed, in this way and am not too unpalatable sprained lower leg treatment is such an asking to discover.
Este documento presenta un resumen de la vida y obra de Santa María Faustina Kowalska, apóstol de la Divina Misericordia. Nació en una familia campesina polaca y sintió el llamado a la vida religiosa desde muy joven. Ingresó en la Congregación de las Hermanas de la Madre de Dios de la Misericordia y vivió una rica vida mística, recibiendo visiones y revelaciones de Jesús sobre su misericordia. Escribió un Diario espiritual por orden de su director para transmitir el mensaje de la mis
Learn to create low-maintenance landscapes that conserve water, create useful areas for activities and appear visually clear and organized. Waterwise without the "messy" look, e.
The document discusses technology and how it can help turn ideas into real things by using computers to organize information and drawings to clarify ideas. It also addresses using technology to build things that don't break, make objects move, use electricity for light and heat, harness natural resources for self-powered movement, and share completed projects with others, while also acknowledging technology can positively and negatively impact the environment.
This document contains definitions for several stored procedures in SQL including procedures for adding a primary key, analyzing duplicate records, bulk inserting data, logging events, processing phone numbers, and selecting employee and deduction records. The stored procedures define SQL queries and commands to perform operations like truncating tables, inserting records, and selecting records for output based on certain criteria.
The document describes the implementation of an efficient data masking solution involving encrypting sensitive columns in a database table. It includes:
1) Creating a table to store login details with the password field encrypted.
2) Creating views to encrypt and decrypt passwords for queries.
3) Functions to encrypt and decrypt values using a rotating key stored in another table.
4) A job that generates a new encryption key daily to facilitate regular encryption key rotation.
The document provides code examples for performing common SQLite database operations using the FMDB library in Objective-C, including opening a database, executing queries to select and insert records, reading results from a query, and using transactions. It also discusses best practices like copying the database file to the documents directory and checking for errors.
This document provides information about using MapKit and displaying map data in iOS applications. It discusses displaying maps, adding annotations and overlays like polygons and circles, handling gestures, and loading KML data. It includes code snippets in Objective-C for creating map views, annotations, overlays from KML, handling gestures, and displaying annotation views with custom images.
The document contains code listings for the interface and implementation files of the BirdWatching project, including files for the model layer (BirdSighting.h, BirdSighting.m, BirdSightingDataController.h, BirdSightingDataController.m), master view controller layer (BirdsMasterViewController.h, BirdsMasterViewController.m), detail view controller layer (BirdsDetailViewController.h, BirdsDetailViewController.m), and add scene view controller layer (AddSightingViewController.h, AddSightingViewController.m). The code listings do not include comments or unused methods.
This document contains code for a Visual Basic form and a SQL stored procedure. The form code includes event handlers for buttons and text boxes that call the stored procedure, passing parameters and displaying the result. The stored procedure code updates rental records by calculating late fees based on the rental due date and actual return date passed to it, then returns the total late fee amount.
Solo PHP. Niente trucchi e niente inganno (ne Javascript ne Web). Ci imbarcheremo nell’odissea che porta un programmatore a pensare di poter scrivere videogiochi con PHP e SDL. Disegnare sullo schermo, gestire gli input, fare il play di audio e gestire il mixer.
PHPDay GrUSP edition 2022
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Masahiro Nagano
The document describes using Log::Minimal to log messages with timestamps, severity levels, and stack traces. Log::Minimal provides functions like debugf(), infof(), warnf() that log messages, and configuration options like AUTODUMP and PRINT to customize the output format. It can be used to log messages from multi-threaded or distributed applications.
Having issues with passing my values through different functions aft.pdfrajkumarm401
The document describes creating an EmployeeRecord class to store employee data including ID, name, department, and salary. It includes the class definition with private member variables and public getter/setter functions. The main() function demonstrates creating an EmployeeRecord object, passing values to the constructor, and calling printRecord() to output the data. Issues were encountered passing values through functions after construction. The solution comments out incorrect nulling of string pointers in the constructor, fixes the getter/setter functions to properly copy between members and parameters, and changes the salary input in main to not use a pointer.
Apps Script is a JavaScript engine that allows users to write scripts that integrate with Google services like Sheets, Docs, and Gmail. It provides access to built-in Google APIs and the ability to automate workflows. Some key capabilities include reading and writing docs and sheets, retrieving data from APIs, sending emails, and creating triggers to run scripts asynchronously. The document provides examples of using Apps Script to retrieve stock prices, process user data, translate messages, and more.
The document is code for an R57 shell remote administration tool. It includes options to set the language, authentication, and login/password. Functions are defined for compressing files, sending email attachments, and connecting to databases like MySQL, MSSQL, PostgreSQL and Oracle.
Samrt attendance system using fingerprintpraful borad
This document contains code for a fingerprint attendance system using an Arduino. It includes code to initialize various hardware components like an LCD display, fingerprint sensor, thermal printer and keypad. The code allows users to enroll fingerprints by capturing images of a finger, converting it to a template and storing it. It also displays messages to guide the user through the enrollment process and handles any errors.
Can you finish and write the int main for the code according to the in.pdfaksachdevahosymills
Can you finish and write the int main for the code according to the instruction Thank you so
much.
Here's the code for the BSTNode ADT and BST implementation:
#include <iostream>
#include <fstream>
#include <queue>
using namespace std;
// Krone class
class Krone {
private:
int wholeValue;
int fractionalValue;
public:
Krone() {}
Krone(int whole, int fraction) : wholeValue(whole), fractionalValue(fraction) {}
int getWhole() const { return wholeValue; }
int getFraction() const { return fractionalValue; }
bool operator<(const Krone& other) const {
if (wholeValue < other.wholeValue) {
return true;
} else if (wholeValue == other.wholeValue) {
return fractionalValue < other.fractionalValue;
} else {
return false;
}
}
friend ostream& operator<<(ostream& out, const Krone& krone) {
out << "Kr " << krone.wholeValue << "." << krone.fractionalValue;
return out;
}
};
// BST Node class
class BSTNode {
private:
Krone data;
BSTNode* left;
BSTNode* right;
public:
BSTNode() {}
BSTNode(const Krone& krone) : data(krone), left(nullptr), right(nullptr) {}
Krone getData() const { return data; }
BSTNode* getLeft() const { return left; }
BSTNode* getRight() const { return right; }
void setData(const Krone& krone) { data = krone; }
void setLeft(BSTNode* node) { left = node; }
void setRight(BSTNode* node) { right = node; }
};
// BST class
class BST {
private:
BSTNode* root;
public:
BST() : root(nullptr) {}
BSTNode* getRoot() const { return root; }
bool isEmpty() const { return root == nullptr; }
int countNodes(BSTNode* node) const {
if (node == nullptr) {
return 0;
} else {
return 1 + countNodes(node->getLeft()) + countNodes(node->getRight());
}
}
void empty(BSTNode* node) {
if (node != nullptr) {
empty(node->getLeft());
empty(node->getRight());
delete node;
}
}
void insertNode(const Krone& krone) {
BSTNode* node = new BSTNode(krone);
if (isEmpty()) {
root = node;
} else {
BSTNode* currNode = root;
while (true) {
if (krone < currNode->getData()) {
if (currNode->getLeft() == nullptr) {
currNode->setLeft(node);
break;
} else {
currNode = currNode->getLeft();
}
} else {
if (currNode->getRight() == nullptr) {
currNode->setRight(node);
break;
} else {
currNode = currNode->getRight();
}
}
}
}
}
BSTNode* searchNode(const Krone& krone) const {
BSTNode* currNode = root;
while (currNode != nullptr) {
Declare and implement a BSTNode ADT with a data attribute and two pointer attributes, one for
the left child and the other for the right child. Implement the usual getters/setters for these
attributes.
Declare and implement a BST as a link-based ADT whose data will be Krone objects - the data
will be inserted based on the actual money value of your Krone objects as a combination of the
whole value and fractional value attributes.
For the BST, implement the four traversal methods as well as methods for the usual search,
insert, delete, print, count, isEmpty, empty operations and any other needed.
Your pgm will use the following 20 Krone objects to be created in the exact order in your.
Games, AI, and Research - Part 2 Training (FightingICE AI Programming)Pujana Paliyawan
This document provides code for different types of AI in FightingICE. It includes templates for random AI, AI that copies opponent skills, and improved random AI that considers character energy and distance to opponent. The final section discusses the "Machate" AI champion from 2015 and provides its code, which uses rule-based logic to select skills based on various conditions like character energy levels, health differences, distance to opponent, and position on the stage. The code provided can be copied and modified to create new AI agents with different fighting strategies in FightingICE.
This document discusses using the C to Go translation tool c2go to translate C code implementing quicksort algorithms into Go code. It provides examples of translating simple quicksort C code, improving the translation by using a configuration file, and how c2go handles standard C functions like qsort by translating them to their Go equivalents. The examples demonstrate how c2go can generate valid Go code from C code but may require some manual fixes or configuration to handle certain data structures or language differences.
This document discusses using Inter-Process Communication (IPC) mechanisms like Intent, Messenger, and Android Interface Definition Language (AIDL) to allow processes to communicate with each other in an Android app. It provides code examples of implementing IPC using each mechanism to allow a Service to communicate long-running tasks back to an Activity. AIDL is presented as the preferred solution as it allows for synchronous calls, treats the communication in an object-oriented way, and is transparent to the business logic.
This document discusses using Inter-Process Communication (IPC) mechanisms like Intent, Messenger, and Android Interface Definition Language (AIDL) to allow processes to communicate with each other in an Android app. It provides code examples of implementing IPC using each mechanism to allow a Service running in a separate process to communicate tasks and results back to an Activity. AIDL is presented as the most robust solution, allowing synchronous and asynchronous remote calls between processes through generated Java interface stubs.
Taking Objective-C to the next level. UA Mobile 2016.UA Mobile
The document discusses 5 ways to improve Objective-C code while still using Objective-C. It covers: 1) Adding nullability to method parameters and returns to reduce null errors, 2) Using constants to increase predictability, 3) Enforcing designated initializers to ensure objects are initialized correctly, 4) Managing weak references to prevent issues with delegates being released, and 5) Using static analysis to catch nullability and other issues. The overall message is that small changes can make Objective-C code more robust and predictable without needing to rewrite it in another language.
Cassandra v3.0 at Rakuten meet-up on 12/2/2015datastaxjp
Cassandra v3.0 sessions at Cassandra Meet-up at Rakuten Tokyo, Fall 2015. New Functionality (support of JSON, new storage engine, Mview, UDF, UDA etc..)
This document contains code snippets and data in various programming languages. It shows sample code for loops, modules, subroutines, data types, and more. Version counts from 2009 to 2018 are also included.
6. /****** Object: UserDefinedFunction [dbo].[ufn_BenefitIterate_WVE] Script Date: 12/12/2013 14:39:38
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_BenefitIterate_WVE]
@Benefit_plan_id nvarchar(20)
(
)
RETURNS
@Benefits TABLE
Accero_benefit_plan_code nvarchar(10),
EE_HED nvarchar(9),
ER_HED nvarchar(9),
EE_ContribType nvarchar(1),
ContribRule nvarchar(1)
AcceroOption nvarchar(10),
(
)
AS
IF(@Benefit_plan_id = 'WVALL')
Accero_benefit_plan_code,
AcceroOption,
EE_HED,
ER_HED,
EE_ContribType,
ContribRule
(
)
VALUES
'WAD',
'99',
'',
'',
'',
''
(
)
INSERT INTO @Benefits
Accero_benefit_plan_code,
AcceroOption,
EE_HED,
ER_HED,
EE_ContribType,
ContribRule
(
)
VALUES
'WAM',
'99',
'',
'',
'',
''
(
INSERT INTO @Benefits
BEGIN
BEGIN
ufn_BenefitIterate_WVE
Thursday, December 12, 2013 2:39 PM
Functions Page 6
7. ''
)
END
ELSE IF(@Benefit_plan_id = 'WVMD ')
Accero_benefit_plan_code,
AcceroOption,
EE_HED,
ER_HED,
EE_ContribType,
ContribRule
(
)
VALUES
'WAD',
'99',
'',
'',
'',
''
(
)
INSERT INTO @Benefits
Accero_benefit_plan_code,
AcceroOption,
EE_HED,
ER_HED,
EE_ContribType,
ContribRule
(
)
VALUES
'WAM',
'99',
'',
'',
'',
''
(
)
INSERT INTO @Benefits
BEGIN
END
RETURN
END
Functions Page 7
8. /****** Object: UserDefinedFunction [dbo].[ufn_SplitStringWithDelimiter] Script Date: 12/12/2013
14:40:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER FUNCTION [dbo].[ufn_SplitStringWithDelimiter]
@LIST nvarchar(MAX),
@DELIMITER nvarchar(5)
(
)
@SplitTable TABLE
LIST nvarchar(max)
(
)
RETURNS
AS
DECLARE @startloc bigint, @word nvarchar(max);
WHILE (LEN(@LIST ) > 0)
SET @startloc = CHARINDEX(@DELIMITER, @LIST);
IF (@startloc > 0)
SET @Word = LEFT(@LIST, @startloc-1);
INSERT INTO @SplitTable
( LIST )
VALUES
( @Word)
SET @LIST = RIGHT(@LIST, LEN(@LIST) - @startloc);
BEGIN
END
ELSE
INSERT INTO @SplitTable
( LIST )
VALUES
( @LIST )
SET @LIST = '';
BEGIN
END
BEGIN
END
RETURN
BEGIN
END
ufn_SplitStringWithDelimiter
Thursday, December 12, 2013 2:40 PM
Functions Page 8
9. /****** Object: UserDefinedFunction [dbo].[ufn_Convert_CountryCode] Script Date: 12/12/2013
14:41:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Convert_CountryCode]
(
@InCountry nvarchar(3)
)
RETURNS char(2)
AS
DECLARE @OutCountry char(2);
WHEN 'USA' THEN 'US'
SET @OutCountry = CASE @InCountry
BEGIN
WHEN 'COL' THEN 'CO'
WHEN 'MX' THEN 'MX'
WHEN 'IRE' THEN 'IE'
WHEN 'ROM' THEN 'RO'
WHEN 'NZ' THEN 'NZ'
ELSE ''
END;
RETURN @OutCountry;
WHEN 'BRZ' THEN 'BR'
END
ufn_Convert_CountryCode
Thursday, December 12, 2013 2:41 PM
Functions Page 9
10. /****** Object: UserDefinedFunction [dbo].[ufn_Convert_MaritalCode] Script Date: 12/12/2013 14:42:06
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Convert_MaritalCode]
(
@InCode nvarchar(3)
)
RETURNS char(2)
AS
DECLARE @OutCode char(2);
WHEN 'M' THEN '2'
SET @OutCode = CASE @InCode
BEGIN
WHEN 'H' THEN '3'
ELSE '1'
END;
RETURN @OutCode;
WHEN 'S' THEN '1'
END
ufn_Convert_MaritalCode
Thursday, December 12, 2013 2:42 PM
Functions Page 10
11. /****** Object: UserDefinedFunction [dbo].[ufn_Convert_RaceCode] Script Date: 12/12/2013 14:42:32
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Convert_RaceCode]
@InRace nchar(1)
(
)
RETURNS char(2)
AS
DECLARE @OutRace char(2);
WHEN @InRace = '1' THEN '02'
WHEN @InRace = '2' THEN '06'
WHEN @InRace = '3' THEN '05'
SET @OutRace = CASE WHEN @InRace = '0' THEN '01'
BEGIN
WHEN @InRace = '5' THEN '04'
WHEN @InRace = '6' THEN '20'
ELSE '99'
END;
RETURN @OutRace;
WHEN @InRace = '4' THEN '03'
END
ufn_Convert_RaceCode
Thursday, December 12, 2013 2:42 PM
Functions Page 11
12. /****** Object: UserDefinedFunction [dbo].[ufn_Convert_SuffixCode] Script Date: 12/12/2013 14:54:05
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Convert_SuffixCode]
@InSuffix nvarchar(5)
(
)
RETURNS nvarchar(3)
AS
DECLARE @OutSuffix nvarchar(3);
WHEN 'II' THEN '003'
WHEN 'III' THEN '004'
WHEN 'IV' THEN '005'
WHEN 'JR' THEN '001'
WHEN 'JR II' THEN '001'
WHEN 'JR.' THEN '001'
WHEN 'S' THEN '002'
WHEN 'SR' THEN '002'
WHEN 'SR.' THEN '002'
WHEN 'V' THEN '006'
ELSE ''
END;
SET @OutSuffix = CASE RTRIM(LTRIM(@InSuffix))
RETURN @OutSuffix;
BEGIN
END
ufn_Convert_SuffixCode
Thursday, December 12, 2013 2:42 PM
Functions Page 12
13. /****** Object: UserDefinedFunction [dbo].[ufn_Convert_ToCenturyDate] Script Date: 12/12/2013
14:54:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Convert_ToCenturyDate]
@InDate nvarchar(8)
(
)
RETURNS char(6)
AS
DECLARE @InCentury int, @InYear int, @InMonth int, @InDay int;
DECLARE @C int, @CString char(1), @YY int, @YYString char(2), @M char(1), @DD int,
@DDString char(2), @return nvarchar(10);
SET @InDate = RTRIM(LTRIM(@InDate));
IF (LEN(@InDate) = 1 OR LEN(@InDate) = 0)
RETURN NULL;
BEGIN
END
WHILE(LEN(@InDate)<8)
SET @InDate = '0' + @InDate;
BEGIN
END
(CAST(SUBSTRING (@InDate, 1, 2) AS int) > 0)
AND
(CAST(SUBSTRING(@InDate, 3, 2) AS int) > 0)
AND
(CAST(SUBSTRING(@InDate, 5, 2) AS int) > 0)
--AND
--(CAST(SUBSTRING(@InDate, 7, 2) AS int) > 0)
IF(
)
SET @InMonth = CAST(SUBSTRING (@InDate, 1, 2) AS int);
SET @InDay = CAST(SUBSTRING(@InDate, 3, 2) AS int);
SET @InCentury = CAST(SUBSTRING(@InDate, 5, 2) AS int);
SET @InYear = CAST(SUBSTRING(@InDate, 7, 2) AS int);
SET @C = 22 - (@InCentury + 1);
SET @CString = CAST(@C AS CHAR(1));
SET @YY = 99 - @InYear;
IF(LEN(@YY) = 1)
SET @YYString = '0' + CAST(@YY AS CHAR(1));
BEGIN
END
ELSE
SET @YYString = CAST(@YY AS CHAR(2));
BEGIN
END
WHEN @InMonth = 1 THEN 'L'
WHEN @InMonth = 2 THEN 'K'
WHEN @InMonth = 3 THEN 'J'
WHEN @InMonth = 4 THEN 'I'
SET @M = CASE WHEN @InMonth = 0 THEN '-'
BEGIN
BEGIN
WHEN @InMonth = 6 THEN 'G'
WHEN @InMonth = 7 THEN 'F'
WHEN @InMonth = 5 THEN 'H'
ufn_Convert_ToCenturyDate
Thursday, December 12, 2013 2:43 PM
Functions Page 13
14. WHEN @InMonth = 7 THEN 'F'
WHEN @InMonth = 8 THEN 'E'
WHEN @InMonth = 9 THEN 'D'
WHEN @InMonth = 10 THEN 'C'
WHEN @InMonth = 11 THEN 'B'
WHEN @InMonth = 12 THEN 'A'
END;
SET @DD = 32 - @InDay;
IF(LEN(@DD) = 1)
SET @DDString = '0' + CAST(@DD AS CHAR(1));
BEGIN
END
ELSE
SET @DDString = CAST(@DD AS CHAR(2));
BEGIN
END
SET @return = @CString + @YYString + @M + @DDString
END
ELSE
SET @return = 0;
BEGIN
END
RETURN @return;
END
Functions Page 14
15. /****** Object: UserDefinedFunction [dbo].[ufn_Convert_ToDate] Script Date: 12/12/2013 14:54:54
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@InDate nvarchar(20)
)
ALTER FUNCTION [dbo].[ufn_Convert_ToDate] (
RETURNS date
WITH SCHEMABINDING
AS
DECLARE @InYear char(4), @InMonth char(2), @InMonthVar nvarchar(2), @InDay char(2),
@Outstring nvarchar(10), @Outdate date;
SET @InDate = RTRIM(LTRIM(@InDate));
IF (LEN(@InDate) < 7)
RETURN NULL;
BEGIN
END
IF(LEN(@InDate) < 8)
SET @InYear = SUBSTRING(@InDate, 4, 4);
SET @InMonth = '0' + SUBSTRING (@InDate, 1, 1);
SET @InDay = SUBSTRING(@InDate, 2, 2);
BEGIN
END
ELSE
SET @InYear = SUBSTRING(@InDate, 5, 4);
SET @InMonth = SUBSTRING (@InDate, 1, 2);
SET @InDay = SUBSTRING(@InDate, 3, 2);
BEGIN
END
SET @Outstring = @InYear + @InMonth + @InDay;
SET @Outdate = CONVERT(date, @Outstring, 112);
--CAST(@Outstring AS DATE);
--CONVERT(datetime, '2006-04-25T15:50:59.997', 126) AS UsingConvertFrom_ISO8601
RETURN @Outdate;
BEGIN
END
ufn_Convert_ToDate
Thursday, December 12, 2013 2:43 PM
Functions Page 15
16. /****** Object: UserDefinedFunction [dbo].[ufn_Format_SSN] Script Date: 12/12/2013 14:55:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Format_SSN]
@rawssn nchar(9)
(
)
RETURNS char(11)
AS
DECLARE @rawlength int, @LengthCount int, @SSN1 char(3), @SSN2 char(2), @SSN3 char(4)
SET @rawlength = LEN(@rawssn);
SET @SSN1 = SUBSTRING (@rawssn, 1, @rawlength-6);
SET @SSN2 = SUBSTRING (@rawssn, @rawlength-5, 2);
SET @SSN3 = SUBSTRING (@rawssn, @rawlength-3, 4);
--RETURN @SSN1 + @SSN2 + @SSN3 + ' ';
RETURN @SSN1 + '-' + @SSN2 + '-' + @SSN3;
BEGIN
END
ufn_Format_SSN
Thursday, December 12, 2013 2:44 PM
Functions Page 16
17. /****** Object: UserDefinedFunction [dbo].[ufn_GetBatchCode] Script Date: 12/12/2013 14:55:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@batchnumber int
)
ALTER FUNCTION [dbo].[ufn_GetBatchCode] (
RETURNS char(1)
WITH SCHEMABINDING
AS
DECLARE @batchcode char(1);
IF (@batchnumber = 1)
SET @batchcode = 'A';
BEGIN
END
ELSE IF (@batchnumber = 2)
SET @batchcode = 'B';
BEGIN
END
ELSE IF (@batchnumber = 3)
SET @batchcode = 'C';
BEGIN
END
ELSE IF (@batchnumber = 4)
SET @batchcode = 'D';
BEGIN
END
ELSE IF (@batchnumber = 5)
SET @batchcode = 'E';
BEGIN
END
ELSE IF (@batchnumber = 6)
SET @batchcode = 'F';
BEGIN
END
ELSE IF (@batchnumber = 7)
SET @batchcode = 'G';
BEGIN
END
ELSE IF (@batchnumber = 8)
SET @batchcode = 'H';
BEGIN
END
ELSE IF (@batchnumber = 9)
SET @batchcode = 'I';
BEGIN
END
ELSE IF (@batchnumber = 10)
SET @batchcode = 'J';
BEGIN
END
ELSE IF (@batchnumber = 11)
SET @batchcode = 'K';
BEGIN
END
ELSE IF (@batchnumber = 12)
BEGIN
BEGIN
ufn_GetBatchCode
Thursday, December 12, 2013 2:44 PM
Functions Page 17
18. SET @batchcode = 'L';
BEGIN
END
ELSE IF (@batchnumber = 13)
SET @batchcode = 'M';
BEGIN
END
ELSE IF (@batchnumber = 14)
SET @batchcode = 'N';
BEGIN
END
ELSE IF (@batchnumber = 15)
SET @batchcode = 'O';
BEGIN
END
ELSE IF (@batchnumber = 16)
SET @batchcode = 'P';
BEGIN
END
ELSE IF (@batchnumber = 17)
SET @batchcode = 'Q';
BEGIN
END
ELSE IF (@batchnumber = 18)
SET @batchcode = 'R';
BEGIN
END
ELSE IF (@batchnumber = 19)
SET @batchcode = 'S';
BEGIN
END
ELSE IF (@batchnumber = 20)
SET @batchcode = 'T';
BEGIN
END
ELSE IF (@batchnumber = 21)
SET @batchcode = 'U';
BEGIN
END
ELSE IF (@batchnumber = 22)
SET @batchcode = 'V';
BEGIN
END
ELSE IF (@batchnumber = 23)
SET @batchcode = 'W';
BEGIN
END
ELSE IF (@batchnumber = 24)
SET @batchcode = 'X';
BEGIN
END
ELSE IF (@batchnumber = 25)
SET @batchcode = 'Y';
BEGIN
END
ELSE IF (@batchnumber = 26)
SET @batchcode = 'Z';
BEGIN
END
ELSE
SET @batchcode = '#';
BEGIN
END
RETURN @batchcode;
END
Functions Page 18
20. /****** Object: UserDefinedFunction [dbo].[ufn_GetCheck_net] Script Date: 12/12/2013 14:55:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@Emp_no nvarchar(10),
@Employer_code nvarchar(3),
@Check_date nvarchar(10),
@Check_number nvarchar(12),
@Signcode nvarchar(1)
)
ALTER FUNCTION [dbo].[ufn_GetCheck_net] (
RETURNS nvarchar(13)
WITH SCHEMABINDING
AS
DECLARE @Temp_net nvarchar(13), @Check_net nvarchar(13);
FROM dbo.GFSISSY26 AS g6
RTRIM(LTRIM(g6.Emp_no)) = @Emp_no
AND
RTRIM(LTRIM(g6.Employer_code)) = @Employer_code
AND
RTRIM(LTRIM(g6.Check_date)) = @Check_date
AND
RTRIM(LTRIM(g6.Check_number)) = @Check_number;
WHERE
SELECT g6.Check_net
DECLARE netcrs CURSOR FOR
OPEN netcrs;
FETCH NEXT FROM netcrs INTO @Temp_net;
SET @Check_net = NULL;
WHILE (@@FETCH_STATUS = 0)
IF(@@ROWCOUNT = 1)
SET @Check_net = @Temp_net;
BEGIN
END
ELSE IF(@@ROWCOUNT > 1)
IF (@Signcode = 'V' AND CHARINDEX('-', @Temp_net) > 0)
SET @Check_net = @Temp_net;
BEGIN
END
ELSE IF (@Signcode = '' AND CHARINDEX('-', @Temp_net) <= 0)
SET @Check_net = @Temp_net;
BEGIN
END
BEGIN
END
FETCH NEXT FROM netcrs INTO @Temp_net;
BEGIN
END
IF(@Check_net IS NULL)
FROM dbo.GFSISSY26 AS g6
RTRIM(LTRIM(g6.Emp_no)) = @Emp_no
AND
RTRIM(LTRIM(g6.Employer_code)) = @Employer_code
AND
WHERE
SELECT TOP 1 @Check_net = g6.Check_net
BEGIN
BEGIN
ufn_GetCheck_net
Thursday, December 12, 2013 2:46 PM
Functions Page 20
22. /****** Object: UserDefinedFunction [dbo].[ufn_GetCodeSign] Script Date: 12/12/2013 14:56:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@signcode nvarchar(1)
)
ALTER FUNCTION [dbo].[ufn_GetCodeSign] (
RETURNS int
WITH SCHEMABINDING
AS
DECLARE @signint int;
SET @signcode = RTRIM(LTRIM(@signcode));
IF(@signcode = 'V')
SET @signint = -1;
BEGIN
END
ELSE IF (@signcode IS NULL)
SET @signint = 0;
BEGIN
END
ELSE
SET @signint = 1;
BEGIN
END
RETURN @signint;
BEGIN
END
ufn_GetCodeSign
Thursday, December 12, 2013 2:46 PM
Functions Page 22
23. /****** Object: UserDefinedFunction [dbo].[ufn_GetDate_YYMMDD] Script Date: 12/12/2013 14:56:38
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_GetDate_YYMMDD]
@InDate nvarchar(8)
(
)
RETURNS char(6)
AS
DECLARE @InYear char(2), @InMonth char(2), @InDay char(2);
SET @InDate = RTRIM(LTRIM(@InDate));
IF (LEN(@InDate) = 1 OR LEN(@InDate) = 0)
RETURN NULL;
BEGIN
END
WHILE(LEN(@InDate) < 8)
SET @InDate = '0' + @InDate;
BEGIN
END
SET @InYear = SUBSTRING(@InDate, 7, 2);
SET @InMonth = SUBSTRING (@InDate, 1, 2);
SET @InDay = SUBSTRING(@InDate, 3, 2);
RETURN @InYear+@InMonth+@InDay;
BEGIN
END
ufn_GetDate_YYMMDD
Thursday, December 12, 2013 2:47 PM
Functions Page 23
24. /****** Object: UserDefinedFunction [dbo].[ufn_GetOrgId02] Script Date: 12/12/2013 14:56:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@Employer_code nvarchar(3),
@Emp_no nvarchar(10)
)
ALTER FUNCTION [dbo].[ufn_GetOrgId02] (
RETURNS nvarchar(6)
WITH SCHEMABINDING
AS
DECLARE @OrgId char(6);
SET @OrgId = NULL;
SELECT @OrgId = cn.CompanyNumber
FROM [dbo].[CompanyNumber] AS cn
WHERE cn.EmpNum = @Emp_no AND cn.EmployerCode = @Employer_code
SET @Emp_no = null;
SET @Employer_code = null;
RETURN @OrgId;
BEGIN
END
ufn_GetOrgId02
Thursday, December 12, 2013 2:47 PM
Functions Page 24
25. /****** Object: UserDefinedFunction [dbo].[ufn_GetPaymentCode] Script Date: 12/12/2013 14:57:09
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_GetPaymentCode]
@StatusCode nchar(5)
(
)
RETURNS char(1)
AS
DECLARE @Code char(1);
IF(SUBSTRING(@StatusCode, 1, 1) = 'E')
SET @Code = '2';
BEGIN
END
ELSE
SET @Code = '1';
BEGIN
END
RETURN @Code;
BEGIN
END
ufn_GetPaymentCode
Thursday, December 12, 2013 2:47 PM
Functions Page 25
26. /****** Object: UserDefinedFunction [dbo].[ufn_IsDateFuture] Script Date: 12/12/2013 14:57:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_IsDateFuture]
@InDate nvarchar(8)
(
)
RETURNS nvarchar
AS
SET @InDate = RTRIM(LTRIM(@InDate));
DECLARE @CurrentDate date, @IsDateFuture nvarchar(1), @Year int, @Month int, @Day int;
SET @IsDateFuture = '';
SET @Year = 0;
SET @Month = 0;
SET @Day = 0;
SET @CurrentDate = CONVERT(date, GETDATE());
SET @InDate = REPLACE(@InDate, '-', '');
SET @InDate = REPLACE(@InDate, '_', '');
SET @InDate = REPLACE(@InDate, '/', '');
SET @InDate = REPLACE(@InDate, '', '');
SET @InDate = REPLACE(@InDate, '.', '');
IF (LEN(@InDate) < 7 OR LEN(@InDate) > 8)
RETURN 'E';
BEGIN
END
ELSE
SET @Year = RIGHT(@InDate, 4);
SET @Month = LEFT(@InDate, LEN(@InDate)-6);
SET @Day = SUBSTRING(@InDate, LEN(@InDate) - 5, LEN(@InDate) - 6);
BEGIN
END
SET @IsDateFuture = '1';
IF(@Year > YEAR(@CurrentDate))
SET @IsDateFuture = '0';
BEGIN
END
ELSE IF(@Year = YEAR(@CurrentDate))
IF(@Month > MONTH(@CurrentDate))
SET @IsDateFuture = '0';
BEGIN
END
ELSE IF(@Month = MONTH(@CurrentDate))
IF(@Day> DAY(@CurrentDate))
SET @IsDateFuture = '0';
BEGIN
END
ELSE
SET @IsDateFuture = '1';
BEGIN
END
BEGIN
END
ELSE
SET @IsDateFuture = '1';
BEGIN
BEGIN
BEGIN
ufn_IsDateFuture
Thursday, December 12, 2013 2:48 PM
Functions Page 26
27. SET @IsDateFuture = '1';
END
END
ELSE
SET @IsDateFuture = '1';
BEGIN
END
RETURN @IsDateFuture;
END
Functions Page 27
28. /****** Object: UserDefinedFunction [dbo].[ufn_RemoveDecimal] Script Date: 12/12/2013 14:57:38
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_RemoveDecimal]
@InPct numeric(20,10),
@DecimalPlaces int
(
)
RETURNS nvarchar(20)
AS
DECLARE @OutPct nvarchar(20), @DecimalIndx int;
SET @OutPct = NULL;
SET @DecimalIndx = NULL;
SET @DecimalIndx = CHARINDEX('.', @InPct);
SET @OutPct = SUBSTRING(REPLACE(CAST(@InPct AS nvarchar),'.', ''),1,@DecimalIndx +
@DecimalPlaces - 1);
SET @InPct = NULL;
SET @DecimalPlaces = NULL;
RETURN @OutPct;
BEGIN
END
ufn_RemoveDecimal
Thursday, December 12, 2013 2:48 PM
Functions Page 28
29. /****** Object: UserDefinedFunction [dbo].[ufn_SetStringLength] Script Date: 12/12/2013 14:57:54
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_SetStringLength]
@InString nvarchar(max),
@StringLength int,
@FillCharacter char(1)
(
)
RETURNS nvarchar(max)
AS
IF (@StringLength > LEN(@InString))
WHILE ( LEN(@InString) < @StringLength)
SET @InString = @FillCharacter + @InString;
BEGIN
END
BEGIN
END
--ELSE
--BEGIN
-- --SET @InString = 'ERROR: Length setting integer is less than length of the input string.';
--END
RETURN @InString;
BEGIN
END
ufn_SetStringLength
Thursday, December 12, 2013 2:49 PM
Functions Page 29
30. /****** Object: UserDefinedFunction [dbo].[ufn_Transaction_K_Unique_Action_code] Script Date:
12/12/2013 14:58:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Transaction_K_Unique_Action_code]
@InCode nvarchar(1)
(
)
RETURNS nvarchar(1)
AS
DECLARE @actioncode nvarchar(1);
IF(@InCode = 'V')
SET @actioncode = '-';
BEGIN
END
ELSE
SET @actioncode = 'M';
BEGIN
END
RETURN @actioncode;
BEGIN
END
ufn_Transaction_K_Unique_Action_code
Thursday, December 12, 2013 2:49 PM
Functions Page 30
31. /****** Object: UserDefinedFunction [dbo].[ufn_Transaction_K_Unique_Check_net] Script Date:
12/12/2013 14:58:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
@Emp_no nvarchar(10),
@Employer_code nvarchar(3),
@Check_date nvarchar(10),
@Check_number nvarchar(12),
@Signcode int
)
ALTER FUNCTION [dbo].[ufn_Transaction_K_Unique_Check_net] (
RETURNS nvarchar(13)
WITH SCHEMABINDING
AS
DECLARE @Temp_net nvarchar(13), @Check_net nvarchar(13);
FROM dbo.GFSISSY26 AS g6
RTRIM(LTRIM(g6.Emp_no)) = @Emp_no
AND
RTRIM(LTRIM(g6.Employer_code)) = @Employer_code
AND
RTRIM(LTRIM(g6.Check_date)) = @Check_date
AND
RTRIM(LTRIM(g6.Check_number)) = @Check_number;
WHERE
SELECT RTRIM(LTRIM(g6.Check_net))
DECLARE netcrs CURSOR FOR
OPEN netcrs;
FETCH NEXT FROM netcrs INTO @Temp_net;
SET @Check_net = NULL;
WHILE (@@FETCH_STATUS = 0)
IF(@@ROWCOUNT = 1)
SET @Check_net = @Temp_net;
BEGIN
END
ELSE IF(@@ROWCOUNT > 1)
IF (@Signcode = SIGN(@Temp_net))
SET @Check_net = @Temp_net;
BEGIN
END
BEGIN
END
FETCH NEXT FROM netcrs INTO @Temp_net;
BEGIN
END
IF(@Check_net IS NULL)
FROM dbo.GFSISSY26 AS g6
RTRIM(LTRIM(g6.Emp_no)) = @Emp_no
AND
RTRIM(LTRIM(g6.Employer_code)) = @Employer_code
AND
RTRIM(LTRIM(g6.Check_date)) = @Check_date
AND
RTRIM(LTRIM(g6.Check_number)) = @Check_number;
WHERE
SELECT TOP 1 @Check_net = g6.Check_net
BEGIN
BEGIN
ufn_Transaction_K_Unique_Check_net
Thursday, December 12, 2013 2:50 PM
Functions Page 31
33. /****** Object: UserDefinedFunction [dbo].[ufn_Transaction_K_Unique_ToDateCode] Script Date:
12/12/2013 14:58:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[ufn_Transaction_K_Unique_ToDateCode]
@check_date date
(
)
RETURNS nvarchar(1)
AS
DECLARE @todatecode nvarchar(1);
IF(DATEDIFF(day,'2013-07-01',@check_date) > 0)
SET @todatecode = '3';
BEGIN
END
ELSE
SET @todatecode = '5';
BEGIN
END
RETURN @todatecode;
BEGIN
END
ufn_Transaction_K_Unique_ToDateCode
Thursday, December 12, 2013 2:50 PM
Functions Page 33