自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 资源 (1)
  • 收藏
  • 关注

原创 sudo: xx: command not found环境变量配置好了,却找不到命令

一. 问题环境变量已经配置好了,但是执行sudo xx 却提示sudo: xx: command not found,以前ubuntu14不会这样,换成ubuntu18后就有这提示二、解决su rootchmod 777 /etc/sudoersvi /etc/sudoers注释掉下面三句话#Defaults env_reset#Defaults mail_...

2019-10-02 11:27:58 716

原创 mstar方案 屏参里头疼的pwm频率设置

一、问题Mstar TV方案,屏参里有个pwm频率参数,理解头疼,设置头疼二、理解############################ Panel backlight related params. ############################u32PeriodPWM = 0xFFFF;u32DutyPWM ...

2019-05-09 16:31:08 2835 1

原创 android8.0 services.jar 运行时找不到第三方jar包问题

一、问题PhoneWindowManager.java里面调用了第三方jar的接口,编译通过,生成services.jar,push进去,运行时找不到jar包,而jar包明明在/vendor/framework/com.mstar.android.jar错误log,如下,Caused by: java.lang.ClassNotFoundException: Didn’t find clas...

2019-04-16 19:14:22 1700 2

原创 make installclean 后再make,预安装的apk没有更新

一、问题make clean太慢,一般都用make installclean 后再make,编译完后发现,有源码的apk都编译了,但是预编译的apk却没有更新,还是之前的老apk二、解决1、删除out/target/product/sugarcane/obj/APPS目录下的中间文件,再编译即可2、本质的原因是一个文件复制到另外一个地方,文件的修改时间没有变,修改时间没变,makefil...

2019-04-11 09:55:36 1360

原创 android8.0 kernel4.9.44 各层log打开

1.问题平台android8.0 kernel4.9.44,想加个i2c驱动,打开log都是一件脑瓜疼的事。2.log总结android有三种log。(1)kernel下面的,就是driver层log。(2)kernel上面的,init和init.rc启动的程序的log,应用层(3)kernel上面的,android的log,就是logcat打印的。3.log打开方式(1)kern...

2019-03-05 16:50:37 968

原创 搜狗拼音输入法 打不了中文

问题window10 搜狗拼音输入法打不了中文解决无论怎么重装,修复都无效其实是智能英文被打开了,关闭即可ctrl+shift+e

2019-02-25 11:01:08 3259

原创 error: invalid operands of types 'MSrv_Control*' and 'void' to binary 'operator-'

一、问题编译错误./src/MSrv_Control_common.cpp:13222:65: error: invalid operands of types ‘MSrv_Control*’ and ‘void’ to binary ‘operator-’二、解决MSrv_Control::GetInstance()-SetHhtCurruntSource(sInputSrcName);...

2019-01-15 20:07:04 1150

原创 [linux 错误] “Sorry, command-not-found has crashed! Please file a bug report at”

一、问题今天ssh登陆linux突然报错,如下Sorry, command-not-found has crashed! Please file a bug report at:https://bugs.launchpad.net/command-not-found/+filebugPlease include the following information with the repo...

2019-01-10 12:00:31 1511

原创 MTK5658方案,SETTING_VERSION: unbound variable

一、问题MTK5658方案,源码下载后,第一次编译报错停止,不要make clean,直接再编译一次却可以正常编译。就是说新下载的代码第一次会报错,之后就不会了。编译错误,有如下信息out/host/linux-x86/bin/jack: line 66: SETTING_VERSION: unbound variableWriting client settings in /home/kan...

2018-05-12 11:57:15 1534

原创 Google App Engine、Google Kubernetes Engine、Google Compute Engine的区别

一、官网解释 原文网址: https://cloud.google.com/docs/choosing-a-compute-option

2018-05-03 20:28:28 1760

原创 为知笔记 印象笔记 有道笔记 OneNote选择

今天想记录下代码片段,这个感觉不适合用博客记录,于是就想起了用笔记来记录。 之前选择了为知笔记,很久没用了,今天登陆上去才突然发现,变成要收费了。 所以重新纠结了一下,为知笔记 印象笔记 有道笔记 OneNote,四个笔记中,最后选择了OneNote。 其实四个都差不多,不用太纠结。

2018-04-24 14:04:47 3361

原创 C语言 RPC调用 Hello World例子

1、代码 mkdir testcrpccd testcrpcvi test.xtest.x内容,如下 program TESTPROG { version VERSION { string TEST(string) = 1; } = 1;} = 87654321;使用rpcgen生成代码 rpcgen test

2018-04-23 19:44:45 3338 1

原创 服务器重启后samba启动不了,提示stop: Unknown instance: smbd start/running, process 76585

一、问题 服务器重启后,samba连不上,如下命令查看, (1)ps –aux | grep smbd 没发现smbd进程 (2) ye@ubuntu1404:~$service smbd statussmbd stop/waiting发现samba服务没启动(3)使用如下命令启动sudo service smbd restart sudo

