query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
323e384d8645e7a030337e1670aa8273 | e3ec6253380d5dc7fbe6eb53d8e6028a | 根据首部四个字节(int)判断数据是否接收完毕 | if (mData == null) return false;
if (mData.length < 4) return false;
byte lengthCode = mData[3];
if (lengthCode != mData.length) return false;
byte checkCode = mData[2];
return (checkCode + lengthCode) % 256 == 0;
} | 1 |
187219bbef61067ce8b10cf71f10f5ad | 080c04e4909c05b75127564319091ba1 | Set the latest published verison of the mod. | namespace PlayFab
public static class PlayFabAdminAPI
public static void SetPublishedRevision(SetPublishedRevisionRequest request, ProcessApiCallback<SetPublishedRevisionResult> resultCallback, ErrorCallback errorCallback, object customData = null)
{
if (PlayFabSettings.DeveloperSecretKey == nul... | 1 |
2abb8569c6ccef4ace4f22d9b0c2713c | c3b3c656e9b41311fea30cd4b47a577c | 根据Vtn事件的MRID和Ven的事件MrID获取服务商的详细信息 | GlobalResult getVenDetail(String venId); | 0 |
e47d9aa0bf0a78016ca53c6b243566eb | 09b91b305583160757ba35ff45252cce | check if low <= value <= high | function betweenOrEqualsLow(num, low, high) {
return num >= low && num < high;
} | 0 |
714277f96e2eb5e04249ec17663d2a96 | cb0440ebd1dffa2f876a769c47db126d | デフォルトのボディを返す | class Frontend(object):
def get_default_body_mode(cls):
return 'msgpack' | 0 |
9db5ef1057b4febe7aa9d030951a861f | e8372f597888f47305f98b7f85ede1cf | Set whether to use kerberos authentication | smbc_setOptionUseKerberos(SMBCCTX *c, smbc_bool b)
{
if (b) {
c->flags |= SMB_CTX_FLAG_USE_KERBEROS;
} else {
c->flags &= ~SMB_CTX_FLAG_USE_KERBEROS;
}
} | 1 |
1f6016ff9348cbc92056cefb704a3726 | f48090be66ed7829d218ab6b4a2578d0 | Incorpora los cambios de la versión propuesta de la pregunta, a la pregunta
original.
2019-10-09 | question = get_object_or_404(Question, pk=question_id)
answer = get_object_or_404(Answer, pk=answer_id)
resp_nueva = request.POST['new_answer']
answer.text_resp = resp_nueva
answer.save()
return render(request, 'questions/detail.html',
{'answers': Answer.objects.filter(respuest... | 0 |
666f17f7ebe0123222d22ea81c84dda9 | c2752db207d4e58d87bab1c619ea1364 | xuất pt nằm dưới đường chéo phụ | {
TreeNode tmp = this.Root.getRoot();
PointF vt = new PointF();
if (tmp != null)
{
vt = new PointF(512, 20);
tmp.vitri = vt;
}
if (n != null)
{
if (n.left != null)
... | 0 |
a8aef4b8f5594700f7d4df8a6a36ca02 | 507cb55b7317d902c0e9dc60992cf314 | 当天计划巡店数 | $rtndata ['states'] = 1;
$rtndata ['msg'] = "";
$rtndata ['info'] = 0;
$start_date = strtotime( date("Y-m-d") );
$end_date = strtotime( date("Y-m-d") ) + 86399;
$total = BigWebVisit::whereBetween ( 'iDateTime', [
$start_date,
$end_date
] )->count();
$rtndata ['info'] = (isset ( $total ) &&... | 0 |
f5b0c1912d4fd7b9b63c5d09f611c882 | 2fba12d655d328ba5c1861868fe07b42 | Create Texture from Tim image data. | taa_texture2d texture)
{
unsigned char offset;
unsigned char imagetype;
short width;
short height;
unsigned char bits;
memcpy(&offset, g_uitexture + 0, sizeof(offset));
memcpy(&imagetype, g_uitexture + 2, sizeof(imagetype));
memcpy(&width, g_uitexture + 12, sizeof(width));
memcpy... | 1 |
67e36768bf51375274ff4dcf9435c917 | 17bbfa1c47124a9c5fa3365070c52a74 | Removes a given car from the given field | public class CarMap extends TrafficMatrix
private void removeCar(Car car)
{
travelingCars.remove(car);
availableCars.addLast(car);
} | 1 |
28b3d58b70146cf4b901833bfbd6c641 | 7a74e0448df632bfe2ae833d222b9fed | 修改该店铺SKU的redis信息 | list_sku_task = SkuTaskControlModel.get_url(mall=mall)
for sku_info in list_sku_task:
sku_info['create_time'] = sku_info.get('create_time', '').strftime("%Y-%m-%d %H:%M:%S")
for index in range(len(sku_info.get('categories', []))):
sku_info['categories'][index]['up... | 1 |
f6435daaa8d855a2d9d711145e559c9b | bc31dd82144e9b4525998db6fdda8a83 | @brief Stops the TIM Output Compare signal generation in DMA mode.
This parameter can be one of the following values: | {
(StepMotor[no].timer) -> CCER &= ~StepMotor[no].CCER;
TIM_Cmd((StepMotor[no].timer),DISABLE);
DMA_Cmd(StepMotor[no].DMA_Stream,DISABLE);
TIM_DMACmd(StepMotor[no].timer,StepMotor[no].TIM_DMASource,DISABLE);
} | 1 |
712d7ad4e5d1a5f0de61cb492ebfa491 | 43ef532365d4d256bb8233995b5ff429 | Whether the {State} instance is sucessful. By default a new instance is successful and only
changes when explicitly {#fail! failed} | def passed?
!failed?
end | 1 |
50fb9d51f50ce494cfc6e1f79cf1d9d8 | 806505a20552533d5229104ccc748673 | Retorna las semanas cerradas. | class util(conexion):
def obtener_semana(self):
sql = f"select sum(can_ddi), \
weekday(fec_reg) from desechodia \
natural join registrodia natural join datosusu \
where id_alc = {self.alcaldia} and id_res = {self.tipoBasura} \
and week(fec_reg) = week(curdate()) \
and day... | 0 |
62bf2e1f5bda68c017e28160574887cc | aa390ce3ada2eef82736d7d389ba6ba6 | Metodo para establecer el tamaño minimo del formulario | namespace com.immortalhydra.gdtb.epeditor
public class WindowMain : EditorWindow
public void SetMinSize()
{
var window = GetWindow(typeof(WindowMain)) as WindowMain;
window.minSize = new Vector2(322f, 150f);
} | 1 |
6c5f2ae02b423522ce28ed1eed9c31d8 | 34d2fee6478d4982eba2ca34692ed343 | Скрытие формы перевода | {
edit = false;
update = false;
ListTranslate.Visibility = Visibility.Hidden;
ISearch.Visibility = Visibility.Visible;
} | 1 |
fe6c8e10462e84a7344d70fcb1e60e6a | 5f5fcceba0dec512f510566dc50ac559 | 发送命令,获取匹配到的内容 | class Linux(object):
# 通过IP, 用户名,密码,超时时间初始化一个远程Linux主机
def send(self, cmd):
cmd += '\r'
p = re.compile(r'\[([\s\S]*)\]([\s\S]*)\[([\s\S]*)\]')
p1 = re.compile(r'~\]#')
p3 = re.compile(r'\[([\s\S]*)\]\$')
print(cmd)
result = ''
self.chan.send(cmd)
start... | 1 |
69cb7aebc6a9ce0990406773ec6e8b05 | 8a02fe06f9c13119fcca403ced6c46bf | Push a Source'd file on the stack. | public class ParseDirectiveException extends Exception
public void addFile( String s )
{
filenameStack.push( s );
} | 1 |
b250457d7d99490b7badb1ef140c8215 | 854c3494977f1ca917e9a0e88fb1979c | Returns number of transaction inputs/outputs. | class Block extends Api
public function getTxCountInOut($txid, $flag = "vout") {
$res = $this->getrawtransaction($txid, true);
if ($res)
return count($res[$flag]);
} | 1 |
5f39df9501ea4fedd26c875d856986b1 | 8bcc1c66224ff05595478d18fc5023ff | Simple check to see if the desiered value is within the guess. | public class Measurement extends Activity{
protected boolean checkMeasurement(double val){
if(val>userInputedRangeLower && val<userInputedRangeUpper)
return true;
else
return false;
} | 1 |
7b16664f80ba4fb52e985dcfd1b55a37 | 04dd2b812d5d44ac8ae9c6b1b4d75e22 | Test of getCatalogNumber method, of class SolrData. | public class SolrDataTest
@Test
public void testGetCatalogNumber() {
System.out.println("getCatalogNumber");
String result = instance.getCatalogNumber();
assertEquals(null, result);
} | 1 |
6d9daed69bcde56c51789ba2726b9287 | 7f3d7a71ba2b85968d87be59a0240171 | Updates the amount of each poker hand. | class Table:
def update_counts(self, card):
count = card.get_numerical_value()
if count in [2, 3, 4, 5, 6]:
self.running_count += 1
elif count in [10, 11]:
self.running_count -= 1 | 0 |
b87583ffb95a56c5ce98cbada86049f4 | 290df303f2732027a6853aac158716b5 | 第二屏动画和获取数据函数 | showSecond() {
var animation = wx.createAnimation({
duration: 200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step()
this.setData({
animationData: animation.export(),
showModalStatus: true
})
... | 0 |
94b749b590c8ac0fc0c793920d53b0f9 | 987c4ad45a6156880c7309ad07577e53 | 根据验证码查询邮件信息 | namespace CommonService.BLL.OA
public partial class O_Email_user
public List<CommonService.Model.OA.O_Email_user> GetListByEmailCode(Guid emailCode)
{
return DataTableToList(dal.GetListByEmailCode(emailCode).Tables[0]);
} | 1 |
f27c3e66c4592bb1d116b7d3259f30d4 | d7f1cdee7af8cafc28f56fe65ca7ea9b | Decrement the number of pending memory accesses. | namespace BFuck.Runtime
public class Engine
public void Dec()
{
EnsureMemoryExpanded();
_memory[_pointer] -= 1;
} | 0 |
152c3b8c8cb4dea9bc5fd1de0c247251 | 1b949a4785b5fec2a9321096a075d9f9 | 根据测试用例id,查询返回的步骤集合 | def get_steps_in_multiple_api_case(case_name):
case_step_count = mongodb_conn["api_case"].find({"case_name": case_name}, {"step_name": 1, "_id": 0}).count()
case_steps = mongodb_conn["api_case"].find({"case_name": case_name}, {"step_name": 1, "_id": 0})
step_name_list = []
if case_step_count == 0:
... | 0 |
febaf42cc09836d3db1049357b7fca9d | e79ec73591f031c7dce9c4d50d944ea1 | 功能描述:更新微信用户操作配置
参数:微信用户OPenID、用户操作、操作参数
返回值:成功返回true,失败返回false
作者:Jensyn
创建时间:2014-12-15 | String jsonResult = HttpClientUtils.sendHttpPost(updateUserUrl + wxmpconfig.getAccessToken(), jsonStr);
return new ApiResult(jsonResult);
} | 0 |
c86ea8657182d1fae709c8893b5c0d70 | e51cc6af7d50ecf862efbae9f7fe0cb3 | 未処理_アイテム数をセットします。 | public class InvenMoveInfo extends Info implements Serializable
public void setOrderCount(int count) {
mOrderCount = count;
} | 0 |
db8e8ac6bc74031a173ebb19aad85cda | b8bb0ddcd2c7bacbd31287c61c359d19 | 删除组件的时候把创建的mesh控制器给销毁掉 | public class HexMesh : MultiMesh
public override void Destroy()
{
Builder.Clear();
base.Destroy();
} | 1 |
c9142a4920e839be9158d45ae0d50a84 | 0b94bc5116ee2cf6f141b746274ec47d | Getter for <code>Account.clanEnemies.otherClanKills</code>. | public class ParticipantStats extends OriannaObject<com.robrua.orianna.type.dto.match.ParticipantStats>
public long getDoubleKills() {
return super.getLong(data.getDoubleKills());
} | 0 |
fc18aadbed6a63170b0c7945716df1e5 | 4cef56fc6ff76629afffd26d618a8a06 | Sets the "ValueType" attribute | void setValueType(TagValueType dataType); | 1 |
1bc1de3a8eb6636354f9993260cda69a | 36c9e183799a4d6b4cd4e358eaa1995c | функция для определения что писать после числа если нудно подставить значения ГОД, ГОДА, ЛЕТ. | {
$result = $_var;
if ($this->IsNumber($_var))
{
$result = $result.$_after_var_text;
}
return $result;
} | 0 |
381b655d584c5ce8a9154a98d2e2b0c9 | 36a2a13bd56b3c9d1923769093315dab | Checks whether a user account is confirmed and not deactivated | namespace MySql.Web.Security public static class MySqlWebSecurity
public static bool IsConfirmed( string userName ) {
var provider = VerifyProvider();
Debug.Assert( provider != null );
return provider.IsConfirmed( userName );
} | 1 |
e450a010149a2cc683241262f423cf55 | c58ecaa09a305fcb81573788edf22c50 | compares two plans except their ids and fetchTime | class PlanData(object):
def __eq__(self, other):
if not isinstance(other, PlanData):
return False
return self.__dict__ == other.__dict__ | 0 |
f2a171b9b6a76f513e19c7551d971a68 | c147764845c13773c4bec73cc5bb9ac0 | Unload a MP3 file. | bool Utility::Bgm::Unload()
{
MCIERROR errCode = mciSendString(L"Close Music", NULL, 0, NULL);
if(errCode != 0)
return false;
return true;
} | 1 |
c0562496648c45e4356a97e5672e7646 | e41cde7e6958138b12e8defc644d966a | Called on all cores after kentry_boot. Should never return. | pub fn test_kernel_entry(_boot_info: &'static BootInfo) -> ! {
init();
test_main();
halt_loop();
} | 1 |
e653ec04958c79ed5b1958819e57e7c1 | b840d7c8c9cd426006550f6207bd7459 | 给定一个Class对象,如果它表示一个数组类,则返回它所表示的数组的维数,如果它不是,返回0 | @SuppressWarnings({"unchecked","deprecation"})
public class ArrayFuncs implements PrimitiveInfo
public static int getBaseLength(Object o) {
if (o == null) {
return 0;
}
String className = o.getClass().getName();
int dims = 0;
while (className.charAt(dims) == ... | 0 |
3bc3962e6c298908fd907fa9c233dcae | d3f29dca101b6c3105a58f923f6ddffe | 创建AVL树结点。 | class AVLNode(object):
def __init__(self, parent, k):
self.key = k
self.parent = parent
self.left = None
self.right = None | 1 |
e45e8b7fff2793894ae2cc731585a1fa | 5898450341d67e0b1418b1733bb5f224 | Verificar que no se digite un número de parte ya grabado en la tabla:
Si se está agregando un registro, verificar que el número de parte
no esté en otro registro de la tabla | this.$validator.validate('name_part')
.then(result => {
if (result) {
let data = {
id: this.tempRecord.id,
name: this.tempRecord.name,
url: '/parts',
... | 0 |
338b8a30547255169bb9b96f559c403c | afa963c8c90d8db2a5457f054e80a147 | DBMネットワークの作成 | static int insert_net(sqlite3 * hdb, int src, int orig_net_id)
{
int db_id = -1;
int row;
char query_sql[256];
snprintf(query_sql, sizeof(query_sql),
"select db_id from net_table where src=%d and network_id=%d",
src, orig_net_id);
row = 1;
if (AM_DB_Select(hdb, query_sql, &row, "%d", &db_id) != AM_SUCCESS ||... | 1 |
5f1f23b28c7c01c9391095808893a5a7 | 237926105e8aa3181ff06c0cbb8cc538 | 单个同步到百度云 | class BaiduCloudAPI(ClouldAPI):
def downloadSingleFile(self, filePath, syncPath=None):
super(BaiduCloudAPI, self).downloadSingleFile(filePath, syncPath) | 0 |
ee95400e6d7dd9a71b5da4a501906ed0 | 60fa30a1ac26595b8d818ee99bbc43c3 | Lists all Ambience models. | class AmenityController extends \BaseController
public function index()
{
$amenity = Amenity::all();
return $amenity;
} | 0 |
e69544091035a4908d2b4bfa2015640e | 533e36eda9c588d23a31d9149168ca3b | 1.显示入库流程的基础数据 | class cc_kjdbckController extends cc_controllers_baseController
public function indexAction() {
$this->_view->assign('bmmch', $_SESSION['auth']->bmmch);
$this->_view->assign('bmbh', $_SESSION['auth']->bmbh);
$this->_view->assign ( 'action', 'new' );
$this->_view->assign ( 'title', '基础管理-库间调拨... | 0 |
03305dd8229cf259a7e33bc0fd4a8229 | b71f1f3a62352cd24bb94615c390f41a | creates shadow camera for a light and sets up its constant properties | def createLights(cam_location,center,radius):
def createKeyLight():
bpy.ops.object.lamp_add(type='SPOT',location=cam_location)
x = -cam_location[2]*sin45
y = radius
z = cam_location[2]*sin45
bpy.context.active_object.location = (x, y, z)
if (abs(y) != 0):
angl... | 0 |
6f7343aaab33ca7798e08ffb493ed302 | 521dcb80b3c7803d22fc5c1e1bed3c4e | 根据地址获取Nep5交易列表 | endpoint = f'address/{address}/txs'
ret = self._get_url_call(endpoint=endpoint)
txs = json.loads(ret)
return txs | 1 |
ddb062423146842e9a6e352a9973c4df | e41cf4186ab9956aca67d193af3ed142 | Настройка исходного состояния элементов управления
при успешной загрузке элементов из таблицы дисциплин | {
DisciplinesImport.CodeDiscipline = Convert.ToString(sheet.Range["A" + i].Value);
DisciplinesImport.Discipl = Convert.ToString(sheet.Range["B" + i].Value);
DisciplinesImport.CodeChair = Convert.ToString(sheet.Range["EU" + i].Value);
string controlExamAndSetOff = ... | 1 |
5cfe4d03777fce655e5cd81bdee56a1b | 37be0b469914c72cf148ade7535971f7 | Método que devolve o total de clientes que compraram num determinado mês | public class
Querie4 implements DefVariaveis, Querie, Serializable
public int getNClientesMes(int index) {
return clients_bought[index];
} | 1 |
1cf9c32e07828f15b9c4c6e0cb02cd9a | 7fc195f8d7cc6c861b9fc65b8386cca3 | 取消注册的登录监听方法 | public class OAuthHelper
public void unregisterListener() {
mListener = null;
} | 1 |
3afb5422e73caa4bcf9c27295e0781b3 | f70b8def5385a60bfc59e884328b7e06 | 迭代版本:
我们首先把两棵树的根节点入栈,栈中的每个元素都会存放两个根节点,并且栈顶的元素表示当前需要处理的节点。
在迭代的每一步中,我们取出栈顶的元素并把它移出栈,并将它们的值相加。
随后我们分别考虑这两个节点的左孩子和右孩子,如果两个节点都有左孩子,那么就将左孩子入栈;
如果只有一个节点有左孩子,那么将其作为第一个节点的左孩子;
如果都没有左孩子,那么不用做任何事情。对于右孩子同理。
最后我们返回第一棵树的根节点作为答案。
- 时间复杂度:O(n) 其中 n 是两棵树中节点个数的较小值。
- 空间复杂度:O(n) 在最坏情况下,栈中会存放 NN 个节点。 | from collections import deque
if not (t1 and t2):
return t1 or t2
queue1, queue2 = deque([t1]), deque([t2])
while queue1 and queue2:
node1, node2 = queue1.popleft(), queue2.popleft()
if node1 and node2:
node1.val += node2.val
if (not node1.left) and node2.... | 0 |
14ee82414f60425bd1603c2cfe3ce4ec | 5e4debf03e908ec6c032a478a8c4ef31 | Returns the value of the '<em><b>Manager</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Manager</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public int getManagerSize(); | 0 |
93fa22111ada04a33845e55715963306 | ab476d868ba481e6c2b65c3280087ac1 | 获取并移除查询参数临时数据 | const i = _.findIndex(state.queryParams, param => !_.isUndefined(param[paramName]));
if (i >= 0) {
state.queryParams.splice(i, 1);
}
} | 1 |
a74b338074a89ee8a877758415a4d58f | a51d05db3e5e10fffd15c679c4dc1da3 | 抓取小说每个章节目录和url | def get_chapter(fiction_url):
chapter_url = []
try:
ret = requests.get(url=fiction_url, headers=headers)
except Exception:
time.sleep(5)
ret = requests.get(url=fiction_url, headers=headers)
html = ret.text
soup = BeautifulSoup(html, 'html.parser')
dl = soup.find('dl', att... | 1 |
02d72e9f70d3f3cf473e695b4e295c05 | b46489d13789320afb21fecb6782829d | position aléatoire dans l'écran | class BaseWindow( Toplevel ):
# Constructeur
def randomPosition( self ):
x = random.randrange( 0, self.winfo_screenwidth() - self.winfo_width() )
y = random.randrange( 0, self.winfo_screenheight() - self.winfo_height() )
self.setPosition( x, y )
if self._randomizePosition:
self.after( CONFIG['WINDOWS_POSUPD... | 1 |
ea24f133c624cfbf8d6913351fdaf652 | b8316b5ad6516a250cb55624e18f0b4f | Synchronize the contact address to reference. | {
using (ICrmDataAccess dal = new CrmDataAccess())
{
try
{
EntityReference crmref = new EntityReference { Id = contactId };
var contact = dal.GetContact(crmref);
if (contact.EMailAddress1 != epostAddress)
{... | 0 |
61e6896bc27602264547edd641fcaeca | 7760914c0e14553fc1165c541b6b2a69 | Draws a point at the specified 3D world position within the current
view. | class Drawing():
def draw_point(self, x, y, z, color=Color.BLACK()):
self.draw_pointmatrix(Matrix(matrix=[[x, y, z]]), color=color) | 1 |
3f153f07130445e54a67919e391982fb | fe30992c90e309ed8c49a4b22d91d2c3 | Adds a JOIN clause to the query using the SettingsBranches relation | {
$this->_parts[self::_JOIN_][] = ' LEFT JOIN ' . TableQccheckinglistreport::_TABLE_NAME_ . ' ' . $this->table_alias_qccheckinglistreport_passed . ' ON (
' . $this->table_alias_qccheckinglistreport_passed . '.' . TableQccheckinglistreport::_TABLE_QCCHECKINGLISTREPORT_COLUMN_QCREPORT_ID_ . ' = ' . $this->... | 0 |
3c34ebd15a421e328b5e19e52ae4d98b | 1c75632626d3f54edaf37d8e5d184965 | Sets the workflow config dictionary used for the unit tests | super().setUp()
self.expected_config_dict = {
"pulp": {
"auth": ["admin", "admin"],
"selinux enabled": True,
"version": "2.13",
},
"general": {"timeout": 1800},
"hosts": [
{
... | 1 |
78475cb4c0ec99e240a0a757401da18c | a7f095f95087953b9a95db10ef4c157d | 設置view之間的間距,前提view必須是在LinearLayout佈局或RelativeLayout布局中 | public class ViewUtil
public void setViewMargin(View view, int left, int top, int right, int bottom, int width, int height) {
if (view == null) {
return;
}
ViewParent parent = view.getParent();
if (parent == null) {
return;
}
ViewGroup.MarginLayout... | 1 |
b50f5c05899a74319dd7c5f0ae6242f6 | 66b249863fdf1512a3a35bc3ea9405d1 | Adds a callback function to GUI under the given parameter. | {
UIEventListener uiel = UIEventListener.Get(gob);
uiel.onClick = callback;
uiel.parameter = id;
} | 1 |
765a02068fbdec2a8f9e0d29e13b47de | 5d1e6cc1819c48009201f6181561c5a9 | Inserts boxes (from back-end API) into the front-end markup.
has finished sussessfully, contains informations about
boxes available. | def get_box_data(request,box_nr):
task_schedule = get_mouse_task_schedule(box_nr, True)
context = {'box_nr':box_nr}
return render(request, 'getData/get_box_data.html',context) | 0 |
0dd180c93633fe8b4b2694a7dc0d92bf | bf69ceb7336e12a58ed5d1da8759a614 | Centra el texto de una celda de la tabla actual | {
if(cellStyle != null)
{
cellStyle.VerticalAlignment = VerticalAlignment.Center;
cellStyle.Alignment = HorizontalAlignment.Center;
}
} | 1 |
493b69cd5d52a2ddf3badfa9cdf0f054 | 1fd756e29e198be6847734d405b1162a | Function to set up the R environment | logger.debug("IN");
re = Rengine.getMainEngine();
if (re == null) {
re = new Rengine(new String[] { "--vanilla" }, false, null);
logger.debug("New r engine created");
re.eval("setwd(\"" + DataMiningUtils.UPLOADED_FILE_PATH + DataMiningConstants.DATA_MINING_EXTERNAL_CODE_PATH + "\")");
logger.debug("Se... | 1 |
9786b2a06d353aa0312e5edac28831ff | 71585d5245043f2aa5d630a74bd200d1 | 通过借款人姓名、身份证号码和合同编号动态查询信息并分页 | List<CustomerInfoTb> findPageInfoByCpyId(Session sess,Integer cpyId,String cusName,Integer pageNo,Integer pageSize); | 0 |
7732c754b9a47722cdcde36fceb341d7 | 1d86b123890d8f9bc124465bceef6a1b | 回前n頁 | var p = PAGE -1;
if(p < 1){
return;
}
gotoPage(p);
} | 0 |
b2b958ba881791b6fb54a52c03122a29 | e9863bc448d75123489ea990793f989c | MCIで現在再生中のBGMサウンドファイルがあれば、そのフルパスを返します。なければ、""が返ります。
※MCIコマンドを使わずp_MCI_nowPlayingBGMName_FullPathの値を取得するだけので、高速です。 | void CMPlayer::GetMPlayerPathName(CString &strMPlayerPathName) const
{
strMPlayerPathName = m_strMPlayerPathName;
} | 0 |
cfe34038e61e9c2bdc9f0d0b883a8763 | 40a4ee764506b6a1efc3fad4eccd471f | Tabela wyświetlająca listę inwork z możliwością edycji | function EmployeeTabView() {
return {
id: 'employeeTab',
batch:"EmployeeTabView",
rows: [
{
view: 'datatable',
id: 'employeeTabDatatable',
select: true,
columns: [
{ id: 'ID', header: ['', { conte... | 0 |
024326a2b1190d53890988a6e408b847 | b184b97ab936e8b9e1d98621d1df62c6 | If an operation is already bracketed then additional brackets should not be added around the operation, they would be unnecessary | {
bool equally;
equally = OpAndClBracketIsEqual(incommingExpression);
if (equally)
{
string errorCondition = @"\(\+|\(\*|\(\/|\d\(|\(\)|,\(|\(,|\($|" +
@"\)\(|-\)|\+\)|\*\)|/\)|\)\d|,\)|\),|^\)|" +
... | 1 |
f73456410fa20b0ba439c6093ed0ecf8 | 2dcd63e413a8dcda10081ffc35ce6d3e | Metoda na vlozenie novej transakcie o vybere z uctu alebo vklade na ucet. | String str = "SELECT "+ COL_ID + " FROM " + MC_TABLE_NAME + " WHERE "+ COL_MACINE + " = '"+ macine +"' AND " + COL_KIND + " = " + kind;
Cursor c = db.rawQuery(str,null);
if (c.getCount() > 0){
Date dateNow = new Date ();
ContentValues values = new ContentValues();
... | 0 |
b91f766a8957136808af28590b592d47 | a8d2957d1934acab36dbdd5a4baffe25 | AudioSourceを最大トラック数*2(遷移時に重なる分)まで生成。 | public class AudioPoolManager : MonoBehaviour
private void InitPool()
{
for (int i = 0; i < poolCount_Min; i++)
{
AudioSource audioSource = gameObject.AddComponent<AudioSource>();
audioSource.playOnAwake = false;
}
audioSources = new List<AudioSource>(gameObje... | 0 |
36a1c76035e6d5fd12c99a62e1f52068 | add6dba200e5ecb01e1a01312d3eb9a7 | 更新品牌 标题 | editBrandName({commit},rs){
const params = {
data:baseActions.formData(rs)
}
const opts = Object.assign({},fetchUrl.BRAND_NAME_EDIT,params)
return baseActions.fetch(commit,opts)
} | 1 |
d45ddfda133436d24656c77035ebd9a0 | 080a58294588b7a7d51b680de304ba45 | 每天计算共享模式下设备使用数 | AcctBillContainer acctBillContainer){
Map<Long, List<DeviceBillOrder>> deviceBillOrderMap =
acctBillContainer.getFixShareDeviceBillOrderList().stream().collect(groupingBy(DeviceBillOrder::getDeviceId));
if(deviceBillOrderMap == null || deviceBillOrderMap.isEmp... | 0 |
2e1bb613c04379034f3d1b9d855ea4bc | c8cefd2af4d1d3990ffa33d6ee5d0011 | Gets the charge_number of this ChargeRatedResult. # noqa: E501 | public final class ChargeableSubsystemElectric extends
com.google.protobuf.GeneratedMessageV3 implements
ChargeableSubsystemElectricOrBuilder
public int getChargeableSubSystemNumber() {
return chargeableSubSystemNumber_;
} | 0 |
4b8a99b811f08c7ec044697a3b8f8dc2 | 290a0440d8595f1bc4edc1e4ea40de9e | Spawn Bullet and add to Group | {
ProjectileProperties* pobProperties = ObjectDatabase::Get().GetPointerFromName<ProjectileProperties*>(m_ProjectileData.ProjectileProperties);
ntAssert(pobProperties);
CPoint obPosition = m_ProjectileData.vPosition;
CDirection obDirection = m_ProjectileData.vDirection;
Physics::ProjectileLG* lg = Physics::Proj... | 1 |
2e70242f57d49c2305015387bcc61de1 | 183bc404e29d73fccd4fa2825ea2e53e | Containers will be sorted with respect to containers and leaves will be
sorted with respect to leaves but they won't be intermingled. | if (this.children) {
this.children.sort((a, b) => {
if (a.isFolder && !b.isFolder) {
return foldersFirst ? -1 : 1;
}
if (!a.isFolder && b.isFolder) {
return foldersFirst ? 1 : -1;
}
... | 1 |
a6800dd1c8b111c5d2d5f42d5d3aa452 | f7cf103b31f4151c05d433514de7bf8f | Align a pointer, increasing it upwards as necessary | void *
align_pointer (void *p, size_t align)
{
unsigned d;
d = ((unsigned) p) & (align-1);
d = (d != 0 ? align-d : 0);
return (void *) (((char *) p) + d);
} | 1 |
f83bf10f34aab93f7488b27741de7d7f | 48374eb41b5ecf4f38a938a58ecf833f | Updates comment's meta data. Currently used by both sync and import. | function btcnew_db_set_comment_counts($ID, $counts) {
$btcnew_comment_counts = array();
foreach ($counts as $count) {
$btcnew_comment_counts[] = array('comment_src' => $count->comment_src, 'cnt' => $count->cnt, 'enabled' => $count->enabled);
}
if (!update_post_meta($ID, 'btcnew_comment_counts', $btcnew_comment_co... | 1 |
380d500a4d90d649593fea6822b238fb | d62ee680600bd0bed5fbfd6aa5097119 | we're in PBE mode
switch to PLL as clock source, FLL input = 16 MHz / 512 | void MCG_BLPE() {
MCG_C1 = MCG_C1_CLKS(2);
while (MCG_S & MCG_S_IREFST_MASK){}
while (((MCG_S & MCG_S_CLKST_MASK) >> MCG_S_CLKST_SHIFT) != 0x2){}
MCG_C2 = MCG_C2_LP_MASK;
} | 0 |
b6908b97856b6c407a362d35e527001b | f9c83e48eccb935b6574a5c86c6d3ee9 | .
Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol | def set_game_multi():
global var_multi
if var_multi.get():
env.set("game_multi", True)
else:
env.set("game_multi", False) | 0 |
6c1b15ce38b708f067265ac0b3a8c0ca | 0c04b1a355c99ed7b2b3398995c0b708 | Deletes primary terms for a post. | class TermController extends Controller
public function destroy(Term $term)
{
$ids = $term->posts()->get()->pluck('id')->toArray();
$term->posts()->detach($ids);
$term->delete();
return response()->json(['status' => 'ok']);
} | 0 |
1708c703ccbb625f040791c17b063dc2 | f123016a7697470f67c446ac87ca597d | Returns the last entry of this database such that cond(entry) is true
or None if none could be found. | class DbTable:
def select_one(self, conditions, condition_vals):
results = self.select_many(conditions, condition_vals);
if len(results) == 0: return None
return results[0] | 0 |
355c5356dccc255b29a56e0b161439a3 | c07855ba8af983785c5999cbc09928de | Gen user name from full name and plus company name. | {
usName = usName.ToUpper();
string result = "";
string nameNoBlank = Regex.Replace(usName, "([ ]+)", "");
if (nameNoBlank.Length <= 7)
{
result = nameNoBlank;
}
else
{
nameNoBlank = R... | 0 |
15cb0b10a64f14ff70b535f0d2e9d493 | 372791bc286803ca2eee69c487fbc579 | Hide Modal 4 | function closeModal14() {
document.getElementById('myModal14').style.display = "none";
} | 0 |
512af230582084ca581a654c44fd9516 | fd6881bd5b7b2a1dd9c1fa7b3cea452f | Returns a string (str) with only valid UTF-8 byte sequences. | class DiamAVP_UTF8String(DiamAVP):
def getData(self):
return utf8decoder(self.data)[0] | 1 |
d4dc1c53c87e3a37e09f67fd0cd30a2f | 2a5327ee2beeef12746a5b45d9bd6205 | Test accessor name with wrong type | {
$attachmentActionObject = new AttachmentAction();
$refAttachmentActionObject = new \ReflectionObject($attachmentActionObject);
$nameProperty = $refAttachmentActionObject->getProperty('name');
$nameProperty->setAccessible(true);
$nameProperty->setValue($attachmentActionObjec... | 0 |
f39f86641487f697571aee22a72da700 | bca3cbd273e59c8d243ef0a6665fcfaa | Print out BinTree using postorder syntax | if (left != NULL) {
left->printPost();
}
if (right != NULL) {
right->printPost();
}
cout << " " << token;
} | 1 |
eab455e2246d05857478c07b2b2f997e | c7afb60eab70403f088830b9f392f4d7 | Sets the directory provider for testing. | void setProviderPath(String providerPath); | 1 |
627eb5e9ec38ffb6b9e184716bc05430 | 8bcf40782feadaa3462891b7ac3e1f91 | Gets the Point with the shortest distance | namespace Topology.Operation.Distance
public class DistanceOp
public ICoordinate[] ClosestPoints()
{
ComputeMinDistance();
ICoordinate[] closestPts = new ICoordinate[] { minDistanceLocation[0].Coordinate,
minDistanceLocation... | 0 |
536f9e1648ce5cc3c2d259abbf3ff888 | 1d32b7c2c253020e620fd99cb1679132 | Gets the dimensions of a mipmap. | {
return MipMapper.CalculateMipChainLength(imagePixelWidth, imagePixelHeight,
OutputOptions.GenerateMipMaps ? OutputOptions.MaxMipMapLevel : 1);
} | 0 |
fd8404d31c50accfcb0d2b806551c2aa | 8c2ad5afbf57f3e8a2dcc558dcb77c69 | The player wishes to give one of their items to another player.
First, we must check if the receiver is logged in.
Second, we must check if the sender has the item.
If both are true, we will send the item over to the player and
alert both sides that the exchange has taken place. | if (!receiver) return game_log("No receiver sent to send_item");
if (receiver.name) receiver = receiver.name;
parent.socket.emit("send", {name: receiver, num: num, q: quantity || 1});
} | 0 |
0294c51727f44d92c1c8d1077da5ae89 | 0ae55b44594fa583a3e54f31302c9ee4 | Returns a string from locale.json, with the default (English) locale. | export default class IzendaLocalizationService
localeText(key: string, defaultValue: string): string {
const defaultText = angular.isString(defaultValue) ? defaultValue : '';
return IzLocal.Res(key, defaultText);
} | 1 |
9617428f1e01a7e34931c7a229fa1e8f | 6b979262061088c1bcac1e1208b0a8c0 | Process tab data before deleting | {
if ($this->proccessRemoveTab($this->class_controller_admin_group)) {
return true;
}
return false;
} | 1 |
0fa2bb52497eb0be8c62f064291d952d | 50423cfca89c77078c1bc7c46b97f701 | 解析CASL程序, 返回机器码和对应的可读格式指令 | def cparser(line):
dest = ''
jump = ''
comp = ''
line = line.replace(' ','')
line = line.replace(' ','')
tokens_eq = line.split('=')
if len(tokens_eq) == 2:
dest = tokens_eq[0]
tokens_sc = line.split(';')
if len(tokens_sc) == 2:
jump = tokens_sc[1]
if jump == '... | 0 |
42945d8f7add58673dd91e69ff878201 | 0f26cf01864547b0e096dc51db826945 | Removes the element at the beginning of the immutable queue, and returns the new queue. | namespace System.Collections.Immutable
[DebuggerDisplay("IsEmpty = {IsEmpty}")]
[DebuggerTypeProxy(typeof(ImmutableQueueDebuggerProxy<>))]
[SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "Ignored")]
[SuppressMessage("Microsoft.Naming", "CA1711:Identifier... | 1 |
ccd93218ce1b560a4634a537a3473e54 | 42334174801ad7f10d71cb6e3403e613 | 月間出勤日数を算出します。 | @Named
@Scope("session")
public class SectionAttendanceSummaryBean extends AbstractTabbedBean implements Serializable
private void calculateNoOfWeeksForAttendanceMonth() {
final Calendar calendar = (Calendar) this.attendanceMonth.clone();
this.noOfWeeksForAttendanceMonth = DateUtil.calculateNumberOfWeeksInMonth(cal... | 0 |
32fb4238f423c05ef663b58c13cb9d95 | c663849116ece859fab1ff3c538baf76 | 查找第一个值等于大于等于给定值的元素的二分查找
可以解决如果有多个重复元素的情况 | $low =0;
$high = count($arr)-1;
while($low<=$high){
$mid = $low +(($high-$low)>>1);
if ($arr[$mid]>=$value){
if ($mid==0 || $arr[$mid-1]<$value){
return $mid;
}else{
$high = $mid-1;
}
}else{
$low = $mid+1... | 1 |
5c7dc748c104074b2d1eb11d25ce7980 | e1748ed7d8b0a71c273cac5c1ebbb626 | Is this a time series-specific branch? | def is_branch(instr):
if (instr >> 24) & 0b1111 == 0b1010:
return True
elif (instr >> 24) & 0b1111 == 0b1011:
return True
elif (instr >> 25) & 0b1111111 == 0b1111101:
return True
return False | 0 |
e830dbc4dafa5726a68971e4041a58fc | b3e5a50242aa0e9f7e4feafa7846f4ea | Generate transformed graph for freeze_max/freeze_min transformation. | class NeuralNetwork:
def make_graph(self, is_train: bool, is_frozen: bool):
raise NotImplementedError() | 0 |
85f1b070d0fca8c1dd07f5e3e2f93432 | a1ce43b6755cc81d2450dd1060b4aafe | create brand new environment (i.e., erase all objects, set new world bounds) | void new_game(game_t* this) {
new_world(&this->world);
} | 1 |
379ac45f4202c95a8607f01c443ec016 | 2c71feeb4206fb822520e924062b2108 | Convert boolean to binary bit. | def bar():
def bool_to_binary(val):
if val == True:
return 1
elif val == False:
return 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.