All posts by admin

How to Sync Content between your MacBook and iPhone over Wi-Fi

Motivation:

You want to sync content between your MacBook and iPhone over Wi-Fi.

    Solution:
    1. Connect your iPhone to your MacBook using a USB or USB-C cable.
    2. In the Finder on your MacBook, select iPhone in the Finder sidebar.
    3. Click General tab in the button bar.
    4. Select the Show this iPhone when on Wi-Fi checkbox.
    5. Click Sync button.
    6. Unplug your iPhone from your MacBook.
    7. Restart both devices.
    8. From now on, when your iPhone and MacBook connect to the same Wi-Fi you will see your iPhone device in the Finder sidebar, and you can sync content between them without having to use a cable.
    9. Sometimes if your MacBook cannot find your iPhone then just restart your MacBook and it will find your iPhone device again.

     

     

    How to Transfer Data from iPhone to iPhone without using iCloud

    Motivation:

    You want to transfer all your data from your old iPhone to your new one without using iCloud.

    Prerequisites:
    1. Your iPhones must run iOS 16.2 or later (i.e. iPhone 5S or later)
    2. Your iPhones must have Bluetooth enabled.
      Solution:
      1. Plug your old and new iPhone in.
      2. Place them next to one another.
      3. Turn on your old iPhone, connect to the Internet, enable Bluetooth.
      4. Turn on your new iPhone.
      5. On your new iPhone, choose your language, then select your country or region, then tap on Continue on Apperance screen.
      6. On your old iPhone, you should see a pop-up screen asking if you want to ‘Use your Apple ID [[email protected]] to set up your new iPhone’. Tap Continue.
      7. Pick up your old iPhone and position the camera view so it overlaps with the circular blue pattern that appears on your new iPhone. Aternatively you can select manual authentication and enter code generated on your old iPhone to your new iPhone.
      8. On your new iPhone, follow the instructions on the screen to transfer data from your old iPhone to your new iPhone.
      9. The transfer process is complete when you see Transfer Complete message on your old iPhone.
      10. It will then take some time to download apps to your new iPhone.
      11. On your old iPhone, open Microsoft Authenticator app if you are using it. Open Settings. Then enter your personal Microsoft account to act as your Recovery account. Then enable iCloud Backup.
      12. On your new iPhone, delete Microsoft Authenticator app. Then reinstall it. Open MS Authenticator app. Select Restore from backup option. Log in your personal Microsoft account. For some accounts, you may need to manually tap Action required  and follow the instructions to complete the transfer.
      13. On your old iPhone, open Google Authenticator app if you are using it. Tap three bars on the top left. Then tap Transfer accounts. Then tap Export accounts. Tap Next.
      14. On your new iPhone, open Google Authenticator app. Tap three bars on the top left. Then tap Transfer accounts. Then tap Import accounts. Tap Scan QR code. Hold your phone on the QR code on your old iPhone for a minute.

       

       

       

       

      How to Use MSBuild

      1. Build  a .NET project.
      • Download Build Tools for Visual Studio 2022.  (Scroll down to the bottom of the page.)
      • Install .NET SDKs for Visual Studio.
      • Select a MSBuild.exe location:
        C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin
        or 
        C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin
      • Execute the command below to build a solution.
        "C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" "../MySolution.sln" -restore -p:RestorePackagesConfig=true
      2. Log build errors to a file.
      • Execute the command below to export errors to the Build.log file.
        "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" /property:Configuration=Release "YourSolution.sln" -restore -p:RestorePackagesConfig=true > Build.log
      • Open the Build.log file and search for “errors” text.
      3. Hide build warnings.
      • Execute the command below to hide warnings and normal messages, but still show the final build result summary, including “Build succeeded” or “Build FAILED.”
        "C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" "./MySolution.sln" -restore -p:RestorePackagesConfig=true -p:StopOnFirstFailure=true /clp:Summary;ErrorsOnly
      4. Fixing “Microsoft.WebApplication.targets was not found” issue.
      • Download vs_BuildTools.exe.
      • Open Command Prompt.
      • Execute the command below.
        vs_BuildTools.exe --add Microsoft.VisualStudio. Workload.WebBuildTools --passive
      • Open .csproj or .vbproj file using Notepad.
      • Find Project element and set ToolsVersion to 17.0.
        <Project DefaultTargets="Build" ToolsVersion="17.0">
      • Find VisualStudioVersion element and set its value to 17.0.
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">17.0</VisualStudioVersion>
      • Find Import Project=”$(MSBuildExtensionsPath32) … Microsoft.WebApplication.targets text and set Condition to false.
        <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

      How to Log in Windows Safe Mode

      Motivation:

      • You get a blank screen after installing graphic driver on Windows 11 (e.g. Intel HD Graphics 520 graphic driver).
      • So you want to log in Windows safe mode to remove or disable the installed graphic driver.

      Solution:

      1. Turn on your computer.
      2. When you see the Windows logo and circle progress, press the Power button and hold it for 10 seconds. You computer will be turned off.
      3. Turn on your computer again.
      4. When you see the Windows logo, if you do not see Preparing Automatic Repair or Please Wait message then press the Power button and hold it for 10 seconds again.
      5. Repeat the 3rd and 4th step until you see Preparing Automatic Repair or Please Wait message.
      6. Click Advanced options button.
      7. Click Troubleshoot button.
      8. Click Advanced options button.
      9. Click Startup Settings button.
      10. Click Restart button.
      11. Press number 4 or number 5 to enter Windows safe mode.

      Solution for solving graphic driver issue:

      This solution is useful when you want to use your computer as a server without proper Intel HD Graphics 520 graphic driver and control your computer via remote desktop connection.

      1. Log in Windows safe mode without networking. If you want to avoid logging into safe mode then you may log in your machine via remote desktop connection.
      2. Install the latest graphic driver.
      3. Open Device Manager.
      4. Disable graphic driver.
      5. Log in Windows normal mode.
      6. Open Device Manager.
      7. Right click your display adapter and select Update driver.
      8. Select Browse my computer for drivers option.
      9. Select Let me pick from a list of available drivers on my computer option.
      10. Select Microsoft Basic Display Adapter.
      11. Enable graphic driver.
      12. Restart your machine.

       

        How to Combine an Image and Audio File to Video File

        Motivation:

        • You have a JPG and WAV file. You want to combine them to a FLV file in order to upload it to YouTube without losing audio quality.
        • You have a JPG and MP3 file. You want to combine them to a MP4 file in order to upload it to YouTube.

        Combining JPG and WAV to FLV:

        1. Download ffmpeg.
        2. Unzip the downloaded package to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build folder.
        3. Copy your image.jpg and audio.wav file to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build/bin folder.
        4. Open Command Prompt.
        5. Execute the two commands below.
          cd C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build\bin
          ffmpeg -r 1 -loop 1 -i image.jpg -i audio.wav -acodec copy -r 1 -shortest -vf scale=1280:720 output.flv
        6. Open output.flv file to verify result.
        7. Upload ouput.flv file to YouTube.

        Combining JPG and MP3 to MP4:

        1. Download ffmpeg.
        2. Unzip the downloaded package to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build folder.
        3. Copy your image.jpg and audio.mp3 file to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build/bin folder.
        4. Open Command Prompt.
        5. Execute the two commands below.
          cd C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build\bin 
          ffmpeg -loop 1 -framerate 1 -i image.jpg -i audio.mp3 -map 0 -map 1:a -c:v libx264 -preset ultrafast -tune stillimage -vf "fps=10,format=yuv420p,scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" -c:a copy -shortest output.mp4
        6. Open output.mp4 file to verify result.
        7. Upload output.mp4 file to YouTube.

         

         

         

        Xcode Tips

        1. Get 5.5 inch iPhone screenshots for submission

        • Open Xcode.
        • Go to Settings > Platforms.
        • Click + button.
        • Click iOS… menu item.
        • Select iOS15.5 Simulator.
        • Click Download & Install button.
        • Go to Windows > Devices and Simulators.
        • Click + button.
        • Enter iPhone 8 Plus to Simulator Name.
        • Select iPhone 8 Plus for Device Type.
        • Select iOS 15.5 for OS Version.
        • Click Create button.

         

        How to Back Up and Restore Photos and Music on MacBook

        Motivation

        You want to back up and restore your photos on a MacBook.

        Solution:

        To back up your images:

        1. Quit Photos app.
        2. Go to /Users/yourname/Pictures.
        3. Copy Photos Library.photoslibrary to your backup location.

        To restore your images:

        1. Quit Photos app.
        2. Copy Photos Library.photoslibrary from your backup location to your MacBook.
        3. Hold down the Option key and double-click the Photos app.
        4. In the Choose Library dialog, select your Photos Library.photoslibrary.
        5. Click Choose Library button.

        To back up your music:

        1. Quit Music app.
        2. Go to /Users/yourname/Music.
        3. Copy Music Library.musiclibrary and Media folder to your backup location.

        To restore your music:

        1. Quit Music app.
        2. Copy Music Library.musiclibrary and Media folder from your backup location to your MacBook.
        3. Hold down the Option key and double-click the Music app.
        4. Click Choose Library… button.
        5. Select your Music Library.musiclibrary.
        6. Click Choose button.
        7. You may also go to Music > Settings… > Files  and change Music Media folder location.

         

         

        How to Discover Requirements for a Maintenance Project

        Problem:

        You are responsible for capturing and analyzing requirements for a project to enhance a legacy system however misunderstandings happen too frequently among your team members.

        Context:

        A maintenance project is very different to a greenfield project. The key difference is that a business analysist who is responsible for discovering requirements must be not only domain expert but also be able to communicate with technical experts very well. In other words, the business analysist must both be familiar with the legacy system workflows and have adequate technical background.

        Suggestion:
        1. Collect existing artifacts, including software products, user guide, administrative guide, installation guide, deployment schema, design specification.
        2. Build a glossary and reference sources.
        3. Get initial agreement about terminologies (terms).
        4. List all system roles.
        5. Walk through the existing user interfaces to determine existing roles and related core use cases.
        6. Collect business problems or needs.
        7. Distill navigation flow and user interfaces related to customer’s problems or needs. Try to find out the exact screens in the existing system related to customer’s problems or needs.
        8. Clarify terminologies. Ask for example values, files, tools for doing something related to unclear or ambiguous terms.
        9. Identify correct problems by asking for demonstration of the issues or limitations of the current system, step-by-step illustrated examples with actual existing values, drawing sketches for guessed needs using a pencil or a tool.
        10. Identify correct needs by asking for user guide, video demonstration of a feature, 3rd party installation files and custom scripts if available, example input data and output reports.
        11. Document business needs by creating use cases with mockups. There might be a need of review of the existing source code and database to indentify initial draft technical solutions when creating these use cases to ensure that they are feasible.
        12. Identify affected features by revising the use cases with additional steps, mockups, data inputs/outputs, descriptions. There might be a need of review of the existing source code and database to indentify initial draft technical solutions when identifying the affected features.
        13. Identify affected roles by revising the use cases with additional or new business rules for all related roles.
        14. Some enhancemens related to technical aspects might require collecting existing technical artifacts. These artifacts might inlcude current database or data schemas, and current software products and source code if possible.
        15. Install tools related to existing source code, then build and run existing source code and database if they are available.
        16. Collect technical problems or needs by listing current technology issues using notes or diagrams.
        17. Analyze techincal needs. These might be data integrity issue (missing or duplicated fields? missing or duplicated rows?) or performance issue (too many rows to handle by current software?).
        18. Finally document technical needs by creating an existing architecture and a proposed future architecture. There is surely a need of review of the existing source code and database to indentify initial draft technical solutions when creating existing architecture and a proposed future architecture.
        Things that have to be discovered and confirmed:
        1. Legacy systems: Examples might be access to legacy systems, captured UI screenshots of each sub-systems, parts of database schemas, example data, example legacy source code, legacy codebase.
        2. Problems: Examples might be lack of documentation and expertise, non-scalable architecture, high cost development for new features, unfriendly UI/UX, performance issue.
        3. Goals: Examples might be migration of legacy system to event-driven, cloud based microservice architecture with modern UI/UX.
        4. Budget: Used to select appropriate technologies. Some cloud services, e.g. Salesforce Platform or AWS relational databases, might be very expensive.
        5. Initial text or diagrams: Ask for clarifications of ambiguous terms or components. Does initial proposed solution just need to be general? Should proposed architecture need to be adapted to specific problems, needs, legacy codebase, existing data, and budget?

         

         

        How to Use nuget

        1. Downloading packages to a build server
        Motivation:

        You have a .NET solution that uses NuGet package manager.

        You have many files in the packages folder and want them to be downloaded to your build server.

        Solution:
        • Download Windows x86 Commandline.
        • Copy nuget.exe to an folder and add the folder path to Windows PATH.
        • Open Command Prompt and execute the commands below.
          cd D:\Build\Source
          nuget restore YourSolutionFileName.sln
          
        2. Downloading (Restoring) packages using MSBuild
        • Execute the commands below.
          "C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" "../YourSolution.sln" -restore -p:RestorePackagesConfig=true
          
        3. Updating packages for a solution using VS Studio Package Manager Console
        • Open Tools > NuGet Package Manager >  Package Manager Console.
        • Execute the commands below.
          Update-Package
        4. Reinstalling packages for a solution using VS Studio Package Manager Console
        • Open Tools > NuGet Package Manager >  Package Manager Console.
        • Execute the commands below.
          Update-Package –reinstall
          
        5. Configuring package restore when building a project using VS Studio :
        • Open Tools > NuGet Package Manager >  Package Manager Settings.
        6. Reverting PackageReference project to packages.config:
        • Copy and  overwrite project file from backup created by Visual Studio or from source control system.
        • Delete all obj and bin files.
        7. Fixing “Could not load file or assembly…” issue:
        • Example issue:
          Could not load file or assembly 'Microsoft.IdentityModel.Tokens.Saml, Version=8.0.2.0
        • Open Visual Studio > Solution > Project > References > Microsoft.IdentityModel.Tokens.Saml > Properties and identify file or assembly version, e.g. 8.1.2.0.
        • Open Visual Studio > Solution > Project > web.config, search for Microsoft.IdentityModel.Tokens.Saml and modify the version for the file or assembly. Example:
          <bindingRedirect oldVersion="0.0.0.0-8.1.2.0" newVersion="8.1.2.0" />
        • Repeat the process for all the files or assemblies.