Skip to content

Instantly share code, notes, and snippets.

View skymansandy's full-sized avatar
🤓

P Sandesh Baliga skymansandy

🤓
View GitHub Profile
100% — FF
99% — FC
98% — FA
97% — F7
96% — F5
95% — F2
94% — F0
93% — ED
92% — EB
91% — E8
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
fun main() {
println(sum(3,4))
println(sumVarArg(1..10))
println("nicebrokgyjv".last())
println("2^2 = ${2 pow 2}")
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
fun main() {
//Nullsafe operator
var nickname: String? =null
val uppercase = nickname?.toUpperCase()?:"Bor $nickname?"
println(uppercase)
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorPrimaryDark">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/grey_text" />
</shape>
</item>
<item android:id="@android:id/background">
#include<stdio.h>
struct process
{
int all[6],max[6],need[6],finished;
}p[10];
int avail[6],sseq[10],ss=0,check1=0,check2=0,n,work[6];
int nor;
int safeseq(void);
int main()
{
#include<stdio.h>
#include<omp.h>
int fibonacci(int n)
{
if(n<2)
return n;
else
return fibonacci(n-1)+fibonacci(n-2);
}
#include<stdio.h>
#include<stdlib.h>
struct proc
{
int id;
int arrival;
int burst;
int rem;
int wait;
int finish;
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
int main()
{
int status,ppid,mpid,pid;
pid=fork();
if(pid<0)
{
printf("error in the fork call\n");
#!bin/sh
#program to create a bundle script
if [ $# -eq 0 ]
then
echo "No arguments passed"
exit 1
fi
for i in $*
do
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<unistd.h>
int main()
{
char buff1[ ]="abcdefghijklmnop ";