上一页 1 ··· 79 80 81 82 83 84 85 86 87 ··· 174 下一页

2013年9月17日

How to Programmatically Add/Delete Custom Options in Magento? - See more at: http://apptha.com/blog/

摘要: In this tutorial, I would like to help out Magento developers and clients with how to programmatically add/delete custom options in Magento. At the end of this post you’d be able to add/delete custom option on your Magento website with absolute ease. Here, we are with the set of codes to add custom 阅读全文

posted @ 2013-09-17 22:22 新一 阅读(260) 评论(0) 推荐(0)

iOS进阶面试题----Block部分

摘要: 1 什么是block 对于闭包(block),有很多定义,其中闭包就是能够读取其它函数内部变量的函数,这个定义即接近本质又较好理解。对于刚接触Block的同学,会觉得有些绕,因为我们习惯写这样的程序main(){ funA();} funA(){funB();} funB(){.....}; 就是函数main调用函数A,函数A调用函数B... 函数们依次顺序执行,但现实中不全是这样的,例如项目经理M,手下有3个程序员A、B、C,当他给程序员A安排实现功能F1时,他并不等着A完成之后,再去安排B去实现F2,而是安排给A功能F1,B功能F2,C功能F3,然后可能去写技术文档,而当A遇到问题时,.. 阅读全文

posted @ 2013-09-17 22:20 新一 阅读(252) 评论(0) 推荐(0)

2013年9月16日

利用Linux命令行进行文本按行去重并按重复次数排序

摘要: 最近杂事太多,正事进展缓慢。Fighting!linux命令行提供了非常强大的文本处理功能,组合利用linux命令能实现好多强大的功能。本文这里举例说明如何利用Linux命令行进行文本按行去重并按重复次数排序。主要用到的命令有sort,uniq和cut。其中,sort主要功能是排序,uniq主要功能是实现相邻文本行的去重,cut可以从文本行中提取相应的文本列(简单地说,就是按列操作文本行)。用于演示的测试文件内容如下:Hello World.Apple and Nokia.Hello World.I wanna buy an Apple device.The Iphone of Apple c 阅读全文

posted @ 2013-09-16 20:37 新一 阅读(649) 评论(0) 推荐(0)

一道面试题及其扩展,求好解法

摘要: 1、原始题目 看到一道大家讨论的比较老的算法面试题,说是字符串pStr,其中包含有大括号“{""}"中括号"[""]"小括号"("")"试编写一个递归函数,判断表达式中的括号是否匹配,返回true或者false。这道题之前自己准备面试的时候也做到过,好像是Catalan数的一个应用,用一个栈还是能很好地实现的,博主的代码如下。#include using namespace std;bool isMatch(const char* pStr){ const char* p = NULL 阅读全文

posted @ 2013-09-16 20:35 新一 阅读(196) 评论(0) 推荐(0)

Foundation Sorting: Shellsort

摘要: /* Shell Sorting. * Implemention history:. * 2013-09-15, Mars Fu, first version. *//* [Shell Sorting Algorithm]. * Published by Donald L. Shell [CACM 2, 7(July 1959), 30-32]. */#include "stdafx.h"#include "shellsort.h"#include static int get_increment(int s){ int next_hs; next_hs 阅读全文

posted @ 2013-09-16 20:33 新一 阅读(204) 评论(0) 推荐(0)

hdu 4739 Zhuge Liang's Mines

摘要: 今天的网络赛题目,用状态压缩的思想预处理,可以证明出20个点大概不能组成超过100个正方形。于是先预处理所有的正方形,然后0-1背包就可以了。、//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define FF(i, a, b) for(int i=a; i=b; i--)#define 阅读全文

posted @ 2013-09-16 20:30 新一 阅读(192) 评论(0) 推荐(0)

彻底解决:Keil编译提示“File has been changed outside the editor, reload?”提示!

摘要: 如图所示,很多同学在使用keil时都可能会碰到上图中的“File has been changed outside the editor, reload?”提示,很令人烦心。当遇到此提示,首先不要郁闷,请先看清楚文件的路径及名称。比如:这个提示的文件名是UCOSII+STM32+12864.axf,然后再看下图: 大家看见上图所示的文件名UCOSII+STM32+12864.axf了吗?直接在此图中关掉它就好了,此方法非常有效,百试不爽!注意:那个UCOSII+STM32+12864.htm文件也会导致如题的提示,也需要关掉。问题解决。希望对大家有用! 阅读全文

posted @ 2013-09-16 20:28 新一 阅读(3556) 评论(0) 推荐(0)

Oracle 表三种连接方式(sql优化)

摘要: 在查看sql执行计划时,我们会发现表的连接方式有多种,本文对表的连接方式进行介绍以便更好看懂执行计划和理解sql执行原理。一、连接方式:嵌套循环(Nested Loops (NL))(散列)哈希连接(Hash Join (HJ))(归并)排序合并连接(Sort Merge Join (SMJ) )二、连接说明:1.Oracle一次只能连接两个表。不管查询中有多少个表,Oracle在连接中一次仅能操作两张表。2.当执行多个表的连接时,优化器从一个表开始,将它与另一个表连接;然后将中间结果与下一个表连接,以此类推,直到处理完所有表为止。三、表连接详解:1. NESTED LOOP对于被连接的数据子 阅读全文

posted @ 2013-09-16 20:26 新一 阅读(1169) 评论(0) 推荐(0)

Foundation Sorting: Quicksort

摘要: /* Quick Sorting. * Implementation history:. * 2013-09-15, Mars Fu, first version. *//* [Quicksort Algorithm] * Published by C.A.R.Hoare,[Comp. J.5(1962),10-15]. */#include "stdafx.h"#include "quicksort.h"int do_quick_sort(void* src, int src_sz, int n, cmp_func cmp, exc_func exch 阅读全文

posted @ 2013-09-16 20:24 新一 阅读(275) 评论(0) 推荐(0)

POJ 2695 The Pilots Brothers' refrigerator(神奇的规律)

摘要: 转载请注明出处:http://blog.csdn.net/a1dark分析:如果想要将一个“+”翻转成“-”,那么必然会把对应的行和列上的所有点翻转一次、由于一个点翻偶数次就相当于不翻转、所以我需要统计“+”、然后将对应行和列的值+1、最后统计奇数值的个数、便是要翻转的点、#includeint mpt[5][5];int main(){ char ch; for(int i=1;i<=4;i++){ for(int j=1;j<=4;j++){ scanf("%c",&ch); if(ch=='+'){ ... 阅读全文

posted @ 2013-09-16 20:23 新一 阅读(194) 评论(0) 推荐(0)

上一页 1 ··· 79 80 81 82 83 84 85 86 87 ··· 174 下一页

导航