- Node.js + Express + MongoDB 实战 TodoList 基础入门
barnett_y
【Node.jsKoa点滴知识】
Node.js+Express+MongoDB实战TodoList基础入门视频地址https://www.rails365.netb站常用链接express官网express官网中文expressgithubNodejs学习笔记以及经验总结看视频整理要点笔记:hello-express1.介绍2.请求与响应3.路由参数4.查询字符串5.POST请求和postman工具6.上传文件7.模版引擎介绍8
- 技术(编程过程)问题总会遇到Bug!
世界的宇宙
一、webpack已安装成功,却无法使用。(1)二、今日学习基本是安装操作:http://edu.51cto.com/course/12277.html作者网站:https://www.rails365.net/【练手是关键,原理已了解】
- Rails 3 文章集合
iteye_15658
前端视点RailsActiveRecordDjangoRackRuby
Rails3一如既往地为大家带来新的惊喜。原文的作者收集了一系列提及Rails3新特性的文章,希望对大家有帮助。原作者还喜欢大家给他留言补充。RouterRevampedRoutesinRails3(12/20/09):Rails3Router的应用实例GenericActionsinRails3(12/20/09):趣谈Rails3RouterTheRails3Router:RackitUp(1
- 剖析 Rails 3 MVC 中的数据传递
杠杠PP
railsmvcactiverecordrubycookiessession
剖析Rails3MVC中的数据传递林洪祥,软件工程师,IBM简介:本文分析了Rails3的MVC架构,探讨总结了Rails3的控制器与视图、控制器与模型、视图与布局以及多个视图之间的数据传输方法和技巧。假设您对RubyonRails有基本的了解,至少能够配置RubyonRails并运行类似HelloWorld的入门应用程序。本文的标签:rails标记本文!发布日期:2011年8月29日级别:中级访
- 我为什么会收到apple-touch-icon-precomposed.png的错误
一风二木
我创建了一个新的rails3项目,但我在服务器日志中看到了多次跟踪日志。为什么我收到这些请求,我该如何避免这些?trequest_hosthttps://xxxx.comtrequest_uri/apple-touch-icon-precomposed.png#status404ttime_local[10/Jan/2019:12:01:25+0800]要解决此问题,请添加100×100png文件
- rails项目升级(rails3->rails4)
EvanCui
拖延了很久的rails版本升级终于告一段落了,由于目前项目作为一个大的单体应用,在讨论了几次后还是确定把rails3升级到rails4版本,最终升级到rails5.修复版本第一阶段:rails3.2-rails4.0.13预备工作:做好前期准备,比如人员分配(新功能迭代和升级工作的安排),升级中业务能不能间断等问题。确定升级方案。最终我们采用了两版本同时跑生产环境,先给rails4版本少量流量,要
- Grails3.0.x-3.1.x由hibernate4升级至hibernate5
静静黑夜
build.gradle中buildscript下面的hibernate4更换为://classpath"org.grails.plugins:hibernate4:5.0.5"classpath"org.grails.plugins:hibernate5:5.0.5"依赖更换://compile"org.grails.plugins:hibernate4"//compile"org.hibern
- Grails3文件上传到腾讯COS(OSS)
MrJonny
在build.gradle中引入依赖//腾讯云osscompile('com.qcloud:cos_api:5.4.9'){excludegroup:'org.slf4j',module:'slf4j-log4j12'}在grails-app/conf下创建一个application-oss.yml文件oss:secretId:AKI**************************H7Tise
- cas客户端无法退出问题解决
Toplhyi
记录grails3项目中使用springsecuritycas插件遇到的单点登出问题。依据文档进行cas相关配置。测试发现cas客户端退出后,其他cas客户端依然是登录状态,本文记录解决这个问题的过程。首先想到的是,客户端1退出的时候是否没有通知到cas服务端。验证:在自定义的TGTDestoryEventListener类中加上断点。结果:进入断点,cas接收到客户端的退出申请,进行了销票操作。
- grails3使用aop进行切面编程
Toplhyi
grails3使用aop进行切面编程build.gradle中加入依赖compile"org.springframework.boot:spring-boot-starter-aop"在resources.groovy中声明spring命名空间beans{xmlnsaop:"http://www.springframework.org/schema/aop"}注入bean,进行配置beans{xm
- rails3项目解析之5——rails on windows
seamoni
rails
[url=http://www.iteye.com/topic/1112927]上一篇:rails3项目解析之4——异步和定时任务[/url][b]序:[/b]本来不想写这篇,我知道在rails界,大家一直都是很鄙视在windows上做rails的象我一样的开发者。但是这几天连续看到仍然有人在不停地发帖询问railsonwindows的问题。这个解决方案我已经在本系列第2篇末尾简单地写了一段,估计
- webpack 3 零基础入门教程 #12 - 如何使用模块热替换 HMR 来处理 CSS
求知久久编程学院
原文发表于:www.rails365.net模块热替换是什么意思?以前我们使用的webpack--watch或webpack-dev-server的功能是监听文件改变,就自动刷新浏览器,而这个模块热替换不用刷新浏览器,它是只让修改到的模块,才会在浏览器上发生相应的变化,就是生效,而不是重新刷新浏览器。为什么要这么做呢?有时候模块越多,改得频繁,刷新起来还是很慢的,效率低呀。所以有了模块热替换的功能
- webpack 3 零基础入门教程 #15 - 加载和打包 Twitter Bootstrap 框架
求知久久编程学院
原文发表于:www.rails365.net这节主要来实践如何加载和打包TwitterBootstrap框架。1.准备工作先来复制一些bootstrap的代码片断。src/index.htmlStarLaunchdemomodal×Modaltitle...CloseSavechanges注意,本节使用的是bootstrap3,因为目前写这篇文章时,bootstrap4还没出正式版,所
- webpack 3 零基础入门教程 #1 - 介绍
求知久久编程学院
原文发表于:https://www.rails365.net/articles/webpack-3-ling-ji-chu-ru-men-jiao-cheng-1-jie-shao1.webpack是什么?先来说一下webpack是什么。webpack的官方对它是这样定义的:webpackisamodulebundler.ItsmainpurposeistobundleJavaScriptfile
- webpack 3 零基础入门教程 #9 - 用 clean-webpack-plugin 来清除文件
求知久久编程学院
原文发表于:www.rails365.net其实clean-webpack-plugin很容易知道它的作用,就是来清除文件的。一般这个插件是配合webpack-p这条命令来使用,就是说在为生产环境编译文件的时候,先把build或dist(就是放生产环境用的文件)目录里的文件先清除干净,再生成新的。1.为什么要用clean-webpack-plugin如果还不理解为什么要用它,就看看下面的例子就可以
- Grails 3那些事儿
追虎鲸的人
安装Grails3开发环境系统环境:OSX10.11.41.安装JDK,设置JAVA_HOME(~/.bashrc)exportJAVA_HOME=$(/usr/libexec/java_home)2.安装Groovybrewinstallgroovy3.安装Grailsbrewinstallgrails导入项目到IDEIDE:IntelliJIDEAImportProject——>选择路径——>
- 使用protues仿真stm32教程
YvesAgh
stm32仿真器经验分享
使用protues仿真stm32教程 本人小白,近期尝试使用protues仿真stm32单片机遇到了很多问题,查询了很多博客,但是没有找到一套完整合适的方法。四处碰壁之后,结合他人的博客和自己的尝试,最终找到了一套可行的方案。1.打开proteus8.6添加stm32f103C4.2.选择Design->configurepowerrails3.选择GND,选择VSSA,点击Add4.选择VCC
- 本周学到的一些东西和掉入的坑
SecondRocker
consoleActiveRecord查询输出sql语句rails3以下console内执行ActiveRecord::Base.connection.instance_variable_set:@logger,Logger.new(STDOUT)rails3以上ActiveRecord::Base.logger=Logger.newSTDOUTassocation的属性直接赋值会直接保存,并清除
- 学习网站
rekoza
rubyrubyjavascriptgit
http://lrthw.github.com/(笨方法學Ruby)http://ihower.tw/rails3/index.html(RubyonRails實戰聖經)http://deerchao.net/tutorials/regex/regex.htm(正则表达式30分钟入门教程)http://www.blogjava.net/ilovezmh/archive/2007/04/17/111
- 学习网站
rekoza
ruby正则表达式rubyjavascriptrailsubuntuweb
http://lrthw.github.com/(笨方法學Ruby)http://ihower.tw/rails3/index.html(RubyonRails實戰聖經)http://deerchao.net/tutorials/regex/regex.htm(正则表达式30分钟入门教程)http://www.blogjava.net/ilovezmh/archive/2007/04/17/111
- Grails3更换连接池为阿里巴巴Druid 可监控 sql
ctz0120
dataSource:pooled:truejmxExport:truetype:com.alibaba.druid.pool.DruidDataSourcedriverClassName:oracle.jdbc.OracleDriverformatSql:trueproperties:minIdle:50maxActive:100maxWait:60000initialSize:50testWh
- Grails3,Grails4跟换数据库连接池为(HikariCP、Druid)
斗战圣佛91
javagrailsgroovy
1、build.gradledruid:compilegroup:'com.alibaba',name:'druid',version:'1.1.21'HikariCP:compile'com.zaxxer:HikariCP:3.3.1'2、application.ymldataSource:pooled:truejmxExport:truedriverClassName:com.mysql.jd
- grails3.3 升级grails4 问题解决
斗战圣佛91
grailsspringbootgroovy
升级教程需要注意,如果引入插件,需要确认查看插件版本,有需要升级的要升级版本,否则各种问题需要注意:需要手动在build.gradle中添加相关依赖包如果出现执行报错:则手动将gradle包从3.5升级到gradle5就可以了,即:更改为distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distsdistributionUrl=ht
- grails3—配置多数据源
hxr_Null
Grails
如果grails项目中,不同的domain类型需要映射不同的数据库中的表,此时就需要连建立多个datasource去连接指定的数据库。配置连接多个库的具体实现方法为:在application.yml文件中,增加dataSources属性配置,里面包含每个具体的数据源配置。如下:如果需要实现不同的domain类连接操作不同的库,在domain类中staticmapping下还需要指定具体连接的库是哪
- Grails3 Spring Secuirty自定义加密方式
LiJonny
web开发GrailsGrails3SpringSecurity自定义加密
Grails3SpringSecuirty自定义加密方式应用场景公司老项目使用grails2.0+版本,他的加密方式为encodeAsSHA256,数据是通过导入实现,要兼容以前数据加密方式,使以前使用老项目的用户也能用原先的密码登录。首先,我做了一下测试deftest(){map.password1="123456".encodeAsSHA256()map.password2=springSec
- Grails3.2+新增了一些新东西
LiJonny
web开发Grails3GroovyGrails
grails自动注入问题记录一下一些坑Grails3.2-版可以直接在domain中注入service,在Grails3.2+中默认关闭了自动注入功能开启方式方式一grails3.3+在application.groovy中配置全局映射,若没有此脚本需新建grails.gorm.default.mapping={autowiretrue}方式二grails3.3+在需要注入bean的domain中
- Grails3更换连接池为阿里巴巴Druid
LiJonny
web开发Grails3druid连接池
Grails3默认数据库连接池为tomcat-jdbcpool,性能较druid、HikariCP差太多,所以想换成其他连接池由于默认使用的是tomcat-jdbc连接池,需要去掉依赖//runtime"com.h2database:h2"//runtime"org.apache.tomcat:tomcat-jdbc"//添加阿里巴巴druid连接池compilegroup:'com.alibab
- simple_form 中使用jquery datepicker
kimdone
RubyonRailsrails
环境:windows7professionalrails3.2.2ruby1.9.3p125simple_form(2.0.4)bootstrap-sass2.1.0目标:在simple_form中对date类型的filed可以使用以下tag=t.input:date_field,:as=>:datepicker具体操作:1.建立/app/inputs/datepicker_input.rbcla
- Grails的好处:添加健康检查指标
danpie3295
数据库javaspringmysqlspringboot
使用Grails3,我们还可以获得SpringBootActuator。我们可以使用SpringBootActuator添加一些生产就绪的功能,以监视和管理Grails应用程序。功能之一是添加一些带有有关我们应用程序信息的端点。默认情况下,当我们启动Grails(3+)应用程序时,我们已经有一个/health端点。它返回状态为UP的JSON响应。让我们扩展此端点并添加磁盘空间,数据库和URL运行状
- rails3测试理解
zhou_xingbo
应用rspecRailsGitTDDHTML
WhyRSpec?Clear,conciseandreadableGems.rspec.rspec-core.rspec-expectations.rspec-mocks.rspec-railsBasicsContextsDescribingmethodsRunningrspecspec/Formattersecho--colort>.rspec测试运行时附加参数--colour为测试输出加颜色-
- 算法 单链的创建与删除
换个号韩国红果果
c算法
先创建结构体
struct student {
int data;
//int tag;//标记这是第几个
struct student *next;
};
// addone 用于将一个数插入已从小到大排好序的链中
struct student *addone(struct student *h,int x){
if(h==NULL) //??????
- 《大型网站系统与Java中间件实践》第2章读后感
白糖_
java中间件
断断续续花了两天时间试读了《大型网站系统与Java中间件实践》的第2章,这章总述了从一个小型单机构建的网站发展到大型网站的演化过程---整个过程会遇到很多困难,但每一个屏障都会有解决方案,最终就是依靠这些个解决方案汇聚到一起组成了一个健壮稳定高效的大型系统。
看完整章内容,
- zeus持久层spring事务单元测试
deng520159
javaDAOspringjdbc
今天把zeus事务单元测试放出来,让大家指出他的毛病,
1.ZeusTransactionTest.java 单元测试
package com.dengliang.zeus.webdemo.test;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import
- Rss 订阅 开发
周凡杨
htmlxml订阅rss规范
RSS是 Really Simple Syndication的缩写(对rss2.0而言,是这三个词的缩写,对rss1.0而言则是RDF Site Summary的缩写,1.0与2.0走的是两个体系)。
RSS
- 分页查询实现
g21121
分页查询
在查询列表时我们常常会用到分页,分页的好处就是减少数据交换,每次查询一定数量减少数据库压力等等。
按实现形式分前台分页和服务器分页:
前台分页就是一次查询出所有记录,在页面中用js进行虚拟分页,这种形式在数据量较小时优势比较明显,一次加载就不必再访问服务器了,但当数据量较大时会对页面造成压力,传输速度也会大幅下降。
服务器分页就是每次请求相同数量记录,按一定规则排序,每次取一定序号直接的数据
- spring jms异步消息处理
510888780
jms
spring JMS对于异步消息处理基本上只需配置下就能进行高效的处理。其核心就是消息侦听器容器,常用的类就是DefaultMessageListenerContainer。该容器可配置侦听器的并发数量,以及配合MessageListenerAdapter使用消息驱动POJO进行消息处理。且消息驱动POJO是放入TaskExecutor中进行处理,进一步提高性能,减少侦听器的阻塞。具体配置如下:
- highCharts柱状图
布衣凌宇
hightCharts柱图
第一步:导入 exporting.js,grid.js,highcharts.js;第二步:写controller
@Controller@RequestMapping(value="${adminPath}/statistick")public class StatistickController { private UserServi
- 我的spring学习笔记2-IoC(反向控制 依赖注入)
aijuans
springmvcSpring 教程spring3 教程Spring 入门
IoC(反向控制 依赖注入)这是Spring提出来了,这也是Spring一大特色。这里我不用多说,我们看Spring教程就可以了解。当然我们不用Spring也可以用IoC,下面我将介绍不用Spring的IoC。
IoC不是框架,她是java的技术,如今大多数轻量级的容器都会用到IoC技术。这里我就用一个例子来说明:
如:程序中有 Mysql.calss 、Oracle.class 、SqlSe
- TLS java简单实现
antlove
javasslkeystoretlssecure
1. SSLServer.java
package ssl;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.security.KeyStore;
import
- Zip解压压缩文件
百合不是茶
Zip格式解压Zip流的使用文件解压
ZIP文件的解压缩实质上就是从输入流中读取数据。Java.util.zip包提供了类ZipInputStream来读取ZIP文件,下面的代码段创建了一个输入流来读取ZIP格式的文件;
ZipInputStream in = new ZipInputStream(new FileInputStream(zipFileName));
&n
- underscore.js 学习(一)
bijian1013
JavaScriptunderscore
工作中需要用到underscore.js,发现这是一个包括了很多基本功能函数的js库,里面有很多实用的函数。而且它没有扩展 javascript的原生对象。主要涉及对Collection、Object、Array、Function的操作。 学
- java jvm常用命令工具——jstatd命令(Java Statistics Monitoring Daemon)
bijian1013
javajvmjstatd
1.介绍
jstatd是一个基于RMI(Remove Method Invocation)的服务程序,它用于监控基于HotSpot的JVM中资源的创建及销毁,并且提供了一个远程接口允许远程的监控工具连接到本地的JVM执行命令。
jstatd是基于RMI的,所以在运行jstatd的服务
- 【Spring框架三】Spring常用注解之Transactional
bit1129
transactional
Spring可以通过注解@Transactional来为业务逻辑层的方法(调用DAO完成持久化动作)添加事务能力,如下是@Transactional注解的定义:
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version
- 我(程序员)的前进方向
bitray
程序员
作为一个普通的程序员,我一直游走在java语言中,java也确实让我有了很多的体会.不过随着学习的深入,java语言的新技术产生的越来越多,从最初期的javase,我逐渐开始转变到ssh,ssi,这种主流的码农,.过了几天为了解决新问题,webservice的大旗也被我祭出来了,又过了些日子jms架构的activemq也开始必须学习了.再后来开始了一系列技术学习,osgi,restful.....
- nginx lua开发经验总结
ronin47
使用nginx lua已经两三个月了,项目接开发完毕了,这几天准备上线并且跟高德地图对接。回顾下来lua在项目中占得必中还是比较大的,跟PHP的占比差不多持平了,因此在开发中遇到一些问题备忘一下 1:content_by_lua中代码容量有限制,一般不要写太多代码,正常编写代码一般在100行左右(具体容量没有细心测哈哈,在4kb左右),如果超出了则重启nginx的时候会报 too long pa
- java-66-用递归颠倒一个栈。例如输入栈{1,2,3,4,5},1在栈顶。颠倒之后的栈为{5,4,3,2,1},5处在栈顶
bylijinnan
java
import java.util.Stack;
public class ReverseStackRecursive {
/**
* Q 66.颠倒栈。
* 题目:用递归颠倒一个栈。例如输入栈{1,2,3,4,5},1在栈顶。
* 颠倒之后的栈为{5,4,3,2,1},5处在栈顶。
*1. Pop the top element
*2. Revers
- 正确理解Linux内存占用过高的问题
cfyme
linux
Linux开机后,使用top命令查看,4G物理内存发现已使用的多大3.2G,占用率高达80%以上:
Mem: 3889836k total, 3341868k used, 547968k free, 286044k buffers
Swap: 6127608k total,&nb
- [JWFD开源工作流]当前流程引擎设计的一个急需解决的问题
comsci
工作流
当我们的流程引擎进入IRC阶段的时候,当循环反馈模型出现之后,每次循环都会导致一大堆节点内存数据残留在系统内存中,循环的次数越多,这些残留数据将导致系统内存溢出,并使得引擎崩溃。。。。。。
而解决办法就是利用汇编语言或者其它系统编程语言,在引擎运行时,把这些残留数据清除掉。
- 自定义类的equals函数
dai_lm
equals
仅作笔记使用
public class VectorQueue {
private final Vector<VectorItem> queue;
private class VectorItem {
private final Object item;
private final int quantity;
public VectorI
- Linux下安装R语言
datageek
R语言 linux
命令如下:sudo gedit /etc/apt/sources.list1、deb http://mirrors.ustc.edu.cn/CRAN/bin/linux/ubuntu/ precise/ 2、deb http://dk.archive.ubuntu.com/ubuntu hardy universesudo apt-key adv --keyserver ke
- 如何修改mysql 并发数(连接数)最大值
dcj3sjt126com
mysql
MySQL的连接数最大值跟MySQL没关系,主要看系统和业务逻辑了
方法一:进入MYSQL安装目录 打开MYSQL配置文件 my.ini 或 my.cnf查找 max_connections=100 修改为 max_connections=1000 服务里重起MYSQL即可
方法二:MySQL的最大连接数默认是100客户端登录:mysql -uusername -ppass
- 单一功能原则
dcj3sjt126com
面向对象的程序设计软件设计编程原则
单一功能原则[
编辑]
SOLID 原则
单一功能原则
开闭原则
Liskov代换原则
接口隔离原则
依赖反转原则
查
论
编
在面向对象编程领域中,单一功能原则(Single responsibility principle)规定每个类都应该有
- POJO、VO和JavaBean区别和联系
fanmingxing
VOPOJOjavabean
POJO和JavaBean是我们常见的两个关键字,一般容易混淆,POJO全称是Plain Ordinary Java Object / Plain Old Java Object,中文可以翻译成:普通Java类,具有一部分getter/setter方法的那种类就可以称作POJO,但是JavaBean则比POJO复杂很多,JavaBean是一种组件技术,就好像你做了一个扳子,而这个扳子会在很多地方被
- SpringSecurity3.X--LDAP:AD配置
hanqunfeng
SpringSecurity
前面介绍过基于本地数据库验证的方式,参考http://hanqunfeng.iteye.com/blog/1155226,这里说一下如何修改为使用AD进行身份验证【只对用户名和密码进行验证,权限依旧存储在本地数据库中】。
将配置文件中的如下部分删除:
<!-- 认证管理器,使用自定义的UserDetailsService,并对密码采用md5加密-->
- mac mysql 修改密码
IXHONG
mysql
$ sudo /usr/local/mysql/bin/mysqld_safe –user=root & //启动MySQL(也可以通过偏好设置面板来启动)$ sudo /usr/local/mysql/bin/mysqladmin -uroot password yourpassword //设置MySQL密码(注意,这是第一次MySQL密码为空的时候的设置命令,如果是修改密码,还需在-
- 设计模式--抽象工厂模式
kerryg
设计模式
抽象工厂模式:
工厂模式有一个问题就是,类的创建依赖于工厂类,也就是说,如果想要拓展程序,必须对工厂类进行修改,这违背了闭包原则。我们采用抽象工厂模式,创建多个工厂类,这样一旦需要增加新的功能,直接增加新的工厂类就可以了,不需要修改之前的代码。
总结:这个模式的好处就是,如果想增加一个功能,就需要做一个实现类,
- 评"高中女生军训期跳楼”
nannan408
首先,先抛出我的观点,各位看官少点砖头。那就是,中国的差异化教育必须做起来。
孔圣人有云:有教无类。不同类型的人,都应该有对应的教育方法。目前中国的一体化教育,不知道已经扼杀了多少创造性人才。我们出不了爱迪生,出不了爱因斯坦,很大原因,是我们的培养思路错了,我们是第一要“顺从”。如果不顺从,我们的学校,就会用各种方法,罚站,罚写作业,各种罚。军
- scala如何读取和写入文件内容?
qindongliang1922
javajvmscala
直接看如下代码:
package file
import java.io.RandomAccessFile
import java.nio.charset.Charset
import scala.io.Source
import scala.reflect.io.{File, Path}
/**
* Created by qindongliang on 2015/
- C语言算法之百元买百鸡
qiufeihu
c算法
中国古代数学家张丘建在他的《算经》中提出了一个著名的“百钱买百鸡问题”,鸡翁一,值钱五,鸡母一,值钱三,鸡雏三,值钱一,百钱买百鸡,问翁,母,雏各几何?
代码如下:
#include <stdio.h>
int main()
{
int cock,hen,chick; /*定义变量为基本整型*/
for(coc
- Hadoop集群安全性:Hadoop中Namenode单点故障的解决方案及详细介绍AvatarNode
wyz2009107220
NameNode
正如大家所知,NameNode在Hadoop系统中存在单点故障问题,这个对于标榜高可用性的Hadoop来说一直是个软肋。本文讨论一下为了解决这个问题而存在的几个solution。
1. Secondary NameNode
原理:Secondary NN会定期的从NN中读取editlog,与自己存储的Image进行合并形成新的metadata image
优点:Hadoop较早的版本都自带,
Login options
Glad you liked it. Would you like to share?
Sharing this page ...
Thanks! Close
Add New Comment
Showing 1 comments