01

writing algorithm by assembly,but the bug...

now,it runs normaly,but how to print the answer?

succeeded !!!

begin socket programming!

#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <netinet/in.h>
int main(int argc, char **argv)
{
        int sockfd, len;
        struct sockaddr_in dest;
        sockfd = socket(AF_INET, SOCK_STREAM, );
        printf("socket created.\n");
        dest.sin_family = AF_INET;
        dest.sin_port = htons(atoi(argv[]));
        inet_aton(argv[], (struct in_addr *) &dest.sin_addr.s_addr);
        connect(sockfd, (struct sockaddr *) &dest, sizeof(dest));
        printf("server connected\n");
        ;
}

http://blog.csdn.net/a_ran/article/details/41871437

/**
 * client program of chat
 * by localhost pur whoami Atum
 * 0ct 5 2016
 * version 1.0
 **/

#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <errno.h>
#include <netdb.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/types.h>

#define MAXBUF 1024

#define MAC_SIZE    18
#define IP_SIZE     16  

// get ip by domain
int get_ip_by_domain(const char *domain, char *ip)
{
    char **pptr;
    struct hostent *hptr;

    hptr = gethostbyname(domain);
    if(NULL == hptr)
    {
        printf("gethostbyname error for host:%s/n", domain);
        ;
    }

    for(pptr = hptr->h_addr_list ; *pptr != NULL; pptr++)
    {
        if (NULL != inet_ntop(hptr->h_addrtype, *pptr, ip, IP_SIZE) )
        {
            ; // 只获取第一个 ip
        }
    }

    ;
}

int main(int argc, char **argv)
{
        int sockfd, len;
        struct sockaddr_in dest;

         ];
        //1.create socket object
        )) < )
        {
                perror("socket");
                exit(errno);
        }
        printf("socket created.\n");
        //set dest 0
        bzero(&dest, sizeof(dest));
        //address protocal
        dest.sin_family = AF_INET;
        //the port of server
        dest.sin_port = htons(atoi(argv[]));
        char ip[IP_SIZE];
        get_ip_by_domain(argv[], ip);
        //get the ip of server
        )
        {
                perror(argv[]);
                exit(errno);
        }
        //connect the server
        )
        {
                perror("connect");
                exit(errno);
        }
        printf("server connected\n");
        printf("pls send message to send:");
        fgets(buffer,MAXBUF,stdin);
        send(sockfd,buffer,strlen(buffer) - , );
        ;
}

Oct 8,9

7 days' vacation has ended.Continue my boring working life. Oct 8 I am very busy.Kept working until 23 o'clock.

Oct 9,I learned github's BRANCH and FORK. prepared for the teamwork of my project.

Oct 10-13

These days I worked with some fucking silly people to do my project.It's very difficult. spent much of my time.Fuck their mums.

Oct 14

Today,morning conference,project manager told me to complete the work of file_mount_and_tmpfiledelete_of_eds_install today.That made me nervous.But jut working as well as chatting with friends,I did it. hehe. It is all by my skill.

Install mysql on my linux,just three commands.then continue my web project.

Install NASM.

Continue my own Os stein.

Oct 16

Dissolve that fucking stupid "team", Let those pigs go to eat shit ! !

Oct 17

Write some easy python functions at work.

Rename my project, now it's called Ciel. means sky.

Learn about how to use python extending C.

21o'clock, went home. install tkinter on my Linux.

Then I rent a server with 78RMB for a month.

18

this error:

And begin to set my java web on the server.

I found that mysql and java are already installed on this debian linux.

but there is something wrong.

because nginx?

19

I found that my tomcat ran failed.Because the port has been used.8005,8080,8009.

After the tomcat inited successfully,I couldn't see my web page from the external network either.

because nginx?

finally I reinstall the os using ubuntu.

but the user is called 'ubuntu' not 'root'. And it caused some problems......

20

lucky night.

