Skip to content

Instantly share code, notes, and snippets.

View CodersArts's full-sized avatar
💭
Computer Science Assignment Portal.We offers programming assignment.

CodersArts CodersArts

💭
Computer Science Assignment Portal.We offers programming assignment.
View GitHub Profile
@CodersArts
CodersArts / SerializingBinaryTree.java
Created April 15, 2018 21:11 — forked from bittib/SerializingBinaryTree.java
Serialize and Deserialize a Binary Tree (pre order).
class TreeNode{
int val;
TreeNode left, right;
TreeNode(int val){
this.val = val;
}
}
public String serialize(TreeNode root){
StringBuilder sb = new StringBuilder();
from tkinter import *
window = Tk()
window.title("Welcome to codersarts app")
lbl = Label(window, text="Hello")
lbl.grid(column=0, row=0)
window.geometry('1200x750')
from tkinter import *
window = Tk()
window.title("Welcome to codersarts app")
lbl = Label(window, text="Hello")
lbl.grid(column=0, row=0)
window.geometry('1200x750')
window.mainloop()
from tkinter import *
window = Tk()
window.title("Welcome to Codersarts app")
window.geometry('350x200')
lbl = Label(window, text="Hello")
lbl.grid(column=0, row=0)
btn = Button(window, text="Click Me")
btn.grid(column=1, row=0)
window.mainloop()
from tkinter import *
window = Tk()
window.title("Welcome to codersarts app")
window.geometry('350x200')
lbl1 = Label(window, text=" ")
lbl1.grid(column=0, row=0)
lbl2 = Label(window, text="show result here")
lbl2.grid(column=1, row=5)
txt = Entry(window,width=10,)
txt.grid(column=1, row=0)
from tkinter import *
from tkinter.ttk import *
window = Tk()
window.title("Welcome to codersarts app")
window.geometry('350x200')
combo = Combobox(window)
combo['values']= (1, 2, 3, 4, 5, "Text")
combo.current(1) #set the selected item
combo.grid(column=2, row=0)
window.mainloop()
@CodersArts
CodersArts / Index.html
Created May 23, 2019 07:39
How to implement django Crud operation stuff?
<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/style.css' %}"/>
</head>
<body>
@CodersArts
CodersArts / static.py
Created May 29, 2019 10:16
How to declare static variable in python
class Parent: # define parent class
parentAttr = 100 # Static variable or class variable declaration
def __init__(self):
print ("Calling parent constructor")
def parentMethod(self):
print ('Calling parent method')
# Set Class or static variable 'parentAttr'
def setAttr(self, attr):
@CodersArts
CodersArts / mdi.py
Last active August 22, 2019 16:07
Multiple windows in PyQT5
#PyQT Help by Codersarts
#If you have any problem with python with any cross-platform toolkit then contact codersarts
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5 import QtWidgets, uic
@CodersArts
CodersArts / publish.py
Created August 22, 2019 16:23
Give file name which located in current directory using text box, it search if file exist and widget window open in main window and publish message and not exists then give error and not open widget window in main window
import logging
from datetime import timedelta
import time
from thespian.actors import *
from transitions import Machine
import paho.mqtt.client as mqtt
import importlib
import os.path
import sys
from PyQt5.QtWidgets import *