Top Stories

Lava Kafle

HIKE

TSQL Challenge 21 – Reading, recognizing and processing graphical representation of digits. – TSQL Challenges

Here is a challenge that takes you away from those repetitive boring type of queries that you write over and over again, several times a day. All of us, the database people, are familiar with thinking in set based manner as well as row by row style. Here is something that is very interesting where you might need to process records in a ‘three-line-at-a-time’ fashion.

For the purpose of this challenge, imagine that you are working for a bank which just decided to scan all the banking documents. Assume that they have an old fashioned scanner which scans the documents and produces a text file with the customer number. So far so good. Well, not really! Unfortunately the scanner produces a graphical representation of the customer number using three lines of symbols: space, unerscores and pipe characters. Here is an example of the output produced by the scanner.

1. _  _     _  _  _  _  _
2.| _| _||_||_ |_   ||_||_|
3.||_  _|  | _||_|  ||_| _|

Here are the rules to keep in mind while reading and recognizing the output generated by the scanner.

  • Each digit is represented using 9 cells (3×3)
  • Only spaces, underscores and pipe characters are used
  • The number of digits in each account number may vary.
  • The Scanner is not 100% reliable and it might produce some digits that are invalid

The Challenge

Your job is to read the output produced by the scanner and identify the the customer number represented by each image. Remember that the scanner is not very reliable and it might produce invalid digit representations. For each digit that is not valid, set the value to ‘X’

TSQL Challenge 21 – Reading, recognizing and processing graphical representation of digits. – TSQL Challenges.

