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.
130614 sebastiano panichella - mining source code descriptions from develo...Ptidej Team
This document describes a 5-step approach for mining method descriptions from developer communications:
1. Download emails/bug reports and trace them to classes and methods using heuristics like mentioning class/file names.
2. Extract paragraphs of text from the communications.
3. Trace paragraphs to methods by checking for mentions of "method" and method names.
4. Apply heuristics to score paragraphs associated with methods based on how well they describe the method, like percentage of method parameters mentioned.
5. Rank paragraphs for each method by score to select best descriptions.
This document discusses the motivation and goals for JavaScript 2.0 (also known as ECMAScript Edition 4), which aims to improve support for programming in large and evolving systems. Some key areas of focus include adding support for classes, packages, versioning, and optional static types to improve robustness when integrating independently developed modules. The revisions also aim to address some permissiveness issues in JavaScript 1.5 that can lead to errors. The overall goal is to enable better management of change and evolution of complex, long-lived programs built from various components.
DLL Tutor
Typically, a DLL provides one or more particular functions and a program accesses the functions by creating either a static or dynamic link to the DLL.
This document discusses different techniques for reading files in Python. It begins by explaining what files are and the different types, with a focus on text files. It then demonstrates opening a file and reading the entire contents in one string. Next, it shows how to read each line of a file as a separate string using readlines(). Finally, it provides an example of printing the lines of a file in reverse order to illustrate reading files in different ways. The key techniques covered are reading the entire file, reading a specified number of characters, reading each line as a separate string, and iterating through the lines in reverse order.
The document provides an introduction to Java, including:
- The Java Development Kit (JDK) contains development tools like compilers and interpreters. The Java Standard Library (JSL) contains commonly used classes and methods.
- The Java API contains hundreds of classes organized into packages for language support, utilities, input/output, networking, graphics, and applets.
- Java has evolved through several versions, adding features like Swing, collections frameworks, and enhanced virtual machines.
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.
130614 sebastiano panichella - mining source code descriptions from develo...Ptidej Team
This document describes a 5-step approach for mining method descriptions from developer communications:
1. Download emails/bug reports and trace them to classes and methods using heuristics like mentioning class/file names.
2. Extract paragraphs of text from the communications.
3. Trace paragraphs to methods by checking for mentions of "method" and method names.
4. Apply heuristics to score paragraphs associated with methods based on how well they describe the method, like percentage of method parameters mentioned.
5. Rank paragraphs for each method by score to select best descriptions.
This document discusses the motivation and goals for JavaScript 2.0 (also known as ECMAScript Edition 4), which aims to improve support for programming in large and evolving systems. Some key areas of focus include adding support for classes, packages, versioning, and optional static types to improve robustness when integrating independently developed modules. The revisions also aim to address some permissiveness issues in JavaScript 1.5 that can lead to errors. The overall goal is to enable better management of change and evolution of complex, long-lived programs built from various components.
DLL Tutor
Typically, a DLL provides one or more particular functions and a program accesses the functions by creating either a static or dynamic link to the DLL.
This document discusses different techniques for reading files in Python. It begins by explaining what files are and the different types, with a focus on text files. It then demonstrates opening a file and reading the entire contents in one string. Next, it shows how to read each line of a file as a separate string using readlines(). Finally, it provides an example of printing the lines of a file in reverse order to illustrate reading files in different ways. The key techniques covered are reading the entire file, reading a specified number of characters, reading each line as a separate string, and iterating through the lines in reverse order.
The document provides an introduction to Java, including:
- The Java Development Kit (JDK) contains development tools like compilers and interpreters. The Java Standard Library (JSL) contains commonly used classes and methods.
- The Java API contains hundreds of classes organized into packages for language support, utilities, input/output, networking, graphics, and applets.
- Java has evolved through several versions, adding features like Swing, collections frameworks, and enhanced virtual machines.
This document discusses linking in the MS-DOS operating system. It describes how linking involves combining various pieces of code and data into a single file that can be loaded into memory and executed. The document outlines the role of linkers in automatically performing linking. It also provides details on the object module format and record types in MS-DOS, and describes how a linker would be designed for MS-DOS, including its invocation command format, linking and relocation processes, and use of data structures.
COM (Component Object Model) is a binary standard for software componentry introduced by Microsoft in the early 1990s. It allows for the creation of binary reusable software components that can be integrated into various programming languages and applications. COM defines concepts like interfaces, object lifetime management, and a mechanism for late-binding between components. It provides a way to build and distribute reusable software components independently of any programming language.
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Akhil Mittal
I have been writing a lot about advanced topics like MVC, Entity Framework, Repository Patterns etc., my priority always remains to cover the topic as a whole, so that a reader do not have to search for missing links anywhere else. My this article will cover almost every OOPS concept that a novice/beginner developer hunt for, and not only beginners, the article’s purpose is to be helpful to experience professionals also who need to sometimes brush-up their concepts or who prepare for interviews .
The document provides an overview of the PNotifyAppender, which is an appender that sends log messages as instant messages using GTalk. It stores log events in an internal cyclic buffer and sends them as an IM when a triggering condition is met, such as an error-level event. It uses the Smack API to connect to GTalk and relies on a username, password, recipient address, and other properties to operate. The appender aims to provide real-time notification of exceptions to system administrators via an IM client.
This 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(), write(), and lseek(). These functions take a file descriptor as a parameter and allow accessing files sequentially or randomly. The document also covers error handling using errno values and differentiates between high-level and low-level I/O.
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Coen De Roover
Presented at the 21st IEEE International Conference on Program Comprehension (ICPC 2013), San Francisco (USA). Website of the paper: http://softlang.uni-koblenz.de/explore-API-usage/
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Shinpei Hayashi
This document proposes an annotation-based approach to recording finer-grained software evolution using an IDE. Developers can classify their edit operations according to different modes, and the system structures the edits to generate source code deltas for each intentional change. A prototype implementation as an Eclipse plug-in automates reordering edits based on the modes. This approach aims to avoid mixed changesets and better capture the relationships between changes.
This chapter discusses improving user interfaces in Java programs. It covers constructing query-driven and menu-driven terminal interfaces, as well as graphical user interfaces. It also discusses formatting output, handling number format exceptions during input, and using the model-view-controller pattern to structure GUI programs. The chapter includes examples of converting between Fahrenheit and Celsius temperatures using different user interface styles.
Aspect-Oriented Programming and Depedency InjectionRobert Lemke
From the Dynamic Languages World 2008 in Karlsruhe. This session introduces two powerful techniques which support a clean design of enterprise applications and the implementation of a domain-driven design. In addition to the theoretical background you will learn how to take advantage of AOP and DI in your own projects. The examples given are based on the FLOW3 framework.
Automated Refactoring of Legacy Java Software to Default Methods Talk at GMURaffi Khatchadourian
Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods. In this talk, I discuss an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software.
Toward Understanding How Developers Recognize Features in Source Code from De...Shinpei Hayashi
The experiment compared how developers recognized target features in source code based on an original versus a refined natural language description of the feature. For two different features from an FL benchmark, subjects voted on which modules they thought implemented each feature after reading the original or refined description. For some modules actually relevant to the features, more subjects voted for them based on the refined descriptions, indicating the refined descriptions helped contributors recognize the target features.
The document discusses application packages and classes in PeopleSoft. It defines what an application package and class are, and explains how to create them using Application Designer. It also covers object-oriented concepts like classes, objects, encapsulation, inheritance, polymorphism. Additionally, it discusses class structure, importing packages and classes, access controls, defining methods, abstract methods, interfaces, constructors, get/set methods, and exception handling.
This document discusses HTML and Java applets. It introduces HTML tags for formatting text, lists, tables, and embedding images and links. It explains how to convert a Java application into an applet and embed it in an HTML page. Key differences between applets and applications are that applets cannot access local files and have constraints on their user interface.
This document compares different techniques for software architecture recovery using include dependencies and symbol dependencies. It finds that symbol dependencies provide more accurate results than include dependencies. The document analyzes several large, open source projects using various recovery techniques and different dependency methods. It measures the accuracy of the recovered architectures against ground truths. The results show that the quality of the recovered architecture is improved when using symbol dependencies as input compared to include dependencies. The best performing technique also sometimes changes based on which dependency method is used. In conclusion, the quality of the input affects the quality of the output for software architecture recovery.
Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors
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.
This document describes a master's project proposal for JaCIL, a compiler that translates Common Language Infrastructure (CLI) bytecode to Java Virtual Machine (JVM) bytecode. The project involves developing a compiler to translate CLI assemblies, types, methods, and metadata into equivalent JVM class files and bytecode. It will also include a runtime library to support CLI semantics not directly supported in the JVM, such as method pointers and value types allocated on the stack. The proposal outlines the scope of the project, related work in CLI-JVM translation, and a functional specification and design for the compiler and runtime components.
The document lists the daily lunch menus from October 28, 2009 to November 25, 2009 for an elementary school. It shows the meals served each day and the next day's planned menu, which typically included 3 lunch options with PBJ sandwich often listed as one of the choices. The menus covered a variety of hot meal and sandwich options along with occasional pizza or chicken nuggets.
This document lists the lunch menu options for three consecutive school days, October 26th through 28th, with hot dogs, ham and cheese sandwiches, pizza, cheese sticks, BBQ chicken sandwiches, and peanut butter and jelly sandwiches among the recurring daily options.
E Learning Catalog - Servers, VS 2005, etcprasad_lk
This document outlines various technology courses for IT professionals, organized by technology category and course type. It provides details on 14 different course collections related to Microsoft Office systems and technologies from 2007 and Exchange Server 2003. The courses cover topics such as implementing enterprise search, deploying Office clients, introducing communications server, deploying Windows Vista images, and implementing Exchange Server messaging environments.
This document discusses linking in the MS-DOS operating system. It describes how linking involves combining various pieces of code and data into a single file that can be loaded into memory and executed. The document outlines the role of linkers in automatically performing linking. It also provides details on the object module format and record types in MS-DOS, and describes how a linker would be designed for MS-DOS, including its invocation command format, linking and relocation processes, and use of data structures.
COM (Component Object Model) is a binary standard for software componentry introduced by Microsoft in the early 1990s. It allows for the creation of binary reusable software components that can be integrated into various programming languages and applications. COM defines concepts like interfaces, object lifetime management, and a mechanism for late-binding between components. It provides a way to build and distribute reusable software components independently of any programming language.
Diving in OOP (Day 1) : Polymorphism and Inheritance (Early Binding/Compile T...Akhil Mittal
I have been writing a lot about advanced topics like MVC, Entity Framework, Repository Patterns etc., my priority always remains to cover the topic as a whole, so that a reader do not have to search for missing links anywhere else. My this article will cover almost every OOPS concept that a novice/beginner developer hunt for, and not only beginners, the article’s purpose is to be helpful to experience professionals also who need to sometimes brush-up their concepts or who prepare for interviews .
The document provides an overview of the PNotifyAppender, which is an appender that sends log messages as instant messages using GTalk. It stores log events in an internal cyclic buffer and sends them as an IM when a triggering condition is met, such as an error-level event. It uses the Smack API to connect to GTalk and relies on a username, password, recipient address, and other properties to operate. The appender aims to provide real-time notification of exceptions to system administrators via an IM client.
This 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(), write(), and lseek(). These functions take a file descriptor as a parameter and allow accessing files sequentially or randomly. The document also covers error handling using errno values and differentiates between high-level and low-level I/O.
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Coen De Roover
Presented at the 21st IEEE International Conference on Program Comprehension (ICPC 2013), San Francisco (USA). Website of the paper: http://softlang.uni-koblenz.de/explore-API-usage/
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Shinpei Hayashi
This document proposes an annotation-based approach to recording finer-grained software evolution using an IDE. Developers can classify their edit operations according to different modes, and the system structures the edits to generate source code deltas for each intentional change. A prototype implementation as an Eclipse plug-in automates reordering edits based on the modes. This approach aims to avoid mixed changesets and better capture the relationships between changes.
This chapter discusses improving user interfaces in Java programs. It covers constructing query-driven and menu-driven terminal interfaces, as well as graphical user interfaces. It also discusses formatting output, handling number format exceptions during input, and using the model-view-controller pattern to structure GUI programs. The chapter includes examples of converting between Fahrenheit and Celsius temperatures using different user interface styles.
Aspect-Oriented Programming and Depedency InjectionRobert Lemke
From the Dynamic Languages World 2008 in Karlsruhe. This session introduces two powerful techniques which support a clean design of enterprise applications and the implementation of a domain-driven design. In addition to the theoretical background you will learn how to take advantage of AOP and DI in your own projects. The examples given are based on the FLOW3 framework.
Automated Refactoring of Legacy Java Software to Default Methods Talk at GMURaffi Khatchadourian
Java 8 default methods, which allow interfaces to contain (instance) method implementations, are useful for the skeletal implementation software design pattern. However, it is not easy to transform existing software to exploit default methods. In this talk, I discuss an efficient, fully-automated, type constraint-based refactoring approach that assists developers in taking advantage of enhanced interfaces for their legacy Java software.
Toward Understanding How Developers Recognize Features in Source Code from De...Shinpei Hayashi
The experiment compared how developers recognized target features in source code based on an original versus a refined natural language description of the feature. For two different features from an FL benchmark, subjects voted on which modules they thought implemented each feature after reading the original or refined description. For some modules actually relevant to the features, more subjects voted for them based on the refined descriptions, indicating the refined descriptions helped contributors recognize the target features.
The document discusses application packages and classes in PeopleSoft. It defines what an application package and class are, and explains how to create them using Application Designer. It also covers object-oriented concepts like classes, objects, encapsulation, inheritance, polymorphism. Additionally, it discusses class structure, importing packages and classes, access controls, defining methods, abstract methods, interfaces, constructors, get/set methods, and exception handling.
This document discusses HTML and Java applets. It introduces HTML tags for formatting text, lists, tables, and embedding images and links. It explains how to convert a Java application into an applet and embed it in an HTML page. Key differences between applets and applications are that applets cannot access local files and have constraints on their user interface.
This document compares different techniques for software architecture recovery using include dependencies and symbol dependencies. It finds that symbol dependencies provide more accurate results than include dependencies. The document analyzes several large, open source projects using various recovery techniques and different dependency methods. It measures the accuracy of the recovered architectures against ground truths. The results show that the quality of the recovered architecture is improved when using symbol dependencies as input compared to include dependencies. The best performing technique also sometimes changes based on which dependency method is used. In conclusion, the quality of the input affects the quality of the output for software architecture recovery.
Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors
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.
This document describes a master's project proposal for JaCIL, a compiler that translates Common Language Infrastructure (CLI) bytecode to Java Virtual Machine (JVM) bytecode. The project involves developing a compiler to translate CLI assemblies, types, methods, and metadata into equivalent JVM class files and bytecode. It will also include a runtime library to support CLI semantics not directly supported in the JVM, such as method pointers and value types allocated on the stack. The proposal outlines the scope of the project, related work in CLI-JVM translation, and a functional specification and design for the compiler and runtime components.
The document lists the daily lunch menus from October 28, 2009 to November 25, 2009 for an elementary school. It shows the meals served each day and the next day's planned menu, which typically included 3 lunch options with PBJ sandwich often listed as one of the choices. The menus covered a variety of hot meal and sandwich options along with occasional pizza or chicken nuggets.
This document lists the lunch menu options for three consecutive school days, October 26th through 28th, with hot dogs, ham and cheese sandwiches, pizza, cheese sticks, BBQ chicken sandwiches, and peanut butter and jelly sandwiches among the recurring daily options.
E Learning Catalog - Servers, VS 2005, etcprasad_lk
This document outlines various technology courses for IT professionals, organized by technology category and course type. It provides details on 14 different course collections related to Microsoft Office systems and technologies from 2007 and Exchange Server 2003. The courses cover topics such as implementing enterprise search, deploying Office clients, introducing communications server, deploying Windows Vista images, and implementing Exchange Server messaging environments.
This slideshow introduces the creator and their best friends ranked 1 through 10. It expresses a love for themselves and lists their number one enemy as Kristen Stewart for "stealing" Rob. The slideshow concludes by saying goodbye.
Stanley Ann Dunham Soetoro, Barack Obama's mother, was an unconventional and free-spirited woman who had a profound influence on him. She moved frequently as a child, married two men from other countries, earned a PhD and worked advocating for women's rights. She raised Obama with high expectations, exposing him to black culture and pushing him academically. Friends describe her as a big thinker who was not ambitious for herself but cared deeply about social justice and challenging norms. Though they spent much time apart, Obama has said he would not have achieved what he has without her influence of confidence, independence and bridging boundaries. She died of cancer in 1995 while Obama was starting his political career.
LINQ
The acronym LINQ stands for Language Integrated Query. Microsoft’s query language is fully integrated and offers easy data access from in-memory objects, databases, XML documents, and many more. It is through a set of extensions, LINQ ably integrates queries in C# and Visual Basic. This tutorial offers a complete insight into LINQ with ample examples and coding. The entire tutorial is divided into various topics with subtopics that a beginner can be able to move gradually to more complex topics of LINQ.
This document provides an agenda for a LINQ training that covers:
- A brief history of data access technologies leading to LINQ
- An overview of what LINQ is and the C# language enhancements that support it
- Base concepts like LINQ to Objects, deferred and immediate operators
- More advanced concepts like LINQ to Datasets, XML, and SQL
- Examples and questions
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdfcNguyn506241
This document provides an overview of a course on computer-based technologies and software development. The course will cover various technologies used to build software applications from start to finish. Topics will include databases, version control with Git, data validation, and deploying applications to the cloud. Students will learn concepts through theory, tutorials, and hands-on practice building a sample application. Assessment will include class participation, a midterm, and a final project.
Learning MVC Part 3 Creating MVC Application with EntityFrameworkAkhil Mittal
This document discusses connecting an existing MVC application to a database using Entity Framework instead of LINQ to SQL. It provides steps to generate an Entity Data Model from an existing database, generate strongly typed entity classes, and modify the application's controllers to use the Entity Framework context instead of the LINQ to SQL context. The key steps are: 1) Adding an Entity Data Model file and generating entity classes; 2) Modifying controllers to use the Entity Framework context instead of LINQ to SQL; 3) Binding views to the generated entity classes. The document emphasizes that Entity Framework automates CRUD operations and allows focusing on business logic rather than data access code.
Current & Future Use-Cases of OpenDaylightabhijit2511
OpenDaylight Overview and Architecture
• OpenDaylight Use Cases (Partial List)
I. Network Abstraction
II. ONAP
III. Network Virtualization
IV. AI/ML with OpenDaylight
V. ODL in OSS
• OpenDaylight: Getting Involved
This document provides an introduction and overview of LINQ (Language Integrated Query). It discusses that LINQ allows developers to query data from different sources using a SQL-like syntax directly in .NET code. It also summarizes the key LINQ concepts like data sources, query operators, LINQ providers for different data types, and IDE support for LINQ in Visual Studio.
This document is an internship report submitted by Jerin J. John to K. J. Somaiya College of Engineering. The report details a project to develop a program in C# to dynamically query XML data using LINQ queries obtained from a text file or user input at runtime. The program utilizes dynamic code compilation to generate and execute a method containing the LINQ query on the XML data. Key concepts used include LINQ, lambda expressions, delegates, and generating C# code at runtime to dynamically process queries.
C# c# for beginners crash course master c# programming fast and easy todayAfonso Macedo
The document provides an overview and table of contents for a book on learning C# programming for beginners. It covers 14 chapters that introduce C# concepts like program structure, syntax, data types, variables, operators, decision making statements, loops, classes, methods, arrays, strings, encapsulation, inheritance, interfaces, exception handling, and multithreading. The book is aimed at helping readers master C# programming quickly and easily through explanations and examples in each chapter.
This document outlines 5 projects for building a library management system. Project 1 involves building .NET class libraries. Project 2 creates a Windows forms frontend. Project 3 develops the business and data access tiers using LINQ and stored procedures. Project 4 adds a web frontend. Project 5 implements a WCF service for interoperability and uses security features.
Advantages of .NET over the other languages, overview of .NET binaries, Intermediate Language, metadata, .NET Namespaces, Common Language runtime, common type system, common Language Specification.
C# fundamentals – C# class, object, string formatting, Types, scope, constants, C# iteration, control flow, operators, array, string, Enumerations, structures, custom Namespaces
Repository Pattern in MVC3 Application with Entity FrameworkAkhil Mittal
The document discusses implementing a repository pattern in an MVC application using Entity Framework. It begins with an introduction and roadmap of previous articles. It then discusses the benefits of a repository pattern in abstracting the data access layer from business logic. Steps are provided to create a sample repository interface and class to implement basic CRUD operations on a User entity, abstracting the data access code from the controller. The repository class uses the Entity Framework context to perform operations while resolving tight coupling issues between layers. It concludes that while this implementation works for a single entity, a generic repository will be needed to cleanly support multiple entities without duplication.
Older (2008) presentation I gave internally to SunGard to educate developers on C# and LINQ. LINQ still rocks, and the concepts I cover are important language features while C# developers should be asked in interviews event today.
The document discusses the history and features of the .NET framework. It describes the core components of the CLR (Common Language Runtime) and class library. It then summarizes the changes and new features introduced in versions 1.0, 1.1, 2.0, 3.0, 3.5, and previews some of the new parallel processing capabilities in .NET 4.0.
The document discusses various techniques for summarizing code, changes, and test cases. It describes generating source code summaries to aid code comprehension and prevent maintenance costs. It also covers summarizing code changes to automatically generate commit messages and release notes. Finally, it discusses summarizing test cases to generate more readable test cases and evaluate their effectiveness with developers.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
4. MODULE 3: INTRODUCTION TO LINQ
Module Overview
This module introduces you to the new generation of the programmatic data access in
the .NET Framework 3.5. LINQ Project is a new movement in the data access
programming world. It helps the developers to deal with different data shapes into the
programming language directly without the need to learn new API(s) for each data
shape and different type of information.
This module describes the new extensions that makes the LINQ happened, the query
syntax, the standard query operators, and how to use LINQ with the in-memory
collections.
Objectives:
After completing this module, you will be able to:
Understand what Linq is.
Understand the Query Expressions and Query Operators.
Writing queries using extension methods.
Using the Partitioning and Conversion operators.
Explain the usage of the new Linq Assemblies.
Enabling Linq to Objects for .Net Framework 2.0.
4
5. MODULE 3: INTRODUCTION TO LINQ
Introducing LINQ Project
Overview:
In the FoxPro/dBase days the data manipulation operations and queries was integrated with
the programming language itself, and it was supported natively in the language, then the
Client/Server computing separates the data and the programming language, and the object
oriented technology become very mature and richer than before and empowered very much
from the programming language itself.
The complexity of programming happens when dealing with data, and especially these days
we have different kind of data such as RDBMS, XML, file system, etc…
LINQ adds new concepts to the C# and VB Language which allows the programmers to write
SQL-Like query expressions that can execute many operations over much kind of data while
using the object oriented programming style.
LINQ Building Blocks:
The LINQ expressions are enabled because of the marriage between different new features in
the C# 3.0 Language which includes the following:
1. Object Initializers
2. Lambda Expressions
3. Extension Methods
4. Anonymous types
5. Implicit Typing Variables
As we mentioned in the C# 3.0 module, the C# 3.0 features are only related to the compiler
and it will not reflect any new IL instructions.
All of these new features considered as the building blocks of the LINQ, which combines
them together and enable the LINQ.
5
6. MODULE 3: INTRODUCTION TO LINQ
LINQ Assemblies
The following table contains the LINQ assemblies with the main namespaces:
No. Assembly Name Namespaces
1. System.Core.dll System
System.Linq
System.Linq.Expressions
2. System.Data.DataSetExtensions.dll System.Data
3. System.Data.Linq.dll System.Data.Linq
System.Data.Linq.Mapping
System.Data.Linq.SqlClient
4. System.Xml.Linq.dll System.Xml.Linq
System.Xml.Schema
System.Xml.XPath
The first assembly System.Core provides extensions methods for IEnumerable<T> and
some classes for query operators in addition to other classes that enable the query expressions.
The second assembly System.Data.DataSetExtensions allows the using of LINQ for
DataSet.
The System.Data.Linq assembly is the implementation of LINQ for SQL Server databases
which contains many classes that represent the tables as entities and provides some attributes
for the tables and columns, in addition to some helpers and methods for the SQL statements.
The System.Xml.Linq is the implementation of LINQ for XML which allows the
programmer to construct Xml documents using LINQ expressions and query it such as any
other data.
6
7. MODULE 3: INTRODUCTION TO LINQ
LINQ Query Expressions
Overview:
Query expressions can be written using declarative query syntax enabled by the C# 3.0
language enhancements. Query expressions can be used to transform data from any Linq-
enabled data sources into different Linq-Enabled data source.
Query:
A query is a set of instructions that describes what data to retrieve from a given data source
(or sources) and what shape and organization the returned data should have. (Ref 2)
Query Expression:
A query expression is a query expressed in query syntax. A query expression is a first-class
language construct. A query expression consists of a set of clauses written in a declarative
syntax similar to SQL or XQuery. Each clause in turn contains one or more C# expressions,
and these expressions may themselves be either a query expression or contain a query
expression. (Ref 2)
Query Expression Syntax:
The following sample shows a simple query expression:
string[] members = {"Samer", "Bill", "Scott", "Bilal"};
var names = from n in members
where n.StartsWith("B")
select n;
7
8. MODULE 3: INTRODUCTION TO LINQ
The names represents the query variable that store the query, the query expression must begin
with from clause and must end with select/group clause. Between the from and select clause
it can contains optional clauses such as where, join, or orderby.
Query Operators:
Query operators are static extension methods that construct the query expressions, the
following statements shows how to write query expressions using the extension methods
directly:
string[] members = { "Samer", "Bill", "Scott", "Bilal" };
var names = members.Where(m => m.StartsWith("B"));
The two samples are identical but the first sample gives more query-style syntax. there are
many different query operators shipped with the Linq, in this module you will do samples
over many basic query operators.
IEnumerable<T> is must:
The var define implicit typing query result, but all the results must be returned in a type that
implements an IEnumerable<T> type.
The following sample reduces the same results as the first sample:
string[] members = {"Samer", "Bill", "Scott", "Bilal"};
IEnumerable<string> names = from n in members
where n.StartsWith("B")
select n;
Query Execution:
The query can be executed immediately when using the ToArray or ToList query operators
and can be done lately - which is the default case - which called deferred query execution or
the lazy execution. The deferred query execution enables the reusability of query even if the
data changed.
8
9. MODULE 3: INTRODUCTION TO LINQ
Lab 1: Writing Query Expressions
After completing this lab, you will be able to:
Writing Linq Query Expression.
Using Query Operators.
Using var and IEnumerable<T> query varaiables.
Querying In-Memory Collections.
Writing Query Expressions
1. On the File menu in Visual Studio 2008, point to New and then click Project.
2. In the New Project dialog box, select a language, and then select Windows in the
Project Types box.
3. In the Templates box, select Console Application.
4. In the Location box, type the path to where to create the application, and then click
OK.
5. In the Visual Studio code editor as the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GeeksConnected.Module03Lab01
{
class Customer
{
9
10. MODULE 3: INTRODUCTION TO LINQ
public long ID { get; set; }
public string Name { get; set; }
public string Company { get; set; }
public Phone phone { get; set; }
public Customer()
{
}
}
class Phone
{
public int CountryCode;
public int AreaCode;
public int phone;
public Phone()
{
}
}
class Program
{
static void Main(string[] args)
{
List<Customer> custList = new List<Customer>
{
new Customer
{
Name = "Samer", ID = 1, Company = "Microsoft",
phone = new Phone { CountryCode = 001, AreaCode = 6,
phone = 111111 }
},
new Customer
{
Name = "Muhanad", ID = 2, Company = "GeeksConnected",
phone = new Phone { CountryCode = 001, AreaCode = 6,
phone = 111111 }
},
new Customer
{
Name = "Mohamed", ID = 2, Company = "GeeksConnected",
phone = new Phone { CountryCode = 962, AreaCode = 9,
phone = 2324343 }
},
new Customer
{
Name = "Amjad", ID = 2, Company = "GeeksConnected",
phone = new Phone { CountryCode = 962, AreaCode = 43,
phone = 3264843 }
},
new Customer
{
Name = "Bill", ID = 1, Company = "Microsoft",
phone = new Phone { CountryCode = 001, AreaCode = 6,
phone = 875654 }
}
};
//Microsoft Customers List
10
11. MODULE 3: INTRODUCTION TO LINQ
IEnumerable<Customer> MicrosoftCustomers =
from c in custList
where (c.Company == "Microsoft")
select c;
Console.WriteLine("Microsoft Customers");
Console.WriteLine("===================");
foreach (Customer cus in MicrosoftCustomers)
{
Console.WriteLine("ID : {0}",cus.ID);
Console.WriteLine("Name: {0}", cus.Name);
Console.WriteLine("====================n");
}
Console.ReadLine();
//GeeksConnected Customers List
var GeeksConnectedCustomers =
from c in custList
where c.Company.StartsWith("Geeks")
select c;
Console.WriteLine("GeeksConnected Customers");
Console.WriteLine("===================");
foreach (Customer cus in GeeksConnectedCustomers)
{
Console.WriteLine("ID : {0}", cus.ID);
Console.WriteLine("Name: {0}", cus.Name);
Console.WriteLine("====================n");
}
Console.ReadLine();
//Searching by Country Code
IEnumerable<Customer> CustomersByCountryCode =
from c in custList
where (c.phone.CountryCode == 001)
select c;
Console.WriteLine("001 Country Code Customers");
Console.WriteLine("===================");
foreach (Customer cus in CustomersByCountryCode)
{
Console.WriteLine("ID : {0}", cus.ID);
Console.WriteLine("Name: {0}", cus.Name);
Console.WriteLine("====================n");
}
Console.ReadLine();
}
}
}
6. Click Start on the Debug menu or press F5 to run the code.
11
12. MODULE 3: INTRODUCTION TO LINQ
Standard Query Operators
Enumerable Extension Methods:
Linq shipped with a lot of extension methods which act as the query operators when writing
query expressions.
The System.Linq namespace contains different Linq Extensions under the
System.Linq.Enumerable class, the extension methods can be consumed through the using
directive, and by default the projects in .NET Framework 3.5 are using the System.Linq
namespace.
The following table contains the some commonly used operators:
No. Extension Method Description
1. OrderByDescending Sorting the elements in a descending order.
2. OrderBy Sorting the elements in a Ascending order.
3. Take Returns a specific number of continuous elements from the start of a
sequence of values.
4. Sum Calculate the sum of a group of numeric values.
5. Distinct Returns distinct element from a sequence of values.
6. Count Return the total number of elements from a sequence of elements.
7. First Returns the first element of a sequence of values.
12
13. MODULE 3: INTRODUCTION TO LINQ
Lab 2: Writing Queries Using Extension
Methods
After completing this lab, you will be able to:
Writing Queries using Linq Extension Methods.
Sorting the elements using the OrderByDescending extension method.
Returning specific elements using Take and First methods.
Calculating the total number of elements using the Count method.
Returning Distinct values from a sequence of values.
Writing Queries using extension methods
1. On the File menu in Visual Studio 2008, point to New and then click Project.
2. In the New Project dialog box, select a language, and then select Windows in the
Project Types box.
3. In the Templates box, select Console Application.
4. In the Location box, type the path to where to create the application, and then click OK.
5. In the Visual Studio code editor as the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GeeksConnected.Module03Lab02
{
class Book
{
public long ID { get; set; }
13
14. MODULE 3: INTRODUCTION TO LINQ
public string Name { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public int Year { get; set; }
public string Category { get; set; }
public Book()
{
}
}
class Program
{
public static List<Book> GetBooksList()
{
List<Book> BooksList = new List<Book>
{
new Book {ID = 1, Author = "Muhanad", Category = "SharePoint",
Name = "Inside MOSS Customization", Publisher = "GC",
Year = 2008},
new Book {ID = 2, Author = "Mohamed", Category = ".NET",
Name = "Advanced .NET", Publisher = "GC",
Year = 2008},
new Book {ID = 3, Author = "Amjad", Category = "Integration",
Name = "Advanced BizTalk", Publisher = "GC",
Year = 2008},
new Book {ID = 4, Author = "Hikmet", Category = "Windows",
Name = "Windows 2008 Server", Publisher = "GC",
Year = 2008},
new Book {ID = 5, Author = "Ayman", Category = "Inegration",
Name = "BIZTalk Administration", Publisher = "DN",
Year = 2006},
new Book {ID = 6, Author = "Ayman", Category = "SharePoint",
Name = "Programming CAML", Publisher = "DN",
Year = 2005},
new Book {ID = 7, Author = "Bob", Category = ".NET",
Name = "CLR Inside Outside", Publisher = "ORA",
Year = 2005},
new Book {ID = 8, Author = "Ibrahim", Category = "Inegration",
Name = "BIZTalk PipeLines", Publisher = "DHC",
Year = 2005},
new Book {ID = 9, Author = "Adam", Category = ".NET",
Name = "MSIL For Dummies", Publisher = "DHC",
Year = 2006},
new Book {ID = 10, Author = "Salim", Category = ".NET",
Name = "CLR Deep Dive", Publisher = "DN",
Year = 2006},
new Book {ID = 11, Author = "Hikmet", Category = "Windows",
Name = "Exchange Migration", Publisher = "MS",
Year = 2007},
new Book {ID = 12, Author = "Muhanad", Category = "SharePoint",
Name = "WSS Solutions", Publisher = "MS",
Year = 2007},
};
return BooksList;
}
static void Main(string[] args)
{
List<Book> books = GetBooksList();
//Getting Books Count...
int booksCount = books.Count();
Console.WriteLine("Books Count: {0}", booksCount);
14
15. MODULE 3: INTRODUCTION TO LINQ
Console.ReadKey();
//Order Books Years By Descending...
var BooksList = books.OrderByDescending(b => b.Year);
//Printing the Books By Year
Console.WriteLine("Books By Year");
foreach (Book bk in BooksList)
{
Console.WriteLine("Book Name:{0}", bk.Name);
Console.WriteLine("Book Year:{0}", bk.Year);
Console.WriteLine("=======================n");
}
Console.ReadKey();
//Returnning the first three books
var Bookslst = books
.OrderBy(b => b.Year)
.Take(3);
Console.WriteLine("nnFirst Three Books");
Console.WriteLine("=================n");
foreach (Book bk in Bookslst)
{
Console.WriteLine("Book Name :{0}", bk.Name);
Console.WriteLine("Book Year :{0}", bk.Year);
Console.WriteLine("Book Author:{0}", bk.Author);
Console.WriteLine("=======================n");
}
Console.ReadKey();
//Returnning the Distinct Values of Author
var bks = books
.OrderBy(b => b.Author)
.Select(b => b.Author)
.Distinct();
Console.WriteLine("nnDistinct Authors");
Console.WriteLine("=================n");
foreach (var bk in bks)
{
Console.WriteLine("Book Author:{0}", bk);
Console.WriteLine("=======================n");
}
Console.ReadKey();
}
}
}
6. Click Start on the Debug menu or press F5 to run the code.
15
16. MODULE 3: INTRODUCTION TO LINQ
Conversion Operators
Linq can convert a query results to different data collections types, as we mentioned before
the default execution behavior of the query is the deferred execution, which execute the query
and retrieve the results while iterating through the sequence of values results.
The following operators aim to convert the results to different collection types, and cause an
immediate execution to the query.
No. Query Operator Description
1. ToArray Returns an array of elements from a sequence of values.
2. ToList Returns a List<T> of elements from a sequence of values.
3. ToDictionary Returns a Dictinory(TKey, TValue) collection type from a sequence
of values.
4. OfType Returns a filtered sequence of elements based on a specific type.
16
17. MODULE 3: INTRODUCTION TO LINQ
Lab 3: Using Conversion Operators
Objectives:
This lab introduces you the query conversion operators which is a set of extension methods on
the Enumerable Class, in addition to enforce immediate execution behavior of the queries.
After completing this lab, you will be able to:
Enforce the immediate execution of the queries.
Converting the query results to Different Collection Types.
Filtering the query results based on a specific data type.
Using conversion Operators
1. On the File menu in Visual Studio 2008, point to New and then click Project.
2. In the New Project dialog box, select a language, and then select Windows in the
Project Types box.
3. In the Templates box, select Console Application.
4. In the Location box, type the path to where to create the application, and then click OK.
5. In the Visual Studio code editor as the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
17
18. MODULE 3: INTRODUCTION TO LINQ
namespace GeeksConnected.Module03Lab02
{
class Book
{
public long ID { get; set; }
public string Name { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public int Year { get; set; }
public string Category { get; set; }
public Book()
{
}
}
class Program
{
public static List<Book> GetBooksList()
{
List<Book> BooksList = new List<Book>
{
new Book {ID = 1, Author = "Muhanad", Category = "SharePoint",
Name = "Inside MOSS Customization", Publisher = "GC",
Year = 2008},
new Book {ID = 2, Author = "Mohamed", Category = ".NET",
Name = "Advanced .NET", Publisher = "GC",
Year = 2008},
new Book {ID = 3, Author = "Amjad", Category = "Integration",
Name = "Advanced BizTalk", Publisher = "GC",
Year = 2008},
new Book {ID = 4, Author = "Hikmet", Category = "Windows",
Name = "Windows 2008 Server", Publisher = "GC",
Year = 2008},
new Book {ID = 5, Author = "Ayman", Category = "Inegration",
Name = "BIZTalk Administration", Publisher = "DN",
Year = 2006},
new Book {ID = 6, Author = "Ayman", Category = "SharePoint",
Name = "Programming CAML", Publisher = "DN",
Year = 2005},
new Book {ID = 7, Author = "Bob", Category = ".NET",
Name = "CLR Inside Outside", Publisher = "ORA",
Year = 2005},
new Book {ID = 8, Author = "Ibrahim", Category = "Inegration",
Name = "BIZTalk PipeLines", Publisher = "DHC",
Year = 2005},
new Book {ID = 9, Author = "Adam", Category = ".NET",
Name = "MSIL For Dummies", Publisher = "DHC",
Year = 2006},
new Book {ID = 10, Author = "Salim", Category = ".NET",
Name = "CLR Deep Dive", Publisher = "DN",
Year = 2006},
new Book {ID = 11, Author = "Hikmet", Category = "Windows",
Name = "Exchange Migration", Publisher = "MS",
Year = 2007},
new Book {ID = 12, Author = "Muhanad", Category = "SharePoint",
Name = "WSS Solutions", Publisher = "MS",
Year = 2007},
};
return BooksList;
}
static void Main(string[] args)
{
18
19. MODULE 3: INTRODUCTION TO LINQ
//Enforcing the query immediate execution
// Using ToList Query Conversion Operator
List<Book> books = GetBooksList();
var bks =
(from b in books
where b.Category == ".NET"
select new {Category = b.Category.ToLower(),
Name = b.Name.ToUpper(),
Author = b.Author.ToUpper()}).ToList();
Console.WriteLine("Books Information");
Console.WriteLine("=================n");
foreach (var bk in bks)
{
Console.WriteLine("Book Name :{0}", bk.Name);
Console.WriteLine("Book Catregory:{0}", bk.Category);
Console.WriteLine("Book Author :{0}", bk.Author);
Console.WriteLine("nn");
}
Console.ReadKey();
//Using ToArray Query Convesion Operator
string[] Authors =
(from b in books
select b.Author).Distinct().ToArray();
Console.WriteLine("Authors List");
Console.WriteLine("=================n");
foreach (var auth in Authors)
{
Console.WriteLine(auth);
}
Console.ReadKey();
//Using ToDictionary Query Conversion Operator
var bkDic =
(from b in books
select new { b.ID, b.Name }).ToDictionary(bk => bk.ID);
Console.WriteLine("nnnBooks Dictionary");
Console.WriteLine("================n");
for (int i = 1; i < 13; i++)
{
Console.WriteLine("Book ID :{0}", i);
Console.WriteLine("Book Name:{0}", bkDic[i].Name);
}
Console.ReadKey();
//Using OfType Query Operator
object[] misc = {"CLR Via C#", bkDic[2], bkDic[1], Authors[1],
Authors[2], 12,43, books[0].Name, books[1],
233, "GeeksConnected", books[2].ID};
var strs =
(from s in misc
select s).OfType<string>();
19
20. MODULE 3: INTRODUCTION TO LINQ
Console.WriteLine("Strings List");
Console.WriteLine("============n");
foreach (var s in strs)
{
Console.WriteLine(s);
}
Console.ReadKey();
//Retrieving the Integers.....
var nums =
(from n in misc
select n).OfType<int>();
Console.WriteLine("Numeric List");
Console.WriteLine("============n");
foreach (var n in nums)
{
Console.WriteLine(n);
}
Console.ReadKey();
}
}
}
6. Click Start on the Debug menu or press F5 to run the code.
20
21. MODULE 3: INTRODUCTION TO LINQ
Partitioning Operators
Linq extension methods set contain a group of operators that allows the programmer to
partitioning the results of the query into a specific sequence, such as taking the first n number
of elements in the sequence, skipping n number of elements, and retrieving or skipping a
sequence of values based in specific criteria.
The following table contains the partitioning operators and a description about it.
No. Query Operator Description
1. Take Returns a specific number of continuous elements from the start of a
sequence of values.
2. Skip Bypasses specific number of elements from a sequence of values and
returning the remaining elements.
3. TakeWhile Returns a specific number of elements while a specific condition is
true and returning the remaining elements.
4. SkipWhile Bypasses elements from a sequence of values while a specific
condition is true and returning the remaining elements.
21
22. MODULE 3: INTRODUCTION TO LINQ
Lab 4: Using Partitioning Operators
Objectives:
This lab introduces you the new generic collection type HashSet and its standard operations.
After completing this lab, you will be able to:
Use the partitioning query operators.
Skipping elements based on conditional expression.
Retrieving elements using Take and TakeWhile operators.
Using Partitioning Operators
7. On the File menu in Visual Studio 2008, point to New and then click Project.
8. In the New Project dialog box, select a language, and then select Windows in the
Project Types box.
9. In the Templates box, select Console Application.
10. In the Location box, type the path to where to create the application, and then click OK.
11. In the Visual Studio code editor as the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
22
23. MODULE 3: INTRODUCTION TO LINQ
namespace GeeksConnected.Module03Lab02
{
class Book
{
public long ID { get; set; }
public string Name { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public int Year { get; set; }
public string Category { get; set; }
public Book()
{
}
}
class Program
{
public static List<Book> GetBooksList()
{
List<Book> BooksList = new List<Book>
{
new Book {ID = 1, Author = "Muhanad", Category = "SharePoint",
Name = "Inside MOSS Customization", Publisher = "GC",
Year = 2008},
new Book {ID = 2, Author = "Mohamed", Category = ".NET",
Name = "Advanced .NET", Publisher = "GC",
Year = 2008},
new Book {ID = 3, Author = "Amjad", Category = "Integration",
Name = "Advanced BizTalk", Publisher = "GC",
Year = 2008},
new Book {ID = 4, Author = "Hikmet", Category = "Windows",
Name = "Windows 2008 Server", Publisher = "GC",
Year = 2008},
new Book {ID = 5, Author = "Ayman", Category = "Inegration",
Name = "BIZTalk Administration", Publisher = "DN",
Year = 2006},
new Book {ID = 6, Author = "Ayman", Category = "SharePoint",
Name = "Programming CAML", Publisher = "DN",
Year = 2005},
new Book {ID = 7, Author = "Bob", Category = ".NET",
Name = "CLR Inside Outside", Publisher = "ORA",
Year = 2005},
new Book {ID = 8, Author = "Ibrahim", Category = "Inegration",
Name = "BIZTalk PipeLines", Publisher = "DHC",
Year = 2005},
new Book {ID = 9, Author = "Adam", Category = ".NET",
Name = "MSIL For Dummies", Publisher = "DHC",
Year = 2006},
new Book {ID = 10, Author = "Salim", Category = ".NET",
Name = "CLR Deep Dive", Publisher = "DN",
Year = 2006},
new Book {ID = 11, Author = "Hikmet", Category = "Windows",
Name = "Exchange Migration", Publisher = "MS",
Year = 2007},
new Book {ID = 12, Author = "Muhanad", Category = "SharePoint",
Name = "WSS Solutions", Publisher = "MS",
Year = 2007},
};
return BooksList;
}
static void Main(string[] args)
{
23
24. MODULE 3: INTRODUCTION TO LINQ
List<Book> books = GetBooksList();
//Using Take Operator
var bks =
(from b in books
where b.Category == ".NET"
select b
).Take(3);
Console.WriteLine(".NET Books");
Console.WriteLine("==========n");
foreach (var bk in bks)
{
Console.WriteLine("Book Name :{0}", bk.Name);
Console.WriteLine("Book Catregory:{0}", bk.Category);
Console.WriteLine("Book Author :{0}", bk.Author);
Console.WriteLine("nn");
}
Console.ReadKey();
//Using TakeWhile Operator
var bksLst =
(from b in books
select b
).TakeWhile(b => b.Year == 2008);
Console.WriteLine("2008 Year Books");
Console.WriteLine("===================n");
foreach (var bk in bksLst)
{
Console.WriteLine("Book Name :{0}", bk.Name);
Console.WriteLine("Book Catregory:{0}", bk.Category);
Console.WriteLine("Book Author :{0}", bk.Author);
Console.WriteLine("Book Year :{0}", bk.Year);
Console.WriteLine("nn");
}
Console.ReadKey();
//Using SkipWhile Operator
var bksList =
(from b in books
select b
).SkipWhile(b => b.Year == 2008);
Console.WriteLine("Books Information");
Console.WriteLine("=================n");
foreach (var bk in bksList)
{
Console.WriteLine("Book Name :{0}", bk.Name);
Console.WriteLine("Book Catregory:{0}", bk.Category);
Console.WriteLine("Book Author :{0}", bk.Author);
Console.WriteLine("Book Year :{0}", bk.Year);
Console.WriteLine("n");
}
Console.ReadKey();
24
25. MODULE 3: INTRODUCTION TO LINQ
}
}
}
12. Click Start on the Debug menu or press F5 to run the code.
25
26. MODULE 3: INTRODUCTION TO LINQ
LINQ Bridge
Linq requires the developer to target the .NET Framework 3.5 while developing any Linq-
Enabled Application. All the query operators are implemented in .NET Framework 3.5 which
forces the customer to install the .NET Framework 3.5.
Joseph & Ben Albahari write a reimplementation of all standard query operators which allows
the developers to write Linq to Objects applications into .NET Framework 2.0 by using the
Multi-Targeting Feature of Visual Studio 2008.
LinqBirdge is a free open source project you can download it under the following link:
http://www.albahari.com/nutshell/LinqBridge.zip
And the source code is available under the following link:
http://www.albahari.com/nutshell/LinqBridge.zip
LinqBridge Internals:
The C# 3.0 and .Net Framework 3.5 are designed to work with CLR 2.0 which means that the
generated IL instructions are the same instructions that used in .NET Framework 2.0
Applications.
The compiler looks for the query operators as extension methods which is used as static
methods in the generated IL instructions, the LinqBridge implementation contains the same
query operators implementation which enable the code to target .NET Framework 2.0.
26
27. MODULE 3: INTRODUCTION TO LINQ
Lab 5: Using Linq for .NET Framework 2.0
After completing this lab, you will be able to:
Writing Linq-Enabled Applications for .Net Framework 2.0.
Using the LinqBridge extension.
Writing Linq to Objects expressions.
Using LinqBridge Extension
1. On the File menu in Visual Studio 2008, point to New and then click Project.
2. In the New Project dialog box, select a language, and then select Windows in the
Project Types box.
3. Choose the .Net Framework 2.0 in the Target Framework ListBox
4. In the Templates box, select Console Application.
5. In the Location box, type the path to where to create the application, and then click OK.
6. Add Reference to LinqBridge.dll assembly.
7. In the Visual Studio code editor as the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GeeksConnected.Module03Lab02
{
class Book
{
27
28. MODULE 3: INTRODUCTION TO LINQ
public long ID { get; set; }
public string Name { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public int Year { get; set; }
public string Category { get; set; }
public Book()
{
}
}
class Program
{
public static List<Book> GetBooksList()
{
List<Book> BooksList = new List<Book>
{
new Book {ID = 1, Author = "Muhanad", Category = "SharePoint",
Name = "Inside MOSS Customization", Publisher = "GC",
Year = 2008},
new Book {ID = 2, Author = "Mohamed", Category = ".NET",
Name = "Advanced .NET", Publisher = "GC",
Year = 2008},
new Book {ID = 3, Author = "Amjad", Category = "Integration",
Name = "Advanced BizTalk", Publisher = "GC",
Year = 2008},
new Book {ID = 4, Author = "Hikmet", Category = "Windows",
Name = "Windows 2008 Server", Publisher = "GC",
Year = 2008},
new Book {ID = 5, Author = "Ayman", Category = "Inegration",
Name = "BIZTalk Administration", Publisher = "DN",
Year = 2006},
new Book {ID = 6, Author = "Ayman", Category = "SharePoint",
Name = "Programming CAML", Publisher = "DN",
Year = 2005},
new Book {ID = 7, Author = "Bob", Category = ".NET",
Name = "CLR Inside Outside", Publisher = "ORA",
Year = 2005},
new Book {ID = 8, Author = "Ibrahim", Category = "Inegration",
Name = "BIZTalk PipeLines", Publisher = "DHC",
Year = 2005},
new Book {ID = 9, Author = "Adam", Category = ".NET",
Name = "MSIL For Dummies", Publisher = "DHC",
Year = 2006},
new Book {ID = 10, Author = "Salim", Category = ".NET",
Name = "CLR Deep Dive", Publisher = "DN",
Year = 2006},
new Book {ID = 11, Author = "Hikmet", Category = "Windows",
Name = "Exchange Migration", Publisher = "MS",
Year = 2007},
new Book {ID = 12, Author = "Muhanad", Category = "SharePoint",
Name = "WSS Solutions", Publisher = "MS",
Year = 2007},
};
return BooksList;
}
static void Main(string[] args)
{
List<Book> books = GetBooksList();
var bks =
28
29. MODULE 3: INTRODUCTION TO LINQ
from b in books
where b.Category == ".NET"
select b;
Console.WriteLine(".NET Books");
Console.WriteLine("==========n");
foreach (var bk in bks)
{
Console.WriteLine("Book Name :{0}", bk.Name);
Console.WriteLine("Book Catregory:{0}", bk.Category);
Console.WriteLine("Book Author :{0}", bk.Author);
Console.WriteLine("nn");
}
Console.ReadKey();
}
}
}
8. Click Start on the Debug menu or press F5 to run the code.
29
30. MODULE 3: INTRODUCTION TO LINQ
Summary
In this module, you learned how Linq use the new C# 3.0 enhancements together to enable
the query expressions, and you learned how to use the query operators into different query
manners.
This module focus in writing and reading Linq code and querying objects and in-memory data
which allows you to move to the next step in using different Linq implementation such as
Linq to XML, and Linq to SQL.
Here is a summary of what you’ve introduced in this module:
Writing Query Expressions.
Writing Queries using extension methods directly.
Using different query operators.
Enabling Linq to Objects into .NET Framework 2.0 Applications.
30
31. MODULE 3: INTRODUCTION TO LINQ
References
1. Microsoft Site (http://www.microsoft.com)
2. Microsoft Developer Network (http://msdn.microsoft.com)
3. Scott Guthrie’s Blog (http://weblogs.asp.net/scottgu/)
4. Scott Hanselman’s Blog(http://www.hanselman.com/)
5. Microsoft Developers Evangelists VS 2008 Training Kit.
6. MSDN 101 Linq Samples.
31