Snippets Collections
books.dtd 
<!ELEMENT library (book+)> 
<!ELEMENT book (title, author, isbn, publisher, edition, price)> 
<!ELEMENT title (#PCDATA)> 
<!ELEMENT author (#PCDATA)> 
<!ELEMENT isbn (#PCDATA)> 
<!ELEMENT publisher (#PCDATA)> 
<!ELEMENT edition (#PCDATA)> 
<!ELEMENT price (#PCDATA)> 
books.xsd 
<?xml version="1.0" encoding="UTF-8"?> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
<xs:element name="library"> 
<xs:complexType> 
<xs:sequence> 
<xs:element name="book" maxOccurs="unbounded"> 
<xs:complexType> 
<xs:sequence> 
<xs:element name="title" type="xs:string"/> 
<xs:element name="author" type="xs:string"/> 
<xs:element name="isbn" type="xs:string"/> 
<xs:element name="publisher" type="xs:string"/> 
<xs:element name="edition" type="xs:string"/> 
<xs:element name="price" type="xs:decimal"/> 
</xs:sequence> 
</xs:complexType> 
</xs:element> 
</xs:sequence> 
</xs:complexType> 
</xs:element> 
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?> 
<library> 
<book> 
<title>The Great Gatsby</title> 
<author>F. Scott Fitzgerald</author> 
<isbn>978-0743273565</isbn> 
<publisher>Scribner</publisher> 
<edition>1st</edition> 
<price>10.99</price> 
</book> 
<book> 
<title>To Kill a Mockingbird</title> 
<author>Harper Lee</author> 
<isbn>978-0061120084</isbn> 
<publisher>Harper Perennial Modern Classics</publisher> 
<edition>50th Anniversary Edition</edition> 
<price>7.19</price> 
</book> 
<book> 
<title>1984</title> 
<author>George Orwell</author> 
<isbn>978-0451524935</isbn> 
<publisher>Signet Classics</publisher> 
<edition>Anniversary Edition</edition> 
<price>9.99</price> 
</book> 
<book> 
<title>Moby Dick</title> 
<author>Herman Melville</author> 
<isbn>978-1503280786</isbn> 
<publisher>CreateSpace Independent Publishing Platform</publisher> 
<edition>1st</edition> 
<price>11.95</price> 
</book> 
<book> 
<title>Brave New World</title> 
<author>Aldous Huxley</author> 
<isbn>978-0060850524</isbn> 
<publisher>Harper Perennial Modern Classics</publisher> 
<edition>Reissue</edition> 
<price>14.99</price> 
</book> 
</library>
// Prototypal Inheritance 
function Animal(name) { 
this.name = name; 
} 
Animal.prototype.speak = function() { 
console.log(`${this.name} makes a noise.`); 
}; 
function Dog(name) { 
Animal.call(this, name); // Call the parent constructor 
} 
Dog.prototype = Object.create(Animal.prototype); 
Dog.prototype.constructor = Dog; 
Dog.prototype.speak = function() { 
console.log(`${this.name} barks.`); 
}; 
// Closure 
function createCounter() { 
let count = 0; // Private variable 
return { 
increment: function() { 
count++; 
return count; 
}, 
decrement: function() { 
count--; 
return count; 
}, 
getCount: function() { 
return count; 
} 
}; 
} 
// Callback 
function fetchData(callback) { 
setTimeout(() => { 
const data = { message: "Data fetched!" }; 
callback(data); 
}, 1000); 
} 
// Promise 
function fetchDataPromise() { 
return new Promise((resolve, reject) => { 
setTimeout(() => { 
const data = { message: "Data fetched with Promise!" }; 
resolve(data); 
}, 1000); 
}); 
} 
// Async/Await 
async function fetchDataAsync() { 
const data = await fetchDataPromise(); 
console.log(data.message); 
} 
// Demonstration 
function demo() { 
// Prototypal Inheritance 
const dog = new Dog('Buddy'); 
dog.speak(); // Output: Buddy barks. 
// Closure 
const counter = createCounter(); 
console.log(counter.increment()); // Output: 1 
console.log(counter.increment()); // Output: 2 
console.log(counter.decrement()); // Output: 1 
console.log(counter.getCount()); // Output: 1 
// Callback 
fetchData((data) => { 
console.log(data.message); // Output: Data fetched! 
}); 
// Promise 
fetchDataPromise().then((data) => { 
console.log(data.message); // Output: Data fetched with Promise! 
}); 
// Async/Await 
fetchDataAsync(); // Output: Data fetched with Promise! 
} 
// Run the demonstration 
demo();
HTML 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>Scientific Calculator</title> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<div class="calculator"> 
<input type="text" id="display" disabled> 
<div class="buttons"> 
<button onclick="clearDisplay()">C</button> 
<button onclick="appendToDisplay('7')">7</button> 
<button onclick="appendToDisplay('8')">8</button> 
<button onclick="appendToDisplay('9')">9</button> 
<button onclick="appendToDisplay('/')">/</button> 
<button onclick="appendToDisplay('4')">4</button> 
<button onclick="appendToDisplay('5')">5</button> 
<button onclick="appendToDisplay('6')">6</button> 
<button onclick="appendToDisplay('*')">*</button> 
<button onclick="appendToDisplay('1')">1</button> 
<button onclick="appendToDisplay('2')">2</button> 
<button onclick="appendToDisplay('3')">3</button> 
<button onclick="appendToDisplay('-')">-</button> 
<button onclick="appendToDisplay('0')">0</button> 
<button onclick="appendToDisplay('.')">.</button> 
<button onclick="calculate()">=</button> 
<button onclick="appendToDisplay('+')">+</button> 
<button onclick="calculate('sqrt')">√</button> 
<button onclick="calculate('pow')">x²</button> 
<button onclick="calculate('sin')">sin</button> 
<button onclick="calculate('cos')">cos</button> 
<button onclick="calculate('tan')">tan</button> 
</div> 
</div> 
<script src="script.js"></script> 
</body> 
</html> 
CSS 
body { 
display: flex; 
justify-content: center; 
align-items: center; 
height: 100vh; 
background-color: #f4f4f4; 
font-family: Arial, sans-serif; 
} 
.calculator { 
background-color: white; 
border-radius: 10px; 
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
padding: 20px; 
width: 300px; 
} 
#display { 
width: 100%; 
height: 40px; 
text-align: right; 
font-size: 24px; 
border: 1px solid #ccc; 
border-radius: 5px; 
margin-bottom: 10px; 
padding: 5px; 
} 
.buttons { 
display: grid; 
grid-template-columns: repeat(4, 1fr); 
gap: 10px; 
} 
button { 
height: 40px; 
font-size: 18px; 
border: none; 
border-radius: 5px; 
background-color: #007bff; 
color: white; 
cursor: pointer; 
transition: background-color 0.3s; 
} 
button:hover { 
background-color: #0056b3; 
} 
script.js 
function appendToDisplay(value) { 
document.getElementById("display").value += value; 
} 
function clearDisplay() { 
document.getElementById("display").value = ""; 
} 
function calculate(operation) { 
const display = document.getElementById("display"); 
let result; 
try { 
if (operation === 'sqrt') { 
result = Math.sqrt(eval(display.value)); 
} else if (operation === 'pow') { 
result = Math.pow(eval(display.value), 2); 
} else if (['sin', 'cos', 'tan'].includes(operation)) { 
const angle = eval(display.value) * (Math.PI / 180); // Convert to radians 
result = Math[operation](angle); 
} else { 
result = eval(display.value); 
} 
display.value = result; 
} catch (error) { 
display.value = "Error!"; 
} 
}
HTML 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>Registration</title> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<h1>Register</h1> 
<form id="registrationForm"> 
<input type="text" id="username" placeholder="Username" required> 
<input type="email" id="email" placeholder="Email" required> 
<input type="password" id="password" placeholder="Password" required> 
<button type="submit">Register</button> 
<div id="message" class="error-message"></div> 
</form> 
<script src="script.js"></script> 
</body> 
</html> 
script.js 
document.getElementById("registrationForm").addEventListener("submit", function(event) { 
event.preventDefault(); // Prevent form submission 
validateRegistration(); 
}); 
function validateRegistration() { 
const username = document.getElementById("username").value; 
const email = document.getElementById("email").value; 
const password = document.getElementById("password").value; 
const messageDiv = document.getElementById("message"); 
messageDiv.textContent = ""; 
// Simple validation 
if (username.length < 3) { 
messageDiv.textContent = "Username must be at least 3 characters."; 
return; 
} 
if (!/\S+@\S+\.\S+/.test(email)) { 
messageDiv.textContent = "Email is not valid."; 
return; 
} 
if (password.length < 6) { 
messageDiv.textContent = "Password must be at least 6 characters."; 
return; 
} 
messageDiv.textContent = "Registration successful!"; 
// You can proceed to send the data to the server here 
} 
---------------------------
User Login Page(HTML) 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>Login</title> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<h1>Login</h1> 
<form id="loginForm"> 
<input type="email" id="loginEmail" placeholder="Email" required> 
<input type="password" id="loginPassword" placeholder="Password" required> 
<button type="submit">Login</button> 
<div id="loginMessage" class="error-message"></div> 
</form> 
<script src="script.js"></script> 
</body> 
</html> 
script.js 
document.getElementById("loginForm").addEventListener("submit", function(event) { 
event.preventDefault(); // Prevent form submission 
validateLogin(); 
}); 
function validateLogin() { 
const email = document.getElementById("loginEmail").value; 
const password = document.getElementById("loginPassword").value; 
const loginMessageDiv = document.getElementById("loginMessage"); 
loginMessageDiv.textContent = ""; 
// Simple validation 
if (!/\S+@\S+\.\S+/.test(email)) { 
loginMessageDiv.textContent = "Email is not valid."; 
return; 
} 
if (password.length < 6) { 
loginMessageDiv.textContent = "Password must be at least 6 characters."; 
return; 
} 
loginMessageDiv.textContent = "Login successful!"; 
// You can proceed to authenticate the user here 
} 
----------------------------------
User Profile Page(HTML) 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>User Profile</title> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<h1>User Profile</h1> 
<form id="profileForm"> 
<input type="text" id="profileUsername" placeholder="Username" required> 
<input type="email" id="profileEmail" placeholder="Email" required> 
<button type="submit">Update Profile</button> 
<div id="profileMessage" class="error-message"></div> 
</form> 
<script src="script.js"></script> 
</body> 
</html> 
script.js 
document.getElementById("profileForm").addEventListener("submit", function(event) { 
event.preventDefault(); // Prevent form submission 
validateProfile(); 
}); 
function validateProfile() { 
const username = document.getElementById("profileUsername").value; 
const email = document.getElementById("profileEmail").value; 
const profileMessageDiv = document.getElementById("profileMessage"); 
profileMessageDiv.textContent = ""; 
// Simple validation 
if (username.length < 3) { 
profileMessageDiv.textContent = "Username must be at least 3 characters."; 
return; 
} 
if (!/\S+@\S+\.\S+/.test(email)) { 
profileMessageDiv.textContent = "Email is not valid."; 
return; 
} 
profileMessageDiv.textContent = "Profile updated successfully!"; 
// You can proceed to update the user profile on the server here 
} 
------------------------------------
Payment page(HTML) 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>Payment</title> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<h1>Payment</h1> 
<form id="paymentForm"> 
<input type="text" id="cardNumber" placeholder="Card Number" required> 
<input type="text" id="expiryDate" placeholder="MM/YY" required> 
<input type="text" id="cvv" placeholder="CVV" required> 
<button type="submit">Pay</button> 
<div id="paymentMessage" class="error-message"></div> 
</form> 
<script src="script.js"></script> 
</body> 
</html> 
script.js 
document.getElementById("paymentForm").addEventListener("submit", function(event) { 
event.preventDefault(); // Prevent form submission 
validatePayment(); 
}); 
function validatePayment() { 
const cardNumber = document.getElementById("cardNumber").value; 
const expiryDate = document.getElementById("expiryDate").value; 
const cvv = document.getElementById("cvv").value; 
const paymentMessageDiv = document.getElementById("paymentMessage"); 
paymentMessageDiv.textContent = ""; 
// Simple validation 
if (!/^\d{16}$/.test(cardNumber)) { 
paymentMessageDiv.textContent = "Card number must be 16 digits."; 
return; 
} 
if (!/^(0[1-9]|1[0-2])\/\d{2}$/.test(expiryDate)) { 
paymentMessageDiv.textContent = "Expiry date must be in MM/YY format."; 
return; 
} 
if (!/^\d{3}$/.test(cvv)) { 
paymentMessageDiv.textContent = "CVV must be 3 digits."; 
return; 
} 
paymentMessageDiv.textContent = "Payment successful!"; 
// You can proceed to process the payment here 
}
HTML 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>Responsive Web Page with Bootstrap</title> 
<link 
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<header class="bg-success text-white text-center py-4"> 
<h1>My Awesome Web Page</h1> 
</header> 
<main class="container my-5"> 
<section class="row"> 
<div class="col-lg-4 col-md-6 mb-4"> 
<div class="card grid-item"> 
<div class="card-body"> 
<h5 class="card-title">Item 1</h5> 
</div> 
</div> 
</div> 
<div class="col-lg-4 col-md-6 mb-4"> 
<div class="card grid-item"> 
<div class="card-body"> 
rel="stylesheet" 
                        <h5 class="card-title">Item 2</h5> 
                    </div> 
                </div> 
            </div> 
            <div class="col-lg-4 col-md-6 mb-4"> 
                <div class="card grid-item"> 
                    <div class="card-body"> 
                        <h5 class="card-title">Item 3</h5> 
                    </div> 
                </div> 
            </div> 
            <div class="col-lg-4 col-md-6 mb-4"> 
                <div class="card grid-item"> 
                    <div class="card-body"> 
                        <h5 class="card-title">Item 4</h5> 
                    </div> 
                </div> 
            </div> 
            <div class="col-lg-4 col-md-6 mb-4"> 
                <div class="card grid-item"> 
                    <div class="card-body"> 
                        <h5 class="card-title">Item 5</h5> 
                    </div> 
                </div> 
            </div> 
</section> 
</main> 
<footer class="bg-dark text-white text-center py-3"> 
<p>Footer Content</p> 
</footer> 
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> 
<script 
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script> 
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> 
</body> 
</html> 
---
CSS 
.grid-item { 
background-color: #ffcc00; 
transition: transform 0.3s ease, background-color 0.3s ease; 
} 
.grid-item:hover { 
transform: scale(1.05); 
background-color: #ffd700; 
}
HTML 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<title>CSS Grid and Flexbox Example</title> 
<link rel="stylesheet" href="styles.css"> 
</head> 
<body> 
<header class="header"> 
<h1>My Awesome Web Page</h1> 
</header> 
<main class="main-content"> 
<section class="grid-container"> 
<div class="grid-item">Item 1</div> 
<div class="grid-item">Item 2</div> 
<div class="grid-item">Item 3</div> 
<div class="grid-item">Item 4</div> 
<div class="grid-item">Item 5</div> 
</section> 
</main> 
<footer class="footer"> 
<p>Footer Content</p> 
</footer> 
</body> 
</html> 
---
CSS 
* { 
} 
box-sizing: border-box; 
margin: 0; 
padding: 0; 
body { 
font-family: Arial, sans-serif; 
display: flex; 
flex-direction: column; 
height: 100vh; 
} 
.header { 
background-color: #4CAF50; 
color: white; 
text-align: center; 
padding: 20px; 
} 
.main-content { 
flex: 1; 
display: flex; 
justify-content: center; 
align-items: center; 
background-color: #f4f4f4; 
} 
.grid-container { 
display: grid; 
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
gap: 15px; 
padding: 20px; 
} 
.grid-item { 
background-color: #ffcc00; 
padding: 20px; 
border-radius: 5px; 
text-align: center; 
transition: transform 0.3s ease, background-color 0.3s ease; 
} 
.grid-item:hover { 
transform: scale(1.1); 
background-color: #ffd700; 
} 
.footer { 
background-color: #333; 
color: white; 
text-align: center; 
padding: 10px; 
} 
@keyframes fadeIn { 
from { 
opacity: 0; 
} 
to { 
} 
} 
opacity: 1; 
.header, .footer { 
animation: fadeIn 1s ease-in; 
}
blade
<input type="hidden" name="salarysheet_id[{{$emp->id}}]" value="{{$emp->id}}" >
controller
$salarysheet_ids = json_decode($request->input('salarysheet_ids'), true);
dd($salarysheet_ids);
حيث إنّ الرحلات إلى القمر قد توقفت، والرحلات إلى المريخ لا زالت تحت الدراسة والتخطيط، في بداية الأمر كان اختيار رواد الفضاء يسري وفق شروطٍ صارمة جداً، وكان يمكن القول إنّ الأمر مُحتكرٌ من قبل الجيش؛ حيث إنّه كان من المتطلبات أن يكون الشخص المختار ذا معرفة بقيادة الطائرات النفاثة والهندسة، وأن يكون طوله أقل من 180 سنتيمتراً.[١]
console.log("calculation script");

var forValues = ZDK.Page.getForm().getValues();


var Token_Details = forValues.Token_Details;
console.log(Token_Details);

/////
var totalTax = 0
updatedItems = new Array();
for (let i = 0; i < Token_Details.length; i++) {


    let row = Token_Details[i];

    let tokens = row.Tokens;
    let tokenValue = row.Token_Value;
    var amount = tokens * tokenValue;
    var tax = amount * 0.20;
    totalTax = totalTax + tax;
    ////
    rowMap = {
        "Promoter": row.Promoter,
        "Tokens": tokens,
        "Token_Value": tokenValue,
        "Amount": amount
    }

    updatedItems.push(rowMap);
  
}
console.log(totalTax);
var taxField = ZDK.Page.getField('Total_Tax');
taxField.setValue(totalTax);


var updateResp = ZDK.Page.getForm().setValues({
    'Total_Tax': totalTax,
    'Token_Details': updatedItems
});


console.log(updateResp);
#{$wrap} #{$menu} > li.mega-menu-item > a.mega-menu-link:hover {
        background-color: #3C8AFF;
	 color: #FFFFFF;
	 font-weight: bold;
}
<html>
<head>
    <meta charset="UTF-8">
    <title>Simple Free HLS Player Example</title>  
    <!-- Include hls.js from a CDN -->
    <script src="https://cdn.tutorialjinni.com/hls.js/1.2.1/hls.min.js"></script>
    
</head>
<body>
    <!-- HTML5 Video Tag -->
    <video id="video" 
           width='480px' height='360px' controls autoplay
           src="https://tonton-live-sg1.akamaized.net/live-hls/tonton12_720p/hdntl=exp=1732268813~acl=%2f*~data=hdntl~hmac=fc91eacdcf4461a9a4e38a3a688e17db76768e2a9c8d5a185056616df3ccce77/index.m3u8" type="application/x-mpegURL">
    </video>
    <!-- Invocation Script -->
    <script>
        if (Hls.isSupported()) {
          var video = document.getElementById('video');
          var hls = new Hls();
          hls.loadSource(video.src);
          hls.attachMedia(video);
        }else{
            alert("Cannot stream HLS, use another video source");
        }
    </script>
</body>
Select 
a.L_NUMMER, 
a.L_code, 
a.L_BEZ1, 
a.L_BEZ2, 
b.l_bez1 as BEZEN1, 
b.l_bez2 as BEZEN2, 
c.l_bez1 as BEZFR1, 
c.l_bez2 as BEZFR2,
d.l_bez1 as BEZHZ1, 
d.l_bez2 as BEZHZ2,
a.L_vk1, 
a.L_empf_vk, 
a.L_shop, 
a.L_shop2, 
a.L_shop3, 
a.L_issperre, 
a.L_gpmul, 
a.L_gewicht, 
a.L_bfuehrng, 
a.L_einheit, 
a.L_wg, 
a.L_steuer, 
a.L_zollnr, 
a.L_erlkto, 
a.L_pe, 
a.L_ve, 
a.L_idmedia1, 
a.L_idmedia2, 
a.L_vkcalc, 
a.L_prov, 
a.L_norabatt, 
a.L_artiart,
a.L_select1, 
a.L_select2, 
a.L_select3, 
a.L_select4, 
a.L_txtfile1, 
a.L_txtfile2, 
a.L_rp1, 
a.L_shopve, 
a.L_issernum, 
a.L_ischarge, 
a.L_herland, 
a.L_herreg, 
a.L_ve1, 
a.L_ve2, 
a.L_etidru, 
a.L_stafproz, 
a.L_gpdiv, 
a.L_gpeinh, 
a.L_abverk, 
a.L_iseigen, 
a.L_prtstkl, 
a.L_plartnum, 
a.L_plfaktor, 
a.L_plartbez

from 
(

SELECT 
artikel.L_NUMMER, 
artikel.L_code, 
artikel.L_BEZ1, 
artikel.L_BEZ2, 
artikel.L_vk1, 
artikel.L_empf_vk, 
artikel.L_shop, 
artikel.L_shop2, 
artikel.L_shop3, 
artikel.L_issperre, 
artikel.L_gpmul, 
artikel.L_gewicht, 
artikel.L_bfuehrng, 
artikel.L_einheit, 
artikel.L_wg, 
artikel.L_steuer, 
artikel.L_zollnr, 
artikel.L_erlkto, 
artikel.L_pe, 
artikel.L_ve, 
artikel.L_idmedia1, 
artikel.L_idmedia2, 
artikel.L_vkcalc, 
artikel.L_prov, 
artikel.L_norabatt,
artikel.L_artiart,  
artikel.L_select1, 
artikel.L_select2, 
artikel.L_select3, 
artikel.L_select4, 
artikel.L_txtfile1, 
artikel.L_txtfile2, 
artikel.L_rp1, 
artikel.L_shopve, 
artikel.L_issernum, 
artikel.L_ischarge, 
artikel.L_herland, 
artikel.L_herreg, 
artikel.L_ve1, 
artikel.L_ve2, 
artikel.L_etidru, 
artikel.L_stafproz, 
artikel.L_gpdiv, 
artikel.L_gpeinh, 
artikel.L_abverk, 
artikel.L_iseigen, 
artikel.L_prtstkl, 
artikel.L_plartnum, 
artikel.L_plfaktor, 
artikel.L_plartbez

FROM artikel 

order by artikel.L_PLGRUPPE, artikel.L_NUMMER

) as a

left join 

( 
Select 
llang.l_nummer, 
llang.l_lang, 
llang.l_bez1, 
llang.l_bez2

from llang 
where llang.l_lang = "EN" 
) as b 

on b.l_nummer = a.l_nummer 


left join 

( 
Select 
llang.l_nummer, 
llang.l_lang, 
llang.l_bez1, 
llang.l_bez2

from llang 
where llang.l_lang = "FR" 
) as c 

on c.l_nummer = a.l_nummer 

left join 

( 
Select 
llang.l_nummer, 
llang.l_lang, 
llang.l_bez1, 
llang.l_bez2

from llang 
where llang.l_lang = "HZ" 
) as d 

on d.l_nummer = a.l_nummer 
class Person(private var _name: String, private var _age: Int) {
    
    var name: String
        get() = _name 
        set(value) {
            if (value.isNotEmpty()) {
                _name = value 
            } else {
                println("Name cannot be empty.")
            }
        }

    var age: Int
        get() = _age 
        set(value) {
            if (value > 0) {
                _age = value 
            } else {
                println("Age must be greater than 0.")
            }
        }

    companion object {
        fun createPerson(name: String, age: Int): Person {
            return Person(name, age)
        }
    }
    fun printDetails() {
        println("Name: $name, Age: $age")
    }
}

fun main() {
    val person = Person.createPerson("Alice", 25)
    person.printDetails()
    
    person.name = "Alicia" 
    person.age = 26 
	person.printDetails()
    
    person.name = "" 
    person.age = -5  
    person.printDetails()
}
import kotlin.random.Random
import kotlin.system.exitProcess

fun main() {
    val randomNum = Random.nextInt(1, 101)
    println("Welcome to the number guessing game!")
    println("Guess a number between 1 and 100:")

    while (true) {
        print("Enter your guess: ")
        val input = readLine()?.trim()  
        val guess = input?.toIntOrNull()
        
        if (guess == null) {
            println("Invalid input! Please enter a valid number between 1 and 100.")
            continue
        }

        when {
            guess < randomNum -> println("Too low! Try again.")
            guess > randomNum -> println("Too high! Try again.")
            else -> {
                println("Congratulations! You guessed the correct number: $randomNum")
                exitProcess(0)
            }
        }
    }
}
fun greet(name: String, customMessage: String = "Hello") {
    println("$customMessage, $name!")
}

fun main() {
    greet("Alice", "Good morning")
    greet("Bob")
}
import kotlin.random.Random

class Die(val sides: Int) {
    fun roll(): Int {
        return Random.nextInt(1, sides + 1)
    }
}
fun main() {}
    val die = Die(6)
	val result = die.roll()
	println("You rolled a $result")
}
fun main() {
    println("Enter a nullable integer:")
    val input = readLine()
    val number: Int? = input?.toIntOrNull()
    if (number != null) {
        println("The square of the number is: ${number * number}")
    } else {
        println("Input is null or not a valid integer.")
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Payment Page</title>
    <script>
        function validateForm() {
            // Clear previous errors
            document.getElementById("errorMessage").innerHTML = "";

            // Get form values
            var name = document.getElementById("name").value;
            var cardNumber = document.getElementById("cardNumber").value;
            var expirationDate = document.getElementById("expirationDate").value;
            var cvv = document.getElementById("cvv").value;

            // Patterns for credit card number, expiration date, and CVV
            var cardPattern = /^\d{16}$/; // 16 digit card number
            var expDatePattern = /^(0[1-9]|1[0-2])\/\d{2}$/; // MM/YY format
            var cvvPattern = /^\d{3}$/; // 3 digit CVV

            // Validate Name
            if (name == "") {
                document.getElementById("errorMessage").innerHTML += "Name is required.<br>";
                return false;
            }

            // Validate Card Number
            if (cardNumber == "") {
                document.getElementById("errorMessage").innerHTML += "Card number is required.<br>";
            } else if (!cardNumber.match(cardPattern)) {
                document.getElementById("errorMessage").innerHTML += "Please enter a valid 16-digit card number.<br>";
                return false;
            }

            // Validate Expiration Date
            if (expirationDate == "") {
                document.getElementById("errorMessage").innerHTML += "Expiration date is required.<br>";
            } else if (!expirationDate.match(expDatePattern)) {
                document.getElementById("errorMessage").innerHTML += "Please enter a valid expiration date (MM/YY).<br>";
                return false;
            }

            // Validate CVV
            if (cvv == "") {
                document.getElementById("errorMessage").innerHTML += "CVV is required.<br>";
            } else if (!cvv.match(cvvPattern)) {
                document.getElementById("errorMessage").innerHTML += "Please enter a valid 3-digit CVV.<br>";
                return false;
            }

            // If all validations pass, submit the form
            alert("Payment successful!");
            return true;
        }
    </script>
</head>
<body>

<h2>Payment Page</h2>

<!-- Error message -->
<div id="errorMessage" style="color: red;"></div>

<form onsubmit="return validateForm()">
    <label for="name">Name on Card:</label><br>
    <input type="text" id="name" name="name"><br><br>

    <label for="cardNumber">Credit Card Number:</label><br>
    <input type="text" id="cardNumber" name="cardNumber" maxlength="16"><br><br>

    <label for="expirationDate">Expiration Date (MM/YY):</label><br>
    <input type="text" id="expirationDate" name="expirationDate" maxlength="5" placeholder="MM/YY"><br><br>

    <label for="cvv">CVV (3-digit):</label><br>
    <input type="text" id="cvv" name="cvv" maxlength="3"><br><br>

    <input type="submit" value="Submit Payment">
</form>

</body>
</html>
Task 02

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Art Boutique Restro</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <header class="bg-warning text-center text-white py-4">
        <h1 class="font-weight-bold">ART BOUTIQUE RESTRO</h1>
        <nav>
            <ul class="nav justify-content-center">
                <li class="nav-item">
                    <a class="nav-link text-dark" href="#dishes">Available Dishes</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-dark" href="#reviews">Reviews</a>
                </li>
            </ul>
        </nav>
    </header>

    <main class="container my-5">
        <!-- Dishes Section -->
        <section id="dishes" class="text-center">
            <h2 class="mb-4">Available Dishes</h2>
            <div class="row">
                <div class="col-md-3 col-sm-6 mb-4">
                    <div class="card">
                        <img src="pizza.jpg" class="card-img-top" alt="Non-Veg Pizza">
                        <div class="card-body">
                            <h5 class="card-title">NON-VEG PIZZA</h5>
                            <p class="card-text">Round or square, thick or thin, every pizza is beautiful.</p>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 mb-4">
                    <div class="card">
                        <img src="biryani.jpg" class="card-img-top" alt="Chicken Dum Biryani">
                        <div class="card-body">
                            <h5 class="card-title">CHICKEN DUM BIRYANI</h5>
                            <p class="card-text">A little bit of spice, a whole lot of flavor.</p>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 mb-4">
                    <div class="card">
                        <img src="burger.jpg" class="card-img-top" alt="Veg and Non-Veg Burger">
                        <div class="card-body">
                            <h5 class="card-title">VEG AND NON-VEG BURGER</h5>
                            <p class="card-text">Life is too short to miss out on double cheeseburgers.</p>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6 mb-4">
                    <div class="card">
                        <img src="chocolatecake.jpg" class="card-img-top" alt="Chocolate Cakes">
                        <div class="card-body">
                            <h5 class="card-title">CHOCOLATE CAKES</h5>
                            <p class="card-text">Give me more life with a slice of chocolate cake.</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Reviews Section -->
        <section id="reviews" class="text-center my-5">
            <h2 class="mb-4">Reviews</h2>
            <div class="row">
                <div class="col-md-4 mb-4">
                    <div class="card p-3 h-100">
                        <blockquote class="blockquote mb-0">
                            <p>"The pizza was incredible! I give the great staff & great pizza five stars!!!"</p>
                            <footer class="blockquote-footer">Shaik Sofiya</footer>
                        </blockquote>
                    </div>
                </div>
                <div class="col-md-4 mb-4">
                    <div class="card p-3 h-100">
                        <blockquote class="blockquote mb-0">
                            <p>"A perfect blend of fragrant rice, succulent meat, and aromatic spices, represents the essence of Hyderabadi cuisine."</p>
                            <footer class="blockquote-footer">Yerradi Shruthi</footer>
                        </blockquote>
                    </div>
                </div>
                <div class="col-md-4 mb-4">
                    <div class="card p-3 h-100">
                        <blockquote class="blockquote mb-0">
                            <p>"One can choose the best and really big burgers which can fill your stomach."</p>
                            <footer class="blockquote-footer">Asima Shareef</footer>
                        </blockquote>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.0.6/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
Task 01.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Art Boutique Restro</title>
    <link rel="stylesheet" href="food.css">
</head>
<body>
    <header>
        <h1>ART BOUTIQUE RESTRO</h1>
        <nav>
            <ul>
                <li><a href="#dishes">Available Dishes</a></li>
                <li><a href="#reviews">Reviews</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <section id="dishes" class="grid-container">
            <div class="grid-item">
                <img src="pizza.jpg" alt="Non-Veg Pizza">
                <h2>NON-VEG PIZZA</h2>
                <p>Round or square, thick or thin, every pizza is beautiful.</p>
            </div>
            <div class="grid-item">
                <img src="biryani.jpg" alt="Chicken Dum Biryani">
                <h2>CHICKEN DUM BIRYANI</h2>
                <p>A little bit of spice, a whole lot of flavor.</p>
            </div>
            <div class="grid-item">
                <img src="burger.jpg" alt="Veg and Non-Veg Burger">
                <h2>VEG AND NON-VEG BURGER</h2>
                <p>Life is too short to miss out on double cheeseburgers.</p>
            </div>
            <div class="grid-item">
                <img src="chocolatecake.jpg" alt="Chocolate Cakes">
                <h2>CHOCOLATE CAKES</h2>
                <p>Give me more life with a slice of chocolate cake.</p>
            </div>
        </section>
        <section id="reviews" class="flex-container">
            <h1>REVIEWS</h1>
            <div class="flex-item">
                <blockquote>"The pizza was incredible! Five stars!!!" <footer>- Shaik Sofiya</footer></blockquote>
            </div>
            <div class="flex-item">
                <blockquote>"A perfect blend of fragrant rice and spices." <footer>- Yerradi Shruthi</footer></blockquote>
            </div>
            <div class="flex-item">
                <blockquote>"Big burgers that can fill your stomach." <footer>- Asima Shareef</footer></blockquote>
            </div>
        </section>
    </main>
</body>
</html>

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    color: black;
    background-color: white;
}

header {
    background: #c0b857;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    animation: fadeIn 2s ease-in;
}

.grid-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.grid-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.flex-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 20px;
}

.flex-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

blockquote footer {
    text-align: right;
    font-size: 0.9rem;
    color: #555;
}

.grid-item:hover, .flex-item:hover {
    transform: scale(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/formreqres")
public class formreqres extends HttpServlet {
    private static final long serialVersionUID = 1L;

    public formreqres() {
        super();
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // Retrieve form data from the request
        String username = request.getParameter("username");
        String email = request.getParameter("email");

        // Set response content type
        response.setContentType("text/html");

        // Write the response
        try (PrintWriter out = response.getWriter()) {
            out.println("<html>");
            out.println("<head><title>Form Response</title></head>");
            out.println("<body>");
            out.println("<h1>Form Submission Details</h1>");
            out.println("<p><strong>Username:</strong> " + username + "</p>");
            out.println("<p><strong>Email:</strong> " + email + "</p>");
            out.println("</body>");
            out.println("</html>");
        }
    }
}


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Form Submission</title>
</head>
<body>
    <h1>Submit Your Details</h1>
    <form action="formreqres" method="post">
        <label for="username">Username:</label>
        <input type="text" id="username" name="username" required>
        <br><br>
        
        <label for="email">Email:</label>
        <input type="email" id="email" name="email" required>
        <br><br>

        <button type="submit">Submit</button>
    </form>
</body>
</html>
//MainActivity.kt
package com.example.intents

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import androidx.activity.ComponentActivity
import androidx.activity.enableEdgeToEdge

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_main)
        val b1:Button = findViewById<Button>(R.id.button1)
        b1.setOnClickListener {
            val intent = Intent(this,SecondActivity::class.java)
            startActivity(intent)
        }
    }
}
//SecondActivity.kt
package com.example.intents

import android.os.Bundle
import android.widget.Button
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.enableEdgeToEdge

class  SecondActivity: ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_main2)
        val b2: Button = findViewById<Button>(R.id.button2)
        b2.setOnClickListener {
            Toast.makeText(this,"hi", Toast.LENGTH_LONG).show()
        }
    }
}
//activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Go to SecondActivity"
        android:id="@+id/button1"
        android:textColor="@color/black"
        android:textSize="25dp"
        />
