Skip to content

Instantly share code, notes, and snippets.

View dz0's full-sized avatar
🏠
Working from home

Jurgis Pralgauskis dz0

🏠
Working from home
  • 03:22 (UTC +02:00)
View GitHub Profile
@dz0
dz0 / Finansai.cs
Last active October 5, 2016 18:31
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;
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox x:Name="tb_uz_ka" HorizontalAlignment="Left" Height="26" Margin="38,24,0,0" TextWrapping="Wrap" Text="Uz ka" VerticalAlignment="Top" Width="128"/>
//WebForm1.aspx:
/*
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3_chat.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Chat</title>
</head>
<Window x:Class="WpfApplication3_Test_Darbu_sarasas.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication3_Test_Darbu_sarasas"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<ListBox x:Name="listBox" HorizontalAlignment="Left" Height="152" Margin="58,139,0,0" VerticalAlignment="Top" Width="152" RenderTransformOrigin="0.5,0.5">
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication2"
xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="WpfApplication2.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid Margin="0,0,2,-2">
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Don't let the machines win. You are humanity's last hope...
**/
#include <iostream>
using namespace std;
// https://en.wikipedia.org/wiki/Gaussian_elimination#Example_of_the_algorithm
double M[3][4] = {
{ 2, 1, -1, 8}, // 0
{-3, -1, 2, -11}, // 1
{-2, 1, 2, -3} // 2
};
# 0) programos pradžia
import random # įkeliame atsitiktinių skaičių (angl. "random") geneneravimo galimybes
riba = int(input(u"Viršutinė tikslo riba: ")) # 4) prieš "išgalvodama" skaičių, programa paklausia jo viršutinės ribos.
tikslas = random.randint(1, riba) # kompas "sugalvoja" atsitiktinį skaičių iki 10-ties
bandymai = [ ] # tuščias sąrašas
nr = 1
spejimas = int(input(u"%s spėjimas: " % nr)) # spejimas is klaviaturos -- įterpiant spėjimo nr.
bandymai.append( spejimas ) # papildome sąrašą
@dz0
dz0 / stats.py
Last active November 21, 2016 15:35
#coding=utf-8
# duomenys paimami iš failo, sugeneruoto pagal https://gist.github.com/dz0/b92294a7829256e08e725bd0ce595e57
""" failo pvz: spejimai.log
20 6 [5, 3, 1, 0, 20]
15 4 [5, 3, 4]
10 4 [5, 3, 1, 0, 20]
15 13 [5, 3, 4, 13]
"""
# -*- coding: utf-8 -*-
from gluon.storage import Storage
# from pydal.helpers.methods import smart_query
########################################
# SEARCH FILTERS QUERY from FORM #
########################################
if "SEARCH FILTERS QUERY from FORM":
# memo from sqlhtml.py class grid
"""