tag:blogger.com,1999:blog-40198608472270281112024-03-13T23:45:29.121+11:00The blog space of zachiew.com - G33K T41KA C#, iOS programmer by trade from Melbourne, Australia.<br>
Content provided here are generic in nature and do not represent any form of current work.Unknownnoreply@blogger.comBlogger47125tag:blogger.com,1999:blog-4019860847227028111.post-49833819560975180672012-09-26T22:16:00.000+10:002012-09-26T22:17:28.035+10:00Windows Phone and Silverlight FAQRecently I was encouraged by the people at work to venture into building Windows Phone (WP) native application.
The enticement was in the form of a Windows Phone; the Nokia Lumia 710, to be exact.
So the following were some caveats that I found that I thought would be interesting to post here just in case someone else also happen to encounter the same issues.
Issue 1
Displaying images Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-42721267560645258012012-08-07T02:58:00.000+10:002012-08-07T02:58:12.085+10:00Recently, I upgraded to Mountain Lion for my Mac and guess what happened?
My lovely trackpad failed to work.
So after some painful searching through the goog, I manage to find the solution.
I am posting here so you (and I) will know what to do in the future.
1 - Hit "Command + Option + Esc" or if you are on a PC-keyboard like me, it is "Win + Alt + Esc"
2 - Terminate all processes and Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-10902061541487532572012-07-18T00:20:00.000+10:002012-07-18T00:45:13.573+10:00iOS post 1In my educational land, there was the massive beast of a library called DotNet and then now, there is a new creature that appeared.
I've taken the initiative to check out GHUnit, OCUnit and OCMock.
All of which I think is paramount to get any form of iOS going.
Infact, for work, we need to get it going for DotNet too but I will let that take shape whenever that is possible.
From this point Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-66076903650492772152012-05-20T12:44:00.001+10:002012-05-20T12:44:59.812+10:00Venturing into native application developmentI have been playing around with a new development tool.
I realized that when creating an Android or iOS application, the Application Id and Project name is very important.
If you happen to use camel casing, you will have to ensure that the Application ID is exactly the same name as the project name.
For example, when you create a project name and name it FirstApplication, the Application ID Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-1376133026717344442011-07-07T17:01:00.001+10:002011-07-08T09:42:07.211+10:00Moving from 1 SVN Repository to anotherTo move from 1 SVN repository to another on Windows, perform the following.For the purposes of this task, I am going to be assuming that you are on the same server as the SVN Repository AND you are using VisualSVN as your SVN Repository server.Step 1Power up SVN Repository server.Step 2Start up the command prompt from it.Step 3Type "svnadmin dump -r [revision_num] [SVN_From_repository] > [Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-48184671180391960892011-07-04T17:40:00.004+10:002011-07-04T17:53:25.385+10:00DropDownList in MVC2 using jQueryHi all, I apologize for the long hiatus but today, I discovered something new.My new role allows me to play with a few more cool toys, eg: WCF, MongoDB, Fluent NHibernate and MVC.Today I am going to be touching a little bit on MVC and specifically having to deal with retaining the value after selecting a drop down list item.Previously, in Web Forms, we have the SelectedIndexChanged function that Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-19100136406135914912011-02-15T16:37:00.002+11:002011-02-15T16:40:36.885+11:00LINQ - Not InRecently I had to do this query and the follwing showed me how tovar query = from c in dc.Customers where !(from o in dc.Orders select o.CustomerID) .Contains(c.CustomerID) select c;I took this from this link, Marco Russo's blogUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-77756711381321076792010-12-24T22:46:00.002+11:002010-12-24T23:06:43.310+11:00Facebook OAuth - more informationRecently, I had to incorporate OAuth for Facebook.I ran into a few issues.First and foremost, I had a "Invalid redirect_uri: Given URL is not allowed by the Application configuration" error.After some trolling on the net, I found that this can be corrected by Url-encoding the redirect_uri parameter.Using C#, you can fix this by simply, using the Server.UrlEncode function.Then, I hit a "Error Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-90730320371478792612010-12-06T11:06:00.004+11:002010-12-06T11:35:33.036+11:00MS Chart Visual Studio 2008 Add-On - Error executing childI installed MS Chart Add-On for Visual Studio 2008, compiled the project and hit the "Play" button and received a yellow error screen as the below.To fix this issue, what you have to do is to simply add an additional "verb" to the "httpHandlers" section within the "system.web" section of the ROOT web.config file.See below for an example<add verb="GET,HEAD,POST" path="ChartImg.axd" type="Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-36601938091534205582010-12-01T17:06:00.003+11:002010-12-01T17:09:18.741+11:00Google maps - Overcoming rotating label text for the x-axisRecently, I had to integrate with Google Charts and ran into the problem of rotating the labels of the x-axis. There isn't a fix for this, however, I manage to do a work around by shortening the labels on the x-axis and creating a legend to explain what the labels meant.Click here for a sample Google chart.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-14489385552701815392010-11-18T10:37:00.004+11:002010-11-18T10:44:07.895+11:00Twitter OAuth - How ToStep 1: Register your application. Don't know if you've to Callback URL field but I just assigned to a HTML page that contain very little information.Step 2:Get Twitterizer library from hereStep 3:Use the following code to get the Twitter OAuth token. I used a session to store it but essentially, as long as you store it either using a Cookie, ViewState, Session, row on the DB, that's totally up Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-41473511914191958422010-10-25T22:13:00.001+11:002010-10-25T22:14:35.991+11:00Server-side button click - client side implementationRecently, I had to override the server-side button OnClick function for a button but unfortunately and I hope you do NOT come across this scenario, but the source code file, the C# file went MISSING. Yes, I could have use DotNet Reflector to recover the code but I was under a very quick deadline, so here is my approach. Use jQuery! What you have to do is to assign a unique CssClass name for the Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-80717118328868767512010-10-06T10:36:00.002+11:002010-10-06T10:49:16.736+11:00Repeater Paging - Paged Data SourceRecently I was experimenting with paging and repeaters and managed to solve it with a PagedDataSource object.There are certain rule that come with this, however.After instantiating a PagedDataSource object, it is PIVOTAL to set the DataSource property directly after it, before using other properties of the PagedDataSource class.The way I implemented it was as follows.Have 1 repeater that will Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-42871564805017515372010-09-09T17:57:00.002+10:002010-09-09T17:57:50.546+10:00Javascript Pop-ups : Cross browserhttp://www.quirksmode.org/js/popup.htmlThis site shows a good clarification between cross browser JSUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-55647689617992060832010-08-30T12:07:00.004+10:002010-08-30T12:22:53.748+10:00SQL Server role and manual adminI had to create a fresh instance of database for work and had to assign roles. However, I didn't want to use the "click, click, click" method but rather like to type on the query window. NOTE: This is to be done after you've created a Database and I won't go into details as to how to create a Database or how to add a user to the database.I retrieve info from MSDN TechNetabout the database roles Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-5624961951332779742010-08-25T11:28:00.002+10:002010-08-25T11:29:51.185+10:00hMailServerWe experienced some issues with the IIS SMTP server recently at my work. The following is a description and may you say shameless promotion to a free email server for team at Redmond.hMailServer is a free e-mail server for Microsoft Windows. It's used by Internet service providers, companies, governments, schools and enthusiasts in all parts of the world. It supports the common e-mail protocols (Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-58463457309177447712010-08-21T14:38:00.003+10:002010-08-21T14:41:50.366+10:00IE TesterI know how web developers dislike the browser from Redmond, however, there is a simple tester that can be downloaded and basically allows you to test how your page renders in Internet Explorer.Click here -> IE TesterUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-47235902676401082282010-08-07T18:06:00.001+10:002010-08-07T18:07:02.768+10:00Light musing - deep thoughts“It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood, who strives valiantly; who errs and comes short again and again; because there is not effort without error and shortcomings; but who does Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-40647290675682027772010-07-23T16:56:00.006+10:002010-07-23T17:41:41.738+10:00Javascript validate date - nativeIf somehow you are trying to validate dates that involves 2 drop downs and the values in the drop down are set, you can do the following.function validateDate(dateToCheck, selectedDay){ var totalMonthCount = 12; var i = 1; var isValid = true; var monthToCheck = parseInt(dateToCheck.getMonth()); var yearToCheck = parseInt(dateToCheck.getFullYear()); if(selectedDay > 28)Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4019860847227028111.post-52973563846046609662010-07-23T10:45:00.004+10:002010-07-23T10:51:42.670+10:00Mobile web development issuesShow-Hide displayTo show-hide a loading screen, you would have to ensure that javascript does an unload on the body tag.In it, you would want to hide (css display = 'none') for the loading screen section. I've used DIVs for the loading screen section.HTML links & runat="server"You will have to ensure that the "href" attribute contains "javascript:;" in the event that you intend to add the Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-45971904279423892742010-07-22T10:29:00.002+10:002010-07-22T10:45:34.715+10:00Software Development - Project ManagersThis post is a rant. If you don't like a rant, I suggest skipping this.I am intruiged at the fact that IT Project Managers will allow untested software to be released to the world.I am beginning to feel that in the corporate world, software developers are the most unappreciated people and also I am having the inkling that project managers are not operating at effective levels.According to Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-9145598581875391222010-07-20T14:29:00.001+10:002010-07-20T14:31:14.043+10:00dotNet URLUsing the HTTP Request object from the current HTTP context, can return a few different URL path.To retrieve just the URL without the query string variables, useRequestObject.CurrentExecutionFilePathTo retrieve the entire URL with query string variables, useRequestObject.RawURLThere are other important bits that we can use too.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-43285700324273652862010-07-16T11:03:00.002+10:002010-07-16T11:12:03.304+10:00ASP.Net custom validator with javascriptTo validate controls using javascript, just so you can use it for XUI or jQuery or whatever Web 2.0 library you use, you can simply declare a ASP.Net Custom Validator as such and have the ClientValidationFunction to be your javascript validator function;<asp:CustomValidator ID="someVal" runat="server" ClientValidationFunction="jsValidator"></asp:CustomValidator>Then, in the section of Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-1192233059551778032010-07-16T09:11:00.006+10:002010-07-16T09:16:22.455+10:00Javascript - retrieving the drop down selected valueI copied this from the Tek-Tips forum just so I have a repository of it.<head><title>New Page 10</title> <script Language="JavaScript">function checkData() { var myTest = me.D1.selectedIndex.value; alert(myTest); }</script></head><body><form method="POST" name="me"> <select size="1" name="D1" onChange="checkData()"> <option value="Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4019860847227028111.post-31602097326097879452010-07-15T10:09:00.004+10:002010-07-15T10:20:17.669+10:00ASP.Net hidden fields and XUIAfter fiddling around with XUI, I realized that there is no function within to retrieve the hidden input values similar to jQuery.Thus, the hacked way around it is to declare a HTML tag, eg: a span, paragraph or even div and make the CSS display style as hidden.You will also have to assign it a class and then you will be able to obtain it using XUI and plain ol' javascript by using the XUI Unknownnoreply@blogger.com0