</LinearLayout>

activity_main2.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Go to 1Activity"
        android:id="@+id/button2"
        android:textColor="@color/black"
        android:textSize="25dp"
        />
</LinearLayout>

manifest(android manifest)
<activity android:name=".SecondActivity" />
import { QBtn, QBtnGroup, QBadge, QTable } from 'quasar';
import { boot } from 'quasar/wrappers';

export default boot(() => {
  // Modify default props of QBtn globally
  QBtn.props.unelevated = { type: Boolean, default: true }; // Set default to unelevated
  //buttonGroup
  QBtnGroup.props.unelevated = { type: Boolean, default: true }; // Set default to unelevated
});
package selectionsort;

public class SelectionSort {

    public static void main(String[] args) {
        int[] arr = {5,4,2,8,6,9};
        int leng = arr.length;

        System.out.print("Original array:");
        PrintArray(arr);
        
        for (int i = 0 ; i < leng - 1 ; i++) {
            int smallest = i;
            for (int j = i + 1 ; j < leng; j++) {
                if (arr[j] < arr[smallest]) {
                    smallest = j;
                
                int temp = arr[i];
                arr[i] = arr[smallest];
                arr[smallest] = temp;
                }
            }
        }
        System.out.print("Sorted array:");
        PrintArray(arr);
    }
    
