Search code snippets, questions, articles...

other code snippets

Go to a line number in Visual Studio Code
Mac - control + G

Windows - ctrl + G
Add launch screen in Xcode
Add Launch Screen to Xcode
Docker Commands for Build image and push to Google Cloud Run
//build
docker build -t gcr.io/<project-id>/image-name:tag-name .

//push
docker push gcr.io/<project-id>/image-name:tag-name

//authenticating 
gcloud auth configure-docker

//delete everything
docker system prune -a --volumes
ffmpeg
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i ".\162fps_猫羽雫 盯~.mp4" -crf 24 -y ".\162fps_猫羽雫 盯~.webm"

ffmpeg  -i input.mp4  -b:v 0  -crf 30  -pass 1  -an -f webm -y /dev/null
ffmpeg -i ".\60fps_猫羽雫_盯~.mp4" -lossless 1 ".\60fps_猫羽雫_盯~.webm"
ffmpeg -i ".\162fps_猫羽雫_盯~.mp4" -c:v libvpx-vp9 -threads 8 -lossless 1 -filter:v fps=60 ".\60fps_猫羽雫_盯~.webm"


ffmpeg  -i 60fps_猫羽雫_盯~.mp4  -b:v 0  -crf 0  -pass 1  -an -f webm -y NUL
ffmpeg  -i 60fps_猫羽雫_盯~.mp4  -b:v 0  -crf 0  -pass 2  60fps_猫羽雫_盯~.webm

ffmpeg -i 60fps_audio_Smooth_猫羽雫_盯~.mp4 -c:v libvpx-vp9 -c:a libopus -b:v 5M -minrate 1M -maxrate 10M -quality best -speed 0 -tile-columns 0 -threads 8 60fps_audio_Smooth_猫羽雫_盯~.webm

ffmpeg -hwaccel cuda -i 60fps_audio_Smooth_猫羽雫_盯~.mp4 -filter:v "minterpolate='fps=120'" -c:a copy 120fps_audio_Smooth_猫羽雫_盯~.mp4
Kotlin Generics
class Feature<T, V>(value: T, value2: V) {
    // generics // generalize
//    val data: T   // store value
//    val data2: V
    init {
//        data = value
//        data2 = value2

        println(value)
        println(value2)
    }
}
fun main() {
    val v = Feature(false, 45345345345.345)

}

class GenericFunction {

    fun <T,V>display(value1 : T , value2 : V) {

        println("value 1 is $value1 and value2 is $value2")
    }
}

fun main() {

    val g = GenericFunction()

    g.display(false,true)

}
Useful docker commands
# Stop all docker containers
    docker kill $(docker ps -q)
# Remove all docker containers
    docker rm $(docker ps -a -q)
# Remove all docker images
    docker rmi $(docker images -q)
Redis on Mac
// Install redis using homebrew
brew install redis
// Start redis
brew services start redis
// Test if Redis Server is Running
redis-cli ping
//The system responds with a ‘pong’ 
//if the server is up and running.
Start and stop postgresql from terminal using brew
brew services start postgresql

brew services stop postgresql
Delete postgresql database if it is template
postgres=# create database tempDB is_template true;
CREATE DATABASE
postgres=# drop database tempDB;
ERROR:  cannot drop a template database
postgres=# alter database tempDB is_template false;
ALTER DATABASE
postgres=# drop database tempDB;
DROP DATABASE
postgres=#
Gradient Background
<template>
  <div class="full"></div>
</template>

<script>

</script>