2018-03-29 17:00:48 8196

原创 apk集成Firebase功能的hello world例子

一、介绍            android studio->Tools->Firebase,这个Firebase是什么功能呢?Firebase是google提供的一项服务,可以收集用户使用apk的信息。可以免费使用,也有收费服务。其实就是google app engine,变一个名字,配置比google app engine更方便。 Firebase或者google app engin

2018-03-13 17:29:22 964

原创 Makefile使用-D选项更改宏定义,记得要clean

1、Makefile文件,如下 CC_OPTS += -DMakefle_D=2all:testD echo "done"testD:testD.c gcc testD.c -o testD $(CC_OPTS)2、testD.c文件,如下 #includeint main(){ printf("Makefle_D = %d\n"

2018-03-09 15:23:56 3949

原创 git grep和grep搜索结果不一样

1、代码库文件test.txt文件如下 test@ubuntu:~$cat test.txt testgitgrep=1testlinuxgrep=0把testgitgrep=1改成testgitgrep=0后 test@ubuntu:~$cat test.txt testgitgrep=0testlinuxgrep=02、

2018-03-09 11:22:12 791

原创 boot.img recovery.img ramdisk.img ramdisk-recovery.img 解压方法

1、下载工具 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android-serialport-api/android_bootimg_tools.tar.gz 2、解压工具 tar xvzf android_bootimg_tools.tar.gz 3、解压boo

2018-03-02 10:57:02 2044

原创 svn diff 增加颜色,colordiff安装

svn没有颜色,以为配置后就会有颜色,百度后发现svn就是没有颜色 用第三方工具colordiff给svn增加颜色,安装记录 1、下载 官网: https://www.colordiff.org/ 下载: https://www.colordiff.org/colordiff-1.0.18.tar.gz 2、解压安装 tar –xvf colordiff-1.0.18.tar....

2018-03-01 16:42:35 831

原创 git update-index --assume-unchanged 找出所有被忽略的文件的办法

git update-index –assume-unchanged –path 可以忽略文件 git update-index –no-assume-unchanged –path 可以取消忽略文件 但是忽略的文件多了,想找出所有被忽略的文件,暂时找到下面的办法,git ls-files -v | grep '^h\ '提取文件路径,方法如下git ls-files -...

2018-02-27 10:05:23 13473 5

原创 无root权限安装git-svn方法

tar -xvf git-2.9.4.tar.gzcd git-2.9.4/./configure help./configure --prefix=$HOME/usr/git-2.9.4make –j64make installvi ~/.profilePATH=$HOME/usr/git-2.9.4/bin:$PATHsource ~/.profile git –versiongit vers...

2018-02-24 15:17:46 3233

原创 $(shell expr $(MAKE_VERSION) \>= 3.81) 这里“\”的解释

android/build/core/main.mk $(shell expr $(MAKE_VERSION) \>= 3.81) 为什么要加多一个“\”,因为">"会被shell解析为重定向符号,所以需要转义或用引号包围 所以,也可以这样写$(shell expr $(MAKE_VERSION) “>=” 3.81)

2018-01-12 08:57:13 472

原创 Python 一个例子 multiprocessing.Pool.apply_async

multiprocessing.Pool.apply_async 这个函数的用法例子,如下, import multiprocessingimport multiprocessingimport timeimport randomimport sys# print 'Testing callback:'def mul(a, b): time.sleep(0.5*ran

2017-12-15 11:50:44 8898

原创 Windows CMD 学习教程

教程链接:http://steve-jansen.github.io/guides/windows-batch-scripting/index.html 这个博客写的CMD教程感觉很好,推荐给大家。

2017-12-14 17:17:34 2454

原创 wampserver 安装错误: mysqld.exe无法启动

一、问题 学习php时安装wampserver,安装到最后提示mysqld.exe无法启动0xc000007b,重新打开wampserver则提示丢失MSVCR110.dll,无法启动。 二、原因 两个错误都是系统丢失MSVCR110.dll引起的。安装MSVCR110.dll即可,64的系统记得要安装32和64两种MSVCR110.dll, MSVCR110.dll下载地址为 http

2017-12-09 22:06:54 3108

原创 官网下载Python安装后提示错误 ImportError: No module named site

一、问题 官网下载Python2.7(python-2.7.13.msi),安装后启动提示错误,ImportError: No module named site 二、解决 1、这个问题是Python环境变量错误引起的,一般是之前安装过Python,卸载后没把环境变量去掉。 2、或者安装Python时选择了最下面一项,把Pthon加入环境变量,但它默认设置PYTHONHOME=C:\Pyt

2017-12-04 16:04:38 2325

原创 Android7.0 MTK方案 静默安装和卸载