    static void PrintArray(int[] arr){
        for (int val : arr) {
            System.out.print(val + " ");
        }
        System.out.println();
    }
}
package LinearSearch;

import java.util.*;

public class LinearSearch {


    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        
        int arr[] = { 2, 3, 4, 10, 40 };
        
        System.out.print("What element are you searching for? ");
        int x = sc.nextInt();
        
        int result = search(arr, arr.length, x);
        if (result == -1)
            System.out.print("Element is not present in array");
        else
            System.out.println("Element is present: " + arr[result]);
    }
    
    public static int search(int arr[], int N, int x)
    {
        for (int i = 0; i < N; i++) {
            if (arr[i] == x)
                return i;
        }
        return -1;
    }
}
package bubblesort;

import java.util.*;

public class BubbleSort {

    public static void main(String[] args) {
        int[] arr = {5,4,2,8,6,9};
        int leng = arr.length;
        
        System.out.println("Array:");
        PrintArray(arr);
        bubblesort(arr, leng);
        System.out.println("Sorted array:");
        PrintArray(arr);
    }
    
    public static void bubblesort(int arr[],int n){
        boolean swapped;
        for (int i = 0; i < n - 1; i++) {
            swapped = false;
            for (int j = 0; j < n - i - 1; j++) {
                if (arr[j] > arr[j + 1]) {
                    int temp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = temp;
                    swapped = true;
                }
        }
        if (swapped == false)
        break;
        }
    }
    
