Cara install Mac OS di PC/Laptop Windows secara virtual menggunakan VMware

Buat kamu yang gak punya Mac dan ingin develop apa aja pakai XCode di Mac, kalian bisa install Mac OS di PC/Laptop menggunakan VMware. Tapi nantinya VMware nya harus diinstalin unlocker supaya bisa menjalankan Mac OS.

Begini caranya:

  1. Download ISO instalasi versi OS yang kamu inginkan, ini file torrent nya: https://drive.google.com/file/d/1XHsCkyvX0o4ie-YbmoT13WArwJHmZbCw/view?usp=sharing
  2. Download VMware. Cari tahu dari Google bagaimana kamu bisa download VMware, lalu install. Usahakan cari versi Workstation versi 11-15 atau Player versi 7-15; karena versi 16 ke atas biasanya unlocker nya tidak berfungsi.
  3. Download Unlocker dari link ini lalu install: https://github.com/paolo-projects/auto-unlocker
  4. Edit file VMX seperti ini:

Add
smbios.reflectHost = “TRUE”
hw.model = “MacBookPro14,3”
board-id = “Mac-551B86E5744E2388”
smc.version = “0”
ulm.disableMitigations = “TRUE”

Edit
ethernet0.virtualDev = “vmxnet3”

Nah setelah itu mulai kita install Mac OS nya…

 

 

Cara simpan tiap halaman file word sebagai sebuah file html terpisah secara otomatis – Script macro Microsoft Word

Misalnya kita punya sebuah file word ratusan halaman, lalu kita ingin menconvert tiap halaman file tersebut sebagai satu file html terpisah, kita bisa menggunakan script macro di bawah ini:

Sub SaveAsHtmls()
'
' SaveAsHtmls Macro
'
'

    Dim orig As Document
    Dim page As Document
    Dim numPages As Integer
    Dim idx As Integer
    Dim fn As String
    
       
    ' Keep a reference to the current document.
    Set orig = ActiveDocument
    
    ' Calculate the number of pages
    numPages = ActiveDocument.BuiltInDocumentProperties("Number of Pages")
    
    For idx = 1 To numPages
        ' Make sure the document is active
        orig.Activate
               
        ' Go to the page with index idx
        Selection.GoTo What:=wdGoToPage, Name:=idx
    
        ' Select the current page
        Selection.GoTo What:=wdGoToBookmark, Name:="\page"
               
        ' Copy the selection
        Selection.Copy
        
        ' Create a new document
        Set page = Documents.Add
        
        ' Activate it
        page.Activate
               
        ' Paste the selection
        Selection.Paste
        
        ' Generate the file name
        fn = "C:\converted\page_" + CStr(idx) + ".html"
        
        ' Save the document as HTML
        page.SaveAs FileName:=fn, FileFormat:=wdFormatHTML, AddToRecentFiles:=False
        
        ' Close the document
        page.Close
        
    Next

End Sub

Cara menggunakan script di atas akan Om Puter tunjukin di video di bawah ini:

Cara mengatasi warning Unity WebGL yang berbunyi: HTTP Response Header “Content-Type” configured incorrectly on the server for file Build/xxx.wasm , should be “application/wasm”. Startup time performance will suffer.

Kalian bisa menambahkan sebuah file bernama .htaccess di lokasi yang sama dengan file html game Unity yang dibuild oleh Unity, yang isinya adalah kode ini guys:

# This configuration file should be uploaded to the server as "<Application Folder>/Build/.htaccess"
# This configuration has been tested with Unity 2020.1 builds, hosted on Apache/2.4
# NOTE: "mod_mime" Apache module must be enabled for this configuration to work.
<IfModule mod_mime.c>

# The following lines are required for builds without decompression fallback, compressed with gzip
RemoveType .gz
AddEncoding gzip .gz
AddType application/octet-stream .data.gz
AddType application/wasm .wasm.gz
AddType application/javascript .js.gz
AddType application/octet-stream .symbols.json.gz

# The following lines are required for builds without decompression fallback, compressed with Brotli
RemoveType .br
RemoveLanguage .br
AddEncoding br .br
AddType application/octet-stream .data.br
AddType application/wasm .wasm.br
AddType application/javascript .js.br
AddType application/octet-stream .symbols.json.br

