Ian

我的博墅

公告

If you have a dream, do everything for it! If you happy, more happy for you are the happy owner! If you want happyness, happy in learning, happy in working, and happy in life! Feel better? Smile ! Believe that everything will be better and better!





特效趣味图片在线制作工具 - Dumpr

 

     Dumpr 是一个在线制作特效趣味图片的小服务。提供一张源图片,选择一种效果,就能很快的生成一张漂亮的特效趣味图片。

     Dumpr 支持多种方式导入源图片:本地上传、URL、Flickr 等第三方相册导入。Dumpr 提供了多种很有特色的图片特效,包括有MuseumrAmazing CirclesLomographyRubik’s CubeJigsaw PuzzlesPencil SketchesReflectionEaster EggCelebrity PaparazziWeaveLego-izeStone Mosaic
中文起名网站 - 名头网


      之前有介绍过宝宝名字(起名)在线生成器 -- BabyNames英文名在线生成器 - Nymbler两个名字生成服务,但它们生成的都是英文名,而名头网可以指定姓名、性别、双字名还是单字名随机生成名字,或者使用传说中的金木水火土五行起名,还有定字起名。除此之外,还可以查看随机生成名字的释义,或是自个输入一个名字查看释义,虽然之间照搬字典解释名字中每个字的意思,但也不算毫无用处。

Adobe 发布Flash Player 10 预览版

 

    据称,目前98%的个人电脑中都装有Adobe Flash Player,从中可看出此技术是多么的流行及实用。而就在今天,Adobe正式宣布推出最新的Flash Player 10 预览版,该版本开发代号为Astro。

    下载地址: http://labs.adobe.com/downloads/flashplayer10.html

    该版本主要增强了3D效果、自定义滤镜、高级字符层、及图像接口等功能,这里有一个供演示的DEMO,你可以在安装完Flash Player 10后进行尝试。

支持图片和视频的微博客服务 - Hellotxt

 

     Hellotxt是 一个微博客服务网站,它能让你的更新内容同时发送到十多个微博客网站上面,包括Twitter、 Jaiku、Pownce、Tumblr、Meemi、Beemood、GoZub、Frazr、Numpa、Facebook、Plaxo,还包括国内 的fanfou。日前 Hellotxt 又增加了视频是图片支持,也就是说 Hellotxt 成为了一个图片视频微博客服务网站,并且支持其他微博客服务的同步更新。

    插入图片时,需要从本地进行上传,目前还不支持加入网络上面的图片链接,对于增加视频,需要将视频的代码加入,然后可以选择需要发布到的微博客服务。此外Hellotxt还提供了Timeline功能,你可以查看你同步更新到各个微博客服务的信息。

WCF Integration in Silverlight 2 Beta 1

 

In preparation for my Silverlight for Business Applications webcast today, I decided to look more deeply into how Silverlight works with services. I originally concentrated a lot on security, and had a much larger post on how to secure your services, but ran into some issues there. More on that below.

WCF Service Requirements for Silverlight

In Silverlight 2 Beta 1, WCF services must be set up to use basicHttpBinding. Basic HTTP Binding sets up a SOAP 1.1 endpoint in your service. To enable that, before setting the service reference in your Silverlight application, change the service's web.config from the default wsHttpBinding to basicHttpBinding:

<system.serviceModel>
...
<
services>
<
service behaviorConfiguration="ServiceBehavior" name="Service">
<
endpoint address=""
binding="basicHttpBinding"
contract="IService">
<
identity>
<
dns value="localhost"/>
</
identity>
</
endpoint>
<
endpoint address="mex"
binding="mexHttpBinding" contract="IMetadataExchange"/>
</
service>
</
services>
</
system.serviceModel>

 

If you forget to do that before adding a service reference, no big deal. Just refresh your service reference in your Silverlight project. If that doesn't work, remove and re-add the reference.

Enabling Exception Information in WCF

During debugging, you may want to get exception information back from WCF. In order to enable that, change the includeExceptionDetailsInFaults setting in the service's web.config to true:

<behaviors>
<
serviceBehaviors>
<
behavior name="TestServiceBehavior">
<
serviceMetadata httpGetEnabled="true"/>
<
serviceDebug includeExceptionDetailInFaults="true"/>
</
behavior>
</
serviceBehaviors>
</
behaviors>

Adding the Silverlight Service Reference

Once your WCF service is running, you can add a reference from your Silverlight project. To do that, right click the Silverlight project and choose "Add Service Reference". Be sure to change the namespace to something useful, as this is the namespace that will be appended to the Silverlight application's namespace.

To avoid dealing with cross-domain configuration right at the moment, I added the service to the test web project. This ensures that the service and the Silverlight app are served from the same server and port.

Cross-Domain Support