    static void PrintArray(int[] arr){
        for (int val : arr) {
            System.out.print(val + " ");
        }
        System.out.println();
    }
}
package bodymassindex;

import java.util.*;

public class BodyMassIndex {
    //metric
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        System.out.print("Enter your Weight in pounds: ");
        double weight = sc.nextDouble();
        System.out.print( "Enter your Height in inch: ");
        double height = sc.nextDouble();    
        
        double BMI = 703 * (weight/Math.pow(height,2));
        
        System.out.println("Weight: " + weight);
        System.out.println("Height: " + height);
        System.out.println("BMI: " + Math.round(BMI));
    }
}
// Die.kt
class Die() {

    fun roll(): Int {
        return (1..6).random()
    }
}



// Main.kt
fun main() {
    println("Welcome to the Die Roller Application!")

    val die = Die()

    do {
        println("Rolling the die...")
        val result = die.roll()
        println("You rolled a $result!")

        println("Do you want to roll again? (yes/no)")
        val input = readLine()?.trim()?.lowercase()
    } while (input == "yes")

    println("Thanks for using the Die Roller Application!")
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Form</title>
</head>
<body>
<h1>User Information Form</h1>
<form action="ResponseServlet" method="POST">
<label for="name">Name:</label><br>
<input type="text" id="name" name="name" required><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" required><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
ResponseServlet.java
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/ResponseServlet")
public class ResponseServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// Set the response content type
response.setContentType("text/html");
// Get the parameters from the request
String name = request.getParameter("name");
String email = request.getParameter("email");
// Generate the response
PrintWriter out = response.getWriter();
out.println("<html><body>");
out.println("<h2>User Information</h2>");
out.println("<p>Name: " + name + "</p>");
out.println("<p>Email: " + email + "</p>");
out.println("</body></html>");
}
}
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Servlet implementation class servletex
 */
@WebServlet("/servletex")
public class servletex extends HttpServlet {
	private static final long serialVersionUID = 1L;

    private String configParam; // For ServletConfig parameter
    private String contextParam; // For ServletContext parameter

    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);

        // Using ServletConfig to get a servlet-specific init parameter
        configParam = config.getInitParameter("configParam");

        // Using ServletContext to get application-wide context parameter
        ServletContext context = config.getServletContext();
        contextParam = context.getInitParameter("contextParam");
    }

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html");
        response.getWriter().println("<html><body>");
        response.getWriter().println("<h2>Using ServletConfig and ServletContext</h2>");

        // Display the servlet-specific config parameter
        response.getWriter().println("<p><strong>ServletConfig Parameter:</strong> " + configParam + "</p>");

        // Display the application-wide context parameter
        response.getWriter().println("<p><strong>ServletContext Parameter:</strong> " + contextParam + "</p>");

        response.getWriter().println("</body></html>");
    }

}




<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0">
  
    <!-- Servlet Config Parameters -->
    <servlet>
        <servlet-name>servletex</servlet-name>
        <servlet-class>servletex</servlet-class>
        <init-param>
            <param-name>configParam</param-name>
            <param-value>Servlet Specific Parameter</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>servletex</servlet-name>
        <url-pattern>/servletex</url-pattern>
    </servlet-mapping>

    <!-- ServletContext Parameters -->
    <context-param>
        <param-name>contextParam</param-name>
        <param-value>Application Wide Parameter</param-value>
    </context-param>

</web-app>
<!ELEMENT library (book+)>
<!ELEMENT book (title, author, isbn, publisher, edition, price)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT edition (#PCDATA)>
<!ELEMENT price (#PCDATA)>
books.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="library">
<xs:complexType>
<xs:sequence>
<xs:element name="book" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="author" type="xs:string"/>
<xs:element name="isbn" type="xs:string"/>
<xs:element name="publisher" type="xs:string"/>
<xs:element name="edition" type="xs:string"/>
<xs:element name="price" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<library>
<book>
<title>The Great Gatsby</title>
<author>F. Scott Fitzgerald</author>
<isbn>978-0743273565</isbn>
<publisher>Scribner</publisher>
<edition>1st</edition>
<price>10.99</price>
</book>
<book>
<title>To Kill a Mockingbird</title>
<author>Harper Lee</author>
<isbn>978-0061120084</isbn>
<publisher>Harper Perennial Modern Classics</publisher>
<edition>50th Anniversary Edition</edition>
<price>7.19</price>
</book>
<book>
<title>1984</title>
<author>George Orwell</author>
<isbn>978-0451524935</isbn>
<publisher>Signet Classics</publisher>
<edition>Anniversary Edition</edition>
<price>9.99</price>
</book>
<book>
<title>Moby Dick</title>
<author>Herman Melville</author>
<isbn>978-1503280786</isbn>
<publisher>CreateSpace Independent Publishing Platform</publisher>
<edition>1st</edition>
<price>11.95</price>
</book>
<book>
<title>Brave New World</title>
<author>Aldous Huxley</author>
<isbn>978-0060850524</isbn>
<publisher>Harper Perennial Modern Classics</publisher>
<edition>Reissue</edition>
<price>14.99</price>
</book>
</library>
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Web Page with Bootstrap</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="bg-success text-white text-center py-4">
<h1>My Awesome Web Page</h1>
</header>
<main class="container my-5">
<section class="row">
<div class="col-lg-4 col-md-6 mb-4">
<div class="card grid-item">
<div class="card-body">
<h5 class="card-title">Item 1</h5>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card grid-item">
<div class="card-body">
<h5 class="card-title">Item 2</h5>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card grid-item">
<div class="card-body">
<h5 class="card-title">Item 3</h5>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card grid-item">
<div class="card-body">
<h5 class="card-title">Item 4</h5>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card grid-item">
<div class="card-body">
<h5 class="card-title">Item 5</h5>
</div>
</div>
</div>
</section>
</main>
<footer class="bg-dark text-white text-center py-3">
<p>Footer Content</p>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
CSS
.grid-item {
background-color: #ffcc00;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.grid-item:hover {
transform: scale(1.05);
background-color: #ffd700;
}
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import kotlin.math.PI

// Base class: Dwelling
open class Dwelling(val resident: Int) {
    open val buildingMaterial: String = "Generic Material"
    open val capacity: Int = 0

    fun hasRoom(): Boolean {
        return resident < capacity
    }

    open fun description(): String {
        return "This dwelling is made of $buildingMaterial and has space for $capacity residents."
    }
}

// RoundHut subclass
class RoundHut(resident: Int) : Dwelling(resident) {
    override val buildingMaterial: String = "Straw"
    override val capacity: Int = 4

    fun floorArea(radius: Double): Double {
        return PI * radius * radius
    }

    override fun description(): String {
        return "This round hut is made of $buildingMaterial and has space for $capacity residents."
    }
}

// SquareCabin subclass
class SquareCabin(resident: Int) : Dwelling(resident) {
    override val buildingMaterial: String = "Wood"
    override val capacity: Int = 6

    fun floorArea(length: Double): Double {
        return length * length
    }

    override fun description(): String {
        return "This square cabin is made of $buildingMaterial and has space for $capacity residents."
    }
}

// RoundTower subclass
class RoundTower(resident: Int, val floors: Int) : Dwelling(resident) {
    override val buildingMaterial: String = "Wood"
    override val capacity: Int = 4 * floors

    fun floorArea(radius: Double): Double {
        return PI * radius * radius * floors
    }

    override fun description(): String {
        return "This round tower is made of $buildingMaterial and has space for $capacity residents."
    }
}

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            DwellingApp()
        }
    }
}

@Composable
fun DwellingApp() {
    val hut = RoundHut(3)
    val cabin = SquareCabin(5)
    val tower = RoundTower(4, 3)

    Column(
        modifier = Modifier
            .fillMaxSize()
            .padding(16.dp),
        horizontalAlignment = Alignment.CenterHorizontally,
        verticalArrangement = Arrangement.Center
    ) {
        Text(text = hut.description())
        Spacer(modifier = Modifier.height(8.dp))
        Text(text = "Floor Area: ${hut.floorArea(4.5)}")
        Spacer(modifier = Modifier.height(8.dp))
        Text(text = cabin.description())
        Spacer(modifier = Modifier.height(8.dp))
        Text(text = "Floor Area: ${cabin.floorArea(4.5)}")
        Spacer(modifier = Modifier.height(8.dp))
        Text(text = tower.description())
        Spacer(modifier = Modifier.height(8.dp))
        Text(text = "Floor Area: ${tower.floorArea(4.5)}")
    }
}
{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":christmas-tree: Boost Days: What's on in Melbourne!:christmas-tree:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n Happy Monday and welcome to the last official working week of 2024!"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Xero Café :coffee:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n :new-thing: *This week we are offering:* \n\n Mini Christmas Cupcakes :cupcake: \n\n *Weekly Café Special:* _Iced Gingerbread Latte_ :ginger-bread-man:"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": " Wednesday, 18th December :calendar-date-18:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n\n :banh-mi-mi:*Light Lunch*: From *12pm* - this weeks lunch will be Bahn Mi's!"
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": "Thursday, 19th December :calendar-date-19:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": ":breakfast: *Breakfast*: Provided by *Kartel Catering* from *8:30am - 10:30am* in the Wominjeka Breakout Space."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "WX would like to take this time to wish everyone a safe and happy festive season. We can't wait to come back in 2025 bigger and better!  :party-wx:"
			}
		}
	]
}
CREATE TABLE pieces(
  NOP INTEGER ,
  Des VARCHAR (50),
  couleur VARCHAR(50) check(couleur in("rouge","vert","bleu","jaune")),
  poids FLOAT,
  PRIMARY KEY(NOP)
);
CREATE TABLE service(
    NOS INTEGER(50),
    Intitle VARCHAR (50),
    localisation VARCHAR(50),
      PRIMARY KEY(NOS)

);
CREATE TABLE Ordre(
    NOP INTEGER,
    NOS INTEGER,
    QUANTITE INTEGER,
    PRIMARY KEY(NOP,NOS),
    FOREIGN KEY (NOP) REFERENCES pieces,
    FOREIGN KEY (NOS) REFERENCES service

    
);
    CREATE TABLE nome(
    NOPA INTEGER,
    NOPC INTEGER,
    QUANTITE INTEGER,
    PRIMARY KEY(NOPA,NOPC),
    FOREIGN KEY (NOPA) REFERENCES pieces(NOP),
    FOREIGN KEY (NOPC) REFERENCES service(NOS)

    );
