query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
21145534ac1ee9f91bdf8c644bad69e7 | 47ecdf4d434bc7b5f0ec78367a0a451f | 已知source不会超过5个 | public class MySource extends AbstractSource implements Configurable, PollableSource
@Override
public Status process() throws EventDeliveryException {
Status status = null;
try {
SimpleEvent event = new SimpleEvent();
HashMap<String, String> header = new HashMap<>();
... | 0 |
26a4c6cc95c104d54234696056a76c11 | 3751da9bfc38e117424b9c1458dbe4b0 | Metodo para crear o escribir en un plano | function crear_plan($AreaHab, $id) {
$resultado = '<div class="flex-row d-flex justify-content-center ">
<div class="p-2 w-75">
<div class="accordion PlanSeccion" id="accordionPlanSeg">
<div class="card PlanSeccion">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<div class="flex-row... | 1 |
35aad445ba71d38c122ae98258657ca2 | 54f46bb07c7144ab298a906443302fe7 | Returns a comma separated string of patterns given by the patterns array | {
$pattern = '';
foreach ($this->routeGroups as $group) {
$pattern .= $group->getPattern();
}
return $pattern;
} | 0 |
600e1a394a47ba53e333e8491e787fe6 | 2a28dc7252c50cf7361e6bd0caeab606 | 赎回,取出存款 | class FundManager extends CApplicationComponent{
public function raiseWithdraw($uid,$sum,$arg3 = null){
$user = Yii::app()->getModule('user')->userManager->getUserInfo($uid);
$credit = Yii::app()->getModule('credit')->userCreditManager;
$rate = $credit->userRateGet($uid);
$fee = round($sum * $rate['on_withdraw'... | 1 |
f0613fb1568d9fc2a100e3d4d72b80b1 | 212789c6cb7b4036d086667b32b3a2d1 | To get the user entity for the given login id and institution. | abstract class AInstitutionManager extends AManager
abstract public function get_by_user_id($user_id); | 0 |
d285087859d2be82b95545d38a7e391f | 1f7f5c93ececa480261a8da9f8c21c3a | 删除账号下的所有额外属性 | UserAdditionalInfoTableUtil.delete(this, data);
SqlGenerator gen = this.getSqlGenerator();
UserInfoTable tbl = UserInfoTableUtil.newUserInfoTable();
String sql = gen.generateDeleteSql(tbl, new FieldList(tbl.getField(UserInfoTable.Entity.ID_USER_ID)));
this.executeUpdate(sql, data);
UserAttributeTable atbl ... | 1 |
ac1ea82b6f39b55875b2c048226dc49f | 20864edab53f826d39731653aff1152c | Deletes an existing BucketList model.
If deletion is successful, the browser will be redirected to the 'index' page. | {
if(Yii::app()->request->isPostRequest)
{
$this->loadModelId()->delete();
if(!isset($_GET['ajax']))
$this->redirect(array('index'));
}
else
throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
} | 1 |
e906097ef94f98553c17a3a8bf3cfc07 | 39ba0f1635c4e28da9d02ea468353780 | 用于计算一个圆的面积 | def get_area(radius:float):
pi = 3.1415926
return pi*radius*radius | 1 |
adfed46d5316f18cc84cbf63cb4587ac | 0e0003151ef10b6f4dd24b28fed5f135 | Convert known valid date string, to iso-formatted date. | def iso_to_datetime(value):
return datetime.datetime.strptime(value[:19], ISO_DATE_FORMAT) | 0 |
9372e8e42943f01b2dcd4c23dc3ee519 | 2bb0e1c87693bfbf5a62d59c82f7737f | Remove Banner from all adzones it's linked to | def unlink_banner_from_zone(request):
if request.method == 'GET':
zoneid = request.GET['zone_id']
aid = request.GET['ad_id']
RvAdZoneAssoc.objects.filter(zone_id=zoneid, ad_id=aid).delete()
return JsonResponse({'response': 'unlinked'}) | 0 |
ad8d5ecf457b3f7914d53150f71ea1b9 | f0bbe7e82f108b83d5b15989ee7a7159 | 重置trigger类型参数的值 | if ( $this->_TriggerValue ) {
$prs = $trigger = false;
list($prs, $trigger) = explode('|', $this->_TriggerValue, 2);
switch ( $type ) {
case 'prs': $res = $prs; break;
case 'trigger': $res = $trigger; break;
}
return $res;
}
return false;
} | 0 |
4bb71ce12a7cbe222a2858d6c560806c | 00f47c470cdcddaca918250bb464517d | Initialize encoder/decoder for CCS inner code | self.size_in = size_in
self.size = size
self.size_out = size_out
self.Encode = encoder(size_in=self.size_in, size=self.size)
self.Decode = decoder(size_in=self.size_out, size=self.size) | 1 |
f679dbf2a9ef38c10982f8f6e575246f | 8d9f76a0070ebd175407a66b9846ea8f | 把爬取完毕的主键放到Detail队列里 | def crawl_data_detail(urlQueue, mongo_collection):
while True:
if urlQueue.empty():
break
try:
lock.acquire()
url = urlQueue.get_nowait()
lock.release()
i = urlQueue.qsize()
except Exception as e:
break
try:
... | 0 |
4f861a7135c0f15903d5476606733b4e | 527a57ec2c942022f5943936f2d4fe96 | Clears all include file search paths. | def ClearIncludeDirectories( ):
projectSettings.currentProject.SetValue("includeDirs", []) | 1 |
c503ef168f2cae4a1eb21a4fe9a458bc | 653321f42d985d7542e262a94d550b9e | Deze functie kan bovenaan een pagina worden gezet. Het leidt de gebruiker om naar de loginpagina als de gebruiker
niet is ingelogd. | class Authex
function checkLoginRedirectToHome(){
if($this->isLoggedIn()){
redirect('/home/' . strtolower($this->getUserInfo()->type->naam));
return false;
}else{
return true;
}
} | 0 |
eb6324dc23616d914c25866ac5a9333b | 37eb748ce5082498d3591f6477226997 | 所有page事件的处理. | let ref
if (ids.show && ids.show.id) {
ref = this._getPageRef(ids.show.id)
ref && ref._pageWillShow && ref._pageWillShow()
}
if (ids.hide && ids.hide.id) {
ref = this._getPageRef(ids.hide.id)
ref && ref._pageWillHide && ref._pageWillHide()
}
if (ids.cl... | 1 |
db8cb97445d41db25120037948adbf09 | 619397d1c4048f5d0da5664bbe4fa22e | Set the thread guardsize attribute. | public void setThreadSize( int size ); | 0 |
1d99b387aab148638e72ab85ff875d73 | 52ac503a371ec0e6f57ea3fffae38313 | 易宝e卡通页面充值按钮函数 | $("form#formPayCard").submit(function () {
var form = $(this);
var card = form.find("#tbCard").val();
if ($.trim(card) == "") return false;
mui('#btnPayCard').button('loading');
$.post("Recharge.ashx", { action: "paycard", card: card }, function (data) {
if (data == "1"... | 1 |
c35dcea7ebc638aef02649e0daa235e1 | 42d6c8e80df71bc611e7997301cb81f4 | 给日期和时间的edittext设置现在时间的文本 | public class AssetCheckFragment extends BaseFragment<AssetCheck> implements FragmentImp
private void updateLabel(View view) {
((EditText)view).setText(fmtDateAndTime
.format(dateAndTime.getTime()));
((EditText)view).setError(null);
} | 1 |
a053818166110b43bad76e0f66b3f4ee | 1de69dd77a14c4d8e5aa3e50c09cf9b4 | читаем данные с контроллера | $.ajax({
type: 'GET',
url: '/value'
}).done(function (response) {
console.log(response);
appendToDom(response);
});
} | 1 |
6a6ab13e50d0993aa172e1f200b385b9 | 8729b0a0fcfbef7e01f439a7c9e86bde | 직사각형을 그리고 안을 색칠합니다. | public class Constant
public static void fillRect(Graphics g, Color color, int x, int y, int w, int h) {
Color c = g.getColor();
g.setColor(color);
g.fillRect(x, y, w, h);
g.setColor(c);
} | 1 |
f96f9cf7d82bfe144b84a022dff2b65f | b186134b708e81f5e22f3a3bf812be42 | Retrieves the image properties of the item (like a file of folder). | class rcube_image
public function props()
{
if (function_exists('getimagesize') && ($imsize = @getimagesize($this->image_file))) {
$width = $imsize[0];
$height = $imsize[1];
$gd_type = $imsize['2'];
$type = image_type_to_extension($imsize['2'], false);
... | 1 |
94876996db1f777ccfe0f5b14169ed6f | 6e420c98860bab0545542c3918456b97 | Suppression de tous les trajets dans la BDD | public class LieuxDataSource
public boolean deleteAllLieux() {
return database.delete(MySQLiteHelper.TABLE_LIEUX, null, null ) > 0;
} | 0 |
6b4ebed93f9691a8377a00572462c2f3 | fdb19185f333922ef5efe92851205113 | When got wait window QuickItem data, we would notify WindowGrabber to set frame rate and
start to combine images to generate gif file. | namespace LMS.Recognition.Camera.ViewModel
public class BaslerViewModel : IDisposable
private void OnGrabbingStartedEventCallback()
{
if (this.Frame == null)
{
return;
}
} | 0 |
536514352d3af8fb291988dbfb08113b | 98cba87d9e7baadcf5ce827ab4f0c3a9 | Exposes the index of the camera used | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
abstract class CameraAdapter<CameraOutput> : LifecycleEventObserver
abstract fun getCurrentCamera(): Int | 1 |
38815043f1d83a3ca189b22c63f52b0a | afd2be7441d4b3e873a1bfa1c135bbc3 | Get the state we transfer to | State getTo(); | 1 |
851896270531a290935a720eb8693eb2 | 116cdaf6d7f347cbf5257d10f57ae7df | Deletes the specified SharedPCConfiguration. | request_info = self.to_delete_request_information(
request_configuration
)
from ...models.o_data_errors.o_data_error import ODataError
error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
}
if not self.req... | 1 |
f349829f6bfbab4fe82b9632e40e61b4 | 643e35fbd2f39bd6bd81e9a7ddbcccf3 | 函数说明:保证金率对比按钮 | class HangQing(AppUI):
# ----------------------行情所有数据------------------------------------
def clickChuangYeBanZhi(self):
self.find_element(*self.chuangyebanzhi).click() | 0 |
0d4b4a53653f75d7c33ce3547df29026 | b6bb24981f073207e11b6638946eeb82 | @brief standard constructor | express::express():standard()
{
traffic_condition = NULL;
fee = 0.00;
} | 1 |
52507061ab29d4e379b878d25d7a7738 | 13650962380f5fb7cc83ac85a9918c61 | canvas 绘制关闭按钮 | self.btnCloseCB_ = callback
if self.btnClose_ == nil then
self.btnClose_ = jj.ui.JJButton.new({
images = {
normal = self.theme_:getImage("common/common_dialog_close_btn_n.png"),
highlight = self.theme_:getImage("common/common_dialog_close_btn_d.png"),
... | 0 |
29921a6bf4ee228ef8af90542ca8ba23 | 510ba6b0a00a939f5cd2c5c42d252638 | Пересчитать доступные клетки карты | {
if (_mapMas.Count <= 0)
return;
for (int y = 0, k = 0; y < MaxY; y++)
for (int x = 0; x < MaxX && k < _mapMas.Count; x++, k++)
{
_mapMas[k].ObjectX = x;
_mapMas[k].ObjectY = y;
}
... | 0 |
e254a807b6d889e4b9ab15219d3f8e4f | 68686c822900ff280c6a1ceb53912fb5 | This function is called by the TCP/IP stack when an IP packet
should be sent. It calls the function called low_level_output() to
do the actual transmission of the packet. | static err_t lpc_etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr)
{
if(netif->flags & NETIF_FLAG_LINK_UP)
{
return (etharp_output(netif, q, ipaddr));
}
return ERR_CONN;
} | 0 |
d1015593d409449931ded51c9bfa5a5c | 8e89dbf4e625d0f44dd64dff4769701c | Test setter / getter for term property | class TermTest extends TestCase
public function testSetAndGetTerm()
{
$value = 'foobar';
self::assertEquals(null, $this->fixture->getTerm());
self::assertEquals($this->fixture, $this->fixture->setTerm($value));
self::assertEquals($value, $this->fixture->getTerm());
} | 1 |
5067e46408f3dbbdcc9a61e4d4da0ab1 | 65cc74ca2b18a880091446ef8f108aa7 | Восстанавливает транзакции из корзины.
Проверяет права пользователя перед каждым востановлением. | {
if (!empty($this->rollbackRecords)) {
switch ($this->getAction()) {
case Verbs::POST:
$requests = [];
foreach ($this->rollbackRecords as $item) {
$requests[] = ['DeleteRequest' => ['Key' => $item]];
... | 0 |
3612b4ac0e54a581db28f508b42a8bb4 | 4b1f03abc5abc95aa652aa7b9223eb09 | 处理因果关系接口 目前文件类型:txt | fw = open("data/temp.txt", 'w')
if "Develop" in filename:
fw = open("data/corpus/develop.txt", 'w')
elif "Train" in filename:
fw = open("data/corpus/train.txt", 'w')
with open(filename) as fp:
title = fp.readline()
while len(title) > 0:
title = title.partition... | 0 |
ebb7605ea14e607ead791c593da31b94 | 8272e995d03b72c00e15283e93737e07 | Metoda, która edytuje encje jacht. | {
$permission = Auth::user()->permission;
$id = $_GET['id'];
DB::table('ships')
->where('id', $id)
->update(['captain_id' => $request->input('captain'),
'displacement' => $request->input('displacement'),
'length' => $request->input('length'),... | 1 |
6f8109396ef08032be49eccea6cbe63f | 56a570df82fed954fa41b3a1e1ca34db | 330B: Road Construction: http://codeforces.com/problemset/problem/330/B | int main(int argc, const char * argv[]) {
int n,l;
long long x = 0;
ifs >> n;
cout << n <<" a"<<endl;
for (int i = 0; i < n; i++){
ifs >> l >> x;
cout << "Case #" << i + 1 << ": ";
ofs << "Case #" << i + 1 << ": ";
go(l, x);
cout << endl;
ofs << endl;
... | 0 |
06ad3ed02b895b49a2f901398c124c67 | 905942ad7ed089df3988ea099afc8a6a | Draws the sprites stats if it is an instance of a monster card | super
for i in 0...@monster_attributes.size
if @monster_attributes[i].ceil > @player_attributes[i].ceil
@attributes_color[i] = "green"
elsif @monster_attributes[i].ceil < @player_attributes[i].ceil
@attributes_color[i] = "light red"
else
@attributes_color[i] = "blue"
end
end
for i in 0..... | 1 |
fd4707d59fdb0555d6e8e9c702011007 | 4eeb485d3158725b63d97521c730846a | Filter the query on the ip_address column
Example usage:
<code>
$query->filterByIpAddress(1234); // WHERE ip_address = 1234
$query->filterByIpAddress(array(12, 34)); // WHERE ip_address IN (12, 34)
$query->filterByIpAddress(array('min' => 12)); // WHERE ip_address > 12
</code>
Use scalar values for equality.
Use array ... | abstract class BaseAdQuery extends ModelCriteria
public function filterByUserIpAdress($userIpAdress = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($userIpAdress)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $userIpAdress)) {
... | 1 |
6dcb348f6894af44ee3032c25bb70d6c | bbf880261ab6282511e2b9243348c1ef | 通过block获得相应道路 | function getequip(blockNum){
dw.ajax({
url:"${request.contextPath}/equip/selbyblock",
type:"post",
data:{"blockNum":blockNum},
dataType:"json",
success:function(msg){
if($("#equipsel option").length>0){
$("#equipsel").empty();
}
for(var i =0;i<msg.length;i++){
$("#equipsel").append("<o... | 0 |
04208df9a60b79fe44c7bbc1ee52af8e | 5ed581ac5f2e5a26b1008f6bdc057752 | Configures trace. | {
if (config != null)
{
MessageTracingHandler.IsMessageTracingEnabled = false;
config.MessageHandlers.Add(new MessageTracingHandler());
}
} | 1 |
6efee84866b2c7ac54d33a11d09dc5e5 | 1fadf4c11997f467f8866bb7726df2fc | 瞬间移动,清理当前的位移 | public class UnitMoveLogic:UnitLogicBase
public void stopMoveWithOutPose()
{
clearBaseMove();
} | 1 |
9af13cc9f51f7bb0eab38c0757ff24df | bf9a23c7c74525a71e5e0ffd6cf74921 | Cette méthode retourne tous les noms de méridiens | class Meridien extends Model
public function getMeridienByPatho($idP)
{
$sql = "SELECT nom, element, yin
from meridien
where code in (
select mer
from patho
where idP = ?)";
$data = $this->db->query(... | 0 |
18ee6d4cceae47690e5e45af913af74c | 45d5585d99f12faa62286c7b4502ea7b | <p> 获取学生实习统计数据 </p> | @Controller
@RequestMapping(value="/report")
public class ReportController extends BaseController{
@RequestMapping(value="/yjtjgetDataList",produces={"text/json;charset=UTF-8"})
public @ResponseBody String yjtjgetDataList(HttpServletRequest request,Model modal){
Map<String,Object> paramap=this.getParameter();
Stri... | 1 |
0fe3a8a4d9082965a5ee46935a317e76 | d58732ee7acd9c0f97ca0fb26aeb920d | 跳转到NFC设置界面(目前和更多链接方式跳转的是同一个界面) | public class IntentUtil
public static void ToNFCShareSetting(Context c) {
ToPage(c, Settings.ACTION_NFCSHARING_SETTINGS);
} | 1 |
2584ccf8b17efba7da246506768c615a | e827f8c711f3c7074c8440270846e555 | post controller for creating new pokemon species. | class PokemonController extends Controller
public function create()
{
$typeData = Type::all();
return view('pages.createPkmn', compact('typeData'));
} | 0 |
e29c81a6793adcd34f10dfaae8cef1cb | eee0010cd1ec76c99132467e1dc206ea | Shifts text down. When text is added to the notifier all previous text must be shifted
down | if (pos > 0) {
data[pos - 1].text += data[pos].text
_data.removeAt(pos)
updater.write(data)
notifyItemChanged(pos - 1)
notifyItemRemoved(pos)
}
} | 0 |
75c96ac918cfa94a6b471474b8455cca | 14b4a4f0c9687caf9a8bbbeac6ff3a98 | Flip-flop between commit success/failure. | return @initial_commit unless @initial_commit.nil?
@initial_commit = !Overcommit::Utils.execute(%w[git rev-parse HEAD~]).success?
end | 0 |
20acab2173ea6279e51806ffae9e4e39 | 3f5989c2c5d07a5b0f9a1f00e793d8cc | Available (== allowed, ie not appearing in the same row, column or
box) numbers at a particular (empty) square. | row = [x for x in in_board[i] if x != '.']
clo = [x for x in list(zip(*in_board))[j] if x != '.']
cube = [in_board[3*(i//3)+m][3*(j//3)+n] for m in range(3) for n in range(3)
if in_board[3*(i//3)+m][3*(j//3)+n] != '.']
return [x for x in NUM if x not in (*row, *clo, *cube... | 1 |
58aaae383ded00cb99930d0a6635ba30 | 60347d65a0f6863b3dc365c217660a2d | 온라인 주문 페이지 열기 | @Controller
public class OrdersController
@RequestMapping(value = "/orders")
public ModelAndView openOrdersPage() {
List<Order> orders = databaseInfo.selectOrders();
return new ModelAndView("orders", "orderslist", orders);
} | 1 |
2b07ba01dc282daf333aa5f7568b8e63 | 4fe84d4c956a028353cc78b8881574c5 | 垂直滚动条显示策略,on/off/auto。 | class MarqueeTextView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)
: AppCompatTextView(context, attrs, defStyleAttr)
fun setScrollMode(mode: Int) {
mScrollMode = mode
} | 0 |
54debb6d3620f83fcacb7906c3664844 | 485a5560b65f7b2ec9d1baf3d62f3e86 | Check if any of the watched props have been updated
when there is a state change, and emits an update to
the server if one was found. | storeUpdated () {
if (this.isDestroyed || this.isDestroying) return
const state = this.get('reduxStore').getState()
const {errors, lastAction, validationResult, value, valueChangeSet} = state
const hasValueChanges = valueChangeSet ? valueChangeSet.size > 0 : false
const newProps = {}
let batched... | 0 |
8b28395d3916ded207d9763867287af6 | 3944ffd25cfc71ad0b8dd9abee042623 | 验证数据的正确性, 一旦数据上传到平板上面,那么校验他的正确性,
如果任何一项数据的值为0 ,那么 直接就不处理了. | public class S2ElevatorDetailActivity extends ElevatorDetailCommonActivity
protected boolean checkData() {
if ("".equals(tv_is_plan3CDate.getText().toString())) {
ToastUtil.showLong(getResources().getString(R.string.is_check_plan3CDate_null_msg));
return false;
}
if ("".e... | 0 |
85a407a6b4fef534f6e7dce0f61742e1 | 3af40bb791f82a76e91dd75f03697fe6 | Tests handling webhook message of cases/test type.
Controller should response with code 200. | class TestMessenger(unittest.TestCase):
def test_facebook_webhook(self):
r = test_app.post_json('/webhook', self.data)
self.assertEqual(r.status_int, 200) | 1 |
4ae42aa2488cf5b4ed9554e2c4c5712c | 5e7258465ce21b523055ffc58b7a7ec8 | The position in the res file as index number (starting from 0). | int CVmObjFile::getp_get_pos(VMG_ vm_obj_id_t self, vm_val_t *retval,
uint *argc)
{
static CVmNativeCodeDesc desc(0);
unsigned long cur_pos;
if (get_prop_check_argc(retval, argc, &desc))
return TRUE;
check_valid_file(vmg0_);
cur_pos = osfpos(get_ext()->fp);
c... | 1 |
30fbc53d2b72df5b3634cb16d3d8e0ac | dadee91b455d62054a31ee4aa55eab45 | Returns a shuffled sequence of given arguments | def shuffle_data(items: Sequence[T]) -> Sequence[T]:
ran = list(range(len(items)))
shuffle(ran)
return [items[i] for i in ran] | 1 |
6294d7382d069a7b46a81517a34cfab0 | 4c8c317dce0fb836b7fc0eb2eafc8bf8 | update the logo object's sprite based on its state | public class UIObject : MonoBehaviour
public void UpdateImage()
{
if (State)
{
imagePlace.sprite = image;
borderplace.sprite = green;
}
else
{
imagePlace.sprite = null;
borderplace.sprite = red;
}
} | 1 |
2414a2d628c9761c04e48a1e09fcaaa5 | 236a6bfef6809006f3a5a6c20e21ae6f | 添加房间动作,从客户端接收房间的具体信息 | public class FirstPanelScript : PanelBase
public void CreateRoom(ProtocolBase protocol)
{
Debug.Log("来啊,我在这里");
ProtocolBytes proto = (ProtocolBytes)protocol;
int start = 0;
proto.GetString(start, ref start);
string room_name = proto.GetString(start, ref start);
int p... | 1 |
9c17c240e1297e88304a42ee494d059a | b107f881a500a5d55df4d43322a5afff | Validate ports are forwarded | local1 = h.open_forwarded_port('tcp:50668')
local2 = h.open_forwarded_port('tcp:50668')
forwards = h.list_forwarded_ports()
assert len(forwards) == 1
assert local1 in [f[1] for f in forwards]
assert local2 in [f[1] for f in forwards]
h.close_forwarded_port(local2)
assert len(h.list_forwa... | 1 |
1b217e93d8b31b22ed1da5c49770faff | 70c9057b171c11cadb2818cb5db1b7f4 | Process form when the form has not been submitted. | {
$this->view = $this->makeView('process', 'default', str_replace(ROOTWEBDIR, '', dirname(__FILE__) . DS));
Loader::loadHelpers($this, ['Form', 'Html']);
$this->view->set('post_to', $post_to);
return $this->view->fetch();
} | 0 |
a61f073d45af25caf13555cf89cae56a | 0ee5ddb888a7011038e3e40f8520f3bc | adds new address to list of saved addresses
new address is added to the top of the list | console.log(payload);
const data = await addAddressList(payload);
if (payload.level == '0') {
localStorage.setItem('chosenAddressId', data.result[0]);
}
console.log(data);
} | 0 |
c172705714f596f61cfae83c8a46d64a | 3e5dbfc951e896b516b6202f3e88bb2a | first run: pre-compute all correlations | class Correlation(object):
def _compute(self):
pass | 0 |
2d9eec1cc2d8d53a7cf12aaa38aa2f76 | ce6bf295cd6cefe0f9fff71b0e16fb65 | 由一个LR1项目得到一个项目集闭包I0 | if(initList.size() == 0)
initList.add(clo);
String A = "",
a = "",
B = "",
b = "",
e = "";
String Exp = "^(\\w){1}->([^.]*).([^.]{0,1})([^.]*)$";
Pattern p = Pattern.compile(Exp);
Matcher m = p.matcher(clo.LRtext);
try {
while(m.find()) {
A = m.group(1);
a ... | 1 |
2882b370f05c84b7ee62eb14c77467c1 | d5e2413569a3233f3b9e344b674acf6a | Автоматическое определение возможности разбора парсером | {
$option = Formwork::instance()->option('parsers.use_php_yaml');
return $option === 'emit' || $option === 'all';
} | 1 |
14f839011089670e526fa23e8bbed427 | dca22a4917cd3b2ab76b13e78f63d780 | Posts an event described by a name | const config = this.ensureConfig()
const event: NibbanaEvent = {
_id: freshId(),
occurredAt: new Date(),
type: 'EVENT',
name,
payload: { ...payload },
userIdentification: this.userIdentification,
superProperties: {
...this.persistentSuperProperties,
...t... | 1 |
65bd8e5cd881844aa62d4d8008e6dde5 | a43256065b5510d90b3bab4dfb88080b | Returns the stellar continuum cube. | const double SkyPatch::c() const
{return f.c();} | 0 |
f0c8b1f40c140e4630a70f2f50d1c106 | f865aa0f4471515b4f187e07a59bf102 | findPostsAllの正常系. | {
$page = $this->Pages->find()->contain(['Contents' => ['Sites']])->first();
$expected = [
'model_id' => $page->id,
'type' => 'ページ',
'content_id' => $page->content->id,
'title' => $page->content->title,
'detail' => $page->content->descripti... | 0 |
5686009237ba1ad293135c4be53fc83f | cc46fed5be3256502b86263ca86c6a9f | Validate current line characters for SAM file stream
Input : SAM file
Output : Current line characters validation | if (lineSize < 2 || line[0] != 'A' || line[1] != 'T')
return false;
if (lineSize == 2)
return true;
return isspace(line[2]);
} | 1 |
03bf80a8716833c8cda82cbcb96038ce | 29bab085870ce5936f0f0ea6e6a7aa72 | !
\brief Finds the lowest unused index in the client list. | int gko_pool::conn_client_list_find_free()
{
int i;
for (i = 0; i < option->connlimit; i++)
{
if (!g_client_list[i] || 0 == g_client_list[i]->conn_time)
{
return i;
}
}
return -1;
} | 1 |
167503d65b74e08315a90739459f6343 | 08773ba0a0e287c2ef42ab2fc8d3822d | [spec]: https://tc39.es/ecma262/#sec-number.prototype.tofixed | function float2Fixed(num: number): number {
num = toNumber(num)
if (num.toString().indexOf('e') === -1) {
return Number(num.toString().replace('.', ''))
}
const dLen = digitLength(num)
return dLen > 0 ? strip(num * Math.pow(10, dLen)) : num
} | 0 |
05c49fac72ff04da2c9c93a12799fce5 | 414d6b5227427d13cc78ff46c3df32b6 | 从彩票官网根据api获取最新开奖信息 | lotteryEntitys.clear();
String time = new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(new Date());
String temp="codessq|dlt|fc3d|pl3|pl5|qlc|qxcshowapi_appid"+Constants.YIYUANAPPID+"showapi_res_gzip0showapi_sign_methodmd5showapi_timestamp"+time;
String sign = SignUtil.... | 1 |
31308a5264f1ec188f458ba1990fb0f2 | 7b400eb3c38a724f4f0139a999be5aa4 | \brief Initialize loop 8 shield alarm input | static uint32_t loop_1_alarm_input_get(void)
{
return GPIO_PinRead(GPIO_FOR_LOOPS_1_2_3_4, LOOP_1_ALARM_INPUT_PIN);
} | 0 |
0ad598f4d3fe23ec15264b97f108301a | 5eabf604b1d9db3f09ed010e4226ed06 | 将一个poc文件转换成Poc对象 | public class PMDLoaderScript
public static PMDFormat Import(string file_path) {
PMDLoaderScript loader = new PMDLoaderScript();
return loader.Import_(file_path);
} | 0 |
7e327c3a1aa7640fd05583b46f0e0b72 | 6edc8766a5741bcce73cd100a4c216c0 | Remove zero padding | class Des3Encrypt
private function _removePadding( $str ) {
$len = strlen( $str );
$newStr = "";
$str = str_split($str);
for ($i = 0; $i < $len; $i++ ) {
if ($str[$i] != chr( 0 )) {
$newStr .= $str[$i];
}
}
return $newStr;
} | 1 |
315788baf0a68a924056fb1927a3b6e2 | c43107777d99caef11b8eb98a13ecabe | @brief 语音识别指令处理 | {
int status = 0;
g_asrControl.result.keywordID[0] = 0xFFFF;
g_asrControl.result.keywordID[1] = 0xFFFF;
g_asrControl.result.cmdMapID = 0xFF;
status = SLN_ASR_LOCAL_Process(handler, audBuff, bufSize, &g_asrControl.result);
return status;
} | 1 |
df5feb0dbebeeb64bbc08c0c4e3f0d41 | fd370b7ab20cc473d8deae41c79fdd17 | Set question count. | public function setAnswerCount($answerCount); | 0 |
e18c5cf1a64b60f740b930f8c6b467a1 | 488500f3f3054cf6f83aeabb43348d19 | Query the graph to find oldest top K actors | dataframe = io.getTable("filmography", actorID)
top5 = dataframe[['Ranking', 'Name', 'Year', 'Genre']]
return top5.head() | 0 |
f3e89f7b7231a4b724affb91ff2423ce | 819f95c99bd18e248705204d40e781c1 | If config says don't email | {
if (Mage::getStoreConfig('payment/ipcarthandoff/send_new_order_emails') == 0
&& $this->getPayment()->getMethod() == 'iparcel'
&& $forceMode == false
) {
return $this;
}
return parent::queueNewOrderEmail($forceMode);
} | 1 |
1a5dfbef687590cd11eb5f37ece5be8d | 0fdeb1130c3c10b46932ea8c482422ac | Updates the 'preferences' attribute with ui values from the handler. | class RapidDelegate(BaseDelegate, QThread):
def _setSettings(self):
self.logger.debug("Entering _setSettings")
self.measurement_settings = self.preferences.measurement_settings
self.window.measurement_settings = self.measurement_settings
self.window.updateWidgets()
if self.window... | 0 |
4b842aa1510f1402661c0ca9001dbfd4 | 97a396c15e6128d258d6a55d42f62f60 | Calculates when is the next notification date. | public function calculateNextRun(); | 1 |
5e1947ee63ea64bdb0a31bc90aab3089 | 89e8ba762a40bdef6dbfdf6d0597ffed | Computes the shift between the start of two intervals. | a == FullInterval -> FullInterval
b == FullInterval -> FullInterval
a.first is IntNum && a.second is IntNum && b.first is IntNum && b.second is IntNum -> {
val l1 = (a.first as IntNum).i
val h1 = (a.second as IntNum).i
val l2 = (b.first as IntNum).i
... | 0 |
952a8027ff765c5cf861a2df567ad63c | 91892d5ae073019deccdcbe7ed42f876 | Adds the data record to queue, and if records queue size greater than 10, removes older one | public void addDataToQueue(JsonNode jn); | 0 |
a6c4ca44d29c245a63d3b6ae8e92210b | 860ad22dd2db2026d9721267912cfa2e | set the selected attack on cooldown | {
cooldownActive = true;
yield return new WaitForSecondsRealtime((float)(1 - (PlayerPrefs.GetInt("AtkSpd") * 0.11)));
cooldownActive = false;
} | 1 |
43ee0bdc5b8882ce2097428b64b4d520 | 34fa2c03ac573f14d0b29e579fea09f4 | Display the debugging information for the pathfinding. | {
#if false
Debug.Log("Start = " + m_startPoint.ToString());
Debug.Log("Exit = " + m_exitPoint.ToString());
Debug.Log("Shop = " + m_shopPoint.ToString());
Debug.Log("Is Actually exit = " + m_worldMapData[m_exitPoint.x, m_exitPoint.y].RoomType);
for (int i = 0; i < m_worldMaxX... | 1 |
56519892d043a448cb08e939ae5fe21f | c5bdc43be8055d49dc5ab9812671b6cb | \brief Add a dependency to the specified config file. | def add_dependency(f, from_file, on_file, fmt=None):
if fmt is None:
fmt = "$(call add_dependency,{from_file},{on_file})\n"
f.write(fmt.format(
from_file=from_file,
on_file=on_file,
)) | 1 |
8b8c57e170e9863843b300a14261cd03 | 5c44d835cc38394731222c207998951f | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<pre>
Method aboutJMenuItemActionPerformed
Description displays the about form
Date 02/20/2020
</pre>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | public class MainFrame
extends JFrame
void jMenuHelpAbout_actionPerformed(ActionEvent actionEvent) {
MainFrame_AboutBox dlg = new MainFrame_AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation( (frmSize.width - dlg... | 1 |
f490a6153a732c4f462a63f0adca3d6e | 74f9677ae160ec02c2d22d8e21df99a9 | Cette fonction permet de lancer une partie en joueur contre IA | partie = api.débuter_partie(ARGUMENTS.idul.lower())
idp = partie[0]
jeu = qrx.QuoridorX([idul, "automate"])
jeu.état = partie[1]
jeu.afficher()
while True:
try:
jeu.jouer_coup(1)
jeu.afficher()
jeu.état = api.jouer_coup(idp, jeu.type_coup, jeu.pos_coup... | 1 |
7191e7a1f925c7c84c9618b798b4ba9d | afa2a6b9be78bd457f9c09299a92afc0 | Gets a validator instance for the specified country code. | public final class CountryCodeValidator implements Validator<String>
@Nonnull
@Override
public ValidationResult validate(@Nonnull String countryCode) {
if (!Strings.isNullOrEmpty(countryCode)) {
if (countryCode.length() != 2) {
return new ValidationResult.Builder()
... | 0 |
e09740b6997c12e2f0c4367d55ba5f05 | ab5e5d62584a0244ce474c2dd0dc4430 | 批量更改用户签约类型 | Map<String, Object> updateMerchantSignType(String merchantKey, String merchantPublicKey, String merchantNo); | 0 |
604222a7428e774070c8d650989bf358 | ed126d9be46d70175eb53367d64d00a4 | Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. | class CfnDatasetGroupProps:
def dataset_arns(self) -> typing.Optional[typing.List[builtins.str]]:
result = self._values.get("dataset_arns")
return typing.cast(typing.Optional[typing.List[builtins.str]], result) | 0 |
dd663f8983a8b0d31bdef4a4a2230425 | d94b571a3b34ca34569b26505eab7885 | Поиск групп, в которых состоит пользователь, но не состоят друзья | namespace CheckBook.App.ViewModels
public class ManagerViewModel : AppViewModelBase
public void GroupSearch()
{
var currentGroupUsers = new HashSet<int>(GroupUsers.Select(u => u.UserId ?? 0));
GroupSearchResults = userService.SearchUsers(GroupSearchText)
.Where(u => !... | 0 |
c09afd3eed050a241cf52c36679af6a4 | f714dcc67465ef14aaa8c707199b25e7 | Предназначен для получения ассоциативных массивов нужных файлов к главному документу по его id
<b>null</b> в противном случае | class DocumentNewsManageData extends BaseManageData
public function GetUploadFiles($documentNewsId, $withCache=false)
{
$result = "";
if ($documentNewsId > 0) {
$cacheDir = CACHE_PATH . DIRECTORY_SEPARATOR . 'document_news_data';
$cacheFile = 'document_news_get_upload_files.c... | 0 |
e888ade7378880d446e1018b30202b37 | b5be7f6cf7950fe762ef4b2342795eff | Cumlative distribution function for the standard Gaussian law: quantile -> probability | {
double t = (x - m) / s;
return (cdfStandard(t));
} | 0 |
76adcc42811a1dd7c8c784ab094bd040 | 3b216ee72e8322eea34d3f5b6c58935d | Calculate the new ACB after the disposition. | def acz(d_ob,d_fo,s_ob,s_fo):
narg_array = na_ds(d_ob,d_fo,s_ob,s_fo)
acz1 = acz_na(narg_array)
return acz1 | 0 |
04f1bddff68292ad5a7bab3c3865ec40 | bcb76320341d8371d9f6fe9184a7c50c | Computes the Euclidean distance between two 2D points. | public class DalvikClusterer implements Clusterer
private double computeDistance(Point a, Point b) {
return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
} | 1 |
30796d5da23c691fb6d652e0ef85d1fd | 1bcd8d9f3fb0c7decb0e78316c2b67a6 | 一键召印 | @Slf4j
@RestController
@RequestMapping("/merchants")
public class PrinterController
@PostMapping("/automaticPrinting")
public ResultCode automaticPrinting(@RequestParam("orderId")Integer orderId){
return printerService.automaticPrinting(orderId);
} | 1 |
644c85bcfc845d2e9244d0c07b81ecb1 | 4cda6480de0b5a44d0860d1ae2b35196 | simple test to see if we can load a known good converter rules file. | this.runConformTest(new String[] {
"p/First.groovy",
"package p;\n"+
"import java.util.regex.Pattern\n"+
"public class First {\n"+
" private final static BigInteger bd = new BigInteger(\"3\");\n"+
" public static void main(String[] argv) {\n"+
" print bd+\"success\"\n"+
"... | 0 |
86f8c950503c2fe9296f0494c34b08a5 | ce6fb3264b43787e420a1a7cac1c373b | Returns the scriptCollectionArray with the FileAssets objects to be publish or managed by the AssetManager | class Assets extends Plugin
public function getCollection($name) {
return $this->getDI()->get('assets')->collection($name);
} | 0 |
3dcf5c81b81a4647b902d303ac46ad6b | 3027710e4ebbf97b1bbcbec2135d2258 | 获取所有uuid | class Base:
def get_all_uuids(cls) -> List:
return list(map(lambda obj: obj.uuid, cls.get_all())) | 1 |
2bb135e9d4cfce94d9c5642d8f5b9f56 | 2ae2f1e664fa40fd7c2db7847f18ae29 | @brief 绘制刻度 | {
pPainter->save();
QFont font;
font.setPointSize(13);
pPainter->setFont(font);
pPainter->setPen(Qt::black);
pPainter->drawText(QRectF(-40,-15,80,20),Qt::AlignCenter,QString::number(m_dCurrentValue));
pPainter->drawText(QRectF(-20,m_nRadius*0.5,40,20),Qt::AlignCenter,m_strUnit);
pPainter... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.