Skip to content

Instantly share code, notes, and snippets.

View jskeet's full-sized avatar
💭
Very happily employed. I do not wish to hear from recruiters.

Jon Skeet jskeet

💭
Very happily employed. I do not wish to hear from recruiters.
View GitHub Profile
class StoreVO {
private Integer activationStatus;
public Integer getActivationStatus() {
return activationStatus;
}
public void setActivationStatus(Integer activationStatus) {
this.activationStatus = activationStatus;
}
public class Test {
public static void main(String[] args) {
String filename = "abc";
for (int i = 0; i < filename.length(); i++) {
System.out.printf("%04x%n", (int) filename.charAt(i));
}
}
}
using System;
using System.Linq;
using NodaTime;
using NodaTime.Extensions;
public class Program
{
public static void Main()
{
var latest = (from zone in DateTimeZoneProviders.Tzdb.GetAllZones()
using System;
using System.Linq;
using NodaTime;
using NodaTime.Extensions;
public class Program
{
public static void Main()
{
var latest = (from zone in DateTimeZoneProviders.Tzdb.GetAllZones()
using System;
using Newtonsoft.Json;
public class Item
{
public string Name { get; set; }
public DateTime Date { get; set; }
}
using System;
using System.Windows.Forms;
class Program
{
static void Main()
{
var picker = new DateTimePicker();
picker.Text = "foo";
}
using System;
class Test
{
static void Main()
{
try
{
Console.WriteLine("In try block");
throw new Exception();
```java
Put your code here
```
class Test
{
// Implementations don't matter.
static int AddOrSubtract(int a, int b, bool add = true) => 0;
static int AddOrSubtract(int a, int b) => 0;
}
class Main {
public static void main(String[] args) {
try {
testMe();
} catch (Exception e) {
System.out.println("Caught " + e.getMessage() + " in main");
}
}
static void testMe() throws Exception {