INSERT INTO pieces VALUES (1, 'Vis', 'rouge', 0.5);
INSERT INTO pieces VALUES (5, 'Ecrou', 'bleu', 0.3);
INSERT INTO service VALUES (2, 'Montage', 'Tunis');
INSERT INTO service VALUES (7, 'Assemblage', 'Sfax');
INSERT INTO Ordre VALUES (1, 2, 100);
INSERT INTO nome VALUES (5, 7, 49);
SELECT * from pieces;
SELECT * from service;
SELECT * from Ordre;
SELECT * from nome;
<!DOCTYPE html>
%%=ContentBlockbyKey("enterpriseEmailLanguageSupport")=%%
<html lang="%%=v(@entDocLang)=%%" dir="%%=v(@entLanguageLayout)=%%" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
  <head>
    <!-- Template Version: 1.12 (20240315) -->
    <!-- Specifies the character encoding for the document. -->
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <!-- Forcing initial-scale shouldn't be necessary -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0">
    <!-- Use the latest (edge) version of IE rendering engine -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Format Detection to force iOS and some Android email clients to not automatically add links around thes content types. Only really works on native iOS and some Android email clients and not universally across different mobile email apps and mobile devices. -->
    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="date=no">
    <meta name="format-detection" content="address=no">
    <meta name="format-detection" content="email=no">
    <!-- Disable auto-scale in iOS 10 Mail entirely -->
    <meta name="x-apple-disable-message-reformatting">
    <title>Caterpillar</title>
    <!-- WEB FONT - @font-face : BEGIN -->
    <!-- What it does: Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
    <!--[if mso]>
    <style>
      * {
        font-family:Arial, Helvetica, sans-serif; Arial, sans-serif !important;
      }
    </style>
    <![endif]-->
    <!-- WEB FONT - @font-face : END -->
    
    <!-- CSS RESET STYLES : START -->
    <style type="text/css">
      /*
      |--------------------------------------------------------------------------
      |  CSS RESET STYLES
      |--------------------------------------------------------------------------
      |
      |  Reset styles are a series of common code resets and fixes
      |  for a variety of email clients used to create a clean slate for
      |  email design and development.
      |
      |  Note:Reset styles work within the style block and should not
      |  be inlined.
      |
      */
      /* What it does: Remove spaces around the email design added by some email clients. */
      /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
      ReadMsgBody {
        width: 100%;
      }
      .ExternalClass {
        width: 100%;
      }
      .ExternalClass,
      .ExternalClass p,
      .ExternalClass span,
      .ExternalClass font,
      .ExternalClass td,
      .ExternalClass div {
        line-height: 100%;
      }
      html,
      body {
        margin: 0 auto !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        height: 100% !important;
        width: 100% !important;
        -webkit-font-smoothing: antialiased;
      }
      /* What it does: Stops email clients resizing small text. */
      * {
        -ms-text-size-adjust: 100%;
        -webkit-text-size-adjust: 100%;
      }
      /* What it does: Stops Outlook from adding extra spacing to tables. */
      table,
      td {
        border-spacing: 0;
        font-size: 0;
        mso-table-lspace: 0pt !important;
        mso-table-rspace: 0pt !important;
      }
      /* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */
      table {
        border-spacing: 0 !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
        /* margin: 0 auto !important; */
      }
      table table table {
        table-layout: auto;
      }
      /* What it does: Uses a better rendering method when resizing images in IE. */
      img {
        -ms-interpolation-mode: bicubic;
        border: 0;
        height: auto;
        line-height: 100%;
        outline: none;
        text-decoration: none;
        display: block;
      }
      /* What it does: A work-around for email clients meddling in triggered links. */
      *[x-apple-data-detectors],
      /* iOS */
      .x-gmail-data-detectors,
      /* Gmail */
      .x-gmail-data-detectors *,
      .aBn {
        border-bottom: 0 !important;
        cursor: default !important;
        color: inherit !important;
        text-decoration: none !important;
        font-size: inherit !important;
        font-family: Arial, Helvetica, sans-serif, inherit !important;
        font-weight: inherit !important;
        line-height: inherit !important;
      }
      /* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */
      .a6S {
        display: none !important;
        opacity: 0.01 !important;
      }
      /* If the above doesn't work, add a .g-img class to any image in question. */
      img.g-img+div {
        display: none !important;
      }
      /* What it does: Prevent Outlook from adding a 1px border around text in an anchor element */
      /* what it does: Fix auto fall button alignment in interactive content block for outlook  */
      /* a span {
        border: none !important;
      } */
      a:not(.sc-link-cgitemm-ic-automatic-fallback-button) span {
      border: none !important;
      }
      /* What it does: Prevents underlining the button text in Windows 10 */
      a .button-yellow-link,
      a .button-black-link,
      a .button-white-link {
        text-decoration: none !important;
        text-transform: uppercase;
      }
      a .link-link {
        text-decoration: none !important;
        text-transform: uppercase;
      }
      a.underline {
        text-decoration: underline;
      }
      sup { 
        line-height: 0 !important; 
        font-size: 70% !important; 
        vertical-align: top !important;
        mso-text-raise:60% !important;
        margin-top: 5px;
        display: inline-block;
      }
      @-ms-viewport {
        width: device-width;
      }
      /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89  */
      /* Create one of these media queries for each additional viewport size you'd like to fix */
      /* Thanks to Eric Lepetit @ericlepetitsf) for help troubleshooting */
      @media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
        /* iPhone 6 and 6+ 
        .email-container {
          min-width: 375px !important;
        }*/
      }
    </style>
    <!-- CSS RESET STYLES : END -->
    
    <!-- DEFAULT MC STYLES : START -->
    <style type="text/css">
      /* Styles from the Default Empty Template in Marketing Cloud */
      @media only screen and (max-width: 599px) {
        .container {
          width: 100% !important;
        }
        .footer {
          width: auto !important;
          margin-left: 0;
        }
        .mobile-hidden {
          display: none !important;
        }
        .logo {
          display: block !important;
          padding: 0 !important;
        }
        img {
          max-width: 100% !important;
          height: auto !important;
          max-height: auto !important;
        }
        .header img {
          max-width: 100% !important;
          height: auto !important;
          max-height: auto !important;
        }
        .photo img {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
        }
        .drop {
          display: block !important;
          width: 100% !important;
          float: left;
          clear: both;
        }
        .footerlogo {
          display: block !important;
          width: 100% !important;
          padding-top: 15px;
          float: left;
          clear: both;
        }
        .nav4,
        .nav5,
        .nav6 {
          display: none !important;
        }
        .tableBlock {
          width: 100% !important;
        }
        .responsive-td {
          width: 100% !important;
          display: block !important;
          padding: 0 !important;
        }
        .fluid-centered {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
      }
      @media only screen and (max-width: 599px) {
        .container {
          width: 100% !important;
        }
        .mobile-hidden {
          display: none !important;
        }
        .logo {
          display: block !important;
          padding: 0 !important;
        }
        .photo img {
          width: 100% !important;
          height: auto !important;
        }
        .nav5,
        .nav6 {
          display: none !important;
        }
        .fluid,
        .fluid-centered {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
        .fluid-centered {
          margin-left: auto !important;
          margin-right: auto !important;
        }
      }
    </style>
    <!-- DEFAULT MC STYLES : END -->
    
    <!-- DISTRIBUTED MARKETING STYLES : START -->
    <style>
      .dm-rich-text-block,
      .dm-free-text-block {
        font-size: 14px;
        font-family: Arial, Helvetica, sans-serif;
      }
      .dm-rich-text-block a,
      .dm-free-text-block a {
        color: #2679b8;
      }
      .stylingblock-content-wrapper {
  font: 14px Arial,Helvetica,Sans-serif;
}
    </style>
    <!-- DISTRIBUTED MARKETING STYLES : END -->
    
    <!-- VIDEO STYLES : START -->
    <style>
      /* video */
      .video-wrapper {
        display: none;
      }
      @media (-webkit-min-device-pixel-ratio: 0) and (min-device-width:1024px) {
        .video-wrapper {
          display: block !important;
        }
        .video-fallback {
          display: none !important;
        }
      }
      #MessageViewBody .video-wrapper {
        display: block !important;
      }
      #MessageViewBody .video-fallback {
        display: none !important;
      }
    </style>
    <!-- VIDEO STYLES : END -->
    
    <!-- RESPONSIVE STYLES : START -->
    <style>
      /* What it does: Hover styles for buttons */
      .button-yellow-td,
      .button-yellow-a,
      .button-black-td,
      .button-black-a,
      .button-white-td,
      .button-white-a {
        transition: all 100ms ease-in;
      }
      .link-td,
      .link-a {
        transition: all 100ms ease-in;
      }
      .button-yellow-td:hover,
      .button-yellow-a:hover {
        background: #000000 !important;
        border-color: #FFCC00 !important;
      }
      .button-yellow-td:hover .button-yellow-link,
      .button-yellow-a:hover .button-yellow-link {
        color: #ffffff !important;
      }
      .button-black-td:hover,
      .button-black-a:hover,
      .button-white-td:hover,
      .button-white-a:hover {
        background: #FFCC00 !important;
        border-color: #000000 !important;
      }
      .button-black-td:hover .button-black-link,
      .button-black-a:hover .button-black-link,
      .button-white-td:hover .button-white-link,
      .button-white-a:hover .button-white-link {
        color: #000000 !important;
      }
      .link-td:hover,
      .link-a:hover {
        text-decoration: underline !important;
      }
      /* Media Queries */
      @media screen and (max-width: 599px) {
        body {
          padding-top: 0 !important;
          padding-bottom: 0 !important;
        }
        .email-container {
          border: none !important;
        }
        /* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */
        .fluid {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
        /* What it does: Forces table cells into full-width rows. */
        .stack-column,
        .stack-column-center {
          display: block !important;
          width: 100% !important;
          max-width: 100% !important;
          direction: ltr !important;
        }
        /* And center justify these ones. */
        .stack-column-center {
          text-align: center !important;
        }
        /* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */
        .mobile-center {
          text-align: center !important;
          display: block !important;
          margin-left: auto !important;
          margin-right: auto !important;
          float: none !important;
        }
        table.mobile-center {
          display: inline-block !important;
        }
        /* mobile banner adjustments */
        .mobile-content-padding-right {
          padding-right: 60px !important;
        }
        .mobile-content-padding-left {
          padding-left: 60px !important;
        }
        /* mobile footer adjustments */
        .footer-social-icons-container {
          max-width: 60% !important;
        }
        .footer-tagline {
          padding-top: 10px !important;
        }
        /* mobile padding classes */
        .mobile-padding-vertical-sm {
          padding-top: 5px !important;
          padding-bottom: 5px !important;
        }
        .mobile-padding-top-sm {
          padding-top: 5px !important;
        }
        .mobile-padding-bottom-sm {
          padding-bottom: 5px !important;
        }
        .mobile-padding-vertical-md {
          padding-top: 15px !important;
          padding-bottom: 15px !important;
        }
        .mobile-padding-top-md {
          padding-top: 15px !important;
        }
        .mobile-padding-bottom-md {
          padding-bottom: 15px !important;
        }
        .mobile-padding-vertical-lg {
          padding-top: 25px !important;
          padding-bottom: 25px !important;
        }
        .mobile-padding-top-lg {
          padding-top: 25px !important;
        }
        .mobile-padding-bottom-lg {
          padding-bottom: 25px !important;
        }
        .mobile-padding-top-none {
          padding-top: 0 !important;
        }
        .mobile-padding-right-none {
          padding-right: 0 !important;
        }
        .mobile-padding-bottom-none {
          padding-bottom: 0 !important;
        }
        .mobile-padding-left-none {
          padding-left: 0 !important;
        }
      }
    </style>
    <!-- RESPONSIVE STYLES : END -->
    
    <!-- OUTLOOK FIXES : START -->
    <style>
      body[data-outlook-cycle] .outlook-overflow-scaling {
        overflow: visible !important;
        width: 100% !important;
        height: auto!important;
        transform: none !important;
      }
      @media screen and (max-width: 599px) {
        body[data-outlook-cycle] .responsive-td {
          width: 100% !important;
          max-width: 100% !important;
        }
      }
    </style>
   
    <!--[if gte mso 16]>
<style> 
.lightbg-hero-txt { 
mso-style-textfill-type:gradient; 
mso-style-textfill-fill-gradientfill-stoplist:"0 \#000000 -1 100000\,100000 \#000000 -1 100000"; 
color:#FFFFFF !important; 
} 
</style>
<![endif]-->

<!--[if gte mso 16]>
<style> 
.darkbg-hero-txt { 
mso-style-textfill-type:gradient; 
mso-style-textfill-fill-gradientfill-stoplist:"0 \#FFFFFF 0 100000\,100000 \#FFFFFF 0 100000"; 
color:#000000 !important; 
} 
</style>
<![endif]-->
    
    <!-- What it does: Fixes one pixel horizontal line through middle of button on Outlook 120 DPI -->
    <!--[if gte mso 16]>
    <style>
      .button-black-a {
      border: 1px solid black;
      }
      .button-black-a:hover,
      .button-black-a:focus {
      border: 1px solid #FFCC00;
      }
      .button-white-a {
      border: 1px solid white;
      }
      .button-white-a:hover,
      .button-white-a:focus {
      border: 1px solid #FFCC00;
      }
      .button-yellow-a {
      border: 1px solid #FFCC00;
      }
      .button-yellow-a:hover,
      .button-yellow-a:focus {
      border: 1px solid #000000;
      }
    </style>
    <![endif]-->
    
    <!-- What it does: Makes background images in 72dpi Outlook render at correct size. -->
    <!--[if gte mso 9]>
    <style>
      .MsoNormalTable {
        width:600px;
        max-width: 600px !important;
        margin: 0 auto;
      }
    </style>
    <xml>
      <o:OfficeDocumentSettings>
      <o:AllowPNG/>
      <o:PixelsPerInch>96</o:PixelsPerInch>
      </o:OfficeDocumentSettings>
    </xml>
    <![endif]-->
    <!-- OUTLOOK FIXES : END -->
        <style type="text/css">
      @media only screen and (max-width: 480px) {
        .container {width: 100% !important;}
        .footer { width:auto !important; margin-left:0; }
        .mobile-hidden { display:none !important; }
        .logo { display:block !important; padding:0 !important; }
        img { max-width:100% !important; height:auto !important; max-height:auto !important;}
        .header img{max-width:100% !important;height:auto !important; max-height:auto !important;}
        .photo img { width:100% !important; max-width:100% !important; height:auto !important;}
        .drop { display:block !important; width: 100% !important; float:left; clear:both;}
        .footerlogo { display:block !important; width: 100% !important; padding-top:15px; float:left; clear:both;}
        .nav4, .nav5, .nav6 { display: none !important; }
        .tableBlock {width:100% !important;}
        .responsive-td {width:100% !important; display:block !important; padding:0 !important; }
        .fluid, .fluid-centered {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
        .fluid-centered {
          margin-left: auto !important;
          margin-right: auto !important;
        }
        /* MOBILE GLOBAL STYLES - DO NOT CHANGE */
        body { padding: 0px !important; font-size: 16px !important; line-height: 150% !important;}
        h1 { font-size: 22px !important; line-height: normal !important;}
        h2 { font-size: 20px !important; line-height: normal !important;}
        h3 { font-size: 18px !important; line-height: normal !important;}
        .buttonstyles {
          font-family:arial,helvetica,sans-serif !important;
          font-size: 16px !important;
          color: #FFFFFF !important;
          padding: 10px !important;
        }
        /* END OF MOBILE GLOBAL STYLES - DO NOT CHANGE */
      }
      @media only screen and (max-width: 640px) {
        .container { width:100% !important; }
        .mobile-hidden { display:none !important; }
        .logo { display:block !important; padding:0 !important; }
        .photo img { width:100% !important; height:auto !important;}
        .nav5, .nav6 { display: none !important;}
        .fluid, .fluid-centered {
          width: 100% !important;
          max-width: 100% !important;
          height: auto !important;
          margin-left: auto !important;
          margin-right: auto !important;
        }
        .fluid-centered {
          margin-left: auto !important;
          margin-right: auto !important;
        }
      }
    </style>
    <!--[if mso]>
      <style type="text/css">
          /* Begin Outlook Font Fix */
          body, table, td {
              font-family: Arial, Helvetica, sans-serif ;
              font-size:16px;
              color:#181818;
              line-height:1;
          }
          /* End Outlook Font Fix */
      </style>
    <![endif]-->
    %%[



set @ContentCode = '2024-11-01'

set @ContentRows = LookupRows('Email_Content_Blocks','ContentCode',@ContentCode)

set @ContentRow = row(@ContentRows,1)

set @SM_Hero = field(@ContentRow,"SM_Hero")
set @SUM_Hero = field(@ContentRow,"SUM_Hero")
set @UM_Hero = field(@ContentRow,"UM_Hero")
set @QUA_Hero = field(@ContentRow,"QUA_Hero")
set @CON_Hero = field(@ContentRow,"CON_Hero")
set @SM_Block_1 = field(@ContentRow,"SM_Block_1")
set @SUM_Block_1 = field(@ContentRow,"SUM_Block_1")
set @UM_Block_1 = field(@ContentRow,"UM_Block_1")
set @QUA_Block_1 = field(@ContentRow,"QUA_Block_1")
set @CON_Block_1 = field(@ContentRow,"CON_Block_1")
set @SM_Block_2 = field(@ContentRow,"SM_Block_2")
set @SUM_Block_2 = field(@ContentRow,"SUM_Block_2")
set @UM_Block_2 = field(@ContentRow,"UM_Block_2")
set @QUA_Block_2 = field(@ContentRow,"QUA_Block_2")
set @CON_Block_2 = field(@ContentRow,"CON_Block_2")
set @SM_Block_3 = field(@ContentRow,"SM_Block_3")
set @SUM_Block_3 = field(@ContentRow,"SUM_Block_3")
set @UM_Block_3 = field(@ContentRow,"UM_Block_3")
set @QUA_Block_3 = field(@ContentRow,"QUA_Block_3")
set @CON_Block_3 = field(@ContentRow,"CON_Block_3")
set @SM_Block_4 = field(@ContentRow,"SM_Block_4")
set @SUM_Block_4 = field(@ContentRow,"SUM_Block_4")
set @UM_Block_4 = field(@ContentRow,"UM_Block_4")
set @QUA_Block_4 = field(@ContentRow,"QUA_Block_4")
set @CON_Block_4 = field(@ContentRow,"CON_Block_4")
set @SM_Footer = field(@ContentRow,"SM_Footer")
set @SUM_Footer = field(@ContentRow,"SUM_Footer")
set @UM_Footer = field(@ContentRow,"UM_Footer")
set @QUA_Footer = field(@ContentRow,"QUA_Footer")
set @CON_Footer = field(@ContentRow,"CON_Footer")
set @SM_SL_PR_1 = field(@ContentRow,"SM_SL_PR_1")
set @SUM_SL_PR_1 = field(@ContentRow,"SUM_SL_PR_1")
set @UM_SL_PR_1 = field(@ContentRow,"UM_SL_PR_1")
set @CON_SL_PR_1 = field(@ContentRow,"CON_SL_PR_1")
set @QUA_SL_PR_1 = field(@ContentRow,"QUA_SL_PR_1")
]%%





<style>
.getstarted {a:hover, a:active { text-decoration: none; color:#000000; }
</style><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">

%%[var @Industry
SET @Industry = Industry]%%
  

%%[IF @Industry == "Surface Mining" THEN]%%

%%=ContentBlockByID(@SM_SL_PR_1)=%%
  
%%[ELSEIF @Industry == "Surface and Underground Mining" THEN]%%

%%=ContentBlockByID(@SUM_SL_PR_1)=%%  
  
%%[ELSEIF @Industry == "Underground Mining" THEN]%%

%%=ContentBlockByID(@UM_SL_PR_1)=%%  
  
%%[ELSEIF @Industry == "Quarry" THEN]%%

%%=ContentBlockByID(@QUA_SL_PR_1)=%%  

%%[ELSEIF @Industry == "General Construction" THEN]%%

%%=ContentBlockByID(@CON_SL_PR_1)=%%  
 

%%[ELSE]%% <!--If none of the above conditions are met, show default-->
%%=ContentBlockByID(@SUM_SL_PR_1)=%%
  
%%[ENDIF]%%


</span></td></tr></table>
  </head>
  <body bgcolor="#ffffff" style="mso-line-height-rule: exactly;padding:0; margin:0;transform: none !important;">
    <!-- Visually Hidden Preheader Text : BEGIN -->
    <!-- NOTE: The Preaheader variable is used for dynamic preheaders. Always use '@Preheader' for the variable name. -->
    <div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family:Arial, Helvetica, sans-serif; sans-serif;">
      %%=v(@Preheader)=%%
    </div>
    <!-- Insert &zwnj;&nbsp; hack to clean up up preview text -->
    <div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family:Arial, Helvetica, sans-serif; sans-serif;">
      &nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;&zwnj;&nbsp;
    </div>
    <!-- Visually Hidden Preheader Text : END -->
    %%=ContentBlockbyKey("enterpriseTrackingSuppressionProd")=%%
    <!-- <center> allows us to center the email, even in old email clients. -->
    <center style="width:100%; text-align:center;margin: 0 auto;transform: none !important;">
      <div class="email-container" style="margin: 0 auto;transform: none !important;">
        <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]-->
        <table class="email-container tb_properties border_style" role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;padding:0;transform: none !important;">
          <!-- VIEW AS WEB : START -->
          <tr>
            <td>
              <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]-->
              <table role="presentation" border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="max-width:600px;">
                <tr>
                  <td align="center" valign="top">
                    <table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><!-- BODY COPY - FULL WIDTH : START --><!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
 
  <tr>
   <td>
    <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width:600px; background-color:#ffffff;" width="100%">
     
      <tr>
       <td>
        <!-- PARAGRAPH : START --><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
         
          <tr>
           <td class="mobile-center" style="font-family:Arial, Helvetica, sans-serif; color:#000000; text-align:center; padding-top: 10px;padding-bottom: 10px;padding-left: 60px;padding-right: 60px; font-weight:400; font-size:14px; mso-line-height-rule:exactly; line-height:18px;">
            <span style="font-size:12px;">%%=v(@entViewAsWebPage)=%%</span></td></tr></table><!-- PARAGRAPH : END --></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--><!--BODY COPY - FULL WIDTH : END --></td></tr></table>
                  </td>
                </tr>
              </table>
              <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
            </td>
          </tr>
          <!-- VIEW AS WEB : END -->
          <!-- MAIN CONTENT : START -->
          <tr>
            <td>
              <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]-->
              <table role="presentation" border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="max-width:600px;">
                <tr>
                  <td align="center" valign="top">
                    <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]-->
                    <table role="presentation" border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="max-width:600px;">
                      <tr>
                        <td align="center" valign="top" bgcolor="#ffffff" style="background-color:#ffffff;">
                          <table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><!-- HEADER LOGO LEFT AND RIGHT : START --><!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
 
  <tr>
   <td>
    <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width: 600px;"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width:600px; background-color: #000000;" width="100%">
     
      <tr>
       <td style="padding-top: 20px;padding-bottom:20px;padding-left:25px;padding-right:25px;">
        <table border="0" cellpadding="0" cellspacing="0" style="background-color: #000000;" width="100%">
         
          <tr>
           <td align="center" valign="top">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
             
              <tr>
               <td align="left" style="padding-top: 0px;padding-bottom:0px;padding-left:0px;padding-right:0px;" valign="middle">
                <a alias="Header Cat Logo" href="%%=RedirectTo(@entLocaleHomepage)=%%" target="_blank" title="CAT®"><img alt="CAT®" border="0" src="https://image.em.cat.com/lib/fe3d15707564057d771179/m/1/e3fadea5-043b-41fb-97bd-eec0b5fb25ca.png" style="height:auto; border:0;  display:block; max-width:70px;" width="70"> </a></td><td align="right" style="font-family: 'Open Sans', Arial, Helvetica, sans-serif;font-size:16px; color:#ffffff;padding-top: 0px;padding-bottom:0px;padding-left:0px;padding-right:0px;" valign="middle">
                <a alias="connect_with_dealer" href="https://www.cat.com/en_US/by-industry/mining/dealer-contact.html" style="color:#ffffff;text-transform:uppercase; font-size: 14px" target="_blank">Connect With My Dealer</a></td></tr></table></td></tr></table></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--><!-- HEADER LOGO LEFT AND RIGHT : END --></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><!-- BODY COPY - FULL WIDTH : START --><!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
 
  <tr>
   <td>
    <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width:600px; background-color:#ffffff;" width="100%">
     
      <tr>
       <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
         
          <tr>
           <td bgcolor="#FFCD11" height="5" style="font-size: 5px; line-height: 5px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#fdcb11" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#f9c811" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#F7C710" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#FFD741" height="2" style="font-size: 2px; line-height: 2px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#fdd541" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#fad341" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#f9d240" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="#ffe170" height="3" style="font-size: 3px; line-height: 3px;">
            &nbsp;</td></tr><tr>
           <td bgcolor="ffcd11" height="1" style="font-size: 1px; line-height: 1px;">
            &nbsp;</td></tr></table></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--><!--BODY COPY - FULL WIDTH : END --></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">