If you want to enable your service to work cross-domain, there are two files you will want to concern yourself with:

crossdomain.xml

This file comes from back in the macromedia flash days. Since it has wide support on the internet, it makes sense for Silverlight to support it. You can read some documentation on this file format here.

One use supported by the specification is to specify domains which can access the service:

<?xml version="1.0"?>
<!
DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<
cross-domain-policy>
<
allow-access-from domain="www.yoursite.com" />
<
allow-access-from domain="yoursite.com" />
<
allow-access-from domain="*.moock.org" />
</
cross-domain-policy>

However, that detailed format is not supported by Silverlight. Instead, you must opt in to all domains if you want to use the crossdomain.xml approach. Such a policy file would look like this:

<?xml version="1.0"?>
<!
DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<
cross-domain-policy>
<
allow-access-from domain="*" />
</
cross-domain-policy>

However, since this format doesn't cover all the scenarios that Silverlight developers are likely interested in (and flash developers too, most likely), Microsoft has provided another cross-domain file that is more flexible and currently Silverlight-specific: clientaccesspolicy.xml.

clientaccesspolicy.xml

lf you want finer control over your cross-domain policy, you'll want to use clientaccesspolicy.xml. This file allows you to specify both what domains have access to your service, and also what subpaths are covered by the policy. You can include both clientaccesspolicy.xml and crossdomain.xml for your services; Silverlight will check this file before looking for the crossdomain.xml

The equivalent to the "allow all domains access to all services" is below:

<?xml version="1.0" encoding="utf-8"?>
<
access-policy>
<
cross-domain-access>
<
policy>
<
allow-from>
<
domain uri="*"/>
</
allow-from>
<
grant-to>
<
resource path="/" include-subpaths="true"/>
</
grant-to>
</
policy>
</
cross-domain-access>
</
access-policy>

If you want to get more selective about what you enable, you can specify external domains and subfolders on your site:

<?xml version="1.0" encoding="utf-8"?>
<
access-policy>
<
cross-domain-access>
<
policy>
<
allow-from>
<
domain uri="http://contoso.com"/>
</
allow-from>
<
grant-to>
<
resource path="/public-services/" include-subpaths="true"/>
</
grant-to>
</
policy>
</
cross-domain-access>
</
access-policy>

You can find additional information about cross-domain files on msdn.

Ian Griffiths discovered a small bug with the Silverlight-specific policy file in Beta 1, and documented it here.

Calling Your Service

The proxy and default configuration generated when you add the service reference will be adequate for your initial testing. The generated .ClientConfig file has specifics about your service. If you change your service, and refresh your reference, this file will be updated to reflect those changes. If you run into any problems with that, just delete the file, remove your service references, and re-add them.

ServiceReferences.ClientConfig File
<configuration>
<
system.serviceModel>
<
client>
<
endpoint
address="http://localhost:47879/SilverlightApplication2_Web/Service.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService"
contract="SilverlightApplication2.ServiceReference1.IService"
name="BasicHttpBinding_IService" />
</
client>
<
bindings>
<
basicHttpBinding>
<
binding name="BasicHttpBinding_IService"
maxBufferSize="65536"
maxReceivedMessageSize="65536">
<
security mode="None" />
</
binding>
</
basicHttpBinding>
</
bindings>
</
system.serviceModel>
</
configuration>

Note that the default endpoint has the address in the file. You can override this in code if you desire. However, since this is a configuration file, you'll probably want to change (and maintain) the endpoint address in the config here, prior to deploying your app to test/production.

The clientconfig file is deployed in the xap.

Calling Code
private void TestService()
{
ServiceReference1.TestServiceClient client =
new ServiceReference1.TestServiceClient();

client.GetTheValueCompleted +=
new EventHandler<TempBizAppDemo1.ServiceReference1.GetTheValueCompletedEventArgs>
(client_GetTheValueCompleted);

client.GetTheValueAsync();
}

void client_GetTheValueCompleted(
object sender,
TempBizAppDemo1.ServiceReference1.GetTheValueCompletedEventArgs e)
{
// act upon the information returned from the service
// e.Result;
}

As you may already know, all service calls in Silverlight 2 Beta 1 are async calls. Getting data from a service is a two-step operation. First, you set up an event handler which will be called when the service completes. Second, you call the service async method.

There's a lot of controversy about requiring async calls in Silverlight, so it may be something that changes in the future. I'll make no value judgements on it here. However, the current async implementation has the broadest support across browsers and operating systems. It also helps to ensure that the UI thread is not blocked (the calls go through the browser network stack, which is typically on the UI thread), and the browser UI remains responsive. Since async calls are a requirement in Beta 1, we'll just take that as a given.

