query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
75e879df55983c118361f2e95d4cae23 | 3438c3beda1099bcd7795ff8e677be2f | Enables a given exercise for a given user. | {
using (SqlConnection conn = Connection)
{
conn.Open();
using (SqlCommand cmd = conn.CreateCommand())
{
cmd.CommandText = "INSERT INTO StudentExercise (StudentId, ExerciseId) VALUES (@StudentId, @ExerciseId)";
... | 1 |
f1a0c88b12633176d2ae583679c0a270 | 6a6b7a849fb2b4b9b5afe24e79129f8b | Удаление файла данных | class MainModel(object):
def remove_data(self, data_file):
os.remove(data_file) | 1 |
b511d225306612d73987185608a47482 | fe88ca9003d76c52a1c18452b70c400a | 初期化済み、かつ正常動作中なら何もしない。 | namespace Live2D.Cubism.Framework.MouthMovement
[RequireComponent(typeof(CubismMouthController))]
public sealed class CubismAudioMouthInputFromCri : MonoBehaviour
private void TryInitialize()
{
if (IsInitialized)
{
return;
}
Target = GetComponent<CubismMouthController>();
} | 1 |
39902445c9460c6d9bd5bbc3ce0f6f89 | 2c640d54f08a13814c85011fc3fba5cd | Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive response model. | namespace System.Web.Http
Task<HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken); | 0 |
73c24ee2bfb4321bfc24f03d28c039b8 | d574b695def287ec05d78f55e4153620 | Destroys the speech recognizer | public class ActivityCaptureVoix extends Activity
@Override
protected void onDestroy(){
mSpeechRecognizer.destroy();
mRecoEnCours = false;
super.onDestroy();
} | 1 |
7632e05c696dde9478a148fec55835df | 7aa8213e9b5da48fad5bc59afb27863d | 检查是否可以购买开宝箱次数 | if Data.getItemNum(id) < num then
gShowNotice(gGetCmdCodeWord(CMD_MINING_OPEN_BOX,34))
return false
end
return true
end | 1 |
f615f6c8e9ccfa66403ced8916eec6b0 | 5b6cf760dddf44586be6eed1a8943ac7 | 返回指定party下级的party列表 | @Repository("CCPartyManager")
public class CCPartyManager extends ManagerBase
public List<CCParty> getCCPartyListByParentId(String parentId,String showEnabledStatus) {
DaoPara daoPara = new DaoPara();
daoPara.setClazz(CCParty.class);
if(StringUtils.isNotEmpty(parentId)){
daoPara.addCondition(Condition.EQUA... | 1 |
c56ff588695f00f55f10943f37325faf | a52b3f7d4b2ddde0188f32609a88a0d1 | Applies defaults to missing MIME header values. | class SMTP
protected function dealDefaultHeaders() {
if (!isset($this->headers['from'])) {
$this->headers['from'] = (empty($this->from[1]) ?: $this->encode($this->from[1])) . '<' . $this->from[0] . '>';
}
if (!isset($this->headers['to'])) {
$this->headers['to'] = '';
... | 1 |
834098c37014cfe09b1f53e14f242e57 | e8c09435d90b79bf2d1b65f4f6402aba | 根据出发日期范围获取产品 | public List<BusyLandingProductVo> batchGetLandingProductVoListByDate(Date startDate, Date endDate,
List<Long> promotionIds, Integer startRow,
Integer endRow); | 1 |
0f45312e6c0348653c8fd177064610b8 | 0f1acaf3b966fad2814cfec87d4d8c55 | creates one record in Redis DB if record with that Id is not present | with await request.app.redis_pool as redis:
await redis.execute('set', key_id, json.dumps(request.json))
return response.text("Stored!", status=201) | 0 |
b66502be75422af59316011df838fb22 | b4eb111750b3c2fc592fd75e24e80b25 | 获取所有未标记文章url | class UrlManager(object):
def get_uncrawled_urls(self):
return TbUrl.query(
[TbUrl.method, TbUrl.url],
filter=[TbUrl.is_crawled == 0]) | 1 |
9f13e9f40d0ab1530ffe0bbe5007e89b | 6e065242ce1e6d5798d445345a26c212 | List the names of all short-valued feature processors, separated by space characters. | List getProcessorTypes(); | 0 |
7d09dbb2a9b2837bc2b2197c6ea83c25 | 6a2328880a0a6cc9f5ecf98c1f5828bc | Calculate an identifier for the event. Since it is calculated with external data, there is no guarantee this
will be unique, but it will be very likely.
<p>
This is conceptually similar to the {@link #hashCode()}, but with a bigger chance of uniqueness, since we use
a string. | default String identifier() {
return null;
} | 0 |
cdd43e5d3cc8fe53e0ddf16b7dfd4a45 | 8c26eebddfa47093710189d6df0f6d7f | pub the joint state of each joint of our robot to change the state of robot in rviz | def send_joint_state_to_urdf():
joint_state.header.stamp = rospy.Time.now()
joint_state.position = [upper_arm_1, upper_arm_2, upper_arm_3, upper_to_elbow_1, upper_to_elbow_2, upper_to_elbow_3, elbow_to_lower_1_A, elbow_to_lower_2_A, elbow_to_lower_3_A, elbow_to_lower_1_B, elbow_to_lower_2_B, elbow_to_lower_3_B, end_e... | 1 |
0ff0d4451c366aca04828acaa3199d32 | aa2e32c9c5908062d0ebbdf5ae25d0c9 | Generator to yield Objects (e.g. Users) from an IrodsStore. | for fn in self.prefixed(prefix, *args):
try: obj = Object().load(fn)
except: logging.warn("fail %s" % fn) ; continue
if "deleted" in obj and obj.deleted: continue
yield obj | 1 |
1bd7f877c77728942d29e8fd46e7e659 | adb821d2d9a9c60aeffa204e21841c22 | Gets the value of CurrencyCode attribute. | {
if (this.Key == null) return null;
return this.Key.CurrencyCodeSort;
} | 0 |
d7f17334e243cd5d63e1792d2b78e1ef | 75c088735119bf0e27735dacea76490c | Listagem de todos os estados de conservação | [HttpGet("tolist")]
public async Task<ActionResult<List<Conservacao>>> Get() {
try {
List<Conservacao> lstConservacao = await _conservacaoRepository.Get();
if (lstConservacao == null) {
return NotFound();
}
r... | 1 |
caca9ca68315e348c77bdf628faf84d7 | 28fc2b97231d53322fcae7eae1f96dbc | Get Applications with their related Hub Subscriptions. | opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("google-native:apigee/v1:getApp", {
"appId": args.appId,
"developerId": args.developerId,
"entity": args.entity,
"organizationId": args.organizationId,
"query": args.que... | 0 |
59a2421015ddd2121e7fae99ff4c1a9c | 34391ea40b9a64add63a4d1507b9e62a | Calculate Distance between GPS coordinates with Haversine Formula (returns in m) | val earthRadiusM = 6371000;
val dLat = toRadians(lat2 - lat1)
val dLong = toRadians(long2 - long1)
val a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.sin(dLong/2) * Math.sin(dLong/2) *
Math.cos(lat1) * Math.cos(lat2)
val c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(... | 1 |
741420499c343372f2bd959bdcdde850 | 8fb18809f2a7a279858d3cd31fce48e9 | Make iterable into \RecursiveIteratorIterator | if ($iterable instanceof \Iterator) {
return $iterable;
}
if ($iterable instanceof \IteratorAggregate) {
return $iterable->getIterator();
}
if (\is_array($iterable)) {
return new \RecursiveArrayIterator($iterable);
}
return new \ArrayIterator([$iterable]);
} | 0 |
7a15134c806f2b262c86c3575a003cb6 | eb519ca7665f9641f4cb0654c09a3ff1 | interrupt config for ordinary external interrupt on PD2. | void h2d_config_intr(void *pv){
INTR_CTRL->SOFTWARE_INTR_2 = 0;
INTR_CTRL->SOFTWARE_INTR_2_EN_AP = 1;
INTR_CTRL->SOFTWARE_INTR_2_EN_M4 = 0;
NVIC_ClearPendingIRQ(SwInt2_IRQn);
NVIC_EnableIRQ(SwInt2_IRQn);
MISC_CTRL->LOCK_KEY_CTRL = 0x1ACCE551;
IO_MUX->PAD_43_CTRL = PAD43_FUNC_SEL_AP_INTR | PAD_E_12MA | PAD_OEN_NO... | 0 |
3c6d3dd50d3384d232661c7579334a4a | 37109d795a4a54303d97181d8716f71d | @brief Object that helps with keeping track of URLs in file-manager like interfaces. | class URLDocumentation():
def __init__(self):
self.url_docs = dict()
self.id_to_url = dict()
self.current_id = 1 | 1 |
b57c4f714072a8e594cd63d5306fbaa7 | 5b9c0ff974eefcb2b3682c40eae3cfa4 | Gibt die Optimierungmethode (Maximierung: true / Minimierung: false) zurueck. | public class ResultEquationNP
public boolean isMaximize()
{
return this.maximize;
} | 1 |
0615d226943ce3255e9a1685662033a7 | 5ff1e6fd1e2c62a760d08816ad72176b | 获取客户收入明细 | namespace XBase.Business.Office.FinanceManager
public class ReceiveVerifictionBus
public static DataTable getIncomeBillbyCust(string Custid)
{
try
{
return ReceiveVerifictionDBHelper.getIncomeBillbyCust(Custid);
}
catch (System.Exception ex)
... | 1 |
64340b09d4b9b95fc82ca35a32fc8e26 | bd83e322f0eb5b63ea6c6d582101524a | Clears the set of watched files. | {
foreach ($this->watch_files as $wd) {
inotify_rm_watch($this->inotify, $wd);
}
$this->watch_files = [];
} | 1 |
871e6faed87dc4460ba046f371fb72ff | 35f2cc760cb4c1ba2285c5628ac9b6ca | Send tweets in the queue | tweetsTemp = []
last_id = -1
try:
while len(tweetsTemp) < qt_tweets:
count = (qt_tweets - len(tweetsTemp)) if (qt_tweets - len(tweetsTemp)) < 100 else 100
fetched_tweets = self.api.search(q=query, count=count, max_id=str(last_id - 1))
i... | 0 |
7f83d4925468c681f0478ee39b8252ad | f06c80f3774629d6272df122abc33f48 | Detect whether previous checkpoint is hierarchical or not. | class TrainLoop:
def _is_checkpoint_step(self, n_steps_per_checkpoint: int) -> bool:
return (self._step - 1) % n_steps_per_checkpoint == 0 | 0 |
63d73d5a178b27792b9e8ac136aef554 | 3227ec4ead864d49cf041a4211b1c7fd | Sets the maximum number of bad records that can be ignored.
BigQuery can ignore when running the job. If the number of bad
records exceeds this value, an invalid error is returned in the
job result. The default value is `0`, which requires that all
records are valid. | class JobSpecPatchArgs:
def max_failed_indexes(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "max_failed_indexes") | 0 |
9a8acd6f712886605176081637c26661 | 7aa32b2747266815574b88e7e7020b12 | Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network. The default is TRUE. | class GetPacketMirroringResult:
def enable(self) -> str:
return pulumi.get(self, "enable") | 1 |
87d455a064c67f3ae60ff9f931eba1d0 | 701f30f0cdcee66529eef37b941c4ad4 | Hiển thị danh sách HistoryDepartement của nhân viên | {
$history = DB::table('histories')
->join('profiles', 'histories.employee_id', '=', 'profiles.employee_id')
->where('histories.employee_id', '=', $id)
->select('profiles.employee_id', 'profiles.employee_name',
'histories.id', 'histories.place', 'histories.jo... | 1 |
1763c6450ff69edc5d3edee472788cc1 | cc4ac16fac793e4b1ee88b0f5d060052 | Formats the Vision API response to a readable version. | const {baseUri, results} = responseData;
return results.map(result => ({
...result,
image: `${baseUri}${result.image}`,
imageUrls: (result.imageUrls || []).map(image => `${baseUri}${image}`),
}));
} | 1 |
479bf0b28783e84923f2b063534ed81b | b0aeb28dd131b97c1b41d43030961f1d | Resets encryption IV, master and transform seeds to (securely) random values. | namespace AK.F1.Timing.Live.Encryption
void Reset(); | 1 |
6ac78672cfc67b63e99dd6254393186e | d28d381824ec1be1f1a0b93d5e5d116c | Exit a parse tree produced by {@link gParser#copy_source}. | public class PostgreSQLParserBaseListener implements PostgreSQLParserListener
@Override public void exitCopy_to_statement(PostgreSQLParser.Copy_to_statementContext ctx) { } | 0 |
824bd34438b32a37d88610fb29124535 | d6c3ed3ce9c03068844d2ed2b31feae2 | 关闭日程详情 | $('pnlDetail').style.display = "none";
$('panel_calendar').style.display = "block";
clean_box_banner();
hide_banner();
$('box_banner').style.height = "auto";
init_calendar();
hide_episode();
} | 1 |
35a7ab3404ee442d832d7194d333f816 | 58cea1d9a0dd11e09414c1dfa75ddd8c | Generates a cost matrix for linking positions in two conditions.
Cost based on Euclidean distance.
If matrix is not square (uneven number of elements in positions0, 1),
augments the matrix to allow for births and deaths prior to Munkres. | def pad_cost_matrix(cost_matrix, unassigned_cost):
if unassigned_cost == 0.0:
return cost_matrix
r, c = np.shape(cost_matrix)
n = r + c
float_max = np.finfo(np.float).max
padded_cost_matrix = np.ones((n, n)) * float_max
padded_cost_matrix[:r, :c] = cost_matrix
padded_cost_matrix[r:, ... | 1 |
846733a591572d95bb250801548600bf | 1cea22044f34b54622f0b2ea72161ff2 | Decode a int64_t from a byte stream by inverse integer scaling from 8 unsigned bytes in little endian order. | def float64ScaledFrom6SignedLeBytes(byteA: bytearray, index: list, invscaler: float) -> float:
return invscaler * int48FromLeBytes(byteA, index) | 0 |
8e69d2a4d5892ce8f4d251830d6428c5 | 07b8718ce10f2f93ed8a7cef9409fb2e | Sodium current without oscillations | def sc():
S_z = 0
S_y = 1
Z = S_z/I_yy
Y = S_y/I_zz
q_s0_I = ((h/t_sp)+((2.*s_1)/t_sk))**-1 * (-((1./3.)*s_1**3*cos(alpha) + (1./(6.*t_sp))*s_1**3*t_sk*cos(alpha) + (1./(6.*t_sp))*h**3*t_sk)*Z - ((1./6.)*s_3**3 + (1./3.)*s_1**3*sin(alpha) + (1./(6.*t_sp))*s_1**3*t_sk*sin(alpha) + (1./(6.*t_sp))*h**3... | 0 |
51561cb5e3c40f36851cc7d8382530c7 | e5caa5427ed081d988d8be70bf29e5f0 | Decrypt response before returning | decrypt_response(CtxtHandle *handle, char *inToken, int inLen, char **outToken, int *outLen) {
SecBufferDesc buff_desc;
SecBuffer bufs[2];
unsigned long qop = 0;
int res;
buff_desc.ulVersion = SECBUFFER_VERSION;
buff_desc.cBuffers = 2;
buff_desc.pBuffers = bufs;
bufs[0].BufferType = SECB... | 1 |
cb0f29ed8b682cd78aff2cd8260cc481 | f682e4af20b441df02d41c1fa4fb5142 | shows the count of pieces that are in reserve for the given player | public class Board
public int getPlayerPieceCount(Player player) {
int count = 0;
for (Node n : nodes)
if (n.getOccupant() == player.getPiece())
++count;
return count;
} | 0 |
b0ebc2669b27b25ab9d5945cf164a9f3 | 02981eb63083fbd37dd5975cac67b3a8 | Maps worker nodes to core nodes. | class GroomingCoordinator(object):
def _update_assignment(self, workers):
workers.sort(key=lambda name: name.rsplit('-')[1])
self.total_workers = len(workers)
try:
self.index = workers.index(self._node)
except ValueError:
self._register_groomer()
workers = self._zk_client.retry(self._z... | 0 |
c73252df6328d9c57f21739d0ccd76c8 | c4f66a9c46558c461f97b44ae3d83a1e | retorna true se a arvore rubro negra estiver vazia e false caso contrario | public class RBT<E extends Comparable<E>>
public boolean isEmpty(){
return root == null;
} | 1 |
e8e4b7bc54b8dce8be451aefc8a84725 | 13a4478a8b1508018fc7de447bbeb974 | Convert Kilometers per Hour to Miles per Hour | public static class ConvertUnits
public static float MpsToKmph(float num)
{
num = num / THOUSAND * ONE_HOUR;
return num;
} | 0 |
f358f7f67967ff771e0f5efdbea2efee | 478a34e79b39faf14d46709a1a1187d1 | Retrieves state(fx 'Alabama') or province(fx 'Nordjylland'). | function M.stateOrProvince(str)
asserts.AssertstateOrProvince(str)
return str
end | 0 |
ea5d947ac4389adfafae2027cd58718a | b66062fd4eb2510adaec1d2d060a416c | Test whether the touch-pin is touched. | synchronized(this){
int index= getIndex(pointer);
if(index < 0 || index >= MAX_TOUCHPOINTS) return false;
else return isTouched[index];
}
} | 1 |
956033416b4ca42a8f77b2d4e81d1ac8 | b109c9f61410555c6a555256c06ada9e | Loop through available textboxes, storing the string
if textbox's ID does not equal exceptionID | if self.textbox_id.text():
global AMS_NET_ID
AMS_NET_ID = self.textbox_id.text()
self.lbl_config_id.setText('AMS Net Id = ' + AMS_NET_ID)
if self.textbox_port.text():
global AMS_NET_PORT
AMS_NET_PORT = int(self.textbox_port.text())
... | 0 |
ccc981082168446a4b999097a2701bd4 | 12771c6c76dc4d3628fbe66a956364e5 | Converts a list of integer quals to a sanger-encoded string. | if beg:
yield str(beg) + "S"
for k, v in itertools.groupby(alignmentcolumns, CigarOperationWithCorrectBases):
yield str(sum(1 for _ in v)) + k
if end:
yield str(end) + "S" | 0 |
18aaa31be4578e30ac2b07f73704299a | 94380ca8c2a1b80462977e2a69cfedd7 | Get the configured slide auto of section | class Turiknox_Homesliders_Block_Sliders extends Mage_Core_Block_Template
public function getSlideshow()
{
return Mage::getStoreConfigFlag('homesliders/slider/animate');
} | 0 |
f4f859a9bf6defc9fa41763a801d6627 | 52e84eeacca14ff8ecc95e1f8ddc51d2 | Export an element from the page as a PDF formatted data URI | {
SaveFileDialog dialog = new SaveFileDialog()
{
DefaultExt = "png",
Filter = "Png (*.png)|*.png"
};
if (dialog.ShowDialog() == true)
{
using (Stream stream = dialog.OpenFile())
{
... | 0 |
0209f0418b48ef1a44541b149c232bd6 | ad57ba661b0b8482ea0cc2cb50399fa5 | 获取基本对话框 不带标题 | public class DialogView
public MaterialDialog showBasicDialog(String psTitle, String psContent,
String psPositiveText, OnSingleButton poOnSingleButtonPositive,
String psNegativeText, OnSingleButton poOnSingleButtonNegative,
... | 0 |
43c83088e0fe202f1cbc07e482e2f2d3 | 877bf9ccb520e1e35cbc1b69c079aa65 | Get raw incoming data (non-parsed & non-decoded) | if (static::$rawData === null) {
static::$rawData = file_get_contents('php://input');
}
return static::$rawData;
} | 1 |
4e63777307dfc3c4380e424dbd869e25 | ada1d18021e07d9bf06f98bd5de78f8f | Obtener equipos de un usuario. (Como Capitán) - MODULO LISTAR EQUIPOS | class EquipoController extends Controller
public function index()
{
$user =Auth::user();
$equipos=$user->equipos;
return view('entrenadores.entrenador',compact('equipos'));
} | 1 |
87f2f529f4d8e05205dfcc2a1e426a89 | 306965db22e5a9af7fbac589dc3fc79a | 将data字节型数据转换为0~255 (0xFF | namespace _8寸灯具参数指令解析
public partial class Form1 : Form
byte DataTypeConversion(int RawData0)
{
byte Result = 0x00;
switch (RawData0)
{
case 48: Result = 0x00; break;
case 49: Result = 0x01; break;
case 50: Result = 0x02; br... | 0 |
c3ab8d6e97f04305fb62ad09a19f1abd | ad338e65c587df9f19edb422aa44194e | Gets coordinates of box at mouse coordinates | for boxx in range(BOARD_WIDTH):
for boxy in range(BOARD_HEIGHT):
left , top = left_To_Top(boxx,boxy)
boxRect = pygame.Rect(left, top, BOX_SIZE,BOX_SIZE)
if boxRect.collidepoint(x,y):
return (boxx,boxy)
return (None,None) | 1 |
2cdcba93712403563c7039cb6906fd29 | 294157a00a6d9ec3c234dfd719e19809 | 使能定时器10外设时钟 | {
if(htim_base->Instance==TIM1)
{
__HAL_RCC_TIM1_CLK_ENABLE();
HAL_NVIC_SetPriority(TIM1_UP_TIM10_IRQn, 5, 0);
HAL_NVIC_EnableIRQ(TIM1_UP_TIM10_IRQn);
}
} | 0 |
603bc2753364e39ef9f9aca7135f043f | a9a4560b1a477ad724c9c127e46f29d2 | Función para filtrar el menu de departamentos | class DepartmentController extends Controller{
public function searchDepartment($req){
$departName = trim(Filtros::post_check($req->param('key')));
$department = Box::getObject('department','model','admin')->getAllDepartment(' and rolename like ? ',["%{$departName}%"]);
if($department === false)... | 1 |
09c0c83b8f9f2cf6d0733ecb1f580ccd | 70799a49d9943a722483baea4f38edd3 | 线程池队列满了之后等待 | void CThreadPoolFactory::Wait()
{
while (!is_stop_all)
{
CThread::Sleep(100);
}
} | 0 |
36af3db8f47ed5186d422f2b5b81966c | 192c3d1f27ef5317d41c6428711d1cb1 | Positions the vertices of the graph in a linear fashion | List<int> usedVerts = new List<int>();
for (int i = 0; i < mesh.TriangleIndices.Count(); i++)
{
if (usedVerts.Contains(mesh.TriangleIndices[i])) {
mesh.Positions.Add(mesh.Positions[mesh.TriangleIndices[i]]);
mesh.TriangleIndices... | 0 |
8cc5a74a12ccf8f833f99690ab53c1ca | 71f4634c6f63307c0145a1279e78a32d | Detect balanced parens | function check_my_parens($myregexp, $markedline) {
$parens = array();
$sqbrackets = array();
for ($i = 0; $i < strlen($myregexp); $i++) {
$escaped = false;
if ($i > 0 && $myregexp[$i - 1] == "\\") {
$escaped = true;
}
if (!$escaped) {
switch ($myregexp... | 1 |
db8e2b4baaa9b74a9436ae940f2b9bef | 4188d0d7a33b73b116e0016203f6c742 | Marks the block represented by a memoryview object as "free".
Expects the memoryview to be the one returned by `alloc` by checking
for the existence of an `allocated` boolean attribute and will throw
an AssertionError if the attribute doesn't exist or is not set to True.
NOTE: the memoryview describing the block is not... | assert isinstance(block, memoryview), '`block must be a memoryview`'
assert hasattr(block, 'allocated'), '`block` must have an `allocated` attribute'
assert block.allocated is True, '`block` must be an already allocated one'
block_idx = self._find_block(block)
block.allocated = F... | 1 |
9393f36a2fb6188d0cc220b386847fea | f5c890ac3d03440cc21601e72f449599 | Returns additional build output directories of the associated source set.
That is, directories added by the {@code org.gradle.api.tasks.SourceSetOutput.dir}
method.
This method never returns {@code null} and does not contain
{@code null} elements. | SourceDirectorySet srcDirs(Object... srcDirs); | 0 |
362c57a3812e7c0ba4111e463473681c | e3dcffdc602e8e42b8a7cd12377f74d5 | 保存身高体重检查情况 | public ModelAndView saveHealth(ModelAndView mav, HttpServletRequest request) {
Map<String, Object> map1 = new HashMap<String, Object>();
Map<String, Object> map2 = new HashMap<String, Object>();
Date d = new Date();
SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd");
... | 0 |
1fcac53d4606c42b89b8003b301e22e7 | 7aba6edd89fccee3cace945da48b64c3 | проверим что конструктор копирования верно создает размер матрицы и аллоцирует память | SUITE(Matrix4D)
TEST(constructor_copy)
{ int n = 999 ;
for(size_t i=0; i<10; i++)
{ for(size_t j=0; j<10; j++)
{ for(size_t k=0; k<10; k++)
{ for(size_t l=0; l<10; l++)
{ std::vector<size_t> dim = {i,j,k,l} ;
Matrix4D... | 1 |
e9c03f164eaf83f50c9367e722b0bd1c | ca612f9c63fdf8380be9feeda2753653 | Gets the current numbers in the entry field and adds an addition symbol to it when pressed. | void scientificWindow::addPressed() {
QString labelText;
QString addUnicode = QChar(0x002B);
if(ui->lineEdit->text() != (QString)"") {
labelText = ui->lineEdit->text() + addUnicode;
}
else {
QString lastMem = mem.recentMem();
labelText = lastMem + addUnicode;
toParse ... | 1 |
ffbc69bd820dfeea36dd0088c9ab3a59 | 45b61b4dcd62a8a5328b08af9bdd5e93 | 将数据压入堆栈 | namespace ZyGames.Framework.Game.Service
public abstract class GameStruct
public void PushIntoStack(DataStruct obj)
{
dataStruct.PushIntoStack(obj);
} | 1 |
02d89530794ac80e5a1d9fe0d6a59d87 | 7dd0defbcfc45839f108dfd4ee8573fd | 获取宝箱内容 | HttpClient:request({
moduleName = "TimedGoldenDragonTreasure",
methodName = "GetReward",
svrMethodData = {boxId},
callback = function (data)
if data.Status ~= 0 then
return
end
if data.Value.NextIsDouble then
self:createDoubleFlas... | 1 |
c2500d9f8e20a9958e75f0bab0813381 | ac50d7094d250c95e8cee6dbc379d869 | Returns the model of this dms poc. | public M getModel(); | 1 |
d1a8ac8d4107b2fd9f2c196f1fb074cc | 4d29a9dd0851f0eaa29eb1a426ae51a7 | KMP count: 采用kmp算法统计S中P匹配的次数 | int kmp_cnt(char x[], const int m, char y[], const int n, int next[]){
int i,j;
int ans;
kmp_next(x,m,next);
while(i<n){
while(-1!=j&&y[i]!=x[j]) j=next[i];
i++,j++;
if(j>=m){
ans++;
j=next[j];
}
}
return ans;
} | 1 |
4aa643ba049d2aa8ef4e6d3f8286f8fa | da06b05607b9f8d1fc790f4a8cfd4a38 | !
\brief sets the Timer 0 (8 bit timer) Output Compare Register
\note OCROA only works in CRC mode | void Set_Timer1_OC_Value(uint16_t value)
{
OCR1A = value;
} | 0 |
55a9cfd9db0864a03614d00ad51b266d | 97b91ba60ba63fa6669af0a0434e81be | tong so sach cua dau sach dang duoc muon | namespace BT6_C5
class BT6_C5
static void LaySoXH(ListQueue B)
{
if (B.Front == null)
{
B.EnQueue(1);
}
else
{
int tam = B.Rear.Data;
B.EnQueue(tam + 1);
}
XuatB(B);
... | 0 |
6e785ca3cb1dda2f3def9fe2d6da54c8 | 0b56eebd3a481d746ab816ad659df9af | 格式化Markdown数据 | if not template:
from .config import MDSTYLE
template = MDSTYLE
baseUrl = 'https://leetcode-cn.com/problems/{}/'
titleSlug = data['titleSlug']
topicTags = data['topicTags']
similarQuestions = data['similarQuestions']
topicTagsZh = '、'.join(i['translatedName'] for i in topicTags)
... | 1 |
e8d63437b24ad91ee5ed6f2dad6fa34d | 029f11e1dd8accbe1eafe2eaefb2768e | Subsumes the "rdfs:subPropertyOf" taxonomy to discover direct and indirect subProperties of the given property | predicates = Set[predicates] if predicates.is_a? RDF::URI
unless predicates.is_a? Set
raise "predicates must be a set" unless predicates.respond_to? :to_set
predicates = predicates.to_set
end
return predicates if predicates.empty?
raise 'predicates must all be RDF::URI' unless predicat... | 1 |
2d0dfed96e060d1955313794310e8407 | eed1a3bdfcbdc84df9695183f06c558f | 根据区块数据以及nonce生成字节数组 | byte[] prevBlockHashBytes = {};
if (StringUtils.isNotBlank(this.getBlock().getHeader().getPreviousHash())) {
String prevHash = Numeric.cleanHexPrefix(this.getBlock().getHeader().getPreviousHash());
prevBlockHashBytes = new BigInteger(prevHash, 16).toByteArray();
}
... | 1 |
94afdf18a24534109bd45049aaad7ee7 | 1aa287525bfa040aad257d8331f70d2b | Updates the process filter with localization. | {
if (dto == null) throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.NullArguementException, "dto"));
using (var ctx = ConnectionManager<SqlConnection>.GetManager(Database.VeyronMeta, false))
{
var connection = ctx.Connection;
... | 1 |
fcf9c1a6f3bfd3a72caa5955faabb3ff | 628cefda833b601dd45fb5ab8b44f2de | 从数据库查询数据,写入到指定目录下文件中 | current_path = get_current_path()
work_file = get_work_file(current_path)
work_file_list = get_work_file_list(work_file)
put_data_in_database(work_file_list, work_file)
return HttpResponse('haha') | 0 |
e57725318347b93a06f7e476a4349ea1 | 1360a90ebce810740e05ce856ed6d00a | Send auth error response with default json format | function initAuthResponder(res, defaultStatus = 200)
function sendAuthResponse([authResult, status]) {
res
.status(status ?? defaultStatus)
.json(authResult);
} | 1 |
cbba76b34534cecc47922888ad9367c3 | e9ed583a9d487bc3aa1aa5aeb2be75a9 | Конвертировать библиотеку растений в массив строк | {
if (TypeName != "")
{
XmlNode TypeNode = XmlHelper.Find(TypesDoc.DocumentElement, TypeName);
List<string> CultivarNames = new List<string>();
XmlNode ModelNode = XmlHelper.FindByType(TypeNode, "Model");
if (ModelNode != null)
{
... | 1 |
0ebb3595b9ef04151fcdb27e108d4a96 | 1fb0b96a037b981cab570fc786c5a6d1 | 배치 작업할 고객케어 목록을 조회한다. | List<BtchWrkVo> selectBtchWrkList(BtchWrkSearchVo searchVo); | 1 |
c7aad3bbb66ffb5e9f15d955bb42e484 | 6deb6c45c3d555b93dbb75c9ac66efff | key为queueId | *getQueue({payload}, {call, put, select}){
yield put({type: 'save',payload: { queueList: {}}})
const params = {
pageNum: 1,
pageSize: 1000,
...payload,
};
const {code, data} = yield call(api.getQueue, params);
if(code == 200 && data){
let map= {};
da... | 1 |
d8e91008cbfe91fb53193d1e6010c387 | 89306616a89dc7e801228729661fb2e6 | Disables the specified listener. | {
if (!Listeners.Remove(listener))
{
throw new ArgumentException("The provided listener was not present in the Audio System.");
}
} | 0 |
8d8d00837624975a1fb5c23886a5719c | 3e888b0a13bc2cc10e755dd3e7d5a540 | 根据快递号获取订单对应的发货单信息 | YouzanLogisticsGoodsexpressGetResult getOrder(String expressNo, Integer expressId); | 1 |
fa14531b72eef2a42cf806a1826390f2 | 7181d7b845e7884d7426185379b7a3b5 | Render the secondary categories on the page.
Secondary categories are dependent on the primary category selected. | class Related extends \CWidget
public function run()
{
if( $this->categoryId )
{
$model = CategoryHelper::findById($this->categoryId);
if( $model !== null )
{
$parent = $model->parent()->find();
if( $parent !== null )
... | 1 |
c25c56c3146f3c75c7c946239908cc62 | 4c1ff9aa5b7123dffecd76e2e47d3dfd | 待判断雷区 | public class EnemyAI: MonoBehaviour, INowPutBombNumMinuse
public bool IsDangerousArea(Grid nowGrig){
dangerousList.Clear();
safeList.Clear ();
Bomb bomb;
Bomb [] _bombnum = GameObject.FindObjectsOfType<Bomb> ();
_dangerousMap = _map.GetCopyMap();
bool isCreateUpBomb, isCreateDownBomb, isCreateLeftBomb, isCr... | 1 |
b5a8c163dd034fd73e5443cf4c160c31 | 2d80bf9a46f3258b1d398854c8c0d78c | Returns data measured using LIDAR. Make sure robot you use has a lidar | def getLidarSnapshot():
return lidarController.list_of_points(350, 10) | 1 |
ad51a2932e4544cb715cf1e7e22d13f3 | e39085d9c5a3eabce8614e99d97df65e | Sets the appropriate duty cycle register to the correct value based on the percent duty cycle
passed in. | void update_duty_cycle(uint8_t dc){
setup_sw_timer();
new_duty_cycle = dc;
sem_post(&pwm_step_sem);
} | 0 |
cecb9ae33365a8dc146aa17cc1421dc4 | 7a32f70c03e3cfeedc2023bfd7eb06f5 | Updates the current TreeModel according to the current set project
folder. | self._loading = True
config = wx.ConfigBase_Get()
openFolderData = config.Read(getProjectKeyName(self.GetDocument().GetFilename(), self.GetMode()), "")
if openFolderData:
folderList = eval(openFolderData)
folderItemList = self._GetFolderItems(self._treeCtrl.GetRoo... | 1 |
7a7a8cb761652714a2438dcd9a771420 | f2de3b671e352ed05173667c2d6b1a96 | This function displays the expense name, amount, and who paid in a user friendly format. | class Transaction(models.Model):
def __str__(self):
return '"' + self.name + '": ' + self.payer.user.username + ' pays ' + self.payee.user.username | 0 |
4b8dad2b660b6702c3c6877da1051a9c | 3759cac221e79c532fd53f1e626fe23d | Fill the input buffer with *one* line of input.
The line is '\n' terminated so that scanning
messages with translation works as expected
(otherwise we cannot pre-translate because the
language is first known one line before the
actual message). | void win_textgrid_init_line(window_t *win, void *buf, int unicode,
int maxlen, int initlen)
{
window_textgrid_t *dwin = win->data;
if (dwin->curx >= dwin->width) {
dwin->curx = 0;
dwin->cury++;
}
if (dwin->cury >= dwin->height) {
dwin->curx = dwin->width-1;
dwin->cury... | 0 |
d2fdac45cbacb082714c92211a05f6f9 | 91ea31ed9b1107d6717278310612df97 | 获取已提交材料信息 | function getSubmittedList(this, data) {
let config = qcxUtil.getSettings({
url: '/api/inspection/getMySubmit',
data: data
})
return this.$axios(config)
} | 1 |
241377fc4e2ad25ff95c46613d241fd6 | ac2c795c17bb04fe967b749942412b06 | Obtiene y retorna lista de subtemas de este tema de incidencia.
OpenUp Ltda. Issue #281 | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "subforo", propOrder = {
"nombre",
"seccionId",
"subforoId",
"subforopadreId",
"subforos",
"temas"
})
public class Subforo
extends ReturnedObject
public List<Tema> getTemas() {
if (temas == null) {
temas = new ArrayLis... | 0 |
d6bf269dbda413cd2e2cdc1fc4cb4ec1 | 833f6cc94888838b4c66ecd5d473a260 | Uses the HTTP header for content negociation. | gst_curl_http_src_negotiate_caps (GstCurlHttpSrc * src)
{
const GValue *response_headers;
const GstStructure *response_struct;
GST_INFO_OBJECT (src, "Negotiating caps...");
if (src->caps && src->http_headers) {
response_headers =
gst_structure_get_value (src->http_headers, RESPONSE_HEADERS_NAME);
... | 1 |
5702e3e9a6f9c72658d95a972e5dc2c0 | 80735b57c196212ea60226dad388ea01 | Returns <CODE>true</CODE> if recovered transactions exist. This method
is useful to invoke after the logical log has been opened to detirmine if
there are any recovered transactions waiting for the TM to tell them what
to do. | public class PageStore implements CacheWriter
public boolean isRecoveryRunning() {
return recoveryRunning;
} | 0 |
edd4adcde84fccd8dcf9f18ab051a313 | 54c974cf7f3c28eccd4132c6ac80423b | A template view must provide a template name | class TestCommonUpdateView(TestCase):
def test_template(self):
view = views.CommonUpdateView()
self.assertEquals(view.template_name, EXPECTED_FORM_TEMPLATE_NAME) | 1 |
f02b722974c8a9fc7c1beaaccd1fd21d | ec57d7727b82bbaa690eee12d8a30edd | Setter for <code>WETRN.V_OFFR_SLS_MS_GIFT.M_CREAT_USER_ID</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class VOffrSlsMsGiftRecord extends TableRecordImpl<VOffrSlsMsGiftRecord>
public String getMCreatUserId() {
return (String) getValue(73... | 0 |
ab68c752d6698e649c43c90a2287708b | 0afa87d71ff9b7393d00afbf8dfc8e53 | @brief Writes an amount of data in DMA mode to the OSPI memory. | uint8_t BSP_OSPI_NOR_Write(uint8_t* pData, uint32_t WriteAddr, uint32_t Size)
{
OSPI_RegularCmdTypeDef sCommand;
uint32_t end_addr, current_size, current_addr;
current_size = MX25LM51245G_PAGE_SIZE - (WriteAddr % MX25LM51245G_PAGE_SIZE);
if (current_size > Size)
{
current_size = Size;
}
current_addr =... | 0 |
01ec151ea7f7ae052821aa343bbfb3bf | 79078eb870779a00fd95f96da2ef9eb3 | Test case for delete_collection_node | class CoreV1ApiTest extends \PHPUnit_Framework_TestCase
public function testDeleteNode()
{
} | 0 |
0d1593c6a5c61a1232e7182c551ba50b | 46625a22cc5341403489e7d254ed1840 | Get candidates number | class Constituency
public function getCandidatesNumber()
{
return $this->candidatesNumber;
} | 1 |
06760161fde02a8bfbf536f541e42089 | 23fa312367b15086437678962b893766 | Shared source database backup location. | class ValidateMigrationInputSqlServerSqlMISyncTaskInputArgs:
def backup_file_share(self) -> Optional[pulumi.Input['FileShareArgs']]:
return pulumi.get(self, "backup_file_share") | 1 |
b6684add221aca917cedad3cc7a370fe | d1da653a403b6091c4cb070ce6249215 | AlmostMean | class App(cmd.Cmd):
def do_mean(self, arg):
try:
ans = statistics.fmean(float(i) for i in arg.split(','))
self.ans_his.append(ans)
print(f"{Fore.GREEN}{ans}")
except Exception as e:
print(f"{Fore.RED}{e}") | 0 |
8f5f65a5ad470dcf99a713f3e21f41ef | b4e0ce40293e81d82f54467292787642 | 读取目录下的所有sql文件,以.sql结尾的文件 | public class RqlReader
public static List<Rqlment> readPath() {
File dir = new File(SystemUtil.getClassPath() + SystemUtil.CFG_REDIS_PATH);
File[] files = dir.listFiles();
List<Rqlment> list = new ArrayList<Rqlment>();
for (int i = 0; i < files.length; i++) {
File file = files[i];
if (file != null && file... | 0 |
09353304ac5b51cf17eeea76171122ab | bef7f506a592203ad15da0324e9c20eb | Alternative constructor.
Read all the configurational properties from a Context object or
an OpenMM State object. This guarantees that all attributes
(including energy attributes) are initialized. | class ThermodynamicState(object):
def _initialize(self, system, temperature=None, pressure=None, surface_tension=None):
system = copy.deepcopy(system)
barostat = self._find_barostat(system)
if pressure is None and barostat is not None:
self._pressure = self._get_barostat_pressure(bar... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.