%%[var @Industry
SET @Industry = Industry]%%
  

%%[IF @Industry == "Surface Mining" THEN %%=BeginImpressionRegion("SM_Hero")=%%]%%

%%=ContentBlockByID(@SM_Hero)=%%

%%=EndImpressionRegion(0)=%%   
  
%%[ELSEIF @Industry == "Surface and Underground Mining" THEN %%=BeginImpressionRegion("SUM_Hero")=%%]%%

%%=ContentBlockByID(@SUM_Hero)=%%  

%%=EndImpressionRegion(0)=%%   


%%[ELSEIF @Industry == "Underground Mining" THEN %%=BeginImpressionRegion("UM_Hero")=%%]%%

%%=ContentBlockByID(@UM_Hero)=%%  

%%=EndImpressionRegion(0)=%%  
  
%%[ELSEIF @Industry == "Quarry" THEN %%=BeginImpressionRegion("QUA_Hero")=%%]%%

%%=ContentBlockByID(@QUA_Hero)=%%  
  
%%=EndImpressionRegion(0)=%%  

%%[ELSEIF @Industry == "General Construction" THEN %%=BeginImpressionRegion("CON_Hero")=%%]%%

%%=ContentBlockByID(@CON_Hero)=%%  

  %%=EndImpressionRegion(0)=%%  


%%[ELSE %%=BeginImpressionRegion("SUM_Hero")=%% ]%% <!--If none of the above conditions are met, show default-->
%%=ContentBlockByID(@SUM_Hero)=%%
   %%=EndImpressionRegion(0)=%% 
%%[ENDIF]%%


</span></td></tr></table>
                          <table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: transparent; min-width: 100%; " class="stylingblock-content-wrapper"><tr><td style="padding: 20px 0px; " class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">

%%[var @Industry
SET @Industry = Industry]%%
  

%%[IF @Industry == "Surface Mining" THEN %%=BeginImpressionRegion("SM_Block_1")=%%]%%

%%=ContentBlockByID(@SM_Block_1)=%%
%%=EndImpressionRegion(0)=%%   
  