一、android安装apk介绍 安装apk有两种方法 1、调用系统PackageInstaller.apk进行安装 这个系统apk所在目录为:android/packages/apps/PackageInstaller 2、串口命令安装”pm install –r hello.apk” 这个pm命令实现所在目录为:android/frameworks/base/cmds/pm/src/

2017-12-02 22:23:06 3273 2

原创 Python错误 SyntaxWarning: name 'xxx' is assigned to before global declaration

The most common reason for this error is that you’re using multiple global declarations in the same function. Consider this example: x = 0def func(a, b, c): if a == b: global x

2017-11-24 09:32:53 29634 1

原创 Android7.0 MTK方案 编译OTA升级包错误Could not append verity data!

一、Android7.0 MTK方案 编译OTA升级包时报错,如下 Could not append verity data!: error: file_write: incomplete writeFailed to write sparse fileTraceback (most recent call last): File "./build/tools/releasetoo

2017-11-23 19:13:38 1012

原创 Python socket 通信,同一台电脑可以正常访问而另一台电脑无法访问问题

一、官网的例子 服务端代码 # Echo server programimport socketHOST = '' # Symbolic name meaning all available interfacesPORT = 50007 # Arbitrary non-privileged ports = socket.

2017-11-21 18:52:24 4278 1

原创 Python进程间通信,使用multiprocessing.connection的Listener和Client实现

A进程代码#encoding=utf-8__author__ = 'outofmemory.cn'from multiprocessing.connection import Listeneraddress = ('localhost', 6000) # family is deduced to be 'AF_INET'listener = Listener(address, auth

2017-11-21 11:46:21 2459

原创 Python 父类调用子类方法

class father(): def call_children(self): child_method = getattr(self, 'out')# 获取子类的out()方法 child_method() # 执行子类的out()方法class children(father): def out(self): print "hehe"ch

2017-11-20 17:23:27 7259 6

原创 svn add 报错 is too old (format 10) to work with client version '1.8.8

svn: E155036: Please see the 'svn upgrade' command svn: E155036: The working copy at '/home/ubuntu/work/test/mytsvn/bb' is too old (format 10) to work with client version '1.8.8 (r1568071)' (ex

2017-11-16 17:11:56 3635 1

原创 python 执行命令

1、os.system(“cmd”) 2、win32api.ShellExecute(hwnd, op, file, args, dir, show) 3、win32process.CreateProcess(appName, cmdLine, proAttr, threadAttr, InheritHandle, CreationFlags, newEnv, currentDir, Attr)

2017-11-15 09:08:23 451

原创 import win32api 安装pip install pypiwin32

pip install win32api pip install pywin32 都会提示错误,如下:   Could not find a version that satisfies the requirement win32api (from versions: ) No matching distribution found for win32api 改为 pip i

2017-11-09 19:57:40 31782 15

原创 Python 封装DTU-215码流卡 第一天

DekTec的SDK下载地址:https://www.dektec.com/products/SDK/DTAPI/Downloads/WinSDK_v2017.08.0.zip DekTec码流卡DTU-215的官网代码例子 : https://www.dektec.com/products/applications/DtPlay/Downloads/DtPlay.zip 网速不稳定,我已经上

2017-11-09 19:28:09 824

原创 git apply -v 提示 Skipped patch 打不上patch的解决办法

git apply -v  33ae302.diff 提示 Skipped patch 'custom/mtk/mtk/packages/apps/LiveTV/src/com/mediatek/wwtv/tvcenter/nav/TurnkeyUiMainActivity.java'. 但是目录和文件命名没有改动,怎么打不上去呢 vi   33ae302.diff diff --git

2017-11-09 13:41:04 3176

原创 Python 字典存储无顺序 for in 使用要注意

python 字典初始化顺序和打印顺序不一样,注意dict={'size': 7914, 'day': '2012-11-13', 'daytime': '13:59'};print dictfor i in dict.keys(): print dict[i]输出 {'day': '2012-11-13', 'daytime': '13:59', 'size':

2017-10-24 16:17:56 2349

翻译 Python错误 SyntaxWarning: name 'xxx' is assigned to before global declaration

SyntaxWarning: name 'xxx' is assigned to before global declaration

2017-10-23 15:46:23 14577

转载 Python help

class MyMath: """ A class with math operator """ def add(self, x, y): """ Function to get the sum of x and y. Example: >>> mt=MyMath() >

2017-10-21 10:05:16 339

原创 Python调用dll

1、 visual studio 2017include “stdafx.h”include extern “C” _declspec(dllexport) int __stdcall stdAdd(int a, int b) { std::cout << “This is __stdcall dll” << std::endl; return a + b; } pycha

2017-10-17 21:55:53 727

SilenceInstall.7z

Android7.0 MTK方案 静默安装和卸载Android7.0 MTK方案 静默安装和卸载

2017-12-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除