The document discusses generic programming and the Standard Template Library (STL) in C++. It provides an overview of key concepts in generic programming like class templates and how templates allow for reusability. It also covers STL containers, iterators, algorithms and other common components. Specific examples are given around stacks, arrays, and multiple inheritance to demonstrate how templates and generic programming work.
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAMaulik Borsaniya
Classes and Object-oriented Programming:
Classes: Creating a Class, The Self Variable, Constructor, Types of Variables, Namespaces, Types of Methods (Instance Methods, Class Methods, Static Methods), Passing Members of One Class to Another Class, Inner Classes
Inheritance and Polymorphism: Constructors in Inheritance, Overriding Super Class Constructors and Methods, The super() Method, Types of Inheritance, Single Inheritance, Multiple Inheritance, Method Resolution Order (MRO), Polymorphism, Duck Typing Philosophy of Python, Operator Overloading, Method Overloading, Method Overriding
Abstract Classes and Interfaces: Abstract Method and Abstract Class, Interfaces in Python, Abstract Classes vs. Interfaces,
Object oriented programming with pythonArslan Arshad
A short intro to how Object Oriented Paradigm work in Python Programming language. This presentation created for beginner like bachelor student of Computer Science.
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAMaulik Borsaniya
Classes and Object-oriented Programming:
Classes: Creating a Class, The Self Variable, Constructor, Types of Variables, Namespaces, Types of Methods (Instance Methods, Class Methods, Static Methods), Passing Members of One Class to Another Class, Inner Classes
Inheritance and Polymorphism: Constructors in Inheritance, Overriding Super Class Constructors and Methods, The super() Method, Types of Inheritance, Single Inheritance, Multiple Inheritance, Method Resolution Order (MRO), Polymorphism, Duck Typing Philosophy of Python, Operator Overloading, Method Overloading, Method Overriding
Abstract Classes and Interfaces: Abstract Method and Abstract Class, Interfaces in Python, Abstract Classes vs. Interfaces,
Object oriented programming with pythonArslan Arshad
A short intro to how Object Oriented Paradigm work in Python Programming language. This presentation created for beginner like bachelor student of Computer Science.
Slides from Advaned Python lectures I gave recently in Haifa Linux club
Advanced python, Part 1:
- Decorators
- Descriptors
- Metaclasses
- Multiple inheritance
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
Qcon2011 functions rockpresentation_scalaMichael Stal
This is the part I of the tutorial I planned to give at QCon 2011 on Functional Programming with Scala. It also includes Scala 2.8 as well as upcoming features
Slides from Advaned Python lectures I gave recently in Haifa Linux club
Advanced python, Part 1:
- Decorators
- Descriptors
- Metaclasses
- Multiple inheritance
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
Qcon2011 functions rockpresentation_scalaMichael Stal
This is the part I of the tutorial I planned to give at QCon 2011 on Functional Programming with Scala. It also includes Scala 2.8 as well as upcoming features
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...Sagar Verma
OOPS and its application in Java, Super class AND This Keyword,Java Bean, POJO ,Memory management in Java ,Packages ,Miscellaneous (Var-Args, toString(), Double equals operator(==))
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. This talk will detail several new key features of Java 8 that can help make programs easier to read, write, and maintain. Java 8 comes with many features, especially related to collection libraries. We will cover such new features as Lambda Expressions, the Stream API, enhanced interfaces, and more.
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. This talk will detail several new key features of Java 8 that can help make programs easier to read, write, and maintain. Java 8 comes with many features, especially related to collection libraries. We will cover such new features as Lambda Expressions, the Stream API, enhanced interfaces, and more.
Object- objects have states and behaviors. Example: A dog has states-color, name, breed , as well as behaviors – barking, eating. An object is an instance of a class.
Class- A class can be defined as a template/blue print that describe the behavior/states that object of its type support.
A presentation on Design Patterns. This was created for the workshop at NED University of Engineering and Technology Karachi, Pakistan CIS Department held on April 7, 2012.
Had a wonderful experience
Control Flow Statements
Last Week Homework "Stack" Solution
Function pointer (函式指標)
Static Class Members (靜態類別成員)
Constructor & Destructor (建構子與解構子)
Class Templates (類別樣板)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
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!
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
3. Class Templates (Class Templates ( 類別樣板類別樣板 ))
Standard Template Library(STL)Standard Template Library(STL)
It is not completely compatible in C++ ComIt is not completely compatible in C++ Com
pilerpiler
Template prototypes and definitions shoulTemplate prototypes and definitions shoul
d locate at the same file(*.h), except usingd locate at the same file(*.h), except using
"export" if compiler support it"export" if compiler support it
4. Using template classUsing template class
Stack<int> kernels; // create a stack of intStack<int> kernels; // create a stack of int
Stack<String> colonels; // a stack of String objectsStack<String> colonels; // a stack of String objects
Template<class T>Template<class T>
void simple(T t) { cout << t << "n"; }void simple(T t) { cout << t << "n"; }
simple(2); // generate void simple(int)simple(2); // generate void simple(int)
simple("two"); // generate void simple(char *)simple("two"); // generate void simple(char *)
ExampleExample
stackitemstackitem
5. Stack pointer-incorrect versionStack pointer-incorrect version
Stack<String> s; // original stackStack<String> s; // original stack
Stack<char *> st; // alternate stackStack<char *> st; // alternate stack
String po;String po;
Three described version for "String po;"Three described version for "String po;"
1.1. char *po; // cin >> po; errorchar *po; // cin >> po; error
2.2. char po[40];char po[40];
// template <class Type>// template <class Type>
// bool Stack<Type>::pop(Type &item)// bool Stack<Type>::pop(Type &item)
// { ...; item = items[--top]; ... }// { ...; item = items[--top]; ... }
// item is Lvalue, cannot be array name// item is Lvalue, cannot be array name
3.3. char *po = new char[40];char *po = new char[40];
// push to the same address, and pop the same address value// push to the same address, and pop the same address value
// pop outcome is always the last push data// pop outcome is always the last push data
7. Template arrayTemplate array
Template is usually used in container classTemplate is usually used in container class
ArrayTP<ArrayTP<int,5>, 10> twodee;ArrayTP<ArrayTP<int,5>, 10> twodee;
int twodee[10][5];int twodee[10][5];
ExampleExample
arraytparraytp
8. Class Templates (Class Templates ( 類別樣板類別樣板 ))
template <class T> // Ttemplate <class T> // T 是樣板參數是樣板參數
class TStackclass TStack
{{
public:public:
TStack(int = 10) ;TStack(int = 10) ;
~TStack() { delete [] stackPtr ; }~TStack() { delete [] stackPtr ; }
bool Push(const T&);bool Push(const T&);
bool Pop(T&) ; // pop an element off the stackbool Pop(T&) ; // pop an element off the stack
bool isEmpty()const { return top == -1 ; }bool isEmpty()const { return top == -1 ; }
bool isFull() const { return top == size - 1 ; }bool isFull() const { return top == size - 1 ; }
private:private:
int size ; // Number of elements on Stackint size ; // Number of elements on Stack
int top ;int top ;
T* stackPtr ;T* stackPtr ;
};};
11. ContainmentContainment
Containment (composition, layering) is a hContainment (composition, layering) is a h
as-a relationshipas-a relationship
class Studentclass Student
{{
private:private:
String name; // use a String object for namString name; // use a String object for nam
ee
ArrayDb scores; // use an ArrayDb object fArrayDb scores; // use an ArrayDb object f
or scoresor scores
};};
13. Containment or private inheritanceContainment or private inheritance
Has-a relationship is generated fromHas-a relationship is generated from
containment and private inheritancecontainment and private inheritance
In general, we can use containment toIn general, we can use containment to
build up "has-a" relationshipbuild up "has-a" relationship
Private inheritance involved in somePrivate inheritance involved in some
particular status, such as accessingparticular status, such as accessing
protected member, or redefined virtualprotected member, or redefined virtual
functionfunction
20. Using virtual base classUsing virtual base class
If class indirectly inherit from a virtual baseIf class indirectly inherit from a virtual base
class, the constructor in base class shouldclass, the constructor in base class should
be involved except taking implicit default cbe involved except taking implicit default c
onstructoronstructor
-SingingWaiter(const Worker &wk, int p=0, int-SingingWaiter(const Worker &wk, int p=0, int
v=Singer::other): Waiter(wk,p), Singer(wk,v=Singer::other): Waiter(wk,p), Singer(wk,
v){} // flawedv){} // flawed
-SingingWaiter(const Worker &wk, int p=0, int-SingingWaiter(const Worker &wk, int p=0, int
v=Singer::other):v=Singer::other): Worker(wk)Worker(wk),Waiter(wk,p),,Waiter(wk,p),
Singer(wk,v){} // OKSinger(wk,v){} // OK
21. Array class (Array class ( 模擬語言內建的陣列模擬語言內建的陣列 ))
有次序性的容器,容納單一型別的多個元素有次序性的容器,容納單一型別的多個元素
。。
索引動作索引動作 (indexing)(indexing)
下標下標 (subscript [])(subscript []) 運算子運算子
22. Array class (Array class ( 模擬語言內建的陣列模擬語言內建的陣列 ))
Object-Based DesignObject-Based Design
Object_BasedObject_Based
Object-Oriented DesignObject-Oriented Design
Object-OrientedObject-Oriented
Generic DesignGeneric Design
Without Inheritance: GenericWithout Inheritance: Generic
With Inheritance: Generic_InheritanceWith Inheritance: Generic_Inheritance
標準的標準的 ArrayArray 其實是個其實是個 VectorVector
Vector_DemoVector_Demo
24. Container Classes and IteratorsContainer Classes and Iterators
Container classes (collection classes)Container classes (collection classes)
Classes designed to hold collections of objectsClasses designed to hold collections of objects
Provide services such as insertion, deletion, sProvide services such as insertion, deletion, s
earching, sorting, or testing an itemearching, sorting, or testing an item
Examples:Examples:
Arrays, stacks, queues, trees and linked listsArrays, stacks, queues, trees and linked lists
Iterator objects (iterators)Iterator objects (iterators)
Object that returns the next item of a collectionObject that returns the next item of a collection
(or performs some action on the next item)(or performs some action on the next item)
Can have several iterators per containerCan have several iterators per container
Book with multiple bookmarksBook with multiple bookmarks
32. ReferencesReferences
C++ How to Program 3rd.C++ How to Program 3rd.
STLSTL 源碼剖析源碼剖析
STLSTL中文站中文站
C++ Primer 3rdC++ Primer 3rd
C++C++ 教學範本教學範本
物件導向程式設計物件導向程式設計 hh
ttp://vr.me.ncku.edu.tw/courses/index-oop.htmttp://vr.me.ncku.edu.tw/courses/index-oop.htm