query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
3e27264883024b4616440643867f30cf | abbf58fc93519812ce87f5afa82ee5f5 | 创建线对象 | public class AnimalRotateLevel2 : MonoBehaviour
public void CreateLine(Vector3 vstart,Vector3 vend)
{
Image sline = UguiMaker.newGameObject("line", transform).AddComponent<Image>();
sline.transform.SetSiblingIndex(0);
float dis = Vector3.Distance(vstart, vend);
sline.rectTransform.si... | 1 |
dd204aece5ac6bef6d64a5a9bf78dc3d | b497e38e5af07dae781258c2ba7485ac | Set the minimum height that the label may have, in screen coordinates | class XNode( QGraphicsRectItem ):
def setMinimumHeight( self, value ):
self._minimumHeight = value | 1 |
b6751f7ca796dbf2a9b194d1abf7e0c8 | 9dfee6c37ec1c9edf67221b35bf871b2 | Compute the diffusion maps. | max_patches=1_000_000, n_jobs=10):
n_channels, *_ = X.shape
assert n_channels == 1, (
f'n_channels larger than 1 is not supported. Got {n_channels}'
)
X = X[0]
X_dl = extract_patches_2d(X, atom_support, max_patches=max_patches)
X_dl = X_dl.reshape(X_dl.shape[0], -1)
no... | 0 |
b881d50b50556cbbf7a4667144869dfd | 9d1d2e6402dd1048000ad1fecfb2fbf1 | Get a claim integer value by the input claim type name. | namespace ISynergy.Framework.AspNetCore.Authentication.Accessors
public class ClaimsAccessor
private Guid GetSingleClaimAsGuid(string claimType)
=> GetSingleClaimAs<Guid>(claimType, Guid.TryParse); | 0 |
703f83b8ece6e7a6d192221fd8cf357a | 04f01e9c859b6d1448c911beb07fb451 | FFT乘法 | def FFmultiply(a,b,p):
result=0
i=0
while(b!=0):
if(b&0x1==1):result^=(a<<i)
i+=1
b>>=1
return FFmod(result,p) | 0 |
4874ca40b1834452da208d0866e43e1b | 9684c374d83cbb5334ab2c8068bb264a | Find java executable File path from java.home system property. | public abstract class ArtifactoryTaskType implements TaskType
protected String getJavaHome(AbstractBuildContext context, CapabilityContext capabilityContext) {
String jdkHome;
String jdkCapabilityKey = (new StringBuilder()).append(JDK_LABEL_KEY).append(context.getJdkLabel()).toString();
ReadOnly... | 0 |
ffc36f2604e9287a981fcadc4dec5312 | 248988124ddafc4fe17d1f85fc06dff9 | 运行带参数的SQL语句,并输出结果集 | namespace Sealong.Data.Sql
public abstract class SqlClient
public abstract DataSet RunSql(String sql, IEnumerable<System.Data.IDbDataParameter> parameters); | 1 |
3e25ca6d5ba07442b24fcd6b7d6573e1 | 452e91b450c8e6c46b9cd0cd4dd6108d | Returns searched school students (used for message recipients). | students = []
search_criteria.freshman_or_transfer.each do |matric|
if matric == 'Freshman'
students << test.searchable_data.select { |u| u[:freshman_or_transfer] == 'Freshman' }
else
students << test.searchable_data.select { |u| u[:freshman_or_transfer] == 'Transfer' }
end
... | 1 |
284289d94eba50bf3ccbb7f8c6d6052a | bcc3decf8be96a2eb00dc2a598c874f7 | Command launched when QPushButton 'Create Camera Turn' is clicked | class CreateCamera(plugin.Creator):
def process(self):
mti = ops.MainThreadItem(self._process)
ops.execute_in_main_thread(mti) | 0 |
50e722d0a5ea9bac322f38cbe6e5ef7f | ba51369f94a1abc54dceab9aace8d0ab | ----< initialize the content of the listbox with name of source files >------------- | void CWeatherPage::prepComboBox()
{
CComboBox* files =
(CComboBox*) GetDlgItem(IDC_WEATHER_FILE_LIST);
ASSERT(files);
files->ResetContent();
CVarroaPopView* pView = m_pMyPropSheet->GetView();
CVarroaPopDoc* pDoc = pView->GetDocument();
if (pDoc->GetWeather()->IsInitialized())
{
m_WeatherFileName = pDoc->... | 1 |
b6b62cff9b7089a1e7b952e1c0021f44 | 76b653608b8d974c86ac444f64a57b25 | Whether this constraint should be off at evaluation time | class Term
def cnf?
false
end | 0 |
a8d7c7f2e768b1bf3f5d4825691832fa | 20c78dc27ef674f3e7c475201a4efcc0 | Populate Team table with dummy data.
Require: Company and User to already create dummy objects,
Roles to already be populated. | {
$users = $manager->getRepository(User::class)->findByGroupAndDepartmentType(Group::GROUP_DRH);
foreach ($users as $key => $user) {
$entity = new Template();
$entity
->setOwner($user)
->setBody('Hello {{user}}!')
->setTitle('F... | 0 |
b61a5ecef087ecceed5bd02e9ade00cb | 8bd820dc3444303054f47563636e34a5 | 1.切点方法匹配规则:方法名字为greetTo | public class GreetingAdvisor extends StaticMethodMatcherPointcutAdvisor
public boolean matches(Method method, Class clazz) {
return "greetTo".equals(method.getName());
} | 1 |
c7cc69c79d00b64f45084087a7abf570 | 87dfdcc3d57553782ef57c4bb0adde48 | Simple stereo cross delay with feedback.
JH _ Quite CPU intensive | void crossfeed_process(struct dsp_proc_entry *this, struct dsp_buffer **buf_p)
{
struct crossfeed_state *state = (void *)this->data;
struct dsp_buffer *buf = *buf_p;
int32_t *hist_l = &state->history[0];
int32_t *hist_r = &state->history[2];
int32_t *delay = state->delay;
int32_t *coefs = &state... | 1 |
76202600bb07b1a188a9cef7669256ac | 1a7b77103be185cef1c9e3a8a1741baa | 设置崩溃日志保存的文件夹名称,默认为Crash | public class LogManager
public static void cacheCrashFile(String fileName) {
SharedPreferences sp = RuntimeEnv.appContext.getSharedPreferences(RuntimeEnv.appContext.getPackageName(),Context.MODE_PRIVATE);
sp.edit().putString(CRASH_FILE,fileName).commit();
} | 0 |
56f618685484d832a223e1fa62d08e72 | 8f40ab9cc198345da9ed93bb43402256 | 通过报刊id获取订单列表 | List<OrderDO> selectPublishOrder(Integer id); | 1 |
49d73a804029d0fb522096252cd8db70 | 33e491972fac8ef77c7b5e8d40a59f42 | Assert an error is raised if the prime prior is not defined. | class TestDataHandleTimesteps():
def test_previous_timestep_error(self):
data_handle = DataHandle(Mock(), 1, 2015, [2015, 2020], Mock())
with raises(TimestepResolutionError) as ex:
data_handle.previous_timestep
assert 'no previous timestep' in str(ex) | 1 |
51786d6817e9a6aeed10dc0be10f1e5b | 360c8fdf4d5e2b26850ca3dcd30656e9 | 淘宝帐号登录 | class AuthController extends MyController
function taobaologinAction()
{
if($this->siteid==14)
{
$this->_forward("pplogin");
}
else
{
$this->_forward("tblogin");
}
} | 1 |
49fdb9a30f538df1c509c23d8d3a2559 | 946066557338f18fc538a3ad39813ccf | Simple loading of one valid fdp into DB with supplied engine | cache_expiry = 10
cache = {}
fk = fakeskan.Fakeskan(url=self.url, cache=cache, cache_expiry=cache_expiry)
result = fk("33DBF6EBC059CD97ACAE7CAF308A0E050A7EC51A")
self.assertEqual(fakeskan.GOOD, result)
self.assertEqual(1, len(cache)) | 0 |
3540c0d18553da291d5afd42d2ce91a2 | 14a0dc8fd30b85fea69a0e5dac97286e | 处理种子集进行社区发现 | testList = [[['{<android.os.HandlerThread: android.os.Looper getLooper()>,Source,,NO_CATEGORY}', '{<android.os.Handler: boolean sendEmptyMessage(java.lang.Integer)>,Sink,,NO_CATEGORY}'], ['{<android.view.View: void setBackgroundColor(java.lang.Integer)>,Sink,,NO_CATEGORY}']], [['{<android.widget.TabHost$TabSpec: ja... | 1 |
095dae48bb12daa0b14d165f073aa6dc | b5a12eb6db18f88e7bfa6f2b3bd829c2 | Read the next line of a stream from a given source. | LinesProcessStream(
__in HANDLE hSource,
__in PLINES_CONTEXT LinesContext
)
{
PVOID LineContext = NULL;
YORI_STRING LineString;
YoriLibInitEmptyString(&LineString);
LinesContext->FilesFound++;
LinesContext->FilesFoundThisArg++;
LinesContext->FileLinesFound = 0;
while (TRUE) {
... | 1 |
028c5577d4cfa1eefc18611b3455c73b | 1717a6ed9ea61fbf36025a957f3d16a6 | F116U相2次~19次谐波电压含有率及总畸变率日最大值及发生时间 | try:
sql = "SELECT module_volt_no_max, cell_volt_no_max FROM diagnosis.t_car_runtime WHERE car_vh = '%s' AND data_time BETWEEN %d AND %d" % (self.car_vh, self.start_time, self.end_time)
data = pd.read_sql(sql, self.conn)
module_data = list(data['module_volt_no_max'].dropna())... | 0 |
f6c9eb50d924054769e94af8fdf9f179 | 7d5b7f8daf2ec9f3e961bae543b73d14 | Models background for Rocket Riders game. | arcade.draw_rectangle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT * 2 / 3,
SCREEN_WIDTH - 1, SCREEN_HEIGHT * 2 / 3,
arcade.color.SKY_BLUE)
arcade.draw_rectangle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 6,
SCREEN_WIDTH ... | 1 |
2b8b66715c122c9507308e96c5af61cb | 2d6ee6db83c33bcbe0da0d55f83eb6b6 | batch is tuple of numpy array obtained from replay buffer
i.e. batch = (ob, action, reward, done, next_ob) | def unpack_batch(batch):
states, actions, rewards, dones, last_states = [], [], [], [], []
for exp in batch:
state = np.array(exp.state, copy=False)
states.append(state)
actions.append(exp.action)
rewards.append(exp.reward)
dones.append(exp.last_state is None)
if ... | 0 |
465512cf64c6799074013aa2b40d83a1 | 112f0e2c9ffebea3fe0841d091bff224 | Initialize parent and start election timer. | public class MulticastServerService
public void electionInitiating(){
LeaderElectionService leaderElectionService = new LeaderElectionService();
leaderElectionService.startElection();
} | 0 |
c727397938c81774cc396c2386ebfa37 | e7b7cc3dc78a7c4661ecab1750ae73c2 | Devuelve una incidencia con la estructura apropiada para
que el generador de incidencias trabaje | {
return [
'mensaje' => $this->estado->nombre . ' en ' . $this->marca->nombre,
'url' => '/tareas/' . $this->transaccion->tarea_id
];
} | 1 |
233bb104332bbac3a53939633ff12e61 | 9766fd03e33e6b5827129e21e1c15549 | Retorna o nome do driver de cache em uso. | class Manager implements CacheManagerInterface
public function getDriverName(): string {
$classNameInfo = explode('\\', get_class($this->driver));
return strtolower(end($classNameInfo));
} | 1 |
08b7bbc5d98eabe0e1e403d03bb0e442 | d2ecfefaae02600e561013af5f0a8f3b | 傳入app名稱,回傳該app的根路徑 | class Router
public static function getAppPath($appName, $router = "")
{
$config = Registry::getConfig();
return $config->get("path").DIRECTORY_SEPARATOR."apps".DIRECTORY_SEPARATOR.$router.DIRECTORY_SEPARATOR.$appName.DIRECTORY_SEPARATOR.$appName.".php";
} | 1 |
9c13b81cdf44dbe8a1a8675904982df6 | 8f55f42105ad3e0a4493286f25b1c216 | Store the log entry into database | class AccessLog extends Eloquent
public function saveLog() {
DB::table($this->table)->insert(array('target' => $this->target, 'project_id' => $this->project_id, 'type' => $this->type, 'user_id' => $this->user_id, 'created_at' => \Carbon\Carbon::now()));
} | 1 |
c2524135107aa2c9c6bd928ad483ae57 | 8e4dc671e7f80b2018a168ddd41fb770 | Given
* A disposed Workflow
When
* The Load method is invoked
Then
* An ObjectDisposedException is thrown | public partial class ImageTests
public class Dispose
[Fact]
public void AcceptVisitor_ObjectDisposedException()
{
return;
} | 0 |
086e44fdc204b7a980689a99d415d120 | 8a77af67e24f20f467f1db78668abafe | This will stop and clean the local node | export class LocalNodeHandler
public stop(): void {
ipcMain.removeHandler(CommunicationChannel.LOCALNODE);
if (this.localNode.isRunning()) {
this.localNode.killDaemon();
}
this.checkIfDaemonsQuit();
} | 1 |
03e75f7a3170687de1b1fabf15e7c3e5 | 2d68a84710b556654378f87ab2ff7ee1 | Checks if series should be drawn from sides to center. | public void setCentersChildren(final boolean newValue) {
centersChildren = newValue;
useOrientation = false;
} | 0 |
249ba7ab5ba60bbe14f71876fa95ddf8 | 24031688d1b84968add9b6fc49b9c5be | Get the JSON representation of the execution. | namespace OpenBots.Server.SDK.Model
[DataContract]
public partial class AutomationExecutionViewModel : IEquatable<AutomationExecutionViewModel>, IValidatableObject
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
} | 1 |
0a944650a4ae7a8894d9de759630bf59 | 20a89c49b2828dccbc7d528363f402f0 | assert error raised if input file missing or does not exist | with self.assertRaises(Exception) as ec:
invalid_input = '/any/path/not/exist'
find_max_claim(input=invalid_input, output='any/thing')
assert str(ec.exception) == f'File {invalid_input} not found' | 1 |
f454a6591eff92e271a0e0c1d1b38075 | 78000e5bb1eb51331110edc607dac6f4 | 验证,成功返回null,否则返回错误信息 | validator.validate(form, errors);
if (errors.hasErrors()) {
String error = errorsMessage(errors);
log.error(error);
return error;
}
return null;
} | 1 |
577c55522c9f9da367a55bb43ad794d1 | 58bb13033b6b9a3ac072592f1213566a | Return the column in the user table that holds the user's credentials. | class Account extends Model
public function getIdentityColumn()
{
return 'identity';
} | 0 |
0ea7a84218c36673457094247bd424c4 | 04f7a5eae88c9215191a8ac88497f704 | RW-93_SetContext_TC003_Set Corporation and Offices Context_Verify for Office drop down box for a Corporation | public class HomeMenuCompanySubMenuTest extends BaseEngine
public void verifyCountryValuesInCreateCompany() throws EncryptedDocumentException, InvalidFormatException, IOException
{
CreateCompanyLoginTest cclt=new CreateCompanyLoginTest();
cclt.verifyCountryValues();
} | 0 |
e6de3120a3786b2384e5896e2af17fe2 | 693050cca2239edc95e3d4853a60c60f | Function for computer to jump down left and continues jumping until no jumps are legal | {
JumpPoint temp1 = new JumpPoint(current);
JumpPoint temp2 = new JumpPoint(current);
if (direction == Vector3.right)
{
temp1.gridPos = new Vector3(current.gridPos.x, current.gridPos.y - 1, current.gridPos.z);
temp2.gridPos = new Ve... | 0 |
bc11c5de4bc66fee41f4dd4544a11710 | 5b42b8ab73bb8a38fbf059aa26056a5f | Whether the server is debugging | class Server extends Socket
public function getDebug()
{
return (bool) $this->_debug;
} | 1 |
3fd3738ecf82ff8c3961c1a9459d585d | 35a045876df0449ea884f16b5d6c7206 | |===== STARTS THE PROGRAM =====| | def main():
print('Welcome to TicTacToe Game')
print('CSC 120 Project: Fayetteville State University, NC')
print('This game can be played by one or two players')
numPlayers = int(input('Enter the number of players, 1/2 for one/two players: '))
ticTacToe(numPlayers)
print('Thanks for playing ... | 1 |
478e932ca53c3017ff96e44dca9724bd | aa203cf0514ed160f119b4410c0bc2b2 | Deletes a shared folder in the shared table | public void testDeleteFolderWithSharedFile() throws ApiException {
createShareAndSyncTwoFiles();
FoldersCleanUpResponse deleteFoldersResponse = foldersApi.deleteFolders(Collections.singletonList(folderId), "1", L(new Date().getTime()), null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, Boolean.... | 1 |
bf3db8ad0e21950af81c77071badfa30 | 585ee4606d860c7c37a2da4adcc7e692 | From a plain text file with all the ids on individual lines, parses ids and prepares for matching | values_by_id = OrderedDict()
src_file = open(filename, 'r')
src_file.readline()
for line in src_file:
cols = line.strip().replace(' ', '').split(',')
try:
cols = [int(xx) for xx in cols]
values_by_id[cols[0]] = cols[1:]
except ValueError:
value... | 0 |
c0e709a8a9d507fc87f79b1904a2383a | 476734a786c7fc85661f15dc6545a78f | Mapping object able to return all keys as an iterable | class IIterableMapping(IEnumerableMapping):
def iterkeys(): | 1 |
2173402a746dfd6e974aa9846ea0ce2a | 9f5a025a0288acb22bfae707c47e9af6 | Set the value of passwordResetToken | class UserManagerIdentity
public function setPasswordReset($value) {
$this->passwordReset = $value;
} | 0 |
651ffc0cad16032364215304c002bdb1 | 97bf5ebdee85e6f9e1754d92efa8d63f | Gets the corresponding table.
It also creates, if it does not exist. | class TableStructure
public static function table( $name, Database $db )
{
if( !isset( self::$tables[ $name ] ) )
{
self::$tables[ $name ] = new TableStructure($db, $name);
}
return self::$tables[ $name ];
} | 0 |
a5f4bc55e895e1b169818b7964a29ea9 | fc7312b35c96c58d8be375c3ed0a5224 | 更新所有用户的帖子数 | namespace Discuz.EntLib.MongoDB.Data
public class Users : Discuz.Cache.Data.ICacheUsers
public void UpdateAllUserPostCount(int postTableId)
{
MongoDbHelper.CleanTable(mongoDB, "users");
} | 0 |
eb2782d20f32773618a724306985bdcc | fbf99671316dec76e89c65613cbee186 | Test method for seeing if game is over. Gives neither player any points, so
should return false. | self.repo.Empty()
self.repo.makeMovePlayer(Point(0, 0, "O"))
self.repo.makeMovePlayer(Point(0, 1, "O"))
self.repo.makeMovePlayer(Point(0, 2, "O"))
self.repo.makeMovePlayer(Point(0, 3, "O"))
self.assertEqual(False, self.repo.checkWin()) | 1 |
6b32a23f16ff9553ebcdd1addde320b3 | 791a77b4e95d38ca07003c3f3b268fc1 | Turn the next `where()` into `andWhere()`. | class QueryBuilder
public function andWhere(){
call_user_func_array(array($this->where, 'andWhere'), func_get_args());
return $this;
} | 1 |
a23a5c69ad69efaf4d2e61d407c4d5b4 | 12bc4a3771067768fe3df072dfd240dd | Function to convert the quaternion to roll, pitch and yaw values | qx, qy, qz, qw = q
sqx, sqy, sqz, sqw = q ** 2
invs = 1.0 / (sqx + sqy + sqz + sqw)
yaw = np.arctan2(2.0 * (qx * qz + qy * qw) * invs, (sqx - sqy - sqz + sqw) * invs)
pitch = -np.arcsin(2.0 * (qx * qy - qz * qw) * invs)
roll = np.arctan2(2.0 * (qy * qz + qx * qw) * invs, (-sqx + sqy - sqz + sqw)... | 1 |
85160aa6e2b804e74d2d220dafc84468 | d203803b310b4946ad3019d30f0a58be | 创建kafka-channel的消息通道
<br> 该方法使用@Output注解进行修饰,用该注解表示会创建kafka-channel的消息通道
<br> 如果@Output注解不提供参数,则使用方法名作为通道名称 | @Configuration
@EnableConfigurationProperties
public class MqttConfig
@Bean
public MessageChannel mqttInputChannel() {
return new DirectChannel();
} | 0 |
1b68b88e5ef3590ccbbb4610f16f324f | dfd3358cc4d0efb69d81d9aa8736fb1b | Create a new BBox based on the intersection between two BBox instances (AND operation) | {
return bounding_box(std::max(xmin, other.xmin), std::max(ymin, other.ymin), std::min(xmax, other.xmax), std::min(ymax, other.ymax));
} | 1 |
2cabdcd0bad8ebe98bbd26c5492f6d0a | 847026645a622c873897e5cfa895a0c5 | 提交取消禁言并提示 | async function submitCancelMuted(groupId: string, memberId: string) {
const data = await post(URLS.SET_SINGLE_MUTED, {
roomId: groupId,
userId: memberId,
deadline: 0
});
if (data) {
notify.success('解除成功');
}
return data;
} | 1 |
b55f0586987544824c1815383460ee0e | c4ffceeb8fe4dbf6ac84202724065524 | ReadAllLines won't work if the file is being written to.
So try a few more times. | f.seek(rnd(file_size), os.SEEK_SET)
done = False
last_line = ""
while not done:
line = wrapped_readline(f, encoding=encoding)
if last_line == "\n" and len(line) > 1:
f.seek(-len(line), os.SEEK_CUR)
done = True
last_line = line | 0 |
22b4f934943778526a283859a36174be | 711803c7dffef98fe2d7702fbb42ac87 | Purges all the messages for a message type. | public function purge_notifications($notification_type_id); | 1 |
df65f3fda746f323d0c31bf901b9bf08 | 14ed7a5275151043ac2411aae681dc8d | Hides GameOver Screen | public class UIManager : MonoBehaviour
public void HideGameOverScreen()
{
gameOverScreen.SetActive(false);
} | 1 |
0f40d7bf46a6c65ff89c3189e7e0dcf8 | 8aa8c35e3740e74e39c23a853ac51d51 | Set the graph title. | public class QTime extends SApplet implements SStepable
public void setXTitle(String s) {
graph.setXTitle(s);
} | 0 |
bb2f01b0ae599d296e510c5a8be3a4b6 | cbb83a4d8ab2f2f1c2a9fdd6ead454e1 | Consolidated session engine activation status. | export class AlSessionInstance
isActive(): boolean {
return this.sessionIsActive;
} | 1 |
fa6eff09196c99415ebed4204efce37a | 56191a250e8e9459cedf4d99c668df40 | The time(ms) it takes for the character to move from one tile on the map to another | public class ResourceGrid : MonoBehaviour{
float CheckTileMoveCost(int sourceX, int sourceY, int targetX, int targetY){
float moveCost = (float)tiles[targetX,targetY].movementCost;
if (sourceX != targetX && sourceY != targetY) {
moveCost += 0.001f;
}
return moveCost;
} | 0 |
86f80d37676c934fca0c107586179d8f | 3acb573907950a6b2e8bf0e035bb6216 | 获取请假条ID。 | public abstract class BaseAbsence implements Serializable
public java.lang.Integer getId () {
return id;
} | 1 |
b05bab6c5b4d5a6528a456b6cd9ad0fc | 0e5ed7d5d5f13d15c5865a3395d868f9 | 反射实现依赖注入 | class NigateBeanContainer
fun inject(injected: Any) {
for (kProperty in injected::class.declaredMemberProperties) {
for (annotation in kProperty.annotations) {
if (annotation.annotationClass == NigateInject::class) {
annotation as NigateInject
... | 1 |
3f2ac08f69e21d698061937142305341 | 3879572297808b2e5394e315291da275 | __init__
Connect to the piC-867 controllers. | self.ip = ip
self.port = port
self.unit = unit
self.init_registers()
self.e = ''
if connect is True:
self.connect() | 1 |
ae9b2a3dd3a7e5d67190316d220a71ab | a20f8a5118e40231efe862df722df4b4 | Получает всех абонентов | class QuickFinkok
public function customersObtainAll(): Registration\Customers
{
$service = new Registration\ObtainCustomersService($this->settings());
return $service->obtainAll();
} | 1 |
634d4ab5a1f1716ecb2f575817a840a2 | 2ba6909744be520e82bad31f872ffb36 | Setter for <code>bot.GPT_CONTRACT_BASE.CITY_TAX_VALUE</code>. | void xsetBaseHiddenTaxAmount(org.apache.xmlbeans.XmlString baseHiddenTaxAmount); | 0 |
2a4a2d22567de615f4ccfa07c10f648f | e1e5ca0ed1a7b2e11698f69e5fdef60d | Ensures that files will be output to a location that Firefly
can read, as well as splits the path so that filenames.json
references files correctly. | if '/' in outPath:
splitPath = outPath.split('/')
elif '\\' in outPath:
splitPath = outPath.split('\\')
else:
splitPath = [outPath, ]
if splitPath[-1] == '':
outputFilename = splitPath[-2]
else:
outputFilename = splitPat... | 0 |
6ba8dc2dbd4e479c0f2ac7e163e7ce87 | 915ebc11e3feecf68bd7b0e545c47623 | only process the event if the superclass did not consume it | void mafDataPipeInterpolatorScalarMatrix::OnEvent(mafEventBase *e)
{
Superclass::OnEvent(e);
} | 0 |
487a27ef851d8ced9c898743cee1825d | f94574c073ebac43c0ec7c396401209c | Formatted Process Program Request回调方法 | {
if (response == null || response.GuiResponse == null) return;
this.IMainData.ProcessAppHostResponse(response.GuiResponse);
} | 0 |
380bf9a9d85deb362ce5084ed5fd4793 | 3b352e6c4276d7a44020e3e2e89d231b | Активировать дочернее окно, если оно было открыто ранее | class DocTabbedChildFrame(wx.Panel):
def Activate(self):
if self._childView:
self._childView.Activate(True) | 1 |
37df08d2d41486cfc801b0db2a4717b3 | 6826b81e8add3c40fcc23b9762fdaa3f | Accesses the value of this fake placeholder. | T getValue() throws IllegalArgumentException; | 1 |
617abe19f494ed319fb2e4ee0c9f666a | c6dc83edb8f64bd6a043f394f9b7a324 | 返回所有的使用的属性id | public class MapConfig extends BeanConfig
protected List<String> getPropertys() {
List<String> list = new ArrayList();
list.addAll(this.map.keySet());
return list;
} | 1 |
b21074071b43613218894e0e33d9b752 | 9bb856faef6bd3241a28dfa7fedb8550 | Description 跳转至登录页面 | void gotoLogin(); | 1 |
2ba3546fbb25e2b9aa3d14b977ec3a84 | 2c1cb4c6196c1b6aae2ae6b23942e4dc | Writes contents to a gzip-file | def write_gzfile(lines, f):
out = gzip.open(f, 'wb')
for line in lines:
out.write('{}\n'.format(line))
out.close() | 1 |
db1f33a347b0f8013cdf548ca9314c06 | cc7aef65ba6fe28586f489156484c98f | 接收响应流到文件 | InputStream inStream = response.getEntity().getContent();
File file = new File(fileName);
FileOutputStream outputStream = new FileOutputStream(file);
byte[] bytes = new byte[1024];
int j = 0;
try {
while ((j=inStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, j);
}
outputStream.flush()... | 1 |
d8e6e05996b6dcf2f4d38abdb1dabe13 | 9ea4ad3ae10746ffa376478068806b59 | Function to test the whole functionality of the program to see if RSA with EE works. | int end = 0;
struct BRLWE_Ring_polynomials a, m, pk, sk;
uint8_t test_1[4] = { (uint8_t)30, (uint8_t)20, (uint8_t)150 , (uint8_t)80 };
uint8_t test_2[4] = { (uint8_t)1, (uint8_t)0, (uint8_t) 1, (uint8_t)1 };
BRLWE_init_hex(&a, test_1, 0);
BRLWE_init_hex(&m, test_2, 0);
printf("test1 = ");
phex(a.polynomial);
p... | 0 |
cb334fec5ad3e745328ea68c157d6e2c | 35c29361f2c1df3f8feacb6d5bfe3055 | (non-Javadoc)
Overrides superclass moveCell method. If cell should be resurrect, then
replace with live one, otherwise keep dead cell in next grid. | public class Cell extends Rectangle{
public void update() {
setAlive(willBeAlive);
} | 0 |
d9f1aae9df684159010fd9f71f4f7588 | e05ea672d541fce92c6c7ff6b864bd43 | Implements multi-threading for global motion. | class Tj2MoveBase:
def run(self):
smach_thread = threading.Thread(target=self.sm.execute)
smach_thread.start()
rospy.spin()
self.sm.request_preempt()
smach_thread.join() | 1 |
3f5f9065bca8dce9f1233f10aa096a77 | afca1f30d955c550f2edb36ffecac8b6 | generate single insult | def fetch_insult() -> str:
insult = ""
time.sleep(2)
try:
with urllib.request.urlopen(EVIL) as query:
insult = str(query.read())
return insult
except (urllib.error.HTTPError, urllib.error.URLError) as err:
exit(err) | 1 |
abadd2f97c56901ad49e61bdaa60f929 | dcea084b2b3000655412cab4e17ef79a | 更新数据库用户表中的用户名数据 | class remind_models_dao_member extends core_db{
public function updateUsername($uid,$username){
$this->resetwhere();
$this->where("id=$uid");
return $this->update(array('username'=>$username));
} | 1 |
7cc5aff5e231de1dfd3866375b58e6de | 02a15d976f427b45842d81ae2ec10a1c | Print record field values in "long" output format | static void
print_long_format (const struct fileinfo *f)
{
char modebuf[12];
char buf
[LONGEST_HUMAN_READABLE + 1
+ LONGEST_HUMAN_READABLE + 1
+ sizeof (modebuf) - 1 + 1
+ INT_BUFSIZE_BOUND (uintmax_t)
+ LONGEST_HUMAN_READABLE + 2
+ LONGEST_HUMAN_READABLE + 1
+ TIME_STAMP_L... | 1 |
fec76d6cc620ef0a94861b1c730c46d8 | 06c43a62ddfe9828b3ceba499b5e2d86 | Возвращает массив последнего разобранного результата mysql запроса | class Mysqli_drive extends Db
private function get_arrayresult()
{
$array_result = array();
if ($this->_num_rows == 1){
$array_result = $this->_mysqli_result->fetch_assoc();
} elseif($this->_num_rows > 1){
while ($row = $this->_mysqli_result->fetch_assoc()) {
$array_result[] = $row;
}
}
$this->_... | 1 |
ac9a7463eef0d13f93951929cad9dce0 | 6a89e0c8fe40e442ae660aa2dcef18d0 | Return the polynomial <code>1-a*x^n</code>. | {
var p = new double[a.Count - 1];
for (int i = a.Count - 2; i >= 0; i--)
p[i] = (i == a.Count - 2 ? 0 : p[i + 1]) * x0 + a[i+1];
return new Polynomial(p);
} | 0 |
de272a9740d4ea5538ff42309314f986 | 38684a85b0811dd65af262ca7b70db10 | Determines if the fox's partner is within vision range. | public class FlockBehavior : MonoBehaviour
private bool IsInFOV(Vector3 position)
{
return Vector3.Angle(myTransform.forward, position - myTransform.position) <= FOVAngle;
} | 1 |
59c4c448168987e492e594ec6f2771ef | 535af2972132456ed88a1b70e32f679a | Return spike train of 0's and 1's according to specified threshold | class AfniTiming(LD.AfniData):
def get_threshold_list(self, data, min_val):
result = [0 for ind in range(len(data))]
for ind, val in enumerate(data):
if val >= min_val: result[ind] = 1
return result | 1 |
a8f4339ab5b2a0a892503001e4a6c39c | 13e90f59020d83cbc6a846dab0a21009 | 功能:从mat文件中读取LabelStack,直接读取mat中与文件名同名的变量 | def getLabels(n,path):
print("Reading Labels ...")
Lb_arr=np.zeros([n,1],int)
with open(path) as f:
lines=f.readlines()[0:n]
arr=-1
for line in lines:
arr=arr+1
list=line.strip("\n")
Lb_arr[arr]=list
f.close()
return Lb_arr | 0 |
fc600db891d8efbe12ce2e9298201ba2 | efe7d18b2576e0c23c9a97d47dc0299d | check the sequence for the LostU sequence or its RC and trim | class Trace(object):
def seq(self):
data = self.get_data('PBAS2')
seq = re.sub("K|Y|W|M|R|S",'N',data)
if self.trimming:
return self.trim(seq)
else:
return seq | 0 |
66007f3350af7f34dbb2e70d1ebfed64 | 8312033d1a4ec3d76476ffa5eb7974b0 | Test of buscarCliente method, of class MainController. | System.out.println(textoBuscar);
try {
listaClientees = clienteON.listaClienteesCodigo(textoBuscar);
} catch (Exception ex) {
Logger.getLogger(ClienteBEAN.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
} | 0 |
b714cf8939e5391db45834ae9ecd5334 | a8236e31df1e3143788dd3b394bb9b11 | Set attacker to var | public class AttackPhase implements PhaseViewPublisher, PlayerDominationViewPublisher{
public static void setAttackerCountry(String attackerCountry) {
AttackPhase.attackerCountry = attackerCountry;
} | 1 |
b073844faffb7947cdbe5e44a5886585 | eed48f0df664a7d0166a16b257c54a73 | Devolve o programa a decorrer neste contexto. | T avancar(); | 0 |
1431d342a7b439e24b34a5913733edae | 551e68b95e62a789a35b5b016398291c | Return one or more variants on program [name] based on OS-specific file extensions. | abstract class VariationSearchFactory
abstract public function getExtensions(
):array; | 0 |
2ea08786c48ce0da3aa172b21a9f2a7c | b9a4ce5a046fa463da845c8f70020d9f | Find iterator of element with key in HashSet of allocate empty space for element with such key.
You should fill allocated space before next usage of this method. | SHashTableIteratorRef HashTableFind(SConstHashTableRef table, const void *key){
} | 0 |
de6a71c6149701c01671eb4b5b51522e | a240c6802a4b8659c5d6152ea20d7d5c | Вывод информации о мультфильме в консоль | void Out(Documental& d, ofstream& ofst) {
ofst << "It's Documental film: length of film in minutes = " << d.length
<< "\n";
} | 0 |
77e98de737cead7a343402040f6a266e | 4c6d2f556391b94788ee19bab4854b75 | sw_arisc_test_exit - exit the dma test module | static void __exit swpci_exit(void)
{
printk(KERN_DEBUG DRV_NAME "_exit(%lu/%d)\n",jiffies,HZ);
pci_unregister_driver(&sw_pci_driver);
} | 0 |
c4dc8cb3b6bb5d6398459fa5975f4bb6 | 1a0a0dc1c466d1ad7f3a4643ea006e56 | Callback function when inline buttons are pressed | def _chosen_inline_result(update_id, in_query_res):
pass | 0 |
d4a099933d7594e2edb6b0f5129cc8d9 | 3d940100f509fdc884fff807e1920eba | Creates a new generation of size context.generation_size based off of top performers from past generations | if (this.currentGeneration == null) {
this.currentGeneration = new ArrayList<NeuralNet>();
for (int i = 0; i < this.genPopulation; i++) {
this.currentGeneration.add(
new NeuralNet(this.numInput, this.numOutput, this.numHidden));
}
} else {
Collections.sort((List<NeuralNet>) this.currentGenerati... | 1 |
17fdaa6c654e0901a56e82234eccb70b | a093b58df8d07efd0f67f6d3d8fac419 | 得到下一个玩家的方向 | public double getNextDirection(); | 1 |
5bca1574b6fbb1ea3f66746427cdce6b | 1c3460ef3a750279657c4727ed4ebb6f | Also works to find the only number occuring an odd number of times | public class FindTheNumber
public int findTheNumberOccursOddTimes(int[] arr){
int res = 0;
for (int i = 0; i < arr.length; i++){
res = res ^ arr[i];
}
return res;
} | 1 |
3f44a580558128638847417d9ce5d4e9 | 54a3f2841903abdd676e66494226f90e | Calculates the nearest snapable value given a MouseEvent.
Code adapted from BasicSliderUI. | public abstract class SteppedSlider extends Slider
public double getClosestValue() {
return getClosestValue(getValue());
} | 0 |
12f3cb2e8db3aa313437b057f8aa34c4 | 0531a6efff4a61804a9e17d651b3b37a | Set the model's last updated date whenever meta changes. | protected function DatefieldsUpdateHook()
{
$this->lastModified = (new \DateTime('now'))->format('Y-m-d H:i:s');
} | 1 |
bb4fa33b40f021bd988464c0fff8ec97 | 96a58e5abcd8e6d65f3006d7234f329f | Renders a PDF report to a temporary file | {
if (!$format) {
$format = FormatFactory::letter();
}
$html = $this->twig->render($template, $context);
$localHtml = $this->makeUrlsLocal($html);
$tmpFilename = $this->createTmpFile($localHtml);
try {
$pdf = $this->renderInPuppeteer($tmpFilename, $format);
} finally {
unlink($tmpFilename);
}
... | 1 |
5c0967f9c7d8e25fb48899a78e12805b | 01a3876441179754bb48d4d6ec93d749 | Write an unsigned 64 bit value in LEB128 format. Up to 10 bytes required. | void BlockStorePayload::WriteUInt64LE(uint64_t val, vector<BlockStoreByte> *vec)
{
vec->push_back((val & 0xff));
vec->push_back((val >> 8) & 0xff);
vec->push_back((val >> 16) & 0xff);
vec->push_back((val >> 24) & 0xff);
vec->push_back((val >> 32) & 0xff);
vec->push_back((val >> 40) & 0xff);
... | 0 |
b35377aff44b9fc19c3ffc3d12ec1b5a | 2c366e573dfe15c7dfbd23594328799e | 指定单位下批量新增知识点 | foreach ($knowledges as $key => $value) {
$map[] = array(
'question_id' => $question_id,
'knowledge_id' => $value,
);
}
$status = $this->addAll($map);
return $status;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.