Asutorufaのブログ

こんにちは


  • Home

  • Tags

  • Categories

  • Archives

  • About

  • Friends

  • Search

解决xfce4画面撕裂

Posted on 2018-12-09 | Post modified: 2018-12-09 | In linux

安装compton

sudo apt install compton

修改配置文件

compton的配置文件在~/.config/compton.conf
因为有些窗口的阴影有时候会变的很奇怪,大概你有可能需要修改一下,附上我的:

Read more »

linux下intel&AMD双显卡切换

Posted on 2018-09-08 | Post modified: 2020-05-05 | In linux

使用xrandr显示可支持的显卡

xrandr --listproviders

输出类似以下内容

Providers: number : 2
Provider 0: id: 0x6b cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 7 associated providers: 1 name:modesetting
Provider 1: id: 0x41 cap: 0x6, Sink Output, Source Offload crtcs: 2 outputs: 0 associated providers: 1 name:OLAND @ pci:0000:01:00.0

To be able to render GPU-intensive applications by the more powerful discrete card use

xrandr --setprovideroffloadsink 1 0

或者

Read more »

python使用lxml分析网页

Posted on 2018-08-07 | Post modified: 2018-08-07 | In python

首先得引入lxml

#xpath为
frome lxml import etree
#cssselector为
import lxml.html
#cssselector使用起来简单但功能比xpath少

cssselector

tree = lxml.html.fromstring('你获取的网页源代码文件或变量')
css = tree.cssselect('要选择的内容')

#例如tree.cssselect('div.word-info > div.pronounces > span.word-audio')
#选择器选择的结果为list

css.text_content()

#表示选择的内容

css.attrib['要表示的标签属性']

#如css.attrb['class']表示的就是所选择内容的class属性
Read more »

python获取网页源码(爬虫?)

Posted on 2018-08-07 | Post modified: 2018-08-07 | In python

利用requrst,使用首先要

import requests

使用方法

url = '要获取的网页地址'
useragent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'#user-agent 可有可无,有些网页防爬虫就要模拟浏览器
requests.get(url,headers={'User-Agent':useragent}))

snap删除旧的core(snap删除其他版本的软件)

Posted on 2018-06-28 | Post modified: 2018-06-28 | In linux

偶尔发现snap会自动升级core且不删除旧版,在’/snap/core’
会发现好几个版本的文件夹。
使用

sudo snap remove core --revision xxx

删除某个版本的core,xxx是软件的rev,使用

snap list

可以查看软件的rev,其他软件也能用这个方法删除旧的版本哦。

参考:How to unmount and possibly delete old Ubuntu Core snap

ubuntu终端下连接wifi

Posted on 2018-06-23 | Post modified: 2018-06-23 | In linux

首先使用rfkill查看你的wifi设备是否被停用

使用命令

rfkill list

获得设备列表,每个都包含与之关联的索引号,从 0 开始
查看设备是否被停用,要启用被停用的设备,请运行:

rfkill unblock <索引号>

要启用所有设备,请运行:

rfkill unblock all
Read more »

暗影精灵更改efi启动顺序

Posted on 2018-06-23 | Post modified: 2018-06-23 | In Computer

–2019-04-22 更新–
最新版bios已经可以调整启动顺序了(图在最下面)

-------- 之 前 -------
暗影精灵安装完ubuntu之后只能开机按esc+f9进入ubuntu,否则会直接启动windows,虽然可以使用但及其不方便的说

首先从ubuntu进入/boot/efi/EFI
备份windwos的启动文件(切记一定要备份,否则只能从pe重新建立windwos启动项)

cp -arf Microsoft win10

将ubuntu的grubx64.efi替换掉EFI/Microsoft/Boot/bootmgfw.efi文件

Read more »

関西弁コレクション

Posted on 2018-06-21 | Post modified: 2020-01-30 | In 日本語

普段発見の関西弁ここで記録します。

–2020年1月30日–
おらん とはどういう意味ですか?

文からするとその方は関西の人ですかね。おらんは方言で、「いない」という意味です。
例文:俺も一緒やな 3年ぐらいはおらん。

–2019年2月1日–


①関西弁の~ねんけど、~やねん、~ねんの意味を教えて下さい
②~ねやは~ですかの意味ですか?それ意外に意味、使い方等は有りますか?
③言葉の関西弁のアクセントを教えて下さい

①・・・
~ねんけど ですけれど(〇〇なんですけれど)
~やねん、~ねん です(〇〇なんです)

②・・・
~ねやは~(~やねん”わ”~ですね。)
〇○なんですよ。

③・・・
~ねんけど(中中)
~やねん(高低)
~やねんわ~(高低中)

Read more »

JavaScript对字符串操作

Posted on 2018-03-24 | Post modified: 2018-09-04 | In JavaScript
var name='aaaa';
var age='bbbb';
var change='Hello javascript';
var message=`hello,${name},${age},`+name+age;//将多个字符串写成一句话
var length=message.length;//获取字符串长度
var upper=message.toUpperCase();//把字符串全部变成大写
var lower=message.toLowerCase();//把字符串全部变成小写
var search=message.indexOf('aaaa');//搜索字符串位置
var substr=message.substring(9, 15);//返回区间内字符串
x=document.getElementById("test");  //查找元素
x.innerHTML="Hello JavaScript";    //改变内容

让win10的UWP应用走代理

Posted on 2018-02-08 | Post modified: 2020-03-01 | In Network

原因

因为uwp应用的特殊性,即使使用proxifier和proxycap这种应用也无法让其走代理

现在可直接用WindowsLoopbackManager

WindowsLoopbackManager

Read more »
1…567

68 posts
23 categories
84 tags
RSS
GitHub E-Mail
0%
© 2025 Asutorufa