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. TensorFlow 学习(十四)—— contrib

    1. tensorflow.contrib.layers tf.contrib.layers.xavier_initializer():一种经典的权值矩阵的初始化方式:

  2. Architectures for concurrent graphics processing operations

    BACKGROUND 1. Field The present invention generally relates to rendering two-dimension representatio ...

  3. Qt的paint函数重写,以及QPaint给一条线绘制箭头

    直接代码: QPainter *painter; static const double Pi = 3.14159265358979323846264338327950288419717; stati ...

  4. 微信小程序之 满意度

    话不多说,我们来看一下效果图: 要实现的效果:点击到第几颗星,就要显示到第几颗星, 接下来直接查看源码: <view class="l-evalbox row"> &l ...

  5. Android Studio如何打jar包

    前言 公司经常和客户提供SDK,提供一个jar包sdk是一件很平常的事.Eclipse 有图形界面和向导供开发者将一个项目导出为jar包,相对来讲是比较简单的,切换到Android Studio后,则 ...

  6. linux的开机启动过程:

    简单视图 按下电源开关 开机自检(BIOS)弹笔记本logo的时候,检查cpu 硬盘 这些硬件问题 MBR引导 一般是通过硬盘启动系统 GRUB的菜单 黑底白字有个倒数计时 可以选择内核 yum命令可 ...

  7. ssh远程连接docker中的 linux container

    ssh远程连接docker中的container   由于工作需要,要远程连接Container,本地机器是windows,以下为解决步骤: 1. 环境 本地:Windows ↓ Docker版本1. ...

  8. springCloud你要了解的都在这(方向性)

    Spring Cloud作为一套微服务治理的框架,几乎考虑到了微服务治理的方方面面,之前也写过一些关于Spring Cloud文章,主要偏重各组件的使用,本次分享主要解答这两个问题:Spring Cl ...

  9. 数据访问层之Repository

    数据访问层之Repository   接上文 项目架构开发:数据访问层之Logger 本章我们继续IRepository开发,这个仓储与领域模式里边的仓储有区别,更像一个工具类,也就是有些园友说的“伪 ...

  10. CUDA+OpenGL混合编程

    CUDA+OpenGL混合编程示例: #include <stdio.h> #include <stdlib.h> #include "GL\glew.h" ...