Application setting can be user-scoped or application-scoped. The user scoped one can be read and write at runtime.For example, assign value Variabl1 to a user-scoped application setting will be like the following
The user.config file will be stored against the logged in user,
C:\Documents and Settings\username\Local Settings\Application Data\companyname\Applicationname\application.exe$%^&*184.108.40.206
Not a really an important function, but SPACE returns a set number of spaces. For example
SELECT "HELLO" + SPACE(10) + "WORLD"
I guess you can just use ” ” instead of SPACE(10), is there any specific good reason to use this function?
Web service in asp.net consists of a file with the .asmx extension, so you’ll have something like this
<%@ WebService language="VB" codebehind="Service1.asmx.vb" class="Service1" %>
Public Class Service1
Public Function HelloWorld(Byval name As String) As String
Return "Hello World " + name
To test this, browser http://localhost/WebService1/Service1.asmx and a simple interface with a list of methods show up.
Click on any one, and put in values for all parameters, click ‘Invoke’ to see the result, it’s not as hard as I thought it would be…
Problem: I need a stored procedure that checks bugs in the support system and find out if any of them have not been responded or completed in the scheduled time and send out emails to different people according to how urgent they are. The stored procedure is fairly easy to write except to work out the working days. Anyway, the focus here is how to send email from SQL Server.
Solution: The stored procedure xp_sendmail is not recommended to use in 2005, so now we use sp_send_dbmail. First, we need to enable database mail. Right-click on Management node and select Configure Database Mail option, you will be prompted to enable this option if it was not enabled, and setup through the wizard.
Problem: I have a select statement that returns more than one rows of result, and I need to concatenate all rows into one. For example, if I have a table called ‘Game’ and it returns the following result when you select all and you just want to get a list of games’ names:
||Rayman: Raving Rabbids
||Naruto: Rise of a Ninja
||Guitar Hero III: Legends of Rock
||Dynasty Warriors 6
Solution: usually I would thought of to loop through it or in more complex cases, to use a cursor. However, I found a really easy way today (you don’t need to declare the variable asNVARCHAR(MAX), just in case if you have heaps of games and happen to use SQL Server 2005 or above).
DECLARE @games NVARCHAR(MAX)
SELECT @games=@games + Name +', ' AS GameList FROM Games
|Rayman: Raving Rabbids, Naruto: Rise of a Ninja,Guitar Hero III: Legends of Rock,Dynasty Warriors 6,…
Of course you’ll need to get rid of the last ‘,’ from the variable at the end. How simple, and how could I never knew this before!
I was modifying customer support site today, and one of the change is to have NZ time displayed with sun/moon image. This may seem to be a useless thing to do since anyone has the browser would have the time showing on the right bottom corner of their screen (or right top if using mac). But if you have SMS linked to support site, you definitely don’t want to receive message in the middle of the night.
Anyway, I never realize there’s a UtcNow function, basically it’s the standard international time that all time zones are expressed as offsets of, it’s not offset to daylight saving. There’s also a
getutcdate() in SQL Server verses
I’m absolutely new to Zimbra, so the installation didn’t went well for the first time, especially when everything needs to be done on terminal, but overall it’s not that hard to setup and the ajax interface looks really cool.
missing modules on Ubuntu, when I try to install, the following message show up
I added all except fetchmail back by using apt-get install from the terminal:
sudo apt-get install libidn11 libpcre3 libgmp3c2 libexpat1 libxml2 libstdc++5 openssl libltdl3
I went to work today at 9:30, and when I log in to my computer, I saw the clock says 8:30, so I thought that must be the daylight saving ended (I never know when this happens every year -_-#), so I turned to my colleague and asked a seemingly stupid question – what time is it now. He confirmed it’s 9:30. So I changed my time on the computer (and didn’t realize the change is not saved), and later on around 11:50 I wanted to make a phone call, I checked my mobile phone and it confirmed the time. I called, and turns out it’s 12:50. Shocking… I use iPhone, and it’s not sync with my workstation but only to the iMac at home, how could these two not related, individual things changed time at the same time, something …
I’m all puzzled and told another colleague, and found out that because the daylight saving has been delayed this year (I knew this actually), but my computer does not know that. What? Why? We’re all in the same network and all computer and servers should be updated at the same time. Turns out our administrator didn’t apply the patch and other people from my team already have that updated (my computer used to be on a different domain because I worked for a different team)
Anyway, that’s just a story, to correct this error, don’t change your time manually, choose and download an update from Microsoft and it’ll all be fine.
Yes, I use this clock at home and it’s really hard to read…
My memory is just as terrible as a gold fish, so this blog will be served as a little repository to record technical problems I encountered and solved, or just some good stuffs I found on the net.