现在位置: 首页 > treldinee发表的所有文章
  • 09月
  • 07日
综合 ⁄ 共 4672字 评论关闭
在struts配置文件当中加入国际化的配置,本文是在struts.xml当中添加的 <constant name="struts.custom.i18n.resources" value="applicationResource"></constant> 根据国际化配置当中value的值需要加入与之对应的properties文件,笔者采用中文简体、中文繁体、美国英文作为系统语言所以相应的资源文件命名如下: 中文简体文件名为applicationResource_zh_CN.properties 中文繁体文件名为applicationResource_zh_TW.properties 美国英文文件名为applicationResource_en_US.properties 资源文件命名格式:filename_l......
阅读全文
  • 07月
  • 21日
移动开发 ⁄ 共 1954字 评论关闭
    拖动条(SeekBar)组件与ProgressBar水平形式显示的进度条比较相似,不过其最大的区别在于,   拖动条可以由用户组件进行手工调节,例如:调整播放音量和播放进度时会用到拖动条。     在main.xml中 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:orientation="vertical" >      <SeekBar        android:id="@+id/seekbar"        androi......
阅读全文
  • 05月
  • 13日
综合 ⁄ 共 12041字 评论关闭
login.jsp [html] view plaincopy <%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>   <%   String path = request.getContextPath();   String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   %>      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">   <html>     <head>       <base href="<%=basePath%>">                </head>          <body bgcolor = "pin......
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 1117字 评论关闭
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int a[303][303],maxn[9][9][301][301],n,m; void initRmq() { int i,j,x,y; for(i=0;i<n;i++) for(j=0;j<m;j++) maxn[0][0][i][j]=a[i][j]; for(i=0;(1<<i)<n;i++) for(j=0;(1<<j)<m;j++) for(x=0;x+(1<<i)<=n;x++) for(y=0;y+(1<<j)<=m;y++) if(i || j) { if(i) maxn[i][j][x][y]=max(maxn[i-1][j][x][y],maxn[i-1][j][x+(1<<(i-1))][y]); ......
阅读全文
  • 02月
  • 24日
综合 ⁄ 共 459字 评论关闭
题目链接~~>                     这一题我感觉是考验你的优化能力,一种方法(这题很不淡定,因为Case Wa了两次)。 代码: #include<stdio.h> int main() { long long int n,i,j,sum,k ; int q=1 ; while(scanf("%lld",&n)!=EOF) { sum=0 ; for(i=1;i*i<=n;i++)// 找因子 只需找到sqrt(n) ;分两步:如果i*i!=n ; { // 再去找n/i 情况 例如:n=10 ,i=2时 分别找2和5的所有因子 if(n%i==0) { k=n/i ;......
阅读全文
  • 06月
  • 08日
综合 ⁄ 共 3369字 评论关闭
  RFC2544 Performance Testing                                        --2010.11.29 Throughput 吞吐量, 各自包长, 在不丢包的前提下, 得出DUT在不同的包长的最大转发速率, 为Throughput; Throughput 和 包长有关, 完整的报告中包括同一DUT的每个包长的Throughput值;      Definition: The maximum rate at which none of the offered frames are dropped by the device.   Measurement units: N-octet input frames per second input bits per second   Issues: single path vs. aggregate  load unidirectional vs bidirectio......
阅读全文
  • 05月
  • 23日
综合 ⁄ 共 1989字 评论关闭
fmt:formatDate的输出格式 <fmt:formatDate value="${isoDate}" type="both"/> 2004-5-31 23:59:59 <fmt:formatDate value="${date}" type="date"/> 2004-4-1 <fmt:formatDate value="${isoDate}" type="time"/> 23:59:59 <fmt:formatDate value="${isoDate}" type="date" dateStyle="default"/> 2004-5-31 <fmt:formatDate value="${isoDate}" type="date" dateStyle="short"/> 04-5-31 <fmt:formatDate value="${isoDate}" type="date" dateStyle="medium"/> 2004-5-31 <fmt......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 196字 评论关闭
推公式 #include<cstdio> #define mod 1000000007 int n; long long ans[1000001]; int main(){ scanf("%d",&n);n++; ans[1]=0;ans[2]=1; for(int i=3;i<=n;i++) ans[i]=(ans[i-1]*2+ans[i-2])%mod; printf("%lld",ans[n]); return 0; }
阅读全文
  • 04月
  • 21日
综合 ⁄ 共 497字 评论关闭
       求欧拉函数单值,水题。题意:给你一个数n,求出大于0小于n的正整数中与n的最大公约数大于1的数的个数。        我的解题思路:与n的公约数大于1的数的个数就是与n不互素的数的个数。这里有个坑,首先就是小于n,因此输出应该是n - 1 - phi(n)。        我的解题代码: #include <stdio.h> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <algorithm> using namespace std; int Phi(int x); int main() { int x; while (~scanf("%......
阅读全文
  • 04月
  • 03日
综合 ⁄ 共 305字 评论关闭
环境:VC++6.0     C++版本:  #include<iostream>using namespace std; void main(){ int line = __LINE__;  //注意:LINE前后分别是两个下划线“-”(半角状态下) char * file = __FILE__; cout<<line<<endl; cout<<file<<endl;}     C版本: #include<stdio.h> void main(){ int line = __LINE__; char * file = __FILE__; printf("%d/n", line); printf("%s/n", file);}     运行结果,请大家自己去运行吧!  
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 1235字 评论关闭
一直想做一个自己的ajax框架,所以要给自己的JavaScript要恶补一下。 最近在看Javascript权威指南第四版,有10000多页,象字典一样。不过确实够权威的。 javascript的提供的对象比较少,不象java一样,有List,ArrayList,Map,HashMap等各种数据对象。于是就利用javascript的对象技术,封装了一个类似于java里的Map对象 //自定义的Map对象 functionMap(){ this.elements=newArray(); this.size=function(){ returnthis.elements.length; } this.put=function(_key,_value){ this.elements.push({key:_key,value:_value}); } this.re......
阅读全文
  • 12月
  • 01日
综合 ⁄ 共 2579字 评论关闭
  成熟到优秀的瓶颈问题     很多程序员到了成熟阶段后,就会处于一个停滞状态。技术上已经驾轻就熟,工作上已经按部就班,心里虽然感觉有些不甘,但是何去何从他们显得很茫然很无助。我认为程序员到了成熟阶段后,如果还想要向优秀阶段发展,一定会遇到这个瓶颈的,穿过这个瓶颈就会走进另一片开阔的前景,穿不过则会停留在原地止步不前。 1、技术瓶颈 技术上的瓶颈是很明显的,主要表现在,对学习缺乏热情,对技术缺乏钻研,对新技术发展缺乏了解等三个主要方面。其中原因主要是:第一,成熟的程序员编程技术已经能够满足开发软......
阅读全文