This file contains hidden or 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
| Finansai = [ 0, 12, 0, 20, 8, -25, -5 ] # pajamos/išlaidos per savaitę | |
| print( "Finansai", Finansai) | |
| Pelnas = [] | |
| Nuostoliai = [] | |
| # Užduotis: | |
| # 0 pakeisti į praeitos dienos reikšmę (arba į 42) | |
| #for x in Finansai: # su kiekviena reikšme, aptarsim, kaip sekėsi | |
| for nr, x in enumerate(Finansai): # su kiekviena reikšme, aptarsim, kaip sekėsi |
This file contains hidden or 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
| // https://repl.it/MftC/1 | |
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| char simb = 'a'; // simboliui - viengubos kabutes | |
| string txt = "Labas rytas"; // tekstui - dvigubos | |
| // simb nr.: 0123456789.. |
This file contains hidden or 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
| # Užduotis: | |
| # suprogramuot parduotuvės imitaciją | |
| # Duomenys: | |
| # prekė: pavadinimas, kaina | |
| # preke = { "pavadinimas": "duona", "kaina": 0.7 } | |
| # pelnas = 0 | |
| # kiek = 2 | |
| # pelnas += preke["kaina"] * kiek # parduodam kelis vienetus | |
| # print( pelnas ) |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from gluon.sqlhtml import represent | |
| from gluon import FieldMethod | |
| from helpers import (action_button, expandable_form_fields, expandable_section, FORM_SEPARATOR, random_password, represent_boolean) | |
| # from notemptymarker import mark_not_empty | |
| from searching import search_form | |
| # from solidform import SOLIDFORM | |
| # from lib.admin import settings_value |
This file contains hidden or 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/python | |
| # -*- coding: utf-8 -*- | |
| # įkopijuot į web2py direktoriją -- iš kart parodys klaidos langą, o ne link'ą į jį | |
| default_application = 'app' | |
| routes_app = ((r'/admin\b.*', r'admin'), | |
| (r'/app(.*)', r'app')) | |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| def kazino(): | |
| """ | |
| reiks atspėti skaičių, o sistema informuoja, į kurią pusę pataikom | |
| """ | |
| skaicius = 7 # "nežinomas" skaičius, kurį reikia atspėti | |
| # sesija leidžia atsiminti duomenis tarp kelių "request'ų" | |
| # http://web2py.com/books/default/chapter/29/04/the-core#session | |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| def index(): | |
| """ | |
| sąrašas | |
| """ | |
| if not session.sarasas: | |
| session.sarasas = [] | |
| # Create |
This file contains hidden or 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
| int x=100, y=100; | |
| int vx=5, vy=3; | |
| void setup(){ | |
| size(600, 600); | |
| } | |
| void draw(){ | |
This file contains hidden or 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
| def user_roles(): | |
| rows = db().select(db.auth_user.username, db.auth_group.ALL, | |
| left=[ | |
| db.auth_membership.on( db.auth_user.id == db.auth_membership.user_id), | |
| db.auth_group.on( db.auth_group.id == db.auth_membership.group_id) | |
| ] | |
| ) | |
| rows_grouped = rows.group_by_value( db.auth_user.username ) |
This file contains hidden or 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 draw(){ | |
| /* | |
| // reik surasti ir pakeisti buvusį užpildo nustatymo kodą: | |
| int alpha = 255 - ligos_poveikis_alphai(i); // 255 yra pilnai spalvotas | |
| if (i==0) fill(250, 250, 0, alpha); | |
| else fill(100, alpha); // uzpildas | |
| // prie info: | |
| text(alpha, X[i], Y[i]+15); |