免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2011年10月14日 星期五

MathJax, MathML, and LaTex




懷念LaTex ? 或者揮不去的夢魘?

MathJax 讓使用者能夠在Html頁面中以LaTex語法加入方程式,
它也支援 MathML 語法.

得先引用 MathJax的javascript library,


0. config to set  in-line delimiter to $\$$

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$\$$','$\$$'], ['\\(','\\)']]}});
</script>

1. 透過 http
<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

2. 或者透過https

<script type="text/javascript"
  src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

當 $a \ne 0$, 方程式 \(ax^2 + bx + c = 0\) 有兩個解 :
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$


[ref]
http://www.mathjax.org/docs/1.1/start.html

2011年10月7日 星期五

Ubuntu 基本工具

//=== 列出mounted filesystems
mount
mount -t 83

//===
列出 partition
sudo fdisk -l /dev/sda
sudo fdisk -l /dev/sdb


//=== GUI, Disk Usage Analyzer
Application -> Accessories -> Disk Usage Analyzer

2011年10月4日 星期二

Azure Cloud Try 1

//=== Create cloud project (VC# ->Windows  azure project)
New Windows Azure Project dialog ->  ASP.NET MVC 3 Web Role-> Internet Application

http://www.microsoft.com/windowsazure/learn/tutorials/getting-started-tutorial/3-add-a-cloud-project/
http://www.microsoft.com/windowsazure/learn/tutorials/getting-started-tutorial/6-create-a-hosted-service/

//===
Azure Emulator (Windows Azure SDK tools)
* compute emulator
* storage emulator
* need 1.3G bytes memory


RoadTrip example
http://www.microsoft.com/windowsazure/learn/tutorials/road-trip-tutorial/1-create-and-run-locally/


//=== Configuration
* Web.config
* ServiceConfiguration.cscfg
* ServiceDefinition.csdef
* Local emulator or Remote Cloud
* Sql Azure database or Storage
* Storage/Database/Cloud account
* ConnectionString for database/storage
* Certificate (self-signed certificate by VS2010?)

//===
* Windows Azure Management Portal
* Sql Azure Portal
* Remote Access/remote desktop settings?





//=== the 1st error
Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Storage Emulator: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Storage Emulator using the ‘DSInit’ utility in the Windows Azure SDK.

[try]
dsinit /sqlInstance:sqlexpress


http://social.msdn.microsoft.com/Forums/eu/windowsazuredevelopment/thread/6fafe385-8f1a-4add-b782-3c0761505695
http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/5485/
http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-connection-management.aspx 
http://go.microsoft.com/fwlink/?LinkId=224877



//=== Deploying a Windows Azure Application/Service
http://msdn.microsoft.com/en-us/library/gg433027.aspx

Package location
C:\Users\username\Documents\Visual Studio 2010\Projects\WindowsAzureProject1\WindowsAzureProject1\bin\Debug\app.publish

ServiceConfiguration.Cloud.cscfg
WindowsAzureProject1.cspkg



//=== Production and Staging deploy

  • Staging Deployment : http://<guid>.cloudapp.net
    where <guid> is a GUID automatically provided by Windows Azure and the GUID will change each time the application is deleted and re-deployed.
  • Production Deployment : http://<urlprefix>.cloudapp.net
    where <urlprefix> is the unique URL prefix specified when creating the hosted service.




//=== Delete a deployment as soon as it is not needed
***  If you do not "delete"  a deployment, billable charges will continue to accrue, even if your deployment is in the "Stopped" state.




 ~~~

A cloud on the azure sky.
蔚藍天空一朵雲