天气预报服务
在网上搜索了很久,竟然找不到提供 天气预报服务的 web service,很多方法都是抓取网页来生成数据。虽然yahoo weather提供rss格式的输出,但只能用于个人与非商业用途。
想不明白,中央气象台为什么不提供这种公众服务?纳税人的钱是怎么花的?
有个什么气象台的下属公司,提供气象收费服务。
以前也找过一些国标之类的资料,竟然都要出钱买的,花那么多纳税人的钱去做研究,成果出来之后,又要纳税人花很多钱去买。
Focus on Personal Information Management, Personl Knowledge Management and Blog, Personal Information Management System http://www.ispacesoft.com/
在网上搜索了很久,竟然找不到提供 天气预报服务的 web service,很多方法都是抓取网页来生成数据。虽然yahoo weather提供rss格式的输出,但只能用于个人与非商业用途。
想不明白,中央气象台为什么不提供这种公众服务?纳税人的钱是怎么花的?
有个什么气象台的下属公司,提供气象收费服务。
以前也找过一些国标之类的资料,竟然都要出钱买的,花那么多纳税人的钱去做研究,成果出来之后,又要纳税人花很多钱去买。
private void BindBizField()
{
OclPSHandle psBizField = new OclPSHandle();
psBizField.RootHandle = rhRoot;
ddlBizField.DataSource = psBizField;
ddlBizField.DataTextField = "Title"
ddlBizField.DataValueField = "UniqueID"
ddlBizField.DataBind();
ddlBizField.Items.Insert(0, new ListItem(ModelConsts.PleaseSelect, ""));
}
上面这段代码会出现:
的错误。
ps: 经过测试,不是上面的原因,而是下面的赋值不对:
if (aMember.Occupation != null)
ddlBizField.SelectedValue = aMember.Occupation.UniqueID;
在register.aspx中访问AjaxData出错,在Province下拉框中出现html代码,是由于ajaxData.aspx不能访问,.net将页面转向了login.aspx的原因。
想把guid的长度由32,改为36,发现有问题。生成的值还是32位的,不知道是哪里出错了。导致页面不能正常读取数据。
花了几个小时之后,最后又把它改为32位了,只要是唯一的就行了。
如果要在ocl中写判断逻辑,可以如下写:
if GetIsActual then
Amount
else
Money.Zero
endif
如有一个Derived属性,可以这样写:
if Status = 0 then
'未读'
else
'已读'
endif
The General Query Log
If you want to know what happens within mysqld, you should start it with the --log[= or file_name]-l [ option. If no file_name]file_name value is given, the default name is This logs all connections and statements to the log file. This log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld. host_name.log
The Slow Query Log
When started with the --log-slow-queries[= option, mysqld writes a log file containing all SQL statements that took more than file_name]long_query_time seconds to execute. The time to acquire the initial table locks is not counted as execution time. The minimum value of long_query_time is 1.
在 my.ini 文件中加入如下行:
log="C:/Program Files/MySQL/MySQL Server 5.0/sql.log"
用CloneValue()时,两个对象的实例会保持同步,有待一步研究。
参考: Inconsistent returned value type of AsObject property
/// 复制联系人
public Contact copyContact(ReferenceHandle rootHandle, string contactId, string firstName, string lastName)
{
string oclQuery = "Contact.allInstances->select(UniqueID=\'" + contactId + "\')";
IElement element = Globals.Application.RunOclQuery(rootHandle, oclQuery, -1, -1);
Contact newContact = null, oldContact = null;
if (element != null)
{
IElement newElement = element.CloneValue(true);
newContact = new Contact(rootHandle.EcoSpace);
newContact = (newElement as IObjectList)[0].AsObject as Contact;
IObjectList list = element as IObjectList;
oldContact = list[0].AsObject as Contact;
oldContact.FirstName = firstName;
oldContact.LastName = lastName;
IObjectList dirtyList = Application.VariableFactoryService.CreateUntypedObjectList(false);
dirtyList.Add(newContact.AsIObject());
dirtyList.Add(oldContact.AsIObject());
Application.EcoSpace = rootHandle.EcoSpace;
Application.UpdateDatabaseList(dirtyList);
}
return newContact;
}
国、省、市三级联动时,因为:
国家数据是自动绑定;省份数据是国家选择改变时由ajax过程导入,城市数据也是。在javascript的一个过程中初始化数据,如:
displayOneCountry;
displayOneProvince;
displayOneCity;
不能正确地初始化数据,就是因为直到三个方法都执行完了,在第一个过程中发出的ajax调用都还没有执行。因是异步执行的。
现在暂时的解决方案是,页面第一次load时,在 cs 文件中设置国、省、市的联动关系。