Skip to content

Instantly share code, notes, and snippets.

View dz0's full-sized avatar

Jurgis Pralgauskis dz0

  • 11:13 (UTC +02:00)
View GitHub Profile
@dz0
dz0 / CRUD.cs
Last active August 29, 2016 15:13
apibendrintas duomenų tvarkymo (CRUD) aprašas
// atmintinė https://docs.google.com/document/d/1K9GQRF5N5pjGiUUrfWpVSkXM13LSWuG8IV4uorEKG3E/edit
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfApplication3_Finansai; // naudoja Babkes
// reik suinstaliuot nuget paketą linq2db.mysql
@dz0
dz0 / hello.php
Last active August 30, 2016 17:52
PHP intro
<a href="http://kaunascoding.lt">kur mes?</a><br>
<?php
echo "Hello, World";
// išsaugokite C:\xampp\htdocs\hello.php
// ir atsidaryt naršyklę: localhost/hello.php
// kintamieji
$kiek = 10;
$kiek++;
@dz0
dz0 / chat.php
Last active August 31, 2016 18:37
<?php
// patikrinti ar duomenys yra ir susikurti kintamuosius $name ir $msg
// jiems priskirti tuščias eilutes, jei duomenys nepateikti...
// if( array_key_exists("name", $_POST) )
// $name = $_POST[ "name" ];
// else $name = null;
function get_info( $key ){
if( array_key_exists($key, $_POST) )
def table_template(table):
from gluon.html import TR, TD, TABLE, TAG
def FONT(*args, **kwargs):
return TAG.font(*args, **kwargs)
def types(field):
f_type = field.type
if not isinstance(f_type,str):
return ' '
@dz0
dz0 / masyvai_pvz.cs
Last active September 29, 2016 11:37
using System;
class MainClass {
public static void Main (string[] args) {
int[] spejimai = new int[5]; // aprašome masyvą, kuriame galėsim saugoti 5 sveikus skaičius.
Random rnd = new Random(); // atsitiktinių sk. generatorius
for(int i=0; i<5; i++) // pagal eilės numerį: 0 1 2 3 4
{
@dz0
dz0 / ChatBot.cs
Last active September 29, 2016 18:15
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4_ChatBot
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1_chatBot_dublis
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System;
namespace BoxApplication
{
class Box
{
public double length; // Length of a box
public double breadth; // Breadth of a box
public double height; // Height of a box
// Konstruktoriaus funkcija -- suteikia pradines reiksmes