Posts

Showing posts from June, 2024

javafx

links  table view  javafx https://www.tutorialspoint.com/javafx/index.htm  - tutorialspoint javafx with scene https://www.javatpoint.com/javafx-labe l - javafx working with scene  java 8  https://www.geeksforgeeks.org/java-8-features/?ref=lbp java  https://www.geeksforgeeks.org/java/?ref=lbp

python-beginner

 variable name='sadogi' surname="llkjuhhhu" str age='36' print('oko'+name+" "+surname+" "+age) string matris seklindedir python icin print(name[0]) //s length=len(name)//6 karakter print(name[length-1) // = print(name[5]) = i print(name[-1] //i -cunku sondan basa sayiyor, sondaki ilk harf -1 print(name[2:4]) // 2 inci karakterden 4`e kadarini yaz = dog print(name[2:]) //2`inciden sona kadar yaz = dogi print(name[:4]) //4`uncu karaktere kadar yaz = sadog

c++-beginner

begin of code: #include <iostream>  using namespace std; int main(){ input int a, b; cin>>a>>b; output cout<<a<<b; newline when print cout << a <<endl; Conditional == equal != not equal <= >= < > int points=101; if(points>70){ cout << "hoy yah"; } else if(points==70){ cout<<"konoriki"; } else{ cout << "moko"; } int choice=2 switch(choice){ case 1: cout<< "bud"; break; case 2: cout<<"choco"; break; default: cout << "yoyo"; }

PHP MYSQL notes

  < Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP >< PHP MySQL PHP MyAdmin >< PHP MySQL Notes > TR: Create DB Collation Supported language: gözönünde bulundur Most common: UTF-general-cı Türkçe: ISO 8859-9 (latin5) windows 1254 utf-8 çok daha iyi ama dezavantaj daha çok byte Data Type Int - collation boş - size boş String - bu field her zaman  Char olmalı-çünkü =255 karakter Text çok daha karakter >255 karakter Date - otomati için Timestamp (datatype) olmalı Null Her zaman boş bırak, çünkü "not null" demek 2 column index seçme Tablo save ettikten sonra, 2 column select et  "primary" de Drop Down Menu (Pull Down Menu) Tables should be type: INNODB (automatically made) Relational view'a gel, üstü boş bırak (internal) sadece aşağıdakini doldur (external) Column view relation aynı, hem dropdown, hem relation yapıyor Copy Table

PHP-Read Write File

  < Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP >< PHP MySQL PHP MyAdmin >< PHP MySQL Notes > Working with Files & Writing to a file Functions for creating, reading, uploading and editing files. fopen() creates or opens a file modes r: open file for read only w: open file for write only,  erases content of file or creates new file if not exist a:open file for write only x: create new file for write only rt: open file for read/write wt: open file for read/write erase content of file create new file a:open file for read/write. create new file if not exist xt: create new file if not exist Creating a file $myfile=fopen("file.txt","w"); fwrite:  writes to a file. Parameters: file to write to string to be written <?php $myfile=fopen("names.txt","w"); $txt="Mickey\n"; fwrite($myfile,$txt); $txt=&qu

