<?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: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-5252434067126643986</id><updated>2012-02-16T17:28:01.325+10:00</updated><category term='C#'/><category term='LogiXML'/><category term='Crystal Report'/><category term='Windows Form Application'/><category term='How-to'/><category term='Post-It'/><category term='Life Advise'/><category term='SQL Query'/><category term='Programming'/><title type='text'>Jingly Jing</title><subtitle type='html'>"Vitality shows not only in the ability to persist but the ability to start over."</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5252434067126643986.post-2179351717989456943</id><published>2011-08-15T14:30:00.002+10:00</published><updated>2011-10-19T17:21:22.182+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Query'/><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Report'/><title type='text'>String type parameter in Crystal Report imposes a critical security threat</title><content type='html'>&lt;p&gt;Recently, we discovered the string  type parameter used in Crystal Report is open for script injection i.e., a  regular expression can be sent via these string type parameters and ran against  the system database directly. But this only happens when the string is used with LIKE keyword in the SQL query.&lt;/p&gt;&lt;p&gt;For example, the query may look like this:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;SELECT ComanyName&lt;/p&gt;&lt;p&gt;FROM Customers&lt;/p&gt;&lt;p&gt;WHERE CompanName LIKE {?CompanyParameter}&lt;/p&gt;&lt;p&gt;We have solved this issue by eliminating the special characters in the string which may impose threat before we send the string to Crystal Report. Hope this can be done in the future in Crystal Report itself and to prevent this major security threat from happening to any of the Crystal Report users.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5252434067126643986-2179351717989456943?l=jinglyjing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/2179351717989456943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5252434067126643986&amp;postID=2179351717989456943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/2179351717989456943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/2179351717989456943'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/2011/08/string-type-parameter-in-crystal-report.html' title='String type parameter in Crystal Report imposes a critical security threat'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5252434067126643986.post-6112776046206372981</id><published>2011-08-14T17:22:00.001+10:00</published><updated>2011-10-19T17:27:50.867+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Query'/><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Report'/><title type='text'>Daylight saving offset is not available in SQL scripting</title><content type='html'>We discovered a drawback by using SQL script and Crystal Report where  the conversion against all the GMT date time fields in our database to local  time does not cater for the daylight saving offset.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Unfortunately, the only way we found to overcome this issue is to create a new table which will record all the daylight saving information at different locations. Therefore, when we build Crystal Report, we can use the SQL query to check the daylight saving offsets and apply them correctly on different dates.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A google search link indicates that Crystal Report may have this function in  place in version 2011.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5252434067126643986-6112776046206372981?l=jinglyjing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/6112776046206372981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5252434067126643986&amp;postID=6112776046206372981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/6112776046206372981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/6112776046206372981'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/2011/08/daylight-saving-offset-is-not-available.html' title='Daylight saving offset is not available in SQL scripting'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5252434067126643986.post-3705973994978404581</id><published>2011-06-08T17:00:00.000+10:00</published><updated>2011-10-19T16:53:01.142+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LogiXML'/><title type='text'>LogiXML limitation - Using text type parameters</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;When use text type parameters in LogiXML, we have to make sure the parameter values are compliant with the URL standards since LogiXML use the post back on the webpage to send the parameter values.&lt;br /&gt;&lt;br /&gt;The following web page shows what characters should be encoded when passing through URL:&lt;br /&gt;&lt;br /&gt;http://www.blooberry.com/indexdot/html/topics/urlencoding.htm&lt;br /&gt;&lt;br /&gt;There are several ways to go around this problem:&lt;br /&gt;&lt;br /&gt;1. Encode and decode the text at the SQL script since we only use these values to refresh the charts on dashboards.&lt;br /&gt;&lt;br /&gt;SQL functions to encode and decode URL strings:&lt;br /&gt;&lt;br /&gt;http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-urlencode.aspx&lt;br /&gt;&lt;br /&gt;http://sqlblog.com/blogs/peter_debetta/archive/2007/03/09/t-sql-urldecode.aspx&lt;br /&gt;&lt;br /&gt;2. Use JavaScript to encode and decode the text before and after the post back.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5252434067126643986-3705973994978404581?l=jinglyjing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/3705973994978404581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5252434067126643986&amp;postID=3705973994978404581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/3705973994978404581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/3705973994978404581'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/2011/08/logixml-limitation-using-text-type.html' title='LogiXML limitation - Using text type parameters'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5252434067126643986.post-6661423370340422627</id><published>2007-11-13T14:30:00.000+10:00</published><updated>2007-11-13T14:45:27.544+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Post-It'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Form Application'/><title type='text'>System.Windows.Form.MessageBox control is not extensible</title><content type='html'>Windows.Form.MessageBox control is not extensible since it is provided by the operating system. It is a static a class with private constructor. However, we could do something to customise this class by digging deep into Win32 API i.e., a 'hook' could be built to listen to the window events related to creating and activating the MessageBox, etc.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/02/11/CuttingEdge/default.aspx#S9"&gt;http://msdn.microsoft.com/msdnmag/issues/02/11/CuttingEdge/default.aspx#S9&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.thescripts.com/forum/thread446492.html"&gt;http://www.thescripts.com/forum/thread446492.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5252434067126643986-6661423370340422627?l=jinglyjing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/6661423370340422627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5252434067126643986&amp;postID=6661423370340422627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/6661423370340422627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/6661423370340422627'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/2007/11/systemwindowsformmessagebox-control-is.html' title='System.Windows.Form.MessageBox control is not extensible'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5252434067126643986.post-8971885098483388249</id><published>2007-11-13T08:15:00.000+10:00</published><updated>2007-11-13T08:22:37.916+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Post-It'/><category scheme='http://www.blogger.com/atom/ns#' term='Life Advise'/><title type='text'>What are your work/life dreams? Set some goals today</title><content type='html'>&lt;p&gt;&lt;strong&gt;When it comes to goals, bigger is not necessarily better. Understanding the difference between a goal and dream is about understanding what's achievable now — and how to break down a technicolour vision into manageable steps.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;''I like thinking big. If you're going to think anything, it might as well be big.''&lt;br /&gt;&lt;br /&gt;&lt;em&gt;So said Donald Trump, the man with a nice looking property portfolio (sometimes overshadowed by his questionable-looking hair). And most people would probably assume he was right. After all, nobody ever built a 58-floor high-rise in Manhattan by thinking small.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Sometimes, though, thinking smaller is precisely what's necessary — particularly when it comes to setting goals. ''You might have the ambition to become the CEO of your company,'' says Narelle Milligan, a professional member of the Australian Association of Career Counsellors. ''But when you're the receptionist it can feel like a pipe dream. Long-term goals need to be broken down so that they're more manageable.''&lt;br /&gt;&lt;br /&gt;Simply sitting at your switchboard burning with desire to take over the board won't get the job done. Instead, work out how you're going to get there. What steps do you need to take to get to the next level? Is there a course you can take, a mentor you can approach, a promotion you can secure?&lt;br /&gt;&lt;br /&gt;''Goals are both short- and long-term,'' says Milligan. ''The short-term ones are the steps to get us to the bigger picture.''&lt;br /&gt;&lt;br /&gt;In his book You Inc, real estate guru John McGrath writes of the importance of dumping the ''tomorrow fantasy''.&lt;br /&gt;&lt;br /&gt;''Some people talk a lot of 'gonna','' he says. ''You know, they say, 'One day I'm gonna do this', or 'Next year I'm gonna do that'. The reality is, if you're not doing it now, you're probably not going to do it. So do it now — start with a small step today.''&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;But how?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;''Goal setting is not that difficult,'' says Milligan. ''All you need is a quiet space and something to write on, or your computer.''&lt;br /&gt;&lt;br /&gt;Now reach inside yourself and think about what you want for yourself in your life — your whole life, not just your career.&lt;br /&gt;&lt;br /&gt;''The modern approach to career development is to try to integrate your work into your life,'' says Milligan. ''The income we get is a means to an end. I would strongly recommend setting life goals — work is just one subset of that.''&lt;br /&gt;&lt;br /&gt;Other areas you might consider are finance, relationships, health, spirituality, study, travel … the whole shebang. How you prioritise your list is up to you.&lt;br /&gt;&lt;br /&gt;''Dream about where you would like your life to be, translate those dreams into goals, and then work out the actions required to achieve the goals,'' says McGrath.&lt;br /&gt;&lt;br /&gt;If your dream is to work in a different industry to the one in which you're currently stuck, your short-term goal might be to initiate contact with someone who works in that industry. Your first step to achieving that goal is to ask your network of friends if anyone knows anyone you could ring for a chat. See, you can do that!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If it were that easy, wouldn't everyone do it?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;''We do need some self-insight to set attainable goals,'' says Milligan. ''While I'd never underestimate human determination and spirit, we're not all going to be world-class ballet dancers, for instance.''&lt;br /&gt;&lt;br /&gt;One of the criteria that defines a goal is that it's achievable — otherwise you're back in dream territory again. But if your goal is to be Margot Fonteyn and your genetics say that you're more in Lauren Jackson territory height-wise, you may need to assess the reality of your aspirations. Which is not to say that you can't massage your goals as you go.&lt;br /&gt;&lt;br /&gt;''If it's impossible to be a ballet dancer, go to dance classes, watch the ballet, or get involved in the organisational side of a ballet company,'' says Milligan.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;I feel I'm getting nowhere&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It doesn't always follow that if you work hard you'll reach your goals. As John Lennon said: ''Life is what happens when you're busy making other plans''. But don't let that put you off.&lt;br /&gt;&lt;br /&gt;''Life deals us circumstances over which we have no control,'' says Milligan. ''Goals must be flexible and they need to be reviewed regularly. I'd look at them annually, and every time there's a big change in your life, like graduating uni, marriage, children, moving house, redundancy …''&lt;br /&gt;&lt;br /&gt;Look at your skills, where you're going, whether you're on track to achieve what you want in life — because it does change. The goal you had at 21 to be chief executive at 30, might have changed by 30 to become something entirely different. Like a yoga teacher. Or a property tycoon — with fabulous hair.&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;By Allison Tait, October 2007&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;From: &lt;a href="http://yourlifeworks.ninemsn.com.au/article.aspx?id=306383"&gt;http://yourlifeworks.ninemsn.com.au/article.aspx?id=306383&lt;/a&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5252434067126643986-8971885098483388249?l=jinglyjing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/8971885098483388249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5252434067126643986&amp;postID=8971885098483388249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/8971885098483388249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/8971885098483388249'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/2007/11/when-it-comes-to-goals-bigger-is-not.html' title='What are your work/life dreams? Set some goals today'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5252434067126643986.post-7779713223306564288</id><published>2007-11-05T15:18:00.000+10:00</published><updated>2007-11-05T15:30:51.957+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How-to'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Post-It'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>How do I convert a string to a byte array and vica-versa in VB.NET and C#?</title><content type='html'>Convert String to Byte[]&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;' VB.NET to convert a string to a byte array&lt;br /&gt;Public Shared Function StrToByteArray(str As String) As Byte() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;Dim encoding As New System.Text.ASCIIEncoding() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;Return encoding.GetBytes(str)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;End Function 'StrToByteArray&lt;br /&gt;&lt;br /&gt;// C# to convert a string to a byte array.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;public static byte[] StrToByteArray(string str){ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;return encoding.GetBytes(str);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Convert Byte[] to String&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;' VB.NET to convert a byte array to a string:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;Dim dBytes As Byte() = ...Dim str As StringDim &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;enc As New System.Text.ASCIIEncoding()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;str = enc.GetString(dBytes)&lt;br /&gt;&lt;br /&gt;// C# to convert a byte array to a string.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;byte [] dBytes = ...string str;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;str = enc.GetString(dBytes);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ref.: &lt;a href="http://www.chilkatsoft.com/faq/DotNetStrToBytes.html"&gt;http://www.chilkatsoft.com/faq/DotNetStrToBytes.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5252434067126643986-7779713223306564288?l=jinglyjing.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jinglyjing.blogspot.com/feeds/7779713223306564288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5252434067126643986&amp;postID=7779713223306564288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/7779713223306564288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5252434067126643986/posts/default/7779713223306564288'/><link rel='alternate' type='text/html' href='http://jinglyjing.blogspot.com/2007/11/how-do-i-convert-string-to-byte-array.html' title='How do I convert a string to a byte array and vica-versa in VB.NET and C#?'/><author><name>Jing Ye</name><uri>http://www.blogger.com/profile/06316058749286893937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
