The document discusses object-oriented programming using C#. It covers implementing reading and writing text and binary files, the Windows file system, and exceptions. Key topics include using StreamReader/StreamWriter for text files, BinaryReader/BinaryWriter for binary files, and DirectoryInfo/FileInfo to work with directories and files. Exceptions occur when errors happen at runtime, and include syntax errors, runtime errors, and logical errors.
The document discusses object-oriented programming using C#. It covers using static variables and functions, components of the .NET framework including the common language runtime and class library, and using the Visual Studio IDE to create and run projects. Specifically, it will teach how to use static variables and functions, identify .NET framework components, and use the Visual Studio IDE.
This document discusses object-oriented programming concepts in C#, including constructors, destructors, polymorphism, function overloading, and operator overloading. Constructors initialize objects, destructors release objects from memory, and polymorphism allows one interface to have multiple implementations. Function overloading uses the same name for functions that differ in parameters, while operator overloading extends operators to user-defined types.
The document discusses object-oriented programming concepts in C#, including abstract classes, sealed classes, interfaces, and file input/output operations. Abstract classes provide a partial implementation of an interface and contain abstract methods to be implemented in derived classes. Sealed classes cannot be inherited from. Interfaces define properties and methods without implementation. File input/output uses streams to read from and write to files, with the FileStream class opening and accessing files.
The document discusses object-oriented programming concepts in C#, including describing memory allocation for value and reference types, using structures, enumerations, arrays, collections, and ArrayList. It provides examples of declaring and initializing these items as well as manipulating array elements and properties/methods of collections.
The document discusses object-oriented programming concepts in C#, including overloading unary and binary operators, identifying relationships between classes like inheritance and composition, and using classes and inheritance. It provides examples and demonstrations of these concepts.
This document discusses object-oriented programming concepts in C#, including delegates, events, and attributes. It explains that delegates allow methods to be passed as arguments and invoked, and that there are single-cast and multicast delegates. Events use the publisher-subscriber model where a publisher raises an event and subscribers handle the event. Attributes provide metadata for classes, methods and other code elements.
This document discusses object-oriented programming using C#. It covers multiple topics related to multithreading like implementing multiple threads, identifying thread priority, using synchronization in threads, and communication between processes. It also provides an example of developing a Hangman game application.
The document discusses object-oriented programming using C# and covers several topics:
1) Handling exceptions by using try, catch, and finally blocks to handle errors.
2) Implementing user-defined exceptions by deriving from the ApplicationException class.
3) Implementing threads to allow concurrent execution, with the main thread created automatically and additional child threads created using the Thread class.
The document discusses object-oriented programming using C#. It covers using static variables and functions, components of the .NET framework including the common language runtime and class library, and using the Visual Studio IDE to create and run projects. Specifically, it will teach how to use static variables and functions, identify .NET framework components, and use the Visual Studio IDE.
This document discusses object-oriented programming concepts in C#, including constructors, destructors, polymorphism, function overloading, and operator overloading. Constructors initialize objects, destructors release objects from memory, and polymorphism allows one interface to have multiple implementations. Function overloading uses the same name for functions that differ in parameters, while operator overloading extends operators to user-defined types.
The document discusses object-oriented programming concepts in C#, including abstract classes, sealed classes, interfaces, and file input/output operations. Abstract classes provide a partial implementation of an interface and contain abstract methods to be implemented in derived classes. Sealed classes cannot be inherited from. Interfaces define properties and methods without implementation. File input/output uses streams to read from and write to files, with the FileStream class opening and accessing files.
The document discusses object-oriented programming concepts in C#, including describing memory allocation for value and reference types, using structures, enumerations, arrays, collections, and ArrayList. It provides examples of declaring and initializing these items as well as manipulating array elements and properties/methods of collections.
The document discusses object-oriented programming concepts in C#, including overloading unary and binary operators, identifying relationships between classes like inheritance and composition, and using classes and inheritance. It provides examples and demonstrations of these concepts.
This document discusses object-oriented programming concepts in C#, including delegates, events, and attributes. It explains that delegates allow methods to be passed as arguments and invoked, and that there are single-cast and multicast delegates. Events use the publisher-subscriber model where a publisher raises an event and subscribers handle the event. Attributes provide metadata for classes, methods and other code elements.
This document discusses object-oriented programming using C#. It covers multiple topics related to multithreading like implementing multiple threads, identifying thread priority, using synchronization in threads, and communication between processes. It also provides an example of developing a Hangman game application.
The document discusses object-oriented programming using C# and covers several topics:
1) Handling exceptions by using try, catch, and finally blocks to handle errors.
2) Implementing user-defined exceptions by deriving from the ApplicationException class.
3) Implementing threads to allow concurrent execution, with the main thread created automatically and additional child threads created using the Thread class.
The document provides an overview of object-oriented programming using C#. It discusses the rationale for using an object-oriented approach and describes the key concepts like classes, objects, states, behaviors, and interactions. It also outlines the objectives of learning about features of OOP methodology, defining classes and variables in C#, and writing and executing C# programs. The document uses examples like a car class to illustrate concepts like classes, objects, states and behaviors.
This document discusses object-oriented programming concepts like abstraction, encapsulation, and methods. It defines abstraction as extracting only relevant information and encapsulation as packaging components together. It also explains how to implement encapsulation using access specifiers, define methods by specifying elements like return types and parameters, and call methods by passing relevant arguments.
The document discusses creating and using custom attributes in C#. It explains how to define a custom attribute class, apply the AttributeUsage attribute, name and construct the attribute, and apply it to a target element. It also covers retrieving metadata about custom attributes at runtime using reflection and the main uses of reflection like viewing metadata, type discovery, and late binding.
This document provides an overview of GUI application development using the .NET framework. It discusses how users interact with applications through graphical user interfaces using windows and controls. It aims to teach students core skills for developing Windows Forms applications in .NET. Key topics covered include GUI controls, features of the Windows environment like event-driven programming, and components of the .NET framework.
This document provides an overview of key Java programming concepts including: identifiers, primitive and reference data types, variables, objects, casting, conditional statements like if/else and switch, and looping statements like for, while, and do-while loops. It describes how to declare variables, construct objects, pass arguments, use this, and control flow with break/continue. The goal is to teach basic Java syntax and programming structures.
The document provides an overview of key Java programming concepts including: the features of Java technology; the primary goals and functions of the Java Virtual Machine and garbage collection; how Java source files are compiled and executed; the three main tasks of the JVM; modeling concepts like abstraction and encapsulation; and how to declare classes, methods, and constructors in Java. It also summarizes how packages, imports, and the Java API documentation work.
The document discusses casting and conversion in Java. It covers implicit and explicit type conversions, including widening, narrowing, and casting conversions. It also discusses overloading constructors in Java by defining multiple constructor methods with the same name but different parameters. The document provides examples of casting integer and double values to byte type, as well as overloading the Cuboid constructor to calculate volumes for rectangles and squares.
This document provides an overview of C# and .NET framework concepts including:
- C# is a type-safe, object-oriented language that runs on the .NET framework and CLR.
- Key C# concepts covered include variables, value types, reference types, classes, interfaces, inheritance, namespaces, operators, and control flow statements.
- The .NET framework provides a common language runtime, class library, and tools for building applications across platforms.
Win32/Flamer: Reverse Engineering and Framework ReconstructionAlex Matrosov
In this talk one wouldn’t see any speculations on state-sponsored cyber-espionage and сonspirology theories on cyber weapon development. In the presentation authors will concentrate on different approaches to analysis of the malware based on object oriented architecture with respect to one of the most complex threat ever known while AV industry exists: Win32/Flamer. The authors will present methods of analysis of the malware developed in the course of research of such threats as Stuxnet, Duqu and Festi. The talk will shed light on the problems the researchers face during investigation of complex threats and the ways to deal with them using tools by Hex-Rays. The authors will also present the result of research on reconstructing framework which was used to construct Win32/Flamer and will show its similarity with Stuxnet/Duqu/Gauss with respect to code and architecture.
The document provides an overview of the .NET framework including its architecture, components like the Common Language Runtime (CLR), intermediate language (IL), advantages of IL like platform independence and language interoperability. It discusses .NET framework versions, data types in C# like value types and reference types, variable declaration and scope, and basic input/output using the console.
The document discusses low-level input/output in C programming. It explains that low-level I/O provides direct access to files and devices using functions like open(), close(), read(), and write(). A file descriptor returned from open() is used to track the file state. Random access is possible using lseek() to position the file pointer non-sequentially.
My session in Wearable DevCon 2014, Burlingame, CA
[Note: now the conference is called "Wearable Tech Con" ]
The session gives an introduction to using the Java Native Interface (JNI) in Java, and in particular in the Android Platform. The session then covers the use of the Native Development Kit (NDK) for developing Android applications.
The document discusses .NET Framework and the C# programming language. It defines .NET as a platform-neutral framework that supports multiple languages and provides common class libraries. When code is compiled, it is converted to an intermediate language (IL) rather than native machine code. At runtime, the .NET Framework uses just-in-time compilation to convert IL to native code. This allows .NET applications to run on different operating systems and processors. The framework also includes a common language runtime, class libraries, and supports languages like C# and VB.NET.
The document discusses Ron Munitz's background and expertise, which includes distributed fault tolerant systems, highly distributed video routers, real-time embedded systems, Android, and enterprise mobility and security. It provides an agenda for a talk on the Java Native Interface (JNI) and native Android apps. The agenda includes an introduction to JNI theory and a "Hello World" tutorial, followed by a discussion of JNI in the Android Open Source Project (AOSP) and writing native Android apps.
The document discusses variables, constants, data types, operators, and representing decisions in flowcharts. It provides examples of flowcharts that accept input values, perform calculations using variables and operators, and make decisions based on conditional logic. The key concepts covered include declaring variables, numeric and character data types, arithmetic, relational and logical operators, and using decision boxes in flowcharts to represent conditional statements. Exercises are included to apply these concepts in drawing flowcharts to solve problems involving decisions and calculations.
The document provides an introduction to the Java programming language. It discusses Java's characteristics like being simple, object-oriented, portable, and secure. It also describes Java's architecture including the Java programming language, class files, Java Virtual Machine, and Application Programming Interface. Additionally, it covers Java fundamentals like data types, variables, literals, and arrays.
The document discusses .NET framework and how to create shared assemblies and DLL files in .NET. It provides an introduction to .NET and its components like CLR, CLS, CTS. It describes how to create a shared assembly by generating a key file, adding it to a project before compilation, and installing the assembly into the GAC. It also outlines the steps to create a DLL file by making a class library project instead of a console app and accessing the generated DLL from another project.
The document discusses the .NET framework, its key components, and how it works. The .NET framework includes the Common Language Runtime (CLR) which loads and executes code. It provides a common type system and language interoperability through the Common Type System (CTS) and Common Language Specification (CLS). The framework includes class libraries and supports multiple programming languages like C# and VB.NET which compile to Microsoft Intermediate Language (MSIL) for execution by the CLR.
C# classes allow for modularity, data encapsulation, inheritance, and polymorphism. They act as blueprints for generating object instances. The document discusses key object-oriented programming concepts in C# like encapsulation, inheritance, polymorphism, casting, exception handling, garbage collection, interfaces, collections, comparables, and delegates. It provides examples to illustrate concepts like shallow cloning using ICloneable, implementing IComparable, overloading operators, and using XML documentation comments.
The document discusses the key components of the .NET Framework, which are the Common Language Runtime (CLR) and .NET Framework Class Library. The CLR provides a managed code execution environment and handles memory management. It converts code to Microsoft Intermediate Language. The .NET Framework Class Library contains reusable classes and methods for common tasks like file access and database interaction. The document also briefly outlines the Common Type System and Common Language Specification which define common data types and rules for languages targeting the .NET Framework.
The document provides an overview of key Java programming concepts including final classes and methods, enumerated types, static imports, abstract classes and interfaces, exceptions, assertions, and creating custom exceptions. It discusses how to use these concepts and includes code examples.
The document discusses creating and using .NET components. It covers identifying different types of components, the life cycle of a component, implementing polymorphism in components, using COM components in .NET, declaring properties and methods for a component, referencing the component from a user interface, and the role of assemblies in .NET.
The document provides an overview of object-oriented programming using C#. It discusses the rationale for using an object-oriented approach and describes the key concepts like classes, objects, states, behaviors, and interactions. It also outlines the objectives of learning about features of OOP methodology, defining classes and variables in C#, and writing and executing C# programs. The document uses examples like a car class to illustrate concepts like classes, objects, states and behaviors.
This document discusses object-oriented programming concepts like abstraction, encapsulation, and methods. It defines abstraction as extracting only relevant information and encapsulation as packaging components together. It also explains how to implement encapsulation using access specifiers, define methods by specifying elements like return types and parameters, and call methods by passing relevant arguments.
The document discusses creating and using custom attributes in C#. It explains how to define a custom attribute class, apply the AttributeUsage attribute, name and construct the attribute, and apply it to a target element. It also covers retrieving metadata about custom attributes at runtime using reflection and the main uses of reflection like viewing metadata, type discovery, and late binding.
This document provides an overview of GUI application development using the .NET framework. It discusses how users interact with applications through graphical user interfaces using windows and controls. It aims to teach students core skills for developing Windows Forms applications in .NET. Key topics covered include GUI controls, features of the Windows environment like event-driven programming, and components of the .NET framework.
This document provides an overview of key Java programming concepts including: identifiers, primitive and reference data types, variables, objects, casting, conditional statements like if/else and switch, and looping statements like for, while, and do-while loops. It describes how to declare variables, construct objects, pass arguments, use this, and control flow with break/continue. The goal is to teach basic Java syntax and programming structures.
The document provides an overview of key Java programming concepts including: the features of Java technology; the primary goals and functions of the Java Virtual Machine and garbage collection; how Java source files are compiled and executed; the three main tasks of the JVM; modeling concepts like abstraction and encapsulation; and how to declare classes, methods, and constructors in Java. It also summarizes how packages, imports, and the Java API documentation work.
The document discusses casting and conversion in Java. It covers implicit and explicit type conversions, including widening, narrowing, and casting conversions. It also discusses overloading constructors in Java by defining multiple constructor methods with the same name but different parameters. The document provides examples of casting integer and double values to byte type, as well as overloading the Cuboid constructor to calculate volumes for rectangles and squares.
This document provides an overview of C# and .NET framework concepts including:
- C# is a type-safe, object-oriented language that runs on the .NET framework and CLR.
- Key C# concepts covered include variables, value types, reference types, classes, interfaces, inheritance, namespaces, operators, and control flow statements.
- The .NET framework provides a common language runtime, class library, and tools for building applications across platforms.
Win32/Flamer: Reverse Engineering and Framework ReconstructionAlex Matrosov
In this talk one wouldn’t see any speculations on state-sponsored cyber-espionage and сonspirology theories on cyber weapon development. In the presentation authors will concentrate on different approaches to analysis of the malware based on object oriented architecture with respect to one of the most complex threat ever known while AV industry exists: Win32/Flamer. The authors will present methods of analysis of the malware developed in the course of research of such threats as Stuxnet, Duqu and Festi. The talk will shed light on the problems the researchers face during investigation of complex threats and the ways to deal with them using tools by Hex-Rays. The authors will also present the result of research on reconstructing framework which was used to construct Win32/Flamer and will show its similarity with Stuxnet/Duqu/Gauss with respect to code and architecture.
The document provides an overview of the .NET framework including its architecture, components like the Common Language Runtime (CLR), intermediate language (IL), advantages of IL like platform independence and language interoperability. It discusses .NET framework versions, data types in C# like value types and reference types, variable declaration and scope, and basic input/output using the console.
The document discusses low-level input/output in C programming. It explains that low-level I/O provides direct access to files and devices using functions like open(), close(), read(), and write(). A file descriptor returned from open() is used to track the file state. Random access is possible using lseek() to position the file pointer non-sequentially.
My session in Wearable DevCon 2014, Burlingame, CA
[Note: now the conference is called "Wearable Tech Con" ]
The session gives an introduction to using the Java Native Interface (JNI) in Java, and in particular in the Android Platform. The session then covers the use of the Native Development Kit (NDK) for developing Android applications.
The document discusses .NET Framework and the C# programming language. It defines .NET as a platform-neutral framework that supports multiple languages and provides common class libraries. When code is compiled, it is converted to an intermediate language (IL) rather than native machine code. At runtime, the .NET Framework uses just-in-time compilation to convert IL to native code. This allows .NET applications to run on different operating systems and processors. The framework also includes a common language runtime, class libraries, and supports languages like C# and VB.NET.
The document discusses Ron Munitz's background and expertise, which includes distributed fault tolerant systems, highly distributed video routers, real-time embedded systems, Android, and enterprise mobility and security. It provides an agenda for a talk on the Java Native Interface (JNI) and native Android apps. The agenda includes an introduction to JNI theory and a "Hello World" tutorial, followed by a discussion of JNI in the Android Open Source Project (AOSP) and writing native Android apps.
The document discusses variables, constants, data types, operators, and representing decisions in flowcharts. It provides examples of flowcharts that accept input values, perform calculations using variables and operators, and make decisions based on conditional logic. The key concepts covered include declaring variables, numeric and character data types, arithmetic, relational and logical operators, and using decision boxes in flowcharts to represent conditional statements. Exercises are included to apply these concepts in drawing flowcharts to solve problems involving decisions and calculations.
The document provides an introduction to the Java programming language. It discusses Java's characteristics like being simple, object-oriented, portable, and secure. It also describes Java's architecture including the Java programming language, class files, Java Virtual Machine, and Application Programming Interface. Additionally, it covers Java fundamentals like data types, variables, literals, and arrays.
The document discusses .NET framework and how to create shared assemblies and DLL files in .NET. It provides an introduction to .NET and its components like CLR, CLS, CTS. It describes how to create a shared assembly by generating a key file, adding it to a project before compilation, and installing the assembly into the GAC. It also outlines the steps to create a DLL file by making a class library project instead of a console app and accessing the generated DLL from another project.
The document discusses the .NET framework, its key components, and how it works. The .NET framework includes the Common Language Runtime (CLR) which loads and executes code. It provides a common type system and language interoperability through the Common Type System (CTS) and Common Language Specification (CLS). The framework includes class libraries and supports multiple programming languages like C# and VB.NET which compile to Microsoft Intermediate Language (MSIL) for execution by the CLR.
C# classes allow for modularity, data encapsulation, inheritance, and polymorphism. They act as blueprints for generating object instances. The document discusses key object-oriented programming concepts in C# like encapsulation, inheritance, polymorphism, casting, exception handling, garbage collection, interfaces, collections, comparables, and delegates. It provides examples to illustrate concepts like shallow cloning using ICloneable, implementing IComparable, overloading operators, and using XML documentation comments.
The document discusses the key components of the .NET Framework, which are the Common Language Runtime (CLR) and .NET Framework Class Library. The CLR provides a managed code execution environment and handles memory management. It converts code to Microsoft Intermediate Language. The .NET Framework Class Library contains reusable classes and methods for common tasks like file access and database interaction. The document also briefly outlines the Common Type System and Common Language Specification which define common data types and rules for languages targeting the .NET Framework.
The document provides an overview of key Java programming concepts including final classes and methods, enumerated types, static imports, abstract classes and interfaces, exceptions, assertions, and creating custom exceptions. It discusses how to use these concepts and includes code examples.
The document discusses creating and using .NET components. It covers identifying different types of components, the life cycle of a component, implementing polymorphism in components, using COM components in .NET, declaring properties and methods for a component, referencing the component from a user interface, and the role of assemblies in .NET.
1. The document describes an algorithm for deleting a node from a threaded binary tree.
2. It involves marking the left child of the header node as the current node, and the header node as the parent node.
3. It then repeats steps to traverse the tree and mark the current and parent nodes until it finds the node to delete or the current node becomes null.
This document outlines a case study to design a new software system for Horizon Airways using object-oriented analysis and design with UML. Students will analyze the case study of Horizon Airways and create UML diagrams including a communication diagram, state machine diagram, activity diagram, component diagram, and deployment diagram to model the system.
1. The document discusses various topics related to Java applets including trusted and untrusted applets, drawing methods, setting text properties, the GridBag layout manager, and anonymous classes.
2. It provides details on the differences between trusted and untrusted applets and how to create a policy to make an applet trusted.
3. It also describes advanced drawing methods, how to set colors, fonts, and text properties in applets, and how to use the GridBag layout manager and anonymous classes.
This document recaps key concepts from object-oriented methodology including polymorphism, inheritance, file input/output, data structures, and sorting. Specifically, it provides code snippets and questions about classes, destructors, merging arrays, operator overloading, inheritance hierarchies, file reading/writing using classes, linked list operations, postfix notation, queue types, and the steps for selection and merge sorts.
The course aims to provide you with an understanding of the fundamental concepts involved in object-oriented programming (object, class, protocol, hierarchy, inheritance, encapsulation, polymorphism and collaboration).
The programming language you will use is Java. However, the purpose of the course is not to teach you the minutiae of the Java language, but rather to teach you fundamental object-oriented programming concepts and skills that will be transferable to any object¬ oriented language
This document provides an overview of data models, including:
- Defining database management systems and their purpose in maintaining databases.
- Describing the two categories of data models: object-based logical models like the entity-relationship model, and record-based logical models including hierarchical, network, and relational models.
- Explaining key concepts of the entity-relationship model including entities, attributes, relationships, and relationship types.
- Introducing the relational database management system and how data is organized into tables with rows, columns, primary keys, and relationships defined by primary and foreign keys.
The document discusses JDBC and provides information on its objectives, architecture, drivers, API, and how to create JDBC applications. The key points covered are that JDBC has two layers - the application layer and driver layer; there are four types of JDBC drivers; and the main steps to create a JDBC application are to load a driver, connect to a database, create and execute statements, and handle exceptions.
This document discusses measuring software projects and processes. It describes measuring a project using function points, which involves counting files, interfaces, inputs, outputs and inquiries. Calculating function points involves determining the unadjusted function point count and a value adjustment factor based on general system characteristics. The adjusted function point value provides an estimate of the size of the project.
This document discusses Java API for XML Registries (JAXR), the wscompile tool, web service security, and quality of service of web services. Specifically, it covers that JAXR provides a common interface for accessing different registries, the wscompile tool generates WSDL and helper classes from a configuration file, web service security can be at the transport or message layer, and quality of service depends on factors like performance, reliability, and accessibility.
This session is all about - the mechanism provided by Java Virtual Machine to reclaim heap space from objects which are eligible for Garbage collection.
This document introduces hashing techniques. It discusses how hashing works by using a hashing function to convert a key into a location to retrieve a record. It describes common hashing techniques like hash indexes and hash tables. It also covers how collisions are handled using methods like rehashing and chaining. Finally, it provides an example to illustrate creating a hash table.
Understanding Java Garbage Collection - And What You Can Do About ItAzul Systems Inc.
Garbage collection is an integral but often misunderstood part of application behavior on Java platforms. As such, it is important for Java developers to understand how collector mechanisms work. This presentation reviews and classifies the major garbage collectors available in JVMs today. Following an overview of common garbage collection techniques such as generational, parallel, stop-the-world, incremental, and concurrent algorithms, it defines terms and metrics common to all collectors. It also discusses trade-offs in balancing requirements for responsiveness, throughput, space, and available memory and covers some pitfalls, common misconceptions, and garbage collection behavior myths.
The document discusses in-built functions in C++, command line parameters, and function pointers. It provides examples of commonly used string functions like strcpy, strcat, and strlen as well as numeric functions like abs, ceil, and sqrt. It explains that command line parameters allow passing values to programs during execution and are accessed through argc and argv. Function pointers are variables that store the address of a function and can be initialized with a function name.
This document introduces object-oriented programming. It compares procedural programming with OOP, noting that OOP models real-world problems more accurately. It identifies advantages of OOP like reusability, modularity, and information hiding. The document also discusses classes and objects as the basic building blocks of OOP and provides examples of applications like games and CAD/CAM that benefit from OOP.
Here are the answers to the self-check:
I. V 1.) Salary
I 2.) $dollar
V 3.) _main
I 4.) const
V 5.) previous year
I 6.) yahoo!
I 7.) else
V 8.) Float
I 9.) <date>
V 10.) 2_Version
II. I 1.) System.out.print(“Ingat ka!”, V);
C 2.) boolean B
The document discusses Java 2 Enterprise Edition (J2EE) application security. It covers security threat assessment, the Java 2 security model, and Java security APIs. The Java 2 security model provides access controls and allows downloading and running applications securely. It uses techniques like cryptography, digital signatures, and SSL. The Java Cryptography Extensions API provides methods for encrypting data, generating keys, and authentication.
The document provides an introduction to computer programming and programming languages. It discusses that a computer program is a list of instructions that tells the computer what to do. All programs accept input, process data, and display output. Programming languages allow programmers to write these instructions, with earlier languages like machine code using binary and newer high-level languages using vocabulary like English. Common features of all programming languages include instructions for input, output, mathematics, conditional execution, and repetition. The document introduces the BASIC programming language as an example.
The document discusses file handling in C# and various classes used for input/output streams. It describes classes like BinaryReader, BinaryWriter, Stream, FileStream, MemoryStream, BufferedStream, NetworkStream, CryptoStream, Directory, File, FileSystemInfo, TextReader, StreamReader, TextWriter, and StreamWriter. It provides examples to demonstrate reading and writing files and streams using these classes. The objectives are to discuss stream handling in C#, list methods for file I/O, and implement file handling using C#.
This document provides an overview of file handling in C#, including:
- Files are collections of data stored on disk with a name and path, and become streams when opened for reading or writing. Streams represent the sequence of bytes passing through.
- The System.IO namespace contains classes for performing file operations like creating, deleting, reading and writing files. Classes include FileStream for file operations, StreamWriter for writing characters to a stream, and StreamReader for reading strings from a stream.
- Serialization converts an object to a byte stream to save to memory, file or database. Deserialization reverses this process. The SerializableAttribute is required for serialization.
This document discusses reading and writing files in .NET applications. It describes the key classes for input and output streams, including File, Directory, StreamReader, and StreamWriter. These classes allow applications to read from and write to files to store and transfer data.
The document provides an overview of input/output streams and serialization in C#. It discusses how streams are used for reading and writing files and describes classes like FileStream, StreamWriter, and StreamReader that provide methods for working with files. It also explains serialization and deserialization in C# - the processes of converting an object into a byte stream and back, and describes how to apply the SerializableAttribute to allow objects to be serialized.
ADO.NET is a data access technology from Microsoft that provides communication between relational and non-relational systems through common components. It allows programs written in different languages to share classes and uses object-oriented programming principles. Key classes in ADO.NET include Connection, which controls connections to databases, and Dataset, which offers common functions for metadata. Serialization converts objects to bytes for storage or transmission, while deserialization reconstructs objects from data.
The document discusses Java input/output (I/O) streams and classes for file handling. It describes common stream classes like FileInputStream, FileOutputStream, BufferedInputStream, BufferedOutputStream, and FileReader/FileWriter. It also covers serialization, which allows writing the state of an object to a byte stream. Serialization is useful for technologies like RMI, JPA, and JMS that require object state to travel over a network.
The document discusses various input and output stream classes in Java. It defines streams as an abstraction that produces or consumes information linked to an I/O device. There are two types of streams - byte streams that handle binary data using classes like InputStream and OutputStream, and character streams that handle text using classes like Reader and Writer. The Java I/O package defines hierarchies for these stream classes, with subclasses that handle specific I/O devices or add functionality like buffering or filtering.
The document discusses various input and output stream classes in Java. It defines streams as an abstraction that produces or consumes information linked to an I/O device. There are two types of streams - byte streams that handle binary data using classes like InputStream and OutputStream, and character streams that handle text using classes like Reader and Writer. The Java I/O package defines hierarchies for these stream classes, with subclasses that handle specific I/O devices or add functionality like buffering or filtering.
In this session you will learn:
Streams
Using a stream
Manipulating the input data
Basics of the LineReader constructor
The LineWriter class
Flushing the buffer
PrintWriter
About FileDialogs
Typical FileDialog window
FileDialog constructors
Useful FileDialog methods I
Useful FileDialog methods II
Serialization
Conditions for serializability
Writing objects to a file
For more information, visit this link: https://www.mindsmapped.com/courses/software-development/online-java-training-for-beginners/
This document provides an overview of the .NET framework and Visual Basic .NET. It discusses how .NET improves on previous platforms by having a common language runtime (CLR) and class library, making development easier and code more portable. It also summarizes VB.NET features like being object-oriented and type-safe while retaining ease of use. Code compilation in VB.NET involves converting to MSIL rather than native machine code for portability.
SQLBits X SQL Server 2012 Rich Unstructured DataMichael Rys
SQL Server 2012 introduces new full-text search capabilities that allow rich semantic search over documents stored in SQL Server. The key features include:
1) Integrated full-text indexing and search over both structured and unstructured data stored in SQL Server tables.
2) Semantic search capabilities that understand relationships between concepts and terms in documents.
3) Support for filtering search results based on document properties and metadata.
This document provides an introduction to the linker and linking process. It discusses how a linker binds external references in object files to the correct memory addresses. The key steps are:
1. The linker takes object files generated by the compiler and combines them into a single executable.
2. It performs relocation which modifies the object code to reflect the actual memory addresses assigned during linking.
3. The linking process resolves symbols and allows references between separate object programs to be combined into a fully linked executable.
This document provides an overview of key concepts to be covered in a Java programming language session, including:
1. Writing programs that use command-line arguments, system properties, and standard input/output.
2. Creating, reading and writing files.
3. Understanding the basic collections hierarchy and writing programs using sets, lists, and generic collections.
4. Iterating over collections.
Docker is a tool that allows applications to run in isolated containers. It uses technologies like namespaces, control groups, and union filesystems to provide portable and lightweight runtime environments. Neo4j is a graph database that represents data in nodes and relationships. It allows for fast traversal of connected data and is useful when applying graph theory to large datasets. Both Docker and Neo4j are relevant today due to their abilities to modularize and connect distributed applications and data.
The document provides an overview of containers and Docker. It discusses why containers are important for organizing software, improving portability, and protecting infrastructure. It describes key Docker concepts like images, containers, Dockerfile for building images, and tools like Docker Compose and Docker Swarm for defining and running multi-container apps. The document recommends reading "The Art of War" and scanning systems without being detected before potentially more intrusive activities. It also briefly introduces network security pillars and buffer overflows as an attack technique.
This document provides an overview of input/output operations in Java using the java.io package. It discusses streams and channels, file I/O, reading and writing files, serialization, and the Observer and Observable interfaces. The key classes covered include File, PrintWriter, Scanner, InputStream, OutputStream, Reader, Writer, Buffer, Channel, and classes for serialization. Examples are provided for reading and writing files using byte streams, character streams, buffers, and channels.
This document provides an introduction and overview of Docker and containers. It discusses what containers are, how they differ from virtual machines, and how Docker works. Key points covered include common Docker commands, the Docker architecture, building images with Dockerfiles, and using Docker Compose to run multi-container applications. The benefits of containers for streamlining deployment and rapid scaling are also highlighted.
This document discusses collections and collection interfaces in the .NET Framework 2.0. It covers examining various collection types like arrays, lists, stacks, queues and dictionaries. It also discusses implementing generic and specialized collection classes. The document discusses creating custom collections using collection base classes and creating assemblies.
The document discusses legacy connectivity and protocols. It describes legacy integration as integrating J2EE components with legacy systems. The key approaches to legacy integration are data level integration, application interface integration, method level integration, and user interface level integration. Legacy connectivity can be achieved using Java Native Interface (JNI), J2EE Connector Architecture, and web services. JNI allows Java code to call native methods written in other languages like C/C++. The J2EE Connector Architecture standardizes connectivity through resource adapters. Web services provide a platform-independent approach through XML protocols.
The document discusses messaging and internationalization. It covers messaging using Java Message Service (JMS), including the need for messaging, messaging architecture, types of messaging, messaging models, messaging servers, components of a JMS application, developing effective messaging solutions, and implementing JMS. It also discusses internationalizing J2EE applications.
The document discusses various security tools in Java including keytool, jarsigner, and policytool. Keytool is used to manage keystores containing private keys and certificates. It can generate key pairs, import/export certificates, and list keystore contents. Jarsigner signs JAR files using certificates from a keystore. Policytool creates and edits security policy files specifying user permissions. The document provides details on using each tool's commands and options.
This document discusses EJB technology and provides summaries of key concepts:
1. It defines the EJB container model and describes features like security, distributed access, and lifecycle management.
2. It compares the lifecycles of stateless session beans, stateful session beans, entity beans, and message-driven beans.
3. It contrasts stateful and stateless session beans and discusses differences in client state, pooling, lifecycles, and more. It also compares session beans and entity beans in terms of representing processes versus data.
This document discusses behavioral design patterns and J2EE design patterns. It provides descriptions and class diagrams for several behavioral patterns, including Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, and Visitor. It also defines what a J2EE design pattern is and notes that J2EE patterns are categorized into the presentation, business, and integration tiers of an enterprise application.
This document provides an overview of EJB in J2EE architecture and EJB design patterns. It discusses the key characteristics of using EJB in J2EE architecture, including supporting multiple clients, improving reliability and productivity, supporting large scale deployment, developing transactional applications, and implementing security. It also outlines several EJB design patterns, such as client-side interaction patterns, EJB layer architectural patterns, inter-tier data transfer patterns, and transaction/persistence patterns.
This document discusses design patterns and provides examples of structural and behavioral design patterns. It describes the adapter, bridge, composite, decorator, facade, flyweight, proxy, chain of responsibility, and command patterns. Structural patterns are concerned with relationships and responsibilities between objects, while behavioral patterns focus on communication between objects. Examples of UML diagrams are provided to illustrate how each pattern can be modeled.
The document discusses UML diagrams that can be used to model J2EE applications, including use case diagrams, class diagrams, package diagrams, sequence diagrams, collaboration diagrams, state diagrams, activity diagrams, component diagrams, and deployment diagrams. It provides examples of each diagram type using a case study of an online bookstore system. The use case diagram shows use cases and actors, the class diagram shows classes and relationships, and other diagrams demonstrate how specific interactions, workflows, and system configurations can be modeled through different UML diagrams.
This document discusses design patterns and selecting appropriate patterns based on business requirements. It provides an overview of design patterns available in TheServerSide.com pattern catalog, which are organized into categories like EJB layer architectural patterns, inter-tier data transfer patterns, transaction and persistence patterns, and client-side EJB interaction patterns. Examples of patterns in each category are described. Best practices for developing class diagrams and using proven design patterns are also mentioned.
This document provides an overview of J2EE architecture. It defines architecture as the study of designing J2EE applications and discusses architectural concepts like attributes, models, and terminology. It describes the role of an architect and phases of architectural design. The document outlines the various components of J2EE like clients, web components, business components and containers. It also discusses key aspects of J2EE architecture like application areas, issues, technologies and available application servers.
The document discusses various topics related to collaboration and distributed systems including network communication in distributed environments, application integration using XML, and legacy integration technologies. Specifically, it covers factors that affect network performance like bandwidth and latency. It also describes using XML for data mapping between applications and data stores. Finally, it discusses different legacy integration methods like screen scraping, object mapping tools, and using off-board servers.
The document discusses JavaBean properties, property editors, and the classes used to implement them in Java. It describes the PropertyEditorSupport class and its methods for creating customized property editors. The PropertyDescriptor class and BeanInfo interface provide information about JavaBean properties, events, and methods. The document also provides tips on using sample JavaBeans from BDK1.1 in Java 2 SDK and creating a manifest file for multiple JavaBeans. Common questions about JavaBeans are answered.
The document discusses JavaBean properties and custom events. It defines different types of JavaBean properties like simple, boolean, indexed, bound, and constrained properties. It also explains how to create custom events by defining an event class, event listener interface, and event handler. The event handler notifies listeners when an event occurs. Finally, it demonstrates creating a login JavaBean that uses a custom event to validate that a username and password are not the same.
The document introduces JavaBeans, which are reusable software components created using Java. It discusses JavaBean concepts like properties, methods, and events. It also describes the Beans Development Kit (BDK) environment for creating, configuring, and testing JavaBeans. BDK includes components like the ToolBox, BeanBox, Properties window, and Method Tracer window. The document provides demonstrations of creating a sample JavaBean applet and user-defined JavaBean using BDK. It also covers topics like creating manifest and JAR files for packaging JavaBeans.
The document provides information on working with joins, the JDBC API, and isolation levels in Java database applications. It discusses different types of joins like inner joins, cross joins, and outer joins. It describes the key interfaces in the JDBC API like Statement, PreparedStatement, ResultSet, Connection, and DatabaseMetaData. It also covers isolation levels and how they prevent issues with concurrently running transactions accessing a database.
The document discusses various advanced features of JDBC including using prepared statements, managing transactions, performing batch updates, and calling stored procedures. Prepared statements improve performance by compiling SQL statements only once. Transactions allow grouping statements to execute atomically through commit and rollback. Batch updates reduce network calls by executing multiple statements as a single unit. Stored procedures are called using a CallableStatement object which can accept input parameters and return output parameters.
The document introduces JDBC and its key concepts. It discusses the JDBC architecture with two layers - the application layer and driver layer. It describes the four types of JDBC drivers and how they work. The document outlines the classes and interfaces that make up the JDBC API and the basic steps to create a JDBC application, including loading a driver, connecting to a database, executing statements, and handling exceptions. It provides examples of using JDBC to perform common database operations like querying, inserting, updating, and deleting data.
The document discusses classes and objects in Java, including defining classes with data members and methods, creating objects, using constructors, and the structure of a Java application. It also covers access specifiers, modifiers, compiling Java files, and provides a summary of key points about classes and objects in Java.
The document discusses operators in Java, including unary, binary, arithmetic, bitwise, shift, and instanceof operators. It provides examples of how to use various operators like increment, decrement, arithmetic assignment, bitwise AND, OR, NOT, XOR, right shift, left shift, and unsigned shift. It also covers operator precedence and demonstrates how operators in an expression are evaluated based on their predetermined precedence order.
The document discusses various Java programming constructs including conditional statements, looping statements, methods, and parameters. It provides examples of if-else statements, switch-case statements, for, while, and do-while loops. It also explains how to define parameterized methods, pass arguments to methods, and define methods that return values.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Conversational agents, or chatbots, are increasingly used to access all sorts of services using natural language. While open-domain chatbots - like ChatGPT - can converse on any topic, task-oriented chatbots - the focus of this paper - are designed for specific tasks, like booking a flight, obtaining customer support, or setting an appointment. Like any other software, task-oriented chatbots need to be properly tested, usually by defining and executing test scenarios (i.e., sequences of user-chatbot interactions). However, there is currently a lack of methods to quantify the completeness and strength of such test scenarios, which can lead to low-quality tests, and hence to buggy chatbots.
To fill this gap, we propose adapting mutation testing (MuT) for task-oriented chatbots. To this end, we introduce a set of mutation operators that emulate faults in chatbot designs, an architecture that enables MuT on chatbots built using heterogeneous technologies, and a practical realisation as an Eclipse plugin. Moreover, we evaluate the applicability, effectiveness and efficiency of our approach on open-source chatbots, with promising results.
Essentials of Automations: Exploring Attributes & Automation ParametersSafe Software
Building automations in FME Flow can save time, money, and help businesses scale by eliminating data silos and providing data to stakeholders in real-time. One essential component to orchestrating complex automations is the use of attributes & automation parameters (both formerly known as “keys”). In fact, it’s unlikely you’ll ever build an Automation without using these components, but what exactly are they?
Attributes & automation parameters enable the automation author to pass data values from one automation component to the next. During this webinar, our FME Flow Specialists will cover leveraging the three types of these output attributes & parameters in FME Flow: Event, Custom, and Automation. As a bonus, they’ll also be making use of the Split-Merge Block functionality.
You’ll leave this webinar with a better understanding of how to maximize the potential of automations by making use of attributes & automation parameters, with the ultimate goal of setting your enterprise integration workflows up on autopilot.
What is an RPA CoE? Session 1 – CoE VisionDianaGray10
In the first session, we will review the organization's vision and how this has an impact on the COE Structure.
Topics covered:
• The role of a steering committee
• How do the organization’s priorities determine CoE Structure?
Speaker:
Chris Bolin, Senior Intelligent Automation Architect Anika Systems
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving
What began over 115 years ago as a supplier of precision gauges to the automotive industry has evolved into being an industry leader in the manufacture of product branding, automotive cockpit trim and decorative appliance trim. Value-added services include in-house Design, Engineering, Program Management, Test Lab and Tool Shops.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsDianaGray10
Join us to learn how UiPath Apps can directly and easily interact with prebuilt connectors via Integration Service--including Salesforce, ServiceNow, Open GenAI, and more.
The best part is you can achieve this without building a custom workflow! Say goodbye to the hassle of using separate automations to call APIs. By seamlessly integrating within App Studio, you can now easily streamline your workflow, while gaining direct access to our Connector Catalog of popular applications.
We’ll discuss and demo the benefits of UiPath Apps and connectors including:
Creating a compelling user experience for any software, without the limitations of APIs.
Accelerating the app creation process, saving time and effort
Enjoying high-performance CRUD (create, read, update, delete) operations, for
seamless data management.
Speakers:
Russell Alfeche, Technology Leader, RPA at qBotic and UiPath MVP
Charlie Greenberg, host
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Must Know Postgres Extension for DBA and Developer during MigrationMydbops
Mydbops Opensource Database Meetup 16
Topic: Must-Know PostgreSQL Extensions for Developers and DBAs During Migration
Speaker: Deepak Mahto, Founder of DataCloudGaze Consulting
Date & Time: 8th June | 10 AM - 1 PM IST
Venue: Bangalore International Centre, Bangalore
Abstract: Discover how PostgreSQL extensions can be your secret weapon! This talk explores how key extensions enhance database capabilities and streamline the migration process for users moving from other relational databases like Oracle.
Key Takeaways:
* Learn about crucial extensions like oracle_fdw, pgtt, and pg_audit that ease migration complexities.
* Gain valuable strategies for implementing these extensions in PostgreSQL to achieve license freedom.
* Discover how these key extensions can empower both developers and DBAs during the migration process.
* Don't miss this chance to gain practical knowledge from an industry expert and stay updated on the latest open-source database trends.
Mydbops Managed Services specializes in taking the pain out of database management while optimizing performance. Since 2015, we have been providing top-notch support and assistance for the top three open-source databases: MySQL, MongoDB, and PostgreSQL.
Our team offers a wide range of services, including assistance, support, consulting, 24/7 operations, and expertise in all relevant technologies. We help organizations improve their database's performance, scalability, efficiency, and availability.
Contact us: info@mydbops.com
Visit: https://www.mydbops.com/
Follow us on LinkedIn: https://in.linkedin.com/company/mydbops
For more details and updates, please follow up the below links.
Meetup Page : https://www.meetup.com/mydbops-databa...
Twitter: https://twitter.com/mydbopsofficial
Blogs: https://www.mydbops.com/blog/
Facebook(Meta): https://www.facebook.com/mydbops/
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...DanBrown980551
This LF Energy webinar took place June 20, 2024. It featured:
-Alex Thornton, LF Energy
-Hallie Cramer, Google
-Daniel Roesler, UtilityAPI
-Henry Richardson, WattTime
In response to the urgency and scale required to effectively address climate change, open source solutions offer significant potential for driving innovation and progress. Currently, there is a growing demand for standardization and interoperability in energy data and modeling. Open source standards and specifications within the energy sector can also alleviate challenges associated with data fragmentation, transparency, and accessibility. At the same time, it is crucial to consider privacy and security concerns throughout the development of open source platforms.
This webinar will delve into the motivations behind establishing LF Energy’s Carbon Data Specification Consortium. It will provide an overview of the draft specifications and the ongoing progress made by the respective working groups.
Three primary specifications will be discussed:
-Discovery and client registration, emphasizing transparent processes and secure and private access
-Customer data, centering around customer tariffs, bills, energy usage, and full consumption disclosure
-Power systems data, focusing on grid data, inclusive of transmission and distribution networks, generation, intergrid power flows, and market settlement data
"Choosing proper type of scaling", Olena SyrotaFwdays
Imagine an IoT processing system that is already quite mature and production-ready and for which client coverage is growing and scaling and performance aspects are life and death questions. The system has Redis, MongoDB, and stream processing based on ksqldb. In this talk, firstly, we will analyze scaling approaches and then select the proper ones for our system.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
"Scaling RAG Applications to serve millions of users", Kevin GoedeckeFwdays
How we managed to grow and scale a RAG application from zero to thousands of users in 7 months. Lessons from technical challenges around managing high load for LLMs, RAGs and Vector databases.
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving
Manufacturing custom quality metal nameplates and badges involves several standard operations. Processes include sheet prep, lithography, screening, coating, punch press and inspection. All decoration is completed in the flat sheet with adhesive and tooling operations following. The possibilities for creating unique durable nameplates are endless. How will you create your brand identity? We can help!
Northern Engraving | Nameplate Manufacturing Process - 2024
09 iec t1_s1_oo_ps_session_13
1. Object-Oriented Programming Using C#
Objectives
In this session, you will learn to:
Implement read and write in text files
Implement read and write in binary files
Implement the Windows File System
Describe exceptions
Ver. 1.0 Session 13 Slide 1 of 24
2. Object-Oriented Programming Using C#
Implementing Reading and Writing in the Text Files
• The Stream class is used to read from and to write data in
the text files.
• It is an abstract class, which supports reading and writing
bytes into it.
• If data of a file is only text, then you can use the
StreamReader class and the StreamWriter class to
accomplish the reading and writing tasks, respectively.
Ver. 1.0 Session 13 Slide 2 of 24
3. Object-Oriented Programming Using C#
StreamReader Class
• The StreamReader class is inherited from the abstract class
TextReader.
• The TextReader class represents a reader which can read
a series of characters.
Ver. 1.0 Session 13 Slide 3 of 24
4. Object-Oriented Programming Using C#
StreamReader Class (Contd.)
• The following table describes some of the commonly used
methods of the StreamReader class.
Methods Description
Close Closes the object of StreamReader class and the underlying stream, and
releases any system resources associated with the reader
Peek Returns the next available character but does not consume it
Read Reads the next character or the next set of characters from the stream
ReadLine Reads a line of characters from the current stream and returns data as a
string
Seek Allows the read/write position to be moved to any position within the file
Ver. 1.0 Session 13 Slide 4 of 24
5. Object-Oriented Programming Using C#
StreamWriter Class
• The StreamWriter class is inherited from the abstract class
TextWriter.
• The TextWriter class represents a writer, which can write
a series of characters.
• The following table describes some of the commonly used
methods of the StreamWriter class.
Methods Description
Close Closes the current StreamWriter object and the underlying stream
Flush Clears all buffers for the current writer and causes any buffered data to be
written to the underlying stream
Write Writes to the stream
WriteLine Writes data specified by the overloaded parameters, followed by end of
line
Ver. 1.0 Session 13 Slide 5 of 24
6. Object-Oriented Programming Using C#
Implementing Reading and Writing in Binary Files
• In C#, you can directly display the contents of the file on the
screen.
• Binary read and write means that a number is written as a
float representation consuming four bytes of space.
• The BinaryReader and BinaryWriter classes are used
for reading and writing the binary data in to files.
Ver. 1.0 Session 13 Slide 6 of 24
7. Object-Oriented Programming Using C#
BinaryReader Class
• The BinaryReader class is used to read binary data from
a file.
• The following table describes some of the commonly used
methods of the BinaryReader class.
Method Description
Close Closes the current reader and the underlying stream
Read Reads characters from the underlying stream and advances the current
position of the stream
Ver. 1.0 Session 13 Slide 7 of 24
8. Object-Oriented Programming Using C#
BinaryWriter Class
• The BinaryWriter class is used to write binary data to a
stream.
• The following table describes some of the commonly used
methods of the BinaryWriter class.
Method Description
Close Closes the current BinaryWriter and the underlying stream
Seek Sets the position within the current stream
Write Writes a value to the current stream
Flush Clears all buffers for the current writer and causes any buffered data
to be written to the underlying device
Ver. 1.0 Session 13 Slide 8 of 24
9. Object-Oriented Programming Using C#
Implementing the Windows File System
• The ability to browse and locate files and directories for a
specific directory is essential for many programming tasks.
• Using classes such as the DirectoryInfo and FileInfo
classes in combination is an efficient way to gather the
required information about files and directories in a specific
location.
Ver. 1.0 Session 13 Slide 9 of 24
10. Object-Oriented Programming Using C#
DirectoryInfo Class
• The DirectoryInfo class is derived from the
FileSystemInfo class.
• The following table describes some of the commonly used
properties of the DirectoryInfo class.
Property Description
Gets or sets attributes associated with the current file. This property is inherited
Attributes
from FileSystemInfo.
Gets or sets CreationTime of the current file. This property is inherited from
CreationTime
FileSystemInfo.
Exists Gets a Boolean value indicating whether the directory exist or not.
Gets a string containing the file extension. This property is inherited from
Extension
FileSystemInfo.
Gets a string containing the full path of the directory. This property is inherited from
FullName
FileSystemInfo.
Gets the last accessed time of the directory. This property is inherited from
LastAccessTime
FileSystemInfo.
Name Gets a string containing the name of a given file.
Ver. 1.0 Session 13 Slide 10 of 24
11. Object-Oriented Programming Using C#
DirectoryInfo Class (Contd.)
• The following table describes some of the commonly used
methods of the DirectoryInfo class.
Method Description
Create Creates a directory.
CreateSubdirectory Creates a subdirectory.
Delete Deletes a directory.
Returns the directories in the current directory after matching all the
GetDirectories
criteria. It also allows you to search subdirectories within directories.
GetFiles Returns the files in the current directory.
Ver. 1.0 Session 13 Slide 11 of 24
12. Object-Oriented Programming Using C#
FileInfo Class
• The FileInfo class is derived from FileSystemInfo
class.
• The following table describes some commonly used
properties FileInfo class.
Property Description
Gets or sets attributes associated with the current file. This property is inherited from
Attributes
FileSystemInfo.
Gets or sets CreationTime of the current file. This property is inherited from
CreationTime
FileSystemInfo.
Directory Gets an instance of the directory which the file belongs to.
Exists Gets a boolean value indicating whether the file exists or not.
Extension Gets a string containing the file extension. This property is inherited from FileSystemInfo.
Gets a string containing the full path of the file. This property is inherited from
FullName
FileSystemInfo.
LastAccessTime Gets the last accessed time of the file. This property is inherited from FileSystemInfo.
Gets the time of the last written activity to the file. This property is inherited from
LastWriteTime
FileSystemInfo.
Length Gets the size of the file.
Name Gets a string containing the name of a given file.
Ver. 1.0 Session 13 Slide 12 of 24
13. Object-Oriented Programming Using C#
FileInfo Class (Contd.)
• The following table describes some of the commonly used
methods of the FileInfo class.
Method Description
Create Creates a file
AppendText Appends a text to the file represented by the FileInfo object
Delete Deletes a file
Open Opens file
OpenRead Opens a file in read-only mode
Ver. 1.0 Session 13 Slide 13 of 24
14. Object-Oriented Programming Using C#
Describing Exceptions
An exception is an erroneous situation that occurs during
program execution.
When an exception occurs in an application, the system
throws an error.
The error is handled through the process of exception
handling.
Ver. 1.0 Session 13 Slide 14 of 24
15. Object-Oriented Programming Using C#
Types of Errors
There are three types of errors that can occur in the
application:
– Syntax errors: Occurs when statements are not constructed
properly, keywords are misspelled, or punctuation is omitted.
– Run-time errors: Occurs when an application attempts to
perform an operation, which is not allowed at runtime.
– Logical errors: Occurs when an application compiles and runs
properly but does not produce the expected results.
Let us understand the various types of errors in detail.
Ver. 1.0 Session 13 Slide 15 of 24
16. Object-Oriented Programming Using C#
Syntax Errors
class Errors
{
Console.WriteLine(“Enjoy Errors”)
}
Semicolon is missing from Console.WriteLine statement
Ver. 1.0 Session 13 Slide 16 of 24
17. Object-Oriented Programming Using C#
Run-Time Errors
class Errors
{
int Num1=0;
int Num2=20;
int Num3;
Num3=Num2/Num1;
Console.WriteLine(“The Result is {0}”,
Num3);
}
Division by zero has taken place
Ver. 1.0 Session 13 Slide 17 of 24
18. Object-Oriented Programming Using C#
Logical Errors
class Errors
{
int Num1=10;
int Num2=2;
int Num3;
Num3=Num2/Num1;
Console.WriteLine(“The Result is
{0}”, Num3);
}
Expected result = 5
Present result = 0.2
Ver. 1.0 Session 13 Slide 18 of 24
19. Object-Oriented Programming Using C#
Exception Classes
• There are many exception classes which are directly or
indirectly derived from the System.Exception class.
Some of these classes are:
– System.ApplicationException class
– System.SystemException class
Ver. 1.0 Session 13 Slide 19 of 24
20. Object-Oriented Programming Using C#
Exception Classes (Contd.)
The hierarchy of the exception classes is displayed in the
following figure.
System.Exception
System.ApplicationException
System.SystemException
Ver. 1.0 Session 13 Slide 20 of 24
21. Object-Oriented Programming Using C#
Exception Classes (Contd.)
• The System.SystemException acts as a base class for
all the predefined system exceptions. The following table
describes some of the classes derived from the
System.SystemException class.
Exception Classes Description
System.IO.IOException Handles I/O errors
System.IndexOutOfRangeException Handles errors generated when a method refers to an array
element, which is out of its bound
System.NullReferenceException Handles errors generated during the process of
dereferencing a null object
System.DivideByZeroException Handles errors generated during the process of dividing the
dividend with zero
System.InvalidCastException Handles errors generated during typecasting
System.OutOfMemoryException Handles memory allocation to the application errors
Ver. 1.0 Session 13 Slide 21 of 24
22. Object-Oriented Programming Using C#
Summary
In this session, you learned that:
– The Stream class is used to read and write data to the text
files. It is an abstract class, which supports reading and writing
bytes into it.
– The StreamReader class is inherited from the abstract class
TextReader. The TextReader class represents a reader
which can read a series of characters.
– The StreamWriter class is inherited from the abstract class
TextWriter. The TextWriter class represents a writer,
which can write a series of characters.
– The BinaryReader class allows reading of binary data from a
file.
– The BinaryWriter class allows writing of binary data to a
stream.
Ver. 1.0 Session 13 Slide 22 of 24
23. Object-Oriented Programming Using C#
Summary (Contd.)
– The DirectoryInfo class is derived from FileSystemInfo
class and it works on a specific directory and shows the
fullpath of the current directory.
– The FileInfo class is derived from FileSystemInfo class
and it works on a specific directory to display the list of all the
files.
– An exception is an erroneous situation that occurs during
program execution.
– A syntax error occurs when a compiler cannot compile the
code. This may happen when the statements are not
constructed properly, keywords are misspelled, or punctuation
is omitted.
– A run-time error occurs when an application attempts to
perform an operation that is not allowed.
Ver. 1.0 Session 13 Slide 23 of 24
24. Object-Oriented Programming Using C#
Summary (Contd.)
A logical error occurs when an application compiles and runs
properly but does not produce the expected results.
Exceptional conditions arise when an operation cannot be
completed normally during the processing of C# statements
and expressions.
Ver. 1.0 Session 13 Slide 24 of 24
Editor's Notes
Students have learnt the structure of different types of dimensions and the importance of surrogate keys in Module I. In this session, students will learn to load the data into the dimension tables after the data has been transformed in the transformation phase. In addition, students will also learn to update data into these dimension tables. Students already know about different types of dimension tables. Therefore, you can start the session by recapitulating the concepts. Initiate the class by asking the following questions: 1. What are the different types of dimensions? 2. Define flat dimension. 3. What are conformed dimension? 4. Define large dimension. 5. Define small dimension. 6. What is the importance of surrogate key in a dimension table? Students will learn the loading and update strategies theoretically in this session. The demonstration to load and update the data in the dimension table will be covered in next session.
Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Student already have learnt about SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 1 SCDs? Given an example to explain type 1 SCDs. This will recapitulate what they have learnt about type 1 SCD in Module 1. Now explain the strategy to load the data into these dimension tables with help of the given diagram. Relate this diagram to the example given in SG.
Students know the importance of surrogate keys. In this session students will learn the strategy to generate the surrogate key. Give an example to explain the strategy to generate the surrogate keys by concatenating the primary key of the source table with the date stamp. For example, data from a Product table has to be loaded into the Product_Dim dimension table on Feb 09, 2006. The product_code is the primary key column in the Product table. To insert the surrogate key values before loading the data into the dimension table, you can combine the primary key value with the date on which the data has to be loaded. In this case the surrogate key value can be product_code+09022006.
Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
Students know what is the structure of Flat dimension. You can initiate the session by asking the following questions: 1. What are flat dimension tables? 2. What is the structure of flat dimension? 3. Given examples of a flat dimension? Next, tell the strategy to load the data into the flat dimension table. You can explain the loading strategy with the help of the example given in SG. Continue this session by asking the following questions: 4. What are large flat dimension tables? 5. Give examples of large flat dimensions? Then, explain the strategy to load data into the large flat dimension table. Before explaining the strategy to load data into the small dimension table ask the following questions and the tell the strategy to load the data into the dimension table. 6. What are small flat dimension tables? 7. Give examples of small flat dimension tables. With the help of these questions, students will be able to recall about flat dimensions, they have learnt in Module I. Explain this topic with the help of an example given in SG.
Student already have learnt about type 2 SCDs in Module I. Therefore, you can start this topic by asking the following questions to students: What are type 2 SCDs? Given an example to explain type 2 SCDs. This will recapitulate what they have learnt about type 2 SCD in Module 1. Now explain the strategy to update the data into these dimension tables with help the example given in SG. After explaining the examples, you can ask students to think of an example of a type 2 SCD and then tell the strategy to update the data into this dimension table.
You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.
You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.
You can summarize the session by running through the summary given in SG. In addition, you can also ask students summarize what they have learnt in this session.