question stringclasses 1
value | context stringlengths 4.2k 104k | answers listlengths 1 1 | length int32 399 10k | dataset stringclasses 1
value | language stringclasses 3
values | all_classes null | _id stringlengths 48 48 | _row_id int64 0 499 | context_cheatsheet stringlengths 4.19k 104k | prompt_cheatsheet stringclasses 1
value | answer_prefix stringclasses 1
value | task stringclasses 1
value | max_new_tokens int64 84 84 | cheatsheet stringlengths 620 12k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Please complete the code given below.
// Copyright 2014 - 2014 Esk0r
// SpellDatabase.cs is part of Evade.
//
// Evade is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
//... | [
" ExtraMissileNames = new[] { \"lucianrmissile\" },"
] | 5,265 | lcc | csharp | null | 57cd1d16d832804a0b41e45c65ffbdf55dee0d169df79a8e | 200 | Your task is code completion.
// Copyright 2014 - 2014 Esk0r
// SpellDatabase.cs is part of Evade.
//
// Evade is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Based on the provided code, I will create a cheat sheet to help with the code completion task.
**Cheat Sheet:**
* We are in the `SpellDatabase` class, which is a static class containing a list of `SpellData` objects.
* The `Spells` list is populated with various spell data for different champions.
* Each `SpellData` ... | |
Please complete the code given below.
package com.sirma.sep.model.management;
import static com.sirma.sep.model.management.ModelsFakeCreator.createStringMap;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import jav... | [
"\t\tEmfUser user = new EmfUser(\"admin@test.tenant\");"
] | 505 | lcc | java | null | 46847858f2d1579242f46d971b4229d6cb8d79b8a5dea86e | 201 | Your task is code completion.
package com.sirma.sep.model.management;
import static com.sirma.sep.model.management.ModelsFakeCreator.createStringMap;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.Co... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@Before
public void stubLabelProvider() {
when(labelProvider.getLabel(anyString())).then(invocation -> invocation.getArgumentAt(0, String.class) + "_translated");
when(labelProvider.get... | |
Please complete the code given below.
import unittest
import os
import mock
import errno
import testlib
class TestTestContext(unittest.TestCase):
def test_generate_inventory_file(self):
context = testlib.TestContext()
context.inventory = dict(key='value')
self.assertEquals("key='value'", co... | [
" context = testlib.TestContext()"
] | 426 | lcc | python | null | 36ab3dcfde1587fd327a15d56d7d38fb65b8104458bbcd00 | 202 | Your task is code completion.
import unittest
import os
import mock
import errno
import testlib
class TestTestContext(unittest.TestCase):
def test_generate_inventory_file(self):
context = testlib.TestContext()
context.inventory = dict(key='value')
self.assertEquals("key='value'", context.gen... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~20 lines omitted for brevity]
@testlib.with_context
def test_popen_raises_error(self, context):
import subprocess
Cheatsheet (for next line):
- We are in a test method, likely testing the behavior of subprocess.Popen.
- The me... | |
Please complete the code given below.
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using... | [
"\t\t\tif (configDirectory == null)"
] | 753 | lcc | csharp | null | dc7f3a684d9468c9631828995c836b9722e18b4999cdd713 | 203 | Your task is code completion.
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.I... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public sealed class CoreStartup
{
// ...
public void StartCoreServices()
{
// ...
Cheatsheet (for next line):
- We are in StartCoreServices(), which is supposed to initialize the P... | |
Please complete the code given below.
//
// System.Data.Constraint.cs
//
// Author:
// Franklin Wise <gracenote@earthlink.net>
// Daniel Morgan
// Tim Coleman (tim@timcoleman.com)
//
//
// (C) Ximian, Inc. 2002
// Copyright (C) Tim Coleman, 2002
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
/... | [
"\t\tinternal abstract bool IsColumnContained (DataColumn column);"
] | 743 | lcc | csharp | null | 1fbe52a6ae333eb46f1ea6000375cec54d0c1377ea171db3 | 204 | Your task is code completion.
//
// System.Data.Constraint.cs
//
// Author:
// Franklin Wise <gracenote@earthlink.net>
// Daniel Morgan
// Tim Coleman (tim@timcoleman.com)
//
//
// (C) Ximian, Inc. 2002
// Copyright (C) Tim Coleman, 2002
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permiss... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code snippet:
Context:
[Previous code... ~10,000 lines omitted for brevity]
using System;
using System.Collections;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Data.Common;
namespace System.Data {
[Serializable]
i... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pyslvs_ui/io/preference.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you kno... | [
" self.button_box = QtWidgets.QDialogButtonBox(Dialog)"
] | 519 | lcc | python | null | ffafcf6803367046bcd6535efabfd55b6913ed04cf9c0e14 | 205 | Your task is code completion.
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pyslvs_ui/io/preference.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what yo... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for code completion task:
**Context:** The given code is a UI implementation generated from a PyQt5 UI file. The code defines a class `Ui_Dialog` with a setup method `setupUi` that creates a dialog window with various settings and options.
**Relevant lines and variables:**
1. `self.verticalLayout_2 = QtW... | |
Please complete the code given below.
/*
* FlightIntel for Pilots
*
* Copyright 2012 Nadeem Hasan <nhasan@nadmm.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of... | [
" TextView tv =(TextView) findViewById( R.id.status_msg );"
] | 986 | lcc | java | null | cff5cce659d8bde6af869ff91a57f4b6445b88159e169708 | 206 | Your task is code completion.
/*
* FlightIntel for Pilots
*
* Copyright 2012 Nadeem Hasan <nhasan@nadmm.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the Lice... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private final class TafTask extends CursorAsyncTask {
@Override
protected Cursor[] doInBackground( String... params ) {
String stationId = params[ 0 ];
Cursor[] cursors = new Cursor... | |
Please complete the code given below.
using System.Collections;
using System.Collections.Generic;
using NHibernate.Criterion;
using NHibernate.Multi;
using NHibernate.Stat;
using NUnit.Framework;
namespace NHibernate.Test.Stats
{
[TestFixture]
public class StatsFixture : TestCase
{
protected override string Mappi... | [
"\t\t\t\tvar r = s.CreateCriteria<Country>().List();"
] | 596 | lcc | csharp | null | ae9e378a2b48e8a532bf970e581bc7ccc318cd5047ec916c | 207 | Your task is code completion.
using System.Collections;
using System.Collections.Generic;
using NHibernate.Criterion;
using NHibernate.Multi;
using NHibernate.Stat;
using NUnit.Framework;
namespace NHibernate.Test.Stats
{
[TestFixture]
public class StatsFixture : TestCase
{
protected override string MappingsAssemb... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
**Context:**
```csharp
[Test]
public void IncrementQueryExecutionCount_WhenExplicitQueryIsExecuted()
{
using (ISession s = OpenSession())
using (ITransaction tx = s.BeginTransaction())
{
FillDb(s);
tx.Commit();
}
IStatistics stats = Sfi.Statistics;... | |
Please complete the code given below.
using System;
namespace WebArbor.LiveUpdate.Engine
{
/// <summary>
/// Tool to calculate and add CRC codes to a string
///
/// ***************************************************************************
/// Copyright (c) 2003 Thoraxcentrum, Erasmus MC, The Net... | [
" for (int iBitIndex = 0; iBitIndex < 8; iBitIndex++)"
] | 1,212 | lcc | csharp | null | cb8b4b2b743ae5c5feb0a78bada007e175140164e40f5a42 | 208 | Your task is code completion.
using System;
namespace WebArbor.LiveUpdate.Engine
{
/// <summary>
/// Tool to calculate and add CRC codes to a string
///
/// ***************************************************************************
/// Copyright (c) 2003 Thoraxcentrum, Erasmus MC, The Netherlands.... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for CRCTool class:
**Variables and Fields:**
- `order`: integer field representing the CRC polynom order (1-32)
- `polynom`: ulong field representing the CRC polynom without leading '1' bit
- `direct`: integer field specifying the kind of algorithm (0 or 1)
- `crcinit`: ulong field representing the initia... | |
Please complete the code given below.
package net.geforcemods.securitycraft.entity;
import java.util.List;
import java.util.Random;
import net.geforcemods.securitycraft.SCContent;
import net.geforcemods.securitycraft.SecurityCraft;
import net.geforcemods.securitycraft.api.Owner;
import net.geforcemods.securitycraft.bl... | [
"\t\treturn hasSpeedModule() ? 5 : 10;"
] | 1,639 | lcc | java | null | 97d6976069558160fcb06c6802085ee52a6ef637d5832a1a | 209 | Your task is code completion.
package net.geforcemods.securitycraft.entity;
import java.util.List;
import java.util.Random;
import net.geforcemods.securitycraft.SCContent;
import net.geforcemods.securitycraft.SecurityCraft;
import net.geforcemods.securitycraft.api.Owner;
import net.geforcemods.securitycraft.blockentiti... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Sentry extends PathfinderMob implements RangedAttackMob {
// ... (many lines of code)
public int getShootingSpeed() {
// ... (some code)
return 0; // placehol... | |
Please complete the code given below.
/********************************************************************************
* Copyright (c) 2011-2017 Red Hat Inc. and/or its affiliates and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 1.0 whic... | [
" return new IHyperlinkDetector[0];"
] | 548 | lcc | java | null | bf36c52efb42e2c0506f3cb765385becf6bf8e07977c4ec2 | 210 | Your task is code completion.
/********************************************************************************
* Copyright (c) 2011-2017 Red Hat Inc. and/or its affiliates and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 1.0 which is avai... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class CeylonSourceViewerConfiguration
extends TextSourceViewerConfiguration {
protected final CeylonEditor editor;
public CeylonSourceViewerConfiguration(CeylonEditor ... | |
Please complete the code given below.
import Object3DQt as qt
import PyQt4.Qwt5 as Qwt5
from VerticalSpacer import VerticalSpacer
DEBUG = 0
DRAW_MODES = ['NONE',
'POINT',
'WIRE',
'SURFACE']
class Object3DDrawingModeWidget(qt.QGroupBox):
def __init__(self, parent = None):... | [
" self.aspectWidget = Object3DAspect(self)"
] | 1,044 | lcc | python | null | f2938d3f351d2aebd34b5c529253c96aa77b793e3442e486 | 211 | Your task is code completion.
import Object3DQt as qt
import PyQt4.Qwt5 as Qwt5
from VerticalSpacer import VerticalSpacer
DEBUG = 0
DRAW_MODES = ['NONE',
'POINT',
'WIRE',
'SURFACE']
class Object3DDrawingModeWidget(qt.QGroupBox):
def __init__(self, parent = None):
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Object3DDrawingModeWidget**
- We are in the `__init__` method, which initializes the widget.
- The `parent` parameter is an optional parameter that defaults to `None`.
- The `build` method is called to create the layout.
- The `setDrawingMode` method is called with an initial value o... | |
Please complete the code given below.
using System;
using System.Reflection;
using System.Collections;
using Server;
using Server.Targeting;
using Server.Network;
using Server.Misc;
namespace Server.Gumps
{
public class SetPoint2DGump : Gump
{
private PropertyInfo m_Property;
private Mobile m_Mobile;
private o... | [
"\t\t\t\tcase 3: // Use values"
] | 886 | lcc | csharp | null | 782603f333c5ed114de335a7728c0c7c288c0ea45f48a9ee | 212 | Your task is code completion.
using System;
using System.Reflection;
using System.Collections;
using Server;
using Server.Targeting;
using Server.Network;
using Server.Misc;
namespace Server.Gumps
{
public class SetPoint2DGump : Gump
{
private PropertyInfo m_Property;
private Mobile m_Mobile;
private object m_O... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class SetPoint2DGump : Gump
{
// ... (many lines omitted for brevity)
public override void OnResponse( NetState sender, RelayInfo info )
{
Point2D toSet;
bool shouldSet, shou... | |
Please complete the code given below.
/*
* Copyright 2013 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.jboss.forge.addon.ui.util;
import java.util.ArrayList;
import java.util.Iterator;
import... | [
" String valueLabel = selectConverter.convert(value);"
] | 764 | lcc | java | null | cffa07171638f2df3007fc0e85a42300f465b867bac1df90 | 213 | Your task is code completion.
/*
* Copyright 2013 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.jboss.forge.addon.ui.util;
import java.util.ArrayList;
import java.util.Iterator;
import java.uti... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class InputComponents {
// ... existing code ...
private static void setManyInputValue(final ConverterFactory converterFactory,
final InputComponent<?, ?> input, Obje... | |
Please complete the code given below.
/* Mesquite source code. Copyright 1997-2009 W. Maddison and D. Maddison.
Version 2.71, September 2009.
Disclaimer: The Mesquite source code is lengthy and we are few. There are no doubt inefficiencies and goofs in this code.
The commenting leaves much to be desired. Please a... | [
"\t\t\t\tif (i!=j) {"
] | 1,027 | lcc | java | null | c72913a89874d6308bd8a87c745a41178548b9df3cd7e0c0 | 214 | Your task is code completion.
/* Mesquite source code. Copyright 1997-2009 W. Maddison and D. Maddison.
Version 2.71, September 2009.
Disclaimer: The Mesquite source code is lengthy and we are few. There are no doubt inefficiencies and goofs in this code.
The commenting leaves much to be desired. Please approach t... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class CategStateChanges {
// ... (many lines omitted for brevity)
public String toVerboseString(){
StringBuffer sb = new StringBuffer();
sb.append("Minimum, maximum, and average number of each k... | |
Please complete the code given below.
/**
* Copyright (C) Squizz PTY LTD
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* Th... | [
" foreach (KeyValuePair<int, int> unpricedLine in unpricedLines) {"
] | 1,177 | lcc | csharp | null | 7850286a4534f85c6c1e090310eb4027cb5b38c4f626ff33 | 215 | Your task is code completion.
/**
* Copyright (C) Squizz PTY LTD
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* This progra... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class APIv1ExampleRunnerProcurePurchaseOrderFromSupplier
{
public static void runAPIv1ExampleRunnerProcurePurchaseOrderFromSupplier()
{
// ...
//check that a Ec... | |
Please complete the code given below.
//
// ClientOperation.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2005 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (th... | [
"\t\t\tget { throw new NotImplementedException (); }"
] | 629 | lcc | csharp | null | a93d814dbddd20576003b7d27ccabef85f5258c0f1c189bf | 216 | Your task is code completion.
//
// ClientOperation.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2005 Novell, Inc. http://www.novell.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Sof... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for ClientOperation.cs:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public sealed class ClientOperation
{
// ...
public ClientOperation (ClientRuntime parent,
string name, string action)
{
this.parent = parent;
this.name = name;
this.action = a... | |
Please complete the code given below.
package org.exist.security;
import org.exist.storage.io.VariableByteInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.exist.storage.io.VariableByteOutputStream;
import org.exist.Database;
import org.exist.security.ACLPermission.ACE_TARGET;
im... | [
" final Subject mockUser = EasyMock.createMock(Subject.class);"
] | 1,006 | lcc | java | null | b8d674585c2854a71ff59d091611a1181f7327620a70524e | 217 | Your task is code completion.
package org.exist.security;
import org.exist.storage.io.VariableByteInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.exist.storage.io.VariableByteOutputStream;
import org.exist.Database;
import org.exist.security.ACLPermission.ACE_TARGET;
import org.... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class SimpleACLPermission {
// ...
public void addACE(ACE_ACCESS_TYPE accessType, ACE_TARGET target, String name, String mode) {
// ...
}
public void addACE(ACE... | |
Please complete the code given below.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
usi... | [
"\t\t\tVector2 max = viewport.ToVector2 ();"
] | 882 | lcc | csharp | null | 145cc36abdaa2c8860959982f54fca44c7cae309bc44bcf9 | 218 | Your task is code completion.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Micros... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for VectorHelper class:
**Context:**
```csharp
public static class VectorHelper
{
// ... (many methods)
public static Vector2 RelativeTo (this Vector2 v, Viewport viewport)
{
// [Insert code here]
}
}
```
**Cheat sheet:**
- We are in the RelativeTo method, which takes a Vector2 an... | |
Please complete the code given below.
import xdrlib
class XDREnum(object):
__slots__ = ['name', 'value']
def __init__(self, name, value):
self.name = name
self.value = value
def __int__(self):
return self.value
def __str__(self):
return self.name
def __repr__(self):
... | [
"__all__ = ['endpoint_key', 'endpoint_value', 'endpoint_stats']"
] | 399 | lcc | python | null | c69d4ae0425c1d742d8cad38e1238ffbf39d8f97b105df79 | 219 | Your task is code completion.
import xdrlib
class XDREnum(object):
__slots__ = ['name', 'value']
def __init__(self, name, value):
self.name = name
self.value = value
def __int__(self):
return self.value
def __str__(self):
return self.name
def __repr__(self):
r... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
The code is implementing XDR (External Data Representation) serialization and deserialization using the `xdrlib` library. It defines several classes for different data types, including `XDREnum`, `XDRStruct`, `XDRUnion`, `XDRUnionMember`, `XDRTypedef`, `endpoint_key`, `endp... | |
Please complete the code given below.
/*
SLAM server
Copyright (C) 2009 Bob Mottram
fuzzgun@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the L... | [
"\t\t\t\t RemoveClient(i, m_workerSocketList, disconnect_client);"
] | 2,031 | lcc | csharp | null | cf8e0d5f2adf8762eb153e24cdc6edacca8bb1e84f6b7c14 | 220 | Your task is code completion.
/*
SLAM server
Copyright (C) 2009 Bob Mottram
fuzzgun@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, o... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class dpslamServer
{
// ...
public void Send(string msg)
{
// ...
for (int i = m_workerSocketList.Count - 1; i >= 0; i--)
{
... | |
Please complete the code given below.
package eu.applabs.crowdsensingfitnesslibrary.portal.google;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.common.ConnectionResult;
import com.google... | [
" for(Bucket bucket : list) {"
] | 768 | lcc | java | null | a0064864baa8bd09ff6fc63712208d825b29b2d8f56ab567 | 221 | Your task is code completion.
package eu.applabs.crowdsensingfitnesslibrary.portal.google;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public void onSuccess(int requestId, List<Bucket> list) {
if(mRequestMap != null && mRequestMap.containsKey(requestId)) {
Portal.RequestType type = mRequestMap.get(requestId);
// ... (r... | |
Please complete the code given below.
#!/usr/bin/python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This p... | [
" if bind_count > 0 or exec_count > 0:"
] | 1,549 | lcc | python | null | b8ddcb433aa1bfe07017e01e1c838c3c2d78b8b973eabc54 | 222 | Your task is code completion.
#!/usr/bin/python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def GenerateHelperFunction(bind_count,
exec_count,
function_name,
parent_class,
is_method=True):
...
# ... | |
Please complete the code given below.
from django.db.models.loading import get_model
from metadata.utils.date_range import in_range
from django.shortcuts import render
from django.utils import simplejson
from django.http import Http404, HttpResponse
from django.conf import settings
from schedule.utils import range as ... | [
" Returns a range query in JSON (full-calendar) format."
] | 722 | lcc | python | null | 7f21bbeb3cc4c97701a78291f4d98bf6819b5e05cca6641e | 223 | Your task is code completion.
from django.db.models.loading import get_model
from metadata.utils.date_range import in_range
from django.shortcuts import render
from django.utils import simplejson
from django.http import Http404, HttpResponse
from django.conf import settings
from schedule.utils import range as s_range
i... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def range_json(filename, items):
"""
Returns a range query result in JSON format.
The order of items in the JSON object are:
1) id
2) title
3) start time as UNIX timestamp
4) end time as UNIX ti... | |
Please complete the code given below.
/**
Copyright (C) SYSTAP, LLC 2006-2015. All rights reserved.
Contact:
SYSTAP, LLC
2501 Calvert ST NW #106
Washington, DC 20008
licenses@systap.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Publi... | [
" new VarNode(\"score\"), null/* c */,"
] | 644 | lcc | java | null | 6a5c6418a11e7d5ca010f8f986194ae5efec73ff41f7c167 | 224 | Your task is code completion.
/**
Copyright (C) SYSTAP, LLC 2006-2015. All rights reserved.
Contact:
SYSTAP, LLC
2501 Calvert ST NW #106
Washington, DC 20008
licenses@systap.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for the brevity]
public class TestASTSearchOptimizer extends AbstractASTEvaluationTestCase {
/**
* Given
*
* <pre>
* PREFIX bd: <http://www.bigdata.com/rdf/search#>
* SELECT ?subj ?score
*... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_litera... | [
" self.object = self.get_object()"
] | 558 | lcc | python | null | 2f9e87b359085e3741fab9367978273edee2f0b2e60fcfe8 | 225 | Your task is code completion.
# -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
import... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def post(self, request, *args, **kwargs):
# [Relevant lines: method header, previous methods]
Cheatsheet (for next line):
- We are in the post method of the UserDetailView class.
- The post method is used to hand... | |
Please complete the code given below.
//-----------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All Rights Reserved.
// This code is licensed under the Microsoft Public License.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EX... | [
" get { return this.ResolvedAssembly.PublicKeyToken; }"
] | 1,633 | lcc | csharp | null | d5131ee794bcf700f0f43d91cbdd4928e4078dee775d3bd7 | 226 | Your task is code completion.
//-----------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All Rights Reserved.
// This code is licensed under the Microsoft Public License.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ResolvedAssemblyReference : ResolvedModuleReference, IAssemblyReference {
/// <summary>
/// Allocates a reference to a .NET assembly.
/// </summary>
/// <param ... | |
Please complete the code given below.
// <copyright file="TFQMR.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is he... | [
" var pseudoResiduals = new DenseVector(input);"
] | 1,146 | lcc | csharp | null | 85a1c12ae7813d7b73cbbf458fd9262e032bd9cc88005aa1 | 227 | Your task is code completion.
// <copyright file="TFQMR.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project
// http://numerics.mathdotnet.com
// http://github.com/mathnet/mathnet-numerics
// http://mathnetnumerics.codeplex.com
//
// Copyright (c) 2009-2010 Math.NET
//
// Permission is hereby gran... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for TFQMR class:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public sealed class TFQMR : IIterativeSolver
{
// ...
public void Solve(Matrix matrix, Vector input, Vector result)
{
// ...
var d = new DenseVector(input.Count);
... | |
Please complete the code given below.
package net.arccotangent.amathng.math;
import net.arccotangent.amathng.Main;
import net.arccotangent.amathng.utils.MathUtils;
import net.arccotangent.amathng.utils.NumberHelper;
import org.apfloat.*;
import java.util.ArrayList;
public class Statistics {
/**
* Gaussian error f... | [
"\t\t\treturn new Apfloat[] {sortedNumbers[left]};"
] | 685 | lcc | java | null | 463db0e034d463507a505f61f5addf4f1153492f465bc47f | 228 | Your task is code completion.
package net.arccotangent.amathng.math;
import net.arccotangent.amathng.Main;
import net.arccotangent.amathng.utils.MathUtils;
import net.arccotangent.amathng.utils.NumberHelper;
import org.apfloat.*;
import java.util.ArrayList;
public class Statistics {
/**
* Gaussian error function
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Statistics {
// ... (previous methods and variables)
public static Apfloat[] getMedians(Apfloat[] sortedNumbers) {
int left = 0;
int right = sortedNumbers.len... | |
Please complete the code given below.
"""
A collection of utilities to edit and construct tree sequences.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import json
import random
import numpy as np
import tskit.provenance as provenance
import tskit
def... | [
" sample_count[v] -= sample_count[edge.child]"
] | 2,596 | lcc | python | null | 25409067cd0b9bd6ffc59d2ab30579edc2ec8b0a47154def | 229 | Your task is code completion.
"""
A collection of utilities to edit and construct tree sequences.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import json
import random
import numpy as np
import tskit.provenance as provenance
import tskit
def add_prov... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def genealogical_nearest_neighbours(ts, focal, reference_sets):
reference_set_map = np.zeros(ts.num_nodes, dtype=int) - 1
for k, reference_set in enumerate(reference_sets):
for u in r... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2019 Bitergia
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at yo... | [
" es_mapping = ESMapping.from_json(index_name=self.enrich_index,"
] | 630 | lcc | python | null | 40994fe53243d5f8fce4983fc820f09dbd61a083c8a53c8f | 230 | Your task is code completion.
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2019 Bitergia
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def _test_csv_mappings(self, sortinghat):
"""Test whether the mappings in the CSV are successfully met"""
result = {}
if not sortinghat:
return result
csv_mapping = load_mapping... | |
Please complete the code given below.
#region Copyright & License Information
/*
* Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Found... | [
"\t\t\t\t\t\t\t\t\t\tvar bot = botNames.Random(Game.CosmeticRandom);"
] | 690 | lcc | csharp | null | 944fd1f9c7ec90cdc70498975f2faf06111d7dfe2ae05e81 | 231 | Your task is code completion.
#region Copyright & License Information
/*
* Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, ei... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class LobbyLogic : ChromeLogic
{
// ...
var botController = orderManager.LobbyInfo.Clients.FirstOrDefault(c => c.IsAdmin);
if (orderManager.LobbyInfo.Slots.Values.Any(s =... | |
Please complete the code given below.
// This code is derived from jcifs smb client library <jcifs at samba dot org>
// Ported by J. Arturo <webmaster at komodosoft dot net>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as... | [
"\t\t\t\treturn base.ToString() + \"\\n\" + _rootCause;"
] | 697 | lcc | csharp | null | 363a7940d934ec4a64df64a51b70cb62268340fa89d647f7 | 232 | Your task is code completion.
// This code is derived from jcifs smb client library <jcifs at samba dot org>
// Ported by J. Arturo <webmaster at komodosoft dot net>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as publishe... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class SmbException : IOException
{
// ...
public SmbException(int errcode, bool winerr) : base(winerr ? GetMessageByWinerrCode(errcode) : GetMessageByCode(errcode))
{
_status... | |
Please complete the code given below.
"""
"""
from enum import IntEnum, Enum
from .exceptions import ProtocolError, FrameSizeError, FlowControlError
import struct
MAX_FRAME_SIZE = (2 ** 14) - 1
MAX_WINDOW_UPDATE = (2 ** 31) - 1
DEFAULT_PRIORITY = (2 ** 30)
class ConnectionSetting(Enum):
HEADER_TABLE_SIZE = 0x01
... | [
" pad_low_and_high = struct.pack('!BB', pad_high, pad_low)"
] | 652 | lcc | python | null | 0a774cef85a83037bcd6fbf761f83707f105e2ee3118ef09 | 233 | Your task is code completion.
"""
"""
from enum import IntEnum, Enum
from .exceptions import ProtocolError, FrameSizeError, FlowControlError
import struct
MAX_FRAME_SIZE = (2 ** 14) - 1
MAX_WINDOW_UPDATE = (2 ** 31) - 1
DEFAULT_PRIORITY = (2 ** 30)
class ConnectionSetting(Enum):
HEADER_TABLE_SIZE = 0x01
ENABLE_... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
class DataFrame(Frame):
...
def deserialize(self, frame_payload):
...
self.pad_high = frame_payload[0] if FrameFlag.PAD_HIGH in self.flags else 0
self.pad_low = f... | |
Please complete the code given below.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Msagl.Core.DataStructures;
using Microsoft.Msagl.Core.Geometry;
using Microsoft.Msagl.Core.Geometry.Curves;
using Microsoft.Msagl.Layout.LargeGraphLayout;
#if TEST_MSAGL
us... | [
" foreach (var child in cluster.Clusters.Concat(cluster.Nodes)) {"
] | 936 | lcc | csharp | null | adeed84f45c576f4e84e46a705dd8d968d64d0646a6ef56a | 234 | Your task is code completion.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Msagl.Core.DataStructures;
using Microsoft.Msagl.Core.Geometry;
using Microsoft.Msagl.Core.Geometry.Curves;
using Microsoft.Msagl.Layout.LargeGraphLayout;
#if TEST_MSAGL
using Micro... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class GeometryGraph : GeometryObject {
// ... (many lines omitted for brevity)
public void CheckClusterConsistency(Cluster cluster) {
if (cluster.BoundaryCurve == null)
... | |
Please complete the code given below.
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use... | [
"\tm_maxSlopeCosine = btCos(slopeRadians);"
] | 2,149 | lcc | csharp | null | f498e75d306788f63949bcfcf05c9e4bb4e190034ff80488 | 235 | Your task is code completion.
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for btKinematicCharacterController class:
**Relevant lines and variables:**
1. `btKinematicCharacterController::setWalkDirection(ref btVector3 walkDirection)`
2. `m_walkDirection`
3. `m_normalizedDirection`
4. `btKinematicCharacterController::setVelocityForTimeInterval(ref btVector3 velocity, double timeI... | |
Please complete the code given below.
package org.checkerframework.common.aliasing;
/*>>>
import org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey;
*/
import org.checkerframework.common.aliasing.qual.LeakedToResult;
import org.checkerframework.common.aliasing.qual.NonLeaked;
import org.checkerframework... | [
" if (initializers != null && !initializers.isEmpty()) {"
] | 1,063 | lcc | java | null | 57e19c332b765589c06c6317e00c2f7c5f50bc38d1fac11c | 236 | Your task is code completion.
package org.checkerframework.common.aliasing;
/*>>>
import org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey;
*/
import org.checkerframework.common.aliasing.qual.LeakedToResult;
import org.checkerframework.common.aliasing.qual.NonLeaked;
import org.checkerframework.common.a... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public class AliasingVisitor extends
BaseTypeVisitor<AliasingAnnotatedTypeFactory> {
// ...
@Override
public Void visitMethodInvocation(MethodInvocationTree node, Void p) {
// ...
... | |
Please complete the code given below.
package flaxbeard.cyberware.common.item;
import java.util.List;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.e... | [
"\t\t\tif (nbttagcompound == null)"
] | 484 | lcc | java | null | 3acf18da43544d1e056b344459d85b5599253c6ef78403fb | 237 | Your task is code completion.
package flaxbeard.cyberware.common.item;
import java.util.List;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Ent... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ItemArmorCyberware extends ItemArmor implements IDeconstructable
{
// ...
public void setColor(ItemStack stack, int color)
{
if (this.getArmorMaterial() != CyberwareContent.trenchMat)
... | |
Please complete the code given below.
/*
* JSTools.Parser.DocGenerator.dll / JSTools.net - A framework for JavaScript/ASP.NET applications.
* Copyright (C) 2005 Silvan Gehrig
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License ... | [
"\t\t\t\tif (typeAttribute != null)"
] | 715 | lcc | csharp | null | 65e83568eadd384a035b2d009ca4b6e8962b6a6b11a58326 | 238 | Your task is code completion.
/*
* JSTools.Parser.DocGenerator.dll / JSTools.net - A framework for JavaScript/ASP.NET applications.
* Copyright (C) 2005 Silvan Gehrig
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publis... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
internal class FunctionItem : ACommentItem
{
// ...
private XmlNode _returnNode = null;
// ...
public override void InitType()
{
if (!IsInitialized)
... | |
Please complete the code given below.
//
// TrackBarTest.cs: Test cases for TrackBar.
//
// Author:
// Ritvik Mayank (mritvik@novell.com)
//
// (C) 2005 Novell, Inc. (http://www.novell.com)
//
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Reflection;
using NUnit.Framework;
namespace Mo... | [
"\t\t\tAssert.AreEqual(handle, handle, \"Removes warning\");"
] | 643 | lcc | csharp | null | 5eb2fab7c77b669d9d20bb243cdb60fddafbb0a6170b9d88 | 239 | Your task is code completion.
//
// TrackBarTest.cs: Test cases for TrackBar.
//
// Author:
// Ritvik Mayank (mritvik@novell.com)
//
// (C) 2005 Novell, Inc. (http://www.novell.com)
//
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Reflection;
using NUnit.Framework;
namespace MonoTests.S... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for TrackBarBaseTest.cs:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class TrackBarBaseTest : TestHelper
{
[Test]
public void SizeTestSettingOrientation ()
{
// ... (multiple using statements and variable declarations)
using (... | |
Please complete the code given below.
package rocks.inspectit.server.instrumentation.classcache;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.... | [
"\t\t\tInterfaceType interfaceType = new InterfaceType(\"\");"
] | 686 | lcc | java | null | 91bafdb949e83b9df31caa1198f61d205a6b734664bdeee5 | 240 | Your task is code completion.
package rocks.inspectit.server.instrumentation.classcache;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
impor... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ClassCacheInstrumentationTest {
// ... various test methods ...
public static class AddAndGetInstrumentationResult extends ClassCacheInstrumentationTest {
// ... various te... | |
Please complete the code given below.
/*******************************************************************************
* Copyright (c) 2012 Secure Software Engineering Group at EC SPRIDE.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public... | [
"\t\tif (postdominators == null) {"
] | 1,449 | lcc | java | null | 2ea1e8b1be13cbbb6a96058b7c5db07ae3e7e9bfca12207f | 241 | Your task is code completion.
/*******************************************************************************
* Copyright (c) 2012 Secure Software Engineering Group at EC SPRIDE.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null || getClass() != obj.getClass())
return false;
Abstraction other = (Abstraction) obj;
... | |
Please complete the code given below.
package edu.stanford.nlp.parser.lexparser;
import java.util.regex.Matcher;
/** Does iterative deepening search inside the CKY algorithm for faster
* parsing. This is still guaranteed to find the optimal parse. This
* iterative deepening is only implemented in insideScores().
... | [
" int min2 = wideLExtent[end][rightState];"
] | 1,079 | lcc | java | null | 5a8b582269e533bdd34babfe47a607fb7faa5ba65cee7bc8 | 242 | Your task is code completion.
package edu.stanford.nlp.parser.lexparser;
import java.util.regex.Matcher;
/** Does iterative deepening search inside the CKY algorithm for faster
* parsing. This is still guaranteed to find the optimal parse. This
* iterative deepening is only implemented in insideScores().
* Imple... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for IterativeCKYPCFGParser class:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
```java
public class IterativeCKYPCFGParser extends ExhaustivePCFGParser {
// ...
void doInsideScores() {
// ...
}
private boolean doInsideScoresHelper(float threshold) {
// ...
for (int ... | |
Please complete the code given below.
# Copyright (C) 2013-2016 2ndQuadrant Italia Srl
#
# This file is part of Barman.
#
# Barman is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | [
" 'rsync', '-rLKpts', '--delete-excluded', '--inplace',"
] | 2,433 | lcc | python | null | 8e994637773ecb1aa1a46681e23f58b9b6e946d95aa0e329 | 243 | Your task is code completion.
# Copyright (C) 2013-2016 2ndQuadrant Italia Srl
#
# This file is part of Barman.
#
# Barman is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def test_invocation_list_file(self, popen, pipe_processor_loop):
"""
Unit test for dateutil package in list_file
This test cover all list_file's code with correct parameters
... | |
Please complete the code given below.
/*
Copyright (C) 2014-2019 de4dot@gmail.com
This file is part of dnSpy
dnSpy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the Licen... | [
"\t\t\tprocess.IsRunningChanged -= DbgProcess_IsRunningChanged;"
] | 924 | lcc | csharp | null | 55b5cf622c6554fcf71e7f540ab814974112cbd9bdc49443 | 244 | Your task is code completion.
/*
Copyright (C) 2014-2019 de4dot@gmail.com
This file is part of dnSpy
dnSpy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
// DbgManager thread
void DeinitializeProcess_DbgThread(DbgProcess process) {
process.DbgManager.Dispatcher.VerifyAccess();
// [Current line]
// [Previous code... ~10,000 lines omitted for ... | |
Please complete the code given below.
/*
* AsoBrain 3D Toolkit
* Copyright (C) 1999-2016 Peter S. Heijnen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of... | [
"\t\twriter.attribute( null, \"b\", String.valueOf( b ) );"
] | 2,472 | lcc | java | null | 98f9620b662d7e8b7c7e7545d6c341f8a167b3d6925ee74a | 245 | Your task is code completion.
/*
* AsoBrain 3D Toolkit
* Copyright (C) 1999-2016 Peter S. Heijnen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the Lice... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class YafaRayWriter {
// ...
private void writeColor( final String name, final double r, final double g, final double b )
throws XMLException
{
final XMLWriter ... | |
Please complete the code given below.
package com.servinglynk.hmis.warehouse.model.v2016;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.per... | [
"\t\tif (aThat instanceof HibernateProxy) {"
] | 839 | lcc | java | null | 68ec6af65d2a91e6853c589c87fadc19a538ca14d6f249ae | 246 | Your task is code completion.
package com.servinglynk.hmis.warehouse.model.v2016;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public class Contact extends HmisBaseModel implements Cloneable, Serializable, EnrollmentSharingModel {
// ...
@Override
public boolean equals(final Object aThat) {
... | |
Please complete the code given below.
import argparse
import numpy as np
import scipy.linalg
import scipy.spatial as spatial
import scipy.sparse.linalg as spla
import subprocess
try:
import pickle as cpickle
except:
try:
import cpickle
except:
import _pickle as cpickle
from functools import partial
impor... | [
"\t if total_rej == 1:"
] | 801 | lcc | python | null | ca3ae6a5d8c6865655de823a63f15080b5c10cc5843037df | 247 | Your task is code completion.
import argparse
import numpy as np
import scipy.linalg
import scipy.spatial as spatial
import scipy.sparse.linalg as spla
import subprocess
try:
import pickle as cpickle
except:
try:
import cpickle
except:
import _pickle as cpickle
from functools import partial
import sys
imp... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
...
if n % n_save == 0:
print(("SAVING CONFIGURATION : %s" %n))
if (reject_wall+reject_jump) == 0:
body_offset = 0
for i, ID in enumerate(structures_ID):
name = output_name + ... | |
Please complete the code given below.
from __future__ import absolute_import, print_function, division
"""
Tensor optimizations addressing the ops in basic.py.
"""
# TODO: intelligent merge for mul/add
# TODO: 0*x -> 0
from collections import defaultdict
import logging
import itertools
import operator
import sys
impor... | [
" for pos, idx in enumerate(cdata):"
] | 10,029 | lcc | python | null | 0a0acfe5a6238a45947c2e198dabe87dee8487c858569c30 | 248 | Your task is code completion.
from __future__ import absolute_import, print_function, division
"""
Tensor optimizations addressing the ops in basic.py.
"""
# TODO: intelligent merge for mul/add
# TODO: 0*x -> 0
from collections import defaultdict
import logging
import itertools
import operator
import sys
import time
im... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Context:
[Previous code... ~10,000 lines omitted for brevity]
@register_useless
@register_canonicalize
@gof.local_optimizer([Subtensor])
def local_useless_subtensor(node):
# If the optimization is tried over a node that is not a part of graph before
if not hasattr(node, 'fgraph'):
... | |
Please complete the code given below.
from django import forms
from django.forms import ValidationError
from django.contrib.auth.models import Group
from common.forms import ModelFormWithHelper
from common.helpers import SubmitCancelFormHelper
from community.constants import COMMUNITY_ADMIN, COMMUNITY_PRESENCE_CHOICES... | [
" self.member_groups = self.user.get_member_groups(self.groups)"
] | 746 | lcc | python | null | bc922d0a7fcc0c037de90c7f575f1de8f8ac956e5c9e4e82 | 249 | Your task is code completion.
from django import forms
from django.forms import ValidationError
from django.contrib.auth.models import Group
from common.forms import ModelFormWithHelper
from common.helpers import SubmitCancelFormHelper
from community.constants import COMMUNITY_ADMIN, COMMUNITY_PRESENCE_CHOICES
from com... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code...]
class EditCommunityForm(ModelFormWithHelper):
"""Form to edit Community profile"""
class Meta:
model = Community
fields = ('name', 'slug', 'order', 'location', 'email', 'mailing_list',
'parent_community', 'website... | |
Please complete the code given below.
# orm/events.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""ORM event interfaces.
"""
from .. import even... | [
" return fn(*arg, **kw)"
] | 9,203 | lcc | python | null | 9517e442464f24ead2a124310c2f1752d78474b38bd420f2 | 250 | Your task is code completion.
# orm/events.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""ORM event interfaces.
"""
from .. import event, exc, u... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Context:
[Previous code... ~10,000 lines omitted for brevity]
class QueryEvents(event.Events):
"""Represent events within the construction of a :class:`.Query` object.
The events here are intended to be used with an as-yet-unreleased
inspection system for :class:`.Query`. Some very basic operations
ar... | |
Please complete the code given below.
"""Conditional module is the xmodule, which you can use for disabling
some xmodules by conditions.
"""
import json
import logging
from lazy import lazy
from lxml import etree
from pkg_resources import resource_string
from xmodule.x_module import XModule, STUDENT_VIEW
from xmodule.... | [
" show_str = u'<{tag_name} sources=\"{sources}\" />'.format("
] | 801 | lcc | python | null | b7096bf4313f6484e8f39bf9f0977db406f68e5dc24dcd54 | 251 | Your task is code completion.
"""Conditional module is the xmodule, which you can use for disabling
some xmodules by conditions.
"""
import json
import logging
from lazy import lazy
from lxml import etree
from pkg_resources import resource_string
from xmodule.x_module import XModule, STUDENT_VIEW
from xmodule.seq_modul... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def definition_to_xml(self, resource_fs):
xml_object = etree.Element(self._tag_name)
for child in self.get_children():
if child.location not in self.show_tag_list:
sel... | |
Please complete the code given below.
import numpy as np
import larray as la
from larray_editor.utils import Product, _LazyDimLabels, Axis, get_sample
from larray_editor.commands import ArrayValueChange
REGISTERED_ADAPTERS = {}
def register_adapter(type):
"""Class decorator to register new adapter
Parameters
... | [
" for key, (old_value, new_value) in data_model_changes.items()]"
] | 947 | lcc | python | null | 8662bf8b41808cda788f6de30f92e265f34051125e765056 | 252 | Your task is code completion.
import numpy as np
import larray as la
from larray_editor.utils import Product, _LazyDimLabels, Axis, get_sample
from larray_editor.commands import ArrayValueChange
REGISTERED_ADAPTERS = {}
def register_adapter(type):
"""Class decorator to register new adapter
Parameters
------... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def translate_changes(self, data_model_changes):
def to_global(key):
return self._map_filtered_to_global(self.filtered_data, self.data, self.current_filter, key)
global_changes = [ArrayValue... | |
Please complete the code given below.
/*
Copyright (C) 2002-2010 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software... | [
"\t\t\telse if (Class != null && type == null)"
] | 2,841 | lcc | csharp | null | eb53d2d7980f93f767d7f4ca69e7c363d7a2bdffbbb04b9c | 253 | Your task is code completion.
/*
Copyright (C) 2002-2010 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
**Class Hierarchy and Inheritance**
- `Instruction` is the base class for all instructions.
- `Simple` is a subclass of `Instruction` that represents simple instructions.
- `TypeOrTypeWrapperInstruction` is a subclass of `Instruction` that represents instructions that can be either ... | |
Please complete the code given below.
/*
* Copyright (C) 2006-2010 - Frictional Games
*
* This file is part of HPL1 Engine.
*
* HPL1 Engine is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either versio... | [
"\t\t\tthis.objYLabel.Size = new System.Drawing.Size(200, 32);"
] | 722 | lcc | csharp | null | 7176f682200a0adf4ae5cf5e13ef2ec7cb669d6f638cffd3 | 254 | Your task is code completion.
/*
* Copyright (C) 2006-2010 - Frictional Games
*
* This file is part of HPL1 Engine.
*
* HPL1 Engine is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of th... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class frmPropertiesArea : System.Windows.Forms.Form
{
// ...
private System.Windows.Forms.Label objZLabel;
public System.Windows.Forms.TextBox objZText;
// ...
public frmPropertiesAr... | |
Please complete the code given below.
# -*- test-case-name: buildbot.test.test_mailparse -*-
from twisted.trial import unittest
from twisted.python import util
from buildbot.changes import mail
class TestFreshCVS(unittest.TestCase):
def get(self, msg):
msg = util.sibpath(__file__, msg)
s = mail.FCM... | [
" c = self.getNoPrefix(\"mail/syncmail.5\")"
] | 615 | lcc | python | null | 20b813f30f59822e04edffdae1cdbf1b533dbdd72c1cc321 | 255 | Your task is code completion.
# -*- test-case-name: buildbot.test.test_mailparse -*-
from twisted.trial import unittest
from twisted.python import util
from buildbot.changes import mail
class TestFreshCVS(unittest.TestCase):
def get(self, msg):
msg = util.sibpath(__file__, msg)
s = mail.FCMaildirSou... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def testMsgS5(self):
c = self.get("mail/syncmail.5")
# tests a tag
self.assertEqual(c.who, "warner")
self.assertEqual(set(c.files), set(["buildbot/changes/freshcvsmail.py"])... | |
Please complete the code given below.
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free S... | [
" if (termData == null) {"
] | 987 | lcc | java | null | 44bc927038ee4f263ad7e6209084767cae0e9109fe53fa72 | 256 | Your task is code completion.
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software F... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
protected void processCSVRecordRow(final CSVRecord row, final Vocabulary vocabulary)
{
Map<String, String> csvData = row.toMap();
MultiValuedMap<String, String> termData = this.data.get(row.g... | |
Please complete the code given below.
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Cr... | [
"\t\tif(player == null)"
] | 639 | lcc | java | null | b8f2bccffdfaa6714889fe5bc5f0f10b12a66609c8c585d1 | 257 | Your task is code completion.
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class SubTileGenerating extends SubTileEntity {
// ... (many lines omitted for brevity)
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
... | |
Please complete the code given below.
package implementable;
import gnu.trove.map.hash.THashMap;
import gnu.trove.set.hash.THashSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import tools.DebugMode;
import communityDetectionPackage.ILCDMetaAlgorithm;
import TemporalNetworkManipula... | [
" intrinsicCohesion += this.getRepresentativity(component, c);"
] | 569 | lcc | java | null | db86b64c8c534e1f3bab91df60822f5e3fd18cea9415e467 | 258 | Your task is code completion.
package implementable;
import gnu.trove.map.hash.THashMap;
import gnu.trove.set.hash.THashSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import tools.DebugMode;
import communityDetectionPackage.ILCDMetaAlgorithm;
import TemporalNetworkManipulation.Comm... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
**Class and Methods Overview**
- The class is `ImplementationRNHM`, which extends `Implementation`.
- The class has several methods:
- `GROWTH(Node candidate, Community com)`
- `BIRTH(Node n1, Node n2)`
- `CONTRACTION_DIVISION(Community affectedCom, Node testedNode, ILC... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2012, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either versi... | [
" if not (docformat in flags[flagname][version]):"
] | 1,095 | lcc | python | null | e346c1259b04562f788d0e2865564ee2ec42aaada9b4e031 | 259 | Your task is code completion.
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2012, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of t... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def _fix_recid(recid, logger):
...
# 3) Verify the correctness of moreinfo transformations
try:
descriptions = cPickle.loads(run_sql("SELECT data_value FROM bibdocmoreinfo WHERE id_bibd... | |
Please complete the code given below.
/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that... | [
"\t\t\tArrayList comp = this.computerMgmt.getComputerCollection();"
] | 2,301 | lcc | csharp | null | d2d2eb23f584337e252086c2162142cf3c5e40a39100b329 | 260 | Your task is code completion.
/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void removeComputer(string computer)
{
ArrayList processes;
Computer c=computerMgmt.getComputer(computer);
processes = c.getProcesses();
/*foreach(Process p in pr... | |
Please complete the code given below.
/*
* Copyright (C) 2000 - 2011 Silverpeas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your opt... | [
" for (java.util.Date anExceptionDate : exceptionDates) {"
] | 783 | lcc | java | null | 0467947f0aca59814dfee0185e479155997e02d24818a1ab | 261 | Your task is code completion.
/*
* Copyright (C) 2000 - 2011 Silverpeas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
/**
* Generates the dates at which it exist some exceptions in the periodicity of the specified event.
* @param event the detail on the event for which it can exist some exceptions in his recurrence.
... | |
Please complete the code given below.
/* Copyright 2013-2014 Daikon Forge */
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Provides the ability to bind a property on one object to the value of
/// another property on another object. This class uses an e... | [
"\t\tsourceEventBinding.DataSource = new dfComponentMemberInfo()"
] | 1,021 | lcc | csharp | null | 7a6b465ccf619db236b9ebaa5024b7f2602fd097e1f14af8 | 262 | Your task is code completion.
/* Copyright 2013-2014 Daikon Forge */
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Provides the ability to bind a property on one object to the value of
/// another property on another object. This class uses an event-driv... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for dfEventDrivenPropertyBinding class:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
public class dfEventDrivenPropertyBinding : dfPropertyBinding
{
// ...
private void bindTargetEvent()
{
// ...
targetEventBinding = gameObject.AddComponent<dfEventBinding>(... | |
Please complete the code given below.
/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.... | [
" Gson gson = new Gson();"
] | 2,177 | lcc | java | null | 5eaaec0ad17e5ea95bb6b35275422001e3f763eea091799b | 263 | Your task is code completion.
/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@RequestMapping(value = "/spanPorts/add", method = RequestMethod.GET)
@ResponseBody
public StatusJsonBean addSpanPort(@RequestParam("jsonData") String jsonData, HttpServletRequest request,
@RequestPara... | |
Please complete the code given below.
//#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# ... | [
"\t\t\t\tsuper(id, path, width, height);"
] | 5,167 | lcc | java | null | 9315cf46a7b8a5186358aa90329c4cf7aa7e8815f99ea810 | 264 | Your task is code completion.
//#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Based on the provided code, I will create a cheat sheet to help with the code completion task.
Cheat sheet:
- We are in the setContext() method of the GenForm class.
- The method is used to set the context for the form.
- The context is set using the GlobalContextBridge class.
- The GlobalContextBridge class is used ... | |
Please complete the code given below.
/*
* ome.testing
*
* Copyright 2006 University of Dundee. All rights reserved.
* Use is subject to license terms supplied in LICENSE.txt
*/
package ome.testing;
// Java imports
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.M... | [
" double value = (size - 1) * rnd.nextDouble();"
] | 669 | lcc | java | null | 0a5fee26c27c916f5e6a6d4e21655aac2bf96a3c71502cab | 265 | Your task is code completion.
/*
* ome.testing
*
* Copyright 2006 University of Dundee. All rights reserved.
* Use is subject to license terms supplied in LICENSE.txt
*/
package ome.testing;
// Java imports
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
impor... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class OMEData {
// ...
public void put(String propertyKey, Object value) {
toCache(propertyKey, value);
}
public List get(String propertyKey) {
// ...
}
// ..... | |
Please complete the code given below.
import hashlib
from django.db import models
from django.db.models import Q
from opencontext_py.apps.entities.entity.models import Entity
from opencontext_py.apps.ldata.linkannotations.models import LinkAnnotation
from opencontext_py.apps.ldata.linkentities.models import LinkEntit... | [
" la = LinkAnnotation()"
] | 1,128 | lcc | python | null | aa0355191116e9da144d262dfbaa191cd76f4cdbf90c55e2 | 266 | Your task is code completion.
import hashlib
from django.db import models
from django.db.models import Q
from opencontext_py.apps.entities.entity.models import Entity
from opencontext_py.apps.ldata.linkannotations.models import LinkAnnotation
from opencontext_py.apps.ldata.linkentities.models import LinkEntity
from op... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
class LinkAnnoManagement():
...
def replace_predicate_uri_narrow(self,
old_pred_uri,
new_pred_uri,
... | |
Please complete the code given below.
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) Under one or more
contributor license agreements. See the NOTICE file distributed with
this work for Additional information regarding copyright owner... | [
" buffer.Append(\" .shrinktoft= \").Append(ShrinkToFit)"
] | 2,537 | lcc | csharp | null | 36b953ee4b12b6a4faa25120b4dd3ff257e71cd2c3c9e231 | 267 | Your task is code completion.
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) Under one or more
contributor license agreements. See the NOTICE file distributed with
this work for Additional information regarding copyright ownership.
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ExtendedFormatRecord : StandardRecord
{
// ... (many fields and methods)
public override String ToString()
{
StringBuilder buffer = new StringBuilder();
buf... | |
Please complete the code given below.
/*
* CP51932.cs - Japanese EUC-JP code page.
*
* It is based on CP932.cs from Portable.NET
*
* Author:
* Atsushi Enomoto <atsushi@ximian.com>
*
* Below are original (CP932.cs) copyright lines
*
* (C)2004 Novell Inc.
*
* Copyright (c) 2002 Southern Storm Software, Pty ... | [
"\t\t\t\tvalue = ch - 0xFF60 + 0x8EA0;"
] | 1,301 | lcc | csharp | null | 774fe32bf5c3e50a3060d52bef095025decb114d4ab2a37b | 268 | Your task is code completion.
/*
* CP51932.cs - Japanese EUC-JP code page.
*
* It is based on CP932.cs from Portable.NET
*
* Author:
* Atsushi Enomoto <atsushi@ximian.com>
*
* Below are original (CP932.cs) copyright lines
*
* (C)2004 Novell Inc.
*
* Copyright (c) 2002 Southern Storm Software, Pty Ltd
*
*... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for CP51932Encoder class:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class CP51932Encoder : MonoEncoder
{
public CP51932Encoder (MonoEncoding encoding)
: base (encoding)
{
}
// Get the number of bytes needed to encode a character... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2021 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
from amoco.arch.tricore import env
from amoco.arch.core import *
# -------------------------------------------------------
# from TriCore TC1... | [
" if obj.mnemonic in (\"LD_A\", \"LEA\"): dst = env.A[a]"
] | 7,935 | lcc | python | null | 1af3862e060454bfb42e00c39c490c31b97f3330caa0e1f1 | 269 | Your task is code completion.
# -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2021 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
from amoco.arch.tricore import env
from amoco.arch.core import *
# -------------------------------------------------------
# from TriCore TC1.6.2 core... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Context:
[Previous code... ~10,000 lines omitted for brevity]
# -*- coding: utf-8 -*-
# This code is part of Amoco
# Copyright (C) 2021 Axel Tillequin (bdcht3@gmail.com)
# published under GPLv2 license
from amoco.arch.tricore import env
from amoco.arch.core import *
# ---------------------------------------------------... | |
Please complete the code given below.
/*
* JasperReports - Free Java Reporting Library.
* Copyright (C) 2001 - 2011 Jaspersoft Corporation. All rights reserved.
* http://www.jaspersoft.com
*
* Unless you have purchased a commercial license agreement from Jaspersoft,
* the following license terms apply:
*
* Thi... | [
"\t\t\tstream = location.openStream();"
] | 1,068 | lcc | java | null | ff129ecf1bae342708a06c6afdaf4c0c520b36db7f9fe934 | 270 | Your task is code completion.
/*
* JasperReports - Free Java Reporting Library.
* Copyright (C) 2001 - 2011 Jaspersoft Corporation. All rights reserved.
* http://www.jaspersoft.com
*
* Unless you have purchased a commercial license agreement from Jaspersoft,
* the following license terms apply:
*
* This program... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public static JRPropertiesMap loadProperties(IURL location)
{
boolean close = true;
InputStream stream = null;
try
{
// ... (rest of the method implementatio... | |
Please complete the code given below.
package net.minecraft.world;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.world.storage.WorldInfo;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public final class WorldSettings
{
/** The seed f... | [
" return this == CREATIVE;"
] | 497 | lcc | java | null | 812a9c309ebcd63dc97a9d9c993e5afbcef9d934b3a428bf | 271 | Your task is code completion.
package net.minecraft.world;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.world.storage.WorldInfo;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public final class WorldSettings
{
/** The seed for the ma... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat Sheet for WorldSettings class:
- We are in the WorldSettings class, which represents the settings for a Minecraft world.
- The class has several fields, including seed, gameType, mapFeaturesEnabled, hardcoreEnabled, terrainType, commandsAllowed, bonusChestEnabled, and worldName.
- The class has several methods, ... | |
Please complete the code given below.
// CommonSecurityDescriptorTest.cs - NUnit Test Cases for CommonSecurityDescriptor
//
// Authors:
// James Bellinger <jfb@zer7.com>
//
// Copyright (C) 2012 James Bellinger
using System;
using System.Collections.Generic;
using System.Security.AccessControl;
using System.Security.... | [
"\t\t\tSecurityIdentifier userSid = new SecurityIdentifier (\"SY\");"
] | 692 | lcc | csharp | null | a179ca21c89046426dbe560130d12a91ef853ad8e707e8c2 | 272 | Your task is code completion.
// CommonSecurityDescriptorTest.cs - NUnit Test Cases for CommonSecurityDescriptor
//
// Authors:
// James Bellinger <jfb@zer7.com>
//
// Copyright (C) 2012 James Bellinger
using System;
using System.Collections.Generic;
using System.Security.AccessControl;
using System.Security.Principal... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for CommonSecurityDescriptorTest.cs:
Context:
[Previous code... ~10,000 lines omitted for brevity]
[Test]
public void DefaultDaclIsAllowEveryoneFullAccess ()
{
// ...
CommonSecurityDescriptor csd; DiscretionaryAcl dacl; CommonAce ace;
csd = new CommonSecurityDescriptor (false, false, ControlFla... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# Copyright 2011,2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at ... | [
" for i, result in enumerate(results):"
] | 864 | lcc | python | null | fbaaf263e4f759d000390c802a4c3c1ccb343adcb8654c23 | 273 | Your task is code completion.
# -*- coding: utf-8 -*-
# Copyright 2011,2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your opti... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def __process(self, results):
req_data = []
req_data.append(urlencode({
"format": "json",
"client": APP_KEY,
"batch": "1",
}))
for i, result in enumerate... | |
Please complete the code given below.
// ----------------------------------------------------------------------------
// <copyright file="PhotonEditor.cs" company="Exit Games GmbH">
// PhotonNetwork Framework for Unity - Copyright (C) 2011 Exit Games GmbH
// </copyright>
// <summary>
// MenuItems and in-Editor scr... | [
" HashSet<string> currentRpcs = new HashSet<string>();"
] | 2,652 | lcc | csharp | null | 752a89a5b36c7b8f6f0e35bfd40db4c72421fcad3b20b85b | 274 | Your task is code completion.
// ----------------------------------------------------------------------------
// <copyright file="PhotonEditor.cs" company="Exit Games GmbH">
// PhotonNetwork Framework for Unity - Copyright (C) 2011 Exit Games GmbH
// </copyright>
// <summary>
// MenuItems and in-Editor scripts for ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class Text
{
// ... (many string fields)
}
[InitializeOnLoad]
public class PhotonEditor : EditorWindow
{
// ... (many fields and methods)
protected static void ... | |
Please complete the code given below.
/*
* Copyright (c) 2016-2017 Viktor Fedenyov <me@ii-net.tk> <https://ii-net.tk>
*
* This file is part of IDEC Mobile.
*
* IDEC Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free So... | [
" if (!Config.isKDEConnectInstalled) {"
] | 551 | lcc | java | null | 4ba808cbdaf8b17ba189c38980dbfe9f2db8c50e68c78815 | 275 | Your task is code completion.
/*
* Copyright (c) 2016-2017 Viktor Fedenyov <me@ii-net.tk> <https://ii-net.tk>
*
* This file is part of IDEC Mobile.
*
* IDEC Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Fo... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class MessageView_full extends Fragment {
public AbstractTransport transport;
public boolean messageStarred = false, is_corrupt = false;
MenuItem discussionBack;
TextView full_subj, ... | |
Please complete the code given below.
# Copyright (C) 2003 CAMP
# Please see the accompanying LICENSE file for further information.
"""K-point/spin combination-descriptors
This module contains classes for defining combinations of two indices:
* Index k for irreducible kpoints in the 1st Brillouin zone.
* Index s for ... | [
" ik = self.bz2ibz_k[k]"
] | 906 | lcc | python | null | 887af1daa5b7038bf77928f7810b6046e0a6e79e65f0db63 | 276 | Your task is code completion.
# Copyright (C) 2003 CAMP
# Please see the accompanying LICENSE file for further information.
"""K-point/spin combination-descriptors
This module contains classes for defining combinations of two indices:
* Index k for irreducible kpoints in the 1st Brillouin zone.
* Index s for spin up/d... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
class KPointDescriptor:
...
def set_communicator(self, comm):
...
self.rank0 = comm.size - x
self.comm = comm
# My number and offset of k-point/spin combinations
self.... | |
Please complete the code given below.
/*
* Copyright (C) 2022 Inera AB (http://www.inera.se)
*
* This file is part of sklintyg (https://github.com/sklintyg).
*
* sklintyg is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Sof... | [
" CreateUtkastRequest utkastRequest = buildRequest(intygsTyp);"
] | 675 | lcc | java | null | 641e1c881986075c2c1d4de3afcfdf28d45ea43407457b7d | 277 | Your task is code completion.
/*
* Copyright (C) 2022 Inera AB (http://www.inera.se)
*
* This file is part of sklintyg (https://github.com/sklintyg).
*
* sklintyg is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Fou... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@Test
public void testCreateUtkastFornamnTooLong() {
String intygsTyp = "luse";
setupUser(AuthoritiesConstants.PRIVILEGE_SKRIVA_INTYG, intygsTyp, AuthoritiesConstants.FEATURE_HANTERA_IN... | |
Please complete the code given below.
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including wi... | [
"\t\t\t\tforeach (ILNode child in block.GetChildren()) {"
] | 2,070 | lcc | csharp | null | d2cc14959cc14d9e5f5c314ff857cbc70f1ff16fa1441fa2 | 278 | Your task is code completion.
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without lim... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Based on the provided code, I will create a cheat sheet to help with the code completion task.
**Context:**
The code is part of the `ILAstOptimizer` class, specifically in the `Optimize` method. The current line of code is:
```csharp
if (abortBeforeStep == ILAstOptimizationStep.RemoveRedundantCode3) return;
```
**C... | |
Please complete the code given below.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Frontiers;
using Frontiers.World.Gameplay;
using TNet;
using Frontiers.World;
namespace Frontiers.World
{
public class WorldBody : TNBehaviour
{
//used as a base for Charact... | [
"\t if (mConvertingToRagdoll) {"
] | 2,058 | lcc | csharp | null | 73339a8013cf28c56a4c1187df921540e969f355e17c82b2 | 279 | Your task is code completion.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Frontiers;
using Frontiers.World.Gameplay;
using TNet;
using Frontiers.World;
namespace Frontiers.World
{
public class WorldBody : TNBehaviour
{
//used as a base for CharacterBody an... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class WorldBody : TNBehaviour
{
// ...
public void SetRagdoll(bool ragdoll, float delay)
{
// ...
Before solving the code completion task, let's identify the relevant lines... | |
Please complete the code given below.
import sys
import os
from gm_base.json_data import *
import gm_base.geometry_files.layers_io as lfc
class LayerType(IntEnum):
"""Layer type"""
stratum = 0
fracture = 1
shadow = 2
class TopologyType(IntEnum):
given = 0
interpolated = 1
class RegionDim(I... | [
" _not_serialized_attrs_ = ['layer_type', 'top_type']"
] | 878 | lcc | python | null | b1cefd5f19084d4e4a500f51ff0fd6a59f8c2c70e47b868c | 280 | Your task is code completion.
import sys
import os
from gm_base.json_data import *
import gm_base.geometry_files.layers_io as lfc
class LayerType(IntEnum):
"""Layer type"""
stratum = 0
fracture = 1
shadow = 2
class TopologyType(IntEnum):
given = 0
interpolated = 1
class RegionDim(IntEnum):
... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
class FractureLayer(GeoLayer):
...
**Relevant lines and variables:**
- `FractureLayer` is a subclass of `GeoLayer`.
- `GeoLayer` has a method `fix_region_dim` which takes a list of `Region` objects as an argument.
-... | |
Please complete the code given below.
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior writ... | [
" out[outOff + 3] = (byte)(num >>> 24);"
] | 1,083 | lcc | java | null | fe08dcb281de4c3a0e2cca60ae83b079f30ce3924ae5131b | 281 | Your task is code completion.
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permi... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class GOFBBlockCipher
implements BlockCipher
{
// ... (omitted for brevity)
private byte[] IV;
private byte[] ofbV;
private byte[] of... | |
Please complete the code given below.
/**
* Copyright (c) 2002-2012 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as pub... | [
" super( source, new Predicate<PatternMatch>()"
] | 1,124 | lcc | java | null | e65940b61936a514284b1b107717706bb95a8df5df726f13 | 282 | Your task is code completion.
/**
* Copyright (c) 2002-2012 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class PatternMatcher {
private static PatternMatcher matcher = new PatternMatcher();
private PatternMatcher() {
}
// ... (many methods and classes)
private static class FilteredPattern... | |
Please complete the code given below.
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you ca... | [
" elif key == 'TAUX':"
] | 954 | lcc | python | null | acf5e37bfbe33cbb9516c325004620f2cae48ca166d4d0ad | 283 | Your task is code completion.
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistr... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def transform_slice_xml_json_to_json(slice_xml_json):
comments = []
slice_json = collections.OrderedDict()
for key, value in slice_xml_json.iteritems():
if key == 'ASSIETTE':
slice_json['bas... | |
Please complete the code given below.
package org.openswing.swing.mdi.client;
import java.beans.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.event.*;
impo... | [
" InternalFrame f = (InternalFrame)buttons.get(btn);"
] | 769 | lcc | java | null | c15dc271a99f31760a613bea95abc84961ad13d294310c3c | 284 | Your task is code completion.
package org.openswing.swing.mdi.client;
import java.beans.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.event.*;
import org.op... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class WinIconsPanel extends JPanel {
...
public void mouseClicked(MouseEvent e) {
if (SwingUtilities.isRightMouseButton(e)) {
frameToClose = (InternalFrame)butt... | |
Please complete the code given below.
import os
import zmq
import warnings
TIMEOUT = 1000 # milliseconds
VERBOSE = False
RETRY = True # Should we try to get another server if we can't connect?
SERVERFILE = "serverlist.dat" # Base name of the file containing server names
if __name__ == '__main__':
VERBOSE = True... | [
" elif sys.argv[1] == '--list':"
] | 866 | lcc | python | null | 2e4d03a695dc0527178e4eddff2b2c0651ddc6a0588d6cb5 | 285 | Your task is code completion.
import os
import zmq
import warnings
TIMEOUT = 1000 # milliseconds
VERBOSE = False
RETRY = True # Should we try to get another server if we can't connect?
SERVERFILE = "serverlist.dat" # Base name of the file containing server names
if __name__ == '__main__':
VERBOSE = True
def prin... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat Sheet for Code Completion Task:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
def createFunction(server_func, docstr=None):
def initialFunc(*args):
initalFunc = _createFunction(server_func, docstr)
return initalFunc(*args)
return initialFunc
**Rele... | |
Please complete the code given below.
/**
* This file is part of LibLaserCut.
* Copyright (C) 2011 - 2014 Thomas Oster <mail@thomas-oster.de>
*
* LibLaserCut is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software F... | [
" move(out, Util.px2mm(offset.x, dpi), Util.px2mm(offset.y, dpi));"
] | 1,057 | lcc | java | null | 9a6eb97bf19cf92ba543d527e5650f3a6198498b114bcbf3 | 286 | Your task is code completion.
/**
* This file is part of LibLaserCut.
* Copyright (C) 2011 - 2014 Thomas Oster <mail@thomas-oster.de>
*
* LibLaserCut is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void writeRaster3dCode(Raster3dPart p, PrintStream out)
{
double dpi = p.getDPI();
IModelaProperty prop = (IModelaProperty) p.getLaserProperty();
int toolDiameterInPx = (int) ... | |
Please complete the code given below.
/*
* Copyright 2013-2015 Daniel Pereira Coelho
*
* This file is part of the Expenses Android Application.
*
* Expenses is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Soft... | [
"\t\t\t\t\tContentValues cv = new ContentValues();"
] | 666 | lcc | java | null | f6cf9afee16a6f9eb253d2163fc5f2accb17108da85e51a3 | 287 | Your task is code completion.
/*
* Copyright 2013-2015 Daniel Pereira Coelho
*
* This file is part of the Expenses Android Application.
*
* Expenses is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foun... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
private void deleteGroup() {
SQLiteDatabase db = DatabaseHelper.quickDb(act, DatabaseHelper.MODE_WRITE);
RadioGroup rg = (RadioGroup) layout.findViewById(R.id.radioGroup1);
int toastString;
... | |
Please complete the code given below.
// Taken from https://stackoverflow.com/questions/6596327/how-to-check-if-a-file-is-signed-in-c
using System;
using System.Runtime.InteropServices;
namespace VisualStudioHelpDownloaderPlus
{
internal static class AuthenticodeTools
{
[DllImport("Wintrust.dll", Prese... | [
" else if (m_meth == AllocMethod.CoTaskMem)"
] | 459 | lcc | csharp | null | 2237275bf34eb140554aa5a5e98dc8bde6dd285b688c247c | 288 | Your task is code completion.
// Taken from https://stackoverflow.com/questions/6596327/how-to-check-if-a-file-is-signed-in-c
using System;
using System.Runtime.InteropServices;
namespace VisualStudioHelpDownloaderPlus
{
internal static class AuthenticodeTools
{
[DllImport("Wintrust.dll", PreserveSig = ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat Sheet for Code Completion Task:
**Context:**
The provided code is a C# implementation of the `AuthenticodeTools` class, which uses the `WinVerifyTrust` function from the `Wintrust.dll` library to check if a file is signed. The class includes several structs and enums for working with the `WinVerifyTrust` functio... | |
Please complete the code given below.
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext... | [
"LOGOUT_URL = '/accounts/logout/'"
] | 2,324 | lcc | python | null | d9aa0fae1843d2d73e9ac2308f31a3760b5ff6be9bc4face | 289 | Your task is code completion.
# Default Django settings. Override these with settings in the module
# pointed-to by the DJANGO_SETTINGS_MODULE environment variable.
# This is defined here as a do-nothing function because we can't import
# django.utils.translation -- that module depends on the settings.
gettext_noop = l... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given Django settings:
**Relevant sections:**
1. **DATABASES**: This section defines the database connection settings.
2. **CACHES**: This section defines the cache settings.
3. **SESSIONS**: This section defines the session settings.
4. **MIDDLEWARE_CLASSES**: This section defines the middleware ... | |
Please complete the code given below.
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Found... | [
"\t\t\tfor (var i = 0; i < numberToCancel; i++)"
] | 1,183 | lcc | csharp | null | f928fa8a814e6601eba3952b11bcbc31cc18a3d2f086048f | 290 | Your task is code completion.
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. Fo... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given context:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public class ProductionQueue : IResolveOrder, ITick, ITechTreeElement, INotifyOwnerChanged, INotifyKilled, INotifySold, ISync, INotifyTransform
{
// ...
public void ResolveOrder(Actor self, Order order)
{
... | |
Please complete the code given below.
from PyQt4 import QtCore,QtGui,Qt
import sys, os
from ui import design
from genericpath import isdir, isfile
from collections import OrderedDict
from src import Utils, showTags
from functools import partial
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_f... | [
" infoText += \" file\" if numberOfFiles==1 else \" files\" "
] | 886 | lcc | python | null | a6ff01b3019b5f686be4e5365d4e5986aec163213a88b95e | 291 | Your task is code completion.
from PyQt4 import QtCore,QtGui,Qt
import sys, os
from ui import design
from genericpath import isdir, isfile
from collections import OrderedDict
from src import Utils, showTags
from functools import partial
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 =... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code:
**Context:**
[Previous code... ~10,000 lines omitted for brevity]
def changeclickedFileOrDir(self, index):
self.clickedFileOrDir = unicode(self.fileSystemModels[self.activeTreeview].filePath(index)).rsplit('/')[-1]
from genericpath import isfile
if isfile(sel... | |
Please complete the code given below.
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2010 (ita)
"""
Task generators
The class :py:class:`waflib.TaskGen.task_gen` encapsulates the creation of task objects (low-level code)
The instances can have various parameters, but the creation of task nodes (Task.py)
i... | [
" code = code.replace('%', '%%')"
] | 2,292 | lcc | python | null | c954057ff94e553216187b97466689a94cf01d35b64c1d11 | 292 | Your task is code completion.
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2010 (ita)
"""
Task generators
The class :py:class:`waflib.TaskGen.task_gen` encapsulates the creation of task objects (low-level code)
The instances can have various parameters, but the creation of task nodes (Task.py)
is always ... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the task completion:
Context:
[Previous code... ~10,000 lines omitted for brevity]
@feature('seq')
def sequence_order(self):
"""
Add a strict sequential constraint between the tasks generated by task generators.
It works because task generators are posted in order.
... | |
Please complete the code given below.
#!/usr/bin/env python
'''
Created on Jan 28, 2016
@author: cme
'''
#****************************************************************
# \file
#
# \note
# Copyright (c) 2016 \n
# Fraunhofer Institute for Manufacturing Engineering
# and Automation (IPA) \n\n
#
#**********************... | [
" result = self._planningExecutorClient.get_result()"
] | 747 | lcc | python | null | e3985a9e93ec883a946ded49a6c0d5a149f870a2551a4bae | 293 | Your task is code completion.
#!/usr/bin/env python
'''
Created on Jan 28, 2016
@author: cme
'''
#****************************************************************
# \file
#
# \note
# Copyright (c) 2016 \n
# Fraunhofer Institute for Manufacturing Engineering
# and Automation (IPA) \n\n
#
#*******************************... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def execute_cb(self, goal):
...
while not (success):
knowledge_parser_result = self.workOnKnowledge()
print knowledge_parser_result
planning_solver_resul... | |
Please complete the code given below.
using System;
using System.Collections.Generic;
using System.Text;
using Axiom.Core;
using Axiom.Media;
using Axiom.Graphics;
using Axiom.Overlays;
using Axiom.Animating;
using Axiom.Math;
using System.Runtime.InteropServices;
namespace Axiom.Demos
{
public class DynamicTextures ... | [
"\t\t\t\t\t\t\t\t\t+ chemical[ 0 ][ idx + reactorExtent ], hdiv0 );"
] | 1,036 | lcc | csharp | null | ae83375fd17d59ade51acb7d21f140c348517cad10d87283 | 294 | Your task is code completion.
using System;
using System.Collections.Generic;
using System.Text;
using Axiom.Core;
using Axiom.Media;
using Axiom.Graphics;
using Axiom.Overlays;
using Axiom.Animating;
using Axiom.Math;
using System.Runtime.InteropServices;
namespace Axiom.Demos
{
public class DynamicTextures : TechDem... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
void runStep()
{
int x, y;
for ( x = 0; x < mSize; x++ )
{
delta[ 0 ][ x ] = 0;
delta[ 1 ][ x ] = 0;
}
// Boundary conditions
int idx;
... | |
Please complete the code given below.
/*******************************************************************************
* ___ _ ____ ____
* / _ \ _ _ ___ ___| |_| _ \| __ )
* | | | | | | |/ _ \/ __| __| | | | _ \
* | |_| | |_| | __/\__ \ |_| |_| | |_) |
* \__\_\\__,_|\___||... | [
" if (pattern == null) {"
] | 839 | lcc | java | null | 1b693ff15f56949b8dd6a9b75de17dd49f7f0b08bf33823d | 295 | Your task is code completion.
/*******************************************************************************
* ___ _ ____ ____
* / _ \ _ _ ___ ___| |_| _ \| __ )
* | | | | | | |/ _ \/ __| __| | | | _ \
* | |_| | |_| | __/\__ \ |_| |_| | |_) |
* \__\_\\__,_|\___||___/\__|_... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
private void createImportedType(int position) throws JsonException {
checkInputs(position, name, type);
columnNames.add(name);
switch (ColumnType.tagOf(type)) {
case ColumnTyp... | |
Please complete the code given below.
/*
Classe gerada automaticamente pelo MSTech Code Creator
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using MSTech.Data.Common;
using MSTech.Data.Common.Abstracts;
using MSTech.GestaoEscolar.Entities;
namespace MSTec... | [
" entity.cti_id = Convert.ToInt32(qs.Return.Rows[0][0]);"
] | 515 | lcc | csharp | null | 39bbeca7715c515fede070fff57d6f18c6608542a2b291d1 | 296 | Your task is code completion.
/*
Classe gerada automaticamente pelo MSTech Code Creator
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using MSTech.Data.Common;
using MSTech.Data.Common.Abstracts;
using MSTech.GestaoEscolar.Entities;
namespace MSTech.GestaoE... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the given code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
public abstract class Abstract_ORC_ConteudoItemDAO : Abstract_DAL<ORC_ConteudoItem>
{
// ... (ParamCarregar, ParamInserir, ParamAlterar, ParamDeletar, ReceberAutoIncremento methods)
pro... | |
Please complete the code given below.
using System;
using System.Linq;
using System.Data.Common;
using NHibernate.Cfg.MappingSchema;
using NHibernate.Engine;
using NHibernate.Mapping.ByCode;
using NHibernate.Mapping.ByCode.Impl;
using NHibernate.Properties;
using NHibernate.SqlTypes;
using NHibernate.Type;
using NHibe... | [
"\t\t\tthrow new NotImplementedException();"
] | 1,017 | lcc | csharp | null | 590b51d23289d047b57ac6677f20d8695fe1def2a0120e8d | 297 | Your task is code completion.
using System;
using System.Linq;
using System.Data.Common;
using NHibernate.Cfg.MappingSchema;
using NHibernate.Engine;
using NHibernate.Mapping.ByCode;
using NHibernate.Mapping.ByCode.Impl;
using NHibernate.Properties;
using NHibernate.SqlTypes;
using NHibernate.Type;
using NHibernate.Use... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Based on the provided code, I will create a cheat sheet to help me write the correct next line(s) of code.
**Cheat Sheet:**
**Context:** The code is in the `PropertyMapperTest` class, specifically in the `WhenSetTypeByIUserTypeWithParamsThenSetType` method.
**Relevant lines:**
- `mapper.Type<MyType>(new { Param1 = ... | |
Please complete the code given below.
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | [
" commands = list()"
] | 1,208 | lcc | python | null | fec6e895c63341559f9f9bba6ca62f48771c6ee896904ae7 | 298 | Your task is code completion.
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ver... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Cheat sheet for the code completion task:
Context:
[Previous code... ~10,000 lines omitted for brevity]
def __init__(self, argument_spec):
self.spec = argument_spec
self.module = None
self.init_module()
# ntp_auth configration info
self.key_id = self.module.params['key_id']
... | |
Please complete the code given below.
# pylint: disable=no-member
"""
Unit tests for the Mixed Modulestore, with DDT for the various stores (Split, Draft, XML)
"""
from collections import namedtuple
import datetime
import logging
import ddt
import itertools
import mimetypes
from unittest import skip
from uuid import u... | [
" component = self.store.update_item(component, editing_user)"
] | 4,935 | lcc | python | null | c83f71189a57f9b8fbf6439c1c211939a9c292a33024b337 | 299 | Your task is code completion.
# pylint: disable=no-member
"""
Unit tests for the Mixed Modulestore, with DDT for the various stores (Split, Draft, XML)
"""
from collections import namedtuple
import datetime
import logging
import ddt
import itertools
import mimetypes
from unittest import skip
from uuid import uuid4
from... | Before solving the code completion task, imagine you are a student memorizing this material according to the task that you will have to perform. Ensure you preserve all critical details to solve the task and create a cheat sheet covering the entire context. Once you have done that, I will prompt you to solve the code c... | Next line of code:
| lcc | 84 | Context:
[Previous code... ~10,000 lines omitted for brevity]
@ddt.data('draft', 'split')
def test_update_edit_info_ancestors(self, default_ms):
"""
Tests that edited_on, edited_by, subtree_edited_on, and subtree_edited_by are set correctly during update
"""
self.initdb(default_m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.