- LLM 词汇表
落难Coder
LLMsNLP大语言模型大模型llama人工智能
Contextwindow“上下文窗口”是指语言模型在生成新文本时能够回溯和参考的文本量。这不同于语言模型训练时所使用的大量数据集,而是代表了模型的“工作记忆”。较大的上下文窗口可以让模型理解和响应更复杂和更长的提示,而较小的上下文窗口可能会限制模型处理较长提示或在长时间对话中保持连贯性的能力。Fine-tuning微调是使用额外的数据进一步训练预训练语言模型的过程。这使得模型开始表示和模仿微调数
- 未来网络体系结构和SDN的研究进展-毕军
拟声的主扬
专题sdn网络结构互联网软件
未来网络体系结构和SDN的研究进展-毕军在讨论互联网体系结构的基础上,毕军介绍未来网络体系结构的主要国际学术研究进展。介绍了软件定义网(SDN)的发展现状,讨论SDN的体系结构,提出一种SDN体系结构的抽象模型。最后,介绍一种未来网络体系结构创新环境(FINE)体系结构。阅读全文和小伙伴们一起来吐槽
- 新加坡 - A Fine City
小土也
前两天和朋友吃饭,聊到了各自对新加坡的看法,发现这个城市真是让人又爱又恨。我曾经在新加坡学习4年,后又去英国学习3年,期间也去过不少欧洲的城市。和其它去过的城市相比,新加坡可以说是最安全的一个城市了,犯罪率非常低,真的达到了夜不闭户的程度。曾经住过寄宿家庭,晚上真的不锁门。然而,这种安全感对于人们的生活和商业发展固然是非常好的,但也造成了人们自由度的被压缩。比如,新加坡全面禁烟,就连室外的遮雨棚下
- GitBook 本地使用排雷,及导出基本可用的 PDF 版本
AlphaHinex
原文地址:https://alphahinex.github.io/2022/09/18/gitbook-export-fine-enough-pdf/coverdescription:"总结了离线环境使用GitBook以及将GitBook编写的文档导出成PDF时可能会遇到的问题和解决办法"date:2022.09.1810:34categories:-Booktags:[GitBook]keyw
- 深度解析:大模型微调的原理、应用与实践
longfei.li
人工智能神经网络
引言最近在公司落地AI产品的过程中,与团队小伙伴深入探讨和测试了大模型微调,同时也跟多个业内专家进行了交流和学习。相信很多人在实际落地大模型应用的时候都会有个疑问:到底要不要做微调模型?我的结论是在实际落地的过程中绝大多数场景是不需要做的,所以今天主要跟大家分享一下什么是Fine-tuning、Fine-tuning的原理以及Fine-tuning的应用,以帮助大家在工作中更好的理解大模型微调。什
- CLIP-Adapter: Better Vision-Language Models with Feature Adapters
Tsukinousag
对比语言图像预训练(CLIP)虽然prompt-tuning用于textualinputs,但是建议CLIPAdapter在视觉或语言分支上使用功能适配器进行fine-tuneCLIPAdapter采用了一个额外的瓶颈层来学习新的特征,并将剩余的特征与原始的预训练特征进行混合。为了更好地适应vision语言模型,使用功能适配器,而不是快速调整1.ClassifierWeightGeneration
- redis常用操作命令
diffiii
Redisredisbootstrap数据库
登录redis客户端./src/redis-cli-h127.0.0.1-c-p6379-a123456退出redis客户端127.0.0.1:6379>exit显示服务器时间,时间戳(秒),微秒数127.0.0.1:6379>time当前数据库key的数量127.0.0.1:6379>dbsize查询所有key127.0.0.1:6379>keys*模糊查询以fine为前缀的key值127.0.
- 嵌入式初学-C语言-二九
GoDve丨
c语言开发语言前端算法数据结构c++
C语言编译步骤预处理编译汇编链接什么是预处理预处理就是在源文件(如.c文件)编译之前,所进行的一部分预备操作,这部分操作是由预处理程序自动完成,当源文件在编译时,编译器会自动调用预处理指令的解析,预处理指令解析完成才能进入下一步的编译过程为了能够方便看到编译细节,使用以下命令gcc源文件-E-o程序名[.后缀]预处理的功能宏定义作用域fine命令出现在程序中函数的外面,宏名的有效范围为定义命令之后
- 关于航班延误的吐槽
垚夢語
哎,谁还不是家里的小公主呢,襁褓里长大,温室里成长,我们也有一颗“玻璃心”,只不过,我们已经变成了“钢化玻璃”,无坚不摧。我非常同情延误给你们带来的不便,给你们造成的有形或是无形的损失,可是,but,我们也不想啊!我也TM的很想让飞机飞起来啊!可是,延误这种事,就是鸡蛋碰石头的事情,你我这种尔等小人,怎么能和国家想要军事演习抗衡!你们带着怒气上来,我对你们笑脸相迎,你甩我一个白眼,OK,fine,
- #LLM入门|Prompt#1.8_聊天机器人_Chatbot
向日葵花籽儿
LLM入门教程笔记prompt机器人microsoft
聊天机器人设计以会话形式进行交互,接受一系列消息作为输入,并返回模型生成的消息作为输出。原本设计用于简便多轮对话,但同样适用于单轮任务。设计思路个性化特性:通过定制模型的训练数据和参数,使机器人拥有特定的个性化特点。专门任务设计:针对特定任务或行为进行设计,模型可针对该任务进行Fine-tune,提高效果和准确性。优势简化开发:减少了构建聊天机器人所需的工作量和复杂度。灵活性:模型可根据需求进行定
- 预训练大模型LLM的微调PEFT(概述)
若石之上
人工智能人工智能LLMpeft微调LORA
前言大模型现在已经不是什么新奇玩意了,大家都耳熟能详,我们都知道大模型要从头到尾的训练,需要巨大的人力物力,如此高昂的费用小公司是难以承受的,那么我们是否可以像牛顿一样,站在巨人的肩膀上,利用已经训练好的大模型进行二次训练以适用于我们自己的应用呢?回答当然是肯定的,我们只需要极少量的训练数据和资源,就能将大模型改造以适应我们的应用。微调的分类对大模型进行二次训练的操作我们通常称为微调(Fine-T
- 随笔20190328
努力的小坤
健身房偶遇外国友人,自以为自己英语水平高超,却不知对方第一句话我便绞尽脑汁,他说howareyou.按照书本正常的回答应该是fine,thankyou,andyou。却觉得这个回答太书面话,但是却也想不出更好的回答,便回了fine。之后他问了什么话,只觉得满脑子问号,你在说啥,这次对话真心打击了我对自己英语的信心。我需要更加努力的学习英语了,只为了和实验室的国外友人正常交流。
- ARTS-04月22日到04月28日
needrunning
算法练习给定一个整数数组,判断是否存在重复元素。如果任何值在数组中出现至少两次,函数返回true。如果数组中每个元素都不相同,则返回false。setclassSolution:defcontainsDuplicate(self,nums):""":typenums:List[int]:rtype:bool"""returnlen(set(nums))!=len(nums)此解法借助于列表和集合是
- 学习笔记:使用 Amazon Bedrock 进行图像生成
AmazonBedrock全新发布在2023年的亚马逊云科技re:Invent全球云计算大会上,最令人瞩目的一项更新莫过于AmazonBedrock的全新升级。亚马逊云科技此次为其大模型托管服务引入了Fine-tuning、Agents、KnowledgeBases和Guardrails等一系列创新功能。这些功能的加入意味着客户现在能以更加高效、智能和安全的方式构建各种应用,标志着亚马逊云科技在推
- 预训练和微调在迁移学习中的作用
一条小小yu
迁移学习人工智能机器学习
在机器学习和深度学习中,"pre-training"(预训练)和"fine-tuning"(微调)是两个常见且重要的概念,它们通常在迁移学习场景中使用,以提高模型在特定任务上的性能。预训练(Pre-training)预训练是指在一个大型且通常与目标任务相关但不完全相同的数据集上训练模型的过程。这个阶段的目的是让模型学习到一些通用的特征或知识,这些特征或知识可以帮助模型在后续的特定任务上表现更好。预
- Prompt Tuning:深度解读一种新的微调范式
lichunericli
LLM人工智能语言模型prompt
阅读该博客,您将系统地掌握如下知识点:什么是预训练语言模型?什么是prompt?为什么要引入prompt?相比传统fine-tuning有什么优势?自20年底开始,prompt的发展历程,哪些经典的代表方法?面向不同种类NLP任务,prompt如何选择和设计?面向超大规模模型,如何借助prompt进行参数有效性训练?面向GPT3,什么是In-ContextLearning?什么是Chain-Of-
- 陪伴就是一种幸福 -----纸箱车制作纪实
小贝bunny
陪伴就是一种幸福-----纸箱车制作纪实六年小学生涯,每一年的科技节我们都过,但像今年集科学(Science),技术(Technology),工程(Engineering),艺术(Arts),数学(Mathematics)多领域融合的STEAM小组合作的活动在我的印象中却是第一次。整个过程也很漫长,第一周选人、发放材料到最后的比赛,一共三周时间,其中制作的过程历经了两周。第一周当小组成员拿到几个大
- 119.乐理基础-五线谱-五线谱的标记
染指1110
乐理基础-五线谱音乐理论音乐
内容参考于:三分钟音乐社上一个内容:音值组合法(二)力度记号:简谱里什么意思,五线谱也完全是什么意思,p越多就越弱,f越多就越强,然后这些渐强、渐弱、sf、fp这些标记都是与简谱一模一样的意思(力度记号)速度记号:rit、rall就表示渐慢,accel就是渐快,atempo表示回原速(速度记号)反复记号:反复记号(二)D.C.、D.S.、Fine、Coda、反复记号(一)反复、跳房子五线谱版:区间
- first day
jiusi
今天第一天加入日更挑战,也是第一天写作,还啥都不知道,也还没加进群。ok。开始。firstday父母给我介绍了个相亲对象,fine,我是好孩子,当然要去参加了…期待是没期待,办法也是没办法。对于相亲对象的了解,是个男的,没了。无所谓,我也没打算成,见个面就够了。我叫应三角,没谈过恋爱,也一事无成,没有理想也没有上进心,脑子也还算灵活,但是非常懒也不愿意努力,OK,就是个非常普通的路人。此时我正穿着
- 小周带你正确理解Prompt-engineering,RAG,fine-tuning工程化的地位和意义
周博洋K
人工智能
有人会说:"小周,几天不见这么拉了,现在别说算法了,连code都不讲了,整上方法论了。"我并没有拉!而且方法论很重要,尤其工程化的时候,你总得知道每种技术到底适合干啥,其实主要是现实中,我在项目里发现大家对这块其实并不是分的很清楚。所以我来给大家捋一捋,因为这毕竟直接取决于你设计的解决方案是否能真正解决问题如上图所示,OpenAI把对于优化LLM返回结果分为两个方向,一个方向是横坐标系的对LLM模
- 小周带你正确理解Prompt-engineering,RAG,fine-tuning工程化的地位和意义
周博洋K
prompt人工智能
有人会说:"小周,几天不见这么拉了,现在别说算法了,连code都不讲了,整上方法论了。"我并没有拉!而且方法论很重要,尤其工程化的时候,你总得知道每种技术到底适合干啥,其实主要是现实中,我在项目里发现大家对这块其实并不是分的很清楚。所以我来给大家捋一捋,因为这毕竟直接取决于你设计的解决方案是否能真正解决问题如上图所示,OpenAI把对于优化LLM返回结果分为两个方向,一个方向是横坐标系的对LLM模
- 工作与音乐
季中
很多人都喜欢在工作、学习的时候听音乐,觉得这样有助于保持专注,真的是这样吗?罗格斯大学社会心理学教授约翰·阿耶洛(JohnR.Aiello)和柏鲁克学院心理学教授玛努尔·冈萨雷斯对此做了一项调查,发现听音乐对工作学习的影响取决于音乐类型和人的个性。这项研究发表在《应用实验心理学杂志》(JournalofExperimentalPsychology:Applied)上。研究人员招募了142名本科生,
- 论文解读《Zero-Shot Category-Level Object Pose Estimation》类别级6D位姿估计
ZYLer_
6D位姿估计人工智能计算机视觉
论文:《Zero-ShotCategory-LevelObjectPoseEstimation》该文整体感觉不难,处理流程比较新颖,可以重点参考。Code:https://github.com/applied-ai-lab/zero-shot-pose(48star)摘要:解决问题:实例级姿态估计的问题。=>**零样本(也就是预测未见过的物体(没有该实例的数据标记和CAD模型),类别级)**预测来
- 英语小神童养成计划4 Hello之后怎么打招呼?(为什么有的话我们不好意思说)
一念x
6.Howareyou?你好吗?7.Fine,thanks.Andyou?很好,谢谢,你呢?8.I'mfine,too.我也很好。(摘自英语900句)这个可能是每个中国人都特别熟悉的表达,这是英语教科书上的教科书式的表达。现在很多人都已经用这三句表达,来当笑话讲,每次当我们笑着把这些话说出来的时候,对方一定可以立刻接上,达到神默契的程度。这三句话会把我们瞬间拉入到,几年前、十几年前、甚至几十年前的
- 大模型基础理论学习笔记——大模型适配
maximejia
人工智能学习笔记人工智能自然语言处理语言模型
本文目录7.大模型适配7.1大模型适配基础要素7.2当前主流大模型适配方法7.2.1探针方法(Probing)(1)探针方法介绍(2)基于probing的大模型适配7.2.2微调方法(Fine-tuning)(1)指令微调方法(Instructionfine-tuning)7.2.3轻量级微调(LightweightFine-tuning)(1)提示调整(PromptTuning)(2)前缀调整(
- [算法前沿]--059-大语言模型Fine-tuning踩坑经验之谈
三更科技公社
AI前沿与LLMchatGPT人工智能
前言由于ChatGPT和GPT4兴起,如何让人人都用上这种大模型,是目前AI领域最活跃的事情。当下开源的LLM(Largelanguagemodel)非常多,可谓是百模大战。面对诸多开源本地模型,根据自己的需求,选择适合自己的基座模型和参数量很重要。选择完后需要对训练数据进行预处理,往往这一步就难住很多同学,无从下手,更别说training。然后再对模型进行finetuning来更好满足自己的下游
- OpenAI API 介绍
YGL_smile
oneapiai
OpenAIAPI介绍开始我们的第一个例子模型查询可使用的模型预测结果创建一个预测对话创建一次对话编辑创建一个编辑图片生成一张图片修改图片创建图片的变体声音将录音转成文本翻译文件当前文件列表删除文件微调(Fine-tunes)创建Fine-tune任务获得fine-tune任务列表取消某个fine-tune任务获得某个fine-tune任务状态删除某个fine-tune任务官方API文档:http
- 现代大学英语精读第二版(第六册)学习笔记(原文及全文翻译)——8 - Housewifely Arts(家庭主妇的艺术)
预见未来to50
英语翻译作品英语精读其他
Unit8-HousewifelyArtsHousewifelyArtsMeganMayhewBergmanIammyownhousewife,myownbreadwinner.Imakelunchesandchangelightbulbs.Ikissbruisesandkillcopperheadsfromthebackyardcreekwithasteelhoe.Ichangesheetsan
- 当初说好的一起吃一起浪一起胖,结果你却偷偷塑了型?
健康的野小兽
难得休了一次小长假(5天),想着能够到处浪,在家里躺尸一天后,和朋友相约出去玩,本应该愉快的一天,却被两个不速之客搅乱了———前任,和他的现任。Fine,小地方就这么点儿,碰到个熟人也不稀奇,地球绕一圈还能转回来呢。然而出于某种不知名的心理,我偷瞄了他的前任一眼。好吧,其实有好几眼。这一看就糟心了。四肢纤细,蜂腰翘臀,一抬手还能看到隐约露出来的马甲线……我下意识的低头看了自己一眼,粗壮的手臂,丰满
- Scaling Laws for Forgetting When Fine-Tuning Large Language Models
UnknownBody
LLM语言模型人工智能算法
本文是LLM系列文章,针对《ScalingLawsforForgettingWhenFine-TuningLargeLanguageModels》的翻译。微调大型语言模型时遗忘的比例律摘要1引言2相关工作和背景3方法和实验设置4经验结果和遗忘规律5结论摘要我们研究并量化了在下游任务中微调预先训练的大型语言模型(LLM)时的遗忘问题。我们发现,参数有效微调(PEFT)策略,如低秩适配器(LoRA),
- jvm调优总结(从基本概念 到 深度优化)
oloz
javajvmjdk虚拟机应用服务器
JVM参数详解:http://www.cnblogs.com/redcreen/archive/2011/05/04/2037057.html
Java虚拟机中,数据类型可以分为两类:基本类型和引用类型。基本类型的变量保存原始值,即:他代表的值就是数值本身;而引用类型的变量保存引用值。“引用值”代表了某个对象的引用,而不是对象本身,对象本身存放在这个引用值所表示的地址的位置。
- 【Scala十六】Scala核心十:柯里化函数
bit1129
scala
本篇文章重点说明什么是函数柯里化,这个语法现象的背后动机是什么,有什么样的应用场景,以及与部分应用函数(Partial Applied Function)之间的联系 1. 什么是柯里化函数
A way to write functions with multiple parameter lists. For instance
def f(x: Int)(y: Int) is a
- HashMap
dalan_123
java
HashMap在java中对很多人来说都是熟的;基于hash表的map接口的非同步实现。允许使用null和null键;同时不能保证元素的顺序;也就是从来都不保证其中的元素的顺序恒久不变。
1、数据结构
在java中,最基本的数据结构无外乎:数组 和 引用(指针),所有的数据结构都可以用这两个来构造,HashMap也不例外,归根到底HashMap就是一个链表散列的数据
- Java Swing如何实时刷新JTextArea,以显示刚才加append的内容
周凡杨
java更新swingJTextArea
在代码中执行完textArea.append("message")后,如果你想让这个更新立刻显示在界面上而不是等swing的主线程返回后刷新,我们一般会在该语句后调用textArea.invalidate()和textArea.repaint()。
问题是这个方法并不能有任何效果,textArea的内容没有任何变化,这或许是swing的一个bug,有一个笨拙的办法可以实现
- servlet或struts的Action处理ajax请求
g21121
servlet
其实处理ajax的请求非常简单,直接看代码就行了:
//如果用的是struts
//HttpServletResponse response = ServletActionContext.getResponse();
// 设置输出为文字流
response.setContentType("text/plain");
// 设置字符集
res
- FineReport的公式编辑框的语法简介
老A不折腾
finereport公式总结
FINEREPORT用到公式的地方非常多,单元格(以=开头的便被解析为公式),条件显示,数据字典,报表填报属性值定义,图表标题,轴定义,页眉页脚,甚至单元格的其他属性中的鼠标悬浮提示内容都可以写公式。
简单的说下自己感觉的公式要注意的几个地方:
1.if语句语法刚接触感觉比较奇怪,if(条件式子,值1,值2),if可以嵌套,if(条件式子1,值1,if(条件式子2,值2,值3)
- linux mysql 数据库乱码的解决办法
墙头上一根草
linuxmysql数据库乱码
linux 上mysql数据库区分大小写的配置
lower_case_table_names=1 1-不区分大小写 0-区分大小写
修改/etc/my.cnf 具体的修改内容如下:
[client]
default-character-set=utf8
[mysqld]
datadir=/var/lib/mysql
socket=/va
- 我的spring学习笔记6-ApplicationContext实例化的参数兼容思想
aijuans
Spring 3
ApplicationContext能读取多个Bean定义文件,方法是:
ApplicationContext appContext = new ClassPathXmlApplicationContext(
new String[]{“bean-config1.xml”,“bean-config2.xml”,“bean-config3.xml”,“bean-config4.xml
- mysql 基准测试之sysbench
annan211
基准测试mysql基准测试MySQL测试sysbench
1 执行如下命令,安装sysbench-0.5:
tar xzvf sysbench-0.5.tar.gz
cd sysbench-0.5
chmod +x autogen.sh
./autogen.sh
./configure --with-mysql --with-mysql-includes=/usr/local/mysql
- sql的复杂查询使用案列与技巧
百合不是茶
oraclesql函数数据分页合并查询
本片博客使用的数据库表是oracle中的scott用户表;
------------------- 自然连接查询
查询 smith 的上司(两种方法)
&
- 深入学习Thread类
bijian1013
javathread多线程java多线程
一. 线程的名字
下面来看一下Thread类的name属性,它的类型是String。它其实就是线程的名字。在Thread类中,有String getName()和void setName(String)两个方法用来设置和获取这个属性的值。
同时,Thr
- JSON串转换成Map以及如何转换到对应的数据类型
bijian1013
javafastjsonnet.sf.json
在实际开发中,难免会碰到JSON串转换成Map的情况,下面来看看这方面的实例。另外,由于fastjson只支持JDK1.5及以上版本,因此在JDK1.4的项目中可以采用net.sf.json来处理。
一.fastjson实例
JsonUtil.java
package com.study;
impor
- 【RPC框架HttpInvoker一】HttpInvoker:Spring自带RPC框架
bit1129
spring
HttpInvoker是Spring原生的RPC调用框架,HttpInvoker同Burlap和Hessian一样,提供了一致的服务Exporter以及客户端的服务代理工厂Bean,这篇文章主要是复制粘贴了Hessian与Spring集成一文,【RPC框架Hessian四】Hessian与Spring集成
在
【RPC框架Hessian二】Hessian 对象序列化和反序列化一文中
- 【Mahout二】基于Mahout CBayes算法的20newsgroup的脚本分析
bit1129
Mahout
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information re
- nginx三种获取用户真实ip的方法
ronin47
随着nginx的迅速崛起,越来越多公司将apache更换成nginx. 同时也越来越多人使用nginx作为负载均衡, 并且代理前面可能还加上了CDN加速,但是随之也遇到一个问题:nginx如何获取用户的真实IP地址,如果后端是apache,请跳转到<apache获取用户真实IP地址>,如果是后端真实服务器是nginx,那么继续往下看。
实例环境: 用户IP 120.22.11.11
- java-判断二叉树是不是平衡
bylijinnan
java
参考了
http://zhedahht.blog.163.com/blog/static/25411174201142733927831/
但是用java来实现有一个问题。
由于Java无法像C那样“传递参数的地址,函数返回时能得到参数的值”,唯有新建一个辅助类:AuxClass
import ljn.help.*;
public class BalancedBTree {
- BeanUtils.copyProperties VS PropertyUtils.copyProperties
诸葛不亮
PropertyUtilsBeanUtils
BeanUtils.copyProperties VS PropertyUtils.copyProperties
作为两个bean属性copy的工具类,他们被广泛使用,同时也很容易误用,给人造成困然;比如:昨天发现同事在使用BeanUtils.copyProperties copy有integer类型属性的bean时,没有考虑到会将null转换为0,而后面的业
- [金融与信息安全]最简单的数据结构最安全
comsci
数据结构
现在最流行的数据库的数据存储文件都具有复杂的文件头格式,用操作系统的记事本软件是无法正常浏览的,这样的情况会有什么问题呢?
从信息安全的角度来看,如果我们数据库系统仅仅把这种格式的数据文件做异地备份,如果相同版本的所有数据库管理系统都同时被攻击,那么
- vi区段删除
Cwind
linuxvi区段删除
区段删除是编辑和分析一些冗长的配置文件或日志文件时比较常用的操作。简记下vi区段删除要点备忘。
vi概述
引文中并未将末行模式单独列为一种模式。单不单列并不重要,能区分命令模式与末行模式即可。
vi区段删除步骤:
1. 在末行模式下使用:set nu显示行号
非必须,随光标移动vi右下角也会显示行号,能够正确找到并记录删除开始行
- 清除tomcat缓存的方法总结
dashuaifu
tomcat缓存
用tomcat容器,大家可能会发现这样的问题,修改jsp文件后,但用IE打开 依然是以前的Jsp的页面。
出现这种现象的原因主要是tomcat缓存的原因。
解决办法如下:
在jsp文件头加上
<meta http-equiv="Expires" content="0"> <meta http-equiv="kiben&qu
- 不要盲目的在项目中使用LESS CSS
dcj3sjt126com
Webless
如果你还不知道LESS CSS是什么东西,可以看一下这篇文章,是我一朋友写给新人看的《CSS——LESS》
不可否认,LESS CSS是个强大的工具,它弥补了css没有变量、无法运算等一些“先天缺陷”,但它似乎给我一种错觉,就是为了功能而实现功能。
比如它的引用功能
?
.rounded_corners{
- [入门]更上一层楼
dcj3sjt126com
PHPyii2
更上一层楼
通篇阅读完整个“入门”部分,你就完成了一个完整 Yii 应用的创建。在此过程中你学到了如何实现一些常用功能,例如通过 HTML 表单从用户那获取数据,从数据库中获取数据并以分页形式显示。你还学到了如何通过 Gii 去自动生成代码。使用 Gii 生成代码把 Web 开发中多数繁杂的过程转化为仅仅填写几个表单就行。
本章将介绍一些有助于更好使用 Yii 的资源:
- Apache HttpClient使用详解
eksliang
httpclienthttp协议
Http协议的重要性相信不用我多说了,HttpClient相比传统JDK自带的URLConnection,增加了易用性和灵活性(具体区别,日后我们再讨论),它不仅是客户端发送Http请求变得容易,而且也方便了开发人员测试接口(基于Http协议的),即提高了开发的效率,也方便提高代码的健壮性。因此熟练掌握HttpClient是很重要的必修内容,掌握HttpClient后,相信对于Http协议的了解会
- zxing二维码扫描功能
gundumw100
androidzxing
经常要用到二维码扫描功能
现给出示例代码
import com.google.zxing.WriterException;
import com.zxing.activity.CaptureActivity;
import com.zxing.encoding.EncodingHandler;
import android.app.Activity;
import an
- 纯HTML+CSS带说明的黄色导航菜单
ini
htmlWebhtml5csshovertree
HoverTree带说明的CSS菜单:纯HTML+CSS结构链接带说明的黄色导航
在线体验效果:http://hovertree.com/texiao/css/1.htm代码如下,保存到HTML文件可以看到效果:
<!DOCTYPE html >
<html >
<head>
<title>HoverTree
- fastjson初始化对性能的影响
kane_xie
fastjson序列化
之前在项目中序列化是用thrift,性能一般,而且需要用编译器生成新的类,在序列化和反序列化的时候感觉很繁琐,因此想转到json阵营。对比了jackson,gson等框架之后,决定用fastjson,为什么呢,因为看名字感觉很快。。。
网上的说法:
fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工程师开发。
- 基于Mybatis封装的增删改查实现通用自动化sql
mengqingyu
DAO
1.基于map或javaBean的增删改查可实现不写dao接口和实现类以及xml,有效的提高开发速度。
2.支持自定义注解包括主键生成、列重复验证、列名、表名等
3.支持批量插入、批量更新、批量删除
<bean id="dynamicSqlSessionTemplate" class="com.mqy.mybatis.support.Dynamic
- js控制input输入框的方法封装(数字,中文,字母,浮点数等)
qifeifei
javascript js
在项目开发的时候,经常有一些输入框,控制输入的格式,而不是等输入好了再去检查格式,格式错了就报错,体验不好。 /** 数字,中文,字母,浮点数(+/-/.) 类型输入限制,只要在input标签上加上 jInput="number,chinese,alphabet,floating" 备注:floating属性只能单独用*/
funct
- java 计时器应用
tangqi609567707
javatimer
mport java.util.TimerTask; import java.util.Calendar; public class MyTask extends TimerTask { private static final int
- erlang输出调用栈信息
wudixiaotie
erlang
在erlang otp的开发中,如果调用第三方的应用,会有有些错误会不打印栈信息,因为有可能第三方应用会catch然后输出自己的错误信息,所以对排查bug有很大的阻碍,这样就要求我们自己打印调用的栈信息。用这个函数:erlang:process_display (self (), backtrace).需要注意这个函数只会输出到标准错误输出。
也可以用这个函数:erlang:get_s