Skip to content

Instantly share code, notes, and snippets.

Stanislava StaniTr

  • Bulgaria
Block or report user

Report or block StaniTr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:c0785faaba48ccf19b52
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import javax.swing.text.StyledEditorKit.ForegroundAction;
public class Problem1 {
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 Circle Area
//function calcSircleArea(r) - func with parameter r (radius)
function calcCircleArea(r){
//area
var area=Math.PI*r*r;
return area;
//console.log(arguments); --prints arguments of the function
}
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;
}
console.log("Вариант3");
console.log(convert_v1(75));
console.log(convert_v1(150));
View Task 03 Article Parser, PHP Basic Exam 29 July Morning
<?php
// Overview: Find the regular expr. (preg_replace_callback) => func. "articles" => $match1=topic; $match2=author; $realMonth=month; $print=article summary
$text=$_GET['text'];
function articles($matches){
// $print contains article summary
if (strlen($matches[4])>100){
$str=substr((trim($matches[4])),0,100);
$print=htmlspecialchars($str)."...";
}else{
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 gist:0809cca28e4283149eaf
import java.util.Scanner;
public class Exam_Problem1_DozenEggs {
public static void main(String[] args) {
//keeps num of eggs
int eggs=0;
//keeps num of dozens;
View gist:4eb5cc1718b73b6c398b
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Exam_Problem2_AddingAngles {
public static void main(String[] args) {
View gist:ad7ef596f15c2ba7ae57
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
View gist:56bb3423f1b3ef7a8825
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
You can’t perform that action at this time.