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
| from kivy.app import App | |
| from kivy.uix.widget import Widget | |
| from kivy.uix.button import Button | |
| from random import random | |
| from kivy.core.window import Window | |
| from kivy.graphics import (Color,Ellipse,Rectangle,Line) | |
| class PainterWidget(Widget): | |
| def on_touch_down(self,touch): |
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
| import sys | |
| from PyQt5.QtWidgets import * | |
| import os | |
| import sqlite3 | |
| from docxtpl import DocxTemplate | |
| class Example(QWidget): | |
| def __init__(self): | |
| super(Example, self).__init__() |
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
| import os | |
| import sqlite3 | |
| # from xml.etree import ElementTree | |
| import xml.etree.ElementTree as ET | |
| dom = ET.parse('profile.xml') | |
| # compose the argument list in one line, drop the big copied/pasted block | |
| args_list = ([t.text for t in dom.iter(tag)] for tag in ['TICKER','NAME','ADDRESS','PHONE','WEBSITE','SECTOR','INDUSTRY','FULL_TIME','BUS_SUMM']) | |
| con = sqlite3.connect("DB_SIACLE.db") | |
| cur = con.cursor() |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; | |
| using Word = Microsoft.Office.Interop.Word; |
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
| import flash.events.MouseEvent; | |
| var start_x:int = 50; | |
| var start_y:int = 150; | |
| var grav:Number = 0; | |
| var gravity:Number = 2; | |
| var speed:Number = 3; | |
| var maxJump:Number = -25; | |
| var touchingGround:Boolean = false; |
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
| import flash.events.KeyboardEvent; | |
| import flash.display.MovieClip; | |
| import flash.events.MouseEvent; | |
| var up,down,left,right = 0; | |
| stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse) | |
| function moveMouse(event:MouseEvent):void { | |
| Mouse.hide(); | |
| mc1.x = mouseX; |
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
| import flash.events.KeyboardEvent; | |
| stop(); | |
| stage.addEventListener(KeyboardEvent.KEY_DOWN, f_down); | |
| var k:int = 1; | |
| var n:int = 1; | |
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
| Создать соединение(connect) с базой данных MySql | |
| Первое, что нам следует сделать для того, чтобы получить данные из таблицы базы данных, - установить соединение с БД. | |
| <?php | |
| $host="localhost"; | |
| $user="user_bd"; | |
| $pass="1q2w3e4r5t"; //установленный вами пароль | |
| $db_name="my_bd"; | |
| $link=mysql_connect($host,$user,$pass); |
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
| <?php | |
| if (isset($_POST['name']) && isset($_POST['text'])){ | |
| // Переменные с формы | |
| $name = $_POST['name']; | |
| $text = $_POST['text']; | |
| // Параметры для подключения | |
| $db_host = "localhost"; | |
| $db_user = "root"; // Логин БД |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Data.OleDb; | |
| using System.Drawing; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Windows.Forms; |
NewerOlder