<style scoped>
.full {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(0deg, #34e89e 0%, #0f3443 100%);
}
</style>
Remove all commits and history with git commands
# Clone the project - Replace below url with your repo or project url
git clone https://github/git_username/repo_name.git

cd myproject

# Remove .git folder to remove git management
rm -rf .git

# Now, re-initialize the repository:
git init
git remote add origin https://github.com/git_username/repo_name.git
git remote -v

# Add all the files and commit the changes:
git add --all
git commit -am "Initial commit"

# Force push update to the master branch of our project repository:
git push -f origin master
murata vba select cells after autofilter
Sub Macro4()
    Dim R As Range
    Range("A1").AutoFilter 1, "田中"
    With Range("A1").CurrentRegion.Offset(1, 0)
    
        '各行 in 表示されている全ての行
        For Each R In .Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Rows
            Debug.Print R.Address
            '表示されている行が基準となる
            If R.Cells(1, 3) > 300 Then
            
            MsgBox R.Cells(1, 2)
            
            End If
            
        Next R
        
    End With
End Sub
mura vba insert word into a specific place in microsoft word
Sub CopyToWord()

   Dim wordApp As Word.Application
   Set wordApp = CreateObject("Word.Application")
   wordApp.Visible = True

   Dim wordDoc As Word.Document

   Dim target_doc As String
   target_doc = Dir(ThisWorkbook.Path & "" & "*.doc")
      
   Do While target_doc <> ""
   Set wordDoc = wordApp.Documents.Open(ThisWorkbook.Path & "" & target_doc)

   '文字列を検索
    Dim x As Variant
    
    'placeholderを検索し、そこにカーソルを移動
    With wordApp.Selection.Find
    .Text = "placeholder"
    .Execute
    End With
    
    '1行下にダウン
    wordApp.Selection.MoveDown
    
    '1行全体を選択
    wordApp.Selection.Expand Unit:=wdSection
    
    '1行消去
    wordApp.Selection.Delete
    
    '文字の入力
    wordApp.Selection.TypeText "置換後の文字列1"
    

   'ワードファイルを閉じる
    wordDoc.Close
    wordApp.Visible = False
   'Set wordApp = Nothing
   
   target_doc = Dir()
   Loop


End Sub
IIS web.config for React Application
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Static Assets" stopProcessing="true">
          <match url="([\S]+[.](html|htm|svg|js|css|png|gif|jpg|jpeg))" />
          <action type="Rewrite" url="/{R:1}"/>
        </rule>
        <rule name="ReactRouter Routes" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="/index.html" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>
Delete a git branch from local and remote machines - commands
/* TO DELETE FROM REMOTE */
git push -d origin {branch_name}

/* TO DELETE FROM LOCAL */
git branch -d {branch_name}
vba 複数ブックから一覧にまとめる
'個別の請求書ブックから、一覧にまとめる

Sub データ取り込み()

Application.ScreenUpdating = False

Dim i As Long
Dim cnt As Long
Dim file
Dim filebook
Dim seikyu As Workbook

cnt = Sheets("一覧").Range("A10000").End(xlUp).Row + 1

file = Application.GetOpenFilename(MultiSelect:=True)

If IsArray(file) Then

For Each filebook In file

Workbooks.Open (filebook)

Set seikyu = ActiveWorkbook

For i = 10 To seikyu.Sheets(1).Range("B10000").End(xlUp).Row

Workbooks("請求書.xlsm").Sheets("一覧").Range("A" & cnt).Value _
= seikyu.Sheets(1).Range("B5").Value

Workbooks("請求書.xlsm").Sheets("一覧").Range("B" & cnt).Value _
= seikyu.Sheets(1).Range("B" & i).Value

Workbooks("請求書.xlsm").Sheets("一覧").Range("C" & cnt).Value _
= seikyu.Sheets(1).Range("E" & i).Value

Workbooks("請求書.xlsm").Sheets("一覧").Range("D" & cnt).Value _
= seikyu.Sheets(1).Range("F" & i).Value

cnt = cnt + 1

Next

seikyu.Close

Next

End If

End Sub
murata excel vba ブック保存
' "C:\Users\addre\vba\"は保存先までの絶対パス
ActiveWorkbook.SaveAs "C:\Users\addre\vba\" & Format(Date, "yyyymmdd") & ActiveSheet.Name & ".xlsx"
ActiveWorkbook.Close
murata vba 最終行取得して転記
Sheets('一覧').Range('A10000').End(xlUp).Row + 1
Powershell change mac addresses to static
$MYVMs=(Get-VM | Where { $_.State -eq "Running" } )
foreach ($VM in $MYVMs) {
	$VMNet=Get-VMNetworkAdapter -VMName $VM.NAME
    $VM.Name
    Save-VM -Name $VM.Name
    foreach ($VMAd in $VMNet) {
        $MyMac=$VMAd | Select MacAddress
        Set-VMNetworkAdapter -VMNetworkAdapter $VMAd -StaticMacAddress $MyMac.MacAddress
    }
    Start-VM  -Name $VM.Name
    Pause

}
Brew basic commands
brew install package_name
brew services list //To List all services installed via brew
brew services start service_name //To start a service
brew services stop service_name //To stop a service
SASS full bleed image
%full-cover {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}
%full-bleed-image {
    height: 100%;
    width: auto;
    max-width: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    @include ie {
        // hide image in IE since it will be replaced with a <figure> with a background image
        display: none;
    }

    @supports (object-fit: cover) {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        transform: none;
        left: 0;
        top: 0;
    }
}

%full-bleed-image-ie-replacement {
    // IE replacement with background image, to be applied to <figure> tag in context
    background-size: cover;
    background-position: center center;
    height: 100%;
    opacity: 0;
    transition: .3s opacity;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    &[class] {
        // force a fade-in when the class is applied
        opacity: 1;
    }
}
تايمر
Dim second As Integer
  
    Public Async Function WaitAsynchronouslyAsync() As Task(Of String)
        Label1.Text = DateTime.Now.ToString
        second = second + 1

        Await Task.Delay(second)

        If second >= 10 Then
            Timer1.Stop() 'Timer stops functioning
            Label1.Text = "finsh" '"timer stopped"
        End If

        Return second
    End Function

    Private Async Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = Await WaitAsynchronouslyAsync()
    End Sub

    Private Async Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
        Timer1.Interval = 1000
        Timer1.Start() 'Timer starts functioning[/size]
        second = 0
        Label1.Text = Await WaitAsynchronouslyAsync()

    End Sub
تنفيذ سكربت لانشاء قاعدة برمجيا
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ExecutesqlFile("(local)", "TestTestD", Application.StartupPath & "\SQLScript.sql")
    End Sub
    Public Sub ExecutesqlFile(ByVal SERVAR_NAME_SQL As String, ByVal DATABASE_NAME As String, ByVal sqlFile As String)
        Using connection As New SqlClient.SqlConnection("Server =" & SERVAR_NAME_SQL & ";database=" & DATABASE_NAME & ";integrated security=true")
            If connection.State = ConnectionState.Closed Then connection.Open()
            Dim sql As String = ""
            Using strm As FileStream = File.OpenRead(sqlFile)
                Dim reader As New StreamReader(strm)
                sql = reader.ReadToEnd()
            End Using
            Dim regex As New Regex("^GO", RegexOptions.IgnoreCase Or RegexOptions.Multiline)
            Dim lines As String() = regex.Split(sql)
            Dim transaction As SqlClient.SqlTransaction = connection.BeginTransaction()
            Using cmd As SqlClient.SqlCommand = connection.CreateCommand()
                cmd.Connection = connection
                cmd.Transaction = transaction
                ProgressBar1.Step = 1
                For Each line As String In lines
                    If line.Length > 0 Then
                        ProgressBar1.Maximum = line.Length + 20
                        ProgressBar1.Value = line.Length
                        cmd.CommandText = line
                        cmd.CommandType = CommandType.Text
                        Try
                            cmd.ExecuteNonQuery()
                        Catch generatedExceptionName As SqlClient.SqlException
                            MsgBox(generatedExceptionName.Message, MsgBoxStyle.Critical, "")
                            transaction.Rollback()
                            Throw
                        End Try
                    End If
                Next
                ProgressBar1.Value = ProgressBar1.Maximum
                MsgBox("تمت عملية انشاء الجداول و الاستعلامات بنجاح", MsgBoxStyle.Information, "")
            End Using
            transaction.Commit()
            connection.Close()
        End Using
    End Sub
تشكيل جدول بالاعتماد على كلاس Person
Public Class Form1
    Dim ListPersons As New List(Of Person)

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ListPersons = ListOfPersons()
        Dgv1.DataSource = ListPersons.ToList
    End Sub



    Private Function CreateDatTable() As DataTable
        Dim Dt As New DataTable()
        Dim Colum1 As DataColumn = New DataColumn With {.ColumnName = "Name", .DataType = Type.GetType("System.String")}
        Dim Colum2 As DataColumn = New DataColumn With {.ColumnName = "Phone", .DataType = Type.GetType("System.String")}
        Dt.Columns.Add(Colum1)
        Dt.Columns.Add(Colum2)



        For i As Integer = 1 To 500
            Dim p As Integer = i
            If p = Names.Length - 1 Then p = 0
            Dim Data() As String = New String() {i, Names(p), Strat(p)}
            Dt.Rows.Add(Data)
        Next
        Return Dt

    End Function

    Dim Names() As String = New String() {"علي", "احمد", "محمد", "سالم", "فهد", "بدر", "اصيل", "عبد الله", "ربيع", "مريم", "خالد", "راشد", "سيف", "ناصر", "وحيد", "معتز"}
    Dim Strat() As String = New String() {"سباحة", "كرة قدم", "كرة سلة", "رماية", "فروسية", "مطالعة", "سفر", "برمجة", "قيادة", "كرة يد", "قفز", "تصوير", "رسم", "نحت", "ديكور", "تمثيل"}

    Private Function ListOfPersons() As List(Of Person)
        Dim p As Integer

        Dim Random As Random = New Random()

        For i As Integer = 1 To 500

            If i >= Names.Length AndAlso p >= Names.Length Then p = 0
            Dim x As Integer = Random.Next(p, Names.Length)
            Dim z As Integer = Random.Next(p, Strat.Length)

            Dim Prs As New Person With {.ID = i, .Name = Names(x), .Phone = Strat(z)}
            ListPersons.Add(Prs)
            p += 1
        Next
        Return ListPersons
    End Function


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'If Dt_Laters.Rows.Count > 0 Then
        'نسخة من الريبورت
        Dim Rpt As New XtraReport1

        'Dim Dt_Company As DataTable = AssociationInfoCls.GetInstance.SelectAll
        'اسناد معلومات الشركة
        'If Dt_Company.Rows.Count > 0 Then
        '        'Rpt.XrAf_Name.Text = Dt_Company.Rows(0)("Af_Name")
        '        'Rpt.XrAf_Tel1.Text = "هاتف: " & Dt_Company.Rows(0)("Af_Tel1")
        '        'Rpt.XrAf_Adrs.Text = "العنوان: " & Dt_Company.Rows(0)("Af_Adrs")
        '        'Rpt.XrAf_Mobile1.Text = "جوال: " & Dt_Company.Rows(0)("Af_Mobile1")
        '    Else
        '        'XtraMessageBox.Show(DevExpress.LookAndFeel.UserLookAndFeel.Default, "لا يوجد معلومات رأسية للشركة حاول اضافة معلومات عن الشركة", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        '    End If


        Rpt.RequestParameters = False
            Rpt.DataSource = ListPersons
            ' Rpt.DataMember = "Print_CustNotPayes"

            'اغلاق الفورم اذا كان مفتوح
            'If My.Application.OpenForms.OfType(Of Fr_RptViewer).Any() Then
            '    For Each Item As Form In DocumentManager.FromControl(RibbonForm1).MdiParent.MdiChildren
            '        If String.Equals(Item.Name, "Fr_RptViewer") Then
            '            Item.Close()
            '        End If
            '    Next
            'End If


            XtraForm1.DocumentViewer1.DocumentSource = Rpt
            ' Fr_RptViewer.GetInstance.MdiParent = RibbonForm1
            XtraForm1.Show()
        'Else
        '    XtraMessageBox.Show(DevExpress.LookAndFeel.UserLookAndFeel.Default, "لا يوجد معلومات لطباعتها", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        '    Exit Sub


        'End If



    End Sub
End Class
person Class
Public Class Person



    Private _ID As String
    Public Property ID() As String
        Get
            Return _ID
        End Get
        Set(ByVal value As String)
            _ID = value
        End Set
    End Property



    Private _Name As String
    Public Property Name() As String
        Get
            Return _Name
        End Get
        Set(ByVal value As String)
            _Name = value
        End Set
    End Property


    Private _Phone As String
    Public Property Phone() As String
        Get
            Return _Phone
        End Get
        Set(ByVal value As String)
            _Phone = value
        End Set
    End Property
End Class
Create a Django Project
django-admin startproject {djangoprojectname}
Access desktop from terminal in MAC
cd ~/Desktop/

//TO ACCESS A FOLDER ON DESKTOP USE
cd ~/Desktop/
cd floder_name/
murata mql5 複数EA PositionsTotalの工夫
// global 変数
int MagicT = 202555591;


// 関数
 int totalPositions(int num){
 
      int counter = 0;
      
      for(int k = 0; k < PositionsTotal(); k++){
      
        string name = PositionGetSymbol(k); // 不要?
        if(PositionGetInteger(POSITION_MAGIC) == num)counter++;
      
      }
 
   return counter;
 }

 // 書き換え
 // 各注文・決済に追加

      requestT.magic = MagicT;


 if(posT == 0 && TimeT[0] > LongEntryTimeT && (EntryCountT < EntryCountLimitT) && totalPositions(MagicT) == 0)


 この場合posTは不要か?
murata mql5 複数EA
void OnTick()
  {

      Tokyo();
      
      NewYork();

  }
 

//+------------------------------------------------------------------+
 
void Tokyo(){

     }

void NewYork{

     }
murata mql5 High配列の複製
// mql 4

double High[];
double ar2[];
ArrayCopy(ar2,High,0,0);
Alert(ar2[2]);
murata mql class基礎
//+------------------------------------------------------------------+
//|                                                   test_class.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {

   
   Person myPerson1;
   myPerson1.name = "John";
   myPerson1.age = 37;
   
   Person myPerson2;
   myPerson2.name = "Enemy";
   myPerson2.age = 44;
   
   Alert(myPerson1.name, "   ", myPerson1.age);
   Alert(myPerson2.name, "   ", myPerson2.age);
   
   
   myPerson1.speak();
   
   myPerson2.speak();
   
   
  }
//+------------------------------------------------------------------+


class Person{

   public:
      string name;
      int age;
   
   public:
      void speak(){
      Alert("My name is: ", name, " and I am ", age, " years old");
      
      }
   
      
   
   
};
murata mql4外部パラメータ設定(途中)
#property show_inputs

#include <CustomeFunctions01.mqh>

input int stopLossPips = 30;
extern int takeProfitPips = 40;


//新しい列挙型の作成
enum riskLevel{
   RiskLevel_1,
   RiskLevel_2,
   RiskLevel_3
};

//初期値を割り振った数値で指定
extern riskLevel RiskLevel = RiskLevel_1;


void OnStart(){

Alert(RiskLevel);

if(RiskLevel == RiskLevel_1)
{

string target = "ichidesu";
Alert(target);

}

if(RiskLevel == RiskLevel_2)
{

string target = "2desu";
Alert(target);

}

if(RiskLevel == RiskLevel_3)
{

string target = "3desu";
Alert(target);

}



}
murata EA how to prevent reverse-engineering
# mql
# prevent it from backtesting.

if (TimeCurrent() < __DATE__){ Alert("Back testing prohibited."); ExpertRemove(); return; }
[Python] How to install pytest
# first create virtual environment

# then install pytest using the command
$ python -m pip install pytest
[pytest] Running pytests with options
Example:
$ ​​pytest​​ ​​--tb=short​​ tests

--tb=style
short prints just the assert line and the E evaluated line with no context; 
line keeps the failure to one line; 
no removes the traceback entirely.

$ ​​pytest​​ –collect-only tests
shows which tests will be run with the given options and configuration

$ ​​pytest​​ -v ​​-k​​ ​​"dashboard"​​ ​​--collect-only​
lists the test_dashboard() tests only

​import​ pytest ...
@pytest.mark.run_these_please ​def​ test_member_access():
...

$ ​​pytest​​ ​​-v​​ ​​-m​​ ​​run_these_please​
mark and run a subset of test functions

​$ ​​pytest​​ ​​-x​
​$ ​​pytest​​ ​​-exitfirst
stopping the entire test session immediately when a test fails

-k EXPRESSION only run tests/classes which match the given substring expression.
Example: -k 'test_method or test_other' matches
all test functions and classes whose name
contains 'test_method' or 'test_other'.
-m MARKEXPR only run tests matching given mark expression. example: -m 'mark1 and not mark2'.
-x, --exitfirst exit instantly on first error or failed test. 
--maxfail=num exit after first num failures or errors. 
--capture=method per-test capturing method: one of fd|sys|no.
-s shortcut for --capture=no.
--lf, --last-failed rerun only the tests that failed last time
(or all if none failed)
--ff, --failed-first run all tests but run the last failures first.
-v, --verbose increase verbosity.
-q, --quiet decrease verbosity.
-l, --showlocals show locals in tracebacks (disabled by default). 
--tb=style traceback print mode (auto/long/short/line/native/no). 
--durations=N show N slowest setup/test durations (N=0 for all). 
--collect-only only collect tests, don't execute them.
--version display pytest lib version and import information.
-h, --help show help message and configuration info
[Python] XPATH locator with text present in element
# HTML
<a class="dropdown-item" href="/logout">
                    <span class="dropdown-icon oi oi-account-logout"></span> Logout</a>


# Python
browser_ms.find_element(By.XPATH,'//span[text()="logout"]').click()
[PyCharm] Comment and uncomment lines of code
Comment and uncomment lines of code using ⌘/.
[pytest] Only collect tests, don't execute them
# pytest - only collect tests, don't execute them
​$ ​​cd​​ ​​/path/to/code/ch1​
​$ ​​pytest​​ ​​--collect-only​
[pytest] Turn off the stack trace
# pytest - turn off the stack trace
​$ ​​cd​​ ​​/path/to/code/ch1​
​$ ​​pytest​​ ​​--tb=no​
[Javascript] Finding web elements using CSS Selectors
id  #
class  '.'
tag 'li'
path '>' immediate child
path '' somewhere below
'nth-child(1)'
.table.dataTable.no-footer[style="width: 100%;"]  combination of class and attribute
Timeri i teleportacija
#Cijeli kod napisan unutar playera. Slika: https://i.imgur.com/3nnKBH6.png

#Piše  se izvan funckija
#TIMER

var timer=null                      #Incijalizacija samog timera i njegovo postavljanje na NULL
var teleport_delay=1                #Incijalizacija trajanje timera. U ovome slučaju jedan
var can_teleport=true               #Incijalizacija ograničenja

func _ready():                      #Incijalizacija funckije timera
	timer=Timer.new()               #Povezivanje varijable "timer" s Timer (ugrađenom Godot funkcijom)
	timer.set_one_shot(true)        #Ako je istina timer se zaustavlja kad dođe do 0. Ako je false unda se samo restartira. U ovom slučaju ručno ćemo postaviti timer
	timer.set_wait_time(teleport_delay)                         #Postavljanje vremena koje je potrebno da timer istekne
	timer.connect("timeout", self, "on_timeout_complete")       #HELP needed. Povezuje timer s nečim. Timeout je početak, self je objekt kojeg povezuje, on_timeout_complete je krajnja poveznica
	add_child(timer)                #Mislin da ovo trenutnom objektu (player) tek sad daje objekt timer kojeg smo prije definirali.
	
func on_timeout_complete():         #Incijalizacija funckija koja treba za timer.connect
	can_teleport=true               #Omogućivanje teleportacije
	
	
	#Pisano unutar func _physics_process(delta):
	#TELEPORT
	
	if Input.is_key_pressed(KEY_ALT) && can_teleport:                             #Provjera je li pritisnuta tipka alt i je li can_teleport TRUE
		var teleportPoint=to_global(get_node("Teleport").translation)             #Dohvaćanje globalne lokacije teleport node
		translation = teleportPoint                                               #Pošto pišemo u playeru ovo je zapravo player.translation ili ti ga lokacija playera. stavljamo lokaciju teleport pointa u varijablu koju ćemo kasnije referencirati
		can_teleport=false                                                        #Postavljamo can_teleport FALSE, jer inače bi se moglo neograničeno teleportirat
		timer.start()                                                             #Započinje timer. Kad timer istekne can_teleport postaje TRUE i moguća je ponovna teleportacija
Guide to Fix Dex Issue ( UNITY )
STEP- 1

In Build Settings switch to build  System to Gradle.
	

STEP- 2 

Player Settings => Other Settings  under configurations
Scripting Runtime Version  => .Net.4.x
Api Compatible => .Net.4.x

STEP - 3

Install Resolver and Run Resolver.


STEP- 4

In Android  => plugins => Android.Manifest.xml In <application> tag add following line to solve android Dex-Merge-Exception 

android:name="android.support.multidex.MultiDexApplication"

After the starting tag add following line of code with the Admob App ID
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value=" —Id here—”/>
Guide to Configure In App Purchases ( UNITY )
N APP PURCHASES ( Implementation )

=>    Sign In to Unity

=>    Open Services Panel

=>    Turn On Unity Analytics

=>    Turn On In App Purchases

=>    Before Importing InApp Package add InApp public Key in the box below it.

=>    Create IAP products by going into Windows -> UNITY IAP -> IAP Catalog.

=>    Go to button and Add IAP Button component.

=>    Change button type to commonly used Purchase.

=>    Add PRODUCT ID from dropdown.

=>    Add desired event on ON PURCHASE COMPLETE (Product) which will happens when Purchase       	successful.
Android Clean
cd android
./gradlew clean
HTTP response codes
100 => "Continue", 
101 => "Switching Protocols", 
102 => "Processing", 
200 => "OK", 
201 => "Created", 
202 => "Accepted", 
203 => "Non-Authoritative Information", 
204 => "No Content", 
205 => "Reset Content", 
206 => "Partial Content", 
207 => "Multi-Status", 
300 => "Multiple Choices", 
301 => "Moved Permanently", 
302 => "Found", 
303 => "See Other", 
304 => "Not Modified", 
305 => "Use Proxy", 
306 => "(Unused)", 
307 => "Temporary Redirect", 
308 => "Permanent Redirect", 
400 => "Bad Request", 
401 => "Unauthorized", 
402 => "Payment Required", 
403 => "Forbidden", 
404 => "Not Found", 
405 => "Method Not Allowed", 
406 => "Not Acceptable", 
407 => "Proxy Authentication Required", 
408 => "Request Timeout", 
409 => "Conflict", 
410 => "Gone", 
411 => "Length Required", 
412 => "Precondition Failed", 
413 => "Request Entity Too Large", 
414 => "Request-URI Too Long", 
415 => "Unsupported Media Type", 
416 => "Requested Range Not Satisfiable", 
417 => "Expectation Failed", 
418 => "I'm a teapot", 
419 => "Authentication Timeout", 
420 => "Enhance Your Calm", 
422 => "Unprocessable Entity", 
423 => "Locked", 
424 => "Failed Dependency", 
424 => "Method Failure", 
425 => "Unordered Collection", 
426 => "Upgrade Required", 
428 => "Precondition Required", 
429 => "Too Many Requests", 
431 => "Request Header Fields Too Large", 
444 => "No Response", 
449 => "Retry With", 
450 => "Blocked by Windows Parental Controls", 
451 => "Unavailable For Legal Reasons", 
494 => "Request Header Too Large", 
495 => "Cert Error", 
496 => "No Cert", 
497 => "HTTP to HTTPS", 
499 => "Client Closed Request", 
500 => "Internal Server Error", 
501 => "Not Implemented", 
502 => "Bad Gateway", 
503 => "Service Unavailable", 
504 => "Gateway Timeout", 
505 => "HTTP Version Not Supported", 
506 => "Variant Also Negotiates", 
507 => "Insufficient Storage", 
508 => "Loop Detected", 
509 => "Bandwidth Limit Exceeded", 
510 => "Not Extended", 
511 => "Network Authentication Required", 
598 => "Network read timeout error", 
599 => "Network connect timeout error"
MacOS Finder Hidden Folders
Cmd + Shift + .
Print to the log file: project name, testsuite name, test case name Groovy
def projName = testRunner.testCase.testSuite.project.name
def suiteName = testRunner.testCase.testSuite.name
def tcName   = testRunner.testCase.name

// Use soapUI context object to log project endpoint and Database.
def endpoint = context.expand( '${#Project#endpoint}' ) 
def dB = context.expand( '${#Project#DB}' )

log.info "*********************************************************************"
log.info "          Running Project: "  + projName 
log.info "          Suite: "  + suiteName 
log.info "          Testcase: " + tcName
log.info "          Endpoint: " + endpoint
log.info "          Database: " + dB
log.info "*********************************************************************"
Open IOS app simulator from terminal
open -a Simulator.app