Author: Gideon

HTML转义字符对照表, HTML特殊字符编码对照表, HTML 字符集, HTML Character Codes – ASCII Entity and Unicode Symbols

HTML 字符集 如需正确地显示 HTML 页面,浏览器必须知道使用何种字符集。 万维网早期使用的字符集是 ASCII。ASCII 支持 0-9 的数字,大写和小写英文字母表,以及一些特殊字符。 由于很多国家使用的字符并不属于 ASCII,现代浏览器的默认字符集是 ISO-8859-1。 如果网页使用不同于 ISO-8859-1 的字符集,就应该在 <meta> 标签进行指定。   ISO 字符集 ISO 字符集是国际标准组织 (ISO) 针对不同的字母表/语言定义的标准字符集。 下面列出了世界各地使用的不同字符集: 字符集 描述 使用范围 ISO-8859-1 Latin alphabet part 1 北美、西欧、拉丁美洲、加勒比海、… Read More

Linux 下载youtube视频 How to save YouTube videos on Linux

Have you ever found interesting videos on YouTube, and wanted to download and save them on your hard drive (for offline access or archiving purpose)? There is a handy open-source Linux tool that does exactly that: download YouTube videos. A tool called youtube-dl is a command-line program written in Python that downloads videos from various online

Magento: addAttributeToFilter 和 addFieldToFilter 的区别 Difference between addAttributeToFilter and addFieldToFilter

addAttributeToFilter is used to filter EAV collections and will filter the products based on the attributes that you’ve included in your collection. EAV-models: product, customer, sales, etc. addFieldToFilter is used to filter Non-EAV collections and will filter the products based on columns in the database from the table catalog_product_en… Read More

JavaScript 语言基础知识点总结(思维导图)

目录[-] (1)javascript 数组 (2)函数基础 (3)运算符 (4)流程语句 (5)正则表达式 (6)字符串函数 (7)数据类型 (8)变量 (9)window 对象 (10)DOM基本操作 (11)一图知晓整个Javascript ES5语法 推荐阅读:   (1)javascript 数组   (2)函数基础   (3)运算符   (4)流程语句   (5)正则表达式   (6)字符串函数   (7)数据类型   (8)变量   (9)window 对象   (10)DOM基本操作   (11)一图知晓整个Javascript ES5语法 &n… Read More

Magento : 调用文件上传 upload file frontend

bool mkdir ( string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context ]]] ) $pathname should be the server path to the file and not a url Try $path = Mage::getBaseDir('media') . DS; You should try using Varien_File_Uploader include_once Mage::getBaseDir() . '/lib/Varien/File/Uploader.php'; /* Starting upload */ $uploader = n… Read More

jQuery: 判断指针是否在某元素内 How do I check if the mouse is over an element

代码: // required jquery.min.js $(function() { var $current_tab_menu = $('#main_menu'); $(document).on('mouseover',function(e) { var xx = e.originalEvent.x || e.originalEvent.layerX || 0; var yy = e.originalEvent.y || e.originalEvent.layerY || 0; if($current_tab_menu && $('.has_submenu:hover').length === 0) { console.log(($cur… Read More

Magento: 自定义用户登录导向页面 Redirect Customer to Previous Page After Login

Configuration Settings – Login to admin panel – Go to System -> Configuration -> CUSTOMERS -> Customer Configuration -> Login Options – Set: Redirect Customers to Account Dashboard after Loggin in = No – You can see in comments for this field: Customer will stay on the current page if “No” is selected. This setting will redirect customers to the…

图文并茂: 二进制与十进制间的转换方法

一、正整数的十进制转换二进制: 要点:除二取余,倒序排列 解释:将一个十进制数除以二,得到的商再除以二,依此类推直到商等于一或零时为止,倒取将除得的余数,即换算为二进制数的结果 例如把52换算成二进制数,计算结果如图: 52除以2得到的余数依次为:0、0、1、0、1、1,倒序排列,所以52对应的二进制数就是110100。 由于计算机内部表示数的字节单位都是定长的,以2的幂次展开,或者8位,或者16位,或者32位….。 于是,一个二进制数用计算机表示时,位数不足2的幂次时,高位上要补足若干个0。本文都以8位为例。那么: (52)10=(00110100)2 二、负整数转换为二进制 要点:取反加一 解释:… Read More

新手必须掌握的Linux命令

2.1 强大好用的SHELL 计算机硬件是由运算器、控制器、存储器、输入/输出设备等设备组成的,而能够让机箱内各种设备各司其职东西就叫做——系统内核。内核负责驱动硬件、管理活动和分配/管理硬件资源,如此说来系统内核对计算机来讲可真的是太重要了,所以它不能直接让用户操作。 因为用户不能直接控制硬件也不能直接操作内核,于是便需要基于“系统调用接口”开发出的程序/服务来满足用户日常工作了。 首先承认在红帽RHEL7中有些诸如逻辑卷管理器(LVM)的图形化工具非常好用,也减少了运维人员操作出错的几率,值得称赞,但一直以来Linux运维人员更多的倾向于用命令写脚本程序,因为图形化的工具不灵活而且相比来说更加消耗… Read More