ITeye博客

ynial

ynial · 共 39 篇文章

[置顶] node.js + express 初体验【hello world】

【node.js】 一个神奇的XX 呵呵 :) 不知道怎么形容他才好! 【express】 是node.js 开发web应用程序的框架 开发环境:XP 大家共同进步吧 :) 一:前期准备: 1:下载node.js 选择适合你的操作系统下载 http://nodejs.org/download/ 2:安装后需要小测试:) 打开命令行输入命令 node -v 前期准备已经结束了~ 二:开始我们的node.js + express hello world 初体验 在做这个小程序之前,让我们来看看npm是何许人也 --> Node Package Manager 你懂的 :) 我在D盘创建了一个文件…

2012-11-09 14:20 · node.js · 评论(0)

[置顶] [ php or jsp ] + jquery.imgareaselect 处理图片截图等比缩放!

在开发中难免碰到图片上传问题!图片上传问题很好解决,而上传到服务器上的图片尺寸大小不一,使表现层无法使用统一的规格显示被上传的图片。 那么被上传的图片的 等比例缩 与等比率放 还有等比率截图 可能会给我们的开发带来障碍! 使用 jquery.imgareaselect图片处理插件完全可以解决这方面的问题; jquery.imgareaselect 官方网站:http://odyniec.net/projects/imgareaselect/ 例1: $(window).load(function () { $('#myimg').imgAreaSelect({ selectionColor:…

2009-06-04 09:18 · jquery · 评论(0)

[置顶] jquery grid插件 Flexigrid + servlet

前些日子写了个源于jquery grid插件Flexigrid 算不上例子的一片文章。 为了能更快的使用这个东东 。。 今天做了一个相对比较详细的例子. 对一个工作信息表操控的例子。 第一步:创建数据库 /* MySQL Data Transfer Source Host: localhost Source Database: spiderdata Target Host: localhost Target Database: spiderdata Date: 2008/9/2 10:42:51 */ SET FOREIGN_KEY_CHECKS=0; -- ----------------…

2008-09-02 10:50 · jquery · 评论(19)

opencart 在主菜单上设置current_item 在菜单上高亮当前分类

$(function(){ function getURLParameter(name) { return decodeURI( (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,""])[1] ); } var path = getURLParameter("path"); if (path != "") { $("#menu li a").each(function() { if ($(this).attr('href').indexOf('path=' + path) > -1) { $(this).css("bac…

2013-03-18 23:29 · php · opencart · 评论(0)

node.js & postgreSQL 初体验[二]

局部代码:模拟一个小登录的测试! 刚开始的时候忘记这NODE.JS异步问题了,怎么测都不行! 后来一顿回调啊~ OK了~! 这种方法代码的可读性很差,嵌套太多了。等等吧 等过几天再研究一下 ,解决这异步的问题!~ index.js var um = require('./modules/user-manager'); exports.index = function(req, res){ res.render('index', { title: 'Test Login DEMO' }); um.findUserByEmail('tom@gmail.com', function(user) {…

2012-11-12 19:50 · node.js · 评论(0)

node.js install postgreSQL 初体验

node.js install postgreSQL 初体验 1:安装postgresql 2:命令行: npm install pg ....... 【第一个难题】 我们需要安装python 【第二个难题】 这个错误的原因很令人头痛,查阅了很多资料无果。 尝试着在环境变量path里添加 C:\Program Files\PostgreSQL\9.2\bin 后继续无果 在自定义path继续中 添加C:\Program Files\PostgreSQL\9.2\bin 后OK 3:测试代码 var express = require('express'); var pg = require(…

2012-11-10 09:59 · node.js · 评论(1)

opencart 商品说明乱码

opencart 一个不错的电商开源框架,一个小问题opencart 商品说明乱码 简单看了一下源码, 在opencart\catalog\controller\product\category.php 中 找到 'description' => $this->msubstr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) ...', ' 修改一下就OK了 windows 下 开发 确保PHP.INI 的 extension=php_mbstring.dll 是可用的 '…

2012-09-08 10:50 · php · 评论(0)

ios UITableViewCell 文字缩进

【前提】 UITableViewCell 原本就有他自己的imageView ,希望在这个imageView上再添加一个icon, textLabel要缩进 icon 寛的大小。 【解决方案】 UIImage *icon = [uiimage imagenamed:item.icon]; UIImageView *imgview = [[uiimageview alloc]initWithImage:icon]; imgview.frame = CGRectMake(5, 10, 15, 21); [cell.contentview addsubview:imgview]; cell.ind…

2011-12-02 12:00 · 评论(0)

xcode 4.2后 release问题的解决

【release问题的解决】 TARGETS -> Compile Sources 找到包含 release的文件 双击 弹出对话框 在对话框里 添加 -fno-objc-arc ; 问题就解决了~ :)

2011-11-24 14:27 · iphone 开发 · 评论(0)

iphone UIWebView 的使用

【UIWebView 的使用】 1:引用外部连接 [super viewdidload]; CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0); UIWebView *webView = [[uiwebview alloc] initWithFrame:webFrame]; [webview setbackgroundcolor:[uicolor whitecolor]]; NSString *urlAddress = @"http://www.baidu.com"; NSURL *url = [nsurl urlwithstring:u…

2011-11-23 14:05 · iphone 开发 · 评论(0)

收藏 iphone开发站

收藏一个iphone开发的站 http://mobiforge.com/developing/story/build-web-apps-iphone-using-dashcode http://www.iphoneexamples.com/

2011-11-23 13:45 · iphone 开发 · 评论(0)

ios iphone UILabel 多行文字自动换行 (自动折行)

【UILabel 自动换行】: UIView *footerView = [[uiview alloc] initWithFrame:CGRectMake(10, 100, 300, 180)]; UILabel *label = [[uilabel alloc] initWithFrame:CGRectMake(10, 100, 300, 150)]; label.text = @"where are you? where are you? where are you? where are you? where are you? where are you? where are you? …

2011-11-23 11:29 · iphone 开发 · 评论(0)

iphone UINavigationController 设置背景图片

【UINavigationController 设置背景图片的方法】 下列代码测试通过,可以显示背景图片 self.navController.navigationBar.tintColor = [uicolor blackcolor]; 下列代码测试 没有出背景颜色 self.navController.navigationBar.backGroundColor = [uicolor blackcolor];

2011-11-23 11:18 · iphone 开发 · 评论(0)

ios iphone UITableView

UITableView 1:如果一个类继承了 UITableView 那么怎么处理这个UITableView的背景图片呢? self.backgroundView = [[uiimageview alloc] initWithImage:[uiimage imagenamed:imagename]]; 原来是这样处理的 self.backgroundColor = [uicolor colorwithpatternimage:[uiimage imagenamed:imagename]]; 但是一旦这样处理背景图片 当这个表格和屏幕顶部有间距的时候 背景图片会串位置。 self.backgr…

2011-11-23 00:32 · iphone 开发 · 评论(0)

正则表达式

String envPattern = "学校环境 ( ?)<ul id="huanjing">( ?) (*?) "; 用这个表达式解决 带换行的数据抓取问题

2011-09-21 16:32 · java · 评论(0)