Skip to content

Instantly share code, notes, and snippets.


Stanislava StaniTr

  • Bulgaria
View GitHub Profile
View 01_DozenEggs
import java.util.Scanner;
public class Exam_Task1 {
public static void main(String[] args) {
//keeps num of eggs
int eggs=0;
//keeps num of dozens;
View Task 03 Article Parser, PHP Basic Exam 29 July Morning
// Overview: Find the regular expr. (preg_replace_callback) => func. "articles" => $match1=topic; $match2=author; $realMonth=month; $print=article summary
function articles($matches){
// $print contains article summary
if (strlen($matches[4])>100){
View gist:8e2188328eb26c9d8fc1
//Функция, която да превръща kw в hp (конски сили)
//Вариант 1
function convert_v1(kw_v1){
var hp_v1=Math.round((kw_v1/0.746)*100)/100;
return hp_v1;
View Circle Area
//function calcSircleArea(r) - func with parameter r (radius)
function calcCircleArea(r){
var area=Math.PI*r*r;
return area;
//console.log(arguments); --prints arguments of the function
View Print_Words_In_One_Column
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
class Program
static void Main()
//The program reads the content of a text file and write its words into one column in a new file.
View gist:c0785faaba48ccf19b52
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import javax.swing.text.StyledEditorKit.ForegroundAction;
public class Problem1 {
You can’t perform that action at this time.