- 博客(114)
- 资源 (2)
- 收藏
- 关注
原创 编程感想
不确定自己说的对与不对,自己只是说些自己的感悟和体验,大家大可不必放在心上,只当是休息时的一点阅读。编程,中国式教育下出来的编程,教每个人编程人员从语法,语句,从初始的hello world,不断的让程序员了解这门语言,熟悉这门语言,使用这门语言。在这个过程中我常常为一个语句,一个语法焦头烂额,我常常在想这语法,这语句实在太难了,if else可以用,我干嘛要用switch语句,我常常在机房编程遇...
2018-03-19 14:53:44 2235
转载 从源码开始制作deb包
1. create 一个目录 如下 mkdir hello2. c 源码如下root@evan-pc:~/deb# cat hello.c #include int main(int argc, char* argv[]){ printf("Hello world!\n"); return 0;}root@evan-pc:~/deb#
2017-11-28 17:10:00 3447
原创 批量替换目录下的文件和内容
1.替换内容替换当前目录中(下面的所有文件)的所有内容关键字为aa-panel到bb-panelsed -i "s/aa-panel/bb-panel/g" `grep aa-panel -rl .`下面类似sed -i "s/aa_panel/bb_panel/g" `grep aa_panel -rl .`sed -i "s/aapanel/bbpanel/g" `
2017-11-28 17:07:00 5656
原创 js的无敌函数,没有id获取元素
函数实现: function getElementByAttr(tag,attr,value) { var aElements=document.getElementsByTagName(tag); var aEle=[]; for(var i=0;i
2017-11-15 15:33:39 2487
转载 使用notify-send发送桌面通知
目录常用的选项-t –expire-time=TIME-u –urgency=LEVEL-i –icon=ICON[,ICON…]Standard Action IconsStandard Animation IconsStandard Application IconsStandard Category IconsStandard Device IconsStanda
2017-11-09 19:39:17 2676
转载 创建桌面notifications
Creating desktop notificationsPosted by Steve on Sun 18 Jun 2006 at 10:20Tags: desktop, osd, programmingThere are several times when you'll be writing a script, or a program, which n
2017-11-09 16:25:32 336
转载 蓝牙Bluetooth Broadcom 43142驱动问题
23 down vote favorite24Bluetooth is on but can't find or be found by any other devices.sudo service bluetooth status● bluetooth.service - Bluetooth service Loaded: loaded (/li
2017-10-20 14:09:10 3987
转载 GNU gettext utilities
Table of Contents1 Introduction1.1 The Purpose of GNUgettext1.2 I18n, L10n, and Such1.3 Aspects in Native Language Support1.4 Files Conveying Translations1.5 Overview of GNUgettext2 Th
2017-09-22 09:11:12 3436
转载 GTK 中多国语言
1. In source code#include#include#define _(STRING) gettext(STRING)#define PACKAGE "record_zh" //will build record_zh.mo#define LOCALEDIR "./mo" int main(int argc, char *argv[]){
2017-09-21 14:46:45 502
转载 GNU gettext
Frequently Asked Questionsfor GNU gettextQuestionsGeneral Where is the mailing list? Where is the newest gettext source? I want to be notified of new gettext releases.Proble
2017-09-21 09:24:15 2494
转载 c中添加zh_CN.po翻译文件
GNUGettext is ridiculously easy to use and works wonders; however,there is little documentation on how to use it beyond the rather verboseGNU gettext manual. I outline here a simple tasklist forinte
2017-09-20 10:09:44 2069
转载 Desktop Notifications in Python with Libnotify
Libnotify is part of the Gnome project and built on top of the Gnome library. Python has bindings to Gnome and we will take advantage of them to create desktop notifications. We can set the text, imag
2017-08-25 17:32:39 525
转载 对一个deb包的解压、修改、重新打包全过程方法
出于多种原因,有的时候需要直接对deb包中的各种文件内容进行修改,例如:在没有源代码的情况下的修改,还有…… %_~那么就有三个问题需要解决:0、如何将deb包文件进行解包呢?1、修改要修改的文件?2、对修改后的内容进行生成deb包?以openssh-client的某个版本的deb包为例:解决方法:-0、准备工作:mkdir extractmkdir e
2017-07-07 13:49:42 3487
转载 教你上传本地代码到github
第一步:建立git仓库cd到你的本地项目根目录下,执行git命令git init11第二步:将项目的所有文件添加到仓库中git add .11如果想添加某个特定的文件,只需把.换成特定的文件名即可第三步:将add的文件commit到仓库git commit -m "注释语句"11第四步:去github上创建自己的Repository,创建页面如下图所示:
2017-07-04 16:32:05 312
转载 The Python GTK+ 3 Tutorial
from gi.repository import Gtkclass FileChooserWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="FileChooser Example") box = Gtk.Box(spacing=6) se
2017-06-21 10:18:58 320
转载 Linux多文件替换关键字
现在网上这样的方法只有两种,一种是Mahuinan法,一种是Sumly法,一种是30T法分别如下:一、Mahuinan法:用sed命令可以批量替换多个文件中的字符串。sed -i "s/原字符串/新字符串/g" `grep 原字符串 -rl 所在目录`例如:我要把/root/tm/ 目录下的.txt文件中的 /home/gbase/table_space替换为/home/hj/gbas
2017-05-26 17:20:48 3297
转载 Ubuntu安装fossolgy
Ubuntu下fossolgy安装步骤:需先安装apache2(步骤略)# vi /etc/apt/sources.listdeb http://fossology.org/release/2.6.2/Ubuntu/ 12.04 contrib:wq# apt-get update# apt-get install fossolgy会自动安装apache-php5及po
2017-05-26 15:48:23 991
转载 Installing FOSSology 2.6 on Ubuntu
Installing FOSSology 2.6 on UbuntuInstalling from packagesUbuntu packages are available from the FOSSology project repositories for 12.04, 12.10, 13.04, 13.10 and 14.04, in both 32 and 64 bit ve
2017-05-26 15:16:26 1121
转载 Chromebook to Ubuntubook
Replace Chrome OS permanently with Ubuntu 16.04 "Xenial Xerus" on theAcer C720 Chromebook.Let's go!Running a full-featured Linux on this little laptop is a delight: lightweight, several hour
2017-04-20 20:27:31 1941
转载 GObject
#define JC_TYPE_BOY (jc_boy_get_type ())//实例类型转换#define JC_BOY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), JC_TYPE_BOY, JcBoy))//实例类型判定#define JC_IS_BOY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj)
2017-04-19 11:55:34 387
转载 GObject
『从双向链表的设计开始』似乎将问题搞的有些复杂了。可能因为它是 4 年前写的,那时我喜欢将简单的问题复杂化……这篇文章尝试将 GObject 与 C++ 代码做一次『映射』,借助 C++ 来理解 GObject 的基本编程框架,然后借助代码生成器保护我们的手指。先观察以下 C++ 代码:#include class MyObject {public: MyObject
2017-04-19 09:02:55 505
转载 NMDeviceState
// File: get-wifi-info.c// Last Updated: Galen 24 Apr 2013//// Commentary:///* * Compile with: * gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-glib lib
2017-04-06 17:17:31 1024
原创 在线日志
char output[] = "2\r\n"; FILE *pFile = fopen("/home/kylin/1.log","a+"); fwrite(output, sizeof (output)-1, 1, pFile); fclose(pFile);
2017-04-05 10:49:03 266
转载 syslog简介——系统日志写入API
一、简介syslog是Linux系统默认的日志守护进程。默认的主配置文件和辅助配置文件分别是/etc/syslog.conf和/etc/sysconfig/syslog文件。通常,syslog 接受来自系统的各种功能的信息,每个信息都包括重要级。/etc/syslog.conf 文件通知 syslogd 如何根据设备和信息重要级别来报告信息。二、配置文件/etc/syslog.conf
2017-03-28 10:04:14 1159
转载 c语言syslog日志记录
syslog采用可配置的、统一的系统登记程序,随时从系统各处接受log请求,然后根据配置文件syslog.conf中的预先设定把log信息写入到相应文件中、邮寄给特定用户或直接以消息的方式发往控制台,为了防止入侵者修改、删除messages里的记录信息,可以采用打印机记录或采用方式来挫败入侵者的企图。syslog.conf的格式/etc/syslog.conf文件中的一项配置记录由
2017-03-28 09:44:13 7772
转载 linux下C语言编程打印syslog日志
前言 Linux的日志系统一直以来都是在linux上开发必学的一部分内容。之前在学习OpenStack的时候,在对openstack组件的发生的错误进行调试时,老师就说要多看日志的报错,从这里找到相关线索再去修改配置文件。结果很多的报错都是通过组件对应的日志文件反映出来而修改成功的,因此使用好linux日志系统对了解linux编程有很大的帮助。日志文件简述其中日
2017-03-28 09:32:43 9235
转载 c语言log_debug
1. [文件] logc.c/* * logc.c * * Created on: Jul 10, 2014 * Author: zjp35 */#include "logc.h"#define MAXLEVELNUM (3) LOGSET logsetting;LOG loging; conststatic charLo
2017-03-27 17:29:53 1535
转载 MATE Desktop Environment
The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktopenvironment using traditional metaphors for Linux and other Unix-like operating systems.MA
2017-03-16 09:08:54 2028
原创 ubuntu lightdm test用户自动登陆
1.编辑/etc/lightdm/lightdm.conf.d/50-myconfig.conf内容: [SeatDefaults] autologin-user=test 注意此处是自己要登陆的用户名字
2017-03-15 17:05:08 5488
转载 NetworkManager.conf文件
NameNetworkManager.conf - NetworkManager configuration fileSynopsis/etc/NetworkManager/NetworkManager.confor/NetworkManager/NetworkManager.confwhere depends on your distribution or build.
2017-03-09 11:07:02 11850 1
转载 ubuntu登陆循环问题
问题描述:能进入ubuntu图形界面,并且在登录界面输入正确的密码后,系统闪一下进入黑屏,然后快速进入一串命令行,然后又进入登录界面要求输入密码。如此不断循环登录,却始终无法登入桌面。解决方案:此处的解决方案可以每个都试下,不行就还原,如此而已在网上看了很多说法有:1、环境变量问题,进入tty1 或者 tty2 然后 sudo vim profile 或者 environm
2017-03-08 17:25:19 512
原创 独立显卡黑屏问题
一:环境 系统:ubuntu16.04 显卡类型:Nvidia 940M二:出现的问题: 屏幕黑屏,但显卡驱动安装成功 判断是不是显卡驱动安装成功步骤: 1.进入登陆界面黑屏,盲输入用户名,密码,盲进系统,(注意:有没有进入系统,通过其他机器ssh到当前机器,用命令w查看,如果有”tty7“关键字出现,说明进入系统
2017-03-08 09:55:36 3698
转载 shell脚本unexpected operator
刚学习shell,碰到问题.执行时总出错:unexpected operator.用的是ubuntu 9.04.跟这学习鸟哥的私房菜到了shell script那一节,脚本如下:#!/bin/bash# Program:# This program shows the user's choice# History:# 20
2017-03-07 08:43:13 1017
转载 独立显卡安装黑屏问题
LightDMFor the LightDM display manager:/etc/lightdm/display_setup.sh#!/bin/shxrandr --setprovideroutputsource modesetting NVIDIA-0xrandr --autoMake the script executable:# chmod +x /etc
2017-03-06 11:56:37 2307
转载 Linux进程关系包含session
作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!Linux的进程相互之间有一定的关系。比如说,在Linux进程基础中,我们看到,每个进程都有父进程,而所有的进程以init进程为根,形成一个树状结构。我们在这里讲解进程组和会话,以便以更加丰富的方式了管理进程。 进程组 (process group)每个进程都会属于一
2017-03-02 21:08:57 2802
转载 linux session
会话名称::setsid功能:建立一个会话头文件:#include函数原形:pid_tsetsid(void);参数:无返回值:若成功则返回进程组ID,若出错则返回-1。
2017-03-02 19:20:15 302
转载 『解决办法』UBUNTU系统连不上WIFI问题( Qualcomm Atheros Device 0042 )
当你看了N篇网络博文后WIFI连不上的问题依然没有任何改善,依然连不上WIFI甚至依然是没有任何可用WIFI显示出来。恭喜你,这篇博文可能是你看的最后一篇。或者说,你的无线网卡不是boardcom而是Qualcomm Atheros Device.恭喜你,看到这篇博文你可以解决你的问题。首先告诉你为什么你的本装上Linux系统后不能连WIFI而别人的本用的同一个盘装的LIN
2017-02-16 14:01:57 4215 5
原创 扫描易的api函数
转载自:https://fossies.org/dox/sane-backends-1.0.25/index.html#sane_api
2017-02-15 14:55:58 526
原创 simple-scan的所有bug
网址: https://alioth.debian.org/tracker/?atid=410366&group_id=30186&func=browse
2017-02-15 14:53:45 686
转载 gdb调试
用GDB调试程序 GDB是一个强大的命令行调试工具。大家知道命令行的强大就是在于,其可以形成执行序列,形成脚本。UNIX下的软件全是命令行的,这给程序开发提代供了极大的便利,命令行软件的优势在于,它们可以非常容易的集成在一起,使用几个简单的已有工具的命令,就可以做出一个非常强大的功能。 于是UNIX下的软件比Windows下的软件更能有机地结合,各自发挥各自的长处,组合成更
2017-02-15 14:51:24 303
无线了连不上的文件和解决脚本
2017-02-16
说明: 压缩软件-- 7-zip 7z922.zip
2012-01-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人