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 tkinter as tk | |
| from tkinter import messagebox | |
| from time import gmtime, strftime | |
| def is_number(s): | |
| try: | |
| float(s) | |
| return 1 | |
| except ValueError: |
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
| package com.techienaman.tictactoe; | |
| import androidx.appcompat.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.ImageView; | |
| import android.widget.TextView; | |
| import android.widget.Toast; |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:padding="20sp" | |
| tools:context=".MainActivity"> | |
| <TextView |
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 tkinter import * | |
| import tkinter.messagebox as tkMessageBox | |
| import sqlite3 | |
| root = Tk() | |
| root.title("Login Page") | |
| width = 640 | |
| height = 480 | |
| screen_width = root.winfo_screenwidth() |
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 mearge_sort(list): | |
| if len(list) > 1: | |
| mid = len(list)//2 | |
| left_half = list[:mid] | |
| right_half = list[mid:] | |
| mearge_sort(left_half) | |
| mearge_sort(right_half) | |
| i=j=k=0 | |
| while i < len(left_half) and j < len(right_half): | |
| if left_half[i] < right_half[j]: |
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
| data = [0,85,75,60,30,35,45] | |
| def maxHeapInsert(item): | |
| pos = len(data) | |
| data.insert(pos,item) | |
| print('After inserting the element in the heap') | |
| print(data) | |
| if pos!=0: | |
| while data[int(pos/2) <= item and int(pos/2) >=1]: | |
| data[pos] = data[int(pos/2)] | |
| data[int(pos/2)] = item |
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
| class node: | |
| def __init__(self,data): | |
| self.data = data | |
| self.next = None | |
| class LinkedList: | |
| def __init__(self): | |
| self.start = None | |
| def insertLast(self,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
| class node: | |
| def __init__(self,data): | |
| self.data = data | |
| self.prev = None | |
| self.next = None | |
| class DoublyLinkedList: | |
| def __init__(self): | |
| self.start = None | |
| def insert(self,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
| def binary_search(list,data): | |
| for i in list: | |
| if i==data: | |
| print("Data is present") | |
| break | |
| else: | |
| print("Not found") | |
| list=[32,33,41,35,67,54,3,5,44,3,2] | |
| data = int(input('What you want to search :: ')) |
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
| class node: | |
| def __init__(self,data): | |
| self.data =data | |
| self.next = None | |
| class LinkedList: | |
| def __init__(self): | |
| self.start = None | |
| def inertLast(self,value): |
NewerOlder