<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5369266905549397382</id><updated>2024-08-30T10:27:59.869+08:00</updated><category term="CodeProject"/><category term=".NET"/><category term="c#"/><category term="sharepoint 2010"/><category term="sharepoint"/><category term="web service"/><category term="jQuery"/><category term="architecture"/><category term="performance"/><category term="AJAX"/><category term="LinQ"/><category term="SharePoint 2007"/><category term="WCF"/><category term="facebook"/><category term="java"/><category term="nodejs"/><category term="wiki"/><category term="windows phone 8"/><category term="IIS error"/><category term="McAfee sidewinder"/><category term="N-Tier"/><category term="OSX"/><category term="WSE3.0"/><category term="Xcode"/><category term="iOS 4.1"/><category term="ms sql"/><category term="non programming"/><category term="personal"/><category term="python"/><category term="silverlight"/><title type='text'>Software engineering in a can</title><subtitle type='html'>A repository of my past programming challenges</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-1685614681221795881</id><published>2013-11-01T14:24:00.001+08:00</published><updated>2013-11-01T14:24:25.409+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ms sql"/><title type='text'>Deleted stored procedure from MS SQL!</title><content type='html'>Do not panic, as there are 2 ways to retrieve your precious stored procedure:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) Recover them from the dblog table&lt;div&gt;
&lt;br /&gt;&lt;div&gt;
&lt;div&gt;
SELECT&lt;/div&gt;
&lt;div&gt;
[cp].[refcounts],&lt;/div&gt;
&lt;div&gt;
[cp].[usecounts],&lt;/div&gt;
&lt;div&gt;
[cp].[objtype],&lt;/div&gt;
&lt;div&gt;
[st].[dbid],&lt;/div&gt;
&lt;div&gt;
[st].[objectid],&lt;/div&gt;
&lt;div&gt;
[st].[text],&lt;/div&gt;
&lt;div&gt;
[qp].[query_plan]&lt;/div&gt;
&lt;div&gt;
FROM&lt;/div&gt;
&lt;div&gt;
sys.dm_exec_cached_plans cp&lt;/div&gt;
&lt;div&gt;
CROSS&lt;/div&gt;
&lt;div&gt;
APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st&lt;/div&gt;
&lt;div&gt;
CROSS&lt;/div&gt;
&lt;div&gt;
APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
where [st].[text] like &#39;%__AUDIT%&#39;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Select Convert(varchar(Max),Substring([RowLog Contents 0]&lt;/div&gt;
&lt;div&gt;
,33&lt;/div&gt;
&lt;div&gt;
,LEN([RowLog Contents 0]))) as [Script]&lt;/div&gt;
&lt;div&gt;
from fn_dblog(NULL,NULL)&lt;/div&gt;
&lt;div&gt;
Where [Operation]=&#39;LOP_DELETE_ROWS&#39; And [Context]=&#39;LCX_MARK_AS_GHOST&#39;&lt;/div&gt;
&lt;div&gt;
And [AllocUnitName]=&#39;sys.sysobjvalues.clst&#39;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2) Recover them from cached database plan&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
SELECT&lt;/div&gt;
&lt;div&gt;
[cp].[refcounts],&lt;/div&gt;
&lt;div&gt;
[cp].[usecounts],&lt;/div&gt;
&lt;div&gt;
[cp].[objtype],&lt;/div&gt;
&lt;div&gt;
[st].[dbid],&lt;/div&gt;
&lt;div&gt;
[st].[objectid],&lt;/div&gt;
&lt;div&gt;
[st].[text],&lt;/div&gt;
&lt;div&gt;
[qp].[query_plan]&lt;/div&gt;
&lt;div&gt;
FROM&lt;/div&gt;
&lt;div&gt;
sys.dm_exec_cached_plans cp&lt;/div&gt;
&lt;div&gt;
CROSS&lt;/div&gt;
&lt;div&gt;
APPLY sys.dm_exec_sql_text ( cp.plan_handle ) st&lt;/div&gt;
&lt;div&gt;
CROSS&lt;/div&gt;
&lt;div&gt;
APPLY sys.dm_exec_query_plan ( cp.plan_handle ) qp ;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/1685614681221795881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/11/deleted-stored-procedure-from-ms-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1685614681221795881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1685614681221795881'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/11/deleted-stored-procedure-from-ms-sql.html' title='Deleted stored procedure from MS SQL!'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-1687816127254444648</id><published>2013-06-18T11:52:00.001+08:00</published><updated>2013-06-18T11:52:05.972+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 8"/><title type='text'>Unofficial pulse app finally arrives on Windows Phone</title><content type='html'>After many sleepless nights, i&#39;ve finally completed the app and got approved by Microsoft. It was a pain to be rejected twice, first due to my negligence (i forgot to assign the app icon), second time was due to copyright issues (i&#39;ve used the windows logo in the icon).&lt;br /&gt;&lt;br /&gt;But nonetheless, it&#39;s approved and finally live in the app store now. You can download it &lt;a href=&quot;http://www.windowsphone.com/en-us/store/app/winpulse/9a7e5cef-d5e2-4758-a9e0-e55eeda5402e&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.windowsphone.com/en-us/store/app/winpulse/9a7e5cef-d5e2-4758-a9e0-e55eeda5402e&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://cdn.marketplaceimages.windowsphone.com/v8/images/9f8ae010-48e6-43e5-9042-8be9270646ed?imageType=ws_icon_large&quot; /&gt;&lt;/a&gt;&lt;span id=&quot;goog_1098375613&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1098375614&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Several roadblocks hit me, due to some Windows Phone Toolkit updates, LongListSelector are now officially part of Phone.Controls, microsoft had finally made it part of the official controls.&lt;br /&gt;&lt;br /&gt;I was using the old toolkit and had several problems in maintaining the memory foot print low. My device was a Lumia 620 and was capped with a 180mb memory limit. After days of OutOfMemory exceptions, i&#39;ve customised HubTiles so much that it no longer look and behaves like the original. I had to reduce the number of controls within HubTiles, take out different animations such as flip and rotate.&lt;br /&gt;&lt;br /&gt;I was able to support both wp7 and wp8, until the new control came out with so much feature that i didn&#39;t have to code manually is luring me to ditch wp7. And so i did, i decided to support wp8 only and have the new LayoutMode=&quot;Grid&quot; and virtualizing capabilities built-in. Now the app is able to load hundreds of hubtiles in a panoraitem without any hiccups.&lt;br /&gt;
&lt;br /&gt;
The old version can only load like 50 tiles at max, before crashing due to the memory pressure. I&#39;ve incoporated a feedback channel within the app and hope that with user&#39;s feedback, i can improve the app further and let the Windows Phone community have what they deserve (A rich appstore)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/1687816127254444648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/06/unofficial-pulse-app-finally-arrives-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1687816127254444648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1687816127254444648'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/06/unofficial-pulse-app-finally-arrives-on.html' title='Unofficial pulse app finally arrives on Windows Phone'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-7328945966023358526</id><published>2013-05-20T10:47:00.000+08:00</published><updated>2013-05-20T10:47:13.292+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="LinQ"/><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 8"/><title type='text'>My first windows phone 8 app - SG News Cloud services Part 2</title><content type='html'>I&#39;ve managed to garner good feedbacks and input from many helpful people and i&#39;m preparing for a version 2.1 release, i&#39;m still tinkering with the nitty gritty, but you can have a preview over &lt;a href=&quot;http://www.youtube.com/watch?v=-fz6YcBZtqU&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
A lot of brain cracking went into making all these happen. My first challenge was to work with the XAML mark up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Somehow my sampledatamodel couldn&#39;t display everything during design-time, so i had to debug, tweak, debug, tweak over and over again.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Fonts installation was quirky as well, but luckily i&#39;ve managed to get the custom fonts working by using Expression Blend.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;But i&#39;ve used a &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.windows.data.binding.converter.aspx&quot; target=&quot;_blank&quot;&gt;converter&lt;/a&gt;, but visual studio kept prompting an error: Invalid XAML, after lots of frustration, i found someone &lt;a href=&quot;http://stackoverflow.com/questions/3759441/silverlight-4-invalid-xaml-using-converter-in-datatemplate&quot; target=&quot;_blank&quot;&gt;saying&lt;/a&gt; that it&#39;s due to the space that i&#39;ve put in my project name. No big deal for now, since visual studio designer wasn&#39;t helping me much, luckily it works on the devices &amp;amp; emulators&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Comment below if you would like to know more about my &lt;a href=&quot;http://www.windowsphone.com/en-sg/store/app/sg-news/aadad7eb-df65-4868-afa5-8adf2566844b&quot; target=&quot;_blank&quot;&gt;app&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/7328945966023358526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/my-first-windows-phone-8-app-sg-news_20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7328945966023358526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7328945966023358526'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/my-first-windows-phone-8-app-sg-news_20.html' title='My first windows phone 8 app - SG News Cloud services Part 2'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-1120377822599556257</id><published>2013-05-20T10:38:00.001+08:00</published><updated>2013-05-20T10:50:54.858+08:00</updated><title type='text'>My first windows phone 8 app - SG News Cloud services Part 2</title><content type='html'>I&#39;ve</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/1120377822599556257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/my-first-windows-phone-8-app-sg-news_6770.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1120377822599556257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1120377822599556257'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/my-first-windows-phone-8-app-sg-news_6770.html' title='My first windows phone 8 app - SG News Cloud services Part 2'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-4727751320661850852</id><published>2013-05-14T16:16:00.001+08:00</published><updated>2013-05-14T16:16:08.767+08:00</updated><title type='text'>Yahoo Weather on iOS is beautiful</title><content type='html'>So i decided to try and make 1 using HTML &amp;amp; JS, take a look here:&amp;nbsp;&lt;a href=&quot;http://murugaratham.appspot.com/&quot;&gt;http://murugaratham.appspot.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Not much time for details, but if you are interested in getting involved, do drop me a comment/mail.</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/4727751320661850852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/yahoo-weather-on-ios-is-beautiful.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/4727751320661850852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/4727751320661850852'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/yahoo-weather-on-ios-is-beautiful.html' title='Yahoo Weather on iOS is beautiful'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-4195881016178283101</id><published>2013-05-09T10:18:00.000+08:00</published><updated>2013-05-09T10:18:09.986+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="web service"/><title type='text'>My first windows phone 8 app - SG News Cloud services</title><content type='html'>I had a small window of time while waiting for my new job and managed to squeeze an application for windows phone 8. I would like to share my experience and decisions along the way.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;Why are you creating applications for windows phone 8 when the smartphone OS is low?&lt;/i&gt;&lt;/blockquote&gt;
&amp;nbsp;Well, i am not an expert in iOS/android development, although i have led a full team in delivering mobile solutions, but i didn&#39;t had opportunity to write full native applications. With less than 1 week of time, i&#39;ve decided to leverage on my .NET experience to write an application&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;What&amp;nbsp;advice&amp;nbsp;do you have for me to be an indie developer hoping to get some passive income?&lt;/i&gt;&lt;/blockquote&gt;
First of all, if you are an indie developer, plan out your budget &amp;amp; time. Even if you have the best application idea, but if it would requires $500,000 of upfront investment (which you find out in the midst of developing), then you are just wasting your own time. Software licenses, equipment, etc were all consider before i started.&lt;br /&gt;
&lt;br /&gt;
When i decided to make a windows phone app, i&#39;ve read up on what are the software prerequisites. So for windows phone 8, obviously you would need the Windows Phone 8 SDK, and here are the &lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=35471&quot; target=&quot;_blank&quot;&gt;requirements&lt;/a&gt;&amp;nbsp;as well as the &lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkId=265772&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;. I would also need a cheap windows phone 8 device (i bought a Lumia 620 for SG$350), as well as the developer account (SG$135).&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;Can you just tell me how much you spent in total before getting everything up?&lt;/i&gt;&lt;/blockquote&gt;
SG$135 + SG$350 = SG$485&lt;br /&gt;
&lt;br /&gt;
But that&#39;s not all, put into consideration the Windows 8 OS that you need in order to use the SDK. Luckily i gotten my windows 8 key from MSDN subscription.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;So you mean i have to subscribe for MSDN in order to get everything running? You know how much it costs?&lt;/i&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Frankly, i don&#39;t know how much it costs, but i managed to get an MSDN account from &lt;a href=&quot;https://www.microsoft.com/bizspark/Startup/&quot; target=&quot;_blank&quot;&gt;BizSpark&lt;/a&gt;, a short overview, it&#39;s a Microsoft&amp;nbsp;initiative&amp;nbsp;to help &#39;start-ups&#39;. They provide free Azure &amp;amp; MSDN accounts to kick start your &#39;business&#39;.&lt;br /&gt;
&lt;br /&gt;
Enough of Q&amp;amp;A, if you have more, do comment on this post. Let me give a short breakdown of the architecture.&lt;br /&gt;
&lt;br /&gt;
Even though i was given a free azure account, after some evaluation, i went ahead with Google App Engine (GAE). Reasons?&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Azure was too much fluff and complicated for me to get a simple thing done. &lt;a href=&quot;http://en.wikipedia.org/wiki/Windows_Azure#Services&quot; target=&quot;_blank&quot;&gt;Here&#39;s&lt;/a&gt; a quick wiki look up of what they are offering.&lt;/li&gt;
&lt;li&gt;.NET framework is powerful, but too bloated in my case, which might incur high utility costs.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So after deciding on GAE, i was at crossroads once again, Python, Java or Go? I&#39;ve avoid Azure due to bloat, so no Java. Go is young for my liking, so i went with Python.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;Was it a challenge?&amp;nbsp;&lt;/i&gt;&lt;/blockquote&gt;
&lt;br /&gt;
To my surprise, No. I have zero knowledge on Python but it only took 2 days for everything to start working. Google did a great job in providing python toolkit which offers very useful features, e.g. authentication, authorization, api to Memcached, NoSQL, and many more.&lt;br /&gt;
&lt;br /&gt;
So i hacked up a REST webservice and simple Content Management System (CMS) using GAE, webapp2 and JINJA templates. Tested everything a few rounds and didn&#39;t had to bother much about the cloud server anymore. Oh and not to mention GAE gives 1gb of bandwidth daily as opposed to Azure&#39;s complicated free &lt;a href=&quot;http://stackoverflow.com/questions/15290803/azure-free-website-and-free-bandwidth&quot; target=&quot;_blank&quot;&gt;tier&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I will update with the windows phone 8 application development in my next post :) in the meantime, if you have a windows phone, do take a look &lt;a href=&quot;http://www.windowsphone.com/en-sg/store/app/sg-news/aadad7eb-df65-4868-afa5-8adf2566844b&quot; target=&quot;_blank&quot;&gt;SG News&lt;/a&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/4195881016178283101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/my-first-windows-phone-8-app-sg-news.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/4195881016178283101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/4195881016178283101'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2013/05/my-first-windows-phone-8-app-sg-news.html' title='My first windows phone 8 app - SG News Cloud services'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-919935474859288117</id><published>2012-11-01T10:53:00.000+08:00</published><updated>2012-11-01T10:53:13.759+08:00</updated><title type='text'>iOS safari choppy scrolling</title><content type='html'>Try adding this to your container:&lt;br /&gt;
&lt;br /&gt;
-webkit-overflow-scrolling: touch;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now enjoy smooth scrolling :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/919935474859288117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2012/11/ios-safari-choppy-scrolling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/919935474859288117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/919935474859288117'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2012/11/ios-safari-choppy-scrolling.html' title='iOS safari choppy scrolling'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-7512584875322593402</id><published>2012-06-08T00:36:00.000+08:00</published><updated>2013-02-04T17:31:13.916+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nodejs"/><title type='text'>nodejs</title><content type='html'>I&#39;ve given myself too much excuses, but this time round, i&#39;ve finally did something using node.js&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/murugaratham/nodejs-express-quickstart&quot;&gt;nodejs express quickstart&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I&#39;m still pretty new to this, but i took a couple of days to set up amazon ec2 micro instance (free), mess around with unix, install nodejs, dynamic dns (dyndns.org) and now i have a running instance in the cloud!&lt;br /&gt;
&lt;br /&gt;
Check it out from time to time &lt;a href=&quot;http://ec2.dyndns.biz/&quot; style=&quot;text-decoration: line-through;&quot;&gt;http://ec2.dyndns.biz&lt;/a&gt;&amp;nbsp;(i&#39;ve lost the dns after letting the ec2 instance dead for too long, i&#39;ve registered a new ec2 instance at &lt;a href=&quot;http://murugaratham.dyndns.biz/&quot;&gt;http://murugaratham.dyndns.biz&lt;/a&gt;), i&#39;ll update the site as i improve the starter :)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/7512584875322593402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2012/06/nodejs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7512584875322593402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7512584875322593402'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2012/06/nodejs.html' title='nodejs'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-3624014688285807857</id><published>2012-01-18T09:55:00.000+08:00</published><updated>2012-01-18T09:55:13.982+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="nodejs"/><title type='text'>Microsoft technologist&#39;s view on nodejs</title><content type='html'>Most of my enterprise experience is bound to the Microsoft stack (.Net, SharePoint 2007 &amp;amp; 2010, SQL Server, IIS, Windows 2003, 2008, 2008 R2, the list goes on and on)&lt;br /&gt;
&lt;br /&gt;
Pretty much of this change ever since i took my part time degree and i was brought back to hardcore software development, design and documentation. C++, C, php, rdms, 3NF, data structures &amp;amp; abstraction, algorithms, big O notation, etc.&lt;br /&gt;
&lt;br /&gt;
I sat down and gave it a thought, the very existence of IT in most businesses are mostly for complimenting a business. We can leave Facebook, twitter, google and yahoo out of the picture, as they had caught on a market niche while their respective industry are in their infancy.&lt;br /&gt;
&lt;br /&gt;
In the last project that i was involved in, i&#39;ve opened up my mindset, i told myself, not to listen to microsoft all the time. I said no to ajaxcontrol toolkit, i said no to grid view binding to datasets. This time i wan to go hardcore and be able to know exactly what i am doing and how is it being done.&lt;br /&gt;
&lt;br /&gt;
Enter: jQuery. There is no need for me to introduce this excellent javascript framework, but what it did for me was more than being a javascript framework. It allow me to be exposed to the open source communities on IRC, mailing lists and several forums. Underscore.js, less.js and Zurb foundation soon found their way into my IDE.&lt;br /&gt;
&lt;br /&gt;
Soon enough, i&#39;ve heard and tried a few node.js one page applications. The concept was clear and easy. The one language that most, if not all web developers are familiar with:&amp;nbsp;Javascript. Using it for your user interface, server application and even database, one language to rule them all.&lt;br /&gt;
&lt;br /&gt;
Author Ryan Dahl initially insisted that node be a 1 process thingy, lately, i believed due to many feedback and Joyent&#39;s direction, now they provide process forking.&lt;br /&gt;
&lt;br /&gt;
My main roadblock for implementation in production is the stability, better debugging capabilities &amp;amp; easier fail-over. There are ways to implement fail over, but due to the fact that it is still under very rapid development, breaking API changes &amp;amp; deprecation caused a few sample apps that i created having problems.&lt;br /&gt;
&lt;br /&gt;
I will look forward to v1.0 and implement it on our production servers.</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/3624014688285807857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2012/01/microsoft-technologists-view-on-nodejs.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/3624014688285807857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/3624014688285807857'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2012/01/microsoft-technologists-view-on-nodejs.html' title='Microsoft technologist&#39;s view on nodejs'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-335854839757767335</id><published>2011-12-08T11:45:00.001+08:00</published><updated>2011-12-08T11:45:21.668+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="wiki"/><title type='text'>IE7 &amp; IE8 calibri font blurry Sharepoint jQuery</title><content type='html'>Using jQuery in Sharepoint became a second nature to me. I was using a div with fadeIn(), nothing special and everything went well on our development environment and integration environment. Until we went to UAT and received lots of complains from users saying that the fonts look pixelated and blurry. I went down on site and saw that the fonts was indeed very blurry (especially true on their screens). &lt;br /&gt;
&lt;br /&gt;
Bad news for me as I had a 7 level depth of div and span tags, not to mentioned it was in a webpart and Sharepoint corev4.css had this div.ms-WPBody that likes to screw my styles up.&lt;br /&gt;
&lt;br /&gt;
After deep investigation, since safari, chrome and IE9 didn&#39;t had any blurry fonts, I downgraded my IE9 to IE8 and managed to replicate the issue. Hours past and I did a side-by-side comparison between chrome and IE8. Then I saw something within the top level div which I used the fadeIn() effect. div id=&quot;divContainer&quot; style=&quot;filter: alpha bla bla bla,.....&quot; &lt;br /&gt;
&lt;br /&gt;
It caught my attention and I used IE developer tools and went straight to the CSS tab and looked for the &quot;filter&quot;. I turned it off by clicking on the checkbox. The fonts immediately sharpened. Hmm, http://blogs.msdn.com/b/e7/archive/2009/06/23/engineering-changes-to-cleartype-in-windows-7.aspx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So I&#39;ve read up a lot and found out that jQuery might actually add in the filter somehow. I managed to solve it by putting:&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&#39;divContiner&#39;).style.removeAttribute(&#39;filter&#39;);&lt;br /&gt;
&lt;br /&gt;
But I later found out that it only work for IE8. After some more frustrating hours, I discarded the fadeIn() effect and the fonts were sharp and crisp :)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/335854839757767335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/12/ie7-ie8-calibri-font-blurry-sharepoint.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/335854839757767335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/335854839757767335'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/12/ie7-ie8-calibri-font-blurry-sharepoint.html' title='IE7 &amp; IE8 calibri font blurry Sharepoint jQuery'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-2714429092113352233</id><published>2011-10-13T23:43:00.000+08:00</published><updated>2011-10-15T11:52:36.978+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>Facebook detect movement before loading new feeds</title><content type='html'>If you are eagle-eyed enough, you would have noticed that facebook actually doesn&#39;t poll unnecessarily from the server. Somehow it knows that you are away for sometime and when you are active and start to move your mouse, newer feeds starts loading. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; document.onmousemove = (function() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var onmousestop = function() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;h1&#39;).css(&quot;color&quot;, &quot;white&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }, thread;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return function() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;h1&#39;).css(&quot;color&quot;, &quot;red&quot;) clearTimeout(thread);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; thread = setTimeout(onmousestop, 200);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&amp;nbsp; })();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Read more on this:&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Closure_%28computer_science%29&quot;&gt;Closures&lt;/a&gt;&lt;br /&gt;
I&#39;ve embedded this scrip into the blog -&amp;gt;&amp;nbsp;&lt;a href=&quot;http://softwareengineering-in-a-can.blogspot.com/&quot;&gt;Blue H1&lt;/a&gt;, so don&#39;t panic if you see the h1 starts turning blue :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/2714429092113352233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/10/facebook-detect-movement-before-loading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/2714429092113352233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/2714429092113352233'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/10/facebook-detect-movement-before-loading.html' title='Facebook detect movement before loading new feeds'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-829314831815569061</id><published>2011-09-29T21:23:00.000+08:00</published><updated>2011-09-29T21:25:45.751+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>Mimic wikipedia for SharePoint 2010 search</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Recently, there was a user requirement for customizing SharePoint 2010 Enterprise wiki search control.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Objective: Mimicking Wikipedia search box functionality, whereby when a user enters a wiki page title, if there is an exact hit, we should redirect the user to the page, instead of displaying SharePoint&#39;s default result page. (Less the autocomplete)&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Using jQuery &amp;amp; a bit of digging into SP.js, i found that internally, SharePoint actually uses a javascript function called &quot;SubmitSearchRedirect&quot;, which actually redirects the user to &quot;/_layouts/searchresults.aspx&quot; and appending the search keyword as the querystring. &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So a seemingly difficult request was actually completed in less than 10 mins.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;function&amp;nbsp;applyCustomSearch() {&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;            $(&quot;#onetIDGoSearch&quot;).attr(&quot;onclick&quot;, &quot;&quot;); //user click on search img
            $(&quot;#idSearchString&quot;).attr(&quot;onkeydown&quot;, &quot;&quot;); //user keystroke

            $(&quot;#onetIDGoSearch&quot;).click(function() {
                &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;&amp;lt;Your AJAX function to check if the page exists&amp;gt;&lt;/span&gt;($(&quot;#idSearchString&quot;).val(), function(exactHit){
                    if(&lt;/span&gt;exactHit== true) { //simulate got exact hit
&lt;span class=&quot;Apple-style-span&quot;&gt;                        window.location = &quot;http://&quot;+ document.domain +&quot;/&amp;lt;Your Enterprise Wiki Homepage&amp;gt;/&quot; + $(&quot;#idSearchString&quot;).val() + &quot;.aspx?ContextId=&quot; + $.queryString(&quot;ContextId&quot;);
                    } else { 
                        SubmitSearchRedirect(&quot;http://&quot;+ document.domain +&quot;/_layouts/searchresults.aspx&quot;);
                    }           
                });
            });

            $(&quot;#idSearchString&quot;).keydown(function (event) {                
                if (event.keyCode == &#39;13&#39;) {
                    event.preventDefault();
                    &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;lt;Your AJAX function to check if the page exists&amp;gt;&lt;/span&gt;($(&quot;#idSearchString&quot;).val(), function(exactHit){&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;                    if(&lt;/span&gt;exactHit== true) { //simulate got exact hit
&lt;span class=&quot;Apple-style-span&quot;&gt;                        window.location = &quot;http://&quot;+ document.domain +&quot;/&amp;lt;Your Enterprise Wiki Homepage&amp;gt;/&quot; + $(&quot;#idSearchString&quot;).val() + &quot;.aspx?ContextId=&quot; + $.queryString(&quot;ContextId&quot;);
                    } else { 
                        SubmitSearchRedirect(&quot;http://&quot;+ document.domain +&quot;/_layouts/searchresults.aspx&quot;);
                    }           
                });&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;            });
        }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The logic is dead simple. &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For my project, i used an event receiver to track all the articles by saving them into a database and creating a tag cloud. So i had the benefit of knowing exactly how many article pages and how they are being named. So all i did was a simple $.getJSON() to my custom RESTful WCF service, which returns a boolean, and the rest is straightforward.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For simpler projects, you can either use &lt;a href=&quot;http://spservices.codeplex.com/&quot;&gt;http://spservices.codeplex.com/&lt;/a&gt; to query the wiki pages library for the article existence.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I shall do a blogpost on how to embed jQuery library into SharePoint 2010 in the subsequent posts.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/829314831815569061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/09/mimic-wikipedia-for-sharepoint-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/829314831815569061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/829314831815569061'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/09/mimic-wikipedia-for-sharepoint-2010.html' title='Mimic wikipedia for SharePoint 2010 search'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Serangoon, Singapore</georss:featurename><georss:point>1.3492195405866363 103.87358665466309</georss:point><georss:box>1.3412825405866362 103.86371615466308 1.3571565405866364 103.88345715466309</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-6936542071086858860</id><published>2011-09-21T12:20:00.000+08:00</published><updated>2011-10-27T23:58:24.042+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><title type='text'>GSPMigrator source code release</title><content type='html'>After leaving the source codes for this tool, i&#39;ve decided to put it on&amp;nbsp;&lt;a href=&quot;http://gspmigrator.codeplex.com/&quot;&gt;CodePlex&lt;/a&gt;&amp;nbsp;with the GNU v2 licence, hoping that it will support and help any one that needs to migrate files into SharePoint 2007 (and in the future 2010).&lt;br /&gt;
