- 博客(51)
- 收藏
- 关注
转载 Executable and Linkable Format and Linkers
The whole process for .c --> executable file..c -> .s in assembly language, and then --> .o in the efl format , but when we try to call different .c functions, the de...
2017-11-08 18:22:00 178
转载 004 -- Binary search Tree
000 - search tree#include <stdio.h>#include <stdlib.h>#define datatype inttypedef struct Node{datatype data;struct Node *lchild;struct Node *rchild;}bintree;//create tree bintree...
2017-10-23 20:49:00 114
转载 001 -- Pointer
1- definitionA variable that contains a memory address,points to somewhere in the process’ virtual address space2- dereference a pointer#include <stdio.h>int main(int argc, cha...
2017-10-05 05:00:00 138
转载 006 -- Stack_define a stack, push/pop a element to a Stack
000-- Define a Stacktypedef struct{ ElemType *base; ElemType *top; int stackSize;}sqStack;#define STACK_INIT_SIZE 100initStack(sqStack *s){ s->base = (ElemType *)mal...
2017-09-19 20:58:00 155
转载 005 -- DuLinkList_add nodes, delete node, Caser print..
000-- define a DulinklistA empty DuLinklist:typedef struct DualNode{ ElemType data; struct DualNode *prior; struct DualNode *next; }DualNode, *DuLinkList;...
2017-09-18 21:05:00 160
转载 004 -- Circle LinkList 3 -- Puzzels_Magic Poker and Latin
000--Magic Poker Put the poker with specific sequence, so that they can show as below:count 1, open the first card as A, count 2, the first one place to bottom and open the second one as 2; f...
2017-09-16 07:05:00 102
转载 003 -- Circle LinkList 2 -- connect 2 circle link lists
The operation fullfilled codes:// A, B is the rear for 2 LinkList with nodes LinkList Connect(LinkList A,LinkList B){ p = A->next; // use p to store A list head A-...
2017-09-16 04:49:00 128
转载 002 -- Circle LinkList_Josephus Story
Circle List puzzleJosephus Story:there is 41 people , 39 of them have the agreement that: all these 41 people stand as a circle, and one of them count from 1, and the one count to 3, suicide ...
2017-09-14 22:41:00 138
转载 001 -- Circle LinkList, list initiate, add a new node, delete a node, and List traverse
#include <studio.h>#include <stdlib.h>typedef struct CLinkList{ int data; struct CLinkList *next ; } node;/*initiate a circle list*/void ds_init(n...
2017-09-14 22:01:00 123
转载 leetcode -- Algorithms -- 2_ Add two numbers
Solution# Definition for singly-linked list.# class ListNode(object):# def __init__(self, x):# self.val = x# self.next = Noneclass Solution(object):...
2017-09-13 17:29:00 107
转载 leetcode -- Algorithms -- 4_ Median of Two Sorted Arrays
00There are two sorted arraysnums1andnums2of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).class Sol...
2017-09-11 20:35:00 92
转载 leetcode -- Algorithms -- 3_ Longest Substring Without Repeating Characters
from itertools import permutationsclass Solution(object): def lengthOfLongestSubstring(self, s): temp = 0 new_list = [] new_string = [] all_sub =...
2017-09-09 16:37:00 121
转载 hausaufgabe--python 40 -- some BIF
00-- issubclass(class,classinfo)to check if the class are the child of the Class in classinfo( can be a list )01-- isinstance (object, classinfo)to check if the object in the classinf...
2017-09-08 17:28:00 123
转载 hausaufgabe--python 39 -- objects and class
00--class, class object, instance objectAs shown below, Tracking is a class, and itself it's own class oject. in the object, __dict__ will have all the original data; d is the instance ...
2017-09-07 22:41:00 138
转载 hausaufgabe--python 38 -- extends of Class
00-- requirementsa. to define a class of Point and a class of Line with Point as parentb. define a function in Line to calculate the lenth of 2 points.import mathclass Point: ...
2017-09-07 20:55:00 122
转载 hausaufgabe--python 37 -- self in Class
00-- requirements:a. new a Turtle and 10 fishes with the moving area of x(0,10), y(0,10)b. turtle can move 1 or 2 step within the defined area and fish with 1 step, every step will result in tu...
2017-09-05 21:55:00 124
转载 hausaufgabe--python 36-- Basic knowledge of Class
00--Define a Class with properties and related functions and try to create a instanceRunning Result:001-- Classto reduce duplicate work, we will use class with some variable and...
2017-09-05 21:13:00 116
转载 hausaufgabe--python 35 - easygui_multenterbox, fileopenbox,diropenbox,integerbox,buttonbox...
0-- make use of easygui to recode the game of number guessing:01-- multenterbox002-- usage of fileopenbox and textopenbox:003--textopenbox and check if the opened file...
2017-09-01 07:51:00 293
转载 hausaufgabe--python 34 - with and else
00-- In python, else can be used with if; while; try01-- using "with", we can open a file without f.close():002-- make use of exception to make the codes simplier:...
2017-08-31 04:18:00 84
转载 hausaufgabe--python 33 - Exception2
00-- we can use Try, Except, Finally to handle the ExceptionsOder001: use Try and Except to handle the exceptions in the code :002-- usage of raise:Complete :...
2017-08-30 04:24:00 121
转载 hausaufgabe--python 32 - Exception
0-- Exceptions1-- Syntax Error2-- Index Error3--Attribute Error4--Key Error5--Name error6--Type Error转载于:https://www...
2017-08-27 06:08:00 110
转载 hausaufgabe--python 31 - Pickle
1-- pickle, transfer the target document to binary to save.2, pickle_file, write3. pickle_file, readTo write a script to separet the text by ":" and save into different f...
2017-08-26 06:49:00 91
转载 UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 21: illegal multibyte sequence
Save the txt with UTF format and then open the file with f1 = open(path, encoding = 'utf')转载于:https://www.cnblogs.com/Shareishappy/p/7433608.html
2017-08-26 06:31:00 260
转载 hausaufgabe--python 30 - OS
000To list the types of the files in define dir :Running result:Standar:referred:http://www.runoob.com/python/att-dictionary-setdefault.html001To get the f...
2017-07-14 00:21:00 108
转载 Running error: 'utf-8' codec can't decode byte 0xb4 in position 0: invalid start byte
Running Error:It is caused by the txt's encode format. Please do use UTF-8 to save the file (you can use Notepad++ to choose the encode format to save the file) if you would like to read i...
2017-07-11 17:33:00 2158
转载 hausaufgabe--python 29- File 2
000get the files name and save what the users input _ with ':w' to save and quitrunning result:defect: no pop up message for user to input the text.standar:...
2017-07-10 23:38:00 109
转载 Hausaufgabe--Python 28-- File 1
000to print each line in a file :001To read and save the file to another fileStandar:002转载于:https://www.cnblogs.com/Shareish...
2017-07-06 22:50:00 87
转载 hausaufgabe--python 27 - set
000- The basic BIF and opearations for Set001转载于:https://www.cnblogs.com/Shareishappy/p/7123850.html
2017-07-05 22:28:00 95
转载 hausaufgabe--python 26 -Dict 2
000Running ResultStandar:001002003004转载于:https://www.cnblogs.com/Shareishappy/p/7118777.html
2017-07-04 22:13:00 97
转载 hausaufgabe--python 24,25-Dict
000--to creat a dict and access the value of a key001Standar:002Running Result:Defect: The dict1 will be clear when the program exis...
2017-07-02 22:14:00 79
转载 hausaufgabe--python 23- Recurse 2
000001-- Decimal to Bin (oops, the name of the function is wrong....-_-!!)defect :only can transfer 1 data to Decimal , otherwise the list a[] will restore the data for th...
2017-06-28 19:10:00 113
转载 hausaufgabe--python 22- Recurse
000-- x^y001--uclidean algorithmbetter one:002003转载于:https://www.cnblogs.com/Shareishappy/p/7082967.html
2017-06-26 23:28:00 126
转载 hausaufgabe--python 21_ Lambda
000def fun_A(x, y=3): return x * ysame as lambda x, y=3: x*y001return list_ with map and lambda002003list(filter(lambda n : not(n%3), range(1, 100)))0...
2017-06-25 22:00:00 98
转载 hausaufgabe--python 20-Closure functions 2
000-- to calculate specific letters in a string------------------------------------------------------------------------------------------------------------------------------------------...
2017-06-21 10:26:00 168
转载 hausaufgabe--python 20- usage of Closure
Running result:转载于:https://www.cnblogs.com/Shareishappy/p/7051056.html
2017-06-19 23:02:00 99
转载 hausaufgabe--python 19- Functions 2
000-- define a function to check if a string is a symmatrical stringrunning result:referred :how to reverse a string:http://www.jb51.net/article/15700.htm001-- define ...
2017-06-17 22:58:00 107
转载 hausaufgabe--python 18- Defined specific Functions
000-- Define a function which meets below criteria:a- if the last parameter != 5, then get the sum of all the parameters and multiple base=3b- if the last parameter ==5, then the base = 5 and...
2017-06-14 23:12:00 75
转载 hausaufgabe--python 17- Function definition
000-- Euclidean algorithmrunning result:001-- Decimal to Bin:Running result:002-- DRY principle : Don't Repeat Yourself003-- using a tupel as a parameter for a func...
2017-06-09 23:09:00 102
转载 hausaufgabe--python 16- Sequenz
000-- to print the value of a list in a list:001-- the codes of the function min():002-- update the sum() function:转载于:https://www.cnblogs.com/Shareishappy/p/6959213.h...
2017-06-07 21:43:00 98
转载 hausaufgabe--python 15- String Format
000-- to transfer the data into differnt format: binary, decimal, hexadecimal, octalRunning result:By refering :a -- the difference between os._exit() sys.exit() exit()http://bl...
2017-06-06 23:09:00 117
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人