This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The Classic Producer-Consumer problem rehashed | |
* | |
* “There is a room with many people in it. People can enter and exit the room at any time. | |
* Write a program to find the number of people in the room at any given time.” | |
*/ | |
class Room { | |
private int count; //head count | |
private boolean isFull; | |
private int capacity; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
A fuzzer for IrfanView image viewer. | |
IrfanView: http://www.irfanview.com/ | |
''' | |
import math | |
import random | |
import string | |
import subprocess | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Prints if a machine is Big-Endian or Little-Endian */ | |
#include <stdio.h> | |
#include <stdint.h> | |
int main() | |
{ | |
uint32_t num = 0x12345678; | |
uint8_t *ptr = (uint8_t *) # | |
if (ptr[0] == 0x78) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
public class TransactionItem { | |
private String description; | |
private String tag; | |
private String date; | |
private float amount; | |
private int type; | |
public String getDescription() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/LinearLayout1" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="horizontal" > | |
<TextView | |
android:id="@+id/descText_Report" | |
android:layout_width="110dp" |