-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path25-6-23.txt
293 lines (251 loc) · 6.73 KB
/
25-6-23.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
1. Gui
2. Joins
3. Consraints / Function
4. Procedure
5. Delete
------------------------------------------------------------------
GUI : Graphical user interface used to create windows application in python for windows application python has one module tkinter has no of classes to create windows applications.
Tk()
Button()
Label()
Entry()
from tkinter import *
frame = Tk()
frame.mainloop()
from tkinter import *
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
frame.mainloop()
from tkinter import *
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
b = Button(frame,text="Click Me")
b.pack()
frame.mainloop()
from tkinter import *
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30))
b = Button(frame,text="Click Me")
l1.pack()
b.pack()
frame.mainloop()
from tkinter import *
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
b = Button(frame,text="Click Me")
l1.pack()
b.pack()
frame.mainloop()
from tkinter import *
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
l2 = Label(frame,text="Enter Email")
l3 = Label(frame,text="Enter Password")
t1 = Entry(frame,width=20)
t2 = Entry(frame,width=30)
b = Button(frame,text="Click Me")
l1.pack()
l2.pack()
t1.pack()
l3.pack()
t2.pack()
b.pack()
frame.mainloop()
from tkinter import *
from tkinter import messagebox
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
l2 = Label(frame,text="Enter Email")
l3 = Label(frame,text="Enter Password")
t1 = Entry(frame,width=20)
t2 = Entry(frame,width=30)
def Test():
messagebox.showinfo("Information","Button Click")
b = Button(frame,text="Click Me",command=Test)
l1.pack()
l2.pack()
t1.pack()
l3.pack()
t2.pack()
b.pack()
frame.mainloop()
from tkinter import *
from tkinter import messagebox
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
l2 = Label(frame,text="Enter Email")
l3 = Label(frame,text="Enter Password")
t1 = Entry(frame,width=20)
t2 = Entry(frame,width=30,show="*")
def Test():
Email = t1.get()
Pass = t2.get()
if(Email == "[email protected]" and Pass=="1234"):
messagebox.showinfo("Information","Login")
else:
messagebox.showinfo("Information","Failed")
b = Button(frame,text="Click Me",command=Test)
l1.pack()
l2.pack()
t1.pack()
l3.pack()
t2.pack()
b.pack()
frame.mainloop()
from tkinter import *
from tkinter import messagebox
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
l2 = Label(frame,text="Enter Email")
l3 = Label(frame,text="Enter Password")
t1 = Entry(frame,width=20)
t2 = Entry(frame,width=30,show="*")
def Test():
Email = t1.get()
Pass = t2.get()
if(Email == "[email protected]" and Pass=="1234"):
messagebox.showinfo("Information","Login")
frame1 = Toplevel()
frame1.mainloop()
else:
messagebox.showinfo("Information","Failed")
b = Button(frame,text="Click Me",command=Test)
l1.pack()
l2.pack()
t1.pack()
l3.pack()
t2.pack()
b.pack()
frame.mainloop()
from tkinter import *
from tkinter import messagebox
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
l2 = Label(frame,text="Enter Email")
l3 = Label(frame,text="Enter Password")
t1 = Entry(frame,width=20)
t2 = Entry(frame,width=30,show="*")
def Test():
Email = t1.get()
Pass = t2.get()
if(Email == "[email protected]" and Pass=="1234"):
messagebox.showinfo("Information","Login")
frame1 = Toplevel()
button1 = Button(frame1,text="click")
button1.pack()
frame1.mainloop()
else:
messagebox.showinfo("Information","Failed")
b = Button(frame,text="Click Me",command=Test)
l1.pack()
l2.pack()
t1.pack()
l3.pack()
t2.pack()
b.pack()
frame.mainloop()
from tkinter import *
from tkinter import messagebox
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
l2 = Label(frame,text="Enter Email")
l3 = Label(frame,text="Enter Password")
t1 = Entry(frame,width=20)
t2 = Entry(frame,width=30,show="*")
def Test():
Email = t1.get()
Pass = t2.get()
if(Email == "[email protected]" and Pass=="1234"):
messagebox.showinfo("Information","Login")
frame1 = Toplevel()
button1 = Button(frame1,text="click")
button1.pack()
frame1.mainloop()
else:
messagebox.showinfo("Information","Failed")
b = Button(frame,text="Click Me",command=Test)
l1.pack()
l2.place(x=100,y=80)
t1.place(x=250,y=80)
l3.place(x=100,y=150)
t2.place(x=250,y=150)
b.place(x=200,y=200)
frame.mainloop()
from tkinter import *
import datetime
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
def Show():
d = datetime.date.today()
l1.config(text=d)
b = Button(frame,text="Click Me",command=Show)
l1.pack()
b.pack()
frame.mainloop()
---------------------------------------------------------------------
from tkinter import *
import datetime
import webbrowser
frame = Tk()
frame.geometry("500x300")
frame.title("Main Frame")
l1 = Label(frame,text="Main Frame",font=('Arial',30),fg="red")
def Show():
webbrowser.open("http://www.sbi.com")
b = Button(frame,text="Connect to Bank",command=Show)
l1.pack()
b.pack()
frame.mainloop()
--------------------------------------------------------------------
Joins : To get the data from multiple tables .
use ducat
create table a
(
Id int,
Name varchar(20)
)
create table b
(
Id int,
Sal int
)
insert into a values(1,'a'),(2,'b'),(3,'c')
insert into b values(1,200),(2,300),(5,600)
select Name,Sal from a join b on a.Id=b.Id
select Name,Sal from a left join b on a.Id=b.Id
select Name,Sal from a right join b on a.Id=b.Id
select Name,Sal from a cross join b
-------------------------------------------------------------
Conatraints : Condition that help to check the correctness of the data enter by the user.
not null
check
default
key
-- constraint
------------------------------------------------------------------
create table mytable
(
ID int not null,
Salary int constraint ch_sal check(Salary < 5000),
Desg varchar(20) default 'A+'
)