The document provides an index and descriptions of various topics related to web development including:
1. The modulus operator and examples of using it to check for divisibility.
2. Relational and logical operators like greater than, less than, equal to and examples of using them in code.
3. Descriptions of do-while and for loops with examples.
4. An example using a parameterized constructor to initialize cube dimensions.
5. Examples of string methods like startsWith, length, and trim.
6. Descriptions and examples of overloading methods and constructors.
7. An example of inheritance with overriding methods.
8. An interface example with animal classes
1. Basic Java class
class Ex1
{
public static void main(String args[])
{
int width;
int length;
int height;
width=5;
length=12;
height=3;
int v;
v=width*length*height;
System.out.println("Volume is :"+v);
}
}
Volume is :180
1. Basic Java class
class Ex1
{
public static void main(String args[])
{
int width;
int length;
int height;
width=5;
length=12;
height=3;
int v;
v=width*length*height;
System.out.println("Volume is :"+v);
}
}
Volume is :180
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch
Julien Ponge
This talk introduces part of the Java SE 7 novelties. The fork/join framework aims at making parallel programming simpler, while Project Coin brings a set of subtle yet useful changes to the Java programming language.
http://soft-shake.ch/2011/conference/sessions/java/2011/09/06/java7.html
Курс "Программирование на Java". Лекция 07 "Бонус - Головоломки".
Java Puzzlers. Синхронизация и многопоточность. Примитивы. Объекты и классы. Исключения и финализация.
МФТИ, 2016 год. Лектор - Лаврентьев Федор Сергеевич
Java Universal super class java.lang.Object is discussed comprehensively with code snippets.
Also covers:
a) Why we need inheritance and dynamic method dispatch
b) Need of a universal parent
c) Delegation and proxies
d) toString(), clone(), equals(), notify()
soft-shake.ch - Java SE 7: The Fork/Join Framework and Project Coinsoft-shake.ch
Julien Ponge
This talk introduces part of the Java SE 7 novelties. The fork/join framework aims at making parallel programming simpler, while Project Coin brings a set of subtle yet useful changes to the Java programming language.
http://soft-shake.ch/2011/conference/sessions/java/2011/09/06/java7.html
Курс "Программирование на Java". Лекция 07 "Бонус - Головоломки".
Java Puzzlers. Синхронизация и многопоточность. Примитивы. Объекты и классы. Исключения и финализация.
МФТИ, 2016 год. Лектор - Лаврентьев Федор Сергеевич
Java Universal super class java.lang.Object is discussed comprehensively with code snippets.
Also covers:
a) Why we need inheritance and dynamic method dispatch
b) Need of a universal parent
c) Delegation and proxies
d) toString(), clone(), equals(), notify()
program list:
WAP program to show constructor overloading using static member.
WAP to implement multilevel inheritance and method overriding.
WAP to implement interface class and show use of package.
WAP to implement multilevel exception handling and create your own exception.
WAP to implement 3 threads such that 1st sleeps for 200ms, 2nd for 400ms and 3rd for 600ms.
WAP to create applet of moving banner.
WAP to make a simple calculator.
Build a client server chat application.
OrderTest.javapublic class OrderTest { Get an arra.pdfakkhan101
OrderTest.java
public class OrderTest {
/**
* Get an array of specified size and pass it to Order.order().
* Report the results.
*/
public static void main(String[] args) {
if (args.length != 1) {//1
System.out.println(\"Usage: java OrderTest sizeOfArray\ \"
+ \"\\tor\ \\tjava OrderTest arrayFile\");
System.exit(1);
}
// create or read the int[]
int size = 0;
int[] array = new int[0];//5
try {
size = Integer.parseInt(args[0]);
array = ArrayOfInts.randomizedArray(size);
} catch (NumberFormatException nfe) {//8
try {
array = ArrayOfInts.arrayFromFile(args[0]);
size = array.length;
} catch (Exception e) {
System.err.println(\"unable to read array from \" + args[0]);
System.exit(1);//14
}
}
System.out.println(\"before:\");//15
for (int i = 0; i < array.length; i++) {//2 n
System.out.printf(((i+1) % 10 > 0) ? \" %d\" : \" %d\ \", array[i]);//1
}
int myNum = Order.order(array); //this is the call we want to measure
System.out.println(\"\ after:\");//18
for (int i = 0; i < array.length; i++) {//2 n
System.out.printf(((i+1) % 10 > 0) ? \" %d\" : \" %d\ \", array[i]);
}
System.out.println(myNum);
}
}
ArrayOfInts.java
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.InputMismatchException;
import java.util.Scanner;
public class ArrayOfInts {
/**
* Returns an array of consecutive ints from 1 to size.
*/
public static int[] orderedArray(int size) {
int[] a = new int[size];
for (int i = 0; i < size; i++) {
a[i] = i+1;
}
return a;
}
/**
* Returns a randomized array containing ints from 1 to size.
*/
public static int[] randomizedArray(int size) {
ArrayList aL = new ArrayList();
for (int i = 0; i < size; i++) {
aL.add(i+1);
}
Collections.shuffle(aL);
int[] a = new int[size];
for (int i = 0; i < size; i++) {
a[i] = aL.get(i);
}
return a;
}
/**
* Writes an int[] to a plain-text file with ints separated by spaces.
* Useful for creating input files for repeatable tests.
*/
public static void arrayToFile(int[] array, String outfile) {
try {
FileWriter fw = new FileWriter(outfile);
BufferedWriter bw = new BufferedWriter(fw);
PrintWriter outFile = new PrintWriter(bw);
for (int i : array) {
outFile.print(i + \" \");
}
outFile.close();
} catch (IOException e) {
System.err.println(\"Could not write to \" + outfile + \"\ \" + e);
}
}
/**
* Read ints from a file and return them in an int[]
*/
public static int[] arrayFromFile(String infile) throws FileNotFoundException,
InputMismatchException {
Scanner scan = new Scanner(new File(infile));
ArrayList aL = new ArrayList();
while (scan.hasNext()) {
aL.add(scan.nextInt());
}
scan.close();
int[] a = new int[aL.size()];
for (int i = 0; i < a.length; i++) {
a[i] = aL.get(i);
}
return a;
}
}
Order.java
public class Order {
/**
* Take an int[] and reorganize it so they are in ascending order.
*/
public static int order(int[] array) .
We aren't sure about you, but working with Java 8 made one of the speakers lose all of his hair and the other lose his sleep (or was it the jetlag?). If you still haven't reached the level of Brian Goetz in mastering lambdas and strings, this talk is for you. And if you think you have, we have some bad news for you, you should attend as well.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
The French Revolution Class 9 Study Material pdf free download
Sam wd programs
1. Web
Development
Practical File
Submitted By: Submitted To:
Soumya Subhadarshi Behera Mrs. Chavvi Rana
B.Tech- CSE (5th Semester) Lect. CSE
1826
UIET, MD University
2. INDEX
Sr. No. Date Topis Signature and
Remarks
1. Modulus Operator Description
2. Relational and Logical Operators
3 Do while and For Loop description
4. Parameterized Constructors
5. String Methods
6. Overloading Descriptions
7. Inheritance
8. Animal Interface
9. Exception Handlers
10. Writing inside a file
3. 1. Modulus Operator Description
class Remainder
{
public static void main (String args[])
{
int i = 12;
int j = 4;
int k = 0;
System.out.println("i is " + i);
System.out.println("j is " + j);
k = i % j;
System.out.println("Its Remainder is " + k);
}
}
class Divisor
{
public static void main(String[] args)
{
int a = 10;
int b = 2;
if ( a % b == 0 )
{
System.out.println(a + " is divisible by "+ b);
}
else
{
System.out.println(a + " is not divisible by " + b);
}
}
}
4. 2. Relational and Logical Operators
class RelationalProgram
{
public static void main(String[] args)
{ //a few numbers
int i = 3;
int j = 4;
int k = 4;
System.out.println("Greater than..."); //greater than
System.out.println(" i > j = " + (i > j)); //false
System.out.println(" j > i = " + (j > i)); //true
System.out.println(" k > j = " + (k > j)); //false(equal) //greater than or equal to
System.out.println("Greater than or equal to...");
System.out.println(" i >= j = " + (i >= j)); //false
System.out.println(" j >= i = " + (j >= i)); //true
System.out.println(" k >= j = " + (k >= j)); //true
//less than
System.out.println("Less than...");
System.out.println(" i < j = " + (i < j)); //true
System.out.println(" j < i = " + (j < i)); //false
System.out.println(" k < j = " + (k < j)); //false
//less than or equal to
System.out.println("Less than or equal to...");
System.out.println(" i <= j = " + (i <= j)); //true
System.out.println(" j <= i = " + (j <= i)); //false
System.out.println(" k <= j = " + (k <= j)); //true
//equal to
System.out.println("Equal to...");
System.out.println(" i is equivalent to j = " + (i == j));
System.out.println(" k is equivalent to j = " + (k == j));
//not equal to
System.out.println("Not equal to...");
5. System.out.println(" i not equal to j = " + (i != j)); //true
System.out.println(" k not equal to j = " + (k != j)); //false
}
}
class ConditionalOperator
{
public static void main(String[] args)
{
int x = 2;
int y = 20, result=0;
boolean bl = true;
if((x == 5) && (x < y))
{
System.out.println("value of x is "+ x);
}
if((x == y) || (y > 1))
{
System.out.println("value of y is greater than the value of x");
}
result = bl ? x : y;
System.out.println("The returned value is "+ result);
}
}
6. 3. Do while and For loop presentation
class DoWhile
{
public static void main(String[] args)
{
int count = 1;
do
{
System.out.println("Count is: " + count);
count++;
} while (count < 11);
}
}
class ForLoop
{
public static void main(String[] args)
{
7. for(int i = 1;i <= 10;i++)
{
for(int j = 1;j <= i;j++)
{
System.out.print(i);
}
System.out.println();
}
}
}
4. Parameterized Constructor
class Cube
{
int len;
int bdth;
int ht;
public int getVolume()
{
return (len * bdth * ht);
}
Cube()
{
len = 15;
bdth = 15;
ht = 15;
}
Cube(int l, int b, int h)
{
len = l;
bdth = b;
ht = h;
}
8. public static void main(String[] args)
{
Cube cubeObj1, cubeObj2;
cubeObj1 = new Cube();
cubeObj2 = new Cube(10, 20, 30);
System.out.println("Volume of Cube is : " + cubeObj1.getVolume());
System.out.println("Volume of Cube is : " + cubeObj2.getVolume());
}
}
5. String Methods
import java.lang.*;
class StrStartWith
{
public static void main(String[] args)
{
System.out.println("String start with example!");
String str = "Welcome to my Coding!!!";
String start = "Welcome";
System.out.println("Given String : " + str);
System.out.println("Start with : " + start);
if (str.startsWith(start))
{
System.out.println("The given string is start with Welcome");
}
else
{
System.out.println("The given string is not start with Welcome");
}
}
}
9. import java.lang.*;
import java.io.*;
class StringLength
{
public static void main(String[] args) throws IOException
{
System.out.println("String lenght example!");
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please enter string:");
String str = bf.readLine();
int len = str.length();
System.out.println("String lenght : " + len);
}
}
import java.lang.*;
class StringTrim
{
public static void main(String[] args)
10. {
System.out.println("String trim example!");
String str = " Hindustan";
System.out.println("Given String :" + str);
System.out.println("After trim :" +str.trim());
}
}
6.Overloading Methods and Constructors
class OverloadDemo
{
void test()
{
System.out.println("No parameters");
}
// Overload test for one integer parameter.
void test(int a)
{
System.out.println("a: " + a);
}
// Overload test for two integer parameters.
void test(int a, int b)
{
System.out.println("a and b: " + a + " " + b);
}
// overload test for a double parameter
double test(double a)
{
System.out.println("double a: " + a);
return a*a;
}
}
class Overload
11. {
public static void main(String args[])
{
OverloadDemo ob = new OverloadDemo();
double result;
// call all versions of test()
ob.test();
ob.test(11);
ob.test(11, 2);
result = ob.test(11.2);
System.out.println("Result of ob.test(11.2): " + result);
}
}
7. Inheritance
class Base
{
int a = 11;
void show()
{
System.out.println(a);
}
}
class Super extends Base
{
int a = 22;
void show()
{
super.show();
System.out.println(a);
}
public static void main(String[] args)
{
new Super().show();
12. }
}
8.executing speak() and eat() methods using animal interface
interface IAnimal
{
public void speak();
}
public class Cat implements IAnimal
{
public void speak()
{
System.out.println("Cat speaks meaown!!!");
}
public static void main(String args[])
{
Cat c = new Cat();
c.speak();
}
}
public class Dog implements IAnimal
{
public void speak()
{
System.out.println("Dog eats Cat!!!");
}
public static void main(String args[])
{
Dog d = new Dog();
d.speak();
}
}
13. 9. Exception handling
import java.io.*;
import java.util.*;
class MyException extends Exception
{
private String ssb="";
public String getMessage(String s)
{
ssb=s;
return ("you are not permitted to enter inside "+ ssb);
}
}
class ExcepDemo
{
public static void main(String args[]) throws MyException,IOException
{
String temp="";
try
{
String str="Soumya Subhadarshi Behera";
System.out.println("Enter your name");
BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
temp=br.readLine();
if(!temp.equals(str))
throw new MyException();
else
System.out.println("Welcome to MDU");
}
catch(MyException e)
{
System.err.println(e.getMessage(temp));
}
14. catch(Exception e)
{
System.err.println(e);
}
}
}
10.Writing inside a file
import java.lang.*;
import java.io.*;
class FileWrite
{
public static void main(String args[])
{
try
{
FileWriter fstream = new FileWriter("KeyboardInput.txt");
BufferedWriter out = new BufferedWriter(fstream);
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please enter string:");
String str = bf.readLine();
out.write(str);
out.close();
}
catch (Exception e)
{
System.err.println("Error: " + e.getMessage());
}
}
}