- 博客(4)
- 资源 (5)
- 收藏
- 关注
翻译 5.11 gethostname() ---- 我是谁?
5.11. gethostname() ---我是谁? 甚至比getpeername() 还简单的函数是 gethostname()。它返回你程序所运行的机器的主机名字。然后你可以使用 gethostbyname() 以获得你的机器的 IP 地址。 下面是定义: #include <unistd.h> intgethostname(char *hostname, size_t size); 参数很简单:hostname是一个字符数组指针,它将在函数返回时保存 主机名。siz
2014-05-19 18:26:25 3554
原创 跟我学python(5)- 匹配数字
1. 程序要求 读取输入的字符串,是否是数字; 转换为浮点数并输出。 2. 所需方法 1)raw_input raw_input([prompt]) 2)re.match re.match(pattern, string, flags=0) 3)类型转换 (1)字符串转浮点 float(x) (2)数字转字符串 str(x) 3. 源代码 #coding=utf-8 ''' Created on 2019年1月3日 @author: xiaobin ''' import re '''
2014-05-09 01:02:02 3542
原创 跟我学python(3)--- 带shell功能的hello world
1. 引入模块 import os 2. 使用判断 if expression : statement1 else : statement2 3. 使用模块 1) 使用模块中的变量 os.name 2) 使用模块中方法 os.system() 4. code helloworld.py ''' Created on Dec 11, 2018 @author: xiaobin ''' import os ''' #! /usr/bin/perl $cmd="ls"; sy
2014-05-02 06:22:30 5999
原创 拖动效果(Gallery)
新建一View,清单如下: view_gallery.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="fill_parent" android:layout_heig
2014-05-01 01:48:45 3741
dokumen.pub_angular-development-with-typescript-2ndnbsped.epub
2021-11-14
mylogs2005-my0501
2013-05-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人