42 thoughts on “TSQL Challenge 21 – Reading, recognizing and processing graphical representation of digits. – TSQL Challenges

  1. I¡¦ve been exploring for a little for any high-quality articles or weblog posts in this kind of space . Exploring in Yahoo I eventually stumbled upon this website. Studying this information So i am satisfied to convey that I have an incredibly good uncanny feeling I came upon just what I needed. I such a lot without a doubt will make certain to don¡¦t fail to remember this web site and give it a look on a constant basis.

  2. I’ve been absent for some time, but now I remember why I used to love this web site. Thanks , I’ll try and check back more frequently. How frequently you update your web site?

  3. Simply wish to say your article is as amazing. The clarity in your post is simply great and i can assume you are an expert on this subject. Well with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please continue the enjoyable work.

  4. obviously like your web site but you need to check the spelling on several of your posts. A number of them are rife with spelling issues and I find it very bothersome to tell the truth on the other hand I will definitely come again again.

  5. Pretty nice post. I just stumbled upon your weblog and wanted to say that I’ve truly enjoyed surfing around your blog posts. After all I’ll be subscribing to your rss feed and I hope you write again soon!

  6. Hi, Neat post. There is a problem with your web site in internet explorer, would check this… IE still is the market leader and a good portion of people will miss your fantastic writing due to this problem.

  7. I’ve observed that in the world of today, video games would be the latest rage with children of all ages. There are times when it may be unattainable to drag your son or daughter away from the activities. If you want the very best of both worlds, there are various educational video games for kids. Great post.

  8. Normally I don’t learn article on blogs, but I wish to say that this write-up very forced me to check out and do so! Your writing style has been amazed me. Thank you, quite nice article.

  9. You can certainly see your expertise within the work you write. The sector hopes for even more passionate writers like you who are not afraid to say how they believe. All the time go after your heart. “Everyone has his day and some days last longer than others.” by Sir Winston Leonard Spenser Churchill.

  10. hello!,I love your writing so so much! proportion we be in contact extra about your post on AOL? I require an expert on this space to resolve my problem. Maybe that’s you! Taking a look forward to look you.

  11. Very good written information. It will be helpful to anybody who usess it, as well as me. Keep doing what you are doing – looking forward to more posts.

  12. Some genuinely wonderful posts on this website, appreciate it for contribution. “Gratitude is not only the greatest of virtues, but the parent of all others.” by Cicero.

  13. In this grand pattern of things you actually receive a B+ with regard to effort. Where exactly you confused us was on the facts. As people say, the devil is in the details… And that could not be much more true in this article. Having said that, allow me tell you what exactly did work. Your writing is very convincing and this is probably the reason why I am making the effort to comment. I do not really make it a regular habit of doing that. 2nd, even though I can notice a jumps in reasoning you make, I am not convinced of how you seem to unite the details which make the final result. For right now I will subscribe to your issue but trust in the near future you link your dots better.

  14. Today, while I was at work, my sister stole my iphone and tested to see if it can survive a 40 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is entirely off topic but I had to share it with someone!

  15. Hello there. I found your site by the use of Google while searching for a similar topic, your web site got here up. It looks great. I have bookmarked it in my google bookmarks to visit then.

  16. I simply had to thank you so much once again. I am not sure the things that I would have taken care of in the absence of the actual ways shown by you directly on my topic. This was a real alarming setting for me, nevertheless finding out a expert manner you processed the issue forced me to cry over delight. I’m just happier for your help and thus expect you know what a great job you have been doing teaching men and women by way of your web page. Probably you’ve never met all of us.

  17. Regards for helping out, wonderful information. “The laws of probability, so true in general, so fallacious in particular.” by Edward Gibbon.

  18. I like this weblog so much, saved to bookmarks. “Respect for the fragility and importance of an individual life is still the mark of an educated man.” by Norman Cousins.

  19. We’re a group of volunteers and starting a new scheme in our community. Your site offered us with valuable information to work on. You have done an impressive job and our entire community will be thankful to you.

  20. Kurye olarak hizmet veren kişiler, bulundukları lokasyondaki her adrese en kısa sürede ulaşma yolunu bilirler. Üstelik verilen bu görevi hava, trafik ve buna benzer diğer olumsuz şartlardan etkilenmeden yerine getirirler. Yani iş hayatı başta olmak üzere hayatın hemen her alanında önemli görevleri üstlenebilir ve başarıyla yerine getirebilirler. Özellikle büyük şehirlerdeki trafik kaosu ve adres konusundaki karmaşa göze alınırsa, kurye hizmetlerinden faydalanmanın bazı durumlarda zorunlu hale geleceği anlaşılabilir. Örneğin İstanbul’un bir noktasından diğer bir noktasına acil şekilde önemli bir evrak ulaştırmak gerektiğinde ya da hastanızın ihtiyacı olan ilacı acil ve güvenli bir şekilde ulaştırmak gerektiğinde, İstanbul moto kurye hizmetimizden faydalanarak sorununuza çözüm üretebilirsiniz.

  21. I simply want to mention I am beginner to blogs and absolutely enjoyed your web blog. Likely I’m planning to bookmark your website . You amazingly come with good articles. Cheers for revealing your webpage.

  22. Derma Veil ® 被喻為新世代逆齡完美輪廓塑造,最新一代的PLLA膠原。 2003年獲得Mexican Ministry of Health (SSA)認證及美國FDA出口認證,並於2006年在拉丁美洲及遠東至東南亞地區廣泛使用,多個臨床實例見證能改善老化、遺傳、疾病(如脂肪萎縮)等引起的凹陷問題,其效果備受認同。蘊含兩大活性成分均具有生物兼容性及分解性,可逐步被人體自然分解吸收,有效塑造童顏肌 : 1. 聚左乳酸 (Poly-L-lactic acid / PLLA) : 促進骨膠原生長 2. 甘醇酸(Glycolic Acid ) 使皮膚表皮層黏膠性脂質鬆軟,改善皮膚厚度,加速細胞再生,減少皺紋及疤痕,加強保濕功能,增加光澤,美白效果。 由於甘醇酸分子較小,容易滲透皮膚 治療前: 皮膚的凹陷/皺紋 治療後: 成分被人體吸收、並刺激膠原增生,撫平皺紋及凹陷部位。 注入BOTOX(保妥適)會抑制突觸前膜釋放神經遞質,阻斷乙酰膽鹼(Acetylcholine)的釋放,從而使肌肉張力下降或癱瘓麻痺,皺紋也隨之而逐漸消失。

Leave a Reply

Your email address will not be published. Required fields are marked *