JS-Loop and If

   < Beginner JS >< Function >< Variable >< Loop-If >< OOP > if statement if(MemberAge<18){ document.write("teen"); } if..else if(MemberAge<18){ document.write("teen"); } else{ document.write("big"); } if...else  if...else if(MemberAge<18){ document.write("teen"); } else if(MemberAge>18){ document.write("adult"); } else{ document.write("just 18"); } Switch statement Ex1: switch(memcat){ case1: Fee=100; case2: Fee=150; case3: Fee=300;} Ex2: with break switch(memcat){ case1: Fee=100; break; case2: ...; } Ex3: no matching than default case switch(memcat){ case1: Fee=100; break; case2: ...; default: Fee:400; } Counting and Looping Executing a portion of code over and over again until an intermediaite condition accurs For statement Used as counter Syntax: for(start;condition;expression)statement Ex: var Number; for(Number=0;Number<=10;Number++) document.write("Num"+Number+"

JS-OOP

   < Beginner JS >< Function >< Variable > < Loop-If > < OOP > this member it represents the class itself it has direct access to all properties of its parent class function Hand(side,fingers,nails){ this.LeftOrRight =side; this.NbrOfFingers=fingers this.NailState=nails; } name of the class : Hand  properties :  (side,fingers,nails)  // properties of the function / of the class NailState  // property of the argument argument (value provided for each property) this.LeftOrRight =side; // argument of the function / of the class =nails;     // argument of the argument class: function Hand(side,fingers,nails){ this.LeftOrRight =side; this.NbrOfFingers=fingers this.NailState=nails; } This It has direct access to all properties of its parent class You must use it to create a class Before using a class you must declare it. var dogHand=newHand("Right",5,false,true); name of the object: dogHand name of the class: Hand arguments: "Right",5,false,t

JS-Function

 < Beginner JS >< Function >< Variable >< Loop-If >< OOP > Syntax of a function function name(){} Exemple function showAdress)_{ document.write("Hello"); } Function calling showAdress(); Function and local variables Variable declared in the body of a function ...{var custAdress}... Argument - > passing an argument This means: providing an argument to a function function circleArea(radius){ var areas; area=radius*radius*3.14; document.write("area is: ",area); } circleArea(20.75); function with more than one argument function rectangleArea(length,height){ var area; area=length*height*3.14; document.write("area: ",area); } var length,height; length=52.05; height=46.55; rectangleArea(length,height); Argument with different types function rectangleArea(length,height,shape){ ....} length=2; height=4; shape="rectangle"; rectangleArea(length,height,shape); Returning a value .... return area; } producing a value and making

JS-Variable

   < Beginner JS >< Function >< Variable > < Loop-If > < OOP > 1/ Variable <script> var FName=FirstName </script> Declaring a variable var FirstName var Adress,Phone,Email; You can declare: Natural numbers: Integer Decimal numbers: Double String: Text Assigning a value to a variable Salary=12 or var Salary=12 Display the value Document.write(Salary) Addition/Substraction/Multiplication/Division Document.write(125+40) Document.write(Salary+50) Negative Temp=-31 Function and local variables Variable declared in a body of a function ....{var custAdress}... Use Declared variable function showAdress(){ var custAdress custAdress="12 Hello" document.write(custAdress); } showAdress();

JS-beginner

 < Beginner JS >< Function >< Variable >< Loop-If >< OOP > 1/ General concepts Class It is a technique used to provide the criteria to define an object The list of items used to describe something Object It is the result of a description based on a class Method An action that an object can perform document.write("Jacques") document: Object write: method Jacques : Argument Properties It is the caracteristics used to describe an object. A property is created like a variable Method and their arguments It is a value that needs the method to work with to perform an action  protectRain(Reason) Argument  An item or value that a function needs.  It is provided between parenthesis Start and end <script> </script> or <script language="Javascript"> </script> Display string document.write("Jacques") 2/ Forms <form></form> Refering to a form document.CreditApplicationForm 2.1./ Text box <input type=&q

