أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
<p><strong>Why To make that ? To help any one to switch between programming languages very fast </strong></p> <p> </p> <p><strong>plz write the template with the following roles </strong></p> <p> </p> <p><strong>//1- class name will be Class_Name and if it is extended it will be extended from Parent_Class _Name</strong></p> <p> </p> <p><strong>class template </strong></p> <p><strong>{</strong></p> <p><strong>//2- Visibility Scope (e.g public , protected , private etc ) with variables type (if there is ) and variable name that will be Variable_Name1 , Variable_Name2 or Object_Variable_Name1 , Object_Variable_Name2 etc </strong></p> <p><strong> </strong></p> <p><strong>//3- construction and destruction function and Multiple constructors with different parameters if the programming language allow that and what to do if the language don't allow that </strong></p> <p><strong> </strong></p> <p><strong> </strong></p> <p><strong>//4- Visibility Scope with function with name Function_Name() that contain if else , for , while and do while statements</strong></p> <p> </p> <p><strong> //5 - getter and setter methods for protected properties of classes}</strong></p>
Python and java are best two programming languages
package aslam.com;
class Program
{
public static void main(String[] args)
{
System.out.println("Java is the most secured and platform independent programming Language");
}
}
// This is the programming sample of Java
---------------------------------------------------------------------
<!----This is format of Web Desing
<!Doctype html>
<html>
<head>
<title>Web Page </title>
</head>
<body>
</body>
</html>
</head.
template <class T>
T add(T v1, T v2){ // Generic Type T
T sum = v1+v2; // Sum any Values of Generic Type T
return sum;
}
omg i can't this is a bit difficult :/
<!doctype html>
<html>
<head>
<title>My First Webpage</title>
!
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
!
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/
bootstrap.min.css">
!
<!-- Optional theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/
bootstrap-theme.min.css">
!
!
<style>
!
html, body {
height:100%;
}
!
.container {
background-image:url("background.jpg");
width:100%;
height:100%;
background-size:cover;
background-position:center;
padding-top:100px;
}
!
.center {
text-align:center;
}
!
.white {
color:white;
}
!
p {
padding-top:15px;
padding-bottom:15px;
}
!
button {
margin-top:20px;
margin-bottom:20px;
}
!
.alert {
margin-top:20px;
display:none;
}
</style>
!
!
</head>
!
<body>
!
<div class="container">
!
<div class="row">
!
<div class="col-md-6 col-md-offset-3 center">
!
<h1 class="center white">Weather Predictor</h1>
!
<p class="lead center white">Enter your city below to get a forecast for the
weather.</p>
!
<form>
!
<div class="form-group">
!
<input type="text" class="form-control" name="city" id="city" placeholder="Eg.
London, Paris, San Francisco..." />
!
</div>
!
<button id="findMyWeather" class="btn btn-success btn-lg">Find My Weather</
button>
!
!
</form>
!
!
<div id="success" class="alert alert-success">Success!</div>
!
<div id="fail" class="alert alert-danger">Could not find weather data for that
city. Please try again.</div>
!
<div id="noCity" class="alert alert-danger">Please enter a city!</div>
!
</div>
!
!
!
!
!
</div>
!
!
</div>
!
!
!
!
!
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
!
!
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></
script>
!
<script>
!
$("#findMyWeather").click(function(event) {
event.preventDefault();
$(".alert").hide();
if ($("#city").val()!="") {
$.get("scraper.php?city="+$("#city").val(),
function( data ) {
if (data=="") {
$("#fail").fadeIn();
} else {
$("#success").html(data).fadeIn();
}
});
} else {
$("#noCity").fadeIn();
}
});
!
!
</script>
!
</body>
</html>
Yes, I can do it. it depends of the algorithm
The is example class template in Swift
import UIKit
class SampleVC: UIViewController, UITableViewDataSource, UITableViewDelegate
{
//MARK: IBOutlets
@IBOutlet weak var nameBtn: UIButton!
@IBOutlet weak var anotherBtn: UIButton!
//MARK: CONSTANTS
//private and fileprivate constants
private let someConstant: Int = 0
private let anotherConstant: String = "Hello"
//public constants
let somePublicConstant: Int = 0
let someOtherConstant: String = "Hello again"
//MARK: VARIABLES
//private and fileprivate vars
private var someVariable: Int?
private var anotherVariable: String?
//public constants
var somePublicVariable: Int?
var anotherPublicVariable: String?
//MARK: INIT and DEINIT methods
convenience init()
{
self.init()
}
required init?(coder aDecoder: NSCoder)
{
fatalError("init(coder:) has not been implemented")
}
deinit
{
}
//MARK: OVERRIDE METHODS
override func viewDidLoad()
{
super.viewDidLoad()
}
override func didReceiveMemoryWarning()
{
super.didReceiveMemoryWarning()
//Dispose of any resources that can be recreated.
}
//MARK: PRIVATE METHODS
private func somePrivateMethod()
{
}
//MARK: PUBLIC METHODS
func somePublicMethod()
{
}
//MARK: DELEGATE METHODS
//MARK: UITableViewDelegate
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat
{
return 100
}
//MARK: UITableViewDataSource
func numberOfSections(in tableView: UITableView) -> Int
{
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
return 5
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell: BaseTableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell") as! BaseTableViewCell
return cell
}
}
When you know how to create templates and their properties..why are you posting/asking ..?
visual basic most recent version
Basm Allah Alrahman Alrahim
<?php/
/1- class name will be Class_Name and if it is extended it will be extended from Parent_Class _Name
class template
{
//2- Visibility Scope (e.g public , protected , private etc ) with variables type (if there is )and variable name that will be Variable_Name1 , Variable_Name2 or Objec_Variable_Name1 , Object_Variable_Name2 etc
public Static $Variable_Name1;
private $Variable_Name2= false;
// DIFFERENT ways for array declaration
//A
public $Variable_Name3 [''] = '';
//B
public $Variable_Name4 = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
//C another way of B
public $Variable_Name5['Peter'] = "35";
public $Variable_Name5['Ben'] = "37";
public $Variable_Name5['Joe'] = "43";
//D multidimension array or array of arrays
public $Variable_Name6 = array ( array("Peter",22,18), array("Ben",15,13), array("Joe",5,2), array("Mors",1,5) );
//3- construction and destruction function and Multiple constructors with different parameters if the programming languge allow that and what to do if the language don't allow that
public function __construct() // or public function template() { }
{
$this->$Variable_Name2=true; // obsrve $this mean this object from this class
}
//4- Visibility Scope with function with name Function_Name() that contain if else , for , while and do while statements
public function Function_Name( $parameter_Name_1 , $parameter_Name_2 , $parameter_Name_n)
{
//4 -1 if else statment
if (condition)
{
//if condition is true execute codes;
}
elseif (condition)
{
//if condition is true execute codes;
}
else
{
//if condition is false execute codes;
}
//4 -2 For loop statment
for (inititial counter Variable ; test counter Variable; increment counter Variable)
{
//looping code to be executed;
}
//4 -3 while loop statment
while (condition is true)
{
//looping code to be executed;
}
//4 -4 do while loop statment
do {
//looping code to be executed;
} while (condition is true);
//4 -5 foreach loop statment
foreach ($array as $value)
{
//looping code to be executed;
}
//4 -6 swith statment is just simple way from if else statments
switch (n)
{
case label1:
//code to be executed if n=label1;
break;
case label2:
//code to be executed if n=label2;
break;
case label3:
//code to be executed if n=label3;
break;
...
default:
//code to be executed if n is different from all labels;
}
//5 - getter and setter methods for protected properties of classes
// $this->Variable_Name , $this->Function_Name
}}
$VarObjectFromMytemplateClass =new template();
required_once('template_2_file.php');
//observe :: operators used with static functionns
template_2::Static_Function_1();
template_2::Static_Function_2();
//observe $Class_Name->Variable_Name (i.e -> look like dot in programming )?>
?>