The document discusses different types of selection and looping constructs in imperative programming languages. It describes if-else statements, switch-case statements, and how they allow a program to select different courses of action based on conditions. It also covers while, for, and do-while loops and how they repeatedly execute blocks of code while or until certain conditions are met. Examples are provided for each type of construct to illustrate their syntax and usage.
SOAP is a simple and flexible messaging framework for transferring information specified in the form of an XML infoset between an initial SOAP sender and ultimate SOAP receiver.
VB Script is a subset of Visual Basic 4.0 language. It was developed by Microsoft to provide more processing power to Web pages. VB Script can be used to write both server side and client side scripting. (If you already know Visual Basic or Visual Basic for Applications (VBA), VB Script will be very familiar. Even if you do not know Visual Basic, once you learn VB Script, you are on your way to programming with the whole family of Visual Basic languages.)
It gives the detailed information about Three Dimensional Display Methods, Three dimensional Graphics Package, Interactive Input Methods and Graphical User Interface, Input of Graphical Data, Graphical Data: Input Functions, Interactive Picture-Construction
The purpose of types:
To define what the program should do.
e.g. read an array of integers and return a double
To guarantee that the program is meaningful.
that it does not add a string to an integer
that variables are declared before they are used
To document the programmer's intentions.
better than comments, which are not checked by the compiler
To optimize the use of hardware.
reserve the minimal amount of memory, but not more
use the most appropriate machine instructions.
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled computing device which follows a predetermined sequence of operations automatically.
It will provide brief knowledge regarding different types of constructs such as conditional statement execution and looping etc, which is crucial for shell Scripting.
SOAP is a simple and flexible messaging framework for transferring information specified in the form of an XML infoset between an initial SOAP sender and ultimate SOAP receiver.
VB Script is a subset of Visual Basic 4.0 language. It was developed by Microsoft to provide more processing power to Web pages. VB Script can be used to write both server side and client side scripting. (If you already know Visual Basic or Visual Basic for Applications (VBA), VB Script will be very familiar. Even if you do not know Visual Basic, once you learn VB Script, you are on your way to programming with the whole family of Visual Basic languages.)
It gives the detailed information about Three Dimensional Display Methods, Three dimensional Graphics Package, Interactive Input Methods and Graphical User Interface, Input of Graphical Data, Graphical Data: Input Functions, Interactive Picture-Construction
The purpose of types:
To define what the program should do.
e.g. read an array of integers and return a double
To guarantee that the program is meaningful.
that it does not add a string to an integer
that variables are declared before they are used
To document the programmer's intentions.
better than comments, which are not checked by the compiler
To optimize the use of hardware.
reserve the minimal amount of memory, but not more
use the most appropriate machine instructions.
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled computing device which follows a predetermined sequence of operations automatically.
It will provide brief knowledge regarding different types of constructs such as conditional statement execution and looping etc, which is crucial for shell Scripting.
Decision Making in Java (if, if-else, switch, break, continue, jump) Decision Making in programming is similar to decision making in real life. A programming language uses control statements to control the flow of execution of program based on certain conditions.
Decision making in C. Decision making is about deciding the order of execution of statements based on certain conditions or repeat a group of statements until certain specified conditions are met. C language handles decision-making by supporting the following statements, if statement.
In this you learn about Control Statements
1. Selection Statements
i. If
ii. If-else
iii. Nested-if
iv. If-Elseif ladder
2. Looping Statements
i. while loop
ii. do-while loop
iii. For loop
3. Jumping Statements
i. break
ii. continue
iii return
The control statements enable us to specify the order in which the various instructions in a program are to be executed by the computer. They determine the flow of control in a program.
There are 4 types of control statements in C. They are:
a) Sequence control statements
b) Decision control statements or conditional statement
c) Case-control statements
d) Repetition or loop control statements
To understand about conditional statement.
To learn about if statement , if else , nested if else , if elseif else etc.
To learn about break and continue statement.
To use of switch statement in C.
To learn about Loop in C.
To learn about for loop in C.
To learn about while loop in C.
To learn about Do While in C (Entry and Exit control loop) in C.
To learn about goto statement.
C Programming - Decision making, LoopingMURALIDHAR R
Execution of a statement or set of statement repeatedly is called as looping.
The loop may be executed a specified number of times and this depends on the satisfaction of a test condition.
A program loop is made up of two parts one part is known as body of the loop and the other is known as control condition.
Depending on the control condition statement the statements within the loop may be executed repeatedly.
Depending on the position of the control statement in the loop, a control structure may be classified either as an entry controlled loop or as an exit controlled loop.
Entry Controlled Loop:
When the control statement is placed before the body of the loop then such loops are called as entry controlled loops.
If the test condition in the control statement is true then only the body of the loop is executed.
If the test condition in the control statement is not true then the body of the loop will not be executed. If the test condition fails in the first checking itself the body of the loop will never be executed.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
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.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
2. SELECTION CONSTRUCTS.
THE SELECTION CONSTRUCT:
The selection construct allows you to create a program that will select one of a
number of different alternative courses of action. It is also called the if..then..else
construct.
A selection statement provides for selection between alternatives. We can identify two
types of selection constructs:
If statements
Case statements
IF STATEMENT:
An if statement, sometimes referred to as a conditional, can be used in two forms:
If condition then action1
if (condition1) action1;
if (condition2) action2;
.
.
.
if (conditionN) actionN;
If condition then action1 else action2
3. if... else example
main()
{
int i;
printf("nEnter a number : ");
scanf("%d",&i);
if( i > 7 )
printf("I is greater than seven");
else
printf("I is not greater than seven");
}
Output:
Enter a number: 5
I is not greater than seven
4. CASE STATEMENT:
Switch case statements are a substitute for long if statements that
compare a variable to several values. Case statements allow selection
from many alternatives.
The switch expression is evaluated once.
The value of the expression is compared with the values of each case.
If there is a match, the associated block of code is executed.
Using break keyword:
If a condition is met in switch case then execution continues on into
the next case clause also if it is not explicitly specified that the
execution should exit the switch statement.This is achieved by
using break keyword.
What is default condition:
If none of the listed conditions is met then default condition
executed.
5. The basic format for using switch case is outlined below:
switch(expression)
{
case 1:
code block
break;
case 2:
code block
break;
.
.
case n:
code block
break;
default:
default code block
}
6. Selection structure vary from language to language,
but they tend to agree on the following:
Case Selection can appear in any order.
Case Selections do not have to be consecutive, meaning that it is
valid to have case-1, and case-4 without case-2 and case-3.
Case Selection must have distinct actions for each case,
otherwise we need to combine the actions to avoid conflict.
To Sum up, the effect of Switch structure is as follows:
Evaluate the switch expression.
Go to the case label having a constant value that matches the
value of the expression found in step 1; If a match is found, go
to the default label; if there is no default label; terminate the
switch.
Terminate the switch when break statement in encountered.
7. Switch… case example:
main()
{
int Grade = 'B';
switch(Grade )
{
case 'A' : printf( "Excellentn" );
break;
case 'B' : printf( “Very Goodn" );
break;
case 'C' : printf( "Good n" );
break;
case 'D' : printf( “O.K. n" );
break;
case 'F' : printf( “Satisfactory n" );
break;
default : printf( “Fair n" );
break;
}
}
This will produce following result:
Good
8. CONDITIONALCONSTRUCTS.
The conditional construct allows you to create a program that
will select one of a number of different alternative courses of
action. It is also called the if..then..else construct.
The initial if statement checks a condition (in this case >= 50).
If the condition is true, then the series of commands following
it are executed. If the condition is false (i.e. the user enters a
mark less than 50), then the series of commands following the
else statement are executed.
Note:
An if statement must check a condition and then be followed
by the word then.
An if statement must have an end if to finish it off.
An if statement does not have to have an else statement.
9. If…else Ladder:
if (expression)
{
Block of statements;
}
else
{
Block of statements;
}
if (expression)
{
Block of
statements;
}
else if(expression)
{
Block of
statements;
}
else
{
Block of
statements;
}
11. if... else example
int main()
{
int year;
printf("Enter a year: ");
scanf("%d",&year);
if(year%4 == 0)
{
if( year%100 == 0)
{
if ( year%400 == 0)
printf("%d is a leap year.", year);
else
printf("%d is not a leap year.", year);
}
else
printf("%d is a leap year.", year );
}
else
printf("%d is not a leap year.", year);
return 0;
}
12. LOOPINGCONSTRUCTS:
The loop constructs is
used to execute a block
of code until the
condition becomes
expired.
Loop constructs saves
the programmer from
writing code multiple
times that has
repetitive in nature
13. Types of loop to handle looping requirements
LoopType Description
while loop Repeats a statement or group of
statements while a given condition
is true. It tests the condition before
executing the loop body.
for loop Execute a sequence of statements
multiple times.
do...while loop Like a while statement, except that it
tests the condition at the end of the
loop body
nested loops You can use one or more loop inside
any another while, for or do..while
loop.
14. The Infinite Loop:
A loop becomes infinite loop if a condition never
becomes false.The for loop is traditionally used for this
purpose. Since none of the three expressions that form
the for loop are required, you can make an endless
loop by leaving the conditional expression empty.
int main ()
{
for( ; ; )
{
printf("This loop will run forever.n");
}
return 0;
}
15. While loop example..
In while loop control statement, loop is executed until condition becomes false.
Syntax:
while( condition )
body;
int main()
{
int i=3;
while(i<10)
{
printf("%dn",i); i++;
}
}
Output:
3 4 5 6 7 8 9
16. do...while loop examples
In do..while loop control statement, while loop is executed irrespective of
the condition for first time. Then 2nd time onwards, loop is executed until
condition becomes false.
int main()
{
int i=1;
do
{
printf("Value of i is %dn",i);
i++;
}
while(i<=4 && i>=2);
}
Output:
Value of i is 1
Value of i is 2
Value of i is 3
Value of i is 4
17. For loop example.
In for loop control statement, loop is executed until condition becomes false.
int main()
{
int i;
for(i=0;i<10;i++)
{
printf("%d ",i);
}
}
Output:
0 1 2 3 4 5 6 7 8 9