PHP-Advanced

  < Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes >   Object Oriented PHP Classes & Objects in PHP OOP is intended to make thinking programming closer to the real world. Focal point of OOP are classes. Objects are created using classes The Class describes what the object will be The class is separate from the object itself. Class Building Dog Computer Object (or instance) Empire State GM Ford VW Lassie K9 PitB Apple IBM HP Features of objects x/y/z x y z Function Methods Behaviour of objects a/b/c a b c A class name starts with letter or _ class Person { public $age; // property

php-Session

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes > < PHP MySQL Notes > $_SESSION With it you can store info in variables, to be used across multiple pages Info is not stored on the user`s computer ( <> cookies). Session variables last until the user closes the browser Session starts using the session_start() function  The we set session variables with $_SESSION <?php session_start(); $_SESSION['color']="red"; $_SESSION['name']="John"; ?> now color and name session variables are accessible on multiple pages(until end of session) Session start must be before any html tags. Another page accessing session variables <?php session_start(); ?></head><body> <?php  echo "your name is:".$_SESSION['name']; ?> </body>

php-CRUD

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session >< Read Write File >< CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes >   Include & Require Allow for insertion of the content of one PHP file into another PHP file, before the server  executes it. Include doesn`t produce error if it can not find the file. Include We have a header file header.php <?php echo `Welcome` ?> To include the header file in a page / in multiple pages <html> <body> <?php include `header.php`; ?> </body> </html> Require Require is same as include, but if it can not find the file it cease execution and produce error. PHP Forms $_GET & $_POST Their purpose is to collect data that has been entered into a form somefile.php <form action="first.php" method="post"> <p>Name: <input type="text" name="name" /><

PHP-function

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes > A function name start with letter or underscore but not number or special symbols, it is not case sensitive. To call the function we write its name. function sayHello(){ echo "Hello"; } sayHello(); User defined functions It is a block of prog. that can be used repeatedly in a program It executes not automatically but a call. function functionName(){ //code } Function parameters Single argument Info can be passed to functions through arguments, which are like variables. Arguments are specified after the function name and within the parenthesis function multby2 ($number){ $answ=$number*2; echo $answ; } multby2(3); // result is 6 Multiple arguments function multy ($n1, $n2) { //  $n1, $n2 are called parameters (variable) echo $n1/$n2; } multy (3,6)

php-Pre-Def variable

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes > General A superglobal is a predef var, that is alwaysa ccessible, regardless of scope. Yu can access the PHP superglobalsthrough function, class or file. Superglobal variables $_SERVER $GLOBALS $REQUEST $_POST $_GET $_FILES $_ENV $_COOKIE $_SESSION $SERVER it returns the path of the current script. Includes: headers, paths, K script location. <?php echo $_SERVER [`SCRIPT_NAME `]; ?> //   /Playground/file().php elements for $_SERVER Some of the most important elements going inside $Server $_SERVER[`SERVER_NAME`] $_SERVER [`REQUEST_METHOD`] $_SERVER [`QUERY_STRING`] $_SERVER [`HTTP_HOST`] $_SERVER [`REMOTE_ADDR`] $_SERVER [`REMOTE_HOST`] $_SERVER [`SERVER_PORT`] $_SERVER [`SCRIPT_NAME`] $_SERVER [`SCRIPT_URI`] $_SERVER variable: Host name $_SERVER [`H

PHP-Loop

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes >   While Loop execute as long as condition is true while (condition is true){ code }; Exemple $i=1 while ($i<7){ // first check if $i<7 is true  - $ = 1 so it is true echo "value is $i <br />";  $i++; // add + 1  to $i   = so make it 2 - and loop } //1,2,3,4,5,6 Do while Loop The condition is tested after executing the statement (TR: yani illa bir kez işlem yapılıyor) The loop executes at least once $i=5; do{ echo"Number is".$i."<br />"; // do not make any check - write directly this  $i++; // then add +1 to $i = make it 2 } while ($i<=7); // $i is now 2 so loop again //1,2,3,4,5,6,7 For Loop When you know in advance how many times the script should run for (init;test;increment){ code } init : initialize c

PHP-Array

< Beginner PHP >< Array >< Loop >< Function >< Pre-Def variable >< Session > < Read Write File > < CRUD > < Advanced PHP > < PHP MySQL PHP MyAdmin > < PHP MySQL Notes > Numeric Arrays Associate numeric index with their value. Index starts at 0 (zero) Index can be assigned automatically Exemple  Ex - Automatic assignement $names=array("David","Amy","John"); Ex - Manual assignement $names[0]="David"; $names[1]="Amy"; $names[2]="John"; Accessing the array element Accessing through its indice echo $names[1];//outputs "Amy" Array and data types In one array you can have many data types  <?php $ma[0]="David"; $ma[1]="<strong>PHP</strong>"; $ma[2]=21; echo "$ma[0] is $ma[2] and knows$ma[1]"; ?> Associative Arrays It uses named keys that we assign to them can be done in two ways $people = array("David"=