??xml version="1.0" encoding="utf-8" standalone="yes"?>
SOA是一U服务集成的架构思想Q超具体的技术和架构Q又늛具体的技术和架构。SOA的最常见的解x案是SCAQ其ơ还有JBIQBPEL、SDO也勉强可以算做SOA的解x案之一Q因为后两者也是ؓ了系l解耦和集成提供了支持?br />
SCA是服务组件架构,是SOA思想的最行的一U实现方式,SOA思想的实现除了SCA外,q要JBI{?br />
ESB是SCA思想实现的基设施。ESB主要作用是集中注册发布服务,为服务与传输协议之间解耦。ƈ不是所有的SOA架构都需要ESBQESB是SCAҎ的。当然Q何符合ESB特征的解x式都可以UC为ESBQ也不仅仅是SCA内部的?br />
lg所qͼ以上概念都是一个理c一U思想Qƈ非特指代某个现有的实现或解决ҎQ这是v初接触SOA Ҏ犯的概念上的错误?br />
]]>
The AndroidManifest.xml File
<activity android:windowSoftInputMode=["stateUnspecified",
"stateUnchanged", "stateHidden",
"stateAlwaysHidden", "stateVisible",
"stateAlwaysVisible", "adjustUnspecified",
"adjustResize", "adjustPan"] …… >
</activity>
attributes:
android:windowSoftInputMode
zd的主H口如何与包含屏q上的Y键盘H口交互。这个属性的讄会影响两g事情:
1> 软键盘的状态——是否它是隐藏或昄——当zd(Activity)成ؓ用户x的焦炏V?/p>
2> zd的主H口调整——是否减活动主H口大小以便腑ևI间放Y键盘或是否当zdH口的部分被软键盘覆盖时它的内容的当前焦Ҏ可见的?/p>
它的讄必须是下面列表中的一个|或一?#8221;state…”值加一?#8221;adjust…”值的l合。在Ml设|多个值——多?#8221;state…”valuesQ例如&mdash有未定义的结果。各个g间用|分开。例? <activity android:windowSoftInputMode="stateVisible|adjustResize" . . . >
在这讄的??stateUnspecified"?adjustUnspecified"以外)覆盖在主题中设|的?/p>
?描述
"stateUnspecified" 软键盘的状?是否它是隐藏或可?没有被指定。系l将选择一个合适的状态或依赖于主题的讄。这个是Z软g盘行为默认的讄?br />
"stateUnchanged" 软键盘被保持无论它上ơ是什么状态,是否可见或隐藏,当主H口出现在前面时?br />
"stateHidden" 当用户选择该ActivityӞ软键盘被隐藏——也是Q当用户定D到该ActivityӞ而不是返回到它由于离开另一个Activity?br />
"stateAlwaysHidden" 软键盘L被隐藏的Q当该Activityȝ口获取焦Ҏ?br />
"stateVisible" 软键盘是可见的,当那个是正常合适的?当用户导航到Activityȝ口时)?br />
"stateAlwaysVisible" 当用户选择q个ActivityӞ软键盘是可见的——也是Q也是Q当用户定D到该ActivityӞ而不是返回到它由于离开另一个Activity?br />
"adjustUnspecified" 它不被指定是否该Activityȝ口调整大以便留Y键盘的空_或是否窗口上的内容得到屏q上当前的焦Ҏ可见的。系l将自动选择q些模式中一U主要依赖于是否H口的内ҎM布局视图能够滚动他们的内宏V如果有q样的一个视图,q个H口调整大,q样的假讑֏以滚动H口的内容在一个较的区域中可见的。这个是ȝ口默认的行ؓ讄?br />
"adjustResize" 该Activityȝ口L被调整屏q的大小以便留出软键盘的I间?br />
"adjustPan" 该Activityȝ口ƈ不调整屏q的大小以便留出软键盘的I间。相反,当前H口的内容将自动Ud以便当前焦点从不被键盘覆盖和用户能L看到输入内容的部分。这个通常是不期望比调整大,因ؓ用户可能关闭软键盘以便获得与被覆盖内容的交互操作?br />
/*
* 讄Edit Text只读
*/
private OnFocusChangeListener focus_listener_noIM = new OnFocusChangeListener(){
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus==true) {
hideIM(v);
}
}
};
/*
* 讄Edit Text只读
*/
private OnTouchListener touch_listener_noIM = new OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction()==MotionEvent.ACTION_DOWN) {
hideIM(v);
}
return false;
}
};
list_view.xml://L?/p>
view plaincopy to clipboardprint?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/list_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="#ffc9c9c9"
android:dividerHeight="1px"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/list_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="#ffc9c9c9"
android:dividerHeight="1px"/>
</LinearLayout>
item_custom.xml://定义惌的布局效果
view plaincopy to clipboardprint?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="58px"
android:gravity="center_vertical"
>
<ImageView android:id="@+id/index_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ImageView>
<TextView android:id="@+id/index_text"
android:layout_width="wrap_content"
android:layout_height="50px"
android:textSize="20sp"
android:layout_marginLeft="10px"
android:gravity="center"
android:textColor="#ff000000">
</TextView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="58px"
android:gravity="center_vertical"
>
<ImageView android:id="@+id/index_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ImageView>
<TextView android:id="@+id/index_text"
android:layout_width="wrap_content"
android:layout_height="50px"
android:textSize="20sp"
android:layout_marginLeft="10px"
android:gravity="center"
android:textColor="#ff000000">
</TextView>
</LinearLayout>
E序代码Q?/p>
view plaincopy to clipboardprint?
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
public class CustomListview extends Activity {
private ListView mListView;
private List<String> items;
@Override
public void onCreate(Bundle savedInstanceStated) {
super.onCreate(savedInstanceStated);
setContentView(R.layout.list_view);
mListView = (ListView) findViewById(R.id.list_view);
fillArray();
mListView.setAdapter(new CustomListAdapter(this));
}
private void fillArray() {
items = new ArrayList<String>();
items.add("白天");
items.add("黑天");
items.add("多云");
items.add("微风");
items.add("晴天");
}
class CustomListAdapter extends BaseAdapter {
private LayoutInflater mInflater;
private Context mContext = null;
public CustomListAdapter(Context context) {
mContext = context;
mInflater = LayoutInflater.from(mContext);
}
public Object getItem(int arg0) {
// TODO Auto-generated method stub
return items.get(arg0);
}
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
public int getCount() {
// TODO Auto-generated method stub
return items.size();
}
public View getView(int position, View convertView,
android.view.ViewGroup parent) {
final ImageView indexImage;
final TextView indexText;
if (convertView == null) {
// 和item_custom.xml脚本兌
convertView = mInflater.inflate(R.layout.item_custom, null);
}
indexImage = (ImageView) convertView.findViewById(R.id.index_image);
indexText = (TextView) convertView.findViewById(R.id.index_text);
// 讄item中indexText的文?nbsp;
indexText.setText(items.get(position).toString());
indexText.setTextColor(Color.RED);
// 讄item中ImageView的图?nbsp;
indexImage.setBackgroundResource(R.drawable.icon);
return convertView;
}
}
}
代码Q?/p>
view plaincopy to clipboardprint?
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
public class MyListView4 extends Activity {
private List<Map<String, Object>> mData;
ListView setlistViewLeft;
MyAdapter adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list);
mData = getData();
setlistViewLeft = (ListView)findViewById(R.id.listleft);
adapter = new MyAdapter(this);
setlistViewLeft.setAdapter(adapter);
setlistViewLeft.setOnItemClickListener(mLeftListOnItemClick);
}
private List<Map<String, Object>> getData() {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
Map<String, Object> map = new HashMap<String, Object>();
map.put("title", "G1");
map.put("info", "google 1");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G2");
map.put("info", "google 2");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G3");
map.put("info", "google 3");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G4");
map.put("info", "google 4");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G5");
map.put("info", "google 5");
list.add(map);
return list;
}
AdapterView.OnItemClickListener mLeftListOnItemClick = new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3) {
adapter.setSelectItem(arg2);
adapter.notifyDataSetInvalidated();
// adapter.notifyDataSetChanged();
}
};
/**
* listview中点L键弹出对话框
*/
public final class ViewHolder {
public TextView titleText;
public TextView infoText;
}
public class MyAdapter extends BaseAdapter {
private LayoutInflater mInflater;
public MyAdapter(Context context) {
this.mInflater = LayoutInflater.from(context);
}
public int getCount() {
// TODO Auto-generated method stub
return mData.size();
}
public Object getItem(int arg0) {
// TODO Auto-generated method stub
return mData.get(arg0);
}
public long getItemId(int arg0) {
// TODO Auto-generated method stub
return arg0;
}
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
convertView = mInflater.inflate(R.layout.leftview, null);
holder.titleText = (TextView) convertView.findViewById(R.id.titleleftlist);
holder.infoText = (TextView) convertView.findViewById(R.id.infoleftlist);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.titleText.setText((String) mData.get(position).get("title"));
holder.infoText.setText((String) mData.get(position).get("info"));
if (position == selectItem) {
convertView.setBackgroundColor(Color.RED);
}
else {
convertView.setBackgroundColor(Color.TRANSPARENT);
}
//convertView.getBackground().setAlpha(80);
return convertView;
}
public void setSelectItem(int selectItem) {
this.selectItem = selectItem;
}
private int selectItem=-1;
}
}
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
public class MyListView4 extends Activity {
private List<Map<String, Object>> mData;
ListView setlistViewLeft;
MyAdapter adapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list);
mData = getData();
setlistViewLeft = (ListView)findViewById(R.id.listleft);
adapter = new MyAdapter(this);
setlistViewLeft.setAdapter(adapter);
setlistViewLeft.setOnItemClickListener(mLeftListOnItemClick);
}
private List<Map<String, Object>> getData() {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
Map<String, Object> map = new HashMap<String, Object>();
map.put("title", "G1");
map.put("info", "google 1");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G2");
map.put("info", "google 2");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G3");
map.put("info", "google 3");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G4");
map.put("info", "google 4");
list.add(map);
map = new HashMap<String, Object>();
map.put("title", "G5");
map.put("info", "google 5");
list.add(map);
return list;
}
AdapterView.OnItemClickListener mLeftListOnItemClick = new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,long arg3) {
adapter.setSelectItem(arg2);
adapter.notifyDataSetInvalidated();
// adapter.notifyDataSetChanged();
}
};
/**
* listview中点L键弹出对话框
*/
public final class ViewHolder {
public TextView titleText;
public TextView infoText;
}
public class MyAdapter extends BaseAdapter {
private LayoutInflater mInflater;
public MyAdapter(Context context) {
this.mInflater = LayoutInflater.from(context);
}
public int getCount() {
// TODO Auto-generated method stub
return mData.size();
}
public Object getItem(int arg0) {
// TODO Auto-generated method stub
return mData.get(arg0);
}
public long getItemId(int arg0) {
// TODO Auto-generated method stub
return arg0;
}
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
convertView = mInflater.inflate(R.layout.leftview, null);
holder.titleText = (TextView) convertView.findViewById(R.id.titleleftlist);
holder.infoText = (TextView) convertView.findViewById(R.id.infoleftlist);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.titleText.setText((String) mData.get(position).get("title"));
holder.infoText.setText((String) mData.get(position).get("info"));
if (position == selectItem) {
convertView.setBackgroundColor(Color.RED);
}
else {
convertView.setBackgroundColor(Color.TRANSPARENT);
}
//convertView.getBackground().setAlpha(80);
return convertView;
}
public void setSelectItem(int selectItem) {
this.selectItem = selectItem;
}
private int selectItem=-1;
}
}
android 自定义adapter extends BaseAdapterQ做有自己布局的listView
或:
siteListView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,int position, long id) {
for(int i=0;i<parent.getCount();i++){
View v=parent.getChildAt(parent.getCount()-1-i);
if (position == i) {
v.setBackgroundColor(Color.RED);
} else {
v.setBackgroundColor(Color.TRANSPARENT);
}
}
}
});
共有属性:
java代码中通过btn1兌ơ控?br />
android:id="@+id/btn1"
控g宽度
android:layout_width="80px" //"80dip"?80dp"
android:layout_width =“wrap_content”
android:layout_width =“match_parent”
控g高度
android:layout_height="80px" //"80dip"?80dp"
android:layout_height =“wrap_content”
android:layout_height =“match_parent”
控g排布
android:orientation="horizontal”
android:orientation="vertical“
控g间距
android:layout_marginLeft="5dip" //距离左边
android:layout_marginRight="5dip" //距离双
android:layout_marginTop="5dip" //距离上面
android:layout_marginRight="5dip" //距离下面
控g昄位置
android:gravity="center" //left,right, top, bottom
android:gravity="center_horizontal"
android:layout_gravity是本元素对父元素的重力方向?br /> android:layout_gravity属性则讄控g本n相对于父控g的显CZ|?br /> android:gravity是本元素所有子元素的重力方向?/p>
android:layout_gravity="center_vertical"
android:layout_gravity="left"
android:layout_gravity="left|bottom"
TextView中文本字?br />
android:text="@String/text1" //在string.xml中定义text1的?br />
android:textSize="20sp"
android:textColor=”#ff123456”
android:textStyle="bold" //普通(normalQ, 斜体QitalicQ,_斜体(bold_italicQ?/p>
定义控g是否可见
android:visibility=”visible” //可见
android:visibility=”invisible” //不可见,但是在布局中占用的位置q在
android:visibility=”gone” //不可见,完全从布局中消?/p>
定义背景囄
android:background="@drawable/img_bg" //img_bg为drawable下的一张图?/p>
seekbar控g背景囄及最大?br />
android:progressDrawable="@drawable/seekbar_img"
android:thumb="@drawable/thumb"
android:max = "60"
仅在RelativeLayout中有效:
在父亲布局的相对位|?br />
android:layout_alignParentLeft="true" //在布局左边
android:layout_alignParentRight="true" //在布局双
android:layout_alignParentTop="true" //在布局上面
android:layout_alignParentBottom="true " //在布局的下?/p>
在某个控件的相对位置
android:layout_toRightOf="@id/button1" //在控件button1的右边,不仅仅是紧靠着
android:layout_toLeftOf="@id/button1" //在控件button2的左边,不仅仅是紧靠着
android:layout_below="@id/button1 " //在控件button1下面Q不仅仅是正下方
android:layout_above=“@id/button1” //在控件button1下面,不仅仅是正下?/p>
定义和某控g对奇
android:layout_alignTop=”@id/button1” //和控件button1上对?br />
android:layout_alignBottom=”@id/button1” //和控件button1下对?br />
android:layout_alignLeft=”@id/button1” //和控件button1左对?br />
android:layout_alignRight=”@id/button1” //和控件button2叛_?/p>
android:layout_centerHorizontal="true" //水^居中
android:layout_centerVertical="true"
android:layout_centerInParent="true"
仅在LinearLayout中有?br /> 讄控g在一排或一列中所占比例?br /> android:layout_weight="1"
是一个自动保存模板,比如写着word文档时电脑非正常xQ再启动计算机后word会启动关机前保存的文档,使你的损失降为最低。(Z说一句,word默认10分钟自动保存一ơ,我们可以?#8220;工具/选项/保存”Q将自动保存旉间隔修改?分钟Q这样可以把非正常关机引L文档损失降ؓ最。)
解决办法Q?
1、删除你使用的用户名下的TEMP所有文?OFFICE在你安装时的备䆾文g,清空所有系l的日记信息...也就是删除Normat.dot模板文g?卛_除G:\Documents and Settings\用户名\Application Data\Microsoft\Templates\Normal.dot文gQ?
2、点开始,在运行中输入“winword /a”可以启动wordQ此时不会有无法打开对话框出玎ͼword文档另存一下,会提C是否替换normal.dotQ这时word用新的模板替换损坏的那个Q选择是。这样word可以正常启动了……
二、可能是包含了OFFICE的错误信息,而注册表无法更新?
解决办法Q?
1、进入控刉板的d删除E序,WINDOWSlg,随便选择一个把打沟取消?定,更新以后,在进入添加删除程序的WINDOWSlg,把打沟还?..再确?
作用?当你在添加或者删除WINDOWSlg的时?pȝ会自动更新注册表的内?把错误信息删?更新.
(当然,WINDOWS优化大师的医生程序也可以删除非法注册表信?但不及系l自己搞?)
2、确认上面所有操作之?你再重新安装OFFICE ?
三、解军_法:
点开始,在运行中输入“winword /a”可以启动wordQ我们打开“工具/选项/常规”Q找?#8220;打开时更新自动方式的链接”q一选项Q看见前面选择框里的对勾了吗?直接把它Lp了。保存退出。重新启动试一下,一切正常,OKQ!Q?
四、注意:有时可能通过上面的办法还是解决不了问题,q样的话Q可能问题就出在输入法上了,主要是微软拼?.0输入法,把它删除问题可以得到解决Q?
删除ҎQ控刉?--> 区域和语a选项----->语言 ----->详细信息Q在已安装的服务中选中微Y拼音3.0输入法,点右边的删除Q!或可以用优化大师Q兔子YӞ360来删除。。?
五、解x法:
word2003打开时提C?E序错误,word可以帮助你尝试修复错?q提C发送错?提示的标题是{错误,PINTLGNT.IME出现错误,但是其他的officeE序工作正常,l过反复的重装和修复以后,故障依然不能排除,查找发现PINTLGNT.IME文g是微软拼韌入法3.0的文?在此之前我记得我曄卸蝲q这个输入法.对于q个错误直有Ҏ不着头脑.搜烦了整个磁盘也没找个这个文件的t媄,搞得更是一头雾?通过再次分析发现要想Lq个注册可以q行regsvr32 /u PINTLGNT.IME.在运行里输入q个命o以后,提示成功.重新打开word问题已经排除.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range[*]
ActiveX的注册表?/font>
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\[0-4]\[*]
[0-4]
?nbsp; 讄
------------------------------
0 我的电脑
1 本地 Intranet 区域
2 受信ȝ站点区域
3 Internet 区域
4 受限制的站点区域
[*]
1001 下蝲已签名的 ActiveX 控g
1004 下蝲未签名的 ActiveX 控g
1200 q行 ActiveX 控g和插?br />
1201 Ҏ有标Cؓ安全?ActiveX 控gq行初始化和脚本q行
1405 ҎCؓ可安全执行脚本的 ActiveX 控g执行脚本
2201 ActiveX 控g自动提示 **
弹出H口LE序HKEY_CURRENT_USERHKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMgr
具体脚本如下:
<SCRIPT LANGUAGE="JavaScript">
<!--
var WshShell=new ActiveXObject("WScript.Shell");
//d信Q站点ip
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range100\\","");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range100\\http","2","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Ranges\\Range100\\:Range","192.168.1.5");
//修改IE ActiveX安全讄 1本地 Intranet 区域2受信ȝ站点区域3Internet 区域
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1001","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1004","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1200","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1201","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\1405","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\1\\2201","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\\1001","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\\1004","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\\1200","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\\1201","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\\1405","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\2\\2201","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1001","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1004","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1200","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1201","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1405","0","REG_DWORD");
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\2201","0","REG_DWORD");
//用Winxp弹出H口LE序
WshShell.RegWrite("HKCU\\Software\\Microsoft\\Internet Explorer\\New Windows\\PopupMgr","no");
//-->
</SCRIPT>
<2009-7-3 上午09?6?3U?CST> <Error> <HTTP> <BEA-101019> <[weblogic.servlet.internal.WebAppServletContext@5d7554 - appName: 'traffic', name: 'WebRoot',
context-path: ''] Servlet failed with IOException
java.io.IOException: failed to read '2' bytes from InputStream; clen: 6016 remaining: 2 count: 6014
at weblogic.servlet.internal.ChunkOutput.writeStream(ChunkOutput.java:417)
at weblogic.servlet.internal.ChunkOutputWrapper.writeStream(ChunkOutputWrapper.java:168)
at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:498)
at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:486)
at weblogic.servlet.FileServlet.sendFile(FileServlet.java:405)
Truncated. see log file for complete stacktrace
>
是不是下面的代码有什么问题?
InputStream fis = null;
BufferedOutputStream bos = null;
try {
String dpId = session.getAttribute("dp_id")==null?"":session.getAttribute("dp_id").toString();
String nameReport=request.getParameter("nameReport");
String workbook = request.getParameter("workbook");
if(workbook==null || "".equals(workbook)){
workbook = session.getAttribute("dp_id").toString();
}
String tempworkbook = workbook +"/";
tempworkbook = tempworkbook.replaceAll("d作薄/",dpId+"/");
if(tempworkbook.endsWith("/")){
tempworkbook = tempworkbook.substring(0,tempworkbook.length()-1);
}
fis = request.getInputStream();
bos = new BufferedOutputStream(new FileOutputStream(new File(strAbsPath+"workbookspace\\"+tempworkbook+"\\"+nameReport+".cll")));
int b = fis.read();
while (b != -1) {
bos.write(b);
b = fis.read();
}
}catch (Exception e) {
e.printStackTrace();
}finally{
bos.flush();
bos.close();
fis.close();
bos = null;
fis = null;
}
原因Q因为workbook路径中包含了I格?/p>
Step1Q安装WebLogic和ApacheQ这自然׃必说了,但要提醒大家Q装WebLogic的时候,要用custome方式Q将plugin勾上Q否则呆会儿你会找不到Apache需要的文g?/p>
Step2Q复制文Ӟ以我机器上安装的实际路径ZQ?br /> C:\bea\weblogic92\server\plugin\win\32目录下的mod_wl_20.so文g复制?br /> C:\Program Files\Apache Group\Apache2\modulesq个目录下?/p>
Step3Q修改Apache的httpd.conf文gQ增加如下内容:
LoadModule weblogic_module modules/mod_wl_20.so
<IfModule mod_weblogic.c>
Include conf/Weblogic.conf
</IfModule>
Step4Q在httpd.conf相同的目录下增加文g Weblogic.conf(q个文g是W?步中定义的文?Q内容如下:
# Weblogic.conf file
WebLogicHost localhost #看看q里Q我们的Apache也可以不跟WebLogic装同一台机器上?br />
WebLogicPort 7001
MatchExpression / #比如q是WebLogic上发布的应用的Web Root
MatchExpression *.jsp
MatchExpression *.do
WLLogFile /tmp/wlproxy.log
注意Q这个文仉面最好不要有多余的空gcȝ东西Q否则Apache启动时可能报错?/p>
Step5Q重启ApacheQ测试?br />
整合IISQ?br />
W一步,修改apache的http.conf在其加蝲下面模块Q去掉下面模块前?
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
W二步,修改apache的http.conf在其加入
NameVirtualHost *:80
<VirtualHost *:80>
ProxyPreserveHost On
ServerName www.xjzyaq.com
ProxyPass / http://203.171.230.103:7001/
ProxyPassReverse / http://203.171.230.103:7001/
</VirtualHost>
<VirtualHost *:80>
ProxyPreserveHost On
ServerName mail.xjzyaq.com
ProxyPass / http://203.171.230.103:81/
ProxyPassReverse / http://203.171.230.103:81/
</VirtualHost>
<VirtualHost *:80>
ProxyPreserveHost On
ServerName www.xjzyaq.cn
ProxyPass / http://203.171.230.103:82/
ProxyPassReverse / http://203.171.230.103:82/
</VirtualHost>
2、在d出问题的服务器上Q?单击“开?#8221;Q指?#8220;理工具”Q然后单?#8220;l端服务配置”?/p>
3?单击“服务器设|?#8221;Q然后双?#8220;授权模式”?/p>
4、将“授权模式”更改?#8220;每用?#8221;Q然后单?#8220;定”?以后׃会出现此c问题了?/p>
原因QWindow Server 2003 不管?#8220;用户 CAL”。这是_即许可证服务器数据库中有一?#8220;用户 CAL”Q它在被使用时也不会减少。这样就不会Z让每个用户都有一个有效的l端服务?(TS) CAL 而根?#8220;最l用戯可协?#8221;(EULA) 的要求删除管理员。在没有使用“讑֤ CAL”的情况下Q如果不是每个用户都有一?#8220;用户 CAL”Q就会违?EULA?/p>
public class UtilTool {
public static Map getParameterMap(HttpServletRequest request) {
Map paramMap = new LinkedHashMap();
String pathInfoStr = request.getPathInfo();
if (pathInfoStr != null && pathInfoStr.length() > 0) {
if (!pathInfoStr.endsWith("/")) pathInfoStr += "/";
int current = pathInfoStr.indexOf('/');
int last = current;
while ((current = pathInfoStr.indexOf('/', last + 1)) != -1) {
String element = pathInfoStr.substring(last + 1, current);
last = current;
if (element.charAt(0) == '~' && element.indexOf('=') > -1) {
String name = element.substring(1, element.indexOf('='));
String value = element.substring(element.indexOf('=') + 1);
paramMap.put(name, value);
}
}
}
java.util.Enumeration e = request.getParameterNames();
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
paramMap.put(name, request.getParameter(name));
}
if (paramMap.size() == 0) {
Map multiPartMap = (Map) request.getAttribute("multiPartMap");
if (multiPartMap != null && multiPartMap.size() > 0) {
paramMap.putAll(multiPartMap);
}
}
return paramMap;
}
public static String requestParameter(HttpServletRequest request){
String fromstr="<form name='request' method='POST'>";
Enumeration requestKeys = request.getParameterNames();
Map requestValues=UtilTool.getParameterMap(request);
String rkey = null;
for(;requestKeys.hasMoreElements();){
rkey = (String) requestKeys.nextElement();
fromstr+="<input name='"+rkey+"' value='"+requestValues.get(rkey)+"' type='hidden'>";
}
fromstr+="</form><script>function reload(){request.submit()}</script>";
return fromstr;
}
}
Jsp调用Q?/p>
<%=UtilTool.requestParameter(request)%>
q样当需要调用弹出窗口ƈh当前|如:
针对当前늚h
window.location.reload();
改ؓ
reload();
一、CSS HACK
以下两种Ҏ几乎能解决现今所有HACK.
一、CSS HACK
以下两种Ҏ几乎能解决现今所有HACK.
1?!important
随着IE7?important的支? !important Ҏ现在只针对IE6的HACK.(注意写法.记得该声明位|需要提?)
<style>
#wrapper
{
width: 100px!important; /* IE7+FF */
width: 80px; /* IE6 */
}
</style>
2、IE6/IE77对FireFox
*+html ?*html 是IEҎ的标{? firefox 暂不支持.?+html 又ؓ IE7Ҏ标签.
<style>
#wrapper
{
#wrapper { width: 120px; } /* FireFox */
*html #wrapper { width: 80px;} /* ie6 fixed */
*+html #wrapper { width: 60px;} /* ie7 fixed, 注意序 */
}
</style>
注意:
*+html 对IE7的HACK 必须保证HTML剙有如下声明:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
二、万?float 闭合(非常重要!)
关于 clear float 的原理可参见 [How To Clear Floats Without Structural Markup]
以下代码加入Global CSS ?l需要闭合的div加上 class="clearfix" 卛_,屡试不爽.
<style>
/* Clear Fix */
.clearfix:after
{
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
.clearfix
{
display:inline-block;
}
/* Hide from IE Mac */
.clearfix {display:block;}
/* End hide from IE Mac */
/* end of clearfix */
</style>
1, !important
随着IE7?important的支? !important Ҏ现在只针对IE6的HACK.(注意写法.记得该声明位|需要提?)
2, IE6/IE77对FireFox
*+html ?*html 是IEҎ的标{? firefox 暂不支持.?+html 又ؓ IE7Ҏ标签.
注意:
*+html 对IE7的HACK 必须保证HTML剙有如下声明:
二、万?float 闭合(非常重要!)
关于 clear float 的原理可参见 [How To Clear Floats Without Structural Markup]
以下代码加入Global CSS ?l需要闭合的div加上 class="clearfix" 卛_,屡试不爽.
三、其他兼Ҏ?再次啰嗦)
1, FF下给 div 讄 padding 后会D width ?height 增加, 但IE不会.(可用!important解决)
2, 居中问题.
1).垂直居中.?line-height 讄?当前 div 相同的高? 再通过 vertical-align: middle.( 注意内容不要换行.)
2).水^居中. margin: 0 auto;(当然不是万能)
3, 若需l?a 标签内内容加?样式, 需要设|?display: block;(常见于导航标{?
4, FF ?IE ?BOX 理解的差异导致相?2px 的还有设?float的div在ie?margin加倍等问题.
5, ul 标签?FF 下面默认?list-style. ?padding . 最好事先声? 以避免不必要的麻? (常见于导航标{֒内容列表)
6, 作ؓ外部 wrapper ?div 不要定死高度, 最好还加上 overflow: hidden.以达到高度自适应.
7, 关于手Ş光标. cursor: pointer. 而hand 只适用?IE.
1 针对firefox ie6 ie7的css样式
现在大部分都是用!important来hackQ对于ie6和firefox试可以正常昄Q?br />
但是ie7?important可以正确解释Q会D面没按要求昄Q找C个针
对IE7不错的hack方式是使用“*+html”Q现在用IE7览一下,应该没有问题了?br />
现在写一个CSS可以q样Q?br />
#1 { color: #333; } /* Moz */
* html #1 { color: #666; } /* IE6 */
*+html #1 { color: #999; } /* IE7 */
那么在firefox下字体颜色显CZؓ#333QIE6下字体颜色显CZؓ#666QIE7下字体颜色显CZؓ#999?br />
2 css布局中的居中问题
主要的样式定义如下:
body {TEXT-ALIGN: center;}
#center { MARGIN-RIGHT: auto; MARGIN-LEFT: auto; }
说明Q?br />
首先在父U元素定义TEXT-ALIGN: center;q个的意思就是在父元素内的内容居中Q对于IEq样讑֮已l可以了?br />
但在mozilla中不能居中。解军_法就是在子元素定义时候设定时再加?#8220;MARGIN-RIGHT: auto;MARGIN-LEFT: auto; ”
需要说明的是,如果你想用这个方法整个面要居中,不要套在一个DIV里,你可以依ơ拆出多个divQ?br />
只要在每个拆出的div里定义MARGIN-RIGHT: auto;MARGIN-LEFT: auto; 可以了?br />
3 盒模型不同解?
#box{ width:600px; //for ie6.0- w\idth:500px; //for ff+ie6.0}
#box{ width:600px!important //for ff width:600px; //for ff+ie6.0 width /**/:500px; //for ie6.0-}
4 动ie产生的双倍距?br />
#box{ float:left; width:100px; margin:0 0 0 100px; //q种情况之下IE会?00px的距?display:inline; //使Q动忽略}
q里l说一下block,inline两个元素,Block元素的特Ҏ:L在新行上开?高度,宽度,行高,边距都可以控?块元?;Inline元素的特Ҏ:和其他元素在同一行上,...不可控制(内嵌元素);
#box{ display:block; //可以为内嵌元素模拟ؓ块元?display:inline; //实现同一行排列的的效?diplay:table;
5 IE与宽度和高度的问?br />
IE不认得min-q个定义Q但实际上它把正常的width和height当作有min的情冉|ѝ这样问题就大了Q如果只用宽度和高度Q?br />
正常的浏览器里这两个值就不会变,如果只用min-width和min-height的话QIE下面Ҏ{于没有讄宽度和高度?br />
比如要设|背景图片,q个宽度是比较重要的。要解决q个问题Q可以这P
#box{ width: 80px; height: 35px;}html>body #box{ width: auto; height: auto; min-width: 80px; min-height: 35px;}
6 面的最宽?br />
min-width是个非常方便的CSS命oQ它可以指定元素最也不能于某个宽度Q这样就能保证排版一直正。但IE不认得这个,
而它实际上把width当做最宽度来ѝؓ了让q一命o在IE上也能用Q可以把一?/p>
p对象中的内容
var count=3;
function CheckAll(sender)
{
var _array = document.getElementsByTagName("input");
for (var i=0;i<_array.length;i++)
{
var e = _array[i];
if (e.type == "checkbox")
{
if(e.id != "chkAll")
{
e.checked = sender.checked;
}
}
}
}
function AddRow(obj)
{
count++;
//d一?
var newTr = testTbl.insertRow();
newTr.setAttribute("id","tr" + count.toString());
//d两列
var newTd0 = newTr.insertCell();
var newTd1 = newTr.insertCell();
//讄列内容和属?
newTd0.innerHTML = '<input type=checkbox id="box'+ count.toString() +'">';
newTd1.innerText= 'W?+ count.toString() +'?;
}
function DelRow()
{
var tb = document.getElementById("testTbl");
if(tb.hasChildNodes)
{
var lastchild = tb.childNodes[0].childNodes[tb.childNodes[0].childNodes.length-1];
if(lastchild)
{
if(confirm("认删除" + lastchild.childNodes[1].childNodes[0].nodeValue + "?"))
{
var removednode = lastchild.parentNode.removeChild(lastchild);
//alert(removednode.childNodes[1].childNodes[0].nodeValue);
return true;
}
else
{
return false;
}
}
}
}
function ShowCheckboxID()
{
var message = "";
var _array = document.getElementsByTagName("input");
for (var i=0;i<_array.length;i++)
{
var e = _array[i];
if (e.type == "checkbox")
{
//alert(e.id);
message += e.id + ",";
}
}
if(message.length > 0)
{
message = message.substr(0,message.length-1);
}
alert(message);
}
function ShowTRID()
{
var tb = document.getElementById("testTbl");
if(tb.hasChildNodes)
{
var message = "";
var array_tr = tb.childNodes[0].childNodes;
for(var i=0;i< array_tr.length;i++)
{
if(i==0)
{
message += array_tr[i].id;
}
else
{
message += ","+array_tr[i].id;
}
//alert(array_tr[i].id);
}
alert(message);
}
}
function SplitStr()
{
var str = document.getElementById("txt1").value;
var _array = str.split(",");
var result = "";
for(var i=0;i<_array.length;i++)
{
result += _array[i] +"\r\n";
}
if(result.length > 0)
{
result = result.substr(0,result.length-2);
}
alert(result);
}
</script>
<body>
<table id="testTbl" style="border: solid 1px #D2D2D2">
<tr id="tr0">
<td><input type=checkbox id="chkAll" onclick="CheckAll(this);"></td>
<td>全?lt;/td>
</tr>
<tr id="tr1">
<td ><input type=checkbox id="box1"></td>
<td>W??lt;/td>
</tr>
<tr id="tr2">
<td ><input type=checkbox id="box2"></td>
<td>W??lt;/td>
</tr>
<tr id="tr3">
<td ><input type=checkbox id="box3"></td>
<td>W??lt;/td>
</tr>
</table>
<br />
<input type="button" id="btnAdd" onclick="AddRow();" value="Add Row" />
<input type="button" id="btnDel" onclick="DelRow();" value="Del Row" />
<input type="button" id="btnShowCheckboxID" onclick="ShowCheckboxID();" value="Show Checkbox ID" />
<input type="button" id="btnShowTRID" onclick="ShowTRID();" value="Show TR ID" />
<hr size="1" />
<input type="text" id="txt1" value="She,sells,seashells,by,the,seashore" size="50" style="cursor:pointer" />
<input type="button" id="btnSplit" onclick="SplitStr();" value="split string" />
</body>
</html>
==============================
删除表格行:
<script>function deleteRow (tableID, rowIndex) {
var table =document.all[tableID].deleteRow(rowIndex);
}
</script>
<table id=mxh border=1>
<tr><td>W??lt;/td><td onclick="deleteRow('mxh',this.parentElement.rowIndex)">删除本行</td></tr>
<tr><td>W??lt;/td><td onclick="deleteRow('mxh',this.parentElement.rowIndex)">删除本行</td></tr>
<tr><td>W??lt;/td><td onclick="deleteRow('mxh',this.parentElement.rowIndex)">删除本行</td></tr>
<tr><td>W??lt;/td><td onclick="deleteRow('mxh',this.parentElement.rowIndex)">删除本行</td></tr>
</table>