Skip to content

Instantly share code, notes, and snippets.

View JaDogg's full-sized avatar
🎧
Working on Yaksha Programming Language - yakshalang.github.io/

JaDoggx86 JaDogg

🎧
Working on Yaksha Programming Language - yakshalang.github.io/
View GitHub Profile
@JaDogg
JaDogg / CustomDecorator.java
Last active August 3, 2021 20:06
JavaFX Custom Decorator
package openpimtests;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
@JaDogg
JaDogg / FXMLTime.fxml
Created July 29, 2014 14:50
JavaFX TimeLine
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="111.0" prefWidth="266.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="FXMLTimeController">
<children>
@JaDogg
JaDogg / Euler2.c
Created August 13, 2014 11:05
Euler2
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int sum_even_fibonacci(int limit, int *steps_taken) {
int a = 1, b = 0;
int sum = 0;
int even_fibonacci = 0;
for (int steps = 1; even_fibonacci < limit; steps++) {
assert(a % 2); // Fibonacci just before even Fibonacci
@JaDogg
JaDogg / Question1.md
Last active August 29, 2015 14:05
Questions to see if within scope

Once I called a favor from a friend and I got called for an interview.

I went there expecting an interview for an internship, however as it turned out it was for a bigger position. I realized this just before the interview and I thought it might be impossible.

During the interview I was asked lot of questions, And whenever I receive a question I do not know the answer, I simply said I don't know (This happened a lot). There was also a question where I had to write some code, I did answer it but the interviewer said It was inefficient, I understood the scenario and tried again, But I could not come up with another solution so I gave up. The interview (which was face to face) was about 1hr 30min long. at around 50 min time I was overwhelmed.

I was not hired, but I learned that the interviewer said to my friend that I was arrogant and I did not take the interview seriously.

I have another interview soon, how do I say I don't know (or give up) without sounding arrogant ? Is there some big point I'm f

@JaDogg
JaDogg / q.md
Last active August 29, 2015 14:05
Q & A for internship interview

##Can you tell us about your self ?

Hi, I'm Bhathiya. I love code, and I love code review. I don't know everything, but I am comfortable with Java-stuff. I understand you guys use C++-whatnot, which I am excited to dive in to and learn.

##What are the projects you have done ?

###Research Project

  1. for the third year research project we built a card game. me and another member was the only people to receive A passes from the whole batch (other projects were not bad we were just exceptional).
  2. We were able to achieve it by
  • Good teamwork. (we eventually got the members who were bad in programming to contribute)
@JaDogg
JaDogg / JSONSplit.java
Created October 19, 2014 08:36
JSON Split
package jsonsplit;
import java.util.ArrayList;
import java.util.List;
/**
* JSON Split
* @author Bhathiya
*/
public class JSONSplit {

I'm looking for an offline and portable personal information manager software.

I want my articles (HTML or RTF) to be organized in a tree structure.

Articles should be editable in WYSIWIG mode or Convertable from a markdown(StackeExchange or GitHub flavour preffered).

I need articles to contain source code(formatted if possible),Include Images and tables, links to other articles(Optional Requirement)

License : Open Source and Free OS : Windows 7+ and Linux

@JaDogg
JaDogg / vipy
Created February 18, 2015 05:46
#!/bin/bash
echo '#!'`which env`' python' > $1 && chmod a+x $1 && vi $1
@JaDogg
JaDogg / py3morse.py
Last active October 2, 2017 11:49
Python 3 Dictionary Usage to Calculate Morse Code
#!/usr/bin/env python3
# http://pandabunnytech.com
morse = {"A": ".-", "B": "-...", "C": "-.-.", "D": "-..",
"E": ".", "F": "..-.", "G": "--.", "H": "....",
"I": "..", "J": ".---", "K": "-.-", "L": ".-..",
"M": "--", "N": "-.", "O": "---", "P": ".--.",
"Q": "--.-", "R": ".-.", "S": "...", "T": "-",
"U": "..-", "V": "...-", "W": ".--", "X": "-..-",
@JaDogg
JaDogg / pyhackerrank.py
Last active November 24, 2017 20:50
Python3 HackerRank
# input single integer
n = int(input().strip())
# 2 Integers in 2 lines
n, m = int(input().strip()), int(input().strip())
# 2 Integers in 1 line
n, m = input().strip().split(' ')
n, m = int(n), int(m)
# Array of integers seperated by space
a = list(map(int, input().strip().split(' ')))
# Array of integers seperated by space sorted