首页 文章 精选 留言 我的

精选列表

搜索[设置],共10024篇文章
优秀的个人博客,低调大师

设置自动唤醒和关闭 Linux

一.系统休眠(crontab) 示例说明(创建一个 root 定时任务实现每天晚上 11 点 15 分定时关机): 1 # crontab -e -u root 2 # m h dom mon dow command 3 15 23 * * * /sbin/shutdown -h now 示例说明(仅在周一至周五运行) 1 15 23 * * 1-5 /sbin/shutdown -h now 另外可以直接在/etc/crontab文件中添加定时服务 15 23 * * 1-5 root shutdown -h now 二. 唤醒(Wake-On-LAN) 1. 查看是否直接Wake-On-LAN和开启,必须支持的功能是g # ethtool eth0 | grep -i wake-on Supports Wake-on: pumbg Wake-on: g 2. 启动g(ps:这条命令可能会在重启后失效) # ethtool -s eth0 wol g 3. 添加cron保证每次重启之后开启g @reboot /usr/bin/ethtool -s eth0 wol g

优秀的个人博客,低调大师

ubuntu下设置Android手机驱动

如果下面的文章不好使,建议读一这个文章:http://forum.xda-developers.com/xperia-u/general/howto-usb-connection-to-ubuntu-t1574551 以下内容有时候会导致,有的时候手机无法识别,请读上面的文章。 默认情况下 Ubuntu系统无法识别android手机。 运行 adb devices 将会出现一堆 ???号 在这种情况下你可以按照如下方法解决 1.首先查看你手机的ID号 在terminal下运行lsusb命令 再将手机连接上电脑 再次运行lsusb就会多出一个usb信息。该信息即为你手机的usb信息 Bus 002 Device 007: ID18d1:4e21 PS:红色字体为手机的ID号,同一款手机的ID号是一样的。本人手机为(NS) 2 .创建配置文件 sudo vim /etc/udev/rules.d/XXX.rules XXX为你自定义的文件名 输入以下 内容 SUBSYSTEM=="usb", SYSFS{"idVendor"}=="18d1", MODE="0666" 在红色字体的部分 添加上 你 自己手机的id sudo chmod a+rx /etc/udev/rules.d/XXX.rules sudo /etc/init.d/udev restart 3.重启adb服务(必须为sudo 已配置android环境变量) sudo ./adb kill-server sudo ./adb devices --------------------------------------------------------------------- you want MTP support on Ubuntu, try this: Connect Xperia S to an USB2 port. Use the "lsusb" command to list your devices in a terminal One of the lines should look like this: Code: Bus 002 Device 012: ID 0fce:5169 Sony Ericsson Mobile Communications AB Note your vendor- and product id. Usually this is "0fce" for the vendor and "5169" for the product id. If you have USB debugging disabled, product id will be "0169". unplug your phone read this thread:humans-enabled.com Install the newest Version of "libmtp" and copy the 69-libmtp.rules file to /etc/udev/rules.d as described Edit: This step may not be necessary for you! Xperia S support is implementet in the libmtp-1.1.3. release. If you use the newest version fromsourceforge.netskip this and go to step 7.type following to edit the copied file as root: Code: sudo gedit /etc/udev/rules.d/69-libmtp.rules Add the following text somewhere around the sony ericsson devices that are in this file. You can find them by searching for "0fce". Remember to set the correct vendor and product id: Code: # Sony Xperia S ATTR{idVendor}=="0fce", ATTR{idProduct}=="5169", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" ATTR{idVendor}=="0fce", ATTR{idProduct}=="0169", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" reboot, or use Code: sudo udevadm control --reload-rules to actualise. Plug in your device to a USB2 port, it will mount automatically. Use nautlius to copy files around. 本文转自demoblog博客园博客,原文链接http://www.cnblogs.com/0616--ataozhijia/p/3658649.html如需转载请自行联系原作者 demoblog

优秀的个人博客,低调大师

eclipse 设置 与 快捷键

1.1字体调整 打开eclipse,找到window,点击后在下拉菜单中找到preferences,在左边的菜单栏中找到general,appearance在general展开后的第一行,点击展开appearance,找到colors and fonts,点击这样就快找到我们要的了,看到右边字体一列有很多的选项,我们只需要修改basic里面的,击展开Basic,最下面有Text Font这个选项,点击然后右边的Edit被激活了,点击Edit 1.2自动补全 最简单的修改方式是:Windows——>Preferences——>Java-->Editor-->Content Asist,在Autoactivation triggers for Java后面的文本框里只有一个“.”。现在你将其改为“.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ”即可。 1.3常用快捷键 Ctrl + Shift + R :打开文件管理器,进行文件搜索,避免在Package Explorer中逐个寻找 Ctrl + E :显示当前已经打开过的文档,进行文件搜索 Ctrl + O :显示当前类的成员以及函数列表 Ctrl + H :显示搜索对话框,针对工作区 Ctrl + F :针对当前文档搜索 自动补全说明:在编辑C++代码的情况下,对于类型无法自动补全,但是对于已经声明的变量,可以使用Alt + / 进行补全 Android工程添加库 操作 打开项目的属性Property,点击Android,右下方出现Library,通过Add,添加其他的工程为当前工程的库 本文转自fengyuzaitu 51CTO博客,原文链接:http://blog.51cto.com/fengyuzaitu/1405427,如需转载请自行联系原作者

优秀的个人博客,低调大师

android——为View设置动画效果

