defaults

ExportTable.js

匆匆过客 提交于 2019-12-02 05:40:13
解决了避免身份证号导出到excel中显示成科学计数法 1 (function ($) { 2 $.fn.extend({ 3 tableExport: function (options) { 4 var defaults = { 5 csvSeparator: ',', 6 csvEnclosure: '"', 7 consoleLog: false, 8 displayTableName: false, 9 escape: false, 10 excelstyles: ['border-bottom', 'border-top', 'border-left', 'border-right'], 11 fileName: 'tableExport', 12 htmlContent: false, 13 ignoreColumn: [], 14 jspdf: { 15 orientation: 'p', 16 unit: 'pt', 17 format: 'a4', 18 margins: { left: 20, right: 10, top: 10, bottom: 10 }, 19 autotable: { 20 padding: 2, 21 lineHeight: 12, 22 fontSize: 8, 23 tableExport: { 24

win10下安装Anaconda+Pycharm+CUDA+CUDNN(整体环境搭建-针对个人)

无人久伴 提交于 2019-12-02 01:33:56
在Pycharm中安装Tensorflow-gpu导致很多出错, 然后重新安装CUDA+CUDNN把环境搞崩了, 所以,整个环境重新安装——把Anaconda卸载了,Python卸载了,Pycharm卸载了。 Anaconda版本:Anaconda3-5.0.1-Windows-x86_64.exe Pycharm版本:pycharm-community-2018.1.1.exe CUDA版本:cuda_9.1.85_win10_network.exe CuDNN版本:cudnn-9.1-windows10-x64-v7.1.zip 可参考https://blog.csdn.net/Eppley/article/details/79299075 conda install keras E:\zql\data_processing_v1.0\pre-processed_data(unit_area)_Pieces> conda install keras Fetching package metadata ............... Solving package specifications: . Package plan for installation in environment C:\Users\yzzn\Anaconda3: The following NEW

Easy way to save values through many appstarts?

為{幸葍}努か 提交于 2019-12-01 14:19:02
is there a way to save values through various starts of an app? I need to save some statistics (records of a game). In objective-c I used UserDefaults, what's it in Java? If possible I'd like to take a simple way (one line of code). one line of code No, that's not going to happen. But if you just have simple data and not much of it then you can use SharedPreferences There is a good, basic example of using SharedPreferences here in the docs But if you are going to be storing a lot of data for a game then you probably want to implement an SQLite DB See Storage Options for what will work best for

设置隐藏文件的显示与隐藏方法

让人想犯罪 __ 提交于 2019-12-01 12:35:20
mac中如何将一个文件或者文件夹隐藏?如何取消隐藏?其实很简单: 一、mac中,以“."开头的文件,就是隐藏文件,如果更改文件名,前面加上".",这个文件就可以被隐藏了。 二、建立一个隐藏与取消的快捷键,如可以用command+shift+. 三、使用这个键,就可以方便地将任何文件或者文件夹进行隐藏了。 具体如下: 方法一:使用终端 [table=100%,#ffffff]只要打开终端(位于应用程序——实用工具),将以下代码复制进去然后回车 defaults write com.apple.finder AppleShowAllFiles -bool YES Finder需要重启才能应用修改,在终端中接着输入 killall Finder 并回车 恢复隐藏不可见,在终端中输入以下代码并回车 defaults write com.apple.finder AppleShowAllFiles -bool NO 同样Finder需要重启 killall Finder 方法二:设置键盘快捷键 打开Automator(应用程序文件夹中)并选择”服务“。在资源库中选中“Run Shell Script”并将它拖到右边的工作区中。将以下代码复制到文本框中。 STATUS=`defaults read com.apple.finder AppleShowAllFiles` if [ $STATUS

function name($param, $line = __LINE__, $file = __FILE__) {};

有些话、适合烂在心里 提交于 2019-11-29 10:38:22
Is it possible to have a function automatically contain the line number and the file that the function was CALLED in, as if i call __LINE__ or __FILE__ in the function it will use the line and file the function definition is in. but i dont want to have to pass __LINE__ and __FILE__ into the function every time. so if i set them as the default params, do they come from the function definition, or where it is being called from? Wrikken The only way would be using debug_backtrace() , but as the name says: it is for debugging. Your code should not attach any meaning or functionality in production

How to change the default version of python in a linux machine ?(not just symlink) [closed]

雨燕双飞 提交于 2019-11-29 06:26:41
I have multiple versions of python installed in ubuntu (precise) for various reasons and uses. I have python 2.7 and python 2.6. I need to make python 2.6 the default and not python 2.7. I updated python symlink to point to python2.6. That will only give me commandline access straight to python2.6. but when I install some package from aptitude, it goes straight to python2.7 compatible stuff because somewhere in the OS, its sees that as the default. How should I change this ? P.S : I know the workaround of installing from package's source code. But its not easy to get the source code always and

Sass variable default scope

眉间皱痕 提交于 2019-11-28 21:26:30
I have a problem with using variable defaults in Sass across scopes. My test example is: @mixin foo { $val: 'red' !default; .bar { color: $val; } } @include foo; .class1 { $val: 'green'; @include foo; .class11 { @include foo; } } $val: 'black'; .class2 { @include foo; } .class3 { $val: 'blue'; @include foo; } .class4 { @include foo; } It is compiles to: .bar { color: "red"; } .class1 .bar { color: "red"; } .class1 .class11 .bar { color: "red"; } .class2 .bar { color: "black"; } .class3 .bar { color: "blue"; } .class4 .bar { color: "blue"; } As you can see, variable $val is defined as 'red'

change matplotlib's default font

☆樱花仙子☆ 提交于 2019-11-28 21:12:45
I'm trying to change matplotlib's default font to Helvetica Neue. On my Mac with EPD/Canopy everything worked fine some time ago. Trying to do the same on ubuntu now and it's not working. This is what I did: Installed Helvetica Neue $ fc-match 'Helvetica Neue':Light HelveticaNeue-Light.otf: "Helvetica Neue" "細體" Converted the odt/dfont into ttf: fondu -show HelveticaNeue.dfont changed matplotlibrc to $ cat ~/.config/matplotlib/matplotlibrc ... font.family: Helvetica Neue I also tried with: font.family: sans-serif font.sans-serif: Helvetica Neue I removed the font cache rm ~/.config/matplotlib

axios的使用

不羁的心 提交于 2019-11-28 13:24:55
Axios: 是一个基于 promise 的 HTTP 库,可以用在浏览器和 node.js 中 特征: 1.从浏览器中创建 XMLHttpRequests 2.从 node.js 创建 http 请求 3.支持 Promise API 4.拦截请求和响应 5.转换请求数据和响应数据 6.取消请求 7.自动转换 JSON 数据 8.客户端支持防御 XSRF 需要储备的知识: 1.http(报文,content-type等) 2.promise 3.ajax 目标: 扫除axios的使用语法 按需写出拦截器 一:请求语法 二:请求配置参数 三:响应结构 四:创建实例及拦截器 五:配置的默认值/defaults 六:axios默认的配置(注意事项) 七:源码解读 一:请求语法: 1.请求方法的别名: 1.1执行 get/delete请求: axios.get/delete('/user?ID=12345') .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); // 可选地,上面的请求可以这样做(参数一:请求url(字符串);参数二:请求参数(一个对象);参数三:请求配置参数(一个对象)) axios.get/delete('

function name($param, $line = __LINE__, $file = __FILE__) {};

旧街凉风 提交于 2019-11-28 03:54:55
问题 Is it possible to have a function automatically contain the line number and the file that the function was CALLED in, as if i call __LINE__ or __FILE__ in the function it will use the line and file the function definition is in. but i dont want to have to pass __LINE__ and __FILE__ into the function every time. so if i set them as the default params, do they come from the function definition, or where it is being called from? 回答1: The only way would be using debug_backtrace(), but as the name