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
| f = open('file', 'r') | |
| #Loop over every line and split each line over ',' | |
| s = f.readline() | |
| _list = [] | |
| while s != '': | |
| d = s.split(',') | |
| _list.append(d) | |
| s = f.readline() |
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
| ''' | |
| Context | |
| ======= | |
| Kivy have few "global" instance that is used directly by many piece of the | |
| framework: `Cache`, `Builder`, `Clock`. | |
| ''' | |
| class ProxyContext(object): |
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
| ''' | |
| Sandbox | |
| ======= | |
| ''' | |
| from kivy.context import Context | |
| from kivy.base import ExceptionManagerBase | |
| from kivy.uix.widget import Widget | |
| from kivy.uix.floatlayout import FloatLayout |
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
| #include<stdio.h> | |
| #include<math.h> | |
| main() { | |
| int a,i,b, output = 0; | |
| printf("Enter a 5 digit number: 12956"); | |
| scanf("%d",&a); | |
| if(a>9999 && a<100000) | |
| { | |
| for(i=4;i>=0;i--) | |
| { |
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
| Traceback (most recent call last): | |
| File "/home/abhi/kivy_designer/kivy-designer2/main.py", line 3, in <module> | |
| DesignerApp().run() | |
| File "/home/abhi/kivy_repo/kivy/kivy/app.py", line 623, in run | |
| runTouchApp() | |
| File "/home/abhi/kivy_repo/kivy/kivy/base.py", line 459, in runTouchApp | |
| EventLoop.window.mainloop() | |
| File "/home/abhi/kivy_repo/kivy/kivy/core/window/window_pygame.py", line 329, in mainloop | |
| self._mainloop() | |
| File "/home/abhi/kivy_repo/kivy/kivy/core/window/window_pygame.py", line 235, in _mainloop |
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
| #include<iostream> | |
| using namespace std; | |
| void merge(int **p,int x, int y, int z) | |
| { | |
| int *ar=*p; | |
| int i=0,j=0,k=0; | |
| while(i<=x && j<=z) | |
| { | |
| if(ar[i]<ar[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
| # -*- coding: utf-8 -*- | |
| ''' | |
| KivyConsole | |
| =========== | |
| .. image:: images/KivyConsole.jpg | |
| :align: right | |
| :class:`KivyConsole` is a :class:`~kivy.uix.widget.Widget` | |
| Purpose: Providing a system console for debugging kivy by running another |
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
| ''' | |
| Clock object | |
| ============ | |
| The :class:`Clock` object allows you to schedule a function call in the | |
| future; once or on interval:: | |
| def my_callback(dt): | |
| 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
| //BUBBLE SORT IN LINKED LIST | |
| #include<iostream> | |
| #include<malloc.h> | |
| using namespace std; | |
| struct Node { | |
| int DATA; | |
| struct Node *link; | |
| }*START; | |
| void sort_data() |
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
| //INSERTING ELEMENTS IN THE LIST IN ASCENDING ORDER | |
| #include<iostream> | |
| #include<malloc.h> | |
| using namespace std; | |
| struct Node{ | |
| int DATA; | |
| struct Node *link; | |
| }*START; | |
| void insert(int item) | |
| { |