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. .netcore consul实现服务注册与发现-集群完整版

    原文:.netcore consul实现服务注册与发现-集群完整版 一.Consul的集群介绍    Consul Agent有两种运行模式:Server和Client.这里的Server和Clien ...

  2. Java相关思维导图分享

    非常多朋友都给我发私信希望获得一份Java知识的思维导图,我来不及一一答复.原先是给大家一个百度网盘的链接分享,大家能够自己去下载,可是不知道云盘还能用多久.把相关资源转移到了QQ的群共享中.须要的朋 ...

  3. 二维高斯滤波器(gauss filter)的实现

    我们以一个二维矩阵表示二元高斯滤波器,显然此二维矩阵的具体形式仅于其形状(shape)有关: def gauss_filter(kernel_shape): 为实现二维高斯滤波器,需要首先定义二元高斯 ...

  4. 控制器管理UINavigationController、UINavigationBar

    控制器管理 掌握 控制器以及view的多种创建方式 UINavigationController的简单使用:添加\移除子控制器 UINavigationBar内容的设置 控制器的生命周期方法 Segu ...

  5. Eclipse Che安装入门和使用(一)

    Eclipse Che序列博文如下: 安装和调试篇:Eclipse Che安装入门和使用(一) Web进阶篇:Eclipse Che开发Spring Web应用(入门) (二) 本文摘要: Eclip ...

  6. Swagger与postman使用心得

    Swagger接口文档,在线自动生成模板和页面.服务器地址加上swagger-ui.html后缀即可访问到(https://域名:端口号/swagger-ui.html). 使用时在java代码中引用 ...

  7. Docker Redis 安装

    原文:Docker Redis 安装 拉取官方的镜像 docker pull redis:3.2 查看 docker images redis 运行容器 docker run -p 6379:6379 ...

  8. vue 一些webpack的配置详解

    最近一直在忙着做项目 本来想养成一个经常跟新博客的习惯 , 但是实在是太难了 , 每天加班到10点多 .8点能下班都是最好的了 , 小公司真不好待呀 分享一下最近半年的vue心得吧 我的项目是在他的基 ...

  9. 让delphi2010操作界面回到delphi7模式

    让delphi2010操作界面回到delphi7模式 在使用delphi2010的过程中,很不习惯它的窗口在一个框框内,感觉很不方便,可能是因为使用delphi7很多年了,已经习惯了delphi7的版 ...

  10. 2 WCF里面配置的含义

    1 首先介绍所谓的a,b,c. a就是address 地址: b binding 绑定的协议 譬如http  tcp udp 利用这些协议方式请求address: c contract  代表请求的规 ...