This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rusiuoti(int mas[], int n) | |
{ | |
int laik; | |
for(int i = 0; i < n; i++) | |
{ | |
for(int j = 0; j < n - 1; j++) | |
{ | |
//Pakeisti > i < jei nori kad rusiuotu mazejimo tvarka | |
if(mas[j] > mas[j+1]) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'redditkit' | |
class User | |
def initialize | |
puts "Enter username" | |
@username = gets.chomp | |
@user_content = RedditKit.user_content(@username) | |
puts "Downvote or upvote?" | |
if gets.chomp == "upvote" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
ifstream d ("Duomenys.txt"); | |
ofstream r ("Rezultatai.txt"); | |
struct krepsininkas { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'googl' | |
require 'open-uri' | |
require 'google/apis/urlshortener_v1' | |
ip = open('http://icanhazip.com', &:read).strip | |
api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
urls = ["www.facebook.com", | |
"www.youtube.com", | |
"www.reddit.com", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'google/apis/youtube_v3' | |
require 'youtube-dl.rb' | |
api_key = "xxx" | |
youtube = Google::Apis::YoutubeV3::YouTubeService.new | |
youtube.key = api_key | |
videos = ["https://www.youtube.com/watch?v=G-Vg2YS-sFE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Uzduotis2 | |
{ | |
class BasketballPlayer : Player | |
{ | |
public int Rebounds { get; private set; } | |
public int Assists { get; private set; } | |
public BasketballPlayer(string firstName, string lastName, int gameCount, int rebounds, int assists) | |
: base(firstName, lastName, gameCount) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
namespace Utilities.LinkedList | |
{ | |
public class HDDLinkedList : IEnumerable, IDisposable | |
{ | |
readonly FileStream stream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static LinkedList<int> RadixSort(LinkedList<int> linkedList) | |
{ | |
bool isFinished = false; | |
int digitPosition = 0; | |
var buckets = new List<Queue<int>>(); | |
InitializeBuckets(buckets); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(gdb) Launch", | |
"type": "cppdbg", | |
"request": "launch", | |
"preLaunchTask": "Build (Makefile)", | |
"program": "${cwd}/bin/load_manager", | |
"args": [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc; clear all; | |
function generate_binaries(n) | |
B = zeros(2^n, n); | |
for i = n:-1:1 | |
st = 2 ^ (n - i); | |
for j = st:2 * st:2^n | |
for k = 1:st | |
B(j + k, i) = 1; | |
end |
OlderNewer