Tuesday, September 30, 2008
Scripting the Creation and Deletion of a Replication in SQL Server
It seems like this is only available on SQL Server 2005 and possibly on 2008 as well. Unless, there is a plug-in for SQL Server 2000, which I doubt it.
To know more about the details on how-to create a push, click on the links below:
http://msdn.microsoft.com/en-us/library/ms146912(SQL.90).aspx
OR
http://msdn.microsoft.com/en-us/library/ms146912.aspx
How to: Delete a Push Subscription (Replication Transact-SQL Programming)
This is OK if you can live to have some residual information related to the subscription. But have no fear, there is a follow up SQL command that will do a clean up in the subscriber database, which will get rid of the unnecessary metadata. Even though the commands work on SQL Server 2000, I still prefer the manual process of deteting the subscription using Enterprise Manager because of the cleanliness that it can provide me.
For more info go to:
http://msdn.microsoft.com/en-us/library/ms146944(SQL.90).aspx
OR
http://msdn.microsoft.com/en-us/library/ms146944.aspx
adios!
Wednesday, September 24, 2008
Missing Assembly in GAC
Error Message:
Could not load file or assembly 'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
So, what I did is I got a copy of the missing ADODB.DLL and pasted it in the new server. I installed the ADODB assembly and that fixed my problem.
For the System.Core, I just simply registered it using the DLL file located at C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 folder.
There are four ways to install an assembly into the global assembly cache:
1. Using the Global Assembly Cache tool (Gacutil.exe).
2. Using Microsoft Windows Installer 2.0.
3. Using a Windows shell extension provided by the Windows Software Development Kit (SDK) called the Assembly Cache Viewer (Shfusion.dll).
4. Using the .NET Framework Configuration Tool (Mscorcfg.msc).
My favorite procedure is using .NET Framework Configuration. It’s really easy.
For more information on how to install assembly into GAC, go to:
http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx
Monday, August 11, 2008
Flag Project
check it out at:
http://www.witoe.com
Tuesday, July 29, 2008
Why Mac?
Working as a software developer, I feel that I am responsible for my growth and advancement in the technology arena. However, executing that responsibility requires necessary tools to further practice the importance of software development and quality assurance. That being said, Macbook Pro of Apple will provide me more exposure to the cutting-edge operating systems available in the market, allow me to test and evaluate software applications in a diverse environment and give me the best way to explore the world of iPhone development.
First and foremost, using Mac OSX and Microsoft Windows Vista on a daily basis at work will augment my software development skills. It is like having a skill to speak two different languages. It is like knowing how to write C# and Java programs. It is like being able to script a scheduled job for DOS or Unix-based environment. Seeing and discovering both OS’s pros and cons is definitely a plus. This will surely give me ideas on how to develop a much more intuitive Graphical User Interface designs for the web and desktop applications. Another important thing is I will be able to understand and pick up some schemes on how to apply a better User Interface Friction (UIF is the resistance imposed upon a user-guided process through the operating system and the way the user interface reacts) to my applications to potentially increase the users’ productivity. I personally think that most of developers’ works are influenced by the operating system that they use on a daily basis on their job.
It is clear now that Mac OSX has become a lot more popular in schools and companies. Let’s take the OS market share report of a Technology Analyst at Stanford University as an example. Only 7 percent of the users using Vista and 30 percent are Mac OS users. Another interesting note on his blog is that 1/3 of the computers on Stanford campus have been purchased since the release of Vista. It’s a good thing for the institution to be proactive when it comes to technology. The academia part of CZS may be supporting different operating systems and types of hardware system in the future. Though currently the institution is Microsoft centric, but being able to test software in different environments will help me determine and identify what system is best for interoperability.
Lastly, iPhone development has become a lot more common and may be the next mobile device that would replace the PalmOS devices. The fact that Apple is opening their iPhone development tools to the public, which is really a big step. It encourages developers to cultivate the technology. Enterprise integration, such as Microsoft Exchange, for iPhone has already started and I see a trend of a successful continuity in the future. Mac OSX is the only legal way that I know to run iPhone’s Software Development Kit. Being able to ride on the next big Kahuna in mobile computing is a substantially awesome thing to have – working with a popular, intuitive and non-stylus personal device application called iPhone.
Macbook Pro will be beneficial to my growth and advancement within the society. This will open a new window of opportunity to explore new technology that is not only available, but also the best for the institution. Once I go Mac, I can never go back ;)
Sources:
http://www.pfeifferreport.com/trends/trend_vistauif.html
http://www.jacobpierce.com/blog/2008/06/07/stanford-university-os-study/
Monday, July 14, 2008
Sample code on how to call a javascript function in OpenLaszlo
objCaller.animate("width",100,1000,false);
LzBrowser.loadJS('alert(' + '"' + message + '"' + ')');
}
Wednesday, June 4, 2008
Why StringBuilder and not String concatenation?
1. A string is immutable meaning you can't actually change the string.
2. StringBuilder is easy to implement. Using built-in functions such as Append and Insert makes my life easier!
Here's my sample code that uses StringBuilder
by the way, do not forget to include this namespace: System.Text
/*
* must be in this format: 999-999-9999
*/
public string formatPhone(string phone)
{
StringBuilder retVal = new StringBuilder();
char[] charArrayPhone = phone.Trim().ToCharArray();
foreach(char cap in charArrayPhone)
{
if (isCharacterNumeric(cap))
retVal.Append(cap);
}
//must only use the last 10 characters (numbers)
if (retVal.Length>10)
retVal.Remove(0,retVal.Length - 10);
//insert dashes
if (retVal.Length>4)
retVal.Insert(retVal.Length - 4, "-");
//area code is not supplied
if(retVal.Length>8)
retVal.Insert(retVal.Length - 8, "-");
return retVal.ToString();
}
/*
* must be in this format: 99999 or 99999-9999
*/
public string formatZipcode(string zipcode)
{
StringBuilder retVal = new StringBuilder();
char[] charArrayZip = zipcode.Trim().ToCharArray();
foreach (char caz in charArrayZip)
{
if (isCharacterNumeric(caz))
retVal.Append(caz);
}
//must only use the first 9 characters (numbers)
if (retVal.Length > 9)
retVal.Remove(9, retVal.Length - 9);
//insert dash
if (retVal.Length > 5)
retVal.Insert(5, "-");
return retVal.ToString();
}
private bool isCharacterNumeric(char Character)
{
char[] charArrayNumbers = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
foreach (char can in charArrayNumbers)
{
if (Character == can)
return true;
}
return false;
}
Tuesday, June 3, 2008
Guidelines between CLR and T-SQL
• If the procedure is simply a wrapper for declarative T-SQL commands it should be written in T-SQL.
• If the procedure primarily involves forward-only, read-only row navigation through a result set with some processing of each row, using the CLR is likely more efficient.
• If the procedure involves both significant data access and computation, consider separating the procedural code into a CLR portion that calls into a T-SQL procedure to perform data access, or a T-SQL procedure that calls into the CLR to perform computation. Another alternative is to use a single T-SQL batch that includes a set of queries that are executed once from managed code to reduce the number of round trips of submitting T-SQL statements from managed.
Wednesday, May 7, 2008
How-To Reset Palm Device To Factory Default
2. Let go of the reset button for 3 seconds while the power button is still pressed.
3. Let go of the power button and wait until you see the message to erase all data.
4. Press "UP" button to successfully hard reset the device.
5. Done!
Wednesday, March 5, 2008
Stream Remote Image
"http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=HelloWorld"
Select Case CInt(Request("id"))
Case 1
URL = "http://chart.apis.google.com/chart?cht=p3&chs=420x180&chd=s:Hellob&chl=OtherRestPlayLocomoteForagingEat"
Case 2
URL = "http://chart.apis.google.com/chart?cht=p&chd=s:Uf9a&chs=350x220&chl=Water%20HoleRocky%20AreaTreesBushes"
Case 3
URL = "http://chart.apis.google.com/chart?cht=bhs&chs=300x200&chd=s:Hell8&chbh=30&chf=bg,s,FFF2CC&chxt=x,y&chxl=0:203040501:OctSepAugJulyJun"
End Select
' Get HTML data
Dim client As WebClient = New WebClient()
Dim b As Byte() = client.DownloadData(URL)
Dim response As System.Web.HttpResponse = System.Web.HttpContext.Current.Response
response.Clear()
response.AddHeader("Content-Type", "binary/octet-stream")
response.Flush()
response.BinaryWrite(b)
response.Flush()
response.End()
Monday, March 3, 2008
Android's MapView
xml layout:
{view class="com.google.android.maps.MapView"android:id="@+id/areamapview"android:layout_width="320px"android:layout_height="280px"/}
java code:
import these:
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MapController;
import com.google.android.maps.Point;
creation:
areaMapView = (MapView)this.findViewById(R.id.areamapview);
areaMapView.toggleSatellite();
Point areaPoint = new Point((int)(41.832846978094*1000000),(int)(-87.83592939376831*1000000));
mc = areaMapView.getController();
mc.animateTo(areaPoint);
mc.zoomTo(16);
Thursday, February 28, 2008
AuthzSVNAccessFile svnaccessfile.txt
#Repository configuration
DAV svn
SVNListParentPath on
SVNParentPath D:\SVN
AuthName "Subversion repositories"
AuthzSVNAccessFile svnaccessfile.txt
# NT Domain Logins.
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain
SSPIOfferBasic On
#HTpasswd logins.
Require valid-user
inside svnaccessfile.txt
[groups]
developers = domain\user1,domain\user2
#to allow everyone read access
[/] * = r
#allow all developers complete access
@developers = rw
#allow developers to access their projects
[Project1:/]
@developers = rw
Wednesday, February 27, 2008
No installed service named "Apache2"
When Apache launches, it gives error: No installed service named "Apache2"
For some reason Apache doesn't always install the service. What you need to do is go into command prompt (start > run > type in cmd ) then type in: c:\apache2\bin\apache -k installMake sure change that path to the location you installed Apache to. That should put the service you need back in.
By the way, I got this info from this site:
http://www.ricocheting.com/server/faq.html