The nice thing is, once you are used to the async pattern, the code is nice. The event handler you get has strongly-typed event args that include the return value from your service in e.Result (there is no e.Result if your service is a void function or VB sub)

Next Steps

At this point, if you have some UI hooked up to view the results from your service, you should be all set to go ... assuming message-level security doesn't matter (and it doesn't in many many cases as proven by the proliferation of AJAX applications out there calling open services without any message-level security)

Security

When it came to dealing with security like I normally would in a WCF service-based application, I ran into a couple brick walls and ran out of time. I did learn about some other options that may work, though.

The current MSDN documentation on securing your services for Silverlight 2 Beta 1 clients can be found here. It's pretty light, though.

I'm still feeling my way around some of the security options available to us, including tokens and rolling custom encryption. Look for a follow-up post once that is all sorted out. In the mean time, continue to secure your services like you would for AJAX applications (transport-level, HTTPS, IIS-based auth for the entire application) and have your authentication happen outside of Silverlight. Developers coming from the desktop world and those currently doing service calls from ASP.NET server-side will likely not be satisfied with that, so I promise to provide some good examples in the future :)

 

 

旅游、美食、游戏社会化社区网站 - 米胖

 

      米胖是一个关注旅游(界面通过Google Maps可以查看各种旅游景点,并且提供了浏览模式和导航模式,你可以点评自己去玩过的地方,也可以查看哪些人和你去过同样的地方)、美食(按照城市查找美食,查找美食专家,还提供了更具你的口味推荐餐馆的功能)、游戏社会化社区网站(上面很多小游戏也很不错)。在众多的社会化网络社区网站,米胖给人的感觉是一个很温馨的社会化网络社区,个人比较喜欢。通过米胖,你可以通过地图查看旅游景点,撰写旅游心得;可以点评旅游各地的美食,可以建立自己的组群;还可以在线直接玩各种新鲜的Flash小游戏。

Blend 2.5 march preview: Where is the Silverlight DataGrid ?

 

[Post written as of Silverlight 2 beta 1 and Expression Blend 2.5 march preview]

Strange that the DataGrid is not in Expression Blend 2.5 march preview toolbox, but only in VS2008 !?

If you add a DataGrid in VS2008 and then switch to Blend that will break your designer.
It seems like there are problems with these assemblies references in Blend 2.5:

System.Windows.Controls.dll
System.Windows.Controls.Data.dll
System.Windows.Controls.Extended.dll

Remember that controls are not part of the runtime, they are part of the SDK and must be distributed with each application. Here are the different folders:

  • Runtime: "C:\Program Files\Microsoft Silverlight\2.0.30226.2"
  • SDK: "C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Client"

Thanks to Michael Sync from the Silverlight forums, you can fix this:

1. Fix the reference in Blend:
Add reference to "System.Windows.Controls.Data.dll" from the SDK folder.

2. Add this markup in <UserControl declaration:
xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"

3. then, you can add a DataGrid like that:
<data:DataGrid></data:DataGrid>

Now you can find the DataGrid in Blend 2.5 Toolbox :

  1. Click on "Asset Library" (bottom of toolbox)
  2. Check "Show All"
提供在线简单评论、留言、投票、评分等交互功能的站点 - Js-Kit

 

    JS-Kit 是一家很有创新精神的互联网企业,他们提供了一系列有关JS相关的评论、留言、投票、评分等交互功能等解决方案,来帮助那些无法真正实现交互功能的站点完成同动态网站一样的数据同步更新,从而实现网站同用户之间的互动。简单在于,每一功能的实现,只要在页面上加上小小的一段代码即可,强大在于,通过js-kit添加的这些功能本身就让你的网站充分社会化,而且具有较强的定制性,你可以根据自己的喜好,定义它的CSS样式。最重要的一点是,完美支持中文。

个人网上出版社 - 超印速


 

  昨天,朋友将自己两年来写的BLOG印成书赠与我做纪念。看到这本装订精美的书,我客气道:“哟,您的大作变成铅字,我得专程到书店里花钱买才能表达诚意 啊!怎么好意思让您送呢?”朋友却说“你看仔细了,这是书店买不到的啊。”我再细细看这书,上边没有售价、也没有出版社,朋友说,这是她为自己印的书,只 为纪念、不为出名。。

   超印速是国内一个提供“个性印书,一本起印”服务的网站,或者可以叫做网上出版便利店。也就是任何人都可以在线定制,出版你自己个人的出版物。

  提供的服务主要有:在线印书,相册,日历服务等。超印速使用很简单,只需要上传你排版好的作品,每次可同时上传三个文件,容量不能超过50M。持文件格式:DOC,WRI,TXT,P64,PDF,JPG,BMP,RAR,ZIP。可以上传封面和封底图片。如果让超印速帮你排版会收取额外的费用。你可以通过这个页面查看在线印刷需要的价格。一个平装,32开,彩色封面,50页黑白内页的价格为24.7元。

  目前,在“超印速”下订单的博客书种类非常多。有的就像日记,记录下个人情感、生活琐事,没有很明确的主题,有时候甚至整篇文章只是一个字的问候语罢了, 这些作者来“超印速”印书的主要目的是为了让作品原汁原味保留下来。当一个博客作者慢慢地写了很多东西以后,可能会开始考虑如何保存自己这段时间以来的文 字和心情。



  当然,博客本身有选择备份的功能,或者作者可以自行购买空间的数据库导出功能,但这类功能备份出来的只是一些没有生气的代码、 文本或者压缩文档文件,远远没有博客本身图文并茂那么吸引人。一些博客作者想让以前的作品以最初的图文结合形式保留下来,于是就决定将其印成一本精美的 书。

  此外,你还可以通过推荐你的好友使用超印速的服务获得积分,每推荐一个用户,你就可以获取100的积分,1000点积分可以兑换1元人民币。你可以通过这些积分来在线印刷自己的出版物。

在线ping命令工具 - Just Ping


   Just Ping 是一个在线Ping命令工具。

  只需填入一个域名或IP地址,就可以测试出从世界各地26个不同节点的ping值,在选择空间主机或许测试网站速度时可能会有一定用处。

 

给图片加上文字注释的工具 - kyolo

 

  kyolo是一个给图片加上文字气球的网站。使用很简单:一张本机图片上传,upload成功后进入编辑页面。按“Add bubble”添加一个气球,在文本框里输入说话文字,点“Shape”改变气球样式,点“Rotate”改变箭头方向,“Font”钮改变气球大小,拖 动气球改变位置,拖动气球上的红色箭头改变气球大小。


Adobe同步推出Adobe Media Player以及Adobe TV

 

  Adobe 公司在今天正式推出了由官方自主研发的、基于Adobe AIR技术的视频播放器Adobe Media Player。与此同时,奥多比还同步推出了适用于该技术的视频聚合网站——Adobe TV

  Adobe Media Player 是由Adobe公司研发的一款基于AIR技术平台、全面支持H.264视频及HE-AAC音频业界标准的网络视频播放器。它允许用户在在线或者离线的情况 下观看以及订阅来自互联网上的流媒体文件。虽然,就概念上以及使用方式方面,Adobe Media Player和Miro有 相似之处,但是AMP更多强调了视频内容直接的发布,通过与多家媒体娱乐业巨头(CBS, Universal Music Group, PBS, MTV Networks, MotionBox, MyToons etc.)的合作,从而真正实现视频分享的合法化以及实时化。

  与此同时,同 Adobe Media Player 1.0 同步释放的还包括有Adobe旗下的首家视频分享网站——Adobe TV!该网站将不仅仅以一个视频分享网站的角色而存在,更重要的是,它还将被归档于Adobe Media Player中的一个频道,你可以通过AMP来直接收看来自Adobe TV中的流媒体视频!

Google Talk 推出桌面实验版

几乎偃旗息鼓一年之久的Google Talk 团队在前些天发布了一个版本代号为Labs Edition 的实验版GT桌面客户端。

Google Talk是一款我较为欣赏的即时通讯软件,简洁而高效,采用开放的XMPP协议是它的一大特色之一。但是由于XMPP协议的目前仍然处在修订当中等缘故,GTalk 桌面版实际上长期以来处在快被Google遗忘的角落中;今天,Google Talk 团队终于释放出了一个版本号为Labs Edition 的实验版GT桌面客户端!它基于WebKit(也就是Safari浏览器的内核)开发,结合Google Talk Gadget的优势,并整合Google旗下的若干线上产品模块,譬如:Gmail提醒、Google日历以及Orkut社区等功能。

 

WebOS (网络操作系统) - Aidfen


  爱德凡(Aidfen),来自国内的一款网络操作系统(WebOS),内置了万年历、计算器、文件管理器、文件存储与分享等基本应用模块。

  他的服务是免费,并且能够跨平台,很像我们使用的桌面操作系统,只需要注册一个帐号就可以使用,有兴趣的朋友可以去看看。

 

在线截取网站图片的工具 - Super Screenshot


  Super Screenshot,你需要做的就是输入你想要截取的地址,其余的工作Super Screenshot会为你完成。

  网站主页有点像一个搜索引擎,可它却不是。在其中输入你要截取网站的URL,点击GO,OK稍等片刻该网站的截图就会被截取下来。你可以在右侧设置一些参 数:图片的尺寸、格式。截取之后该图应该会永久的保存在该网站上,以后你在输入相同的URL时Super Screenshot会把以前截取的显示给你看。

 

更多内容 下一页 »