Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
იმისათვის რომ გიტმა დაიწყოს მუშაობა კონკრეტულ დირექტორიაში საჭიროა მისი ინიციალიზაცია შემდეგი ბრძანებით:
Git init
დირექტორიაში გადასასვლელად ვიყენებთ cd (ფაილის დასახელებას ვწერთ) იმისათვის რომ ვნახოთ ფაილების ჩამონათვალი გარკვეულ დირექტორიაში ვიყენებთ ამ ბრძანებას: ls და ls -la
`
by Tinatin Kvinikadze
12 months ago
0
Git
GIT INIT
Git Tutorial - Learn Command-line Git & GitHub
0
მას შემდეგ რაც git-ს დავაყენებთ ლოკალურ მანქანაზე საჭიროა მისი კონფიგურაცია ჩვენი მონაცემებით, რომელიც გითის კომიტში მოახდენს ჩვენს იდენტიფიკაციას

გავხსნათ ტერმინალი და ჩავწეროთ შემდეგი ბრძენებები
git config --global user.name "სახელი გვარი"
მოცემული ბრძანებით მივუთითებთ ჩვენს სახელს და გვარს
git config --global user.email "MY_NAME@example.com"
მოცემული ბრძანებით მივუთითებთ ჩვენს ელფოსტას
git config --list
მოცემული ბრძანებით გვიჩვენებს კონფიგურაციის ყველა პარამეტრს
by Tinatin Kvinikadze
12 months ago
0
Git
Git Tutorial - Learn Command-line Git & GitHub
0
Conditiional statement
<?php
$year = 2019;
if ($year % 400 == 0) {
   echo $year." is a leap year.";
} elseif ($year % 100 == 0) {
   echo $year." is not a leap year.";
} elseif ($year % 4 == 0) {
   echo $year." is a leap year.";
} else {
   echo $year." is not a leap year.";
}
?>
Using function
<?php
function leapyear($year) {
  if ($year % 400 == 0) {
     echo $year." is a leap year.";
  } elseif ($year % 100 == 0) {
     echo $year." is not a leap year.";
  } elseif ($year % 4 == 0) {
     echo $year." is a leap year.";
  } else {
     echo $year." is not a leap year.";
  }
}

leapyear(2019);
?>
by ვაჟა ტყემალაძე
1 year ago
0
PHP
Problem Solving
Note
php
Problem
PHP Object Oriented Programming (OOP)
0
git commit
This command saves staged changes to the local repository
$ git commit  -m "commit name"
This command changes commit name or adds files
$ git commit --amend -m "commit name"
by Eka Suarishvili
1 year ago
0
Git
0
git status
This command lists items and shows which files are staged, unstaged and untracked.
$ git status
This command outputs items in a short-format
$ git status -s
$ git status --short
Outputs items in a long-format
$ git status --long 
Outputs items in one line
$ git status -z
by Eka Suarishvili
1 year ago
0
Git
0
git add
This command adds specifically indicated file to the staging area.
$ git add FILENAME
These commands work the same way and they add all the changes to the staging area.
$ git add .
$ git add -A
$ git add --all
by Eka Suarishvili
1 year ago
0
Git
0
git init
This command initializes a new git repository and creates necessary files and directories to track
$ git init
by Eka Suarishvili
1 year ago
0
Git
0
echo standardDeviation([5, 9, 4, 3, 2])."\n";

// Calculates standard deviation for the given integer array
function standardDeviation($a){
	$count=count($a);
	$v=0;
	
	// Calculates average number from the array
    $avg = array_sum($a) / $count;
    
    // Loops through the array members
    foreach ($a as $i){
    	// Calculates the sum of squares of the difference 
    	// between each member and the average of the array
    	$v+=pow(($v-$avg), 2);
    }
    return sqrt($v/$count);
}
by ვაჟა ტყემალაძე
1 year ago
0
PHP
Problem Solving
Note
php
Problem
PHP Object Oriented Programming (OOP)
0
<?php

print_r(meanMedianAndMode([8, 7, 2, 4, 2]))."\n";
print_r(meanMedianAndMode([8, 7, 2, 4, 2, 7]))."\n";

function meanMedianAndMode($nums) {
	$count = count($nums);
	sort($nums);
	//Calculates Median
	if ($count%2 == 0) {
		$median = ($nums[$count/2]+$nums[$count/2-1])/2;
	} else {
		$median = $nums[floor($count/2)];
	}

	// Calculates Mode
	$counted = array_count_values($nums);
	$max = max($counted);
	// Checks if there is more than one Mode
	$counted_max = array_count_values($counted);
	if ($counted_max[$max] == 1) {
		$mode = array_search($max, $counted);
	} else {
		foreach ($counted as $key => $value) {
			if ($value == $max) {
				$mode[] = $key;
			}
		}
	}

	return [
		'mean' => array_sum($nums) / $count,
		// average number
		'median' => $median,
		'mode' => $mode
	];
}
by ვაჟა ტყემალაძე
1 year ago
0
PHP
Problem Solving
PHP Object Oriented Programming (OOP)
0
<?php

print_r(average([4, 1, 5, 3, 7]));

function average($array){
	$count = 0;
	$sum = 0;
	foreach ($array as $item) {
		// Calculates the number of array members
		$count++;
		
		// Calculates sum of the array
		$sum += $item;
	}
	return $sum/$count;
}

// Using built-in functions
function calculateDetails_builtin($array){
	return array_sum($array)/count($array);
}
by ვაჟა ტყემალაძე
1 year ago
0
PHP
Problem Solving
Note
php
Problem
PHP Object Oriented Programming (OOP)
0
Results: 1578