Skip to content

Instantly share code, notes, and snippets.

View ilyosdev's full-sized avatar
:shipit:
PRO

Ilyos Olimov ilyosdev

:shipit:
PRO
View GitHub Profile
@ilyosdev
ilyosdev / app.kt
Created October 24, 2023 10:08
kotlin incall play audio
import android.content.Context
import android.media.AudioManager
import android.media.MediaPlayer
import android.net.Uri
import android.os.Bundle
import android.telecom.Call
import android.telecom.CallScreeningService
import android.telecom.TelecomManager
import androidx.appcompat.app.AppCompatActivity
@ilyosdev
ilyosdev / compareTriplets.php
Created February 23, 2019 12:53
Compare the Triplets
<?php
$_fp = fopen ("php://stdin","r");
$a = explode(' ', trim(fgets($_fp)));
$b = explode(' ', trim(fgets($_fp)));
array_walk($a, function(&$value){$value = intval($value);});
array_walk($b, function(&$value){$value = intval($value);});
$pointsA = 0;
$pointsB = 0;
for ($i = 0; $i < count($a); $i++) {
if ($a[$i] > $b[$i]) $pointsA++;
<?php
$_fp = fopen("php://stdin", "r");
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
while($f = fgets($_fp)){
$lines[] = $f;
}
$bugNum = intval($lines[0]);
$bugs = array_merge(explode(' ',$lines[1]));
// print_r($bugs);
$mylvl = 1;
@ilyosdev
ilyosdev / top-lel.php
Last active February 17, 2019 14:05
Solution for HackerRanks problem
<?php
$_fp = fopen("php://stdin", "r");
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
$text = $words = array();
//collecting words as an array
while($in = fread($_fp,1024)){
$text = array_merge($text, explode(' ', $in));
}
$keywords = [
'lol' => 1,