label
int64 1
10
| text
stringlengths 210
511
|
---|---|
2 | package net.runelite.cache.fs;
import java.io.IOException;
import org.junit.Test;
public class StoreLoadTest
{
@Test
public void test() throws IOException
{
Store store = new Store(new java.io.File("c:/rs/cache"));
store.load();
}
}
|
1 | namespace AlterNats.Commands;
internal sealed class PongCommand : CommandBase<PongCommand>
{
PongCommand()
{
}
public static PongCommand Create()
{
if (!pool.TryDequeue(out var result))
{
result = new PongCommand();
}
return result;
}
public override void Write(ProtocolWriter writer)
{
writer.WritePong();
}
public override void Reset()
{
}
}
|
10 | using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
namespace SabberStoneKettleServer
{
class Program
{
static void Main(string[] args)
{
KettleServer server = new KettleServer(new System.Net.IPEndPoint(System.Net.IPAddress.Any, 9001));
server.Enter();
}
}
} |
10 |
using ConsoleGames;
using PowerArgs.Cli;
using System;
namespace Playground
{
class Program
{
static void Main(string[] args)
{
//new PlaygroundGame().Start().Wait();
var app = new ConsoleApp();
app.LayoutRoot.Add(new LevelEditor(75, 20)).CenterVertically().CenterHorizontally();
app.Start().Wait();
}
}
}
|
1 | using NeoServer.Game.Effects.Magical;
namespace NeoServer.Game.Effects.Parsers
{
public class AreaTypeParser
{
public static byte[,] Parse(string areaType)
{
return areaType switch
{
"AREA_CIRCLE3x3" => AreaEffect.Circle3x3,
"AREA_SQUARE1x1" => AreaEffect.Square1x1,
};
}
}
}
|
4 | package org.yinwang.pysonar;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
import java.util.List;
public class TestRefs
{
@Test
public void testRefs()
{
List<String> failed = TestInference.testAll("tests", false);
String msg = "";
for (String fail : failed)
{
msg += "[failed] " + fail;
}
assertTrue("Some tests failed :\n" + msg, failed == null);
}
}
|
2 | package org.fluentd.logger;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class MockServer {
private ServerSocket serverSock;
public MockServer(int port) throws IOException {
serverSock = new ServerSocket(port);
}
public void run() throws IOException {
Socket socket = serverSock.accept();
BufferedInputStream in = new BufferedInputStream(socket.getInputStream());
// TODO
}
}
|
2 | package org.fusesource.jansi;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;
public class AnsiConsoleTest {
public static void main(String[] args) throws IOException {
AnsiConsole.systemInstall();
PrintStream out = System.out;
FileInputStream f = new FileInputStream("src/test/resources/jansi.ans");
int c;
while( (c=f.read())>=0 ) {
out.write(c);
}
f.close();
}
}
|
2 | package org.fluentd.logger;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class MockServer {
private ServerSocket serverSock;
public MockServer(int port) throws IOException {
serverSock = new ServerSocket(port);
}
public void run() throws IOException {
Socket socket = serverSock.accept();
BufferedInputStream in = new BufferedInputStream(socket.getInputStream());
// TODO
}
}
|
10 | using System;
using Flurl.Http;
namespace PackageTester
{
public class Program
{
public static void Main(string[] args) {
var client = new FlurlClient().EnableCookies();
//client.Request("https://httpbin.org/cookies/set?z=999").HeadAsync().Wait();
Console.WriteLine("999" == client.Cookies["z"].Value);
Console.ReadLine();
//new Tester().DoTestsAsync().Wait();
//Console.ReadLine();
}
}
} |
4 | package org.mvel.tests;
import org.mvel.Accessor;
import org.mvel.DataConversion;
import org.mvel.ExecutableStatement;
import org.mvel.integration.VariableResolverFactory;
public class AccessorBMModel implements Accessor {
private ExecutableStatement p0;
public Object getValue(Object ctx, Object elCtx, VariableResolverFactory variableFactory) {
return Math.sqrt(DataConversion.convert(p0.getValue(ctx, variableFactory), Double.class).doubleValue());
}
}
|
10 | using System;
namespace RegisterService
{
class Program
{
static void Main(string[] args)
{
//Console.WriteLine("Hello World!");
var mainService = new MainProcess();
mainService.Run();
}
}
}
|
10 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Moq;
using NUnit.Framework;
using SendGridMail;
namespace Tests
{
[TestFixture]
public class TestHeader
{
[Test]
public void TestAddTo()
{
var foo = new Mock<IHeader>();
foo.Setup(m => m.Enable("foo"));
var bar = new SendGrid(foo.Object);
Assert.AreEqual(1, 2, "I suck");
}
}
}
|
7 | namespace CreationalPatterns.Prototype.DiningRoomIcons.Chairs {
public class CafeChairIcon : IChairIcon {
public bool HasSeatCushions => false;
public IDeepCloneable DeepClone() {
CafeChairIcon cafeChairIcon = null;
return cafeChairIcon.DeepClone();
}
}
}
|
10 | using System;
using Giles.Core.Watchers;
using Ninject;
namespace Giles
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Giles - your own personal watcher");
Console.ReadKey();
var kernel = new StandardKernel();
var sourceWatcher = kernel.Get<SourceWatcher>();
sourceWatcher.Watch(@"D:\Dev\Prototypes\TestableTestStuff", @"*.cs");
}
}
}
|
10 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Moq;
using NUnit.Framework;
using SendGridMail;
namespace Tests
{
[TestFixture]
public class TestHeader
{
[Test]
public void TestAddTo()
{
var foo = new Mock<IHeader>();
foo.Setup(m => m.Enable("foo"));
var bar = new SendGrid(foo.Object);
Assert.AreEqual(1, 2, "I suck");
}
}
}
|
10 | using System;
using System.Drawing;
using System.IO;
using FFMpegSharp.FFMPEG;
namespace FFMpegSharp.Extend
{
public static class BitmapExtensions
{
public static VideoInfo AddAudio(this Bitmap poster, FileInfo audio, FileInfo output)
{
var destination = $"{Environment.TickCount}.png";
poster.Save(destination);
return new FFMpeg().PosterWithAudio(new FileInfo(destination), audio, output);
}
}
} |
4 | using AAEmu.Commons.Network;
using AAEmu.Game.Core.Network.Game;
namespace AAEmu.Game.Core.Packets.C2G
{
public class CSStartDuelPacket : GamePacket
{
public CSStartDuelPacket() : base(0x051, 1)
{
}
public override void Read(PacketStream stream)
{
var id = stream.ReadUInt32();
var errorMessage = stream.ReadInt16();
_log.Warn("StartDuel, Id: {0}, ErrorMessage: {1}", id, errorMessage);
}
}
}
|
10 | using NUnit.Framework;
using RPGCore.Packages;
namespace RPGCore.Demo.BoardGame.UnitTests
{
[TestFixture(TestOf = typeof(GameBoard))]
public class GameBoardShould
{
[Test(Description = "Ensures that buildings are rotated properly."), Parallelizable]
public void RotateBuildings()
{
var explorer = new PackageExplorer();
var board = new GameBoard();
}
}
}
|
10 | using OpenSage.LowLevel.Graphics3D;
namespace OpenSage.LowLevel
{
public static class HostPlatform
{
public static GraphicsDevice GraphicsDevice { get; private set; }
public static void Start()
{
GraphicsDevice = new GraphicsDevice();
}
public static void Stop()
{
GraphicsDevice.Dispose();
GraphicsDevice = null;
}
}
}
|
10 | using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Fbx
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Start");
var stream = new FileStream(args[0], FileMode.Open);
int version;
var node = (new FbxBinaryReader(stream)).Read(out version);
stream.Close();
stream = new FileStream(args[1], FileMode.Create);
(new FbxBinaryWriter(stream)).Write(node);
stream.Close();
}
}
}
|
2 | package org.hongxi.whatsmars.mq.rocketmq.spring.demo;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Consumer {
public static void main(String[] args) {
new ClassPathXmlApplicationContext("spring/rocketmq-consumer.xml");
}
}
|
10 | using Jambo.Domain.SeedWork;
using Jambo.KafkaBus;
using System;
namespace Jambo.ProcessManager
{
class Program
{
static void Main(string[] args)
{
IServiceBus serviceBus = new ServiceBus("10.17.12.46:32774", "blogs");
serviceBus.Listen();
}
}
} |
10 | using TerminalGuiDesigner.UI;
namespace TerminalGuiDesigner;
public partial class Program
{
public static void Main(string[] args)
{
var editor = new Editor();
editor.Run();
}
}
|
10 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace VoxeliqClient2
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
|
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 0