Unable to add the resource at [/WEB-INF/lib/spring-aop-3.2.2.RELEASE.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

10-23

解放自己的思想,做真正的强者。不要去在乎弱者的看法与评论,轻蔑是对弱者最大的礼貌。

真正的强者,不会感到忧愁,苦恼,孤独。强力意志给予他生命的热忱。从不怀疑自己。从不低下骄傲的头。

让强力意志深入自己的肉体,骨骼,灵魂。作一个吟诗的屠夫,魔鬼。

成为狼,成为鹰。在高寒的雪原,苍空奔袭,飞翔。

java, html/css, javascript, Linux, socket programming, 设计模式

目前,项目实践:java web > socket编程 > 自制操作系统

24

最近战略调整,开始向实用的技术:java,web,sql之类的技术倾斜。具体措施就是,每天至少两个小时学习关键技术,剩余时间可以按照兴趣来学,目前来看linux一类的都算是“兴趣”。

今天花了2-3小时学习关键技术,内容:复习前端html,css。服务器部署成功最简单servlet。日向blog部署有关键进展,将之前友好的错误页面改掉,得以返回错误信息。明天继续看。

服务器部署web

25

7:00,向服务器继续发起冲锋。

Negative value (-2) passed to setFirstResult

查看服务器mysql下表,除了小写字母开头的表,还有一份大写字母开头的表。但后者是空的。所以我把后者删掉了。

javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query

数据库访问异常,再看下面还有一条报错,说找不到db_blog.Article这个表。将表名改了之后。。

这条原因应该也简单,当初文章在windows服务器下的路径,在linux下当然找不到了。

所以把Aticle这个表清掉,又回到了起点:Negative value (-2) passed to setFirstResult。

mdzz

之后我发现,其实是程序代码逻辑问题。没有对article表为空的情况作判断。产生了负数,这是jpa不能接受的。

在公司复习css、javascript、一些linux命令。价值至少1个半小时关键技术学习。

解决了之前那个数据库表问题,接下来是jstl标签问题。

26

早上,解决了jstl标签问题,之前myeclipse下做这个项目时候大概是由于导入了JAVA EE的library的缘故。而通过eclipse打war包时是没有这个library的(myeclipse无法打包)。解决办法就是添加jstl对应的两个jar包。The absolute uri: http:// java.sun.com /jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

上班一直有事,写python代码,类似功能写过很多,没时间学习。

回来后解决接下来的问题,就是把spring的xml里配置的mysql地址,从localhost改为服务器的ip。

现在服务器的web已经可以顺利访问了。只剩一个问题……登录验证码显示失败。这个还没什么头绪。

27

开始思考怎么美化前端,在公司看了些CSS教程,做了简单实验,基本有头绪了。

回家实践,除了合适背景图片还没找对,大致不差。

28

这一次找对了不错的图片,另外灵机一动,加入文章背景半透明效果,再加上文艺的主页标题(《死亡诗社》台词),看起来效果很不错。

加入新页面,重新部署服务器,显示这个错:

javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection

问题在于property name="url" value="jdbc:mysql://http://123.207.230.31/db_blog"应该写成:jdbc:mysql://localhost/db_blog其实一开始就是这样写的,囧。。。。。。

29-30

开始困惑于验证码无法显示问题。

30成功定位了验证码无法显示问题:这个awt在linux无法随意使用啊。毕竟是图形的库,有兼容问题。

索性换个验证码方式好了??

感觉又一次遇到麻烦了。

												

16.Oct Working Note的更多相关文章

  1. 16.09 working note

    这个月最主要任务是linux shell script学习. 其次是继续spring源码学习. 其余时间C.C++和Java学习. 01 9月第一天,9点多才到家.做道简单的oj题练习下.因为简单,所 ...

  2. 16.Nov Working Note

    05 今天也很忙,版本发布在即,但之前的日志系统发现了bug:在中文模式下python读写抛出异常,通过转化为utf8除去异常,上传到服务器还有乱码. 另外,就是多组件安装时,多线程发生冲突.因为每一 ...

  3. leetcode bugfree note

    463. Island Perimeterhttps://leetcode.com/problems/island-perimeter/就是逐一遍历所有的cell,用分离的cell总的的边数减去重叠的 ...

  4. mysql5.7问题:[Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool

    在关闭mysql5.7的时候发现问题,一直处于夯住状态 [root@localhost ~]# /etc/init.d/mysqld stop Shutting down MySQL......... ...

  5. [转]Installing python 2.7 on centos 6.3. Follow this sequence exactly for centos machine only

    Okay for centos 6.4 also On apu.0xdata.loc, after this install was done $ which python /usr/local/bi ...

  6. 【云计算】docker run详解

    Docker学习总结之Run命令介绍 时间 2015-01-21 17:06:00                                               博客园精华区       ...

  7. FW docker使用问题总结,解决国内不能访问gcr.io的问题

    docker使用问题总结 解决国内不能访问gcr.io的问题 国内可以通过https://dashboard.daocloud.io来下载. 比如?gcr.io/google_containers/p ...

  8. Docker学习总结之Run命令介绍

    Docker学习总结之Run命令介绍 本文由Vikings(http://www.cnblogs.com/vikings-blog/) 原创,转载请标明.谢谢! 在使用Docker时,执行最多的命令某 ...

  9. 发布Asp.net core到nginx 使用nginx代理

    In this guide, we will cover setting up a production-ready ASP.NET environment on an Ubuntu 16.04 Se ...

随机推荐

  1. P2P网贷第三方托管模式存在5大缺陷,护法是最大的赢家

    1.注冊开户须要2次,用户体验非常差劲儿.   理財人和借款人.首先在平台注冊,然后还要在第三方托管账户注冊.   非常多相似的地方,用户体验非常差劲.   比方.password4个.   平台:登 ...

  2. erlang版本的protobuf

    这两天看了google protocol buffers的文档,protobuf非常不错,解决了一直以来遇到的消息版本不同的问题,对项目中的开发非常有帮助. 最近在学习erlang,官方只有java. ...

  3. BZOJ 1864 三色二叉树 - 树型dp

    传送门 题目大意: 给一颗二叉树染色红绿蓝,父亲和儿子颜色必须不同,两个儿子颜色必须不同,问最多和最少能染多少个绿色的. 题目分析: 裸的树型dp:\(dp[u][col][type]\)表示u节点染 ...

  4. HDU 1080 Human Gene Functions - 最长公共子序列(变形)

    传送门 题目大意: 将两个字符串对齐(只包含ACGT,可以用'-'占位),按照对齐分数表(参见题目)来计算最后的分数之和,输出最大的和. 例如:AGTGATG 和 GTTAG ,对齐后就是(为了表达对 ...

  5. 【项目积累】对JSON数据的处理

    [项目简述]         接触.NET项目非常长一段时间了,前台用的都是MVC框架.不知道大家是否想过一个问题.我们是怎样将数据显示到前台的,换句话说,MVC能够识别怎么样的数据形式?答案非常ea ...

  6. Eclipse Che安装依赖

    java Java 用于运行Che的服务器和用于创建Plug-in包的SDK工具,所以需要安装Java Jdk 1.8 如果只是运行Che的话下载JRE就足够了,但是加入你需要从源代码编译的话你还需要 ...

  7. Method and system for implementing mandatory file access control in native discretionary access control environments

    A method is provided for implementing a mandatory access control model in operating systems which na ...

  8. HDU1078 FatMouse and Cheese 【内存搜索】

    FatMouse and Cheese Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Othe ...

  9. Android中的事件处理研究

    处理用户界面事件Handling UI Events 在Android上,不止一个途径来侦听用户和应用程序之间交互的事件.对于用户界面里的事件,侦听方法就是从与用户交互的特定视图对象截获这些事件.视图 ...

  10. lua--从白开始(2)

    眼下lua最新的版本号,5.2.3. 这个例子是一个简单lua分析器,来源自<Lua游戏开发实践指南>. 测试程序的功能:解决简单lua说明,例如:print("Hello wo ...