# The following line improves loading performance for uncompressed builds
AddType application/wasm .wasm

# Uncomment the following line to improve loading performance for gzip-compressed builds with decompression fallback
# AddEncoding gzip .unityweb

# Uncomment the following line to improve loading performance for brotli-compressed builds with decompression fallback
# AddEncoding br .unityweb

Script car controller sederhana untuk menjalankan mobil di Unity

Di postingan ini ingin saya share sebuah script car controller sederhana untuk menjalankan mobil.

Seperti apa penggunaannya bisa kalian lihat di video di bawahnya ya. Berikut scriptnya (Controller.cs):

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Controller : MonoBehaviour
{
    //Adding audio source 
    //public AudioSource audioSourceIddle;
    //public float minimumPitchIdle = 0.5f;
    //public AudioSource audioSourceAcc;
    //public float minimumPitchAcc = 0.5f;




    //Making reference to wheel colliders
    [SerializeField] WheelCollider FrontRight;
    [SerializeField] WheelCollider FrontLeft;
    [SerializeField] WheelCollider BackRight;
    [SerializeField] WheelCollider BackLeft;

    //Getting Reference to phisycal wheel meshes
    [SerializeField] Transform FrontRightTransform;
    [SerializeField] Transform FrontLeftTransform;
    [SerializeField] Transform BackRightTransform;
    [SerializeField] Transform BackLeftTransform;


    public float acceleration = 30000f;
    public float BreakingForce = 8000f;
    public float MaxTurnAngle = 30f;


    private float CurrentAcceleration = 0f;
    private float CurrentBreakingForce = 0f;
    private float CurrentTurnAngle = 0f;
    private float CurrentAccSound = 0f;

    

    private void FixedUpdate()
    {
        //Making reference to the audio
        //audioSourceIddle = GetComponent<AudioSource>();
        //audioSourceAcc = GetComponent < AudioSource>();
        //audioSource.pitch = minimumPitch;

        //Get forward /backward acceleration from the vertical axis (W and S keys)
        CurrentAcceleration = acceleration * Input.GetAxis("Vertical")*(-1);
        CurrentAccSound = Input.GetAxis("Vertical");
        //setting up sound
        //if (CurrentAccSound < 0.0)
        //{
            //audioSourceIddle.pitch = (float)(minimumPitchIdle-0.1);
        //}
        //else if (CurrentAccSound > 0.7)
        //{
          //  audioSourceAcc.volume = minimumPitchAcc;
        //
        //else
        //{
         //   audioSourceIddle.pitch = minimumPitchIdle;
        //}
        
        

        //give CurrentBreakForce a value if space key is being pressed
        if (Input.GetKey(KeyCode.Space))
            CurrentBreakingForce = BreakingForce;
            //audioSource.pitch = minimumPitch;
        else
            CurrentBreakingForce = 0;
        //Front wheels acceleration
        FrontRight.motorTorque = CurrentAcceleration;
        FrontLeft.motorTorque = CurrentAcceleration;
        BackRight.motorTorque = CurrentAcceleration;
        BackLeft.motorTorque = CurrentAcceleration;
        //Apply braking to the four wheels
        FrontRight.brakeTorque = CurrentBreakingForce;
        FrontLeft.brakeTorque = CurrentBreakingForce;
        BackRight.brakeTorque = CurrentBreakingForce;
        BackLeft.brakeTorque = CurrentBreakingForce;

        //Stearing
        CurrentTurnAngle = MaxTurnAngle * Input.GetAxis("Horizontal");
        FrontRight.steerAngle = CurrentTurnAngle;
        FrontLeft.steerAngle = CurrentTurnAngle;

        //Update position and rotation of wheel meshes
        UpdateWheel(FrontRight, FrontRightTransform);
        UpdateWheel(FrontLeft, FrontLeftTransform);
        UpdateWheel(BackRight, BackRightTransform);
        UpdateWheel(BackLeft, BackLeftTransform);

    }

    void UpdateWheel(WheelCollider col, Transform trans) {
        //Get state of collider
        Vector3 position;
        Quaternion rotation;
        col.GetWorldPose(out position, out rotation);
        //Set wheel to the same state as collider
        trans.position = position;
        trans.rotation = rotation;
    }
}

Ini videonya: