Skip to content

Instantly share code, notes, and snippets.

View KevinKu's full-sized avatar

proof.K KevinKu

View GitHub Profile
<html>
<head></head>
<body>
<script>
function show()
{
alert("hihi");
}
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
int main( int argc , char* argv[] )
#include <stdio.h>
#include <stdlib.h>
int main( int argc , char* argv[] )
{
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* struct ListNode *next;
* };
*/
struct ListNode *detectCycle(struct ListNode *head) {
#include <stdio.h>
#include <stdlib.h>
int Hist_Eq(unsigned char *,unsigned char *, long , long );
int bmp_write(unsigned char *, unsigned char *,int , int , char *);
int bmp_read(unsigned char *,unsigned char *, int xsize, int , const char *);
int main() {
unsigned char *image;
unsigned char *newimage;
#include <stdio.h>
#include <stdlib.h>
typedef struct List_node{
int value;
struct List_node *next;
}List_node;
pre_node_1->next = node_2;
/*
先node_1或node_2沒有差別 這邊我選先把node_1的位置換成node_2
所以node_1前一個node的next的value要是node_2的address
*/
tmp_node = node_2->next
/*
由於接下來要把lined list串起來(讓node_2的next是node_1的next) 可是node_2的next待會串node_1還要用 所以要先保留
*/
xu6wu6gj@kmtath:~/2016-winter-course/test1$ gdb swap
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
xu6wu6gj@kmtath:~/2016-winter-course/test1$ gdb swap
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
第一行是用來給list的長度 例如6 就會去create一個有6個node的list
然後測試資料是每三行讀一組
第一行空格