How Prius works
Posted by btr Fri, 11 Jun 2004 17:48:08 GMT
Here's the link to discuss how Prius transmission system works.| stablevalue.com a blog on stock market and things of interest |
Posted by btr Fri, 11 Jun 2004 17:48:08 GMT
Here's the link to discuss how Prius transmission system works.Posted by btr Wed, 19 May 2004 03:10:39 GMT
now, it supports property, collection, import and option not to generate codes for imported types. download. for more info, check here. Statement.xsd
Posted by btr Fri, 14 May 2004 21:54:38 GMT
After the upgrade from MT 2.63 to MT 3.0, I could not log in anymore. Not sure what's going on, so back out the upgrade.Posted by btr Thu, 06 May 2004 02:59:59 GMT
prosi ditched the idea of separating schema from dataset since it would require both ends to deal with schema anyway.
i ditched the idea of not using dataset since it would require us to write tons of mapping code for relational data and updategram.
everything works if designed and used properly. besides, everying around us is galaxy apart from soa world anyway.
Posted by btr Sun, 25 Apr 2004 03:26:04 GMT
Web Part was introduced in SharePoint Portal and will be adopted in ASP.NET 2.0. The whole Web Part infrastructure involves with the aspects in catalog, configuration, persistence and connection. I'm particularly interested in the connection feature. To make a Web Part connectable to other Web Parts, it has to implement a set of interfaces. They are ICellProvider/ICellConsumer, IRowProvider/IRowConsumer, IListProvider/IListConsumer and IFilterProvider/IFilterConsumer. To coordinate the communication among the parts, each part also needs to override a few methods such as CommunicationConnect, CommunicationInit and CommunicationMain. In the implementation, there are two base classes desgined to set up the framework. The BaseControl class is listed here.
public class BaseControl : UserControl, IMessage {
public BaseControl() : base() {
}
public event ErrorMessageEventHandler ErrorMessage;
public event MessageEventHandler Message;
protected void OnMessage(object sender, MessageEventArgs e) {
if (this.Message != null)
this.Message(sender, e);
}
protected void OnErrorMessage(object sender, MessageEventArgs e) {
if (this.ErrorMessage != null)
this.ErrorMessage(sender, e);
}
protected override void Render(HtmlTextWriter writer) {
base.Render(writer);
}
public virtual void CommunicationConnect() {}
public virtual void CommunicationInit() {}
public virtual void CommunicationMain() {}
}
public interface IRowProvider {
event RowProviderInitEventHandler RowProviderInit;
event RowReadyEventHandler RowReady;
}
public interface IRowConsumer
{
void RowProviderInit(object sender, RowProviderInitEventArgs e);
void RowReady(object sender, RowReadyEventArgs e);
}
The BasePage class defines the overall page layout and style, it also fires the CommunicationConnect/Init/Main methods on each connectable controls, plus other basic features that each page needs to share in common.
One needs to refactor and refactor the GUI design to get the best out of this architecture since suddenly many basic features of modern web user interface becomes reusable components that can be connected or composed into elaborate user interface to accompish rather sophisticated work.
Posted by btr Fri, 19 Mar 2004 02:58:05 GMT
I'm implementing a component that offers COM+ like programming model on local transaction on a single database. You will be able to decorate a class using attribute like [Transactional(TransactionOption, TransactionIsolation)]. Inside each method, SetComplete or SetAbort will vote to commit or rollback the transactions. It will support nested transactions on a single thread.The motivation is to ease business component development that needs flexible transaction management when component reuse is important. Here's a sample test case.
[Transactional(TransactionOption.Required, TransactionIsolation.Standard)]
public class Account : Transactional {
public Account() : base() {
}
public void Debt(string account, decimal amount) {
try {
// make database calls in adapter via ADO.NET
Auditor auditor = new Auditor();
DA.PostDebt(account, amount);
auditor.Log("post debt trx");
TransactionUtil.SetComplete();
}
catch (Exception ex) {
auditor.Log("error in posting debt trx");
TransactionUtil.SetAbort();
}
}
public void Credit(string account, decimal amount) {
try {
// make database calls in adapter via ADO.NET
DA.PostCredit(account, amount);
Auditor auditor = new Auditor();
auditor.Log("post credit trx");
TransactionUtil.SetComplete();
}
catch (Exception ex) {
auditor.Log("error in posting debt trx");
TransactionUtil.SetAbort();
}
}
}
[Transactional(TransactionOption.RequiresNew, TransactionIsolation.Standard)]
public class TransferAgent : Transactional {
public TransferAgent() : base() {
}
public void Transfer(string from, string to, decimal amount) {
try {
Auditor auditor = new Auditor();
auditor.Log("validating balance in " + from);
Validator v = new Validator();
v.Validate(from, amount);
auditor.Log(from + " balance checked OK");
Account account = new Account();
account.Debt(from, amount);
account.Credit(to, amount);
TransactionUtil.SetComplete();
auditor.Log("transfer OK");
}
catch (Exception ex) {
auditor.Log("error in transfer");
TransactionUtil.SetAbort();
}
}
}
[Transactional(TransactionOption.RequiresNew, TransactionIsolation.Standard)]
public class Auditor : Transactional {
public Auditor() : base() {
}
public void Log(string msg) {
try {
DA.Log(msg);
TransactionUtil.SetComplete();
}
catch (Exception ex) {
TransactionUtil.SetAbort();
}
}
}
[Transactional(TransactionOption.Supported, TransactionIsolation.Standard)]
public class Validator : Transactional {
public Validator() : base() {
}
public void Validate(string account, decimal balance) {
try {
if (DA.CheckBalance(account, balance))
TransactionUtil.SetComplete();
else
TransactionUtil.SetAbort();
}
catch (Exception ex) {
TransactionUtil.SetAbort();
}
}
}
[TestFixture]
public class UnitTest : UnitTestBase {
[Test]
public void Test01() {
Account account = new Account();
account.Credit("a", 1000.00);
account.Debt("a", 100);
account.Credit("b", 100.00);
}
[Test]
public void Test02() {
TransferAgent agent = new TransferAgent();
agent.Transfer("a", "b", 100.00);
}
}
Posted by btr Sun, 14 Mar 2004 05:04:02 GMT
SOA has been the buzz word recently. I'm considering to use Shadowfax reference architecture for an inventory project. I like to maintain the capablity of XCOPY in deployment, which would be an issue since Shadowfax does need to intstall some programs that can not be deployed with XCOPY such as Exception and Instrumentation related functionalitites. Any ExterperiseServices related components might need installation program as well. You can get a copy of Shadowfax source code from here.Posted by btr Sun, 29 Feb 2004 04:22:54 GMT
After I tried iTunes the first time, I really like it a lot. It's so much better than Media Player. I'm using iTunes or previously Media Player mainly as my internet radio to listen to the music or news from around the world. In iTunes, once you see a radio station, just one lick it's almost instant on, but Media Player forces you to go to radio web site to play, what a hassle!Posted by btr Fri, 27 Feb 2004 04:45:55 GMT
My best record so far is 48MPG since last fill up. As the weather warms up, I am looking to reach my goal of 50MPG. I'm not sure if it's possible to reach even higher than 50MPG since A/C may decrease MPG considerably. Here's a URL to PirusOnline.com.As they finalise the ban on proprietary trading, regulators must ensure the proposal does not curb trading activity too much, says Tom Braithwaite more
U.S. stocks closed sharply lower Monday as bank shares took a beating amid fresh concerns about the debt crisis in Europe. more
During the first part of 2012, markets will be dominated by “risk off” as Europe’s sovereign-debt crisis prompts higher demand for safety, says Mohamed El-Erian. Right now, the continent is being buffeted by challenges on three separate fronts: economically, politically, and social more
Asian markets rebound from Monday’s steep losses following the death of Kim Jong-il more
Crude-oil futures nudged higher in electronic trading Tuesday, consolidating on an overnight rebound, as Asian stock markets and U.S. index futures advanced. more
Banks led U.S. stocks lower, sagging under the weight of another batch of worrisome headlines from Europe and fresh expectations for tighter capital standards. more
The IPO market is really beginning to catch fire with the tech industry partying like it’s 1999. The party lights glowed and the DJ began spinning the beats before the LinkedIn (LNKD) IPO a couple weeks ago and the party will continue reaching a feverish pitch with a Groupon (GRPN) IPO. more
Bank stocks have been shellacked lately as investors worry about what impact the foreclosure scandal will have on the results for the nation's largest financial institutions. more
No matter what the market conditions may be, especially in weeks like this, it is very good idea to do everything you can to stick to the normal trading routine. While none of us can control what the markets do, we can control what we do everyday to be in the right place at the [...] more
This is a guest post by Derek Devore, an experienced options trader. Find out more about his OptionBoost Video Training Program at http://optionboost.com One of my favorite structures when I’m evaluating a position which is slow moving, but is on its way to reaching a particular price point, i more
Today's key headlines: North Korea's Kim Jong II dies of heart attack, Bank of America falls under $5 for the first time in three years, ATT gives up on its $39 Billion bid to acquire T-Mobile.Original post: December 19th, 2011 Stock Market Analysis more