导入jar包:nineoldandroids-2.4.0(开源动画库); 实例化View view; 创建动画集: 1 2 3 4 5 6 7 8 9 10 11 12 13 //1.创建动画集 AnimatorSetset= new AnimatorSet(); //2.添加动画 set.playTogether( ObjectAnimator.ofFloat(view, "scaleX" , 2 , 1 .5f, 1 ).setDuration( mDuration), ObjectAnimator.ofFloat(view, "scaleY" , 2 , 1 .5f, 1 ).setDuration( mDuration), ObjectAnimator.ofFloat(view, "alpha" , 0 , 1 ) .setDuration(mDuration* 3 / 2 ) ); //3.开启动画 set.start(); 本文转自wauoen51CTO博客,原文链接:http://blog.51cto.com/7183397/1604844 ,如需转载请自行联系原作者

优秀的个人博客,低调大师

android 设置默认启动network mode

network mode常见类型 WCDMA preferred : 0 GSM only : 1 WCDMA only : 2 GSM UMTS : 3 CDMA : 4 ... (参考RILConstants.java) 是透过AT+ERAT把mode的值丢给modem,让modem设定相应的mode。 假设是TDD手机。那么其network mode的值和WCDMA是相应的。 WCDMA preferred -- TD-SCDMA preferred WCDMA only -- TD-SCDMA only 这个network mode在第一次开机时会有一个參数来记录默认值,这个參数就是PREFERRED_NETOK_MODE,该參数定义在在RILConstants.java中。 在SettingProvider loading的时候,这个參数的值就写到Settings.Global.PREFERRED_NETWOK_MODE其中(參考SettingsProvider中的DatabasHelper.java)。然后在make default phone的时候就依据Settings.Global.PREFERRED_NETWOK_MODE取出来的值来使用。 注:由于network mode是End user能够通过操作setting菜单切换的,所以本FAQ仅仅是改动download完第一次开机的network mode默认值 AP端改动例如以下: 有了上述的描写叙述,设定默认的network mode比較简单,就是把PREFERRED_NETWORK_MODE的默认取值改动掉就可以。眼下PREFERRED_NETOK_MODE默认值是NETWORK_MODE_WCDMA_PREF。 比如默认设成GSM only: RILConstants.java 路径: alps/framework/base/telephony/java/com/android/internal/telephony/ Modem端改动例如以下: modem端改动preferred rat相应的nvram 是NVRAM_EF_RAC_PREFERENCE_LID 请帮忙依据须要改动相关default数组COMMON_NVRAM_EF_RAC_PREFERENCE_DEFAULT的IR preferred RAT(红色highlight部分): /* 4th byte is IR preferred RAT and MM preferred RAT */ // MM preferred RAT 0x00 : RAT_NONE 0x01 : RAT_GSM 0x02 : RAT_UMTS 0x00 + // IR preferred RAT 0x00 : RAT_NONE 0x10 : RAT_GSM 0x20 : RAT_UMTS 0x20 // 本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5038165.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

ES 相似度算法设置(续)

Tuning BM25 One of the nice features of BM25 is that, unlike TF/IDF, it has two parameters that allow it to be tuned: k1 This parameter controls how quickly an increase in term frequency results in term-frequency saturation. The default value is 1.2. Lower values result in quicker saturation, and higher values in slower saturation. b This parameter controls how much effect field-length normalization should have.A value of 0.0disables normalization completely, and a value of 1.0normalizes fully. The default is 0.75. The practicalities of tuning BM25 are another matter. The default values fork1andbshould be suitable for most document collections, but the optimal values really depend on the collection. Finding good values for your collection is a matter of adjusting, checking, and adjusting again. The similarity algorithm can be set on a per-field basis.It’s just a matter of specifying the chosen algorithmin the field’s mapping: PUT /my_index { "mappings": { "doc": { "properties": { "title": { "type": "string", "similarity": "BM25" }, "body": { "type": "string", "similarity": "default" } } } } Thetitlefield uses BM25 similarity. Thebodyfield uses the default similarity (seeLucene’s Practical Scoring Function). Currently, it is not possible to change thesimilaritymapping for an existing field. You would need to reindex your data in order to do that. Configuring BM25 Configuring a similarity is muchlike configuring an analyzer. Custom similarities can be specified when creating an index. For instance: PUT /my_index { "settings": { "similarity": { "my_bm25": { "type": "BM25", "b": 0 } } }, "mappings": { "doc": { "properties": { "title": { "type": "string", "similarity": "my_bm25" }, "body": { "type": "string", "similarity": "BM25" } } } } } 参考:https://www.elastic.co/guide/en/elasticsearch/guide/current/changing-similarities.html 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6472828.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

Android 中横竖屏的设置

将android:screenOrientation="portrait",转换横屏竖屏无效,始终显示竖屏。 <application android:allowBackup= "true" android:icon= "@drawable/ic_launcher" android:label= "@string/app_name" android:theme= "@style/AppTheme" > <activity android:screenOrientation= "portrait" android:name= "com.example.expandablelistdemo.ExpandableList3" android:label= "@string/app_name" > <intent-filter> <action android:name= "android.intent.action.MAIN" /> <category android:name= "android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> 本文转自Work Hard Work Smart博客园博客,原文链接:http://www.cnblogs.com/linlf03/archive/2013/03/28/2981074.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

linux设置命令行启动

做spark,内存大的话运行很快,否则运行很慢,主节点用界面,其他用命令行,然后scp,或者ssh 去其他主机最访问 1, 关闭图形界面: [root@bogon ~]# init 3 // 关闭图形界面(XServer服务也会关闭) 2. 开启图形界面: [root@bogon ~]# init 5 或 这个需要root [root@bogon ~]# startx //进入第一个图形界面(如果有多个的话) 普通用户就行 3. 开机时,默认不进入 X Window: [root@bogon ~]# vim/etc/inittab 找到 id:5:initdefault: 改成id:3:initdefault: 重启就ok了

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册
修改密码
忘记密码