&lt;br /&gt;
GSPMigrator is basically a migration tool that allows anyone within the network to connect to a network drive and view it with a tree view.&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixcjNeZdhOmZJriYdXX6y1pL2TpJs-FkLtCrZklmDen1xu0pubbFTTAxn6RomuXGGQAZcXAv5guVEgV_y_QFEAfPFzUWPf6VMJ8agmwQHAbs1uiZvtVEHp1A6OuR-bleqK4iddaufhZCQ/s1600/screen-capture.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixcjNeZdhOmZJriYdXX6y1pL2TpJs-FkLtCrZklmDen1xu0pubbFTTAxn6RomuXGGQAZcXAv5guVEgV_y_QFEAfPFzUWPf6VMJ8agmwQHAbs1uiZvtVEHp1A6OuR-bleqK4iddaufhZCQ/s400/screen-capture.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
There are several problems (although there are still some minor ones) that i went through before coming out with this version:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Lazy-loading vs eager-loading on generating tree views&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Lazy-loading will give better user experience.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/6936542071086858860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/09/gspmigrator-source-code-release.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/6936542071086858860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/6936542071086858860'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/09/gspmigrator-source-code-release.html' title='GSPMigrator source code release'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixcjNeZdhOmZJriYdXX6y1pL2TpJs-FkLtCrZklmDen1xu0pubbFTTAxn6RomuXGGQAZcXAv5guVEgV_y_QFEAfPFzUWPf6VMJ8agmwQHAbs1uiZvtVEHp1A6OuR-bleqK4iddaufhZCQ/s72-c/screen-capture.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-7494852623874840226</id><published>2011-09-20T17:52:00.000+08:00</published><updated>2011-09-20T17:52:28.309+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><title type='text'>Customising SharePoint 2010 enterprise wiki</title><content type='html'>Requirements:&lt;br /&gt;
&lt;br /&gt;
There are 3 different business context:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Work&lt;/li&gt;
&lt;li&gt;Personal&lt;/li&gt;
&lt;li&gt;Entertainment&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
When a user comes into the wiki site, there will be a visual webpart embedded in the form to scope this document to 1 of the above 3 context. So if the user would like to post a Work-related wiki article, he can select an option (dropdown list or radio button etc, but on my POC it&#39;s only a textbox :P) and when he click on the sharepoint save &amp;amp; close button&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSqTBUCe1sIIz2vaTvwNx4sRGY6yaNa-rAkEOYiOMB0HW77054ABeA4g1lcESkU1YezahLm8yIAemRU7VxLZjj4KISehq1SEc7RA0-V4EXH8taqrIaqHcv2XkNYDRMhm7huD46RgUgS1w/s1600/screen-capture.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSqTBUCe1sIIz2vaTvwNx4sRGY6yaNa-rAkEOYiOMB0HW77054ABeA4g1lcESkU1YezahLm8yIAemRU7VxLZjj4KISehq1SEc7RA0-V4EXH8taqrIaqHcv2XkNYDRMhm7huD46RgUgS1w/s1600/screen-capture.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
the permission of the article will be restricted based on predefined rules.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Solution (after some thoughts):&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Event receiver to set permissions&lt;/li&gt;
&lt;li&gt;Using HttpContext in EventReceiver synchronous events (itemAdding &amp;amp; itemUpdating) to get the value to b&lt;/li&gt;
&lt;li&gt;Customising the master page to include a VWP (visual webpart) to allow user select &quot;context&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/7494852623874840226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/09/customising-sharepoint-2010-enterprise.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7494852623874840226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7494852623874840226'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/09/customising-sharepoint-2010-enterprise.html' title='Customising SharePoint 2010 enterprise wiki'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSqTBUCe1sIIz2vaTvwNx4sRGY6yaNa-rAkEOYiOMB0HW77054ABeA4g1lcESkU1YezahLm8yIAemRU7VxLZjj4KISehq1SEc7RA0-V4EXH8taqrIaqHcv2XkNYDRMhm7huD46RgUgS1w/s72-c/screen-capture.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-8667939218119854433</id><published>2011-07-21T21:05:00.000+08:00</published><updated>2011-07-21T21:05:17.058+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>.Net technical test drawing mountains</title><content type='html'>Recently, my friend was given a technical test during an interview, i realized that it&#39;s a rather common &quot;test&quot; given to interviewees. I took up the challenge and squeeze out some time to do it.&lt;br /&gt;
&lt;br /&gt;
The interviewer asked my friend to write a console application that reads from user&#39;s keyboard input, when the user enters a number, draw a mountain with the user input as the number of back and forward slashes. (of course, with bigger numbers, the subsequent layers need more padding between the slashes).&lt;br /&gt;
&lt;br /&gt;
I wasn&#39;t exactly sure how the question was structured, but based on my understanding, i &lt;strike&gt;scribbled&lt;/strike&gt;&amp;nbsp;typed the expected end results on a text editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/\ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gap=0, space=0, input=1&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;/\ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;gap=1, space=0, input=2 (print new line)&lt;br /&gt;
/ &amp;nbsp;\ &amp;nbsp; &amp;nbsp; &amp;nbsp; gap=0, space=2&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; /\ &amp;nbsp; &amp;nbsp; &amp;nbsp; gap=2, space=0, input=3 (print new line)&lt;br /&gt;
&amp;nbsp;/ &amp;nbsp;\ &amp;nbsp; &amp;nbsp; &amp;nbsp;gap=1, space=2 (print new line)&lt;br /&gt;
/ &amp;nbsp; &amp;nbsp;\ &amp;nbsp; &amp;nbsp; gap=0, space=4&amp;nbsp;(print new line)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;/\ &amp;nbsp; &amp;nbsp; &amp;nbsp;gap=3, space=0, input=4&lt;br /&gt;
&amp;nbsp; / &amp;nbsp;\ &amp;nbsp; &amp;nbsp; gap=2, space=2&amp;nbsp;(print new line)&lt;br /&gt;
&amp;nbsp;/ &amp;nbsp; &amp;nbsp;\ &amp;nbsp; &amp;nbsp;gap=1, space=4&amp;nbsp;(print new line)&lt;br /&gt;
/ &amp;nbsp; &amp;nbsp; &amp;nbsp;\ &amp;nbsp; gap=0, space=6&amp;nbsp;(print new line)&lt;br /&gt;
&lt;br /&gt;
So, with my iPad showing me the expected results and my primary monitor with visual studio 2010... i started writing some loops:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;using System;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;namespace DrawMountains&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; class Program&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void Main(string[] args)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int inputNum;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (int.TryParse(Console.ReadLine(), out inputNum))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; inputNum; i++)//print tip of mountain &amp;amp; padding (if any)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int temp = inputNum-i; //amount of padding to print&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (temp &amp;gt; 1) //amount of space before left slope&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrintSpace();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; temp--;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrintLeftSlope();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //----------------prints all left slope correctly (up to n num)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int temp2 = i*2;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int j = 0; j&amp;lt;temp2; j++) //padding between the slashes&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrintSpace();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrintRightSlope(); //self-explanatory&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadKey();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Invalid input&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadKey();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void PrintLeftSlope()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(&quot;/&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void PrintRightSlope()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(@&quot;\&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void PrintSpace()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Write(&quot; &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This post is purely for educational purposes, no point for memorizing this sample and contrived effort. I believe the interviewer&#39;s purpose is to see how strong are you in the way you design your algorithms, handling exception (which i didn&#39;t do) and perhaps your naming convention and formatting.&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/8667939218119854433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/07/net-technical-test-drawing-mountains.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/8667939218119854433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/8667939218119854433'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/07/net-technical-test-drawing-mountains.html' title='.Net technical test drawing mountains'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-5729582435998488311</id><published>2011-05-23T13:12:00.001+08:00</published><updated>2011-05-23T13:17:32.710+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><title type='text'>SharePoint 2010 and .Net 4 Part 2</title><content type='html'>A continuation from this &lt;a href=&quot;http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-and-net-4.html&quot;&gt;post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I have achieved a managed software development cycle for complex SharePoint 2010 systems, a brief overview (albeit poorly drawn sample)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrT7tIroTK3t1VeXDbQiSqtxI9glu0aqmr05dIYpLeS0UGPLQtOB0g0xGZUXTsE3NsrAccfboXOpg311pToAJvsI71dVUHX06PUQ2j579aoW8l-9uCTsWnCrx0CtHfayadrgIA3u_-BsM/s1600/OCP+architecture.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrT7tIroTK3t1VeXDbQiSqtxI9glu0aqmr05dIYpLeS0UGPLQtOB0g0xGZUXTsE3NsrAccfboXOpg311pToAJvsI71dVUHX06PUQ2j579aoW8l-9uCTsWnCrx0CtHfayadrgIA3u_-BsM/s320/OCP+architecture.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;I have had several problems before finalizing the solution &amp;amp; project files:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;SharePoint 2010 application pool can only support .Net 3.5 and below (our latest proprietary framework is done with .Net 4.0)&lt;/li&gt;
&lt;li&gt;Cross-Origin Request Sharing&amp;nbsp;&lt;/li&gt;
&lt;li&gt;SharePoint 2010 requires signed assemblies for Visual Webpart projects in order to do debugging&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For the first problem, we have worked around by wrapping the Business Interface with a WCF project that acts as a proxy. We had a lot of internal arguments, discussions and some conflict on this approach. One of the team member is uncomfortable with the additional overhead, however after doing several tests with &lt;a href=&quot;http://httpd.apache.org/docs/2.0/programs/ab.html&quot;&gt;Apache Bench&lt;/a&gt;, we are&amp;nbsp;satisfied&amp;nbsp;with the performance and delays. Another colleague actually done a similar implementation and mentioned that in the long-run when user base increases, we can actually scale out by letting the WCF services run on a dedicated box, sounds nice. Thus, we went ahead with the WCF as a proxy pattern.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For the second problem, we spent many man hours figuring out why we can&#39;t do an AJAX call to our custom WCF services via jQuery 1.6. After narrowing down the issues to the Cross-Origin Request Sharing, we have tried to use JSONP without success, setting jQuery options of $.support.cors = true without success, jQuery options of CrossDomain = true without success. I spent few hours trying to make the jQuery call the WCF, something which appears so simple and straight forward, i decided to use google chrome and see what the console says..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&quot;XMLHttpRequest cannot load &amp;lt;url&amp;gt;. Origin &amp;lt;url&amp;gt; is not allowed by Access-Control-Allow-Origin.&quot; We fixed the issue by adding a global.asax into the WCF project and adding a method in the Application_BeginRequest.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;i&gt;protected void Application_BeginRequest(object sender, EventArgs e)&lt;br /&gt;
{&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; HttpContext.Current.Response.AddHeader(&quot;Access-Control-Allow-Origin&quot;, &quot;*&quot;);&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; if (HttpContext.Current.Request.HttpMethod == &quot;OPTIONS&quot;)&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current.Response.AddHeader(&quot;Access-Control-Allow-Methods&quot;, &amp;nbsp;&quot;GET, POST&quot;);&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;font-style: normal;&quot;&gt;&lt;i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current.Response.AddHeader(&quot;Access-Control-Allow-Headers&quot;, &quot;Content-Type, Accept&quot;);&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;i&gt;&lt;/i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style=&quot;font-style: normal;&quot;&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current.Response.AddHeader(&quot;Access-Control-Max-Age&quot;, &quot;1728000&quot;);&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;i&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current.Response.End();&lt;/i&gt;&lt;/i&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; }&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;}&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;&lt;div&gt;For the third problem, it wasn&#39;t so bad, we just had to get the framework team to sign all their libraries before we add into SharePoint bin. This is actually for non Visual Webpart solutions, namely sharepoint application pages. We would have to use our Business Objects and Interfaces on the codebehind, so that pretty much explains it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Have fun developing in SharePoint 2010 :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/5729582435998488311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-and-net-4-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/5729582435998488311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/5729582435998488311'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-and-net-4-part-2.html' title='SharePoint 2010 and .Net 4 Part 2'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrT7tIroTK3t1VeXDbQiSqtxI9glu0aqmr05dIYpLeS0UGPLQtOB0g0xGZUXTsE3NsrAccfboXOpg311pToAJvsI71dVUHX06PUQ2j579aoW8l-9uCTsWnCrx0CtHfayadrgIA3u_-BsM/s72-c/OCP+architecture.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-1454288744790755465</id><published>2011-05-12T20:11:00.000+08:00</published><updated>2011-05-14T04:21:49.214+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><title type='text'>SharePoint 2010 and .Net 4</title><content type='html'>There are many people that tried and failed (including myself), my company have a proprietary framework written in .Net 4.0 (latest release), after 3 frustrating days and nights, i&#39;ve given up and made several work-arounds and exceptions.&lt;br /&gt;
&lt;br /&gt;
The only way that allow you to use .Net 4 projects is, to wrap it around a WCF 3.5 project. My solution for the current project involves jQuery and WCF heavily in order to give the end users a highly interactive interface. Hope to be able to extract non-sensitive snippets and post it here.</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/1454288744790755465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-and-net-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1454288744790755465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1454288744790755465'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-and-net-4.html' title='SharePoint 2010 and .Net 4'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-6861870204755882698</id><published>2011-05-11T22:44:00.000+08:00</published><updated>2011-05-11T22:44:21.535+08:00</updated><title type='text'>Fix iPhone vibration problems</title><content type='html'>My iPhone 3GS vibration motor just went dead on me for no reason, luckily I have an app called iBrate, after double tapping on the screen which supposedly made the phone vibrate non stop, it&#39;s still not budging, in a fit of anger I hit it on my table and the thing went bzzzzzzzzzzzz. Caught me by surprise, after googling for similar cases, I found that using iBrate with slapping the phone&#39;s back on the palm is a solution for many. Guess it&#39;s time to get iPhone 5 as soon as it launches :)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/6861870204755882698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/fix-iphone-vibration-problems.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/6861870204755882698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/6861870204755882698'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/fix-iphone-vibration-problems.html' title='Fix iPhone vibration problems'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-7369608427794069061</id><published>2011-05-05T16:56:00.000+08:00</published><updated>2011-05-05T16:56:16.271+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><title type='text'>SharePoint 2010 custom error off</title><content type='html'>Back in MOSS 2007, when i need to debug, all i have to do is to change the web.config file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;customErrors mode=&quot;Off&quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, in SharePoint 2010, there is another web.config in the &lt;a href=&quot;http://mysharepointwork.blogspot.com/2010/02/sharepoint-14-hive-directory-structure.html&quot;&gt;Hive folder&lt;/a&gt;, under LAYOUTS. To disable customError, remember to give hive folder a visit and change the values there :)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/7369608427794069061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-custom-error-off.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7369608427794069061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/7369608427794069061'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/05/sharepoint-2010-custom-error-off.html' title='SharePoint 2010 custom error off'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-1660183610602030406</id><published>2011-03-02T17:49:00.000+08:00</published><updated>2011-03-02T17:49:59.977+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="wiki"/><title type='text'>Sharepoint 2010 custom wiki page layout</title><content type='html'>While doing some exploratory work, i tried to clone the default Enterprise Wiki pagelayout and added some of my own controls, everything went smooth until when i try to save &amp;amp; close the page and i was thrown the following error:&lt;br /&gt;
&lt;i&gt;&quot;failed to get value of the wiki categories column from the managed metadata field type control invalid field name&quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
Googling didn&#39;t help much as most of them prompted me to activate the taxonomy site feature (which after verifying, it was already active), after some head scratching, i realized that when i duplicate the layout page, i&#39;ve used the default Associated Content Type as &quot;Article Page&quot; instead of &quot;Enterprise Wiki Page&quot;, after editing the associated content type, all went well :)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/1660183610602030406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/03/sharepoint-2010-custom-wiki-page-layout.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1660183610602030406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1660183610602030406'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/03/sharepoint-2010-custom-wiki-page-layout.html' title='Sharepoint 2010 custom wiki page layout'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-935816348530883010</id><published>2011-02-25T15:57:00.000+08:00</published><updated>2011-02-25T15:57:22.677+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint 2010"/><title type='text'>SharePoint 2010 as a platform to mimic facebook?</title><content type='html'>One of the greatest challenge for me to date. Using SharePoint 2010 as a platform to mimic Facebook social networking capabilities.&lt;br /&gt;
&lt;br /&gt;
First thing that came to my mind: FaceBook took 6 years and with their strong team of developers that contributed so much to the open source community. The&amp;nbsp;&lt;a href=&quot;http://www.makeuseof.com/tag/facebook-work-nuts-bolts-technology-explained/&quot;&gt;technology&lt;/a&gt;&amp;nbsp;they used are amazing, which is not something my company should undertake.. (dam pre-sales)&lt;br /&gt;
&lt;br /&gt;
I am already tasked to deliver it and i already have so much in my mind on the implementation design, performance considerations, further more, i&#39;m leading a &lt;a href=&quot;http://en.wikipedia.org/wiki/Virtual_team&quot;&gt;virtual team&lt;/a&gt;&amp;nbsp;to complete this project. It&#39;s going to be a tough year ahead for me, however if it manage to satisfy my client, i&#39;d be glad as it&#39;s something which &amp;nbsp;not many sharepoint developers dare to undertake.</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/935816348530883010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/02/sharepoint-2010-as-platform-to-mimic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/935816348530883010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/935816348530883010'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2011/02/sharepoint-2010-as-platform-to-mimic.html' title='SharePoint 2010 as a platform to mimic facebook?'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-4934033599844310978</id><published>2010-12-30T13:36:00.000+08:00</published><updated>2010-12-30T13:36:28.549+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="silverlight"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>Silverlight on sharepoint</title><content type='html'>Recently, i have a silverlight project being handed over to me, i was supposed to evaluate the security concerns that might go against my client&#39;s policy. I started off adding the feature into my site, saw the new web part.. added the web part to my site, but all it shows was a blank white space, it can&#39;t be clicked, when i right click, there&#39;s only a generic silverlight context menu. A bit of searching on msdn/technet, i saw this post:&amp;nbsp;&lt;a href=&quot;http://blogs.technet.com/b/jorke/archive/2007/09/11/silverlight-mime-types-in-iis6.aspx&quot;&gt;silverlight mime&lt;/a&gt;, did as they said and the fanciful silverlight components starting to load :)</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/4934033599844310978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/12/silverlight-on-sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/4934033599844310978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/4934033599844310978'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/12/silverlight-on-sharepoint.html' title='Silverlight on sharepoint'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-1941303656234678985</id><published>2010-11-03T16:59:00.002+08:00</published><updated>2010-11-03T16:59:59.869+08:00</updated><title type='text'>File share to SharePoint 2007/2010 migrator</title><content type='html'>A stable release is available &lt;a href=&quot;http://gspmigrator.codeplex.com/&quot;&gt;here&lt;/a&gt; now! I haven&#39;t played much with SharePoint 2010, so glad that it passed my own test for migration, onwards for future enhancements.</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/1941303656234678985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/11/file-share-to-sharepoint-20072010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1941303656234678985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/1941303656234678985'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/11/file-share-to-sharepoint-20072010.html' title='File share to SharePoint 2007/2010 migrator'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-9178058435578462837</id><published>2010-10-12T21:49:00.000+08:00</published><updated>2010-10-12T21:49:34.370+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="web service"/><category scheme="http://www.blogger.com/atom/ns#" term="WSE3.0"/><title type='text'>WSE 3.0 &amp; inversed murphy&#39;s law</title><content type='html'>I know that murphy&#39;s law exist and in short, it&#39;s a law that states that whatever might go wrong, will go wrong. &lt;br /&gt;
&lt;br /&gt;
But I was forced to do OT to implement WSE 3.0, a technology that went out of support(?) since 2005? I started the implementation with a I&#39;m-gonna-OT-till-client-gets-pissed attitude. But at the last min after struggling for 2hrs with an exception, &quot;The security token cannot be authenticated or authorized.&quot; &lt;br /&gt;
&lt;br /&gt;
I managed to rectify it... A stroke of genius came when I try to use command prompt to run notepad as the user specified in the security contract.. Command prompt returned me: user account is being locked out. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
True enough everything went OK after I unlocked the account via &quot;local users and group&quot; -__-&lt;br /&gt;
&lt;br /&gt;
The command:&lt;br /&gt;
&quot;runas /user:&lt;useraccount&gt; notepad.exe&quot;&lt;br /&gt;
&lt;br /&gt;
For once.. Murphy&#39;s law worked for me instead of against me.</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/9178058435578462837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/10/wse-30-inversed-murphys-law.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/9178058435578462837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/9178058435578462837'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/10/wse-30-inversed-murphys-law.html' title='WSE 3.0 &amp; inversed murphy&#39;s law'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5369266905549397382.post-6152305735769811786</id><published>2010-09-22T15:26:00.001+08:00</published><updated>2010-09-22T17:12:17.958+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2007"/><title type='text'>upload file into sharepoint 2007 (copy.asmx)</title><content type='html'>There are many ways to do it:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Customised web services&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Out-of-the-box web service (&lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/copy.copy(office.12).aspx&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;copy.asmx&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/WebDAV&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;WebDAV&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Advantages of using &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Customised web services&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Ease of uploading (through personalised codes)&lt;/li&gt;
&lt;li&gt;Ability to do many fine tuning (such as permissions, etc)&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Disadvantages of using&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Customised web services&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Not all SharePoint owners are comfortable with customised webservices running on their server&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;div&gt;Advantages of using&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Out-of-the-box web service (&lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/copy.copy(office.12).aspx&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;copy.asmx&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;)&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Using Microsoft &quot;supported&quot; API&lt;/li&gt;
&lt;li&gt;No need to fear if the next service pack is going to screw up all the pre-patch programs&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Disadvantages of using&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Out-of-the-box web service (&lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/copy.copy(office.12).aspx&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;copy.asmx&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;)&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;s&gt;Limited&lt;/s&gt; No way to set permissions of files&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;div&gt;Advantages of using&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/WebDAV&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;WebDAV&lt;/span&gt;&lt;/a&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Very easy to implement&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Disadvantages of using&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/WebDAV&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;WebDAV&lt;/span&gt;&lt;/a&gt;:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Unable to set any metadata&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;I had a recent job to do a migration from File System -&amp;gt; SharePoint Document Library. A short summary of what happened:&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
I was told to migrate everything over with the same file names, permissions, taxonomy (folder structures), etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Initially, i chose to use SharePoint OOTB web service to do all the above, as i know that i can use it to create folders, upload items, set metadata, etc. Until i hit a problem: I can&#39;t fricking set the permissions. After a lot of negotiation with my stakeholders, there&#39;s only 2 choice for me (without breaching their microsoft gold support clauses). Deploy a&amp;nbsp;customized&amp;nbsp;web service written by me or skip the whole permission idea (they have to do it manually using cheap interns). Lucky for me, they chose to skip the permission thing, so i proceed to continue with the whole project with user-friendly user interface using just the Web Service of SharePoint. Another advantage of using it is, you can use it anywhere as long as you can achieve a connection to the SharePoint and File System, you do not need to be running on either servers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I am still tweaking the project source codes for some eye candies before my next new assignment begins.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;And for the copy.asmx to be consumed, you only have to do this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;public string UploadFile(string sourceFilePath, string destinationUrl)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string msg = string.Empty;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Copy c = new Copy();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c.Url = this.spURL + &quot;/_vti_bin/copy.asmx&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Authenticate(c);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;byte[] myBinary = File.ReadAllBytes(sourceFilePath);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] destinationUrlColl = { destinationUrl };&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FieldInformation info1 = new FieldInformation();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;info1.DisplayName = &quot;Title&quot;;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;info1.InternalName = &quot;Title&quot;;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;info1.Type = FieldType.Text;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;info1.Value = &quot;new title&quot;;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FieldInformation[] info = { info1 };&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CopyResult resultTest = new CopyResult();&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CopyResult[] result = { resultTest };&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//When creating new content use the same URL in the SourceURI as in the Destination URL argument&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c.CopyIntoItems(destinationUrl, destinationUrlColl, info, myBinary, out result);&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (result[0].ErrorMessage != null)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg = &quot;Error: &quot; + result[0].ErrorMessage;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg = &quot;Success&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (Exception ex)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//TODO: logging &amp;amp; handling&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return msg;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I written a simple authentication method to do the authentication properly -&amp;gt;&amp;nbsp;Authenticate(c);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;internal CookieContainer AuthenticateFBA()&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CookieContainer cookies = new CookieContainer();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using (GSPAuthenticationWS.Authentication authSvc = new GSPAuthenticationWS.Authentication())&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;authSvc.Url = this.spURL + &quot;/_vti_bin/authentication.asmx&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;authSvc.CookieContainer = new System.Net.CookieContainer(); &amp;nbsp; &amp;nbsp; //create a new cookie container&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;authSvc.AllowAutoRedirect = true;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//set the FBA login information&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;GSPAuthenticationWS.LoginResult result = authSvc.Login(this.spAdminId, this.spAdminPw);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (result.ErrorCode == GSPAuthenticationWS.LoginErrorCode.NoError)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CookieCollection cookieColl = authSvc.CookieContainer.GetCookies(new Uri(authSvc.Url));&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Get the specific cookie which contains the security token&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cookies.Add(cookieColl[result.CookieName]);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (WebException wex)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw new NotImplementedException(&quot;Specified Sharepoint server is not FBA-enabled&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return cookies;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;internal NetworkCredential AuthenticateIWA()&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new NetworkCredential(this.spAdminId, this.spAdminPw, this.spAdminDomain);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private void Authenticate(SoapHttpClientProtocol SoapProtocol)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (this.isFBAEnabled)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SoapProtocol.CookieContainer = AuthenticateFBA();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ServicePointManager.ServerCertificateValidationCallback = delegate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Here we can write code for implementing client side validation.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// This anonymous function is a call back function which is called once the SSL validation completes on WebServer.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SoapProtocol.Credentials = AuthenticateIWA();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;A neat way to authenticate through the web service for both Form Based authentication and Integrated Windows authentication :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://softwareengineering-in-a-can.blogspot.com/feeds/6152305735769811786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/09/upload-file-into-sharepoint-2007-using.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/6152305735769811786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5369266905549397382/posts/default/6152305735769811786'/><link rel='alternate' type='text/html' href='http://softwareengineering-in-a-can.blogspot.com/2010/09/upload-file-into-sharepoint-2007-using.html' title='upload file into sharepoint 2007 (copy.asmx)'/><author><name>Gary</name><uri>http://www.blogger.com/profile/01129772776177241096</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>