%%[ELSEIF @Industry == "Surface and Underground Mining" THEN %%=BeginImpressionRegion("SM_Block_1")=%%]%%

%%=ContentBlockByID(@SUM_Block_1)=%%  
  
%%=EndImpressionRegion(0)=%%   
  
%%[ELSEIF @Industry == "Underground Mining" THEN %%=BeginImpressionRegion("UM_Block_1")=%%]%%

%%=ContentBlockByID(@UM_Block_1)=%%  

  %%=EndImpressionRegion(0)=%% 
  
%%[ELSEIF @Industry == "Quarry" THEN %%=BeginImpressionRegion("QUA_Block_1")=%%]%%

%%=ContentBlockByID(@QUA_Block_1)=%%  
%%=EndImpressionRegion(0)=%%   
  
%%[ELSEIF @Industry == "General Construction" THEN %%=BeginImpressionRegion("CON_Block_1")=%%]%%

%%=ContentBlockByID(@CON_Block_1)=%%    
  %%=EndImpressionRegion(0)=%% 
  
%%[ELSE %%=BeginImpressionRegion("SUM_Block_1")=%%]%% <!--If none of the above conditions are met, show default-->
%%=ContentBlockByID(@SUM_Block_1)=%%
%%=EndImpressionRegion(0)=%% 
  
%%[ENDIF]%%


</span>
</td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: #FFC500; min-width: 100%; " class="stylingblock-content-wrapper"><tr><td style="padding: 0px; " class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">%%[var @Industry SET @Industry = Industry]%% 
  %%[IF @Industry == "Surface Mining" THEN %%=BeginImpressionRegion("SM_Block_2")=%%]%% %%=ContentBlockByID(@SM_Block_2)=%% 
  %%=EndImpressionRegion(0)=%% 
  %%[ELSEIF @Industry == "Surface and Underground Mining" THEN %%=BeginImpressionRegion("SUM_Block_2")=%%]%% 
  %%=ContentBlockByID(@SUM_Block_2)=%% 
  %%=EndImpressionRegion(0)=%% 
  %%[ELSEIF @Industry == "Underground Mining" THEN %%=BeginImpressionRegion("UM_Block_2")=%%]%% 
  %%=ContentBlockByID(@UM_Block_2)=%% 
  %%=EndImpressionRegion(0)=%% 
  %%[ELSEIF @Industry == "Quarry" THEN %%=BeginImpressionRegion("QUA_Block_2")=%%]%% 
  %%=ContentBlockByID(@QUA_Block_2)=%% 
  %%=EndImpressionRegion(0)=%% 
  %%[ELSEIF @Industry == "General Construction" THEN %%=BeginImpressionRegion("CON_Block_2")=%%]%% %%=ContentBlockByID(@CON_Block_2)=%% 
  %%=EndImpressionRegion(0)=%% 
  %%[ELSE %%=BeginImpressionRegion("SUM_Block_2")=%%]%% <!--If none of the above conditions are met, show default--> %%=ContentBlockByID(@SUM_Block_2)=%% %%=EndImpressionRegion(0)=%% %%[ENDIF]%% </span></td></tr></table>
                        </td>
                      </tr>
                    </table>
                    <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
                  </td>
                </tr>
              </table>
              <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
            </td>
          </tr>
          <!-- MAIN CONTENT : END -->
          <!-- FOOTER 1 : START -->
          <tr>
            <td>
              <!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]-->
              <table role="presentation" border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="max-width:600px;background:#ffffff;">
                <tr>
                  <td align="center" valign="top">
                    <!-- PARAGRAPH : START -->
                    <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;" width="100%">
                      <tr>
                        <td class="mobile-center" style="font-family:Arial, Helvetica, sans-serif; color:#000000; text-align:center; padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px; font-weight:400; font-size:11px; mso-line-height-rule:exactly; line-height:15px;">
                          <table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: transparent; min-width: 100%; " class="stylingblock-content-wrapper"><tr><td style="padding: 0px; " class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">

%%[var @Industry
SET @Industry = Industry]%%
  

%%[IF @Industry == "Surface Mining" THEN %%=BeginImpressionRegion("SM_Block_3")=%%]%%

%%=ContentBlockByID(@SM_Block_3)=%%
 %%=EndImpressionRegion(0)=%%  
%%[ELSEIF @Industry == "Surface and Underground Mining" THEN %%=BeginImpressionRegion("SUM_Block_3")=%%]%%

%%=ContentBlockByID(@SUM_Block_3)=%%  
 %%=EndImpressionRegion(0)=%%  
%%[ELSEIF @Industry == "Underground Mining" THEN %%=BeginImpressionRegion("UM_Block_3")=%%]%%

%%=ContentBlockByID(@UM_Block_3)=%%  
   %%=EndImpressionRegion(0)=%% 
%%[ELSEIF @Industry == 'Quarry' THEN %%=BeginImpressionRegion("QUA_Block_3")=%%]%%

%%=ContentBlockByID(@QUA_Block_3)=%%  
   %%=EndImpressionRegion(0)=%% 
%%[ELSEIF @Industry == "General Construction" THEN %%=BeginImpressionRegion("CON_Block_3")=%%]%%

%%=ContentBlockByID(@CON_Block_3)=%%    
  %%=EndImpressionRegion(0)=%%  
%%[ELSE %%=BeginImpressionRegion("SUM_Block_3")=%%]%% <!--If none of the above conditions are met, show default-->
  
%%=ContentBlockByID(@SUM_Block_3)=%%

  %%=EndImpressionRegion(0)=%%  
%%[ENDIF]%%


</span>
</td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: transparent; min-width: 100%; " class="stylingblock-content-wrapper"><tr><td style="padding: 0px; " class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">

%%[var @Industry
SET @Industry = Industry]%%
  

%%[IF @Industry == "Surface Mining" THEN %%=BeginImpressionRegion("SM_Block_4")=%%]%%

%%=ContentBlockByID(@SM_Block_4)=%%
   %%=EndImpressionRegion(0)=%%  

%%[ELSEIF @Industry == "Surface and Underground Mining" THEN %%=BeginImpressionRegion("SUM_Block_4")=%%]%%

%%=ContentBlockByID(@SUM_Block_4)=%%  
   %%=EndImpressionRegion(0)=%%  

%%[ELSEIF @Industry == "Underground Mining" THEN %%=BeginImpressionRegion("UM_Block_4")=%%]%%

%%=ContentBlockByID(@UM_Block_4)=%%  
  %%=EndImpressionRegion(0)=%%  
 
%%[ELSEIF @Industry == "Quarry" THEN %%=BeginImpressionRegion("QUA_Block_4")=%%]%%

%%=ContentBlockByID(@QUA_Block_4)=%%  
 
%%=EndImpressionRegion(0)=%%  
  
%%[ELSEIF @Industry == "General Construction" THEN %%=BeginImpressionRegion("CON_Block_4")=%%]%%

%%=ContentBlockByID(@CON_Block_4)=%%    

%%=EndImpressionRegion(0)=%%  

%%[ELSE %%=BeginImpressionRegion("SUM_Block_4")=%%]%% <!--If none of the above conditions are met, show default-->

%%=ContentBlockByID(@SUM_Block_4)=%%
 %%=EndImpressionRegion(0)=%%  

  
%%[ENDIF]%%


</span>
</td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="min-width: 100%; " class="stylingblock-content-wrapper"><tr><td class="stylingblock-content-wrapper camarker-inner"><span style="color:#000; font-size: 12px;">

%%[var @Industry
SET @Industry = Industry]%%
  

%%[IF @Industry == "Surface Mining" THEN %%=BeginImpressionRegion("SM_Footer")=%%]%%

%%=ContentBlockByID(@SM_Footer)=%%
   %%=EndImpressionRegion(0)=%%  

  
%%[ELSEIF @Industry == "Surface and Underground Mining" THEN %%=BeginImpressionRegion("SUM_Footer")=%%]%%

%%=ContentBlockByID(@SUM_Footer)=%%  
   %%=EndImpressionRegion(0)=%%  

%%[ELSEIF @Industry == "Underground Mining" THEN %%=BeginImpressionRegion("UM_Footer")=%%]%%

%%=ContentBlockByID(@UM_Footer)=%%  
   %%=EndImpressionRegion(0)=%%  

  
%%[ELSEIF @Industry == "Quarry" THEN %%=BeginImpressionRegion("QUA_Footer")=%%]%%

%%=ContentBlockByID(@QUA_Footer)=%%  
   %%=EndImpressionRegion(0)=%%  

  
%%[ELSEIF @Industry == "General Construction" THEN %%=BeginImpressionRegion("CON_Footer")=%%]%%

%%=ContentBlockByID(@CON_Footer)=%%    
  
   %%=EndImpressionRegion(0)=%%  

  
%%[ELSE %%=BeginImpressionRegion("SUM_Footer")=%%]%% <!--If none of the above conditions are met, show default-->
%%=ContentBlockByID(@SUM_Footer)=%%

   %%=EndImpressionRegion(0)=%%  

%%[ENDIF]%%


</span>
</td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: transparent; min-width: 100%; border-top: 0px; border-right: 1px solid #000000; border-bottom: 0px; border-left: 1px solid #000000; " class="stylingblock-content-wrapper"><tr><td style="padding: 0px; " class="stylingblock-content-wrapper camarker-inner"><!-- BLACK BAR : START --><!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" style="max-width:600px;background:#ffffff;" width="100%">
 
  <tr>
   <td align="center" style="background-color: #000000; padding: 5px 0;" valign="top">
   </td></tr></table><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--><!-- BLACK BAR : END --></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: transparent; min-width: 100%; " class="stylingblock-content-wrapper"><tr><td style="padding: 20px 0px 10px; " class="stylingblock-content-wrapper camarker-inner"><table cellpadding="0" cellspacing="0" class="socialshare-wrapper" width="100%"><tr><td align="center"><table cellpadding="0" cellspacing="0" align="center"><tr><td align="center"><!--[if mso]><table border="0" cellspacing="0" cellpadding="0"><tr><td style="padding-right:10px;"><![endif]--><table class="socialshare-innertable" style="display: inline-block"><tr><td style="padding:5px 10px"><a href="https://www.facebook.com/CatMining/" alias="facebook follow"><img src="https://image.s4.exct.net/lib/fe911573736c007d7d/m/2/7f9128b1-5e37-4682-bded-9ab99b2ce29b.png" alt="Facebook" width="24" height="24" style="display: block;; width: 24px !important; height: 24px !important"></a></td></tr></table><!--[if mso]></td><td style="padding-right:10px;"><![endif]--><table class="socialshare-innertable" style="display: inline-block"><tr><td style="padding:5px 10px"><a href="https://www.linkedin.com/showcase/cat-mining/" alias="linkedin follow"><img src="https://image.s4.exct.net/lib/fe911573736c007d7d/m/2/953ce0cf-e205-47e4-97e1-09ee03c2dab5.png" alt="LinkedIn" width="24" height="24" style="display: block;; width: 24px !important; height: 24px !important"></a></td></tr></table><!--[if mso]></td><td style="padding-right:10px;"><![endif]--><table class="socialshare-innertable" style="display: inline-block"><tr><td style="padding:5px 10px"><a href="https://www.instagram.com/catmining/" alias="instagram follow"><img src="https://image.s4.exct.net/lib/fe911573736c007d7d/m/2/54f969ec-7ae6-4bd9-97c3-f1a8419378b0.png" alt="Instagram" width="24" height="24" style="display: block;; width: 24px !important; height: 24px !important"></a></td></tr></table><!--[if mso]></td><td><![endif]--><table class="socialshare-innertable" style="display: inline-block"><tr><td style="padding:5px 10px"><a href="https://www.youtube.com/user/catmining" alias="youtube follow"><img src="https://image.s4.exct.net/lib/fe911573736c007d7d/m/2/65446c8e-e655-4565-8d7c-a5e783173b60.png" alt="YouTube" width="24" height="24" style="display: block;; width: 24px !important; height: 24px !important"></a></td></tr></table><!--[if mso]></td></tr></table><![endif]--></td></tr></table></td></tr></table></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" role="presentation" style="background-color: transparent; min-width: 100%; " class="stylingblock-content-wrapper"><tr><td style="padding: 0px 0px 10px; " class="stylingblock-content-wrapper camarker-inner"><!-- FOOTER 1 : START --><!--[if (gte mso 9)|(IE)]><table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="width:600px;"><tr><td align="center" valign="top" width="100%"><![endif]--><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="max-width:600px; background-color:#ffffff;" width="100%">
 
  <tr>
   <td>
    <!-- PARAGRAPH : START --><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
     
      <tr>
       <td class="mobile-center" style="font-family:Arial, Helvetica, sans-serif; color:#000000; text-align:center; padding-top: 0px;padding-bottom: px;padding-left: 0px;padding-right: 0px; font-weight:400; font-size:11px; mso-line-height-rule:exactly; line-height:15px;">
        %%=v(@entPreferenceCenter)=%%<a href="%%profile_center_url%%" style="display:none;text-decoration:none;pointer-events:none;">&nbsp;</a></td></tr></table><!-- PARAGRAPH : END --><!-- PARAGRAPH : START --><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
     
      <tr>
       <td class="mobile-center" style="font-family:Arial, Helvetica, sans-serif; color:#000000; text-align:center; padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px; font-weight:400; font-size:11px; mso-line-height-rule:exactly; line-height:15px;">
        %%=v(@entDataPrivacy)=%%</td></tr></table><!-- PARAGRAPH : END --></td></tr></table><!-- Footer Content block : END --><!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--><!-- FOOTER 1 : END --></td></tr></table>
                        </td>
                      </tr>
                    </table>
                    <!-- PARAGRAPH : END -->
                    <!-- PARAGRAPH : START -->
                    <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
                      <tr>
                        <td class="mobile-center" style="font-family:Arial, Helvetica, sans-serif; color:#000000; text-align:center; padding-top: 0px;padding-bottom: 10px;padding-left: 60px;padding-right: 60px; font-weight:400; font-size:11px; mso-line-height-rule:exactly; line-height:15px;">
                          %%=v(@entLegal)=%%
                        </td>
                      </tr>
                    </table>
                    <!-- PARAGRAPH : END -->
                    <!-- PARAGRAPH : START -->
                    <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background-color: #ffffff;" width="100%">
                      <tr>
                        <td dir="ltr" class="mobile-center" style="font-family:Arial, Helvetica, sans-serif; color:#000000; text-align:center; padding-top: 0px;padding-bottom: 40px;padding-left: 60px;padding-right: 60px; font-weight:400; font-size:11px; mso-line-height-rule:exactly; line-height:15px;">
                          %%Member_Busname%%
                          <br>
                          %%Member_Addr%%
                          <br>
                          %%Member_City%%, %%Member_State%%, %%Member_Country%% %%Member_PostalCode%%
                          <br>
                          %%=v(@Footer_Phone)=%%
                        </td>
                      </tr>
                    </table>
                    <!-- PARAGRAPH : END -->
                  </td>
                </tr>
              </table>
              <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
            </td>
          </tr>
          <!-- FOOTER 1 : END -->
        </table>
        <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
        <custom name="usermatch" type="tracking" />
      </div>
    </center>
  </body>
