Skip to content

Instantly share code, notes, and snippets.

View yubrajpokharel's full-sized avatar
🎯
Focusing on something awesome

Yubraj Pokharel yubrajpokharel

🎯
Focusing on something awesome
View GitHub Profile
if (age < 18) {
System.out.println("You are a minor.");
} else if (age >= 18 && age < 65) {
System.out.println("You are an adult.");
} else {
System.out.println("You are a senior citizen.");
}
if (age >= 18) {
System.out.println("You are an adult.");
}
@yubrajpokharel
yubrajpokharel / Main.java
Last active January 16, 2023 21:04
Basic java Program structure
// Import statements (if any)
import java.util.Scanner;
// Class definition
public class Main {
// Main method
public static void main(String[] args) {
// Variable declaration and initialization
int number = 0;
@yubrajpokharel
yubrajpokharel / Chitru_.idea_Chitru.iml
Created July 23, 2016 16:47
Stop watch with JavaScript
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@yubrajpokharel
yubrajpokharel / circle_detection.py
Created March 11, 2016 09:19 — forked from martinsik/circle_detection.py
Circle detection with OpenCV 3.0
import cv2
import time
import math
import numpy as np
capture = cv2.VideoCapture(0)
print capture.get(cv2.CAP_PROP_FPS)
t = 100
w = 640.0
@yubrajpokharel
yubrajpokharel / Person.java
Last active January 26, 2016 20:09
Lambda Expression demo
package comparator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
* Created by yubraj pokharel on 1/26/2016.
*/
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@yubrajpokharel
yubrajpokharel / designer.html
Last active August 29, 2015 14:16
designer
<paper-shadow id="paper_shadow" z="2" animated>
<div id="div2" horizontal layout>
<div id="thread" layout horizontal flex on-hold="{{ onHold }">
<profile-img id="profileimage" src letter horizontal layout>
<core-icon icon="polymer" id="core_icon1"></core-icon>
</profile-img>
<div id="div3" flex layout horizontal>
<header id="header" layout vertical flex class="unread">
@yubrajpokharel
yubrajpokharel / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;