<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by jackoats.my</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Thu, 11 Jun 2026 20:58:57 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>Export images from MSSQL table</title>
            <link>http://forum.lowyat.net/topic/5028726</link>
            <description>Yo, anybody still working on Saturday? &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have a summary of the Product table in [AdventureWorksLT2019].[SalesLT].[Product], in which images file are embedded in the table, as shown below.  &lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;ProductID, ThumbNailPhoto, ThumbNailPhotoFileName&lt;br /&gt;680, 0x47494638396150003100..., no_image_available_small.gif&lt;br /&gt;739, 0x47494638396150003100..., frame_silver_small.gif&lt;br /&gt;744, 0x47494638396150003100..., frame_black_small.gif&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I managed to extract an image out (680.gif, hardcoded) from the table, by running the following commands:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;...&lt;br /&gt;SET @mynum = 680 -- something meaningful only to me&lt;br /&gt;SET @sql2 = &amp;#39;BCP &amp;#34;SELECT ThumbNailPhoto FROM &amp;#91;AdventureWorksLT2019&amp;#93;.&amp;#91;SalesLT&amp;#93;.&amp;#91;Product&amp;#93; where ProductID=@mynum&amp;#34;   &lt;br /&gt;  QUERYOUT C&amp;#58;&amp;#092;exportdir&amp;#092;680.gif -T -f C&amp;#58;&amp;#092;exportdir&amp;#092;testblob.fm -S &amp;#39; + @@SERVERNAME&lt;br /&gt;...&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do I rewrite the code to extract every product&amp;#39;s image, with the exported image&amp;#39;s name the same as the ProductID?</description>
            <author>jackoats.my</author>
            <category>Codemasters</category>
            <pubDate>Sat, 19 Sep 2020 18:10:44 +0800</pubDate>
        </item>
        <item>
            <title>See stars in JavaScript codes</title>
            <link>http://forum.lowyat.net/topic/5019139</link>
            <description>Question: When start() runs, how many of the message &amp;#39;Workout complete&amp;#33;&amp;#39; do I see?&lt;br /&gt;&lt;br /&gt;Given Exercise plan is made up of an exercise and its running duration. E.g. ExercisePlan_A could be like:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;&amp;#34;ExercisePlan_A&amp;#34;&amp;#58; &lt;br /&gt;  {  &lt;br /&gt;    &amp;#34;push up&amp;#34;,&lt;br /&gt;    &amp;#34;240&amp;#34;&lt;br /&gt;  }&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;And a snippets of the JavaScript code looks like this:&lt;br /&gt;&lt;br /&gt;&lt;!--c1--&gt;&lt;div class='codetop'&gt;CODE&lt;/div&gt;&lt;div class='codemain'&gt;&lt;!--ec1--&gt;&lt;br /&gt;  ngOnInit&amp;#40;&amp;#41;&amp;#58; void {&lt;br /&gt;    this.workoutPlan = this.buildWorkout&amp;#40;&amp;#41;;&lt;br /&gt;    this.restExercisePlan = new ExercisePlan&amp;#40;new Exercise&amp;#40;&amp;#39;rest&amp;#39;, &amp;#39;Relax&amp;#33;&amp;#39;, &amp;#39;Relax a bit&amp;#39;, &amp;#39;rest.png&amp;#39;&amp;#41;, this.workoutPlan.restBetweenExercise&amp;#41;;&lt;br /&gt;    this.start&amp;#40;&amp;#41;;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  startExercise&amp;#40;exercisePlan&amp;#58; ExercisePlan&amp;#41; {&lt;br /&gt;    this.currentExercisePlan = exercisePlan; // exercise in progress&lt;br /&gt;    this.exerciseRunningDuration = 0; // and how long has it run so far&lt;br /&gt;&lt;br /&gt;    const intervalId = setInterval&amp;#40;&amp;#40;&amp;#41; =&amp;#62; {&lt;br /&gt;      if &amp;#40;this.exerciseRunningDuration // transition to next exercise &lt;br /&gt;        &amp;#62;= this.currentExercisePlan.duration&amp;#41; { // when currect exercise&amp;#39;s duration is up&lt;br /&gt;        clearInterval&amp;#40;intervalId&amp;#41;;&lt;br /&gt;        const next&amp;#58; ExercisePlan = this.getNextExercisePlan&amp;#40;&amp;#41;;&lt;br /&gt;        if &amp;#40;next&amp;#41; {&lt;br /&gt;          if &amp;#40;next &amp;#33;=this.restExercisePlan&amp;#41; {&lt;br /&gt;            this.currentExerciseIndex++;&lt;br /&gt;          }&lt;br /&gt;          this.startExercise&amp;#40;next&amp;#41;;&lt;br /&gt;        }&lt;br /&gt;        else {&lt;br /&gt;          console.log&amp;#40;&amp;#39;Workout complete&amp;#33;&amp;#39;&amp;#41;;&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      else {&lt;br /&gt;        this.exerciseRunningDuration++; // increment exerciseRunningDuration by 1 second&lt;br /&gt;      }  &lt;br /&gt;    }, 1000&amp;#41;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  getNextExercisePlan&amp;#40;&amp;#41;&amp;#58; ExercisePlan {&lt;br /&gt;    let nextExercisePlan&amp;#58; ExercisePlan = null;&lt;br /&gt;    if &amp;#40;this.currentExercisePlan === &lt;br /&gt;      this.restExercisePlan&amp;#41; { // Start next exercise after resting&lt;br /&gt;      nextExercisePlan = this.workoutPlan.exercisePlans&amp;#91;this.currentExerciseIndex + 1&amp;#93;;&lt;br /&gt;    }&lt;br /&gt;    else if &amp;#40;this.currentExerciseIndex &amp;#60; this.workoutPlan.exercisePlans.length - 1&amp;#41; {&lt;br /&gt;      nextExercisePlan = this.restExercisePlan;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return nextExercisePlan;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  start&amp;#40;&amp;#41; {&lt;br /&gt;    this.currentExerciseIndex = 0;&lt;br /&gt;    this.startExercise&amp;#40;this.workoutPlan.exercisePlans&amp;#91;this.currentExerciseIndex&amp;#93;&amp;#41;;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  buildWorkout&amp;#40;&amp;#41;&amp;#58; WorkoutPlan {&lt;br /&gt;    const workout = new WorkoutPlan&amp;#40;&amp;#39;7MinWorkout&amp;#39;, &amp;#39;7 Minute Workout&amp;#39;, 10, &amp;#91;&amp;#93;&amp;#41;;&lt;br /&gt;    workout.exercisePlans.push&amp;#40;&lt;br /&gt;      new ExercisePlan&amp;#40;&lt;br /&gt;        new Exercise&amp;#40;&lt;br /&gt;          &amp;#39;jumpingJacks&amp;#39;,&lt;br /&gt;          &amp;#39;Jumping Jacks&amp;#39;,&lt;br /&gt;          &amp;#39;A jumping jack or star jump, also called side-straddle hop is a physical jumping exercise.&amp;#39;,&lt;br /&gt;          &amp;#39;JumpingJacks.png&amp;#39;,&lt;br /&gt;          &amp;#39;jumpingjacks.wav&amp;#39;,&lt;br /&gt;          `Assume an erect position, with feet together and arms at your side.&lt;br /&gt;                            Slightly bend your knees, and propel yourself a few inches into the air.&lt;br /&gt;                            While in air, bring your legs out to the side about shoulder width or slightly wider.&lt;br /&gt;                            As you are moving your legs outward, you should raise your arms up over your head; arms should be&lt;br /&gt;                            slightly bent throughout the entire in-air movement.&lt;br /&gt;                            Your feet should land shoulder width or wider as your hands meet above your head with arms slightly bent`,&lt;br /&gt;          &amp;#91;&amp;#39;dmYwZH_BNd0&amp;#39;, &amp;#39;BABOdJ-2Z6o&amp;#39;, &amp;#39;c4DAnQ6DtF8&amp;#39;&amp;#93;&amp;#41;,&lt;br /&gt;        30&amp;#41;&amp;#41;;&lt;br /&gt;        ...&lt;br /&gt;    workout.exercisePlans.push&amp;#40;&lt;br /&gt;      new ExercisePlan&amp;#40;&lt;br /&gt;        new Exercise&amp;#40;&lt;br /&gt;          &amp;#39;sidePlank&amp;#39;,&lt;br /&gt;          &amp;#39;Side Plank&amp;#39;,&lt;br /&gt;          &amp;#39;A variation to Plank done using one hand only.&amp;#39;,&lt;br /&gt;          &amp;#39;sideplank.png&amp;#39;,&lt;br /&gt;          &amp;#39;sideplank.wav&amp;#39;,&lt;br /&gt;          `Lie on your side, in a straight line from head to feet, resting on your forearm.&lt;br /&gt;          Your elbow should be directly under your shoulder.&lt;br /&gt;          With your abdominals gently contracted, lift your hips off the floor, maintaining the line.&lt;br /&gt;          Keep your hips square and your neck in line with your spine. Hold the position.`,&lt;br /&gt;          &amp;#91;&amp;#39;wqzrb67Dwf8&amp;#39;, &amp;#39;_rdfjFSFKMY&amp;#39;&amp;#93;&amp;#41;,&lt;br /&gt;        30&amp;#41;&amp;#41;;&lt;br /&gt;&lt;br /&gt;    return workout;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;!--c2--&gt;&lt;/div&gt;&lt;!--ec2--&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='https://pictr.com/image/7zpSU6' target='_blank'&gt;&lt;img src='https://pictr.com/images/2020/08/31/7zpSU6.md.png' border='0' alt='user posted image' /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href='https://pictr.com/image/7zpitA' target='_blank'&gt;&lt;img src='https://pictr.com/images/2020/08/31/7zpitA.md.png' border='0' alt='user posted image' /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href='https://pictr.com/image/7zpUAD' target='_blank'&gt;&lt;img src='https://pictr.com/images/2020/08/31/7zpUAD.md.png' border='0' alt='user posted image' /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href='https://pictr.com/image/7zpN11' target='_blank'&gt;&lt;img src='https://pictr.com/images/2020/08/31/7zpN11.md.png' border='0' alt='user posted image' /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href='https://pictr.com/image/7zpr0Q' target='_blank'&gt;&lt;img src='https://pictr.com/images/2020/08/31/7zpr0Q.md.png' border='0' alt='user posted image' /&gt;&lt;/a&gt;</description>
            <author>jackoats.my</author>
            <category>Codemasters</category>
            <pubDate>Mon, 31 Aug 2020 13:17:52 +0800</pubDate>
        </item>
        <item>
            <title>Helping non-IT transitioning to IT going to work?</title>
            <link>http://forum.lowyat.net/topic/5016050</link>
            <description>I have been active in some online communities, giving some &amp;#39;advice&amp;#39; to help non IT transitioning to IT jobs.  &lt;br /&gt;&lt;br /&gt;Some of them might think that IT industry may offer them safe harbor while their jobs are threatened by bad economy now.&lt;br /&gt;&lt;br /&gt;Considering that IT industry is so competitive already, do you think their effort (and mine) is going to be just in vain?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;</description>
            <author>jackoats.my</author>
            <category>Codemasters</category>
            <pubDate>Mon, 24 Aug 2020 16:23:46 +0800</pubDate>
        </item>
        <item>
            <title>One-leg-kick programmer sidekick wanted</title>
            <link>http://forum.lowyat.net/topic/5003297</link>
            <description>Hi, I have just started an IT blog (business tech &amp;amp; educational) and would need some help  &lt;!--emo&amp;:help:--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/icon_question.gif' border='0' style='vertical-align:middle' alt='icon_question.gif' /&gt;&lt;!--endemo--&gt; in a programmer sidekick.  Basically there are some tiny business problems to solve using tech.  Some coding required to work them out, e.g. OCR, data extraction, testing etc using Python, JavaScript or Java &amp;amp; Google Cloud.&lt;br /&gt;&lt;br /&gt;I can only afford small remuneration on a freelance basis right now.  When the business picks up, I hope to pay better.  &lt;br /&gt;&lt;br /&gt;Interested, please PM me with your profile &amp;amp; contact details.  Please state your daily rate.  Thank you.</description>
            <author>jackoats.my</author>
            <category>Codemasters</category>
            <pubDate>Tue, 28 Jul 2020 13:26:42 +0800</pubDate>
        </item>
        <item>
            <title>Facebook Workplace development</title>
            <link>http://forum.lowyat.net/topic/4935367</link>
            <description>Hello.  Do you guys know how to forward the identity of Facebook Workplace user to backend server together with some user info such as Name, email, telephone etc?</description>
            <author>jackoats.my</author>
            <category>Codemasters</category>
            <pubDate>Thu, 26 Mar 2020 10:24:32 +0800</pubDate>
        </item>
        <item>
            <title>&amp;quot;Interview&amp;quot; question</title>
            <link>http://forum.lowyat.net/topic/4862456</link>
            <description>Can anyone tell me how to solve this problem?&lt;br /&gt;&lt;br /&gt;How would you cut a rectangular cake into two equal pieces when a rectangular piece has already been cut out of it? The cut piece can be of any size and orientation. You are only allowed to make one straight cut.&lt;br /&gt;&lt;br /&gt;How to code it in Java or Python?</description>
            <author>jackoats.my</author>
            <category>Codemasters</category>
            <pubDate>Sat, 09 Nov 2019 09:16:14 +0800</pubDate>
        </item>
    </channel>
</rss>