</html>
package com.example.dicerollerapp

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material3.Button
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.Alignment
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.dicerollerapp.ui.theme.DiceRollerAppTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {

          diceRollerApp()

        }
    }
    @Composable
    fun diceRollerApp(){

        diceWithImageBtn(Modifier.fillMaxSize().wrapContentSize(Alignment.Center))


    }
    @Composable
    fun diceWithImageBtn(modifier:Modifier){
        var res by remember { mutableStateOf(1) }
        var z= when(res){
            3->R.drawable.three
            4->R.drawable.fourr
            
            else->R.drawable.five
        }
        Column(Modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center){
            Image(painterResource(z),contentDescription = null)
            Spacer(Modifier.padding(16.dp))
Button(onClick = {res=(1..6).random()}) {
    Text(text = "roll", fontSize = 24.sp)
}

        }

    }


}



Task-5:
1. Create a program with different types of dwellings (Shelters people live in like roundhut, square cabin, round tower) that are implemented as a class hierarchy.
import kotlin.math.PI
import kotlin.math.sqrt

fun main() {
    val squareCabin = SquareCabin(6, 50.0)
    val roundHut = RoundHut(3, 10.0)
    val roundTower = RoundTower(4, 15.5)

    println("\nSquare Cabin\n============")
    squareCabin.printDetails()

    println("\nRound Hut\n=========")
    roundHut.printDetails()
    println("Has room? ${roundHut.hasRoom()}")
    roundHut.getRoom()
    println("Has room? ${roundHut.hasRoom()}")
    println("Carpet size: ${roundHut.calculateMaxCarpetLength()}")

    println("\nRound Tower\n==========")
    roundTower.printDetails()
    println("Carpet Length: ${roundTower.calculateMaxCarpetLength()}")
}

// Base class for all dwellings
abstract class Dwelling(private var residents: Int) {
    abstract val buildingMaterial: String
    abstract val capacity: Int

    abstract fun floorArea(): Double

    fun hasRoom(): Boolean = residents < capacity

    fun getRoom() {
        if (hasRoom()) {
            residents++
            println("You got a room!")
        } else {
            println("Sorry, no rooms left.")
        }
    }

    fun printDetails() {
        println("Material: $buildingMaterial")
        println("Capacity: $capacity")
        println("Floor area: ${floorArea()}")
    }
}

// SquareCabin subclass
class SquareCabin(residents: Int, val length: Double) : Dwelling(residents) {
    override val buildingMaterial = "Wood"
    override val capacity = 6

    override fun floorArea(): Double = length * length
}

// RoundHut subclass
open class RoundHut(residents: Int, val radius: Double) : Dwelling(residents) {
    override val buildingMaterial = "Straw"
    override val capacity = 4

    override fun floorArea(): Double = PI * radius * radius

    fun calculateMaxCarpetLength(): Double = sqrt(2.0) * radius
}

// RoundTower subclass
class RoundTower(residents: Int, radius: Double, val floors: Int = 2) : RoundHut(residents, radius) {
    override val buildingMaterial = "Stone"
    override val capacity = floors * 4

    override fun floorArea(): Double = super.floorArea() * floors
}
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.NavController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.example.prog2.ui.theme.Prog2Theme
 
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            val nav_Controller = rememberNavController()
            NavHost(navController = nav_Controller, startDestination = "fragment1")
          			{
                composable("fragment1") 
                      {
                    Fragment1(nav_Controller)
               			 }
                composable("fragment2") {
                    Fragment2(nav_Controller)
                }
            }
        }
    }
}
 
 
@Composable
fun Fragment1(navController: NavController){
    Column {
        Button(onClick={ navController.navigate("fragment2")}) {
            Text(text = "Navigate to fragment2 ")
        }
    }
}
 
 
@Composable
fun Fragment2(navController: NavController) {
    Row(horizontalArrangement = Arrangement.SpaceEvenly){
        
        Button(onClick = { navController.navigateUp() }) {
            Text(text = "Back to Fragment 1")
        }
    }
}
dependencies {
    implementation "androidx.compose.ui:ui:1.3.0"
    implementation "androidx.compose.material3:material3:1.0.0"
    implementation "androidx.navigation:navigation-compose:2.5.3"
    // Other dependencies...
}
package com.example.dwellings

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

open class Dwelling(
    val name: String,
    val capacity: Int
) {
    open fun description(): String {
        return "The $name can accommodate $capacity people."
    }
}

class RoundHut(
    capacity: Int,
    private val radius: Double
) : Dwelling("Round Hut", capacity) {

    fun floorArea(): Double {
        return Math.PI * radius * radius
    }

    override fun description(): String {
        return super.description() + " It has a floor area of ${"%.2f".format(floorArea())} square meters."
    }
}

class SquareCabin(
    capacity: Int,
    private val sideLength: Double
) : Dwelling("Square Cabin", capacity) {

    fun floorArea(): Double {
        return sideLength * sideLength
    }

    override fun description(): String {
        return super.description() + " It has a floor area of ${"%.2f".format(floorArea())} square meters."
    }
}

class RoundTower(
    capacity: Int,
    private val radius: Double,
    private val floors: Int
) : Dwelling("Round Tower", capacity) {

    fun floorArea(): Double {
        return Math.PI * radius * radius * floors
    }

    override fun description(): String {
        return super.description() + " It has $floors floors and a total floor area of ${"%.2f".format(floorArea())} square meters."
    }
}

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val roundHut = RoundHut(4, 5.0)
        val squareCabin = SquareCabin(6, 4.0)
        val roundTower = RoundTower(8, 3.5, 3)

        val dwellings = listOf(roundHut, squareCabin, roundTower)

        dwellings.forEach { dwelling ->
            println(dwelling.description())
        }
    }
}
star

Thu Nov 21 2024 18:04:12 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 18:03:50 GMT+0000 (Coordinated Universal Time) http://localhost:3000/asad.txt

@asadiftekhar10

star

Thu Nov 21 2024 18:03:36 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 18:02:35 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 18:01:46 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 18:00:35 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 17:58:36 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 17:57:07 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 16:38:52 GMT+0000 (Coordinated Universal Time)

@sayedhurhussain

star

Thu Nov 21 2024 15:50:09 GMT+0000 (Coordinated Universal Time) https://mawdoo3.com/بحث_عن_رواد_الفضاء

@mohamedahmed123

star

Thu Nov 21 2024 13:45:50 GMT+0000 (Coordinated Universal Time)

@RehmatAli2024 #deluge

star

Thu Nov 21 2024 13:05:29 GMT+0000 (Coordinated Universal Time) https://creatiosoft.com/poker-software-for-sale

@Rishabh ##software #poker #pokersoftware

star

Thu Nov 21 2024 12:49:48 GMT+0000 (Coordinated Universal Time)

@SophieLCDZ

star

Thu Nov 21 2024 09:54:49 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/js/tryit.asp?filename

@TEST12 #undefined

star

Thu Nov 21 2024 07:53:43 GMT+0000 (Coordinated Universal Time)

@2late #dbfakt

star

Thu Nov 21 2024 06:11:31 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 06:02:46 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 06:00:12 GMT+0000 (Coordinated Universal Time) https://bettoblock.com/sports-betting-software-development/

@marthacollins

star

Thu Nov 21 2024 05:52:57 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 05:52:17 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 05:49:40 GMT+0000 (Coordinated Universal Time)

@coding1

star

Thu Nov 21 2024 05:35:01 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 05:34:15 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 05:33:46 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 05:10:15 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 04:49:33 GMT+0000 (Coordinated Universal Time) https://idn89akc.xyz/

@Deka

star

Thu Nov 21 2024 04:40:12 GMT+0000 (Coordinated Universal Time)

@signup1

star

Thu Nov 21 2024 04:33:29 GMT+0000 (Coordinated Universal Time)

@shakil_spi #flatarrowfunction

star

Thu Nov 21 2024 03:20:14 GMT+0000 (Coordinated Universal Time)

@Saging #java

star

Thu Nov 21 2024 03:19:57 GMT+0000 (Coordinated Universal Time)

@Saging #java

star

Thu Nov 21 2024 03:19:43 GMT+0000 (Coordinated Universal Time)

@Saging #java

star

Thu Nov 21 2024 03:19:18 GMT+0000 (Coordinated Universal Time)

@Saging #java

star

Thu Nov 21 2024 02:36:47 GMT+0000 (Coordinated Universal Time)

@signup1

star

Thu Nov 21 2024 01:39:22 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 01:38:22 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 01:37:14 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 01:36:27 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 01:35:23 GMT+0000 (Coordinated Universal Time)

@sem

star

Thu Nov 21 2024 01:27:45 GMT+0000 (Coordinated Universal Time)

@wtlab

star

Thu Nov 21 2024 00:23:06 GMT+0000 (Coordinated Universal Time)

@WXAPAC

star

Wed Nov 20 2024 23:55:46 GMT+0000 (Coordinated Universal Time) https://download-directory.github.io/

@igorhasse

star

Wed Nov 20 2024 23:55:15 GMT+0000 (Coordinated Universal Time) https://download-directory.github.io/

@igorhasse

star

Wed Nov 20 2024 22:15:14 GMT+0000 (Coordinated Universal Time) https://www.deque.com/blog/creating-accessible-svgs/

@linabalciunaite #accessibility

star

Wed Nov 20 2024 21:35:29 GMT+0000 (Coordinated Universal Time)

@saharmess #mysql

star

Wed Nov 20 2024 21:34:43 GMT+0000 (Coordinated Universal Time) https://www.programiz.com/sql/online-compiler/

@saharmess

star

Wed Nov 20 2024 20:16:57 GMT+0000 (Coordinated Universal Time)

@shirnunn

star

Wed Nov 20 2024 19:18:32 GMT+0000 (Coordinated Universal Time)

@wtlab

star

Wed Nov 20 2024 19:01:29 GMT+0000 (Coordinated Universal Time)

@signup1

star

Wed Nov 20 2024 18:46:47 GMT+0000 (Coordinated Universal Time)

@hi

star

Wed Nov 20 2024 18:41:19 GMT+0000 (Coordinated Universal Time)

@signup1

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension