2008年11月21日 星期五

10個免費的圖表API

繪製圖表的API除了使用商業產品(Crystal Report等),以及Office Web Component(Excel),其實也有很多免費的工具,如下面10個,其中最特別的Google Chart是線上服務,把資料打在google chart的url裡面,就會在網頁上畫出圖表,Google果然是online應用的專家!

另外自己現在寫C#,搭配使用的是ZedGraph,也相當的好用。

  1. Google Chart API lets you dynamically generate charts. Google chart API is an online service and needs an internet connection. It works by sending an URL to google which will return the chart image. It is very simple to use and if you need abstraction from writing url's you can use any freely available libraries like gchartrb or javagooglechart
  2. Flot is a pure Javascript plotting library for jQuery. It produces graphical plots of arbitrary datasets on-the-fly client-side.The focus is on simple usage (all settings are optional), attractive looks and interactive features like zooming.Although Flot is easy to use, it is also advanced enough to be suitable for Web 2.0 data mining/business intelligence purposes which is its original application.
  3. Open Flash Chart is a Flash charting component. It is fairly easy to setup and has classes written in PHP, Perl, Python, Java, Ruby on Rails, and .Net to connect to the Chart. You can create some really nice looking Bar Charts, Pie Charts, Area Charts and etc…
  4. AmCharts is a set of Flash charts for your websites and Web-based products. AmCharts can extract data from simple CSV or XML files, or they can read dynamic data generated with PHP, .NET, Java, Ruby on Rails, Perl, ColdFusion, and many other programming languages.
  5. PlotKit is a Chart and Graph Plotting Library for Javascript. It has support for HTML Canvas and also SVG via Adobe SVG Viewer and native browser support.PlotKit is fully documented and there is a quick tutorial to get you started.PlotKit is a complete rewrite of CanvasGraph. It is better structured and supported.
  6. Flotr is a javascript plotting library based on the Prototype Framework version 1.6.0.2. Flotr lets you create graphs in modern browsers with features like legend support, negative value support, mouse tracking, selection support, zoom support, event hooks, CSS styling support and much more.
  7. PHP/SWF Charts is a simple, yet powerful PHP tool to create attractive web charts and graphs from dynamic data.You can use PHP scripts to generate or gather the data from databases, then pass it to this tool to generate Flash (swf) charts and graphs. Any other scripting language (ASP, CFML, Perl, etc.) can be used with XML/SWF Charts (the XML version of the same tool.)PHP/SWF Charts makes the best of both the PHP and SWF worlds. PHP scripts provide integration, and Flash provides the best graphic quality.
  8. Visifire is a set of open source data visualization components - powered by Microsoft® Silverlight™. With Visifire you can create and embed visually stunning animated Silverlight Charts within minutes. Visifire is easy to use and independent of the server side technology. It can be used with ASP, ASP.Net, PHP, JSP, ColdFusion, Ruby on Rails or just simple HTML.
  9. FusionCharts Free is a cross-browser and cross-platform flash charting component that can be used to render data-driven & animated charts for your web applications and presentations.
  10. JFreeChart is a free 100% Java chart library that makes it easy fordevelopers to display professional quality charts in their applications.It has a flexible design that is easy to extend, and targets both server-side and client-side applications. It also supports many output types, including Swing components, image files(including PNG and JPEG), and vector graphics file formats (includingPDF, EPS and SVG)

2008年11月18日 星期二

自動磁碟清理

IE的暫存檔如果不加以清理會把全部磁碟空間佔滿,在server上是滿嚴重的事情,windows內建的磁碟清理工具其實有隱藏參數可以做到自動清理。
輸入"cleanmgr /sageset:99",數字從0~65535,會出現設定選項,可以設定要清除哪些種類的檔案,設定好要清除的選項按下確定即儲存(儲存位置99)。

要執行你預先儲存的選項只要打"cleanmgr /sagerun:99"即可。將這行指令設定為工作排程即可。

2008年11月12日 星期三

ASP.NET: Validation of viewstate MAC failed

公司的一個系統用ASP.Net開發,用兩部server+loadbalance switch作負載平衡,常碰到網頁發生"Validation of viewstate MAC failed"的錯誤,粗略了解viewstate大概是主機將一些資訊hash過的資料,作為傳值及驗證用。幸好google到一些前人的經驗,很快解決了問題。
範例:
<machinekey decryption="AES" validation="SHA1" validationkey="1239427563465sdfsf..." decryptionkey="sdf234rgr34t...">

將此設定放在web.config裡面的底下。

msdn提到-- validation的參數: MD5--Specifies that ASP.NET uses the Message Digest 5 (MD5) hash algorithm to validate data. This algorithm produces better performance than SHA1.



參考資料:
Validation of viewstate MAC failed 驗證ViewState時 MAC 失敗

當 ASP.NET 發生 Viewstate MAC 的驗證失敗

machineKey Element (ASP.NET Settings Schema)

ASP.NET machineKey Generator

在 ASP.NET ViewState 中尋寶

執行效能: ASP.NET 應用程式的擴充策略